{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/global/window.js","webpack:///./node_modules/video.js/node_modules/@videojs/vhs-utils/es/byte-helpers.js","webpack:///./node_modules/global/document.js","webpack:///./node_modules/react/react.js","webpack:///./node_modules/keycode/index.js","webpack:///./node_modules/fbjs/lib/invariant.js","webpack:///./node_modules/react-dom/lib/reactProdInvariant.js","webpack:///./node_modules/fbjs/lib/warning.js","webpack:///./node_modules/video.js/node_modules/@videojs/vhs-utils/es/codecs.js","webpack:///./node_modules/object-assign/index.js","webpack:///./node_modules/react-dom/lib/ReactDOMComponentTree.js","webpack:///./node_modules/fbjs/lib/ExecutionEnvironment.js","webpack:///./node_modules/axios/lib/utils.js","webpack:///./node_modules/react-dom/lib/ReactInstrumentation.js","webpack:///./node_modules/react-dom/lib/ReactUpdates.js","webpack:///./node_modules/fbjs/lib/emptyFunction.js","webpack:///./node_modules/react/lib/ReactCurrentOwner.js","webpack:///./node_modules/react-dom/lib/SyntheticEvent.js","webpack:///./node_modules/@babel/runtime/helpers/extends.js","webpack:///./node_modules/axios/index.js","webpack:///./node_modules/mpd-parser/node_modules/@videojs/vhs-utils/es/resolve-url.js","webpack:///./node_modules/mpd-parser/dist/mpd-parser.es.js","webpack:///./node_modules/mpd-parser/node_modules/@videojs/vhs-utils/es/media-groups.js","webpack:///./node_modules/react/lib/React.js","webpack:///./node_modules/react-dom/lib/PooledClass.js","webpack:///./node_modules/react-dom/lib/ReactReconciler.js","webpack:///./node_modules/react-dom/index.js","webpack:///./node_modules/video.js/node_modules/@videojs/vhs-utils/es/id3-helpers.js","webpack:///./node_modules/react/lib/ReactElement.js","webpack:///./node_modules/react-dom/lib/DOMProperty.js","webpack:///./node_modules/react-dom/lib/DOMLazyTree.js","webpack:///./node_modules/url-toolkit/src/url-toolkit.js","webpack:///./node_modules/react/lib/reactProdInvariant.js","webpack:///./node_modules/react-dom/lib/EventPropagators.js","webpack:///./node_modules/react-dom/lib/EventPluginHub.js","webpack:///./node_modules/react-dom/lib/SyntheticUIEvent.js","webpack:///./node_modules/react-dom/lib/ReactInstanceMap.js","webpack:///./node_modules/mux.js/lib/utils/clock.js","webpack:///./node_modules/video.js/node_modules/@videojs/vhs-utils/es/mp4-helpers.js","webpack:///./node_modules/video.js/node_modules/@videojs/vhs-utils/es/opus-helpers.js","webpack:///./node_modules/video.js/node_modules/@videojs/vhs-utils/es/ebml-helpers.js","webpack:///./node_modules/video.js/node_modules/@videojs/vhs-utils/es/nal-helpers.js","webpack:///./node_modules/video.js/node_modules/@videojs/vhs-utils/es/containers.js","webpack:///./node_modules/fbjs/lib/emptyObject.js","webpack:///(webpack)/buildin/global.js","webpack:///./node_modules/@xmldom/xmldom/lib/conventions.js","webpack:///./node_modules/react-dom/lib/Transaction.js","webpack:///./node_modules/react-dom/lib/SyntheticMouseEvent.js","webpack:///./node_modules/react-dom/lib/setInnerHTML.js","webpack:///./node_modules/react-dom/lib/escapeTextContentForBrowser.js","webpack:///./node_modules/react-dom/lib/ReactBrowserEventEmitter.js","webpack:///./node_modules/prop-types/index.js","webpack:///./node_modules/domready/ready.js","webpack:///./node_modules/axios/lib/defaults.js","webpack:///./node_modules/process/browser.js","webpack:///./node_modules/react-dom/lib/EventPluginRegistry.js","webpack:///./node_modules/react-dom/lib/EventPluginUtils.js","webpack:///./node_modules/react-dom/lib/ReactErrorUtils.js","webpack:///./node_modules/react-dom/lib/getEventTarget.js","webpack:///./node_modules/react-dom/lib/isEventSupported.js","webpack:///./node_modules/react-dom/lib/getEventModifierState.js","webpack:///./node_modules/react-dom/lib/DOMChildrenOperations.js","webpack:///./node_modules/react-dom/lib/DOMNamespaces.js","webpack:///./node_modules/react-dom/lib/createMicrosoftUnsafeLocalFunction.js","webpack:///./node_modules/react-dom/lib/LinkedValueUtils.js","webpack:///./node_modules/react-dom/lib/ReactComponentEnvironment.js","webpack:///./node_modules/react-dom/lib/instantiateReactComponent.js","webpack:///./node_modules/fbjs/lib/shallowEqual.js","webpack:///./node_modules/react-dom/lib/shouldUpdateReactComponent.js","webpack:///./node_modules/react-dom/lib/KeyEscapeUtils.js","webpack:///./node_modules/react-dom/lib/ReactUpdateQueue.js","webpack:///./node_modules/react-dom/lib/validateDOMNesting.js","webpack:///./node_modules/react-dom/lib/getEventCharCode.js","webpack:///./node_modules/react_ujs/react_ujs/src/getConstructor/fromGlobal.js","webpack:///./node_modules/react_ujs/react_ujs/src/getConstructor/fromRequireContext.js","webpack:///./node_modules/@videojs/xhr/lib/index.js","webpack:///./node_modules/videojs-vtt.js/lib/browser-index.js","webpack:///./node_modules/video.js/node_modules/@videojs/vhs-utils/es/media-types.js","webpack:///./node_modules/video.js/dist/video.es.js","webpack:///./app/javascript/components/Post.jsx","webpack:///./node_modules/react/lib/ReactBaseClasses.js","webpack:///./node_modules/react/lib/ReactNoopUpdateQueue.js","webpack:///./node_modules/react/lib/canDefineProperty.js","webpack:///./node_modules/react/lib/ReactElementSymbol.js","webpack:///./node_modules/prop-types/factory.js","webpack:///./node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack:///(webpack)/buildin/module.js","webpack:///./node_modules/buffer/index.js","webpack:///./node_modules/@xmldom/xmldom/lib/dom.js","webpack:///./node_modules/axios/lib/helpers/bind.js","webpack:///./node_modules/axios/lib/adapters/xhr.js","webpack:///./node_modules/axios/lib/core/createError.js","webpack:///./node_modules/axios/lib/cancel/isCancel.js","webpack:///./node_modules/axios/lib/cancel/Cancel.js","webpack:///./node_modules/react-dom/lib/ReactDOMComponentFlags.js","webpack:///./node_modules/react-dom/lib/ReactDefaultInjection.js","webpack:///./node_modules/react-dom/lib/accumulateInto.js","webpack:///./node_modules/react-dom/lib/forEachAccumulated.js","webpack:///./node_modules/react-dom/lib/getTextContentAccessor.js","webpack:///./node_modules/react-dom/lib/CallbackQueue.js","webpack:///./node_modules/react-dom/lib/ReactFeatureFlags.js","webpack:///./node_modules/react-dom/lib/inputValueTracking.js","webpack:///./node_modules/react-dom/lib/isTextInputElement.js","webpack:///./node_modules/react-dom/lib/ViewportMetrics.js","webpack:///./node_modules/react-dom/lib/setTextContent.js","webpack:///./node_modules/fbjs/lib/focusNode.js","webpack:///./node_modules/react-dom/lib/CSSProperty.js","webpack:///./node_modules/react-dom/lib/DOMPropertyOperations.js","webpack:///./node_modules/react-dom/lib/ReactDOMSelect.js","webpack:///./node_modules/react-dom/lib/ReactNodeTypes.js","webpack:///./node_modules/react-dom/lib/ReactEmptyComponent.js","webpack:///./node_modules/react-dom/lib/ReactHostComponent.js","webpack:///./node_modules/react-dom/lib/traverseAllChildren.js","webpack:///./node_modules/react/lib/ReactComponentTreeHook.js","webpack:///./node_modules/react-dom/lib/ReactServerRenderingTransaction.js","webpack:///./node_modules/react-dom/lib/ReactDefaultBatchingStrategy.js","webpack:///./node_modules/fbjs/lib/EventListener.js","webpack:///./node_modules/react-dom/lib/ReactInputSelection.js","webpack:///./node_modules/fbjs/lib/getActiveElement.js","webpack:///./node_modules/react-dom/lib/ReactMount.js","webpack:///./node_modules/react-dom/lib/ReactDOMContainerInfo.js","webpack:///./node_modules/react-dom/lib/ReactMarkupChecksum.js","webpack:///./node_modules/react-dom/lib/ReactVersion.js","webpack:///./node_modules/react-dom/lib/getHostComponentFromComposite.js","webpack:///./node_modules/react-modal/lib/helpers/tabbable.js","webpack:///./node_modules/react-modal/lib/helpers/ariaAppHider.js","webpack:///./node_modules/react-modal/lib/helpers/refCount.js","webpack:///./node_modules/react-modal/lib/helpers/safeHTMLElement.js","webpack:///(webpack)/buildin/amd-options.js","webpack:///./app/javascript/components/UploadForm.jsx","webpack:///./node_modules/safe-json-parse/tuple.js","webpack:///./node_modules/video.js/node_modules/@videojs/vhs-utils/es/resolve-url.js","webpack:///./node_modules/@videojs/vhs-utils/es/decode-b64-to-uint8-array.js","webpack:///./node_modules/mpd-parser/node_modules/@videojs/vhs-utils/es/decode-b64-to-uint8-array.js","webpack:///./node_modules/@xmldom/xmldom/lib/index.js","webpack:///./node_modules/mux.js/lib/tools/parse-sidx.js","webpack:///./node_modules/react-modal/lib/index.js","webpack:///./node_modules/react-timeago/lib/index.js","webpack:///./node_modules/react-timeago/lib/language-strings/en-short.js","webpack:///./node_modules/react-timeago/lib/formatters/buildFormatter.js","webpack:///./node_modules/react-dropzone/dist/index.js","webpack:///./node_modules/react-s3-uploader/s3upload.js","webpack:///./node_modules/@videojs/vhs-utils/es/stream.js","webpack:///./node_modules/m3u8-parser/dist/m3u8-parser.es.js","webpack:///./app/javascript/rollbar.umd.min.js","webpack:///./app/javascript/components sync ^\\.\\/.*$","webpack:///./node_modules/react/lib/lowPriorityWarning.js","webpack:///./node_modules/react/lib/ReactChildren.js","webpack:///./node_modules/react/lib/PooledClass.js","webpack:///./node_modules/react/lib/traverseAllChildren.js","webpack:///./node_modules/react/lib/getIteratorFn.js","webpack:///./node_modules/react/lib/KeyEscapeUtils.js","webpack:///./node_modules/react/lib/ReactDOMFactories.js","webpack:///./node_modules/react/lib/ReactPropTypes.js","webpack:///./node_modules/prop-types/factoryWithTypeCheckers.js","webpack:///./node_modules/react-is/index.js","webpack:///./node_modules/react-is/cjs/react-is.production.min.js","webpack:///./node_modules/prop-types/lib/has.js","webpack:///./node_modules/prop-types/checkPropTypes.js","webpack:///./node_modules/react/lib/ReactVersion.js","webpack:///./node_modules/react/lib/createClass.js","webpack:///./node_modules/create-react-class/factory.js","webpack:///./node_modules/react/lib/onlyChild.js","webpack:///./node_modules/is-function/index.js","webpack:///./node_modules/@videojs/xhr/lib/http-handler.js","webpack:///./node_modules/videojs-vtt.js/lib/vtt.js","webpack:///./node_modules/videojs-vtt.js/lib/vttcue.js","webpack:///./node_modules/videojs-vtt.js/lib/vttregion.js","webpack:///./node_modules/base64-js/index.js","webpack:///./node_modules/buffer/node_modules/ieee754/index.js","webpack:///./node_modules/isarray/index.js","webpack:///./node_modules/@xmldom/xmldom/lib/dom-parser.js","webpack:///./node_modules/@xmldom/xmldom/lib/entities.js","webpack:///./node_modules/@xmldom/xmldom/lib/sax.js","webpack:///./node_modules/mux.js/lib/utils/numbers.js","webpack:///./node_modules/axios/lib/axios.js","webpack:///./node_modules/is-buffer/index.js","webpack:///./node_modules/axios/lib/core/Axios.js","webpack:///./node_modules/axios/lib/helpers/normalizeHeaderName.js","webpack:///./node_modules/axios/lib/core/settle.js","webpack:///./node_modules/axios/lib/core/enhanceError.js","webpack:///./node_modules/axios/lib/helpers/buildURL.js","webpack:///./node_modules/axios/lib/helpers/parseHeaders.js","webpack:///./node_modules/axios/lib/helpers/isURLSameOrigin.js","webpack:///./node_modules/axios/lib/helpers/btoa.js","webpack:///./node_modules/axios/lib/helpers/cookies.js","webpack:///./node_modules/axios/lib/core/InterceptorManager.js","webpack:///./node_modules/axios/lib/core/dispatchRequest.js","webpack:///./node_modules/axios/lib/core/transformData.js","webpack:///./node_modules/axios/lib/helpers/isAbsoluteURL.js","webpack:///./node_modules/axios/lib/helpers/combineURLs.js","webpack:///./node_modules/axios/lib/cancel/CancelToken.js","webpack:///./node_modules/axios/lib/helpers/spread.js","webpack:///./node_modules/react-modal/lib/components/Modal.js","webpack:///./node_modules/react-dom/lib/ReactDOM.js","webpack:///./node_modules/react-dom/lib/ARIADOMPropertyConfig.js","webpack:///./node_modules/react-dom/lib/BeforeInputEventPlugin.js","webpack:///./node_modules/react-dom/lib/FallbackCompositionState.js","webpack:///./node_modules/react-dom/lib/SyntheticCompositionEvent.js","webpack:///./node_modules/react-dom/lib/SyntheticInputEvent.js","webpack:///./node_modules/react-dom/lib/ChangeEventPlugin.js","webpack:///./node_modules/react-dom/lib/ReactRef.js","webpack:///./node_modules/react-dom/lib/ReactOwner.js","webpack:///./node_modules/react-dom/lib/DefaultEventPluginOrder.js","webpack:///./node_modules/react-dom/lib/EnterLeaveEventPlugin.js","webpack:///./node_modules/react-dom/lib/HTMLDOMPropertyConfig.js","webpack:///./node_modules/react-dom/lib/ReactComponentBrowserEnvironment.js","webpack:///./node_modules/react-dom/lib/Danger.js","webpack:///./node_modules/fbjs/lib/createNodesFromMarkup.js","webpack:///./node_modules/fbjs/lib/createArrayFromMixed.js","webpack:///./node_modules/fbjs/lib/getMarkupWrap.js","webpack:///./node_modules/react-dom/lib/ReactDOMIDOperations.js","webpack:///./node_modules/react-dom/lib/ReactDOMComponent.js","webpack:///./node_modules/react-dom/lib/AutoFocusUtils.js","webpack:///./node_modules/react-dom/lib/CSSPropertyOperations.js","webpack:///./node_modules/fbjs/lib/camelizeStyleName.js","webpack:///./node_modules/fbjs/lib/camelize.js","webpack:///./node_modules/react-dom/lib/dangerousStyleValue.js","webpack:///./node_modules/fbjs/lib/hyphenateStyleName.js","webpack:///./node_modules/fbjs/lib/hyphenate.js","webpack:///./node_modules/fbjs/lib/memoizeStringOnly.js","webpack:///./node_modules/react-dom/lib/quoteAttributeValueForBrowser.js","webpack:///./node_modules/react-dom/lib/ReactEventEmitterMixin.js","webpack:///./node_modules/react-dom/lib/getVendorPrefixedEventName.js","webpack:///./node_modules/react-dom/lib/ReactDOMInput.js","webpack:///./node_modules/react-dom/lib/ReactPropTypesSecret.js","webpack:///./node_modules/react-dom/lib/ReactDOMOption.js","webpack:///./node_modules/react-dom/lib/ReactDOMTextarea.js","webpack:///./node_modules/react-dom/lib/ReactMultiChild.js","webpack:///./node_modules/react-dom/lib/ReactChildReconciler.js","webpack:///./node_modules/react-dom/lib/ReactCompositeComponent.js","webpack:///./node_modules/react/lib/getNextDebugID.js","webpack:///./node_modules/react-dom/lib/ReactElementSymbol.js","webpack:///./node_modules/react-dom/lib/getIteratorFn.js","webpack:///./node_modules/react-dom/lib/flattenChildren.js","webpack:///./node_modules/react-dom/lib/ReactServerUpdateQueue.js","webpack:///./node_modules/react-dom/lib/ReactDOMEmptyComponent.js","webpack:///./node_modules/react-dom/lib/ReactDOMTreeTraversal.js","webpack:///./node_modules/react-dom/lib/ReactDOMTextComponent.js","webpack:///./node_modules/react-dom/lib/ReactEventListener.js","webpack:///./node_modules/fbjs/lib/getUnboundedScrollPosition.js","webpack:///./node_modules/react-dom/lib/ReactInjection.js","webpack:///./node_modules/react-dom/lib/ReactReconcileTransaction.js","webpack:///./node_modules/react-dom/lib/ReactDOMSelection.js","webpack:///./node_modules/react-dom/lib/getNodeForCharacterOffset.js","webpack:///./node_modules/fbjs/lib/containsNode.js","webpack:///./node_modules/fbjs/lib/isTextNode.js","webpack:///./node_modules/fbjs/lib/isNode.js","webpack:///./node_modules/react-dom/lib/SVGDOMPropertyConfig.js","webpack:///./node_modules/react-dom/lib/SelectEventPlugin.js","webpack:///./node_modules/react-dom/lib/SimpleEventPlugin.js","webpack:///./node_modules/react-dom/lib/SyntheticAnimationEvent.js","webpack:///./node_modules/react-dom/lib/SyntheticClipboardEvent.js","webpack:///./node_modules/react-dom/lib/SyntheticFocusEvent.js","webpack:///./node_modules/react-dom/lib/SyntheticKeyboardEvent.js","webpack:///./node_modules/react-dom/lib/getEventKey.js","webpack:///./node_modules/react-dom/lib/SyntheticDragEvent.js","webpack:///./node_modules/react-dom/lib/SyntheticTouchEvent.js","webpack:///./node_modules/react-dom/lib/SyntheticTransitionEvent.js","webpack:///./node_modules/react-dom/lib/SyntheticWheelEvent.js","webpack:///./node_modules/react-dom/lib/ReactDOMFeatureFlags.js","webpack:///./node_modules/react-dom/lib/adler32.js","webpack:///./node_modules/react-dom/lib/findDOMNode.js","webpack:///./node_modules/react-dom/lib/renderSubtreeIntoContainer.js","webpack:///./node_modules/prop-types/factoryWithThrowingShims.js","webpack:///./node_modules/react-modal/lib/components/ModalPortal.js","webpack:///./node_modules/react-modal/lib/helpers/focusManager.js","webpack:///./node_modules/react-modal/lib/helpers/scopeTab.js","webpack:///./node_modules/react-modal/lib/helpers/bodyClassList.js","webpack:///./node_modules/exenv/index.js","webpack:///./node_modules/react-timeago/lib/defaultFormatter.js","webpack:///./node_modules/react-timeago/lib/dateParser.js","webpack:///./node_modules/react_ujs/react_ujs/index.js","webpack:///./node_modules/react-dom/server.js","webpack:///./node_modules/react-dom/lib/ReactDOMServer.js","webpack:///./node_modules/react-dom/lib/ReactServerRendering.js","webpack:///./node_modules/react-dom/lib/ReactServerBatchingStrategy.js","webpack:///./node_modules/react_ujs/react_ujs/src/events/detect.js","webpack:///./node_modules/react_ujs/react_ujs/src/events/native.js","webpack:///./node_modules/react_ujs/react_ujs/src/events/pjax.js","webpack:///./node_modules/react_ujs/react_ujs/src/events/turbolinks.js","webpack:///./node_modules/react_ujs/react_ujs/src/events/turbolinksClassicDeprecated.js","webpack:///./node_modules/react_ujs/react_ujs/src/events/turbolinksClassic.js","webpack:///./node_modules/react_ujs/react_ujs/src/getConstructor/fromRequireContextWithGlobalFallback.js","webpack:///./node_modules/react_ujs/react_ujs/src/getConstructor/fromRequireContextsWithGlobalFallback.js","webpack:///./app/javascript/images/create-album.png","webpack:///./app/javascript/images/devices-icon.png","webpack:///./app/javascript/images/done.png","webpack:///./app/javascript/images/family-photo-icon.png","webpack:///./app/javascript/images/homepage-hero-950.png","webpack:///./app/javascript/images/invite-partner.png","webpack:///./app/javascript/images/our-family.jpg","webpack:///./app/javascript/images/privacy-icon.png","webpack:///./app/javascript/images/receive-photo-email.png","webpack:///./app/javascript/images/upload-photos.png","webpack:///./node_modules/react_ujs/react_ujs/src/reactDomClient.js","webpack:///./node_modules/react_ujs/react_ujs/src/renderHelpers.js","webpack:///./app/javascript/packs/application.js","webpack:///./app/javascript/images sync ^\\.\\/.*$"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","win","window","global","self","a","b","padStart","len","str","acc","repeat","toString","slice","isArrayBufferView","obj","ArrayBuffer","isView","buffer","toUint8","bytes","Uint8Array","Array","isArray","byteOffset","byteLength","toHexString","length","toBinaryString","BigInt","Number","BYTE_TABLE","bytesToNumber","Uint16Array","_temp","_ref","_ref$signed","signed","_ref$le","le","fn","number","total","_byte","exponent","Math","abs","max","numberToBytes","_temp2","_ref2$le","x","byteCount","ceil","countBits","byteIndex","bytesToString","string","String","fromCharCode","apply","decodeURIComponent","escape","e","stringToBytes","stringIsBytes","unescape","encodeURIComponent","view","charCodeAt","concatTypedArrays","_len","arguments","buffers","_key","filter","totalLen","reduce","buf","tempBuffer","offset","forEach","set","bytesMatch","_temp3","_ref3","_ref3$offset","_ref3$mask","mask","every","bByte","doccy","minDoc","document","topLevel","_typeof","iterator","constructor","keyCode","searchInput","hasKeyCode","which","charCode","names","foundNamedKey","search","codes","toLowerCase","aliases","isEventKey","event","nameOrCode","undefined","code","title","alias","condition","format","f","error","Error","args","argIndex","replace","framesToPop","argCount","message","argIdx","warning","regexs","mp4","webm","ogg","video","audio","text","muxerVideo","muxerAudio","muxerText","mediaTypes","upperMediaTypes","translateLegacyCodec","codec","orig","profile","avcLevel","parseCodecs","codecString","codecs","split","result","codecType","trim","match","exec","type","substring","details","push","mediaType","codecsFromDefault","master","audioGroupId","mediaGroups","AUDIO","audioGroup","audioType","playlists","attributes","CODECS","isAudioCodec","test","getMimeForCodec","map","container","browserSupportsCodec","MediaSource","isTypeSupported","muxerSupportsCodec","DEFAULT_AUDIO_CODEC","DEFAULT_VIDEO_CODEC","getOwnPropertySymbols","propIsEnumerable","propertyIsEnumerable","assign","test1","getOwnPropertyNames","test2","join","test3","letter","keys","err","shouldUseNative","target","source","from","symbols","to","val","TypeError","toObject","_prodInvariant","DOMProperty","ReactDOMComponentFlags","ATTR_NAME","ID_ATTRIBUTE_NAME","Flags","internalInstanceKey","random","shouldPrecacheNode","node","nodeID","nodeType","getAttribute","nodeValue","getRenderedHostOrTextFromComponent","component","rendered","_renderedComponent","precacheNode","inst","hostInst","_hostNode","precacheChildNodes","_flags","hasCachedChildNodes","children","_renderedChildren","childNode","firstChild","outer","childInst","childID","_domID","nextSibling","getClosestInstanceFromNode","closest","parents","parentNode","pop","ReactDOMComponentTree","getInstanceFromNode","getNodeFromInstance","_hostParent","uncacheNode","canUseDOM","createElement","ExecutionEnvironment","canUseWorkers","Worker","canUseEventListeners","addEventListener","attachEvent","canUseViewport","screen","isInWorker","isBuffer","isObject","isFunction","isArrayBuffer","isFormData","FormData","isString","isNumber","isUndefined","isDate","isFile","isBlob","isStream","pipe","isURLSearchParams","URLSearchParams","isStandardBrowserEnv","navigator","product","merge","assignValue","extend","thisArg","debugTool","_assign","CallbackQueue","PooledClass","ReactFeatureFlags","ReactReconciler","Transaction","invariant","dirtyComponents","updateBatchNumber","asapCallbackQueue","getPooled","asapEnqueued","batchingStrategy","ensureInjected","ReactUpdates","ReactReconcileTransaction","TRANSACTION_WRAPPERS","initialize","this","dirtyComponentsLength","close","splice","flushBatchedUpdates","callbackQueue","reset","notifyAll","ReactUpdatesFlushTransaction","reinitializeTransaction","reconcileTransaction","mountOrderComparator","c1","c2","_mountOrder","runBatchedUpdates","transaction","sort","markerName","callbacks","_pendingCallbacks","logTopLevelRenders","namedComponent","_currentElement","isReactTopLevelWrapper","getName","console","time","performUpdateIfNecessary","timeEnd","j","enqueue","getPublicInstance","getTransactionWrappers","destructor","release","perform","method","scope","addPoolingTo","queue","batchedUpdates","callback","enqueueUpdate","isBatchingUpdates","_updateBatchNumber","injection","injectReconcileTransaction","ReconcileTransaction","injectBatchingStrategy","_batchingStrategy","asap","context","makeEmptyFunction","arg","emptyFunction","thatReturns","thatReturnsFalse","thatReturnsTrue","thatReturnsNull","thatReturnsThis","thatReturnsArgument","current","shouldBeReleasedProperties","EventInterface","currentTarget","eventPhase","bubbles","cancelable","timeStamp","Date","now","defaultPrevented","isTrusted","SyntheticEvent","dispatchConfig","targetInst","nativeEvent","nativeEventTarget","_targetInst","Interface","propName","normalize","returnValue","isDefaultPrevented","isPropagationStopped","preventDefault","stopPropagation","cancelBubble","persist","isPersistent","augmentClass","Class","Super","E","fourArgumentPooler","_extends","DEFAULT_LOCATION","baseUrl","relativeUrl","location","href","nativeURL","URL","protocolLess","removeLocation","buildAbsoluteURL","newUrl","protocol","_slicedToArray","arr","_arrayWithHoles","u","next","done","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","_defineProperty","toPrimitive","_toPrimitive","configurable","writable","_toConsumableArray","_arrayLikeToArray","_arrayWithoutHoles","iter","_iterableToArray","_nonIterableSpread","minLen","arr2","objects","concat","values","k","flatten","lists","y","list","errors","_ref$baseUrl","_ref$source","_ref$range","range","_ref$indexRange","indexRange","segment","uri","resolvedUri","ranges","startRange","parseInt","endRange","MAX_SAFE_INTEGER","byterange","parseEndNumber","endNumber","isNaN","segmentRange","duration","_attributes$timescale","timescale","sourceDuration","periodDuration","segmentDuration","start","end","dynamic","NOW","clientOffset","availabilityStartTime","_attributes$timescale2","_attributes$periodSta","periodStart","_attributes$minimumUp","minimumUpdatePeriod","_attributes$timeShift","timeShiftBufferDepth","Infinity","periodStartWC","segmentCount","availableStart","floor","availableEnd","min","parseByDuration","_attributes$timescale4","_segmentRange$type","segments","_attributes$timescale3","_attributes$startNumb","startNumber","timeline","toSegments","index","sectionDuration","segmentsFromBase","_attributes$initializ","initialization","_attributes$indexRang","presentationTime","_attributes$number","initSegment","sourceURL","segmentTimeInfo","playlist","sidx","startIndex","sidxByteRange","sidxEnd","mediaReferences","references","referenceType","endList","mediaSequence","firstOffset","reference","size","referencedSize","subsegmentDuration","endIndex","SUPPORTED_MEDIA_TYPES","getUniqueTimelineStarts","timelineStarts","keyFunction","_ref2","el","manifest","mediaGroupPlaylists","properties","group","label","groupKey","labelKey","mediaProperties","updateMediaSequenceForPlaylist","positionManifestOnTimeline","_ref6","oldManifest","newManifest","oldPlaylists","newPlaylists","_ref4","discontinuitySequence","findIndex","_ref5","oldPlaylist","NAME","findPlaylistWithName","firstNewSegment","oldMatchingSegmentIndex","oldSegment","discontinuity","discontinuityStarts","unshift","updateSequenceNumbers","generateSidxKey","mergeDiscontiguousPlaylists","playlistsByBaseUrl","cur","allPlaylists","playlistGroup","mergedPlaylists","id","lang","_acc$name$segments","contentProtection","addSidxSegmentsToPlaylist","sidxMapping","sidxKey","sidxMatch","addSidxSegmentsToPlaylists","organizeAudioPlaylists","mainPlaylist","isAudioOnly","formattedPlaylists","role","language","roleLabel","autoselect","formatted","_ref7","BANDWIDTH","bandwidth","targetDuration","serviceLocation","SUBTITLES","formatAudioPlaylist","organizeVttPlaylists","_ref8","m3u8Attributes","vttPlaylist","formatVttPlaylist","formatVideoPlaylist","_ref9","RESOLUTION","width","height","frameRate","videoOnly","_ref10","mimeType","contentType","audioOnly","_ref11","vttOnly","_ref12","flattenMediaGroupPlaylists","mediaGroupObject","labelContents","getLiveRValue","_attributes$timescale5","_attributes$periodSta2","_attributes$minimumUp2","parseByTimeline","segmentTimeline","_attributes$minimumUp3","_attributes$media","media","_attributes$timescale6","_attributes$startNumb2","sIndex","S","segmentTime","count","nextS","indexOf","identifierPattern","constructTemplateUrl","url","identifier","identifierReplacement","templateValues","RepresentationID","Bandwidth","_attributes$initializ2","mapSegment","parseTemplateInfo","Time","presentationTimeOffset","segmentsFromList","_attributes$segmentUr","segmentUrls","segmentUrlMap","segmentUrlObject","segmentUrl","_attributes$initializ3","mediaRange","SegmentURLToSegmentObject","generateSegments","_ref16","segmentAttributes","segmentsFn","segmentInfo","template","base","segmentsInfo","_segmentAttributes","_segmentAttributes$ti","findChildren","element","childNodes","_ref17","tagName","getContent","textContent","parseDuration","_match$slice2","year","month","day","hour","minute","second","parseFloat","parsers","mediaPresentationDuration","parse","suggestedPresentationDelay","prev","parseDivisionValue","parsedValue","DEFAULT","parseAttributes","parseFn","keySystemsMap","baseUrlElements","baseUrlElement","initialBaseUrl","resolvedBaseUrl","finalBaseUrl","getSegmentInformation","adaptationSet","segmentTemplate","segmentList","tag","segmentBase","segmentTimelineParentNode","segmentInitializationParentNode","segmentInitialization","toEventStream","period","eventStream","eventStreamAttributes","schemeIdUri","eventAttributes","messageData","contentEncoding","toRepresentations","periodAttributes","periodBaseUrls","periodSegmentInfo","service","adaptationSetAttributes","adaptationSetBaseUrls","roleAttributes","attrs","accessibility","captionServices","channel","_value$split2","flags","_value$split4","_value$split4$","opts","opt","_opt$split2","easyReader","aspectRatio","labelVal","keySystem","psshNode","pssh","representations","adaptationSetSegmentInfo","representation","repBaseUrlElements","repBaseUrls","representationSegmentInfo","inheritBaseUrls","toAdaptationSets","mpdAttributes","mpdBaseUrls","adaptationSets","generateContentSteeringInformation","contentSteeringNodes","eventHandler","infoFromContentSteeringTag","serverURL","queryBeforeStart","manifestString","xml","mpd","parser","parseFromString","documentElement","getElementsByTagName","options","parsedManifestInfo","_options$manifestUri","manifestUri","_options$NOW","_options$clientOffset","_options$eventHandler","periodNodes","locations","periods","priorPeriod","_ref18","priorPeriodAttributes","mpdType","getPeriodStart","contentSteeringInfo","representationInfo","inheritAttributes","_ref14","dashPlaylists","contentSteering","_ref14$sidxMapping","previousManifest","_dashPlaylists$0$attr","videoPlaylists","audioPlaylists","vttPlaylists","captions","Boolean","allowCache","VIDEO","organizedAudioGroup","organizedVttGroup","playlistTimelineStarts","_ref15","_ref13","subs","cc","svcObj","svc","instreamId","toM3u8","parseUTCTiming","UTCTimingNode","parseUTCTimingScheme","ReactBaseClasses","ReactChildren","ReactDOMFactories","ReactElement","ReactPropTypes","ReactVersion","createReactClass","onlyChild","createFactory","cloneElement","__spread","React","Children","toArray","only","Component","PureComponent","isValidElement","PropTypes","createClass","createMixin","mixin","DOM","version","oneArgumentPooler","copyFieldsFrom","Klass","instancePool","instance","standardReleaser","poolSize","DEFAULT_POOLER","CopyConstructor","pooler","NewKlass","twoArgumentPooler","a1","a2","threeArgumentPooler","a3","a4","ReactRef","attachRefs","mountComponent","internalInstance","hostParent","hostContainerInfo","parentDebugID","markup","ref","getReactMountReady","getHostNode","unmountComponent","safely","detachRefs","receiveComponent","nextElement","prevElement","_context","refsChanged","shouldUpdateRefs","ID3","getId3Offset","returnSize","getId3Size","ReactCurrentOwner","REACT_ELEMENT_TYPE","RESERVED_PROPS","__self","__source","hasValidRef","config","hasValidKey","owner","props","$$typeof","_owner","childrenLength","childArray","defaultProps","factory","cloneAndReplaceKey","oldElement","newKey","_self","_source","checkMask","bitmask","DOMPropertyInjection","MUST_USE_PROPERTY","HAS_BOOLEAN_VALUE","HAS_NUMERIC_VALUE","HAS_POSITIVE_NUMERIC_VALUE","HAS_OVERLOADED_BOOLEAN_VALUE","injectDOMPropertyConfig","domPropertyConfig","Injection","Properties","DOMAttributeNamespaces","DOMAttributeNames","DOMPropertyNames","DOMMutationMethods","isCustomAttribute","_isCustomAttributeFunctions","lowerCased","propConfig","propertyInfo","attributeName","attributeNamespace","propertyName","mutationMethod","mustUseProperty","hasBooleanValue","hasNumericValue","hasPositiveNumericValue","hasOverloadedBooleanValue","ATTRIBUTE_NAME_START_CHAR","ROOT_ATTRIBUTE_NAME","ATTRIBUTE_NAME_CHAR","getPossibleStandardName","isCustomAttributeFn","DOMNamespaces","setInnerHTML","createMicrosoftUnsafeLocalFunction","setTextContent","enableLazy","documentMode","userAgent","insertTreeChildren","tree","insertTreeBefore","html","referenceNode","nodeName","namespaceURI","insertBefore","DOMLazyTree","replaceChildWithTree","oldNode","newTree","replaceChild","queueChild","parentTree","childTree","appendChild","queueHTML","queueText","URL_REGEX","FIRST_SEGMENT_REGEX","SLASH_DOT_REGEX","SLASH_DOT_DOT_REGEX","URLToolkit","baseURL","relativeURL","alwaysNormalize","basePartsForNormalise","parseURL","path","normalizePath","buildURLFromParts","relativeParts","scheme","baseParts","netLoc","pathParts","builtParts","params","query","fragment","baseURLPath","newPath","lastIndexOf","parts","reverse","EventPluginHub","EventPluginUtils","accumulateInto","forEachAccumulated","getListener","accumulateDirectionalDispatches","phase","listener","propagationPhase","registrationName","phasedRegistrationNames","listenerAtPhase","_dispatchListeners","_dispatchInstances","accumulateTwoPhaseDispatchesSingle","traverseTwoPhase","accumulateTwoPhaseDispatchesSingleSkipTarget","parentInst","getParentInstance","accumulateDispatches","ignoredDirection","accumulateDirectDispatchesSingle","EventPropagators","accumulateTwoPhaseDispatches","events","accumulateTwoPhaseDispatchesSkipTarget","accumulateDirectDispatches","accumulateEnterLeaveDispatches","leave","enter","traverseEnterLeave","EventPluginRegistry","ReactErrorUtils","listenerBank","eventQueue","executeDispatchesAndRelease","simulated","executeDispatchesInOrder","executeDispatchesAndReleaseSimulated","executeDispatchesAndReleaseTopLevel","getDictionaryKey","_rootNodeID","injectEventPluginOrder","injectEventPluginsByName","putListener","PluginModule","registrationNameModules","didPutListener","bankForRegistrationName","disabled","shouldPreventMouseEvent","deleteListener","willDeleteListener","deleteAllListeners","extractEvents","topLevelType","plugins","possiblePlugin","extractedEvents","enqueueEvents","processEventQueue","processingEventQueue","rethrowCaughtError","__purge","__getListenerBank","getEventTarget","UIEventInterface","doc","ownerDocument","defaultView","parentWindow","detail","SyntheticUIEvent","dispatchMarker","ReactInstanceMap","remove","_reactInternalInstance","has","secondsToVideoTs","secondsToAudioTs","videoTsToSeconds","audioTsToSeconds","audioTsToVideoTs","videoTsToAudioTs","metadataTsToSeconds","ONE_SECOND_IN_TS","seconds","sampleRate","timestamp","timelineStartPts","keepOriginalTimestamps","DESCRIPTORS","results","headerSize","z","_DESCRIPTORS$z","subarray","desc","dependsOnEsId","ocrEsId","descriptors","oti","streamType","bufferSize","maxBitrate","avgBitrate","findBox","paths","complete","normalizePaths","data","EBML_TAGS","EBML","DocType","Segment","SegmentInfo","Tracks","Track","TrackNumber","DefaultDuration","TrackEntry","TrackType","FlagDefault","CodecID","CodecPrivate","VideoTrack","AudioTrack","Cluster","Timestamp","TimestampScale","BlockGroup","BlockDuration","Block","SimpleBlock","LENGTH_TABLE","removeLength","getLength","valueBytes","getInfinityDataSize","innerid","dataHeader","findEbml","dataStart","dataEnd","NAL_TYPE_ONE","NAL_TYPE_TWO","EMULATION_PREVENTION","positions","newLength","newData","sourceIndex","shift","dataType","types","nalLimit","nalStart","nalsFound","nalOffset","nalType","CONSTANTS","_isLikely","aac","mp3","docType","mkv","matroska","mov","fmp4","moof","moov","ac3","ts","flac","avi","riff","wav","findH264Nal","findH265Nal","isLikelyTypes","isLikelyFn","isLikely","g","Function","freeze","oc","MIME_TYPE","HTML","isHTML","XML_APPLICATION","XML_TEXT","XML_XHTML_APPLICATION","XML_SVG_IMAGE","NAMESPACE","SVG","XML","XMLNS","find","predicate","ac","item","OBSERVED_ERROR","TransactionImpl","transactionWrappers","wrapperInitData","_isInTransaction","isInTransaction","errorThrown","ret","initializeAll","closeAll","wrapper","initData","ViewportMetrics","MouseEventInterface","screenX","screenY","clientX","clientY","ctrlKey","shiftKey","altKey","metaKey","getModifierState","button","buttons","relatedTarget","fromElement","srcElement","toElement","pageX","currentScrollLeft","pageY","currentScrollTop","SyntheticMouseEvent","reusableSVGContainer","WHITESPACE_TEST","NONVISIBLE_TEST","svg","innerHTML","svgNode","testElement","textNode","removeChild","deleteData","matchHtmlRegExp","lastIndex","escapeHtml","hasEventPageXY","ReactEventEmitterMixin","getVendorPrefixedEventName","isEventSupported","alreadyListeningTo","isMonitoringScrollValue","reactTopListenersCounter","topEventMapping","topAbort","topAnimationEnd","topAnimationIteration","topAnimationStart","topBlur","topCanPlay","topCanPlayThrough","topChange","topClick","topCompositionEnd","topCompositionStart","topCompositionUpdate","topContextMenu","topCopy","topCut","topDoubleClick","topDrag","topDragEnd","topDragEnter","topDragExit","topDragLeave","topDragOver","topDragStart","topDrop","topDurationChange","topEmptied","topEncrypted","topEnded","topError","topFocus","topInput","topKeyDown","topKeyPress","topKeyUp","topLoadedData","topLoadedMetadata","topLoadStart","topMouseDown","topMouseMove","topMouseOut","topMouseOver","topMouseUp","topPaste","topPause","topPlay","topPlaying","topProgress","topRateChange","topScroll","topSeeked","topSeeking","topSelectionChange","topStalled","topSuspend","topTextInput","topTimeUpdate","topTouchCancel","topTouchEnd","topTouchMove","topTouchStart","topTransitionEnd","topVolumeChange","topWaiting","topWheel","topListenersIDKey","ReactBrowserEventEmitter","ReactEventListener","injectReactEventListener","setHandleTopLevel","handleTopLevel","setEnabled","enabled","isEnabled","listenTo","contentDocumentHandle","mountAt","isListening","getListeningForDocument","dependencies","registrationNameDependencies","dependency","trapBubbledEvent","trapCapturedEvent","WINDOW_HANDLE","handlerBaseName","handle","supportsEventPageXY","createEvent","ev","ensureScrollValueMonitoring","refresh","refreshScrollValues","monitorScrollValue","_listener","fns","hack","domContentLoaded","loaded","doScroll","readyState","removeEventListener","setTimeout","utils","normalizeHeaderName","DEFAULT_CONTENT_TYPE","setContentTypeIfUnset","headers","adapter","defaults","XMLHttpRequest","process","transformRequest","JSON","stringify","transformResponse","timeout","xsrfCookieName","xsrfHeaderName","maxContentLength","validateStatus","status","common","cachedSetTimeout","cachedClearTimeout","defaultSetTimout","defaultClearTimeout","runTimeout","fun","clearTimeout","currentQueue","draining","queueIndex","cleanUpNextTick","drainQueue","run","marker","runClearTimeout","Item","array","noop","nextTick","browser","env","argv","versions","on","addListener","once","off","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","listeners","binding","cwd","chdir","dir","umask","eventPluginOrder","namesToPlugins","recomputePluginOrdering","pluginName","pluginModule","pluginIndex","publishedEvents","eventTypes","eventName","publishEventForPlugin","eventNameDispatchConfigs","phaseName","publishRegistrationName","possibleRegistrationNames","injectedEventPluginOrder","injectedNamesToPlugins","isOrderingDirty","getPluginModuleForEvent","_resetEventPlugins","ComponentTree","TreeTraversal","executeDispatch","invokeGuardedCallbackWithCatch","invokeGuardedCallback","isEndish","isMoveish","isStartish","executeDirectDispatch","dispatchListener","dispatchInstance","res","dispatchListeners","dispatchInstances","executeDispatchesInOrderStopAtTrue","executeDispatchesInOrderStopAtTrueImpl","hasDispatches","isAncestor","getLowestCommonAncestor","argFrom","argTo","injectComponentTree","Injected","injectTreeTraversal","caughtError","func","correspondingUseElement","useHasFeature","implementation","hasFeature","eventNameSuffix","capture","isSupported","setAttribute","modifierKeyToProp","Alt","Control","Meta","Shift","modifierStateGetter","keyArg","keyProp","Danger","getNodeAfter","insertChildAt","insertLazyTreeChildAt","moveChild","openingComment","closingComment","nextNode","moveDelimitedText","removeDelimitedText","startNode","DOMChildrenOperations","dangerouslyReplaceNodeWithMarkup","replaceDelimitedText","stringText","nodeAfterComment","createTextNode","processUpdates","updates","update","content","afterNode","fromNode","mathml","MSApp","execUnsafeLocalFunction","arg0","arg1","arg2","arg3","ReactPropTypesSecret","propTypesFactory","hasReadOnlyValue","checkbox","image","hidden","radio","submit","_assertSingleLink","inputProps","checkedLink","valueLink","_assertValueLink","onChange","_assertCheckedLink","checked","propTypes","componentName","readOnly","loggedTypeFailures","getDeclarationErrorAddendum","LinkedValueUtils","checkPropTypes","getValue","getChecked","executeOnChange","requestChange","injected","ReactComponentEnvironment","replaceNodeWithMarkup","processChildrenUpdates","injectEnvironment","environment","ReactCompositeComponent","ReactEmptyComponent","ReactHostComponent","ReactCompositeComponentWrapper","construct","instantiateReactComponent","shouldHaveDebugID","info","createInternalComponent","isInternalComponentType","getNativeNode","createInstanceForText","_mountIndex","_mountImage","_instantiateReactComponent","is","objA","objB","keysA","keysB","prevEmpty","nextEmpty","prevType","nextType","KeyEscapeUtils","escaperLookup","unescaperLookup","getInternalInstanceReadyForUpdate","publicInstance","callerName","ReactUpdateQueue","isMounted","enqueueCallback","validateCallback","enqueueCallbackInternal","enqueueForceUpdate","_pendingForceUpdate","enqueueReplaceState","completeState","_pendingStateQueue","_pendingReplaceState","enqueueSetState","partialState","enqueueElementInternal","nextContext","_pendingElement","displayName","formatUnexpectedArgument","validateDOMNesting","className","eval","reqctx","filename","createXHR","httpHandler","parseHeaders","row","initParams","_createXHR","called","response","body","getBody","xhr","responseText","responseType","responseXML","firefoxBugTakenEffect","getXml","isJson","errorFunc","evt","timeoutTimer","statusCode","failureResponse","loadFunc","aborted","useXDR","rawRequest","getAllResponseHeaders","cors","XDomainRequest","sync","json","onreadystatechange","onload","onerror","onprogress","onabort","ontimeout","open","username","password","withCredentials","abort","setRequestHeader","isEmpty","beforeSend","send","forEachArray","toUpperCase","vttjs","WebVTT","VTTCue","VTTRegion","cueShim","regionShim","nativeVTTCue","nativeVTTRegion","shim","restore","MPEGURL_REGEX","DASH_REGEX","simpleTypeFromSourceType","_createForOfIteratorHelper","allowArrayLike","it","F","_e","normalCompletion","didErr","step","_e2","_wrapNativeSuper","_cache","Map","_isNativeFunction","Wrapper","_construct","_getPrototypeOf","_setPrototypeOf","Parent","_isNativeReflectConstruct","Reflect","_get","receiver","_superPropBase","getOwnPropertyDescriptor","_inherits","subClass","superClass","setPrototypeOf","__proto__","_createSuper","Derived","hasNativeReflectConstruct","NewTarget","_possibleConstructorReturn","_assertThisInitialized","ReferenceError","sham","Proxy","valueOf","getPrototypeOf","_classCallCheck","Constructor","_defineProperties","descriptor","_toPropertyKey","_createClass","protoProps","staticProps","browserApi","version$6","hooks_","hooks","removeHook","FullscreenApi","prefixed","apiMap","specApi","_i2","history","log$1","createLogger$1","logByType","delimiter","styles","level","log","lvl","levels","lvlRegExp","RegExp","resultName","LogByTypeFactory","createLogger","subName","subDelimiter","subStyles","resultDelimiter","resultStyles","createNewLogger","newName","newDelimiter","newStyles","all","debug","warn","fname","historyItem","clear","disable","enable","_len2","_key2","_len3","_key3","_len4","_key4","each","initial","accum","isPlain","merge$1","_len5","sources","_key5","defineLazyProperty","ANDROID_VERSION","Obj","IS_IPOD","IOS_VERSION","IS_ANDROID","IS_FIREFOX","IS_EDGE","IS_CHROMIUM","IS_CHROME","CHROMIUM_VERSION","CHROME_VERSION","IE_VERSION","IS_SAFARI","IS_WINDOWS","IS_IPAD","IS_IPHONE","TOUCH_ENABLED","isReal","maxTouchPoints","DocumentTouch","UAD","userAgentData","platform","brands","brand","USER_AGENT","major","minor","IS_IOS","IS_ANY_SAFARI","isNonBlankString","isEl","isInFrame","parent","createQuerier","selector","querySelector","ctx","_createEl","attrName","appendContent","innerText","prependTo","child","_hasClass","classToCheck","throwIfWhitespace","classList","contains","_addClass","_element$classList","_len6","classesToAdd","_key6","add","_removeClass","_element$classList2","_len7","classesToRemove","_key7","_toggleClass","classToToggle","toggle","setAttributes","attrValue","removeAttribute","getAttributes","knownBooleans","_i3","attrVal","includes","_getAttribute","attribute","_setAttribute","_removeAttribute","blockTextSelection","focus","onselectstart","unblockTextSelection","getBoundingClientRect","rect","computedStyle","findPosition","offsetParent","left","top","offsetWidth","offsetHeight","fullscreenElement","offsetLeft","offsetTop","getPointerPosition","translated","_transform","_values","_values2","position","boxTarget","box","boxW","boxH","offsetY","offsetX","changedTouches","isTextNode","emptyEl","normalizeContent","insertContent","isSingleLeftClick","_$","_$$","prop","getComputedStyle","computedStyleValue","getPropertyValue","copyStyleSheetsToWindow","styleSheets","styleSheet","cssRules","rule","cssText","style","head","link","rel","mediaText","videojs$1","Dom","createEl","hasClass","addClass","removeClass","toggleClass","$","$$","_windowLoaded","autoSetup","vids","audios","divs","mediaEls","_i4","mediaEl","autoSetupTimeout","player","wait","vjs","setWindowLoaded","_supportsPassive","createStyleElement","DomData","WeakMap","_guid","newGUID","_cleanUpEvents","elem","handlers","dispatcher","detachEvent","_handleMultipleEvents","fixEvent","fixed_","returnTrue","returnFalse","isImmediatePropagationStopped","old","stopImmediatePropagation","scrollLeft","clientLeft","scrollTop","clientTop","supportsPassive","passiveEvents","_on","guid","hash","handlersCopy","passive","_off","removeType","_trigger","elemData","targetData","_one","_any","EVENT_MAP","Events","trigger","one","any","UPDATE_REFRESH_INTERVAL","bind_","uid","bound","throttle","last","performance","debounce","immediate","debounced","_later","cancel","Fn","EventTarget$2","ael","allowedEvents_","_this","oldTimeout","dispatchEvent","objName","name_","isEvented","eventBusEl_","isValidEventType","validateTarget","fnName","validateEventType","validateListener","normalizeListenArgs","isTargetingSelf","_args","_args2","listen","EventedMixin","_this2","_len8","_key8","_normalizeListenArgs","removeListenerOnDispose","removeRemoverOnTargetDispose","_this3","_len9","_key9","_normalizeListenArgs2","_len10","largs","_key10","_this4","_len11","_key11","_normalizeListenArgs3","_len12","_key12","targetOrType","typeOrListener","evented","eventBusKey","eventedCallbacks","el_","StatefulMixin","state","setState","stateUpdates","changes","_this5","stateful","defaultState","handleStateChanged","w","toTitleCase$1","titleCaseEquals","str1","str2","Str","toTitleCase","Component$1","ready","_this6","play","player_","isDisposed_","parentComponent_","options_","id_","handleLanguagechange","children_","childIndex_","childNameIndex_","setTimeoutIds_","Set","setIntervalIds_","rafIds_","namedRafs_","clearingTimersOnDispose_","initChildren","reportTouchActivity","enableTouchActivity","readyQueue_","_i5","dispose","restoreEl","tokens","defaultValue","languages","primaryCode","primaryLang","localizedString","contentEl_","_len13","_key13","currentChild","_i6","getChild","iconName","experimentalSvgIcons","xmlnsURL","iconContainer","svgEl","createElementNS","setAttributeNS","useEl","iconIsSet_","componentClassName","componentClass","ComponentClass","getComponent","refNode","contentEl","childFound","_i7","compEl","_this7","workingChildren","parentOptions","_Tech2","some","wchild","isTech","playerOptions","newChild","addChild","isReady_","readyQueue","_len14","_key14","_len15","_key15","num","skipListeners","dimension","widthOrHeight","pxIndex","computedWidthOrHeight","currentDimension","blur","handleKeyDown","couldBeTap","touchStart","firstTouch","touches","xdiff","ydiff","sqrt","noTap","reportUserActivity","touchHolding","report","clearInterval","setInterval","touchEnd","timeoutId","_this8","clearTimersOnDispose_","interval","intervalId","_this9","requestAnimationFrame","_this10","cancelAnimationFrame","_this11","idName","cancelName","ComponentToRegister","reason","Tech","isComp","isPrototypeOf","components_","Player","players","playerNames","pname","getRange","valueIndex","rangeIndex","maxIndex","rangeCheck","createTimeRangesObj","timeRangesObj","createTimeRanges$1","registerComponent","defaultImplementation","guide","h","gm","gh","setFormatTime","customImplementation","resetFormatTime","formatTime","createTimeRanges","createTimeRange","_bufferedPercent","buffered","bufferedDuration","_i8","MediaError","defaultMessages","errorTypes","errNum","isPromise","then","silencePromise","trackToJson_","track","cues","cue","startTime","endTime","textTrackConverter","tech","trackEls","trackObjs","trackEl","src","textTracks","addedTrack","addRemoteTextTrack","addCue","MODAL_CLASS_NAME","ModalDialog","_Component$","_super","_this12","handleKeyDown_","close_","opened_","hasBeenOpened_","hasBeenFilled_","closeable","uncloseable","descEl_","description","buildCSSClass","tabIndex","previouslyActiveEl_","localize","fillAlways","fill","wasPlaying_","paused","pauseOnOpen","pause","hadControls_","controls","show","conditionalFocus_","hide","conditionalBlur_","temporary","closeable_","temp","controlText","fillWith","parentEl","nextSiblingEl","empty","closeButton","content_","activeEl","activeElement","playerEl","focusIndex","focusableEls","focusableEls_","_i9","allChildren","querySelectorAll","HTMLAnchorElement","HTMLAreaElement","hasAttribute","HTMLInputElement","HTMLSelectElement","HTMLTextAreaElement","HTMLButtonElement","HTMLIFrameElement","HTMLObjectElement","HTMLEmbedElement","TrackList","_EventTarget$","_super2","_this13","tracks","tracks_","_i10","addTrack","_this14","labelchange_","rtrack","_i11","_i12","change","addtrack","removetrack","labelchange","disableOthers$1","_i13","AudioTrackList","_TrackList","_super3","_this15","_i14","changing_","_this16","enabledChange_","disableOthers","_i15","selected","VideoTrackList","_TrackList2","_super4","_this17","_i16","_i17","_this18","selectedChange_","TextTrackList","_TrackList3","_super5","_this19","queueChange_","queueTrigger","triggerSelectedlanguagechange","triggerSelectedlanguagechange_","kind","selectedlanguagechange_","HtmlTrackElementList","trackElements","trackElements_","_i18","addTrackElement_","trackElement","trackElement_","_i19","_i20","TextTrackCueList","setCues_","length_","oldLength","cues_","defineProp","_i21","VideoTrackKind","alternative","main","sign","subtitles","commentary","AudioTrackKind","TextTrackKind","descriptions","chapters","metadata","TextTrackMode","showing","_EventTarget$2","_super6","_this20","trackProps","_loop","newLabel","parseUrl","_i22","host","getAbsoluteURL","getFileExtension","isCrossOrigin","winLoc","urlInfo","Url","parseCues","srcContent","Parser","StringDecoder","oncue","onparsingerror","onflush","groupCollapsed","groupEnd","flush","loadTrack","crossOrigin","tech_","responseBody","loaded_","TextTrack","_Track","_super7","_this21","settings","srclang","default_","activeCues_","preload_","preloadTextTracks","activeCues","changed","timeupdateHandler","isDisposed","rvf_","requestVideoFrameCallback","stopTracking","startTracking","defineProperties","newMode","ct","currentTime","active","_i23","_i24","cancelVideoFrameCallback","originalCue","originalCue_","_i25","removeCue","_removeCue","cuechange","_Track2","_super8","_this22","newEnabled","_Track3","_super9","_this23","newSelected","HTMLTrackElement","_EventTarget$3","_super10","_this24","NONE","LOADED","load","LOADING","ERROR","NORMAL","ListClass","TrackClass","capitalName","getterName","privateName","REMOTE","remoteText","remoteTextEl","ALL","_Component$2","_super11","_this25","onDurationChange_","onDurationChange","trackProgress_","trackProgress","trackCurrentTime_","trackCurrentTime","stopTrackingCurrentTime_","stopTrackingCurrentTime","disposeSourceHandler_","disposeSourceHandler","queuedHanders_","hasStarted_","featuresProgressEvents","manualProgressOn","featuresTimeupdateEvents","manualTimeUpdatesOn","nativeCaptions","nativeTextTracks","featuresNativeTextTracks","emulateTextTracks","autoRemoteTextTracks_","initTrackListeners","nativeControlsForTouch","emitTapEvents","_this26","triggerSourceset","manualProgress","stopTrackingProgress","progressInterval","numBufferedPercent","bufferedPercent","bufferedPercent_","duration_","manualTimeUpdates","currentTimeInterval","manuallyTriggered","clearTracks","manualProgressOff","manualTimeUpdatesOff","_this27","removeRemoteTextTrack","removeTrack","error_","_isScrubbing","_seconds","_this28","trackListChanges","_this29","script","addWebVttScript_","_this30","remoteTracks","remoteTextTracks","handleAddTrack","handleRemoveTrack","updateDisplay","textTracksChanges","_i26","_i27","createTrackHelper","_this31","manualCleanup","htmlTrackElement","createRemoteTextTrack","remoteTextTrackEls","getTrackElementByTrack_","removeTrackElement_","Promise","reject","cb","_this32","requestNamedAnimationFrame","cancelNamedAnimationFrame","override","_type","srcObj","canPlayType","techs_","canPlaySource","defaultTechOrder_","videojs","featuresVolumeControl","featuresMuteControl","featuresFullscreenResize","featuresPlaybackRate","featuresSourceset","featuresVideoFrameCallback","withSourceHandlers","_Tech","registerSourceHandler","handler","sourceHandlers","can","_i28","selectSourceHandler","_i29","canHandleSource","sh","originalFn","sourceHandler_","setSource","nativeSourceHandler","currentSource_","handleSource","cleanupAutoTextTracks","registerTech","middlewares","middlewareInstances","TERMINATOR","setSourceHelper","mediate","middleware","callMethod","middlewareValue","middlewareIterator","terminated","mws","_i30","mw","executeRight","allowedGetters","muted","played","seekable","volume","ended","allowedSetters","setCurrentTime","setMuted","setVolume","allowedMediators","lastRun","_middleware","mwFactory","mwrest","_i31","_mws$_i","mwf","mwi","getOrCreateFactory","_src","MimetypesKind","opus","ogv","m4v","m4a","caf","oga","m3u8","jpg","jpeg","gif","png","webp","getMimetype","ext","filterSource","newsrc","srcobj","fixSource","mimetype","MediaLoader","_Component$3","_super12","_this33","_i33","techOrder","techName","getTech","loadTech_","ClickableComponent","_Component$4","_super13","_this34","handleMouseOver_","handleMouseOver","handleMouseOut_","handleMouseOut","handleClick_","handleClick","tabIndex_","createControlTextEl","controlTextEl_","controlText_","localizedText","nonIconControl","noUITitleAttributes","enabled_","clickHandler","PosterImage","_ClickableComponent","_super14","_this35","update_","crossorigin","poster","setSrc","loading","alt","darkGray","lightGray","fontMap","monospace","sansSerif","serif","monospaceSansSerif","monospaceSerif","proportionalSansSerif","proportionalSerif","casual","smallcaps","constructColor","color","opacity","hex","tryUpdateStyle","getCSSPositionValue","TextTrackDisplay","_Component$5","_super15","_this36","updateDisplayHandler","updateDisplayOverlay","toggleDisplay","preselectTrack","screenOrientation","orientation","changeOrientationEvent","_i34","firstDesc","firstCaptions","preferredTrack","modes","trackList","userPref","cache_","selectedLanguage","_i35","processCues","allowMultipleShowingTracks","clearDisplay","showingTracks","_i36","updateForTrack","descriptionsTrack","captionsSubtitlesTrack","_track","videoHeight","CSS","supports","playerWidth","currentWidth","playerHeight","currentHeight","playerAspectRatio","videoAspectRatio","videoWidth","insetInlineMatch","insetBlockMatch","round","overrides","textTrackSettings","getValues","cueDiv","displayState","textOpacity","backgroundColor","backgroundOpacity","windowColor","windowOpacity","edgeStyle","textShadow","fontPercent","fontSize","fontFamily","fontVariant","_i37","_i38","_track2","_j","cueEl","updateDisplayState","LoadingSpinner","_Component$6","_super16","isAudio","playerType","Button","_ClickableComponent2","_super17","BigPlayButton","_Button","_super18","_this37","mouseused_","setIcon","handleMouseDown","playPromise","playToggle","playFocus","CloseButton","_Button2","_super19","_this38","PlayToggle","_Button3","_super20","_this39","replay","handlePlay","handlePause","handleEnded","_this40","handleSeeked","TimeDisplay","_Component$7","_super21","_this41","updateContent","updateTextNode_","span","labelText_","textNode_","_this42","formattedTime_","CurrentTimeDisplay","_TimeDisplay","_super22","scrubbing","getCache","DurationDisplay","_TimeDisplay2","_super23","_this43","TimeDivider","_Component$8","_super24","div","RemainingTimeDisplay","_TimeDisplay3","_super25","_this44","displayNegative","remainingTimeDisplay","remainingTime","LiveDisplay","_Component$9","_super26","_this45","updateShowing","SeekToLive","_Button4","_super27","_this46","updateLiveEdgeStatus","liveTracker","updateLiveEdgeStatusHandler_","textEl_","atLiveEdge","seekToLiveEdge","clamp","Num","Slider","_Component$10","_super28","_this47","handleMouseDown_","handleMouseUp_","handleMouseUp","handleMouseMove_","handleMouseMove","bar","barName","vertical","playerEvent","_this48","progress","getProgress","progress_","sizeKey","toFixed","getPercent","stepBack","stepForward","bool","vertical_","percentify","LoadProgressBar","_Component$11","_super29","_this49","partEls_","loadedText","separator","percentageEl_","_this50","isLive","seekableEnd","bufferedEnd","percent","percent_","_i39","part","dataset","_i40","TimeTooltip","_Component$12","_super30","_this51","seekBarRect","seekBarPoint","tooltipRect","playerRect","seekBarPointPx","spaceLeftOfPoint","spaceRightOfPoint","right","pullTooltipBy","write","_this52","liveWindow","secondsBehind","PlayProgressBar","_Component$13","_super31","_this53","timeTooltip","updateTime","MouseTimeDisplay","_Component$14","_super32","_this54","_this55","SeekBar","_Slider","_super33","_this56","setEventHandlers_","_this57","updateInterval","enableIntervalHandler_","enableInterval_","disableIntervalHandler_","disableInterval_","toggleVisibility_","visibilityState","_this58","getCurrentTime_","liveCurrentTime","currentTime_","nextSeekedFromUser","seekableStart","videoWasPlaying","mouseDown","newTime","distance","calculateDistance","userSeek_","mouseTimeDisplay","handleAction","gotoFraction","STEP_SECONDS","ProgressControl","_Component$15","_super34","_this59","throttledHandleMouseSeek","handleMouseSeek","handleMouseUpHandler_","handleMouseDownHandler_","seekBar","playProgressBar","seekBarEl","removeListenersAddedOnMousedownAndTouchstart","PictureInPictureToggle","_Button5","_super35","_this60","handlePictureInPictureChange","handlePictureInPictureEnabledChange","handlePictureInPictureAudioModeChange","currentType","audioPosterMode","audioOnlyMode","isInPictureInPicture","exitPictureInPicture","pictureInPictureEnabled","disablePictureInPicture","enableDocumentPictureInPicture","requestPictureInPicture","FullscreenToggle","_Button6","_super36","_this61","handleFullscreenChange","fsApi_","fullscreenEnabled","isFullscreen","exitFullscreen","requestFullscreen","VolumeLevel","_Component$16","_super37","VolumeLevelTooltip","_Component$17","_super38","_this62","rangeBarRect","rangeBarPoint","volumeBarPointPx","_this63","MouseVolumeLevelDisplay","_Component$18","_super39","_this64","_this65","updateVolume","bottom","VolumeBar","_Slider2","_super40","_this66","updateLastVolume_","updateARIAAttributes","mouseVolumeLevelDisplay","volumeBarEl","volumeBarRect","volumeBarPoint","checkMuted","ariaValue","volumeAsPercentage_","_this67","volumeBeforeDrag","lastVolume_","VolumeControl","_Component$19","_super41","_this68","volumeBar","checkVolumeSupport","throttledHandleMouseMove","orientationClass","MuteToggle","_Button7","_super42","_this69","checkMuteSupport","vol","lastVolume","volumeToSet","updateIcon_","updateControlText_","VolumePanel","_Component$20","_super43","_this70","inline","volumeControl","handleKeyPressHandler_","handleKeyPress","volumePanelState_","muteToggle","handleVolumeControlKeyUp","sliderActive_","sliderInactive_","SkipForward","_Button8","_super44","_this71","validOptions","skipTime","getSkipForwardTime","controlBar","skipButtons","forward","currentVideoTime","SkipBackward","_Button9","_super45","_this72","getSkipBackwardTime","backward","Menu","_Component$21","_super46","_this73","menuButton_","menuButton","focusedChild_","boundHandleBlur_","handleBlur","boundHandleTapClick_","handleTapClick","removeEventListenerForItem","childComponent","addEventListenerForItem","contentElType","append","btn","buttonPressed_","unpressButton","childComponents","foundComponent","stepChild","MenuButton","_Component$22","_super47","_this74","buttonClass","handleMenuKeyUp_","handleMenuKeyUp","menu","handleMouseLeave","handleSubmenuKeyDown","createMenu","items","hideThreshold_","titleEl","titleComponent","addItem","createItems","_i41","buildWrapperCSSClass","menuButtonClass","pressButton","lockShowing","unlockShowing","TrackButton","_MenuButton","_super48","_this75","updateHandler","MenuKeys","MenuItem","_ClickableComponent3","_super49","_this76","selectable","isSelected_","multiSelectable","menuItemEl","_selected","TextTrackMenuItem","_MenuItem","_super50","_this77","kinds","_event","changeHandler","_len16","_key16","handleTracksChange","selectedLanguageChangeHandler","_len17","_key17","handleSelectedLanguageChange","onchange","Event","initEvent","referenceTrack","_i42","shouldBeSelected","OffTextTrackMenuItem","_TextTrackMenuItem","_super51","_i43","allHidden","_i44","TextTrackButton","_TrackButton","_super52","TrackMenuItem","label_","kinds_","kind_","_i45","ChaptersTrackMenuItem","_MenuItem2","_super53","_this78","ChaptersButton","_TextTrackButton","_super54","_this79","selectCurrentItem_","track_","findChaptersTrack","setTrack","updateHandler_","remoteTextTrackEl","_remoteTextTrackEl","_i46","getMenuCaption","_i47","mi","DescriptionsButton","_TextTrackButton2","_super55","_this80","_i48","SubtitlesButton","_TextTrackButton3","_super56","_this81","CaptionSettingsMenuItem","_TextTrackMenuItem2","_super57","_this82","CaptionsButton","_TextTrackButton4","_super58","_this83","SubsCapsMenuItem","_TextTrackMenuItem3","_super59","parentSpan","SubsCapsButton","_TextTrackButton5","_super60","_this84","language_","AudioTrackMenuItem","_MenuItem3","_super61","_this85","audioTracks","_len18","_key18","featuresNativeAudioTracks","_i49","AudioTrackButton","_TrackButton2","_super62","_this86","_i50","PlaybackRateMenuItem","_MenuItem4","_super63","_this87","rate","playbackRate","PlaybackRateMenuButton","_MenuButton2","_super64","_this88","labelElId_","updateVisibility","updateLabel","handlePlaybackRateschange","labelEl_","rates","playbackRates","_i51","playbackRateSupported","Spacer","_Component$23","_super65","CustomControlSpacer","_Spacer","_super66","ControlBar","_Component$24","_super67","ErrorDisplay","_ModalDialog","_super68","_this89","LOCAL_STORAGE_KEY$1","COLOR_BLACK","COLOR_BLUE","COLOR_CYAN","COLOR_GREEN","COLOR_MAGENTA","COLOR_RED","COLOR_WHITE","COLOR_YELLOW","OPACITY_OPAQUE","OPACITY_SEMI","OPACITY_TRANS","selectConfigs","v","parseOptionValue","TextTrackSettings","_ModalDialog2","_super69","_this90","endDialog","setDefaults","persistTextTrackSettings","saveSettings","restoreSettings","_this91","legendId","selectLabelledbyIds","optionId","createElSelect_","createElFgColor_","createElBgColor_","createElWinColor_","defaultsDescription","createElColors_","createElFont_","createElControls_","_this92","selectedIndex","_this93","_i52","setSelectedOption","_this94","localStorage","getItem","setValues","setItem","removeItem","ttDisplay","subsCapsBtn","subsCapsButton","ccBtn","captionsButton","ResizeManager","_Component$25","_super70","_this95","RESIZE_OBSERVER_AVAILABLE","ResizeObserver","loadListener_","resizeObserver_","debouncedHandler_","resizeHandler","observe","contentWindow","unloadListener_","unobserve","disconnect","resizeObserver","trackingThreshold","liveTolerance","LiveTracker","_Component$26","_super71","_this96","trackLiveHandler_","trackLive_","handlePlay_","handleFirstTimeupdate_","handleFirstTimeupdate","handleSeeked_","seekToLiveEdge_","reset_","handleDurationchange","toggleTracking","deltaTime","lastTime_","pastSeekEnd_","pastSeekEnd","isBehind","seekedBehindLive_","timeupdateSeen_","behindLiveEdge_","liveui","isTracking","hasStarted","trackingInterval_","timeDiff","nextSeekedFromUser_","lastSeekEnd_","seekableEnds","seekableStarts","behindLiveEdge","TitleBar","_Component$27","_super72","_this97","updateDom_","els","_this98","techEl","techAriaAttrs","techAriaAttr","sourcesetLoad","srcUrls","_i53","innerHTMLDescriptorPolyfill","cloneNode","dummy","docFrag","createDocumentFragment","Element","getDescriptor","priority","_i54","firstSourceWatch","resetSourceWatch_","innerDescriptor","HTMLMediaElement","getInnerHTMLDescriptor","appendWrapper","appendFn","_len19","_key19","retval","srcDescriptorPolyfill","setupSourceset","resetSourceset_","srcDescriptor","getSrcDescriptor","oldSetAttribute","oldLoad","currentSrc","Html5","_Tech3","_super73","_this99","crossoriginTracks","initNetworkState_","handleLateInit_","enableSourceset","setupSourcesetHandling_","isScrubbing_","hasChildNodes","nodes","nodesLength","removeNodes","_i55","proxyNativeTracks_","restoreMetadataTracksInIOSNativePlayer_","setControls","proxyWebkitFullscreen_","triggerReady","disposeMediaElement","metadataTracksPreFullscreenState","takeMetadataTrackSnapshot","_i56","storedMode","restoreTrackMode","_i57","storedTrack","_this100","lowerCaseType","proxyNativeTracksForType_","overrideNative_","_this101","elTracks","techTracks","removeOldTracks","removeTracks","_i58","found","_this102","playerElIngest","movingMediaElementInDOM","clone","techId","playerId","preload","settingsAttrs","_i59","attr","networkState","loadstartFired","setLoadstartFired","triggerLoadstart","eventsToTrigger","isScrubbing","fastSeek","_this103","checkProgress","NaN","_this104","endFn","beginFn","webkitPresentationMode","nativeIOSFullscreen","webkitEnterFullScreen","HAVE_METADATA","webkitDisplayingFullscreen","webkitExitFullScreen","webkitKeys","_src2","resetMediaElement","addTextTrack","_i60","getVideoPlaybackQuality","videoPlaybackQuality","webkitDroppedFrameCount","webkitDecodedFrameCount","droppedVideoFrames","totalVideoFrames","creationTime","TEST_VID","canControlVolume","canControl","canMuteVolume","canControlPlaybackRate","canOverrideAttributes","_noop","supportsNativeTextTracks","supportsNativeVideoTracks","videoTracks","supportsNativeAudioTracks","TECH_EVENTS_RETRIGGER","TECH_EVENTS_QUEUE","canplay","canplaythrough","playing","seeked","BREAKPOINT_ORDER","BREAKPOINT_CLASSES","charAt","DEFAULT_BREAKPOINTS","tiny","xsmall","small","medium","large","xlarge","huge","_Component$28","_super74","_this105","getTagSettings","boundDocumentFullscreenChange_","documentFullscreenChange_","boundFullWindowOnEscKey_","fullWindowOnEscKey","boundUpdateStyleEl_","updateStyleEl_","boundApplyInitTime_","applyInitTime_","boundUpdateCurrentBreakpoint_","updateCurrentBreakpoint_","boundHandleTechClick_","handleTechClick_","boundHandleTechDoubleClick_","handleTechDoubleClick_","boundHandleTechTouchStart_","handleTechTouchStart_","boundHandleTechTouchMove_","handleTechTouchMove_","boundHandleTechTouchEnd_","handleTechTouchEnd_","boundHandleTechTap_","handleTechTap_","isFullscreen_","isPosterFromTech_","queuedCallbacks_","userActive_","debugEnabled_","audioOnlyMode_","audioPosterMode_","audioOnlyCache_","hiddenChildren","tagAttributes","languagesToLower","languages_","resetCache_","poster_","controls_","changingSrc_","playCallbacks_","playTerminatedQueue_","autoplay","scrubbing_","fullscreenchange","fluid_","playerOptionsCopy","middleware_","parsedSVG","DOMParser","sprite","display","majorVersion","userActive","listenForUserActivity_","breakpoints","responsive","_this106","styleEl_","playerElIngest_","divEmbed","tabindex","VIDEOJS_NO_DYNAMIC_STYLE","defaultsStyleEl","fill_","fluid","links","_i61","linkEl","techGet_","techCall_","posterImage","_dimension","privDimension","parsedVal","_this107","ratio","aspectRatio_","idClass","ratioParts","ratioMultiplier","width_","height_","_width","_height","_this108","unloadTech_","titleTechName","camelTechName","techName_","normalizeAutoplay","techOptions","playsinline","loop","techCanOverridePoster","TechClass","handleTechReady_","textTracksJson_","eventObj","seeking","handleTechLoadStart_","handleTechSourceset_","handleTechWaiting_","handleTechEnded_","handleTechSeeking_","handleTechPlay_","handleTechPause_","handleTechDurationChange_","handleTechFullscreenChange_","handleTechFullscreenError_","handleTechEnterPictureInPicture_","handleTechLeavePictureInPicture_","handleTechError_","handleTechPosterChange_","handleTechTextData_","handleTechRateChange_","usingNativeControls","addTechControlsListeners_","_this109","safety","removeTechControlsListeners_","manualAutoplay_","_this110","promise","resolveMuted","previouslyMuted","restoreMuted","mutedPromise","matchingSources","_i32","findMimetype","sourceElSources","sourceEls","matchingSourceEls","_i62","sourceObj","_this111","updateSourceCaches","updateSourceCaches_","playerSrc","currentSource","eventSrc","lastSource_","techSrc","request","lastPlaybackRate","queued","_this112","timeWhenWaiting","timeUpdateListener","userActions","click","doubleClick","userWasActive","targetPlayer","isFs","matches","fullscreen","_this113","initTime","inactivityTimeout","defaultPlaybackRate","reduceRight","_this114","resolve","play_","_this115","isSrcReady","isSafariOrIOS","waitToPlay_","resetProgressBar_","runPlayTerminatedQueue_","runPlayCallbacks_","q","isFinite","percentAsDecimal","_muted","_defaultMuted","isFS","oldValue","toggleFullscreenClass_","fullscreenOptions","offHandler","errorHandler","requestFullscreenHelper_","fsOptions","_this116","supportsFullScreen","preferFullWindow","enterFullWindow","exitFullscreenHelper_","_this117","exitFullWindow","isFullWindow","docOrigOverflow","overflow","isPiP","isInPictureInPicture_","togglePictureInPictureClass_","_this118","documentPictureInPicture","pipContainer","titleBar","requestWindow","pipWindow","pipVideo","hotkeys","isContentEditable","excludeElement","handleHotkeys","_hotkeys$fullscreenKe","fullscreenKey","keydownEvent","_hotkeys$muteKey","muteKey","_hotkeys$playPauseKey","playPauseKey","FSToggle","_i63","_this119","techs","findFirstPassingTechSourcePair","outerArray","innerArray","tester","outerChoice","innerChoice","finder","sourceOrder","isRetry","_this120","resetRetryOnError_","middlewareSource","src_","handleSrc_","notSupportedMessage","setTech","retry","stopListeningForErrors","_this121","sourceTech","selectSource","vhs","_this122","doReset_","resetControlBarUI_","resetPlaybackRate_","resetVolumeBar_","currentTimeDisplay","durationDisplay","progressControl","loadProgressBar","techAutoplay","newPoster","usingNativeControls_","_this123","hookFunction","newErr","suppressNotSupportedError","triggerSuppressedError","errorDisplay","userActivity_","mouseInProgress","lastMoveX","lastMoveY","handleActivity","handleMouseUpAndMouseLeave","isAudio_","_this124","playerChildren","controlBarHeight","_this125","exitPromises","enableAudioOnlyUI_","disableAudioOnlyUI_","_this126","enablePosterModeUI_","disablePosterModeUI_","_i64","_this127","modal","currentBreakpoint","_i65","candidateBreakpoint","breakpoints_","breakpoint_","currentBreakpointClass","_breakpoints","responsive_","removeCurrentBreakpoint_","_this128","_this$cache_$media","artist","artwork","tt","currentSources","previousLogLevel_","newRates","baseOptions","tagOptions","dataSetup","_safeParseTuple2","_i66","childName","html5","userLanguage","navigationUI","BASE_PLUGIN_NAME","PLUGIN_CACHE_KEY","pluginStorage","pluginExists","getPlugin","markPluginAsActive","triggerSetupEvent","before","createPluginFactory","PluginSubClass","plugin","_len20","_key20","getEventHash","Plugin","VERSION","isBasic","basicPluginWrapper","createBasicPlugin","deprecateForMajor","oldName","warned","_len21","_key21","deprecate","registerPlugin","usingPlugin","hasPlugin","normalizeId","getPlayer","rootNode","getRootNode","ShadowRoot","PlayerComponent","hook","hookOnce","original","getPlayers","nId","_tag","_player2","getAllPlayers","comp","use","writeable","mergeOptions","deregisterPlugin","getPlugins","getPluginVersion","addLanguage","EventTarget","dom","QualityLevel","bitrate","QualityLevelList","_videojs$EventTarget","_super75","_this129","levels_","selectedIndex_","qualityLevel","getQualityLevelById","removed","_i67","_i68","_event2","addqualitylevel","removequalitylevel","version$5","qualityLevels","originalPluginFn","qualityLevelList","disposeHandler","resolveUrl","resolveManifestRedirect","req","responseURL","logger","_len22","_key22","_len23","_key23","TIME_FUDGE_FACTOR","SAFE_TIME_DELTA","filterRanges","timeRanges","findRange","findNextRange","printableRange","strArr","_i71","timeRangesToArray","timeRangesList","_i72","lastBufferedEnd","timeAheadOf","_i74","segmentDurationWithParts","preloadHints","partTargetDuration","getPartsAndSegments","si","pi","segmentIndex","partIndex","getLastParts","lastSegment","getKnownPartCount","preloadSegment","partCount","hint","liveEdgeDelay","hasParts","serverControl","partHoldBack","holdBack","intervalDuration","endSequence","expired","precise","backwardDuration","forwardDuration","totalDuration","sumDurations","defaultDuration","durationList","durations","_i75","_i76","playlistEnd","useSafeLiveEnd","liveEdgePadding","lastSegmentEndTime","isExcluded","excludeUntil","isIncompatible","excluded","isLowestEnabledRendition","currentBandwidth","MAX_VALUE","playlistMatch","someAudioVariant","groupName","variant","_ret","_loop2","_i82","Playlist","getMediaInfoForTime","startingSegmentIndex","startingPartIndex","exactManifestTimings","partsAndSegments","_i77","partAndSegment","_i78","_partAndSegment","_i79","_i80","_partAndSegment2","isDisabled","isAes","_i81","estimateSegmentRequestTime","bytesReceived","createPlaylistID","groupID","forEachMediaGroup","setupMediaPlaylist","playlistErrors_","addPropertiesToMain","createGroupID","_i83","phonyUri","audioOnlyMain","_i84","groupId","setupMediaPlaylists","resolveMediaGroupUris","DateRangesStorage","offset_","pendingDateRanges_","processedDateRanges_","firstSegment","programDateTime","dateRanges","startDate","getTime","trimProcessedDateRanges_","pendingDateRange","dateRange","_this130","dateRangeClasses","dateRangesToProcess","processDateRange","classListIndex","_i85","_dateRangesToProcess","endDate","endOnNext","plannedDuration","_this131","EventTarget$1","updateSegment","_i86","skipped","resolveSegmentUris","baseUri","getAllSegments","_i87","isPlaylistUnchanged","updateMain$1","newMedia","unchangedCheck","oldMedia","mergedPlaylist","skip","_i88","skippedSegments","oldSegments","newSegments","currentMap","newIndex","newSegment","updateSegments","_i89","_i90","refreshDelay","lastPart","lastDuration","PlaylistLoader","_EventTarget$4","_super76","_this132","logger_","_options$withCredenti","vhs_","addDateRangesToTextTrack_","addDateRangesToTextTrack","vhsOptions","customTagParsers","customTagMappers","llhls","dateRangesStorage_","handleMediaupdatetimeout_","handleLoadedPlaylist_","mediaPlaylist","setOffset","setPendingDateRanges","availableDateRanges","getDateRangesToProcess","_this133","parameters","canBlockReload","nextMSN","nextPart","_HLS_part","_HLS_msn","canSkipUntil","_HLS_skip","canSkipDateranges","parsedUri","searchParams","addLLHLSQueryDirectives","playlistRequestError","haveMetadata","playlistString","startingState","_this134","onwarn","oninfo","_ref15$customTagParse","_ref15$customTagMappe","customParser","addParser","mapper","addTagMapper","parseManifest","_ref19","_ref20","playlistObject","parseManifest_","lastRequest","pendingMedia_","media_","updateMediaUpdateTimeout_","stopRequest","mediaUpdateTimeout","finalRenditionTimeout","oldRequest","shouldDelay","_this135","delay","mediaChange","mainPlaylistRef","started","_this136","_this137","_this138","setupInitialPlaylist","srcUri","mainForMedia","videojsXHR","callbackWrapper","reqResponse","responseTime","roundTripTime","requestTime","responseHeaders","timedout","xhrFactory","XhrFunction","beforeRequest","Vhs","_requestCallbackSet","_responseCallbackSet","xhrMethod","beforeRequestOptions","requestSet","newOptions","requestCallback","callAllRequestHooks","responseSet","responseCallback","callAllResponseHooks","originalAbort","segmentXhrHeaders","Range","textRange","formatHexString","formatAsciiString","createTransferableMessage","transferable","initSegmentId","segmentKeyId","hexDump","tagDump","_ref21","textRanges","getProgramTime","_ref22","_ref22$time","matchedSegment","segmentEnd","_i92","videoTimingInfo","transmuxedPresentationEnd","estimatedStart","transmuxedPresentationStart","findSegmentForPlayerTime","seekTime","programTimeObject","mediaSeconds","programTime","playerTime","dateTimeObject","transmuxerPrependedSeconds","offsetFromSegmentStart","playerTimeToProgramTime","toISOString","_seekToProgramTime","_ref23","_ref23$retryCount","retryCount","seekTo","_ref23$pauseAfterSeek","pauseAfterSeek","_i93","verifyProgramDateTimeTags","_i91","lastSegmentStart","lastSegmentDuration","findSegmentForProgramTime","mediaOffset","comparisonTimeStamp","segmentDateTime","segmentTimeEpoch","getOffsetFromTimestamp","seekToTime","callbackOnCompleted","dashPlaylistUnchanged","_i94","aSegment","bSegment","aByterange","bByterange","dashGroupId","playlistId","updateMain","oldMain","newMain","noChanges","_i95","playlistUpdate","_playlistUpdate","removeOldMediaGroupLabels","compareSidxEntry","oldSidxMapping","newSidxMapping","currentSidxInfo","savedSidxInfo","sidxInfo","DashPlaylistLoader","_EventTarget","_super77","srcUrlOrPlaylist","_this139","mainPlaylistLoader","mainPlaylistLoader_","isMain_","_options$withCredenti2","addMetadataToTextTrack","refreshXml_","refreshMedia_","loadedPlaylists_","srcUrl","sidxMapping_","childPlaylist_","_this140","fin","requestErrored_","id3Offset","finished","endRequestAndCallback","_bytes","progressListener","newPart","overrideMimeType","_ref24","containerRequest","internal","playlistExclusionDuration","_playlist$sidx$bytera","mediaRequest_","minimumUpdatePeriodTimeout_","createMupOnMedia_","_this141","addSidxSegments_","sidxChanged","_ref26","isFinalRendition","_this142","updateMinimumUpdatePeriodTimeout_","_this143","requestMain_","mainChanged","haveMain_","hasPendingRequest","_this144","mainXml_","date","mainLoaded_","handleMain_","syncClientServerClock_","_this145","utcTiming","clientOffset_","serverTime","_ref25","mainXml","addEventStreamToMetadataTrack_","mpl","mup","createMUPTimeout_","_this146","mediaGroupSidx","mediaID","_this147","mediaChanged","createMediaUpdateTimeout","metadataArray","eventStreamNode","cueTime","frames","Config","GOAL_BUFFER_LENGTH","MAX_GOAL_BUFFER_LENGTH","BACK_BUFFER_LENGTH","GOAL_BUFFER_LENGTH_RATE","INITIAL_BANDWIDTH","BANDWIDTH_VARIANCE","BUFFER_LOW_WATER_LINE","MAX_BUFFER_LOW_WATER_LINE","EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE","BUFFER_LOW_WATER_LINE_RATE","BUFFER_HIGH_WATER_LINE","browserWorkerPolyFill","workerObj","objectUrl","createObjectURL","Blob","blob","BlobBuilder","getBlob","worker","objURL","terminate","revokeObjectURL","transform","getWorkerString","workerCode$1","commonjsGlobal","globalThis","Stream$8","init","destination","flushSource","partialFlush","endTimeline","dinf","esds","ftyp","mfhd","minf","mvex","mvhd","trak","tkhd","mdia","mdhd","hdlr","sdtp","stbl","stsd","traf","trex","trun$1","MAJOR_BRAND","MINOR_VERSION","AVC1_BRAND","VIDEO_HDLR","AUDIO_HDLR","HDLR_TYPES","VMHD","SMHD","DREF","STCO","STSC","STSZ","STTS","videoSample","audioSample","audioTrun","videoTrun","trunHeader","stream","MAX_UINT32$1","pow","numbers","getUint64","uint8","dv","DataView","getBigUint64","getUint32","MAX_UINT32","avc1","avcC","btrt","dref","mdat","mp4a","pasp","smhd","stco","stsc","stsz","stts","styp","tfdt","tfhd","trun","vmhd","payload","setUint32","audioobjecttype","samplingfrequencyindex","channelcount","samplerate","sequenceNumber","trackFragments","boxes","samples","dependsOn","isDependedOn","hasRedundancy","avc1Box","sps","pps","sequenceParameterSets","pictureParameterSets","profileIdc","profileCompatibility","levelIdc","sarRatio","hSpacing","vSpacing","samplesize","trackFragmentHeader","trackFragmentDecodeTime","trackFragmentRun","sampleDependencyTable","upperWordBaseMediaDecodeTime","lowerWordBaseMediaDecodeTime","baseMediaDecodeTime","durationPresent","sizePresent","flagsPresent","compositionTimeOffset","bytesOffest","header","sample","isLeading","paddingValue","isNonSyncSample","degradationPriority","silence","mp4Generator","fileType","movie","sampleForFrame","frame","dataOffset","pts","dts","keyFrame","frameUtils$1","groupNalsIntoFrames","nalUnits","currentNal","currentFrame","nalCount","nalUnitType","groupFramesIntoGops","currentGop","gops","extendFirstKeyFrame","generateSampleTable","baseDataOffset","concatenateNalData","nalsByteLength","numberOfNals","generateSampleTableForFrame","concatenateNalDataForFrame","highPrefix","lowPrefix","zeroFill","ONE_SECOND_IN_TS$4","clock$2","coneOfSilence","metaTable","clock$1","audioFrameUtils$1","prefixWithSilence","audioAppendStartTs","videoBaseMediaDecodeTime","baseMediaDecodeTimeTs","frameDuration","silentFrame","firstFrame","audioGapDuration","audioFillFrameCount","audioFillDuration","trimAdtsFramesByEarliestDts","adtsFrames","earliestAllowedDts","minSegmentDts","minSegmentPts","concatenateFrameData","sum","sumFrameByteLengths","ONE_SECOND_IN_TS$3","trackDecodeInfo$1","clearDtsInfo","maxSegmentDts","maxSegmentPts","calculateTrackBaseMediaDecodeTime","timelineStartInfo","collectDtsInfo","captionPacketParser","parseSei","payloadType","payloadSize","parseUserData","sei","parseCaptionPackets","userData","ccData","discardEmulationPreventionBytes","emulationPreventionBytesPositions","USER_DATA_REGISTERED_ITU_T_T35","Stream$7","cea708Parser","CaptionStream$2","parse708captions_","parse708captions","captionPackets_","ccStreams_","Cea608Stream","cc708Stream_","Cea708Stream","newCaptionPackets","escapedRBSP","latestDts_","ignoreNextEqualDts_","numSameDts_","flushCCStreams","flushType","flushStream","idx","presortIndex","packet","dispatchCea608Packet","dispatchCea708Packet","activeCea608Channel_","ccStream","setsTextOrXDSActive","setsChannel1Active","setsChannel2Active","CHARACTER_TRANSLATION_708","within708TextBlock","Cea708Window","windowNum","clearText","pendingNewLine","winAttr","penAttr","penLoc","penColor","visible","rowLock","columnLock","relativePositioning","anchorVertical","anchorHorizontal","anchorPoint","rowCount","virtualRowCount","columnCount","windowStyle","penStyle","getText","rows","rowIdx","newLine","beforeRowOverflow","addText","backspace","substr","Cea708Service","serviceNum","encoding","currentWindow","windows","createTextDecoder","startPts","setCurrentWindow","TextDecoder","textDecoder_","serviceProps","captionServiceEncodings","serviceName","serviceEncodings","current708Packet","services","new708Packet","add708Bytes","push708Packet","ptsVals","byte0","byte1","packet708","packetData","blockSize","seq","sizeCode","pushServiceBlock","initService","handleText","multiByteCharacter","extendedCommands","defineWindow","clearWindows","deleteWindows","displayWindows","hideWindows","toggleWindows","setWindowAttributes","setPenAttributes","setPenColor","setPenLocation","isExtended","getPts","flushDisplayed","_char","charCodeArray","newCode","isMultiByte","extended","currentByte","nextByte","decode","unicode","firstByte","secondByte","fillOpacity","fillRed","fillGreen","fillBlue","borderType","borderRed","borderGreen","borderBlue","wordWrap","printDirection","scrollDirection","justify","effectSpeed","effectDirection","displayEffect","displayedText","winId","endPts","pushCaption","textTag","penSize","italics","underline","edgeType","fontStyle","fgOpacity","fgRed","fgGreen","fgBlue","bgOpacity","bgRed","bgGreen","bgBlue","edgeRed","edgeGreen","edgeBlue","column","CHARACTER_TRANSLATION","getCharFromCode","ROWS","createDisplayBuffer","BOTTOM_ROW","indent","field","dataChannel","field_","dataChannel_","setConstants","swap","char0","char1","lastControlCode_","PADDING_","RESUME_CAPTION_LOADING_","mode_","END_OF_CAPTION_","clearFormatting","displayed_","nonDisplayed_","startPts_","ROLL_UP_2_ROWS_","rollUpRows_","setRollUp","ROLL_UP_3_ROWS_","ROLL_UP_4_ROWS_","CARRIAGE_RETURN_","shiftRowsUp_","BACKSPACE_","row_","ERASE_DISPLAYED_MEMORY_","ERASE_NON_DISPLAYED_MEMORY_","RESUME_DIRECT_CAPTIONING_","isSpecialCharacter","column_","isExtCharacter","isMidRowCode","addFormatting","isOffsetControlCode","isPAC","formatting_","indentations","isColorPAC","isNormalChar","_this148","logWarning","line","topRow_","BASE_","EXT_","CONTROL_","OFFSET_","_char2","newBaseRow","popOn","baseRow","rollUp","paintOn","captionStream","CaptionStream","streamTypes","H264_STREAM_TYPE","ADTS_STREAM_TYPE","METADATA_STREAM_TYPE","TYPE_SHARED","handleRollover$1","direction","TimestampRolloverStream$1","lastDTS","referenceDTS","type_","_MetadataStream","timestampRolloverStream","typedArray","fromIndex","currentIndex","typedArrayIndexOf","textEncodingDescriptionByte","percentEncode$1","parseUtf8","parseIso88591$1","parseSyncSafeInteger$1","frameParsers","mimeTypeEndIndex","descriptionEndIndex","pictureType","pictureData","privateData","parseId3","parseId3Frames","frameSize","frameStart","tagSize","parseSyncSafeInteger","Stream$5","StreamTypes$3","id3","dispatchType","chunk","dataAlignmentIndicator","_TransportPacketStream","_TransportParseStream","_ElementaryStream","metadataStream","Stream$4","CaptionStream$1","StreamTypes$2","TimestampRolloverStream","MP2T_PACKET_LENGTH$1","bytesInBuffer","everything","parsePsi","parsePat","parsePmt","packetsWaitingForPmt","programMapTable","psi","payloadUnitStartIndicator","pat","section_number","last_section_number","pmtPid","pmt","tableEnd","pid","processPes_","STREAM_TYPES","h264","adts","segmentHadPmt","timedMetadata","forceFlush","packetFlushable","trackId","pes","ptsDtsFlags","startPrefix","packetLength","flushStreams_","m2ts$1","PAT_PID","MP2T_PACKET_LENGTH","TransportPacketStream","TransportParseStream","ElementaryStream","MetadataStream","_AdtsStream$","m2ts_1","Stream$3","ONE_SECOND_IN_TS$2","ADTS_SAMPLING_FREQUENCIES$1","handlePartialSegments","frameNum","skipWarn_","frameLength","protectionSkipBytes","oldBuffer","sampleCount","adtsFrameDuration","_H264Stream$","_NalByteStream","PROFILES_WITH_OPTIONAL_SPS_DATA","Stream$2","ExpGolomb","workingData","workingBytesAvailable","workingWord","workingBitsAvailable","bitsAvailable","loadWord","workingBytes","availableBytes","skipBits","skipBytes","readBits","bits","valu","skipLeadingZeros","leadingZeroCount","skipUnsignedExpGolomb","skipExpGolomb","readUnsignedExpGolomb","clz","readExpGolomb","readBoolean","readUnsignedByte","syncPoint","swapBuffer","currentPts","currentDts","readSequenceParameterSet","skipScalingList","nalByteStream","nalUnitTypeCode","expGolombDecoder","lastScale","nextScale","chromaFormatIdc","picOrderCntType","numRefFramesInPicOrderCntCycle","picWidthInMbsMinus1","picHeightInMapUnitsMinus1","frameMbsOnlyFlag","scalingListCount","frameCropLeftOffset","frameCropRightOffset","frameCropTopOffset","frameCropBottomOffset","_AacStream$","H264Stream","NalByteStream","ADTS_SAMPLING_FREQUENCIES","parseId3TagSize","isLikelyAacData","parseAdtsSize","lowThree","middle","parseType","parseSampleRate","parseAacTimestamp","percentEncode","aacUtils","setTimestamp","bytesLeft","tempLength","_VideoSegmentStream","_AudioSegmentStream","_Transmuxer","_CoalesceStream","Stream","frameUtils","audioFrameUtils","trackDecodeInfo","m2ts","clock","AdtsStream","AacStream","ONE_SECOND_IN_TS$1","AUDIO_PROPERTIES","VIDEO_PROPERTIES","retriggerForStream","addPipelineLogRetriggers","transmuxer","pipeline","arrayEquals","generateSegmentTimingInfo","startDts","endDts","prependedContentDuration","firstSequenceNumber","setEarliestDts","earliestDts","setVideoBaseMediaDecodeTime","setAudioAppendStart","videoClockCyclesOfSilencePrefixed","gopsToAlignWith","minPTS","gopCache_","nalUnit","gopForFusion","firstGop","lastGop","resetStream_","getGopForFusion_","alignedGops","alignGopsAtEnd","alignGopsAtEnd_","alignGopsAtStart_","gop","dtsDistance","nearestGopObj","currentGopObj","nearestDistance","alignIndex","gopIndex","align","alignEndIndex","matchFound","trimIndex","alignGopsWith","newGopsToAlignWith","numberOfTracks","remux","remuxTracks","pendingTracks","videoTrack","pendingBoxes","pendingCaptions","pendingMetadata","pendingBytes","emittedTracks","output","audioTrack","caption","captionStreams","setRemux","hasFlushed","transmuxPipeline_","setupAacPipeline","aacStream","audioTimestampRolloverStream","timedMetadataTimestampRolloverStream","adtsStream","coalesceStream","headOfPipeline","audioSegmentStream","getLogTrigger_","hasAudio","hasVideo","setupTsPipeline","packetStream","parseStream","elementaryStream","h264Stream","videoSegmentStream","id3Frame","setBaseMediaDecodeTime","isAac","resetCaptions","getTracks","getTimescaleFromMediaHeader","getEmsgID3","Transmuxer","VideoSegmentStream","AudioSegmentStream","bin","parseType_1","toUnsigned$2","parseType$2","findBox_1","findBox$2","subresults","toUnsigned$1","getUint64$2","parseTfdt$2","parseSampleFlags","parseTrun$2","dataOffsetPresent","firstSampleFlagsPresent","sampleDurationPresent","sampleSizePresent","sampleFlagsPresent","sampleCompositionTimeOffsetPresent","getInt32","parseTfhd$2","baseDataOffsetPresent","sampleDescriptionIndexPresent","defaultSampleDurationPresent","defaultSampleSizePresent","defaultSampleFlagsPresent","durationIsEmpty","defaultBaseIsMoof","sampleDescriptionIndex","defaultSampleDuration","defaultSampleSize","defaultSampleFlags","baseDataOffsetIsMoof","findBox$1","parseTfdt$1","parseTrun$1","parseTfhd$1","window$2","mapToSample","approximateOffset","parseCaptionNals","videoTrackId","trafs","mdats","captionNals","mdatTrafPairs","matchingTraf","pair","headerInfo","truns","allSamples","parseSamples","avcStream","seiNal","lastMatchedSample","avcView","logs","seiNals","matchingSample","findSeiNals","captionParser","segmentCache","parsedCaptions","parsingPartial","isInitialized","isPartial","isNewInit","videoTrackIds","timescales","parsedData","cachedSegment","trackNals","parseEmbeddedCaptions","pushNals","nals","nal","clearParsedCaptions","resetCaptionStream","clearAllCaptions","uint8ToCString","curChar","retString","getUint64$1","isValidEmsgBox","emsg","hasScheme","scheme_id_uri","isValidV0Box","isDefined","presentation_time_delta","isValidV1Box","presentation_time","emsg$1","parseEmsgBox","boxData","event_duration","emsgBox","message_data","scaleTime","timeDelta","toUnsigned","parseType$1","parseTfhd","parseTrun","parseTfdt","window$1","lowestTime","baseTime","scale","traks","tkhdVersion","getUint8","sampleDescriptions","codecConfig","codecBox","segmentData","parsedBox","parsedId3Frames","probe$2","StreamTypes$1","parsePid","parsePayloadUnitStartIndicator","parseAdaptionField","parseNalUnitType","probe$1","pusi","payloadOffset","parsePesType","parsePesTime","videoPacketContainsKeyFrame","frameBuffer","frameI","frameSyncPoint","foundKeyFrame","StreamTypes","handleRollover","probe","SYNC_BYTE","parseAudioPes_","pesType","parsed","endLoop","table","parseVideoPes_","firstKeyFrame","inspectTs_","parsePsi_","tsInspector","baseTimestamp","audioCount","audioTimescale","inspectAac_","audioBaseTimestamp","dtsTime","ptsTime","videoBaseTimestamp","adjustTimestamp_","MessageHandlers","initArray","postMessage","action","gopInfo","timingInfo","videoSegmentTimingInfo","presentation","audioSegmentTimingInfo","trackInfo","audioTimingInfo","wireTransmuxerEvents","trackIds","_ref27","_ref28","_ref29","id3Frames","emsgData","_ref30","baseStartTime","tsStartTime","timeInfo","videoStart","audioStart","timestampOffset","appendStart","onmessage","messageHandlers","TransmuxWorker","processTransmux","audioAppendStart","onData","onTrackInfo","onAudioTimingInfo","onVideoTimingInfo","onVideoSegmentTimingInfo","onAudioSegmentTimingInfo","onId3","onCaptions","onDone","onEndedTimeline","onTransmuxerLog","isEndOfTimeline","transmuxedData","waitForEndedTimelineEvent","currentTransmux","_event$data$segment","videoFrameDtsTime","videoFramePtsTime","handleData_","handleGopInfo_","_ref31","handleDone_","dequeue","transmuxQueue","processAction","enqueueAction","transmux","segmentTransmuxer","term","workerCallback","endAction","listenForEndEvent","transfers","REQUEST_ERRORS","abortAll","activeXhrs","handleErrors","handleKeyResponse","finishProcessingFn","errorObj","Uint32Array","_i97","parseInitSegment","_callback","_ref32","handleSegmentResponse","_ref34","newBytes","_i96","stringToArrayBuffer","lastReachedChar","stats","getRequestStats","encryptedBytes","transmuxAndNotify","_ref35","trackInfoFn","timingInfoFn","videoSegmentTimingInfoFn","audioSegmentTimingInfoFn","id3Fn","captionsFn","endedTimelineFn","dataFn","doneFn","fmp4Tracks","isMuxed","audioStartFn","audioEndFn","videoStartFn","videoEndFn","probeResult","handleSegmentBytes","_ref36","bytesAsUint8Array","isFmp4","audioCodec","videoCodec","finishLoading","_ref37","_ref38","decrypt","_ref39","keyBytes","decryptionWorker","decryptionHandler","decrypted","encrypted","iv","waitForCompletion","_ref41","didError","segmentFinish","_ref40","requestId","decryptedBytes","decryptSegment","endOfAllRequests","parseError","handleProgress","_ref43","progressFn","progressEvent","getProgressStats","firstBytesReceivedAt","mediaSegmentRequest","_ref44","xhrOptions","abortFn","keyXhr","mapKeyXhr","initSegmentOptions","initSegmentRequestCallback","_ref33","handleInitSegmentResponse","initSegmentXhr","segmentRequestOptions","segmentXhr","loadendState","activeXhr","_ref42","calledAbortFn","handleLoadEnd","logFn$1","isMaat","mediaAttributes","unwrapCodecList","codecList","_ref45","codecCount","codecObj","codecsForPlaylist","codecInfo","getCodecs","defaultCodecs","logFn","representationToString","safeGetComputedStyle","stableSort","sortFn","newArray","cmp","comparePlaylistBandwidth","leftBandwidth","rightBandwidth","simpleSelector","playerBandwidth","limitRenditionByPlayerDimensions","playlistController","getAudioTrackPlaylists_","sortedPlaylistReps","enabledPlaylistReps","rep","bandwidthPlaylistReps","highestRemainingBandwidthRep","bandwidthBestRep","_chosenRep","haveResolution","resolutionBestRepList","resolutionPlusOneList","resolutionPlusOneSmallest","resolutionPlusOneRep","leastPixelDiffRep","resolutionBestRep","leastPixelDiffSelector","leastPixelDiffList","pixelDiff","chosenRep","_type2","lastBandwidthSelector","pixelRatio","useDevicePixelRatio","devicePixelRatio","systemBandwidth","playlistController_","addMetadata","_ref47","inbandTextTracks","videoDuration","Cue","WebKitDataCue","metadataTrack","metadataTrack_","deprecateOldCue","cuesArray","_i98","cuesGroupedByStartTime","timeSlot","sortedStartTimes","cueGroup","finiteDuration","nextTime","dateRangeAttr","scte35Out","scte35In","dateRangeKeysToOmit","createMetadataTrackIfNotExists","inBandMetadataTrackDispatchType","removeCuesFromTrack","finite","MIN_SEGMENT_DURATION_TO_SAVE_STATS","segmentInfoString","startOfSegment","_segmentInfo$playlist","_segmentInfo$playlist2","mediaIndex","segmentLen","selection","isSyncRequest","independent","hasPartIndex","zeroBasedPartCount","timingInfoPropertyForMedia","getBufferedEndOrFallback","fallback","shouldWaitForTimelineChange","_ref50","timelineChangeController","currentTimeline","loaderType","audioDisabled","lastMainTimelineChange","lastTimelineChange","pendingAudioTimelineChange","pendingTimelineChange","segmentTooLong","_ref51","maxDuration","getTroublesomeSegmentDurationMessage","sourceType","timingInfos","typeTimingInfo","isSegmentWayTooLong","isSegmentSlightlyTooLong","segmentTooLongMessage","severity","SegmentLoader","_videojs$EventTarget2","_super78","_this150","mediaSource","throughput","roundTrip","resetStats_","hasPlayed_","hasPlayed","seekable_","seeking_","mediaSource_","loaderType_","currentMediaInfo_","startingMediaInfo_","segmentMetadataTrack_","segmentMetadataTrack","goalBufferLength_","goalBufferLength","sourceType_","sourceUpdater_","sourceUpdater","inbandTextTracks_","state_","timelineChangeController_","shouldSaveSegmentTimingInfo_","useDtsForTimestampOffset_","useDtsForTimestampOffset","calculateTimestampOffsetForEachSegment_","calculateTimestampOffsetForEachSegment","captionServices_","checkBufferTimeout_","currentTimeline_","pendingSegment_","xhrOptions_","pendingSegments_","audioDisabled_","isPendingTimestampOffset_","gopBuffer_","timeMapping_","safeAppend_","appendInitSegment_","playlistOfLastInitSegment_","callQueue_","loadQueue_","metadataQueue_","waitingOnRemove_","quotaExceededErrorRetryTimeout_","activeInitSegmentId_","initSegments_","cacheEncryptionKeys_","cacheEncryptionKeys","keyCache_","decrypter_","decrypter","syncController_","syncController","syncPoint_","transmuxer_","createTransmuxer_","triggerSyncInfoUpdate_","isEndOfStream_","ended_","fetchAtBuffer_","replaceSegmentsUntil_","newState","hasEnoughInfoToAppend_","processCallQueue_","hasEnoughInfoToLoad_","processLoadQueue_","mediaBytesTransferred","mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaSecondsLoaded","mediaAppends","abort_","removeAudio","monitorBuffer_","abortRequests","clearPendingTimelineChange","_error","getMediaInfo_","_isMuxed","videoBuffered","audioBuffered","storedMap","storedKey","playlist_","couldBeginLoading_","init_","resetEverything","newPlaylist","syncInfo","setDateTimeMappingForStart","oldId","resetLoader","resyncLoader","mediaSequenceDiff","saveExpiredSegmentInfo","resetLoaderProperties","force","removesRemaining","removeFinished","mapping","updatedBuffer","removeGopBuffer","removeVideo","monitorBufferTick_","fillBuffer_","updating","chooseNextRequest_","loadSegment_","appendedLastSegment","appendedLastPart","buffered_","bufferedTime","preloaded","haveEnoughBuffer","getSyncPoint","targetTime","timelineSegments","_i102","getSyncSegmentCandidate","_Playlist$getMediaInf","_partIndex","nextSegment","hasIndependentSegments","independentSegments","lastSegmentLastPart","generateSegmentInfo_","forceTimestampOffset","overrideCheck","timestampOffsetForSegment_","audioBufferedEnd","audioTimestampOffset","currentTimePts","gopsSafeToAlignWith","videoTimestampOffset","_ref49","measuredBandwidth","requestTimeRemaining","timeUntilRebuffer$1","timeUntilRebuffer","switchCandidate","compatiblePlaylists","enabledPlaylists","rebufferingEstimates","numRequests","rebufferingImpact","noRebufferingPlaylists","estimate","minRebufferMaxBandwidthSelector","timeSavedBySwitching","minimumTimeSaving","simpleSegment","earlyAbortWhenNeeded_","checkForAbort_","checkForIllegalMediaSwitch","akeys","bkeys","_i101","shallowEqual","timeType","timingInfoProperty","captionData","_this151","hasAppendedData_","captionTracks","captionTrack","trackName","_captionTracks$trackN","getTrackById","def","captionService","createCaptionsTrackIfNotExists","_ref46","captionArray","positionAlign","addCaptionData","handleCaptions_","handleId3_","callQueue","loadQueue","getCurrentMediaInfo_","setTimeMapping_","updateMediaSecondsLoaded_","initSegmentForMap","segmentKey","firstVideoFrameTimeForData","useVideoTimingInfo","trueSegmentStart_","currentStart","currentVideoTimestampOffset","updateAppendInitSegmentStatus","updateSourceBufferTimestampOffset_","updateTimingInfoEnd_","saveSegmentTimingInfo","shouldSaveTimelineMapping","processMetadataQueue_","appendData_","changedTimestampOffset","_ref52","_ref53","_this152","audioBufferStart","audioBufferEnd","videoBufferStart","videoBufferEnd","appendToSourceBuffer_","timeToRemoveUntil","MIN_BACK_BUFFER","_ref54","handleQuotaExceededError_","_ref55","segmentObj","appendBuffer","handleAppendError_","segmentTimingInfo","transmuxedDecodeStart","transmuxedDecodeEnd","getInitSegmentAndUpdateState_","_this153","trimBackBuffer_","updateTransmuxerAndRequestSegment_","_this154","shouldUpdateTransmuxerTimestampOffset_","createSimplifiedSegmentObj_","isEndOfStream","isWalkingForward","isDiscontinuity","handleAbort_","handleProgress_","handleTrackInfo_","handleTimingInfo_","handleSegmentTimingInfo_","segmentRequestFinished_","_ref56","removeToTime","trimTime","maxTrimTime","safeBackBufferTrimTime","previousSegment","saveTransferStats_","handleTimeout_","saveBandwidthRelatedStats_","updateGopBuffer","waitForAppendsToComplete_","timelineMapping","mappingForTimeline","_ref57","waitForVideo","waitForAudio","waitingOnAppends","checkAppendsDone_","videoQueueCallback","audioQueueCallback","handleAppendsDone_","illegalMediaSwitchError","startingMedia","illegalMediaSwitch","didChange","getSegmentStartTimeForTimestampOffsetCalculation_","_ref58","prioritizedTimingInfo","segmentDurationMessage","recordThroughput_","addSegmentMetadataCue_","badSegmentGuess","badPartGuess","endOfStream","segmentProcessingTime","segmentProcessingThroughput","custom","dateTimeString","resolution","Vhs$1","bufferTypes","_updating","sourceBuffer","queuePending","shiftQueue","queueEntry","_i103","nextQueueIndexOfType","cleanupBuffer","titleType","inSourceBuffers","sourceBuffers","actions","onError","_callback2","_duration2","mime","addSourceBuffer","removeSourceBuffer","changeType","pushQueue","_ref59","onUpdateend","bufferedAsString","_i69","_duration","prettyBuffered","SourceUpdater","_videojs$EventTarget3","_super79","_this155","sourceopenListener_","audioTimestampOffset_","videoTimestampOffset_","delayedAudioAppendQueue_","videoAppendQueued_","onVideoUpdateEnd_","onAudioUpdateEnd_","onVideoError_","videoError_","onAudioError_","audioError_","createdSourceBuffers_","initializedEme_","triggeredReady_","hasCreatedSourceBuffers","hasInitializedAnyEme","addOrChangeSourceBuffers","canRemoveSourceBuffer","canChangeType","_this156","_this157","processedAppend_","videoBuffer","que","audioBuffer","bufferA","bufferB","arity","extents","bufferIntersection","_this158","SourceBuffer","uint8ToUtf8","uintArray","VTT_LINE_TERMINATORS","_char3","NoVttJsError","_Error","_super80","VTTSegmentLoader","_SegmentLoader","_super81","_this159","subtitlesTrack_","featuresNativeTextTracks_","loadVttJs","combinedByteLength","combinedSegment","_track3","_this160","timestampOffsetForTimeline","skipEmptySegments_","_this161","stopForError","requested","parseVTTCues_","updateTimeMapping_","timelines","uniqueCues","_i100","cueKey","removeDuplicateCuesFromTrack","decoder","decodeBytesToString","timestampmap","MPEGTS","LOCAL","ontimestampmap","mapData","mappingObj","diff","firstStart","lastStart","findAdCue","mediaTime","_i104","adStartTime","adEndTime","syncPointStrategies","timelineToDatetimeMappings","lastDistance","_i106","datetimeMapping","_i107","_i108","discontinuitySync","discontinuities","SyncController","_videojs$EventTarget4","_super82","_this162","syncPoints","runStrategies_","selectSyncPoint_","_i109","strategy","bestSyncPoint","bestDistance","bestStrategy","_i110","newDistance","_i111","lastRemovedSegment","playlistTimestamp","_ref60","didCalculateSegmentTimeMapping","calculateSegmentTimeMapping_","saveDiscontinuitySyncInfo_","dateTime","accuracy","_i112","mediaIndexDiff","TimelineChangeController","_videojs$EventTarget5","_super83","_this163","pendingTimelineChanges_","lastTimelineChanges_","_ref61","_ref62","workerCode","_proto","_length","_i","aesTables","AES","tmp","xInv","x2","x4","tEnc","tDec","tables","encTable","decTable","sbox","sboxInv","th","precompute","_tables","keyLen","rcon","encKey","decKey","encrypted0","encrypted1","encrypted2","encrypted3","out","b2","nInnerRounds","kIndex","table0","table1","table2","table3","AsyncStream","_Stream","_super84","_this164","jobs","timeout_","processJob_","job","ntoh","word","Decrypter","initVector","STEP","encrypted32","Int32Array","asyncStream_","decryptChunk_","padded","init0","init1","init2","init3","wordIx","decipher","decrypted32","audioTrackKind_","characteristics","stopLoaders","segmentLoader","activePlaylistLoader","startLoaders","playlistLoader","excludePlaylist","activeTrack","activeGroup","defaultTrack","onTrackChanged","setupListeners","requestOptions","segmentLoaders","_settings$mediaTypes$","groups","variantLabel","isMainPlaylist","_settings$mediaTypes$2","useForcedSubtitles","forced","_settings$mediaTypes$3","newProps","groupMatch","_i113","setupMediaGroups","_settings$segmentLoad3","audioSegmentLoader","mainSegmentLoader","variants","groupKeys","_i114","groupPropertyList","onGroupChanged","_settings$segmentLoad","getActiveGroup","previousActiveLoader","lastGroup","lastGroup_","lastTrack_","onGroupChanging","_settings$segmentLoad2","lastTrack","pc","selectPlaylist","fastQualityChange_","setAudio","_ref63","activeTrack_","onAudioTrackChanged","SteeringManifest","priority_","version_","ttl_","reloadUri_","ContentSteeringController","_videojs$EventTarget6","_super85","_this165","currentPathway","defaultPathway","availablePathways_","excludedPathways_","steeringManifest","proxyServerUrl_","manifestType_","ttlTimeout_","request_","excludedSteeringManifestURLs","xhr_","getBandwidth_","steeringTag","serverUri","steeringUri","startsWith","decodeDataUriManifest_","reloadUri","pathwayId","defaultServiceLocation","proxyServerURL","requestSteeringManifest","initialUri","_this166","getRequestURI","errorInfo","retrySeconds","startTTLTimeout_","steeringManifestJson","assignSteeringProperties_","steeringUrl","steeringUrlObject","proxyServerUrlObject","encodeURI","setSteeringParams_","dataUri","atob","urlObject","getPathway","networkThroughput","pathwayKey","throughputKey","steeringJson","_this167","ttl","TTL","nextPathway","pathwaysByPriority","_step","_iterator","chooseNextPathway","_this168","proxyURI","setProxyServerUrl_","steeringURI","_this169","ttlMS","clearTTLTimeout_","pathway","loaderStats","sumLoaderStat","stat","audioSegmentLoader_","mainSegmentLoader_","PlaylistController","_videojs$EventTarget7","_super86","_this170","externVhs","useCueTags","enableLowInitialPlaylist","bufferBasedABR","maxPlaylistRetries","useCueTags_","cueTagsTrack_","requestOptions_","pauseLoading","mediaTypes_","handleDurationChange_","handleSourceOpen_","handleSourceEnded_","segmentLoaderSettings","setupMainPlaylistLoaderListeners_","subtitleSegmentLoader_","onLoad","contentSteeringController_","setupSegmentLoaderListeners_","startABRTimer_","stopABRTimer_","triggeredFmp4Usage","loadOnPlay_","timeToLoadedData__","mainAppendsToLoadedData__","audioAppendsToLoadedData__","timeToLoadedDataStart","mainAppendsToLoadedData_","audioAppendsToLoadedData_","nextPlaylist","shouldSwitchToMedia_","switchMedia_","cause","newId","_this171","dashMediaPlaylists","_this172","abrTimer_","checkABR_","defaultPlaylists","defaultGroup","_i115","_this173","requestTimeout","triggerPresenceUsage_","setupFirstPlay","updatedPlaylist","selectedMedia","initContentSteeringController_","excludeUnsupportedVariants_","selectInitialPlaylist","initialMedia_","handleUpdatedMediaPlaylist","playlistToExclude","lastExcludeReason_","stuckAtPlaylistEnd_","updateAdCues_","updateDuration","defaultDemuxed","audioGroupKeys","mediaGroup","currentPlaylist","bufferLowWaterLine","bufferHighWaterLine","_ref64","sharedLogLine","isBuffered","forwardBuffer","maxBufferLowWaterLine","nextBandwidth","currBandwidth","logLine","_logLine","shouldSwitchToMedia","_this174","onSyncInfoUpdate_","onEndOfStream","delegateLoaders_","updateCodecs","tryToCreateSourceBuffers_","getCodecsOrExclude_","resetMainLoaderReplaceSegments","replaceSegmentsUntil","_seekable","startPoint","timeOffset","mainMediaInfo","getExpiredTime","absolutePlaylistEnd","_ref65","_this175","_ref65$playlistToExcl","_ref65$error","pathwayAttribute_","reIncludeDelay","excludePathway","excludeThenChangePathway_","addAvailablePathway","reincluded","errorMessage","delayDuration","fnNames","_this176","loaders","dontFilterPlaylist","loader","audioSeekable","mainSeekable","oldEnd","oldStart","updateDuration_","_seekable2","setDuration","_this177","usingAudioLoader","hasMainMediaInfo","hasAudioMediaInfo","_this178","getPendingSegmentPlaylist","playlistCodecs","unsupportedAudio","unsupportedCodecs","supporter","switchMessages","newCodec","oldCodec","areMediaTypesKnown_","createSourceBuffers","excludeIncompatibleVariants_","_this179","ids","unsupported","_this180","codecCount_","videoDetails","audioDetails","exclusionReasons","variantCodecs","variantCodecCount","variantVideoDetails","variantAudioDetails","_i105","cueOut","_segment$cueOutCont$s2","cueOutCont","adOffset","adTotal","updateAdCues","newMax","_ref48","_i99","_Object$keys","addDateRangeMetadata","_this181","initialMain","updateSteeringValues","_step2","_iterator2","assignTagProperties","clearAvailablePathways","_this182","didEnablePlaylists","differentPathwayId","noExcludeUntil","changeSegmentPathway_","switchMediaForDASHContentSteering_","Representation","vhsHandler","playlistID","changePlaylistFn","qualityChangeFunction","incompatible","currentlyEnabled","timerCancelEvents","PlaybackWatcher","_this183","allowSeeksWithinUnsafeLiveWindow","liveRangeSafeTimeDelta","consecutiveUpdates","lastRecordedTime","checkCurrentTimeTimeout_","playHandler","monitorCurrentTime_","canPlayHandler","waitingHandler","techWaiting_","cancelTimerHandler","resetTimeUpdate_","loaderTypes","loaderChecks","resetSegmentDownloads_","updateend","checkSegmentDownloads_","setSeekingHandlers","seekingAppendCheck_","fixesBadSeeks_","clearSeekingAppendCheck_","watchForBadSeeking_","checkCurrentTime_","isBufferedDifferent","_i73","isRangeDifferent","waiting_","afterSeekableWindow_","beforeSeekableWindow_","minAppendedDuration","bufferedToCheck","_i116","nextRange","currentRange","livePoint","videoUnderflow_","skipTheGap_","allowedEnd","isLLHLS","_ref66","gap","lastVideoRange","videoRange","audioRange","gapFromVideoUnderflow_","scheduledCurrentTime","gaps","_i70","findGaps","_i117","defaultOptions","errorInterval","getSource","IWillNotUseThisInPlugins","initPlugin","lastCalled","localOptions","loadedMetadataHandler","cleanupEvents","reloadSourceOnError","version$4","STANDARD_PLAYLIST_SELECTOR","INITIAL_PLAYLIST_SELECTOR","_this149","movingAverageBandwidthSelector","decay","average","lastSystemBandwidth","comparePlaylistResolution","leftWidth","rightWidth","LOCAL_STORAGE_KEY","handleVhsMediaChange","_i118","waitForKeySessionCreation","_ref67","sourceKeySystems","audioMedia","mainPlaylists","eme","initializeMediaKeys","keySystemsOptionsArr","keySystems","keySystemsArr","keySystemsOptions","keySystemsObj","keySystemOptions","getAllPsshKeySystemsOptions","initializationFinishedPromises","keySessionCreatedPromises","race","setupEmeOptions","_ref68","sourceOptions","audioPlaylist","videoContentType","audioContentType","keySystemContentTypes","emeKeySystems","getVhsLocalStorage","storedObject","addOnRequestHook","addOnResponseHook","removeOnRequestHook","removeOnResponseHook","supportsNativeHls","canItPlay","supportsNativeDash","supportsTypeNatively","onRequest","onResponse","offRequest","offResponse","VhsHandler","_Component","_super87","_this184","initialBandwidth","_player","source_","ignoreNextSeekingEvent_","setOptions_","overrideNative","overrideNativeAudioTracks","overrideNativeVideoTracks","featuresNativeVideoTracks","webkitFullscreenElement","mozFullScreenElement","msFullscreenElement","_this185","useBandwidthFromLocalStorage","useNetworkInformationApi","option","_src3","_this186","playbackWatcherOptions","playbackWatcher_","defaultSelector","playerBandwidthEst","networkInformation","connection","mozConnection","webkitConnection","tenMbpsAsBitsPerSecond","networkInfoBandwidthEstBitsPerSec","downlink","invThroughput","invBandwidth","mediaRequests_","mediaRequestsAborted_","mediaRequestsTimedout_","mediaRequestsErrored_","mediaTransferDuration_","mediaBytesTransferred_","mediaSecondsLoaded_","mediaAppends_","mainAppendsToLoadedData","audioAppendsToLoadedData","appendsToLoadedData","appendsToLoadedData_","timeToLoadedData","timeToLoadedData_","currentTech","playerDimensions","currentDimensions","objectToStore","updateVhsLocalStorage","setupEme_","setupQualityLevels_","mediaSourceUrl_","_this187","audioPlaylistLoader","initializedEme","createKeySessions_","_this188","didSetupEmeOptions","_videojs$log","excludedHDPlaylists","handleWaitingForKey_","_this189","qualityLevels_","addQualityLevel","handleVhsLoadedMetadata","_this190","VhsSourceHandler","setupXhrHooks_","simpleType","getOverrideNative","_options$vhs","defaultOverrideNative","_vhs$overrideNative","timeAgoformatter","buildFormatter","enShortStrings","PostFooter","modalOpen","confirm","axios","reload","emailHref","ActionButton","originalUrl","permissions","destroy","onClick","clickDeletePost","commentForm","comment","CommentForm","refreshFromServer","LikeButton","liked","toggleLike","showModal","Modal","isOpen","contentLabel","shouldCloseOnOverlayClick","onRequestClose","closeModal","overlay","_Component2","iconClass","sharedClasses","_Component3","handleChange","handleSubmit","post","post_id","onSubmit","placeholder","autoComplete","maxLength","_Component4","PostHeader","_Component5","TimeAgo","formatter","Photo","_Component6","photo","Video","_Component7","resize","resizePlayers","videoPlayer","bigPlayButton","desiredWidth","clientWidth","desiredHeight","preview_url","LikesContainer","_Component8","likers","likes","liker","lastElement","classes","first_name","CommentsContainer","_Component9","comments","Comment","_Component10","deleteButton","onDelete","user","PostContainer","_Component11","heartIcon","attachment","onDoubleClick","Post","_Component12","current_user","isLiked","like","showBorderAboveFooter","created_at","original_url","ReactNoopUpdateQueue","emptyObject","ReactComponent","updater","refs","ReactPureComponent","ComponentDummy","isReactComponent","forceUpdate","isPureReactComponent","webpackPolyfill","base64","ieee754","kMaxLength","Buffer","TYPED_ARRAY_SUPPORT","createBuffer","that","RangeError","encodingOrOffset","allocUnsafe","fromArrayLike","fromArrayBuffer","isEncoding","actual","fromString","copy","fromObject","assertSize","loweredCase","utf8ToBytes","base64ToBytes","slowToString","hexSlice","utf8Slice","asciiSlice","latin1Slice","base64Slice","utf16leSlice","bidirectionalIndexOf","arrayIndexOf","indexSize","arrLength","valLength","read","readUInt16BE","foundIndex","hexWrite","remaining","strLen","utf8Write","blitBuffer","asciiWrite","byteArray","asciiToBytes","latin1Write","base64Write","ucs2Write","units","hi","lo","utf16leToBytes","fromByteArray","thirdByte","fourthByte","tempCodePoint","codePoint","bytesPerSequence","codePoints","MAX_ARGUMENTS_LENGTH","decodeCodePointsArray","SlowBuffer","alloc","INSPECT_MAX_BYTES","foo","typedArraySupport","_augment","species","allocUnsafeSlow","_isBuffer","compare","pos","swap16","swap32","swap64","equals","inspect","thisStart","thisEnd","thisCopy","targetCopy","toJSON","_arr","toHex","checkOffset","checkInt","objectWriteUInt16","littleEndian","objectWriteUInt32","checkIEEE754","writeFloat","noAssert","writeDouble","newBuf","sliceLen","readUIntLE","mul","readUIntBE","readUInt8","readUInt16LE","readUInt32LE","readUInt32BE","readIntLE","readIntBE","readInt8","readInt16LE","readInt16BE","readInt32LE","readInt32BE","readFloatLE","readFloatBE","readDoubleLE","readDoubleBE","writeUIntLE","writeUIntBE","writeUInt8","writeUInt16LE","writeUInt16BE","writeUInt32LE","writeUInt32BE","writeIntLE","limit","sub","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeInt32BE","writeFloatLE","writeFloatBE","writeDoubleLE","writeDoubleBE","targetStart","INVALID_BASE64_RE","leadSurrogate","toByteArray","stringtrim","base64clean","dst","conventions","notEmptyString","input","orderedSetReducer","toOrderedSet","splitOnASCIIWhitespace","dest","pt","NodeType","ELEMENT_NODE","ATTRIBUTE_NODE","TEXT_NODE","CDATA_SECTION_NODE","ENTITY_REFERENCE_NODE","ENTITY_NODE","PROCESSING_INSTRUCTION_NODE","COMMENT_NODE","DOCUMENT_NODE","DOCUMENT_TYPE_NODE","DOCUMENT_FRAGMENT_NODE","NOTATION_NODE","ExceptionCode","ExceptionMessage","HIERARCHY_REQUEST_ERR","INDEX_SIZE_ERR","DOMSTRING_SIZE_ERR","NOT_FOUND_ERR","WRONG_DOCUMENT_ERR","INVALID_CHARACTER_ERR","NO_DATA_ALLOWED_ERR","NO_MODIFICATION_ALLOWED_ERR","INUSE_ATTRIBUTE_ERR","NOT_SUPPORTED_ERR","INVALID_STATE_ERR","SYNTAX_ERR","INVALID_MODIFICATION_ERR","NAMESPACE_ERR","INVALID_ACCESS_ERR","DOMException","captureStackTrace","NodeList","LiveNodeList","_node","_refresh","_updateLiveList","inc","_inc","ls","__set__","$$length","NamedNodeMap","_findNodeIndex","_addNamedNode","newAttr","oldAttr","ownerElement","_onRemoveAttribute","_nsMap","prefix","localName","_onAddAttribute","_removeNamedNode","DOMImplementation","Node","_xmlEncoder","_visitNode","Document","_onUpdateChild","cs","_removeChild","previous","previousSibling","lastChild","isDocTypeNode","isElementNode","isElementInsertionPossible","parentChildNodes","docTypeNode","isElementReplacementPossible","assertPreInsertionValidity1to5","hasValidParentNodeType","hasInsertableNodeType","assertPreInsertionValidityInDocument","nodeChildNodes","nodeChildElements","parentElementChild","assertPreReplacementValidityInDocument","_insertBefore","_inDocumentAssertion","cp","newFirst","newLast","pre","Attr","CharacterData","Text","CDATASection","DocumentType","Notation","Entity","EntityReference","DocumentFragment","ProcessingInstruction","XMLSerializer","nodeSerializeToString","isHtml","nodeFilter","lookupPrefix","visibleNamespaces","namespace","serializeToString","needNamespaceDefine","addSerializedAttribute","qualifiedName","prefixedNodeName","defaultNS","ai","nsi","pubid","publicId","sysid","systemId","internalSubset","_importNode","deep","node2","_cloneNode","attrs2","_ownerElement","setAttributeNode","getNamedItem","setNamedItem","setNamedItemNS","getNamedItemNS","removeNamedItem","removeNamedItemNS","feature","createDocument","doctype","root","createDocumentType","refChild","oldChild","appendData","hasAttributes","lookupNamespaceURI","isDefaultNamespace","importNode","importedNode","getElementById","rtv","getElementsByClassName","classNames","classNamesSet","nodeClassNames","nodeClassNamesSet","createComment","createCDATASection","createProcessingInstruction","createAttribute","specified","createEntityReference","pl","createAttributeNS","getAttributeNode","removeAttributeNode","_appendSingleChild","setAttributeNodeNS","removeAttributeNS","getAttributeNodeNS","hasAttributeNS","getAttributeNS","getElementsByTagNameNS","substringData","insertData","replaceData","splitText","newText","newNode","getTextContent","settle","buildURL","isURLSameOrigin","createError","btoa","requestData","requestHeaders","loadEvent","xDomain","auth","Authorization","paramsSerializer","statusText","cookies","xsrfValue","onDownloadProgress","onUploadProgress","upload","cancelToken","enhanceError","__CANCEL__","Cancel","ARIADOMPropertyConfig","BeforeInputEventPlugin","ChangeEventPlugin","DefaultEventPluginOrder","EnterLeaveEventPlugin","HTMLDOMPropertyConfig","ReactComponentBrowserEnvironment","ReactDOMComponent","ReactDOMEmptyComponent","ReactDOMTreeTraversal","ReactDOMTextComponent","ReactDefaultBatchingStrategy","ReactInjection","SVGDOMPropertyConfig","SelectEventPlugin","SimpleEventPlugin","alreadyInjected","inject","EventEmitter","HostComponent","injectGenericComponentClass","injectTextComponentClass","EmptyComponent","injectEmptyComponentFactory","instantiate","Updates","contentKey","_callbacks","_contexts","_arg","contexts","checkpoint","rollback","isCheckable","getTracker","_wrapperState","valueTracker","inputValueTracking","_getTrackerFromNode","valueField","currentValue","tracker","attachTracker","setValue","detachTracker","updateValueIfChanged","lastValue","nextValue","supportedInputTypes","datetime","email","tel","week","scrollPosition","escapeTextContentForBrowser","isUnitlessNumber","animationIterationCount","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columns","flex","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridRow","gridRowEnd","gridRowSpan","gridRowStart","gridColumn","gridColumnEnd","gridColumnSpan","gridColumnStart","fontWeight","lineClamp","lineHeight","order","orphans","tabSize","widows","zIndex","zoom","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","prefixes","prefixKey","CSSProperty","shorthandPropertyExpansions","background","backgroundAttachment","backgroundImage","backgroundPositionX","backgroundPositionY","backgroundRepeat","backgroundPosition","border","borderWidth","borderStyle","borderColor","borderBottom","borderBottomWidth","borderBottomStyle","borderBottomColor","borderLeft","borderLeftWidth","borderLeftStyle","borderLeftColor","borderRight","borderRightWidth","borderRightStyle","borderRightColor","borderTop","borderTopWidth","borderTopStyle","borderTopColor","font","outline","outlineWidth","outlineStyle","outlineColor","quoteAttributeValueForBrowser","VALID_ATTRIBUTE_NAME_REGEX","illegalAttributeNameCache","validatedAttributeNameCache","isAttributeNameSafe","shouldIgnoreValue","DOMPropertyOperations","createMarkupForID","setAttributeForID","createMarkupForRoot","setAttributeForRoot","createMarkupForProperty","createMarkupForCustomAttribute","setValueForProperty","deleteValueForProperty","setValueForAttribute","deleteValueForAttribute","didWarnValueDefaultValue","updateOptionsIfPendingUpdateAndMounted","pendingUpdate","updateOptions","multiple","propValue","selectedValue","ReactDOMSelect","getHostProps","mountWrapper","initialValue","_handleChange","wasMultiple","getSelectValueContext","postUpdateWrapper","ReactNodeTypes","HOST","COMPOSITE","EMPTY","getType","emptyComponentFactory","ReactEmptyComponentInjection","genericComponentClass","textComponentClass","isTextComponent","getIteratorFn","SEPARATOR","SUBSEPARATOR","getComponentKey","traverseAllChildrenImpl","nameSoFar","traverseContext","subtreeCount","nextNamePrefix","iteratorFn","entries","ii","entry","childrenString","getItemIDs","addRoot","removeRoot","getRootIDs","isNative","funcToString","reIsNative","itemMap","rootIDSet","itemByKey","rootByKey","getKeyFromID","getIDFromKey","unmountedIDs","purgeDeep","childIDs","describeComponentFrame","ownerName","fileName","lineNumber","_getDisplayName","describeID","ReactComponentTreeHook","getDisplayName","getElement","ownerID","getOwnerID","onSetChildren","nextChildIDs","nextChildID","nextChild","parentID","onBeforeMountComponent","updateCount","onBeforeUpdateComponent","onMountComponent","onUpdateComponent","onUnmountComponent","purgeUnmountedComponents","_preventPurging","getCurrentStackAddendum","topElement","currentOwner","_debugID","getStackAddendumByID","getParentID","getChildIDs","getUpdateCount","getRegisteredIDs","pushNonStandardWarningStack","isCreatingElement","reactStack","stack","popNonStandardWarningStack","reactStackEnd","ReactServerUpdateQueue","noopCallbackQueue","ReactServerRenderingTransaction","renderToStaticMarkup","useCreateElement","updateQueue","Mixin","getUpdateQueue","RESET_BATCHED_UPDATES","ReactDefaultBatchingStrategyTransaction","alreadyBatchingUpdates","EventListener","eventType","registerDefault","ReactDOMSelection","containsNode","focusNode","getActiveElement","ReactInputSelection","hasSelectionCapabilities","contentEditable","getSelectionInformation","focusedElem","selectionRange","getSelection","restoreSelection","priorSelectionInformation","curFocusedElem","priorFocusedElem","priorSelectionRange","setSelection","selectionStart","selectionEnd","createRange","parentElement","moveStart","moveEnd","getOffsets","offsets","createTextRange","collapse","select","setOffsets","ReactDOMContainerInfo","ReactDOMFeatureFlags","ReactMarkupChecksum","shouldUpdateReactComponent","ROOT_ATTR_NAME","ELEMENT_NODE_TYPE","DOC_NODE_TYPE","DOCUMENT_FRAGMENT_NODE_TYPE","instancesByReactRootID","getReactRootElementInContainer","mountComponentIntoNode","wrapperInstance","shouldReuseMarkup","_topLevelWrapper","ReactMount","_mountImageIntoNode","batchedMountComponentIntoNode","componentInstance","unmountComponentFromNode","hasNonRootReactChild","rootEl","isValidContainer","getTopLevelWrapperInContainer","prevHostInstance","getHostRootInstanceInContainer","_hostContainerInfo","topLevelRootCounter","TopLevelWrapper","rootID","render","_instancesByReactRootID","scrollMonitor","renderCallback","_updateRootComponent","prevComponent","_renderNewRootComponent","wrapperID","_instance","renderSubtreeIntoContainer","parentComponent","_renderSubtreeIntoContainer","nextWrappedElement","_processChildContext","publicInst","updatedCallback","unmountComponentAtNode","reactRootElement","containerHasReactMarkup","containerHasNonRootReactChild","rootElement","canReuseMarkup","checksum","CHECKSUM_ATTR_NAME","rootMarkup","outerHTML","normalizedMarkup","diffIndex","string1","string2","firstDifferenceIndex","difference","topLevelWrapper","_idCounter","_ownerDocument","_namespaceURI","adler32","TAG_END","COMMENT_START","addChecksumToMarkup","existingChecksum","_renderedNodeType","tabbable","tabbableNode","focusable","isTabIndexNotNaN","isTabIndexNaN","assertNodeList","setElement","tryForceFallback","validateElement","appElement","globalElement","documentNotReadyOrSSRTesting","resetForTesting","nodeList","useElement","classListMap","bodyClass","totalCount","curr","_exenv","SafeHTMLElement","HTMLElement","__webpack_amd_options__","Rollbar","require","accessToken","captureUncaught","UploadForm","_React$Component","files","completed","showProgressBar","inOnboarding","in_onboarding","uploadFilename","contentDisposition","uploadRequestHeaders","signingUrl","onFinishS3Put","file","handleFinish","onProgress","handleError","S3Upload","emptyProgress","alert","prevState","signedUrl","group_id","photo_url","content_type","multi","completedCount","redirect_url","prevProps","progressBar","Dropzone","onDrop","accept","reviver","decodeB64ToUint8Array","b64Text","decodedString","referenceId","earliestPresentationTime","referenceCount","getUint16","startsWithSap","sapType","sapDeltaTime","_Modal","_Modal2","YEAR","MONTH","WEEK","DAY","HOUR","MINUTE","_n","_d","_s","sliceIterator","_react","_react2","_interopRequireDefault","_defaultFormatter2","_dateParser2","isStillMounted","tick","live","unboundPeriod","minPeriod","maxPeriod","lastProps","_props","Komponent","passDownProps","_objectWithoutProperties","timeNow","suffix","unit","passDownTitle","nextFormatter","prefixAgo","prefixFromNow","suffixAgo","suffixFromNow","minutes","hours","days","months","years","wordSeparator","strings","epochMillis","weeks","normalizeFn","dateString","stringFn","_stringFn","normalizeNumber","digit","millisDelta","stringOrFn","__WEBPACK_EXTERNAL_MODULE_2__","__WEBPACK_EXTERNAL_MODULE_3__","_propTypes2","_attrAccept2","_getDataTransferItems2","supportMultiple","fileAccepted","renderChildren","isDragActive","isDragReject","onDocumentDrop","onDragStart","onDragEnter","onDragLeave","onDragOver","onFileDialogCancel","setRef","setRefs","onInputElementClick","isFileDialogActive","draggedFiles","acceptedFiles","rejectedFiles","preventDropOnDocument","dragTargets","onDocumentDragOver","fileInputEl","onfocus","dataTransfer","dropEffect","onDropAccepted","onDropRejected","disablePreview","fileList","preview","NODE_ENV","fileMatchSize","_props2","disableClick","maxSize","minSize","_props3","activeClassName","rejectClassName","rest","activeStyle","rejectStyle","filesCount","isMultipleAllowed","allFilesAccepted","borderRadius","appliedStyle","inputAttributes","divProps","oneOfType","endsWith","__e","__g","G","P","B","core","W","setDesc","getProto","isEnum","getDesc","setDescs","getKeys","getNames","getSymbols","inspectSource","dataTransferItemsList","dt","fileElement","handleFileSelect","server","signingUrlMethod","successResponses","signResult","publicUrl","preprocess","onSignedUrl","scrubFilename","processedFile","uploadFile","createCORSRequest","_getErrorRequestContext","executeOnSignedUrl","queryString","s3path","signingUrlQueryParams","signingUrlWithCredentials","signingUrlHeaders","uploadToS3","percentLoaded","lengthComputable","disposition","signResultHeaders","httprequest","uploadToS3Callback","getSignedUrl","abortUpload","LineStream","nextNewline","TAB","parseByterange","byterangeString","_Stream2","ParseStream","customParsers","tagMappers","mappedLine","tagType","playlistType","allowed","URI","BYTERANGE","IV","PRECISE","subkey","clientAttributePattern","isHexaDecimal","isDecimalFloating","expression","customType","dataParser","camelCaseKeys","setHoldBack","hb","phb","minTargetDuration","minPartDuration","_Stream3","lineStream","uris","currentUri","defaultMediaGroups","lastByterangeEnd","lastPartByterangeEnd","daterangeTags","rendition","endlist","inf","METHOD","KEYFORMAT","KEYID","keyId","TYPE","mediaGroupType","AUTOSELECT","LANGUAGE","CHARACTERISTICS","FORCED","targetduration","cueIn","warnOnMissingAttributes_","renditionReports","isPart","otherHint","required","partInf","partTarget","daterange","endOnNextYes","newDateInSeconds","setSeconds","getSeconds","missing","_rollbarConfig","globalAlias","shimId","_rollbarStartTime","rollbar","_rollbarDidLoad","_","client","notifier","handleUncaughtExceptions","captureUncaughtExceptions","wrapGlobals","captureUnhandledRejections","handleUnhandledRejections","instrumenter","telemeter","instrument","addTransform","handleItemWithError","ensureItemHasSomethingToSay","addBaseInfo","addRequestInfo","addClientInfo","addPluginInfo","addBody","addMessageWithError","addTelemetryData","scrubPayload","userTransform","itemToPayload","addPredicate","checkIgnore","userCheckIgnore","urlIsNotBlacklisted","urlIsWhitelisted","messageIsIgnored","configure","lastError","_createItem","uuid","critical","handleUncaughtException","makeUnhandledStackInfo","isError","_unhandledStackInfo","stackInfo","uncaughtErrorLevel","_isUncaught","handleUnhandledRejection","_rollbarContext","_originalArgs","wrap","_isWrap","_rollbar_wrapped","isType","_wrappedSource","_rollbarWrappedError","captureEvent","captureDomContentLoaded","captureLoad","createItem","scrubFields","logLevel","reportLevel","endpoint","verbose","rateLimiter","configureGlobal","setPlatformOptions","maxItems","itemsPerMinute","_defaultLogLevel","_log","_sameAsLastError","telemetryEvents","copyEvents","_captureRollbarItem","counter","perMinCounter","platformOptions","ignoreRateLimit","shouldSend","extra","framework","globalSettings","api","predicates","pendingItems","pendingRequests","retryQueue","retryHandle","waitCallback","waitIntervalID","addPendingItem","removePendingItem","_applyPredicates","stop","_maybeLog","_makeApiRequest","_dequeuePendingRequest","_maybeCallWait","postItem","_maybeRetry","retryInterval","_retryApiRequest","A","N","anchor","D","strictMode","access_token","port","hostname","guessFunctionName","gatherContext","useragent","C","extraArgs","lambdaContext","I","T","O","L","R","strict","loose","typeName","isNativeFunction","isIterable","traverse","redact","uuid4","LEVELS","sanitizeUrl","addParamsAndAccessTokenToPath","formatUrl","jsonParse","scrub","formatArgsAsString","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","go","firstokey","okey","ovalue","firstavalue","avalue","ocomma","acomma","colon","SyntaxError","true","false","null","transforms","_applyTransforms","maxTelemetryEvents","maxQueueSize","manual","timestamp_ms","captureError","captureLog","captureNetwork","subtype","levelFromStatus","status_code","captureDom","captureNavigation","captureConnectivityChange","transport","jsonBackup","transportOptions","getTransportFromOptions","buildPayload","oldOptions","proxy","pathname","appendPathToPath","ieVersion","_rollbarOldOnError","belongsToShim","_rollbarURH","_rollbarOldAdd","_rollbarOldRemove","ActiveXObject","_savedStackTrace","query_string","user_ip","runtime_ms","javascript","cookie_enabled","cookieEnabled","guessErrorClass","exception","class","lineno","colno","trace","_stackFrame","functionName","columnNumber","Stack","Frame","stacktrace","parseOpera","parseV8OrIE","parseFFOrSafari","extractLocation","parseOpera9","parseOpera11","parseOpera10","setFunctionName","setArgs","setFileName","setLineNumber","setColumnNumber","getFunctionName","getArgs","getFileName","getLineNumber","getColumnNumber","hostBlackList","hostWhiteList","ignoredMessages","autoInstrument","scrubTelemetryInputs","telemetryScrubber","_window","_document","replacements","network","navigation","connectivity","eventRemovers","_location","_lastHref","deinstrumentNetwork","instrumentNetwork","deinstrumentConsole","instrumentConsole","deinstrumentDom","instrumentDom","deinstrumentNavigation","instrumentNavigation","deinstrumentConnectivity","instrumentConnectivity","__rollbar_xhr","start_time_ms","end_time_ms","__rollbar_event","removeListeners","getElementFromEvent","isDescribedElement","captureDomEvent","handleSelectInputChanged","getElementType","describeElement","elementArrayToString","treeToArray","chrome","app","runtime","pushState","handleUrlChange","elementFromPoint","descriptionToString","webpackContext","webpackContextResolve","traverseAllChildren","userProvidedKeyEscapeRegex","escapeUserProvidedKey","ForEachBookKeeping","forEachFunction","forEachContext","forEachSingleChild","bookKeeping","MapBookKeeping","mapResult","keyPrefix","mapFunction","mapContext","mapSingleChildIntoContext","childKey","mappedChild","mapIntoWithKeyPrefixInternal","escapedPrefix","forEachSingleChildDummy","forEachFunc","ITERATOR_SYMBOL","maybeIterable","createDOMFactory","abbr","address","area","article","aside","bdi","bdo","big","blockquote","br","canvas","cite","col","colgroup","datalist","dd","del","dfn","dialog","dl","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","hgroup","hr","iframe","img","ins","kbd","keygen","legend","li","mark","menuitem","meta","meter","nav","noscript","ol","optgroup","param","picture","rp","rt","ruby","samp","section","strong","summary","sup","tbody","td","textarea","tfoot","thead","tr","ul","wbr","circle","clipPath","defs","ellipse","linearGradient","pattern","polygon","polyline","radialGradient","tspan","ReactIs","emptyFunctionThatReturnsNull","throwOnDirectAccess","FAUX_ITERATOR_SYMBOL","ANONYMOUS","createPrimitiveTypeChecker","bigint","symbol","createChainableTypeChecker","arrayOf","typeChecker","propFullName","PropTypeError","getPropType","elementType","isValidElementType","instanceOf","expectedClass","expectedClassName","isNode","objectOf","propType","oneOf","expectedValues","valuesString","getPreciseType","arrayOfTypeCheckers","checker","getPostfixForTypeWarning","expectedTypes","checkerResult","expectedType","shape","shapeTypes","invalidValidatorError","exact","allKeys","validate","checkType","isRequired","secret","chainedCheckType","isSymbol","resetWarningCache","AsyncMode","ConcurrentMode","ContextConsumer","ContextProvider","ForwardRef","Fragment","Lazy","Memo","Portal","Profiler","StrictMode","Suspense","isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isMemo","isPortal","isProfiler","isStrictMode","isSuspense","typeOf","typeSpecs","getStack","validateFormat","_invariant","MIXINS_KEY","injectedMixins","ReactClassInterface","mixins","statics","contextTypes","childContextTypes","getDefaultProps","getInitialState","getChildContext","componentWillMount","componentDidMount","componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","componentDidUpdate","componentWillUnmount","UNSAFE_componentWillMount","UNSAFE_componentWillReceiveProps","UNSAFE_componentWillUpdate","updateComponent","ReactClassStaticInterface","getDerivedStateFromProps","RESERVED_SPEC_KEYS","_displayName","_mixins","mixSpecIntoComponent","_childContextTypes","_contextTypes","_getDefaultProps","createMergedResultFunction","_propTypes","_statics","mixStaticSpecIntoComponent","autobind","validateMethodOverride","isAlreadyDefined","specPolicy","ReactClassMixin","spec","proto","autoBindPairs","__reactAutoBindPairs","isReactClassMethod","createChainedFunction","mergeIntoWithNoDuplicateKeys","two","bindAutoBindMethod","IsMountedPreMixin","__isMounted","IsMountedPostMixin","replaceState","ReactClassComponent","pairs","autoBindKey","bindAutoBindMethods","initialState","methodName","prompt","decodeResponseBody","charset","contentTypeHeader","_contentType$split","getCharset","_objCreate","ParsingError","errorData","parseTimeStamp","computeSeconds","Settings","parseOptions","keyValueDelim","groupDelim","kv","parseCue","regionList","oInput","consumeTimeStamp","Errors","BadTimeStamp","skipWhitespace","region","vals","vals0","integer","lineAlign","snapToLines","center","consumeCueSettings","BadSignature","dflt","defaultKey","TEXTAREA_ELEMENT","TAG_NAME","DEFAULT_COLOR_CLASS","white","lime","cyan","red","yellow","magenta","blue","black","TAG_ANNOTATION","NEEDS_PARENT","parseContent","nextToken","shouldAdd","annotation","rootDiv","tagStack","cl","bgColor","colorName","strongRTLRanges","isStrongRTLChar","determineBidi","nodeStack","pushNodes","nextTextNode","StyleBox","CueStyleBox","styleOptions","writingMode","unicodeBidi","applyStyles","textAlign","whiteSpace","textPos","formatStyle","move","BoxPosition","lh","rects","getClientRects","moveBoxToLinePosition","styleBox","containerBox","boxPositions","boxPosition","linePos","textTrackList","mediaElement","computeLinePos","axis","maxPosition","initialAxis","calculatedPercentage","bestPosition","specifiedPosition","percentage","overlapsOppositeAxis","within","overlapsAny","intersectPercentage","findBestPosition","toCSSCompatValues","toMove","overlaps","getSimpleBoxPosition","convertCueToDOMTree","cuetext","paddedOverlay","margin","hasBeenReset","shouldCompute","reportOrThrowError","collectNextLine","parseHeader","parseTimestampMap","xy","lines","regionAnchorX","regionAnchorY","viewportAnchorX","viewportAnchorY","scroll","onregion","parseRegion","alreadyCollectedLine","hasSubstring","directionSetting","alignSetting","findAlignSetting","_id","_pauseOnExit","_startTime","_endTime","_text","_region","_vertical","_snapToLines","_line","_lineAlign","_position","_positionAlign","_size","_align","setting","findDirectionSetting","getCueAsHTML","scrollSetting","isValidPercentValue","_lines","_regionAnchorX","_regionAnchorY","_viewportAnchorX","_viewportAnchorY","_scroll","findScrollSetting","b64","lens","getLens","validLen","placeHoldersLen","Arr","_byteLength","curByte","revLookup","extraBytes","maxChunkLength","len2","encodeChunk","lookup","isLE","mLen","nBytes","eLen","eMax","eBias","nBits","LN2","entities","sax","ParseError","XMLReader","normalizeLineEndings","locator","DOMHandler","cdata","_locator","_toString","chars","java","appendElement","hander","currentElement","domBuilder","defaultNSMap","xmlns","entityMap","HTML_ENTITIES","XML_ENTITIES","setDocumentLocator","errorImpl","isCallback","build","msg","buildErrorHandler","startDocument","documentURI","startElement","qName","getURI","getQName","getLocator","endElement","startPrefixMapping","endPrefixMapping","processingInstruction","ignorableWhitespace","ch","characters","charNode","skippedEntity","endDocument","comm","startCDATA","endCDATA","startDTD","impl","fatalError","__DOMHandler","amp","apos","gt","lt","quot","Aacute","aacute","Abreve","abreve","acd","acE","Acirc","acirc","acute","Acy","acy","AElig","aelig","af","Afr","afr","Agrave","agrave","alefsym","aleph","Alpha","alpha","Amacr","amacr","amalg","AMP","And","and","andand","andd","andslope","andv","ang","ange","angle","angmsd","angmsdaa","angmsdab","angmsdac","angmsdad","angmsdae","angmsdaf","angmsdag","angmsdah","angrt","angrtvb","angrtvbd","angsph","angst","angzarr","Aogon","aogon","Aopf","aopf","ap","apacir","apE","ape","apid","ApplyFunction","approx","approxeq","Aring","aring","Ascr","ascr","Assign","ast","asymp","asympeq","Atilde","atilde","Auml","auml","awconint","awint","backcong","backepsilon","backprime","backsim","backsimeq","Backslash","Barv","barvee","Barwed","barwed","barwedge","bbrk","bbrktbrk","bcong","Bcy","bcy","bdquo","becaus","Because","because","bemptyv","bepsi","bernou","Bernoullis","Beta","beta","beth","between","Bfr","bfr","bigcap","bigcirc","bigcup","bigodot","bigoplus","bigotimes","bigsqcup","bigstar","bigtriangledown","bigtriangleup","biguplus","bigvee","bigwedge","bkarow","blacklozenge","blacksquare","blacktriangle","blacktriangledown","blacktriangleleft","blacktriangleright","blank","blk12","blk14","blk34","block","bne","bnequiv","bNot","bnot","Bopf","bopf","bot","bowtie","boxbox","boxDL","boxDl","boxdL","boxdl","boxDR","boxDr","boxdR","boxdr","boxh","boxHD","boxHd","boxhD","boxhd","boxHU","boxHu","boxhU","boxhu","boxminus","boxplus","boxtimes","boxUL","boxUl","boxuL","boxul","boxUR","boxUr","boxuR","boxur","boxV","boxv","boxVH","boxVh","boxvH","boxvh","boxVL","boxVl","boxvL","boxvl","boxVR","boxVr","boxvR","boxvr","bprime","Breve","breve","brvbar","Bscr","bscr","bsemi","bsim","bsime","bsol","bsolb","bsolhsub","bull","bullet","bump","bumpE","bumpe","Bumpeq","bumpeq","Cacute","cacute","Cap","cap","capand","capbrcup","capcap","capcup","capdot","CapitalDifferentialD","caps","caret","caron","Cayleys","ccaps","Ccaron","ccaron","Ccedil","ccedil","Ccirc","ccirc","Cconint","ccups","ccupssm","Cdot","cdot","cedil","Cedilla","cemptyv","cent","CenterDot","centerdot","Cfr","cfr","CHcy","chcy","check","checkmark","Chi","chi","cir","circ","circeq","circlearrowleft","circlearrowright","circledast","circledcirc","circleddash","CircleDot","circledR","circledS","CircleMinus","CirclePlus","CircleTimes","cirE","cire","cirfnint","cirmid","cirscir","ClockwiseContourIntegral","CloseCurlyDoubleQuote","CloseCurlyQuote","clubs","clubsuit","Colon","Colone","colone","coloneq","comma","commat","compfn","complement","complexes","cong","congdot","Congruent","Conint","conint","ContourIntegral","Copf","copf","coprod","Coproduct","COPY","copysr","CounterClockwiseContourIntegral","crarr","Cross","cross","Cscr","cscr","csub","csube","csup","csupe","ctdot","cudarrl","cudarrr","cuepr","cuesc","cularr","cularrp","Cup","cup","cupbrcap","CupCap","cupcap","cupcup","cupdot","cupor","cups","curarr","curarrm","curlyeqprec","curlyeqsucc","curlyvee","curlywedge","curren","curvearrowleft","curvearrowright","cuvee","cuwed","cwconint","cwint","cylcty","Dagger","dagger","daleth","Darr","dArr","darr","dash","Dashv","dashv","dbkarow","dblac","Dcaron","dcaron","Dcy","dcy","DD","ddagger","ddarr","DDotrahd","ddotseq","deg","Del","Delta","delta","demptyv","dfisht","Dfr","dfr","dHar","dharl","dharr","DiacriticalAcute","DiacriticalDot","DiacriticalDoubleAcute","DiacriticalGrave","DiacriticalTilde","diam","Diamond","diamond","diamondsuit","diams","die","DifferentialD","digamma","disin","divide","divideontimes","divonx","DJcy","djcy","dlcorn","dlcrop","dollar","Dopf","dopf","Dot","dot","DotDot","doteq","doteqdot","DotEqual","dotminus","dotplus","dotsquare","doublebarwedge","DoubleContourIntegral","DoubleDot","DoubleDownArrow","DoubleLeftArrow","DoubleLeftRightArrow","DoubleLeftTee","DoubleLongLeftArrow","DoubleLongLeftRightArrow","DoubleLongRightArrow","DoubleRightArrow","DoubleRightTee","DoubleUpArrow","DoubleUpDownArrow","DoubleVerticalBar","DownArrow","Downarrow","downarrow","DownArrowBar","DownArrowUpArrow","DownBreve","downdownarrows","downharpoonleft","downharpoonright","DownLeftRightVector","DownLeftTeeVector","DownLeftVector","DownLeftVectorBar","DownRightTeeVector","DownRightVector","DownRightVectorBar","DownTee","DownTeeArrow","drbkarow","drcorn","drcrop","Dscr","dscr","DScy","dscy","dsol","Dstrok","dstrok","dtdot","dtri","dtrif","duarr","duhar","dwangle","DZcy","dzcy","dzigrarr","Eacute","eacute","easter","Ecaron","ecaron","ecir","Ecirc","ecirc","ecolon","Ecy","ecy","eDDot","Edot","eDot","edot","ee","efDot","Efr","efr","eg","Egrave","egrave","egs","egsdot","elinters","ell","elsdot","Emacr","emacr","emptyset","EmptySmallSquare","emptyv","EmptyVerySmallSquare","emsp","emsp13","emsp14","ENG","eng","ensp","Eogon","eogon","Eopf","eopf","epar","eparsl","eplus","epsi","Epsilon","epsilon","epsiv","eqcirc","eqcolon","eqsim","eqslantgtr","eqslantless","Equal","EqualTilde","equest","Equilibrium","equiv","equivDD","eqvparsl","erarr","erDot","Escr","escr","esdot","Esim","esim","Eta","eta","ETH","eth","Euml","euml","euro","excl","exist","Exists","expectation","ExponentialE","exponentiale","fallingdotseq","Fcy","fcy","female","ffilig","fflig","ffllig","Ffr","ffr","filig","FilledSmallSquare","FilledVerySmallSquare","fjlig","flat","fllig","fltns","fnof","Fopf","fopf","ForAll","forall","fork","forkv","Fouriertrf","fpartint","frac12","frac13","frac14","frac15","frac16","frac18","frac23","frac25","frac34","frac35","frac38","frac45","frac56","frac58","frac78","frasl","frown","Fscr","fscr","gacute","Gamma","gamma","Gammad","gammad","Gbreve","gbreve","Gcedil","Gcirc","gcirc","Gcy","gcy","Gdot","gdot","gE","ge","gEl","gel","geq","geqq","geqslant","ges","gescc","gesdot","gesdoto","gesdotol","gesl","gesles","Gfr","gfr","Gg","gg","ggg","gimel","GJcy","gjcy","gl","gla","glE","glj","gnap","gnapprox","gnE","gne","gneq","gneqq","gnsim","Gopf","gopf","grave","GreaterEqual","GreaterEqualLess","GreaterFullEqual","GreaterGreater","GreaterLess","GreaterSlantEqual","GreaterTilde","Gscr","gscr","gsim","gsime","gsiml","Gt","GT","gtcc","gtcir","gtdot","gtlPar","gtquest","gtrapprox","gtrarr","gtrdot","gtreqless","gtreqqless","gtrless","gtrsim","gvertneqq","gvnE","Hacek","hairsp","half","hamilt","HARDcy","hardcy","hArr","harr","harrcir","harrw","Hat","hbar","Hcirc","hcirc","hearts","heartsuit","hellip","hercon","Hfr","hfr","HilbertSpace","hksearow","hkswarow","hoarr","homtht","hookleftarrow","hookrightarrow","Hopf","hopf","horbar","HorizontalLine","Hscr","hscr","hslash","Hstrok","hstrok","HumpDownHump","HumpEqual","hybull","hyphen","Iacute","iacute","ic","Icirc","icirc","Icy","icy","Idot","IEcy","iecy","iexcl","iff","Ifr","ifr","Igrave","igrave","iiiint","iiint","iinfin","iiota","IJlig","ijlig","Im","Imacr","imacr","ImaginaryI","imagline","imagpart","imath","imof","imped","Implies","incare","infin","infintie","inodot","Int","intcal","integers","Integral","intercal","Intersection","intlarhk","intprod","InvisibleComma","InvisibleTimes","IOcy","iocy","Iogon","iogon","Iopf","iopf","Iota","iota","iprod","iquest","Iscr","iscr","isin","isindot","isinE","isins","isinsv","isinv","Itilde","itilde","Iukcy","iukcy","Iuml","iuml","Jcirc","jcirc","Jcy","jcy","Jfr","jfr","jmath","Jopf","jopf","Jscr","jscr","Jsercy","jsercy","Jukcy","jukcy","Kappa","kappa","kappav","Kcedil","kcedil","Kcy","kcy","Kfr","kfr","kgreen","KHcy","khcy","KJcy","kjcy","Kopf","kopf","Kscr","kscr","lAarr","Lacute","lacute","laemptyv","lagran","Lambda","lambda","Lang","langd","langle","lap","Laplacetrf","laquo","Larr","lArr","larr","larrb","larrbfs","larrfs","larrhk","larrlp","larrpl","larrsim","larrtl","lat","lAtail","latail","late","lates","lBarr","lbarr","lbbrk","lbrace","lbrack","lbrke","lbrksld","lbrkslu","Lcaron","lcaron","Lcedil","lcedil","lceil","lcub","Lcy","lcy","ldca","ldquo","ldquor","ldrdhar","ldrushar","ldsh","lE","LeftAngleBracket","LeftArrow","Leftarrow","leftarrow","LeftArrowBar","LeftArrowRightArrow","leftarrowtail","LeftCeiling","LeftDoubleBracket","LeftDownTeeVector","LeftDownVector","LeftDownVectorBar","LeftFloor","leftharpoondown","leftharpoonup","leftleftarrows","LeftRightArrow","Leftrightarrow","leftrightarrow","leftrightarrows","leftrightharpoons","leftrightsquigarrow","LeftRightVector","LeftTee","LeftTeeArrow","LeftTeeVector","leftthreetimes","LeftTriangle","LeftTriangleBar","LeftTriangleEqual","LeftUpDownVector","LeftUpTeeVector","LeftUpVector","LeftUpVectorBar","LeftVector","LeftVectorBar","lEg","leg","leq","leqq","leqslant","les","lescc","lesdot","lesdoto","lesdotor","lesg","lesges","lessapprox","lessdot","lesseqgtr","lesseqqgtr","LessEqualGreater","LessFullEqual","LessGreater","lessgtr","LessLess","lesssim","LessSlantEqual","LessTilde","lfisht","lfloor","Lfr","lfr","lg","lgE","lHar","lhard","lharu","lharul","lhblk","LJcy","ljcy","Ll","ll","llarr","llcorner","Lleftarrow","llhard","lltri","Lmidot","lmidot","lmoust","lmoustache","lnap","lnapprox","lnE","lne","lneq","lneqq","lnsim","loang","loarr","lobrk","LongLeftArrow","Longleftarrow","longleftarrow","LongLeftRightArrow","Longleftrightarrow","longleftrightarrow","longmapsto","LongRightArrow","Longrightarrow","longrightarrow","looparrowleft","looparrowright","lopar","Lopf","lopf","loplus","lotimes","lowast","lowbar","LowerLeftArrow","LowerRightArrow","loz","lozenge","lozf","lpar","lparlt","lrarr","lrcorner","lrhar","lrhard","lrm","lrtri","lsaquo","Lscr","lscr","Lsh","lsh","lsim","lsime","lsimg","lsqb","lsquo","lsquor","Lstrok","lstrok","Lt","LT","ltcc","ltcir","ltdot","lthree","ltimes","ltlarr","ltquest","ltri","ltrie","ltrif","ltrPar","lurdshar","luruhar","lvertneqq","lvnE","macr","male","malt","maltese","mapsto","mapstodown","mapstoleft","mapstoup","mcomma","Mcy","mcy","mdash","mDDot","measuredangle","MediumSpace","Mellintrf","Mfr","mfr","mho","micro","mid","midast","midcir","middot","minus","minusb","minusd","minusdu","MinusPlus","mlcp","mldr","mnplus","models","Mopf","mopf","mp","Mscr","mscr","mstpos","Mu","mu","multimap","mumap","nabla","Nacute","nacute","nang","nap","napE","napid","napos","napprox","natur","natural","naturals","nbsp","nbump","nbumpe","ncap","Ncaron","ncaron","Ncedil","ncedil","ncong","ncongdot","ncup","Ncy","ncy","ndash","ne","nearhk","neArr","nearr","nearrow","nedot","NegativeMediumSpace","NegativeThickSpace","NegativeThinSpace","NegativeVeryThinSpace","nequiv","nesear","nesim","NestedGreaterGreater","NestedLessLess","NewLine","nexist","nexists","Nfr","nfr","ngE","nge","ngeq","ngeqq","ngeqslant","nges","nGg","ngsim","nGt","ngt","ngtr","nGtv","nhArr","nharr","nhpar","ni","nis","nisd","niv","NJcy","njcy","nlArr","nlarr","nldr","nlE","nle","nLeftarrow","nleftarrow","nLeftrightarrow","nleftrightarrow","nleq","nleqq","nleqslant","nles","nless","nLl","nlsim","nLt","nlt","nltri","nltrie","nLtv","nmid","NoBreak","NonBreakingSpace","Nopf","nopf","Not","not","NotCongruent","NotCupCap","NotDoubleVerticalBar","NotElement","NotEqual","NotEqualTilde","NotExists","NotGreater","NotGreaterEqual","NotGreaterFullEqual","NotGreaterGreater","NotGreaterLess","NotGreaterSlantEqual","NotGreaterTilde","NotHumpDownHump","NotHumpEqual","notin","notindot","notinE","notinva","notinvb","notinvc","NotLeftTriangle","NotLeftTriangleBar","NotLeftTriangleEqual","NotLess","NotLessEqual","NotLessGreater","NotLessLess","NotLessSlantEqual","NotLessTilde","NotNestedGreaterGreater","NotNestedLessLess","notni","notniva","notnivb","notnivc","NotPrecedes","NotPrecedesEqual","NotPrecedesSlantEqual","NotReverseElement","NotRightTriangle","NotRightTriangleBar","NotRightTriangleEqual","NotSquareSubset","NotSquareSubsetEqual","NotSquareSuperset","NotSquareSupersetEqual","NotSubset","NotSubsetEqual","NotSucceeds","NotSucceedsEqual","NotSucceedsSlantEqual","NotSucceedsTilde","NotSuperset","NotSupersetEqual","NotTilde","NotTildeEqual","NotTildeFullEqual","NotTildeTilde","NotVerticalBar","npar","nparallel","nparsl","npart","npolint","npr","nprcue","npre","nprec","npreceq","nrArr","nrarr","nrarrc","nrarrw","nRightarrow","nrightarrow","nrtri","nrtrie","nsc","nsccue","nsce","Nscr","nscr","nshortmid","nshortparallel","nsim","nsime","nsimeq","nsmid","nspar","nsqsube","nsqsupe","nsub","nsubE","nsube","nsubset","nsubseteq","nsubseteqq","nsucc","nsucceq","nsup","nsupE","nsupe","nsupset","nsupseteq","nsupseteqq","ntgl","Ntilde","ntilde","ntlg","ntriangleleft","ntrianglelefteq","ntriangleright","ntrianglerighteq","Nu","nu","numero","numsp","nvap","nVDash","nVdash","nvDash","nvdash","nvge","nvgt","nvHarr","nvinfin","nvlArr","nvle","nvlt","nvltrie","nvrArr","nvrtrie","nvsim","nwarhk","nwArr","nwarr","nwarrow","nwnear","Oacute","oacute","oast","ocir","Ocirc","ocirc","Ocy","ocy","odash","Odblac","odblac","odiv","odot","odsold","OElig","oelig","ofcir","Ofr","ofr","ogon","Ograve","ograve","ogt","ohbar","ohm","oint","olarr","olcir","olcross","oline","olt","Omacr","omacr","Omega","omega","Omicron","omicron","omid","ominus","Oopf","oopf","opar","OpenCurlyDoubleQuote","OpenCurlyQuote","operp","oplus","Or","or","orarr","ord","orderof","ordf","ordm","origof","oror","orslope","orv","oS","Oscr","oscr","Oslash","oslash","osol","Otilde","otilde","Otimes","otimes","otimesas","Ouml","ouml","ovbar","OverBar","OverBrace","OverBracket","OverParenthesis","par","para","parallel","parsim","parsl","PartialD","Pcy","pcy","percnt","permil","perp","pertenk","Pfr","pfr","Phi","phi","phiv","phmmat","phone","Pi","pitchfork","piv","planck","planckh","plankv","plus","plusacir","plusb","pluscir","plusdo","plusdu","pluse","PlusMinus","plusmn","plussim","plustwo","pm","Poincareplane","pointint","Popf","popf","pound","Pr","pr","prap","prcue","prE","prec","precapprox","preccurlyeq","Precedes","PrecedesEqual","PrecedesSlantEqual","PrecedesTilde","preceq","precnapprox","precneqq","precnsim","precsim","Prime","prime","primes","prnap","prnE","prnsim","prod","Product","profalar","profline","profsurf","Proportion","Proportional","propto","prsim","prurel","Pscr","pscr","Psi","puncsp","Qfr","qfr","qint","Qopf","qopf","qprime","Qscr","qscr","quaternions","quatint","quest","questeq","QUOT","rAarr","Racute","racute","radic","raemptyv","Rang","rang","rangd","rangle","raquo","Rarr","rArr","rarr","rarrap","rarrb","rarrbfs","rarrc","rarrfs","rarrhk","rarrlp","rarrpl","rarrsim","Rarrtl","rarrtl","rarrw","rAtail","ratail","rationals","RBarr","rBarr","rbarr","rbbrk","rbrace","rbrack","rbrke","rbrksld","rbrkslu","Rcaron","rcaron","Rcedil","rcedil","rceil","rcub","Rcy","rcy","rdca","rdldhar","rdquo","rdquor","rdsh","Re","real","realine","realpart","reals","REG","reg","ReverseElement","ReverseEquilibrium","ReverseUpEquilibrium","rfisht","rfloor","Rfr","rfr","rHar","rhard","rharu","rharul","Rho","rho","rhov","RightAngleBracket","RightArrow","Rightarrow","rightarrow","RightArrowBar","RightArrowLeftArrow","rightarrowtail","RightCeiling","RightDoubleBracket","RightDownTeeVector","RightDownVector","RightDownVectorBar","RightFloor","rightharpoondown","rightharpoonup","rightleftarrows","rightleftharpoons","rightrightarrows","rightsquigarrow","RightTee","RightTeeArrow","RightTeeVector","rightthreetimes","RightTriangle","RightTriangleBar","RightTriangleEqual","RightUpDownVector","RightUpTeeVector","RightUpVector","RightUpVectorBar","RightVector","RightVectorBar","ring","risingdotseq","rlarr","rlhar","rlm","rmoust","rmoustache","rnmid","roang","roarr","robrk","ropar","Ropf","ropf","roplus","rotimes","RoundImplies","rpar","rpargt","rppolint","rrarr","Rrightarrow","rsaquo","Rscr","rscr","Rsh","rsh","rsqb","rsquo","rsquor","rthree","rtimes","rtri","rtrie","rtrif","rtriltri","RuleDelayed","ruluhar","rx","Sacute","sacute","sbquo","Sc","sc","scap","Scaron","scaron","sccue","scE","sce","Scedil","scedil","Scirc","scirc","scnap","scnE","scnsim","scpolint","scsim","Scy","scy","sdot","sdotb","sdote","searhk","seArr","searr","searrow","sect","semi","seswar","setminus","setmn","sext","Sfr","sfr","sfrown","sharp","SHCHcy","shchcy","SHcy","shcy","ShortDownArrow","ShortLeftArrow","shortmid","shortparallel","ShortRightArrow","ShortUpArrow","shy","Sigma","sigma","sigmaf","sigmav","sim","simdot","sime","simeq","simg","simgE","siml","simlE","simne","simplus","simrarr","slarr","SmallCircle","smallsetminus","smashp","smeparsl","smid","smile","smt","smte","smtes","SOFTcy","softcy","sol","solb","solbar","Sopf","sopf","spades","spadesuit","spar","sqcap","sqcaps","sqcup","sqcups","Sqrt","sqsub","sqsube","sqsubset","sqsubseteq","sqsup","sqsupe","sqsupset","sqsupseteq","squ","Square","square","SquareIntersection","SquareSubset","SquareSubsetEqual","SquareSuperset","SquareSupersetEqual","SquareUnion","squarf","squf","srarr","Sscr","sscr","ssetmn","ssmile","sstarf","Star","star","starf","straightepsilon","straightphi","strns","Sub","subdot","subE","sube","subedot","submult","subnE","subne","subplus","subrarr","Subset","subset","subseteq","subseteqq","SubsetEqual","subsetneq","subsetneqq","subsim","subsub","subsup","succ","succapprox","succcurlyeq","Succeeds","SucceedsEqual","SucceedsSlantEqual","SucceedsTilde","succeq","succnapprox","succneqq","succnsim","succsim","SuchThat","Sum","sung","Sup","sup1","sup2","sup3","supdot","supdsub","supE","supe","supedot","Superset","SupersetEqual","suphsol","suphsub","suplarr","supmult","supnE","supne","supplus","Supset","supset","supseteq","supseteqq","supsetneq","supsetneqq","supsim","supsub","supsup","swarhk","swArr","swarr","swarrow","swnwar","szlig","Tab","Tau","tau","tbrk","Tcaron","tcaron","Tcedil","tcedil","Tcy","tcy","tdot","telrec","Tfr","tfr","there4","Therefore","therefore","Theta","theta","thetasym","thetav","thickapprox","thicksim","ThickSpace","thinsp","ThinSpace","thkap","thksim","THORN","thorn","Tilde","tilde","TildeEqual","TildeFullEqual","TildeTilde","times","timesb","timesbar","timesd","tint","toea","topbot","topcir","Topf","topf","topfork","tosa","tprime","TRADE","trade","triangle","triangledown","triangleleft","trianglelefteq","triangleq","triangleright","trianglerighteq","tridot","trie","triminus","TripleDot","triplus","trisb","tritime","trpezium","Tscr","tscr","TScy","tscy","TSHcy","tshcy","Tstrok","tstrok","twixt","twoheadleftarrow","twoheadrightarrow","Uacute","uacute","Uarr","uArr","uarr","Uarrocir","Ubrcy","ubrcy","Ubreve","ubreve","Ucirc","ucirc","Ucy","ucy","udarr","Udblac","udblac","udhar","ufisht","Ufr","ufr","Ugrave","ugrave","uHar","uharl","uharr","uhblk","ulcorn","ulcorner","ulcrop","ultri","Umacr","umacr","uml","UnderBar","UnderBrace","UnderBracket","UnderParenthesis","Union","UnionPlus","Uogon","uogon","Uopf","uopf","UpArrow","Uparrow","uparrow","UpArrowBar","UpArrowDownArrow","UpDownArrow","Updownarrow","updownarrow","UpEquilibrium","upharpoonleft","upharpoonright","uplus","UpperLeftArrow","UpperRightArrow","Upsi","upsi","upsih","Upsilon","upsilon","UpTee","UpTeeArrow","upuparrows","urcorn","urcorner","urcrop","Uring","uring","urtri","Uscr","uscr","utdot","Utilde","utilde","utri","utrif","uuarr","Uuml","uuml","uwangle","vangrt","varepsilon","varkappa","varnothing","varphi","varpi","varpropto","vArr","varr","varrho","varsigma","varsubsetneq","varsubsetneqq","varsupsetneq","varsupsetneqq","vartheta","vartriangleleft","vartriangleright","Vbar","vBar","vBarv","Vcy","vcy","VDash","Vdash","vDash","vdash","Vdashl","Vee","vee","veebar","veeeq","vellip","Verbar","verbar","Vert","vert","VerticalBar","VerticalLine","VerticalSeparator","VerticalTilde","VeryThinSpace","Vfr","vfr","vltri","vnsub","vnsup","Vopf","vopf","vprop","vrtri","Vscr","vscr","vsubnE","vsubne","vsupnE","vsupne","Vvdash","vzigzag","Wcirc","wcirc","wedbar","Wedge","wedge","wedgeq","weierp","Wfr","wfr","Wopf","wopf","wp","wr","wreath","Wscr","wscr","xcap","xcirc","xcup","xdtri","Xfr","xfr","xhArr","xharr","Xi","xi","xlArr","xlarr","xmap","xnis","xodot","Xopf","xopf","xoplus","xotime","xrArr","xrarr","Xscr","xscr","xsqcup","xuplus","xutri","xvee","xwedge","Yacute","yacute","YAcy","yacy","Ycirc","ycirc","Ycy","ycy","yen","Yfr","yfr","YIcy","yicy","Yopf","yopf","Yscr","yscr","YUcy","yucy","Yuml","yuml","Zacute","zacute","Zcaron","zcaron","Zcy","zcy","Zdot","zdot","zeetrf","ZeroWidthSpace","Zeta","zeta","Zfr","zfr","ZHcy","zhcy","zigrarr","Zopf","zopf","Zscr","zscr","zwj","zwnj","nameStartChar","nameChar","tagNamePattern","S_TAG","S_ATTR","S_ATTR_SPACE","S_EQ","S_ATTR_NOQUOT_VALUE","S_ATTR_END","S_TAG_SPACE","S_TAG_CLOSE","copyLocator","parseElementStartPart","currentNSMap","entityReplacer","addAttribute","qname","attributeNames","addValue","setTagName","closed","localNSMap","nsp","nsPrefix","_copy","parseHtmlSpecialContent","elStartEnd","elEndStart","fixSelfClosed","closeMap","parseDCC","matchs","lastMatch","endDTD","parseInstruction","ElementAttributes","defaultNSMapCopy","fixedFromCharCode","surrogate1","surrogate2","appendText","xt","lineEnd","linePattern","lineStart","parseStack","tagStart","endMatch","locator2","_parse","getLocalName","Axios","createInstance","defaultConfig","instanceConfig","CancelToken","isCancel","promises","spread","isSlowBuffer","InterceptorManager","dispatchRequest","isAbsoluteURL","combineURLs","interceptors","chain","interceptor","fulfilled","rejected","normalizedName","encode","serializedParams","originURL","msie","urlParsingNode","resolveURL","requestURL","expires","domain","secure","cookie","toGMTString","eject","transformData","throwIfCancellationRequested","throwIfRequested","executor","resolvePromise","token","bodyOpenClassName","portalClassName","_reactDom2","_ModalPortal2","ariaAppHider","newObj","_interopRequireWildcard","_safeHTMLElement2","unstable_renderSubtreeIntoContainer","getParentElement","parentSelector","removePortal","renderPortal","portal","defaultStyles","currentParent","newParent","closesAt","closeTimeoutMS","beforeClose","closeWithTimeout","overlayClassName","onAfterOpen","ariaHideApp","shouldFocusAfter","aria","shouldFocusAfterRender","WebkitOverflowScrolling","padding","ReactDefaultInjection","findDOMNode","getHostComponentFromComposite","ReactDOM","unstable_batchedUpdates","__REACT_DEVTOOLS_GLOBAL_HOOK__","Mount","Reconciler","FallbackCompositionState","SyntheticCompositionEvent","SyntheticInputEvent","END_KEYCODES","START_KEYCODE","canUseCompositionEvent","opera","canUseTextInputEvent","useFallbackCompositionData","SPACEBAR_CODE","SPACEBAR_CHAR","beforeInput","bubbled","captured","compositionEnd","compositionStart","compositionUpdate","hasSpaceKeypress","isFallbackCompositionEnd","getDataFromCustomEvent","currentComposition","extractCompositionEvent","fallbackData","getCompositionEventType","isFallbackCompositionStart","getData","customData","extractBeforeInputEvent","getNativeBeforeInputChars","isKeypressCommand","getFallbackBeforeInputChars","getTextContentAccessor","_root","_startText","_fallbackText","startValue","startLength","endValue","endLength","minEnd","sliceTail","isTextInputElement","createAndAccumulateChangeEvent","activeElementInst","doesChangeEventBubble","manualDispatchChangeEvent","runEventInBatch","stopWatchingForChangeEventIE8","getInstIfValueChanged","updated","_allowSimulatedPassThrough","getTargetInstForChangeEvent","handleEventsForChangeEventIE8","startWatchingForChangeEventIE8","isInputEventSupported","stopWatchingForValueChange","handlePropertyChange","handleEventsForInputEventPolyfill","startWatchingForValueChange","getTargetInstForInputEventPolyfill","getTargetInstForClickEvent","getTargetInstForInputOrChangeEvent","_isInputEventSupported","getTargetInstFunc","handleEventFunc","targetNode","shouldUseClickEvent","controlled","handleControlledInputBlur","ReactOwner","addComponentAsRefTo","attachRef","prevRef","prevOwner","nextRef","nextOwner","removeComponentAsRefFrom","detachRef","isValidOwner","ownerPublicInstance","mouseEnter","mouseLeave","related","toNode","acceptCharset","accessKey","allowFullScreen","allowTransparency","as","async","autoPlay","cellPadding","cellSpacing","charSet","challenge","classID","cols","colSpan","contextMenu","controlsList","coords","defer","download","draggable","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","high","hrefLang","htmlFor","httpEquiv","icon","inputMode","integrity","keyParams","keyType","low","marginHeight","marginWidth","minLength","nonce","noValidate","optimum","playsInline","radioGroup","referrerPolicy","reversed","rowSpan","sandbox","scoped","scrolling","seamless","sizes","spellCheck","srcDoc","srcLang","srcSet","useMap","wmode","about","datatype","inlist","resource","vocab","autoCapitalize","autoCorrect","autoSave","itemProp","itemScope","itemType","itemID","itemRef","security","unselectable","_value","validity","badInput","dangerouslyProcessChildrenUpdates","createNodesFromMarkup","createArrayFromMixed","getMarkupWrap","dummyNode","nodeNamePattern","handleScript","nodeNameMatch","getNodeName","wrapDepth","scripts","hasArrayNature","callee","shouldWrap","selectWrap","tableWrap","trWrap","svgWrap","markupWrap","ReactDOMIDOperations","AutoFocusUtils","CSSPropertyOperations","ReactDOMInput","ReactDOMOption","ReactDOMTextarea","ReactMultiChild","getNode","CONTENT_TYPES","STYLE","dangerouslySetInnerHTML","suppressContentEditableWarning","assertValidProps","voidElementTags","enqueuePutListener","containerInfo","listenerToPut","inputPostMount","postMountWrapper","textareaPostMount","optionPostMount","mediaEvents","trackInputValue","trapBubbledEventsLocal","postUpdateSelectWrapper","omittedCloseTags","newlineEatingTags","listing","VALID_TAG_REGEX","validatedTagCache","isCustomComponent","globalIdCounter","validateDangerousTag","_previousStyle","_previousStyleCopy","parentTag","mountImage","_updateDOMProperties","lazyTree","_createInitialChildren","tagOpen","_createOpenTagMarkupAndPutListeners","tagContent","_createContentMarkup","autoFocus","focusDOMComponent","propKey","createMarkupForStyles","__html","contentToUse","childrenToUse","mountChildren","mountImages","nextProps","_updateDOMChildren","updateWrapper","styleName","styleUpdates","lastStyle","nextProp","lastProp","setValueForStyles","lastContent","nextContent","lastHtml","nextHtml","lastChildren","nextChildren","lastHasContentOrHtml","nextHasContentOrHtml","updateChildren","updateTextContent","updateMarkup","unmountChildren","dangerousStyleValue","hyphenateStyleName","memoizeStringOnly","processStyleName","hasShorthandPropertyBug","styleFloatAccessor","tempStyle","cssFloat","serialized","isCustomProperty","styleValue","setProperty","expansion","individualStyleName","camelize","msPattern","_hyphenPattern","character","isNonNumeric","hyphenate","_uppercasePattern","cache","runEventQueueInBatch","makePrefixMap","styleProp","vendorPrefixes","animationend","animationiteration","animationstart","transitionend","prefixedEventNames","animation","transition","prefixMap","forceUpdateIfMounted","isControlled","defaultChecked","initialChecked","valueAsNumber","queryRoot","otherNode","otherInstance","didWarnInvalidOptionChildren","flattenChildren","selectValue","selectParent","hostProps","newValue","ReactChildReconciler","processQueue","_reconcilerInstantiateChildren","nestedChildren","instantiateChildren","_reconcilerUpdateChildren","prevChildren","nextNestedChildrenElements","removedNodes","toIndex","nextMarkup","_updateChildren","nextIndex","nextMountIndex","lastPlacedNode","prevChild","_mountChildAtIndex","_unmountChild","renderedChildren","makeMove","createChild","makeInsertMarkup","makeRemove","instantiateChild","childInstances","selfDebugID","keyUnique","nestedChildNodes","nextChildInstance","nextChildMountImage","renderedChild","CompositeTypes","StatelessComponent","warnIfInvalidElement","nextMountID","_compositeType","_calledComponentWillUnmount","renderedElement","publicProps","publicContext","_processContext","doConstruct","shouldConstruct","_constructComponent","isPureComponent","unstable_handleError","performInitialMountWithErrorHandling","performInitialMount","_constructComponentWithoutOwner","_processPendingState","_renderValidatedComponent","_maskContext","maskedContext","contextName","currentContext","childContext","_checkContextTypes","prevContext","prevParentElement","nextParentElement","prevUnmaskedContext","nextUnmaskedContext","willReceive","nextState","shouldUpdate","_performComponentUpdate","partial","unmaskedContext","hasComponentDidUpdate","_updateRenderedComponent","prevComponentInstance","prevRenderedElement","nextRenderedElement","oldHostNode","_replaceNodeWithMarkup","prevInstance","_renderValidatedComponentWithoutOwnerOrContext","publicComponentInstance","nextDebugID","flattenSingleChildIntoContext","domID","instA","instB","depthA","tempA","depthB","tempB","depth","pathFrom","pathTo","_stringText","_closingComment","_commentNodes","openingValue","closingValue","escapedText","nextText","nextStringText","commentNodes","hostNode","getUnboundedScrollPosition","findParent","TopLevelCallbackBookKeeping","ancestors","handleTopLevelImpl","ancestor","_handleTopLevel","scrollValueMonitor","_enabled","scrollable","Window","pageXOffset","pageYOffset","previouslyEnabled","reactMountReady","getNodeForCharacterOffset","isCollapsed","anchorNode","anchorOffset","focusOffset","useIEOffsets","selectedRange","selectedLength","fromStart","duplicate","moveToElementText","setEndPoint","startOffset","rangeCount","getRangeAt","startContainer","endContainer","rangeLength","tempRange","cloneRange","selectNodeContents","setEnd","endOffset","detectionRange","setStart","isBackward","collapsed","startMarker","endMarker","removeAllRanges","addRange","getLeafNode","getSiblingNode","nodeStart","nodeEnd","outerNode","innerNode","compareDocumentPosition","NS","ATTRS","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeType","autoReverse","azimuth","baseFrequency","baseProfile","baselineShift","bbox","begin","bias","by","calcMode","capHeight","clip","clipRule","clipPathUnits","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","decelerate","descent","diffuseConstant","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","externalResourcesRequired","fillRule","filterRes","filterUnits","floodColor","fontSizeAdjust","fontStretch","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","ideographic","imageRendering","in2","intercept","k1","k2","k3","k4","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerMid","markerStart","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","mathematical","numOctaves","operator","orient","origin","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","points","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","rotate","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","stdDeviation","stemh","stemv","stitchTiles","stopColor","strikethroughPosition","strikethroughThickness","stroke","strokeLinecap","strokeLinejoin","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textRendering","textLength","u1","u2","underlinePosition","underlineThickness","unicodeRange","unitsPerEm","vAlphabetic","vHanging","vIdeographic","vMathematical","vectorEffect","vertAdvY","vertOriginX","vertOriginY","viewBox","viewTarget","visibility","widths","wordSpacing","xHeight","x1","xChannelSelector","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlnsXlink","xmlLang","xmlSpace","y1","y2","yChannelSelector","zoomAndPan","skipSelectionChangeEvent","lastSelection","hasListener","constructSelectEvent","currentSelection","boundingTop","boundingLeft","syntheticEvent","SyntheticAnimationEvent","SyntheticClipboardEvent","SyntheticFocusEvent","SyntheticKeyboardEvent","SyntheticDragEvent","SyntheticTouchEvent","SyntheticTransitionEvent","SyntheticWheelEvent","getEventCharCode","topLevelEventsToDispatchConfig","capitalizedEvent","onEvent","topEvent","onClickListeners","isInteractive","EventConstructor","animationName","elapsedTime","pseudoElement","ClipboardEventInterface","clipboardData","KeyboardEventInterface","locale","normalizeKey","Esc","Spacebar","Left","Up","Right","Down","Win","Apps","Scroll","MozPrintableKey","translateToKey","TouchEventInterface","targetTouches","deltaX","wheelDeltaX","deltaY","wheelDeltaY","wheelDelta","deltaZ","deltaMode","useFiber","MOD","componentOrElement","emptyFunctionWithReset","getShim","_typeof2","focusManager","_scopeTab2","refCount","bodyClassList","CLASS_NAMES","ModalPortal","setFocusAfterRender","focusAfterRender","setOverlayRef","setContentRef","afterClose","returnFocus","teardownScopedFocus","beforeOpen","afterOpen","closeTimer","setupScopedFocus","markForFocusLater","closeWithoutTimeout","focusContent","contentHasFocus","requestClose","handleOverlayOnClick","shouldClose","ownerHandlesClose","moveFromContentToOverlay","handleOverlayOnMouseUp","handleContentOnMouseUp","handleOverlayOnMouseDown","handleContentOnClick","handleContentOnMouseDown","shouldBeClosed","buildClassName","additional","ariaAttributes","contentStyles","overlayStyles","onMouseDown","onMouseUp","onKeyDown","handleFocus","focusLaterElements","toFocus","modalElement","_tabbable","_tabbable2","needToFocus","_parts$map","_parts$map2","firstP","secondP","restPs","correctedParts","UTC","ReactDOMServer","_detectEvents","constructorFromGlobal","constructorFromRequireContext","constructorFromRequireContextWithGlobalFallback","constructorFromRequireContextsWithGlobalFallback","_require","supportsHydration","reactHydrate","createReactRootLike","ReactRailsUJS","CLASS_NAME_ATTR","PROPS_ATTR","RENDER_ATTR","CACHE_ID_ATTR","TURBOLINKS_PERMANENT_ATTR","jQuery","components","findDOMNodes","searchSelector","classNameAttr","getConstructor","useContext","requireContext","useContexts","requireContexts","serverRender","renderFunction","mountComponents","ujs","propsJson","hydrate","cacheId","turbolinksPermanent","unmountComponents","detectEvents","ReactServerRendering","renderToString","ReactServerBatchingStrategy","pendingTransactions","renderToStringImpl","makeStaticMarkup","nativeEvents","pjaxEvents","turbolinksEvents","turbolinksClassicDeprecatedEvents","turbolinksClassicEvents","handleEvent","Turbolinks","EVENTS","teardown","removeEvent","supported","setup","controller","pjax","handleMount","handleUnmount","pagesCached","CHANGE","BEFORE_UNLOAD","fromGlobal","fromRequireContext","fromCtx","firstErr","secondErr","reqctxs","fromCtxs","fromCtxErr","reactDomClient","hydrateRoot","createRoot","legacyReactRootLike","componentRequireContext","domready"],"mappings":";aACE,IAAIA,EAAmB,CAAC,EAGxB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,CAAC,GAUX,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,OACf,CAIAF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,GAEhE,EAGAZ,EAAoBkB,EAAI,SAAShB,GACX,qBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,GACvD,EAOArB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,kBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAA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AC/E,C,gCCbA,0DAWI8rV,GAXJ,sEAW8Bt8H,QACVA,EAAQ,KACdm5H,WAAWmD,GACzB/4V,OAAO+4V,wBAA0BA,EAajCt8H,OAsBc,IADAA,EAAQ,KACR,CARO,CACnBC,YAAa,mCACbC,iBAAiB,EACjB5wF,QAAS,CACNxtF,YAAa7K,gBASlBslT,KAAS,WAEP,IAAIp2B,EAAQj9T,SAAS4oD,cAAc,2BAA2B1S,QAC9D8tJ,IAAMn2J,SAASF,QAAQe,OAAS,CAC9B,eAAgBuuR,EAChB,mBAAoB,iBAExB,G,oCC7DA,IAAIj4T,EAAM,CACT,iBAAkB,IAClB,qBAAsB,IACtB,iBAAkB,IAClB,qBAAsB,IACtB,SAAU,IACV,aAAc,IACd,sBAAuB,IACvB,0BAA2B,IAC3B,sBAAuB,IACvB,0BAA2B,IAC3B,mBAAoB,IACpB,uBAAwB,IACxB,eAAgB,IAChB,mBAAoB,IACpB,iBAAkB,IAClB,qBAAsB,IACtB,wBAAyB,IACzB,4BAA6B,IAC7B,kBAAmB,IACnB,sBAAuB,KAIxB,SAASyzO,EAAevxH,GACvB,IAAI7pG,EAAKq7N,EAAsBxxH,GAC/B,OAAOlvH,EAAoBqlB,EAC5B,CACA,SAASq7N,EAAsBxxH,GAC9B,IAAIlvH,EAAoBa,EAAEmM,EAAKkiH,GAAM,CACpC,IAAIhpH,EAAI,IAAIyD,MAAM,uBAAyBulH,EAAM,KAEjD,MADAhpH,EAAEkD,KAAO,mBACHlD,CACP,CACA,OAAO8G,EAAIkiH,EACZ,CACAuxH,EAAevyO,KAAO,WACrB,OAAOpN,OAAOoN,KAAKlB,EACpB,EACAyzO,EAAej/H,QAAUk/H,EACzBvgP,EAAOD,QAAUugP,EACjBA,EAAep7N,GAAK,G","file":"js/application-8e18b1e6b42156f2f303.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/packs/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 291);\n","var win;\nif (typeof window !== \"undefined\") {\n win = window;\n} else if (typeof global !== \"undefined\") {\n win = global;\n} else if (typeof self !== \"undefined\") {\n win = self;\n} else {\n win = {};\n}\nmodule.exports = win;","import window from 'global/window'; // const log2 = Math.log2 ? Math.log2 : (x) => (Math.log(x) / Math.log(2));\n\nvar repeat = function repeat(str, len) {\n var acc = '';\n while (len--) {\n acc += str;\n }\n return acc;\n}; // count the number of bits it would take to represent a number\n// we used to do this with log2 but BigInt does not support builtin math\n// Math.ceil(log2(x));\n\nexport var countBits = function countBits(x) {\n return x.toString(2).length;\n}; // count the number of whole bytes it would take to represent a number\n\nexport var countBytes = function countBytes(x) {\n return Math.ceil(countBits(x) / 8);\n};\nexport var padStart = function padStart(b, len, str) {\n if (str === void 0) {\n str = ' ';\n }\n return (repeat(str, len) + b.toString()).slice(-len);\n};\nexport var isArrayBufferView = function isArrayBufferView(obj) {\n if (ArrayBuffer.isView === 'function') {\n return ArrayBuffer.isView(obj);\n }\n return obj && obj.buffer instanceof ArrayBuffer;\n};\nexport var isTypedArray = function isTypedArray(obj) {\n return isArrayBufferView(obj);\n};\nexport var toUint8 = function toUint8(bytes) {\n if (bytes instanceof Uint8Array) {\n return bytes;\n }\n if (!Array.isArray(bytes) && !isTypedArray(bytes) && !(bytes instanceof ArrayBuffer)) {\n // any non-number or NaN leads to empty uint8array\n // eslint-disable-next-line\n if (typeof bytes !== 'number' || typeof bytes === 'number' && bytes !== bytes) {\n bytes = 0;\n } else {\n bytes = [bytes];\n }\n }\n return new Uint8Array(bytes && bytes.buffer || bytes, bytes && bytes.byteOffset || 0, bytes && bytes.byteLength || 0);\n};\nexport var toHexString = function toHexString(bytes) {\n bytes = toUint8(bytes);\n var str = '';\n for (var i = 0; i < bytes.length; i++) {\n str += padStart(bytes[i].toString(16), 2, '0');\n }\n return str;\n};\nexport var toBinaryString = function toBinaryString(bytes) {\n bytes = toUint8(bytes);\n var str = '';\n for (var i = 0; i < bytes.length; i++) {\n str += padStart(bytes[i].toString(2), 8, '0');\n }\n return str;\n};\nvar BigInt = window.BigInt || Number;\nvar BYTE_TABLE = [BigInt('0x1'), BigInt('0x100'), BigInt('0x10000'), BigInt('0x1000000'), BigInt('0x100000000'), BigInt('0x10000000000'), BigInt('0x1000000000000'), BigInt('0x100000000000000'), BigInt('0x10000000000000000')];\nexport var ENDIANNESS = function () {\n var a = new Uint16Array([0xFFCC]);\n var b = new Uint8Array(a.buffer, a.byteOffset, a.byteLength);\n if (b[0] === 0xFF) {\n return 'big';\n }\n if (b[0] === 0xCC) {\n return 'little';\n }\n return 'unknown';\n}();\nexport var IS_BIG_ENDIAN = ENDIANNESS === 'big';\nexport var IS_LITTLE_ENDIAN = ENDIANNESS === 'little';\nexport var bytesToNumber = function bytesToNumber(bytes, _temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$signed = _ref.signed,\n signed = _ref$signed === void 0 ? false : _ref$signed,\n _ref$le = _ref.le,\n le = _ref$le === void 0 ? false : _ref$le;\n bytes = toUint8(bytes);\n var fn = le ? 'reduce' : 'reduceRight';\n var obj = bytes[fn] ? bytes[fn] : Array.prototype[fn];\n var number = obj.call(bytes, function (total, _byte, i) {\n var exponent = le ? i : Math.abs(i + 1 - bytes.length);\n return total + BigInt(_byte) * BYTE_TABLE[exponent];\n }, BigInt(0));\n if (signed) {\n var max = BYTE_TABLE[bytes.length] / BigInt(2) - BigInt(1);\n number = BigInt(number);\n if (number > max) {\n number -= max;\n number -= max;\n number -= BigInt(2);\n }\n }\n return Number(number);\n};\nexport var numberToBytes = function numberToBytes(number, _temp2) {\n var _ref2 = _temp2 === void 0 ? {} : _temp2,\n _ref2$le = _ref2.le,\n le = _ref2$le === void 0 ? false : _ref2$le;\n\n // eslint-disable-next-line\n if (typeof number !== 'bigint' && typeof number !== 'number' || typeof number === 'number' && number !== number) {\n number = 0;\n }\n number = BigInt(number);\n var byteCount = countBytes(number);\n var bytes = new Uint8Array(new ArrayBuffer(byteCount));\n for (var i = 0; i < byteCount; i++) {\n var byteIndex = le ? i : Math.abs(i + 1 - bytes.length);\n bytes[byteIndex] = Number(number / BYTE_TABLE[i] & BigInt(0xFF));\n if (number < 0) {\n bytes[byteIndex] = Math.abs(~bytes[byteIndex]);\n bytes[byteIndex] -= i === 0 ? 1 : 2;\n }\n }\n return bytes;\n};\nexport var bytesToString = function bytesToString(bytes) {\n if (!bytes) {\n return '';\n } // TODO: should toUint8 handle cases where we only have 8 bytes\n // but report more since this is a Uint16+ Array?\n\n bytes = Array.prototype.slice.call(bytes);\n var string = String.fromCharCode.apply(null, toUint8(bytes));\n try {\n return decodeURIComponent(escape(string));\n } catch (e) {// if decodeURIComponent/escape fails, we are dealing with partial\n // or full non string data. Just return the potentially garbled string.\n }\n return string;\n};\nexport var stringToBytes = function stringToBytes(string, stringIsBytes) {\n if (typeof string !== 'string' && string && typeof string.toString === 'function') {\n string = string.toString();\n }\n if (typeof string !== 'string') {\n return new Uint8Array();\n } // If the string already is bytes, we don't have to do this\n // otherwise we do this so that we split multi length characters\n // into individual bytes\n\n if (!stringIsBytes) {\n string = unescape(encodeURIComponent(string));\n }\n var view = new Uint8Array(string.length);\n for (var i = 0; i < string.length; i++) {\n view[i] = string.charCodeAt(i);\n }\n return view;\n};\nexport var concatTypedArrays = function concatTypedArrays() {\n for (var _len = arguments.length, buffers = new Array(_len), _key = 0; _key < _len; _key++) {\n buffers[_key] = arguments[_key];\n }\n buffers = buffers.filter(function (b) {\n return b && (b.byteLength || b.length) && typeof b !== 'string';\n });\n if (buffers.length <= 1) {\n // for 0 length we will return empty uint8\n // for 1 length we return the first uint8\n return toUint8(buffers[0]);\n }\n var totalLen = buffers.reduce(function (total, buf, i) {\n return total + (buf.byteLength || buf.length);\n }, 0);\n var tempBuffer = new Uint8Array(totalLen);\n var offset = 0;\n buffers.forEach(function (buf) {\n buf = toUint8(buf);\n tempBuffer.set(buf, offset);\n offset += buf.byteLength;\n });\n return tempBuffer;\n};\n/**\n * Check if the bytes \"b\" are contained within bytes \"a\".\n *\n * @param {Uint8Array|Array} a\n * Bytes to check in\n *\n * @param {Uint8Array|Array} b\n * Bytes to check for\n *\n * @param {Object} options\n * options\n *\n * @param {Array|Uint8Array} [offset=0]\n * offset to use when looking at bytes in a\n *\n * @param {Array|Uint8Array} [mask=[]]\n * mask to use on bytes before comparison.\n *\n * @return {boolean}\n * If all bytes in b are inside of a, taking into account\n * bit masks.\n */\n\nexport var bytesMatch = function bytesMatch(a, b, _temp3) {\n var _ref3 = _temp3 === void 0 ? {} : _temp3,\n _ref3$offset = _ref3.offset,\n offset = _ref3$offset === void 0 ? 0 : _ref3$offset,\n _ref3$mask = _ref3.mask,\n mask = _ref3$mask === void 0 ? [] : _ref3$mask;\n a = toUint8(a);\n b = toUint8(b); // ie 11 does not support uint8 every\n\n var fn = b.every ? b.every : Array.prototype.every;\n return b.length && a.length - offset >= b.length &&\n // ie 11 doesn't support every on uin8\n fn.call(b, function (bByte, i) {\n var aByte = mask[i] ? mask[i] & a[offset + i] : a[offset + i];\n return bByte === aByte;\n });\n};\nexport var sliceBytes = function sliceBytes(src, start, end) {\n if (Uint8Array.prototype.slice) {\n return Uint8Array.prototype.slice.call(src, start, end);\n }\n return new Uint8Array(Array.prototype.slice.call(src, start, end));\n};\nexport var reverseBytes = function reverseBytes(src) {\n if (src.reverse) {\n return src.reverse();\n }\n return Array.prototype.reverse.call(src);\n};","var topLevel = typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : {};\nvar minDoc = require('min-document');\nvar doccy;\nif (typeof document !== 'undefined') {\n doccy = document;\n} else {\n doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'];\n if (!doccy) {\n doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc;\n }\n}\nmodule.exports = doccy;","'use strict';\n\nmodule.exports = require('./lib/React');","function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n// Source: http://jsfiddle.net/vWx8V/\n// http://stackoverflow.com/questions/5603195/full-list-of-javascript-keycodes\n\n/**\n * Conenience method returns corresponding value for given keyName or keyCode.\n *\n * @param {Mixed} keyCode {Number} or keyName {String}\n * @return {Mixed}\n * @api public\n */\n\nfunction keyCode(searchInput) {\n // Keyboard Events\n if (searchInput && 'object' === _typeof(searchInput)) {\n var hasKeyCode = searchInput.which || searchInput.keyCode || searchInput.charCode;\n if (hasKeyCode) searchInput = hasKeyCode;\n }\n\n // Numbers\n if ('number' === typeof searchInput) return names[searchInput];\n\n // Everything else (cast to string)\n var search = String(searchInput);\n\n // check codes\n var foundNamedKey = codes[search.toLowerCase()];\n if (foundNamedKey) return foundNamedKey;\n\n // check aliases\n var foundNamedKey = aliases[search.toLowerCase()];\n if (foundNamedKey) return foundNamedKey;\n\n // weird character?\n if (search.length === 1) return search.charCodeAt(0);\n return undefined;\n}\n\n/**\n * Compares a keyboard event with a given keyCode or keyName.\n *\n * @param {Event} event Keyboard event that should be tested\n * @param {Mixed} keyCode {Number} or keyName {String}\n * @return {Boolean}\n * @api public\n */\nkeyCode.isEventKey = function isEventKey(event, nameOrCode) {\n if (event && 'object' === _typeof(event)) {\n var keyCode = event.which || event.keyCode || event.charCode;\n if (keyCode === null || keyCode === undefined) {\n return false;\n }\n if (typeof nameOrCode === 'string') {\n // check codes\n var foundNamedKey = codes[nameOrCode.toLowerCase()];\n if (foundNamedKey) {\n return foundNamedKey === keyCode;\n }\n\n // check aliases\n var foundNamedKey = aliases[nameOrCode.toLowerCase()];\n if (foundNamedKey) {\n return foundNamedKey === keyCode;\n }\n } else if (typeof nameOrCode === 'number') {\n return nameOrCode === keyCode;\n }\n return false;\n }\n};\nexports = module.exports = keyCode;\n\n/**\n * Get by name\n *\n * exports.code['enter'] // => 13\n */\n\nvar codes = exports.code = exports.codes = {\n 'backspace': 8,\n 'tab': 9,\n 'enter': 13,\n 'shift': 16,\n 'ctrl': 17,\n 'alt': 18,\n 'pause/break': 19,\n 'caps lock': 20,\n 'esc': 27,\n 'space': 32,\n 'page up': 33,\n 'page down': 34,\n 'end': 35,\n 'home': 36,\n 'left': 37,\n 'up': 38,\n 'right': 39,\n 'down': 40,\n 'insert': 45,\n 'delete': 46,\n 'command': 91,\n 'left command': 91,\n 'right command': 93,\n 'numpad *': 106,\n 'numpad +': 107,\n 'numpad -': 109,\n 'numpad .': 110,\n 'numpad /': 111,\n 'num lock': 144,\n 'scroll lock': 145,\n 'my computer': 182,\n 'my calculator': 183,\n ';': 186,\n '=': 187,\n ',': 188,\n '-': 189,\n '.': 190,\n '/': 191,\n '`': 192,\n '[': 219,\n '\\\\': 220,\n ']': 221,\n \"'\": 222\n};\n\n// Helper aliases\n\nvar aliases = exports.aliases = {\n 'windows': 91,\n '⇧': 16,\n '⌥': 18,\n '⌃': 17,\n '⌘': 91,\n 'ctl': 17,\n 'control': 17,\n 'option': 18,\n 'pause': 19,\n 'break': 19,\n 'caps': 20,\n 'return': 13,\n 'escape': 27,\n 'spc': 32,\n 'spacebar': 32,\n 'pgup': 33,\n 'pgdn': 34,\n 'ins': 45,\n 'del': 46,\n 'cmd': 91\n};\n\n/*!\n * Programatically add the following\n */\n\n// lower case chars\nfor (i = 97; i < 123; i++) codes[String.fromCharCode(i)] = i - 32;\n\n// numbers\nfor (var i = 48; i < 58; i++) codes[i - 48] = i;\n\n// function keys\nfor (i = 1; i < 13; i++) codes['f' + i] = i + 111;\n\n// numpad keys\nfor (i = 0; i < 10; i++) codes['numpad ' + i] = i + 96;\n\n/**\n * Get by code\n *\n * exports.name[13] // => 'Enter'\n */\n\nvar names = exports.names = exports.title = {}; // title for backward compat\n\n// Create reverse mapping\nfor (i in codes) names[codes[i]] = i;\n\n// Add aliases\nfor (var alias in aliases) {\n codes[alias] = aliases[alias];\n}","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\nvar validateFormat = function validateFormat(format) {};\nif (process.env.NODE_ENV !== 'production') {\n validateFormat = function validateFormat(format) {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n };\n}\nfunction invariant(condition, format, a, b, c, d, e, f) {\n validateFormat(format);\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(format.replace(/%s/g, function () {\n return args[argIndex++];\n }));\n error.name = 'Invariant Violation';\n }\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n}\nmodule.exports = invariant;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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 */\n'use strict';\n\n/**\n * WARNING: DO NOT manually require this module.\n * This is a replacement for `invariant(...)` used by the error code system\n * and will _only_ be required by the corresponding babel pass.\n * It always throws.\n */\nfunction reactProdInvariant(code) {\n var argCount = arguments.length - 1;\n var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code;\n for (var argIdx = 0; argIdx < argCount; argIdx++) {\n message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]);\n }\n message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.';\n var error = new Error(message);\n error.name = 'Invariant Violation';\n error.framesToPop = 1; // we don't care about reactProdInvariant's own frame\n\n throw error;\n}\nmodule.exports = reactProdInvariant;","/**\n * Copyright (c) 2014-present, Facebook, Inc.\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\n'use strict';\n\nvar emptyFunction = require('./emptyFunction');\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = emptyFunction;\nif (process.env.NODE_ENV !== 'production') {\n var printWarning = function printWarning(format) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n warning = function warning(condition, format) {\n if (format === undefined) {\n throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n if (format.indexOf('Failed Composite propType: ') === 0) {\n return; // Ignore CompositeComponent proptype check.\n }\n if (!condition) {\n for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n args[_key2 - 2] = arguments[_key2];\n }\n printWarning.apply(undefined, [format].concat(args));\n }\n };\n}\nmodule.exports = warning;","import window from 'global/window';\nvar regexs = {\n // to determine mime types\n mp4: /^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,\n webm: /^(vp0?[89]|av0?1|opus|vorbis)/,\n ogg: /^(vp0?[89]|theora|flac|opus|vorbis)/,\n // to determine if a codec is audio or video\n video: /^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,\n audio: /^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,\n text: /^(stpp.ttml.im1t)/,\n // mux.js support regex\n muxerVideo: /^(avc0?1)/,\n muxerAudio: /^(mp4a)/,\n // match nothing as muxer does not support text right now.\n // there cannot never be a character before the start of a string\n // so this matches nothing.\n muxerText: /a^/\n};\nvar mediaTypes = ['video', 'audio', 'text'];\nvar upperMediaTypes = ['Video', 'Audio', 'Text'];\n/**\n * Replace the old apple-style `avc1.
.
` codec string with the standard\n * `avc1.`\n *\n * @param {string} codec\n * Codec string to translate\n * @return {string}\n * The translated codec string\n */\n\nexport var translateLegacyCodec = function translateLegacyCodec(codec) {\n if (!codec) {\n return codec;\n }\n return codec.replace(/avc1\\.(\\d+)\\.(\\d+)/i, function (orig, profile, avcLevel) {\n var profileHex = ('00' + Number(profile).toString(16)).slice(-2);\n var avcLevelHex = ('00' + Number(avcLevel).toString(16)).slice(-2);\n return 'avc1.' + profileHex + '00' + avcLevelHex;\n });\n};\n/**\n * Replace the old apple-style `avc1.
.
` codec strings with the standard\n * `avc1.`\n *\n * @param {string[]} codecs\n * An array of codec strings to translate\n * @return {string[]}\n * The translated array of codec strings\n */\n\nexport var translateLegacyCodecs = function translateLegacyCodecs(codecs) {\n return codecs.map(translateLegacyCodec);\n};\n/**\n * Replace codecs in the codec string with the old apple-style `avc1.
.
` to the\n * standard `avc1.`.\n *\n * @param {string} codecString\n * The codec string\n * @return {string}\n * The codec string with old apple-style codecs replaced\n *\n * @private\n */\n\nexport var mapLegacyAvcCodecs = function mapLegacyAvcCodecs(codecString) {\n return codecString.replace(/avc1\\.(\\d+)\\.(\\d+)/i, function (match) {\n return translateLegacyCodecs([match])[0];\n });\n};\n/**\n * @typedef {Object} ParsedCodecInfo\n * @property {number} codecCount\n * Number of codecs parsed\n * @property {string} [videoCodec]\n * Parsed video codec (if found)\n * @property {string} [videoObjectTypeIndicator]\n * Video object type indicator (if found)\n * @property {string|null} audioProfile\n * Audio profile\n */\n\n/**\n * Parses a codec string to retrieve the number of codecs specified, the video codec and\n * object type indicator, and the audio profile.\n *\n * @param {string} [codecString]\n * The codec string to parse\n * @return {ParsedCodecInfo}\n * Parsed codec info\n */\n\nexport var parseCodecs = function parseCodecs(codecString) {\n if (codecString === void 0) {\n codecString = '';\n }\n var codecs = codecString.split(',');\n var result = [];\n codecs.forEach(function (codec) {\n codec = codec.trim();\n var codecType;\n mediaTypes.forEach(function (name) {\n var match = regexs[name].exec(codec.toLowerCase());\n if (!match || match.length <= 1) {\n return;\n }\n codecType = name; // maintain codec case\n\n var type = codec.substring(0, match[1].length);\n var details = codec.replace(type, '');\n result.push({\n type: type,\n details: details,\n mediaType: name\n });\n });\n if (!codecType) {\n result.push({\n type: codec,\n details: '',\n mediaType: 'unknown'\n });\n }\n });\n return result;\n};\n/**\n * Returns a ParsedCodecInfo object for the default alternate audio playlist if there is\n * a default alternate audio playlist for the provided audio group.\n *\n * @param {Object} master\n * The master playlist\n * @param {string} audioGroupId\n * ID of the audio group for which to find the default codec info\n * @return {ParsedCodecInfo}\n * Parsed codec info\n */\n\nexport var codecsFromDefault = function codecsFromDefault(master, audioGroupId) {\n if (!master.mediaGroups.AUDIO || !audioGroupId) {\n return null;\n }\n var audioGroup = master.mediaGroups.AUDIO[audioGroupId];\n if (!audioGroup) {\n return null;\n }\n for (var name in audioGroup) {\n var audioType = audioGroup[name];\n if (audioType[\"default\"] && audioType.playlists) {\n // codec should be the same for all playlists within the audio type\n return parseCodecs(audioType.playlists[0].attributes.CODECS);\n }\n }\n return null;\n};\nexport var isVideoCodec = function isVideoCodec(codec) {\n if (codec === void 0) {\n codec = '';\n }\n return regexs.video.test(codec.trim().toLowerCase());\n};\nexport var isAudioCodec = function isAudioCodec(codec) {\n if (codec === void 0) {\n codec = '';\n }\n return regexs.audio.test(codec.trim().toLowerCase());\n};\nexport var isTextCodec = function isTextCodec(codec) {\n if (codec === void 0) {\n codec = '';\n }\n return regexs.text.test(codec.trim().toLowerCase());\n};\nexport var getMimeForCodec = function getMimeForCodec(codecString) {\n if (!codecString || typeof codecString !== 'string') {\n return;\n }\n var codecs = codecString.toLowerCase().split(',').map(function (c) {\n return translateLegacyCodec(c.trim());\n }); // default to video type\n\n var type = 'video'; // only change to audio type if the only codec we have is\n // audio\n\n if (codecs.length === 1 && isAudioCodec(codecs[0])) {\n type = 'audio';\n } else if (codecs.length === 1 && isTextCodec(codecs[0])) {\n // text uses application/ for now\n type = 'application';\n } // default the container to mp4\n\n var container = 'mp4'; // every codec must be able to go into the container\n // for that container to be the correct one\n\n if (codecs.every(function (c) {\n return regexs.mp4.test(c);\n })) {\n container = 'mp4';\n } else if (codecs.every(function (c) {\n return regexs.webm.test(c);\n })) {\n container = 'webm';\n } else if (codecs.every(function (c) {\n return regexs.ogg.test(c);\n })) {\n container = 'ogg';\n }\n return type + \"/\" + container + \";codecs=\\\"\" + codecString + \"\\\"\";\n};\nexport var browserSupportsCodec = function browserSupportsCodec(codecString) {\n if (codecString === void 0) {\n codecString = '';\n }\n return window.MediaSource && window.MediaSource.isTypeSupported && window.MediaSource.isTypeSupported(getMimeForCodec(codecString)) || false;\n};\nexport var muxerSupportsCodec = function muxerSupportsCodec(codecString) {\n if (codecString === void 0) {\n codecString = '';\n }\n return codecString.toLowerCase().split(',').every(function (codec) {\n codec = codec.trim(); // any match is supported.\n\n for (var i = 0; i < upperMediaTypes.length; i++) {\n var type = upperMediaTypes[i];\n if (regexs[\"muxer\" + type].test(codec)) {\n return true;\n }\n }\n return false;\n });\n};\nexport var DEFAULT_AUDIO_CODEC = 'mp4a.40.2';\nexport var DEFAULT_VIDEO_CODEC = 'avc1.4d400d';","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\nfunction toObject(val) {\n if (val === null || val === undefined) {\n throw new TypeError('Object.assign cannot be called with null or undefined');\n }\n return Object(val);\n}\nfunction shouldUseNative() {\n try {\n if (!Object.assign) {\n return false;\n }\n\n // Detect buggy property enumeration order in older V8 versions.\n\n // https://bugs.chromium.org/p/v8/issues/detail?id=4118\n var test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n test1[5] = 'de';\n if (Object.getOwnPropertyNames(test1)[0] === '5') {\n return false;\n }\n\n // https://bugs.chromium.org/p/v8/issues/detail?id=3056\n var test2 = {};\n for (var i = 0; i < 10; i++) {\n test2['_' + String.fromCharCode(i)] = i;\n }\n var order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n return test2[n];\n });\n if (order2.join('') !== '0123456789') {\n return false;\n }\n\n // https://bugs.chromium.org/p/v8/issues/detail?id=3056\n var test3 = {};\n 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n test3[letter] = letter;\n });\n if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') {\n return false;\n }\n return true;\n } catch (err) {\n // We don't expect any of the above to throw, but better to be safe.\n return false;\n }\n}\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n var from;\n var to = toObject(target);\n var symbols;\n for (var s = 1; s < arguments.length; s++) {\n from = Object(arguments[s]);\n for (var key in from) {\n if (hasOwnProperty.call(from, key)) {\n to[key] = from[key];\n }\n }\n if (getOwnPropertySymbols) {\n symbols = getOwnPropertySymbols(from);\n for (var i = 0; i < symbols.length; i++) {\n if (propIsEnumerable.call(from, symbols[i])) {\n to[symbols[i]] = from[symbols[i]];\n }\n }\n }\n }\n return to;\n};","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\nvar DOMProperty = require('./DOMProperty');\nvar ReactDOMComponentFlags = require('./ReactDOMComponentFlags');\nvar invariant = require('fbjs/lib/invariant');\nvar ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME;\nvar Flags = ReactDOMComponentFlags;\nvar internalInstanceKey = '__reactInternalInstance$' + Math.random().toString(36).slice(2);\n\n/**\n * Check if a given node should be cached.\n */\nfunction shouldPrecacheNode(node, nodeID) {\n return node.nodeType === 1 && node.getAttribute(ATTR_NAME) === String(nodeID) || node.nodeType === 8 && node.nodeValue === ' react-text: ' + nodeID + ' ' || node.nodeType === 8 && node.nodeValue === ' react-empty: ' + nodeID + ' ';\n}\n\n/**\n * Drill down (through composites and empty components) until we get a host or\n * host text component.\n *\n * This is pretty polymorphic but unavoidable with the current structure we have\n * for `_renderedChildren`.\n */\nfunction getRenderedHostOrTextFromComponent(component) {\n var rendered;\n while (rendered = component._renderedComponent) {\n component = rendered;\n }\n return component;\n}\n\n/**\n * Populate `_hostNode` on the rendered host/text component with the given\n * DOM node. The passed `inst` can be a composite.\n */\nfunction precacheNode(inst, node) {\n var hostInst = getRenderedHostOrTextFromComponent(inst);\n hostInst._hostNode = node;\n node[internalInstanceKey] = hostInst;\n}\nfunction uncacheNode(inst) {\n var node = inst._hostNode;\n if (node) {\n delete node[internalInstanceKey];\n inst._hostNode = null;\n }\n}\n\n/**\n * Populate `_hostNode` on each child of `inst`, assuming that the children\n * match up with the DOM (element) children of `node`.\n *\n * We cache entire levels at once to avoid an n^2 problem where we access the\n * children of a node sequentially and have to walk from the start to our target\n * node every time.\n *\n * Since we update `_renderedChildren` and the actual DOM at (slightly)\n * different times, we could race here and see a newer `_renderedChildren` than\n * the DOM nodes we see. To avoid this, ReactMultiChild calls\n * `prepareToManageChildren` before we change `_renderedChildren`, at which\n * time the container's child nodes are always cached (until it unmounts).\n */\nfunction precacheChildNodes(inst, node) {\n if (inst._flags & Flags.hasCachedChildNodes) {\n return;\n }\n var children = inst._renderedChildren;\n var childNode = node.firstChild;\n outer: for (var name in children) {\n if (!children.hasOwnProperty(name)) {\n continue;\n }\n var childInst = children[name];\n var childID = getRenderedHostOrTextFromComponent(childInst)._domID;\n if (childID === 0) {\n // We're currently unmounting this child in ReactMultiChild; skip it.\n continue;\n }\n // We assume the child nodes are in the same order as the child instances.\n for (; childNode !== null; childNode = childNode.nextSibling) {\n if (shouldPrecacheNode(childNode, childID)) {\n precacheNode(childInst, childNode);\n continue outer;\n }\n }\n // We reached the end of the DOM children without finding an ID match.\n !false ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Unable to find element with ID %s.', childID) : _prodInvariant('32', childID) : void 0;\n }\n inst._flags |= Flags.hasCachedChildNodes;\n}\n\n/**\n * Given a DOM node, return the closest ReactDOMComponent or\n * ReactDOMTextComponent instance ancestor.\n */\nfunction getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n // Walk up the tree until we find an ancestor whose instance we have cached.\n var parents = [];\n while (!node[internalInstanceKey]) {\n parents.push(node);\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n var closest;\n var inst;\n for (; node && (inst = node[internalInstanceKey]); node = parents.pop()) {\n closest = inst;\n if (parents.length) {\n precacheChildNodes(inst, node);\n }\n }\n return closest;\n}\n\n/**\n * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent\n * instance, or null if the node was not rendered by this React.\n */\nfunction getInstanceFromNode(node) {\n var inst = getClosestInstanceFromNode(node);\n if (inst != null && inst._hostNode === node) {\n return inst;\n } else {\n return null;\n }\n}\n\n/**\n * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding\n * DOM node.\n */\nfunction getNodeFromInstance(inst) {\n // Without this first invariant, passing a non-DOM-component triggers the next\n // invariant for a missing parent, which is super confusing.\n !(inst._hostNode !== undefined) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0;\n if (inst._hostNode) {\n return inst._hostNode;\n }\n\n // Walk up the tree until we find an ancestor whose DOM node we have cached.\n var parents = [];\n while (!inst._hostNode) {\n parents.push(inst);\n !inst._hostParent ? process.env.NODE_ENV !== 'production' ? invariant(false, 'React DOM tree root should always have a node reference.') : _prodInvariant('34') : void 0;\n inst = inst._hostParent;\n }\n\n // Now parents contains each ancestor that does *not* have a cached native\n // node, and `inst` is the deepest ancestor that does.\n for (; parents.length; inst = parents.pop()) {\n precacheChildNodes(inst, inst._hostNode);\n }\n return inst._hostNode;\n}\nvar ReactDOMComponentTree = {\n getClosestInstanceFromNode: getClosestInstanceFromNode,\n getInstanceFromNode: getInstanceFromNode,\n getNodeFromInstance: getNodeFromInstance,\n precacheChildNodes: precacheChildNodes,\n precacheNode: precacheNode,\n uncacheNode: uncacheNode\n};\nmodule.exports = ReactDOMComponentTree;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\n/**\n * Simple, lightweight module assisting with the detection and context of\n * Worker. Helps avoid circular dependencies and allows code to reason about\n * whether or not they are in a Worker, even if they never include the main\n * `ReactWorker` dependency.\n */\nvar ExecutionEnvironment = {\n canUseDOM: canUseDOM,\n canUseWorkers: typeof Worker !== 'undefined',\n canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent),\n canUseViewport: canUseDOM && !!window.screen,\n isInWorker: !canUseDOM // For now, this is true - might change in the future.\n};\nmodule.exports = ExecutionEnvironment;","'use strict';\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nvar bind = require('./helpers/bind');\nvar isBuffer = require('is-buffer');\n\n/*global toString:true*/\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return typeof FormData !== 'undefined' && val instanceof FormData;\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {\n result = ArrayBuffer.isView(val);\n } else {\n result = val && val.buffer && val.buffer instanceof ArrayBuffer;\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && _typeof(val) === 'object';\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {\n return false;\n }\n return typeof window !== 'undefined' && typeof document !== 'undefined';\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (_typeof(obj) !== 'object' && !isArray(obj)) {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge( /* obj1, obj2, obj3, ... */\n) {\n var result = {};\n function assignValue(val, key) {\n if (_typeof(result[key]) === 'object' && _typeof(val) === 'object') {\n result[key] = merge(result[key], val);\n } else {\n result[key] = val;\n }\n }\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim\n};","/**\n * Copyright (c) 2016-present, Facebook, Inc.\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 */\n\n'use strict';\n\n// Trust the developer to only use ReactInstrumentation with a __DEV__ check\nvar debugTool = null;\nif (process.env.NODE_ENV !== 'production') {\n var ReactDebugTool = require('./ReactDebugTool');\n debugTool = ReactDebugTool;\n}\nmodule.exports = {\n debugTool: debugTool\n};","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant'),\n _assign = require('object-assign');\nvar CallbackQueue = require('./CallbackQueue');\nvar PooledClass = require('./PooledClass');\nvar ReactFeatureFlags = require('./ReactFeatureFlags');\nvar ReactReconciler = require('./ReactReconciler');\nvar Transaction = require('./Transaction');\nvar invariant = require('fbjs/lib/invariant');\nvar dirtyComponents = [];\nvar updateBatchNumber = 0;\nvar asapCallbackQueue = CallbackQueue.getPooled();\nvar asapEnqueued = false;\nvar batchingStrategy = null;\nfunction ensureInjected() {\n !(ReactUpdates.ReactReconcileTransaction && batchingStrategy) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must inject a reconcile transaction class and batching strategy') : _prodInvariant('123') : void 0;\n}\nvar NESTED_UPDATES = {\n initialize: function initialize() {\n this.dirtyComponentsLength = dirtyComponents.length;\n },\n close: function close() {\n if (this.dirtyComponentsLength !== dirtyComponents.length) {\n // Additional updates were enqueued by componentDidUpdate handlers or\n // similar; before our own UPDATE_QUEUEING wrapper closes, we want to run\n // these new updates so that if A's componentDidUpdate calls setState on\n // B, B will update before the callback A's updater provided when calling\n // setState.\n dirtyComponents.splice(0, this.dirtyComponentsLength);\n flushBatchedUpdates();\n } else {\n dirtyComponents.length = 0;\n }\n }\n};\nvar UPDATE_QUEUEING = {\n initialize: function initialize() {\n this.callbackQueue.reset();\n },\n close: function close() {\n this.callbackQueue.notifyAll();\n }\n};\nvar TRANSACTION_WRAPPERS = [NESTED_UPDATES, UPDATE_QUEUEING];\nfunction ReactUpdatesFlushTransaction() {\n this.reinitializeTransaction();\n this.dirtyComponentsLength = null;\n this.callbackQueue = CallbackQueue.getPooled();\n this.reconcileTransaction = ReactUpdates.ReactReconcileTransaction.getPooled( /* useCreateElement */true);\n}\n_assign(ReactUpdatesFlushTransaction.prototype, Transaction, {\n getTransactionWrappers: function getTransactionWrappers() {\n return TRANSACTION_WRAPPERS;\n },\n destructor: function destructor() {\n this.dirtyComponentsLength = null;\n CallbackQueue.release(this.callbackQueue);\n this.callbackQueue = null;\n ReactUpdates.ReactReconcileTransaction.release(this.reconcileTransaction);\n this.reconcileTransaction = null;\n },\n perform: function perform(method, scope, a) {\n // Essentially calls `this.reconcileTransaction.perform(method, scope, a)`\n // with this transaction's wrappers around it.\n return Transaction.perform.call(this, this.reconcileTransaction.perform, this.reconcileTransaction, method, scope, a);\n }\n});\nPooledClass.addPoolingTo(ReactUpdatesFlushTransaction);\nfunction batchedUpdates(callback, a, b, c, d, e) {\n ensureInjected();\n return batchingStrategy.batchedUpdates(callback, a, b, c, d, e);\n}\n\n/**\n * Array comparator for ReactComponents by mount ordering.\n *\n * @param {ReactComponent} c1 first component you're comparing\n * @param {ReactComponent} c2 second component you're comparing\n * @return {number} Return value usable by Array.prototype.sort().\n */\nfunction mountOrderComparator(c1, c2) {\n return c1._mountOrder - c2._mountOrder;\n}\nfunction runBatchedUpdates(transaction) {\n var len = transaction.dirtyComponentsLength;\n !(len === dirtyComponents.length) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected flush transaction\\'s stored dirty-components length (%s) to match dirty-components array length (%s).', len, dirtyComponents.length) : _prodInvariant('124', len, dirtyComponents.length) : void 0;\n\n // Since reconciling a component higher in the owner hierarchy usually (not\n // always -- see shouldComponentUpdate()) will reconcile children, reconcile\n // them before their children by sorting the array.\n dirtyComponents.sort(mountOrderComparator);\n\n // Any updates enqueued while reconciling must be performed after this entire\n // batch. Otherwise, if dirtyComponents is [A, B] where A has children B and\n // C, B could update twice in a single batch if C's render enqueues an update\n // to B (since B would have already updated, we should skip it, and the only\n // way we can know to do so is by checking the batch counter).\n updateBatchNumber++;\n for (var i = 0; i < len; i++) {\n // If a component is unmounted before pending changes apply, it will still\n // be here, but we assume that it has cleared its _pendingCallbacks and\n // that performUpdateIfNecessary is a noop.\n var component = dirtyComponents[i];\n\n // If performUpdateIfNecessary happens to enqueue any new updates, we\n // shouldn't execute the callbacks until the next render happens, so\n // stash the callbacks first\n var callbacks = component._pendingCallbacks;\n component._pendingCallbacks = null;\n var markerName;\n if (ReactFeatureFlags.logTopLevelRenders) {\n var namedComponent = component;\n // Duck type TopLevelWrapper. This is probably always true.\n if (component._currentElement.type.isReactTopLevelWrapper) {\n namedComponent = component._renderedComponent;\n }\n markerName = 'React update: ' + namedComponent.getName();\n console.time(markerName);\n }\n ReactReconciler.performUpdateIfNecessary(component, transaction.reconcileTransaction, updateBatchNumber);\n if (markerName) {\n console.timeEnd(markerName);\n }\n if (callbacks) {\n for (var j = 0; j < callbacks.length; j++) {\n transaction.callbackQueue.enqueue(callbacks[j], component.getPublicInstance());\n }\n }\n }\n}\nvar flushBatchedUpdates = function flushBatchedUpdates() {\n // ReactUpdatesFlushTransaction's wrappers will clear the dirtyComponents\n // array and perform any updates enqueued by mount-ready handlers (i.e.,\n // componentDidUpdate) but we need to check here too in order to catch\n // updates enqueued by setState callbacks and asap calls.\n while (dirtyComponents.length || asapEnqueued) {\n if (dirtyComponents.length) {\n var transaction = ReactUpdatesFlushTransaction.getPooled();\n transaction.perform(runBatchedUpdates, null, transaction);\n ReactUpdatesFlushTransaction.release(transaction);\n }\n if (asapEnqueued) {\n asapEnqueued = false;\n var queue = asapCallbackQueue;\n asapCallbackQueue = CallbackQueue.getPooled();\n queue.notifyAll();\n CallbackQueue.release(queue);\n }\n }\n};\n\n/**\n * Mark a component as needing a rerender, adding an optional callback to a\n * list of functions which will be executed once the rerender occurs.\n */\nfunction enqueueUpdate(component) {\n ensureInjected();\n\n // Various parts of our code (such as ReactCompositeComponent's\n // _renderValidatedComponent) assume that calls to render aren't nested;\n // verify that that's the case. (This is called by each top-level update\n // function, like setState, forceUpdate, etc.; creation and\n // destruction of top-level components is guarded in ReactMount.)\n\n if (!batchingStrategy.isBatchingUpdates) {\n batchingStrategy.batchedUpdates(enqueueUpdate, component);\n return;\n }\n dirtyComponents.push(component);\n if (component._updateBatchNumber == null) {\n component._updateBatchNumber = updateBatchNumber + 1;\n }\n}\n\n/**\n * Enqueue a callback to be run at the end of the current batching cycle. Throws\n * if no updates are currently being performed.\n */\nfunction asap(callback, context) {\n invariant(batchingStrategy.isBatchingUpdates, \"ReactUpdates.asap: Can't enqueue an asap callback in a context where\" + 'updates are not being batched.');\n asapCallbackQueue.enqueue(callback, context);\n asapEnqueued = true;\n}\nvar ReactUpdatesInjection = {\n injectReconcileTransaction: function injectReconcileTransaction(ReconcileTransaction) {\n !ReconcileTransaction ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a reconcile transaction class') : _prodInvariant('126') : void 0;\n ReactUpdates.ReactReconcileTransaction = ReconcileTransaction;\n },\n injectBatchingStrategy: function injectBatchingStrategy(_batchingStrategy) {\n !_batchingStrategy ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a batching strategy') : _prodInvariant('127') : void 0;\n !(typeof _batchingStrategy.batchedUpdates === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a batchedUpdates() function') : _prodInvariant('128') : void 0;\n !(typeof _batchingStrategy.isBatchingUpdates === 'boolean') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide an isBatchingUpdates boolean attribute') : _prodInvariant('129') : void 0;\n batchingStrategy = _batchingStrategy;\n }\n};\nvar ReactUpdates = {\n /**\n * React references `ReactReconcileTransaction` using this property in order\n * to allow dependency injection.\n *\n * @internal\n */\n ReactReconcileTransaction: null,\n batchedUpdates: batchedUpdates,\n enqueueUpdate: enqueueUpdate,\n flushBatchedUpdates: flushBatchedUpdates,\n injection: ReactUpdatesInjection,\n asap: asap\n};\nmodule.exports = ReactUpdates;","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\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 */\nfunction makeEmptyFunction(arg) {\n return function () {\n return arg;\n };\n}\n\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\nvar emptyFunction = function emptyFunction() {};\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\nemptyFunction.thatReturnsThis = function () {\n return this;\n};\nemptyFunction.thatReturnsArgument = function (arg) {\n return arg;\n};\nmodule.exports = emptyFunction;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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 */\n\n'use strict';\n\n/**\n * Keeps track of the current owner.\n *\n * The current owner is the component who should own any components that are\n * currently being constructed.\n */\nvar ReactCurrentOwner = {\n /**\n * @internal\n * @type {ReactComponent}\n */\n current: null\n};\nmodule.exports = ReactCurrentOwner;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar _assign = require('object-assign');\nvar PooledClass = require('./PooledClass');\nvar emptyFunction = require('fbjs/lib/emptyFunction');\nvar warning = require('fbjs/lib/warning');\nvar didWarnForAddedNewProperty = false;\nvar isProxySupported = typeof Proxy === 'function';\nvar shouldBeReleasedProperties = ['dispatchConfig', '_targetInst', 'nativeEvent', 'isDefaultPrevented', 'isPropagationStopped', '_dispatchListeners', '_dispatchInstances'];\n\n/**\n * @interface Event\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\nvar EventInterface = {\n type: null,\n target: null,\n // currentTarget is set when dispatching; no use in copying it here\n currentTarget: emptyFunction.thatReturnsNull,\n eventPhase: null,\n bubbles: null,\n cancelable: null,\n timeStamp: function timeStamp(event) {\n return event.timeStamp || Date.now();\n },\n defaultPrevented: null,\n isTrusted: null\n};\n\n/**\n * Synthetic events are dispatched by event plugins, typically in response to a\n * top-level event delegation handler.\n *\n * These systems should generally use pooling to reduce the frequency of garbage\n * collection. The system should check `isPersistent` to determine whether the\n * event should be released into the pool after being dispatched. Users that\n * need a persisted event should invoke `persist`.\n *\n * Synthetic events (and subclasses) implement the DOM Level 3 Events API by\n * normalizing browser quirks. Subclasses do not necessarily have to implement a\n * DOM interface; custom application-specific events can also subclass this.\n *\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {*} targetInst Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @param {DOMEventTarget} nativeEventTarget Target node.\n */\nfunction SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) {\n if (process.env.NODE_ENV !== 'production') {\n // these have a getter/setter for warnings\n delete this.nativeEvent;\n delete this.preventDefault;\n delete this.stopPropagation;\n }\n this.dispatchConfig = dispatchConfig;\n this._targetInst = targetInst;\n this.nativeEvent = nativeEvent;\n var Interface = this.constructor.Interface;\n for (var propName in Interface) {\n if (!Interface.hasOwnProperty(propName)) {\n continue;\n }\n if (process.env.NODE_ENV !== 'production') {\n delete this[propName]; // this has a getter/setter for warnings\n }\n var normalize = Interface[propName];\n if (normalize) {\n this[propName] = normalize(nativeEvent);\n } else {\n if (propName === 'target') {\n this.target = nativeEventTarget;\n } else {\n this[propName] = nativeEvent[propName];\n }\n }\n }\n var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;\n if (defaultPrevented) {\n this.isDefaultPrevented = emptyFunction.thatReturnsTrue;\n } else {\n this.isDefaultPrevented = emptyFunction.thatReturnsFalse;\n }\n this.isPropagationStopped = emptyFunction.thatReturnsFalse;\n return this;\n}\n_assign(SyntheticEvent.prototype, {\n preventDefault: function preventDefault() {\n this.defaultPrevented = true;\n var event = this.nativeEvent;\n if (!event) {\n return;\n }\n if (event.preventDefault) {\n event.preventDefault();\n // eslint-disable-next-line valid-typeof\n } else if (typeof event.returnValue !== 'unknown') {\n event.returnValue = false;\n }\n this.isDefaultPrevented = emptyFunction.thatReturnsTrue;\n },\n stopPropagation: function stopPropagation() {\n var event = this.nativeEvent;\n if (!event) {\n return;\n }\n if (event.stopPropagation) {\n event.stopPropagation();\n // eslint-disable-next-line valid-typeof\n } else if (typeof event.cancelBubble !== 'unknown') {\n // The ChangeEventPlugin registers a \"propertychange\" event for\n // IE. This event does not support bubbling or cancelling, and\n // any references to cancelBubble throw \"Member not found\". A\n // typeof check of \"unknown\" circumvents this issue (and is also\n // IE specific).\n event.cancelBubble = true;\n }\n this.isPropagationStopped = emptyFunction.thatReturnsTrue;\n },\n /**\n * We release all dispatched `SyntheticEvent`s after each event loop, adding\n * them back into the pool. This allows a way to hold onto a reference that\n * won't be added back into the pool.\n */\n persist: function persist() {\n this.isPersistent = emptyFunction.thatReturnsTrue;\n },\n /**\n * Checks if this event should be released back into the pool.\n *\n * @return {boolean} True if this should not be released, false otherwise.\n */\n isPersistent: emptyFunction.thatReturnsFalse,\n /**\n * `PooledClass` looks for `destructor` on each instance it releases.\n */\n destructor: function destructor() {\n var Interface = this.constructor.Interface;\n for (var propName in Interface) {\n if (process.env.NODE_ENV !== 'production') {\n Object.defineProperty(this, propName, getPooledWarningPropertyDefinition(propName, Interface[propName]));\n } else {\n this[propName] = null;\n }\n }\n for (var i = 0; i < shouldBeReleasedProperties.length; i++) {\n this[shouldBeReleasedProperties[i]] = null;\n }\n if (process.env.NODE_ENV !== 'production') {\n Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null));\n Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', emptyFunction));\n Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', emptyFunction));\n }\n }\n});\nSyntheticEvent.Interface = EventInterface;\n\n/**\n * Helper to reduce boilerplate when creating subclasses.\n *\n * @param {function} Class\n * @param {?object} Interface\n */\nSyntheticEvent.augmentClass = function (Class, Interface) {\n var Super = this;\n var E = function E() {};\n E.prototype = Super.prototype;\n var prototype = new E();\n _assign(prototype, Class.prototype);\n Class.prototype = prototype;\n Class.prototype.constructor = Class;\n Class.Interface = _assign({}, Super.Interface, Interface);\n Class.augmentClass = Super.augmentClass;\n PooledClass.addPoolingTo(Class, PooledClass.fourArgumentPooler);\n};\n\n/** Proxying after everything set on SyntheticEvent\n * to resolve Proxy issue on some WebKit browsers\n * in which some Event properties are set to undefined (GH#10010)\n */\nif (process.env.NODE_ENV !== 'production') {\n if (isProxySupported) {\n /*eslint-disable no-func-assign */\n SyntheticEvent = new Proxy(SyntheticEvent, {\n construct: function construct(target, args) {\n return this.apply(target, Object.create(target.prototype), args);\n },\n apply: function apply(constructor, that, args) {\n return new Proxy(constructor.apply(that, args), {\n set: function set(target, prop, value) {\n if (prop !== 'isPersistent' && !target.constructor.Interface.hasOwnProperty(prop) && shouldBeReleasedProperties.indexOf(prop) === -1) {\n process.env.NODE_ENV !== 'production' ? warning(didWarnForAddedNewProperty || target.isPersistent(), \"This synthetic event is reused for performance reasons. If you're \" + \"seeing this, you're adding a new property in the synthetic event object. \" + 'The property is never released. See ' + 'https://fb.me/react-event-pooling for more information.') : void 0;\n didWarnForAddedNewProperty = true;\n }\n target[prop] = value;\n return true;\n }\n });\n }\n });\n /*eslint-enable no-func-assign */\n }\n}\nPooledClass.addPoolingTo(SyntheticEvent, PooledClass.fourArgumentPooler);\nmodule.exports = SyntheticEvent;\n\n/**\n * Helper to nullify syntheticEvent instance properties when destructing\n *\n * @param {object} SyntheticEvent\n * @param {String} propName\n * @return {object} defineProperty object\n */\nfunction getPooledWarningPropertyDefinition(propName, getVal) {\n var isFunction = typeof getVal === 'function';\n return {\n configurable: true,\n set: set,\n get: get\n };\n function set(val) {\n var action = isFunction ? 'setting the method' : 'setting the property';\n warn(action, 'This is effectively a no-op');\n return val;\n }\n function get() {\n var action = isFunction ? 'accessing the method' : 'accessing the property';\n var result = isFunction ? 'This is a no-op function' : 'This is set to null';\n warn(action, result);\n return getVal;\n }\n function warn(action, result) {\n var warningCondition = false;\n process.env.NODE_ENV !== 'production' ? warning(warningCondition, \"This synthetic event is reused for performance reasons. If you're seeing this, \" + \"you're %s `%s` on a released/nullified synthetic event. %s. \" + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result) : void 0;\n }\n}","function _extends() {\n module.exports = _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n return _extends.apply(this, arguments);\n}\nmodule.exports = _extends, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","module.exports = require('./lib/axios');","import URLToolkit from 'url-toolkit';\nimport window from 'global/window';\nvar DEFAULT_LOCATION = 'http://example.com';\nvar resolveUrl = function resolveUrl(baseUrl, relativeUrl) {\n // return early if we don't need to resolve\n if (/^[a-z]+:/i.test(relativeUrl)) {\n return relativeUrl;\n } // if baseUrl is a data URI, ignore it and resolve everything relative to window.location\n\n if (/^data:/.test(baseUrl)) {\n baseUrl = window.location && window.location.href || '';\n } // IE11 supports URL but not the URL constructor\n // feature detect the behavior we want\n\n var nativeURL = typeof window.URL === 'function';\n var protocolLess = /^\\/\\//.test(baseUrl); // remove location if window.location isn't available (i.e. we're in node)\n // and if baseUrl isn't an absolute url\n\n var removeLocation = !window.location && !/\\/\\//i.test(baseUrl); // if the base URL is relative then combine with the current location\n\n if (nativeURL) {\n baseUrl = new window.URL(baseUrl, window.location || DEFAULT_LOCATION);\n } else if (!/\\/\\//i.test(baseUrl)) {\n baseUrl = URLToolkit.buildAbsoluteURL(window.location && window.location.href || '', baseUrl);\n }\n if (nativeURL) {\n var newUrl = new URL(relativeUrl, baseUrl); // if we're a protocol-less url, remove the protocol\n // and if we're location-less, remove the location\n // otherwise, return the url unmodified\n\n if (removeLocation) {\n return newUrl.href.slice(DEFAULT_LOCATION.length);\n } else if (protocolLess) {\n return newUrl.href.slice(newUrl.protocol.length);\n }\n return newUrl.href;\n }\n return URLToolkit.buildAbsoluteURL(baseUrl, relativeUrl);\n};\nexport default resolveUrl;","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _iterableToArrayLimit(r, l) { var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : String(i); }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n/*! @name mpd-parser @version 1.3.0 @license Apache-2.0 */\nimport resolveUrl from '@videojs/vhs-utils/es/resolve-url';\nimport window from 'global/window';\nimport { forEachMediaGroup } from '@videojs/vhs-utils/es/media-groups';\nimport decodeB64ToUint8Array from '@videojs/vhs-utils/es/decode-b64-to-uint8-array';\nimport { DOMParser } from '@xmldom/xmldom';\nvar version = \"1.3.0\";\nvar isObject = function isObject(obj) {\n return !!obj && _typeof(obj) === 'object';\n};\nvar merge = function merge() {\n for (var _len = arguments.length, objects = new Array(_len), _key = 0; _key < _len; _key++) {\n objects[_key] = arguments[_key];\n }\n return objects.reduce(function (result, source) {\n if (_typeof(source) !== 'object') {\n return result;\n }\n Object.keys(source).forEach(function (key) {\n if (Array.isArray(result[key]) && Array.isArray(source[key])) {\n result[key] = result[key].concat(source[key]);\n } else if (isObject(result[key]) && isObject(source[key])) {\n result[key] = merge(result[key], source[key]);\n } else {\n result[key] = source[key];\n }\n });\n return result;\n }, {});\n};\nvar values = function values(o) {\n return Object.keys(o).map(function (k) {\n return o[k];\n });\n};\nvar range = function range(start, end) {\n var result = [];\n for (var i = start; i < end; i++) {\n result.push(i);\n }\n return result;\n};\nvar flatten = function flatten(lists) {\n return lists.reduce(function (x, y) {\n return x.concat(y);\n }, []);\n};\nvar from = function from(list) {\n if (!list.length) {\n return [];\n }\n var result = [];\n for (var i = 0; i < list.length; i++) {\n result.push(list[i]);\n }\n return result;\n};\nvar findIndexes = function findIndexes(l, key) {\n return l.reduce(function (a, e, i) {\n if (e[key]) {\n a.push(i);\n }\n return a;\n }, []);\n};\n/**\n * Returns a union of the included lists provided each element can be identified by a key.\n *\n * @param {Array} list - list of lists to get the union of\n * @param {Function} keyFunction - the function to use as a key for each element\n *\n * @return {Array} the union of the arrays\n */\n\nvar union = function union(lists, keyFunction) {\n return values(lists.reduce(function (acc, list) {\n list.forEach(function (el) {\n acc[keyFunction(el)] = el;\n });\n return acc;\n }, {}));\n};\nvar errors = {\n INVALID_NUMBER_OF_PERIOD: 'INVALID_NUMBER_OF_PERIOD',\n INVALID_NUMBER_OF_CONTENT_STEERING: 'INVALID_NUMBER_OF_CONTENT_STEERING',\n DASH_EMPTY_MANIFEST: 'DASH_EMPTY_MANIFEST',\n DASH_INVALID_XML: 'DASH_INVALID_XML',\n NO_BASE_URL: 'NO_BASE_URL',\n MISSING_SEGMENT_INFORMATION: 'MISSING_SEGMENT_INFORMATION',\n SEGMENT_TIME_UNSPECIFIED: 'SEGMENT_TIME_UNSPECIFIED',\n UNSUPPORTED_UTC_TIMING_SCHEME: 'UNSUPPORTED_UTC_TIMING_SCHEME'\n};\n\n/**\n * @typedef {Object} SingleUri\n * @property {string} uri - relative location of segment\n * @property {string} resolvedUri - resolved location of segment\n * @property {Object} byterange - Object containing information on how to make byte range\n * requests following byte-range-spec per RFC2616.\n * @property {String} byterange.length - length of range request\n * @property {String} byterange.offset - byte offset of range request\n *\n * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.1\n */\n\n/**\n * Converts a URLType node (5.3.9.2.3 Table 13) to a segment object\n * that conforms to how m3u8-parser is structured\n *\n * @see https://github.com/videojs/m3u8-parser\n *\n * @param {string} baseUrl - baseUrl provided by nodes\n * @param {string} source - source url for segment\n * @param {string} range - optional range used for range calls,\n * follows RFC 2616, Clause 14.35.1\n * @return {SingleUri} full segment information transformed into a format similar\n * to m3u8-parser\n */\n\nvar urlTypeToSegment = function urlTypeToSegment(_ref) {\n var _ref$baseUrl = _ref.baseUrl,\n baseUrl = _ref$baseUrl === void 0 ? '' : _ref$baseUrl,\n _ref$source = _ref.source,\n source = _ref$source === void 0 ? '' : _ref$source,\n _ref$range = _ref.range,\n range = _ref$range === void 0 ? '' : _ref$range,\n _ref$indexRange = _ref.indexRange,\n indexRange = _ref$indexRange === void 0 ? '' : _ref$indexRange;\n var segment = {\n uri: source,\n resolvedUri: resolveUrl(baseUrl || '', source)\n };\n if (range || indexRange) {\n var rangeStr = range ? range : indexRange;\n var ranges = rangeStr.split('-'); // default to parsing this as a BigInt if possible\n\n var startRange = window.BigInt ? window.BigInt(ranges[0]) : parseInt(ranges[0], 10);\n var endRange = window.BigInt ? window.BigInt(ranges[1]) : parseInt(ranges[1], 10); // convert back to a number if less than MAX_SAFE_INTEGER\n\n if (startRange < Number.MAX_SAFE_INTEGER && typeof startRange === 'bigint') {\n startRange = Number(startRange);\n }\n if (endRange < Number.MAX_SAFE_INTEGER && typeof endRange === 'bigint') {\n endRange = Number(endRange);\n }\n var length;\n if (typeof endRange === 'bigint' || typeof startRange === 'bigint') {\n length = window.BigInt(endRange) - window.BigInt(startRange) + window.BigInt(1);\n } else {\n length = endRange - startRange + 1;\n }\n if (typeof length === 'bigint' && length < Number.MAX_SAFE_INTEGER) {\n length = Number(length);\n } // byterange should be inclusive according to\n // RFC 2616, Clause 14.35.1\n\n segment.byterange = {\n length: length,\n offset: startRange\n };\n }\n return segment;\n};\nvar byteRangeToString = function byteRangeToString(byterange) {\n // `endRange` is one less than `offset + length` because the HTTP range\n // header uses inclusive ranges\n var endRange;\n if (typeof byterange.offset === 'bigint' || typeof byterange.length === 'bigint') {\n endRange = window.BigInt(byterange.offset) + window.BigInt(byterange.length) - window.BigInt(1);\n } else {\n endRange = byterange.offset + byterange.length - 1;\n }\n return \"\".concat(byterange.offset, \"-\").concat(endRange);\n};\n\n/**\n * parse the end number attribue that can be a string\n * number, or undefined.\n *\n * @param {string|number|undefined} endNumber\n * The end number attribute.\n *\n * @return {number|null}\n * The result of parsing the end number.\n */\n\nvar parseEndNumber = function parseEndNumber(endNumber) {\n if (endNumber && typeof endNumber !== 'number') {\n endNumber = parseInt(endNumber, 10);\n }\n if (isNaN(endNumber)) {\n return null;\n }\n return endNumber;\n};\n/**\n * Functions for calculating the range of available segments in static and dynamic\n * manifests.\n */\n\nvar segmentRange = {\n /**\n * Returns the entire range of available segments for a static MPD\n *\n * @param {Object} attributes\n * Inheritied MPD attributes\n * @return {{ start: number, end: number }}\n * The start and end numbers for available segments\n */\n \"static\": function _static(attributes) {\n var duration = attributes.duration,\n _attributes$timescale = attributes.timescale,\n timescale = _attributes$timescale === void 0 ? 1 : _attributes$timescale,\n sourceDuration = attributes.sourceDuration,\n periodDuration = attributes.periodDuration;\n var endNumber = parseEndNumber(attributes.endNumber);\n var segmentDuration = duration / timescale;\n if (typeof endNumber === 'number') {\n return {\n start: 0,\n end: endNumber\n };\n }\n if (typeof periodDuration === 'number') {\n return {\n start: 0,\n end: periodDuration / segmentDuration\n };\n }\n return {\n start: 0,\n end: sourceDuration / segmentDuration\n };\n },\n /**\n * Returns the current live window range of available segments for a dynamic MPD\n *\n * @param {Object} attributes\n * Inheritied MPD attributes\n * @return {{ start: number, end: number }}\n * The start and end numbers for available segments\n */\n dynamic: function dynamic(attributes) {\n var NOW = attributes.NOW,\n clientOffset = attributes.clientOffset,\n availabilityStartTime = attributes.availabilityStartTime,\n _attributes$timescale2 = attributes.timescale,\n timescale = _attributes$timescale2 === void 0 ? 1 : _attributes$timescale2,\n duration = attributes.duration,\n _attributes$periodSta = attributes.periodStart,\n periodStart = _attributes$periodSta === void 0 ? 0 : _attributes$periodSta,\n _attributes$minimumUp = attributes.minimumUpdatePeriod,\n minimumUpdatePeriod = _attributes$minimumUp === void 0 ? 0 : _attributes$minimumUp,\n _attributes$timeShift = attributes.timeShiftBufferDepth,\n timeShiftBufferDepth = _attributes$timeShift === void 0 ? Infinity : _attributes$timeShift;\n var endNumber = parseEndNumber(attributes.endNumber); // clientOffset is passed in at the top level of mpd-parser and is an offset calculated\n // after retrieving UTC server time.\n\n var now = (NOW + clientOffset) / 1000; // WC stands for Wall Clock.\n // Convert the period start time to EPOCH.\n\n var periodStartWC = availabilityStartTime + periodStart; // Period end in EPOCH is manifest's retrieval time + time until next update.\n\n var periodEndWC = now + minimumUpdatePeriod;\n var periodDuration = periodEndWC - periodStartWC;\n var segmentCount = Math.ceil(periodDuration * timescale / duration);\n var availableStart = Math.floor((now - periodStartWC - timeShiftBufferDepth) * timescale / duration);\n var availableEnd = Math.floor((now - periodStartWC) * timescale / duration);\n return {\n start: Math.max(0, availableStart),\n end: typeof endNumber === 'number' ? endNumber : Math.min(segmentCount, availableEnd)\n };\n }\n};\n/**\n * Maps a range of numbers to objects with information needed to build the corresponding\n * segment list\n *\n * @name toSegmentsCallback\n * @function\n * @param {number} number\n * Number of the segment\n * @param {number} index\n * Index of the number in the range list\n * @return {{ number: Number, duration: Number, timeline: Number, time: Number }}\n * Object with segment timing and duration info\n */\n\n/**\n * Returns a callback for Array.prototype.map for mapping a range of numbers to\n * information needed to build the segment list.\n *\n * @param {Object} attributes\n * Inherited MPD attributes\n * @return {toSegmentsCallback}\n * Callback map function\n */\n\nvar toSegments = function toSegments(attributes) {\n return function (number) {\n var duration = attributes.duration,\n _attributes$timescale3 = attributes.timescale,\n timescale = _attributes$timescale3 === void 0 ? 1 : _attributes$timescale3,\n periodStart = attributes.periodStart,\n _attributes$startNumb = attributes.startNumber,\n startNumber = _attributes$startNumb === void 0 ? 1 : _attributes$startNumb;\n return {\n number: startNumber + number,\n duration: duration / timescale,\n timeline: periodStart,\n time: number * duration\n };\n };\n};\n/**\n * Returns a list of objects containing segment timing and duration info used for\n * building the list of segments. This uses the @duration attribute specified\n * in the MPD manifest to derive the range of segments.\n *\n * @param {Object} attributes\n * Inherited MPD attributes\n * @return {{number: number, duration: number, time: number, timeline: number}[]}\n * List of Objects with segment timing and duration info\n */\n\nvar parseByDuration = function parseByDuration(attributes) {\n var type = attributes.type,\n duration = attributes.duration,\n _attributes$timescale4 = attributes.timescale,\n timescale = _attributes$timescale4 === void 0 ? 1 : _attributes$timescale4,\n periodDuration = attributes.periodDuration,\n sourceDuration = attributes.sourceDuration;\n var _segmentRange$type = segmentRange[type](attributes),\n start = _segmentRange$type.start,\n end = _segmentRange$type.end;\n var segments = range(start, end).map(toSegments(attributes));\n if (type === 'static') {\n var index = segments.length - 1; // section is either a period or the full source\n\n var sectionDuration = typeof periodDuration === 'number' ? periodDuration : sourceDuration; // final segment may be less than full segment duration\n\n segments[index].duration = sectionDuration - duration / timescale * index;\n }\n return segments;\n};\n\n/**\n * Translates SegmentBase into a set of segments.\n * (DASH SPEC Section 5.3.9.3.2) contains a set of nodes. Each\n * node should be translated into segment.\n *\n * @param {Object} attributes\n * Object containing all inherited attributes from parent elements with attribute\n * names as keys\n * @return {Object.} list of segments\n */\n\nvar segmentsFromBase = function segmentsFromBase(attributes) {\n var baseUrl = attributes.baseUrl,\n _attributes$initializ = attributes.initialization,\n initialization = _attributes$initializ === void 0 ? {} : _attributes$initializ,\n sourceDuration = attributes.sourceDuration,\n _attributes$indexRang = attributes.indexRange,\n indexRange = _attributes$indexRang === void 0 ? '' : _attributes$indexRang,\n periodStart = attributes.periodStart,\n presentationTime = attributes.presentationTime,\n _attributes$number = attributes.number,\n number = _attributes$number === void 0 ? 0 : _attributes$number,\n duration = attributes.duration; // base url is required for SegmentBase to work, per spec (Section 5.3.9.2.1)\n\n if (!baseUrl) {\n throw new Error(errors.NO_BASE_URL);\n }\n var initSegment = urlTypeToSegment({\n baseUrl: baseUrl,\n source: initialization.sourceURL,\n range: initialization.range\n });\n var segment = urlTypeToSegment({\n baseUrl: baseUrl,\n source: baseUrl,\n indexRange: indexRange\n });\n segment.map = initSegment; // If there is a duration, use it, otherwise use the given duration of the source\n // (since SegmentBase is only for one total segment)\n\n if (duration) {\n var segmentTimeInfo = parseByDuration(attributes);\n if (segmentTimeInfo.length) {\n segment.duration = segmentTimeInfo[0].duration;\n segment.timeline = segmentTimeInfo[0].timeline;\n }\n } else if (sourceDuration) {\n segment.duration = sourceDuration;\n segment.timeline = periodStart;\n } // If presentation time is provided, these segments are being generated by SIDX\n // references, and should use the time provided. For the general case of SegmentBase,\n // there should only be one segment in the period, so its presentation time is the same\n // as its period start.\n\n segment.presentationTime = presentationTime || periodStart;\n segment.number = number;\n return [segment];\n};\n/**\n * Given a playlist, a sidx box, and a baseUrl, update the segment list of the playlist\n * according to the sidx information given.\n *\n * playlist.sidx has metadadata about the sidx where-as the sidx param\n * is the parsed sidx box itself.\n *\n * @param {Object} playlist the playlist to update the sidx information for\n * @param {Object} sidx the parsed sidx box\n * @return {Object} the playlist object with the updated sidx information\n */\n\nvar addSidxSegmentsToPlaylist$1 = function addSidxSegmentsToPlaylist$1(playlist, sidx, baseUrl) {\n // Retain init segment information\n var initSegment = playlist.sidx.map ? playlist.sidx.map : null; // Retain source duration from initial main manifest parsing\n\n var sourceDuration = playlist.sidx.duration; // Retain source timeline\n\n var timeline = playlist.timeline || 0;\n var sidxByteRange = playlist.sidx.byterange;\n var sidxEnd = sidxByteRange.offset + sidxByteRange.length; // Retain timescale of the parsed sidx\n\n var timescale = sidx.timescale; // referenceType 1 refers to other sidx boxes\n\n var mediaReferences = sidx.references.filter(function (r) {\n return r.referenceType !== 1;\n });\n var segments = [];\n var type = playlist.endList ? 'static' : 'dynamic';\n var periodStart = playlist.sidx.timeline;\n var presentationTime = periodStart;\n var number = playlist.mediaSequence || 0; // firstOffset is the offset from the end of the sidx box\n\n var startIndex; // eslint-disable-next-line\n\n if (typeof sidx.firstOffset === 'bigint') {\n startIndex = window.BigInt(sidxEnd) + sidx.firstOffset;\n } else {\n startIndex = sidxEnd + sidx.firstOffset;\n }\n for (var i = 0; i < mediaReferences.length; i++) {\n var reference = sidx.references[i]; // size of the referenced (sub)segment\n\n var size = reference.referencedSize; // duration of the referenced (sub)segment, in the timescale\n // this will be converted to seconds when generating segments\n\n var duration = reference.subsegmentDuration; // should be an inclusive range\n\n var endIndex = void 0; // eslint-disable-next-line\n\n if (typeof startIndex === 'bigint') {\n endIndex = startIndex + window.BigInt(size) - window.BigInt(1);\n } else {\n endIndex = startIndex + size - 1;\n }\n var indexRange = \"\".concat(startIndex, \"-\").concat(endIndex);\n var attributes = {\n baseUrl: baseUrl,\n timescale: timescale,\n timeline: timeline,\n periodStart: periodStart,\n presentationTime: presentationTime,\n number: number,\n duration: duration,\n sourceDuration: sourceDuration,\n indexRange: indexRange,\n type: type\n };\n var segment = segmentsFromBase(attributes)[0];\n if (initSegment) {\n segment.map = initSegment;\n }\n segments.push(segment);\n if (typeof startIndex === 'bigint') {\n startIndex += window.BigInt(size);\n } else {\n startIndex += size;\n }\n presentationTime += duration / timescale;\n number++;\n }\n playlist.segments = segments;\n return playlist;\n};\nvar SUPPORTED_MEDIA_TYPES = ['AUDIO', 'SUBTITLES']; // allow one 60fps frame as leniency (arbitrarily chosen)\n\nvar TIME_FUDGE = 1 / 60;\n/**\n * Given a list of timelineStarts, combines, dedupes, and sorts them.\n *\n * @param {TimelineStart[]} timelineStarts - list of timeline starts\n *\n * @return {TimelineStart[]} the combined and deduped timeline starts\n */\n\nvar getUniqueTimelineStarts = function getUniqueTimelineStarts(timelineStarts) {\n return union(timelineStarts, function (_ref2) {\n var timeline = _ref2.timeline;\n return timeline;\n }).sort(function (a, b) {\n return a.timeline > b.timeline ? 1 : -1;\n });\n};\n/**\n * Finds the playlist with the matching NAME attribute.\n *\n * @param {Array} playlists - playlists to search through\n * @param {string} name - the NAME attribute to search for\n *\n * @return {Object|null} the matching playlist object, or null\n */\n\nvar findPlaylistWithName = function findPlaylistWithName(playlists, name) {\n for (var i = 0; i < playlists.length; i++) {\n if (playlists[i].attributes.NAME === name) {\n return playlists[i];\n }\n }\n return null;\n};\n/**\n * Gets a flattened array of media group playlists.\n *\n * @param {Object} manifest - the main manifest object\n *\n * @return {Array} the media group playlists\n */\n\nvar getMediaGroupPlaylists = function getMediaGroupPlaylists(manifest) {\n var mediaGroupPlaylists = [];\n forEachMediaGroup(manifest, SUPPORTED_MEDIA_TYPES, function (properties, type, group, label) {\n mediaGroupPlaylists = mediaGroupPlaylists.concat(properties.playlists || []);\n });\n return mediaGroupPlaylists;\n};\n/**\n * Updates the playlist's media sequence numbers.\n *\n * @param {Object} config - options object\n * @param {Object} config.playlist - the playlist to update\n * @param {number} config.mediaSequence - the mediaSequence number to start with\n */\n\nvar updateMediaSequenceForPlaylist = function updateMediaSequenceForPlaylist(_ref3) {\n var playlist = _ref3.playlist,\n mediaSequence = _ref3.mediaSequence;\n playlist.mediaSequence = mediaSequence;\n playlist.segments.forEach(function (segment, index) {\n segment.number = playlist.mediaSequence + index;\n });\n};\n/**\n * Updates the media and discontinuity sequence numbers of newPlaylists given oldPlaylists\n * and a complete list of timeline starts.\n *\n * If no matching playlist is found, only the discontinuity sequence number of the playlist\n * will be updated.\n *\n * Since early available timelines are not supported, at least one segment must be present.\n *\n * @param {Object} config - options object\n * @param {Object[]} oldPlaylists - the old playlists to use as a reference\n * @param {Object[]} newPlaylists - the new playlists to update\n * @param {Object} timelineStarts - all timelineStarts seen in the stream to this point\n */\n\nvar updateSequenceNumbers = function updateSequenceNumbers(_ref4) {\n var oldPlaylists = _ref4.oldPlaylists,\n newPlaylists = _ref4.newPlaylists,\n timelineStarts = _ref4.timelineStarts;\n newPlaylists.forEach(function (playlist) {\n playlist.discontinuitySequence = timelineStarts.findIndex(function (_ref5) {\n var timeline = _ref5.timeline;\n return timeline === playlist.timeline;\n }); // Playlists NAMEs come from DASH Representation IDs, which are mandatory\n // (see ISO_23009-1-2012 5.3.5.2).\n //\n // If the same Representation existed in a prior Period, it will retain the same NAME.\n\n var oldPlaylist = findPlaylistWithName(oldPlaylists, playlist.attributes.NAME);\n if (!oldPlaylist) {\n // Since this is a new playlist, the media sequence values can start from 0 without\n // consequence.\n return;\n } // TODO better support for live SIDX\n //\n // As of this writing, mpd-parser does not support multiperiod SIDX (in live or VOD).\n // This is evident by a playlist only having a single SIDX reference. In a multiperiod\n // playlist there would need to be multiple SIDX references. In addition, live SIDX is\n // not supported when the SIDX properties change on refreshes.\n //\n // In the future, if support needs to be added, the merging logic here can be called\n // after SIDX references are resolved. For now, exit early to prevent exceptions being\n // thrown due to undefined references.\n\n if (playlist.sidx) {\n return;\n } // Since we don't yet support early available timelines, we don't need to support\n // playlists with no segments.\n\n var firstNewSegment = playlist.segments[0];\n var oldMatchingSegmentIndex = oldPlaylist.segments.findIndex(function (oldSegment) {\n return Math.abs(oldSegment.presentationTime - firstNewSegment.presentationTime) < TIME_FUDGE;\n }); // No matching segment from the old playlist means the entire playlist was refreshed.\n // In this case the media sequence should account for this update, and the new segments\n // should be marked as discontinuous from the prior content, since the last prior\n // timeline was removed.\n\n if (oldMatchingSegmentIndex === -1) {\n updateMediaSequenceForPlaylist({\n playlist: playlist,\n mediaSequence: oldPlaylist.mediaSequence + oldPlaylist.segments.length\n });\n playlist.segments[0].discontinuity = true;\n playlist.discontinuityStarts.unshift(0); // No matching segment does not necessarily mean there's missing content.\n //\n // If the new playlist's timeline is the same as the last seen segment's timeline,\n // then a discontinuity can be added to identify that there's potentially missing\n // content. If there's no missing content, the discontinuity should still be rather\n // harmless. It's possible that if segment durations are accurate enough, that the\n // existence of a gap can be determined using the presentation times and durations,\n // but if the segment timing info is off, it may introduce more problems than simply\n // adding the discontinuity.\n //\n // If the new playlist's timeline is different from the last seen segment's timeline,\n // then a discontinuity can be added to identify that this is the first seen segment\n // of a new timeline. However, the logic at the start of this function that\n // determined the disconinuity sequence by timeline index is now off by one (the\n // discontinuity of the newest timeline hasn't yet fallen off the manifest...since\n // we added it), so the disconinuity sequence must be decremented.\n //\n // A period may also have a duration of zero, so the case of no segments is handled\n // here even though we don't yet support early available periods.\n\n if (!oldPlaylist.segments.length && playlist.timeline > oldPlaylist.timeline || oldPlaylist.segments.length && playlist.timeline > oldPlaylist.segments[oldPlaylist.segments.length - 1].timeline) {\n playlist.discontinuitySequence--;\n }\n return;\n } // If the first segment matched with a prior segment on a discontinuity (it's matching\n // on the first segment of a period), then the discontinuitySequence shouldn't be the\n // timeline's matching one, but instead should be the one prior, and the first segment\n // of the new manifest should be marked with a discontinuity.\n //\n // The reason for this special case is that discontinuity sequence shows how many\n // discontinuities have fallen off of the playlist, and discontinuities are marked on\n // the first segment of a new \"timeline.\" Because of this, while DASH will retain that\n // Period while the \"timeline\" exists, HLS keeps track of it via the discontinuity\n // sequence, and that first segment is an indicator, but can be removed before that\n // timeline is gone.\n\n var oldMatchingSegment = oldPlaylist.segments[oldMatchingSegmentIndex];\n if (oldMatchingSegment.discontinuity && !firstNewSegment.discontinuity) {\n firstNewSegment.discontinuity = true;\n playlist.discontinuityStarts.unshift(0);\n playlist.discontinuitySequence--;\n }\n updateMediaSequenceForPlaylist({\n playlist: playlist,\n mediaSequence: oldPlaylist.segments[oldMatchingSegmentIndex].number\n });\n });\n};\n/**\n * Given an old parsed manifest object and a new parsed manifest object, updates the\n * sequence and timing values within the new manifest to ensure that it lines up with the\n * old.\n *\n * @param {Array} oldManifest - the old main manifest object\n * @param {Array} newManifest - the new main manifest object\n *\n * @return {Object} the updated new manifest object\n */\n\nvar positionManifestOnTimeline = function positionManifestOnTimeline(_ref6) {\n var oldManifest = _ref6.oldManifest,\n newManifest = _ref6.newManifest;\n // Starting from v4.1.2 of the IOP, section 4.4.3.3 states:\n //\n // \"MPD@availabilityStartTime and Period@start shall not be changed over MPD updates.\"\n //\n // This was added from https://github.com/Dash-Industry-Forum/DASH-IF-IOP/issues/160\n //\n // Because of this change, and the difficulty of supporting periods with changing start\n // times, periods with changing start times are not supported. This makes the logic much\n // simpler, since periods with the same start time can be considerred the same period\n // across refreshes.\n //\n // To give an example as to the difficulty of handling periods where the start time may\n // change, if a single period manifest is refreshed with another manifest with a single\n // period, and both the start and end times are increased, then the only way to determine\n // if it's a new period or an old one that has changed is to look through the segments of\n // each playlist and determine the presentation time bounds to find a match. In addition,\n // if the period start changed to exceed the old period end, then there would be no\n // match, and it would not be possible to determine whether the refreshed period is a new\n // one or the old one.\n var oldPlaylists = oldManifest.playlists.concat(getMediaGroupPlaylists(oldManifest));\n var newPlaylists = newManifest.playlists.concat(getMediaGroupPlaylists(newManifest)); // Save all seen timelineStarts to the new manifest. Although this potentially means that\n // there's a \"memory leak\" in that it will never stop growing, in reality, only a couple\n // of properties are saved for each seen Period. Even long running live streams won't\n // generate too many Periods, unless the stream is watched for decades. In the future,\n // this can be optimized by mapping to discontinuity sequence numbers for each timeline,\n // but it may not become an issue, and the additional info can be useful for debugging.\n\n newManifest.timelineStarts = getUniqueTimelineStarts([oldManifest.timelineStarts, newManifest.timelineStarts]);\n updateSequenceNumbers({\n oldPlaylists: oldPlaylists,\n newPlaylists: newPlaylists,\n timelineStarts: newManifest.timelineStarts\n });\n return newManifest;\n};\nvar generateSidxKey = function generateSidxKey(sidx) {\n return sidx && sidx.uri + '-' + byteRangeToString(sidx.byterange);\n};\nvar mergeDiscontiguousPlaylists = function mergeDiscontiguousPlaylists(playlists) {\n // Break out playlists into groups based on their baseUrl\n var playlistsByBaseUrl = playlists.reduce(function (acc, cur) {\n if (!acc[cur.attributes.baseUrl]) {\n acc[cur.attributes.baseUrl] = [];\n }\n acc[cur.attributes.baseUrl].push(cur);\n return acc;\n }, {});\n var allPlaylists = [];\n Object.values(playlistsByBaseUrl).forEach(function (playlistGroup) {\n var mergedPlaylists = values(playlistGroup.reduce(function (acc, playlist) {\n // assuming playlist IDs are the same across periods\n // TODO: handle multiperiod where representation sets are not the same\n // across periods\n var name = playlist.attributes.id + (playlist.attributes.lang || '');\n if (!acc[name]) {\n // First Period\n acc[name] = playlist;\n acc[name].attributes.timelineStarts = [];\n } else {\n // Subsequent Periods\n if (playlist.segments) {\n var _acc$name$segments;\n // first segment of subsequent periods signal a discontinuity\n if (playlist.segments[0]) {\n playlist.segments[0].discontinuity = true;\n }\n (_acc$name$segments = acc[name].segments).push.apply(_acc$name$segments, _toConsumableArray(playlist.segments));\n } // bubble up contentProtection, this assumes all DRM content\n // has the same contentProtection\n\n if (playlist.attributes.contentProtection) {\n acc[name].attributes.contentProtection = playlist.attributes.contentProtection;\n }\n }\n acc[name].attributes.timelineStarts.push({\n // Although they represent the same number, it's important to have both to make it\n // compatible with HLS potentially having a similar attribute.\n start: playlist.attributes.periodStart,\n timeline: playlist.attributes.periodStart\n });\n return acc;\n }, {}));\n allPlaylists = allPlaylists.concat(mergedPlaylists);\n });\n return allPlaylists.map(function (playlist) {\n playlist.discontinuityStarts = findIndexes(playlist.segments || [], 'discontinuity');\n return playlist;\n });\n};\nvar addSidxSegmentsToPlaylist = function addSidxSegmentsToPlaylist(playlist, sidxMapping) {\n var sidxKey = generateSidxKey(playlist.sidx);\n var sidxMatch = sidxKey && sidxMapping[sidxKey] && sidxMapping[sidxKey].sidx;\n if (sidxMatch) {\n addSidxSegmentsToPlaylist$1(playlist, sidxMatch, playlist.sidx.resolvedUri);\n }\n return playlist;\n};\nvar addSidxSegmentsToPlaylists = function addSidxSegmentsToPlaylists(playlists) {\n var sidxMapping = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n if (!Object.keys(sidxMapping).length) {\n return playlists;\n }\n for (var i in playlists) {\n playlists[i] = addSidxSegmentsToPlaylist(playlists[i], sidxMapping);\n }\n return playlists;\n};\nvar formatAudioPlaylist = function formatAudioPlaylist(_ref7, isAudioOnly) {\n var attributes = _ref7.attributes,\n segments = _ref7.segments,\n sidx = _ref7.sidx,\n mediaSequence = _ref7.mediaSequence,\n discontinuitySequence = _ref7.discontinuitySequence,\n discontinuityStarts = _ref7.discontinuityStarts;\n var playlist = {\n attributes: _defineProperty({\n NAME: attributes.id,\n BANDWIDTH: attributes.bandwidth,\n CODECS: attributes.codecs\n }, 'PROGRAM-ID', 1),\n uri: '',\n endList: attributes.type === 'static',\n timeline: attributes.periodStart,\n resolvedUri: attributes.baseUrl || '',\n targetDuration: attributes.duration,\n discontinuitySequence: discontinuitySequence,\n discontinuityStarts: discontinuityStarts,\n timelineStarts: attributes.timelineStarts,\n mediaSequence: mediaSequence,\n segments: segments\n };\n if (attributes.contentProtection) {\n playlist.contentProtection = attributes.contentProtection;\n }\n if (attributes.serviceLocation) {\n playlist.attributes.serviceLocation = attributes.serviceLocation;\n }\n if (sidx) {\n playlist.sidx = sidx;\n }\n if (isAudioOnly) {\n playlist.attributes.AUDIO = 'audio';\n playlist.attributes.SUBTITLES = 'subs';\n }\n return playlist;\n};\nvar formatVttPlaylist = function formatVttPlaylist(_ref8) {\n var attributes = _ref8.attributes,\n segments = _ref8.segments,\n mediaSequence = _ref8.mediaSequence,\n discontinuityStarts = _ref8.discontinuityStarts,\n discontinuitySequence = _ref8.discontinuitySequence;\n if (typeof segments === 'undefined') {\n // vtt tracks may use single file in BaseURL\n segments = [{\n uri: attributes.baseUrl,\n timeline: attributes.periodStart,\n resolvedUri: attributes.baseUrl || '',\n duration: attributes.sourceDuration,\n number: 0\n }]; // targetDuration should be the same duration as the only segment\n\n attributes.duration = attributes.sourceDuration;\n }\n var m3u8Attributes = _defineProperty({\n NAME: attributes.id,\n BANDWIDTH: attributes.bandwidth\n }, 'PROGRAM-ID', 1);\n if (attributes.codecs) {\n m3u8Attributes.CODECS = attributes.codecs;\n }\n var vttPlaylist = {\n attributes: m3u8Attributes,\n uri: '',\n endList: attributes.type === 'static',\n timeline: attributes.periodStart,\n resolvedUri: attributes.baseUrl || '',\n targetDuration: attributes.duration,\n timelineStarts: attributes.timelineStarts,\n discontinuityStarts: discontinuityStarts,\n discontinuitySequence: discontinuitySequence,\n mediaSequence: mediaSequence,\n segments: segments\n };\n if (attributes.serviceLocation) {\n vttPlaylist.attributes.serviceLocation = attributes.serviceLocation;\n }\n return vttPlaylist;\n};\nvar organizeAudioPlaylists = function organizeAudioPlaylists(playlists) {\n var sidxMapping = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var isAudioOnly = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var mainPlaylist;\n var formattedPlaylists = playlists.reduce(function (a, playlist) {\n var role = playlist.attributes.role && playlist.attributes.role.value || '';\n var language = playlist.attributes.lang || '';\n var label = playlist.attributes.label || 'main';\n if (language && !playlist.attributes.label) {\n var roleLabel = role ? \" (\".concat(role, \")\") : '';\n label = \"\".concat(playlist.attributes.lang).concat(roleLabel);\n }\n if (!a[label]) {\n a[label] = {\n language: language,\n autoselect: true,\n \"default\": role === 'main',\n playlists: [],\n uri: ''\n };\n }\n var formatted = addSidxSegmentsToPlaylist(formatAudioPlaylist(playlist, isAudioOnly), sidxMapping);\n a[label].playlists.push(formatted);\n if (typeof mainPlaylist === 'undefined' && role === 'main') {\n mainPlaylist = playlist;\n mainPlaylist[\"default\"] = true;\n }\n return a;\n }, {}); // if no playlists have role \"main\", mark the first as main\n\n if (!mainPlaylist) {\n var firstLabel = Object.keys(formattedPlaylists)[0];\n formattedPlaylists[firstLabel][\"default\"] = true;\n }\n return formattedPlaylists;\n};\nvar organizeVttPlaylists = function organizeVttPlaylists(playlists) {\n var sidxMapping = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return playlists.reduce(function (a, playlist) {\n var label = playlist.attributes.label || playlist.attributes.lang || 'text';\n if (!a[label]) {\n a[label] = {\n language: label,\n \"default\": false,\n autoselect: false,\n playlists: [],\n uri: ''\n };\n }\n a[label].playlists.push(addSidxSegmentsToPlaylist(formatVttPlaylist(playlist), sidxMapping));\n return a;\n }, {});\n};\nvar organizeCaptionServices = function organizeCaptionServices(captionServices) {\n return captionServices.reduce(function (svcObj, svc) {\n if (!svc) {\n return svcObj;\n }\n svc.forEach(function (service) {\n var channel = service.channel,\n language = service.language;\n svcObj[language] = {\n autoselect: false,\n \"default\": false,\n instreamId: channel,\n language: language\n };\n if (service.hasOwnProperty('aspectRatio')) {\n svcObj[language].aspectRatio = service.aspectRatio;\n }\n if (service.hasOwnProperty('easyReader')) {\n svcObj[language].easyReader = service.easyReader;\n }\n if (service.hasOwnProperty('3D')) {\n svcObj[language]['3D'] = service['3D'];\n }\n });\n return svcObj;\n }, {});\n};\nvar formatVideoPlaylist = function formatVideoPlaylist(_ref9) {\n var attributes = _ref9.attributes,\n segments = _ref9.segments,\n sidx = _ref9.sidx,\n discontinuityStarts = _ref9.discontinuityStarts;\n var playlist = {\n attributes: _defineProperty({\n NAME: attributes.id,\n AUDIO: 'audio',\n SUBTITLES: 'subs',\n RESOLUTION: {\n width: attributes.width,\n height: attributes.height\n },\n CODECS: attributes.codecs,\n BANDWIDTH: attributes.bandwidth\n }, 'PROGRAM-ID', 1),\n uri: '',\n endList: attributes.type === 'static',\n timeline: attributes.periodStart,\n resolvedUri: attributes.baseUrl || '',\n targetDuration: attributes.duration,\n discontinuityStarts: discontinuityStarts,\n timelineStarts: attributes.timelineStarts,\n segments: segments\n };\n if (attributes.frameRate) {\n playlist.attributes['FRAME-RATE'] = attributes.frameRate;\n }\n if (attributes.contentProtection) {\n playlist.contentProtection = attributes.contentProtection;\n }\n if (attributes.serviceLocation) {\n playlist.attributes.serviceLocation = attributes.serviceLocation;\n }\n if (sidx) {\n playlist.sidx = sidx;\n }\n return playlist;\n};\nvar videoOnly = function videoOnly(_ref10) {\n var attributes = _ref10.attributes;\n return attributes.mimeType === 'video/mp4' || attributes.mimeType === 'video/webm' || attributes.contentType === 'video';\n};\nvar audioOnly = function audioOnly(_ref11) {\n var attributes = _ref11.attributes;\n return attributes.mimeType === 'audio/mp4' || attributes.mimeType === 'audio/webm' || attributes.contentType === 'audio';\n};\nvar vttOnly = function vttOnly(_ref12) {\n var attributes = _ref12.attributes;\n return attributes.mimeType === 'text/vtt' || attributes.contentType === 'text';\n};\n/**\n * Contains start and timeline properties denoting a timeline start. For DASH, these will\n * be the same number.\n *\n * @typedef {Object} TimelineStart\n * @property {number} start - the start time of the timeline\n * @property {number} timeline - the timeline number\n */\n\n/**\n * Adds appropriate media and discontinuity sequence values to the segments and playlists.\n *\n * Throughout mpd-parser, the `number` attribute is used in relation to `startNumber`, a\n * DASH specific attribute used in constructing segment URI's from templates. However, from\n * an HLS perspective, the `number` attribute on a segment would be its `mediaSequence`\n * value, which should start at the original media sequence value (or 0) and increment by 1\n * for each segment thereafter. Since DASH's `startNumber` values are independent per\n * period, it doesn't make sense to use it for `number`. Instead, assume everything starts\n * from a 0 mediaSequence value and increment from there.\n *\n * Note that VHS currently doesn't use the `number` property, but it can be helpful for\n * debugging and making sense of the manifest.\n *\n * For live playlists, to account for values increasing in manifests when periods are\n * removed on refreshes, merging logic should be used to update the numbers to their\n * appropriate values (to ensure they're sequential and increasing).\n *\n * @param {Object[]} playlists - the playlists to update\n * @param {TimelineStart[]} timelineStarts - the timeline starts for the manifest\n */\n\nvar addMediaSequenceValues = function addMediaSequenceValues(playlists, timelineStarts) {\n // increment all segments sequentially\n playlists.forEach(function (playlist) {\n playlist.mediaSequence = 0;\n playlist.discontinuitySequence = timelineStarts.findIndex(function (_ref13) {\n var timeline = _ref13.timeline;\n return timeline === playlist.timeline;\n });\n if (!playlist.segments) {\n return;\n }\n playlist.segments.forEach(function (segment, index) {\n segment.number = index;\n });\n });\n};\n/**\n * Given a media group object, flattens all playlists within the media group into a single\n * array.\n *\n * @param {Object} mediaGroupObject - the media group object\n *\n * @return {Object[]}\n * The media group playlists\n */\n\nvar flattenMediaGroupPlaylists = function flattenMediaGroupPlaylists(mediaGroupObject) {\n if (!mediaGroupObject) {\n return [];\n }\n return Object.keys(mediaGroupObject).reduce(function (acc, label) {\n var labelContents = mediaGroupObject[label];\n return acc.concat(labelContents.playlists);\n }, []);\n};\nvar toM3u8 = function toM3u8(_ref14) {\n var dashPlaylists = _ref14.dashPlaylists,\n locations = _ref14.locations,\n contentSteering = _ref14.contentSteering,\n _ref14$sidxMapping = _ref14.sidxMapping,\n sidxMapping = _ref14$sidxMapping === void 0 ? {} : _ref14$sidxMapping,\n previousManifest = _ref14.previousManifest,\n eventStream = _ref14.eventStream;\n if (!dashPlaylists.length) {\n return {};\n } // grab all main manifest attributes\n\n var _dashPlaylists$0$attr = dashPlaylists[0].attributes,\n duration = _dashPlaylists$0$attr.sourceDuration,\n type = _dashPlaylists$0$attr.type,\n suggestedPresentationDelay = _dashPlaylists$0$attr.suggestedPresentationDelay,\n minimumUpdatePeriod = _dashPlaylists$0$attr.minimumUpdatePeriod;\n var videoPlaylists = mergeDiscontiguousPlaylists(dashPlaylists.filter(videoOnly)).map(formatVideoPlaylist);\n var audioPlaylists = mergeDiscontiguousPlaylists(dashPlaylists.filter(audioOnly));\n var vttPlaylists = mergeDiscontiguousPlaylists(dashPlaylists.filter(vttOnly));\n var captions = dashPlaylists.map(function (playlist) {\n return playlist.attributes.captionServices;\n }).filter(Boolean);\n var manifest = {\n allowCache: true,\n discontinuityStarts: [],\n segments: [],\n endList: true,\n mediaGroups: _defineProperty(_defineProperty({\n AUDIO: {},\n VIDEO: {}\n }, 'CLOSED-CAPTIONS', {}), \"SUBTITLES\", {}),\n uri: '',\n duration: duration,\n playlists: addSidxSegmentsToPlaylists(videoPlaylists, sidxMapping)\n };\n if (minimumUpdatePeriod >= 0) {\n manifest.minimumUpdatePeriod = minimumUpdatePeriod * 1000;\n }\n if (locations) {\n manifest.locations = locations;\n }\n if (contentSteering) {\n manifest.contentSteering = contentSteering;\n }\n if (type === 'dynamic') {\n manifest.suggestedPresentationDelay = suggestedPresentationDelay;\n }\n if (eventStream && eventStream.length > 0) {\n manifest.eventStream = eventStream;\n }\n var isAudioOnly = manifest.playlists.length === 0;\n var organizedAudioGroup = audioPlaylists.length ? organizeAudioPlaylists(audioPlaylists, sidxMapping, isAudioOnly) : null;\n var organizedVttGroup = vttPlaylists.length ? organizeVttPlaylists(vttPlaylists, sidxMapping) : null;\n var formattedPlaylists = videoPlaylists.concat(flattenMediaGroupPlaylists(organizedAudioGroup), flattenMediaGroupPlaylists(organizedVttGroup));\n var playlistTimelineStarts = formattedPlaylists.map(function (_ref15) {\n var timelineStarts = _ref15.timelineStarts;\n return timelineStarts;\n });\n manifest.timelineStarts = getUniqueTimelineStarts(playlistTimelineStarts);\n addMediaSequenceValues(formattedPlaylists, manifest.timelineStarts);\n if (organizedAudioGroup) {\n manifest.mediaGroups.AUDIO.audio = organizedAudioGroup;\n }\n if (organizedVttGroup) {\n manifest.mediaGroups.SUBTITLES.subs = organizedVttGroup;\n }\n if (captions.length) {\n manifest.mediaGroups['CLOSED-CAPTIONS'].cc = organizeCaptionServices(captions);\n }\n if (previousManifest) {\n return positionManifestOnTimeline({\n oldManifest: previousManifest,\n newManifest: manifest\n });\n }\n return manifest;\n};\n\n/**\n * Calculates the R (repetition) value for a live stream (for the final segment\n * in a manifest where the r value is negative 1)\n *\n * @param {Object} attributes\n * Object containing all inherited attributes from parent elements with attribute\n * names as keys\n * @param {number} time\n * current time (typically the total time up until the final segment)\n * @param {number} duration\n * duration property for the given \n *\n * @return {number}\n * R value to reach the end of the given period\n */\nvar getLiveRValue = function getLiveRValue(attributes, time, duration) {\n var NOW = attributes.NOW,\n clientOffset = attributes.clientOffset,\n availabilityStartTime = attributes.availabilityStartTime,\n _attributes$timescale5 = attributes.timescale,\n timescale = _attributes$timescale5 === void 0 ? 1 : _attributes$timescale5,\n _attributes$periodSta2 = attributes.periodStart,\n periodStart = _attributes$periodSta2 === void 0 ? 0 : _attributes$periodSta2,\n _attributes$minimumUp2 = attributes.minimumUpdatePeriod,\n minimumUpdatePeriod = _attributes$minimumUp2 === void 0 ? 0 : _attributes$minimumUp2;\n var now = (NOW + clientOffset) / 1000;\n var periodStartWC = availabilityStartTime + periodStart;\n var periodEndWC = now + minimumUpdatePeriod;\n var periodDuration = periodEndWC - periodStartWC;\n return Math.ceil((periodDuration * timescale - time) / duration);\n};\n/**\n * Uses information provided by SegmentTemplate.SegmentTimeline to determine segment\n * timing and duration\n *\n * @param {Object} attributes\n * Object containing all inherited attributes from parent elements with attribute\n * names as keys\n * @param {Object[]} segmentTimeline\n * List of objects representing the attributes of each S element contained within\n *\n * @return {{number: number, duration: number, time: number, timeline: number}[]}\n * List of Objects with segment timing and duration info\n */\n\nvar parseByTimeline = function parseByTimeline(attributes, segmentTimeline) {\n var type = attributes.type,\n _attributes$minimumUp3 = attributes.minimumUpdatePeriod,\n minimumUpdatePeriod = _attributes$minimumUp3 === void 0 ? 0 : _attributes$minimumUp3,\n _attributes$media = attributes.media,\n media = _attributes$media === void 0 ? '' : _attributes$media,\n sourceDuration = attributes.sourceDuration,\n _attributes$timescale6 = attributes.timescale,\n timescale = _attributes$timescale6 === void 0 ? 1 : _attributes$timescale6,\n _attributes$startNumb2 = attributes.startNumber,\n startNumber = _attributes$startNumb2 === void 0 ? 1 : _attributes$startNumb2,\n timeline = attributes.periodStart;\n var segments = [];\n var time = -1;\n for (var sIndex = 0; sIndex < segmentTimeline.length; sIndex++) {\n var S = segmentTimeline[sIndex];\n var duration = S.d;\n var repeat = S.r || 0;\n var segmentTime = S.t || 0;\n if (time < 0) {\n // first segment\n time = segmentTime;\n }\n if (segmentTime && segmentTime > time) {\n // discontinuity\n // TODO: How to handle this type of discontinuity\n // timeline++ here would treat it like HLS discontuity and content would\n // get appended without gap\n // E.G.\n // \n // \n // \n // \n // would have $Time$ values of [0, 1, 2, 5]\n // should this be appened at time positions [0, 1, 2, 3],(#EXT-X-DISCONTINUITY)\n // or [0, 1, 2, gap, gap, 5]? (#EXT-X-GAP)\n // does the value of sourceDuration consider this when calculating arbitrary\n // negative @r repeat value?\n // E.G. Same elements as above with this added at the end\n // \n // with a sourceDuration of 10\n // Would the 2 gaps be included in the time duration calculations resulting in\n // 8 segments with $Time$ values of [0, 1, 2, 5, 6, 7, 8, 9] or 10 segments\n // with $Time$ values of [0, 1, 2, 5, 6, 7, 8, 9, 10, 11] ?\n time = segmentTime;\n }\n var count = void 0;\n if (repeat < 0) {\n var nextS = sIndex + 1;\n if (nextS === segmentTimeline.length) {\n // last segment\n if (type === 'dynamic' && minimumUpdatePeriod > 0 && media.indexOf('$Number$') > 0) {\n count = getLiveRValue(attributes, time, duration);\n } else {\n // TODO: This may be incorrect depending on conclusion of TODO above\n count = (sourceDuration * timescale - time) / duration;\n }\n } else {\n count = (segmentTimeline[nextS].t - time) / duration;\n }\n } else {\n count = repeat + 1;\n }\n var end = startNumber + segments.length + count;\n var number = startNumber + segments.length;\n while (number < end) {\n segments.push({\n number: number,\n duration: duration / timescale,\n time: time,\n timeline: timeline\n });\n time += duration;\n number++;\n }\n }\n return segments;\n};\nvar identifierPattern = /\\$([A-z]*)(?:(%0)([0-9]+)d)?\\$/g;\n/**\n * Replaces template identifiers with corresponding values. To be used as the callback\n * for String.prototype.replace\n *\n * @name replaceCallback\n * @function\n * @param {string} match\n * Entire match of identifier\n * @param {string} identifier\n * Name of matched identifier\n * @param {string} format\n * Format tag string. Its presence indicates that padding is expected\n * @param {string} width\n * Desired length of the replaced value. Values less than this width shall be left\n * zero padded\n * @return {string}\n * Replacement for the matched identifier\n */\n\n/**\n * Returns a function to be used as a callback for String.prototype.replace to replace\n * template identifiers\n *\n * @param {Obect} values\n * Object containing values that shall be used to replace known identifiers\n * @param {number} values.RepresentationID\n * Value of the Representation@id attribute\n * @param {number} values.Number\n * Number of the corresponding segment\n * @param {number} values.Bandwidth\n * Value of the Representation@bandwidth attribute.\n * @param {number} values.Time\n * Timestamp value of the corresponding segment\n * @return {replaceCallback}\n * Callback to be used with String.prototype.replace to replace identifiers\n */\n\nvar identifierReplacement = function identifierReplacement(values) {\n return function (match, identifier, format, width) {\n if (match === '$$') {\n // escape sequence\n return '$';\n }\n if (typeof values[identifier] === 'undefined') {\n return match;\n }\n var value = '' + values[identifier];\n if (identifier === 'RepresentationID') {\n // Format tag shall not be present with RepresentationID\n return value;\n }\n if (!format) {\n width = 1;\n } else {\n width = parseInt(width, 10);\n }\n if (value.length >= width) {\n return value;\n }\n return \"\".concat(new Array(width - value.length + 1).join('0')).concat(value);\n };\n};\n/**\n * Constructs a segment url from a template string\n *\n * @param {string} url\n * Template string to construct url from\n * @param {Obect} values\n * Object containing values that shall be used to replace known identifiers\n * @param {number} values.RepresentationID\n * Value of the Representation@id attribute\n * @param {number} values.Number\n * Number of the corresponding segment\n * @param {number} values.Bandwidth\n * Value of the Representation@bandwidth attribute.\n * @param {number} values.Time\n * Timestamp value of the corresponding segment\n * @return {string}\n * Segment url with identifiers replaced\n */\n\nvar constructTemplateUrl = function constructTemplateUrl(url, values) {\n return url.replace(identifierPattern, identifierReplacement(values));\n};\n/**\n * Generates a list of objects containing timing and duration information about each\n * segment needed to generate segment uris and the complete segment object\n *\n * @param {Object} attributes\n * Object containing all inherited attributes from parent elements with attribute\n * names as keys\n * @param {Object[]|undefined} segmentTimeline\n * List of objects representing the attributes of each S element contained within\n * the SegmentTimeline element\n * @return {{number: number, duration: number, time: number, timeline: number}[]}\n * List of Objects with segment timing and duration info\n */\n\nvar parseTemplateInfo = function parseTemplateInfo(attributes, segmentTimeline) {\n if (!attributes.duration && !segmentTimeline) {\n // if neither @duration or SegmentTimeline are present, then there shall be exactly\n // one media segment\n return [{\n number: attributes.startNumber || 1,\n duration: attributes.sourceDuration,\n time: 0,\n timeline: attributes.periodStart\n }];\n }\n if (attributes.duration) {\n return parseByDuration(attributes);\n }\n return parseByTimeline(attributes, segmentTimeline);\n};\n/**\n * Generates a list of segments using information provided by the SegmentTemplate element\n *\n * @param {Object} attributes\n * Object containing all inherited attributes from parent elements with attribute\n * names as keys\n * @param {Object[]|undefined} segmentTimeline\n * List of objects representing the attributes of each S element contained within\n * the SegmentTimeline element\n * @return {Object[]}\n * List of segment objects\n */\n\nvar segmentsFromTemplate = function segmentsFromTemplate(attributes, segmentTimeline) {\n var templateValues = {\n RepresentationID: attributes.id,\n Bandwidth: attributes.bandwidth || 0\n };\n var _attributes$initializ2 = attributes.initialization,\n initialization = _attributes$initializ2 === void 0 ? {\n sourceURL: '',\n range: ''\n } : _attributes$initializ2;\n var mapSegment = urlTypeToSegment({\n baseUrl: attributes.baseUrl,\n source: constructTemplateUrl(initialization.sourceURL, templateValues),\n range: initialization.range\n });\n var segments = parseTemplateInfo(attributes, segmentTimeline);\n return segments.map(function (segment) {\n templateValues.Number = segment.number;\n templateValues.Time = segment.time;\n var uri = constructTemplateUrl(attributes.media || '', templateValues); // See DASH spec section 5.3.9.2.2\n // - if timescale isn't present on any level, default to 1.\n\n var timescale = attributes.timescale || 1; // - if presentationTimeOffset isn't present on any level, default to 0\n\n var presentationTimeOffset = attributes.presentationTimeOffset || 0;\n var presentationTime =\n // Even if the @t attribute is not specified for the segment, segment.time is\n // calculated in mpd-parser prior to this, so it's assumed to be available.\n attributes.periodStart + (segment.time - presentationTimeOffset) / timescale;\n var map = {\n uri: uri,\n timeline: segment.timeline,\n duration: segment.duration,\n resolvedUri: resolveUrl(attributes.baseUrl || '', uri),\n map: mapSegment,\n number: segment.number,\n presentationTime: presentationTime\n };\n return map;\n });\n};\n\n/**\n * Converts a (of type URLType from the DASH spec 5.3.9.2 Table 14)\n * to an object that matches the output of a segment in videojs/mpd-parser\n *\n * @param {Object} attributes\n * Object containing all inherited attributes from parent elements with attribute\n * names as keys\n * @param {Object} segmentUrl\n * node to translate into a segment object\n * @return {Object} translated segment object\n */\n\nvar SegmentURLToSegmentObject = function SegmentURLToSegmentObject(attributes, segmentUrl) {\n var baseUrl = attributes.baseUrl,\n _attributes$initializ3 = attributes.initialization,\n initialization = _attributes$initializ3 === void 0 ? {} : _attributes$initializ3;\n var initSegment = urlTypeToSegment({\n baseUrl: baseUrl,\n source: initialization.sourceURL,\n range: initialization.range\n });\n var segment = urlTypeToSegment({\n baseUrl: baseUrl,\n source: segmentUrl.media,\n range: segmentUrl.mediaRange\n });\n segment.map = initSegment;\n return segment;\n};\n/**\n * Generates a list of segments using information provided by the SegmentList element\n * SegmentList (DASH SPEC Section 5.3.9.3.2) contains a set of nodes. Each\n * node should be translated into segment.\n *\n * @param {Object} attributes\n * Object containing all inherited attributes from parent elements with attribute\n * names as keys\n * @param {Object[]|undefined} segmentTimeline\n * List of objects representing the attributes of each S element contained within\n * the SegmentTimeline element\n * @return {Object.} list of segments\n */\n\nvar segmentsFromList = function segmentsFromList(attributes, segmentTimeline) {\n var duration = attributes.duration,\n _attributes$segmentUr = attributes.segmentUrls,\n segmentUrls = _attributes$segmentUr === void 0 ? [] : _attributes$segmentUr,\n periodStart = attributes.periodStart; // Per spec (5.3.9.2.1) no way to determine segment duration OR\n // if both SegmentTimeline and @duration are defined, it is outside of spec.\n\n if (!duration && !segmentTimeline || duration && segmentTimeline) {\n throw new Error(errors.SEGMENT_TIME_UNSPECIFIED);\n }\n var segmentUrlMap = segmentUrls.map(function (segmentUrlObject) {\n return SegmentURLToSegmentObject(attributes, segmentUrlObject);\n });\n var segmentTimeInfo;\n if (duration) {\n segmentTimeInfo = parseByDuration(attributes);\n }\n if (segmentTimeline) {\n segmentTimeInfo = parseByTimeline(attributes, segmentTimeline);\n }\n var segments = segmentTimeInfo.map(function (segmentTime, index) {\n if (segmentUrlMap[index]) {\n var segment = segmentUrlMap[index]; // See DASH spec section 5.3.9.2.2\n // - if timescale isn't present on any level, default to 1.\n\n var timescale = attributes.timescale || 1; // - if presentationTimeOffset isn't present on any level, default to 0\n\n var presentationTimeOffset = attributes.presentationTimeOffset || 0;\n segment.timeline = segmentTime.timeline;\n segment.duration = segmentTime.duration;\n segment.number = segmentTime.number;\n segment.presentationTime = periodStart + (segmentTime.time - presentationTimeOffset) / timescale;\n return segment;\n } // Since we're mapping we should get rid of any blank segments (in case\n // the given SegmentTimeline is handling for more elements than we have\n // SegmentURLs for).\n }).filter(function (segment) {\n return segment;\n });\n return segments;\n};\nvar generateSegments = function generateSegments(_ref16) {\n var attributes = _ref16.attributes,\n segmentInfo = _ref16.segmentInfo;\n var segmentAttributes;\n var segmentsFn;\n if (segmentInfo.template) {\n segmentsFn = segmentsFromTemplate;\n segmentAttributes = merge(attributes, segmentInfo.template);\n } else if (segmentInfo.base) {\n segmentsFn = segmentsFromBase;\n segmentAttributes = merge(attributes, segmentInfo.base);\n } else if (segmentInfo.list) {\n segmentsFn = segmentsFromList;\n segmentAttributes = merge(attributes, segmentInfo.list);\n }\n var segmentsInfo = {\n attributes: attributes\n };\n if (!segmentsFn) {\n return segmentsInfo;\n }\n var segments = segmentsFn(segmentAttributes, segmentInfo.segmentTimeline); // The @duration attribute will be used to determin the playlist's targetDuration which\n // must be in seconds. Since we've generated the segment list, we no longer need\n // @duration to be in @timescale units, so we can convert it here.\n\n if (segmentAttributes.duration) {\n var _segmentAttributes = segmentAttributes,\n duration = _segmentAttributes.duration,\n _segmentAttributes$ti = _segmentAttributes.timescale,\n timescale = _segmentAttributes$ti === void 0 ? 1 : _segmentAttributes$ti;\n segmentAttributes.duration = duration / timescale;\n } else if (segments.length) {\n // if there is no @duration attribute, use the largest segment duration as\n // as target duration\n segmentAttributes.duration = segments.reduce(function (max, segment) {\n return Math.max(max, Math.ceil(segment.duration));\n }, 0);\n } else {\n segmentAttributes.duration = 0;\n }\n segmentsInfo.attributes = segmentAttributes;\n segmentsInfo.segments = segments; // This is a sidx box without actual segment information\n\n if (segmentInfo.base && segmentAttributes.indexRange) {\n segmentsInfo.sidx = segments[0];\n segmentsInfo.segments = [];\n }\n return segmentsInfo;\n};\nvar toPlaylists = function toPlaylists(representations) {\n return representations.map(generateSegments);\n};\nvar findChildren = function findChildren(element, name) {\n return from(element.childNodes).filter(function (_ref17) {\n var tagName = _ref17.tagName;\n return tagName === name;\n });\n};\nvar getContent = function getContent(element) {\n return element.textContent.trim();\n};\n\n/**\n * Converts the provided string that may contain a division operation to a number.\n *\n * @param {string} value - the provided string value\n *\n * @return {number} the parsed string value\n */\nvar parseDivisionValue = function parseDivisionValue(value) {\n return parseFloat(value.split('/').reduce(function (prev, current) {\n return prev / current;\n }));\n};\nvar parseDuration = function parseDuration(str) {\n var SECONDS_IN_YEAR = 365 * 24 * 60 * 60;\n var SECONDS_IN_MONTH = 30 * 24 * 60 * 60;\n var SECONDS_IN_DAY = 24 * 60 * 60;\n var SECONDS_IN_HOUR = 60 * 60;\n var SECONDS_IN_MIN = 60; // P10Y10M10DT10H10M10.1S\n\n var durationRegex = /P(?:(\\d*)Y)?(?:(\\d*)M)?(?:(\\d*)D)?(?:T(?:(\\d*)H)?(?:(\\d*)M)?(?:([\\d.]*)S)?)?/;\n var match = durationRegex.exec(str);\n if (!match) {\n return 0;\n }\n var _match$slice = match.slice(1),\n _match$slice2 = _slicedToArray(_match$slice, 6),\n year = _match$slice2[0],\n month = _match$slice2[1],\n day = _match$slice2[2],\n hour = _match$slice2[3],\n minute = _match$slice2[4],\n second = _match$slice2[5];\n return parseFloat(year || 0) * SECONDS_IN_YEAR + parseFloat(month || 0) * SECONDS_IN_MONTH + parseFloat(day || 0) * SECONDS_IN_DAY + parseFloat(hour || 0) * SECONDS_IN_HOUR + parseFloat(minute || 0) * SECONDS_IN_MIN + parseFloat(second || 0);\n};\nvar parseDate = function parseDate(str) {\n // Date format without timezone according to ISO 8601\n // YYY-MM-DDThh:mm:ss.ssssss\n var dateRegex = /^\\d+-\\d+-\\d+T\\d+:\\d+:\\d+(\\.\\d+)?$/; // If the date string does not specifiy a timezone, we must specifiy UTC. This is\n // expressed by ending with 'Z'\n\n if (dateRegex.test(str)) {\n str += 'Z';\n }\n return Date.parse(str);\n};\nvar parsers = {\n /**\n * Specifies the duration of the entire Media Presentation. Format is a duration string\n * as specified in ISO 8601\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The duration in seconds\n */\n mediaPresentationDuration: function mediaPresentationDuration(value) {\n return parseDuration(value);\n },\n /**\n * Specifies the Segment availability start time for all Segments referred to in this\n * MPD. For a dynamic manifest, it specifies the anchor for the earliest availability\n * time. Format is a date string as specified in ISO 8601\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The date as seconds from unix epoch\n */\n availabilityStartTime: function availabilityStartTime(value) {\n return parseDate(value) / 1000;\n },\n /**\n * Specifies the smallest period between potential changes to the MPD. Format is a\n * duration string as specified in ISO 8601\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The duration in seconds\n */\n minimumUpdatePeriod: function minimumUpdatePeriod(value) {\n return parseDuration(value);\n },\n /**\n * Specifies the suggested presentation delay. Format is a\n * duration string as specified in ISO 8601\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The duration in seconds\n */\n suggestedPresentationDelay: function suggestedPresentationDelay(value) {\n return parseDuration(value);\n },\n /**\n * specifices the type of mpd. Can be either \"static\" or \"dynamic\"\n *\n * @param {string} value\n * value of attribute as a string\n *\n * @return {string}\n * The type as a string\n */\n type: function type(value) {\n return value;\n },\n /**\n * Specifies the duration of the smallest time shifting buffer for any Representation\n * in the MPD. Format is a duration string as specified in ISO 8601\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The duration in seconds\n */\n timeShiftBufferDepth: function timeShiftBufferDepth(value) {\n return parseDuration(value);\n },\n /**\n * Specifies the PeriodStart time of the Period relative to the availabilityStarttime.\n * Format is a duration string as specified in ISO 8601\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The duration in seconds\n */\n start: function start(value) {\n return parseDuration(value);\n },\n /**\n * Specifies the width of the visual presentation\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed width\n */\n width: function width(value) {\n return parseInt(value, 10);\n },\n /**\n * Specifies the height of the visual presentation\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed height\n */\n height: function height(value) {\n return parseInt(value, 10);\n },\n /**\n * Specifies the bitrate of the representation\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed bandwidth\n */\n bandwidth: function bandwidth(value) {\n return parseInt(value, 10);\n },\n /**\n * Specifies the frame rate of the representation\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed frame rate\n */\n frameRate: function frameRate(value) {\n return parseDivisionValue(value);\n },\n /**\n * Specifies the number of the first Media Segment in this Representation in the Period\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed number\n */\n startNumber: function startNumber(value) {\n return parseInt(value, 10);\n },\n /**\n * Specifies the timescale in units per seconds\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed timescale\n */\n timescale: function timescale(value) {\n return parseInt(value, 10);\n },\n /**\n * Specifies the presentationTimeOffset.\n *\n * @param {string} value\n * value of the attribute as a string\n *\n * @return {number}\n * The parsed presentationTimeOffset\n */\n presentationTimeOffset: function presentationTimeOffset(value) {\n return parseInt(value, 10);\n },\n /**\n * Specifies the constant approximate Segment duration\n * NOTE: The element also contains an @duration attribute. This duration\n * specifies the duration of the Period. This attribute is currently not\n * supported by the rest of the parser, however we still check for it to prevent\n * errors.\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed duration\n */\n duration: function duration(value) {\n var parsedValue = parseInt(value, 10);\n if (isNaN(parsedValue)) {\n return parseDuration(value);\n }\n return parsedValue;\n },\n /**\n * Specifies the Segment duration, in units of the value of the @timescale.\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed duration\n */\n d: function d(value) {\n return parseInt(value, 10);\n },\n /**\n * Specifies the MPD start time, in @timescale units, the first Segment in the series\n * starts relative to the beginning of the Period\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed time\n */\n t: function t(value) {\n return parseInt(value, 10);\n },\n /**\n * Specifies the repeat count of the number of following contiguous Segments with the\n * same duration expressed by the value of @d\n *\n * @param {string} value\n * value of attribute as a string\n * @return {number}\n * The parsed number\n */\n r: function r(value) {\n return parseInt(value, 10);\n },\n /**\n * Specifies the presentationTime.\n *\n * @param {string} value\n * value of the attribute as a string\n *\n * @return {number}\n * The parsed presentationTime\n */\n presentationTime: function presentationTime(value) {\n return parseInt(value, 10);\n },\n /**\n * Default parser for all other attributes. Acts as a no-op and just returns the value\n * as a string\n *\n * @param {string} value\n * value of attribute as a string\n * @return {string}\n * Unparsed value\n */\n DEFAULT: function DEFAULT(value) {\n return value;\n }\n};\n/**\n * Gets all the attributes and values of the provided node, parses attributes with known\n * types, and returns an object with attribute names mapped to values.\n *\n * @param {Node} el\n * The node to parse attributes from\n * @return {Object}\n * Object with all attributes of el parsed\n */\n\nvar parseAttributes = function parseAttributes(el) {\n if (!(el && el.attributes)) {\n return {};\n }\n return from(el.attributes).reduce(function (a, e) {\n var parseFn = parsers[e.name] || parsers.DEFAULT;\n a[e.name] = parseFn(e.value);\n return a;\n }, {});\n};\nvar keySystemsMap = {\n 'urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b': 'org.w3.clearkey',\n 'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed': 'com.widevine.alpha',\n 'urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95': 'com.microsoft.playready',\n 'urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb': 'com.adobe.primetime',\n // ISO_IEC 23009-1_2022 5.8.5.2.2 The mp4 Protection Scheme\n 'urn:mpeg:dash:mp4protection:2011': 'mp4protection'\n};\n/**\n * Builds a list of urls that is the product of the reference urls and BaseURL values\n *\n * @param {Object[]} references\n * List of objects containing the reference URL as well as its attributes\n * @param {Node[]} baseUrlElements\n * List of BaseURL nodes from the mpd\n * @return {Object[]}\n * List of objects with resolved urls and attributes\n */\n\nvar buildBaseUrls = function buildBaseUrls(references, baseUrlElements) {\n if (!baseUrlElements.length) {\n return references;\n }\n return flatten(references.map(function (reference) {\n return baseUrlElements.map(function (baseUrlElement) {\n var initialBaseUrl = getContent(baseUrlElement);\n var resolvedBaseUrl = resolveUrl(reference.baseUrl, initialBaseUrl);\n var finalBaseUrl = merge(parseAttributes(baseUrlElement), {\n baseUrl: resolvedBaseUrl\n }); // If the URL is resolved, we want to get the serviceLocation from the reference\n // assuming there is no serviceLocation on the initialBaseUrl\n\n if (resolvedBaseUrl !== initialBaseUrl && !finalBaseUrl.serviceLocation && reference.serviceLocation) {\n finalBaseUrl.serviceLocation = reference.serviceLocation;\n }\n return finalBaseUrl;\n });\n }));\n};\n/**\n * Contains all Segment information for its containing AdaptationSet\n *\n * @typedef {Object} SegmentInformation\n * @property {Object|undefined} template\n * Contains the attributes for the SegmentTemplate node\n * @property {Object[]|undefined} segmentTimeline\n * Contains a list of atrributes for each S node within the SegmentTimeline node\n * @property {Object|undefined} list\n * Contains the attributes for the SegmentList node\n * @property {Object|undefined} base\n * Contains the attributes for the SegmentBase node\n */\n\n/**\n * Returns all available Segment information contained within the AdaptationSet node\n *\n * @param {Node} adaptationSet\n * The AdaptationSet node to get Segment information from\n * @return {SegmentInformation}\n * The Segment information contained within the provided AdaptationSet\n */\n\nvar getSegmentInformation = function getSegmentInformation(adaptationSet) {\n var segmentTemplate = findChildren(adaptationSet, 'SegmentTemplate')[0];\n var segmentList = findChildren(adaptationSet, 'SegmentList')[0];\n var segmentUrls = segmentList && findChildren(segmentList, 'SegmentURL').map(function (s) {\n return merge({\n tag: 'SegmentURL'\n }, parseAttributes(s));\n });\n var segmentBase = findChildren(adaptationSet, 'SegmentBase')[0];\n var segmentTimelineParentNode = segmentList || segmentTemplate;\n var segmentTimeline = segmentTimelineParentNode && findChildren(segmentTimelineParentNode, 'SegmentTimeline')[0];\n var segmentInitializationParentNode = segmentList || segmentBase || segmentTemplate;\n var segmentInitialization = segmentInitializationParentNode && findChildren(segmentInitializationParentNode, 'Initialization')[0]; // SegmentTemplate is handled slightly differently, since it can have both\n // @initialization and an node. @initialization can be templated,\n // while the node can have a url and range specified. If the has\n // both @initialization and an subelement we opt to override with\n // the node, as this interaction is not defined in the spec.\n\n var template = segmentTemplate && parseAttributes(segmentTemplate);\n if (template && segmentInitialization) {\n template.initialization = segmentInitialization && parseAttributes(segmentInitialization);\n } else if (template && template.initialization) {\n // If it is @initialization we convert it to an object since this is the format that\n // later functions will rely on for the initialization segment. This is only valid\n // for \n template.initialization = {\n sourceURL: template.initialization\n };\n }\n var segmentInfo = {\n template: template,\n segmentTimeline: segmentTimeline && findChildren(segmentTimeline, 'S').map(function (s) {\n return parseAttributes(s);\n }),\n list: segmentList && merge(parseAttributes(segmentList), {\n segmentUrls: segmentUrls,\n initialization: parseAttributes(segmentInitialization)\n }),\n base: segmentBase && merge(parseAttributes(segmentBase), {\n initialization: parseAttributes(segmentInitialization)\n })\n };\n Object.keys(segmentInfo).forEach(function (key) {\n if (!segmentInfo[key]) {\n delete segmentInfo[key];\n }\n });\n return segmentInfo;\n};\n/**\n * Contains Segment information and attributes needed to construct a Playlist object\n * from a Representation\n *\n * @typedef {Object} RepresentationInformation\n * @property {SegmentInformation} segmentInfo\n * Segment information for this Representation\n * @property {Object} attributes\n * Inherited attributes for this Representation\n */\n\n/**\n * Maps a Representation node to an object containing Segment information and attributes\n *\n * @name inheritBaseUrlsCallback\n * @function\n * @param {Node} representation\n * Representation node from the mpd\n * @return {RepresentationInformation}\n * Representation information needed to construct a Playlist object\n */\n\n/**\n * Returns a callback for Array.prototype.map for mapping Representation nodes to\n * Segment information and attributes using inherited BaseURL nodes.\n *\n * @param {Object} adaptationSetAttributes\n * Contains attributes inherited by the AdaptationSet\n * @param {Object[]} adaptationSetBaseUrls\n * List of objects containing resolved base URLs and attributes\n * inherited by the AdaptationSet\n * @param {SegmentInformation} adaptationSetSegmentInfo\n * Contains Segment information for the AdaptationSet\n * @return {inheritBaseUrlsCallback}\n * Callback map function\n */\n\nvar inheritBaseUrls = function inheritBaseUrls(adaptationSetAttributes, adaptationSetBaseUrls, adaptationSetSegmentInfo) {\n return function (representation) {\n var repBaseUrlElements = findChildren(representation, 'BaseURL');\n var repBaseUrls = buildBaseUrls(adaptationSetBaseUrls, repBaseUrlElements);\n var attributes = merge(adaptationSetAttributes, parseAttributes(representation));\n var representationSegmentInfo = getSegmentInformation(representation);\n return repBaseUrls.map(function (baseUrl) {\n return {\n segmentInfo: merge(adaptationSetSegmentInfo, representationSegmentInfo),\n attributes: merge(attributes, baseUrl)\n };\n });\n };\n};\n/**\n * Tranforms a series of content protection nodes to\n * an object containing pssh data by key system\n *\n * @param {Node[]} contentProtectionNodes\n * Content protection nodes\n * @return {Object}\n * Object containing pssh data by key system\n */\n\nvar generateKeySystemInformation = function generateKeySystemInformation(contentProtectionNodes) {\n return contentProtectionNodes.reduce(function (acc, node) {\n var attributes = parseAttributes(node); // Although it could be argued that according to the UUID RFC spec the UUID string (a-f chars) should be generated\n // as a lowercase string it also mentions it should be treated as case-insensitive on input. Since the key system\n // UUIDs in the keySystemsMap are hardcoded as lowercase in the codebase there isn't any reason not to do\n // .toLowerCase() on the input UUID string from the manifest (at least I could not think of one).\n\n if (attributes.schemeIdUri) {\n attributes.schemeIdUri = attributes.schemeIdUri.toLowerCase();\n }\n var keySystem = keySystemsMap[attributes.schemeIdUri];\n if (keySystem) {\n acc[keySystem] = {\n attributes: attributes\n };\n var psshNode = findChildren(node, 'cenc:pssh')[0];\n if (psshNode) {\n var pssh = getContent(psshNode);\n acc[keySystem].pssh = pssh && decodeB64ToUint8Array(pssh);\n }\n }\n return acc;\n }, {});\n}; // defined in ANSI_SCTE 214-1 2016\n\nvar parseCaptionServiceMetadata = function parseCaptionServiceMetadata(service) {\n // 608 captions\n if (service.schemeIdUri === 'urn:scte:dash:cc:cea-608:2015') {\n var _values = typeof service.value !== 'string' ? [] : service.value.split(';');\n return _values.map(function (value) {\n var channel;\n var language; // default language to value\n\n language = value;\n if (/^CC\\d=/.test(value)) {\n var _value$split = value.split('=');\n var _value$split2 = _slicedToArray(_value$split, 2);\n channel = _value$split2[0];\n language = _value$split2[1];\n } else if (/^CC\\d$/.test(value)) {\n channel = value;\n }\n return {\n channel: channel,\n language: language\n };\n });\n } else if (service.schemeIdUri === 'urn:scte:dash:cc:cea-708:2015') {\n var _values2 = typeof service.value !== 'string' ? [] : service.value.split(';');\n return _values2.map(function (value) {\n var flags = {\n // service or channel number 1-63\n 'channel': undefined,\n // language is a 3ALPHA per ISO 639.2/B\n // field is required\n 'language': undefined,\n // BIT 1/0 or ?\n // default value is 1, meaning 16:9 aspect ratio, 0 is 4:3, ? is unknown\n 'aspectRatio': 1,\n // BIT 1/0\n // easy reader flag indicated the text is tailed to the needs of beginning readers\n // default 0, or off\n 'easyReader': 0,\n // BIT 1/0\n // If 3d metadata is present (CEA-708.1) then 1\n // default 0\n '3D': 0\n };\n if (/=/.test(value)) {\n var _value$split3 = value.split('='),\n _value$split4 = _slicedToArray(_value$split3, 2),\n channel = _value$split4[0],\n _value$split4$ = _value$split4[1],\n opts = _value$split4$ === void 0 ? '' : _value$split4$;\n flags.channel = channel;\n flags.language = value;\n opts.split(',').forEach(function (opt) {\n var _opt$split = opt.split(':'),\n _opt$split2 = _slicedToArray(_opt$split, 2),\n name = _opt$split2[0],\n val = _opt$split2[1];\n if (name === 'lang') {\n flags.language = val; // er for easyReadery\n } else if (name === 'er') {\n flags.easyReader = Number(val); // war for wide aspect ratio\n } else if (name === 'war') {\n flags.aspectRatio = Number(val);\n } else if (name === '3D') {\n flags['3D'] = Number(val);\n }\n });\n } else {\n flags.language = value;\n }\n if (flags.channel) {\n flags.channel = 'SERVICE' + flags.channel;\n }\n return flags;\n });\n }\n};\n/**\n * A map callback that will parse all event stream data for a collection of periods\n * DASH ISO_IEC_23009 5.10.2.2\n * https://dashif-documents.azurewebsites.net/Events/master/event.html#mpd-event-timing\n *\n * @param {PeriodInformation} period object containing necessary period information\n * @return a collection of parsed eventstream event objects\n */\n\nvar toEventStream = function toEventStream(period) {\n // get and flatten all EventStreams tags and parse attributes and children\n return flatten(findChildren(period.node, 'EventStream').map(function (eventStream) {\n var eventStreamAttributes = parseAttributes(eventStream);\n var schemeIdUri = eventStreamAttributes.schemeIdUri; // find all Events per EventStream tag and map to return objects\n\n return findChildren(eventStream, 'Event').map(function (event) {\n var eventAttributes = parseAttributes(event);\n var presentationTime = eventAttributes.presentationTime || 0;\n var timescale = eventStreamAttributes.timescale || 1;\n var duration = eventAttributes.duration || 0;\n var start = presentationTime / timescale + period.attributes.start;\n return {\n schemeIdUri: schemeIdUri,\n value: eventStreamAttributes.value,\n id: eventAttributes.id,\n start: start,\n end: start + duration / timescale,\n messageData: getContent(event) || eventAttributes.messageData,\n contentEncoding: eventStreamAttributes.contentEncoding,\n presentationTimeOffset: eventStreamAttributes.presentationTimeOffset || 0\n };\n });\n }));\n};\n/**\n * Maps an AdaptationSet node to a list of Representation information objects\n *\n * @name toRepresentationsCallback\n * @function\n * @param {Node} adaptationSet\n * AdaptationSet node from the mpd\n * @return {RepresentationInformation[]}\n * List of objects containing Representaion information\n */\n\n/**\n * Returns a callback for Array.prototype.map for mapping AdaptationSet nodes to a list of\n * Representation information objects\n *\n * @param {Object} periodAttributes\n * Contains attributes inherited by the Period\n * @param {Object[]} periodBaseUrls\n * Contains list of objects with resolved base urls and attributes\n * inherited by the Period\n * @param {string[]} periodSegmentInfo\n * Contains Segment Information at the period level\n * @return {toRepresentationsCallback}\n * Callback map function\n */\n\nvar toRepresentations = function toRepresentations(periodAttributes, periodBaseUrls, periodSegmentInfo) {\n return function (adaptationSet) {\n var adaptationSetAttributes = parseAttributes(adaptationSet);\n var adaptationSetBaseUrls = buildBaseUrls(periodBaseUrls, findChildren(adaptationSet, 'BaseURL'));\n var role = findChildren(adaptationSet, 'Role')[0];\n var roleAttributes = {\n role: parseAttributes(role)\n };\n var attrs = merge(periodAttributes, adaptationSetAttributes, roleAttributes);\n var accessibility = findChildren(adaptationSet, 'Accessibility')[0];\n var captionServices = parseCaptionServiceMetadata(parseAttributes(accessibility));\n if (captionServices) {\n attrs = merge(attrs, {\n captionServices: captionServices\n });\n }\n var label = findChildren(adaptationSet, 'Label')[0];\n if (label && label.childNodes.length) {\n var labelVal = label.childNodes[0].nodeValue.trim();\n attrs = merge(attrs, {\n label: labelVal\n });\n }\n var contentProtection = generateKeySystemInformation(findChildren(adaptationSet, 'ContentProtection'));\n if (Object.keys(contentProtection).length) {\n attrs = merge(attrs, {\n contentProtection: contentProtection\n });\n }\n var segmentInfo = getSegmentInformation(adaptationSet);\n var representations = findChildren(adaptationSet, 'Representation');\n var adaptationSetSegmentInfo = merge(periodSegmentInfo, segmentInfo);\n return flatten(representations.map(inheritBaseUrls(attrs, adaptationSetBaseUrls, adaptationSetSegmentInfo)));\n };\n};\n/**\n * Contains all period information for mapping nodes onto adaptation sets.\n *\n * @typedef {Object} PeriodInformation\n * @property {Node} period.node\n * Period node from the mpd\n * @property {Object} period.attributes\n * Parsed period attributes from node plus any added\n */\n\n/**\n * Maps a PeriodInformation object to a list of Representation information objects for all\n * AdaptationSet nodes contained within the Period.\n *\n * @name toAdaptationSetsCallback\n * @function\n * @param {PeriodInformation} period\n * Period object containing necessary period information\n * @param {number} periodStart\n * Start time of the Period within the mpd\n * @return {RepresentationInformation[]}\n * List of objects containing Representaion information\n */\n\n/**\n * Returns a callback for Array.prototype.map for mapping Period nodes to a list of\n * Representation information objects\n *\n * @param {Object} mpdAttributes\n * Contains attributes inherited by the mpd\n * @param {Object[]} mpdBaseUrls\n * Contains list of objects with resolved base urls and attributes\n * inherited by the mpd\n * @return {toAdaptationSetsCallback}\n * Callback map function\n */\n\nvar toAdaptationSets = function toAdaptationSets(mpdAttributes, mpdBaseUrls) {\n return function (period, index) {\n var periodBaseUrls = buildBaseUrls(mpdBaseUrls, findChildren(period.node, 'BaseURL'));\n var periodAttributes = merge(mpdAttributes, {\n periodStart: period.attributes.start\n });\n if (typeof period.attributes.duration === 'number') {\n periodAttributes.periodDuration = period.attributes.duration;\n }\n var adaptationSets = findChildren(period.node, 'AdaptationSet');\n var periodSegmentInfo = getSegmentInformation(period.node);\n return flatten(adaptationSets.map(toRepresentations(periodAttributes, periodBaseUrls, periodSegmentInfo)));\n };\n};\n/**\n * Tranforms an array of content steering nodes into an object\n * containing CDN content steering information from the MPD manifest.\n *\n * For more information on the DASH spec for Content Steering parsing, see:\n * https://dashif.org/docs/DASH-IF-CTS-00XX-Content-Steering-Community-Review.pdf\n *\n * @param {Node[]} contentSteeringNodes\n * Content steering nodes\n * @param {Function} eventHandler\n * The event handler passed into the parser options to handle warnings\n * @return {Object}\n * Object containing content steering data\n */\n\nvar generateContentSteeringInformation = function generateContentSteeringInformation(contentSteeringNodes, eventHandler) {\n // If there are more than one ContentSteering tags, throw an error\n if (contentSteeringNodes.length > 1) {\n eventHandler({\n type: 'warn',\n message: 'The MPD manifest should contain no more than one ContentSteering tag'\n });\n } // Return a null value if there are no ContentSteering tags\n\n if (!contentSteeringNodes.length) {\n return null;\n }\n var infoFromContentSteeringTag = merge({\n serverURL: getContent(contentSteeringNodes[0])\n }, parseAttributes(contentSteeringNodes[0])); // Converts `queryBeforeStart` to a boolean, as well as setting the default value\n // to `false` if it doesn't exist\n\n infoFromContentSteeringTag.queryBeforeStart = infoFromContentSteeringTag.queryBeforeStart === 'true';\n return infoFromContentSteeringTag;\n};\n/**\n * Gets Period@start property for a given period.\n *\n * @param {Object} options\n * Options object\n * @param {Object} options.attributes\n * Period attributes\n * @param {Object} [options.priorPeriodAttributes]\n * Prior period attributes (if prior period is available)\n * @param {string} options.mpdType\n * The MPD@type these periods came from\n * @return {number|null}\n * The period start, or null if it's an early available period or error\n */\n\nvar getPeriodStart = function getPeriodStart(_ref18) {\n var attributes = _ref18.attributes,\n priorPeriodAttributes = _ref18.priorPeriodAttributes,\n mpdType = _ref18.mpdType;\n // Summary of period start time calculation from DASH spec section 5.3.2.1\n //\n // A period's start is the first period's start + time elapsed after playing all\n // prior periods to this one. Periods continue one after the other in time (without\n // gaps) until the end of the presentation.\n //\n // The value of Period@start should be:\n // 1. if Period@start is present: value of Period@start\n // 2. if previous period exists and it has @duration: previous Period@start +\n // previous Period@duration\n // 3. if this is first period and MPD@type is 'static': 0\n // 4. in all other cases, consider the period an \"early available period\" (note: not\n // currently supported)\n // (1)\n if (typeof attributes.start === 'number') {\n return attributes.start;\n } // (2)\n\n if (priorPeriodAttributes && typeof priorPeriodAttributes.start === 'number' && typeof priorPeriodAttributes.duration === 'number') {\n return priorPeriodAttributes.start + priorPeriodAttributes.duration;\n } // (3)\n\n if (!priorPeriodAttributes && mpdType === 'static') {\n return 0;\n } // (4)\n // There is currently no logic for calculating the Period@start value if there is\n // no Period@start or prior Period@start and Period@duration available. This is not made\n // explicit by the DASH interop guidelines or the DASH spec, however, since there's\n // nothing about any other resolution strategies, it's implied. Thus, this case should\n // be considered an early available period, or error, and null should suffice for both\n // of those cases.\n\n return null;\n};\n/**\n * Traverses the mpd xml tree to generate a list of Representation information objects\n * that have inherited attributes from parent nodes\n *\n * @param {Node} mpd\n * The root node of the mpd\n * @param {Object} options\n * Available options for inheritAttributes\n * @param {string} options.manifestUri\n * The uri source of the mpd\n * @param {number} options.NOW\n * Current time per DASH IOP. Default is current time in ms since epoch\n * @param {number} options.clientOffset\n * Client time difference from NOW (in milliseconds)\n * @return {RepresentationInformation[]}\n * List of objects containing Representation information\n */\n\nvar inheritAttributes = function inheritAttributes(mpd) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var _options$manifestUri = options.manifestUri,\n manifestUri = _options$manifestUri === void 0 ? '' : _options$manifestUri,\n _options$NOW = options.NOW,\n NOW = _options$NOW === void 0 ? Date.now() : _options$NOW,\n _options$clientOffset = options.clientOffset,\n clientOffset = _options$clientOffset === void 0 ? 0 : _options$clientOffset,\n _options$eventHandler = options.eventHandler,\n eventHandler = _options$eventHandler === void 0 ? function () {} : _options$eventHandler;\n var periodNodes = findChildren(mpd, 'Period');\n if (!periodNodes.length) {\n throw new Error(errors.INVALID_NUMBER_OF_PERIOD);\n }\n var locations = findChildren(mpd, 'Location');\n var mpdAttributes = parseAttributes(mpd);\n var mpdBaseUrls = buildBaseUrls([{\n baseUrl: manifestUri\n }], findChildren(mpd, 'BaseURL'));\n var contentSteeringNodes = findChildren(mpd, 'ContentSteering'); // See DASH spec section 5.3.1.2, Semantics of MPD element. Default type to 'static'.\n\n mpdAttributes.type = mpdAttributes.type || 'static';\n mpdAttributes.sourceDuration = mpdAttributes.mediaPresentationDuration || 0;\n mpdAttributes.NOW = NOW;\n mpdAttributes.clientOffset = clientOffset;\n if (locations.length) {\n mpdAttributes.locations = locations.map(getContent);\n }\n var periods = []; // Since toAdaptationSets acts on individual periods right now, the simplest approach to\n // adding properties that require looking at prior periods is to parse attributes and add\n // missing ones before toAdaptationSets is called. If more such properties are added, it\n // may be better to refactor toAdaptationSets.\n\n periodNodes.forEach(function (node, index) {\n var attributes = parseAttributes(node); // Use the last modified prior period, as it may contain added information necessary\n // for this period.\n\n var priorPeriod = periods[index - 1];\n attributes.start = getPeriodStart({\n attributes: attributes,\n priorPeriodAttributes: priorPeriod ? priorPeriod.attributes : null,\n mpdType: mpdAttributes.type\n });\n periods.push({\n node: node,\n attributes: attributes\n });\n });\n return {\n locations: mpdAttributes.locations,\n contentSteeringInfo: generateContentSteeringInformation(contentSteeringNodes, eventHandler),\n // TODO: There are occurences where this `representationInfo` array contains undesired\n // duplicates. This generally occurs when there are multiple BaseURL nodes that are\n // direct children of the MPD node. When we attempt to resolve URLs from a combination of the\n // parent BaseURL and a child BaseURL, and the value does not resolve,\n // we end up returning the child BaseURL multiple times.\n // We need to determine a way to remove these duplicates in a safe way.\n // See: https://github.com/videojs/mpd-parser/pull/17#discussion_r162750527\n representationInfo: flatten(periods.map(toAdaptationSets(mpdAttributes, mpdBaseUrls))),\n eventStream: flatten(periods.map(toEventStream))\n };\n};\nvar stringToMpdXml = function stringToMpdXml(manifestString) {\n if (manifestString === '') {\n throw new Error(errors.DASH_EMPTY_MANIFEST);\n }\n var parser = new DOMParser();\n var xml;\n var mpd;\n try {\n xml = parser.parseFromString(manifestString, 'application/xml');\n mpd = xml && xml.documentElement.tagName === 'MPD' ? xml.documentElement : null;\n } catch (e) {// ie 11 throws on invalid xml\n }\n if (!mpd || mpd && mpd.getElementsByTagName('parsererror').length > 0) {\n throw new Error(errors.DASH_INVALID_XML);\n }\n return mpd;\n};\n\n/**\n * Parses the manifest for a UTCTiming node, returning the nodes attributes if found\n *\n * @param {string} mpd\n * XML string of the MPD manifest\n * @return {Object|null}\n * Attributes of UTCTiming node specified in the manifest. Null if none found\n */\n\nvar parseUTCTimingScheme = function parseUTCTimingScheme(mpd) {\n var UTCTimingNode = findChildren(mpd, 'UTCTiming')[0];\n if (!UTCTimingNode) {\n return null;\n }\n var attributes = parseAttributes(UTCTimingNode);\n switch (attributes.schemeIdUri) {\n case 'urn:mpeg:dash:utc:http-head:2014':\n case 'urn:mpeg:dash:utc:http-head:2012':\n attributes.method = 'HEAD';\n break;\n case 'urn:mpeg:dash:utc:http-xsdate:2014':\n case 'urn:mpeg:dash:utc:http-iso:2014':\n case 'urn:mpeg:dash:utc:http-xsdate:2012':\n case 'urn:mpeg:dash:utc:http-iso:2012':\n attributes.method = 'GET';\n break;\n case 'urn:mpeg:dash:utc:direct:2014':\n case 'urn:mpeg:dash:utc:direct:2012':\n attributes.method = 'DIRECT';\n attributes.value = Date.parse(attributes.value);\n break;\n case 'urn:mpeg:dash:utc:http-ntp:2014':\n case 'urn:mpeg:dash:utc:ntp:2014':\n case 'urn:mpeg:dash:utc:sntp:2014':\n default:\n throw new Error(errors.UNSUPPORTED_UTC_TIMING_SCHEME);\n }\n return attributes;\n};\nvar VERSION = version;\n/*\n * Given a DASH manifest string and options, parses the DASH manifest into an object in the\n * form outputed by m3u8-parser and accepted by videojs/http-streaming.\n *\n * For live DASH manifests, if `previousManifest` is provided in options, then the newly\n * parsed DASH manifest will have its media sequence and discontinuity sequence values\n * updated to reflect its position relative to the prior manifest.\n *\n * @param {string} manifestString - the DASH manifest as a string\n * @param {options} [options] - any options\n *\n * @return {Object} the manifest object\n */\n\nvar parse = function parse(manifestString) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var parsedManifestInfo = inheritAttributes(stringToMpdXml(manifestString), options);\n var playlists = toPlaylists(parsedManifestInfo.representationInfo);\n return toM3u8({\n dashPlaylists: playlists,\n locations: parsedManifestInfo.locations,\n contentSteering: parsedManifestInfo.contentSteeringInfo,\n sidxMapping: options.sidxMapping,\n previousManifest: options.previousManifest,\n eventStream: parsedManifestInfo.eventStream\n });\n};\n/**\n * Parses the manifest for a UTCTiming node, returning the nodes attributes if found\n *\n * @param {string} manifestString\n * XML string of the MPD manifest\n * @return {Object|null}\n * Attributes of UTCTiming node specified in the manifest. Null if none found\n */\n\nvar parseUTCTiming = function parseUTCTiming(manifestString) {\n return parseUTCTimingScheme(stringToMpdXml(manifestString));\n};\nexport { VERSION, addSidxSegmentsToPlaylist$1 as addSidxSegmentsToPlaylist, generateSidxKey, inheritAttributes, parse, parseUTCTiming, stringToMpdXml, toM3u8, toPlaylists };","/**\n * Loops through all supported media groups in master and calls the provided\n * callback for each group\n *\n * @param {Object} master\n * The parsed master manifest object\n * @param {string[]} groups\n * The media groups to call the callback for\n * @param {Function} callback\n * Callback to call for each media group\n */\nexport var forEachMediaGroup = function forEachMediaGroup(master, groups, callback) {\n groups.forEach(function (mediaType) {\n for (var groupKey in master.mediaGroups[mediaType]) {\n for (var labelKey in master.mediaGroups[mediaType][groupKey]) {\n var mediaProperties = master.mediaGroups[mediaType][groupKey][labelKey];\n callback(mediaProperties, mediaType, groupKey, labelKey);\n }\n }\n });\n};","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar _assign = require('object-assign');\nvar ReactBaseClasses = require('./ReactBaseClasses');\nvar ReactChildren = require('./ReactChildren');\nvar ReactDOMFactories = require('./ReactDOMFactories');\nvar ReactElement = require('./ReactElement');\nvar ReactPropTypes = require('./ReactPropTypes');\nvar ReactVersion = require('./ReactVersion');\nvar createReactClass = require('./createClass');\nvar onlyChild = require('./onlyChild');\nvar createElement = ReactElement.createElement;\nvar createFactory = ReactElement.createFactory;\nvar cloneElement = ReactElement.cloneElement;\nif (process.env.NODE_ENV !== 'production') {\n var lowPriorityWarning = require('./lowPriorityWarning');\n var canDefineProperty = require('./canDefineProperty');\n var ReactElementValidator = require('./ReactElementValidator');\n var didWarnPropTypesDeprecated = false;\n createElement = ReactElementValidator.createElement;\n createFactory = ReactElementValidator.createFactory;\n cloneElement = ReactElementValidator.cloneElement;\n}\nvar __spread = _assign;\nvar createMixin = function createMixin(mixin) {\n return mixin;\n};\nif (process.env.NODE_ENV !== 'production') {\n var warnedForSpread = false;\n var warnedForCreateMixin = false;\n __spread = function __spread() {\n lowPriorityWarning(warnedForSpread, 'React.__spread is deprecated and should not be used. Use ' + 'Object.assign directly or another helper function with similar ' + 'semantics. You may be seeing this warning due to your compiler. ' + 'See https://fb.me/react-spread-deprecation for more details.');\n warnedForSpread = true;\n return _assign.apply(null, arguments);\n };\n createMixin = function createMixin(mixin) {\n lowPriorityWarning(warnedForCreateMixin, 'React.createMixin is deprecated and should not be used. ' + 'In React v16.0, it will be removed. ' + 'You can use this mixin directly instead. ' + 'See https://fb.me/createmixin-was-never-implemented for more info.');\n warnedForCreateMixin = true;\n return mixin;\n };\n}\nvar React = {\n // Modern\n\n Children: {\n map: ReactChildren.map,\n forEach: ReactChildren.forEach,\n count: ReactChildren.count,\n toArray: ReactChildren.toArray,\n only: onlyChild\n },\n Component: ReactBaseClasses.Component,\n PureComponent: ReactBaseClasses.PureComponent,\n createElement: createElement,\n cloneElement: cloneElement,\n isValidElement: ReactElement.isValidElement,\n // Classic\n\n PropTypes: ReactPropTypes,\n createClass: createReactClass,\n createFactory: createFactory,\n createMixin: createMixin,\n // This looks DOM specific but these are actually isomorphic helpers\n // since they are just generating DOM strings.\n DOM: ReactDOMFactories,\n version: ReactVersion,\n // Deprecated hook for JSX spread, don't use this for anything.\n __spread: __spread\n};\nif (process.env.NODE_ENV !== 'production') {\n var warnedForCreateClass = false;\n if (canDefineProperty) {\n Object.defineProperty(React, 'PropTypes', {\n get: function get() {\n lowPriorityWarning(didWarnPropTypesDeprecated, 'Accessing PropTypes via the main React package is deprecated,' + ' and will be removed in React v16.0.' + ' Use the latest available v15.* prop-types package from npm instead.' + ' For info on usage, compatibility, migration and more, see ' + 'https://fb.me/prop-types-docs');\n didWarnPropTypesDeprecated = true;\n return ReactPropTypes;\n }\n });\n Object.defineProperty(React, 'createClass', {\n get: function get() {\n lowPriorityWarning(warnedForCreateClass, 'Accessing createClass via the main React package is deprecated,' + ' and will be removed in React v16.0.' + \" Use a plain JavaScript class instead. If you're not yet \" + 'ready to migrate, create-react-class v15.* is available ' + 'on npm as a temporary, drop-in replacement. ' + 'For more info see https://fb.me/react-create-class');\n warnedForCreateClass = true;\n return createReactClass;\n }\n });\n }\n\n // React.DOM factories are deprecated. Wrap these methods so that\n // invocations of the React.DOM namespace and alert users to switch\n // to the `react-dom-factories` package.\n React.DOM = {};\n var warnedForFactories = false;\n Object.keys(ReactDOMFactories).forEach(function (factory) {\n React.DOM[factory] = function () {\n if (!warnedForFactories) {\n lowPriorityWarning(false, 'Accessing factories like React.DOM.%s has been deprecated ' + 'and will be removed in v16.0+. Use the ' + 'react-dom-factories package instead. ' + ' Version 1.0 provides a drop-in replacement.' + ' For more info, see https://fb.me/react-dom-factories', factory);\n warnedForFactories = true;\n }\n return ReactDOMFactories[factory].apply(ReactDOMFactories, arguments);\n };\n });\n}\nmodule.exports = React;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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 */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\nvar invariant = require('fbjs/lib/invariant');\n\n/**\n * Static poolers. Several custom versions for each potential number of\n * arguments. A completely generic pooler is easy to implement, but would\n * require accessing the `arguments` object. In each of these, `this` refers to\n * the Class itself, not an instance. If any others are needed, simply add them\n * here, or in their own files.\n */\nvar oneArgumentPooler = function oneArgumentPooler(copyFieldsFrom) {\n var Klass = this;\n if (Klass.instancePool.length) {\n var instance = Klass.instancePool.pop();\n Klass.call(instance, copyFieldsFrom);\n return instance;\n } else {\n return new Klass(copyFieldsFrom);\n }\n};\nvar twoArgumentPooler = function twoArgumentPooler(a1, a2) {\n var Klass = this;\n if (Klass.instancePool.length) {\n var instance = Klass.instancePool.pop();\n Klass.call(instance, a1, a2);\n return instance;\n } else {\n return new Klass(a1, a2);\n }\n};\nvar threeArgumentPooler = function threeArgumentPooler(a1, a2, a3) {\n var Klass = this;\n if (Klass.instancePool.length) {\n var instance = Klass.instancePool.pop();\n Klass.call(instance, a1, a2, a3);\n return instance;\n } else {\n return new Klass(a1, a2, a3);\n }\n};\nvar fourArgumentPooler = function fourArgumentPooler(a1, a2, a3, a4) {\n var Klass = this;\n if (Klass.instancePool.length) {\n var instance = Klass.instancePool.pop();\n Klass.call(instance, a1, a2, a3, a4);\n return instance;\n } else {\n return new Klass(a1, a2, a3, a4);\n }\n};\nvar standardReleaser = function standardReleaser(instance) {\n var Klass = this;\n !(instance instanceof Klass) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0;\n instance.destructor();\n if (Klass.instancePool.length < Klass.poolSize) {\n Klass.instancePool.push(instance);\n }\n};\nvar DEFAULT_POOL_SIZE = 10;\nvar DEFAULT_POOLER = oneArgumentPooler;\n\n/**\n * Augments `CopyConstructor` to be a poolable class, augmenting only the class\n * itself (statically) not adding any prototypical fields. Any CopyConstructor\n * you give this may have a `poolSize` property, and will look for a\n * prototypical `destructor` on instances.\n *\n * @param {Function} CopyConstructor Constructor that can be used to reset.\n * @param {Function} pooler Customizable pooler.\n */\nvar addPoolingTo = function addPoolingTo(CopyConstructor, pooler) {\n // Casting as any so that flow ignores the actual implementation and trusts\n // it to match the type we declared\n var NewKlass = CopyConstructor;\n NewKlass.instancePool = [];\n NewKlass.getPooled = pooler || DEFAULT_POOLER;\n if (!NewKlass.poolSize) {\n NewKlass.poolSize = DEFAULT_POOL_SIZE;\n }\n NewKlass.release = standardReleaser;\n return NewKlass;\n};\nvar PooledClass = {\n addPoolingTo: addPoolingTo,\n oneArgumentPooler: oneArgumentPooler,\n twoArgumentPooler: twoArgumentPooler,\n threeArgumentPooler: threeArgumentPooler,\n fourArgumentPooler: fourArgumentPooler\n};\nmodule.exports = PooledClass;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar ReactRef = require('./ReactRef');\nvar ReactInstrumentation = require('./ReactInstrumentation');\nvar warning = require('fbjs/lib/warning');\n\n/**\n * Helper to call ReactRef.attachRefs with this composite component, split out\n * to avoid allocations in the transaction mount-ready queue.\n */\nfunction attachRefs() {\n ReactRef.attachRefs(this, this._currentElement);\n}\nvar ReactReconciler = {\n /**\n * Initializes the component, renders markup, and registers event listeners.\n *\n * @param {ReactComponent} internalInstance\n * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction\n * @param {?object} the containing host component instance\n * @param {?object} info about the host container\n * @return {?string} Rendered markup to be inserted into the DOM.\n * @final\n * @internal\n */\n mountComponent: function mountComponent(internalInstance, transaction, hostParent, hostContainerInfo, context, parentDebugID)\n // 0 in production and for roots\n {\n if (process.env.NODE_ENV !== 'production') {\n if (internalInstance._debugID !== 0) {\n ReactInstrumentation.debugTool.onBeforeMountComponent(internalInstance._debugID, internalInstance._currentElement, parentDebugID);\n }\n }\n var markup = internalInstance.mountComponent(transaction, hostParent, hostContainerInfo, context, parentDebugID);\n if (internalInstance._currentElement && internalInstance._currentElement.ref != null) {\n transaction.getReactMountReady().enqueue(attachRefs, internalInstance);\n }\n if (process.env.NODE_ENV !== 'production') {\n if (internalInstance._debugID !== 0) {\n ReactInstrumentation.debugTool.onMountComponent(internalInstance._debugID);\n }\n }\n return markup;\n },\n /**\n * Returns a value that can be passed to\n * ReactComponentEnvironment.replaceNodeWithMarkup.\n */\n getHostNode: function getHostNode(internalInstance) {\n return internalInstance.getHostNode();\n },\n /**\n * Releases any resources allocated by `mountComponent`.\n *\n * @final\n * @internal\n */\n unmountComponent: function unmountComponent(internalInstance, safely) {\n if (process.env.NODE_ENV !== 'production') {\n if (internalInstance._debugID !== 0) {\n ReactInstrumentation.debugTool.onBeforeUnmountComponent(internalInstance._debugID);\n }\n }\n ReactRef.detachRefs(internalInstance, internalInstance._currentElement);\n internalInstance.unmountComponent(safely);\n if (process.env.NODE_ENV !== 'production') {\n if (internalInstance._debugID !== 0) {\n ReactInstrumentation.debugTool.onUnmountComponent(internalInstance._debugID);\n }\n }\n },\n /**\n * Update a component using a new element.\n *\n * @param {ReactComponent} internalInstance\n * @param {ReactElement} nextElement\n * @param {ReactReconcileTransaction} transaction\n * @param {object} context\n * @internal\n */\n receiveComponent: function receiveComponent(internalInstance, nextElement, transaction, context) {\n var prevElement = internalInstance._currentElement;\n if (nextElement === prevElement && context === internalInstance._context) {\n // Since elements are immutable after the owner is rendered,\n // we can do a cheap identity compare here to determine if this is a\n // superfluous reconcile. It's possible for state to be mutable but such\n // change should trigger an update of the owner which would recreate\n // the element. We explicitly check for the existence of an owner since\n // it's possible for an element created outside a composite to be\n // deeply mutated and reused.\n\n // TODO: Bailing out early is just a perf optimization right?\n // TODO: Removing the return statement should affect correctness?\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (internalInstance._debugID !== 0) {\n ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, nextElement);\n }\n }\n var refsChanged = ReactRef.shouldUpdateRefs(prevElement, nextElement);\n if (refsChanged) {\n ReactRef.detachRefs(internalInstance, prevElement);\n }\n internalInstance.receiveComponent(nextElement, transaction, context);\n if (refsChanged && internalInstance._currentElement && internalInstance._currentElement.ref != null) {\n transaction.getReactMountReady().enqueue(attachRefs, internalInstance);\n }\n if (process.env.NODE_ENV !== 'production') {\n if (internalInstance._debugID !== 0) {\n ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID);\n }\n }\n },\n /**\n * Flush any dirty changes in a component.\n *\n * @param {ReactComponent} internalInstance\n * @param {ReactReconcileTransaction} transaction\n * @internal\n */\n performUpdateIfNecessary: function performUpdateIfNecessary(internalInstance, transaction, updateBatchNumber) {\n if (internalInstance._updateBatchNumber !== updateBatchNumber) {\n // The component's enqueued batch number should always be the current\n // batch or the following one.\n process.env.NODE_ENV !== 'production' ? warning(internalInstance._updateBatchNumber == null || internalInstance._updateBatchNumber === updateBatchNumber + 1, 'performUpdateIfNecessary: Unexpected batch number (current %s, ' + 'pending %s)', updateBatchNumber, internalInstance._updateBatchNumber) : void 0;\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (internalInstance._debugID !== 0) {\n ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, internalInstance._currentElement);\n }\n }\n internalInstance.performUpdateIfNecessary(transaction);\n if (process.env.NODE_ENV !== 'production') {\n if (internalInstance._debugID !== 0) {\n ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID);\n }\n }\n }\n};\nmodule.exports = ReactReconciler;","'use strict';\n\nmodule.exports = require('./lib/ReactDOM');","import { toUint8, bytesMatch } from './byte-helpers.js';\nvar ID3 = toUint8([0x49, 0x44, 0x33]);\nexport var getId3Size = function getId3Size(bytes, offset) {\n if (offset === void 0) {\n offset = 0;\n }\n bytes = toUint8(bytes);\n var flags = bytes[offset + 5];\n var returnSize = bytes[offset + 6] << 21 | bytes[offset + 7] << 14 | bytes[offset + 8] << 7 | bytes[offset + 9];\n var footerPresent = (flags & 16) >> 4;\n if (footerPresent) {\n return returnSize + 20;\n }\n return returnSize + 10;\n};\nexport var getId3Offset = function getId3Offset(bytes, offset) {\n if (offset === void 0) {\n offset = 0;\n }\n bytes = toUint8(bytes);\n if (bytes.length - offset < 10 || !bytesMatch(bytes, ID3, {\n offset: offset\n })) {\n return offset;\n }\n offset += getId3Size(bytes, offset); // recursive check for id3 tags as some files\n // have multiple ID3 tag sections even though\n // they should not.\n\n return getId3Offset(bytes, offset);\n};","/**\n * Copyright (c) 2014-present, Facebook, Inc.\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\n'use strict';\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nvar _assign = require('object-assign');\nvar ReactCurrentOwner = require('./ReactCurrentOwner');\nvar warning = require('fbjs/lib/warning');\nvar canDefineProperty = require('./canDefineProperty');\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar REACT_ELEMENT_TYPE = require('./ReactElementSymbol');\nvar RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\nvar specialPropKeyWarningShown, specialPropRefWarningShown;\nfunction hasValidRef(config) {\n if (process.env.NODE_ENV !== 'production') {\n if (hasOwnProperty.call(config, 'ref')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n return config.ref !== undefined;\n}\nfunction hasValidKey(config) {\n if (process.env.NODE_ENV !== 'production') {\n if (hasOwnProperty.call(config, 'key')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n return config.key !== undefined;\n}\nfunction defineKeyPropWarningGetter(props, displayName) {\n var warnAboutAccessingKey = function warnAboutAccessingKey() {\n if (!specialPropKeyWarningShown) {\n specialPropKeyWarningShown = true;\n process.env.NODE_ENV !== 'production' ? warning(false, '%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://fb.me/react-special-props)', displayName) : void 0;\n }\n };\n warnAboutAccessingKey.isReactWarning = true;\n Object.defineProperty(props, 'key', {\n get: warnAboutAccessingKey,\n configurable: true\n });\n}\nfunction defineRefPropWarningGetter(props, displayName) {\n var warnAboutAccessingRef = function warnAboutAccessingRef() {\n if (!specialPropRefWarningShown) {\n specialPropRefWarningShown = true;\n process.env.NODE_ENV !== 'production' ? warning(false, '%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://fb.me/react-special-props)', displayName) : void 0;\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, no instanceof check\n * will 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 {*} key\n * @param {string|object} ref\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 * @param {*} owner\n * @param {*} props\n * @internal\n */\nvar ReactElement = function ReactElement(type, key, ref, self, source, owner, props) {\n var element = {\n // This tag allow 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 if (process.env.NODE_ENV !== 'production') {\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 = {};\n\n // 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 if (canDefineProperty) {\n Object.defineProperty(element._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: false\n });\n // self and source are DEV only properties.\n Object.defineProperty(element, '_self', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: self\n });\n // Two elements created in two different places should be considered\n // equal for testing purposes and therefore we hide it from enumeration.\n Object.defineProperty(element, '_source', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: source\n });\n } else {\n element._store.validated = false;\n element._self = self;\n element._source = source;\n }\n if (Object.freeze) {\n Object.freeze(element.props);\n Object.freeze(element);\n }\n }\n return element;\n};\n\n/**\n * Create and return a new ReactElement of the given type.\n * See https://facebook.github.io/react/docs/top-level-api.html#react.createelement\n */\nReactElement.createElement = function (type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n if (process.env.NODE_ENV !== 'production') {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n};\n\n/**\n * Return a function that produces ReactElements of a given type.\n * See https://facebook.github.io/react/docs/top-level-api.html#react.createfactory\n */\nReactElement.createFactory = function (type) {\n var factory = ReactElement.createElement.bind(null, type);\n // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. `.type === Foo`.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n // Legacy hook TODO: Warn if this is accessed\n factory.type = type;\n return factory;\n};\nReactElement.cloneAndReplaceKey = function (oldElement, newKey) {\n var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);\n return newElement;\n};\n\n/**\n * Clone and return a new ReactElement using element as the starting point.\n * See https://facebook.github.io/react/docs/top-level-api.html#react.cloneelement\n */\nReactElement.cloneElement = function (element, config, children) {\n var propName;\n\n // Original props are copied\n var props = _assign({}, element.props);\n\n // Reserved names are extracted\n var key = element.key;\n var ref = element.ref;\n // Self is preserved since the owner is preserved.\n var self = element._self;\n // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n var source = element._source;\n\n // Owner will be preserved, unless ref is overridden\n var owner = element._owner;\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n // Remaining properties override existing props\n var defaultProps;\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n props.children = childArray;\n }\n return ReactElement(element.type, key, ref, self, source, owner, props);\n};\n\n/**\n * Verifies the object is a ReactElement.\n * See https://facebook.github.io/react/docs/top-level-api.html#react.isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a valid component.\n * @final\n */\nReactElement.isValidElement = function (object) {\n return _typeof(object) === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n};\nmodule.exports = ReactElement;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\nvar invariant = require('fbjs/lib/invariant');\nfunction checkMask(value, bitmask) {\n return (value & bitmask) === bitmask;\n}\nvar DOMPropertyInjection = {\n /**\n * Mapping from normalized, camelcased property names to a configuration that\n * specifies how the associated DOM property should be accessed or rendered.\n */\n MUST_USE_PROPERTY: 0x1,\n HAS_BOOLEAN_VALUE: 0x4,\n HAS_NUMERIC_VALUE: 0x8,\n HAS_POSITIVE_NUMERIC_VALUE: 0x10 | 0x8,\n HAS_OVERLOADED_BOOLEAN_VALUE: 0x20,\n /**\n * Inject some specialized knowledge about the DOM. This takes a config object\n * with the following properties:\n *\n * isCustomAttribute: function that given an attribute name will return true\n * if it can be inserted into the DOM verbatim. Useful for data-* or aria-*\n * attributes where it's impossible to enumerate all of the possible\n * attribute names,\n *\n * Properties: object mapping DOM property name to one of the\n * DOMPropertyInjection constants or null. If your attribute isn't in here,\n * it won't get written to the DOM.\n *\n * DOMAttributeNames: object mapping React attribute name to the DOM\n * attribute name. Attribute names not specified use the **lowercase**\n * normalized name.\n *\n * DOMAttributeNamespaces: object mapping React attribute name to the DOM\n * attribute namespace URL. (Attribute names not specified use no namespace.)\n *\n * DOMPropertyNames: similar to DOMAttributeNames but for DOM properties.\n * Property names not specified use the normalized name.\n *\n * DOMMutationMethods: Properties that require special mutation methods. If\n * `value` is undefined, the mutation method should unset the property.\n *\n * @param {object} domPropertyConfig the config as described above.\n */\n injectDOMPropertyConfig: function injectDOMPropertyConfig(domPropertyConfig) {\n var Injection = DOMPropertyInjection;\n var Properties = domPropertyConfig.Properties || {};\n var DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {};\n var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {};\n var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {};\n var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {};\n if (domPropertyConfig.isCustomAttribute) {\n DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute);\n }\n for (var propName in Properties) {\n !!DOMProperty.properties.hasOwnProperty(propName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'injectDOMPropertyConfig(...): You\\'re trying to inject DOM property \\'%s\\' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.', propName) : _prodInvariant('48', propName) : void 0;\n var lowerCased = propName.toLowerCase();\n var propConfig = Properties[propName];\n var propertyInfo = {\n attributeName: lowerCased,\n attributeNamespace: null,\n propertyName: propName,\n mutationMethod: null,\n mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY),\n hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE),\n hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE),\n hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE),\n hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE)\n };\n !(propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s', propName) : _prodInvariant('50', propName) : void 0;\n if (process.env.NODE_ENV !== 'production') {\n DOMProperty.getPossibleStandardName[lowerCased] = propName;\n }\n if (DOMAttributeNames.hasOwnProperty(propName)) {\n var attributeName = DOMAttributeNames[propName];\n propertyInfo.attributeName = attributeName;\n if (process.env.NODE_ENV !== 'production') {\n DOMProperty.getPossibleStandardName[attributeName] = propName;\n }\n }\n if (DOMAttributeNamespaces.hasOwnProperty(propName)) {\n propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName];\n }\n if (DOMPropertyNames.hasOwnProperty(propName)) {\n propertyInfo.propertyName = DOMPropertyNames[propName];\n }\n if (DOMMutationMethods.hasOwnProperty(propName)) {\n propertyInfo.mutationMethod = DOMMutationMethods[propName];\n }\n DOMProperty.properties[propName] = propertyInfo;\n }\n }\n};\n\n/* eslint-disable max-len */\nvar ATTRIBUTE_NAME_START_CHAR = \":A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\";\n/* eslint-enable max-len */\n\n/**\n * DOMProperty exports lookup objects that can be used like functions:\n *\n * > DOMProperty.isValid['id']\n * true\n * > DOMProperty.isValid['foobar']\n * undefined\n *\n * Although this may be confusing, it performs better in general.\n *\n * @see http://jsperf.com/key-exists\n * @see http://jsperf.com/key-missing\n */\nvar DOMProperty = {\n ID_ATTRIBUTE_NAME: 'data-reactid',\n ROOT_ATTRIBUTE_NAME: 'data-reactroot',\n ATTRIBUTE_NAME_START_CHAR: ATTRIBUTE_NAME_START_CHAR,\n ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR + \"\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040\",\n /**\n * Map from property \"standard name\" to an object with info about how to set\n * the property in the DOM. Each object contains:\n *\n * attributeName:\n * Used when rendering markup or with `*Attribute()`.\n * attributeNamespace\n * propertyName:\n * Used on DOM node instances. (This includes properties that mutate due to\n * external factors.)\n * mutationMethod:\n * If non-null, used instead of the property or `setAttribute()` after\n * initial render.\n * mustUseProperty:\n * Whether the property must be accessed and mutated as an object property.\n * hasBooleanValue:\n * Whether the property should be removed when set to a falsey value.\n * hasNumericValue:\n * Whether the property must be numeric or parse as a numeric and should be\n * removed when set to a falsey value.\n * hasPositiveNumericValue:\n * Whether the property must be positive numeric or parse as a positive\n * numeric and should be removed when set to a falsey value.\n * hasOverloadedBooleanValue:\n * Whether the property can be used as a flag as well as with a value.\n * Removed when strictly equal to false; present without a value when\n * strictly equal to true; present with a value otherwise.\n */\n properties: {},\n /**\n * Mapping from lowercase property names to the properly cased version, used\n * to warn in the case of missing properties. Available only in __DEV__.\n *\n * autofocus is predefined, because adding it to the property whitelist\n * causes unintended side effects.\n *\n * @type {Object}\n */\n getPossibleStandardName: process.env.NODE_ENV !== 'production' ? {\n autofocus: 'autoFocus'\n } : null,\n /**\n * All of the isCustomAttribute() functions that have been injected.\n */\n _isCustomAttributeFunctions: [],\n /**\n * Checks whether a property name is a custom attribute.\n * @method\n */\n isCustomAttribute: function isCustomAttribute(attributeName) {\n for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) {\n var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i];\n if (isCustomAttributeFn(attributeName)) {\n return true;\n }\n }\n return false;\n },\n injection: DOMPropertyInjection\n};\nmodule.exports = DOMProperty;","/**\n * Copyright (c) 2015-present, Facebook, Inc.\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\n'use strict';\n\nvar DOMNamespaces = require('./DOMNamespaces');\nvar setInnerHTML = require('./setInnerHTML');\nvar createMicrosoftUnsafeLocalFunction = require('./createMicrosoftUnsafeLocalFunction');\nvar setTextContent = require('./setTextContent');\nvar ELEMENT_NODE_TYPE = 1;\nvar DOCUMENT_FRAGMENT_NODE_TYPE = 11;\n\n/**\n * In IE (8-11) and Edge, appending nodes with no children is dramatically\n * faster than appending a full subtree, so we essentially queue up the\n * .appendChild calls here and apply them so each node is added to its parent\n * before any children are added.\n *\n * In other browsers, doing so is slower or neutral compared to the other order\n * (in Firefox, twice as slow) so we only do this inversion in IE.\n *\n * See https://github.com/spicyj/innerhtml-vs-createelement-vs-clonenode.\n */\nvar enableLazy = typeof document !== 'undefined' && typeof document.documentMode === 'number' || typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' && /\\bEdge\\/\\d/.test(navigator.userAgent);\nfunction insertTreeChildren(tree) {\n if (!enableLazy) {\n return;\n }\n var node = tree.node;\n var children = tree.children;\n if (children.length) {\n for (var i = 0; i < children.length; i++) {\n insertTreeBefore(node, children[i], null);\n }\n } else if (tree.html != null) {\n setInnerHTML(node, tree.html);\n } else if (tree.text != null) {\n setTextContent(node, tree.text);\n }\n}\nvar insertTreeBefore = createMicrosoftUnsafeLocalFunction(function (parentNode, tree, referenceNode) {\n // DocumentFragments aren't actually part of the DOM after insertion so\n // appending children won't update the DOM. We need to ensure the fragment\n // is properly populated first, breaking out of our lazy approach for just\n // this level. Also, some plugins (like Flash Player) will read\n // nodes immediately upon insertion into the DOM, so \n // must also be populated prior to insertion into the DOM.\n if (tree.node.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE || tree.node.nodeType === ELEMENT_NODE_TYPE && tree.node.nodeName.toLowerCase() === 'object' && (tree.node.namespaceURI == null || tree.node.namespaceURI === DOMNamespaces.html)) {\n insertTreeChildren(tree);\n parentNode.insertBefore(tree.node, referenceNode);\n } else {\n parentNode.insertBefore(tree.node, referenceNode);\n insertTreeChildren(tree);\n }\n});\nfunction replaceChildWithTree(oldNode, newTree) {\n oldNode.parentNode.replaceChild(newTree.node, oldNode);\n insertTreeChildren(newTree);\n}\nfunction queueChild(parentTree, childTree) {\n if (enableLazy) {\n parentTree.children.push(childTree);\n } else {\n parentTree.node.appendChild(childTree.node);\n }\n}\nfunction queueHTML(tree, html) {\n if (enableLazy) {\n tree.html = html;\n } else {\n setInnerHTML(tree.node, html);\n }\n}\nfunction queueText(tree, text) {\n if (enableLazy) {\n tree.text = text;\n } else {\n setTextContent(tree.node, text);\n }\n}\nfunction toString() {\n return this.node.nodeName;\n}\nfunction DOMLazyTree(node) {\n return {\n node: node,\n children: [],\n html: null,\n text: null,\n toString: toString\n };\n}\nDOMLazyTree.insertTreeBefore = insertTreeBefore;\nDOMLazyTree.replaceChildWithTree = replaceChildWithTree;\nDOMLazyTree.queueChild = queueChild;\nDOMLazyTree.queueHTML = queueHTML;\nDOMLazyTree.queueText = queueText;\nmodule.exports = DOMLazyTree;","function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n// see https://tools.ietf.org/html/rfc1808\n\n(function (root) {\n var URL_REGEX = /^(?=((?:[a-zA-Z0-9+\\-.]+:)?))\\1(?=((?:\\/\\/[^\\/?#]*)?))\\2(?=((?:(?:[^?#\\/]*\\/)*[^;?#\\/]*)?))\\3((?:;[^?#]*)?)(\\?[^#]*)?(#[^]*)?$/;\n var FIRST_SEGMENT_REGEX = /^(?=([^\\/?#]*))\\1([^]*)$/;\n var SLASH_DOT_REGEX = /(?:\\/|^)\\.(?=\\/)/g;\n var SLASH_DOT_DOT_REGEX = /(?:\\/|^)\\.\\.\\/(?!\\.\\.\\/)[^\\/]*(?=\\/)/g;\n var URLToolkit = {\n // If opts.alwaysNormalize is true then the path will always be normalized even when it starts with / or //\n // E.g\n // With opts.alwaysNormalize = false (default, spec compliant)\n // http://a.com/b/cd + /e/f/../g => http://a.com/e/f/../g\n // With opts.alwaysNormalize = true (not spec compliant)\n // http://a.com/b/cd + /e/f/../g => http://a.com/e/g\n buildAbsoluteURL: function buildAbsoluteURL(baseURL, relativeURL, opts) {\n opts = opts || {};\n // remove any remaining space and CRLF\n baseURL = baseURL.trim();\n relativeURL = relativeURL.trim();\n if (!relativeURL) {\n // 2a) If the embedded URL is entirely empty, it inherits the\n // entire base URL (i.e., is set equal to the base URL)\n // and we are done.\n if (!opts.alwaysNormalize) {\n return baseURL;\n }\n var basePartsForNormalise = URLToolkit.parseURL(baseURL);\n if (!basePartsForNormalise) {\n throw new Error('Error trying to parse base URL.');\n }\n basePartsForNormalise.path = URLToolkit.normalizePath(basePartsForNormalise.path);\n return URLToolkit.buildURLFromParts(basePartsForNormalise);\n }\n var relativeParts = URLToolkit.parseURL(relativeURL);\n if (!relativeParts) {\n throw new Error('Error trying to parse relative URL.');\n }\n if (relativeParts.scheme) {\n // 2b) If the embedded URL starts with a scheme name, it is\n // interpreted as an absolute URL and we are done.\n if (!opts.alwaysNormalize) {\n return relativeURL;\n }\n relativeParts.path = URLToolkit.normalizePath(relativeParts.path);\n return URLToolkit.buildURLFromParts(relativeParts);\n }\n var baseParts = URLToolkit.parseURL(baseURL);\n if (!baseParts) {\n throw new Error('Error trying to parse base URL.');\n }\n if (!baseParts.netLoc && baseParts.path && baseParts.path[0] !== '/') {\n // If netLoc missing and path doesn't start with '/', assume everthing before the first '/' is the netLoc\n // This causes 'example.com/a' to be handled as '//example.com/a' instead of '/example.com/a'\n var pathParts = FIRST_SEGMENT_REGEX.exec(baseParts.path);\n baseParts.netLoc = pathParts[1];\n baseParts.path = pathParts[2];\n }\n if (baseParts.netLoc && !baseParts.path) {\n baseParts.path = '/';\n }\n var builtParts = {\n // 2c) Otherwise, the embedded URL inherits the scheme of\n // the base URL.\n scheme: baseParts.scheme,\n netLoc: relativeParts.netLoc,\n path: null,\n params: relativeParts.params,\n query: relativeParts.query,\n fragment: relativeParts.fragment\n };\n if (!relativeParts.netLoc) {\n // 3) If the embedded URL's is non-empty, we skip to\n // Step 7. Otherwise, the embedded URL inherits the \n // (if any) of the base URL.\n builtParts.netLoc = baseParts.netLoc;\n // 4) If the embedded URL path is preceded by a slash \"/\", the\n // path is not relative and we skip to Step 7.\n if (relativeParts.path[0] !== '/') {\n if (!relativeParts.path) {\n // 5) If the embedded URL path is empty (and not preceded by a\n // slash), then the embedded URL inherits the base URL path\n builtParts.path = baseParts.path;\n // 5a) if the embedded URL's is non-empty, we skip to\n // step 7; otherwise, it inherits the of the base\n // URL (if any) and\n if (!relativeParts.params) {\n builtParts.params = baseParts.params;\n // 5b) if the embedded URL's is non-empty, we skip to\n // step 7; otherwise, it inherits the of the base\n // URL (if any) and we skip to step 7.\n if (!relativeParts.query) {\n builtParts.query = baseParts.query;\n }\n }\n } else {\n // 6) The last segment of the base URL's path (anything\n // following the rightmost slash \"/\", or the entire path if no\n // slash is present) is removed and the embedded URL's path is\n // appended in its place.\n var baseURLPath = baseParts.path;\n var newPath = baseURLPath.substring(0, baseURLPath.lastIndexOf('/') + 1) + relativeParts.path;\n builtParts.path = URLToolkit.normalizePath(newPath);\n }\n }\n }\n if (builtParts.path === null) {\n builtParts.path = opts.alwaysNormalize ? URLToolkit.normalizePath(relativeParts.path) : relativeParts.path;\n }\n return URLToolkit.buildURLFromParts(builtParts);\n },\n parseURL: function parseURL(url) {\n var parts = URL_REGEX.exec(url);\n if (!parts) {\n return null;\n }\n return {\n scheme: parts[1] || '',\n netLoc: parts[2] || '',\n path: parts[3] || '',\n params: parts[4] || '',\n query: parts[5] || '',\n fragment: parts[6] || ''\n };\n },\n normalizePath: function normalizePath(path) {\n // The following operations are\n // then applied, in order, to the new path:\n // 6a) All occurrences of \"./\", where \".\" is a complete path\n // segment, are removed.\n // 6b) If the path ends with \".\" as a complete path segment,\n // that \".\" is removed.\n path = path.split('').reverse().join('').replace(SLASH_DOT_REGEX, '');\n // 6c) All occurrences of \"/../\", where is a\n // complete path segment not equal to \"..\", are removed.\n // Removal of these path segments is performed iteratively,\n // removing the leftmost matching pattern on each iteration,\n // until no matching pattern remains.\n // 6d) If the path ends with \"/..\", where is a\n // complete path segment not equal to \"..\", that\n // \"/..\" is removed.\n while (path.length !== (path = path.replace(SLASH_DOT_DOT_REGEX, '')).length) {}\n return path.split('').reverse().join('');\n },\n buildURLFromParts: function buildURLFromParts(parts) {\n return parts.scheme + parts.netLoc + parts.path + parts.params + parts.query + parts.fragment;\n }\n };\n if ((typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && (typeof module === \"undefined\" ? \"undefined\" : _typeof(module)) === 'object') module.exports = URLToolkit;else if (typeof define === 'function' && define.amd) define([], function () {\n return URLToolkit;\n });else if ((typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object') exports['URLToolkit'] = URLToolkit;else root['URLToolkit'] = URLToolkit;\n})(this);","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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 */\n'use strict';\n\n/**\n * WARNING: DO NOT manually require this module.\n * This is a replacement for `invariant(...)` used by the error code system\n * and will _only_ be required by the corresponding babel pass.\n * It always throws.\n */\nfunction reactProdInvariant(code) {\n var argCount = arguments.length - 1;\n var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code;\n for (var argIdx = 0; argIdx < argCount; argIdx++) {\n message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]);\n }\n message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.';\n var error = new Error(message);\n error.name = 'Invariant Violation';\n error.framesToPop = 1; // we don't care about reactProdInvariant's own frame\n\n throw error;\n}\nmodule.exports = reactProdInvariant;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar EventPluginHub = require('./EventPluginHub');\nvar EventPluginUtils = require('./EventPluginUtils');\nvar accumulateInto = require('./accumulateInto');\nvar forEachAccumulated = require('./forEachAccumulated');\nvar warning = require('fbjs/lib/warning');\nvar getListener = EventPluginHub.getListener;\n\n/**\n * Some event types have a notion of different registration names for different\n * \"phases\" of propagation. This finds listeners by a given phase.\n */\nfunction listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n}\n\n/**\n * Tags a `SyntheticEvent` with dispatched listeners. Creating this function\n * here, allows us to not have to bind or create functions for each event.\n * Mutating the event's members allows us to not have to create a wrapping\n * \"dispatch\" object that pairs the event with the listener.\n */\nfunction accumulateDirectionalDispatches(inst, phase, event) {\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n }\n var listener = listenerAtPhase(inst, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n }\n}\n\n/**\n * Collect dispatches (must be entirely collected before dispatching - see unit\n * tests). Lazily allocate the array to conserve memory. We must loop through\n * each event and perform the traversal for each one. We cannot perform a\n * single traversal for the entire collection of events because each event may\n * have a different target.\n */\nfunction accumulateTwoPhaseDispatchesSingle(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n EventPluginUtils.traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);\n }\n}\n\n/**\n * Same as `accumulateTwoPhaseDispatchesSingle`, but skips over the targetID.\n */\nfunction accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n}\n\n/**\n * Accumulates without regard to direction, does not look for phased\n * registration names. Same as `accumulateDirectDispatchesSingle` but without\n * requiring that the `dispatchMarker` be the same as the dispatched ID.\n */\nfunction accumulateDispatches(inst, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(inst, registrationName);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n }\n }\n}\n\n/**\n * Accumulates dispatches on an `SyntheticEvent`, but only for the\n * `dispatchMarker`.\n * @param {SyntheticEvent} event\n */\nfunction accumulateDirectDispatchesSingle(event) {\n if (event && event.dispatchConfig.registrationName) {\n accumulateDispatches(event._targetInst, null, event);\n }\n}\nfunction accumulateTwoPhaseDispatches(events) {\n forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle);\n}\nfunction accumulateTwoPhaseDispatchesSkipTarget(events) {\n forEachAccumulated(events, accumulateTwoPhaseDispatchesSingleSkipTarget);\n}\nfunction accumulateEnterLeaveDispatches(leave, enter, from, to) {\n EventPluginUtils.traverseEnterLeave(from, to, accumulateDispatches, leave, enter);\n}\nfunction accumulateDirectDispatches(events) {\n forEachAccumulated(events, accumulateDirectDispatchesSingle);\n}\n\n/**\n * A small set of propagation patterns, each of which will accept a small amount\n * of information, and generate a set of \"dispatch ready event objects\" - which\n * are sets of events that have already been annotated with a set of dispatched\n * listener functions/ids. The API is designed this way to discourage these\n * propagation strategies from actually executing the dispatches, since we\n * always want to collect the entire set of dispatches before executing event a\n * single one.\n *\n * @constructor EventPropagators\n */\nvar EventPropagators = {\n accumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches,\n accumulateTwoPhaseDispatchesSkipTarget: accumulateTwoPhaseDispatchesSkipTarget,\n accumulateDirectDispatches: accumulateDirectDispatches,\n accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches\n};\nmodule.exports = EventPropagators;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nvar _prodInvariant = require('./reactProdInvariant');\nvar EventPluginRegistry = require('./EventPluginRegistry');\nvar EventPluginUtils = require('./EventPluginUtils');\nvar ReactErrorUtils = require('./ReactErrorUtils');\nvar accumulateInto = require('./accumulateInto');\nvar forEachAccumulated = require('./forEachAccumulated');\nvar invariant = require('fbjs/lib/invariant');\n\n/**\n * Internal store for event listeners\n */\nvar listenerBank = {};\n\n/**\n * Internal queue of events that have accumulated their dispatches and are\n * waiting to have their dispatches executed.\n */\nvar eventQueue = null;\n\n/**\n * Dispatches an event and releases it back into the pool, unless persistent.\n *\n * @param {?object} event Synthetic event to be dispatched.\n * @param {boolean} simulated If the event is simulated (changes exn behavior)\n * @private\n */\nvar executeDispatchesAndRelease = function executeDispatchesAndRelease(event, simulated) {\n if (event) {\n EventPluginUtils.executeDispatchesInOrder(event, simulated);\n if (!event.isPersistent()) {\n event.constructor.release(event);\n }\n }\n};\nvar executeDispatchesAndReleaseSimulated = function executeDispatchesAndReleaseSimulated(e) {\n return executeDispatchesAndRelease(e, true);\n};\nvar executeDispatchesAndReleaseTopLevel = function executeDispatchesAndReleaseTopLevel(e) {\n return executeDispatchesAndRelease(e, false);\n};\nvar getDictionaryKey = function getDictionaryKey(inst) {\n // Prevents V8 performance issue:\n // https://github.com/facebook/react/pull/7232\n return '.' + inst._rootNodeID;\n};\nfunction isInteractive(tag) {\n return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';\n}\nfunction shouldPreventMouseEvent(name, type, props) {\n switch (name) {\n case 'onClick':\n case 'onClickCapture':\n case 'onDoubleClick':\n case 'onDoubleClickCapture':\n case 'onMouseDown':\n case 'onMouseDownCapture':\n case 'onMouseMove':\n case 'onMouseMoveCapture':\n case 'onMouseUp':\n case 'onMouseUpCapture':\n return !!(props.disabled && isInteractive(type));\n default:\n return false;\n }\n}\n\n/**\n * This is a unified interface for event plugins to be installed and configured.\n *\n * Event plugins can implement the following properties:\n *\n * `extractEvents` {function(string, DOMEventTarget, string, object): *}\n * Required. When a top-level event is fired, this method is expected to\n * extract synthetic events that will in turn be queued and dispatched.\n *\n * `eventTypes` {object}\n * Optional, plugins that fire events must publish a mapping of registration\n * names that are used to register listeners. Values of this mapping must\n * be objects that contain `registrationName` or `phasedRegistrationNames`.\n *\n * `executeDispatch` {function(object, function, string)}\n * Optional, allows plugins to override how an event gets dispatched. By\n * default, the listener is simply invoked.\n *\n * Each plugin that is injected into `EventsPluginHub` is immediately operable.\n *\n * @public\n */\nvar EventPluginHub = {\n /**\n * Methods for injecting dependencies.\n */\n injection: {\n /**\n * @param {array} InjectedEventPluginOrder\n * @public\n */\n injectEventPluginOrder: EventPluginRegistry.injectEventPluginOrder,\n /**\n * @param {object} injectedNamesToPlugins Map from names to plugin modules.\n */\n injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName\n },\n /**\n * Stores `listener` at `listenerBank[registrationName][key]`. Is idempotent.\n *\n * @param {object} inst The instance, which is the source of events.\n * @param {string} registrationName Name of listener (e.g. `onClick`).\n * @param {function} listener The callback to store.\n */\n putListener: function putListener(inst, registrationName, listener) {\n !(typeof listener === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected %s listener to be a function, instead got type %s', registrationName, _typeof(listener)) : _prodInvariant('94', registrationName, _typeof(listener)) : void 0;\n var key = getDictionaryKey(inst);\n var bankForRegistrationName = listenerBank[registrationName] || (listenerBank[registrationName] = {});\n bankForRegistrationName[key] = listener;\n var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];\n if (PluginModule && PluginModule.didPutListener) {\n PluginModule.didPutListener(inst, registrationName, listener);\n }\n },\n /**\n * @param {object} inst The instance, which is the source of events.\n * @param {string} registrationName Name of listener (e.g. `onClick`).\n * @return {?function} The stored callback.\n */\n getListener: function getListener(inst, registrationName) {\n // TODO: shouldPreventMouseEvent is DOM-specific and definitely should not\n // live here; needs to be moved to a better place soon\n var bankForRegistrationName = listenerBank[registrationName];\n if (shouldPreventMouseEvent(registrationName, inst._currentElement.type, inst._currentElement.props)) {\n return null;\n }\n var key = getDictionaryKey(inst);\n return bankForRegistrationName && bankForRegistrationName[key];\n },\n /**\n * Deletes a listener from the registration bank.\n *\n * @param {object} inst The instance, which is the source of events.\n * @param {string} registrationName Name of listener (e.g. `onClick`).\n */\n deleteListener: function deleteListener(inst, registrationName) {\n var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];\n if (PluginModule && PluginModule.willDeleteListener) {\n PluginModule.willDeleteListener(inst, registrationName);\n }\n var bankForRegistrationName = listenerBank[registrationName];\n // TODO: This should never be null -- when is it?\n if (bankForRegistrationName) {\n var key = getDictionaryKey(inst);\n delete bankForRegistrationName[key];\n }\n },\n /**\n * Deletes all listeners for the DOM element with the supplied ID.\n *\n * @param {object} inst The instance, which is the source of events.\n */\n deleteAllListeners: function deleteAllListeners(inst) {\n var key = getDictionaryKey(inst);\n for (var registrationName in listenerBank) {\n if (!listenerBank.hasOwnProperty(registrationName)) {\n continue;\n }\n if (!listenerBank[registrationName][key]) {\n continue;\n }\n var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];\n if (PluginModule && PluginModule.willDeleteListener) {\n PluginModule.willDeleteListener(inst, registrationName);\n }\n delete listenerBank[registrationName][key];\n }\n },\n /**\n * Allows registered plugins an opportunity to extract events from top-level\n * native browser events.\n *\n * @return {*} An accumulation of synthetic events.\n * @internal\n */\n extractEvents: function extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n var events;\n var plugins = EventPluginRegistry.plugins;\n for (var i = 0; i < plugins.length; i++) {\n // Not every plugin in the ordering may be loaded at runtime.\n var possiblePlugin = plugins[i];\n if (possiblePlugin) {\n var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);\n if (extractedEvents) {\n events = accumulateInto(events, extractedEvents);\n }\n }\n }\n return events;\n },\n /**\n * Enqueues a synthetic event that should be dispatched when\n * `processEventQueue` is invoked.\n *\n * @param {*} events An accumulation of synthetic events.\n * @internal\n */\n enqueueEvents: function enqueueEvents(events) {\n if (events) {\n eventQueue = accumulateInto(eventQueue, events);\n }\n },\n /**\n * Dispatches all synthetic events on the event queue.\n *\n * @internal\n */\n processEventQueue: function processEventQueue(simulated) {\n // Set `eventQueue` to null before processing it so that we can tell if more\n // events get enqueued while processing.\n var processingEventQueue = eventQueue;\n eventQueue = null;\n if (simulated) {\n forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseSimulated);\n } else {\n forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel);\n }\n !!eventQueue ? process.env.NODE_ENV !== 'production' ? invariant(false, 'processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.') : _prodInvariant('95') : void 0;\n // This would be a good time to rethrow if any of the event handlers threw.\n ReactErrorUtils.rethrowCaughtError();\n },\n /**\n * These are needed for tests only. Do not use!\n */\n __purge: function __purge() {\n listenerBank = {};\n },\n __getListenerBank: function __getListenerBank() {\n return listenerBank;\n }\n};\nmodule.exports = EventPluginHub;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar SyntheticEvent = require('./SyntheticEvent');\nvar getEventTarget = require('./getEventTarget');\n\n/**\n * @interface UIEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\nvar UIEventInterface = {\n view: function view(event) {\n if (event.view) {\n return event.view;\n }\n var target = getEventTarget(event);\n if (target.window === target) {\n // target is a window object\n return target;\n }\n var doc = target.ownerDocument;\n // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.\n if (doc) {\n return doc.defaultView || doc.parentWindow;\n } else {\n return window;\n }\n },\n detail: function detail(event) {\n return event.detail || 0;\n }\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticEvent}\n */\nfunction SyntheticUIEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\nSyntheticEvent.augmentClass(SyntheticUIEvent, UIEventInterface);\nmodule.exports = SyntheticUIEvent;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\n/**\n * `ReactInstanceMap` maintains a mapping from a public facing stateful\n * instance (key) and the internal representation (value). This allows public\n * methods to accept the user facing instance as an argument and map them back\n * to internal methods.\n */\n\n// TODO: Replace this with ES6: var ReactInstanceMap = new Map();\nvar ReactInstanceMap = {\n /**\n * This API should be called `delete` but we'd have to make sure to always\n * transform these to strings for IE support. When this transform is fully\n * supported we can rename it.\n */\n remove: function remove(key) {\n key._reactInternalInstance = undefined;\n },\n get: function get(key) {\n return key._reactInternalInstance;\n },\n has: function has(key) {\n return key._reactInternalInstance !== undefined;\n },\n set: function set(key, value) {\n key._reactInternalInstance = value;\n }\n};\nmodule.exports = ReactInstanceMap;","/**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n */\nvar ONE_SECOND_IN_TS = 90000,\n // 90kHz clock\n secondsToVideoTs,\n secondsToAudioTs,\n videoTsToSeconds,\n audioTsToSeconds,\n audioTsToVideoTs,\n videoTsToAudioTs,\n metadataTsToSeconds;\nsecondsToVideoTs = function secondsToVideoTs(seconds) {\n return seconds * ONE_SECOND_IN_TS;\n};\nsecondsToAudioTs = function secondsToAudioTs(seconds, sampleRate) {\n return seconds * sampleRate;\n};\nvideoTsToSeconds = function videoTsToSeconds(timestamp) {\n return timestamp / ONE_SECOND_IN_TS;\n};\naudioTsToSeconds = function audioTsToSeconds(timestamp, sampleRate) {\n return timestamp / sampleRate;\n};\naudioTsToVideoTs = function audioTsToVideoTs(timestamp, sampleRate) {\n return secondsToVideoTs(audioTsToSeconds(timestamp, sampleRate));\n};\nvideoTsToAudioTs = function videoTsToAudioTs(timestamp, sampleRate) {\n return secondsToAudioTs(videoTsToSeconds(timestamp), sampleRate);\n};\n\n/**\n * Adjust ID3 tag or caption timing information by the timeline pts values\n * (if keepOriginalTimestamps is false) and convert to seconds\n */\nmetadataTsToSeconds = function metadataTsToSeconds(timestamp, timelineStartPts, keepOriginalTimestamps) {\n return videoTsToSeconds(keepOriginalTimestamps ? timestamp : timestamp - timelineStartPts);\n};\nmodule.exports = {\n ONE_SECOND_IN_TS: ONE_SECOND_IN_TS,\n secondsToVideoTs: secondsToVideoTs,\n secondsToAudioTs: secondsToAudioTs,\n videoTsToSeconds: videoTsToSeconds,\n audioTsToSeconds: audioTsToSeconds,\n audioTsToVideoTs: audioTsToVideoTs,\n videoTsToAudioTs: videoTsToAudioTs,\n metadataTsToSeconds: metadataTsToSeconds\n};","import { stringToBytes, toUint8, bytesMatch, bytesToString, toHexString, padStart, bytesToNumber } from './byte-helpers.js';\nimport { getAvcCodec, getHvcCodec, getAv1Codec } from './codec-helpers.js';\nimport { parseOpusHead } from './opus-helpers.js';\nvar normalizePath = function normalizePath(path) {\n if (typeof path === 'string') {\n return stringToBytes(path);\n }\n if (typeof path === 'number') {\n return path;\n }\n return path;\n};\nvar normalizePaths = function normalizePaths(paths) {\n if (!Array.isArray(paths)) {\n return [normalizePath(paths)];\n }\n return paths.map(function (p) {\n return normalizePath(p);\n });\n};\nvar DESCRIPTORS;\nexport var parseDescriptors = function parseDescriptors(bytes) {\n bytes = toUint8(bytes);\n var results = [];\n var i = 0;\n while (bytes.length > i) {\n var tag = bytes[i];\n var size = 0;\n var headerSize = 0; // tag\n\n headerSize++;\n var _byte = bytes[headerSize]; // first byte\n\n headerSize++;\n while (_byte & 0x80) {\n size = (_byte & 0x7F) << 7;\n _byte = bytes[headerSize];\n headerSize++;\n }\n size += _byte & 0x7F;\n for (var z = 0; z < DESCRIPTORS.length; z++) {\n var _DESCRIPTORS$z = DESCRIPTORS[z],\n id = _DESCRIPTORS$z.id,\n parser = _DESCRIPTORS$z.parser;\n if (tag === id) {\n results.push(parser(bytes.subarray(headerSize, headerSize + size)));\n break;\n }\n }\n i += size + headerSize;\n }\n return results;\n};\nDESCRIPTORS = [{\n id: 0x03,\n parser: function parser(bytes) {\n var desc = {\n tag: 0x03,\n id: bytes[0] << 8 | bytes[1],\n flags: bytes[2],\n size: 3,\n dependsOnEsId: 0,\n ocrEsId: 0,\n descriptors: [],\n url: ''\n }; // depends on es id\n\n if (desc.flags & 0x80) {\n desc.dependsOnEsId = bytes[desc.size] << 8 | bytes[desc.size + 1];\n desc.size += 2;\n } // url\n\n if (desc.flags & 0x40) {\n var len = bytes[desc.size];\n desc.url = bytesToString(bytes.subarray(desc.size + 1, desc.size + 1 + len));\n desc.size += len;\n } // ocr es id\n\n if (desc.flags & 0x20) {\n desc.ocrEsId = bytes[desc.size] << 8 | bytes[desc.size + 1];\n desc.size += 2;\n }\n desc.descriptors = parseDescriptors(bytes.subarray(desc.size)) || [];\n return desc;\n }\n}, {\n id: 0x04,\n parser: function parser(bytes) {\n // DecoderConfigDescriptor\n var desc = {\n tag: 0x04,\n oti: bytes[0],\n streamType: bytes[1],\n bufferSize: bytes[2] << 16 | bytes[3] << 8 | bytes[4],\n maxBitrate: bytes[5] << 24 | bytes[6] << 16 | bytes[7] << 8 | bytes[8],\n avgBitrate: bytes[9] << 24 | bytes[10] << 16 | bytes[11] << 8 | bytes[12],\n descriptors: parseDescriptors(bytes.subarray(13))\n };\n return desc;\n }\n}, {\n id: 0x05,\n parser: function parser(bytes) {\n // DecoderSpecificInfo\n return {\n tag: 0x05,\n bytes: bytes\n };\n }\n}, {\n id: 0x06,\n parser: function parser(bytes) {\n // SLConfigDescriptor\n return {\n tag: 0x06,\n bytes: bytes\n };\n }\n}];\n/**\n * find any number of boxes by name given a path to it in an iso bmff\n * such as mp4.\n *\n * @param {TypedArray} bytes\n * bytes for the iso bmff to search for boxes in\n *\n * @param {Uint8Array[]|string[]|string|Uint8Array} name\n * An array of paths or a single path representing the name\n * of boxes to search through in bytes. Paths may be\n * uint8 (character codes) or strings.\n *\n * @param {boolean} [complete=false]\n * Should we search only for complete boxes on the final path.\n * This is very useful when you do not want to get back partial boxes\n * in the case of streaming files.\n *\n * @return {Uint8Array[]}\n * An array of the end paths that we found.\n */\n\nexport var findBox = function findBox(bytes, paths, complete) {\n if (complete === void 0) {\n complete = false;\n }\n paths = normalizePaths(paths);\n bytes = toUint8(bytes);\n var results = [];\n if (!paths.length) {\n // short-circuit the search for empty paths\n return results;\n }\n var i = 0;\n while (i < bytes.length) {\n var size = (bytes[i] << 24 | bytes[i + 1] << 16 | bytes[i + 2] << 8 | bytes[i + 3]) >>> 0;\n var type = bytes.subarray(i + 4, i + 8); // invalid box format.\n\n if (size === 0) {\n break;\n }\n var end = i + size;\n if (end > bytes.length) {\n // this box is bigger than the number of bytes we have\n // and complete is set, we cannot find any more boxes.\n if (complete) {\n break;\n }\n end = bytes.length;\n }\n var data = bytes.subarray(i + 8, end);\n if (bytesMatch(type, paths[0])) {\n if (paths.length === 1) {\n // this is the end of the path and we've found the box we were\n // looking for\n results.push(data);\n } else {\n // recursively search for the next box along the path\n results.push.apply(results, findBox(data, paths.slice(1), complete));\n }\n }\n i = end;\n } // we've finished searching all of bytes\n\n return results;\n};\n/**\n * Search for a single matching box by name in an iso bmff format like\n * mp4. This function is useful for finding codec boxes which\n * can be placed arbitrarily in sample descriptions depending\n * on the version of the file or file type.\n *\n * @param {TypedArray} bytes\n * bytes for the iso bmff to search for boxes in\n *\n * @param {string|Uint8Array} name\n * The name of the box to find.\n *\n * @return {Uint8Array[]}\n * a subarray of bytes representing the name boxed we found.\n */\n\nexport var findNamedBox = function findNamedBox(bytes, name) {\n name = normalizePath(name);\n if (!name.length) {\n // short-circuit the search for empty paths\n return bytes.subarray(bytes.length);\n }\n var i = 0;\n while (i < bytes.length) {\n if (bytesMatch(bytes.subarray(i, i + name.length), name)) {\n var size = (bytes[i - 4] << 24 | bytes[i - 3] << 16 | bytes[i - 2] << 8 | bytes[i - 1]) >>> 0;\n var end = size > 1 ? i + size : bytes.byteLength;\n return bytes.subarray(i + 4, end);\n }\n i++;\n } // we've finished searching all of bytes\n\n return bytes.subarray(bytes.length);\n};\nvar parseSamples = function parseSamples(data, entrySize, parseEntry) {\n if (entrySize === void 0) {\n entrySize = 4;\n }\n if (parseEntry === void 0) {\n parseEntry = function parseEntry(d) {\n return bytesToNumber(d);\n };\n }\n var entries = [];\n if (!data || !data.length) {\n return entries;\n }\n var entryCount = bytesToNumber(data.subarray(4, 8));\n for (var i = 8; entryCount; i += entrySize, entryCount--) {\n entries.push(parseEntry(data.subarray(i, i + entrySize)));\n }\n return entries;\n};\nexport var buildFrameTable = function buildFrameTable(stbl, timescale) {\n var keySamples = parseSamples(findBox(stbl, ['stss'])[0]);\n var chunkOffsets = parseSamples(findBox(stbl, ['stco'])[0]);\n var timeToSamples = parseSamples(findBox(stbl, ['stts'])[0], 8, function (entry) {\n return {\n sampleCount: bytesToNumber(entry.subarray(0, 4)),\n sampleDelta: bytesToNumber(entry.subarray(4, 8))\n };\n });\n var samplesToChunks = parseSamples(findBox(stbl, ['stsc'])[0], 12, function (entry) {\n return {\n firstChunk: bytesToNumber(entry.subarray(0, 4)),\n samplesPerChunk: bytesToNumber(entry.subarray(4, 8)),\n sampleDescriptionIndex: bytesToNumber(entry.subarray(8, 12))\n };\n });\n var stsz = findBox(stbl, ['stsz'])[0]; // stsz starts with a 4 byte sampleSize which we don't need\n\n var sampleSizes = parseSamples(stsz && stsz.length && stsz.subarray(4) || null);\n var frames = [];\n for (var chunkIndex = 0; chunkIndex < chunkOffsets.length; chunkIndex++) {\n var samplesInChunk = void 0;\n for (var i = 0; i < samplesToChunks.length; i++) {\n var sampleToChunk = samplesToChunks[i];\n var isThisOne = chunkIndex + 1 >= sampleToChunk.firstChunk && (i + 1 >= samplesToChunks.length || chunkIndex + 1 < samplesToChunks[i + 1].firstChunk);\n if (isThisOne) {\n samplesInChunk = sampleToChunk.samplesPerChunk;\n break;\n }\n }\n var chunkOffset = chunkOffsets[chunkIndex];\n for (var _i = 0; _i < samplesInChunk; _i++) {\n var frameEnd = sampleSizes[frames.length]; // if we don't have key samples every frame is a keyframe\n\n var keyframe = !keySamples.length;\n if (keySamples.length && keySamples.indexOf(frames.length + 1) !== -1) {\n keyframe = true;\n }\n var frame = {\n keyframe: keyframe,\n start: chunkOffset,\n end: chunkOffset + frameEnd\n };\n for (var k = 0; k < timeToSamples.length; k++) {\n var _timeToSamples$k = timeToSamples[k],\n sampleCount = _timeToSamples$k.sampleCount,\n sampleDelta = _timeToSamples$k.sampleDelta;\n if (frames.length <= sampleCount) {\n // ms to ns\n var lastTimestamp = frames.length ? frames[frames.length - 1].timestamp : 0;\n frame.timestamp = lastTimestamp + sampleDelta / timescale * 1000;\n frame.duration = sampleDelta;\n break;\n }\n }\n frames.push(frame);\n chunkOffset += frameEnd;\n }\n }\n return frames;\n};\nexport var addSampleDescription = function addSampleDescription(track, bytes) {\n var codec = bytesToString(bytes.subarray(0, 4));\n if (track.type === 'video') {\n track.info = track.info || {};\n track.info.width = bytes[28] << 8 | bytes[29];\n track.info.height = bytes[30] << 8 | bytes[31];\n } else if (track.type === 'audio') {\n track.info = track.info || {};\n track.info.channels = bytes[20] << 8 | bytes[21];\n track.info.bitDepth = bytes[22] << 8 | bytes[23];\n track.info.sampleRate = bytes[28] << 8 | bytes[29];\n }\n if (codec === 'avc1') {\n var avcC = findNamedBox(bytes, 'avcC'); // AVCDecoderConfigurationRecord\n\n codec += \".\" + getAvcCodec(avcC);\n track.info.avcC = avcC; // TODO: do we need to parse all this?\n\n /* {\n configurationVersion: avcC[0],\n profile: avcC[1],\n profileCompatibility: avcC[2],\n level: avcC[3],\n lengthSizeMinusOne: avcC[4] & 0x3\n };\n let spsNalUnitCount = avcC[5] & 0x1F;\n const spsNalUnits = track.info.avc.spsNalUnits = [];\n // past spsNalUnitCount\n let offset = 6;\n while (spsNalUnitCount--) {\n const nalLen = avcC[offset] << 8 | avcC[offset + 1];\n spsNalUnits.push(avcC.subarray(offset + 2, offset + 2 + nalLen));\n offset += nalLen + 2;\n }\n let ppsNalUnitCount = avcC[offset];\n const ppsNalUnits = track.info.avc.ppsNalUnits = [];\n // past ppsNalUnitCount\n offset += 1;\n while (ppsNalUnitCount--) {\n const nalLen = avcC[offset] << 8 | avcC[offset + 1];\n ppsNalUnits.push(avcC.subarray(offset + 2, offset + 2 + nalLen));\n offset += nalLen + 2;\n }*/\n // HEVCDecoderConfigurationRecord\n } else if (codec === 'hvc1' || codec === 'hev1') {\n codec += \".\" + getHvcCodec(findNamedBox(bytes, 'hvcC'));\n } else if (codec === 'mp4a' || codec === 'mp4v') {\n var esds = findNamedBox(bytes, 'esds');\n var esDescriptor = parseDescriptors(esds.subarray(4))[0];\n var decoderConfig = esDescriptor && esDescriptor.descriptors.filter(function (_ref) {\n var tag = _ref.tag;\n return tag === 0x04;\n })[0];\n if (decoderConfig) {\n // most codecs do not have a further '.'\n // such as 0xa5 for ac-3 and 0xa6 for e-ac-3\n codec += '.' + toHexString(decoderConfig.oti);\n if (decoderConfig.oti === 0x40) {\n codec += '.' + (decoderConfig.descriptors[0].bytes[0] >> 3).toString();\n } else if (decoderConfig.oti === 0x20) {\n codec += '.' + decoderConfig.descriptors[0].bytes[4].toString();\n } else if (decoderConfig.oti === 0xdd) {\n codec = 'vorbis';\n }\n } else if (track.type === 'audio') {\n codec += '.40.2';\n } else {\n codec += '.20.9';\n }\n } else if (codec === 'av01') {\n // AV1DecoderConfigurationRecord\n codec += \".\" + getAv1Codec(findNamedBox(bytes, 'av1C'));\n } else if (codec === 'vp09') {\n // VPCodecConfigurationRecord\n var vpcC = findNamedBox(bytes, 'vpcC'); // https://www.webmproject.org/vp9/mp4/\n\n var profile = vpcC[0];\n var level = vpcC[1];\n var bitDepth = vpcC[2] >> 4;\n var chromaSubsampling = (vpcC[2] & 0x0F) >> 1;\n var videoFullRangeFlag = (vpcC[2] & 0x0F) >> 3;\n var colourPrimaries = vpcC[3];\n var transferCharacteristics = vpcC[4];\n var matrixCoefficients = vpcC[5];\n codec += \".\" + padStart(profile, 2, '0');\n codec += \".\" + padStart(level, 2, '0');\n codec += \".\" + padStart(bitDepth, 2, '0');\n codec += \".\" + padStart(chromaSubsampling, 2, '0');\n codec += \".\" + padStart(colourPrimaries, 2, '0');\n codec += \".\" + padStart(transferCharacteristics, 2, '0');\n codec += \".\" + padStart(matrixCoefficients, 2, '0');\n codec += \".\" + padStart(videoFullRangeFlag, 2, '0');\n } else if (codec === 'theo') {\n codec = 'theora';\n } else if (codec === 'spex') {\n codec = 'speex';\n } else if (codec === '.mp3') {\n codec = 'mp4a.40.34';\n } else if (codec === 'msVo') {\n codec = 'vorbis';\n } else if (codec === 'Opus') {\n codec = 'opus';\n var dOps = findNamedBox(bytes, 'dOps');\n track.info.opus = parseOpusHead(dOps); // TODO: should this go into the webm code??\n // Firefox requires a codecDelay for opus playback\n // see https://bugzilla.mozilla.org/show_bug.cgi?id=1276238\n\n track.info.codecDelay = 6500000;\n } else {\n codec = codec.toLowerCase();\n }\n /* eslint-enable */\n // flac, ac-3, ec-3, opus\n\n track.codec = codec;\n};\nexport var parseTracks = function parseTracks(bytes, frameTable) {\n if (frameTable === void 0) {\n frameTable = true;\n }\n bytes = toUint8(bytes);\n var traks = findBox(bytes, ['moov', 'trak'], true);\n var tracks = [];\n traks.forEach(function (trak) {\n var track = {\n bytes: trak\n };\n var mdia = findBox(trak, ['mdia'])[0];\n var hdlr = findBox(mdia, ['hdlr'])[0];\n var trakType = bytesToString(hdlr.subarray(8, 12));\n if (trakType === 'soun') {\n track.type = 'audio';\n } else if (trakType === 'vide') {\n track.type = 'video';\n } else {\n track.type = trakType;\n }\n var tkhd = findBox(trak, ['tkhd'])[0];\n if (tkhd) {\n var view = new DataView(tkhd.buffer, tkhd.byteOffset, tkhd.byteLength);\n var tkhdVersion = view.getUint8(0);\n track.number = tkhdVersion === 0 ? view.getUint32(12) : view.getUint32(20);\n }\n var mdhd = findBox(mdia, ['mdhd'])[0];\n if (mdhd) {\n // mdhd is a FullBox, meaning it will have its own version as the first byte\n var version = mdhd[0];\n var index = version === 0 ? 12 : 20;\n track.timescale = (mdhd[index] << 24 | mdhd[index + 1] << 16 | mdhd[index + 2] << 8 | mdhd[index + 3]) >>> 0;\n }\n var stbl = findBox(mdia, ['minf', 'stbl'])[0];\n var stsd = findBox(stbl, ['stsd'])[0];\n var descriptionCount = bytesToNumber(stsd.subarray(4, 8));\n var offset = 8; // add codec and codec info\n\n while (descriptionCount--) {\n var len = bytesToNumber(stsd.subarray(offset, offset + 4));\n var sampleDescriptor = stsd.subarray(offset + 4, offset + 4 + len);\n addSampleDescription(track, sampleDescriptor);\n offset += 4 + len;\n }\n if (frameTable) {\n track.frameTable = buildFrameTable(stbl, track.timescale);\n } // codec has no sub parameters\n\n tracks.push(track);\n });\n return tracks;\n};\nexport var parseMediaInfo = function parseMediaInfo(bytes) {\n var mvhd = findBox(bytes, ['moov', 'mvhd'], true)[0];\n if (!mvhd || !mvhd.length) {\n return;\n }\n var info = {}; // ms to ns\n // mvhd v1 has 8 byte duration and other fields too\n\n if (mvhd[0] === 1) {\n info.timestampScale = bytesToNumber(mvhd.subarray(20, 24));\n info.duration = bytesToNumber(mvhd.subarray(24, 32));\n } else {\n info.timestampScale = bytesToNumber(mvhd.subarray(12, 16));\n info.duration = bytesToNumber(mvhd.subarray(16, 20));\n }\n info.bytes = mvhd;\n return info;\n};","export var OPUS_HEAD = new Uint8Array([\n// O, p, u, s\n0x4f, 0x70, 0x75, 0x73,\n// H, e, a, d\n0x48, 0x65, 0x61, 0x64]); // https://wiki.xiph.org/OggOpus\n// https://vfrmaniac.fushizen.eu/contents/opus_in_isobmff.html\n// https://opus-codec.org/docs/opusfile_api-0.7/structOpusHead.html\n\nexport var parseOpusHead = function parseOpusHead(bytes) {\n var view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);\n var version = view.getUint8(0); // version 0, from mp4, does not use littleEndian.\n\n var littleEndian = version !== 0;\n var config = {\n version: version,\n channels: view.getUint8(1),\n preSkip: view.getUint16(2, littleEndian),\n sampleRate: view.getUint32(4, littleEndian),\n outputGain: view.getUint16(8, littleEndian),\n channelMappingFamily: view.getUint8(10)\n };\n if (config.channelMappingFamily > 0 && bytes.length > 10) {\n config.streamCount = view.getUint8(11);\n config.twoChannelStreamCount = view.getUint8(12);\n config.channelMapping = [];\n for (var c = 0; c < config.channels; c++) {\n config.channelMapping.push(view.getUint8(13 + c));\n }\n }\n return config;\n};\nexport var setOpusHead = function setOpusHead(config) {\n var size = config.channelMappingFamily <= 0 ? 11 : 12 + config.channels;\n var view = new DataView(new ArrayBuffer(size));\n var littleEndian = config.version !== 0;\n view.setUint8(0, config.version);\n view.setUint8(1, config.channels);\n view.setUint16(2, config.preSkip, littleEndian);\n view.setUint32(4, config.sampleRate, littleEndian);\n view.setUint16(8, config.outputGain, littleEndian);\n view.setUint8(10, config.channelMappingFamily);\n if (config.channelMappingFamily > 0) {\n view.setUint8(11, config.streamCount);\n config.channelMapping.foreach(function (cm, i) {\n view.setUint8(12 + i, cm);\n });\n }\n return new Uint8Array(view.buffer);\n};","import { toUint8, bytesToNumber, bytesMatch, bytesToString, numberToBytes, padStart } from './byte-helpers';\nimport { getAvcCodec, getHvcCodec, getAv1Codec } from './codec-helpers.js'; // relevant specs for this parser:\n// https://matroska-org.github.io/libebml/specs.html\n// https://www.matroska.org/technical/elements.html\n// https://www.webmproject.org/docs/container/\n\nexport var EBML_TAGS = {\n EBML: toUint8([0x1A, 0x45, 0xDF, 0xA3]),\n DocType: toUint8([0x42, 0x82]),\n Segment: toUint8([0x18, 0x53, 0x80, 0x67]),\n SegmentInfo: toUint8([0x15, 0x49, 0xA9, 0x66]),\n Tracks: toUint8([0x16, 0x54, 0xAE, 0x6B]),\n Track: toUint8([0xAE]),\n TrackNumber: toUint8([0xd7]),\n DefaultDuration: toUint8([0x23, 0xe3, 0x83]),\n TrackEntry: toUint8([0xAE]),\n TrackType: toUint8([0x83]),\n FlagDefault: toUint8([0x88]),\n CodecID: toUint8([0x86]),\n CodecPrivate: toUint8([0x63, 0xA2]),\n VideoTrack: toUint8([0xe0]),\n AudioTrack: toUint8([0xe1]),\n // Not used yet, but will be used for live webm/mkv\n // see https://www.matroska.org/technical/basics.html#block-structure\n // see https://www.matroska.org/technical/basics.html#simpleblock-structure\n Cluster: toUint8([0x1F, 0x43, 0xB6, 0x75]),\n Timestamp: toUint8([0xE7]),\n TimestampScale: toUint8([0x2A, 0xD7, 0xB1]),\n BlockGroup: toUint8([0xA0]),\n BlockDuration: toUint8([0x9B]),\n Block: toUint8([0xA1]),\n SimpleBlock: toUint8([0xA3])\n};\n/**\n * This is a simple table to determine the length\n * of things in ebml. The length is one based (starts at 1,\n * rather than zero) and for every zero bit before a one bit\n * we add one to length. We also need this table because in some\n * case we have to xor all the length bits from another value.\n */\n\nvar LENGTH_TABLE = [128, 64, 32, 16, 8, 4, 2, 1];\nvar getLength = function getLength(_byte) {\n var len = 1;\n for (var i = 0; i < LENGTH_TABLE.length; i++) {\n if (_byte & LENGTH_TABLE[i]) {\n break;\n }\n len++;\n }\n return len;\n}; // length in ebml is stored in the first 4 to 8 bits\n// of the first byte. 4 for the id length and 8 for the\n// data size length. Length is measured by converting the number to binary\n// then 1 + the number of zeros before a 1 is encountered starting\n// from the left.\n\nvar getvint = function getvint(bytes, offset, removeLength, signed) {\n if (removeLength === void 0) {\n removeLength = true;\n }\n if (signed === void 0) {\n signed = false;\n }\n var length = getLength(bytes[offset]);\n var valueBytes = bytes.subarray(offset, offset + length); // NOTE that we do **not** subarray here because we need to copy these bytes\n // as they will be modified below to remove the dataSizeLen bits and we do not\n // want to modify the original data. normally we could just call slice on\n // uint8array but ie 11 does not support that...\n\n if (removeLength) {\n valueBytes = Array.prototype.slice.call(bytes, offset, offset + length);\n valueBytes[0] ^= LENGTH_TABLE[length - 1];\n }\n return {\n length: length,\n value: bytesToNumber(valueBytes, {\n signed: signed\n }),\n bytes: valueBytes\n };\n};\nvar normalizePath = function normalizePath(path) {\n if (typeof path === 'string') {\n return path.match(/.{1,2}/g).map(function (p) {\n return normalizePath(p);\n });\n }\n if (typeof path === 'number') {\n return numberToBytes(path);\n }\n return path;\n};\nvar normalizePaths = function normalizePaths(paths) {\n if (!Array.isArray(paths)) {\n return [normalizePath(paths)];\n }\n return paths.map(function (p) {\n return normalizePath(p);\n });\n};\nvar getInfinityDataSize = function getInfinityDataSize(id, bytes, offset) {\n if (offset >= bytes.length) {\n return bytes.length;\n }\n var innerid = getvint(bytes, offset, false);\n if (bytesMatch(id.bytes, innerid.bytes)) {\n return offset;\n }\n var dataHeader = getvint(bytes, offset + innerid.length);\n return getInfinityDataSize(id, bytes, offset + dataHeader.length + dataHeader.value + innerid.length);\n};\n/**\n * Notes on the EBLM format.\n *\n * EBLM uses \"vints\" tags. Every vint tag contains\n * two parts\n *\n * 1. The length from the first byte. You get this by\n * converting the byte to binary and counting the zeros\n * before a 1. Then you add 1 to that. Examples\n * 00011111 = length 4 because there are 3 zeros before a 1.\n * 00100000 = length 3 because there are 2 zeros before a 1.\n * 00000011 = length 7 because there are 6 zeros before a 1.\n *\n * 2. The bits used for length are removed from the first byte\n * Then all the bytes are merged into a value. NOTE: this\n * is not the case for id ebml tags as there id includes\n * length bits.\n *\n */\n\nexport var findEbml = function findEbml(bytes, paths) {\n paths = normalizePaths(paths);\n bytes = toUint8(bytes);\n var results = [];\n if (!paths.length) {\n return results;\n }\n var i = 0;\n while (i < bytes.length) {\n var id = getvint(bytes, i, false);\n var dataHeader = getvint(bytes, i + id.length);\n var dataStart = i + id.length + dataHeader.length; // dataSize is unknown or this is a live stream\n\n if (dataHeader.value === 0x7f) {\n dataHeader.value = getInfinityDataSize(id, bytes, dataStart);\n if (dataHeader.value !== bytes.length) {\n dataHeader.value -= dataStart;\n }\n }\n var dataEnd = dataStart + dataHeader.value > bytes.length ? bytes.length : dataStart + dataHeader.value;\n var data = bytes.subarray(dataStart, dataEnd);\n if (bytesMatch(paths[0], id.bytes)) {\n if (paths.length === 1) {\n // this is the end of the paths and we've found the tag we were\n // looking for\n results.push(data);\n } else {\n // recursively search for the next tag inside of the data\n // of this one\n results = results.concat(findEbml(data, paths.slice(1)));\n }\n }\n var totalLength = id.length + dataHeader.length + data.length; // move past this tag entirely, we are not looking for it\n\n i += totalLength;\n }\n return results;\n}; // see https://www.matroska.org/technical/basics.html#block-structure\n\nexport var decodeBlock = function decodeBlock(block, type, timestampScale, clusterTimestamp) {\n var duration;\n if (type === 'group') {\n duration = findEbml(block, [EBML_TAGS.BlockDuration])[0];\n if (duration) {\n duration = bytesToNumber(duration);\n duration = 1 / timestampScale * duration * timestampScale / 1000;\n }\n block = findEbml(block, [EBML_TAGS.Block])[0];\n type = 'block'; // treat data as a block after this point\n }\n var dv = new DataView(block.buffer, block.byteOffset, block.byteLength);\n var trackNumber = getvint(block, 0);\n var timestamp = dv.getInt16(trackNumber.length, false);\n var flags = block[trackNumber.length + 2];\n var data = block.subarray(trackNumber.length + 3); // pts/dts in seconds\n\n var ptsdts = 1 / timestampScale * (clusterTimestamp + timestamp) * timestampScale / 1000; // return the frame\n\n var parsed = {\n duration: duration,\n trackNumber: trackNumber.value,\n keyframe: type === 'simple' && flags >> 7 === 1,\n invisible: (flags & 0x08) >> 3 === 1,\n lacing: (flags & 0x06) >> 1,\n discardable: type === 'simple' && (flags & 0x01) === 1,\n frames: [],\n pts: ptsdts,\n dts: ptsdts,\n timestamp: timestamp\n };\n if (!parsed.lacing) {\n parsed.frames.push(data);\n return parsed;\n }\n var numberOfFrames = data[0] + 1;\n var frameSizes = [];\n var offset = 1; // Fixed\n\n if (parsed.lacing === 2) {\n var sizeOfFrame = (data.length - offset) / numberOfFrames;\n for (var i = 0; i < numberOfFrames; i++) {\n frameSizes.push(sizeOfFrame);\n }\n } // xiph\n\n if (parsed.lacing === 1) {\n for (var _i = 0; _i < numberOfFrames - 1; _i++) {\n var size = 0;\n do {\n size += data[offset];\n offset++;\n } while (data[offset - 1] === 0xFF);\n frameSizes.push(size);\n }\n } // ebml\n\n if (parsed.lacing === 3) {\n // first vint is unsinged\n // after that vints are singed and\n // based on a compounding size\n var _size = 0;\n for (var _i2 = 0; _i2 < numberOfFrames - 1; _i2++) {\n var vint = _i2 === 0 ? getvint(data, offset) : getvint(data, offset, true, true);\n _size += vint.value;\n frameSizes.push(_size);\n offset += vint.length;\n }\n }\n frameSizes.forEach(function (size) {\n parsed.frames.push(data.subarray(offset, offset + size));\n offset += size;\n });\n return parsed;\n}; // VP9 Codec Feature Metadata (CodecPrivate)\n// https://www.webmproject.org/docs/container/\n\nvar parseVp9Private = function parseVp9Private(bytes) {\n var i = 0;\n var params = {};\n while (i < bytes.length) {\n var id = bytes[i] & 0x7f;\n var len = bytes[i + 1];\n var val = void 0;\n if (len === 1) {\n val = bytes[i + 2];\n } else {\n val = bytes.subarray(i + 2, i + 2 + len);\n }\n if (id === 1) {\n params.profile = val;\n } else if (id === 2) {\n params.level = val;\n } else if (id === 3) {\n params.bitDepth = val;\n } else if (id === 4) {\n params.chromaSubsampling = val;\n } else {\n params[id] = val;\n }\n i += 2 + len;\n }\n return params;\n};\nexport var parseTracks = function parseTracks(bytes) {\n bytes = toUint8(bytes);\n var decodedTracks = [];\n var tracks = findEbml(bytes, [EBML_TAGS.Segment, EBML_TAGS.Tracks, EBML_TAGS.Track]);\n if (!tracks.length) {\n tracks = findEbml(bytes, [EBML_TAGS.Tracks, EBML_TAGS.Track]);\n }\n if (!tracks.length) {\n tracks = findEbml(bytes, [EBML_TAGS.Track]);\n }\n if (!tracks.length) {\n return decodedTracks;\n }\n tracks.forEach(function (track) {\n var trackType = findEbml(track, EBML_TAGS.TrackType)[0];\n if (!trackType || !trackType.length) {\n return;\n } // 1 is video, 2 is audio, 17 is subtitle\n // other values are unimportant in this context\n\n if (trackType[0] === 1) {\n trackType = 'video';\n } else if (trackType[0] === 2) {\n trackType = 'audio';\n } else if (trackType[0] === 17) {\n trackType = 'subtitle';\n } else {\n return;\n } // todo parse language\n\n var decodedTrack = {\n rawCodec: bytesToString(findEbml(track, [EBML_TAGS.CodecID])[0]),\n type: trackType,\n codecPrivate: findEbml(track, [EBML_TAGS.CodecPrivate])[0],\n number: bytesToNumber(findEbml(track, [EBML_TAGS.TrackNumber])[0]),\n defaultDuration: bytesToNumber(findEbml(track, [EBML_TAGS.DefaultDuration])[0]),\n \"default\": findEbml(track, [EBML_TAGS.FlagDefault])[0],\n rawData: track\n };\n var codec = '';\n if (/V_MPEG4\\/ISO\\/AVC/.test(decodedTrack.rawCodec)) {\n codec = \"avc1.\" + getAvcCodec(decodedTrack.codecPrivate);\n } else if (/V_MPEGH\\/ISO\\/HEVC/.test(decodedTrack.rawCodec)) {\n codec = \"hev1.\" + getHvcCodec(decodedTrack.codecPrivate);\n } else if (/V_MPEG4\\/ISO\\/ASP/.test(decodedTrack.rawCodec)) {\n if (decodedTrack.codecPrivate) {\n codec = 'mp4v.20.' + decodedTrack.codecPrivate[4].toString();\n } else {\n codec = 'mp4v.20.9';\n }\n } else if (/^V_THEORA/.test(decodedTrack.rawCodec)) {\n codec = 'theora';\n } else if (/^V_VP8/.test(decodedTrack.rawCodec)) {\n codec = 'vp8';\n } else if (/^V_VP9/.test(decodedTrack.rawCodec)) {\n if (decodedTrack.codecPrivate) {\n var _parseVp9Private = parseVp9Private(decodedTrack.codecPrivate),\n profile = _parseVp9Private.profile,\n level = _parseVp9Private.level,\n bitDepth = _parseVp9Private.bitDepth,\n chromaSubsampling = _parseVp9Private.chromaSubsampling;\n codec = 'vp09.';\n codec += padStart(profile, 2, '0') + \".\";\n codec += padStart(level, 2, '0') + \".\";\n codec += padStart(bitDepth, 2, '0') + \".\";\n codec += \"\" + padStart(chromaSubsampling, 2, '0'); // Video -> Colour -> Ebml name\n\n var matrixCoefficients = findEbml(track, [0xE0, [0x55, 0xB0], [0x55, 0xB1]])[0] || [];\n var videoFullRangeFlag = findEbml(track, [0xE0, [0x55, 0xB0], [0x55, 0xB9]])[0] || [];\n var transferCharacteristics = findEbml(track, [0xE0, [0x55, 0xB0], [0x55, 0xBA]])[0] || [];\n var colourPrimaries = findEbml(track, [0xE0, [0x55, 0xB0], [0x55, 0xBB]])[0] || []; // if we find any optional codec parameter specify them all.\n\n if (matrixCoefficients.length || videoFullRangeFlag.length || transferCharacteristics.length || colourPrimaries.length) {\n codec += \".\" + padStart(colourPrimaries[0], 2, '0');\n codec += \".\" + padStart(transferCharacteristics[0], 2, '0');\n codec += \".\" + padStart(matrixCoefficients[0], 2, '0');\n codec += \".\" + padStart(videoFullRangeFlag[0], 2, '0');\n }\n } else {\n codec = 'vp9';\n }\n } else if (/^V_AV1/.test(decodedTrack.rawCodec)) {\n codec = \"av01.\" + getAv1Codec(decodedTrack.codecPrivate);\n } else if (/A_ALAC/.test(decodedTrack.rawCodec)) {\n codec = 'alac';\n } else if (/A_MPEG\\/L2/.test(decodedTrack.rawCodec)) {\n codec = 'mp2';\n } else if (/A_MPEG\\/L3/.test(decodedTrack.rawCodec)) {\n codec = 'mp3';\n } else if (/^A_AAC/.test(decodedTrack.rawCodec)) {\n if (decodedTrack.codecPrivate) {\n codec = 'mp4a.40.' + (decodedTrack.codecPrivate[0] >>> 3).toString();\n } else {\n codec = 'mp4a.40.2';\n }\n } else if (/^A_AC3/.test(decodedTrack.rawCodec)) {\n codec = 'ac-3';\n } else if (/^A_PCM/.test(decodedTrack.rawCodec)) {\n codec = 'pcm';\n } else if (/^A_MS\\/ACM/.test(decodedTrack.rawCodec)) {\n codec = 'speex';\n } else if (/^A_EAC3/.test(decodedTrack.rawCodec)) {\n codec = 'ec-3';\n } else if (/^A_VORBIS/.test(decodedTrack.rawCodec)) {\n codec = 'vorbis';\n } else if (/^A_FLAC/.test(decodedTrack.rawCodec)) {\n codec = 'flac';\n } else if (/^A_OPUS/.test(decodedTrack.rawCodec)) {\n codec = 'opus';\n }\n decodedTrack.codec = codec;\n decodedTracks.push(decodedTrack);\n });\n return decodedTracks.sort(function (a, b) {\n return a.number - b.number;\n });\n};\nexport var parseData = function parseData(data, tracks) {\n var allBlocks = [];\n var segment = findEbml(data, [EBML_TAGS.Segment])[0];\n var timestampScale = findEbml(segment, [EBML_TAGS.SegmentInfo, EBML_TAGS.TimestampScale])[0]; // in nanoseconds, defaults to 1ms\n\n if (timestampScale && timestampScale.length) {\n timestampScale = bytesToNumber(timestampScale);\n } else {\n timestampScale = 1000000;\n }\n var clusters = findEbml(segment, [EBML_TAGS.Cluster]);\n if (!tracks) {\n tracks = parseTracks(segment);\n }\n clusters.forEach(function (cluster, ci) {\n var simpleBlocks = findEbml(cluster, [EBML_TAGS.SimpleBlock]).map(function (b) {\n return {\n type: 'simple',\n data: b\n };\n });\n var blockGroups = findEbml(cluster, [EBML_TAGS.BlockGroup]).map(function (b) {\n return {\n type: 'group',\n data: b\n };\n });\n var timestamp = findEbml(cluster, [EBML_TAGS.Timestamp])[0] || 0;\n if (timestamp && timestamp.length) {\n timestamp = bytesToNumber(timestamp);\n } // get all blocks then sort them into the correct order\n\n var blocks = simpleBlocks.concat(blockGroups).sort(function (a, b) {\n return a.data.byteOffset - b.data.byteOffset;\n });\n blocks.forEach(function (block, bi) {\n var decoded = decodeBlock(block.data, block.type, timestampScale, timestamp);\n allBlocks.push(decoded);\n });\n });\n return {\n tracks: tracks,\n blocks: allBlocks\n };\n};","import { bytesMatch, toUint8 } from './byte-helpers.js';\nexport var NAL_TYPE_ONE = toUint8([0x00, 0x00, 0x00, 0x01]);\nexport var NAL_TYPE_TWO = toUint8([0x00, 0x00, 0x01]);\nexport var EMULATION_PREVENTION = toUint8([0x00, 0x00, 0x03]);\n/**\n * Expunge any \"Emulation Prevention\" bytes from a \"Raw Byte\n * Sequence Payload\"\n *\n * @param data {Uint8Array} the bytes of a RBSP from a NAL\n * unit\n * @return {Uint8Array} the RBSP without any Emulation\n * Prevention Bytes\n */\n\nexport var discardEmulationPreventionBytes = function discardEmulationPreventionBytes(bytes) {\n var positions = [];\n var i = 1; // Find all `Emulation Prevention Bytes`\n\n while (i < bytes.length - 2) {\n if (bytesMatch(bytes.subarray(i, i + 3), EMULATION_PREVENTION)) {\n positions.push(i + 2);\n i++;\n }\n i++;\n } // If no Emulation Prevention Bytes were found just return the original\n // array\n\n if (positions.length === 0) {\n return bytes;\n } // Create a new array to hold the NAL unit data\n\n var newLength = bytes.length - positions.length;\n var newData = new Uint8Array(newLength);\n var sourceIndex = 0;\n for (i = 0; i < newLength; sourceIndex++, i++) {\n if (sourceIndex === positions[0]) {\n // Skip this byte\n sourceIndex++; // Remove this position index\n\n positions.shift();\n }\n newData[i] = bytes[sourceIndex];\n }\n return newData;\n};\nexport var findNal = function findNal(bytes, dataType, types, nalLimit) {\n if (nalLimit === void 0) {\n nalLimit = Infinity;\n }\n bytes = toUint8(bytes);\n types = [].concat(types);\n var i = 0;\n var nalStart;\n var nalsFound = 0; // keep searching until:\n // we reach the end of bytes\n // we reach the maximum number of nals they want to seach\n // NOTE: that we disregard nalLimit when we have found the start\n // of the nal we want so that we can find the end of the nal we want.\n\n while (i < bytes.length && (nalsFound < nalLimit || nalStart)) {\n var nalOffset = void 0;\n if (bytesMatch(bytes.subarray(i), NAL_TYPE_ONE)) {\n nalOffset = 4;\n } else if (bytesMatch(bytes.subarray(i), NAL_TYPE_TWO)) {\n nalOffset = 3;\n } // we are unsynced,\n // find the next nal unit\n\n if (!nalOffset) {\n i++;\n continue;\n }\n nalsFound++;\n if (nalStart) {\n return discardEmulationPreventionBytes(bytes.subarray(nalStart, i));\n }\n var nalType = void 0;\n if (dataType === 'h264') {\n nalType = bytes[i + nalOffset] & 0x1f;\n } else if (dataType === 'h265') {\n nalType = bytes[i + nalOffset] >> 1 & 0x3f;\n }\n if (types.indexOf(nalType) !== -1) {\n nalStart = i + nalOffset;\n } // nal header is 1 length for h264, and 2 for h265\n\n i += nalOffset + (dataType === 'h264' ? 1 : 2);\n }\n return bytes.subarray(0, 0);\n};\nexport var findH264Nal = function findH264Nal(bytes, type, nalLimit) {\n return findNal(bytes, 'h264', type, nalLimit);\n};\nexport var findH265Nal = function findH265Nal(bytes, type, nalLimit) {\n return findNal(bytes, 'h265', type, nalLimit);\n};","import { toUint8, bytesMatch } from './byte-helpers.js';\nimport { findBox } from './mp4-helpers.js';\nimport { findEbml, EBML_TAGS } from './ebml-helpers.js';\nimport { getId3Offset } from './id3-helpers.js';\nimport { findH264Nal, findH265Nal } from './nal-helpers.js';\nvar CONSTANTS = {\n // \"webm\" string literal in hex\n 'webm': toUint8([0x77, 0x65, 0x62, 0x6d]),\n // \"matroska\" string literal in hex\n 'matroska': toUint8([0x6d, 0x61, 0x74, 0x72, 0x6f, 0x73, 0x6b, 0x61]),\n // \"fLaC\" string literal in hex\n 'flac': toUint8([0x66, 0x4c, 0x61, 0x43]),\n // \"OggS\" string literal in hex\n 'ogg': toUint8([0x4f, 0x67, 0x67, 0x53]),\n // ac-3 sync byte, also works for ec-3 as that is simply a codec\n // of ac-3\n 'ac3': toUint8([0x0b, 0x77]),\n // \"RIFF\" string literal in hex used for wav and avi\n 'riff': toUint8([0x52, 0x49, 0x46, 0x46]),\n // \"AVI\" string literal in hex\n 'avi': toUint8([0x41, 0x56, 0x49]),\n // \"WAVE\" string literal in hex\n 'wav': toUint8([0x57, 0x41, 0x56, 0x45]),\n // \"ftyp3g\" string literal in hex\n '3gp': toUint8([0x66, 0x74, 0x79, 0x70, 0x33, 0x67]),\n // \"ftyp\" string literal in hex\n 'mp4': toUint8([0x66, 0x74, 0x79, 0x70]),\n // \"styp\" string literal in hex\n 'fmp4': toUint8([0x73, 0x74, 0x79, 0x70]),\n // \"ftypqt\" string literal in hex\n 'mov': toUint8([0x66, 0x74, 0x79, 0x70, 0x71, 0x74]),\n // moov string literal in hex\n 'moov': toUint8([0x6D, 0x6F, 0x6F, 0x76]),\n // moof string literal in hex\n 'moof': toUint8([0x6D, 0x6F, 0x6F, 0x66])\n};\nvar _isLikely = {\n aac: function aac(bytes) {\n var offset = getId3Offset(bytes);\n return bytesMatch(bytes, [0xFF, 0x10], {\n offset: offset,\n mask: [0xFF, 0x16]\n });\n },\n mp3: function mp3(bytes) {\n var offset = getId3Offset(bytes);\n return bytesMatch(bytes, [0xFF, 0x02], {\n offset: offset,\n mask: [0xFF, 0x06]\n });\n },\n webm: function webm(bytes) {\n var docType = findEbml(bytes, [EBML_TAGS.EBML, EBML_TAGS.DocType])[0]; // check if DocType EBML tag is webm\n\n return bytesMatch(docType, CONSTANTS.webm);\n },\n mkv: function mkv(bytes) {\n var docType = findEbml(bytes, [EBML_TAGS.EBML, EBML_TAGS.DocType])[0]; // check if DocType EBML tag is matroska\n\n return bytesMatch(docType, CONSTANTS.matroska);\n },\n mp4: function mp4(bytes) {\n // if this file is another base media file format, it is not mp4\n if (_isLikely['3gp'](bytes) || _isLikely.mov(bytes)) {\n return false;\n } // if this file starts with a ftyp or styp box its mp4\n\n if (bytesMatch(bytes, CONSTANTS.mp4, {\n offset: 4\n }) || bytesMatch(bytes, CONSTANTS.fmp4, {\n offset: 4\n })) {\n return true;\n } // if this file starts with a moof/moov box its mp4\n\n if (bytesMatch(bytes, CONSTANTS.moof, {\n offset: 4\n }) || bytesMatch(bytes, CONSTANTS.moov, {\n offset: 4\n })) {\n return true;\n }\n },\n mov: function mov(bytes) {\n return bytesMatch(bytes, CONSTANTS.mov, {\n offset: 4\n });\n },\n '3gp': function gp(bytes) {\n return bytesMatch(bytes, CONSTANTS['3gp'], {\n offset: 4\n });\n },\n ac3: function ac3(bytes) {\n var offset = getId3Offset(bytes);\n return bytesMatch(bytes, CONSTANTS.ac3, {\n offset: offset\n });\n },\n ts: function ts(bytes) {\n if (bytes.length < 189 && bytes.length >= 1) {\n return bytes[0] === 0x47;\n }\n var i = 0; // check the first 376 bytes for two matching sync bytes\n\n while (i + 188 < bytes.length && i < 188) {\n if (bytes[i] === 0x47 && bytes[i + 188] === 0x47) {\n return true;\n }\n i += 1;\n }\n return false;\n },\n flac: function flac(bytes) {\n var offset = getId3Offset(bytes);\n return bytesMatch(bytes, CONSTANTS.flac, {\n offset: offset\n });\n },\n ogg: function ogg(bytes) {\n return bytesMatch(bytes, CONSTANTS.ogg);\n },\n avi: function avi(bytes) {\n return bytesMatch(bytes, CONSTANTS.riff) && bytesMatch(bytes, CONSTANTS.avi, {\n offset: 8\n });\n },\n wav: function wav(bytes) {\n return bytesMatch(bytes, CONSTANTS.riff) && bytesMatch(bytes, CONSTANTS.wav, {\n offset: 8\n });\n },\n 'h264': function h264(bytes) {\n // find seq_parameter_set_rbsp\n return findH264Nal(bytes, 7, 3).length;\n },\n 'h265': function h265(bytes) {\n // find video_parameter_set_rbsp or seq_parameter_set_rbsp\n return findH265Nal(bytes, [32, 33], 3).length;\n }\n}; // get all the isLikely functions\n// but make sure 'ts' is above h264 and h265\n// but below everything else as it is the least specific\n\nvar isLikelyTypes = Object.keys(_isLikely) // remove ts, h264, h265\n.filter(function (t) {\n return t !== 'ts' && t !== 'h264' && t !== 'h265';\n}) // add it back to the bottom\n.concat(['ts', 'h264', 'h265']); // make sure we are dealing with uint8 data.\n\nisLikelyTypes.forEach(function (type) {\n var isLikelyFn = _isLikely[type];\n _isLikely[type] = function (bytes) {\n return isLikelyFn(toUint8(bytes));\n };\n}); // export after wrapping\n\nexport var isLikely = _isLikely; // A useful list of file signatures can be found here\n// https://en.wikipedia.org/wiki/List_of_file_signatures\n\nexport var detectContainerForBytes = function detectContainerForBytes(bytes) {\n bytes = toUint8(bytes);\n for (var i = 0; i < isLikelyTypes.length; i++) {\n var type = isLikelyTypes[i];\n if (isLikely[type](bytes)) {\n return type;\n }\n }\n return '';\n}; // fmp4 is not a container\n\nexport var isLikelyFmp4MediaSegment = function isLikelyFmp4MediaSegment(bytes) {\n return findBox(bytes, ['moof']).length > 0;\n};","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar emptyObject = {};\nif (process.env.NODE_ENV !== 'production') {\n Object.freeze(emptyObject);\n}\nmodule.exports = emptyObject;","function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nvar g;\n\n// This works in non-strict mode\ng = function () {\n return this;\n}();\ntry {\n // This works if eval is allowed (see CSP)\n g = g || new Function(\"return this\")();\n} catch (e) {\n // This works if the window reference is available\n if ((typeof window === \"undefined\" ? \"undefined\" : _typeof(window)) === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;","'use strict';\n\n/**\n * Ponyfill for `Array.prototype.find` which is only available in ES6 runtimes.\n *\n * Works with anything that has a `length` property and index access properties, including NodeList.\n *\n * @template {unknown} T\n * @param {Array | ({length:number, [number]: T})} list\n * @param {function (item: T, index: number, list:Array | ({length:number, [number]: T})):boolean} predicate\n * @param {Partial>?} ac `Array.prototype` by default,\n * \t\t\t\tallows injecting a custom implementation in tests\n * @returns {T | undefined}\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find\n * @see https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array.prototype.find\n */\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction find(list, predicate, ac) {\n if (ac === undefined) {\n ac = Array.prototype;\n }\n if (list && typeof ac.find === 'function') {\n return ac.find.call(list, predicate);\n }\n for (var i = 0; i < list.length; i++) {\n if (Object.prototype.hasOwnProperty.call(list, i)) {\n var item = list[i];\n if (predicate.call(undefined, item, i, list)) {\n return item;\n }\n }\n }\n}\n\n/**\n * \"Shallow freezes\" an object to render it immutable.\n * Uses `Object.freeze` if available,\n * otherwise the immutability is only in the type.\n *\n * Is used to create \"enum like\" objects.\n *\n * @template T\n * @param {T} object the object to freeze\n * @param {Pick = Object} oc `Object` by default,\n * \t\t\t\tallows to inject custom object constructor for tests\n * @returns {Readonly}\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze\n */\nfunction freeze(object, oc) {\n if (oc === undefined) {\n oc = Object;\n }\n return oc && typeof oc.freeze === 'function' ? oc.freeze(object) : object;\n}\n\n/**\n * Since we can not rely on `Object.assign` we provide a simplified version\n * that is sufficient for our needs.\n *\n * @param {Object} target\n * @param {Object | null | undefined} source\n *\n * @returns {Object} target\n * @throws TypeError if target is not an object\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign\n * @see https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.assign\n */\nfunction assign(target, source) {\n if (target === null || _typeof(target) !== 'object') {\n throw new TypeError('target is not an object');\n }\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n return target;\n}\n\n/**\n * All mime types that are allowed as input to `DOMParser.parseFromString`\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString#Argument02 MDN\n * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#domparsersupportedtype WHATWG HTML Spec\n * @see DOMParser.prototype.parseFromString\n */\nvar MIME_TYPE = freeze({\n /**\n * `text/html`, the only mime type that triggers treating an XML document as HTML.\n *\n * @see DOMParser.SupportedType.isHTML\n * @see https://www.iana.org/assignments/media-types/text/html IANA MimeType registration\n * @see https://en.wikipedia.org/wiki/HTML Wikipedia\n * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString MDN\n * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring WHATWG HTML Spec\n */\n HTML: 'text/html',\n /**\n * Helper method to check a mime type if it indicates an HTML document\n *\n * @param {string} [value]\n * @returns {boolean}\n *\n * @see https://www.iana.org/assignments/media-types/text/html IANA MimeType registration\n * @see https://en.wikipedia.org/wiki/HTML Wikipedia\n * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString MDN\n * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring \t */\n isHTML: function isHTML(value) {\n return value === MIME_TYPE.HTML;\n },\n /**\n * `application/xml`, the standard mime type for XML documents.\n *\n * @see https://www.iana.org/assignments/media-types/application/xml IANA MimeType registration\n * @see https://tools.ietf.org/html/rfc7303#section-9.1 RFC 7303\n * @see https://en.wikipedia.org/wiki/XML_and_MIME Wikipedia\n */\n XML_APPLICATION: 'application/xml',\n /**\n * `text/html`, an alias for `application/xml`.\n *\n * @see https://tools.ietf.org/html/rfc7303#section-9.2 RFC 7303\n * @see https://www.iana.org/assignments/media-types/text/xml IANA MimeType registration\n * @see https://en.wikipedia.org/wiki/XML_and_MIME Wikipedia\n */\n XML_TEXT: 'text/xml',\n /**\n * `application/xhtml+xml`, indicates an XML document that has the default HTML namespace,\n * but is parsed as an XML document.\n *\n * @see https://www.iana.org/assignments/media-types/application/xhtml+xml IANA MimeType registration\n * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument WHATWG DOM Spec\n * @see https://en.wikipedia.org/wiki/XHTML Wikipedia\n */\n XML_XHTML_APPLICATION: 'application/xhtml+xml',\n /**\n * `image/svg+xml`,\n *\n * @see https://www.iana.org/assignments/media-types/image/svg+xml IANA MimeType registration\n * @see https://www.w3.org/TR/SVG11/ W3C SVG 1.1\n * @see https://en.wikipedia.org/wiki/Scalable_Vector_Graphics Wikipedia\n */\n XML_SVG_IMAGE: 'image/svg+xml'\n});\n\n/**\n * Namespaces that are used in this code base.\n *\n * @see http://www.w3.org/TR/REC-xml-names\n */\nvar NAMESPACE = freeze({\n /**\n * The XHTML namespace.\n *\n * @see http://www.w3.org/1999/xhtml\n */\n HTML: 'http://www.w3.org/1999/xhtml',\n /**\n * Checks if `uri` equals `NAMESPACE.HTML`.\n *\n * @param {string} [uri]\n *\n * @see NAMESPACE.HTML\n */\n isHTML: function isHTML(uri) {\n return uri === NAMESPACE.HTML;\n },\n /**\n * The SVG namespace.\n *\n * @see http://www.w3.org/2000/svg\n */\n SVG: 'http://www.w3.org/2000/svg',\n /**\n * The `xml:` namespace.\n *\n * @see http://www.w3.org/XML/1998/namespace\n */\n XML: 'http://www.w3.org/XML/1998/namespace',\n /**\n * The `xmlns:` namespace\n *\n * @see https://www.w3.org/2000/xmlns/\n */\n XMLNS: 'http://www.w3.org/2000/xmlns/'\n});\nexports.assign = assign;\nexports.find = find;\nexports.freeze = freeze;\nexports.MIME_TYPE = MIME_TYPE;\nexports.NAMESPACE = NAMESPACE;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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 */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\nvar invariant = require('fbjs/lib/invariant');\nvar OBSERVED_ERROR = {};\n\n/**\n * `Transaction` creates a black box that is able to wrap any method such that\n * certain invariants are maintained before and after the method is invoked\n * (Even if an exception is thrown while invoking the wrapped method). Whoever\n * instantiates a transaction can provide enforcers of the invariants at\n * creation time. The `Transaction` class itself will supply one additional\n * automatic invariant for you - the invariant that any transaction instance\n * should not be run while it is already being run. You would typically create a\n * single instance of a `Transaction` for reuse multiple times, that potentially\n * is used to wrap several different methods. Wrappers are extremely simple -\n * they only require implementing two methods.\n *\n *
\n *                       wrappers (injected at creation time)\n *                                      +        +\n *                                      |        |\n *                    +-----------------|--------|--------------+\n *                    |                 v        |              |\n *                    |      +---------------+   |              |\n *                    |   +--|    wrapper1   |---|----+         |\n *                    |   |  +---------------+   v    |         |\n *                    |   |          +-------------+  |         |\n *                    |   |     +----|   wrapper2  |--------+   |\n *                    |   |     |    +-------------+  |     |   |\n *                    |   |     |                     |     |   |\n *                    |   v     v                     v     v   | wrapper\n *                    | +---+ +---+   +---------+   +---+ +---+ | invariants\n * perform(anyMethod) | |   | |   |   |         |   |   | |   | | maintained\n * +----------------->|-|---|-|---|-->|anyMethod|---|---|-|---|-|-------->\n *                    | |   | |   |   |         |   |   | |   | |\n *                    | |   | |   |   |         |   |   | |   | |\n *                    | |   | |   |   |         |   |   | |   | |\n *                    | +---+ +---+   +---------+   +---+ +---+ |\n *                    |  initialize                    close    |\n *                    +-----------------------------------------+\n * 
\n *\n * Use cases:\n * - Preserving the input selection ranges before/after reconciliation.\n * Restoring selection even in the event of an unexpected error.\n * - Deactivating events while rearranging the DOM, preventing blurs/focuses,\n * while guaranteeing that afterwards, the event system is reactivated.\n * - Flushing a queue of collected DOM mutations to the main UI thread after a\n * reconciliation takes place in a worker thread.\n * - Invoking any collected `componentDidUpdate` callbacks after rendering new\n * content.\n * - (Future use case): Wrapping particular flushes of the `ReactWorker` queue\n * to preserve the `scrollTop` (an automatic scroll aware DOM).\n * - (Future use case): Layout calculations before and after DOM updates.\n *\n * Transactional plugin API:\n * - A module that has an `initialize` method that returns any precomputation.\n * - and a `close` method that accepts the precomputation. `close` is invoked\n * when the wrapped process is completed, or has failed.\n *\n * @param {Array} transactionWrapper Wrapper modules\n * that implement `initialize` and `close`.\n * @return {Transaction} Single transaction for reuse in thread.\n *\n * @class Transaction\n */\nvar TransactionImpl = {\n /**\n * Sets up this instance so that it is prepared for collecting metrics. Does\n * so such that this setup method may be used on an instance that is already\n * initialized, in a way that does not consume additional memory upon reuse.\n * That can be useful if you decide to make your subclass of this mixin a\n * \"PooledClass\".\n */\n reinitializeTransaction: function reinitializeTransaction() {\n this.transactionWrappers = this.getTransactionWrappers();\n if (this.wrapperInitData) {\n this.wrapperInitData.length = 0;\n } else {\n this.wrapperInitData = [];\n }\n this._isInTransaction = false;\n },\n _isInTransaction: false,\n /**\n * @abstract\n * @return {Array} Array of transaction wrappers.\n */\n getTransactionWrappers: null,\n isInTransaction: function isInTransaction() {\n return !!this._isInTransaction;\n },\n /* eslint-disable space-before-function-paren */\n\n /**\n * Executes the function within a safety window. Use this for the top level\n * methods that result in large amounts of computation/mutations that would\n * need to be safety checked. The optional arguments helps prevent the need\n * to bind in many cases.\n *\n * @param {function} method Member of scope to call.\n * @param {Object} scope Scope to invoke from.\n * @param {Object?=} a Argument to pass to the method.\n * @param {Object?=} b Argument to pass to the method.\n * @param {Object?=} c Argument to pass to the method.\n * @param {Object?=} d Argument to pass to the method.\n * @param {Object?=} e Argument to pass to the method.\n * @param {Object?=} f Argument to pass to the method.\n *\n * @return {*} Return value from `method`.\n */\n perform: function perform(method, scope, a, b, c, d, e, f) {\n /* eslint-enable space-before-function-paren */\n !!this.isInTransaction() ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Transaction.perform(...): Cannot initialize a transaction when there is already an outstanding transaction.') : _prodInvariant('27') : void 0;\n var errorThrown;\n var ret;\n try {\n this._isInTransaction = true;\n // Catching errors makes debugging more difficult, so we start with\n // errorThrown set to true before setting it to false after calling\n // close -- if it's still set to true in the finally block, it means\n // one of these calls threw.\n errorThrown = true;\n this.initializeAll(0);\n ret = method.call(scope, a, b, c, d, e, f);\n errorThrown = false;\n } finally {\n try {\n if (errorThrown) {\n // If `method` throws, prefer to show that stack trace over any thrown\n // by invoking `closeAll`.\n try {\n this.closeAll(0);\n } catch (err) {}\n } else {\n // Since `method` didn't throw, we don't want to silence the exception\n // here.\n this.closeAll(0);\n }\n } finally {\n this._isInTransaction = false;\n }\n }\n return ret;\n },\n initializeAll: function initializeAll(startIndex) {\n var transactionWrappers = this.transactionWrappers;\n for (var i = startIndex; i < transactionWrappers.length; i++) {\n var wrapper = transactionWrappers[i];\n try {\n // Catching errors makes debugging more difficult, so we start with the\n // OBSERVED_ERROR state before overwriting it with the real return value\n // of initialize -- if it's still set to OBSERVED_ERROR in the finally\n // block, it means wrapper.initialize threw.\n this.wrapperInitData[i] = OBSERVED_ERROR;\n this.wrapperInitData[i] = wrapper.initialize ? wrapper.initialize.call(this) : null;\n } finally {\n if (this.wrapperInitData[i] === OBSERVED_ERROR) {\n // The initializer for wrapper i threw an error; initialize the\n // remaining wrappers but silence any exceptions from them to ensure\n // that the first error is the one to bubble up.\n try {\n this.initializeAll(i + 1);\n } catch (err) {}\n }\n }\n }\n },\n /**\n * Invokes each of `this.transactionWrappers.close[i]` functions, passing into\n * them the respective return values of `this.transactionWrappers.init[i]`\n * (`close`rs that correspond to initializers that failed will not be\n * invoked).\n */\n closeAll: function closeAll(startIndex) {\n !this.isInTransaction() ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Transaction.closeAll(): Cannot close transaction when none are open.') : _prodInvariant('28') : void 0;\n var transactionWrappers = this.transactionWrappers;\n for (var i = startIndex; i < transactionWrappers.length; i++) {\n var wrapper = transactionWrappers[i];\n var initData = this.wrapperInitData[i];\n var errorThrown;\n try {\n // Catching errors makes debugging more difficult, so we start with\n // errorThrown set to true before setting it to false after calling\n // close -- if it's still set to true in the finally block, it means\n // wrapper.close threw.\n errorThrown = true;\n if (initData !== OBSERVED_ERROR && wrapper.close) {\n wrapper.close.call(this, initData);\n }\n errorThrown = false;\n } finally {\n if (errorThrown) {\n // The closer for wrapper i threw an error; close the remaining\n // wrappers but silence any exceptions from them to ensure that the\n // first error is the one to bubble up.\n try {\n this.closeAll(i + 1);\n } catch (e) {}\n }\n }\n }\n this.wrapperInitData.length = 0;\n }\n};\nmodule.exports = TransactionImpl;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar SyntheticUIEvent = require('./SyntheticUIEvent');\nvar ViewportMetrics = require('./ViewportMetrics');\nvar getEventModifierState = require('./getEventModifierState');\n\n/**\n * @interface MouseEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\nvar MouseEventInterface = {\n screenX: null,\n screenY: null,\n clientX: null,\n clientY: null,\n ctrlKey: null,\n shiftKey: null,\n altKey: null,\n metaKey: null,\n getModifierState: getEventModifierState,\n button: function button(event) {\n // Webkit, Firefox, IE9+\n // which: 1 2 3\n // button: 0 1 2 (standard)\n var button = event.button;\n if ('which' in event) {\n return button;\n }\n // IE<9\n // which: undefined\n // button: 0 0 0\n // button: 1 4 2 (onmouseup)\n return button === 2 ? 2 : button === 4 ? 1 : 0;\n },\n buttons: null,\n relatedTarget: function relatedTarget(event) {\n return event.relatedTarget || (event.fromElement === event.srcElement ? event.toElement : event.fromElement);\n },\n // \"Proprietary\" Interface.\n pageX: function pageX(event) {\n return 'pageX' in event ? event.pageX : event.clientX + ViewportMetrics.currentScrollLeft;\n },\n pageY: function pageY(event) {\n return 'pageY' in event ? event.pageY : event.clientY + ViewportMetrics.currentScrollTop;\n }\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticUIEvent}\n */\nfunction SyntheticMouseEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\nSyntheticUIEvent.augmentClass(SyntheticMouseEvent, MouseEventInterface);\nmodule.exports = SyntheticMouseEvent;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');\nvar DOMNamespaces = require('./DOMNamespaces');\nvar WHITESPACE_TEST = /^[ \\r\\n\\t\\f]/;\nvar NONVISIBLE_TEST = /<(!--|link|noscript|meta|script|style)[ \\r\\n\\t\\f\\/>]/;\nvar createMicrosoftUnsafeLocalFunction = require('./createMicrosoftUnsafeLocalFunction');\n\n// SVG temp container for IE lacking innerHTML\nvar reusableSVGContainer;\n\n/**\n * Set the innerHTML property of a node, ensuring that whitespace is preserved\n * even in IE8.\n *\n * @param {DOMElement} node\n * @param {string} html\n * @internal\n */\nvar setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) {\n // IE does not have innerHTML for SVG nodes, so instead we inject the\n // new markup in a temp node and then move the child nodes across into\n // the target node\n if (node.namespaceURI === DOMNamespaces.svg && !('innerHTML' in node)) {\n reusableSVGContainer = reusableSVGContainer || document.createElement('div');\n reusableSVGContainer.innerHTML = '' + html + '';\n var svgNode = reusableSVGContainer.firstChild;\n while (svgNode.firstChild) {\n node.appendChild(svgNode.firstChild);\n }\n } else {\n node.innerHTML = html;\n }\n});\nif (ExecutionEnvironment.canUseDOM) {\n // IE8: When updating a just created node with innerHTML only leading\n // whitespace is removed. When updating an existing node with innerHTML\n // whitespace in root TextNodes is also collapsed.\n // @see quirksmode.org/bugreports/archives/2004/11/innerhtml_and_t.html\n\n // Feature detection; only IE8 is known to behave improperly like this.\n var testElement = document.createElement('div');\n testElement.innerHTML = ' ';\n if (testElement.innerHTML === '') {\n setInnerHTML = function setInnerHTML(node, html) {\n // Magic theory: IE8 supposedly differentiates between added and updated\n // nodes when processing innerHTML, innerHTML on updated nodes suffers\n // from worse whitespace behavior. Re-adding a node like this triggers\n // the initial and more favorable whitespace behavior.\n // TODO: What to do on a detached node?\n if (node.parentNode) {\n node.parentNode.replaceChild(node, node);\n }\n\n // We also implement a workaround for non-visible tags disappearing into\n // thin air on IE8, this only happens if there is no visible text\n // in-front of the non-visible tags. Piggyback on the whitespace fix\n // and simply check if any non-visible tags appear in the source.\n if (WHITESPACE_TEST.test(html) || html[0] === '<' && NONVISIBLE_TEST.test(html)) {\n // Recover leading whitespace by temporarily prepending any character.\n // \\uFEFF has the potential advantage of being zero-width/invisible.\n // UglifyJS drops U+FEFF chars when parsing, so use String.fromCharCode\n // in hopes that this is preserved even if \"\\uFEFF\" is transformed to\n // the actual Unicode character (by Babel, for example).\n // https://github.com/mishoo/UglifyJS2/blob/v2.4.20/lib/parse.js#L216\n node.innerHTML = String.fromCharCode(0xfeff) + html;\n\n // deleteData leaves an empty `TextNode` which offsets the index of all\n // children. Definitely want to avoid this.\n var textNode = node.firstChild;\n if (textNode.data.length === 1) {\n node.removeChild(textNode);\n } else {\n textNode.deleteData(0, 1);\n }\n } else {\n node.innerHTML = html;\n }\n };\n }\n testElement = null;\n}\nmodule.exports = setInnerHTML;","/**\n * Copyright (c) 2016-present, Facebook, Inc.\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 * Based on the escape-html library, which is used under the MIT License below:\n *\n * Copyright (c) 2012-2013 TJ Holowaychuk\n * Copyright (c) 2015 Andreas Lubbe\n * Copyright (c) 2015 Tiancheng \"Timothy\" Gu\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * 'Software'), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n *\n */\n\n'use strict';\n\n// code copied and modified from escape-html\n/**\n * Module variables.\n * @private\n */\nvar matchHtmlRegExp = /[\"'&<>]/;\n\n/**\n * Escape special characters in the given string of html.\n *\n * @param {string} string The string to escape for inserting into HTML\n * @return {string}\n * @public\n */\n\nfunction escapeHtml(string) {\n var str = '' + string;\n var match = matchHtmlRegExp.exec(str);\n if (!match) {\n return str;\n }\n var escape;\n var html = '';\n var index = 0;\n var lastIndex = 0;\n for (index = match.index; index < str.length; index++) {\n switch (str.charCodeAt(index)) {\n case 34:\n // \"\n escape = '"';\n break;\n case 38:\n // &\n escape = '&';\n break;\n case 39:\n // '\n escape = '''; // modified from escape-html; used to be '''\n break;\n case 60:\n // <\n escape = '<';\n break;\n case 62:\n // >\n escape = '>';\n break;\n default:\n continue;\n }\n if (lastIndex !== index) {\n html += str.substring(lastIndex, index);\n }\n lastIndex = index + 1;\n html += escape;\n }\n return lastIndex !== index ? html + str.substring(lastIndex, index) : html;\n}\n// end code copied and modified from escape-html\n\n/**\n * Escapes text to prevent scripting attacks.\n *\n * @param {*} text Text value to escape.\n * @return {string} An escaped string.\n */\nfunction escapeTextContentForBrowser(text) {\n if (typeof text === 'boolean' || typeof text === 'number') {\n // this shortcircuit helps perf for types that we know will never have\n // special characters, especially given that this function is used often\n // for numeric dom ids.\n return '' + text;\n }\n return escapeHtml(text);\n}\nmodule.exports = escapeTextContentForBrowser;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar _assign = require('object-assign');\nvar EventPluginRegistry = require('./EventPluginRegistry');\nvar ReactEventEmitterMixin = require('./ReactEventEmitterMixin');\nvar ViewportMetrics = require('./ViewportMetrics');\nvar getVendorPrefixedEventName = require('./getVendorPrefixedEventName');\nvar isEventSupported = require('./isEventSupported');\n\n/**\n * Summary of `ReactBrowserEventEmitter` event handling:\n *\n * - Top-level delegation is used to trap most native browser events. This\n * may only occur in the main thread and is the responsibility of\n * ReactEventListener, which is injected and can therefore support pluggable\n * event sources. This is the only work that occurs in the main thread.\n *\n * - We normalize and de-duplicate events to account for browser quirks. This\n * may be done in the worker thread.\n *\n * - Forward these native events (with the associated top-level type used to\n * trap it) to `EventPluginHub`, which in turn will ask plugins if they want\n * to extract any synthetic events.\n *\n * - The `EventPluginHub` will then process each event by annotating them with\n * \"dispatches\", a sequence of listeners and IDs that care about that event.\n *\n * - The `EventPluginHub` then dispatches the events.\n *\n * Overview of React and the event system:\n *\n * +------------+ .\n * | DOM | .\n * +------------+ .\n * | .\n * v .\n * +------------+ .\n * | ReactEvent | .\n * | Listener | .\n * +------------+ . +-----------+\n * | . +--------+|SimpleEvent|\n * | . | |Plugin |\n * +-----|------+ . v +-----------+\n * | | | . +--------------+ +------------+\n * | +-----------.--->|EventPluginHub| | Event |\n * | | . | | +-----------+ | Propagators|\n * | ReactEvent | . | | |TapEvent | |------------|\n * | Emitter | . | |<---+|Plugin | |other plugin|\n * | | . | | +-----------+ | utilities |\n * | +-----------.--->| | +------------+\n * | | | . +--------------+\n * +-----|------+ . ^ +-----------+\n * | . | |Enter/Leave|\n * + . +-------+|Plugin |\n * +-------------+ . +-----------+\n * | application | .\n * |-------------| .\n * | | .\n * | | .\n * +-------------+ .\n * .\n * React Core . General Purpose Event Plugin System\n */\n\nvar hasEventPageXY;\nvar alreadyListeningTo = {};\nvar isMonitoringScrollValue = false;\nvar reactTopListenersCounter = 0;\n\n// For events like 'submit' which don't consistently bubble (which we trap at a\n// lower node than `document`), binding at `document` would cause duplicate\n// events so we don't include them here\nvar topEventMapping = {\n topAbort: 'abort',\n topAnimationEnd: getVendorPrefixedEventName('animationend') || 'animationend',\n topAnimationIteration: getVendorPrefixedEventName('animationiteration') || 'animationiteration',\n topAnimationStart: getVendorPrefixedEventName('animationstart') || 'animationstart',\n topBlur: 'blur',\n topCanPlay: 'canplay',\n topCanPlayThrough: 'canplaythrough',\n topChange: 'change',\n topClick: 'click',\n topCompositionEnd: 'compositionend',\n topCompositionStart: 'compositionstart',\n topCompositionUpdate: 'compositionupdate',\n topContextMenu: 'contextmenu',\n topCopy: 'copy',\n topCut: 'cut',\n topDoubleClick: 'dblclick',\n topDrag: 'drag',\n topDragEnd: 'dragend',\n topDragEnter: 'dragenter',\n topDragExit: 'dragexit',\n topDragLeave: 'dragleave',\n topDragOver: 'dragover',\n topDragStart: 'dragstart',\n topDrop: 'drop',\n topDurationChange: 'durationchange',\n topEmptied: 'emptied',\n topEncrypted: 'encrypted',\n topEnded: 'ended',\n topError: 'error',\n topFocus: 'focus',\n topInput: 'input',\n topKeyDown: 'keydown',\n topKeyPress: 'keypress',\n topKeyUp: 'keyup',\n topLoadedData: 'loadeddata',\n topLoadedMetadata: 'loadedmetadata',\n topLoadStart: 'loadstart',\n topMouseDown: 'mousedown',\n topMouseMove: 'mousemove',\n topMouseOut: 'mouseout',\n topMouseOver: 'mouseover',\n topMouseUp: 'mouseup',\n topPaste: 'paste',\n topPause: 'pause',\n topPlay: 'play',\n topPlaying: 'playing',\n topProgress: 'progress',\n topRateChange: 'ratechange',\n topScroll: 'scroll',\n topSeeked: 'seeked',\n topSeeking: 'seeking',\n topSelectionChange: 'selectionchange',\n topStalled: 'stalled',\n topSuspend: 'suspend',\n topTextInput: 'textInput',\n topTimeUpdate: 'timeupdate',\n topTouchCancel: 'touchcancel',\n topTouchEnd: 'touchend',\n topTouchMove: 'touchmove',\n topTouchStart: 'touchstart',\n topTransitionEnd: getVendorPrefixedEventName('transitionend') || 'transitionend',\n topVolumeChange: 'volumechange',\n topWaiting: 'waiting',\n topWheel: 'wheel'\n};\n\n/**\n * To ensure no conflicts with other potential React instances on the page\n */\nvar topListenersIDKey = '_reactListenersID' + String(Math.random()).slice(2);\nfunction getListeningForDocument(mountAt) {\n // In IE8, `mountAt` is a host object and doesn't have `hasOwnProperty`\n // directly.\n if (!Object.prototype.hasOwnProperty.call(mountAt, topListenersIDKey)) {\n mountAt[topListenersIDKey] = reactTopListenersCounter++;\n alreadyListeningTo[mountAt[topListenersIDKey]] = {};\n }\n return alreadyListeningTo[mountAt[topListenersIDKey]];\n}\n\n/**\n * `ReactBrowserEventEmitter` is used to attach top-level event listeners. For\n * example:\n *\n * EventPluginHub.putListener('myID', 'onClick', myFunction);\n *\n * This would allocate a \"registration\" of `('onClick', myFunction)` on 'myID'.\n *\n * @internal\n */\nvar ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, {\n /**\n * Injectable event backend\n */\n ReactEventListener: null,\n injection: {\n /**\n * @param {object} ReactEventListener\n */\n injectReactEventListener: function injectReactEventListener(ReactEventListener) {\n ReactEventListener.setHandleTopLevel(ReactBrowserEventEmitter.handleTopLevel);\n ReactBrowserEventEmitter.ReactEventListener = ReactEventListener;\n }\n },\n /**\n * Sets whether or not any created callbacks should be enabled.\n *\n * @param {boolean} enabled True if callbacks should be enabled.\n */\n setEnabled: function setEnabled(enabled) {\n if (ReactBrowserEventEmitter.ReactEventListener) {\n ReactBrowserEventEmitter.ReactEventListener.setEnabled(enabled);\n }\n },\n /**\n * @return {boolean} True if callbacks are enabled.\n */\n isEnabled: function isEnabled() {\n return !!(ReactBrowserEventEmitter.ReactEventListener && ReactBrowserEventEmitter.ReactEventListener.isEnabled());\n },\n /**\n * We listen for bubbled touch events on the document object.\n *\n * Firefox v8.01 (and possibly others) exhibited strange behavior when\n * mounting `onmousemove` events at some node that was not the document\n * element. The symptoms were that if your mouse is not moving over something\n * contained within that mount point (for example on the background) the\n * top-level listeners for `onmousemove` won't be called. However, if you\n * register the `mousemove` on the document object, then it will of course\n * catch all `mousemove`s. This along with iOS quirks, justifies restricting\n * top-level listeners to the document object only, at least for these\n * movement types of events and possibly all events.\n *\n * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html\n *\n * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but\n * they bubble to document.\n *\n * @param {string} registrationName Name of listener (e.g. `onClick`).\n * @param {object} contentDocumentHandle Document which owns the container\n */\n listenTo: function listenTo(registrationName, contentDocumentHandle) {\n var mountAt = contentDocumentHandle;\n var isListening = getListeningForDocument(mountAt);\n var dependencies = EventPluginRegistry.registrationNameDependencies[registrationName];\n for (var i = 0; i < dependencies.length; i++) {\n var dependency = dependencies[i];\n if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) {\n if (dependency === 'topWheel') {\n if (isEventSupported('wheel')) {\n ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'wheel', mountAt);\n } else if (isEventSupported('mousewheel')) {\n ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'mousewheel', mountAt);\n } else {\n // Firefox needs to capture a different mouse scroll event.\n // @see http://www.quirksmode.org/dom/events/tests/scroll.html\n ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'DOMMouseScroll', mountAt);\n }\n } else if (dependency === 'topScroll') {\n if (isEventSupported('scroll', true)) {\n ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topScroll', 'scroll', mountAt);\n } else {\n ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topScroll', 'scroll', ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE);\n }\n } else if (dependency === 'topFocus' || dependency === 'topBlur') {\n if (isEventSupported('focus', true)) {\n ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topFocus', 'focus', mountAt);\n ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topBlur', 'blur', mountAt);\n } else if (isEventSupported('focusin')) {\n // IE has `focusin` and `focusout` events which bubble.\n // @see http://www.quirksmode.org/blog/archives/2008/04/delegating_the.html\n ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topFocus', 'focusin', mountAt);\n ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topBlur', 'focusout', mountAt);\n }\n\n // to make sure blur and focus event listeners are only attached once\n isListening.topBlur = true;\n isListening.topFocus = true;\n } else if (topEventMapping.hasOwnProperty(dependency)) {\n ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(dependency, topEventMapping[dependency], mountAt);\n }\n isListening[dependency] = true;\n }\n }\n },\n trapBubbledEvent: function trapBubbledEvent(topLevelType, handlerBaseName, handle) {\n return ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelType, handlerBaseName, handle);\n },\n trapCapturedEvent: function trapCapturedEvent(topLevelType, handlerBaseName, handle) {\n return ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelType, handlerBaseName, handle);\n },\n /**\n * Protect against document.createEvent() returning null\n * Some popup blocker extensions appear to do this:\n * https://github.com/facebook/react/issues/6887\n */\n supportsEventPageXY: function supportsEventPageXY() {\n if (!document.createEvent) {\n return false;\n }\n var ev = document.createEvent('MouseEvent');\n return ev != null && 'pageX' in ev;\n },\n /**\n * Listens to window scroll and resize events. We cache scroll values so that\n * application code can access them without triggering reflows.\n *\n * ViewportMetrics is only used by SyntheticMouse/TouchEvent and only when\n * pageX/pageY isn't supported (legacy browsers).\n *\n * NOTE: Scroll events do not bubble.\n *\n * @see http://www.quirksmode.org/dom/events/scroll.html\n */\n ensureScrollValueMonitoring: function ensureScrollValueMonitoring() {\n if (hasEventPageXY === undefined) {\n hasEventPageXY = ReactBrowserEventEmitter.supportsEventPageXY();\n }\n if (!hasEventPageXY && !isMonitoringScrollValue) {\n var refresh = ViewportMetrics.refreshScrollValues;\n ReactBrowserEventEmitter.ReactEventListener.monitorScrollValue(refresh);\n isMonitoringScrollValue = true;\n }\n }\n});\nmodule.exports = ReactBrowserEventEmitter;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}","function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n/*!\n * domready (c) Dustin Diaz 2014 - License MIT\n */\n!function (name, definition) {\n if (typeof module != 'undefined') module.exports = definition();else if (typeof define == 'function' && _typeof(define.amd) == 'object') define(definition);else this[name] = definition();\n}('domready', function () {\n var fns = [],\n _listener,\n doc = document,\n hack = doc.documentElement.doScroll,\n domContentLoaded = 'DOMContentLoaded',\n loaded = (hack ? /^loaded|^c/ : /^loaded|^i|^c/).test(doc.readyState);\n if (!loaded) doc.addEventListener(domContentLoaded, _listener = function listener() {\n doc.removeEventListener(domContentLoaded, _listener);\n loaded = 1;\n while (_listener = fns.shift()) _listener();\n });\n return function (fn) {\n loaded ? setTimeout(fn, 0) : fns.push(fn);\n };\n});","'use strict';\n\nvar utils = require('./utils');\nvar normalizeHeaderName = require('./helpers/normalizeHeaderName');\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('./adapters/xhr');\n } else if (typeof process !== 'undefined') {\n // For node use HTTP adapter\n adapter = require('./adapters/http');\n }\n return adapter;\n}\nvar defaults = {\n adapter: getDefaultAdapter(),\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Content-Type');\n if (utils.isFormData(data) || utils.isArrayBuffer(data) || utils.isBuffer(data) || utils.isStream(data) || utils.isFile(data) || utils.isBlob(data)) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data)) {\n setContentTypeIfUnset(headers, 'application/json;charset=utf-8');\n return JSON.stringify(data);\n }\n return data;\n }],\n transformResponse: [function transformResponse(data) {\n /*eslint no-param-reassign:0*/\n if (typeof data === 'string') {\n try {\n data = JSON.parse(data);\n } catch (e) {/* Ignore */}\n }\n return data;\n }],\n timeout: 0,\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n maxContentLength: -1,\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\ndefaults.headers = {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n};\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\nmodule.exports = defaults;","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout() {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n})();\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch (e) {\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch (e) {\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e) {\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e) {\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n var len = queue.length;\n while (len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\nfunction noop() {}\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\nprocess.listeners = function (name) {\n return [];\n};\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\nprocess.cwd = function () {\n return '/';\n};\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function () {\n return 0;\n};","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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 */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\nvar invariant = require('fbjs/lib/invariant');\n\n/**\n * Injectable ordering of event plugins.\n */\nvar eventPluginOrder = null;\n\n/**\n * Injectable mapping from names to event plugin modules.\n */\nvar namesToPlugins = {};\n\n/**\n * Recomputes the plugin list using the injected plugins and plugin ordering.\n *\n * @private\n */\nfunction recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : _prodInvariant('96', pluginName) : void 0;\n if (EventPluginRegistry.plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : _prodInvariant('97', pluginName) : void 0;\n EventPluginRegistry.plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : _prodInvariant('98', eventName, pluginName) : void 0;\n }\n }\n}\n\n/**\n * Publishes an event so that it can be dispatched by the supplied plugin.\n *\n * @param {object} dispatchConfig Dispatch configuration for the event.\n * @param {object} PluginModule Plugin publishing the event.\n * @return {boolean} True if the event was successfully published.\n * @private\n */\nfunction publishEventForPlugin(dispatchConfig, pluginModule, eventName) {\n !!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.', eventName) : _prodInvariant('99', eventName) : void 0;\n EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig;\n var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;\n if (phasedRegistrationNames) {\n for (var phaseName in phasedRegistrationNames) {\n if (phasedRegistrationNames.hasOwnProperty(phaseName)) {\n var phasedRegistrationName = phasedRegistrationNames[phaseName];\n publishRegistrationName(phasedRegistrationName, pluginModule, eventName);\n }\n }\n return true;\n } else if (dispatchConfig.registrationName) {\n publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName);\n return true;\n }\n return false;\n}\n\n/**\n * Publishes a registration name that is used to identify dispatched events and\n * can be used with `EventPluginHub.putListener` to register listeners.\n *\n * @param {string} registrationName Registration name to add.\n * @param {object} PluginModule Plugin publishing the event.\n * @private\n */\nfunction publishRegistrationName(registrationName, pluginModule, eventName) {\n !!EventPluginRegistry.registrationNameModules[registrationName] ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.', registrationName) : _prodInvariant('100', registrationName) : void 0;\n EventPluginRegistry.registrationNameModules[registrationName] = pluginModule;\n EventPluginRegistry.registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies;\n if (process.env.NODE_ENV !== 'production') {\n var lowerCasedName = registrationName.toLowerCase();\n EventPluginRegistry.possibleRegistrationNames[lowerCasedName] = registrationName;\n if (registrationName === 'onDoubleClick') {\n EventPluginRegistry.possibleRegistrationNames.ondblclick = registrationName;\n }\n }\n}\n\n/**\n * Registers plugins so that they can extract and dispatch events.\n *\n * @see {EventPluginHub}\n */\nvar EventPluginRegistry = {\n /**\n * Ordered list of injected plugins.\n */\n plugins: [],\n /**\n * Mapping from event name to dispatch config\n */\n eventNameDispatchConfigs: {},\n /**\n * Mapping from registration name to plugin module\n */\n registrationNameModules: {},\n /**\n * Mapping from registration name to event name\n */\n registrationNameDependencies: {},\n /**\n * Mapping from lowercase registration names to the properly cased version,\n * used to warn in the case of missing event handlers. Available\n * only in __DEV__.\n * @type {Object}\n */\n possibleRegistrationNames: process.env.NODE_ENV !== 'production' ? {} : null,\n // Trust the developer to only use possibleRegistrationNames in __DEV__\n\n /**\n * Injects an ordering of plugins (by plugin name). This allows the ordering\n * to be decoupled from injection of the actual plugins so that ordering is\n * always deterministic regardless of packaging, on-the-fly injection, etc.\n *\n * @param {array} InjectedEventPluginOrder\n * @internal\n * @see {EventPluginHub.injection.injectEventPluginOrder}\n */\n injectEventPluginOrder: function injectEventPluginOrder(injectedEventPluginOrder) {\n !!eventPluginOrder ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.') : _prodInvariant('101') : void 0;\n // Clone the ordering so it cannot be dynamically mutated.\n eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder);\n recomputePluginOrdering();\n },\n /**\n * Injects plugins to be used by `EventPluginHub`. The plugin names must be\n * in the ordering injected by `injectEventPluginOrder`.\n *\n * Plugins can be injected as part of page initialization or on-the-fly.\n *\n * @param {object} injectedNamesToPlugins Map from names to plugin modules.\n * @internal\n * @see {EventPluginHub.injection.injectEventPluginsByName}\n */\n injectEventPluginsByName: function injectEventPluginsByName(injectedNamesToPlugins) {\n var isOrderingDirty = false;\n for (var pluginName in injectedNamesToPlugins) {\n if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) {\n continue;\n }\n var pluginModule = injectedNamesToPlugins[pluginName];\n if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) {\n !!namesToPlugins[pluginName] ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.', pluginName) : _prodInvariant('102', pluginName) : void 0;\n namesToPlugins[pluginName] = pluginModule;\n isOrderingDirty = true;\n }\n }\n if (isOrderingDirty) {\n recomputePluginOrdering();\n }\n },\n /**\n * Looks up the plugin for the supplied event.\n *\n * @param {object} event A synthetic event.\n * @return {?object} The plugin that created the supplied event.\n * @internal\n */\n getPluginModuleForEvent: function getPluginModuleForEvent(event) {\n var dispatchConfig = event.dispatchConfig;\n if (dispatchConfig.registrationName) {\n return EventPluginRegistry.registrationNameModules[dispatchConfig.registrationName] || null;\n }\n if (dispatchConfig.phasedRegistrationNames !== undefined) {\n // pulling phasedRegistrationNames out of dispatchConfig helps Flow see\n // that it is not undefined.\n var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;\n for (var phase in phasedRegistrationNames) {\n if (!phasedRegistrationNames.hasOwnProperty(phase)) {\n continue;\n }\n var pluginModule = EventPluginRegistry.registrationNameModules[phasedRegistrationNames[phase]];\n if (pluginModule) {\n return pluginModule;\n }\n }\n }\n return null;\n },\n /**\n * Exposed for unit testing.\n * @private\n */\n _resetEventPlugins: function _resetEventPlugins() {\n eventPluginOrder = null;\n for (var pluginName in namesToPlugins) {\n if (namesToPlugins.hasOwnProperty(pluginName)) {\n delete namesToPlugins[pluginName];\n }\n }\n EventPluginRegistry.plugins.length = 0;\n var eventNameDispatchConfigs = EventPluginRegistry.eventNameDispatchConfigs;\n for (var eventName in eventNameDispatchConfigs) {\n if (eventNameDispatchConfigs.hasOwnProperty(eventName)) {\n delete eventNameDispatchConfigs[eventName];\n }\n }\n var registrationNameModules = EventPluginRegistry.registrationNameModules;\n for (var registrationName in registrationNameModules) {\n if (registrationNameModules.hasOwnProperty(registrationName)) {\n delete registrationNameModules[registrationName];\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n var possibleRegistrationNames = EventPluginRegistry.possibleRegistrationNames;\n for (var lowerCasedName in possibleRegistrationNames) {\n if (possibleRegistrationNames.hasOwnProperty(lowerCasedName)) {\n delete possibleRegistrationNames[lowerCasedName];\n }\n }\n }\n }\n};\nmodule.exports = EventPluginRegistry;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\nvar ReactErrorUtils = require('./ReactErrorUtils');\nvar invariant = require('fbjs/lib/invariant');\nvar warning = require('fbjs/lib/warning');\n\n/**\n * Injected dependencies:\n */\n\n/**\n * - `ComponentTree`: [required] Module that can convert between React instances\n * and actual node references.\n */\nvar ComponentTree;\nvar TreeTraversal;\nvar injection = {\n injectComponentTree: function injectComponentTree(Injected) {\n ComponentTree = Injected;\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(Injected && Injected.getNodeFromInstance && Injected.getInstanceFromNode, 'EventPluginUtils.injection.injectComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.') : void 0;\n }\n },\n injectTreeTraversal: function injectTreeTraversal(Injected) {\n TreeTraversal = Injected;\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(Injected && Injected.isAncestor && Injected.getLowestCommonAncestor, 'EventPluginUtils.injection.injectTreeTraversal(...): Injected ' + 'module is missing isAncestor or getLowestCommonAncestor.') : void 0;\n }\n }\n};\nfunction isEndish(topLevelType) {\n return topLevelType === 'topMouseUp' || topLevelType === 'topTouchEnd' || topLevelType === 'topTouchCancel';\n}\nfunction isMoveish(topLevelType) {\n return topLevelType === 'topMouseMove' || topLevelType === 'topTouchMove';\n}\nfunction isStartish(topLevelType) {\n return topLevelType === 'topMouseDown' || topLevelType === 'topTouchStart';\n}\nvar validateEventDispatches;\nif (process.env.NODE_ENV !== 'production') {\n validateEventDispatches = function validateEventDispatches(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n var listenersIsArr = Array.isArray(dispatchListeners);\n var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0;\n var instancesIsArr = Array.isArray(dispatchInstances);\n var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0;\n process.env.NODE_ENV !== 'production' ? warning(instancesIsArr === listenersIsArr && instancesLen === listenersLen, 'EventPluginUtils: Invalid `event`.') : void 0;\n };\n}\n\n/**\n * Dispatch the event to the listener.\n * @param {SyntheticEvent} event SyntheticEvent to handle\n * @param {boolean} simulated If the event is simulated (changes exn behavior)\n * @param {function} listener Application-level callback\n * @param {*} inst Internal component instance\n */\nfunction executeDispatch(event, simulated, listener, inst) {\n var type = event.type || 'unknown-event';\n event.currentTarget = EventPluginUtils.getNodeFromInstance(inst);\n if (simulated) {\n ReactErrorUtils.invokeGuardedCallbackWithCatch(type, listener, event);\n } else {\n ReactErrorUtils.invokeGuardedCallback(type, listener, event);\n }\n event.currentTarget = null;\n}\n\n/**\n * Standard/simple iteration through an event's collected dispatches.\n */\nfunction executeDispatchesInOrder(event, simulated) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n if (process.env.NODE_ENV !== 'production') {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and Instances are two parallel arrays that are always in sync.\n executeDispatch(event, simulated, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, simulated, dispatchListeners, dispatchInstances);\n }\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}\n\n/**\n * Standard/simple iteration through an event's collected dispatches, but stops\n * at the first dispatch execution returning true, and returns that id.\n *\n * @return {?string} id of the first dispatch execution who's listener returns\n * true, or null if no listener returned true.\n */\nfunction executeDispatchesInOrderStopAtTrueImpl(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n if (process.env.NODE_ENV !== 'production') {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and Instances are two parallel arrays that are always in sync.\n if (dispatchListeners[i](event, dispatchInstances[i])) {\n return dispatchInstances[i];\n }\n }\n } else if (dispatchListeners) {\n if (dispatchListeners(event, dispatchInstances)) {\n return dispatchInstances;\n }\n }\n return null;\n}\n\n/**\n * @see executeDispatchesInOrderStopAtTrueImpl\n */\nfunction executeDispatchesInOrderStopAtTrue(event) {\n var ret = executeDispatchesInOrderStopAtTrueImpl(event);\n event._dispatchInstances = null;\n event._dispatchListeners = null;\n return ret;\n}\n\n/**\n * Execution of a \"direct\" dispatch - there must be at most one dispatch\n * accumulated on the event or it is considered an error. It doesn't really make\n * sense for an event with multiple dispatches (bubbled) to keep track of the\n * return values at each dispatch execution, but it does tend to make sense when\n * dealing with \"direct\" dispatches.\n *\n * @return {*} The return value of executing the single dispatch.\n */\nfunction executeDirectDispatch(event) {\n if (process.env.NODE_ENV !== 'production') {\n validateEventDispatches(event);\n }\n var dispatchListener = event._dispatchListeners;\n var dispatchInstance = event._dispatchInstances;\n !!Array.isArray(dispatchListener) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'executeDirectDispatch(...): Invalid `event`.') : _prodInvariant('103') : void 0;\n event.currentTarget = dispatchListener ? EventPluginUtils.getNodeFromInstance(dispatchInstance) : null;\n var res = dispatchListener ? dispatchListener(event) : null;\n event.currentTarget = null;\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n return res;\n}\n\n/**\n * @param {SyntheticEvent} event\n * @return {boolean} True iff number of dispatches accumulated is greater than 0.\n */\nfunction hasDispatches(event) {\n return !!event._dispatchListeners;\n}\n\n/**\n * General utilities that are useful in creating custom Event Plugins.\n */\nvar EventPluginUtils = {\n isEndish: isEndish,\n isMoveish: isMoveish,\n isStartish: isStartish,\n executeDirectDispatch: executeDirectDispatch,\n executeDispatchesInOrder: executeDispatchesInOrder,\n executeDispatchesInOrderStopAtTrue: executeDispatchesInOrderStopAtTrue,\n hasDispatches: hasDispatches,\n getInstanceFromNode: function getInstanceFromNode(node) {\n return ComponentTree.getInstanceFromNode(node);\n },\n getNodeFromInstance: function getNodeFromInstance(node) {\n return ComponentTree.getNodeFromInstance(node);\n },\n isAncestor: function isAncestor(a, b) {\n return TreeTraversal.isAncestor(a, b);\n },\n getLowestCommonAncestor: function getLowestCommonAncestor(a, b) {\n return TreeTraversal.getLowestCommonAncestor(a, b);\n },\n getParentInstance: function getParentInstance(inst) {\n return TreeTraversal.getParentInstance(inst);\n },\n traverseTwoPhase: function traverseTwoPhase(target, fn, arg) {\n return TreeTraversal.traverseTwoPhase(target, fn, arg);\n },\n traverseEnterLeave: function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n return TreeTraversal.traverseEnterLeave(from, to, fn, argFrom, argTo);\n },\n injection: injection\n};\nmodule.exports = EventPluginUtils;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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 */\n\n'use strict';\n\nvar caughtError = null;\n\n/**\n * Call a function while guarding against errors that happens within it.\n *\n * @param {String} name of the guard to use for logging or debugging\n * @param {Function} func The function to invoke\n * @param {*} a First argument\n * @param {*} b Second argument\n */\nfunction invokeGuardedCallback(name, func, a) {\n try {\n func(a);\n } catch (x) {\n if (caughtError === null) {\n caughtError = x;\n }\n }\n}\nvar ReactErrorUtils = {\n invokeGuardedCallback: invokeGuardedCallback,\n /**\n * Invoked by ReactTestUtils.Simulate so that any errors thrown by the event\n * handler are sure to be rethrown by rethrowCaughtError.\n */\n invokeGuardedCallbackWithCatch: invokeGuardedCallback,\n /**\n * During execution of guarded functions we will capture the first error which\n * we will rethrow to be handled by the top level error handler.\n */\n rethrowCaughtError: function rethrowCaughtError() {\n if (caughtError) {\n var error = caughtError;\n caughtError = null;\n throw error;\n }\n }\n};\nif (process.env.NODE_ENV !== 'production') {\n /**\n * To help development we can get better devtools integration by simulating a\n * real browser event.\n */\n if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {\n var fakeNode = document.createElement('react');\n ReactErrorUtils.invokeGuardedCallback = function (name, func, a) {\n var boundFunc = function boundFunc() {\n func(a);\n };\n var evtType = 'react-' + name;\n fakeNode.addEventListener(evtType, boundFunc, false);\n var evt = document.createEvent('Event');\n evt.initEvent(evtType, false, false);\n fakeNode.dispatchEvent(evt);\n fakeNode.removeEventListener(evtType, boundFunc, false);\n };\n }\n}\nmodule.exports = ReactErrorUtils;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\n/**\n * Gets the target node from a native browser event by accounting for\n * inconsistencies in browser DOM APIs.\n *\n * @param {object} nativeEvent Native browser event.\n * @return {DOMEventTarget} Target node.\n */\nfunction getEventTarget(nativeEvent) {\n var target = nativeEvent.target || nativeEvent.srcElement || window;\n\n // Normalize SVG element events #4963\n if (target.correspondingUseElement) {\n target = target.correspondingUseElement;\n }\n\n // Safari may fire events on text nodes (Node.TEXT_NODE is 3).\n // @see http://www.quirksmode.org/js/events_properties.html\n return target.nodeType === 3 ? target.parentNode : target;\n}\nmodule.exports = getEventTarget;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');\nvar useHasFeature;\nif (ExecutionEnvironment.canUseDOM) {\n useHasFeature = document.implementation && document.implementation.hasFeature &&\n // always returns true in newer browsers as per the standard.\n // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature\n document.implementation.hasFeature('', '') !== true;\n}\n\n/**\n * Checks if an event is supported in the current execution environment.\n *\n * NOTE: This will not work correctly for non-generic events such as `change`,\n * `reset`, `load`, `error`, and `select`.\n *\n * Borrows from Modernizr.\n *\n * @param {string} eventNameSuffix Event name, e.g. \"click\".\n * @param {?boolean} capture Check if the capture phase is supported.\n * @return {boolean} True if the event is supported.\n * @internal\n * @license Modernizr 3.0.0pre (Custom Build) | MIT\n */\nfunction isEventSupported(eventNameSuffix, capture) {\n if (!ExecutionEnvironment.canUseDOM || capture && !('addEventListener' in document)) {\n return false;\n }\n var eventName = 'on' + eventNameSuffix;\n var isSupported = (eventName in document);\n if (!isSupported) {\n var element = document.createElement('div');\n element.setAttribute(eventName, 'return;');\n isSupported = typeof element[eventName] === 'function';\n }\n if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') {\n // This is the only way to test support for the `wheel` event in IE9+.\n isSupported = document.implementation.hasFeature('Events.wheel', '3.0');\n }\n return isSupported;\n}\nmodule.exports = isEventSupported;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\n/**\n * Translation from modifier key to the associated property in the event.\n * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers\n */\nvar modifierKeyToProp = {\n Alt: 'altKey',\n Control: 'ctrlKey',\n Meta: 'metaKey',\n Shift: 'shiftKey'\n};\n\n// IE8 does not implement getModifierState so we simply map it to the only\n// modifier keys exposed by the event itself, does not support Lock-keys.\n// Currently, all major browsers except Chrome seems to support Lock-keys.\nfunction modifierStateGetter(keyArg) {\n var syntheticEvent = this;\n var nativeEvent = syntheticEvent.nativeEvent;\n if (nativeEvent.getModifierState) {\n return nativeEvent.getModifierState(keyArg);\n }\n var keyProp = modifierKeyToProp[keyArg];\n return keyProp ? !!nativeEvent[keyProp] : false;\n}\nfunction getEventModifierState(nativeEvent) {\n return modifierStateGetter;\n}\nmodule.exports = getEventModifierState;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar DOMLazyTree = require('./DOMLazyTree');\nvar Danger = require('./Danger');\nvar ReactDOMComponentTree = require('./ReactDOMComponentTree');\nvar ReactInstrumentation = require('./ReactInstrumentation');\nvar createMicrosoftUnsafeLocalFunction = require('./createMicrosoftUnsafeLocalFunction');\nvar setInnerHTML = require('./setInnerHTML');\nvar setTextContent = require('./setTextContent');\nfunction getNodeAfter(parentNode, node) {\n // Special case for text components, which return [open, close] comments\n // from getHostNode.\n if (Array.isArray(node)) {\n node = node[1];\n }\n return node ? node.nextSibling : parentNode.firstChild;\n}\n\n/**\n * Inserts `childNode` as a child of `parentNode` at the `index`.\n *\n * @param {DOMElement} parentNode Parent node in which to insert.\n * @param {DOMElement} childNode Child node to insert.\n * @param {number} index Index at which to insert the child.\n * @internal\n */\nvar insertChildAt = createMicrosoftUnsafeLocalFunction(function (parentNode, childNode, referenceNode) {\n // We rely exclusively on `insertBefore(node, null)` instead of also using\n // `appendChild(node)`. (Using `undefined` is not allowed by all browsers so\n // we are careful to use `null`.)\n parentNode.insertBefore(childNode, referenceNode);\n});\nfunction insertLazyTreeChildAt(parentNode, childTree, referenceNode) {\n DOMLazyTree.insertTreeBefore(parentNode, childTree, referenceNode);\n}\nfunction moveChild(parentNode, childNode, referenceNode) {\n if (Array.isArray(childNode)) {\n moveDelimitedText(parentNode, childNode[0], childNode[1], referenceNode);\n } else {\n insertChildAt(parentNode, childNode, referenceNode);\n }\n}\nfunction removeChild(parentNode, childNode) {\n if (Array.isArray(childNode)) {\n var closingComment = childNode[1];\n childNode = childNode[0];\n removeDelimitedText(parentNode, childNode, closingComment);\n parentNode.removeChild(closingComment);\n }\n parentNode.removeChild(childNode);\n}\nfunction moveDelimitedText(parentNode, openingComment, closingComment, referenceNode) {\n var node = openingComment;\n while (true) {\n var nextNode = node.nextSibling;\n insertChildAt(parentNode, node, referenceNode);\n if (node === closingComment) {\n break;\n }\n node = nextNode;\n }\n}\nfunction removeDelimitedText(parentNode, startNode, closingComment) {\n while (true) {\n var node = startNode.nextSibling;\n if (node === closingComment) {\n // The closing comment is removed by ReactMultiChild.\n break;\n } else {\n parentNode.removeChild(node);\n }\n }\n}\nfunction replaceDelimitedText(openingComment, closingComment, stringText) {\n var parentNode = openingComment.parentNode;\n var nodeAfterComment = openingComment.nextSibling;\n if (nodeAfterComment === closingComment) {\n // There are no text nodes between the opening and closing comments; insert\n // a new one if stringText isn't empty.\n if (stringText) {\n insertChildAt(parentNode, document.createTextNode(stringText), nodeAfterComment);\n }\n } else {\n if (stringText) {\n // Set the text content of the first node after the opening comment, and\n // remove all following nodes up until the closing comment.\n setTextContent(nodeAfterComment, stringText);\n removeDelimitedText(parentNode, nodeAfterComment, closingComment);\n } else {\n removeDelimitedText(parentNode, openingComment, closingComment);\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n ReactInstrumentation.debugTool.onHostOperation({\n instanceID: ReactDOMComponentTree.getInstanceFromNode(openingComment)._debugID,\n type: 'replace text',\n payload: stringText\n });\n }\n}\nvar dangerouslyReplaceNodeWithMarkup = Danger.dangerouslyReplaceNodeWithMarkup;\nif (process.env.NODE_ENV !== 'production') {\n dangerouslyReplaceNodeWithMarkup = function dangerouslyReplaceNodeWithMarkup(oldChild, markup, prevInstance) {\n Danger.dangerouslyReplaceNodeWithMarkup(oldChild, markup);\n if (prevInstance._debugID !== 0) {\n ReactInstrumentation.debugTool.onHostOperation({\n instanceID: prevInstance._debugID,\n type: 'replace with',\n payload: markup.toString()\n });\n } else {\n var nextInstance = ReactDOMComponentTree.getInstanceFromNode(markup.node);\n if (nextInstance._debugID !== 0) {\n ReactInstrumentation.debugTool.onHostOperation({\n instanceID: nextInstance._debugID,\n type: 'mount',\n payload: markup.toString()\n });\n }\n }\n };\n}\n\n/**\n * Operations for updating with DOM children.\n */\nvar DOMChildrenOperations = {\n dangerouslyReplaceNodeWithMarkup: dangerouslyReplaceNodeWithMarkup,\n replaceDelimitedText: replaceDelimitedText,\n /**\n * Updates a component's children by processing a series of updates. The\n * update configurations are each expected to have a `parentNode` property.\n *\n * @param {array} updates List of update configurations.\n * @internal\n */\n processUpdates: function processUpdates(parentNode, updates) {\n if (process.env.NODE_ENV !== 'production') {\n var parentNodeDebugID = ReactDOMComponentTree.getInstanceFromNode(parentNode)._debugID;\n }\n for (var k = 0; k < updates.length; k++) {\n var update = updates[k];\n switch (update.type) {\n case 'INSERT_MARKUP':\n insertLazyTreeChildAt(parentNode, update.content, getNodeAfter(parentNode, update.afterNode));\n if (process.env.NODE_ENV !== 'production') {\n ReactInstrumentation.debugTool.onHostOperation({\n instanceID: parentNodeDebugID,\n type: 'insert child',\n payload: {\n toIndex: update.toIndex,\n content: update.content.toString()\n }\n });\n }\n break;\n case 'MOVE_EXISTING':\n moveChild(parentNode, update.fromNode, getNodeAfter(parentNode, update.afterNode));\n if (process.env.NODE_ENV !== 'production') {\n ReactInstrumentation.debugTool.onHostOperation({\n instanceID: parentNodeDebugID,\n type: 'move child',\n payload: {\n fromIndex: update.fromIndex,\n toIndex: update.toIndex\n }\n });\n }\n break;\n case 'SET_MARKUP':\n setInnerHTML(parentNode, update.content);\n if (process.env.NODE_ENV !== 'production') {\n ReactInstrumentation.debugTool.onHostOperation({\n instanceID: parentNodeDebugID,\n type: 'replace children',\n payload: update.content.toString()\n });\n }\n break;\n case 'TEXT_CONTENT':\n setTextContent(parentNode, update.content);\n if (process.env.NODE_ENV !== 'production') {\n ReactInstrumentation.debugTool.onHostOperation({\n instanceID: parentNodeDebugID,\n type: 'replace text',\n payload: update.content.toString()\n });\n }\n break;\n case 'REMOVE_NODE':\n removeChild(parentNode, update.fromNode);\n if (process.env.NODE_ENV !== 'production') {\n ReactInstrumentation.debugTool.onHostOperation({\n instanceID: parentNodeDebugID,\n type: 'remove child',\n payload: {\n fromIndex: update.fromIndex\n }\n });\n }\n break;\n }\n }\n }\n};\nmodule.exports = DOMChildrenOperations;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar DOMNamespaces = {\n html: 'http://www.w3.org/1999/xhtml',\n mathml: 'http://www.w3.org/1998/Math/MathML',\n svg: 'http://www.w3.org/2000/svg'\n};\nmodule.exports = DOMNamespaces;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n/* globals MSApp */\n\n'use strict';\n\n/**\n * Create a function which has 'unsafe' privileges (required by windows8 apps)\n */\nvar createMicrosoftUnsafeLocalFunction = function createMicrosoftUnsafeLocalFunction(func) {\n if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) {\n return function (arg0, arg1, arg2, arg3) {\n MSApp.execUnsafeLocalFunction(function () {\n return func(arg0, arg1, arg2, arg3);\n });\n };\n } else {\n return func;\n }\n};\nmodule.exports = createMicrosoftUnsafeLocalFunction;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\nvar ReactPropTypesSecret = require('./ReactPropTypesSecret');\nvar propTypesFactory = require('prop-types/factory');\nvar React = require('react/lib/React');\nvar PropTypes = propTypesFactory(React.isValidElement);\nvar invariant = require('fbjs/lib/invariant');\nvar warning = require('fbjs/lib/warning');\nvar hasReadOnlyValue = {\n button: true,\n checkbox: true,\n image: true,\n hidden: true,\n radio: true,\n reset: true,\n submit: true\n};\nfunction _assertSingleLink(inputProps) {\n !(inputProps.checkedLink == null || inputProps.valueLink == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Cannot provide a checkedLink and a valueLink. If you want to use checkedLink, you probably don\\'t want to use valueLink and vice versa.') : _prodInvariant('87') : void 0;\n}\nfunction _assertValueLink(inputProps) {\n _assertSingleLink(inputProps);\n !(inputProps.value == null && inputProps.onChange == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Cannot provide a valueLink and a value or onChange event. If you want to use value or onChange, you probably don\\'t want to use valueLink.') : _prodInvariant('88') : void 0;\n}\nfunction _assertCheckedLink(inputProps) {\n _assertSingleLink(inputProps);\n !(inputProps.checked == null && inputProps.onChange == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Cannot provide a checkedLink and a checked property or onChange event. If you want to use checked or onChange, you probably don\\'t want to use checkedLink') : _prodInvariant('89') : void 0;\n}\nvar propTypes = {\n value: function value(props, propName, componentName) {\n if (!props[propName] || hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled) {\n return null;\n }\n return new Error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');\n },\n checked: function checked(props, propName, componentName) {\n if (!props[propName] || props.onChange || props.readOnly || props.disabled) {\n return null;\n }\n return new Error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');\n },\n onChange: PropTypes.func\n};\nvar loggedTypeFailures = {};\nfunction getDeclarationErrorAddendum(owner) {\n if (owner) {\n var name = owner.getName();\n if (name) {\n return ' Check the render method of `' + name + '`.';\n }\n }\n return '';\n}\n\n/**\n * Provide a linked `value` attribute for controlled forms. You should not use\n * this outside of the ReactDOM controlled form components.\n */\nvar LinkedValueUtils = {\n checkPropTypes: function checkPropTypes(tagName, props, owner) {\n for (var propName in propTypes) {\n if (propTypes.hasOwnProperty(propName)) {\n var error = propTypes[propName](props, propName, tagName, 'prop', null, ReactPropTypesSecret);\n }\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n var addendum = getDeclarationErrorAddendum(owner);\n process.env.NODE_ENV !== 'production' ? warning(false, 'Failed form propType: %s%s', error.message, addendum) : void 0;\n }\n }\n },\n /**\n * @param {object} inputProps Props for form component\n * @return {*} current value of the input either from value prop or link.\n */\n getValue: function getValue(inputProps) {\n if (inputProps.valueLink) {\n _assertValueLink(inputProps);\n return inputProps.valueLink.value;\n }\n return inputProps.value;\n },\n /**\n * @param {object} inputProps Props for form component\n * @return {*} current checked status of the input either from checked prop\n * or link.\n */\n getChecked: function getChecked(inputProps) {\n if (inputProps.checkedLink) {\n _assertCheckedLink(inputProps);\n return inputProps.checkedLink.value;\n }\n return inputProps.checked;\n },\n /**\n * @param {object} inputProps Props for form component\n * @param {SyntheticEvent} event change event to handle\n */\n executeOnChange: function executeOnChange(inputProps, event) {\n if (inputProps.valueLink) {\n _assertValueLink(inputProps);\n return inputProps.valueLink.requestChange(event.target.value);\n } else if (inputProps.checkedLink) {\n _assertCheckedLink(inputProps);\n return inputProps.checkedLink.requestChange(event.target.checked);\n } else if (inputProps.onChange) {\n return inputProps.onChange.call(undefined, event);\n }\n }\n};\nmodule.exports = LinkedValueUtils;","/**\n * Copyright (c) 2014-present, Facebook, Inc.\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 */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\nvar invariant = require('fbjs/lib/invariant');\nvar injected = false;\nvar ReactComponentEnvironment = {\n /**\n * Optionally injectable hook for swapping out mount images in the middle of\n * the tree.\n */\n replaceNodeWithMarkup: null,\n /**\n * Optionally injectable hook for processing a queue of child updates. Will\n * later move into MultiChildComponents.\n */\n processChildrenUpdates: null,\n injection: {\n injectEnvironment: function injectEnvironment(environment) {\n !!injected ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactCompositeComponent: injectEnvironment() can only be called once.') : _prodInvariant('104') : void 0;\n ReactComponentEnvironment.replaceNodeWithMarkup = environment.replaceNodeWithMarkup;\n ReactComponentEnvironment.processChildrenUpdates = environment.processChildrenUpdates;\n injected = true;\n }\n }\n};\nmodule.exports = ReactComponentEnvironment;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nvar _prodInvariant = require('./reactProdInvariant'),\n _assign = require('object-assign');\nvar ReactCompositeComponent = require('./ReactCompositeComponent');\nvar ReactEmptyComponent = require('./ReactEmptyComponent');\nvar ReactHostComponent = require('./ReactHostComponent');\nvar getNextDebugID = require('react/lib/getNextDebugID');\nvar invariant = require('fbjs/lib/invariant');\nvar warning = require('fbjs/lib/warning');\n\n// To avoid a cyclic dependency, we create the final class in this module\nvar ReactCompositeComponentWrapper = function ReactCompositeComponentWrapper(element) {\n this.construct(element);\n};\nfunction getDeclarationErrorAddendum(owner) {\n if (owner) {\n var name = owner.getName();\n if (name) {\n return ' Check the render method of `' + name + '`.';\n }\n }\n return '';\n}\n\n/**\n * Check if the type reference is a known internal type. I.e. not a user\n * provided composite type.\n *\n * @param {function} type\n * @return {boolean} Returns true if this is a valid internal type.\n */\nfunction isInternalComponentType(type) {\n return typeof type === 'function' && typeof type.prototype !== 'undefined' && typeof type.prototype.mountComponent === 'function' && typeof type.prototype.receiveComponent === 'function';\n}\n\n/**\n * Given a ReactNode, create an instance that will actually be mounted.\n *\n * @param {ReactNode} node\n * @param {boolean} shouldHaveDebugID\n * @return {object} A new instance of the element's constructor.\n * @protected\n */\nfunction instantiateReactComponent(node, shouldHaveDebugID) {\n var instance;\n if (node === null || node === false) {\n instance = ReactEmptyComponent.create(instantiateReactComponent);\n } else if (_typeof(node) === 'object') {\n var element = node;\n var type = element.type;\n if (typeof type !== 'function' && typeof type !== 'string') {\n var info = '';\n if (process.env.NODE_ENV !== 'production') {\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.\";\n }\n }\n info += getDeclarationErrorAddendum(element._owner);\n !false ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s', type == null ? type : _typeof(type), info) : _prodInvariant('130', type == null ? type : _typeof(type), info) : void 0;\n }\n\n // Special case string values\n if (typeof element.type === 'string') {\n instance = ReactHostComponent.createInternalComponent(element);\n } else if (isInternalComponentType(element.type)) {\n // This is temporarily available for custom components that are not string\n // representations. I.e. ART. Once those are updated to use the string\n // representation, we can drop this code path.\n instance = new element.type(element);\n\n // We renamed this. Allow the old name for compat. :(\n if (!instance.getHostNode) {\n instance.getHostNode = instance.getNativeNode;\n }\n } else {\n instance = new ReactCompositeComponentWrapper(element);\n }\n } else if (typeof node === 'string' || typeof node === 'number') {\n instance = ReactHostComponent.createInstanceForText(node);\n } else {\n !false ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Encountered invalid React node of type %s', _typeof(node)) : _prodInvariant('131', _typeof(node)) : void 0;\n }\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(typeof instance.mountComponent === 'function' && typeof instance.receiveComponent === 'function' && typeof instance.getHostNode === 'function' && typeof instance.unmountComponent === 'function', 'Only React Components can be mounted.') : void 0;\n }\n\n // These two fields are used by the DOM and ART diffing algorithms\n // respectively. Instead of using expandos on components, we should be\n // storing the state needed by the diffing algorithms elsewhere.\n instance._mountIndex = 0;\n instance._mountImage = null;\n if (process.env.NODE_ENV !== 'production') {\n instance._debugID = shouldHaveDebugID ? getNextDebugID() : 0;\n }\n\n // Internal instances should fully constructed at this point, so they should\n // not get any new fields added to them at this point.\n if (process.env.NODE_ENV !== 'production') {\n if (Object.preventExtensions) {\n Object.preventExtensions(instance);\n }\n }\n return instance;\n}\n_assign(ReactCompositeComponentWrapper.prototype, ReactCompositeComponent, {\n _instantiateReactComponent: instantiateReactComponent\n});\nmodule.exports = instantiateReactComponent;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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 * @typechecks\n * \n */\n\n/*eslint-disable no-self-compare */\n\n'use strict';\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\n/**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\nfunction is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n // Added the nonzero y check to make Flow happy, but it is redundant\n return x !== 0 || y !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n}\n\n/**\n * Performs equality by iterating through keys on an object and returning false\n * when any key has values which are not strictly equal between the arguments.\n * Returns true when the values of all keys are strictly equal.\n */\nfunction shallowEqual(objA, objB) {\n if (is(objA, objB)) {\n return true;\n }\n if (_typeof(objA) !== 'object' || objA === null || _typeof(objB) !== 'object' || objB === null) {\n return false;\n }\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n if (keysA.length !== keysB.length) {\n return false;\n }\n\n // Test for A's keys different from B.\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n return true;\n}\nmodule.exports = shallowEqual;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\n/**\n * Given a `prevElement` and `nextElement`, determines if the existing\n * instance should be updated as opposed to being destroyed or replaced by a new\n * instance. Both arguments are elements. This ensures that this logic can\n * operate on stateless trees without any backing instance.\n *\n * @param {?object} prevElement\n * @param {?object} nextElement\n * @return {boolean} True if the existing instance should be updated.\n * @protected\n */\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction shouldUpdateReactComponent(prevElement, nextElement) {\n var prevEmpty = prevElement === null || prevElement === false;\n var nextEmpty = nextElement === null || nextElement === false;\n if (prevEmpty || nextEmpty) {\n return prevEmpty === nextEmpty;\n }\n var prevType = _typeof(prevElement);\n var nextType = _typeof(nextElement);\n if (prevType === 'string' || prevType === 'number') {\n return nextType === 'string' || nextType === 'number';\n } else {\n return nextType === 'object' && prevElement.type === nextElement.type && prevElement.key === nextElement.key;\n }\n}\nmodule.exports = shouldUpdateReactComponent;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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 */\n\n'use strict';\n\n/**\n * Escape and wrap key so it is safe to use as a reactid\n *\n * @param {string} key to be escaped.\n * @return {string} the escaped key.\n */\nfunction escape(key) {\n var escapeRegex = /[=:]/g;\n var escaperLookup = {\n '=': '=0',\n ':': '=2'\n };\n var escapedString = ('' + key).replace(escapeRegex, function (match) {\n return escaperLookup[match];\n });\n return '$' + escapedString;\n}\n\n/**\n * Unescape and unwrap key for human-readable display\n *\n * @param {string} key to unescape.\n * @return {string} the unescaped key.\n */\nfunction unescape(key) {\n var unescapeRegex = /(=0|=2)/g;\n var unescaperLookup = {\n '=0': '=',\n '=2': ':'\n };\n var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1);\n return ('' + keySubstring).replace(unescapeRegex, function (match) {\n return unescaperLookup[match];\n });\n}\nvar KeyEscapeUtils = {\n escape: escape,\n unescape: unescape\n};\nmodule.exports = KeyEscapeUtils;","/**\n * Copyright (c) 2015-present, Facebook, Inc.\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\n'use strict';\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nvar _prodInvariant = require('./reactProdInvariant');\nvar ReactCurrentOwner = require('react/lib/ReactCurrentOwner');\nvar ReactInstanceMap = require('./ReactInstanceMap');\nvar ReactInstrumentation = require('./ReactInstrumentation');\nvar ReactUpdates = require('./ReactUpdates');\nvar invariant = require('fbjs/lib/invariant');\nvar warning = require('fbjs/lib/warning');\nfunction enqueueUpdate(internalInstance) {\n ReactUpdates.enqueueUpdate(internalInstance);\n}\nfunction formatUnexpectedArgument(arg) {\n var type = _typeof(arg);\n if (type !== 'object') {\n return type;\n }\n var displayName = arg.constructor && arg.constructor.name || type;\n var keys = Object.keys(arg);\n if (keys.length > 0 && keys.length < 20) {\n return displayName + ' (keys: ' + keys.join(', ') + ')';\n }\n return displayName;\n}\nfunction getInternalInstanceReadyForUpdate(publicInstance, callerName) {\n var internalInstance = ReactInstanceMap.get(publicInstance);\n if (!internalInstance) {\n if (process.env.NODE_ENV !== 'production') {\n var ctor = publicInstance.constructor;\n // Only warn when we have a callerName. Otherwise we should be silent.\n // We're probably calling from enqueueCallback. We don't want to warn\n // there because we already warned for the corresponding lifecycle method.\n process.env.NODE_ENV !== 'production' ? warning(!callerName, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, ctor && (ctor.displayName || ctor.name) || 'ReactClass') : void 0;\n }\n return null;\n }\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(ReactCurrentOwner.current == null, '%s(...): Cannot update during an existing state transition (such as ' + \"within `render` or another component's constructor). Render methods \" + 'should be a pure function of props and state; constructor ' + 'side-effects are an anti-pattern, but can be moved to ' + '`componentWillMount`.', callerName) : void 0;\n }\n return internalInstance;\n}\n\n/**\n * ReactUpdateQueue allows for state updates to be scheduled into a later\n * reconciliation step.\n */\nvar ReactUpdateQueue = {\n /**\n * Checks whether or not this composite component is mounted.\n * @param {ReactClass} publicInstance The instance we want to test.\n * @return {boolean} True if mounted, false otherwise.\n * @protected\n * @final\n */\n isMounted: function isMounted(publicInstance) {\n if (process.env.NODE_ENV !== 'production') {\n var owner = ReactCurrentOwner.current;\n if (owner !== null) {\n process.env.NODE_ENV !== 'production' ? warning(owner._warnedAboutRefsInRender, '%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', owner.getName() || 'A component') : void 0;\n owner._warnedAboutRefsInRender = true;\n }\n }\n var internalInstance = ReactInstanceMap.get(publicInstance);\n if (internalInstance) {\n // During componentWillMount and render this will still be null but after\n // that will always render to something. At least for now. So we can use\n // this hack.\n return !!internalInstance._renderedComponent;\n } else {\n return false;\n }\n },\n /**\n * Enqueue a callback that will be executed after all the pending updates\n * have processed.\n *\n * @param {ReactClass} publicInstance The instance to use as `this` context.\n * @param {?function} callback Called after state is updated.\n * @param {string} callerName Name of the calling function in the public API.\n * @internal\n */\n enqueueCallback: function enqueueCallback(publicInstance, callback, callerName) {\n ReactUpdateQueue.validateCallback(callback, callerName);\n var internalInstance = getInternalInstanceReadyForUpdate(publicInstance);\n\n // Previously we would throw an error if we didn't have an internal\n // instance. Since we want to make it a no-op instead, we mirror the same\n // behavior we have in other enqueue* methods.\n // We also need to ignore callbacks in componentWillMount. See\n // enqueueUpdates.\n if (!internalInstance) {\n return null;\n }\n if (internalInstance._pendingCallbacks) {\n internalInstance._pendingCallbacks.push(callback);\n } else {\n internalInstance._pendingCallbacks = [callback];\n }\n // TODO: The callback here is ignored when setState is called from\n // componentWillMount. Either fix it or disallow doing so completely in\n // favor of getInitialState. Alternatively, we can disallow\n // componentWillMount during server-side rendering.\n enqueueUpdate(internalInstance);\n },\n enqueueCallbackInternal: function enqueueCallbackInternal(internalInstance, callback) {\n if (internalInstance._pendingCallbacks) {\n internalInstance._pendingCallbacks.push(callback);\n } else {\n internalInstance._pendingCallbacks = [callback];\n }\n enqueueUpdate(internalInstance);\n },\n /**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @internal\n */\n enqueueForceUpdate: function enqueueForceUpdate(publicInstance) {\n var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'forceUpdate');\n if (!internalInstance) {\n return;\n }\n internalInstance._pendingForceUpdate = true;\n enqueueUpdate(internalInstance);\n },\n /**\n * Replaces all of the state. Always use this or `setState` to mutate state.\n * You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} completeState Next state.\n * @internal\n */\n enqueueReplaceState: function enqueueReplaceState(publicInstance, completeState, callback) {\n var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'replaceState');\n if (!internalInstance) {\n return;\n }\n internalInstance._pendingStateQueue = [completeState];\n internalInstance._pendingReplaceState = true;\n\n // Future-proof 15.5\n if (callback !== undefined && callback !== null) {\n ReactUpdateQueue.validateCallback(callback, 'replaceState');\n if (internalInstance._pendingCallbacks) {\n internalInstance._pendingCallbacks.push(callback);\n } else {\n internalInstance._pendingCallbacks = [callback];\n }\n }\n enqueueUpdate(internalInstance);\n },\n /**\n * Sets a subset of the state. This only exists because _pendingState is\n * internal. This provides a merging strategy that is not available to deep\n * properties which is confusing. TODO: Expose pendingState or don't use it\n * during the merge.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} partialState Next partial state to be merged with state.\n * @internal\n */\n enqueueSetState: function enqueueSetState(publicInstance, partialState) {\n if (process.env.NODE_ENV !== 'production') {\n ReactInstrumentation.debugTool.onSetState();\n process.env.NODE_ENV !== 'production' ? warning(partialState != null, 'setState(...): You passed an undefined or null state object; ' + 'instead, use forceUpdate().') : void 0;\n }\n var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'setState');\n if (!internalInstance) {\n return;\n }\n var queue = internalInstance._pendingStateQueue || (internalInstance._pendingStateQueue = []);\n queue.push(partialState);\n enqueueUpdate(internalInstance);\n },\n enqueueElementInternal: function enqueueElementInternal(internalInstance, nextElement, nextContext) {\n internalInstance._pendingElement = nextElement;\n // TODO: introduce _pendingContext instead of setting it directly.\n internalInstance._context = nextContext;\n enqueueUpdate(internalInstance);\n },\n validateCallback: function validateCallback(callback, callerName) {\n !(!callback || typeof callback === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.', callerName, formatUnexpectedArgument(callback)) : _prodInvariant('122', callerName, formatUnexpectedArgument(callback)) : void 0;\n }\n};\nmodule.exports = ReactUpdateQueue;","/**\n * Copyright (c) 2015-present, Facebook, Inc.\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\n'use strict';\n\nvar _assign = require('object-assign');\nvar emptyFunction = require('fbjs/lib/emptyFunction');\nvar warning = require('fbjs/lib/warning');\nvar validateDOMNesting = emptyFunction;\nif (process.env.NODE_ENV !== 'production') {\n // This validation code was written based on the HTML5 parsing spec:\n // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope\n //\n // Note: this does not catch all invalid nesting, nor does it try to (as it's\n // not clear what practical benefit doing so provides); instead, we warn only\n // for cases where the parser will give a parse tree differing from what React\n // intended. For example,
is invalid but we don't warn\n // because it still parses correctly; we do warn for other cases like nested\n //

tags where the beginning of the second element implicitly closes the\n // first, causing a confusing mess.\n\n // https://html.spec.whatwg.org/multipage/syntax.html#special\n var specialTags = ['address', 'applet', 'area', 'article', 'aside', 'base', 'basefont', 'bgsound', 'blockquote', 'body', 'br', 'button', 'caption', 'center', 'col', 'colgroup', 'dd', 'details', 'dir', 'div', 'dl', 'dt', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'iframe', 'img', 'input', 'isindex', 'li', 'link', 'listing', 'main', 'marquee', 'menu', 'menuitem', 'meta', 'nav', 'noembed', 'noframes', 'noscript', 'object', 'ol', 'p', 'param', 'plaintext', 'pre', 'script', 'section', 'select', 'source', 'style', 'summary', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul', 'wbr', 'xmp'];\n\n // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope\n var inScopeTags = ['applet', 'caption', 'html', 'table', 'td', 'th', 'marquee', 'object', 'template',\n // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point\n // TODO: Distinguish by namespace here -- for , including it here\n // errs on the side of fewer warnings\n 'foreignObject', 'desc', 'title'];\n\n // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope\n var buttonScopeTags = inScopeTags.concat(['button']);\n\n // https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags\n var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt'];\n var emptyAncestorInfo = {\n current: null,\n formTag: null,\n aTagInScope: null,\n buttonTagInScope: null,\n nobrTagInScope: null,\n pTagInButtonScope: null,\n listItemTagAutoclosing: null,\n dlItemTagAutoclosing: null\n };\n var updatedAncestorInfo = function updatedAncestorInfo(oldInfo, tag, instance) {\n var ancestorInfo = _assign({}, oldInfo || emptyAncestorInfo);\n var info = {\n tag: tag,\n instance: instance\n };\n if (inScopeTags.indexOf(tag) !== -1) {\n ancestorInfo.aTagInScope = null;\n ancestorInfo.buttonTagInScope = null;\n ancestorInfo.nobrTagInScope = null;\n }\n if (buttonScopeTags.indexOf(tag) !== -1) {\n ancestorInfo.pTagInButtonScope = null;\n }\n\n // See rules for 'li', 'dd', 'dt' start tags in\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody\n if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') {\n ancestorInfo.listItemTagAutoclosing = null;\n ancestorInfo.dlItemTagAutoclosing = null;\n }\n ancestorInfo.current = info;\n if (tag === 'form') {\n ancestorInfo.formTag = info;\n }\n if (tag === 'a') {\n ancestorInfo.aTagInScope = info;\n }\n if (tag === 'button') {\n ancestorInfo.buttonTagInScope = info;\n }\n if (tag === 'nobr') {\n ancestorInfo.nobrTagInScope = info;\n }\n if (tag === 'p') {\n ancestorInfo.pTagInButtonScope = info;\n }\n if (tag === 'li') {\n ancestorInfo.listItemTagAutoclosing = info;\n }\n if (tag === 'dd' || tag === 'dt') {\n ancestorInfo.dlItemTagAutoclosing = info;\n }\n return ancestorInfo;\n };\n\n /**\n * Returns whether\n */\n var isTagValidWithParent = function isTagValidWithParent(tag, parentTag) {\n // First, let's check if we're in an unusual parsing mode...\n switch (parentTag) {\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect\n case 'select':\n return tag === 'option' || tag === 'optgroup' || tag === '#text';\n case 'optgroup':\n return tag === 'option' || tag === '#text';\n // Strictly speaking, seeing an <option> doesn't mean we're in a <select>\n // but\n case 'option':\n return tag === '#text';\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption\n // No special behavior since these rules fall back to \"in body\" mode for\n // all except special table nodes which cause bad parsing behavior anyway.\n\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr\n case 'tr':\n return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template';\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody\n case 'tbody':\n case 'thead':\n case 'tfoot':\n return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template';\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup\n case 'colgroup':\n return tag === 'col' || tag === 'template';\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable\n case 'table':\n return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template';\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead\n case 'head':\n return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template';\n // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element\n case 'html':\n return tag === 'head' || tag === 'body';\n case '#document':\n return tag === 'html';\n }\n\n // Probably in the \"in body\" parsing mode, so we outlaw only tag combos\n // where the parsing rules cause implicit opens or closes to be added.\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody\n switch (tag) {\n case 'h1':\n case 'h2':\n case 'h3':\n case 'h4':\n case 'h5':\n case 'h6':\n return parentTag !== 'h1' && parentTag !== 'h2' && parentTag !== 'h3' && parentTag !== 'h4' && parentTag !== 'h5' && parentTag !== 'h6';\n case 'rp':\n case 'rt':\n return impliedEndTags.indexOf(parentTag) === -1;\n case 'body':\n case 'caption':\n case 'col':\n case 'colgroup':\n case 'frame':\n case 'head':\n case 'html':\n case 'tbody':\n case 'td':\n case 'tfoot':\n case 'th':\n case 'thead':\n case 'tr':\n // These tags are only valid with a few parents that have special child\n // parsing rules -- if we're down here, then none of those matched and\n // so we allow it only if we don't know what the parent is, as all other\n // cases are invalid.\n return parentTag == null;\n }\n return true;\n };\n\n /**\n * Returns whether\n */\n var findInvalidAncestorForTag = function findInvalidAncestorForTag(tag, ancestorInfo) {\n switch (tag) {\n case 'address':\n case 'article':\n case 'aside':\n case 'blockquote':\n case 'center':\n case 'details':\n case 'dialog':\n case 'dir':\n case 'div':\n case 'dl':\n case 'fieldset':\n case 'figcaption':\n case 'figure':\n case 'footer':\n case 'header':\n case 'hgroup':\n case 'main':\n case 'menu':\n case 'nav':\n case 'ol':\n case 'p':\n case 'section':\n case 'summary':\n case 'ul':\n case 'pre':\n case 'listing':\n case 'table':\n case 'hr':\n case 'xmp':\n case 'h1':\n case 'h2':\n case 'h3':\n case 'h4':\n case 'h5':\n case 'h6':\n return ancestorInfo.pTagInButtonScope;\n case 'form':\n return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope;\n case 'li':\n return ancestorInfo.listItemTagAutoclosing;\n case 'dd':\n case 'dt':\n return ancestorInfo.dlItemTagAutoclosing;\n case 'button':\n return ancestorInfo.buttonTagInScope;\n case 'a':\n // Spec says something about storing a list of markers, but it sounds\n // equivalent to this check.\n return ancestorInfo.aTagInScope;\n case 'nobr':\n return ancestorInfo.nobrTagInScope;\n }\n return null;\n };\n\n /**\n * Given a ReactCompositeComponent instance, return a list of its recursive\n * owners, starting at the root and ending with the instance itself.\n */\n var findOwnerStack = function findOwnerStack(instance) {\n if (!instance) {\n return [];\n }\n var stack = [];\n do {\n stack.push(instance);\n } while (instance = instance._currentElement._owner);\n stack.reverse();\n return stack;\n };\n var didWarn = {};\n validateDOMNesting = function validateDOMNesting(childTag, childText, childInstance, ancestorInfo) {\n ancestorInfo = ancestorInfo || emptyAncestorInfo;\n var parentInfo = ancestorInfo.current;\n var parentTag = parentInfo && parentInfo.tag;\n if (childText != null) {\n process.env.NODE_ENV !== 'production' ? warning(childTag == null, 'validateDOMNesting: when childText is passed, childTag should be null') : void 0;\n childTag = '#text';\n }\n var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo;\n var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo);\n var problematic = invalidParent || invalidAncestor;\n if (problematic) {\n var ancestorTag = problematic.tag;\n var ancestorInstance = problematic.instance;\n var childOwner = childInstance && childInstance._currentElement._owner;\n var ancestorOwner = ancestorInstance && ancestorInstance._currentElement._owner;\n var childOwners = findOwnerStack(childOwner);\n var ancestorOwners = findOwnerStack(ancestorOwner);\n var minStackLen = Math.min(childOwners.length, ancestorOwners.length);\n var i;\n var deepestCommon = -1;\n for (i = 0; i < minStackLen; i++) {\n if (childOwners[i] === ancestorOwners[i]) {\n deepestCommon = i;\n } else {\n break;\n }\n }\n var UNKNOWN = '(unknown)';\n var childOwnerNames = childOwners.slice(deepestCommon + 1).map(function (inst) {\n return inst.getName() || UNKNOWN;\n });\n var ancestorOwnerNames = ancestorOwners.slice(deepestCommon + 1).map(function (inst) {\n return inst.getName() || UNKNOWN;\n });\n var ownerInfo = [].concat(\n // If the parent and child instances have a common owner ancestor, start\n // with that -- otherwise we just start with the parent's owners.\n deepestCommon !== -1 ? childOwners[deepestCommon].getName() || UNKNOWN : [], ancestorOwnerNames, ancestorTag,\n // If we're warning about an invalid (non-parent) ancestry, add '...'\n invalidAncestor ? ['...'] : [], childOwnerNames, childTag).join(' > ');\n var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag + '|' + ownerInfo;\n if (didWarn[warnKey]) {\n return;\n }\n didWarn[warnKey] = true;\n var tagDisplayName = childTag;\n var whitespaceInfo = '';\n if (childTag === '#text') {\n if (/\\S/.test(childText)) {\n tagDisplayName = 'Text nodes';\n } else {\n tagDisplayName = 'Whitespace text nodes';\n whitespaceInfo = \" Make sure you don't have any extra whitespace between tags on \" + 'each line of your source code.';\n }\n } else {\n tagDisplayName = '<' + childTag + '>';\n }\n if (invalidParent) {\n var info = '';\n if (ancestorTag === 'table' && childTag === 'tr') {\n info += ' Add a <tbody> to your code to match the DOM tree generated by ' + 'the browser.';\n }\n process.env.NODE_ENV !== 'production' ? warning(false, 'validateDOMNesting(...): %s cannot appear as a child of <%s>.%s ' + 'See %s.%s', tagDisplayName, ancestorTag, whitespaceInfo, ownerInfo, info) : void 0;\n } else {\n process.env.NODE_ENV !== 'production' ? warning(false, 'validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>. See %s.', tagDisplayName, ancestorTag, ownerInfo) : void 0;\n }\n }\n };\n validateDOMNesting.updatedAncestorInfo = updatedAncestorInfo;\n\n // For testing\n validateDOMNesting.isTagValidInContext = function (tag, ancestorInfo) {\n ancestorInfo = ancestorInfo || emptyAncestorInfo;\n var parentInfo = ancestorInfo.current;\n var parentTag = parentInfo && parentInfo.tag;\n return isTagValidWithParent(tag, parentTag) && !findInvalidAncestorForTag(tag, ancestorInfo);\n };\n}\nmodule.exports = validateDOMNesting;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\n/**\n * `charCode` represents the actual \"character code\" and is safe to use with\n * `String.fromCharCode`. As such, only keys that correspond to printable\n * characters produce a valid `charCode`, the only exception to this is Enter.\n * The Tab-key is considered non-printable and does not have a `charCode`,\n * presumably because it does not produce a tab-character in browsers.\n *\n * @param {object} nativeEvent Native browser event.\n * @return {number} Normalized `charCode` property.\n */\nfunction getEventCharCode(nativeEvent) {\n var charCode;\n var keyCode = nativeEvent.keyCode;\n if ('charCode' in nativeEvent) {\n charCode = nativeEvent.charCode;\n\n // FF does not set `charCode` for the Enter-key, check against `keyCode`.\n if (charCode === 0 && keyCode === 13) {\n charCode = 13;\n }\n } else {\n // IE8 does not implement `charCode`, but `keyCode` has the correct value.\n charCode = keyCode;\n }\n\n // Some non-printable keys are reported in `charCode`/`keyCode`, discard them.\n // Must not discard the (non-)printable Enter-key.\n if (charCode >= 32 || charCode === 13) {\n return charCode;\n }\n return 0;\n}\nmodule.exports = getEventCharCode;","// Assume className is simple and can be found at top-level (window).\n// Fallback to eval to handle cases like 'My.React.ComponentName'.\n// Also, try to gracefully import Babel 6 style default exports\nvar topLevel = typeof window === \"undefined\" ? this : window;\nmodule.exports = function (className) {\n var constructor;\n // Try to access the class globally first\n constructor = topLevel[className];\n\n // If that didn't work, try eval\n if (!constructor) {\n constructor = eval(className);\n }\n\n // Lastly, if there is a default attribute try that\n if (constructor && constructor['default']) {\n constructor = constructor['default'];\n }\n return constructor;\n};","// Load React components by requiring them from \"components/\", for example:\n//\n// - \"pages/index\" -> `require(\"components/pages/index\")`\n// - \"pages/show.Header\" -> `require(\"components/pages/show\").Header`\n// - \"pages/show.Body.Content\" -> `require(\"components/pages/show\").Body.Content`\n//\nmodule.exports = function (reqctx) {\n return function (className) {\n var parts = className.split(\".\");\n var filename = parts.shift();\n var keys = parts;\n // Load the module:\n var component = reqctx(\"./\" + filename);\n // Then access each key:\n keys.forEach(function (k) {\n component = component[k];\n });\n // support `export default`\n if (component.__esModule) {\n component = component[\"default\"];\n }\n return component;\n };\n};","\"use strict\";\n\nvar window = require(\"global/window\");\nvar _extends = require(\"@babel/runtime/helpers/extends\");\nvar isFunction = require('is-function');\ncreateXHR.httpHandler = require('./http-handler.js');\n/**\n * @license\n * slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>\n * Copyright (c) 2014 David Björklund\n * Available under the MIT license\n * <https://github.com/kesla/parse-headers/blob/master/LICENCE>\n */\n\nvar parseHeaders = function parseHeaders(headers) {\n var result = {};\n if (!headers) {\n return result;\n }\n headers.trim().split('\\n').forEach(function (row) {\n var index = row.indexOf(':');\n var key = row.slice(0, index).trim().toLowerCase();\n var value = row.slice(index + 1).trim();\n if (typeof result[key] === 'undefined') {\n result[key] = value;\n } else if (Array.isArray(result[key])) {\n result[key].push(value);\n } else {\n result[key] = [result[key], value];\n }\n });\n return result;\n};\nmodule.exports = createXHR; // Allow use of default import syntax in TypeScript\n\nmodule.exports[\"default\"] = createXHR;\ncreateXHR.XMLHttpRequest = window.XMLHttpRequest || noop;\ncreateXHR.XDomainRequest = \"withCredentials\" in new createXHR.XMLHttpRequest() ? createXHR.XMLHttpRequest : window.XDomainRequest;\nforEachArray([\"get\", \"put\", \"post\", \"patch\", \"head\", \"delete\"], function (method) {\n createXHR[method === \"delete\" ? \"del\" : method] = function (uri, options, callback) {\n options = initParams(uri, options, callback);\n options.method = method.toUpperCase();\n return _createXHR(options);\n };\n});\nfunction forEachArray(array, iterator) {\n for (var i = 0; i < array.length; i++) {\n iterator(array[i]);\n }\n}\nfunction isEmpty(obj) {\n for (var i in obj) {\n if (obj.hasOwnProperty(i)) return false;\n }\n return true;\n}\nfunction initParams(uri, options, callback) {\n var params = uri;\n if (isFunction(options)) {\n callback = options;\n if (typeof uri === \"string\") {\n params = {\n uri: uri\n };\n }\n } else {\n params = _extends({}, options, {\n uri: uri\n });\n }\n params.callback = callback;\n return params;\n}\nfunction createXHR(uri, options, callback) {\n options = initParams(uri, options, callback);\n return _createXHR(options);\n}\nfunction _createXHR(options) {\n if (typeof options.callback === \"undefined\") {\n throw new Error(\"callback argument missing\");\n }\n var called = false;\n var callback = function cbOnce(err, response, body) {\n if (!called) {\n called = true;\n options.callback(err, response, body);\n }\n };\n function readystatechange() {\n if (xhr.readyState === 4) {\n setTimeout(loadFunc, 0);\n }\n }\n function getBody() {\n // Chrome with requestType=blob throws errors arround when even testing access to responseText\n var body = undefined;\n if (xhr.response) {\n body = xhr.response;\n } else {\n body = xhr.responseText || getXml(xhr);\n }\n if (isJson) {\n try {\n body = JSON.parse(body);\n } catch (e) {}\n }\n return body;\n }\n function errorFunc(evt) {\n clearTimeout(timeoutTimer);\n if (!(evt instanceof Error)) {\n evt = new Error(\"\" + (evt || \"Unknown XMLHttpRequest Error\"));\n }\n evt.statusCode = 0;\n return callback(evt, failureResponse);\n } // will load the data & process the response in a special response object\n\n function loadFunc() {\n if (aborted) return;\n var status;\n clearTimeout(timeoutTimer);\n if (options.useXDR && xhr.status === undefined) {\n //IE8 CORS GET successful response doesn't have a status field, but body is fine\n status = 200;\n } else {\n status = xhr.status === 1223 ? 204 : xhr.status;\n }\n var response = failureResponse;\n var err = null;\n if (status !== 0) {\n response = {\n body: getBody(),\n statusCode: status,\n method: method,\n headers: {},\n url: uri,\n rawRequest: xhr\n };\n if (xhr.getAllResponseHeaders) {\n //remember xhr can in fact be XDR for CORS in IE\n response.headers = parseHeaders(xhr.getAllResponseHeaders());\n }\n } else {\n err = new Error(\"Internal XMLHttpRequest Error\");\n }\n return callback(err, response, response.body);\n }\n var xhr = options.xhr || null;\n if (!xhr) {\n if (options.cors || options.useXDR) {\n xhr = new createXHR.XDomainRequest();\n } else {\n xhr = new createXHR.XMLHttpRequest();\n }\n }\n var key;\n var aborted;\n var uri = xhr.url = options.uri || options.url;\n var method = xhr.method = options.method || \"GET\";\n var body = options.body || options.data;\n var headers = xhr.headers = options.headers || {};\n var sync = !!options.sync;\n var isJson = false;\n var timeoutTimer;\n var failureResponse = {\n body: undefined,\n headers: {},\n statusCode: 0,\n method: method,\n url: uri,\n rawRequest: xhr\n };\n if (\"json\" in options && options.json !== false) {\n isJson = true;\n headers[\"accept\"] || headers[\"Accept\"] || (headers[\"Accept\"] = \"application/json\"); //Don't override existing accept header declared by user\n\n if (method !== \"GET\" && method !== \"HEAD\") {\n headers[\"content-type\"] || headers[\"Content-Type\"] || (headers[\"Content-Type\"] = \"application/json\"); //Don't override existing accept header declared by user\n\n body = JSON.stringify(options.json === true ? body : options.json);\n }\n }\n xhr.onreadystatechange = readystatechange;\n xhr.onload = loadFunc;\n xhr.onerror = errorFunc; // IE9 must have onprogress be set to a unique function.\n\n xhr.onprogress = function () {// IE must die\n };\n xhr.onabort = function () {\n aborted = true;\n };\n xhr.ontimeout = errorFunc;\n xhr.open(method, uri, !sync, options.username, options.password); //has to be after open\n\n if (!sync) {\n xhr.withCredentials = !!options.withCredentials;\n } // Cannot set timeout with sync request\n // not setting timeout on the xhr object, because of old webkits etc. not handling that correctly\n // both npm's request and jquery 1.x use this kind of timeout, so this is being consistent\n\n if (!sync && options.timeout > 0) {\n timeoutTimer = setTimeout(function () {\n if (aborted) return;\n aborted = true; //IE9 may still call readystatechange\n\n xhr.abort(\"timeout\");\n var e = new Error(\"XMLHttpRequest timeout\");\n e.code = \"ETIMEDOUT\";\n errorFunc(e);\n }, options.timeout);\n }\n if (xhr.setRequestHeader) {\n for (key in headers) {\n if (headers.hasOwnProperty(key)) {\n xhr.setRequestHeader(key, headers[key]);\n }\n }\n } else if (options.headers && !isEmpty(options.headers)) {\n throw new Error(\"Headers cannot be set on an XDomainRequest object\");\n }\n if (\"responseType\" in options) {\n xhr.responseType = options.responseType;\n }\n if (\"beforeSend\" in options && typeof options.beforeSend === \"function\") {\n options.beforeSend(xhr);\n } // Microsoft Edge browser sends \"undefined\" when send is called with undefined value.\n // XMLHttpRequest spec says to pass null as body to indicate no body\n // See https://github.com/naugtur/xhr/issues/100.\n\n xhr.send(body || null);\n return xhr;\n}\nfunction getXml(xhr) {\n // xhr.responseXML will throw Exception \"InvalidStateError\" or \"DOMException\"\n // See https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseXML.\n try {\n if (xhr.responseType === \"document\") {\n return xhr.responseXML;\n }\n var firefoxBugTakenEffect = xhr.responseXML && xhr.responseXML.documentElement.nodeName === \"parsererror\";\n if (xhr.responseType === \"\" && !firefoxBugTakenEffect) {\n return xhr.responseXML;\n }\n } catch (e) {}\n return null;\n}\nfunction noop() {}","/**\n * Copyright 2013 vtt.js Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// Default exports for Node. Export the extended versions of VTTCue and\n// VTTRegion in Node since we likely want the capability to convert back and\n// forth between JSON. If we don't then it's not that big of a deal since we're\n// off browser.\n\nvar window = require('global/window');\nvar vttjs = module.exports = {\n WebVTT: require(\"./vtt.js\"),\n VTTCue: require(\"./vttcue.js\"),\n VTTRegion: require(\"./vttregion.js\")\n};\nwindow.vttjs = vttjs;\nwindow.WebVTT = vttjs.WebVTT;\nvar cueShim = vttjs.VTTCue;\nvar regionShim = vttjs.VTTRegion;\nvar nativeVTTCue = window.VTTCue;\nvar nativeVTTRegion = window.VTTRegion;\nvttjs.shim = function () {\n window.VTTCue = cueShim;\n window.VTTRegion = regionShim;\n};\nvttjs.restore = function () {\n window.VTTCue = nativeVTTCue;\n window.VTTRegion = nativeVTTRegion;\n};\nif (!window.VTTCue) {\n vttjs.shim();\n}","var MPEGURL_REGEX = /^(audio|video|application)\\/(x-|vnd\\.apple\\.)?mpegurl/i;\nvar DASH_REGEX = /^application\\/dash\\+xml/i;\n/**\n * Returns a string that describes the type of source based on a video source object's\n * media type.\n *\n * @see {@link https://dev.w3.org/html5/pf-summary/video.html#dom-source-type|Source Type}\n *\n * @param {string} type\n * Video source object media type\n * @return {('hls'|'dash'|'vhs-json'|null)}\n * VHS source type string\n */\n\nexport var simpleTypeFromSourceType = function simpleTypeFromSourceType(type) {\n if (MPEGURL_REGEX.test(type)) {\n return 'hls';\n }\n if (DASH_REGEX.test(type)) {\n return 'dash';\n } // Denotes the special case of a manifest object passed to http-streaming instead of a\n // source URL.\n //\n // See https://en.wikipedia.org/wiki/Media_type for details on specifying media types.\n //\n // In this case, vnd stands for vendor, video.js for the organization, VHS for this\n // project, and the +json suffix identifies the structure of the media type.\n\n if (type === 'application/vnd.videojs.vhs+json') {\n return 'vhs-json';\n }\n return null;\n};","function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it[\"return\"] != null) it[\"return\"](); } finally { if (didErr) throw err; } } }; }\nfunction _wrapNativeSuper(Class) { var _cache = typeof Map === \"function\" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== \"function\") { throw new TypeError(\"Super expression must either be null or a function\"); } if (typeof _cache !== \"undefined\") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }\nfunction _isNativeFunction(fn) { try { return Function.toString.call(fn).indexOf(\"[native code]\") !== -1; } catch (e) { return typeof fn === \"function\"; } }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\nfunction _toArray(arr) { return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest(); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _iterableToArrayLimit(r, l) { var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : String(i); }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n/**\n * @license\n * Video.js 8.6.1 <http://videojs.com/>\n * Copyright Brightcove, Inc. <https://www.brightcove.com/>\n * Available under Apache License Version 2.0\n * <https://github.com/videojs/video.js/blob/main/LICENSE>\n *\n * Includes vtt.js <https://github.com/mozilla/vtt.js>\n * Available under Apache License Version 2.0\n * <https://github.com/mozilla/vtt.js/blob/main/LICENSE>\n */\n\nimport window$1 from 'global/window';\nimport document from 'global/document';\nimport keycode from 'keycode';\nimport safeParseTuple from 'safe-json-parse/tuple';\nimport XHR from '@videojs/xhr';\nimport vtt from 'videojs-vtt.js';\nimport _resolveUrl from '@videojs/vhs-utils/es/resolve-url.js';\nimport _extends from '@babel/runtime/helpers/extends';\nimport { Parser } from 'm3u8-parser';\nimport { DEFAULT_VIDEO_CODEC, DEFAULT_AUDIO_CODEC, parseCodecs, muxerSupportsCodec, browserSupportsCodec, translateLegacyCodec, codecsFromDefault, isAudioCodec, getMimeForCodec } from '@videojs/vhs-utils/es/codecs.js';\nimport { simpleTypeFromSourceType } from '@videojs/vhs-utils/es/media-types.js';\nimport { isArrayBufferView, concatTypedArrays, stringToBytes, toUint8 } from '@videojs/vhs-utils/es/byte-helpers';\nimport { generateSidxKey, parseUTCTiming, parse, addSidxSegmentsToPlaylist } from 'mpd-parser';\nimport parseSidx from 'mux.js/lib/tools/parse-sidx';\nimport { getId3Offset } from '@videojs/vhs-utils/es/id3-helpers';\nimport { detectContainerForBytes, isLikelyFmp4MediaSegment } from '@videojs/vhs-utils/es/containers';\nimport { ONE_SECOND_IN_TS } from 'mux.js/lib/utils/clock';\nvar version$6 = \"8.6.1\";\n\n/**\n * An Object that contains lifecycle hooks as keys which point to an array\n * of functions that are run when a lifecycle is triggered\n *\n * @private\n */\nvar hooks_ = {};\n\n/**\n * Get a list of hooks for a specific lifecycle\n *\n * @param {string} type\n * the lifecycle to get hooks from\n *\n * @param {Function|Function[]} [fn]\n * Optionally add a hook (or hooks) to the lifecycle that your are getting.\n *\n * @return {Array}\n * an array of hooks, or an empty array if there are none.\n */\nvar hooks = function hooks(type, fn) {\n hooks_[type] = hooks_[type] || [];\n if (fn) {\n hooks_[type] = hooks_[type].concat(fn);\n }\n return hooks_[type];\n};\n\n/**\n * Add a function hook to a specific videojs lifecycle.\n *\n * @param {string} type\n * the lifecycle to hook the function to.\n *\n * @param {Function|Function[]}\n * The function or array of functions to attach.\n */\nvar hook = function hook(type, fn) {\n hooks(type, fn);\n};\n\n/**\n * Remove a hook from a specific videojs lifecycle.\n *\n * @param {string} type\n * the lifecycle that the function hooked to\n *\n * @param {Function} fn\n * The hooked function to remove\n *\n * @return {boolean}\n * The function that was removed or undef\n */\nvar removeHook = function removeHook(type, fn) {\n var index = hooks(type).indexOf(fn);\n if (index <= -1) {\n return false;\n }\n hooks_[type] = hooks_[type].slice();\n hooks_[type].splice(index, 1);\n return true;\n};\n\n/**\n * Add a function hook that will only run once to a specific videojs lifecycle.\n *\n * @param {string} type\n * the lifecycle to hook the function to.\n *\n * @param {Function|Function[]}\n * The function or array of functions to attach.\n */\nvar hookOnce = function hookOnce(type, fn) {\n hooks(type, [].concat(fn).map(function (original) {\n var wrapper = function wrapper() {\n removeHook(type, wrapper);\n return original.apply(void 0, arguments);\n };\n return wrapper;\n }));\n};\n\n/**\n * @file fullscreen-api.js\n * @module fullscreen-api\n */\n\n/**\n * Store the browser-specific methods for the fullscreen API.\n *\n * @type {Object}\n * @see [Specification]{@link https://fullscreen.spec.whatwg.org}\n * @see [Map Approach From Screenfull.js]{@link https://github.com/sindresorhus/screenfull.js}\n */\nvar FullscreenApi = {\n prefixed: true\n};\n\n// browser API methods\nvar apiMap = [['requestFullscreen', 'exitFullscreen', 'fullscreenElement', 'fullscreenEnabled', 'fullscreenchange', 'fullscreenerror', 'fullscreen'],\n// WebKit\n['webkitRequestFullscreen', 'webkitExitFullscreen', 'webkitFullscreenElement', 'webkitFullscreenEnabled', 'webkitfullscreenchange', 'webkitfullscreenerror', '-webkit-full-screen']];\nvar specApi = apiMap[0];\nvar browserApi;\n\n// determine the supported set of functions\nfor (var i = 0; i < apiMap.length; i++) {\n // check for exitFullscreen function\n if (apiMap[i][1] in document) {\n browserApi = apiMap[i];\n break;\n }\n}\n\n// map the browser API names to the spec API names\nif (browserApi) {\n for (var _i2 = 0; _i2 < browserApi.length; _i2++) {\n FullscreenApi[specApi[_i2]] = browserApi[_i2];\n }\n FullscreenApi.prefixed = browserApi[0] !== specApi[0];\n}\n\n/**\n * @file create-logger.js\n * @module create-logger\n */\n\n// This is the private tracking variable for the logging history.\nvar history = [];\n\n/**\n * Log messages to the console and history based on the type of message\n *\n * @private\n * @param {string} name\n * The name of the console method to use.\n *\n * @param {Object} log\n * The arguments to be passed to the matching console method.\n *\n * @param {string} [styles]\n * styles for name\n */\nvar LogByTypeFactory = function LogByTypeFactory(name, log, styles) {\n return function (type, level, args) {\n var lvl = log.levels[level];\n var lvlRegExp = new RegExp(\"^(\".concat(lvl, \")$\"));\n var resultName = name;\n if (type !== 'log') {\n // Add the type to the front of the message when it's not \"log\".\n args.unshift(type.toUpperCase() + ':');\n }\n if (styles) {\n resultName = \"%c\".concat(name);\n args.unshift(styles);\n }\n\n // Add console prefix after adding to history.\n args.unshift(resultName + ':');\n\n // Add a clone of the args at this point to history.\n if (history) {\n history.push([].concat(args));\n\n // only store 1000 history entries\n var splice = history.length - 1000;\n history.splice(0, splice > 0 ? splice : 0);\n }\n\n // If there's no console then don't try to output messages, but they will\n // still be stored in history.\n if (!window$1.console) {\n return;\n }\n\n // Was setting these once outside of this function, but containing them\n // in the function makes it easier to test cases where console doesn't exist\n // when the module is executed.\n var fn = window$1.console[type];\n if (!fn && type === 'debug') {\n // Certain browsers don't have support for console.debug. For those, we\n // should default to the closest comparable log.\n fn = window$1.console.info || window$1.console.log;\n }\n\n // Bail out if there's no console or if this type is not allowed by the\n // current logging level.\n if (!fn || !lvl || !lvlRegExp.test(type)) {\n return;\n }\n fn[Array.isArray(args) ? 'apply' : 'call'](window$1.console, args);\n };\n};\nfunction createLogger$1(name) {\n var delimiter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ':';\n var styles = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n // This is the private tracking variable for logging level.\n var level = 'info';\n\n // the curried logByType bound to the specific log and history\n var logByType;\n\n /**\n * Logs plain debug messages. Similar to `console.log`.\n *\n * Due to [limitations](https://github.com/jsdoc3/jsdoc/issues/955#issuecomment-313829149)\n * of our JSDoc template, we cannot properly document this as both a function\n * and a namespace, so its function signature is documented here.\n *\n * #### Arguments\n * ##### *args\n * *[]\n *\n * Any combination of values that could be passed to `console.log()`.\n *\n * #### Return Value\n *\n * `undefined`\n *\n * @namespace\n * @param {...*} args\n * One or more messages or objects that should be logged.\n */\n var log = function log() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n logByType('log', level, args);\n };\n\n // This is the logByType helper that the logging methods below use\n logByType = LogByTypeFactory(name, log, styles);\n\n /**\n * Create a new subLogger which chains the old name to the new name.\n *\n * For example, doing `videojs.log.createLogger('player')` and then using that logger will log the following:\n * ```js\n * mylogger('foo');\n * // > VIDEOJS: player: foo\n * ```\n *\n * @param {string} subName\n * The name to add call the new logger\n * @param {string} [subDelimiter]\n * Optional delimiter\n * @param {string} [subStyles]\n * Optional styles\n * @return {Object}\n */\n log.createLogger = function (subName, subDelimiter, subStyles) {\n var resultDelimiter = subDelimiter !== undefined ? subDelimiter : delimiter;\n var resultStyles = subStyles !== undefined ? subStyles : styles;\n var resultName = \"\".concat(name, \" \").concat(resultDelimiter, \" \").concat(subName);\n return createLogger$1(resultName, resultDelimiter, resultStyles);\n };\n\n /**\n * Create a new logger.\n *\n * @param {string} newName\n * The name for the new logger\n * @param {string} [newDelimiter]\n * Optional delimiter\n * @param {string} [newStyles]\n * Optional styles\n * @return {Object}\n */\n log.createNewLogger = function (newName, newDelimiter, newStyles) {\n return createLogger$1(newName, newDelimiter, newStyles);\n };\n\n /**\n * Enumeration of available logging levels, where the keys are the level names\n * and the values are `|`-separated strings containing logging methods allowed\n * in that logging level. These strings are used to create a regular expression\n * matching the function name being called.\n *\n * Levels provided by Video.js are:\n *\n * - `off`: Matches no calls. Any value that can be cast to `false` will have\n * this effect. The most restrictive.\n * - `all`: Matches only Video.js-provided functions (`debug`, `log`,\n * `log.warn`, and `log.error`).\n * - `debug`: Matches `log.debug`, `log`, `log.warn`, and `log.error` calls.\n * - `info` (default): Matches `log`, `log.warn`, and `log.error` calls.\n * - `warn`: Matches `log.warn` and `log.error` calls.\n * - `error`: Matches only `log.error` calls.\n *\n * @type {Object}\n */\n log.levels = {\n all: 'debug|log|warn|error',\n off: '',\n debug: 'debug|log|warn|error',\n info: 'log|warn|error',\n warn: 'warn|error',\n error: 'error',\n DEFAULT: level\n };\n\n /**\n * Get or set the current logging level.\n *\n * If a string matching a key from {@link module:log.levels} is provided, acts\n * as a setter.\n *\n * @param {'all'|'debug'|'info'|'warn'|'error'|'off'} [lvl]\n * Pass a valid level to set a new logging level.\n *\n * @return {string}\n * The current logging level.\n */\n log.level = function (lvl) {\n if (typeof lvl === 'string') {\n if (!log.levels.hasOwnProperty(lvl)) {\n throw new Error(\"\\\"\".concat(lvl, \"\\\" in not a valid log level\"));\n }\n level = lvl;\n }\n return level;\n };\n\n /**\n * Returns an array containing everything that has been logged to the history.\n *\n * This array is a shallow clone of the internal history record. However, its\n * contents are _not_ cloned; so, mutating objects inside this array will\n * mutate them in history.\n *\n * @return {Array}\n */\n log.history = function () {\n return history ? [].concat(history) : [];\n };\n\n /**\n * Allows you to filter the history by the given logger name\n *\n * @param {string} fname\n * The name to filter by\n *\n * @return {Array}\n * The filtered list to return\n */\n log.history.filter = function (fname) {\n return (history || []).filter(function (historyItem) {\n // if the first item in each historyItem includes `fname`, then it's a match\n return new RegExp(\".*\".concat(fname, \".*\")).test(historyItem[0]);\n });\n };\n\n /**\n * Clears the internal history tracking, but does not prevent further history\n * tracking.\n */\n log.history.clear = function () {\n if (history) {\n history.length = 0;\n }\n };\n\n /**\n * Disable history tracking if it is currently enabled.\n */\n log.history.disable = function () {\n if (history !== null) {\n history.length = 0;\n history = null;\n }\n };\n\n /**\n * Enable history tracking if it is currently disabled.\n */\n log.history.enable = function () {\n if (history === null) {\n history = [];\n }\n };\n\n /**\n * Logs error messages. Similar to `console.error`.\n *\n * @param {...*} args\n * One or more messages or objects that should be logged as an error\n */\n log.error = function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n return logByType('error', level, args);\n };\n\n /**\n * Logs warning messages. Similar to `console.warn`.\n *\n * @param {...*} args\n * One or more messages or objects that should be logged as a warning.\n */\n log.warn = function () {\n for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n return logByType('warn', level, args);\n };\n\n /**\n * Logs debug messages. Similar to `console.debug`, but may also act as a comparable\n * log if `console.debug` is not available\n *\n * @param {...*} args\n * One or more messages or objects that should be logged as debug.\n */\n log.debug = function () {\n for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n args[_key4] = arguments[_key4];\n }\n return logByType('debug', level, args);\n };\n return log;\n}\n\n/**\n * @file log.js\n * @module log\n */\nvar log$1 = createLogger$1('VIDEOJS');\nvar createLogger = log$1.createLogger;\n\n/**\n * @file obj.js\n * @module obj\n */\n\n/**\n * @callback obj:EachCallback\n *\n * @param {*} value\n * The current key for the object that is being iterated over.\n *\n * @param {string} key\n * The current key-value for object that is being iterated over\n */\n\n/**\n * @callback obj:ReduceCallback\n *\n * @param {*} accum\n * The value that is accumulating over the reduce loop.\n *\n * @param {*} value\n * The current key for the object that is being iterated over.\n *\n * @param {string} key\n * The current key-value for object that is being iterated over\n *\n * @return {*}\n * The new accumulated value.\n */\nvar toString = Object.prototype.toString;\n\n/**\n * Get the keys of an Object\n *\n * @param {Object}\n * The Object to get the keys from\n *\n * @return {string[]}\n * An array of the keys from the object. Returns an empty array if the\n * object passed in was invalid or had no keys.\n *\n * @private\n */\nvar keys = function keys(object) {\n return isObject(object) ? Object.keys(object) : [];\n};\n\n/**\n * Array-like iteration for objects.\n *\n * @param {Object} object\n * The object to iterate over\n *\n * @param {obj:EachCallback} fn\n * The callback function which is called for each key in the object.\n */\nfunction each(object, fn) {\n keys(object).forEach(function (key) {\n return fn(object[key], key);\n });\n}\n\n/**\n * Array-like reduce for objects.\n *\n * @param {Object} object\n * The Object that you want to reduce.\n *\n * @param {Function} fn\n * A callback function which is called for each key in the object. It\n * receives the accumulated value and the per-iteration value and key\n * as arguments.\n *\n * @param {*} [initial = 0]\n * Starting value\n *\n * @return {*}\n * The final accumulated value.\n */\nfunction reduce(object, fn) {\n var initial = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n return keys(object).reduce(function (accum, key) {\n return fn(accum, object[key], key);\n }, initial);\n}\n\n/**\n * Returns whether a value is an object of any kind - including DOM nodes,\n * arrays, regular expressions, etc. Not functions, though.\n *\n * This avoids the gotcha where using `typeof` on a `null` value\n * results in `'object'`.\n *\n * @param {Object} value\n * @return {boolean}\n */\nfunction isObject(value) {\n return !!value && _typeof(value) === 'object';\n}\n\n/**\n * Returns whether an object appears to be a \"plain\" object - that is, a\n * direct instance of `Object`.\n *\n * @param {Object} value\n * @return {boolean}\n */\nfunction isPlain(value) {\n return isObject(value) && toString.call(value) === '[object Object]' && value.constructor === Object;\n}\n\n/**\n * Merge two objects recursively.\n *\n * Performs a deep merge like\n * {@link https://lodash.com/docs/4.17.10#merge|lodash.merge}, but only merges\n * plain objects (not arrays, elements, or anything else).\n *\n * Non-plain object values will be copied directly from the right-most\n * argument.\n *\n * @param {Object[]} sources\n * One or more objects to merge into a new object.\n *\n * @return {Object}\n * A new object that is the merged result of all sources.\n */\nfunction merge$1() {\n var result = {};\n for (var _len5 = arguments.length, sources = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n sources[_key5] = arguments[_key5];\n }\n sources.forEach(function (source) {\n if (!source) {\n return;\n }\n each(source, function (value, key) {\n if (!isPlain(value)) {\n result[key] = value;\n return;\n }\n if (!isPlain(result[key])) {\n result[key] = {};\n }\n result[key] = merge$1(result[key], value);\n });\n });\n return result;\n}\n\n/**\n * Returns an array of values for a given object\n *\n * @param {Object} source - target object\n * @return {Array<unknown>} - object values\n */\nfunction values() {\n var source = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var result = [];\n for (var key in source) {\n if (source.hasOwnProperty(key)) {\n var value = source[key];\n result.push(value);\n }\n }\n return result;\n}\n\n/**\n * Object.defineProperty but \"lazy\", which means that the value is only set after\n * it is retrieved the first time, rather than being set right away.\n *\n * @param {Object} obj the object to set the property on\n * @param {string} key the key for the property to set\n * @param {Function} getValue the function used to get the value when it is needed.\n * @param {boolean} setter whether a setter should be allowed or not\n */\nfunction defineLazyProperty(obj, key, getValue) {\n var setter = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;\n var set = function set(value) {\n return Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n writable: true\n });\n };\n var options = {\n configurable: true,\n enumerable: true,\n get: function get() {\n var value = getValue();\n set(value);\n return value;\n }\n };\n if (setter) {\n options.set = set;\n }\n return Object.defineProperty(obj, key, options);\n}\nvar Obj = /*#__PURE__*/Object.freeze({\n __proto__: null,\n each: each,\n reduce: reduce,\n isObject: isObject,\n isPlain: isPlain,\n merge: merge$1,\n values: values,\n defineLazyProperty: defineLazyProperty\n});\n\n/**\n * @file browser.js\n * @module browser\n */\n\n/**\n * Whether or not this device is an iPod.\n *\n * @static\n * @type {Boolean}\n */\nvar IS_IPOD = false;\n\n/**\n * The detected iOS version - or `null`.\n *\n * @static\n * @type {string|null}\n */\nvar IOS_VERSION = null;\n\n/**\n * Whether or not this is an Android device.\n *\n * @static\n * @type {Boolean}\n */\nvar IS_ANDROID = false;\n\n/**\n * The detected Android version - or `null` if not Android or indeterminable.\n *\n * @static\n * @type {number|string|null}\n */\nvar ANDROID_VERSION;\n\n/**\n * Whether or not this is Mozilla Firefox.\n *\n * @static\n * @type {Boolean}\n */\nvar IS_FIREFOX = false;\n\n/**\n * Whether or not this is Microsoft Edge.\n *\n * @static\n * @type {Boolean}\n */\nvar IS_EDGE = false;\n\n/**\n * Whether or not this is any Chromium Browser\n *\n * @static\n * @type {Boolean}\n */\nvar IS_CHROMIUM = false;\n\n/**\n * Whether or not this is any Chromium browser that is not Edge.\n *\n * This will also be `true` for Chrome on iOS, which will have different support\n * as it is actually Safari under the hood.\n *\n * Deprecated, as the behaviour to not match Edge was to prevent Legacy Edge's UA matching.\n * IS_CHROMIUM should be used instead.\n * \"Chromium but not Edge\" could be explicitly tested with IS_CHROMIUM && !IS_EDGE\n *\n * @static\n * @deprecated\n * @type {Boolean}\n */\nvar IS_CHROME = false;\n\n/**\n * The detected Chromium version - or `null`.\n *\n * @static\n * @type {number|null}\n */\nvar CHROMIUM_VERSION = null;\n\n/**\n * The detected Google Chrome version - or `null`.\n * This has always been the _Chromium_ version, i.e. would return on Chromium Edge.\n * Deprecated, use CHROMIUM_VERSION instead.\n *\n * @static\n * @deprecated\n * @type {number|null}\n */\nvar CHROME_VERSION = null;\n\n/**\n * The detected Internet Explorer version - or `null`.\n *\n * @static\n * @deprecated\n * @type {number|null}\n */\nvar IE_VERSION = null;\n\n/**\n * Whether or not this is desktop Safari.\n *\n * @static\n * @type {Boolean}\n */\nvar IS_SAFARI = false;\n\n/**\n * Whether or not this is a Windows machine.\n *\n * @static\n * @type {Boolean}\n */\nvar IS_WINDOWS = false;\n\n/**\n * Whether or not this device is an iPad.\n *\n * @static\n * @type {Boolean}\n */\nvar IS_IPAD = false;\n\n/**\n * Whether or not this device is an iPhone.\n *\n * @static\n * @type {Boolean}\n */\n// The Facebook app's UIWebView identifies as both an iPhone and iPad, so\n// to identify iPhones, we need to exclude iPads.\n// http://artsy.github.io/blog/2012/10/18/the-perils-of-ios-user-agent-sniffing/\nvar IS_IPHONE = false;\n\n/**\n * Whether or not this device is touch-enabled.\n *\n * @static\n * @const\n * @type {Boolean}\n */\nvar TOUCH_ENABLED = Boolean(isReal() && ('ontouchstart' in window$1 || window$1.navigator.maxTouchPoints || window$1.DocumentTouch && window$1.document instanceof window$1.DocumentTouch));\nvar UAD = window$1.navigator && window$1.navigator.userAgentData;\nif (UAD) {\n // If userAgentData is present, use it instead of userAgent to avoid warnings\n // Currently only implemented on Chromium\n // userAgentData does not expose Android version, so ANDROID_VERSION remains `null`\n\n IS_ANDROID = UAD.platform === 'Android';\n IS_EDGE = Boolean(UAD.brands.find(function (b) {\n return b.brand === 'Microsoft Edge';\n }));\n IS_CHROMIUM = Boolean(UAD.brands.find(function (b) {\n return b.brand === 'Chromium';\n }));\n IS_CHROME = !IS_EDGE && IS_CHROMIUM;\n CHROMIUM_VERSION = CHROME_VERSION = (UAD.brands.find(function (b) {\n return b.brand === 'Chromium';\n }) || {}).version || null;\n IS_WINDOWS = UAD.platform === 'Windows';\n}\n\n// If the browser is not Chromium, either userAgentData is not present which could be an old Chromium browser,\n// or it's a browser that has added userAgentData since that we don't have tests for yet. In either case,\n// the checks need to be made agiainst the regular userAgent string.\nif (!IS_CHROMIUM) {\n var USER_AGENT = window$1.navigator && window$1.navigator.userAgent || '';\n IS_IPOD = /iPod/i.test(USER_AGENT);\n IOS_VERSION = function () {\n var match = USER_AGENT.match(/OS (\\d+)_/i);\n if (match && match[1]) {\n return match[1];\n }\n return null;\n }();\n IS_ANDROID = /Android/i.test(USER_AGENT);\n ANDROID_VERSION = function () {\n // This matches Android Major.Minor.Patch versions\n // ANDROID_VERSION is Major.Minor as a Number, if Minor isn't available, then only Major is returned\n var match = USER_AGENT.match(/Android (\\d+)(?:\\.(\\d+))?(?:\\.(\\d+))*/i);\n if (!match) {\n return null;\n }\n var major = match[1] && parseFloat(match[1]);\n var minor = match[2] && parseFloat(match[2]);\n if (major && minor) {\n return parseFloat(match[1] + '.' + match[2]);\n } else if (major) {\n return major;\n }\n return null;\n }();\n IS_FIREFOX = /Firefox/i.test(USER_AGENT);\n IS_EDGE = /Edg/i.test(USER_AGENT);\n IS_CHROMIUM = /Chrome/i.test(USER_AGENT) || /CriOS/i.test(USER_AGENT);\n IS_CHROME = !IS_EDGE && IS_CHROMIUM;\n CHROMIUM_VERSION = CHROME_VERSION = function () {\n var match = USER_AGENT.match(/(Chrome|CriOS)\\/(\\d+)/);\n if (match && match[2]) {\n return parseFloat(match[2]);\n }\n return null;\n }();\n IE_VERSION = function () {\n var result = /MSIE\\s(\\d+)\\.\\d/.exec(USER_AGENT);\n var version = result && parseFloat(result[1]);\n if (!version && /Trident\\/7.0/i.test(USER_AGENT) && /rv:11.0/.test(USER_AGENT)) {\n // IE 11 has a different user agent string than other IE versions\n version = 11.0;\n }\n return version;\n }();\n IS_SAFARI = /Safari/i.test(USER_AGENT) && !IS_CHROME && !IS_ANDROID && !IS_EDGE;\n IS_WINDOWS = /Windows/i.test(USER_AGENT);\n IS_IPAD = /iPad/i.test(USER_AGENT) || IS_SAFARI && TOUCH_ENABLED && !/iPhone/i.test(USER_AGENT);\n IS_IPHONE = /iPhone/i.test(USER_AGENT) && !IS_IPAD;\n}\n\n/**\n * Whether or not this is an iOS device.\n *\n * @static\n * @const\n * @type {Boolean}\n */\nvar IS_IOS = IS_IPHONE || IS_IPAD || IS_IPOD;\n\n/**\n * Whether or not this is any flavor of Safari - including iOS.\n *\n * @static\n * @const\n * @type {Boolean}\n */\nvar IS_ANY_SAFARI = (IS_SAFARI || IS_IOS) && !IS_CHROME;\nvar browser = /*#__PURE__*/Object.freeze({\n __proto__: null,\n get IS_IPOD() {\n return IS_IPOD;\n },\n get IOS_VERSION() {\n return IOS_VERSION;\n },\n get IS_ANDROID() {\n return IS_ANDROID;\n },\n get ANDROID_VERSION() {\n return ANDROID_VERSION;\n },\n get IS_FIREFOX() {\n return IS_FIREFOX;\n },\n get IS_EDGE() {\n return IS_EDGE;\n },\n get IS_CHROMIUM() {\n return IS_CHROMIUM;\n },\n get IS_CHROME() {\n return IS_CHROME;\n },\n get CHROMIUM_VERSION() {\n return CHROMIUM_VERSION;\n },\n get CHROME_VERSION() {\n return CHROME_VERSION;\n },\n get IE_VERSION() {\n return IE_VERSION;\n },\n get IS_SAFARI() {\n return IS_SAFARI;\n },\n get IS_WINDOWS() {\n return IS_WINDOWS;\n },\n get IS_IPAD() {\n return IS_IPAD;\n },\n get IS_IPHONE() {\n return IS_IPHONE;\n },\n TOUCH_ENABLED: TOUCH_ENABLED,\n IS_IOS: IS_IOS,\n IS_ANY_SAFARI: IS_ANY_SAFARI\n});\n\n/**\n * @file dom.js\n * @module dom\n */\n\n/**\n * Detect if a value is a string with any non-whitespace characters.\n *\n * @private\n * @param {string} str\n * The string to check\n *\n * @return {boolean}\n * Will be `true` if the string is non-blank, `false` otherwise.\n *\n */\nfunction isNonBlankString(str) {\n // we use str.trim as it will trim any whitespace characters\n // from the front or back of non-whitespace characters. aka\n // Any string that contains non-whitespace characters will\n // still contain them after `trim` but whitespace only strings\n // will have a length of 0, failing this check.\n return typeof str === 'string' && Boolean(str.trim());\n}\n\n/**\n * Throws an error if the passed string has whitespace. This is used by\n * class methods to be relatively consistent with the classList API.\n *\n * @private\n * @param {string} str\n * The string to check for whitespace.\n *\n * @throws {Error}\n * Throws an error if there is whitespace in the string.\n */\nfunction throwIfWhitespace(str) {\n // str.indexOf instead of regex because str.indexOf is faster performance wise.\n if (str.indexOf(' ') >= 0) {\n throw new Error('class has illegal whitespace characters');\n }\n}\n\n/**\n * Whether the current DOM interface appears to be real (i.e. not simulated).\n *\n * @return {boolean}\n * Will be `true` if the DOM appears to be real, `false` otherwise.\n */\nfunction isReal() {\n // Both document and window will never be undefined thanks to `global`.\n return document === window$1.document;\n}\n\n/**\n * Determines, via duck typing, whether or not a value is a DOM element.\n *\n * @param {*} value\n * The value to check.\n *\n * @return {boolean}\n * Will be `true` if the value is a DOM element, `false` otherwise.\n */\nfunction isEl(value) {\n return isObject(value) && value.nodeType === 1;\n}\n\n/**\n * Determines if the current DOM is embedded in an iframe.\n *\n * @return {boolean}\n * Will be `true` if the DOM is embedded in an iframe, `false`\n * otherwise.\n */\nfunction isInFrame() {\n // We need a try/catch here because Safari will throw errors when attempting\n // to get either `parent` or `self`\n try {\n return window$1.parent !== window$1.self;\n } catch (x) {\n return true;\n }\n}\n\n/**\n * Creates functions to query the DOM using a given method.\n *\n * @private\n * @param {string} method\n * The method to create the query with.\n *\n * @return {Function}\n * The query method\n */\nfunction createQuerier(method) {\n return function (selector, context) {\n if (!isNonBlankString(selector)) {\n return document[method](null);\n }\n if (isNonBlankString(context)) {\n context = document.querySelector(context);\n }\n var ctx = isEl(context) ? context : document;\n return ctx[method] && ctx[method](selector);\n };\n}\n\n/**\n * Creates an element and applies properties, attributes, and inserts content.\n *\n * @param {string} [tagName='div']\n * Name of tag to be created.\n *\n * @param {Object} [properties={}]\n * Element properties to be applied.\n *\n * @param {Object} [attributes={}]\n * Element attributes to be applied.\n *\n * @param {ContentDescriptor} [content]\n * A content descriptor object.\n *\n * @return {Element}\n * The element that was created.\n */\nfunction _createEl() {\n var tagName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'div';\n var properties = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var attributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var content = arguments.length > 3 ? arguments[3] : undefined;\n var el = document.createElement(tagName);\n Object.getOwnPropertyNames(properties).forEach(function (propName) {\n var val = properties[propName];\n\n // Handle textContent since it's not supported everywhere and we have a\n // method for it.\n if (propName === 'textContent') {\n textContent(el, val);\n } else if (el[propName] !== val || propName === 'tabIndex') {\n el[propName] = val;\n }\n });\n Object.getOwnPropertyNames(attributes).forEach(function (attrName) {\n el.setAttribute(attrName, attributes[attrName]);\n });\n if (content) {\n appendContent(el, content);\n }\n return el;\n}\n\n/**\n * Injects text into an element, replacing any existing contents entirely.\n *\n * @param {HTMLElement} el\n * The element to add text content into\n *\n * @param {string} text\n * The text content to add.\n *\n * @return {Element}\n * The element with added text content.\n */\nfunction textContent(el, text) {\n if (typeof el.textContent === 'undefined') {\n el.innerText = text;\n } else {\n el.textContent = text;\n }\n return el;\n}\n\n/**\n * Insert an element as the first child node of another\n *\n * @param {Element} child\n * Element to insert\n *\n * @param {Element} parent\n * Element to insert child into\n */\nfunction prependTo(child, parent) {\n if (parent.firstChild) {\n parent.insertBefore(child, parent.firstChild);\n } else {\n parent.appendChild(child);\n }\n}\n\n/**\n * Check if an element has a class name.\n *\n * @param {Element} element\n * Element to check\n *\n * @param {string} classToCheck\n * Class name to check for\n *\n * @return {boolean}\n * Will be `true` if the element has a class, `false` otherwise.\n *\n * @throws {Error}\n * Throws an error if `classToCheck` has white space.\n */\nfunction _hasClass(element, classToCheck) {\n throwIfWhitespace(classToCheck);\n return element.classList.contains(classToCheck);\n}\n\n/**\n * Add a class name to an element.\n *\n * @param {Element} element\n * Element to add class name to.\n *\n * @param {...string} classesToAdd\n * One or more class name to add.\n *\n * @return {Element}\n * The DOM element with the added class name.\n */\nfunction _addClass(element) {\n var _element$classList;\n for (var _len6 = arguments.length, classesToAdd = new Array(_len6 > 1 ? _len6 - 1 : 0), _key6 = 1; _key6 < _len6; _key6++) {\n classesToAdd[_key6 - 1] = arguments[_key6];\n }\n (_element$classList = element.classList).add.apply(_element$classList, _toConsumableArray(classesToAdd.reduce(function (prev, current) {\n return prev.concat(current.split(/\\s+/));\n }, [])));\n return element;\n}\n\n/**\n * Remove a class name from an element.\n *\n * @param {Element} element\n * Element to remove a class name from.\n *\n * @param {...string} classesToRemove\n * One or more class name to remove.\n *\n * @return {Element}\n * The DOM element with class name removed.\n */\nfunction _removeClass(element) {\n var _element$classList2;\n // Protect in case the player gets disposed\n if (!element) {\n log$1.warn(\"removeClass was called with an element that doesn't exist\");\n return null;\n }\n for (var _len7 = arguments.length, classesToRemove = new Array(_len7 > 1 ? _len7 - 1 : 0), _key7 = 1; _key7 < _len7; _key7++) {\n classesToRemove[_key7 - 1] = arguments[_key7];\n }\n (_element$classList2 = element.classList).remove.apply(_element$classList2, _toConsumableArray(classesToRemove.reduce(function (prev, current) {\n return prev.concat(current.split(/\\s+/));\n }, [])));\n return element;\n}\n\n/**\n * The callback definition for toggleClass.\n *\n * @callback module:dom~PredicateCallback\n * @param {Element} element\n * The DOM element of the Component.\n *\n * @param {string} classToToggle\n * The `className` that wants to be toggled\n *\n * @return {boolean|undefined}\n * If `true` is returned, the `classToToggle` will be added to the\n * `element`. If `false`, the `classToToggle` will be removed from\n * the `element`. If `undefined`, the callback will be ignored.\n */\n\n/**\n * Adds or removes a class name to/from an element depending on an optional\n * condition or the presence/absence of the class name.\n *\n * @param {Element} element\n * The element to toggle a class name on.\n *\n * @param {string} classToToggle\n * The class that should be toggled.\n *\n * @param {boolean|module:dom~PredicateCallback} [predicate]\n * See the return value for {@link module:dom~PredicateCallback}\n *\n * @return {Element}\n * The element with a class that has been toggled.\n */\nfunction _toggleClass(element, classToToggle, predicate) {\n if (typeof predicate === 'function') {\n predicate = predicate(element, classToToggle);\n }\n if (typeof predicate !== 'boolean') {\n predicate = undefined;\n }\n classToToggle.split(/\\s+/).forEach(function (className) {\n return element.classList.toggle(className, predicate);\n });\n return element;\n}\n\n/**\n * Apply attributes to an HTML element.\n *\n * @param {Element} el\n * Element to add attributes to.\n *\n * @param {Object} [attributes]\n * Attributes to be applied.\n */\nfunction setAttributes(el, attributes) {\n Object.getOwnPropertyNames(attributes).forEach(function (attrName) {\n var attrValue = attributes[attrName];\n if (attrValue === null || typeof attrValue === 'undefined' || attrValue === false) {\n el.removeAttribute(attrName);\n } else {\n el.setAttribute(attrName, attrValue === true ? '' : attrValue);\n }\n });\n}\n\n/**\n * Get an element's attribute values, as defined on the HTML tag.\n *\n * Attributes are not the same as properties. They're defined on the tag\n * or with setAttribute.\n *\n * @param {Element} tag\n * Element from which to get tag attributes.\n *\n * @return {Object}\n * All attributes of the element. Boolean attributes will be `true` or\n * `false`, others will be strings.\n */\nfunction getAttributes(tag) {\n var obj = {};\n\n // known boolean attributes\n // we can check for matching boolean properties, but not all browsers\n // and not all tags know about these attributes, so, we still want to check them manually\n var knownBooleans = ['autoplay', 'controls', 'playsinline', 'loop', 'muted', 'default', 'defaultMuted'];\n if (tag && tag.attributes && tag.attributes.length > 0) {\n var attrs = tag.attributes;\n for (var _i3 = attrs.length - 1; _i3 >= 0; _i3--) {\n var attrName = attrs[_i3].name;\n /** @type {boolean|string} */\n var attrVal = attrs[_i3].value;\n\n // check for known booleans\n // the matching element property will return a value for typeof\n if (knownBooleans.includes(attrName)) {\n // the value of an included boolean attribute is typically an empty\n // string ('') which would equal false if we just check for a false value.\n // we also don't want support bad code like autoplay='false'\n attrVal = attrVal !== null ? true : false;\n }\n obj[attrName] = attrVal;\n }\n }\n return obj;\n}\n\n/**\n * Get the value of an element's attribute.\n *\n * @param {Element} el\n * A DOM element.\n *\n * @param {string} attribute\n * Attribute to get the value of.\n *\n * @return {string}\n * The value of the attribute.\n */\nfunction _getAttribute(el, attribute) {\n return el.getAttribute(attribute);\n}\n\n/**\n * Set the value of an element's attribute.\n *\n * @param {Element} el\n * A DOM element.\n *\n * @param {string} attribute\n * Attribute to set.\n *\n * @param {string} value\n * Value to set the attribute to.\n */\nfunction _setAttribute(el, attribute, value) {\n el.setAttribute(attribute, value);\n}\n\n/**\n * Remove an element's attribute.\n *\n * @param {Element} el\n * A DOM element.\n *\n * @param {string} attribute\n * Attribute to remove.\n */\nfunction _removeAttribute(el, attribute) {\n el.removeAttribute(attribute);\n}\n\n/**\n * Attempt to block the ability to select text.\n */\nfunction blockTextSelection() {\n document.body.focus();\n document.onselectstart = function () {\n return false;\n };\n}\n\n/**\n * Turn off text selection blocking.\n */\nfunction unblockTextSelection() {\n document.onselectstart = function () {\n return true;\n };\n}\n\n/**\n * Identical to the native `getBoundingClientRect` function, but ensures that\n * the method is supported at all (it is in all browsers we claim to support)\n * and that the element is in the DOM before continuing.\n *\n * This wrapper function also shims properties which are not provided by some\n * older browsers (namely, IE8).\n *\n * Additionally, some browsers do not support adding properties to a\n * `ClientRect`/`DOMRect` object; so, we shallow-copy it with the standard\n * properties (except `x` and `y` which are not widely supported). This helps\n * avoid implementations where keys are non-enumerable.\n *\n * @param {Element} el\n * Element whose `ClientRect` we want to calculate.\n *\n * @return {Object|undefined}\n * Always returns a plain object - or `undefined` if it cannot.\n */\nfunction getBoundingClientRect(el) {\n if (el && el.getBoundingClientRect && el.parentNode) {\n var rect = el.getBoundingClientRect();\n var result = {};\n ['bottom', 'height', 'left', 'right', 'top', 'width'].forEach(function (k) {\n if (rect[k] !== undefined) {\n result[k] = rect[k];\n }\n });\n if (!result.height) {\n result.height = parseFloat(computedStyle(el, 'height'));\n }\n if (!result.width) {\n result.width = parseFloat(computedStyle(el, 'width'));\n }\n return result;\n }\n}\n\n/**\n * Represents the position of a DOM element on the page.\n *\n * @typedef {Object} module:dom~Position\n *\n * @property {number} left\n * Pixels to the left.\n *\n * @property {number} top\n * Pixels from the top.\n */\n\n/**\n * Get the position of an element in the DOM.\n *\n * Uses `getBoundingClientRect` technique from John Resig.\n *\n * @see http://ejohn.org/blog/getboundingclientrect-is-awesome/\n *\n * @param {Element} el\n * Element from which to get offset.\n *\n * @return {module:dom~Position}\n * The position of the element that was passed in.\n */\nfunction findPosition(el) {\n if (!el || el && !el.offsetParent) {\n return {\n left: 0,\n top: 0,\n width: 0,\n height: 0\n };\n }\n var width = el.offsetWidth;\n var height = el.offsetHeight;\n var left = 0;\n var top = 0;\n while (el.offsetParent && el !== document[FullscreenApi.fullscreenElement]) {\n left += el.offsetLeft;\n top += el.offsetTop;\n el = el.offsetParent;\n }\n return {\n left: left,\n top: top,\n width: width,\n height: height\n };\n}\n\n/**\n * Represents x and y coordinates for a DOM element or mouse pointer.\n *\n * @typedef {Object} module:dom~Coordinates\n *\n * @property {number} x\n * x coordinate in pixels\n *\n * @property {number} y\n * y coordinate in pixels\n */\n\n/**\n * Get the pointer position within an element.\n *\n * The base on the coordinates are the bottom left of the element.\n *\n * @param {Element} el\n * Element on which to get the pointer position on.\n *\n * @param {Event} event\n * Event object.\n *\n * @return {module:dom~Coordinates}\n * A coordinates object corresponding to the mouse position.\n *\n */\nfunction getPointerPosition(el, event) {\n var translated = {\n x: 0,\n y: 0\n };\n if (IS_IOS) {\n var item = el;\n while (item && item.nodeName.toLowerCase() !== 'html') {\n var _transform = computedStyle(item, 'transform');\n if (/^matrix/.test(_transform)) {\n var _values = _transform.slice(7, -1).split(/,\\s/).map(Number);\n translated.x += _values[4];\n translated.y += _values[5];\n } else if (/^matrix3d/.test(_transform)) {\n var _values2 = _transform.slice(9, -1).split(/,\\s/).map(Number);\n translated.x += _values2[12];\n translated.y += _values2[13];\n }\n item = item.parentNode;\n }\n }\n var position = {};\n var boxTarget = findPosition(event.target);\n var box = findPosition(el);\n var boxW = box.width;\n var boxH = box.height;\n var offsetY = event.offsetY - (box.top - boxTarget.top);\n var offsetX = event.offsetX - (box.left - boxTarget.left);\n if (event.changedTouches) {\n offsetX = event.changedTouches[0].pageX - box.left;\n offsetY = event.changedTouches[0].pageY + box.top;\n if (IS_IOS) {\n offsetX -= translated.x;\n offsetY -= translated.y;\n }\n }\n position.y = 1 - Math.max(0, Math.min(1, offsetY / boxH));\n position.x = Math.max(0, Math.min(1, offsetX / boxW));\n return position;\n}\n\n/**\n * Determines, via duck typing, whether or not a value is a text node.\n *\n * @param {*} value\n * Check if this value is a text node.\n *\n * @return {boolean}\n * Will be `true` if the value is a text node, `false` otherwise.\n */\nfunction isTextNode(value) {\n return isObject(value) && value.nodeType === 3;\n}\n\n/**\n * Empties the contents of an element.\n *\n * @param {Element} el\n * The element to empty children from\n *\n * @return {Element}\n * The element with no children\n */\nfunction emptyEl(el) {\n while (el.firstChild) {\n el.removeChild(el.firstChild);\n }\n return el;\n}\n\n/**\n * This is a mixed value that describes content to be injected into the DOM\n * via some method. It can be of the following types:\n *\n * Type | Description\n * -----------|-------------\n * `string` | The value will be normalized into a text node.\n * `Element` | The value will be accepted as-is.\n * `Text` | A TextNode. The value will be accepted as-is.\n * `Array` | A one-dimensional array of strings, elements, text nodes, or functions. These functions should return a string, element, or text node (any other return value, like an array, will be ignored).\n * `Function` | A function, which is expected to return a string, element, text node, or array - any of the other possible values described above. This means that a content descriptor could be a function that returns an array of functions, but those second-level functions must return strings, elements, or text nodes.\n *\n * @typedef {string|Element|Text|Array|Function} ContentDescriptor\n */\n\n/**\n * Normalizes content for eventual insertion into the DOM.\n *\n * This allows a wide range of content definition methods, but helps protect\n * from falling into the trap of simply writing to `innerHTML`, which could\n * be an XSS concern.\n *\n * The content for an element can be passed in multiple types and\n * combinations, whose behavior is as follows:\n *\n * @param {ContentDescriptor} content\n * A content descriptor value.\n *\n * @return {Array}\n * All of the content that was passed in, normalized to an array of\n * elements or text nodes.\n */\nfunction normalizeContent(content) {\n // First, invoke content if it is a function. If it produces an array,\n // that needs to happen before normalization.\n if (typeof content === 'function') {\n content = content();\n }\n\n // Next up, normalize to an array, so one or many items can be normalized,\n // filtered, and returned.\n return (Array.isArray(content) ? content : [content]).map(function (value) {\n // First, invoke value if it is a function to produce a new value,\n // which will be subsequently normalized to a Node of some kind.\n if (typeof value === 'function') {\n value = value();\n }\n if (isEl(value) || isTextNode(value)) {\n return value;\n }\n if (typeof value === 'string' && /\\S/.test(value)) {\n return document.createTextNode(value);\n }\n }).filter(function (value) {\n return value;\n });\n}\n\n/**\n * Normalizes and appends content to an element.\n *\n * @param {Element} el\n * Element to append normalized content to.\n *\n * @param {ContentDescriptor} content\n * A content descriptor value.\n *\n * @return {Element}\n * The element with appended normalized content.\n */\nfunction appendContent(el, content) {\n normalizeContent(content).forEach(function (node) {\n return el.appendChild(node);\n });\n return el;\n}\n\n/**\n * Normalizes and inserts content into an element; this is identical to\n * `appendContent()`, except it empties the element first.\n *\n * @param {Element} el\n * Element to insert normalized content into.\n *\n * @param {ContentDescriptor} content\n * A content descriptor value.\n *\n * @return {Element}\n * The element with inserted normalized content.\n */\nfunction insertContent(el, content) {\n return appendContent(emptyEl(el), content);\n}\n\n/**\n * Check if an event was a single left click.\n *\n * @param {MouseEvent} event\n * Event object.\n *\n * @return {boolean}\n * Will be `true` if a single left click, `false` otherwise.\n */\nfunction isSingleLeftClick(event) {\n // Note: if you create something draggable, be sure to\n // call it on both `mousedown` and `mousemove` event,\n // otherwise `mousedown` should be enough for a button\n\n if (event.button === undefined && event.buttons === undefined) {\n // Why do we need `buttons` ?\n // Because, middle mouse sometimes have this:\n // e.button === 0 and e.buttons === 4\n // Furthermore, we want to prevent combination click, something like\n // HOLD middlemouse then left click, that would be\n // e.button === 0, e.buttons === 5\n // just `button` is not gonna work\n\n // Alright, then what this block does ?\n // this is for chrome `simulate mobile devices`\n // I want to support this as well\n\n return true;\n }\n if (event.button === 0 && event.buttons === undefined) {\n // Touch screen, sometimes on some specific device, `buttons`\n // doesn't have anything (safari on ios, blackberry...)\n\n return true;\n }\n\n // `mouseup` event on a single left click has\n // `button` and `buttons` equal to 0\n if (event.type === 'mouseup' && event.button === 0 && event.buttons === 0) {\n return true;\n }\n if (event.button !== 0 || event.buttons !== 1) {\n // This is the reason we have those if else block above\n // if any special case we can catch and let it slide\n // we do it above, when get to here, this definitely\n // is-not-left-click\n\n return false;\n }\n return true;\n}\n\n/**\n * Finds a single DOM element matching `selector` within the optional\n * `context` of another DOM element (defaulting to `document`).\n *\n * @param {string} selector\n * A valid CSS selector, which will be passed to `querySelector`.\n *\n * @param {Element|String} [context=document]\n * A DOM element within which to query. Can also be a selector\n * string in which case the first matching element will be used\n * as context. If missing (or no element matches selector), falls\n * back to `document`.\n *\n * @return {Element|null}\n * The element that was found or null.\n */\nvar _$ = createQuerier('querySelector');\n\n/**\n * Finds a all DOM elements matching `selector` within the optional\n * `context` of another DOM element (defaulting to `document`).\n *\n * @param {string} selector\n * A valid CSS selector, which will be passed to `querySelectorAll`.\n *\n * @param {Element|String} [context=document]\n * A DOM element within which to query. Can also be a selector\n * string in which case the first matching element will be used\n * as context. If missing (or no element matches selector), falls\n * back to `document`.\n *\n * @return {NodeList}\n * A element list of elements that were found. Will be empty if none\n * were found.\n *\n */\nvar _$$ = createQuerier('querySelectorAll');\n\n/**\n * A safe getComputedStyle.\n *\n * This is needed because in Firefox, if the player is loaded in an iframe with\n * `display:none`, then `getComputedStyle` returns `null`, so, we do a\n * null-check to make sure that the player doesn't break in these cases.\n *\n * @param {Element} el\n * The element you want the computed style of\n *\n * @param {string} prop\n * The property name you want\n *\n * @see https://bugzilla.mozilla.org/show_bug.cgi?id=548397\n */\nfunction computedStyle(el, prop) {\n if (!el || !prop) {\n return '';\n }\n if (typeof window$1.getComputedStyle === 'function') {\n var computedStyleValue;\n try {\n computedStyleValue = window$1.getComputedStyle(el);\n } catch (e) {\n return '';\n }\n return computedStyleValue ? computedStyleValue.getPropertyValue(prop) || computedStyleValue[prop] : '';\n }\n return '';\n}\n\n/**\n * Copy document style sheets to another window.\n *\n * @param {Window} win\n * The window element you want to copy the document style sheets to.\n *\n */\nfunction copyStyleSheetsToWindow(win) {\n _toConsumableArray(document.styleSheets).forEach(function (styleSheet) {\n try {\n var cssRules = _toConsumableArray(styleSheet.cssRules).map(function (rule) {\n return rule.cssText;\n }).join('');\n var style = document.createElement('style');\n style.textContent = cssRules;\n win.document.head.appendChild(style);\n } catch (e) {\n var link = document.createElement('link');\n link.rel = 'stylesheet';\n link.type = styleSheet.type;\n // For older Safari this has to be the string; on other browsers setting the MediaList works\n link.media = styleSheet.media.mediaText;\n link.href = styleSheet.href;\n win.document.head.appendChild(link);\n }\n });\n}\nvar Dom = /*#__PURE__*/Object.freeze({\n __proto__: null,\n isReal: isReal,\n isEl: isEl,\n isInFrame: isInFrame,\n createEl: _createEl,\n textContent: textContent,\n prependTo: prependTo,\n hasClass: _hasClass,\n addClass: _addClass,\n removeClass: _removeClass,\n toggleClass: _toggleClass,\n setAttributes: setAttributes,\n getAttributes: getAttributes,\n getAttribute: _getAttribute,\n setAttribute: _setAttribute,\n removeAttribute: _removeAttribute,\n blockTextSelection: blockTextSelection,\n unblockTextSelection: unblockTextSelection,\n getBoundingClientRect: getBoundingClientRect,\n findPosition: findPosition,\n getPointerPosition: getPointerPosition,\n isTextNode: isTextNode,\n emptyEl: emptyEl,\n normalizeContent: normalizeContent,\n appendContent: appendContent,\n insertContent: insertContent,\n isSingleLeftClick: isSingleLeftClick,\n $: _$,\n $$: _$$,\n computedStyle: computedStyle,\n copyStyleSheetsToWindow: copyStyleSheetsToWindow\n});\n\n/**\n * @file setup.js - Functions for setting up a player without\n * user interaction based on the data-setup `attribute` of the video tag.\n *\n * @module setup\n */\nvar _windowLoaded = false;\nvar videojs$1;\n\n/**\n * Set up any tags that have a data-setup `attribute` when the player is started.\n */\nvar autoSetup = function autoSetup() {\n if (videojs$1.options.autoSetup === false) {\n return;\n }\n var vids = Array.prototype.slice.call(document.getElementsByTagName('video'));\n var audios = Array.prototype.slice.call(document.getElementsByTagName('audio'));\n var divs = Array.prototype.slice.call(document.getElementsByTagName('video-js'));\n var mediaEls = vids.concat(audios, divs);\n\n // Check if any media elements exist\n if (mediaEls && mediaEls.length > 0) {\n for (var _i4 = 0, e = mediaEls.length; _i4 < e; _i4++) {\n var mediaEl = mediaEls[_i4];\n\n // Check if element exists, has getAttribute func.\n if (mediaEl && mediaEl.getAttribute) {\n // Make sure this player hasn't already been set up.\n if (mediaEl.player === undefined) {\n var options = mediaEl.getAttribute('data-setup');\n\n // Check if data-setup attr exists.\n // We only auto-setup if they've added the data-setup attr.\n if (options !== null) {\n // Create new video.js instance.\n videojs$1(mediaEl);\n }\n }\n\n // If getAttribute isn't defined, we need to wait for the DOM.\n } else {\n autoSetupTimeout(1);\n break;\n }\n }\n\n // No videos were found, so keep looping unless page is finished loading.\n } else if (!_windowLoaded) {\n autoSetupTimeout(1);\n }\n};\n\n/**\n * Wait until the page is loaded before running autoSetup. This will be called in\n * autoSetup if `hasLoaded` returns false.\n *\n * @param {number} wait\n * How long to wait in ms\n *\n * @param {module:videojs} [vjs]\n * The videojs library function\n */\nfunction autoSetupTimeout(wait, vjs) {\n // Protect against breakage in non-browser environments\n if (!isReal()) {\n return;\n }\n if (vjs) {\n videojs$1 = vjs;\n }\n window$1.setTimeout(autoSetup, wait);\n}\n\n/**\n * Used to set the internal tracking of window loaded state to true.\n *\n * @private\n */\nfunction setWindowLoaded() {\n _windowLoaded = true;\n window$1.removeEventListener('load', setWindowLoaded);\n}\nif (isReal()) {\n if (document.readyState === 'complete') {\n setWindowLoaded();\n } else {\n /**\n * Listen for the load event on window, and set _windowLoaded to true.\n *\n * We use a standard event listener here to avoid incrementing the GUID\n * before any players are created.\n *\n * @listens load\n */\n window$1.addEventListener('load', setWindowLoaded);\n }\n}\n\n/**\n * @file stylesheet.js\n * @module stylesheet\n */\n\n/**\n * Create a DOM style element given a className for it.\n *\n * @param {string} className\n * The className to add to the created style element.\n *\n * @return {Element}\n * The element that was created.\n */\nvar createStyleElement = function createStyleElement(className) {\n var style = document.createElement('style');\n style.className = className;\n return style;\n};\n\n/**\n * Add text to a DOM element.\n *\n * @param {Element} el\n * The Element to add text content to.\n *\n * @param {string} content\n * The text to add to the element.\n */\nvar setTextContent = function setTextContent(el, content) {\n if (el.styleSheet) {\n el.styleSheet.cssText = content;\n } else {\n el.textContent = content;\n }\n};\n\n/**\n * @file dom-data.js\n * @module dom-data\n */\n\n/**\n * Element Data Store.\n *\n * Allows for binding data to an element without putting it directly on the\n * element. Ex. Event listeners are stored here.\n * (also from jsninja.com, slightly modified and updated for closure compiler)\n *\n * @type {Object}\n * @private\n */\nvar DomData = new WeakMap();\n\n/**\n * @file guid.js\n * @module guid\n */\n\n// Default value for GUIDs. This allows us to reset the GUID counter in tests.\n//\n// The initial GUID is 3 because some users have come to rely on the first\n// default player ID ending up as `vjs_video_3`.\n//\n// See: https://github.com/videojs/video.js/pull/6216\nvar _initialGuid = 3;\n\n/**\n * Unique ID for an element or function\n *\n * @type {Number}\n */\nvar _guid = _initialGuid;\n\n/**\n * Get a unique auto-incrementing ID by number that has not been returned before.\n *\n * @return {number}\n * A new unique ID.\n */\nfunction newGUID() {\n return _guid++;\n}\n\n/**\n * @file events.js. An Event System (John Resig - Secrets of a JS Ninja http://jsninja.com/)\n * (Original book version wasn't completely usable, so fixed some things and made Closure Compiler compatible)\n * This should work very similarly to jQuery's events, however it's based off the book version which isn't as\n * robust as jquery's, so there's probably some differences.\n *\n * @file events.js\n * @module events\n */\n\n/**\n * Clean up the listener cache and dispatchers\n *\n * @param {Element|Object} elem\n * Element to clean up\n *\n * @param {string} type\n * Type of event to clean up\n */\nfunction _cleanUpEvents(elem, type) {\n if (!DomData.has(elem)) {\n return;\n }\n var data = DomData.get(elem);\n\n // Remove the events of a particular type if there are none left\n if (data.handlers[type].length === 0) {\n delete data.handlers[type];\n // data.handlers[type] = null;\n // Setting to null was causing an error with data.handlers\n\n // Remove the meta-handler from the element\n if (elem.removeEventListener) {\n elem.removeEventListener(type, data.dispatcher, false);\n } else if (elem.detachEvent) {\n elem.detachEvent('on' + type, data.dispatcher);\n }\n }\n\n // Remove the events object if there are no types left\n if (Object.getOwnPropertyNames(data.handlers).length <= 0) {\n delete data.handlers;\n delete data.dispatcher;\n delete data.disabled;\n }\n\n // Finally remove the element data if there is no data left\n if (Object.getOwnPropertyNames(data).length === 0) {\n DomData[\"delete\"](elem);\n }\n}\n\n/**\n * Loops through an array of event types and calls the requested method for each type.\n *\n * @param {Function} fn\n * The event method we want to use.\n *\n * @param {Element|Object} elem\n * Element or object to bind listeners to\n *\n * @param {string[]} types\n * Type of event to bind to.\n *\n * @param {Function} callback\n * Event listener.\n */\nfunction _handleMultipleEvents(fn, elem, types, callback) {\n types.forEach(function (type) {\n // Call the event method for each one of the types\n fn(elem, type, callback);\n });\n}\n\n/**\n * Fix a native event to have standard property values\n *\n * @param {Object} event\n * Event object to fix.\n *\n * @return {Object}\n * Fixed event object.\n */\nfunction fixEvent(event) {\n if (event.fixed_) {\n return event;\n }\n function returnTrue() {\n return true;\n }\n function returnFalse() {\n return false;\n }\n\n // Test if fixing up is needed\n // Used to check if !event.stopPropagation instead of isPropagationStopped\n // But native events return true for stopPropagation, but don't have\n // other expected methods like isPropagationStopped. Seems to be a problem\n // with the Javascript Ninja code. So we're just overriding all events now.\n if (!event || !event.isPropagationStopped || !event.isImmediatePropagationStopped) {\n var old = event || window$1.event;\n event = {};\n // Clone the old object so that we can modify the values event = {};\n // IE8 Doesn't like when you mess with native event properties\n // Firefox returns false for event.hasOwnProperty('type') and other props\n // which makes copying more difficult.\n // TODO: Probably best to create a whitelist of event props\n for (var key in old) {\n // Safari 6.0.3 warns you if you try to copy deprecated layerX/Y\n // Chrome warns you if you try to copy deprecated keyboardEvent.keyLocation\n // and webkitMovementX/Y\n // Lighthouse complains if Event.path is copied\n if (key !== 'layerX' && key !== 'layerY' && key !== 'keyLocation' && key !== 'webkitMovementX' && key !== 'webkitMovementY' && key !== 'path') {\n // Chrome 32+ warns if you try to copy deprecated returnValue, but\n // we still want to if preventDefault isn't supported (IE8).\n if (!(key === 'returnValue' && old.preventDefault)) {\n event[key] = old[key];\n }\n }\n }\n\n // The event occurred on this element\n if (!event.target) {\n event.target = event.srcElement || document;\n }\n\n // Handle which other element the event is related to\n if (!event.relatedTarget) {\n event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement;\n }\n\n // Stop the default browser action\n event.preventDefault = function () {\n if (old.preventDefault) {\n old.preventDefault();\n }\n event.returnValue = false;\n old.returnValue = false;\n event.defaultPrevented = true;\n };\n event.defaultPrevented = false;\n\n // Stop the event from bubbling\n event.stopPropagation = function () {\n if (old.stopPropagation) {\n old.stopPropagation();\n }\n event.cancelBubble = true;\n old.cancelBubble = true;\n event.isPropagationStopped = returnTrue;\n };\n event.isPropagationStopped = returnFalse;\n\n // Stop the event from bubbling and executing other handlers\n event.stopImmediatePropagation = function () {\n if (old.stopImmediatePropagation) {\n old.stopImmediatePropagation();\n }\n event.isImmediatePropagationStopped = returnTrue;\n event.stopPropagation();\n };\n event.isImmediatePropagationStopped = returnFalse;\n\n // Handle mouse position\n if (event.clientX !== null && event.clientX !== undefined) {\n var doc = document.documentElement;\n var body = document.body;\n event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);\n event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0);\n }\n\n // Handle key presses\n event.which = event.charCode || event.keyCode;\n\n // Fix button for mouse clicks:\n // 0 == left; 1 == middle; 2 == right\n if (event.button !== null && event.button !== undefined) {\n // The following is disabled because it does not pass videojs-standard\n // and... yikes.\n /* eslint-disable */\n event.button = event.button & 1 ? 0 : event.button & 4 ? 1 : event.button & 2 ? 2 : 0;\n /* eslint-enable */\n }\n }\n event.fixed_ = true;\n // Returns fixed-up instance\n return event;\n}\n\n/**\n * Whether passive event listeners are supported\n */\nvar _supportsPassive;\nvar supportsPassive = function supportsPassive() {\n if (typeof _supportsPassive !== 'boolean') {\n _supportsPassive = false;\n try {\n var opts = Object.defineProperty({}, 'passive', {\n get: function get() {\n _supportsPassive = true;\n }\n });\n window$1.addEventListener('test', null, opts);\n window$1.removeEventListener('test', null, opts);\n } catch (e) {\n // disregard\n }\n }\n return _supportsPassive;\n};\n\n/**\n * Touch events Chrome expects to be passive\n */\nvar passiveEvents = ['touchstart', 'touchmove'];\n\n/**\n * Add an event listener to element\n * It stores the handler function in a separate cache object\n * and adds a generic handler to the element's event,\n * along with a unique id (guid) to the element.\n *\n * @param {Element|Object} elem\n * Element or object to bind listeners to\n *\n * @param {string|string[]} type\n * Type of event to bind to.\n *\n * @param {Function} fn\n * Event listener.\n */\nfunction _on(elem, type, fn) {\n if (Array.isArray(type)) {\n return _handleMultipleEvents(_on, elem, type, fn);\n }\n if (!DomData.has(elem)) {\n DomData.set(elem, {});\n }\n var data = DomData.get(elem);\n\n // We need a place to store all our handler data\n if (!data.handlers) {\n data.handlers = {};\n }\n if (!data.handlers[type]) {\n data.handlers[type] = [];\n }\n if (!fn.guid) {\n fn.guid = newGUID();\n }\n data.handlers[type].push(fn);\n if (!data.dispatcher) {\n data.disabled = false;\n data.dispatcher = function (event, hash) {\n if (data.disabled) {\n return;\n }\n event = fixEvent(event);\n var handlers = data.handlers[event.type];\n if (handlers) {\n // Copy handlers so if handlers are added/removed during the process it doesn't throw everything off.\n var handlersCopy = handlers.slice(0);\n for (var m = 0, n = handlersCopy.length; m < n; m++) {\n if (event.isImmediatePropagationStopped()) {\n break;\n } else {\n try {\n handlersCopy[m].call(elem, event, hash);\n } catch (e) {\n log$1.error(e);\n }\n }\n }\n }\n };\n }\n if (data.handlers[type].length === 1) {\n if (elem.addEventListener) {\n var options = false;\n if (supportsPassive() && passiveEvents.indexOf(type) > -1) {\n options = {\n passive: true\n };\n }\n elem.addEventListener(type, data.dispatcher, options);\n } else if (elem.attachEvent) {\n elem.attachEvent('on' + type, data.dispatcher);\n }\n }\n}\n\n/**\n * Removes event listeners from an element\n *\n * @param {Element|Object} elem\n * Object to remove listeners from.\n *\n * @param {string|string[]} [type]\n * Type of listener to remove. Don't include to remove all events from element.\n *\n * @param {Function} [fn]\n * Specific listener to remove. Don't include to remove listeners for an event\n * type.\n */\nfunction _off(elem, type, fn) {\n // Don't want to add a cache object through getElData if not needed\n if (!DomData.has(elem)) {\n return;\n }\n var data = DomData.get(elem);\n\n // If no events exist, nothing to unbind\n if (!data.handlers) {\n return;\n }\n if (Array.isArray(type)) {\n return _handleMultipleEvents(_off, elem, type, fn);\n }\n\n // Utility function\n var removeType = function removeType(el, t) {\n data.handlers[t] = [];\n _cleanUpEvents(el, t);\n };\n\n // Are we removing all bound events?\n if (type === undefined) {\n for (var t in data.handlers) {\n if (Object.prototype.hasOwnProperty.call(data.handlers || {}, t)) {\n removeType(elem, t);\n }\n }\n return;\n }\n var handlers = data.handlers[type];\n\n // If no handlers exist, nothing to unbind\n if (!handlers) {\n return;\n }\n\n // If no listener was provided, remove all listeners for type\n if (!fn) {\n removeType(elem, type);\n return;\n }\n\n // We're only removing a single handler\n if (fn.guid) {\n for (var n = 0; n < handlers.length; n++) {\n if (handlers[n].guid === fn.guid) {\n handlers.splice(n--, 1);\n }\n }\n }\n _cleanUpEvents(elem, type);\n}\n\n/**\n * Trigger an event for an element\n *\n * @param {Element|Object} elem\n * Element to trigger an event on\n *\n * @param {EventTarget~Event|string} event\n * A string (the type) or an event object with a type attribute\n *\n * @param {Object} [hash]\n * data hash to pass along with the event\n *\n * @return {boolean|undefined}\n * Returns the opposite of `defaultPrevented` if default was\n * prevented. Otherwise, returns `undefined`\n */\nfunction _trigger(elem, event, hash) {\n // Fetches element data and a reference to the parent (for bubbling).\n // Don't want to add a data object to cache for every parent,\n // so checking hasElData first.\n var elemData = DomData.has(elem) ? DomData.get(elem) : {};\n var parent = elem.parentNode || elem.ownerDocument;\n // type = event.type || event,\n // handler;\n\n // If an event name was passed as a string, creates an event out of it\n if (typeof event === 'string') {\n event = {\n type: event,\n target: elem\n };\n } else if (!event.target) {\n event.target = elem;\n }\n\n // Normalizes the event properties.\n event = fixEvent(event);\n\n // If the passed element has a dispatcher, executes the established handlers.\n if (elemData.dispatcher) {\n elemData.dispatcher.call(elem, event, hash);\n }\n\n // Unless explicitly stopped or the event does not bubble (e.g. media events)\n // recursively calls this function to bubble the event up the DOM.\n if (parent && !event.isPropagationStopped() && event.bubbles === true) {\n _trigger.call(null, parent, event, hash);\n\n // If at the top of the DOM, triggers the default action unless disabled.\n } else if (!parent && !event.defaultPrevented && event.target && event.target[event.type]) {\n if (!DomData.has(event.target)) {\n DomData.set(event.target, {});\n }\n var targetData = DomData.get(event.target);\n\n // Checks if the target has a default action for this event.\n if (event.target[event.type]) {\n // Temporarily disables event dispatching on the target as we have already executed the handler.\n targetData.disabled = true;\n // Executes the default action.\n if (typeof event.target[event.type] === 'function') {\n event.target[event.type]();\n }\n // Re-enables event dispatching.\n targetData.disabled = false;\n }\n }\n\n // Inform the triggerer if the default was prevented by returning false\n return !event.defaultPrevented;\n}\n\n/**\n * Trigger a listener only once for an event.\n *\n * @param {Element|Object} elem\n * Element or object to bind to.\n *\n * @param {string|string[]} type\n * Name/type of event\n *\n * @param {Event~EventListener} fn\n * Event listener function\n */\nfunction _one(elem, type, fn) {\n if (Array.isArray(type)) {\n return _handleMultipleEvents(_one, elem, type, fn);\n }\n var func = function func() {\n _off(elem, type, func);\n fn.apply(this, arguments);\n };\n\n // copy the guid to the new function so it can removed using the original function's ID\n func.guid = fn.guid = fn.guid || newGUID();\n _on(elem, type, func);\n}\n\n/**\n * Trigger a listener only once and then turn if off for all\n * configured events\n *\n * @param {Element|Object} elem\n * Element or object to bind to.\n *\n * @param {string|string[]} type\n * Name/type of event\n *\n * @param {Event~EventListener} fn\n * Event listener function\n */\nfunction _any(elem, type, fn) {\n var func = function func() {\n _off(elem, type, func);\n fn.apply(this, arguments);\n };\n\n // copy the guid to the new function so it can removed using the original function's ID\n func.guid = fn.guid = fn.guid || newGUID();\n\n // multiple ons, but one off for everything\n _on(elem, type, func);\n}\nvar Events = /*#__PURE__*/Object.freeze({\n __proto__: null,\n fixEvent: fixEvent,\n on: _on,\n off: _off,\n trigger: _trigger,\n one: _one,\n any: _any\n});\n\n/**\n * @file fn.js\n * @module fn\n */\nvar UPDATE_REFRESH_INTERVAL = 30;\n\n/**\n * A private, internal-only function for changing the context of a function.\n *\n * It also stores a unique id on the function so it can be easily removed from\n * events.\n *\n * @private\n * @function\n * @param {*} context\n * The object to bind as scope.\n *\n * @param {Function} fn\n * The function to be bound to a scope.\n *\n * @param {number} [uid]\n * An optional unique ID for the function to be set\n *\n * @return {Function}\n * The new function that will be bound into the context given\n */\nvar bind_ = function bind_(context, fn, uid) {\n // Make sure the function has a unique ID\n if (!fn.guid) {\n fn.guid = newGUID();\n }\n\n // Create the new function that changes the context\n var bound = fn.bind(context);\n\n // Allow for the ability to individualize this function\n // Needed in the case where multiple objects might share the same prototype\n // IF both items add an event listener with the same function, then you try to remove just one\n // it will remove both because they both have the same guid.\n // when using this, you need to use the bind method when you remove the listener as well.\n // currently used in text tracks\n bound.guid = uid ? uid + '_' + fn.guid : fn.guid;\n return bound;\n};\n\n/**\n * Wraps the given function, `fn`, with a new function that only invokes `fn`\n * at most once per every `wait` milliseconds.\n *\n * @function\n * @param {Function} fn\n * The function to be throttled.\n *\n * @param {number} wait\n * The number of milliseconds by which to throttle.\n *\n * @return {Function}\n */\nvar throttle = function throttle(fn, wait) {\n var last = window$1.performance.now();\n var throttled = function throttled() {\n var now = window$1.performance.now();\n if (now - last >= wait) {\n fn.apply(void 0, arguments);\n last = now;\n }\n };\n return throttled;\n};\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked.\n *\n * Inspired by lodash and underscore implementations.\n *\n * @function\n * @param {Function} func\n * The function to wrap with debounce behavior.\n *\n * @param {number} wait\n * The number of milliseconds to wait after the last invocation.\n *\n * @param {boolean} [immediate]\n * Whether or not to invoke the function immediately upon creation.\n *\n * @param {Object} [context=window]\n * The \"context\" in which the debounced function should debounce. For\n * example, if this function should be tied to a Video.js player,\n * the player can be passed here. Alternatively, defaults to the\n * global `window` object.\n *\n * @return {Function}\n * A debounced function.\n */\nvar debounce = function debounce(func, wait, immediate) {\n var context = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : window$1;\n var timeout;\n var cancel = function cancel() {\n context.clearTimeout(timeout);\n timeout = null;\n };\n\n /* eslint-disable consistent-this */\n var debounced = function debounced() {\n var self = this;\n var args = arguments;\n var _later = function later() {\n timeout = null;\n _later = null;\n if (!immediate) {\n func.apply(self, args);\n }\n };\n if (!timeout && immediate) {\n func.apply(self, args);\n }\n context.clearTimeout(timeout);\n timeout = context.setTimeout(_later, wait);\n };\n /* eslint-enable consistent-this */\n\n debounced.cancel = cancel;\n return debounced;\n};\nvar Fn = /*#__PURE__*/Object.freeze({\n __proto__: null,\n UPDATE_REFRESH_INTERVAL: UPDATE_REFRESH_INTERVAL,\n bind_: bind_,\n throttle: throttle,\n debounce: debounce\n});\n\n/**\n * @file src/js/event-target.js\n */\nvar EVENT_MAP;\n\n/**\n * `EventTarget` is a class that can have the same API as the DOM `EventTarget`. It\n * adds shorthand functions that wrap around lengthy functions. For example:\n * the `on` function is a wrapper around `addEventListener`.\n *\n * @see [EventTarget Spec]{@link https://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-EventTarget}\n * @class EventTarget\n */\nvar EventTarget$2 = /*#__PURE__*/function () {\n function EventTarget$2() {\n _classCallCheck(this, EventTarget$2);\n }\n _createClass(EventTarget$2, [{\n key: \"on\",\n value:\n /**\n * Adds an `event listener` to an instance of an `EventTarget`. An `event listener` is a\n * function that will get called when an event with a certain name gets triggered.\n *\n * @param {string|string[]} type\n * An event name or an array of event names.\n *\n * @param {Function} fn\n * The function to call with `EventTarget`s\n */\n function on(type, fn) {\n // Remove the addEventListener alias before calling Events.on\n // so we don't get into an infinite type loop\n var ael = this.addEventListener;\n this.addEventListener = function () {};\n _on(this, type, fn);\n this.addEventListener = ael;\n }\n /**\n * Removes an `event listener` for a specific event from an instance of `EventTarget`.\n * This makes it so that the `event listener` will no longer get called when the\n * named event happens.\n *\n * @param {string|string[]} type\n * An event name or an array of event names.\n *\n * @param {Function} fn\n * The function to remove.\n */\n }, {\n key: \"off\",\n value: function off(type, fn) {\n _off(this, type, fn);\n }\n /**\n * This function will add an `event listener` that gets triggered only once. After the\n * first trigger it will get removed. This is like adding an `event listener`\n * with {@link EventTarget#on} that calls {@link EventTarget#off} on itself.\n *\n * @param {string|string[]} type\n * An event name or an array of event names.\n *\n * @param {Function} fn\n * The function to be called once for each event name.\n */\n }, {\n key: \"one\",\n value: function one(type, fn) {\n // Remove the addEventListener aliasing Events.on\n // so we don't get into an infinite type loop\n var ael = this.addEventListener;\n this.addEventListener = function () {};\n _one(this, type, fn);\n this.addEventListener = ael;\n }\n /**\n * This function will add an `event listener` that gets triggered only once and is\n * removed from all events. This is like adding an array of `event listener`s\n * with {@link EventTarget#on} that calls {@link EventTarget#off} on all events the\n * first time it is triggered.\n *\n * @param {string|string[]} type\n * An event name or an array of event names.\n *\n * @param {Function} fn\n * The function to be called once for each event name.\n */\n }, {\n key: \"any\",\n value: function any(type, fn) {\n // Remove the addEventListener aliasing Events.on\n // so we don't get into an infinite type loop\n var ael = this.addEventListener;\n this.addEventListener = function () {};\n _any(this, type, fn);\n this.addEventListener = ael;\n }\n /**\n * This function causes an event to happen. This will then cause any `event listeners`\n * that are waiting for that event, to get called. If there are no `event listeners`\n * for an event then nothing will happen.\n *\n * If the name of the `Event` that is being triggered is in `EventTarget.allowedEvents_`.\n * Trigger will also call the `on` + `uppercaseEventName` function.\n *\n * Example:\n * 'click' is in `EventTarget.allowedEvents_`, so, trigger will attempt to call\n * `onClick` if it exists.\n *\n * @param {string|EventTarget~Event|Object} event\n * The name of the event, an `Event`, or an object with a key of type set to\n * an event name.\n */\n }, {\n key: \"trigger\",\n value: function trigger(event) {\n var type = event.type || event;\n\n // deprecation\n // In a future version we should default target to `this`\n // similar to how we default the target to `elem` in\n // `Events.trigger`. Right now the default `target` will be\n // `document` due to the `Event.fixEvent` call.\n if (typeof event === 'string') {\n event = {\n type: type\n };\n }\n event = fixEvent(event);\n if (this.allowedEvents_[type] && this['on' + type]) {\n this['on' + type](event);\n }\n _trigger(this, event);\n }\n }, {\n key: \"queueTrigger\",\n value: function queueTrigger(event) {\n var _this = this;\n // only set up EVENT_MAP if it'll be used\n if (!EVENT_MAP) {\n EVENT_MAP = new Map();\n }\n var type = event.type || event;\n var map = EVENT_MAP.get(this);\n if (!map) {\n map = new Map();\n EVENT_MAP.set(this, map);\n }\n var oldTimeout = map.get(type);\n map[\"delete\"](type);\n window$1.clearTimeout(oldTimeout);\n var timeout = window$1.setTimeout(function () {\n map[\"delete\"](type);\n // if we cleared out all timeouts for the current target, delete its map\n if (map.size === 0) {\n map = null;\n EVENT_MAP[\"delete\"](_this);\n }\n _this.trigger(event);\n }, 0);\n map.set(type, timeout);\n }\n }]);\n return EventTarget$2;\n}();\n/**\n * A Custom DOM event.\n *\n * @typedef {CustomEvent} Event\n * @see [Properties]{@link https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent}\n */\n/**\n * All event listeners should follow the following format.\n *\n * @callback EventListener\n * @this {EventTarget}\n *\n * @param {Event} event\n * the event that triggered this function\n *\n * @param {Object} [hash]\n * hash of data sent during the event\n */\n/**\n * An object containing event names as keys and booleans as values.\n *\n * > NOTE: If an event name is set to a true value here {@link EventTarget#trigger}\n * will have extra functionality. See that function for more information.\n *\n * @property EventTarget.prototype.allowedEvents_\n * @protected\n */\nEventTarget$2.prototype.allowedEvents_ = {};\n\n/**\n * An alias of {@link EventTarget#on}. Allows `EventTarget` to mimic\n * the standard DOM API.\n *\n * @function\n * @see {@link EventTarget#on}\n */\nEventTarget$2.prototype.addEventListener = EventTarget$2.prototype.on;\n\n/**\n * An alias of {@link EventTarget#off}. Allows `EventTarget` to mimic\n * the standard DOM API.\n *\n * @function\n * @see {@link EventTarget#off}\n */\nEventTarget$2.prototype.removeEventListener = EventTarget$2.prototype.off;\n\n/**\n * An alias of {@link EventTarget#trigger}. Allows `EventTarget` to mimic\n * the standard DOM API.\n *\n * @function\n * @see {@link EventTarget#trigger}\n */\nEventTarget$2.prototype.dispatchEvent = EventTarget$2.prototype.trigger;\n\n/**\n * @file mixins/evented.js\n * @module evented\n */\nvar objName = function objName(obj) {\n if (typeof obj.name === 'function') {\n return obj.name();\n }\n if (typeof obj.name === 'string') {\n return obj.name;\n }\n if (obj.name_) {\n return obj.name_;\n }\n if (obj.constructor && obj.constructor.name) {\n return obj.constructor.name;\n }\n return _typeof(obj);\n};\n\n/**\n * Returns whether or not an object has had the evented mixin applied.\n *\n * @param {Object} object\n * An object to test.\n *\n * @return {boolean}\n * Whether or not the object appears to be evented.\n */\nvar isEvented = function isEvented(object) {\n return object instanceof EventTarget$2 || !!object.eventBusEl_ && ['on', 'one', 'off', 'trigger'].every(function (k) {\n return typeof object[k] === 'function';\n });\n};\n\n/**\n * Adds a callback to run after the evented mixin applied.\n *\n * @param {Object} target\n * An object to Add\n * @param {Function} callback\n * The callback to run.\n */\nvar addEventedCallback = function addEventedCallback(target, callback) {\n if (isEvented(target)) {\n callback();\n } else {\n if (!target.eventedCallbacks) {\n target.eventedCallbacks = [];\n }\n target.eventedCallbacks.push(callback);\n }\n};\n\n/**\n * Whether a value is a valid event type - non-empty string or array.\n *\n * @private\n * @param {string|Array} type\n * The type value to test.\n *\n * @return {boolean}\n * Whether or not the type is a valid event type.\n */\nvar isValidEventType = function isValidEventType(type) {\n return (\n // The regex here verifies that the `type` contains at least one non-\n // whitespace character.\n typeof type === 'string' && /\\S/.test(type) || Array.isArray(type) && !!type.length\n );\n};\n\n/**\n * Validates a value to determine if it is a valid event target. Throws if not.\n *\n * @private\n * @throws {Error}\n * If the target does not appear to be a valid event target.\n *\n * @param {Object} target\n * The object to test.\n *\n * @param {Object} obj\n * The evented object we are validating for\n *\n * @param {string} fnName\n * The name of the evented mixin function that called this.\n */\nvar validateTarget = function validateTarget(target, obj, fnName) {\n if (!target || !target.nodeName && !isEvented(target)) {\n throw new Error(\"Invalid target for \".concat(objName(obj), \"#\").concat(fnName, \"; must be a DOM node or evented object.\"));\n }\n};\n\n/**\n * Validates a value to determine if it is a valid event target. Throws if not.\n *\n * @private\n * @throws {Error}\n * If the type does not appear to be a valid event type.\n *\n * @param {string|Array} type\n * The type to test.\n *\n * @param {Object} obj\n* The evented object we are validating for\n *\n * @param {string} fnName\n * The name of the evented mixin function that called this.\n */\nvar validateEventType = function validateEventType(type, obj, fnName) {\n if (!isValidEventType(type)) {\n throw new Error(\"Invalid event type for \".concat(objName(obj), \"#\").concat(fnName, \"; must be a non-empty string or array.\"));\n }\n};\n\n/**\n * Validates a value to determine if it is a valid listener. Throws if not.\n *\n * @private\n * @throws {Error}\n * If the listener is not a function.\n *\n * @param {Function} listener\n * The listener to test.\n *\n * @param {Object} obj\n * The evented object we are validating for\n *\n * @param {string} fnName\n * The name of the evented mixin function that called this.\n */\nvar validateListener = function validateListener(listener, obj, fnName) {\n if (typeof listener !== 'function') {\n throw new Error(\"Invalid listener for \".concat(objName(obj), \"#\").concat(fnName, \"; must be a function.\"));\n }\n};\n\n/**\n * Takes an array of arguments given to `on()` or `one()`, validates them, and\n * normalizes them into an object.\n *\n * @private\n * @param {Object} self\n * The evented object on which `on()` or `one()` was called. This\n * object will be bound as the `this` value for the listener.\n *\n * @param {Array} args\n * An array of arguments passed to `on()` or `one()`.\n *\n * @param {string} fnName\n * The name of the evented mixin function that called this.\n *\n * @return {Object}\n * An object containing useful values for `on()` or `one()` calls.\n */\nvar normalizeListenArgs = function normalizeListenArgs(self, args, fnName) {\n // If the number of arguments is less than 3, the target is always the\n // evented object itself.\n var isTargetingSelf = args.length < 3 || args[0] === self || args[0] === self.eventBusEl_;\n var target;\n var type;\n var listener;\n if (isTargetingSelf) {\n target = self.eventBusEl_;\n\n // Deal with cases where we got 3 arguments, but we are still listening to\n // the evented object itself.\n if (args.length >= 3) {\n args.shift();\n }\n var _args = _slicedToArray(args, 2);\n type = _args[0];\n listener = _args[1];\n } else {\n var _args2 = _slicedToArray(args, 3);\n target = _args2[0];\n type = _args2[1];\n listener = _args2[2];\n }\n validateTarget(target, self, fnName);\n validateEventType(type, self, fnName);\n validateListener(listener, self, fnName);\n listener = bind_(self, listener);\n return {\n isTargetingSelf: isTargetingSelf,\n target: target,\n type: type,\n listener: listener\n };\n};\n\n/**\n * Adds the listener to the event type(s) on the target, normalizing for\n * the type of target.\n *\n * @private\n * @param {Element|Object} target\n * A DOM node or evented object.\n *\n * @param {string} method\n * The event binding method to use (\"on\" or \"one\").\n *\n * @param {string|Array} type\n * One or more event type(s).\n *\n * @param {Function} listener\n * A listener function.\n */\nvar listen = function listen(target, method, type, listener) {\n validateTarget(target, target, method);\n if (target.nodeName) {\n Events[method](target, type, listener);\n } else {\n target[method](type, listener);\n }\n};\n\n/**\n * Contains methods that provide event capabilities to an object which is passed\n * to {@link module:evented|evented}.\n *\n * @mixin EventedMixin\n */\nvar EventedMixin = {\n /**\n * Add a listener to an event (or events) on this object or another evented\n * object.\n *\n * @param {string|Array|Element|Object} targetOrType\n * If this is a string or array, it represents the event type(s)\n * that will trigger the listener.\n *\n * Another evented object can be passed here instead, which will\n * cause the listener to listen for events on _that_ object.\n *\n * In either case, the listener's `this` value will be bound to\n * this object.\n *\n * @param {string|Array|Function} typeOrListener\n * If the first argument was a string or array, this should be the\n * listener function. Otherwise, this is a string or array of event\n * type(s).\n *\n * @param {Function} [listener]\n * If the first argument was another evented object, this will be\n * the listener function.\n */\n on: function on() {\n var _this2 = this;\n for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {\n args[_key8] = arguments[_key8];\n }\n var _normalizeListenArgs = normalizeListenArgs(this, args, 'on'),\n isTargetingSelf = _normalizeListenArgs.isTargetingSelf,\n target = _normalizeListenArgs.target,\n type = _normalizeListenArgs.type,\n listener = _normalizeListenArgs.listener;\n listen(target, 'on', type, listener);\n\n // If this object is listening to another evented object.\n if (!isTargetingSelf) {\n // If this object is disposed, remove the listener.\n var removeListenerOnDispose = function removeListenerOnDispose() {\n return _this2.off(target, type, listener);\n };\n\n // Use the same function ID as the listener so we can remove it later it\n // using the ID of the original listener.\n removeListenerOnDispose.guid = listener.guid;\n\n // Add a listener to the target's dispose event as well. This ensures\n // that if the target is disposed BEFORE this object, we remove the\n // removal listener that was just added. Otherwise, we create a memory leak.\n var removeRemoverOnTargetDispose = function removeRemoverOnTargetDispose() {\n return _this2.off('dispose', removeListenerOnDispose);\n };\n\n // Use the same function ID as the listener so we can remove it later\n // it using the ID of the original listener.\n removeRemoverOnTargetDispose.guid = listener.guid;\n listen(this, 'on', 'dispose', removeListenerOnDispose);\n listen(target, 'on', 'dispose', removeRemoverOnTargetDispose);\n }\n },\n /**\n * Add a listener to an event (or events) on this object or another evented\n * object. The listener will be called once per event and then removed.\n *\n * @param {string|Array|Element|Object} targetOrType\n * If this is a string or array, it represents the event type(s)\n * that will trigger the listener.\n *\n * Another evented object can be passed here instead, which will\n * cause the listener to listen for events on _that_ object.\n *\n * In either case, the listener's `this` value will be bound to\n * this object.\n *\n * @param {string|Array|Function} typeOrListener\n * If the first argument was a string or array, this should be the\n * listener function. Otherwise, this is a string or array of event\n * type(s).\n *\n * @param {Function} [listener]\n * If the first argument was another evented object, this will be\n * the listener function.\n */\n one: function one() {\n var _this3 = this;\n for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {\n args[_key9] = arguments[_key9];\n }\n var _normalizeListenArgs2 = normalizeListenArgs(this, args, 'one'),\n isTargetingSelf = _normalizeListenArgs2.isTargetingSelf,\n target = _normalizeListenArgs2.target,\n type = _normalizeListenArgs2.type,\n listener = _normalizeListenArgs2.listener;\n\n // Targeting this evented object.\n if (isTargetingSelf) {\n listen(target, 'one', type, listener);\n\n // Targeting another evented object.\n } else {\n // TODO: This wrapper is incorrect! It should only\n // remove the wrapper for the event type that called it.\n // Instead all listeners are removed on the first trigger!\n // see https://github.com/videojs/video.js/issues/5962\n var wrapper = function wrapper() {\n _this3.off(target, type, wrapper);\n for (var _len10 = arguments.length, largs = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {\n largs[_key10] = arguments[_key10];\n }\n listener.apply(null, largs);\n };\n\n // Use the same function ID as the listener so we can remove it later\n // it using the ID of the original listener.\n wrapper.guid = listener.guid;\n listen(target, 'one', type, wrapper);\n }\n },\n /**\n * Add a listener to an event (or events) on this object or another evented\n * object. The listener will only be called once for the first event that is triggered\n * then removed.\n *\n * @param {string|Array|Element|Object} targetOrType\n * If this is a string or array, it represents the event type(s)\n * that will trigger the listener.\n *\n * Another evented object can be passed here instead, which will\n * cause the listener to listen for events on _that_ object.\n *\n * In either case, the listener's `this` value will be bound to\n * this object.\n *\n * @param {string|Array|Function} typeOrListener\n * If the first argument was a string or array, this should be the\n * listener function. Otherwise, this is a string or array of event\n * type(s).\n *\n * @param {Function} [listener]\n * If the first argument was another evented object, this will be\n * the listener function.\n */\n any: function any() {\n var _this4 = this;\n for (var _len11 = arguments.length, args = new Array(_len11), _key11 = 0; _key11 < _len11; _key11++) {\n args[_key11] = arguments[_key11];\n }\n var _normalizeListenArgs3 = normalizeListenArgs(this, args, 'any'),\n isTargetingSelf = _normalizeListenArgs3.isTargetingSelf,\n target = _normalizeListenArgs3.target,\n type = _normalizeListenArgs3.type,\n listener = _normalizeListenArgs3.listener;\n\n // Targeting this evented object.\n if (isTargetingSelf) {\n listen(target, 'any', type, listener);\n\n // Targeting another evented object.\n } else {\n var wrapper = function wrapper() {\n _this4.off(target, type, wrapper);\n for (var _len12 = arguments.length, largs = new Array(_len12), _key12 = 0; _key12 < _len12; _key12++) {\n largs[_key12] = arguments[_key12];\n }\n listener.apply(null, largs);\n };\n\n // Use the same function ID as the listener so we can remove it later\n // it using the ID of the original listener.\n wrapper.guid = listener.guid;\n listen(target, 'any', type, wrapper);\n }\n },\n /**\n * Removes listener(s) from event(s) on an evented object.\n *\n * @param {string|Array|Element|Object} [targetOrType]\n * If this is a string or array, it represents the event type(s).\n *\n * Another evented object can be passed here instead, in which case\n * ALL 3 arguments are _required_.\n *\n * @param {string|Array|Function} [typeOrListener]\n * If the first argument was a string or array, this may be the\n * listener function. Otherwise, this is a string or array of event\n * type(s).\n *\n * @param {Function} [listener]\n * If the first argument was another evented object, this will be\n * the listener function; otherwise, _all_ listeners bound to the\n * event type(s) will be removed.\n */\n off: function off(targetOrType, typeOrListener, listener) {\n // Targeting this evented object.\n if (!targetOrType || isValidEventType(targetOrType)) {\n _off(this.eventBusEl_, targetOrType, typeOrListener);\n\n // Targeting another evented object.\n } else {\n var target = targetOrType;\n var type = typeOrListener;\n\n // Fail fast and in a meaningful way!\n validateTarget(target, this, 'off');\n validateEventType(type, this, 'off');\n validateListener(listener, this, 'off');\n\n // Ensure there's at least a guid, even if the function hasn't been used\n listener = bind_(this, listener);\n\n // Remove the dispose listener on this evented object, which was given\n // the same guid as the event listener in on().\n this.off('dispose', listener);\n if (target.nodeName) {\n _off(target, type, listener);\n _off(target, 'dispose', listener);\n } else if (isEvented(target)) {\n target.off(type, listener);\n target.off('dispose', listener);\n }\n }\n },\n /**\n * Fire an event on this evented object, causing its listeners to be called.\n *\n * @param {string|Object} event\n * An event type or an object with a type property.\n *\n * @param {Object} [hash]\n * An additional object to pass along to listeners.\n *\n * @return {boolean}\n * Whether or not the default behavior was prevented.\n */\n trigger: function trigger(event, hash) {\n validateTarget(this.eventBusEl_, this, 'trigger');\n var type = event && typeof event !== 'string' ? event.type : event;\n if (!isValidEventType(type)) {\n throw new Error(\"Invalid event type for \".concat(objName(this), \"#trigger; \") + 'must be a non-empty string or object with a type key that has a non-empty value.');\n }\n return _trigger(this.eventBusEl_, event, hash);\n }\n};\n\n/**\n * Applies {@link module:evented~EventedMixin|EventedMixin} to a target object.\n *\n * @param {Object} target\n * The object to which to add event methods.\n *\n * @param {Object} [options={}]\n * Options for customizing the mixin behavior.\n *\n * @param {string} [options.eventBusKey]\n * By default, adds a `eventBusEl_` DOM element to the target object,\n * which is used as an event bus. If the target object already has a\n * DOM element that should be used, pass its key here.\n *\n * @return {Object}\n * The target object.\n */\nfunction evented(target) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var eventBusKey = options.eventBusKey;\n\n // Set or create the eventBusEl_.\n if (eventBusKey) {\n if (!target[eventBusKey].nodeName) {\n throw new Error(\"The eventBusKey \\\"\".concat(eventBusKey, \"\\\" does not refer to an element.\"));\n }\n target.eventBusEl_ = target[eventBusKey];\n } else {\n target.eventBusEl_ = _createEl('span', {\n className: 'vjs-event-bus'\n });\n }\n Object.assign(target, EventedMixin);\n if (target.eventedCallbacks) {\n target.eventedCallbacks.forEach(function (callback) {\n callback();\n });\n }\n\n // When any evented object is disposed, it removes all its listeners.\n target.on('dispose', function () {\n target.off();\n [target, target.el_, target.eventBusEl_].forEach(function (val) {\n if (val && DomData.has(val)) {\n DomData[\"delete\"](val);\n }\n });\n window$1.setTimeout(function () {\n target.eventBusEl_ = null;\n }, 0);\n });\n return target;\n}\n\n/**\n * @file mixins/stateful.js\n * @module stateful\n */\n\n/**\n * Contains methods that provide statefulness to an object which is passed\n * to {@link module:stateful}.\n *\n * @mixin StatefulMixin\n */\nvar StatefulMixin = {\n /**\n * A hash containing arbitrary keys and values representing the state of\n * the object.\n *\n * @type {Object}\n */\n state: {},\n /**\n * Set the state of an object by mutating its\n * {@link module:stateful~StatefulMixin.state|state} object in place.\n *\n * @fires module:stateful~StatefulMixin#statechanged\n * @param {Object|Function} stateUpdates\n * A new set of properties to shallow-merge into the plugin state.\n * Can be a plain object or a function returning a plain object.\n *\n * @return {Object|undefined}\n * An object containing changes that occurred. If no changes\n * occurred, returns `undefined`.\n */\n setState: function setState(stateUpdates) {\n var _this5 = this;\n // Support providing the `stateUpdates` state as a function.\n if (typeof stateUpdates === 'function') {\n stateUpdates = stateUpdates();\n }\n var changes;\n each(stateUpdates, function (value, key) {\n // Record the change if the value is different from what's in the\n // current state.\n if (_this5.state[key] !== value) {\n changes = changes || {};\n changes[key] = {\n from: _this5.state[key],\n to: value\n };\n }\n _this5.state[key] = value;\n });\n\n // Only trigger \"statechange\" if there were changes AND we have a trigger\n // function. This allows us to not require that the target object be an\n // evented object.\n if (changes && isEvented(this)) {\n /**\n * An event triggered on an object that is both\n * {@link module:stateful|stateful} and {@link module:evented|evented}\n * indicating that its state has changed.\n *\n * @event module:stateful~StatefulMixin#statechanged\n * @type {Object}\n * @property {Object} changes\n * A hash containing the properties that were changed and\n * the values they were changed `from` and `to`.\n */\n this.trigger({\n changes: changes,\n type: 'statechanged'\n });\n }\n return changes;\n }\n};\n\n/**\n * Applies {@link module:stateful~StatefulMixin|StatefulMixin} to a target\n * object.\n *\n * If the target object is {@link module:evented|evented} and has a\n * `handleStateChanged` method, that method will be automatically bound to the\n * `statechanged` event on itself.\n *\n * @param {Object} target\n * The object to be made stateful.\n *\n * @param {Object} [defaultState]\n * A default set of properties to populate the newly-stateful object's\n * `state` property.\n *\n * @return {Object}\n * Returns the `target`.\n */\nfunction stateful(target, defaultState) {\n Object.assign(target, StatefulMixin);\n\n // This happens after the mixing-in because we need to replace the `state`\n // added in that step.\n target.state = Object.assign({}, target.state, defaultState);\n\n // Auto-bind the `handleStateChanged` method of the target object if it exists.\n if (typeof target.handleStateChanged === 'function' && isEvented(target)) {\n target.on('statechanged', target.handleStateChanged);\n }\n return target;\n}\n\n/**\n * @file str.js\n * @module to-lower-case\n */\n\n/**\n * Lowercase the first letter of a string.\n *\n * @param {string} string\n * String to be lowercased\n *\n * @return {string}\n * The string with a lowercased first letter\n */\nvar toLowerCase = function toLowerCase(string) {\n if (typeof string !== 'string') {\n return string;\n }\n return string.replace(/./, function (w) {\n return w.toLowerCase();\n });\n};\n\n/**\n * Uppercase the first letter of a string.\n *\n * @param {string} string\n * String to be uppercased\n *\n * @return {string}\n * The string with an uppercased first letter\n */\nvar toTitleCase$1 = function toTitleCase$1(string) {\n if (typeof string !== 'string') {\n return string;\n }\n return string.replace(/./, function (w) {\n return w.toUpperCase();\n });\n};\n\n/**\n * Compares the TitleCase versions of the two strings for equality.\n *\n * @param {string} str1\n * The first string to compare\n *\n * @param {string} str2\n * The second string to compare\n *\n * @return {boolean}\n * Whether the TitleCase versions of the strings are equal\n */\nvar titleCaseEquals = function titleCaseEquals(str1, str2) {\n return toTitleCase$1(str1) === toTitleCase$1(str2);\n};\nvar Str = /*#__PURE__*/Object.freeze({\n __proto__: null,\n toLowerCase: toLowerCase,\n toTitleCase: toTitleCase$1,\n titleCaseEquals: titleCaseEquals\n});\n\n/**\n * Player Component - Base class for all UI objects\n *\n * @file component.js\n */\n\n/**\n * Base class for all UI Components.\n * Components are UI objects which represent both a javascript object and an element\n * in the DOM. They can be children of other components, and can have\n * children themselves.\n *\n * Components can also use methods from {@link EventTarget}\n */\nvar Component$1 = /*#__PURE__*/function () {\n /**\n * A callback that is called when a component is ready. Does not have any\n * parameters and any callback value will be ignored.\n *\n * @callback ReadyCallback\n * @this Component\n */\n\n /**\n * Creates an instance of this class.\n *\n * @param { import('./player').default } player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of component options.\n *\n * @param {Object[]} [options.children]\n * An array of children objects to initialize this component with. Children objects have\n * a name property that will be used if more than one component of the same type needs to be\n * added.\n *\n * @param {string} [options.className]\n * A class or space separated list of classes to add the component\n *\n * @param {ReadyCallback} [ready]\n * Function that gets called when the `Component` is ready.\n */\n function Component$1(player, options, ready) {\n var _this6 = this;\n _classCallCheck(this, Component$1);\n // The component might be the player itself and we can't pass `this` to super\n if (!player && this.play) {\n this.player_ = player = this; // eslint-disable-line\n } else {\n this.player_ = player;\n }\n this.isDisposed_ = false;\n\n // Hold the reference to the parent component via `addChild` method\n this.parentComponent_ = null;\n\n // Make a copy of prototype.options_ to protect against overriding defaults\n this.options_ = merge$1({}, this.options_);\n\n // Updated options with supplied options\n options = this.options_ = merge$1(this.options_, options);\n\n // Get ID from options or options element if one is supplied\n this.id_ = options.id || options.el && options.el.id;\n\n // If there was no ID from the options, generate one\n if (!this.id_) {\n // Don't require the player ID function in the case of mock players\n var id = player && player.id && player.id() || 'no_player';\n this.id_ = \"\".concat(id, \"_component_\").concat(newGUID());\n }\n this.name_ = options.name || null;\n\n // Create element if one wasn't provided in options\n if (options.el) {\n this.el_ = options.el;\n } else if (options.createEl !== false) {\n this.el_ = this.createEl();\n }\n if (options.className && this.el_) {\n options.className.split(' ').forEach(function (c) {\n return _this6.addClass(c);\n });\n }\n\n // Remove the placeholder event methods. If the component is evented, the\n // real methods are added next\n ['on', 'off', 'one', 'any', 'trigger'].forEach(function (fn) {\n _this6[fn] = undefined;\n });\n\n // if evented is anything except false, we want to mixin in evented\n if (options.evented !== false) {\n // Make this an evented object and use `el_`, if available, as its event bus\n evented(this, {\n eventBusKey: this.el_ ? 'el_' : null\n });\n this.handleLanguagechange = this.handleLanguagechange.bind(this);\n this.on(this.player_, 'languagechange', this.handleLanguagechange);\n }\n stateful(this, this.constructor.defaultState);\n this.children_ = [];\n this.childIndex_ = {};\n this.childNameIndex_ = {};\n this.setTimeoutIds_ = new Set();\n this.setIntervalIds_ = new Set();\n this.rafIds_ = new Set();\n this.namedRafs_ = new Map();\n this.clearingTimersOnDispose_ = false;\n\n // Add any child components in options\n if (options.initChildren !== false) {\n this.initChildren();\n }\n\n // Don't want to trigger ready here or it will go before init is actually\n // finished for all children that run this constructor\n this.ready(ready);\n if (options.reportTouchActivity !== false) {\n this.enableTouchActivity();\n }\n }\n\n // `on`, `off`, `one`, `any` and `trigger` are here so tsc includes them in definitions.\n // They are replaced or removed in the constructor\n\n /**\n * Adds an `event listener` to an instance of an `EventTarget`. An `event listener` is a\n * function that will get called when an event with a certain name gets triggered.\n *\n * @param {string|string[]} type\n * An event name or an array of event names.\n *\n * @param {Function} fn\n * The function to call with `EventTarget`s\n */\n _createClass(Component$1, [{\n key: \"on\",\n value: function on(type, fn) {}\n\n /**\n * Removes an `event listener` for a specific event from an instance of `EventTarget`.\n * This makes it so that the `event listener` will no longer get called when the\n * named event happens.\n *\n * @param {string|string[]} type\n * An event name or an array of event names.\n *\n * @param {Function} fn\n * The function to remove.\n */\n }, {\n key: \"off\",\n value: function off(type, fn) {}\n\n /**\n * This function will add an `event listener` that gets triggered only once. After the\n * first trigger it will get removed. This is like adding an `event listener`\n * with {@link EventTarget#on} that calls {@link EventTarget#off} on itself.\n *\n * @param {string|string[]} type\n * An event name or an array of event names.\n *\n * @param {Function} fn\n * The function to be called once for each event name.\n */\n }, {\n key: \"one\",\n value: function one(type, fn) {}\n\n /**\n * This function will add an `event listener` that gets triggered only once and is\n * removed from all events. This is like adding an array of `event listener`s\n * with {@link EventTarget#on} that calls {@link EventTarget#off} on all events the\n * first time it is triggered.\n *\n * @param {string|string[]} type\n * An event name or an array of event names.\n *\n * @param {Function} fn\n * The function to be called once for each event name.\n */\n }, {\n key: \"any\",\n value: function any(type, fn) {}\n\n /**\n * This function causes an event to happen. This will then cause any `event listeners`\n * that are waiting for that event, to get called. If there are no `event listeners`\n * for an event then nothing will happen.\n *\n * If the name of the `Event` that is being triggered is in `EventTarget.allowedEvents_`.\n * Trigger will also call the `on` + `uppercaseEventName` function.\n *\n * Example:\n * 'click' is in `EventTarget.allowedEvents_`, so, trigger will attempt to call\n * `onClick` if it exists.\n *\n * @param {string|Event|Object} event\n * The name of the event, an `Event`, or an object with a key of type set to\n * an event name.\n *\n * @param {Object} [hash]\n * Optionally extra argument to pass through to an event listener\n */\n }, {\n key: \"trigger\",\n value: function trigger(event, hash) {}\n\n /**\n * Dispose of the `Component` and all child components.\n *\n * @fires Component#dispose\n *\n * @param {Object} options\n * @param {Element} options.originalEl element with which to replace player element\n */\n }, {\n key: \"dispose\",\n value: function dispose() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n // Bail out if the component has already been disposed.\n if (this.isDisposed_) {\n return;\n }\n if (this.readyQueue_) {\n this.readyQueue_.length = 0;\n }\n\n /**\n * Triggered when a `Component` is disposed.\n *\n * @event Component#dispose\n * @type {Event}\n *\n * @property {boolean} [bubbles=false]\n * set to false so that the dispose event does not\n * bubble up\n */\n this.trigger({\n type: 'dispose',\n bubbles: false\n });\n this.isDisposed_ = true;\n\n // Dispose all children.\n if (this.children_) {\n for (var _i5 = this.children_.length - 1; _i5 >= 0; _i5--) {\n if (this.children_[_i5].dispose) {\n this.children_[_i5].dispose();\n }\n }\n }\n\n // Delete child references\n this.children_ = null;\n this.childIndex_ = null;\n this.childNameIndex_ = null;\n this.parentComponent_ = null;\n if (this.el_) {\n // Remove element from DOM\n if (this.el_.parentNode) {\n if (options.restoreEl) {\n this.el_.parentNode.replaceChild(options.restoreEl, this.el_);\n } else {\n this.el_.parentNode.removeChild(this.el_);\n }\n }\n this.el_ = null;\n }\n\n // remove reference to the player after disposing of the element\n this.player_ = null;\n }\n\n /**\n * Determine whether or not this component has been disposed.\n *\n * @return {boolean}\n * If the component has been disposed, will be `true`. Otherwise, `false`.\n */\n }, {\n key: \"isDisposed\",\n value: function isDisposed() {\n return Boolean(this.isDisposed_);\n }\n\n /**\n * Return the {@link Player} that the `Component` has attached to.\n *\n * @return { import('./player').default }\n * The player that this `Component` has attached to.\n */\n }, {\n key: \"player\",\n value: function player() {\n return this.player_;\n }\n\n /**\n * Deep merge of options objects with new options.\n * > Note: When both `obj` and `options` contain properties whose values are objects.\n * The two properties get merged using {@link module:obj.merge}\n *\n * @param {Object} obj\n * The object that contains new options.\n *\n * @return {Object}\n * A new object of `this.options_` and `obj` merged together.\n */\n }, {\n key: \"options\",\n value: function options(obj) {\n if (!obj) {\n return this.options_;\n }\n this.options_ = merge$1(this.options_, obj);\n return this.options_;\n }\n\n /**\n * Get the `Component`s DOM element\n *\n * @return {Element}\n * The DOM element for this `Component`.\n */\n }, {\n key: \"el\",\n value: function el() {\n return this.el_;\n }\n\n /**\n * Create the `Component`s DOM element.\n *\n * @param {string} [tagName]\n * Element's DOM node type. e.g. 'div'\n *\n * @param {Object} [properties]\n * An object of properties that should be set.\n *\n * @param {Object} [attributes]\n * An object of attributes that should be set.\n *\n * @return {Element}\n * The element that gets created.\n */\n }, {\n key: \"createEl\",\n value: function createEl(tagName, properties, attributes) {\n return _createEl(tagName, properties, attributes);\n }\n\n /**\n * Localize a string given the string in english.\n *\n * If tokens are provided, it'll try and run a simple token replacement on the provided string.\n * The tokens it looks for look like `{1}` with the index being 1-indexed into the tokens array.\n *\n * If a `defaultValue` is provided, it'll use that over `string`,\n * if a value isn't found in provided language files.\n * This is useful if you want to have a descriptive key for token replacement\n * but have a succinct localized string and not require `en.json` to be included.\n *\n * Currently, it is used for the progress bar timing.\n * ```js\n * {\n * \"progress bar timing: currentTime={1} duration={2}\": \"{1} of {2}\"\n * }\n * ```\n * It is then used like so:\n * ```js\n * this.localize('progress bar timing: currentTime={1} duration{2}',\n * [this.player_.currentTime(), this.player_.duration()],\n * '{1} of {2}');\n * ```\n *\n * Which outputs something like: `01:23 of 24:56`.\n *\n *\n * @param {string} string\n * The string to localize and the key to lookup in the language files.\n * @param {string[]} [tokens]\n * If the current item has token replacements, provide the tokens here.\n * @param {string} [defaultValue]\n * Defaults to `string`. Can be a default value to use for token replacement\n * if the lookup key is needed to be separate.\n *\n * @return {string}\n * The localized string or if no localization exists the english string.\n */\n }, {\n key: \"localize\",\n value: function localize(string, tokens) {\n var defaultValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : string;\n var code = this.player_.language && this.player_.language();\n var languages = this.player_.languages && this.player_.languages();\n var language = languages && languages[code];\n var primaryCode = code && code.split('-')[0];\n var primaryLang = languages && languages[primaryCode];\n var localizedString = defaultValue;\n if (language && language[string]) {\n localizedString = language[string];\n } else if (primaryLang && primaryLang[string]) {\n localizedString = primaryLang[string];\n }\n if (tokens) {\n localizedString = localizedString.replace(/\\{(\\d+)\\}/g, function (match, index) {\n var value = tokens[index - 1];\n var ret = value;\n if (typeof value === 'undefined') {\n ret = match;\n }\n return ret;\n });\n }\n return localizedString;\n }\n\n /**\n * Handles language change for the player in components. Should be overridden by sub-components.\n *\n * @abstract\n */\n }, {\n key: \"handleLanguagechange\",\n value: function handleLanguagechange() {}\n\n /**\n * Return the `Component`s DOM element. This is where children get inserted.\n * This will usually be the the same as the element returned in {@link Component#el}.\n *\n * @return {Element}\n * The content element for this `Component`.\n */\n }, {\n key: \"contentEl\",\n value: function contentEl() {\n return this.contentEl_ || this.el_;\n }\n\n /**\n * Get this `Component`s ID\n *\n * @return {string}\n * The id of this `Component`\n */\n }, {\n key: \"id\",\n value: function id() {\n return this.id_;\n }\n\n /**\n * Get the `Component`s name. The name gets used to reference the `Component`\n * and is set during registration.\n *\n * @return {string}\n * The name of this `Component`.\n */\n }, {\n key: \"name\",\n value: function name() {\n return this.name_;\n }\n\n /**\n * Get an array of all child components\n *\n * @return {Array}\n * The children\n */\n }, {\n key: \"children\",\n value: function children() {\n return this.children_;\n }\n\n /**\n * Returns the child `Component` with the given `id`.\n *\n * @param {string} id\n * The id of the child `Component` to get.\n *\n * @return {Component|undefined}\n * The child `Component` with the given `id` or undefined.\n */\n }, {\n key: \"getChildById\",\n value: function getChildById(id) {\n return this.childIndex_[id];\n }\n\n /**\n * Returns the child `Component` with the given `name`.\n *\n * @param {string} name\n * The name of the child `Component` to get.\n *\n * @return {Component|undefined}\n * The child `Component` with the given `name` or undefined.\n */\n }, {\n key: \"getChild\",\n value: function getChild(name) {\n if (!name) {\n return;\n }\n return this.childNameIndex_[name];\n }\n\n /**\n * Returns the descendant `Component` following the givent\n * descendant `names`. For instance ['foo', 'bar', 'baz'] would\n * try to get 'foo' on the current component, 'bar' on the 'foo'\n * component and 'baz' on the 'bar' component and return undefined\n * if any of those don't exist.\n *\n * @param {...string[]|...string} names\n * The name of the child `Component` to get.\n *\n * @return {Component|undefined}\n * The descendant `Component` following the given descendant\n * `names` or undefined.\n */\n }, {\n key: \"getDescendant\",\n value: function getDescendant() {\n for (var _len13 = arguments.length, names = new Array(_len13), _key13 = 0; _key13 < _len13; _key13++) {\n names[_key13] = arguments[_key13];\n }\n // flatten array argument into the main array\n names = names.reduce(function (acc, n) {\n return acc.concat(n);\n }, []);\n var currentChild = this;\n for (var _i6 = 0; _i6 < names.length; _i6++) {\n currentChild = currentChild.getChild(names[_i6]);\n if (!currentChild || !currentChild.getChild) {\n return;\n }\n }\n return currentChild;\n }\n\n /**\n * Adds an SVG icon element to another element or component.\n *\n * @param {string} iconName\n * The name of icon. A list of all the icon names can be found at 'sandbox/svg-icons.html'\n *\n * @param {Element} [el=this.el()]\n * Element to set the title on. Defaults to the current Component's element.\n *\n * @return {Element}\n * The newly created icon element.\n */\n }, {\n key: \"setIcon\",\n value: function setIcon(iconName) {\n var el = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.el();\n // TODO: In v9 of video.js, we will want to remove font icons entirely.\n // This means this check, as well as the others throughout the code, and\n // the unecessary CSS for font icons, will need to be removed.\n // See https://github.com/videojs/video.js/pull/8260 as to which components\n // need updating.\n if (!this.player_.options_.experimentalSvgIcons) {\n return;\n }\n var xmlnsURL = 'http://www.w3.org/2000/svg';\n\n // The below creates an element in the format of:\n // <span><svg><use>....</use></svg></span>\n var iconContainer = _createEl('span', {\n className: 'vjs-icon-placeholder vjs-svg-icon'\n }, {\n 'aria-hidden': 'true'\n });\n var svgEl = document.createElementNS(xmlnsURL, 'svg');\n svgEl.setAttributeNS(null, 'viewBox', '0 0 512 512');\n var useEl = document.createElementNS(xmlnsURL, 'use');\n svgEl.appendChild(useEl);\n useEl.setAttributeNS(null, 'href', \"#vjs-icon-\".concat(iconName));\n iconContainer.appendChild(svgEl);\n\n // Replace a pre-existing icon if one exists.\n if (this.iconIsSet_) {\n el.replaceChild(iconContainer, el.querySelector('.vjs-icon-placeholder'));\n } else {\n el.appendChild(iconContainer);\n }\n this.iconIsSet_ = true;\n return iconContainer;\n }\n\n /**\n * Add a child `Component` inside the current `Component`.\n *\n * @param {string|Component} child\n * The name or instance of a child to add.\n *\n * @param {Object} [options={}]\n * The key/value store of options that will get passed to children of\n * the child.\n *\n * @param {number} [index=this.children_.length]\n * The index to attempt to add a child into.\n *\n *\n * @return {Component}\n * The `Component` that gets added as a child. When using a string the\n * `Component` will get created by this process.\n */\n }, {\n key: \"addChild\",\n value: function addChild(child) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var index = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.children_.length;\n var component;\n var componentName;\n\n // If child is a string, create component with options\n if (typeof child === 'string') {\n componentName = toTitleCase$1(child);\n var componentClassName = options.componentClass || componentName;\n\n // Set name through options\n options.name = componentName;\n\n // Create a new object & element for this controls set\n // If there's no .player_, this is a player\n var ComponentClass = Component$1.getComponent(componentClassName);\n if (!ComponentClass) {\n throw new Error(\"Component \".concat(componentClassName, \" does not exist\"));\n }\n\n // data stored directly on the videojs object may be\n // misidentified as a component to retain\n // backwards-compatibility with 4.x. check to make sure the\n // component class can be instantiated.\n if (typeof ComponentClass !== 'function') {\n return null;\n }\n component = new ComponentClass(this.player_ || this, options);\n\n // child is a component instance\n } else {\n component = child;\n }\n if (component.parentComponent_) {\n component.parentComponent_.removeChild(component);\n }\n this.children_.splice(index, 0, component);\n component.parentComponent_ = this;\n if (typeof component.id === 'function') {\n this.childIndex_[component.id()] = component;\n }\n\n // If a name wasn't used to create the component, check if we can use the\n // name function of the component\n componentName = componentName || component.name && toTitleCase$1(component.name());\n if (componentName) {\n this.childNameIndex_[componentName] = component;\n this.childNameIndex_[toLowerCase(componentName)] = component;\n }\n\n // Add the UI object's element to the container div (box)\n // Having an element is not required\n if (typeof component.el === 'function' && component.el()) {\n // If inserting before a component, insert before that component's element\n var refNode = null;\n if (this.children_[index + 1]) {\n // Most children are components, but the video tech is an HTML element\n if (this.children_[index + 1].el_) {\n refNode = this.children_[index + 1].el_;\n } else if (isEl(this.children_[index + 1])) {\n refNode = this.children_[index + 1];\n }\n }\n this.contentEl().insertBefore(component.el(), refNode);\n }\n\n // Return so it can stored on parent object if desired.\n return component;\n }\n\n /**\n * Remove a child `Component` from this `Component`s list of children. Also removes\n * the child `Component`s element from this `Component`s element.\n *\n * @param {Component} component\n * The child `Component` to remove.\n */\n }, {\n key: \"removeChild\",\n value: function removeChild(component) {\n if (typeof component === 'string') {\n component = this.getChild(component);\n }\n if (!component || !this.children_) {\n return;\n }\n var childFound = false;\n for (var _i7 = this.children_.length - 1; _i7 >= 0; _i7--) {\n if (this.children_[_i7] === component) {\n childFound = true;\n this.children_.splice(_i7, 1);\n break;\n }\n }\n if (!childFound) {\n return;\n }\n component.parentComponent_ = null;\n this.childIndex_[component.id()] = null;\n this.childNameIndex_[toTitleCase$1(component.name())] = null;\n this.childNameIndex_[toLowerCase(component.name())] = null;\n var compEl = component.el();\n if (compEl && compEl.parentNode === this.contentEl()) {\n this.contentEl().removeChild(component.el());\n }\n }\n\n /**\n * Add and initialize default child `Component`s based upon options.\n */\n }, {\n key: \"initChildren\",\n value: function initChildren() {\n var _this7 = this;\n var children = this.options_.children;\n if (children) {\n // `this` is `parent`\n var parentOptions = this.options_;\n var handleAdd = function handleAdd(child) {\n var name = child.name;\n var opts = child.opts;\n\n // Allow options for children to be set at the parent options\n // e.g. videojs(id, { controlBar: false });\n // instead of videojs(id, { children: { controlBar: false });\n if (parentOptions[name] !== undefined) {\n opts = parentOptions[name];\n }\n\n // Allow for disabling default components\n // e.g. options['children']['posterImage'] = false\n if (opts === false) {\n return;\n }\n\n // Allow options to be passed as a simple boolean if no configuration\n // is necessary.\n if (opts === true) {\n opts = {};\n }\n\n // We also want to pass the original player options\n // to each component as well so they don't need to\n // reach back into the player for options later.\n opts.playerOptions = _this7.options_.playerOptions;\n\n // Create and add the child component.\n // Add a direct reference to the child by name on the parent instance.\n // If two of the same component are used, different names should be supplied\n // for each\n var newChild = _this7.addChild(name, opts);\n if (newChild) {\n _this7[name] = newChild;\n }\n };\n\n // Allow for an array of children details to passed in the options\n var workingChildren;\n var _Tech2 = Component$1.getComponent('Tech');\n if (Array.isArray(children)) {\n workingChildren = children;\n } else {\n workingChildren = Object.keys(children);\n }\n workingChildren\n // children that are in this.options_ but also in workingChildren would\n // give us extra children we do not want. So, we want to filter them out.\n .concat(Object.keys(this.options_).filter(function (child) {\n return !workingChildren.some(function (wchild) {\n if (typeof wchild === 'string') {\n return child === wchild;\n }\n return child === wchild.name;\n });\n })).map(function (child) {\n var name;\n var opts;\n if (typeof child === 'string') {\n name = child;\n opts = children[name] || _this7.options_[name] || {};\n } else {\n name = child.name;\n opts = child;\n }\n return {\n name: name,\n opts: opts\n };\n }).filter(function (child) {\n // we have to make sure that child.name isn't in the techOrder since\n // techs are registered as Components but can't aren't compatible\n // See https://github.com/videojs/video.js/issues/2772\n var c = Component$1.getComponent(child.opts.componentClass || toTitleCase$1(child.name));\n return c && !_Tech2.isTech(c);\n }).forEach(handleAdd);\n }\n }\n\n /**\n * Builds the default DOM class name. Should be overridden by sub-components.\n *\n * @return {string}\n * The DOM class name for this object.\n *\n * @abstract\n */\n }, {\n key: \"buildCSSClass\",\n value: function buildCSSClass() {\n // Child classes can include a function that does:\n // return 'CLASS NAME' + this._super();\n return '';\n }\n\n /**\n * Bind a listener to the component's ready state.\n * Different from event listeners in that if the ready event has already happened\n * it will trigger the function immediately.\n *\n * @param {ReadyCallback} fn\n * Function that gets called when the `Component` is ready.\n *\n * @return {Component}\n * Returns itself; method can be chained.\n */\n }, {\n key: \"ready\",\n value: function ready(fn) {\n var sync = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n if (!fn) {\n return;\n }\n if (!this.isReady_) {\n this.readyQueue_ = this.readyQueue_ || [];\n this.readyQueue_.push(fn);\n return;\n }\n if (sync) {\n fn.call(this);\n } else {\n // Call the function asynchronously by default for consistency\n this.setTimeout(fn, 1);\n }\n }\n\n /**\n * Trigger all the ready listeners for this `Component`.\n *\n * @fires Component#ready\n */\n }, {\n key: \"triggerReady\",\n value: function triggerReady() {\n this.isReady_ = true;\n\n // Ensure ready is triggered asynchronously\n this.setTimeout(function () {\n var readyQueue = this.readyQueue_;\n\n // Reset Ready Queue\n this.readyQueue_ = [];\n if (readyQueue && readyQueue.length > 0) {\n readyQueue.forEach(function (fn) {\n fn.call(this);\n }, this);\n }\n\n // Allow for using event listeners also\n /**\n * Triggered when a `Component` is ready.\n *\n * @event Component#ready\n * @type {Event}\n */\n this.trigger('ready');\n }, 1);\n }\n\n /**\n * Find a single DOM element matching a `selector`. This can be within the `Component`s\n * `contentEl()` or another custom context.\n *\n * @param {string} selector\n * A valid CSS selector, which will be passed to `querySelector`.\n *\n * @param {Element|string} [context=this.contentEl()]\n * A DOM element within which to query. Can also be a selector string in\n * which case the first matching element will get used as context. If\n * missing `this.contentEl()` gets used. If `this.contentEl()` returns\n * nothing it falls back to `document`.\n *\n * @return {Element|null}\n * the dom element that was found, or null\n *\n * @see [Information on CSS Selectors](https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Getting_Started/Selectors)\n */\n }, {\n key: \"$\",\n value: function $(selector, context) {\n return _$(selector, context || this.contentEl());\n }\n\n /**\n * Finds all DOM element matching a `selector`. This can be within the `Component`s\n * `contentEl()` or another custom context.\n *\n * @param {string} selector\n * A valid CSS selector, which will be passed to `querySelectorAll`.\n *\n * @param {Element|string} [context=this.contentEl()]\n * A DOM element within which to query. Can also be a selector string in\n * which case the first matching element will get used as context. If\n * missing `this.contentEl()` gets used. If `this.contentEl()` returns\n * nothing it falls back to `document`.\n *\n * @return {NodeList}\n * a list of dom elements that were found\n *\n * @see [Information on CSS Selectors](https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Getting_Started/Selectors)\n */\n }, {\n key: \"$$\",\n value: function $$(selector, context) {\n return _$$(selector, context || this.contentEl());\n }\n\n /**\n * Check if a component's element has a CSS class name.\n *\n * @param {string} classToCheck\n * CSS class name to check.\n *\n * @return {boolean}\n * - True if the `Component` has the class.\n * - False if the `Component` does not have the class`\n */\n }, {\n key: \"hasClass\",\n value: function hasClass(classToCheck) {\n return _hasClass(this.el_, classToCheck);\n }\n\n /**\n * Add a CSS class name to the `Component`s element.\n *\n * @param {...string} classesToAdd\n * One or more CSS class name to add.\n */\n }, {\n key: \"addClass\",\n value: function addClass() {\n for (var _len14 = arguments.length, classesToAdd = new Array(_len14), _key14 = 0; _key14 < _len14; _key14++) {\n classesToAdd[_key14] = arguments[_key14];\n }\n _addClass.apply(void 0, [this.el_].concat(classesToAdd));\n }\n\n /**\n * Remove a CSS class name from the `Component`s element.\n *\n * @param {...string} classesToRemove\n * One or more CSS class name to remove.\n */\n }, {\n key: \"removeClass\",\n value: function removeClass() {\n for (var _len15 = arguments.length, classesToRemove = new Array(_len15), _key15 = 0; _key15 < _len15; _key15++) {\n classesToRemove[_key15] = arguments[_key15];\n }\n _removeClass.apply(void 0, [this.el_].concat(classesToRemove));\n }\n\n /**\n * Add or remove a CSS class name from the component's element.\n * - `classToToggle` gets added when {@link Component#hasClass} would return false.\n * - `classToToggle` gets removed when {@link Component#hasClass} would return true.\n *\n * @param {string} classToToggle\n * The class to add or remove based on (@link Component#hasClass}\n *\n * @param {boolean|Dom~predicate} [predicate]\n * An {@link Dom~predicate} function or a boolean\n */\n }, {\n key: \"toggleClass\",\n value: function toggleClass(classToToggle, predicate) {\n _toggleClass(this.el_, classToToggle, predicate);\n }\n\n /**\n * Show the `Component`s element if it is hidden by removing the\n * 'vjs-hidden' class name from it.\n */\n }, {\n key: \"show\",\n value: function show() {\n this.removeClass('vjs-hidden');\n }\n\n /**\n * Hide the `Component`s element if it is currently showing by adding the\n * 'vjs-hidden` class name to it.\n */\n }, {\n key: \"hide\",\n value: function hide() {\n this.addClass('vjs-hidden');\n }\n\n /**\n * Lock a `Component`s element in its visible state by adding the 'vjs-lock-showing'\n * class name to it. Used during fadeIn/fadeOut.\n *\n * @private\n */\n }, {\n key: \"lockShowing\",\n value: function lockShowing() {\n this.addClass('vjs-lock-showing');\n }\n\n /**\n * Unlock a `Component`s element from its visible state by removing the 'vjs-lock-showing'\n * class name from it. Used during fadeIn/fadeOut.\n *\n * @private\n */\n }, {\n key: \"unlockShowing\",\n value: function unlockShowing() {\n this.removeClass('vjs-lock-showing');\n }\n\n /**\n * Get the value of an attribute on the `Component`s element.\n *\n * @param {string} attribute\n * Name of the attribute to get the value from.\n *\n * @return {string|null}\n * - The value of the attribute that was asked for.\n * - Can be an empty string on some browsers if the attribute does not exist\n * or has no value\n * - Most browsers will return null if the attribute does not exist or has\n * no value.\n *\n * @see [DOM API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Element/getAttribute}\n */\n }, {\n key: \"getAttribute\",\n value: function getAttribute(attribute) {\n return _getAttribute(this.el_, attribute);\n }\n\n /**\n * Set the value of an attribute on the `Component`'s element\n *\n * @param {string} attribute\n * Name of the attribute to set.\n *\n * @param {string} value\n * Value to set the attribute to.\n *\n * @see [DOM API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Element/setAttribute}\n */\n }, {\n key: \"setAttribute\",\n value: function setAttribute(attribute, value) {\n _setAttribute(this.el_, attribute, value);\n }\n\n /**\n * Remove an attribute from the `Component`s element.\n *\n * @param {string} attribute\n * Name of the attribute to remove.\n *\n * @see [DOM API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Element/removeAttribute}\n */\n }, {\n key: \"removeAttribute\",\n value: function removeAttribute(attribute) {\n _removeAttribute(this.el_, attribute);\n }\n\n /**\n * Get or set the width of the component based upon the CSS styles.\n * See {@link Component#dimension} for more detailed information.\n *\n * @param {number|string} [num]\n * The width that you want to set postfixed with '%', 'px' or nothing.\n *\n * @param {boolean} [skipListeners]\n * Skip the componentresize event trigger\n *\n * @return {number|undefined}\n * The width when getting, zero if there is no width\n */\n }, {\n key: \"width\",\n value: function width(num, skipListeners) {\n return this.dimension('width', num, skipListeners);\n }\n\n /**\n * Get or set the height of the component based upon the CSS styles.\n * See {@link Component#dimension} for more detailed information.\n *\n * @param {number|string} [num]\n * The height that you want to set postfixed with '%', 'px' or nothing.\n *\n * @param {boolean} [skipListeners]\n * Skip the componentresize event trigger\n *\n * @return {number|undefined}\n * The height when getting, zero if there is no height\n */\n }, {\n key: \"height\",\n value: function height(num, skipListeners) {\n return this.dimension('height', num, skipListeners);\n }\n\n /**\n * Set both the width and height of the `Component` element at the same time.\n *\n * @param {number|string} width\n * Width to set the `Component`s element to.\n *\n * @param {number|string} height\n * Height to set the `Component`s element to.\n */\n }, {\n key: \"dimensions\",\n value: function dimensions(width, height) {\n // Skip componentresize listeners on width for optimization\n this.width(width, true);\n this.height(height);\n }\n\n /**\n * Get or set width or height of the `Component` element. This is the shared code\n * for the {@link Component#width} and {@link Component#height}.\n *\n * Things to know:\n * - If the width or height in an number this will return the number postfixed with 'px'.\n * - If the width/height is a percent this will return the percent postfixed with '%'\n * - Hidden elements have a width of 0 with `window.getComputedStyle`. This function\n * defaults to the `Component`s `style.width` and falls back to `window.getComputedStyle`.\n * See [this]{@link http://www.foliotek.com/devblog/getting-the-width-of-a-hidden-element-with-jquery-using-width/}\n * for more information\n * - If you want the computed style of the component, use {@link Component#currentWidth}\n * and {@link {Component#currentHeight}\n *\n * @fires Component#componentresize\n *\n * @param {string} widthOrHeight\n 8 'width' or 'height'\n *\n * @param {number|string} [num]\n 8 New dimension\n *\n * @param {boolean} [skipListeners]\n * Skip componentresize event trigger\n *\n * @return {number|undefined}\n * The dimension when getting or 0 if unset\n */\n }, {\n key: \"dimension\",\n value: function dimension(widthOrHeight, num, skipListeners) {\n if (num !== undefined) {\n // Set to zero if null or literally NaN (NaN !== NaN)\n if (num === null || num !== num) {\n num = 0;\n }\n\n // Check if using css width/height (% or px) and adjust\n if (('' + num).indexOf('%') !== -1 || ('' + num).indexOf('px') !== -1) {\n this.el_.style[widthOrHeight] = num;\n } else if (num === 'auto') {\n this.el_.style[widthOrHeight] = '';\n } else {\n this.el_.style[widthOrHeight] = num + 'px';\n }\n\n // skipListeners allows us to avoid triggering the resize event when setting both width and height\n if (!skipListeners) {\n /**\n * Triggered when a component is resized.\n *\n * @event Component#componentresize\n * @type {Event}\n */\n this.trigger('componentresize');\n }\n return;\n }\n\n // Not setting a value, so getting it\n // Make sure element exists\n if (!this.el_) {\n return 0;\n }\n\n // Get dimension value from style\n var val = this.el_.style[widthOrHeight];\n var pxIndex = val.indexOf('px');\n if (pxIndex !== -1) {\n // Return the pixel value with no 'px'\n return parseInt(val.slice(0, pxIndex), 10);\n }\n\n // No px so using % or no style was set, so falling back to offsetWidth/height\n // If component has display:none, offset will return 0\n // TODO: handle display:none and no dimension style using px\n return parseInt(this.el_['offset' + toTitleCase$1(widthOrHeight)], 10);\n }\n\n /**\n * Get the computed width or the height of the component's element.\n *\n * Uses `window.getComputedStyle`.\n *\n * @param {string} widthOrHeight\n * A string containing 'width' or 'height'. Whichever one you want to get.\n *\n * @return {number}\n * The dimension that gets asked for or 0 if nothing was set\n * for that dimension.\n */\n }, {\n key: \"currentDimension\",\n value: function currentDimension(widthOrHeight) {\n var computedWidthOrHeight = 0;\n if (widthOrHeight !== 'width' && widthOrHeight !== 'height') {\n throw new Error('currentDimension only accepts width or height value');\n }\n computedWidthOrHeight = computedStyle(this.el_, widthOrHeight);\n\n // remove 'px' from variable and parse as integer\n computedWidthOrHeight = parseFloat(computedWidthOrHeight);\n\n // if the computed value is still 0, it's possible that the browser is lying\n // and we want to check the offset values.\n // This code also runs wherever getComputedStyle doesn't exist.\n if (computedWidthOrHeight === 0 || isNaN(computedWidthOrHeight)) {\n var rule = \"offset\".concat(toTitleCase$1(widthOrHeight));\n computedWidthOrHeight = this.el_[rule];\n }\n return computedWidthOrHeight;\n }\n\n /**\n * An object that contains width and height values of the `Component`s\n * computed style. Uses `window.getComputedStyle`.\n *\n * @typedef {Object} Component~DimensionObject\n *\n * @property {number} width\n * The width of the `Component`s computed style.\n *\n * @property {number} height\n * The height of the `Component`s computed style.\n */\n\n /**\n * Get an object that contains computed width and height values of the\n * component's element.\n *\n * Uses `window.getComputedStyle`.\n *\n * @return {Component~DimensionObject}\n * The computed dimensions of the component's element.\n */\n }, {\n key: \"currentDimensions\",\n value: function currentDimensions() {\n return {\n width: this.currentDimension('width'),\n height: this.currentDimension('height')\n };\n }\n\n /**\n * Get the computed width of the component's element.\n *\n * Uses `window.getComputedStyle`.\n *\n * @return {number}\n * The computed width of the component's element.\n */\n }, {\n key: \"currentWidth\",\n value: function currentWidth() {\n return this.currentDimension('width');\n }\n\n /**\n * Get the computed height of the component's element.\n *\n * Uses `window.getComputedStyle`.\n *\n * @return {number}\n * The computed height of the component's element.\n */\n }, {\n key: \"currentHeight\",\n value: function currentHeight() {\n return this.currentDimension('height');\n }\n\n /**\n * Set the focus to this component\n */\n }, {\n key: \"focus\",\n value: function focus() {\n this.el_.focus();\n }\n\n /**\n * Remove the focus from this component\n */\n }, {\n key: \"blur\",\n value: function blur() {\n this.el_.blur();\n }\n\n /**\n * When this Component receives a `keydown` event which it does not process,\n * it passes the event to the Player for handling.\n *\n * @param {KeyboardEvent} event\n * The `keydown` event that caused this function to be called.\n */\n }, {\n key: \"handleKeyDown\",\n value: function handleKeyDown(event) {\n if (this.player_) {\n // We only stop propagation here because we want unhandled events to fall\n // back to the browser. Exclude Tab for focus trapping.\n if (!keycode.isEventKey(event, 'Tab')) {\n event.stopPropagation();\n }\n this.player_.handleKeyDown(event);\n }\n }\n\n /**\n * Many components used to have a `handleKeyPress` method, which was poorly\n * named because it listened to a `keydown` event. This method name now\n * delegates to `handleKeyDown`. This means anyone calling `handleKeyPress`\n * will not see their method calls stop working.\n *\n * @param {KeyboardEvent} event\n * The event that caused this function to be called.\n */\n }, {\n key: \"handleKeyPress\",\n value: function handleKeyPress(event) {\n this.handleKeyDown(event);\n }\n\n /**\n * Emit a 'tap' events when touch event support gets detected. This gets used to\n * support toggling the controls through a tap on the video. They get enabled\n * because every sub-component would have extra overhead otherwise.\n *\n * @protected\n * @fires Component#tap\n * @listens Component#touchstart\n * @listens Component#touchmove\n * @listens Component#touchleave\n * @listens Component#touchcancel\n * @listens Component#touchend\n */\n }, {\n key: \"emitTapEvents\",\n value: function emitTapEvents() {\n // Track the start time so we can determine how long the touch lasted\n var touchStart = 0;\n var firstTouch = null;\n\n // Maximum movement allowed during a touch event to still be considered a tap\n // Other popular libs use anywhere from 2 (hammer.js) to 15,\n // so 10 seems like a nice, round number.\n var tapMovementThreshold = 10;\n\n // The maximum length a touch can be while still being considered a tap\n var touchTimeThreshold = 200;\n var couldBeTap;\n this.on('touchstart', function (event) {\n // If more than one finger, don't consider treating this as a click\n if (event.touches.length === 1) {\n // Copy pageX/pageY from the object\n firstTouch = {\n pageX: event.touches[0].pageX,\n pageY: event.touches[0].pageY\n };\n // Record start time so we can detect a tap vs. \"touch and hold\"\n touchStart = window$1.performance.now();\n // Reset couldBeTap tracking\n couldBeTap = true;\n }\n });\n this.on('touchmove', function (event) {\n // If more than one finger, don't consider treating this as a click\n if (event.touches.length > 1) {\n couldBeTap = false;\n } else if (firstTouch) {\n // Some devices will throw touchmoves for all but the slightest of taps.\n // So, if we moved only a small distance, this could still be a tap\n var xdiff = event.touches[0].pageX - firstTouch.pageX;\n var ydiff = event.touches[0].pageY - firstTouch.pageY;\n var touchDistance = Math.sqrt(xdiff * xdiff + ydiff * ydiff);\n if (touchDistance > tapMovementThreshold) {\n couldBeTap = false;\n }\n }\n });\n var noTap = function noTap() {\n couldBeTap = false;\n };\n\n // TODO: Listen to the original target. http://youtu.be/DujfpXOKUp8?t=13m8s\n this.on('touchleave', noTap);\n this.on('touchcancel', noTap);\n\n // When the touch ends, measure how long it took and trigger the appropriate\n // event\n this.on('touchend', function (event) {\n firstTouch = null;\n // Proceed only if the touchmove/leave/cancel event didn't happen\n if (couldBeTap === true) {\n // Measure how long the touch lasted\n var touchTime = window$1.performance.now() - touchStart;\n\n // Make sure the touch was less than the threshold to be considered a tap\n if (touchTime < touchTimeThreshold) {\n // Don't let browser turn this into a click\n event.preventDefault();\n /**\n * Triggered when a `Component` is tapped.\n *\n * @event Component#tap\n * @type {MouseEvent}\n */\n this.trigger('tap');\n // It may be good to copy the touchend event object and change the\n // type to tap, if the other event properties aren't exact after\n // Events.fixEvent runs (e.g. event.target)\n }\n }\n });\n }\n\n /**\n * This function reports user activity whenever touch events happen. This can get\n * turned off by any sub-components that wants touch events to act another way.\n *\n * Report user touch activity when touch events occur. User activity gets used to\n * determine when controls should show/hide. It is simple when it comes to mouse\n * events, because any mouse event should show the controls. So we capture mouse\n * events that bubble up to the player and report activity when that happens.\n * With touch events it isn't as easy as `touchstart` and `touchend` toggle player\n * controls. So touch events can't help us at the player level either.\n *\n * User activity gets checked asynchronously. So what could happen is a tap event\n * on the video turns the controls off. Then the `touchend` event bubbles up to\n * the player. Which, if it reported user activity, would turn the controls right\n * back on. We also don't want to completely block touch events from bubbling up.\n * Furthermore a `touchmove` event and anything other than a tap, should not turn\n * controls back on.\n *\n * @listens Component#touchstart\n * @listens Component#touchmove\n * @listens Component#touchend\n * @listens Component#touchcancel\n */\n }, {\n key: \"enableTouchActivity\",\n value: function enableTouchActivity() {\n // Don't continue if the root player doesn't support reporting user activity\n if (!this.player() || !this.player().reportUserActivity) {\n return;\n }\n\n // listener for reporting that the user is active\n var report = bind_(this.player(), this.player().reportUserActivity);\n var touchHolding;\n this.on('touchstart', function () {\n report();\n // For as long as the they are touching the device or have their mouse down,\n // we consider them active even if they're not moving their finger or mouse.\n // So we want to continue to update that they are active\n this.clearInterval(touchHolding);\n // report at the same interval as activityCheck\n touchHolding = this.setInterval(report, 250);\n });\n var touchEnd = function touchEnd(event) {\n report();\n // stop the interval that maintains activity if the touch is holding\n this.clearInterval(touchHolding);\n };\n this.on('touchmove', report);\n this.on('touchend', touchEnd);\n this.on('touchcancel', touchEnd);\n }\n\n /**\n * A callback that has no parameters and is bound into `Component`s context.\n *\n * @callback Component~GenericCallback\n * @this Component\n */\n\n /**\n * Creates a function that runs after an `x` millisecond timeout. This function is a\n * wrapper around `window.setTimeout`. There are a few reasons to use this one\n * instead though:\n * 1. It gets cleared via {@link Component#clearTimeout} when\n * {@link Component#dispose} gets called.\n * 2. The function callback will gets turned into a {@link Component~GenericCallback}\n *\n * > Note: You can't use `window.clearTimeout` on the id returned by this function. This\n * will cause its dispose listener not to get cleaned up! Please use\n * {@link Component#clearTimeout} or {@link Component#dispose} instead.\n *\n * @param {Component~GenericCallback} fn\n * The function that will be run after `timeout`.\n *\n * @param {number} timeout\n * Timeout in milliseconds to delay before executing the specified function.\n *\n * @return {number}\n * Returns a timeout ID that gets used to identify the timeout. It can also\n * get used in {@link Component#clearTimeout} to clear the timeout that\n * was set.\n *\n * @listens Component#dispose\n * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setTimeout}\n */\n }, {\n key: \"setTimeout\",\n value: function setTimeout(fn, timeout) {\n var _this8 = this;\n // declare as variables so they are properly available in timeout function\n // eslint-disable-next-line\n var timeoutId;\n fn = bind_(this, fn);\n this.clearTimersOnDispose_();\n timeoutId = window$1.setTimeout(function () {\n if (_this8.setTimeoutIds_.has(timeoutId)) {\n _this8.setTimeoutIds_[\"delete\"](timeoutId);\n }\n fn();\n }, timeout);\n this.setTimeoutIds_.add(timeoutId);\n return timeoutId;\n }\n\n /**\n * Clears a timeout that gets created via `window.setTimeout` or\n * {@link Component#setTimeout}. If you set a timeout via {@link Component#setTimeout}\n * use this function instead of `window.clearTimout`. If you don't your dispose\n * listener will not get cleaned up until {@link Component#dispose}!\n *\n * @param {number} timeoutId\n * The id of the timeout to clear. The return value of\n * {@link Component#setTimeout} or `window.setTimeout`.\n *\n * @return {number}\n * Returns the timeout id that was cleared.\n *\n * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/clearTimeout}\n */\n }, {\n key: \"clearTimeout\",\n value: function clearTimeout(timeoutId) {\n if (this.setTimeoutIds_.has(timeoutId)) {\n this.setTimeoutIds_[\"delete\"](timeoutId);\n window$1.clearTimeout(timeoutId);\n }\n return timeoutId;\n }\n\n /**\n * Creates a function that gets run every `x` milliseconds. This function is a wrapper\n * around `window.setInterval`. There are a few reasons to use this one instead though.\n * 1. It gets cleared via {@link Component#clearInterval} when\n * {@link Component#dispose} gets called.\n * 2. The function callback will be a {@link Component~GenericCallback}\n *\n * @param {Component~GenericCallback} fn\n * The function to run every `x` seconds.\n *\n * @param {number} interval\n * Execute the specified function every `x` milliseconds.\n *\n * @return {number}\n * Returns an id that can be used to identify the interval. It can also be be used in\n * {@link Component#clearInterval} to clear the interval.\n *\n * @listens Component#dispose\n * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setInterval}\n */\n }, {\n key: \"setInterval\",\n value: function setInterval(fn, interval) {\n fn = bind_(this, fn);\n this.clearTimersOnDispose_();\n var intervalId = window$1.setInterval(fn, interval);\n this.setIntervalIds_.add(intervalId);\n return intervalId;\n }\n\n /**\n * Clears an interval that gets created via `window.setInterval` or\n * {@link Component#setInterval}. If you set an interval via {@link Component#setInterval}\n * use this function instead of `window.clearInterval`. If you don't your dispose\n * listener will not get cleaned up until {@link Component#dispose}!\n *\n * @param {number} intervalId\n * The id of the interval to clear. The return value of\n * {@link Component#setInterval} or `window.setInterval`.\n *\n * @return {number}\n * Returns the interval id that was cleared.\n *\n * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/clearInterval}\n */\n }, {\n key: \"clearInterval\",\n value: function clearInterval(intervalId) {\n if (this.setIntervalIds_.has(intervalId)) {\n this.setIntervalIds_[\"delete\"](intervalId);\n window$1.clearInterval(intervalId);\n }\n return intervalId;\n }\n\n /**\n * Queues up a callback to be passed to requestAnimationFrame (rAF), but\n * with a few extra bonuses:\n *\n * - Supports browsers that do not support rAF by falling back to\n * {@link Component#setTimeout}.\n *\n * - The callback is turned into a {@link Component~GenericCallback} (i.e.\n * bound to the component).\n *\n * - Automatic cancellation of the rAF callback is handled if the component\n * is disposed before it is called.\n *\n * @param {Component~GenericCallback} fn\n * A function that will be bound to this component and executed just\n * before the browser's next repaint.\n *\n * @return {number}\n * Returns an rAF ID that gets used to identify the timeout. It can\n * also be used in {@link Component#cancelAnimationFrame} to cancel\n * the animation frame callback.\n *\n * @listens Component#dispose\n * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame}\n */\n }, {\n key: \"requestAnimationFrame\",\n value: function requestAnimationFrame(fn) {\n var _this9 = this;\n this.clearTimersOnDispose_();\n\n // declare as variables so they are properly available in rAF function\n // eslint-disable-next-line\n var id;\n fn = bind_(this, fn);\n id = window$1.requestAnimationFrame(function () {\n if (_this9.rafIds_.has(id)) {\n _this9.rafIds_[\"delete\"](id);\n }\n fn();\n });\n this.rafIds_.add(id);\n return id;\n }\n\n /**\n * Request an animation frame, but only one named animation\n * frame will be queued. Another will never be added until\n * the previous one finishes.\n *\n * @param {string} name\n * The name to give this requestAnimationFrame\n *\n * @param {Component~GenericCallback} fn\n * A function that will be bound to this component and executed just\n * before the browser's next repaint.\n */\n }, {\n key: \"requestNamedAnimationFrame\",\n value: function requestNamedAnimationFrame(name, fn) {\n var _this10 = this;\n if (this.namedRafs_.has(name)) {\n return;\n }\n this.clearTimersOnDispose_();\n fn = bind_(this, fn);\n var id = this.requestAnimationFrame(function () {\n fn();\n if (_this10.namedRafs_.has(name)) {\n _this10.namedRafs_[\"delete\"](name);\n }\n });\n this.namedRafs_.set(name, id);\n return name;\n }\n\n /**\n * Cancels a current named animation frame if it exists.\n *\n * @param {string} name\n * The name of the requestAnimationFrame to cancel.\n */\n }, {\n key: \"cancelNamedAnimationFrame\",\n value: function cancelNamedAnimationFrame(name) {\n if (!this.namedRafs_.has(name)) {\n return;\n }\n this.cancelAnimationFrame(this.namedRafs_.get(name));\n this.namedRafs_[\"delete\"](name);\n }\n\n /**\n * Cancels a queued callback passed to {@link Component#requestAnimationFrame}\n * (rAF).\n *\n * If you queue an rAF callback via {@link Component#requestAnimationFrame},\n * use this function instead of `window.cancelAnimationFrame`. If you don't,\n * your dispose listener will not get cleaned up until {@link Component#dispose}!\n *\n * @param {number} id\n * The rAF ID to clear. The return value of {@link Component#requestAnimationFrame}.\n *\n * @return {number}\n * Returns the rAF ID that was cleared.\n *\n * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/window/cancelAnimationFrame}\n */\n }, {\n key: \"cancelAnimationFrame\",\n value: function cancelAnimationFrame(id) {\n if (this.rafIds_.has(id)) {\n this.rafIds_[\"delete\"](id);\n window$1.cancelAnimationFrame(id);\n }\n return id;\n }\n\n /**\n * A function to setup `requestAnimationFrame`, `setTimeout`,\n * and `setInterval`, clearing on dispose.\n *\n * > Previously each timer added and removed dispose listeners on it's own.\n * For better performance it was decided to batch them all, and use `Set`s\n * to track outstanding timer ids.\n *\n * @private\n */\n }, {\n key: \"clearTimersOnDispose_\",\n value: function clearTimersOnDispose_() {\n var _this11 = this;\n if (this.clearingTimersOnDispose_) {\n return;\n }\n this.clearingTimersOnDispose_ = true;\n this.one('dispose', function () {\n [['namedRafs_', 'cancelNamedAnimationFrame'], ['rafIds_', 'cancelAnimationFrame'], ['setTimeoutIds_', 'clearTimeout'], ['setIntervalIds_', 'clearInterval']].forEach(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n idName = _ref2[0],\n cancelName = _ref2[1];\n // for a `Set` key will actually be the value again\n // so forEach((val, val) =>` but for maps we want to use\n // the key.\n _this11[idName].forEach(function (val, key) {\n return _this11[cancelName](key);\n });\n });\n _this11.clearingTimersOnDispose_ = false;\n });\n }\n\n /**\n * Register a `Component` with `videojs` given the name and the component.\n *\n * > NOTE: {@link Tech}s should not be registered as a `Component`. {@link Tech}s\n * should be registered using {@link Tech.registerTech} or\n * {@link videojs:videojs.registerTech}.\n *\n * > NOTE: This function can also be seen on videojs as\n * {@link videojs:videojs.registerComponent}.\n *\n * @param {string} name\n * The name of the `Component` to register.\n *\n * @param {Component} ComponentToRegister\n * The `Component` class to register.\n *\n * @return {Component}\n * The `Component` that was registered.\n */\n }], [{\n key: \"registerComponent\",\n value: function registerComponent(name, ComponentToRegister) {\n if (typeof name !== 'string' || !name) {\n throw new Error(\"Illegal component name, \\\"\".concat(name, \"\\\"; must be a non-empty string.\"));\n }\n var Tech = Component$1.getComponent('Tech');\n\n // We need to make sure this check is only done if Tech has been registered.\n var isTech = Tech && Tech.isTech(ComponentToRegister);\n var isComp = Component$1 === ComponentToRegister || Component$1.prototype.isPrototypeOf(ComponentToRegister.prototype);\n if (isTech || !isComp) {\n var reason;\n if (isTech) {\n reason = 'techs must be registered using Tech.registerTech()';\n } else {\n reason = 'must be a Component subclass';\n }\n throw new Error(\"Illegal component, \\\"\".concat(name, \"\\\"; \").concat(reason, \".\"));\n }\n name = toTitleCase$1(name);\n if (!Component$1.components_) {\n Component$1.components_ = {};\n }\n var Player = Component$1.getComponent('Player');\n if (name === 'Player' && Player && Player.players) {\n var players = Player.players;\n var playerNames = Object.keys(players);\n\n // If we have players that were disposed, then their name will still be\n // in Players.players. So, we must loop through and verify that the value\n // for each item is not null. This allows registration of the Player component\n // after all players have been disposed or before any were created.\n if (players && playerNames.length > 0 && playerNames.map(function (pname) {\n return players[pname];\n }).every(Boolean)) {\n throw new Error('Can not register Player component after player has been created.');\n }\n }\n Component$1.components_[name] = ComponentToRegister;\n Component$1.components_[toLowerCase(name)] = ComponentToRegister;\n return ComponentToRegister;\n }\n\n /**\n * Get a `Component` based on the name it was registered with.\n *\n * @param {string} name\n * The Name of the component to get.\n *\n * @return {Component}\n * The `Component` that got registered under the given name.\n */\n }, {\n key: \"getComponent\",\n value: function getComponent(name) {\n if (!name || !Component$1.components_) {\n return;\n }\n return Component$1.components_[name];\n }\n }]);\n return Component$1;\n}();\nComponent$1.registerComponent('Component', Component$1);\n\n/**\n * @file time.js\n * @module time\n */\n\n/**\n * Returns the time for the specified index at the start or end\n * of a TimeRange object.\n *\n * @typedef {Function} TimeRangeIndex\n *\n * @param {number} [index=0]\n * The range number to return the time for.\n *\n * @return {number}\n * The time offset at the specified index.\n *\n * @deprecated The index argument must be provided.\n * In the future, leaving it out will throw an error.\n */\n\n/**\n * An object that contains ranges of time, which mimics {@link TimeRanges}.\n *\n * @typedef {Object} TimeRange\n *\n * @property {number} length\n * The number of time ranges represented by this object.\n *\n * @property {module:time~TimeRangeIndex} start\n * Returns the time offset at which a specified time range begins.\n *\n * @property {module:time~TimeRangeIndex} end\n * Returns the time offset at which a specified time range ends.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/TimeRanges\n */\n\n/**\n * Check if any of the time ranges are over the maximum index.\n *\n * @private\n * @param {string} fnName\n * The function name to use for logging\n *\n * @param {number} index\n * The index to check\n *\n * @param {number} maxIndex\n * The maximum possible index\n *\n * @throws {Error} if the timeRanges provided are over the maxIndex\n */\nfunction rangeCheck(fnName, index, maxIndex) {\n if (typeof index !== 'number' || index < 0 || index > maxIndex) {\n throw new Error(\"Failed to execute '\".concat(fnName, \"' on 'TimeRanges': The index provided (\").concat(index, \") is non-numeric or out of bounds (0-\").concat(maxIndex, \").\"));\n }\n}\n\n/**\n * Get the time for the specified index at the start or end\n * of a TimeRange object.\n *\n * @private\n * @param {string} fnName\n * The function name to use for logging\n *\n * @param {string} valueIndex\n * The property that should be used to get the time. should be\n * 'start' or 'end'\n *\n * @param {Array} ranges\n * An array of time ranges\n *\n * @param {Array} [rangeIndex=0]\n * The index to start the search at\n *\n * @return {number}\n * The time that offset at the specified index.\n *\n * @deprecated rangeIndex must be set to a value, in the future this will throw an error.\n * @throws {Error} if rangeIndex is more than the length of ranges\n */\nfunction getRange(fnName, valueIndex, ranges, rangeIndex) {\n rangeCheck(fnName, rangeIndex, ranges.length - 1);\n return ranges[rangeIndex][valueIndex];\n}\n\n/**\n * Create a time range object given ranges of time.\n *\n * @private\n * @param {Array} [ranges]\n * An array of time ranges.\n *\n * @return {TimeRange}\n */\nfunction createTimeRangesObj(ranges) {\n var timeRangesObj;\n if (ranges === undefined || ranges.length === 0) {\n timeRangesObj = {\n length: 0,\n start: function start() {\n throw new Error('This TimeRanges object is empty');\n },\n end: function end() {\n throw new Error('This TimeRanges object is empty');\n }\n };\n } else {\n timeRangesObj = {\n length: ranges.length,\n start: getRange.bind(null, 'start', 0, ranges),\n end: getRange.bind(null, 'end', 1, ranges)\n };\n }\n if (window$1.Symbol && window$1.Symbol.iterator) {\n timeRangesObj[window$1.Symbol.iterator] = function () {\n return (ranges || []).values();\n };\n }\n return timeRangesObj;\n}\n\n/**\n * Create a `TimeRange` object which mimics an\n * {@link https://developer.mozilla.org/en-US/docs/Web/API/TimeRanges|HTML5 TimeRanges instance}.\n *\n * @param {number|Array[]} start\n * The start of a single range (a number) or an array of ranges (an\n * array of arrays of two numbers each).\n *\n * @param {number} end\n * The end of a single range. Cannot be used with the array form of\n * the `start` argument.\n *\n * @return {TimeRange}\n */\nfunction createTimeRanges$1(start, end) {\n if (Array.isArray(start)) {\n return createTimeRangesObj(start);\n } else if (start === undefined || end === undefined) {\n return createTimeRangesObj();\n }\n return createTimeRangesObj([[start, end]]);\n}\n\n/**\n * Format seconds as a time string, H:MM:SS or M:SS. Supplying a guide (in\n * seconds) will force a number of leading zeros to cover the length of the\n * guide.\n *\n * @private\n * @param {number} seconds\n * Number of seconds to be turned into a string\n *\n * @param {number} guide\n * Number (in seconds) to model the string after\n *\n * @return {string}\n * Time formatted as H:MM:SS or M:SS\n */\nvar defaultImplementation = function defaultImplementation(seconds, guide) {\n seconds = seconds < 0 ? 0 : seconds;\n var s = Math.floor(seconds % 60);\n var m = Math.floor(seconds / 60 % 60);\n var h = Math.floor(seconds / 3600);\n var gm = Math.floor(guide / 60 % 60);\n var gh = Math.floor(guide / 3600);\n\n // handle invalid times\n if (isNaN(seconds) || seconds === Infinity) {\n // '-' is false for all relational operators (e.g. <, >=) so this setting\n // will add the minimum number of fields specified by the guide\n h = m = s = '-';\n }\n\n // Check if we need to show hours\n h = h > 0 || gh > 0 ? h + ':' : '';\n\n // If hours are showing, we may need to add a leading zero.\n // Always show at least one digit of minutes.\n m = ((h || gm >= 10) && m < 10 ? '0' + m : m) + ':';\n\n // Check if leading zero is need for seconds\n s = s < 10 ? '0' + s : s;\n return h + m + s;\n};\n\n// Internal pointer to the current implementation.\nvar implementation = defaultImplementation;\n\n/**\n * Replaces the default formatTime implementation with a custom implementation.\n *\n * @param {Function} customImplementation\n * A function which will be used in place of the default formatTime\n * implementation. Will receive the current time in seconds and the\n * guide (in seconds) as arguments.\n */\nfunction setFormatTime(customImplementation) {\n implementation = customImplementation;\n}\n\n/**\n * Resets formatTime to the default implementation.\n */\nfunction resetFormatTime() {\n implementation = defaultImplementation;\n}\n\n/**\n * Delegates to either the default time formatting function or a custom\n * function supplied via `setFormatTime`.\n *\n * Formats seconds as a time string (H:MM:SS or M:SS). Supplying a\n * guide (in seconds) will force a number of leading zeros to cover the\n * length of the guide.\n *\n * @example formatTime(125, 600) === \"02:05\"\n * @param {number} seconds\n * Number of seconds to be turned into a string\n *\n * @param {number} guide\n * Number (in seconds) to model the string after\n *\n * @return {string}\n * Time formatted as H:MM:SS or M:SS\n */\nfunction formatTime(seconds) {\n var guide = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : seconds;\n return implementation(seconds, guide);\n}\nvar Time = /*#__PURE__*/Object.freeze({\n __proto__: null,\n createTimeRanges: createTimeRanges$1,\n createTimeRange: createTimeRanges$1,\n setFormatTime: setFormatTime,\n resetFormatTime: resetFormatTime,\n formatTime: formatTime\n});\n\n/**\n * @file buffer.js\n * @module buffer\n */\n\n/**\n * Compute the percentage of the media that has been buffered.\n *\n * @param { import('./time').TimeRange } buffered\n * The current `TimeRanges` object representing buffered time ranges\n *\n * @param {number} duration\n * Total duration of the media\n *\n * @return {number}\n * Percent buffered of the total duration in decimal form.\n */\nfunction _bufferedPercent(buffered, duration) {\n var bufferedDuration = 0;\n var start;\n var end;\n if (!duration) {\n return 0;\n }\n if (!buffered || !buffered.length) {\n buffered = createTimeRanges$1(0, 0);\n }\n for (var _i8 = 0; _i8 < buffered.length; _i8++) {\n start = buffered.start(_i8);\n end = buffered.end(_i8);\n\n // buffered end can be bigger than duration by a very small fraction\n if (end > duration) {\n end = duration;\n }\n bufferedDuration += end - start;\n }\n return bufferedDuration / duration;\n}\n\n/**\n * @file media-error.js\n */\n\n/**\n * A Custom `MediaError` class which mimics the standard HTML5 `MediaError` class.\n *\n * @param {number|string|Object|MediaError} value\n * This can be of multiple types:\n * - number: should be a standard error code\n * - string: an error message (the code will be 0)\n * - Object: arbitrary properties\n * - `MediaError` (native): used to populate a video.js `MediaError` object\n * - `MediaError` (video.js): will return itself if it's already a\n * video.js `MediaError` object.\n *\n * @see [MediaError Spec]{@link https://dev.w3.org/html5/spec-author-view/video.html#mediaerror}\n * @see [Encrypted MediaError Spec]{@link https://www.w3.org/TR/2013/WD-encrypted-media-20130510/#error-codes}\n *\n * @class MediaError\n */\nfunction MediaError(value) {\n // Allow redundant calls to this constructor to avoid having `instanceof`\n // checks peppered around the code.\n if (value instanceof MediaError) {\n return value;\n }\n if (typeof value === 'number') {\n this.code = value;\n } else if (typeof value === 'string') {\n // default code is zero, so this is a custom error\n this.message = value;\n } else if (isObject(value)) {\n // We assign the `code` property manually because native `MediaError` objects\n // do not expose it as an own/enumerable property of the object.\n if (typeof value.code === 'number') {\n this.code = value.code;\n }\n Object.assign(this, value);\n }\n if (!this.message) {\n this.message = MediaError.defaultMessages[this.code] || '';\n }\n}\n\n/**\n * The error code that refers two one of the defined `MediaError` types\n *\n * @type {Number}\n */\nMediaError.prototype.code = 0;\n\n/**\n * An optional message that to show with the error. Message is not part of the HTML5\n * video spec but allows for more informative custom errors.\n *\n * @type {String}\n */\nMediaError.prototype.message = '';\n\n/**\n * An optional status code that can be set by plugins to allow even more detail about\n * the error. For example a plugin might provide a specific HTTP status code and an\n * error message for that code. Then when the plugin gets that error this class will\n * know how to display an error message for it. This allows a custom message to show\n * up on the `Player` error overlay.\n *\n * @type {Array}\n */\nMediaError.prototype.status = null;\n\n/**\n * Errors indexed by the W3C standard. The order **CANNOT CHANGE**! See the\n * specification listed under {@link MediaError} for more information.\n *\n * @enum {array}\n * @readonly\n * @property {string} 0 - MEDIA_ERR_CUSTOM\n * @property {string} 1 - MEDIA_ERR_ABORTED\n * @property {string} 2 - MEDIA_ERR_NETWORK\n * @property {string} 3 - MEDIA_ERR_DECODE\n * @property {string} 4 - MEDIA_ERR_SRC_NOT_SUPPORTED\n * @property {string} 5 - MEDIA_ERR_ENCRYPTED\n */\nMediaError.errorTypes = ['MEDIA_ERR_CUSTOM', 'MEDIA_ERR_ABORTED', 'MEDIA_ERR_NETWORK', 'MEDIA_ERR_DECODE', 'MEDIA_ERR_SRC_NOT_SUPPORTED', 'MEDIA_ERR_ENCRYPTED'];\n\n/**\n * The default `MediaError` messages based on the {@link MediaError.errorTypes}.\n *\n * @type {Array}\n * @constant\n */\nMediaError.defaultMessages = {\n 1: 'You aborted the media playback',\n 2: 'A network error caused the media download to fail part-way.',\n 3: 'The media playback was aborted due to a corruption problem or because the media used features your browser did not support.',\n 4: 'The media could not be loaded, either because the server or network failed or because the format is not supported.',\n 5: 'The media is encrypted and we do not have the keys to decrypt it.'\n};\n\n// Add types as properties on MediaError\n// e.g. MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED = 4;\nfor (var errNum = 0; errNum < MediaError.errorTypes.length; errNum++) {\n MediaError[MediaError.errorTypes[errNum]] = errNum;\n // values should be accessible on both the class and instance\n MediaError.prototype[MediaError.errorTypes[errNum]] = errNum;\n}\n\n/**\n * Returns whether an object is `Promise`-like (i.e. has a `then` method).\n *\n * @param {Object} value\n * An object that may or may not be `Promise`-like.\n *\n * @return {boolean}\n * Whether or not the object is `Promise`-like.\n */\nfunction isPromise(value) {\n return value !== undefined && value !== null && typeof value.then === 'function';\n}\n\n/**\n * Silence a Promise-like object.\n *\n * This is useful for avoiding non-harmful, but potentially confusing \"uncaught\n * play promise\" rejection error messages.\n *\n * @param {Object} value\n * An object that may or may not be `Promise`-like.\n */\nfunction silencePromise(value) {\n if (isPromise(value)) {\n value.then(null, function (e) {});\n }\n}\n\n/**\n * @file text-track-list-converter.js Utilities for capturing text track state and\n * re-creating tracks based on a capture.\n *\n * @module text-track-list-converter\n */\n\n/**\n * Examine a single {@link TextTrack} and return a JSON-compatible javascript object that\n * represents the {@link TextTrack}'s state.\n *\n * @param {TextTrack} track\n * The text track to query.\n *\n * @return {Object}\n * A serializable javascript representation of the TextTrack.\n * @private\n */\nvar trackToJson_ = function trackToJson_(track) {\n var ret = ['kind', 'label', 'language', 'id', 'inBandMetadataTrackDispatchType', 'mode', 'src'].reduce(function (acc, prop, i) {\n if (track[prop]) {\n acc[prop] = track[prop];\n }\n return acc;\n }, {\n cues: track.cues && Array.prototype.map.call(track.cues, function (cue) {\n return {\n startTime: cue.startTime,\n endTime: cue.endTime,\n text: cue.text,\n id: cue.id\n };\n })\n });\n return ret;\n};\n\n/**\n * Examine a {@link Tech} and return a JSON-compatible javascript array that represents the\n * state of all {@link TextTrack}s currently configured. The return array is compatible with\n * {@link text-track-list-converter:jsonToTextTracks}.\n *\n * @param { import('../tech/tech').default } tech\n * The tech object to query\n *\n * @return {Array}\n * A serializable javascript representation of the {@link Tech}s\n * {@link TextTrackList}.\n */\nvar textTracksToJson = function textTracksToJson(tech) {\n var trackEls = tech.$$('track');\n var trackObjs = Array.prototype.map.call(trackEls, function (t) {\n return t.track;\n });\n var tracks = Array.prototype.map.call(trackEls, function (trackEl) {\n var json = trackToJson_(trackEl.track);\n if (trackEl.src) {\n json.src = trackEl.src;\n }\n return json;\n });\n return tracks.concat(Array.prototype.filter.call(tech.textTracks(), function (track) {\n return trackObjs.indexOf(track) === -1;\n }).map(trackToJson_));\n};\n\n/**\n * Create a set of remote {@link TextTrack}s on a {@link Tech} based on an array of javascript\n * object {@link TextTrack} representations.\n *\n * @param {Array} json\n * An array of `TextTrack` representation objects, like those that would be\n * produced by `textTracksToJson`.\n *\n * @param {Tech} tech\n * The `Tech` to create the `TextTrack`s on.\n */\nvar jsonToTextTracks = function jsonToTextTracks(json, tech) {\n json.forEach(function (track) {\n var addedTrack = tech.addRemoteTextTrack(track).track;\n if (!track.src && track.cues) {\n track.cues.forEach(function (cue) {\n return addedTrack.addCue(cue);\n });\n }\n });\n return tech.textTracks();\n};\nvar textTrackConverter = {\n textTracksToJson: textTracksToJson,\n jsonToTextTracks: jsonToTextTracks,\n trackToJson_: trackToJson_\n};\n\n/**\n * @file modal-dialog.js\n */\nvar MODAL_CLASS_NAME = 'vjs-modal-dialog';\n\n/**\n * The `ModalDialog` displays over the video and its controls, which blocks\n * interaction with the player until it is closed.\n *\n * Modal dialogs include a \"Close\" button and will close when that button\n * is activated - or when ESC is pressed anywhere.\n *\n * @extends Component\n */\nvar ModalDialog = /*#__PURE__*/function (_Component$) {\n _inherits(ModalDialog, _Component$);\n var _super = _createSuper(ModalDialog);\n /**\n * Create an instance of this class.\n *\n * @param { import('./player').default } player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n *\n * @param { import('./utils/dom').ContentDescriptor} [options.content=undefined]\n * Provide customized content for this modal.\n *\n * @param {string} [options.description]\n * A text description for the modal, primarily for accessibility.\n *\n * @param {boolean} [options.fillAlways=false]\n * Normally, modals are automatically filled only the first time\n * they open. This tells the modal to refresh its content\n * every time it opens.\n *\n * @param {string} [options.label]\n * A text label for the modal, primarily for accessibility.\n *\n * @param {boolean} [options.pauseOnOpen=true]\n * If `true`, playback will will be paused if playing when\n * the modal opens, and resumed when it closes.\n *\n * @param {boolean} [options.temporary=true]\n * If `true`, the modal can only be opened once; it will be\n * disposed as soon as it's closed.\n *\n * @param {boolean} [options.uncloseable=false]\n * If `true`, the user will not be able to close the modal\n * through the UI in the normal ways. Programmatic closing is\n * still possible.\n */\n function ModalDialog(player, options) {\n var _this12;\n _classCallCheck(this, ModalDialog);\n _this12 = _super.call(this, player, options);\n _this12.handleKeyDown_ = function (e) {\n return _this12.handleKeyDown(e);\n };\n _this12.close_ = function (e) {\n return _this12.close(e);\n };\n _this12.opened_ = _this12.hasBeenOpened_ = _this12.hasBeenFilled_ = false;\n _this12.closeable(!_this12.options_.uncloseable);\n _this12.content(_this12.options_.content);\n\n // Make sure the contentEl is defined AFTER any children are initialized\n // because we only want the contents of the modal in the contentEl\n // (not the UI elements like the close button).\n _this12.contentEl_ = _createEl('div', {\n className: \"\".concat(MODAL_CLASS_NAME, \"-content\")\n }, {\n role: 'document'\n });\n _this12.descEl_ = _createEl('p', {\n className: \"\".concat(MODAL_CLASS_NAME, \"-description vjs-control-text\"),\n id: _this12.el().getAttribute('aria-describedby')\n });\n textContent(_this12.descEl_, _this12.description());\n _this12.el_.appendChild(_this12.descEl_);\n _this12.el_.appendChild(_this12.contentEl_);\n return _this12;\n }\n\n /**\n * Create the `ModalDialog`'s DOM element\n *\n * @return {Element}\n * The DOM element that gets created.\n */\n _createClass(ModalDialog, [{\n key: \"createEl\",\n value: function createEl() {\n return _get(_getPrototypeOf(ModalDialog.prototype), \"createEl\", this).call(this, 'div', {\n className: this.buildCSSClass(),\n tabIndex: -1\n }, {\n 'aria-describedby': \"\".concat(this.id(), \"_description\"),\n 'aria-hidden': 'true',\n 'aria-label': this.label(),\n 'role': 'dialog'\n });\n }\n }, {\n key: \"dispose\",\n value: function dispose() {\n this.contentEl_ = null;\n this.descEl_ = null;\n this.previouslyActiveEl_ = null;\n _get(_getPrototypeOf(ModalDialog.prototype), \"dispose\", this).call(this);\n }\n\n /**\n * Builds the default DOM `className`.\n *\n * @return {string}\n * The DOM `className` for this object.\n */\n }, {\n key: \"buildCSSClass\",\n value: function buildCSSClass() {\n return \"\".concat(MODAL_CLASS_NAME, \" vjs-hidden \").concat(_get(_getPrototypeOf(ModalDialog.prototype), \"buildCSSClass\", this).call(this));\n }\n\n /**\n * Returns the label string for this modal. Primarily used for accessibility.\n *\n * @return {string}\n * the localized or raw label of this modal.\n */\n }, {\n key: \"label\",\n value: function label() {\n return this.localize(this.options_.label || 'Modal Window');\n }\n\n /**\n * Returns the description string for this modal. Primarily used for\n * accessibility.\n *\n * @return {string}\n * The localized or raw description of this modal.\n */\n }, {\n key: \"description\",\n value: function description() {\n var desc = this.options_.description || this.localize('This is a modal window.');\n\n // Append a universal closeability message if the modal is closeable.\n if (this.closeable()) {\n desc += ' ' + this.localize('This modal can be closed by pressing the Escape key or activating the close button.');\n }\n return desc;\n }\n\n /**\n * Opens the modal.\n *\n * @fires ModalDialog#beforemodalopen\n * @fires ModalDialog#modalopen\n */\n }, {\n key: \"open\",\n value: function open() {\n if (!this.opened_) {\n var player = this.player();\n\n /**\n * Fired just before a `ModalDialog` is opened.\n *\n * @event ModalDialog#beforemodalopen\n * @type {Event}\n */\n this.trigger('beforemodalopen');\n this.opened_ = true;\n\n // Fill content if the modal has never opened before and\n // never been filled.\n if (this.options_.fillAlways || !this.hasBeenOpened_ && !this.hasBeenFilled_) {\n this.fill();\n }\n\n // If the player was playing, pause it and take note of its previously\n // playing state.\n this.wasPlaying_ = !player.paused();\n if (this.options_.pauseOnOpen && this.wasPlaying_) {\n player.pause();\n }\n this.on('keydown', this.handleKeyDown_);\n\n // Hide controls and note if they were enabled.\n this.hadControls_ = player.controls();\n player.controls(false);\n this.show();\n this.conditionalFocus_();\n this.el().setAttribute('aria-hidden', 'false');\n\n /**\n * Fired just after a `ModalDialog` is opened.\n *\n * @event ModalDialog#modalopen\n * @type {Event}\n */\n this.trigger('modalopen');\n this.hasBeenOpened_ = true;\n }\n }\n\n /**\n * If the `ModalDialog` is currently open or closed.\n *\n * @param {boolean} [value]\n * If given, it will open (`true`) or close (`false`) the modal.\n *\n * @return {boolean}\n * the current open state of the modaldialog\n */\n }, {\n key: \"opened\",\n value: function opened(value) {\n if (typeof value === 'boolean') {\n this[value ? 'open' : 'close']();\n }\n return this.opened_;\n }\n\n /**\n * Closes the modal, does nothing if the `ModalDialog` is\n * not open.\n *\n * @fires ModalDialog#beforemodalclose\n * @fires ModalDialog#modalclose\n */\n }, {\n key: \"close\",\n value: function close() {\n if (!this.opened_) {\n return;\n }\n var player = this.player();\n\n /**\n * Fired just before a `ModalDialog` is closed.\n *\n * @event ModalDialog#beforemodalclose\n * @type {Event}\n */\n this.trigger('beforemodalclose');\n this.opened_ = false;\n if (this.wasPlaying_ && this.options_.pauseOnOpen) {\n player.play();\n }\n this.off('keydown', this.handleKeyDown_);\n if (this.hadControls_) {\n player.controls(true);\n }\n this.hide();\n this.el().setAttribute('aria-hidden', 'true');\n\n /**\n * Fired just after a `ModalDialog` is closed.\n *\n * @event ModalDialog#modalclose\n * @type {Event}\n */\n this.trigger('modalclose');\n this.conditionalBlur_();\n if (this.options_.temporary) {\n this.dispose();\n }\n }\n\n /**\n * Check to see if the `ModalDialog` is closeable via the UI.\n *\n * @param {boolean} [value]\n * If given as a boolean, it will set the `closeable` option.\n *\n * @return {boolean}\n * Returns the final value of the closable option.\n */\n }, {\n key: \"closeable\",\n value: function closeable(value) {\n if (typeof value === 'boolean') {\n var closeable = this.closeable_ = !!value;\n var close = this.getChild('closeButton');\n\n // If this is being made closeable and has no close button, add one.\n if (closeable && !close) {\n // The close button should be a child of the modal - not its\n // content element, so temporarily change the content element.\n var temp = this.contentEl_;\n this.contentEl_ = this.el_;\n close = this.addChild('closeButton', {\n controlText: 'Close Modal Dialog'\n });\n this.contentEl_ = temp;\n this.on(close, 'close', this.close_);\n }\n\n // If this is being made uncloseable and has a close button, remove it.\n if (!closeable && close) {\n this.off(close, 'close', this.close_);\n this.removeChild(close);\n close.dispose();\n }\n }\n return this.closeable_;\n }\n\n /**\n * Fill the modal's content element with the modal's \"content\" option.\n * The content element will be emptied before this change takes place.\n */\n }, {\n key: \"fill\",\n value: function fill() {\n this.fillWith(this.content());\n }\n\n /**\n * Fill the modal's content element with arbitrary content.\n * The content element will be emptied before this change takes place.\n *\n * @fires ModalDialog#beforemodalfill\n * @fires ModalDialog#modalfill\n *\n * @param { import('./utils/dom').ContentDescriptor} [content]\n * The same rules apply to this as apply to the `content` option.\n */\n }, {\n key: \"fillWith\",\n value: function fillWith(content) {\n var contentEl = this.contentEl();\n var parentEl = contentEl.parentNode;\n var nextSiblingEl = contentEl.nextSibling;\n\n /**\n * Fired just before a `ModalDialog` is filled with content.\n *\n * @event ModalDialog#beforemodalfill\n * @type {Event}\n */\n this.trigger('beforemodalfill');\n this.hasBeenFilled_ = true;\n\n // Detach the content element from the DOM before performing\n // manipulation to avoid modifying the live DOM multiple times.\n parentEl.removeChild(contentEl);\n this.empty();\n insertContent(contentEl, content);\n /**\n * Fired just after a `ModalDialog` is filled with content.\n *\n * @event ModalDialog#modalfill\n * @type {Event}\n */\n this.trigger('modalfill');\n\n // Re-inject the re-filled content element.\n if (nextSiblingEl) {\n parentEl.insertBefore(contentEl, nextSiblingEl);\n } else {\n parentEl.appendChild(contentEl);\n }\n\n // make sure that the close button is last in the dialog DOM\n var closeButton = this.getChild('closeButton');\n if (closeButton) {\n parentEl.appendChild(closeButton.el_);\n }\n }\n\n /**\n * Empties the content element. This happens anytime the modal is filled.\n *\n * @fires ModalDialog#beforemodalempty\n * @fires ModalDialog#modalempty\n */\n }, {\n key: \"empty\",\n value: function empty() {\n /**\n * Fired just before a `ModalDialog` is emptied.\n *\n * @event ModalDialog#beforemodalempty\n * @type {Event}\n */\n this.trigger('beforemodalempty');\n emptyEl(this.contentEl());\n\n /**\n * Fired just after a `ModalDialog` is emptied.\n *\n * @event ModalDialog#modalempty\n * @type {Event}\n */\n this.trigger('modalempty');\n }\n\n /**\n * Gets or sets the modal content, which gets normalized before being\n * rendered into the DOM.\n *\n * This does not update the DOM or fill the modal, but it is called during\n * that process.\n *\n * @param { import('./utils/dom').ContentDescriptor} [value]\n * If defined, sets the internal content value to be used on the\n * next call(s) to `fill`. This value is normalized before being\n * inserted. To \"clear\" the internal content value, pass `null`.\n *\n * @return { import('./utils/dom').ContentDescriptor}\n * The current content of the modal dialog\n */\n }, {\n key: \"content\",\n value: function content(value) {\n if (typeof value !== 'undefined') {\n this.content_ = value;\n }\n return this.content_;\n }\n\n /**\n * conditionally focus the modal dialog if focus was previously on the player.\n *\n * @private\n */\n }, {\n key: \"conditionalFocus_\",\n value: function conditionalFocus_() {\n var activeEl = document.activeElement;\n var playerEl = this.player_.el_;\n this.previouslyActiveEl_ = null;\n if (playerEl.contains(activeEl) || playerEl === activeEl) {\n this.previouslyActiveEl_ = activeEl;\n this.focus();\n }\n }\n\n /**\n * conditionally blur the element and refocus the last focused element\n *\n * @private\n */\n }, {\n key: \"conditionalBlur_\",\n value: function conditionalBlur_() {\n if (this.previouslyActiveEl_) {\n this.previouslyActiveEl_.focus();\n this.previouslyActiveEl_ = null;\n }\n }\n\n /**\n * Keydown handler. Attached when modal is focused.\n *\n * @listens keydown\n */\n }, {\n key: \"handleKeyDown\",\n value: function handleKeyDown(event) {\n // Do not allow keydowns to reach out of the modal dialog.\n event.stopPropagation();\n if (keycode.isEventKey(event, 'Escape') && this.closeable()) {\n event.preventDefault();\n this.close();\n return;\n }\n\n // exit early if it isn't a tab key\n if (!keycode.isEventKey(event, 'Tab')) {\n return;\n }\n var focusableEls = this.focusableEls_();\n var activeEl = this.el_.querySelector(':focus');\n var focusIndex;\n for (var _i9 = 0; _i9 < focusableEls.length; _i9++) {\n if (activeEl === focusableEls[_i9]) {\n focusIndex = _i9;\n break;\n }\n }\n if (document.activeElement === this.el_) {\n focusIndex = 0;\n }\n if (event.shiftKey && focusIndex === 0) {\n focusableEls[focusableEls.length - 1].focus();\n event.preventDefault();\n } else if (!event.shiftKey && focusIndex === focusableEls.length - 1) {\n focusableEls[0].focus();\n event.preventDefault();\n }\n }\n\n /**\n * get all focusable elements\n *\n * @private\n */\n }, {\n key: \"focusableEls_\",\n value: function focusableEls_() {\n var allChildren = this.el_.querySelectorAll('*');\n return Array.prototype.filter.call(allChildren, function (child) {\n return (child instanceof window$1.HTMLAnchorElement || child instanceof window$1.HTMLAreaElement) && child.hasAttribute('href') || (child instanceof window$1.HTMLInputElement || child instanceof window$1.HTMLSelectElement || child instanceof window$1.HTMLTextAreaElement || child instanceof window$1.HTMLButtonElement) && !child.hasAttribute('disabled') || child instanceof window$1.HTMLIFrameElement || child instanceof window$1.HTMLObjectElement || child instanceof window$1.HTMLEmbedElement || child.hasAttribute('tabindex') && child.getAttribute('tabindex') !== -1 || child.hasAttribute('contenteditable');\n });\n }\n }]);\n return ModalDialog;\n}(Component$1);\n/**\n * Default options for `ModalDialog` default options.\n *\n * @type {Object}\n * @private\n */\nModalDialog.prototype.options_ = {\n pauseOnOpen: true,\n temporary: true\n};\nComponent$1.registerComponent('ModalDialog', ModalDialog);\n\n/**\n * @file track-list.js\n */\n\n/**\n * Common functionaliy between {@link TextTrackList}, {@link AudioTrackList}, and\n * {@link VideoTrackList}\n *\n * @extends EventTarget\n */\nvar TrackList = /*#__PURE__*/function (_EventTarget$) {\n _inherits(TrackList, _EventTarget$);\n var _super2 = _createSuper(TrackList);\n /**\n * Create an instance of this class\n *\n * @param { import('./track').default[] } tracks\n * A list of tracks to initialize the list with.\n *\n * @abstract\n */\n function TrackList() {\n var _this13;\n var tracks = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n _classCallCheck(this, TrackList);\n _this13 = _super2.call(this);\n _this13.tracks_ = [];\n\n /**\n * @memberof TrackList\n * @member {number} length\n * The current number of `Track`s in the this Trackist.\n * @instance\n */\n Object.defineProperty(_assertThisInitialized(_this13), 'length', {\n get: function get() {\n return this.tracks_.length;\n }\n });\n for (var _i10 = 0; _i10 < tracks.length; _i10++) {\n _this13.addTrack(tracks[_i10]);\n }\n return _this13;\n }\n\n /**\n * Add a {@link Track} to the `TrackList`\n *\n * @param { import('./track').default } track\n * The audio, video, or text track to add to the list.\n *\n * @fires TrackList#addtrack\n */\n _createClass(TrackList, [{\n key: \"addTrack\",\n value: function addTrack(track) {\n var _this14 = this;\n var index = this.tracks_.length;\n if (!('' + index in this)) {\n Object.defineProperty(this, index, {\n get: function get() {\n return this.tracks_[index];\n }\n });\n }\n\n // Do not add duplicate tracks\n if (this.tracks_.indexOf(track) === -1) {\n this.tracks_.push(track);\n /**\n * Triggered when a track is added to a track list.\n *\n * @event TrackList#addtrack\n * @type {Event}\n * @property {Track} track\n * A reference to track that was added.\n */\n this.trigger({\n track: track,\n type: 'addtrack',\n target: this\n });\n }\n\n /**\n * Triggered when a track label is changed.\n *\n * @event TrackList#addtrack\n * @type {Event}\n * @property {Track} track\n * A reference to track that was added.\n */\n track.labelchange_ = function () {\n _this14.trigger({\n track: track,\n type: 'labelchange',\n target: _this14\n });\n };\n if (isEvented(track)) {\n track.addEventListener('labelchange', track.labelchange_);\n }\n }\n\n /**\n * Remove a {@link Track} from the `TrackList`\n *\n * @param { import('./track').default } rtrack\n * The audio, video, or text track to remove from the list.\n *\n * @fires TrackList#removetrack\n */\n }, {\n key: \"removeTrack\",\n value: function removeTrack(rtrack) {\n var track;\n for (var _i11 = 0, l = this.length; _i11 < l; _i11++) {\n if (this[_i11] === rtrack) {\n track = this[_i11];\n if (track.off) {\n track.off();\n }\n this.tracks_.splice(_i11, 1);\n break;\n }\n }\n if (!track) {\n return;\n }\n\n /**\n * Triggered when a track is removed from track list.\n *\n * @event TrackList#removetrack\n * @type {Event}\n * @property {Track} track\n * A reference to track that was removed.\n */\n this.trigger({\n track: track,\n type: 'removetrack',\n target: this\n });\n }\n\n /**\n * Get a Track from the TrackList by a tracks id\n *\n * @param {string} id - the id of the track to get\n * @method getTrackById\n * @return { import('./track').default }\n * @private\n */\n }, {\n key: \"getTrackById\",\n value: function getTrackById(id) {\n var result = null;\n for (var _i12 = 0, l = this.length; _i12 < l; _i12++) {\n var track = this[_i12];\n if (track.id === id) {\n result = track;\n break;\n }\n }\n return result;\n }\n }]);\n return TrackList;\n}(EventTarget$2);\n/**\n * Triggered when a different track is selected/enabled.\n *\n * @event TrackList#change\n * @type {Event}\n */\n/**\n * Events that can be called with on + eventName. See {@link EventHandler}.\n *\n * @property {Object} TrackList#allowedEvents_\n * @protected\n */\nTrackList.prototype.allowedEvents_ = {\n change: 'change',\n addtrack: 'addtrack',\n removetrack: 'removetrack',\n labelchange: 'labelchange'\n};\n\n// emulate attribute EventHandler support to allow for feature detection\nfor (var event in TrackList.prototype.allowedEvents_) {\n TrackList.prototype['on' + event] = null;\n}\n\n/**\n * @file audio-track-list.js\n */\n\n/**\n * Anywhere we call this function we diverge from the spec\n * as we only support one enabled audiotrack at a time\n *\n * @param {AudioTrackList} list\n * list to work on\n *\n * @param { import('./audio-track').default } track\n * The track to skip\n *\n * @private\n */\nvar disableOthers$1 = function disableOthers$1(list, track) {\n for (var _i13 = 0; _i13 < list.length; _i13++) {\n if (!Object.keys(list[_i13]).length || track.id === list[_i13].id) {\n continue;\n }\n // another audio track is enabled, disable it\n list[_i13].enabled = false;\n }\n};\n\n/**\n * The current list of {@link AudioTrack} for a media file.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#audiotracklist}\n * @extends TrackList\n */\nvar AudioTrackList = /*#__PURE__*/function (_TrackList) {\n _inherits(AudioTrackList, _TrackList);\n var _super3 = _createSuper(AudioTrackList);\n /**\n * Create an instance of this class.\n *\n * @param { import('./audio-track').default[] } [tracks=[]]\n * A list of `AudioTrack` to instantiate the list with.\n */\n function AudioTrackList() {\n var _this15;\n var tracks = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n _classCallCheck(this, AudioTrackList);\n // make sure only 1 track is enabled\n // sorted from last index to first index\n for (var _i14 = tracks.length - 1; _i14 >= 0; _i14--) {\n if (tracks[_i14].enabled) {\n disableOthers$1(tracks, tracks[_i14]);\n break;\n }\n }\n _this15 = _super3.call(this, tracks);\n _this15.changing_ = false;\n return _this15;\n }\n\n /**\n * Add an {@link AudioTrack} to the `AudioTrackList`.\n *\n * @param { import('./audio-track').default } track\n * The AudioTrack to add to the list\n *\n * @fires TrackList#addtrack\n */\n _createClass(AudioTrackList, [{\n key: \"addTrack\",\n value: function addTrack(track) {\n var _this16 = this;\n if (track.enabled) {\n disableOthers$1(this, track);\n }\n _get(_getPrototypeOf(AudioTrackList.prototype), \"addTrack\", this).call(this, track);\n // native tracks don't have this\n if (!track.addEventListener) {\n return;\n }\n track.enabledChange_ = function () {\n // when we are disabling other tracks (since we don't support\n // more than one track at a time) we will set changing_\n // to true so that we don't trigger additional change events\n if (_this16.changing_) {\n return;\n }\n _this16.changing_ = true;\n disableOthers$1(_this16, track);\n _this16.changing_ = false;\n _this16.trigger('change');\n };\n\n /**\n * @listens AudioTrack#enabledchange\n * @fires TrackList#change\n */\n track.addEventListener('enabledchange', track.enabledChange_);\n }\n }, {\n key: \"removeTrack\",\n value: function removeTrack(rtrack) {\n _get(_getPrototypeOf(AudioTrackList.prototype), \"removeTrack\", this).call(this, rtrack);\n if (rtrack.removeEventListener && rtrack.enabledChange_) {\n rtrack.removeEventListener('enabledchange', rtrack.enabledChange_);\n rtrack.enabledChange_ = null;\n }\n }\n }]);\n return AudioTrackList;\n}(TrackList);\n/**\n * @file video-track-list.js\n */\n/**\n * Un-select all other {@link VideoTrack}s that are selected.\n *\n * @param {VideoTrackList} list\n * list to work on\n *\n * @param { import('./video-track').default } track\n * The track to skip\n *\n * @private\n */\nvar disableOthers = function disableOthers(list, track) {\n for (var _i15 = 0; _i15 < list.length; _i15++) {\n if (!Object.keys(list[_i15]).length || track.id === list[_i15].id) {\n continue;\n }\n // another video track is enabled, disable it\n list[_i15].selected = false;\n }\n};\n\n/**\n * The current list of {@link VideoTrack} for a video.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#videotracklist}\n * @extends TrackList\n */\nvar VideoTrackList = /*#__PURE__*/function (_TrackList2) {\n _inherits(VideoTrackList, _TrackList2);\n var _super4 = _createSuper(VideoTrackList);\n /**\n * Create an instance of this class.\n *\n * @param {VideoTrack[]} [tracks=[]]\n * A list of `VideoTrack` to instantiate the list with.\n */\n function VideoTrackList() {\n var _this17;\n var tracks = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n _classCallCheck(this, VideoTrackList);\n // make sure only 1 track is enabled\n // sorted from last index to first index\n for (var _i16 = tracks.length - 1; _i16 >= 0; _i16--) {\n if (tracks[_i16].selected) {\n disableOthers(tracks, tracks[_i16]);\n break;\n }\n }\n _this17 = _super4.call(this, tracks);\n _this17.changing_ = false;\n\n /**\n * @member {number} VideoTrackList#selectedIndex\n * The current index of the selected {@link VideoTrack`}.\n */\n Object.defineProperty(_assertThisInitialized(_this17), 'selectedIndex', {\n get: function get() {\n for (var _i17 = 0; _i17 < this.length; _i17++) {\n if (this[_i17].selected) {\n return _i17;\n }\n }\n return -1;\n },\n set: function set() {}\n });\n return _this17;\n }\n\n /**\n * Add a {@link VideoTrack} to the `VideoTrackList`.\n *\n * @param { import('./video-track').default } track\n * The VideoTrack to add to the list\n *\n * @fires TrackList#addtrack\n */\n _createClass(VideoTrackList, [{\n key: \"addTrack\",\n value: function addTrack(track) {\n var _this18 = this;\n if (track.selected) {\n disableOthers(this, track);\n }\n _get(_getPrototypeOf(VideoTrackList.prototype), \"addTrack\", this).call(this, track);\n // native tracks don't have this\n if (!track.addEventListener) {\n return;\n }\n track.selectedChange_ = function () {\n if (_this18.changing_) {\n return;\n }\n _this18.changing_ = true;\n disableOthers(_this18, track);\n _this18.changing_ = false;\n _this18.trigger('change');\n };\n\n /**\n * @listens VideoTrack#selectedchange\n * @fires TrackList#change\n */\n track.addEventListener('selectedchange', track.selectedChange_);\n }\n }, {\n key: \"removeTrack\",\n value: function removeTrack(rtrack) {\n _get(_getPrototypeOf(VideoTrackList.prototype), \"removeTrack\", this).call(this, rtrack);\n if (rtrack.removeEventListener && rtrack.selectedChange_) {\n rtrack.removeEventListener('selectedchange', rtrack.selectedChange_);\n rtrack.selectedChange_ = null;\n }\n }\n }]);\n return VideoTrackList;\n}(TrackList);\n/**\n * @file text-track-list.js\n */\n/**\n * The current list of {@link TextTrack} for a media file.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#texttracklist}\n * @extends TrackList\n */\nvar TextTrackList = /*#__PURE__*/function (_TrackList3) {\n _inherits(TextTrackList, _TrackList3);\n var _super5 = _createSuper(TextTrackList);\n function TextTrackList() {\n _classCallCheck(this, TextTrackList);\n return _super5.apply(this, arguments);\n }\n _createClass(TextTrackList, [{\n key: \"addTrack\",\n value:\n /**\n * Add a {@link TextTrack} to the `TextTrackList`\n *\n * @param { import('./text-track').default } track\n * The text track to add to the list.\n *\n * @fires TrackList#addtrack\n */\n function addTrack(track) {\n var _this19 = this;\n _get(_getPrototypeOf(TextTrackList.prototype), \"addTrack\", this).call(this, track);\n if (!this.queueChange_) {\n this.queueChange_ = function () {\n return _this19.queueTrigger('change');\n };\n }\n if (!this.triggerSelectedlanguagechange) {\n this.triggerSelectedlanguagechange_ = function () {\n return _this19.trigger('selectedlanguagechange');\n };\n }\n\n /**\n * @listens TextTrack#modechange\n * @fires TrackList#change\n */\n track.addEventListener('modechange', this.queueChange_);\n var nonLanguageTextTrackKind = ['metadata', 'chapters'];\n if (nonLanguageTextTrackKind.indexOf(track.kind) === -1) {\n track.addEventListener('modechange', this.triggerSelectedlanguagechange_);\n }\n }\n }, {\n key: \"removeTrack\",\n value: function removeTrack(rtrack) {\n _get(_getPrototypeOf(TextTrackList.prototype), \"removeTrack\", this).call(this, rtrack);\n\n // manually remove the event handlers we added\n if (rtrack.removeEventListener) {\n if (this.queueChange_) {\n rtrack.removeEventListener('modechange', this.queueChange_);\n }\n if (this.selectedlanguagechange_) {\n rtrack.removeEventListener('modechange', this.triggerSelectedlanguagechange_);\n }\n }\n }\n }]);\n return TextTrackList;\n}(TrackList);\n/**\n * @file html-track-element-list.js\n */\n/**\n * The current list of {@link HtmlTrackElement}s.\n */\nvar HtmlTrackElementList = /*#__PURE__*/function () {\n /**\n * Create an instance of this class.\n *\n * @param {HtmlTrackElement[]} [tracks=[]]\n * A list of `HtmlTrackElement` to instantiate the list with.\n */\n function HtmlTrackElementList() {\n var trackElements = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n _classCallCheck(this, HtmlTrackElementList);\n this.trackElements_ = [];\n\n /**\n * @memberof HtmlTrackElementList\n * @member {number} length\n * The current number of `Track`s in the this Trackist.\n * @instance\n */\n Object.defineProperty(this, 'length', {\n get: function get() {\n return this.trackElements_.length;\n }\n });\n for (var _i18 = 0, length = trackElements.length; _i18 < length; _i18++) {\n this.addTrackElement_(trackElements[_i18]);\n }\n }\n\n /**\n * Add an {@link HtmlTrackElement} to the `HtmlTrackElementList`\n *\n * @param {HtmlTrackElement} trackElement\n * The track element to add to the list.\n *\n * @private\n */\n _createClass(HtmlTrackElementList, [{\n key: \"addTrackElement_\",\n value: function addTrackElement_(trackElement) {\n var index = this.trackElements_.length;\n if (!('' + index in this)) {\n Object.defineProperty(this, index, {\n get: function get() {\n return this.trackElements_[index];\n }\n });\n }\n\n // Do not add duplicate elements\n if (this.trackElements_.indexOf(trackElement) === -1) {\n this.trackElements_.push(trackElement);\n }\n }\n\n /**\n * Get an {@link HtmlTrackElement} from the `HtmlTrackElementList` given an\n * {@link TextTrack}.\n *\n * @param {TextTrack} track\n * The track associated with a track element.\n *\n * @return {HtmlTrackElement|undefined}\n * The track element that was found or undefined.\n *\n * @private\n */\n }, {\n key: \"getTrackElementByTrack_\",\n value: function getTrackElementByTrack_(track) {\n var trackElement_;\n for (var _i19 = 0, length = this.trackElements_.length; _i19 < length; _i19++) {\n if (track === this.trackElements_[_i19].track) {\n trackElement_ = this.trackElements_[_i19];\n break;\n }\n }\n return trackElement_;\n }\n\n /**\n * Remove a {@link HtmlTrackElement} from the `HtmlTrackElementList`\n *\n * @param {HtmlTrackElement} trackElement\n * The track element to remove from the list.\n *\n * @private\n */\n }, {\n key: \"removeTrackElement_\",\n value: function removeTrackElement_(trackElement) {\n for (var _i20 = 0, length = this.trackElements_.length; _i20 < length; _i20++) {\n if (trackElement === this.trackElements_[_i20]) {\n if (this.trackElements_[_i20].track && typeof this.trackElements_[_i20].track.off === 'function') {\n this.trackElements_[_i20].track.off();\n }\n if (typeof this.trackElements_[_i20].off === 'function') {\n this.trackElements_[_i20].off();\n }\n this.trackElements_.splice(_i20, 1);\n break;\n }\n }\n }\n }]);\n return HtmlTrackElementList;\n}();\n/**\n * @file text-track-cue-list.js\n */\n/**\n * @typedef {Object} TextTrackCueList~TextTrackCue\n *\n * @property {string} id\n * The unique id for this text track cue\n *\n * @property {number} startTime\n * The start time for this text track cue\n *\n * @property {number} endTime\n * The end time for this text track cue\n *\n * @property {boolean} pauseOnExit\n * Pause when the end time is reached if true.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackcue}\n */\n/**\n * A List of TextTrackCues.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackcuelist}\n */\nvar TextTrackCueList = /*#__PURE__*/function () {\n /**\n * Create an instance of this class..\n *\n * @param {Array} cues\n * A list of cues to be initialized with\n */\n function TextTrackCueList(cues) {\n _classCallCheck(this, TextTrackCueList);\n TextTrackCueList.prototype.setCues_.call(this, cues);\n\n /**\n * @memberof TextTrackCueList\n * @member {number} length\n * The current number of `TextTrackCue`s in the TextTrackCueList.\n * @instance\n */\n Object.defineProperty(this, 'length', {\n get: function get() {\n return this.length_;\n }\n });\n }\n\n /**\n * A setter for cues in this list. Creates getters\n * an an index for the cues.\n *\n * @param {Array} cues\n * An array of cues to set\n *\n * @private\n */\n _createClass(TextTrackCueList, [{\n key: \"setCues_\",\n value: function setCues_(cues) {\n var oldLength = this.length || 0;\n var i = 0;\n var l = cues.length;\n this.cues_ = cues;\n this.length_ = cues.length;\n var defineProp = function defineProp(index) {\n if (!('' + index in this)) {\n Object.defineProperty(this, '' + index, {\n get: function get() {\n return this.cues_[index];\n }\n });\n }\n };\n if (oldLength < l) {\n i = oldLength;\n for (; i < l; i++) {\n defineProp.call(this, i);\n }\n }\n }\n\n /**\n * Get a `TextTrackCue` that is currently in the `TextTrackCueList` by id.\n *\n * @param {string} id\n * The id of the cue that should be searched for.\n *\n * @return {TextTrackCueList~TextTrackCue|null}\n * A single cue or null if none was found.\n */\n }, {\n key: \"getCueById\",\n value: function getCueById(id) {\n var result = null;\n for (var _i21 = 0, l = this.length; _i21 < l; _i21++) {\n var cue = this[_i21];\n if (cue.id === id) {\n result = cue;\n break;\n }\n }\n return result;\n }\n }]);\n return TextTrackCueList;\n}();\n/**\n * @file track-kinds.js\n */\n/**\n * All possible `VideoTrackKind`s\n *\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-videotrack-kind\n * @typedef VideoTrack~Kind\n * @enum\n */\nvar VideoTrackKind = {\n alternative: 'alternative',\n captions: 'captions',\n main: 'main',\n sign: 'sign',\n subtitles: 'subtitles',\n commentary: 'commentary'\n};\n\n/**\n * All possible `AudioTrackKind`s\n *\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-audiotrack-kind\n * @typedef AudioTrack~Kind\n * @enum\n */\nvar AudioTrackKind = {\n 'alternative': 'alternative',\n 'descriptions': 'descriptions',\n 'main': 'main',\n 'main-desc': 'main-desc',\n 'translation': 'translation',\n 'commentary': 'commentary'\n};\n\n/**\n * All possible `TextTrackKind`s\n *\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-texttrack-kind\n * @typedef TextTrack~Kind\n * @enum\n */\nvar TextTrackKind = {\n subtitles: 'subtitles',\n captions: 'captions',\n descriptions: 'descriptions',\n chapters: 'chapters',\n metadata: 'metadata'\n};\n\n/**\n * All possible `TextTrackMode`s\n *\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackmode\n * @typedef TextTrack~Mode\n * @enum\n */\nvar TextTrackMode = {\n disabled: 'disabled',\n hidden: 'hidden',\n showing: 'showing'\n};\n\n/**\n * @file track.js\n */\n\n/**\n * A Track class that contains all of the common functionality for {@link AudioTrack},\n * {@link VideoTrack}, and {@link TextTrack}.\n *\n * > Note: This class should not be used directly\n *\n * @see {@link https://html.spec.whatwg.org/multipage/embedded-content.html}\n * @extends EventTarget\n * @abstract\n */\nvar Track = /*#__PURE__*/function (_EventTarget$2) {\n _inherits(Track, _EventTarget$2);\n var _super6 = _createSuper(Track);\n /**\n * Create an instance of this class.\n *\n * @param {Object} [options={}]\n * Object of option names and values\n *\n * @param {string} [options.kind='']\n * A valid kind for the track type you are creating.\n *\n * @param {string} [options.id='vjs_track_' + Guid.newGUID()]\n * A unique id for this AudioTrack.\n *\n * @param {string} [options.label='']\n * The menu label for this track.\n *\n * @param {string} [options.language='']\n * A valid two character language code.\n *\n * @abstract\n */\n function Track() {\n var _this20;\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n _classCallCheck(this, Track);\n _this20 = _super6.call(this);\n var trackProps = {\n id: options.id || 'vjs_track_' + newGUID(),\n kind: options.kind || '',\n language: options.language || ''\n };\n var label = options.label || '';\n\n /**\n * @memberof Track\n * @member {string} id\n * The id of this track. Cannot be changed after creation.\n * @instance\n *\n * @readonly\n */\n\n /**\n * @memberof Track\n * @member {string} kind\n * The kind of track that this is. Cannot be changed after creation.\n * @instance\n *\n * @readonly\n */\n\n /**\n * @memberof Track\n * @member {string} language\n * The two letter language code for this track. Cannot be changed after\n * creation.\n * @instance\n *\n * @readonly\n */\n var _loop = function _loop(key) {\n Object.defineProperty(_assertThisInitialized(_this20), key, {\n get: function get() {\n return trackProps[key];\n },\n set: function set() {}\n });\n };\n for (var key in trackProps) {\n _loop(key);\n }\n\n /**\n * @memberof Track\n * @member {string} label\n * The label of this track. Cannot be changed after creation.\n * @instance\n *\n * @fires Track#labelchange\n */\n Object.defineProperty(_assertThisInitialized(_this20), 'label', {\n get: function get() {\n return label;\n },\n set: function set(newLabel) {\n if (newLabel !== label) {\n label = newLabel;\n\n /**\n * An event that fires when label changes on this track.\n *\n * > Note: This is not part of the spec!\n *\n * @event Track#labelchange\n * @type {Event}\n */\n this.trigger('labelchange');\n }\n }\n });\n return _this20;\n }\n return _createClass(Track);\n}(EventTarget$2);\n/**\n * @file url.js\n * @module url\n */\n/**\n * @typedef {Object} url:URLObject\n *\n * @property {string} protocol\n * The protocol of the url that was parsed.\n *\n * @property {string} hostname\n * The hostname of the url that was parsed.\n *\n * @property {string} port\n * The port of the url that was parsed.\n *\n * @property {string} pathname\n * The pathname of the url that was parsed.\n *\n * @property {string} search\n * The search query of the url that was parsed.\n *\n * @property {string} hash\n * The hash of the url that was parsed.\n *\n * @property {string} host\n * The host of the url that was parsed.\n */\n/**\n * Resolve and parse the elements of a URL.\n *\n * @function\n * @param {String} url\n * The url to parse\n *\n * @return {url:URLObject}\n * An object of url details\n */\nvar parseUrl = function parseUrl(url) {\n // This entire method can be replace with URL once we are able to drop IE11\n\n var props = ['protocol', 'hostname', 'port', 'pathname', 'search', 'hash', 'host'];\n\n // add the url to an anchor and let the browser parse the URL\n var a = document.createElement('a');\n a.href = url;\n\n // Copy the specific URL properties to a new object\n // This is also needed for IE because the anchor loses its\n // properties when it's removed from the dom\n var details = {};\n for (var _i22 = 0; _i22 < props.length; _i22++) {\n details[props[_i22]] = a[props[_i22]];\n }\n\n // IE adds the port to the host property unlike everyone else. If\n // a port identifier is added for standard ports, strip it.\n if (details.protocol === 'http:') {\n details.host = details.host.replace(/:80$/, '');\n }\n if (details.protocol === 'https:') {\n details.host = details.host.replace(/:443$/, '');\n }\n if (!details.protocol) {\n details.protocol = window$1.location.protocol;\n }\n\n /* istanbul ignore if */\n if (!details.host) {\n details.host = window$1.location.host;\n }\n return details;\n};\n\n/**\n * Get absolute version of relative URL.\n *\n * @function\n * @param {string} url\n * URL to make absolute\n *\n * @return {string}\n * Absolute URL\n *\n * @see http://stackoverflow.com/questions/470832/getting-an-absolute-url-from-a-relative-one-ie6-issue\n */\nvar getAbsoluteURL = function getAbsoluteURL(url) {\n // Check if absolute URL\n if (!url.match(/^https?:\\/\\//)) {\n // Add the url to an anchor and let the browser parse it to convert to an absolute url\n var a = document.createElement('a');\n a.href = url;\n url = a.href;\n }\n return url;\n};\n\n/**\n * Returns the extension of the passed file name. It will return an empty string\n * if passed an invalid path.\n *\n * @function\n * @param {string} path\n * The fileName path like '/path/to/file.mp4'\n *\n * @return {string}\n * The extension in lower case or an empty string if no\n * extension could be found.\n */\nvar getFileExtension = function getFileExtension(path) {\n if (typeof path === 'string') {\n var splitPathRe = /^(\\/?)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?)(\\.([^\\.\\/\\?]+)))(?:[\\/]*|[\\?].*)$/;\n var pathParts = splitPathRe.exec(path);\n if (pathParts) {\n return pathParts.pop().toLowerCase();\n }\n }\n return '';\n};\n\n/**\n * Returns whether the url passed is a cross domain request or not.\n *\n * @function\n * @param {string} url\n * The url to check.\n *\n * @param {Object} [winLoc]\n * the domain to check the url against, defaults to window.location\n *\n * @param {string} [winLoc.protocol]\n * The window location protocol defaults to window.location.protocol\n *\n * @param {string} [winLoc.host]\n * The window location host defaults to window.location.host\n *\n * @return {boolean}\n * Whether it is a cross domain request or not.\n */\nvar isCrossOrigin = function isCrossOrigin(url) {\n var winLoc = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window$1.location;\n var urlInfo = parseUrl(url);\n\n // IE8 protocol relative urls will return ':' for protocol\n var srcProtocol = urlInfo.protocol === ':' ? winLoc.protocol : urlInfo.protocol;\n\n // Check if url is for another domain/origin\n // IE8 doesn't know location.origin, so we won't rely on it here\n var crossOrigin = srcProtocol + urlInfo.host !== winLoc.protocol + winLoc.host;\n return crossOrigin;\n};\nvar Url = /*#__PURE__*/Object.freeze({\n __proto__: null,\n parseUrl: parseUrl,\n getAbsoluteURL: getAbsoluteURL,\n getFileExtension: getFileExtension,\n isCrossOrigin: isCrossOrigin\n});\n\n/**\n * @file text-track.js\n */\n\n/**\n * Takes a webvtt file contents and parses it into cues\n *\n * @param {string} srcContent\n * webVTT file contents\n *\n * @param {TextTrack} track\n * TextTrack to add cues to. Cues come from the srcContent.\n *\n * @private\n */\nvar parseCues = function parseCues(srcContent, track) {\n var parser = new window$1.WebVTT.Parser(window$1, window$1.vttjs, window$1.WebVTT.StringDecoder());\n var errors = [];\n parser.oncue = function (cue) {\n track.addCue(cue);\n };\n parser.onparsingerror = function (error) {\n errors.push(error);\n };\n parser.onflush = function () {\n track.trigger({\n type: 'loadeddata',\n target: track\n });\n };\n parser.parse(srcContent);\n if (errors.length > 0) {\n if (window$1.console && window$1.console.groupCollapsed) {\n window$1.console.groupCollapsed(\"Text Track parsing errors for \".concat(track.src));\n }\n errors.forEach(function (error) {\n return log$1.error(error);\n });\n if (window$1.console && window$1.console.groupEnd) {\n window$1.console.groupEnd();\n }\n }\n parser.flush();\n};\n\n/**\n * Load a `TextTrack` from a specified url.\n *\n * @param {string} src\n * Url to load track from.\n *\n * @param {TextTrack} track\n * Track to add cues to. Comes from the content at the end of `url`.\n *\n * @private\n */\nvar loadTrack = function loadTrack(src, track) {\n var opts = {\n uri: src\n };\n var crossOrigin = isCrossOrigin(src);\n if (crossOrigin) {\n opts.cors = crossOrigin;\n }\n var withCredentials = track.tech_.crossOrigin() === 'use-credentials';\n if (withCredentials) {\n opts.withCredentials = withCredentials;\n }\n XHR(opts, bind_(this, function (err, response, responseBody) {\n if (err) {\n return log$1.error(err, response);\n }\n track.loaded_ = true;\n\n // Make sure that vttjs has loaded, otherwise, wait till it finished loading\n // NOTE: this is only used for the alt/video.novtt.js build\n if (typeof window$1.WebVTT !== 'function') {\n if (track.tech_) {\n // to prevent use before define eslint error, we define loadHandler\n // as a let here\n track.tech_.any(['vttjsloaded', 'vttjserror'], function (event) {\n if (event.type === 'vttjserror') {\n log$1.error(\"vttjs failed to load, stopping trying to process \".concat(track.src));\n return;\n }\n return parseCues(responseBody, track);\n });\n }\n } else {\n parseCues(responseBody, track);\n }\n }));\n};\n\n/**\n * A representation of a single `TextTrack`.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#texttrack}\n * @extends Track\n */\nvar TextTrack = /*#__PURE__*/function (_Track) {\n _inherits(TextTrack, _Track);\n var _super7 = _createSuper(TextTrack);\n /**\n * Create an instance of this class.\n *\n * @param {Object} options={}\n * Object of option names and values\n *\n * @param { import('../tech/tech').default } options.tech\n * A reference to the tech that owns this TextTrack.\n *\n * @param {TextTrack~Kind} [options.kind='subtitles']\n * A valid text track kind.\n *\n * @param {TextTrack~Mode} [options.mode='disabled']\n * A valid text track mode.\n *\n * @param {string} [options.id='vjs_track_' + Guid.newGUID()]\n * A unique id for this TextTrack.\n *\n * @param {string} [options.label='']\n * The menu label for this track.\n *\n * @param {string} [options.language='']\n * A valid two character language code.\n *\n * @param {string} [options.srclang='']\n * A valid two character language code. An alternative, but deprioritized\n * version of `options.language`\n *\n * @param {string} [options.src]\n * A url to TextTrack cues.\n *\n * @param {boolean} [options.default]\n * If this track should default to on or off.\n */\n function TextTrack() {\n var _this21;\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n _classCallCheck(this, TextTrack);\n if (!options.tech) {\n throw new Error('A tech was not provided.');\n }\n var settings = merge$1(options, {\n kind: TextTrackKind[options.kind] || 'subtitles',\n language: options.language || options.srclang || ''\n });\n var mode = TextTrackMode[settings.mode] || 'disabled';\n var default_ = settings[\"default\"];\n if (settings.kind === 'metadata' || settings.kind === 'chapters') {\n mode = 'hidden';\n }\n _this21 = _super7.call(this, settings);\n _this21.tech_ = settings.tech;\n _this21.cues_ = [];\n _this21.activeCues_ = [];\n _this21.preload_ = _this21.tech_.preloadTextTracks !== false;\n var cues = new TextTrackCueList(_this21.cues_);\n var activeCues = new TextTrackCueList(_this21.activeCues_);\n var changed = false;\n _this21.timeupdateHandler = bind_(_assertThisInitialized(_this21), function () {\n var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n if (this.tech_.isDisposed()) {\n return;\n }\n if (!this.tech_.isReady_) {\n if (event.type !== 'timeupdate') {\n this.rvf_ = this.tech_.requestVideoFrameCallback(this.timeupdateHandler);\n }\n return;\n }\n\n // Accessing this.activeCues for the side-effects of updating itself\n // due to its nature as a getter function. Do not remove or cues will\n // stop updating!\n // Use the setter to prevent deletion from uglify (pure_getters rule)\n this.activeCues = this.activeCues;\n if (changed) {\n this.trigger('cuechange');\n changed = false;\n }\n if (event.type !== 'timeupdate') {\n this.rvf_ = this.tech_.requestVideoFrameCallback(this.timeupdateHandler);\n }\n });\n var disposeHandler = function disposeHandler() {\n _this21.stopTracking();\n };\n _this21.tech_.one('dispose', disposeHandler);\n if (mode !== 'disabled') {\n _this21.startTracking();\n }\n Object.defineProperties(_assertThisInitialized(_this21), {\n /**\n * @memberof TextTrack\n * @member {boolean} default\n * If this track was set to be on or off by default. Cannot be changed after\n * creation.\n * @instance\n *\n * @readonly\n */\n \"default\": {\n get: function get() {\n return default_;\n },\n set: function set() {}\n },\n /**\n * @memberof TextTrack\n * @member {string} mode\n * Set the mode of this TextTrack to a valid {@link TextTrack~Mode}. Will\n * not be set if setting to an invalid mode.\n * @instance\n *\n * @fires TextTrack#modechange\n */\n mode: {\n get: function get() {\n return mode;\n },\n set: function set(newMode) {\n if (!TextTrackMode[newMode]) {\n return;\n }\n if (mode === newMode) {\n return;\n }\n mode = newMode;\n if (!this.preload_ && mode !== 'disabled' && this.cues.length === 0) {\n // On-demand load.\n loadTrack(this.src, this);\n }\n this.stopTracking();\n if (mode !== 'disabled') {\n this.startTracking();\n }\n /**\n * An event that fires when mode changes on this track. This allows\n * the TextTrackList that holds this track to act accordingly.\n *\n * > Note: This is not part of the spec!\n *\n * @event TextTrack#modechange\n * @type {Event}\n */\n this.trigger('modechange');\n }\n },\n /**\n * @memberof TextTrack\n * @member {TextTrackCueList} cues\n * The text track cue list for this TextTrack.\n * @instance\n */\n cues: {\n get: function get() {\n if (!this.loaded_) {\n return null;\n }\n return cues;\n },\n set: function set() {}\n },\n /**\n * @memberof TextTrack\n * @member {TextTrackCueList} activeCues\n * The list text track cues that are currently active for this TextTrack.\n * @instance\n */\n activeCues: {\n get: function get() {\n if (!this.loaded_) {\n return null;\n }\n\n // nothing to do\n if (this.cues.length === 0) {\n return activeCues;\n }\n var ct = this.tech_.currentTime();\n var active = [];\n for (var _i23 = 0, l = this.cues.length; _i23 < l; _i23++) {\n var cue = this.cues[_i23];\n if (cue.startTime <= ct && cue.endTime >= ct) {\n active.push(cue);\n }\n }\n changed = false;\n if (active.length !== this.activeCues_.length) {\n changed = true;\n } else {\n for (var _i24 = 0; _i24 < active.length; _i24++) {\n if (this.activeCues_.indexOf(active[_i24]) === -1) {\n changed = true;\n }\n }\n }\n this.activeCues_ = active;\n activeCues.setCues_(this.activeCues_);\n return activeCues;\n },\n // /!\\ Keep this setter empty (see the timeupdate handler above)\n set: function set() {}\n }\n });\n if (settings.src) {\n _this21.src = settings.src;\n if (!_this21.preload_) {\n // Tracks will load on-demand.\n // Act like we're loaded for other purposes.\n _this21.loaded_ = true;\n }\n if (_this21.preload_ || settings.kind !== 'subtitles' && settings.kind !== 'captions') {\n loadTrack(_this21.src, _assertThisInitialized(_this21));\n }\n } else {\n _this21.loaded_ = true;\n }\n return _this21;\n }\n _createClass(TextTrack, [{\n key: \"startTracking\",\n value: function startTracking() {\n // More precise cues based on requestVideoFrameCallback with a requestAnimationFram fallback\n this.rvf_ = this.tech_.requestVideoFrameCallback(this.timeupdateHandler);\n // Also listen to timeupdate in case rVFC/rAF stops (window in background, audio in video el)\n this.tech_.on('timeupdate', this.timeupdateHandler);\n }\n }, {\n key: \"stopTracking\",\n value: function stopTracking() {\n if (this.rvf_) {\n this.tech_.cancelVideoFrameCallback(this.rvf_);\n this.rvf_ = undefined;\n }\n this.tech_.off('timeupdate', this.timeupdateHandler);\n }\n\n /**\n * Add a cue to the internal list of cues.\n *\n * @param {TextTrack~Cue} cue\n * The cue to add to our internal list\n */\n }, {\n key: \"addCue\",\n value: function addCue(originalCue) {\n var cue = originalCue;\n\n // Testing if the cue is a VTTCue in a way that survives minification\n if (!('getCueAsHTML' in cue)) {\n cue = new window$1.vttjs.VTTCue(originalCue.startTime, originalCue.endTime, originalCue.text);\n for (var prop in originalCue) {\n if (!(prop in cue)) {\n cue[prop] = originalCue[prop];\n }\n }\n\n // make sure that `id` is copied over\n cue.id = originalCue.id;\n cue.originalCue_ = originalCue;\n }\n var tracks = this.tech_.textTracks();\n for (var _i25 = 0; _i25 < tracks.length; _i25++) {\n if (tracks[_i25] !== this) {\n tracks[_i25].removeCue(cue);\n }\n }\n this.cues_.push(cue);\n this.cues.setCues_(this.cues_);\n }\n\n /**\n * Remove a cue from our internal list\n *\n * @param {TextTrack~Cue} removeCue\n * The cue to remove from our internal list\n */\n }, {\n key: \"removeCue\",\n value: function removeCue(_removeCue) {\n var i = this.cues_.length;\n while (i--) {\n var cue = this.cues_[i];\n if (cue === _removeCue || cue.originalCue_ && cue.originalCue_ === _removeCue) {\n this.cues_.splice(i, 1);\n this.cues.setCues_(this.cues_);\n break;\n }\n }\n }\n }]);\n return TextTrack;\n}(Track);\n/**\n * cuechange - One or more cues in the track have become active or stopped being active.\n * @protected\n */\nTextTrack.prototype.allowedEvents_ = {\n cuechange: 'cuechange'\n};\n\n/**\n * A representation of a single `AudioTrack`. If it is part of an {@link AudioTrackList}\n * only one `AudioTrack` in the list will be enabled at a time.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#audiotrack}\n * @extends Track\n */\nvar AudioTrack = /*#__PURE__*/function (_Track2) {\n _inherits(AudioTrack, _Track2);\n var _super8 = _createSuper(AudioTrack);\n /**\n * Create an instance of this class.\n *\n * @param {Object} [options={}]\n * Object of option names and values\n *\n * @param {AudioTrack~Kind} [options.kind='']\n * A valid audio track kind\n *\n * @param {string} [options.id='vjs_track_' + Guid.newGUID()]\n * A unique id for this AudioTrack.\n *\n * @param {string} [options.label='']\n * The menu label for this track.\n *\n * @param {string} [options.language='']\n * A valid two character language code.\n *\n * @param {boolean} [options.enabled]\n * If this track is the one that is currently playing. If this track is part of\n * an {@link AudioTrackList}, only one {@link AudioTrack} will be enabled.\n */\n function AudioTrack() {\n var _this22;\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n _classCallCheck(this, AudioTrack);\n var settings = merge$1(options, {\n kind: AudioTrackKind[options.kind] || ''\n });\n _this22 = _super8.call(this, settings);\n var enabled = false;\n\n /**\n * @memberof AudioTrack\n * @member {boolean} enabled\n * If this `AudioTrack` is enabled or not. When setting this will\n * fire {@link AudioTrack#enabledchange} if the state of enabled is changed.\n * @instance\n *\n * @fires VideoTrack#selectedchange\n */\n Object.defineProperty(_assertThisInitialized(_this22), 'enabled', {\n get: function get() {\n return enabled;\n },\n set: function set(newEnabled) {\n // an invalid or unchanged value\n if (typeof newEnabled !== 'boolean' || newEnabled === enabled) {\n return;\n }\n enabled = newEnabled;\n\n /**\n * An event that fires when enabled changes on this track. This allows\n * the AudioTrackList that holds this track to act accordingly.\n *\n * > Note: This is not part of the spec! Native tracks will do\n * this internally without an event.\n *\n * @event AudioTrack#enabledchange\n * @type {Event}\n */\n this.trigger('enabledchange');\n }\n });\n\n // if the user sets this track to selected then\n // set selected to that true value otherwise\n // we keep it false\n if (settings.enabled) {\n _this22.enabled = settings.enabled;\n }\n _this22.loaded_ = true;\n return _this22;\n }\n return _createClass(AudioTrack);\n}(Track);\n/**\n * A representation of a single `VideoTrack`.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#videotrack}\n * @extends Track\n */\nvar VideoTrack = /*#__PURE__*/function (_Track3) {\n _inherits(VideoTrack, _Track3);\n var _super9 = _createSuper(VideoTrack);\n /**\n * Create an instance of this class.\n *\n * @param {Object} [options={}]\n * Object of option names and values\n *\n * @param {string} [options.kind='']\n * A valid {@link VideoTrack~Kind}\n *\n * @param {string} [options.id='vjs_track_' + Guid.newGUID()]\n * A unique id for this AudioTrack.\n *\n * @param {string} [options.label='']\n * The menu label for this track.\n *\n * @param {string} [options.language='']\n * A valid two character language code.\n *\n * @param {boolean} [options.selected]\n * If this track is the one that is currently playing.\n */\n function VideoTrack() {\n var _this23;\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n _classCallCheck(this, VideoTrack);\n var settings = merge$1(options, {\n kind: VideoTrackKind[options.kind] || ''\n });\n _this23 = _super9.call(this, settings);\n var selected = false;\n\n /**\n * @memberof VideoTrack\n * @member {boolean} selected\n * If this `VideoTrack` is selected or not. When setting this will\n * fire {@link VideoTrack#selectedchange} if the state of selected changed.\n * @instance\n *\n * @fires VideoTrack#selectedchange\n */\n Object.defineProperty(_assertThisInitialized(_this23), 'selected', {\n get: function get() {\n return selected;\n },\n set: function set(newSelected) {\n // an invalid or unchanged value\n if (typeof newSelected !== 'boolean' || newSelected === selected) {\n return;\n }\n selected = newSelected;\n\n /**\n * An event that fires when selected changes on this track. This allows\n * the VideoTrackList that holds this track to act accordingly.\n *\n * > Note: This is not part of the spec! Native tracks will do\n * this internally without an event.\n *\n * @event VideoTrack#selectedchange\n * @type {Event}\n */\n this.trigger('selectedchange');\n }\n });\n\n // if the user sets this track to selected then\n // set selected to that true value otherwise\n // we keep it false\n if (settings.selected) {\n _this23.selected = settings.selected;\n }\n return _this23;\n }\n return _createClass(VideoTrack);\n}(Track);\n/**\n * @file html-track-element.js\n */\n/**\n * A single track represented in the DOM.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#htmltrackelement}\n * @extends EventTarget\n */\nvar HTMLTrackElement = /*#__PURE__*/function (_EventTarget$3) {\n _inherits(HTMLTrackElement, _EventTarget$3);\n var _super10 = _createSuper(HTMLTrackElement);\n /**\n * Create an instance of this class.\n *\n * @param {Object} options={}\n * Object of option names and values\n *\n * @param { import('../tech/tech').default } options.tech\n * A reference to the tech that owns this HTMLTrackElement.\n *\n * @param {TextTrack~Kind} [options.kind='subtitles']\n * A valid text track kind.\n *\n * @param {TextTrack~Mode} [options.mode='disabled']\n * A valid text track mode.\n *\n * @param {string} [options.id='vjs_track_' + Guid.newGUID()]\n * A unique id for this TextTrack.\n *\n * @param {string} [options.label='']\n * The menu label for this track.\n *\n * @param {string} [options.language='']\n * A valid two character language code.\n *\n * @param {string} [options.srclang='']\n * A valid two character language code. An alternative, but deprioritized\n * version of `options.language`\n *\n * @param {string} [options.src]\n * A url to TextTrack cues.\n *\n * @param {boolean} [options.default]\n * If this track should default to on or off.\n */\n function HTMLTrackElement() {\n var _this24;\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n _classCallCheck(this, HTMLTrackElement);\n _this24 = _super10.call(this);\n var readyState;\n var track = new TextTrack(options);\n _this24.kind = track.kind;\n _this24.src = track.src;\n _this24.srclang = track.language;\n _this24.label = track.label;\n _this24[\"default\"] = track[\"default\"];\n Object.defineProperties(_assertThisInitialized(_this24), {\n /**\n * @memberof HTMLTrackElement\n * @member {HTMLTrackElement~ReadyState} readyState\n * The current ready state of the track element.\n * @instance\n */\n readyState: {\n get: function get() {\n return readyState;\n }\n },\n /**\n * @memberof HTMLTrackElement\n * @member {TextTrack} track\n * The underlying TextTrack object.\n * @instance\n *\n */\n track: {\n get: function get() {\n return track;\n }\n }\n });\n readyState = HTMLTrackElement.NONE;\n\n /**\n * @listens TextTrack#loadeddata\n * @fires HTMLTrackElement#load\n */\n track.addEventListener('loadeddata', function () {\n readyState = HTMLTrackElement.LOADED;\n _this24.trigger({\n type: 'load',\n target: _assertThisInitialized(_this24)\n });\n });\n return _this24;\n }\n return _createClass(HTMLTrackElement);\n}(EventTarget$2);\n/**\n * @protected\n */\nHTMLTrackElement.prototype.allowedEvents_ = {\n load: 'load'\n};\n\n/**\n * The text track not loaded state.\n *\n * @type {number}\n * @static\n */\nHTMLTrackElement.NONE = 0;\n\n/**\n * The text track loading state.\n *\n * @type {number}\n * @static\n */\nHTMLTrackElement.LOADING = 1;\n\n/**\n * The text track loaded state.\n *\n * @type {number}\n * @static\n */\nHTMLTrackElement.LOADED = 2;\n\n/**\n * The text track failed to load state.\n *\n * @type {number}\n * @static\n */\nHTMLTrackElement.ERROR = 3;\n\n/*\n * This file contains all track properties that are used in\n * player.js, tech.js, html5.js and possibly other techs in the future.\n */\n\nvar NORMAL = {\n audio: {\n ListClass: AudioTrackList,\n TrackClass: AudioTrack,\n capitalName: 'Audio'\n },\n video: {\n ListClass: VideoTrackList,\n TrackClass: VideoTrack,\n capitalName: 'Video'\n },\n text: {\n ListClass: TextTrackList,\n TrackClass: TextTrack,\n capitalName: 'Text'\n }\n};\nObject.keys(NORMAL).forEach(function (type) {\n NORMAL[type].getterName = \"\".concat(type, \"Tracks\");\n NORMAL[type].privateName = \"\".concat(type, \"Tracks_\");\n});\nvar REMOTE = {\n remoteText: {\n ListClass: TextTrackList,\n TrackClass: TextTrack,\n capitalName: 'RemoteText',\n getterName: 'remoteTextTracks',\n privateName: 'remoteTextTracks_'\n },\n remoteTextEl: {\n ListClass: HtmlTrackElementList,\n TrackClass: HTMLTrackElement,\n capitalName: 'RemoteTextTrackEls',\n getterName: 'remoteTextTrackEls',\n privateName: 'remoteTextTrackEls_'\n }\n};\nvar ALL = Object.assign({}, NORMAL, REMOTE);\nREMOTE.names = Object.keys(REMOTE);\nNORMAL.names = Object.keys(NORMAL);\nALL.names = [].concat(REMOTE.names).concat(NORMAL.names);\n\n/**\n * @file tech.js\n */\n\n/**\n * An Object containing a structure like: `{src: 'url', type: 'mimetype'}` or string\n * that just contains the src url alone.\n * * `var SourceObject = {src: 'http://ex.com/video.mp4', type: 'video/mp4'};`\n * `var SourceString = 'http://example.com/some-video.mp4';`\n *\n * @typedef {Object|string} SourceObject\n *\n * @property {string} src\n * The url to the source\n *\n * @property {string} type\n * The mime type of the source\n */\n\n/**\n * A function used by {@link Tech} to create a new {@link TextTrack}.\n *\n * @private\n *\n * @param {Tech} self\n * An instance of the Tech class.\n *\n * @param {string} kind\n * `TextTrack` kind (subtitles, captions, descriptions, chapters, or metadata)\n *\n * @param {string} [label]\n * Label to identify the text track\n *\n * @param {string} [language]\n * Two letter language abbreviation\n *\n * @param {Object} [options={}]\n * An object with additional text track options\n *\n * @return {TextTrack}\n * The text track that was created.\n */\nfunction createTrackHelper(self, kind, label, language) {\n var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};\n var tracks = self.textTracks();\n options.kind = kind;\n if (label) {\n options.label = label;\n }\n if (language) {\n options.language = language;\n }\n options.tech = self;\n var track = new ALL.text.TrackClass(options);\n tracks.addTrack(track);\n return track;\n}\n\n/**\n * This is the base class for media playback technology controllers, such as\n * {@link HTML5}\n *\n * @extends Component\n */\nvar Tech = /*#__PURE__*/function (_Component$2) {\n _inherits(Tech, _Component$2);\n var _super11 = _createSuper(Tech);\n /**\n * Create an instance of this Tech.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n *\n * @param {Function} [ready]\n * Callback function to call when the `HTML5` Tech is ready.\n */\n function Tech() {\n var _this25;\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var ready = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};\n _classCallCheck(this, Tech);\n // we don't want the tech to report user activity automatically.\n // This is done manually in addControlsListeners\n options.reportTouchActivity = false;\n _this25 = _super11.call(this, null, options, ready);\n _this25.onDurationChange_ = function (e) {\n return _this25.onDurationChange(e);\n };\n _this25.trackProgress_ = function (e) {\n return _this25.trackProgress(e);\n };\n _this25.trackCurrentTime_ = function (e) {\n return _this25.trackCurrentTime(e);\n };\n _this25.stopTrackingCurrentTime_ = function (e) {\n return _this25.stopTrackingCurrentTime(e);\n };\n _this25.disposeSourceHandler_ = function (e) {\n return _this25.disposeSourceHandler(e);\n };\n _this25.queuedHanders_ = new Set();\n\n // keep track of whether the current source has played at all to\n // implement a very limited played()\n _this25.hasStarted_ = false;\n _this25.on('playing', function () {\n this.hasStarted_ = true;\n });\n _this25.on('loadstart', function () {\n this.hasStarted_ = false;\n });\n ALL.names.forEach(function (name) {\n var props = ALL[name];\n if (options && options[props.getterName]) {\n _this25[props.privateName] = options[props.getterName];\n }\n });\n\n // Manually track progress in cases where the browser/tech doesn't report it.\n if (!_this25.featuresProgressEvents) {\n _this25.manualProgressOn();\n }\n\n // Manually track timeupdates in cases where the browser/tech doesn't report it.\n if (!_this25.featuresTimeupdateEvents) {\n _this25.manualTimeUpdatesOn();\n }\n ['Text', 'Audio', 'Video'].forEach(function (track) {\n if (options[\"native\".concat(track, \"Tracks\")] === false) {\n _this25[\"featuresNative\".concat(track, \"Tracks\")] = false;\n }\n });\n if (options.nativeCaptions === false || options.nativeTextTracks === false) {\n _this25.featuresNativeTextTracks = false;\n } else if (options.nativeCaptions === true || options.nativeTextTracks === true) {\n _this25.featuresNativeTextTracks = true;\n }\n if (!_this25.featuresNativeTextTracks) {\n _this25.emulateTextTracks();\n }\n _this25.preloadTextTracks = options.preloadTextTracks !== false;\n _this25.autoRemoteTextTracks_ = new ALL.text.ListClass();\n _this25.initTrackListeners();\n\n // Turn on component tap events only if not using native controls\n if (!options.nativeControlsForTouch) {\n _this25.emitTapEvents();\n }\n if (_this25.constructor) {\n _this25.name_ = _this25.constructor.name || 'Unknown Tech';\n }\n return _this25;\n }\n\n /**\n * A special function to trigger source set in a way that will allow player\n * to re-trigger if the player or tech are not ready yet.\n *\n * @fires Tech#sourceset\n * @param {string} src The source string at the time of the source changing.\n */\n _createClass(Tech, [{\n key: \"triggerSourceset\",\n value: function triggerSourceset(src) {\n var _this26 = this;\n if (!this.isReady_) {\n // on initial ready we have to trigger source set\n // 1ms after ready so that player can watch for it.\n this.one('ready', function () {\n return _this26.setTimeout(function () {\n return _this26.triggerSourceset(src);\n }, 1);\n });\n }\n\n /**\n * Fired when the source is set on the tech causing the media element\n * to reload.\n *\n * @see {@link Player#event:sourceset}\n * @event Tech#sourceset\n * @type {Event}\n */\n this.trigger({\n src: src,\n type: 'sourceset'\n });\n }\n\n /* Fallbacks for unsupported event types\n ================================================================================ */\n\n /**\n * Polyfill the `progress` event for browsers that don't support it natively.\n *\n * @see {@link Tech#trackProgress}\n */\n }, {\n key: \"manualProgressOn\",\n value: function manualProgressOn() {\n this.on('durationchange', this.onDurationChange_);\n this.manualProgress = true;\n\n // Trigger progress watching when a source begins loading\n this.one('ready', this.trackProgress_);\n }\n\n /**\n * Turn off the polyfill for `progress` events that was created in\n * {@link Tech#manualProgressOn}\n */\n }, {\n key: \"manualProgressOff\",\n value: function manualProgressOff() {\n this.manualProgress = false;\n this.stopTrackingProgress();\n this.off('durationchange', this.onDurationChange_);\n }\n\n /**\n * This is used to trigger a `progress` event when the buffered percent changes. It\n * sets an interval function that will be called every 500 milliseconds to check if the\n * buffer end percent has changed.\n *\n * > This function is called by {@link Tech#manualProgressOn}\n *\n * @param {Event} event\n * The `ready` event that caused this to run.\n *\n * @listens Tech#ready\n * @fires Tech#progress\n */\n }, {\n key: \"trackProgress\",\n value: function trackProgress(event) {\n this.stopTrackingProgress();\n this.progressInterval = this.setInterval(bind_(this, function () {\n // Don't trigger unless buffered amount is greater than last time\n\n var numBufferedPercent = this.bufferedPercent();\n if (this.bufferedPercent_ !== numBufferedPercent) {\n /**\n * See {@link Player#progress}\n *\n * @event Tech#progress\n * @type {Event}\n */\n this.trigger('progress');\n }\n this.bufferedPercent_ = numBufferedPercent;\n if (numBufferedPercent === 1) {\n this.stopTrackingProgress();\n }\n }), 500);\n }\n\n /**\n * Update our internal duration on a `durationchange` event by calling\n * {@link Tech#duration}.\n *\n * @param {Event} event\n * The `durationchange` event that caused this to run.\n *\n * @listens Tech#durationchange\n */\n }, {\n key: \"onDurationChange\",\n value: function onDurationChange(event) {\n this.duration_ = this.duration();\n }\n\n /**\n * Get and create a `TimeRange` object for buffering.\n *\n * @return { import('../utils/time').TimeRange }\n * The time range object that was created.\n */\n }, {\n key: \"buffered\",\n value: function buffered() {\n return createTimeRanges$1(0, 0);\n }\n\n /**\n * Get the percentage of the current video that is currently buffered.\n *\n * @return {number}\n * A number from 0 to 1 that represents the decimal percentage of the\n * video that is buffered.\n *\n */\n }, {\n key: \"bufferedPercent\",\n value: function bufferedPercent() {\n return _bufferedPercent(this.buffered(), this.duration_);\n }\n\n /**\n * Turn off the polyfill for `progress` events that was created in\n * {@link Tech#manualProgressOn}\n * Stop manually tracking progress events by clearing the interval that was set in\n * {@link Tech#trackProgress}.\n */\n }, {\n key: \"stopTrackingProgress\",\n value: function stopTrackingProgress() {\n this.clearInterval(this.progressInterval);\n }\n\n /**\n * Polyfill the `timeupdate` event for browsers that don't support it.\n *\n * @see {@link Tech#trackCurrentTime}\n */\n }, {\n key: \"manualTimeUpdatesOn\",\n value: function manualTimeUpdatesOn() {\n this.manualTimeUpdates = true;\n this.on('play', this.trackCurrentTime_);\n this.on('pause', this.stopTrackingCurrentTime_);\n }\n\n /**\n * Turn off the polyfill for `timeupdate` events that was created in\n * {@link Tech#manualTimeUpdatesOn}\n */\n }, {\n key: \"manualTimeUpdatesOff\",\n value: function manualTimeUpdatesOff() {\n this.manualTimeUpdates = false;\n this.stopTrackingCurrentTime();\n this.off('play', this.trackCurrentTime_);\n this.off('pause', this.stopTrackingCurrentTime_);\n }\n\n /**\n * Sets up an interval function to track current time and trigger `timeupdate` every\n * 250 milliseconds.\n *\n * @listens Tech#play\n * @triggers Tech#timeupdate\n */\n }, {\n key: \"trackCurrentTime\",\n value: function trackCurrentTime() {\n if (this.currentTimeInterval) {\n this.stopTrackingCurrentTime();\n }\n this.currentTimeInterval = this.setInterval(function () {\n /**\n * Triggered at an interval of 250ms to indicated that time is passing in the video.\n *\n * @event Tech#timeupdate\n * @type {Event}\n */\n this.trigger({\n type: 'timeupdate',\n target: this,\n manuallyTriggered: true\n });\n\n // 42 = 24 fps // 250 is what Webkit uses // FF uses 15\n }, 250);\n }\n\n /**\n * Stop the interval function created in {@link Tech#trackCurrentTime} so that the\n * `timeupdate` event is no longer triggered.\n *\n * @listens {Tech#pause}\n */\n }, {\n key: \"stopTrackingCurrentTime\",\n value: function stopTrackingCurrentTime() {\n this.clearInterval(this.currentTimeInterval);\n\n // #1002 - if the video ends right before the next timeupdate would happen,\n // the progress bar won't make it all the way to the end\n this.trigger({\n type: 'timeupdate',\n target: this,\n manuallyTriggered: true\n });\n }\n\n /**\n * Turn off all event polyfills, clear the `Tech`s {@link AudioTrackList},\n * {@link VideoTrackList}, and {@link TextTrackList}, and dispose of this Tech.\n *\n * @fires Component#dispose\n */\n }, {\n key: \"dispose\",\n value: function dispose() {\n // clear out all tracks because we can't reuse them between techs\n this.clearTracks(NORMAL.names);\n\n // Turn off any manual progress or timeupdate tracking\n if (this.manualProgress) {\n this.manualProgressOff();\n }\n if (this.manualTimeUpdates) {\n this.manualTimeUpdatesOff();\n }\n _get(_getPrototypeOf(Tech.prototype), \"dispose\", this).call(this);\n }\n\n /**\n * Clear out a single `TrackList` or an array of `TrackLists` given their names.\n *\n * > Note: Techs without source handlers should call this between sources for `video`\n * & `audio` tracks. You don't want to use them between tracks!\n *\n * @param {string[]|string} types\n * TrackList names to clear, valid names are `video`, `audio`, and\n * `text`.\n */\n }, {\n key: \"clearTracks\",\n value: function clearTracks(types) {\n var _this27 = this;\n types = [].concat(types);\n // clear out all tracks because we can't reuse them between techs\n types.forEach(function (type) {\n var list = _this27[\"\".concat(type, \"Tracks\")]() || [];\n var i = list.length;\n while (i--) {\n var track = list[i];\n if (type === 'text') {\n _this27.removeRemoteTextTrack(track);\n }\n list.removeTrack(track);\n }\n });\n }\n\n /**\n * Remove any TextTracks added via addRemoteTextTrack that are\n * flagged for automatic garbage collection\n */\n }, {\n key: \"cleanupAutoTextTracks\",\n value: function cleanupAutoTextTracks() {\n var list = this.autoRemoteTextTracks_ || [];\n var i = list.length;\n while (i--) {\n var track = list[i];\n this.removeRemoteTextTrack(track);\n }\n }\n\n /**\n * Reset the tech, which will removes all sources and reset the internal readyState.\n *\n * @abstract\n */\n }, {\n key: \"reset\",\n value: function reset() {}\n\n /**\n * Get the value of `crossOrigin` from the tech.\n *\n * @abstract\n *\n * @see {Html5#crossOrigin}\n */\n }, {\n key: \"crossOrigin\",\n value: function crossOrigin() {}\n\n /**\n * Set the value of `crossOrigin` on the tech.\n *\n * @abstract\n *\n * @param {string} crossOrigin the crossOrigin value\n * @see {Html5#setCrossOrigin}\n */\n }, {\n key: \"setCrossOrigin\",\n value: function setCrossOrigin() {}\n\n /**\n * Get or set an error on the Tech.\n *\n * @param {MediaError} [err]\n * Error to set on the Tech\n *\n * @return {MediaError|null}\n * The current error object on the tech, or null if there isn't one.\n */\n }, {\n key: \"error\",\n value: function error(err) {\n if (err !== undefined) {\n this.error_ = new MediaError(err);\n this.trigger('error');\n }\n return this.error_;\n }\n\n /**\n * Returns the `TimeRange`s that have been played through for the current source.\n *\n * > NOTE: This implementation is incomplete. It does not track the played `TimeRange`.\n * It only checks whether the source has played at all or not.\n *\n * @return { import('../utils/time').TimeRange }\n * - A single time range if this video has played\n * - An empty set of ranges if not.\n */\n }, {\n key: \"played\",\n value: function played() {\n if (this.hasStarted_) {\n return createTimeRanges$1(0, 0);\n }\n return createTimeRanges$1();\n }\n\n /**\n * Start playback\n *\n * @abstract\n *\n * @see {Html5#play}\n */\n }, {\n key: \"play\",\n value: function play() {}\n\n /**\n * Set whether we are scrubbing or not\n *\n * @abstract\n * @param {boolean} _isScrubbing\n * - true for we are currently scrubbing\n * - false for we are no longer scrubbing\n *\n * @see {Html5#setScrubbing}\n */\n }, {\n key: \"setScrubbing\",\n value: function setScrubbing(_isScrubbing) {}\n\n /**\n * Get whether we are scrubbing or not\n *\n * @abstract\n *\n * @see {Html5#scrubbing}\n */\n }, {\n key: \"scrubbing\",\n value: function scrubbing() {}\n\n /**\n * Causes a manual time update to occur if {@link Tech#manualTimeUpdatesOn} was\n * previously called.\n *\n * @param {number} _seconds\n * Set the current time of the media to this.\n * @fires Tech#timeupdate\n */\n }, {\n key: \"setCurrentTime\",\n value: function setCurrentTime(_seconds) {\n // improve the accuracy of manual timeupdates\n if (this.manualTimeUpdates) {\n /**\n * A manual `timeupdate` event.\n *\n * @event Tech#timeupdate\n * @type {Event}\n */\n this.trigger({\n type: 'timeupdate',\n target: this,\n manuallyTriggered: true\n });\n }\n }\n\n /**\n * Turn on listeners for {@link VideoTrackList}, {@link {AudioTrackList}, and\n * {@link TextTrackList} events.\n *\n * This adds {@link EventTarget~EventListeners} for `addtrack`, and `removetrack`.\n *\n * @fires Tech#audiotrackchange\n * @fires Tech#videotrackchange\n * @fires Tech#texttrackchange\n */\n }, {\n key: \"initTrackListeners\",\n value: function initTrackListeners() {\n var _this28 = this;\n /**\n * Triggered when tracks are added or removed on the Tech {@link AudioTrackList}\n *\n * @event Tech#audiotrackchange\n * @type {Event}\n */\n\n /**\n * Triggered when tracks are added or removed on the Tech {@link VideoTrackList}\n *\n * @event Tech#videotrackchange\n * @type {Event}\n */\n\n /**\n * Triggered when tracks are added or removed on the Tech {@link TextTrackList}\n *\n * @event Tech#texttrackchange\n * @type {Event}\n */\n NORMAL.names.forEach(function (name) {\n var props = NORMAL[name];\n var trackListChanges = function trackListChanges() {\n _this28.trigger(\"\".concat(name, \"trackchange\"));\n };\n var tracks = _this28[props.getterName]();\n tracks.addEventListener('removetrack', trackListChanges);\n tracks.addEventListener('addtrack', trackListChanges);\n _this28.on('dispose', function () {\n tracks.removeEventListener('removetrack', trackListChanges);\n tracks.removeEventListener('addtrack', trackListChanges);\n });\n });\n }\n\n /**\n * Emulate TextTracks using vtt.js if necessary\n *\n * @fires Tech#vttjsloaded\n * @fires Tech#vttjserror\n */\n }, {\n key: \"addWebVttScript_\",\n value: function addWebVttScript_() {\n var _this29 = this;\n if (window$1.WebVTT) {\n return;\n }\n\n // Initially, Tech.el_ is a child of a dummy-div wait until the Component system\n // signals that the Tech is ready at which point Tech.el_ is part of the DOM\n // before inserting the WebVTT script\n if (document.body.contains(this.el())) {\n // load via require if available and vtt.js script location was not passed in\n // as an option. novtt builds will turn the above require call into an empty object\n // which will cause this if check to always fail.\n if (!this.options_['vtt.js'] && isPlain(vtt) && Object.keys(vtt).length > 0) {\n this.trigger('vttjsloaded');\n return;\n }\n\n // load vtt.js via the script location option or the cdn of no location was\n // passed in\n var script = document.createElement('script');\n script.src = this.options_['vtt.js'] || 'https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js';\n script.onload = function () {\n /**\n * Fired when vtt.js is loaded.\n *\n * @event Tech#vttjsloaded\n * @type {Event}\n */\n _this29.trigger('vttjsloaded');\n };\n script.onerror = function () {\n /**\n * Fired when vtt.js was not loaded due to an error\n *\n * @event Tech#vttjsloaded\n * @type {Event}\n */\n _this29.trigger('vttjserror');\n };\n this.on('dispose', function () {\n script.onload = null;\n script.onerror = null;\n });\n // but have not loaded yet and we set it to true before the inject so that\n // we don't overwrite the injected window.WebVTT if it loads right away\n window$1.WebVTT = true;\n this.el().parentNode.appendChild(script);\n } else {\n this.ready(this.addWebVttScript_);\n }\n }\n\n /**\n * Emulate texttracks\n *\n */\n }, {\n key: \"emulateTextTracks\",\n value: function emulateTextTracks() {\n var _this30 = this;\n var tracks = this.textTracks();\n var remoteTracks = this.remoteTextTracks();\n var handleAddTrack = function handleAddTrack(e) {\n return tracks.addTrack(e.track);\n };\n var handleRemoveTrack = function handleRemoveTrack(e) {\n return tracks.removeTrack(e.track);\n };\n remoteTracks.on('addtrack', handleAddTrack);\n remoteTracks.on('removetrack', handleRemoveTrack);\n this.addWebVttScript_();\n var updateDisplay = function updateDisplay() {\n return _this30.trigger('texttrackchange');\n };\n var textTracksChanges = function textTracksChanges() {\n updateDisplay();\n for (var _i26 = 0; _i26 < tracks.length; _i26++) {\n var track = tracks[_i26];\n track.removeEventListener('cuechange', updateDisplay);\n if (track.mode === 'showing') {\n track.addEventListener('cuechange', updateDisplay);\n }\n }\n };\n textTracksChanges();\n tracks.addEventListener('change', textTracksChanges);\n tracks.addEventListener('addtrack', textTracksChanges);\n tracks.addEventListener('removetrack', textTracksChanges);\n this.on('dispose', function () {\n remoteTracks.off('addtrack', handleAddTrack);\n remoteTracks.off('removetrack', handleRemoveTrack);\n tracks.removeEventListener('change', textTracksChanges);\n tracks.removeEventListener('addtrack', textTracksChanges);\n tracks.removeEventListener('removetrack', textTracksChanges);\n for (var _i27 = 0; _i27 < tracks.length; _i27++) {\n var track = tracks[_i27];\n track.removeEventListener('cuechange', updateDisplay);\n }\n });\n }\n\n /**\n * Create and returns a remote {@link TextTrack} object.\n *\n * @param {string} kind\n * `TextTrack` kind (subtitles, captions, descriptions, chapters, or metadata)\n *\n * @param {string} [label]\n * Label to identify the text track\n *\n * @param {string} [language]\n * Two letter language abbreviation\n *\n * @return {TextTrack}\n * The TextTrack that gets created.\n */\n }, {\n key: \"addTextTrack\",\n value: function addTextTrack(kind, label, language) {\n if (!kind) {\n throw new Error('TextTrack kind is required but was not provided');\n }\n return createTrackHelper(this, kind, label, language);\n }\n\n /**\n * Create an emulated TextTrack for use by addRemoteTextTrack\n *\n * This is intended to be overridden by classes that inherit from\n * Tech in order to create native or custom TextTracks.\n *\n * @param {Object} options\n * The object should contain the options to initialize the TextTrack with.\n *\n * @param {string} [options.kind]\n * `TextTrack` kind (subtitles, captions, descriptions, chapters, or metadata).\n *\n * @param {string} [options.label].\n * Label to identify the text track\n *\n * @param {string} [options.language]\n * Two letter language abbreviation.\n *\n * @return {HTMLTrackElement}\n * The track element that gets created.\n */\n }, {\n key: \"createRemoteTextTrack\",\n value: function createRemoteTextTrack(options) {\n var track = merge$1(options, {\n tech: this\n });\n return new REMOTE.remoteTextEl.TrackClass(track);\n }\n\n /**\n * Creates a remote text track object and returns an html track element.\n *\n * > Note: This can be an emulated {@link HTMLTrackElement} or a native one.\n *\n * @param {Object} options\n * See {@link Tech#createRemoteTextTrack} for more detailed properties.\n *\n * @param {boolean} [manualCleanup=false]\n * - When false: the TextTrack will be automatically removed from the video\n * element whenever the source changes\n * - When True: The TextTrack will have to be cleaned up manually\n *\n * @return {HTMLTrackElement}\n * An Html Track Element.\n *\n */\n }, {\n key: \"addRemoteTextTrack\",\n value: function addRemoteTextTrack() {\n var _this31 = this;\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var manualCleanup = arguments.length > 1 ? arguments[1] : undefined;\n var htmlTrackElement = this.createRemoteTextTrack(options);\n if (typeof manualCleanup !== 'boolean') {\n manualCleanup = false;\n }\n\n // store HTMLTrackElement and TextTrack to remote list\n this.remoteTextTrackEls().addTrackElement_(htmlTrackElement);\n this.remoteTextTracks().addTrack(htmlTrackElement.track);\n if (manualCleanup === false) {\n // create the TextTrackList if it doesn't exist\n this.ready(function () {\n return _this31.autoRemoteTextTracks_.addTrack(htmlTrackElement.track);\n });\n }\n return htmlTrackElement;\n }\n\n /**\n * Remove a remote text track from the remote `TextTrackList`.\n *\n * @param {TextTrack} track\n * `TextTrack` to remove from the `TextTrackList`\n */\n }, {\n key: \"removeRemoteTextTrack\",\n value: function removeRemoteTextTrack(track) {\n var trackElement = this.remoteTextTrackEls().getTrackElementByTrack_(track);\n\n // remove HTMLTrackElement and TextTrack from remote list\n this.remoteTextTrackEls().removeTrackElement_(trackElement);\n this.remoteTextTracks().removeTrack(track);\n this.autoRemoteTextTracks_.removeTrack(track);\n }\n\n /**\n * Gets available media playback quality metrics as specified by the W3C's Media\n * Playback Quality API.\n *\n * @see [Spec]{@link https://wicg.github.io/media-playback-quality}\n *\n * @return {Object}\n * An object with supported media playback quality metrics\n *\n * @abstract\n */\n }, {\n key: \"getVideoPlaybackQuality\",\n value: function getVideoPlaybackQuality() {\n return {};\n }\n\n /**\n * Attempt to create a floating video window always on top of other windows\n * so that users may continue consuming media while they interact with other\n * content sites, or applications on their device.\n *\n * @see [Spec]{@link https://wicg.github.io/picture-in-picture}\n *\n * @return {Promise|undefined}\n * A promise with a Picture-in-Picture window if the browser supports\n * Promises (or one was passed in as an option). It returns undefined\n * otherwise.\n *\n * @abstract\n */\n }, {\n key: \"requestPictureInPicture\",\n value: function requestPictureInPicture() {\n return Promise.reject();\n }\n\n /**\n * A method to check for the value of the 'disablePictureInPicture' <video> property.\n * Defaults to true, as it should be considered disabled if the tech does not support pip\n *\n * @abstract\n */\n }, {\n key: \"disablePictureInPicture\",\n value: function disablePictureInPicture() {\n return true;\n }\n\n /**\n * A method to set or unset the 'disablePictureInPicture' <video> property.\n *\n * @abstract\n */\n }, {\n key: \"setDisablePictureInPicture\",\n value: function setDisablePictureInPicture() {}\n\n /**\n * A fallback implementation of requestVideoFrameCallback using requestAnimationFrame\n *\n * @param {function} cb\n * @return {number} request id\n */\n }, {\n key: \"requestVideoFrameCallback\",\n value: function requestVideoFrameCallback(cb) {\n var _this32 = this;\n var id = newGUID();\n if (!this.isReady_ || this.paused()) {\n this.queuedHanders_.add(id);\n this.one('playing', function () {\n if (_this32.queuedHanders_.has(id)) {\n _this32.queuedHanders_[\"delete\"](id);\n cb();\n }\n });\n } else {\n this.requestNamedAnimationFrame(id, cb);\n }\n return id;\n }\n\n /**\n * A fallback implementation of cancelVideoFrameCallback\n *\n * @param {number} id id of callback to be cancelled\n */\n }, {\n key: \"cancelVideoFrameCallback\",\n value: function cancelVideoFrameCallback(id) {\n if (this.queuedHanders_.has(id)) {\n this.queuedHanders_[\"delete\"](id);\n } else {\n this.cancelNamedAnimationFrame(id);\n }\n }\n\n /**\n * A method to set a poster from a `Tech`.\n *\n * @abstract\n */\n }, {\n key: \"setPoster\",\n value: function setPoster() {}\n\n /**\n * A method to check for the presence of the 'playsinline' <video> attribute.\n *\n * @abstract\n */\n }, {\n key: \"playsinline\",\n value: function playsinline() {}\n\n /**\n * A method to set or unset the 'playsinline' <video> attribute.\n *\n * @abstract\n */\n }, {\n key: \"setPlaysinline\",\n value: function setPlaysinline() {}\n\n /**\n * Attempt to force override of native audio tracks.\n *\n * @param {boolean} override - If set to true native audio will be overridden,\n * otherwise native audio will potentially be used.\n *\n * @abstract\n */\n }, {\n key: \"overrideNativeAudioTracks\",\n value: function overrideNativeAudioTracks(override) {}\n\n /**\n * Attempt to force override of native video tracks.\n *\n * @param {boolean} override - If set to true native video will be overridden,\n * otherwise native video will potentially be used.\n *\n * @abstract\n */\n }, {\n key: \"overrideNativeVideoTracks\",\n value: function overrideNativeVideoTracks(override) {}\n\n /**\n * Check if the tech can support the given mime-type.\n *\n * The base tech does not support any type, but source handlers might\n * overwrite this.\n *\n * @param {string} _type\n * The mimetype to check for support\n *\n * @return {string}\n * 'probably', 'maybe', or empty string\n *\n * @see [Spec]{@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/canPlayType}\n *\n * @abstract\n */\n }, {\n key: \"canPlayType\",\n value: function canPlayType(_type) {\n return '';\n }\n\n /**\n * Check if the type is supported by this tech.\n *\n * The base tech does not support any type, but source handlers might\n * overwrite this.\n *\n * @param {string} _type\n * The media type to check\n * @return {string} Returns the native video element's response\n */\n }], [{\n key: \"canPlayType\",\n value: function canPlayType(_type) {\n return '';\n }\n\n /**\n * Check if the tech can support the given source\n *\n * @param {Object} srcObj\n * The source object\n * @param {Object} options\n * The options passed to the tech\n * @return {string} 'probably', 'maybe', or '' (empty string)\n */\n }, {\n key: \"canPlaySource\",\n value: function canPlaySource(srcObj, options) {\n return Tech.canPlayType(srcObj.type);\n }\n\n /*\n * Return whether the argument is a Tech or not.\n * Can be passed either a Class like `Html5` or a instance like `player.tech_`\n *\n * @param {Object} component\n * The item to check\n *\n * @return {boolean}\n * Whether it is a tech or not\n * - True if it is a tech\n * - False if it is not\n */\n }, {\n key: \"isTech\",\n value: function isTech(component) {\n return component.prototype instanceof Tech || component instanceof Tech || component === Tech;\n }\n\n /**\n * Registers a `Tech` into a shared list for videojs.\n *\n * @param {string} name\n * Name of the `Tech` to register.\n *\n * @param {Object} tech\n * The `Tech` class to register.\n */\n }, {\n key: \"registerTech\",\n value: function registerTech(name, tech) {\n if (!Tech.techs_) {\n Tech.techs_ = {};\n }\n if (!Tech.isTech(tech)) {\n throw new Error(\"Tech \".concat(name, \" must be a Tech\"));\n }\n if (!Tech.canPlayType) {\n throw new Error('Techs must have a static canPlayType method on them');\n }\n if (!Tech.canPlaySource) {\n throw new Error('Techs must have a static canPlaySource method on them');\n }\n name = toTitleCase$1(name);\n Tech.techs_[name] = tech;\n Tech.techs_[toLowerCase(name)] = tech;\n if (name !== 'Tech') {\n // camel case the techName for use in techOrder\n Tech.defaultTechOrder_.push(name);\n }\n return tech;\n }\n\n /**\n * Get a `Tech` from the shared list by name.\n *\n * @param {string} name\n * `camelCase` or `TitleCase` name of the Tech to get\n *\n * @return {Tech|undefined}\n * The `Tech` or undefined if there was no tech with the name requested.\n */\n }, {\n key: \"getTech\",\n value: function getTech(name) {\n if (!name) {\n return;\n }\n if (Tech.techs_ && Tech.techs_[name]) {\n return Tech.techs_[name];\n }\n name = toTitleCase$1(name);\n if (window$1 && window$1.videojs && window$1.videojs[name]) {\n log$1.warn(\"The \".concat(name, \" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)\"));\n return window$1.videojs[name];\n }\n }\n }]);\n return Tech;\n}(Component$1);\n/**\n * Get the {@link VideoTrackList}\n *\n * @returns {VideoTrackList}\n * @method Tech.prototype.videoTracks\n */\n/**\n * Get the {@link AudioTrackList}\n *\n * @returns {AudioTrackList}\n * @method Tech.prototype.audioTracks\n */\n/**\n * Get the {@link TextTrackList}\n *\n * @returns {TextTrackList}\n * @method Tech.prototype.textTracks\n */\n/**\n * Get the remote element {@link TextTrackList}\n *\n * @returns {TextTrackList}\n * @method Tech.prototype.remoteTextTracks\n */\n/**\n * Get the remote element {@link HtmlTrackElementList}\n *\n * @returns {HtmlTrackElementList}\n * @method Tech.prototype.remoteTextTrackEls\n */\nALL.names.forEach(function (name) {\n var props = ALL[name];\n Tech.prototype[props.getterName] = function () {\n this[props.privateName] = this[props.privateName] || new props.ListClass();\n return this[props.privateName];\n };\n});\n\n/**\n * List of associated text tracks\n *\n * @type {TextTrackList}\n * @private\n * @property Tech#textTracks_\n */\n\n/**\n * List of associated audio tracks.\n *\n * @type {AudioTrackList}\n * @private\n * @property Tech#audioTracks_\n */\n\n/**\n * List of associated video tracks.\n *\n * @type {VideoTrackList}\n * @private\n * @property Tech#videoTracks_\n */\n\n/**\n * Boolean indicating whether the `Tech` supports volume control.\n *\n * @type {boolean}\n * @default\n */\nTech.prototype.featuresVolumeControl = true;\n\n/**\n * Boolean indicating whether the `Tech` supports muting volume.\n *\n * @type {boolean}\n * @default\n */\nTech.prototype.featuresMuteControl = true;\n\n/**\n * Boolean indicating whether the `Tech` supports fullscreen resize control.\n * Resizing plugins using request fullscreen reloads the plugin\n *\n * @type {boolean}\n * @default\n */\nTech.prototype.featuresFullscreenResize = false;\n\n/**\n * Boolean indicating whether the `Tech` supports changing the speed at which the video\n * plays. Examples:\n * - Set player to play 2x (twice) as fast\n * - Set player to play 0.5x (half) as fast\n *\n * @type {boolean}\n * @default\n */\nTech.prototype.featuresPlaybackRate = false;\n\n/**\n * Boolean indicating whether the `Tech` supports the `progress` event.\n * This will be used to determine if {@link Tech#manualProgressOn} should be called.\n *\n * @type {boolean}\n * @default\n */\nTech.prototype.featuresProgressEvents = false;\n\n/**\n * Boolean indicating whether the `Tech` supports the `sourceset` event.\n *\n * A tech should set this to `true` and then use {@link Tech#triggerSourceset}\n * to trigger a {@link Tech#event:sourceset} at the earliest time after getting\n * a new source.\n *\n * @type {boolean}\n * @default\n */\nTech.prototype.featuresSourceset = false;\n\n/**\n * Boolean indicating whether the `Tech` supports the `timeupdate` event.\n * This will be used to determine if {@link Tech#manualTimeUpdates} should be called.\n *\n * @type {boolean}\n * @default\n */\nTech.prototype.featuresTimeupdateEvents = false;\n\n/**\n * Boolean indicating whether the `Tech` supports the native `TextTrack`s.\n * This will help us integrate with native `TextTrack`s if the browser supports them.\n *\n * @type {boolean}\n * @default\n */\nTech.prototype.featuresNativeTextTracks = false;\n\n/**\n * Boolean indicating whether the `Tech` supports `requestVideoFrameCallback`.\n *\n * @type {boolean}\n * @default\n */\nTech.prototype.featuresVideoFrameCallback = false;\n\n/**\n * A functional mixin for techs that want to use the Source Handler pattern.\n * Source handlers are scripts for handling specific formats.\n * The source handler pattern is used for adaptive formats (HLS, DASH) that\n * manually load video data and feed it into a Source Buffer (Media Source Extensions)\n * Example: `Tech.withSourceHandlers.call(MyTech);`\n *\n * @param {Tech} _Tech\n * The tech to add source handler functions to.\n *\n * @mixes Tech~SourceHandlerAdditions\n */\nTech.withSourceHandlers = function (_Tech) {\n /**\n * Register a source handler\n *\n * @param {Function} handler\n * The source handler class\n *\n * @param {number} [index]\n * Register it at the following index\n */\n _Tech.registerSourceHandler = function (handler, index) {\n var handlers = _Tech.sourceHandlers;\n if (!handlers) {\n handlers = _Tech.sourceHandlers = [];\n }\n if (index === undefined) {\n // add to the end of the list\n index = handlers.length;\n }\n handlers.splice(index, 0, handler);\n };\n\n /**\n * Check if the tech can support the given type. Also checks the\n * Techs sourceHandlers.\n *\n * @param {string} type\n * The mimetype to check.\n *\n * @return {string}\n * 'probably', 'maybe', or '' (empty string)\n */\n _Tech.canPlayType = function (type) {\n var handlers = _Tech.sourceHandlers || [];\n var can;\n for (var _i28 = 0; _i28 < handlers.length; _i28++) {\n can = handlers[_i28].canPlayType(type);\n if (can) {\n return can;\n }\n }\n return '';\n };\n\n /**\n * Returns the first source handler that supports the source.\n *\n * TODO: Answer question: should 'probably' be prioritized over 'maybe'\n *\n * @param {SourceObject} source\n * The source object\n *\n * @param {Object} options\n * The options passed to the tech\n *\n * @return {SourceHandler|null}\n * The first source handler that supports the source or null if\n * no SourceHandler supports the source\n */\n _Tech.selectSourceHandler = function (source, options) {\n var handlers = _Tech.sourceHandlers || [];\n var can;\n for (var _i29 = 0; _i29 < handlers.length; _i29++) {\n can = handlers[_i29].canHandleSource(source, options);\n if (can) {\n return handlers[_i29];\n }\n }\n return null;\n };\n\n /**\n * Check if the tech can support the given source.\n *\n * @param {SourceObject} srcObj\n * The source object\n *\n * @param {Object} options\n * The options passed to the tech\n *\n * @return {string}\n * 'probably', 'maybe', or '' (empty string)\n */\n _Tech.canPlaySource = function (srcObj, options) {\n var sh = _Tech.selectSourceHandler(srcObj, options);\n if (sh) {\n return sh.canHandleSource(srcObj, options);\n }\n return '';\n };\n\n /**\n * When using a source handler, prefer its implementation of\n * any function normally provided by the tech.\n */\n var deferrable = ['seekable', 'seeking', 'duration'];\n\n /**\n * A wrapper around {@link Tech#seekable} that will call a `SourceHandler`s seekable\n * function if it exists, with a fallback to the Techs seekable function.\n *\n * @method _Tech.seekable\n */\n\n /**\n * A wrapper around {@link Tech#duration} that will call a `SourceHandler`s duration\n * function if it exists, otherwise it will fallback to the techs duration function.\n *\n * @method _Tech.duration\n */\n\n deferrable.forEach(function (fnName) {\n var originalFn = this[fnName];\n if (typeof originalFn !== 'function') {\n return;\n }\n this[fnName] = function () {\n if (this.sourceHandler_ && this.sourceHandler_[fnName]) {\n return this.sourceHandler_[fnName].apply(this.sourceHandler_, arguments);\n }\n return originalFn.apply(this, arguments);\n };\n }, _Tech.prototype);\n\n /**\n * Create a function for setting the source using a source object\n * and source handlers.\n * Should never be called unless a source handler was found.\n *\n * @param {SourceObject} source\n * A source object with src and type keys\n */\n _Tech.prototype.setSource = function (source) {\n var sh = _Tech.selectSourceHandler(source, this.options_);\n if (!sh) {\n // Fall back to a native source handler when unsupported sources are\n // deliberately set\n if (_Tech.nativeSourceHandler) {\n sh = _Tech.nativeSourceHandler;\n } else {\n log$1.error('No source handler found for the current source.');\n }\n }\n\n // Dispose any existing source handler\n this.disposeSourceHandler();\n this.off('dispose', this.disposeSourceHandler_);\n if (sh !== _Tech.nativeSourceHandler) {\n this.currentSource_ = source;\n }\n this.sourceHandler_ = sh.handleSource(source, this, this.options_);\n this.one('dispose', this.disposeSourceHandler_);\n };\n\n /**\n * Clean up any existing SourceHandlers and listeners when the Tech is disposed.\n *\n * @listens Tech#dispose\n */\n _Tech.prototype.disposeSourceHandler = function () {\n // if we have a source and get another one\n // then we are loading something new\n // than clear all of our current tracks\n if (this.currentSource_) {\n this.clearTracks(['audio', 'video']);\n this.currentSource_ = null;\n }\n\n // always clean up auto-text tracks\n this.cleanupAutoTextTracks();\n if (this.sourceHandler_) {\n if (this.sourceHandler_.dispose) {\n this.sourceHandler_.dispose();\n }\n this.sourceHandler_ = null;\n }\n };\n};\n\n// The base Tech class needs to be registered as a Component. It is the only\n// Tech that can be registered as a Component.\nComponent$1.registerComponent('Tech', Tech);\nTech.registerTech('Tech', Tech);\n\n/**\n * A list of techs that should be added to techOrder on Players\n *\n * @private\n */\nTech.defaultTechOrder_ = [];\n\n/**\n * @file middleware.js\n * @module middleware\n */\nvar middlewares = {};\nvar middlewareInstances = {};\nvar TERMINATOR = {};\n\n/**\n * A middleware object is a plain JavaScript object that has methods that\n * match the {@link Tech} methods found in the lists of allowed\n * {@link module:middleware.allowedGetters|getters},\n * {@link module:middleware.allowedSetters|setters}, and\n * {@link module:middleware.allowedMediators|mediators}.\n *\n * @typedef {Object} MiddlewareObject\n */\n\n/**\n * A middleware factory function that should return a\n * {@link module:middleware~MiddlewareObject|MiddlewareObject}.\n *\n * This factory will be called for each player when needed, with the player\n * passed in as an argument.\n *\n * @callback MiddlewareFactory\n * @param { import('../player').default } player\n * A Video.js player.\n */\n\n/**\n * Define a middleware that the player should use by way of a factory function\n * that returns a middleware object.\n *\n * @param {string} type\n * The MIME type to match or `\"*\"` for all MIME types.\n *\n * @param {MiddlewareFactory} middleware\n * A middleware factory function that will be executed for\n * matching types.\n */\nfunction use(type, middleware) {\n middlewares[type] = middlewares[type] || [];\n middlewares[type].push(middleware);\n}\n\n/**\n * Asynchronously sets a source using middleware by recursing through any\n * matching middlewares and calling `setSource` on each, passing along the\n * previous returned value each time.\n *\n * @param { import('../player').default } player\n * A {@link Player} instance.\n *\n * @param {Tech~SourceObject} src\n * A source object.\n *\n * @param {Function}\n * The next middleware to run.\n */\nfunction setSource(player, src, next) {\n player.setTimeout(function () {\n return setSourceHelper(src, middlewares[src.type], next, player);\n }, 1);\n}\n\n/**\n * When the tech is set, passes the tech to each middleware's `setTech` method.\n *\n * @param {Object[]} middleware\n * An array of middleware instances.\n *\n * @param { import('../tech/tech').default } tech\n * A Video.js tech.\n */\nfunction setTech(middleware, tech) {\n middleware.forEach(function (mw) {\n return mw.setTech && mw.setTech(tech);\n });\n}\n\n/**\n * Calls a getter on the tech first, through each middleware\n * from right to left to the player.\n *\n * @param {Object[]} middleware\n * An array of middleware instances.\n *\n * @param { import('../tech/tech').default } tech\n * The current tech.\n *\n * @param {string} method\n * A method name.\n *\n * @return {*}\n * The final value from the tech after middleware has intercepted it.\n */\nfunction get(middleware, tech, method) {\n return middleware.reduceRight(middlewareIterator(method), tech[method]());\n}\n\n/**\n * Takes the argument given to the player and calls the setter method on each\n * middleware from left to right to the tech.\n *\n * @param {Object[]} middleware\n * An array of middleware instances.\n *\n * @param { import('../tech/tech').default } tech\n * The current tech.\n *\n * @param {string} method\n * A method name.\n *\n * @param {*} arg\n * The value to set on the tech.\n *\n * @return {*}\n * The return value of the `method` of the `tech`.\n */\nfunction set(middleware, tech, method, arg) {\n return tech[method](middleware.reduce(middlewareIterator(method), arg));\n}\n\n/**\n * Takes the argument given to the player and calls the `call` version of the\n * method on each middleware from left to right.\n *\n * Then, call the passed in method on the tech and return the result unchanged\n * back to the player, through middleware, this time from right to left.\n *\n * @param {Object[]} middleware\n * An array of middleware instances.\n *\n * @param { import('../tech/tech').default } tech\n * The current tech.\n *\n * @param {string} method\n * A method name.\n *\n * @param {*} arg\n * The value to set on the tech.\n *\n * @return {*}\n * The return value of the `method` of the `tech`, regardless of the\n * return values of middlewares.\n */\nfunction mediate(middleware, tech, method) {\n var arg = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n var callMethod = 'call' + toTitleCase$1(method);\n var middlewareValue = middleware.reduce(middlewareIterator(callMethod), arg);\n var terminated = middlewareValue === TERMINATOR;\n // deprecated. The `null` return value should instead return TERMINATOR to\n // prevent confusion if a techs method actually returns null.\n var returnValue = terminated ? null : tech[method](middlewareValue);\n executeRight(middleware, method, returnValue, terminated);\n return returnValue;\n}\n\n/**\n * Enumeration of allowed getters where the keys are method names.\n *\n * @type {Object}\n */\nvar allowedGetters = {\n buffered: 1,\n currentTime: 1,\n duration: 1,\n muted: 1,\n played: 1,\n paused: 1,\n seekable: 1,\n volume: 1,\n ended: 1\n};\n\n/**\n * Enumeration of allowed setters where the keys are method names.\n *\n * @type {Object}\n */\nvar allowedSetters = {\n setCurrentTime: 1,\n setMuted: 1,\n setVolume: 1\n};\n\n/**\n * Enumeration of allowed mediators where the keys are method names.\n *\n * @type {Object}\n */\nvar allowedMediators = {\n play: 1,\n pause: 1\n};\nfunction middlewareIterator(method) {\n return function (value, mw) {\n // if the previous middleware terminated, pass along the termination\n if (value === TERMINATOR) {\n return TERMINATOR;\n }\n if (mw[method]) {\n return mw[method](value);\n }\n return value;\n };\n}\nfunction executeRight(mws, method, value, terminated) {\n for (var _i30 = mws.length - 1; _i30 >= 0; _i30--) {\n var mw = mws[_i30];\n if (mw[method]) {\n mw[method](terminated, value);\n }\n }\n}\n\n/**\n * Clear the middleware cache for a player.\n *\n * @param { import('../player').default } player\n * A {@link Player} instance.\n */\nfunction clearCacheForPlayer(player) {\n middlewareInstances[player.id()] = null;\n}\n\n/**\n * {\n * [playerId]: [[mwFactory, mwInstance], ...]\n * }\n *\n * @private\n */\nfunction getOrCreateFactory(player, mwFactory) {\n var mws = middlewareInstances[player.id()];\n var mw = null;\n if (mws === undefined || mws === null) {\n mw = mwFactory(player);\n middlewareInstances[player.id()] = [[mwFactory, mw]];\n return mw;\n }\n for (var _i31 = 0; _i31 < mws.length; _i31++) {\n var _mws$_i = _slicedToArray(mws[_i31], 2),\n mwf = _mws$_i[0],\n mwi = _mws$_i[1];\n if (mwf !== mwFactory) {\n continue;\n }\n mw = mwi;\n }\n if (mw === null) {\n mw = mwFactory(player);\n mws.push([mwFactory, mw]);\n }\n return mw;\n}\nfunction setSourceHelper() {\n var src = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var middleware = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n var next = arguments.length > 2 ? arguments[2] : undefined;\n var player = arguments.length > 3 ? arguments[3] : undefined;\n var acc = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];\n var lastRun = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;\n var _middleware = _toArray(middleware),\n mwFactory = _middleware[0],\n mwrest = _middleware.slice(1);\n\n // if mwFactory is a string, then we're at a fork in the road\n if (typeof mwFactory === 'string') {\n setSourceHelper(src, middlewares[mwFactory], next, player, acc, lastRun);\n\n // if we have an mwFactory, call it with the player to get the mw,\n // then call the mw's setSource method\n } else if (mwFactory) {\n var mw = getOrCreateFactory(player, mwFactory);\n\n // if setSource isn't present, implicitly select this middleware\n if (!mw.setSource) {\n acc.push(mw);\n return setSourceHelper(src, mwrest, next, player, acc, lastRun);\n }\n mw.setSource(Object.assign({}, src), function (err, _src) {\n // something happened, try the next middleware on the current level\n // make sure to use the old src\n if (err) {\n return setSourceHelper(src, mwrest, next, player, acc, lastRun);\n }\n\n // we've succeeded, now we need to go deeper\n acc.push(mw);\n\n // if it's the same type, continue down the current chain\n // otherwise, we want to go down the new chain\n setSourceHelper(_src, src.type === _src.type ? mwrest : middlewares[_src.type], next, player, acc, lastRun);\n });\n } else if (mwrest.length) {\n setSourceHelper(src, mwrest, next, player, acc, lastRun);\n } else if (lastRun) {\n next(src, acc);\n } else {\n setSourceHelper(src, middlewares['*'], next, player, acc, true);\n }\n}\n\n/**\n * Mimetypes\n *\n * @see https://www.iana.org/assignments/media-types/media-types.xhtml\n * @typedef Mimetypes~Kind\n * @enum\n */\nvar MimetypesKind = {\n opus: 'video/ogg',\n ogv: 'video/ogg',\n mp4: 'video/mp4',\n mov: 'video/mp4',\n m4v: 'video/mp4',\n mkv: 'video/x-matroska',\n m4a: 'audio/mp4',\n mp3: 'audio/mpeg',\n aac: 'audio/aac',\n caf: 'audio/x-caf',\n flac: 'audio/flac',\n oga: 'audio/ogg',\n wav: 'audio/wav',\n m3u8: 'application/x-mpegURL',\n mpd: 'application/dash+xml',\n jpg: 'image/jpeg',\n jpeg: 'image/jpeg',\n gif: 'image/gif',\n png: 'image/png',\n svg: 'image/svg+xml',\n webp: 'image/webp'\n};\n\n/**\n * Get the mimetype of a given src url if possible\n *\n * @param {string} src\n * The url to the src\n *\n * @return {string}\n * return the mimetype if it was known or empty string otherwise\n */\nvar getMimetype = function getMimetype() {\n var src = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var ext = getFileExtension(src);\n var mimetype = MimetypesKind[ext.toLowerCase()];\n return mimetype || '';\n};\n\n/**\n * Find the mime type of a given source string if possible. Uses the player\n * source cache.\n *\n * @param { import('../player').default } player\n * The player object\n *\n * @param {string} src\n * The source string\n *\n * @return {string}\n * The type that was found\n */\nvar findMimetype = function findMimetype(player, src) {\n if (!src) {\n return '';\n }\n\n // 1. check for the type in the `source` cache\n if (player.cache_.source.src === src && player.cache_.source.type) {\n return player.cache_.source.type;\n }\n\n // 2. see if we have this source in our `currentSources` cache\n var matchingSources = player.cache_.sources.filter(function (s) {\n return s.src === src;\n });\n if (matchingSources.length) {\n return matchingSources[0].type;\n }\n\n // 3. look for the src url in source elements and use the type there\n var sources = player.$$('source');\n for (var _i32 = 0; _i32 < sources.length; _i32++) {\n var s = sources[_i32];\n if (s.type && s.src && s.src === src) {\n return s.type;\n }\n }\n\n // 4. finally fallback to our list of mime types based on src url extension\n return getMimetype(src);\n};\n\n/**\n * @module filter-source\n */\n\n/**\n * Filter out single bad source objects or multiple source objects in an\n * array. Also flattens nested source object arrays into a 1 dimensional\n * array of source objects.\n *\n * @param {Tech~SourceObject|Tech~SourceObject[]} src\n * The src object to filter\n *\n * @return {Tech~SourceObject[]}\n * An array of sourceobjects containing only valid sources\n *\n * @private\n */\nvar filterSource = function filterSource(src) {\n // traverse array\n if (Array.isArray(src)) {\n var newsrc = [];\n src.forEach(function (srcobj) {\n srcobj = filterSource(srcobj);\n if (Array.isArray(srcobj)) {\n newsrc = newsrc.concat(srcobj);\n } else if (isObject(srcobj)) {\n newsrc.push(srcobj);\n }\n });\n src = newsrc;\n } else if (typeof src === 'string' && src.trim()) {\n // convert string into object\n src = [fixSource({\n src: src\n })];\n } else if (isObject(src) && typeof src.src === 'string' && src.src && src.src.trim()) {\n // src is already valid\n src = [fixSource(src)];\n } else {\n // invalid source, turn it into an empty array\n src = [];\n }\n return src;\n};\n\n/**\n * Checks src mimetype, adding it when possible\n *\n * @param {Tech~SourceObject} src\n * The src object to check\n * @return {Tech~SourceObject}\n * src Object with known type\n */\nfunction fixSource(src) {\n if (!src.type) {\n var mimetype = getMimetype(src.src);\n if (mimetype) {\n src.type = mimetype;\n }\n }\n return src;\n}\nvar icons = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n <defs>\\n <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-play\\\">\\n <path d=\\\"M16 10v28l22-14z\\\"></path>\\n </symbol>\\n <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-pause\\\">\\n <path d=\\\"M12 38h8V10h-8v28zm16-28v28h8V10h-8z\\\"></path>\\n </symbol>\\n <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-audio\\\">\\n <path d=\\\"M24 2C14.06 2 6 10.06 6 20v14c0 3.31 2.69 6 6 6h6V24h-8v-4c0-7.73 6.27-14 14-14s14 6.27 14 14v4h-8v16h6c3.31 0 6-2.69 6-6V20c0-9.94-8.06-18-18-18z\\\"></path>\\n </symbol>\\n <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-captions\\\">\\n <path d=\\\"M38 8H10c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM22 22h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2zm14 0h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2z\\\"></path>\\n </symbol>\\n <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-subtitles\\\">\\n <path d=\\\"M40 8H8c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM8 24h8v4H8v-4zm20 12H8v-4h20v4zm12 0h-8v-4h8v4zm0-8H20v-4h20v4z\\\"></path>\\n </symbol>\\n <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-fullscreen-enter\\\">\\n <path d=\\\"M14 28h-4v10h10v-4h-6v-6zm-4-8h4v-6h6v-4H10v10zm24 14h-6v4h10V28h-4v6zm-6-24v4h6v6h4V10H28z\\\"></path>\\n </symbol>\\n <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-fullscreen-exit\\\">\\n <path d=\\\"M10 32h6v6h4V28H10v4zm6-16h-6v4h10V10h-4v6zm12 22h4v-6h6v-4H28v10zm4-22v-6h-4v10h10v-4h-6z\\\"></path>\\n </symbol>\\n <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-play-circle\\\">\\n <path d=\\\"M20 33l12-9-12-9v18zm4-29C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z\\\"></path>\\n </symbol>\\n <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-mute\\\">\\n <path d=\\\"M33 24c0-3.53-2.04-6.58-5-8.05v4.42l4.91 4.91c.06-.42.09-.85.09-1.28zm5 0c0 1.88-.41 3.65-1.08 5.28l3.03 3.03C41.25 29.82 42 27 42 24c0-8.56-5.99-15.72-14-17.54v4.13c5.78 1.72 10 7.07 10 13.41zM8.55 6L6 8.55 15.45 18H6v12h8l10 10V26.55l8.51 8.51c-1.34 1.03-2.85 1.86-4.51 2.36v4.13a17.94 17.94 0 0 0 7.37-3.62L39.45 42 42 39.45l-18-18L8.55 6zM24 8l-4.18 4.18L24 16.36V8z\\\"></path>\\n </symbol>\\n <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-low\\\">\\n <path d=\\\"M14 18v12h8l10 10V8L22 18h-8z\\\"></path>\\n </symbol>\\n <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-medium\\\">\\n <path d=\\\"M37 24c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zm-27-6v12h8l10 10V8L18 18h-8z\\\"></path>\\n </symbol>\\n <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-high\\\">\\n <path d=\\\"M6 18v12h8l10 10V8L14 18H6zm27 6c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zM28 6.46v4.13c5.78 1.72 10 7.07 10 13.41s-4.22 11.69-10 13.41v4.13c8.01-1.82 14-8.97 14-17.54S36.01 8.28 28 6.46z\\\"></path>\\n </symbol>\\n <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-spinner\\\">\\n <path d=\\\"M18.8 21l9.53-16.51C26.94 4.18 25.49 4 24 4c-4.8 0-9.19 1.69-12.64 4.51l7.33 12.69.11-.2zm24.28-3c-1.84-5.85-6.3-10.52-11.99-12.68L23.77 18h19.31zm.52 2H28.62l.58 1 9.53 16.5C41.99 33.94 44 29.21 44 24c0-1.37-.14-2.71-.4-4zm-26.53 4l-7.8-13.5C6.01 14.06 4 18.79 4 24c0 1.37.14 2.71.4 4h14.98l-2.31-4zM4.92 30c1.84 5.85 6.3 10.52 11.99 12.68L24.23 30H4.92zm22.54 0l-7.8 13.51c1.4.31 2.85.49 4.34.49 4.8 0 9.19-1.69 12.64-4.51L29.31 26.8 27.46 30z\\\"></path>\\n </symbol>\\n <symbol viewBox=\\\"0 0 24 24\\\" id=\\\"vjs-icon-hd\\\">\\n <path d=\\\"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-4V9zm1.5 4.5h2v-3h-2v3z\\\"></path>\\n </symbol>\\n <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-chapters\\\">\\n <path d=\\\"M6 26h4v-4H6v4zm0 8h4v-4H6v4zm0-16h4v-4H6v4zm8 8h28v-4H14v4zm0 8h28v-4H14v4zm0-20v4h28v-4H14z\\\"></path>\\n </symbol>\\n <symbol viewBox=\\\"0 0 40 40\\\" id=\\\"vjs-icon-downloading\\\">\\n <path d=\\\"M18.208 36.875q-3.208-.292-5.979-1.729-2.771-1.438-4.812-3.729-2.042-2.292-3.188-5.229-1.146-2.938-1.146-6.23 0-6.583 4.334-11.416 4.333-4.834 10.833-5.5v3.166q-5.167.75-8.583 4.646Q6.25 14.75 6.25 19.958q0 5.209 3.396 9.104 3.396 3.896 8.562 4.646zM20 28.417L11.542 20l2.083-2.083 4.917 4.916v-11.25h2.916v11.25l4.875-4.916L28.417 20zm1.792 8.458v-3.167q1.833-.25 3.541-.958 1.709-.708 3.167-1.875l2.333 2.292q-1.958 1.583-4.25 2.541-2.291.959-4.791 1.167zm6.791-27.792q-1.541-1.125-3.25-1.854-1.708-.729-3.541-1.021V3.042q2.5.25 4.77 1.208 2.271.958 4.271 2.5zm4.584 21.584l-2.25-2.25q1.166-1.5 1.854-3.209.687-1.708.937-3.541h3.209q-.292 2.5-1.229 4.791-.938 2.292-2.521 4.209zm.541-12.417q-.291-1.833-.958-3.562-.667-1.73-1.833-3.188l2.375-2.208q1.541 1.916 2.458 4.208.917 2.292 1.167 4.75z\\\"></path>\\n </symbol>\\n <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download\\\">\\n <path d=\\\"M10.8 40.55q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h26.35v-7.7h3.4v7.7q0 1.4-1 2.4t-2.4 1zM24 32.1L13.9 22.05l2.45-2.45 5.95 5.95V7.15h3.4v18.4l5.95-5.95 2.45 2.45z\\\"></path>\\n </symbol>\\n <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download-done\\\">\\n <path d=\\\"M9.8 40.5v-3.45h28.4v3.45zm9.2-9.05L7.4 19.85l2.45-2.35L19 26.65l19.2-19.2 2.4 2.4z\\\"></path>\\n </symbol>\\n <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download-off\\\">\\n <path d=\\\"M4.9 4.75L43.25 43.1 41 45.3l-4.75-4.75q-.05.05-.075.025-.025-.025-.075-.025H10.8q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h22.05l-7-7-1.85 1.8L13.9 21.9l1.85-1.85L2.7 7zm26.75 14.7l2.45 2.45-3.75 3.8-2.45-2.5zM25.7 7.15V21.1l-3.4-3.45V7.15z\\\"></path>\\n </symbol>\\n <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-share\\\">\\n <path d=\\\"M36 32.17c-1.52 0-2.89.59-3.93 1.54L17.82 25.4c.11-.45.18-.92.18-1.4s-.07-.95-.18-1.4l14.1-8.23c1.07 1 2.5 1.62 4.08 1.62 3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6c0 .48.07.95.18 1.4l-14.1 8.23c-1.07-1-2.5-1.62-4.08-1.62-3.31 0-6 2.69-6 6s2.69 6 6 6c1.58 0 3.01-.62 4.08-1.62l14.25 8.31c-.1.42-.16.86-.16 1.31A5.83 5.83 0 1 0 36 32.17z\\\"></path>\\n </symbol>\\n <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cog\\\">\\n <path d=\\\"M38.86 25.95c.08-.64.14-1.29.14-1.95s-.06-1.31-.14-1.95l4.23-3.31c.38-.3.49-.84.24-1.28l-4-6.93c-.25-.43-.77-.61-1.22-.43l-4.98 2.01c-1.03-.79-2.16-1.46-3.38-1.97L29 4.84c-.09-.47-.5-.84-1-.84h-8c-.5 0-.91.37-.99.84l-.75 5.3a14.8 14.8 0 0 0-3.38 1.97L9.9 10.1a1 1 0 0 0-1.22.43l-4 6.93c-.25.43-.14.97.24 1.28l4.22 3.31C9.06 22.69 9 23.34 9 24s.06 1.31.14 1.95l-4.22 3.31c-.38.3-.49.84-.24 1.28l4 6.93c.25.43.77.61 1.22.43l4.98-2.01c1.03.79 2.16 1.46 3.38 1.97l.75 5.3c.08.47.49.84.99.84h8c.5 0 .91-.37.99-.84l.75-5.3a14.8 14.8 0 0 0 3.38-1.97l4.98 2.01a1 1 0 0 0 1.22-.43l4-6.93c.25-.43.14-.97-.24-1.28l-4.22-3.31zM24 31c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z\\\"></path>\\n </symbol>\\n <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-square\\\">\\n <path d=\\\"M36 8H12c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h24c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zm0 28H12V12h24v24z\\\"></path>\\n </symbol>\\n <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle\\\">\\n <circle cx=\\\"24\\\" cy=\\\"24\\\" r=\\\"20\\\"></circle>\\n </symbol>\\n <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle-outline\\\">\\n <path d=\\\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z\\\"></path>\\n </symbol>\\n <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle-inner-circle\\\">\\n <path d=\\\"M24 4C12.97 4 4 12.97 4 24s8.97 20 20 20 20-8.97 20-20S35.03 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16zm6-16c0 3.31-2.69 6-6 6s-6-2.69-6-6 2.69-6 6-6 6 2.69 6 6z\\\"></path>\\n </symbol>\\n <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cancel\\\">\\n <path d=\\\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm10 27.17L31.17 34 24 26.83 16.83 34 14 31.17 21.17 24 14 16.83 16.83 14 24 21.17 31.17 14 34 16.83 26.83 24 34 31.17z\\\"></path>\\n </symbol>\\n <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-replay\\\">\\n <path d=\\\"M24 10V2L14 12l10 10v-8c6.63 0 12 5.37 12 12s-5.37 12-12 12-12-5.37-12-12H8c0 8.84 7.16 16 16 16s16-7.16 16-16-7.16-16-16-16z\\\"></path>\\n </symbol>\\n <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-repeat\\\">\\n <path d=\\\"M14 14h20v6l8-8-8-8v6H10v12h4v-8zm20 20H14v-6l-8 8 8 8v-6h24V26h-4v8z\\\"></path>\\n </symbol>\\n <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-5\\\">\\n <path d=\\\"M17.689 98l-8.697 8.696 8.697 8.697 2.486-2.485-4.32-4.319h1.302c4.93 0 9.071 1.722 12.424 5.165 3.352 3.443 5.029 7.638 5.029 12.584h3.55c0-2.958-.553-5.73-1.658-8.313-1.104-2.583-2.622-4.841-4.555-6.774-1.932-1.932-4.19-3.45-6.773-4.555-2.584-1.104-5.355-1.657-8.313-1.657H15.5l4.615-4.615zm-8.08 21.659v13.861h11.357v5.008H9.609V143h12.7c.834 0 1.55-.298 2.146-.894.596-.597.895-1.31.895-2.145v-7.781c0-.835-.299-1.55-.895-2.147a2.929 2.929 0 0 0-2.147-.894h-8.227v-5.096H25.35v-4.384z\\\"></path>\\n </symbol>\\n <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-10\\\">\\n <path d=\\\"M42.315 125.63c0-4.997-1.694-9.235-5.08-12.713-3.388-3.479-7.571-5.218-12.552-5.218h-1.315l4.363 4.363-2.51 2.51-8.787-8.786L25.221 97l2.45 2.45-4.662 4.663h1.375c2.988 0 5.788.557 8.397 1.673 2.61 1.116 4.892 2.65 6.844 4.602 1.953 1.953 3.487 4.234 4.602 6.844 1.116 2.61 1.674 5.41 1.674 8.398zM8.183 142v-19.657H3.176V117.8h9.643V142zm13.63 0c-1.156 0-2.127-.393-2.912-1.178-.778-.778-1.168-1.746-1.168-2.902v-16.04c0-1.156.393-2.127 1.178-2.912.779-.779 1.746-1.168 2.902-1.168h7.696c1.156 0 2.126.392 2.911 1.177.779.78 1.168 1.747 1.168 2.903v16.04c0 1.156-.392 2.127-1.177 2.912-.779.779-1.746 1.168-2.902 1.168zm.556-4.636h6.583v-15.02H22.37z\\\"></path>\\n </symbol>\\n <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-30\\\">\\n <path d=\\\"M26.047 97l-8.733 8.732 8.733 8.733 2.496-2.494-4.336-4.338h1.307c4.95 0 9.108 1.73 12.474 5.187 3.367 3.458 5.051 7.668 5.051 12.635h3.565c0-2.97-.556-5.751-1.665-8.346-1.109-2.594-2.633-4.862-4.574-6.802-1.94-1.941-4.208-3.466-6.803-4.575-2.594-1.109-5.375-1.664-8.345-1.664H23.85l4.634-4.634zM2.555 117.531v4.688h10.297v5.25H5.873v4.687h6.979v5.156H2.555V142H13.36c1.061 0 1.95-.395 2.668-1.186.718-.79 1.076-1.772 1.076-2.94v-16.218c0-1.168-.358-2.149-1.076-2.94-.717-.79-1.607-1.185-2.668-1.185zm22.482.14c-1.149 0-2.11.39-2.885 1.165-.78.78-1.172 1.744-1.172 2.893v15.943c0 1.149.388 2.11 1.163 2.885.78.78 1.745 1.172 2.894 1.172h7.649c1.148 0 2.11-.388 2.884-1.163.78-.78 1.17-1.745 1.17-2.894v-15.943c0-1.15-.386-2.111-1.16-2.885-.78-.78-1.746-1.172-2.894-1.172zm.553 4.518h6.545v14.93H25.59z\\\"></path>\\n </symbol>\\n <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-5\\\">\\n <path d=\\\"M29.508 97l-2.431 2.43 4.625 4.625h-1.364c-2.965 0-5.742.554-8.332 1.66-2.589 1.107-4.851 2.629-6.788 4.566-1.937 1.937-3.458 4.2-4.565 6.788-1.107 2.59-1.66 5.367-1.66 8.331h3.557c0-4.957 1.68-9.16 5.04-12.611 3.36-3.45 7.51-5.177 12.451-5.177h1.304l-4.326 4.33 2.49 2.49 8.715-8.716zm-9.783 21.61v13.89h11.382v5.018H19.725V142h12.727a2.93 2.93 0 0 0 2.15-.896 2.93 2.93 0 0 0 .896-2.15v-7.798c0-.837-.299-1.554-.896-2.152a2.93 2.93 0 0 0-2.15-.896h-8.245V123h11.29v-4.392z\\\"></path>\\n </symbol>\\n <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-10\\\">\\n <path d=\\\"M23.119 97l-2.386 2.383 4.538 4.538h-1.339c-2.908 0-5.633.543-8.173 1.63-2.54 1.085-4.76 2.577-6.66 4.478-1.9 1.9-3.392 4.12-4.478 6.66-1.085 2.54-1.629 5.264-1.629 8.172h3.49c0-4.863 1.648-8.986 4.944-12.372 3.297-3.385 7.368-5.078 12.216-5.078h1.279l-4.245 4.247 2.443 2.442 8.55-8.55zm-9.52 21.45v4.42h4.871V142h4.513v-23.55zm18.136 0c-1.125 0-2.066.377-2.824 1.135-.764.764-1.148 1.709-1.148 2.834v15.612c0 1.124.38 2.066 1.139 2.824.764.764 1.708 1.145 2.833 1.145h7.489c1.125 0 2.066-.378 2.824-1.136.764-.764 1.145-1.709 1.145-2.833v-15.612c0-1.125-.378-2.067-1.136-2.825-.764-.764-1.708-1.145-2.833-1.145zm.54 4.42h6.408v14.617h-6.407z\\\"></path>\\n </symbol>\\n <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-30\\\">\\n <path d=\\\"M25.549 97l-2.437 2.434 4.634 4.635H26.38c-2.97 0-5.753.555-8.347 1.664-2.594 1.109-4.861 2.633-6.802 4.574-1.94 1.94-3.465 4.207-4.574 6.802-1.109 2.594-1.664 5.377-1.664 8.347h3.565c0-4.967 1.683-9.178 5.05-12.636 3.366-3.458 7.525-5.187 12.475-5.187h1.307l-4.335 4.338 2.495 2.494 8.732-8.732zm-11.553 20.53v4.689h10.297v5.249h-6.978v4.688h6.978v5.156H13.996V142h10.808c1.06 0 1.948-.395 2.666-1.186.718-.79 1.077-1.771 1.077-2.94v-16.217c0-1.169-.36-2.15-1.077-2.94-.718-.79-1.605-1.186-2.666-1.186zm21.174.168c-1.149 0-2.11.389-2.884 1.163-.78.78-1.172 1.745-1.172 2.894v15.942c0 1.15.388 2.11 1.162 2.885.78.78 1.745 1.17 2.894 1.17h7.649c1.149 0 2.11-.386 2.885-1.16.78-.78 1.17-1.746 1.17-2.895v-15.942c0-1.15-.387-2.11-1.161-2.885-.78-.78-1.745-1.172-2.894-1.172zm.552 4.516h6.542v14.931h-6.542z\\\"></path>\\n </symbol>\\n <symbol viewBox=\\\"0 0 512 512\\\" id=\\\"vjs-icon-audio-description\\\">\\n <g fill-rule=\\\"evenodd\\\"><path d=\\\"M227.29 381.351V162.993c50.38-1.017 89.108-3.028 117.631 17.126 27.374 19.342 48.734 56.965 44.89 105.325-4.067 51.155-41.335 94.139-89.776 98.475-24.085 2.155-71.972 0-71.972 0s-.84-1.352-.773-2.568m48.755-54.804c31.43 1.26 53.208-16.633 56.495-45.386 4.403-38.51-21.188-63.552-58.041-60.796v103.612c-.036 1.466.575 2.22 1.546 2.57\\\"></path><path d=\\\"M383.78 381.328c13.336 3.71 17.387-11.06 23.215-21.408 12.722-22.571 22.294-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.226 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894\\\"></path><path d=\\\"M425.154 381.328c13.336 3.71 17.384-11.061 23.215-21.408 12.721-22.571 22.291-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.511c-.586 3.874 2.226 7.315 3.866 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894\\\"></path><path d=\\\"M466.26 381.328c13.337 3.71 17.385-11.061 23.216-21.408 12.722-22.571 22.292-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.225 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894M4.477 383.005H72.58l18.573-28.484 64.169-.135s.065 19.413.065 28.62h48.756V160.307h-58.816c-5.653 9.537-140.85 222.697-140.85 222.697zm152.667-145.282v71.158l-40.453-.27 40.453-70.888z\\\"></path></g>\\n </symbol>\\n <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-next-item\\\">\\n <path d=\\\"M12 36l17-12-17-12v24zm20-24v24h4V12h-4z\\\"></path>\\n </symbol>\\n <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-previous-item\\\">\\n <path d=\\\"M12 12h4v24h-4zm7 12l17 12V12z\\\"></path>\\n </symbol>\\n <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-shuffle\\\">\\n <path d=\\\"M21.17 18.34L10.83 8 8 10.83l10.34 10.34 2.83-2.83zM29 8l4.09 4.09L8 37.17 10.83 40l25.09-25.09L40 19V8H29zm.66 18.83l-2.83 2.83 6.26 6.26L29 40h11V29l-4.09 4.09-6.25-6.26z\\\"></path>\\n </symbol>\\n <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cast\\\">\\n <path d=\\\"M42 6H6c-2.21 0-4 1.79-4 4v6h4v-6h36v28H28v4h14c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4zM2 36v6h6c0-3.31-2.69-6-6-6zm0-8v4c5.52 0 10 4.48 10 10h4c0-7.73-6.27-14-14-14zm0-8v4c9.94 0 18 8.06 18 18h4c0-12.15-9.85-22-22-22z\\\"></path>\\n </symbol>\\n <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-picture-in-picture-enter\\\">\\n <path d=\\\"M38 22H22v11.99h16V22zm8 16V9.96C46 7.76 44.2 6 42 6H6C3.8 6 2 7.76 2 9.96V38c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4zm-4 .04H6V9.94h36v28.1z\\\"></path>\\n </symbol>\\n <symbol viewBox=\\\"0 0 22 18\\\" id=\\\"vjs-icon-picture-in-picture-exit\\\">\\n <path d=\\\"M18 4H4v10h14V4zm4 12V1.98C22 .88 21.1 0 20 0H2C.9 0 0 .88 0 1.98V16c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zm-2 .02H2V1.97h18v14.05z\\\"></path>\\n <path fill=\\\"none\\\" d=\\\"M-1-3h24v24H-1z\\\"></path>\\n </symbol>\\n <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-facebook\\\">\\n <path d=\\\"M1343 12v264h-157q-86 0-116 36t-30 108v189h293l-39 296h-254v759H734V905H479V609h255V391q0-186 104-288.5T1115 0q147 0 228 12z\\\"></path>\\n </symbol>\\n <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-linkedin\\\">\\n <path d=\\\"M477 625v991H147V625h330zm21-306q1 73-50.5 122T312 490h-2q-82 0-132-49t-50-122q0-74 51.5-122.5T314 148t133 48.5T498 319zm1166 729v568h-329v-530q0-105-40.5-164.5T1168 862q-63 0-105.5 34.5T999 982q-11 30-11 81v553H659q2-399 2-647t-1-296l-1-48h329v144h-2q20-32 41-56t56.5-52 87-43.5T1285 602q171 0 275 113.5t104 332.5z\\\"></path>\\n </symbol>\\n <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-twitter\\\">\\n <path d=\\\"M1684 408q-67 98-162 167 1 14 1 42 0 130-38 259.5T1369.5 1125 1185 1335.5t-258 146-323 54.5q-271 0-496-145 35 4 78 4 225 0 401-138-105-2-188-64.5T285 1033q33 5 61 5 43 0 85-11-112-23-185.5-111.5T172 710v-4q68 38 146 41-66-44-105-115t-39-154q0-88 44-163 121 149 294.5 238.5T884 653q-8-38-8-74 0-134 94.5-228.5T1199 256q140 0 236 102 109-21 205-78-37 115-142 178 93-10 186-50z\\\"></path>\\n </symbol>\\n <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-tumblr\\\">\\n <path d=\\\"M1328 1329l80 237q-23 35-111 66t-177 32q-104 2-190.5-26T787 1564t-95-106-55.5-120-16.5-118V676H452V461q72-26 129-69.5t91-90 58-102 34-99T779 12q1-5 4.5-8.5T791 0h244v424h333v252h-334v518q0 30 6.5 56t22.5 52.5 49.5 41.5 81.5 14q78-2 134-29z\\\"></path>\\n </symbol>\\n <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-pinterest\\\">\\n <path d=\\\"M1664 896q0 209-103 385.5T1281.5 1561 896 1664q-111 0-218-32 59-93 78-164 9-34 54-211 20 39 73 67.5t114 28.5q121 0 216-68.5t147-188.5 52-270q0-114-59.5-214T1180 449t-255-63q-105 0-196 29t-154.5 77-109 110.5-67 129.5T377 866q0 104 40 183t117 111q30 12 38-20 2-7 8-31t8-30q6-23-11-43-51-61-51-151 0-151 104.5-259.5T904 517q151 0 235.5 82t84.5 213q0 170-68.5 289T980 1220q-61 0-98-43.5T859 1072q8-35 26.5-93.5t30-103T927 800q0-50-27-83t-77-33q-62 0-105 57t-43 142q0 73 25 122l-99 418q-17 70-13 177-206-91-333-281T128 896q0-209 103-385.5T510.5 231 896 128t385.5 103T1561 510.5 1664 896z\\\"></path>\\n </symbol>\\n </defs>\\n</svg>\";\n\n/**\n * @file loader.js\n */\n\n/**\n * The `MediaLoader` is the `Component` that decides which playback technology to load\n * when a player is initialized.\n *\n * @extends Component\n */\nvar MediaLoader = /*#__PURE__*/function (_Component$3) {\n _inherits(MediaLoader, _Component$3);\n var _super12 = _createSuper(MediaLoader);\n /**\n * Create an instance of this class.\n *\n * @param { import('../player').default } player\n * The `Player` that this class should attach to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n *\n * @param {Function} [ready]\n * The function that is run when this component is ready.\n */\n function MediaLoader(player, options, ready) {\n var _this33;\n _classCallCheck(this, MediaLoader);\n // MediaLoader has no element\n var options_ = merge$1({\n createEl: false\n }, options);\n _this33 = _super12.call(this, player, options_, ready);\n\n // If there are no sources when the player is initialized,\n // load the first supported playback technology.\n\n if (!options.playerOptions.sources || options.playerOptions.sources.length === 0) {\n for (var _i33 = 0, j = options.playerOptions.techOrder; _i33 < j.length; _i33++) {\n var techName = toTitleCase$1(j[_i33]);\n var tech = Tech.getTech(techName);\n\n // Support old behavior of techs being registered as components.\n // Remove once that deprecated behavior is removed.\n if (!techName) {\n tech = Component$1.getComponent(techName);\n }\n\n // Check if the browser supports this technology\n if (tech && tech.isSupported()) {\n player.loadTech_(techName);\n break;\n }\n }\n } else {\n // Loop through playback technologies (e.g. HTML5) and check for support.\n // Then load the best source.\n // A few assumptions here:\n // All playback technologies respect preload false.\n player.src(options.playerOptions.sources);\n }\n return _this33;\n }\n return _createClass(MediaLoader);\n}(Component$1);\nComponent$1.registerComponent('MediaLoader', MediaLoader);\n\n/**\n * @file clickable-component.js\n */\n\n/**\n * Component which is clickable or keyboard actionable, but is not a\n * native HTML button.\n *\n * @extends Component\n */\nvar ClickableComponent = /*#__PURE__*/function (_Component$4) {\n _inherits(ClickableComponent, _Component$4);\n var _super13 = _createSuper(ClickableComponent);\n /**\n * Creates an instance of this class.\n *\n * @param { import('./player').default } player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of component options.\n *\n * @param {function} [options.clickHandler]\n * The function to call when the button is clicked / activated\n *\n * @param {string} [options.controlText]\n * The text to set on the button\n *\n * @param {string} [options.className]\n * A class or space separated list of classes to add the component\n *\n */\n function ClickableComponent(player, options) {\n var _this34;\n _classCallCheck(this, ClickableComponent);\n _this34 = _super13.call(this, player, options);\n if (_this34.options_.controlText) {\n _this34.controlText(_this34.options_.controlText);\n }\n _this34.handleMouseOver_ = function (e) {\n return _this34.handleMouseOver(e);\n };\n _this34.handleMouseOut_ = function (e) {\n return _this34.handleMouseOut(e);\n };\n _this34.handleClick_ = function (e) {\n return _this34.handleClick(e);\n };\n _this34.handleKeyDown_ = function (e) {\n return _this34.handleKeyDown(e);\n };\n _this34.emitTapEvents();\n _this34.enable();\n return _this34;\n }\n\n /**\n * Create the `ClickableComponent`s DOM element.\n *\n * @param {string} [tag=div]\n * The element's node type.\n *\n * @param {Object} [props={}]\n * An object of properties that should be set on the element.\n *\n * @param {Object} [attributes={}]\n * An object of attributes that should be set on the element.\n *\n * @return {Element}\n * The element that gets created.\n */\n _createClass(ClickableComponent, [{\n key: \"createEl\",\n value: function createEl() {\n var tag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'div';\n var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var attributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n props = Object.assign({\n className: this.buildCSSClass(),\n tabIndex: 0\n }, props);\n if (tag === 'button') {\n log$1.error(\"Creating a ClickableComponent with an HTML element of \".concat(tag, \" is not supported; use a Button instead.\"));\n }\n\n // Add ARIA attributes for clickable element which is not a native HTML button\n attributes = Object.assign({\n role: 'button'\n }, attributes);\n this.tabIndex_ = props.tabIndex;\n var el = _createEl(tag, props, attributes);\n if (!this.player_.options_.experimentalSvgIcons) {\n el.appendChild(_createEl('span', {\n className: 'vjs-icon-placeholder'\n }, {\n 'aria-hidden': true\n }));\n }\n this.createControlTextEl(el);\n return el;\n }\n }, {\n key: \"dispose\",\n value: function dispose() {\n // remove controlTextEl_ on dispose\n this.controlTextEl_ = null;\n _get(_getPrototypeOf(ClickableComponent.prototype), \"dispose\", this).call(this);\n }\n\n /**\n * Create a control text element on this `ClickableComponent`\n *\n * @param {Element} [el]\n * Parent element for the control text.\n *\n * @return {Element}\n * The control text element that gets created.\n */\n }, {\n key: \"createControlTextEl\",\n value: function createControlTextEl(el) {\n this.controlTextEl_ = _createEl('span', {\n className: 'vjs-control-text'\n }, {\n // let the screen reader user know that the text of the element may change\n 'aria-live': 'polite'\n });\n if (el) {\n el.appendChild(this.controlTextEl_);\n }\n this.controlText(this.controlText_, el);\n return this.controlTextEl_;\n }\n\n /**\n * Get or set the localize text to use for the controls on the `ClickableComponent`.\n *\n * @param {string} [text]\n * Control text for element.\n *\n * @param {Element} [el=this.el()]\n * Element to set the title on.\n *\n * @return {string}\n * - The control text when getting\n */\n }, {\n key: \"controlText\",\n value: function controlText(text) {\n var el = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.el();\n if (text === undefined) {\n return this.controlText_ || 'Need Text';\n }\n var localizedText = this.localize(text);\n\n /** @protected */\n this.controlText_ = text;\n textContent(this.controlTextEl_, localizedText);\n if (!this.nonIconControl && !this.player_.options_.noUITitleAttributes) {\n // Set title attribute if only an icon is shown\n el.setAttribute('title', localizedText);\n }\n }\n\n /**\n * Builds the default DOM `className`.\n *\n * @return {string}\n * The DOM `className` for this object.\n */\n }, {\n key: \"buildCSSClass\",\n value: function buildCSSClass() {\n return \"vjs-control vjs-button \".concat(_get(_getPrototypeOf(ClickableComponent.prototype), \"buildCSSClass\", this).call(this));\n }\n\n /**\n * Enable this `ClickableComponent`\n */\n }, {\n key: \"enable\",\n value: function enable() {\n if (!this.enabled_) {\n this.enabled_ = true;\n this.removeClass('vjs-disabled');\n this.el_.setAttribute('aria-disabled', 'false');\n if (typeof this.tabIndex_ !== 'undefined') {\n this.el_.setAttribute('tabIndex', this.tabIndex_);\n }\n this.on(['tap', 'click'], this.handleClick_);\n this.on('keydown', this.handleKeyDown_);\n }\n }\n\n /**\n * Disable this `ClickableComponent`\n */\n }, {\n key: \"disable\",\n value: function disable() {\n this.enabled_ = false;\n this.addClass('vjs-disabled');\n this.el_.setAttribute('aria-disabled', 'true');\n if (typeof this.tabIndex_ !== 'undefined') {\n this.el_.removeAttribute('tabIndex');\n }\n this.off('mouseover', this.handleMouseOver_);\n this.off('mouseout', this.handleMouseOut_);\n this.off(['tap', 'click'], this.handleClick_);\n this.off('keydown', this.handleKeyDown_);\n }\n\n /**\n * Handles language change in ClickableComponent for the player in components\n *\n *\n */\n }, {\n key: \"handleLanguagechange\",\n value: function handleLanguagechange() {\n this.controlText(this.controlText_);\n }\n\n /**\n * Event handler that is called when a `ClickableComponent` receives a\n * `click` or `tap` event.\n *\n * @param {Event} event\n * The `tap` or `click` event that caused this function to be called.\n *\n * @listens tap\n * @listens click\n * @abstract\n */\n }, {\n key: \"handleClick\",\n value: function handleClick(event) {\n if (this.options_.clickHandler) {\n this.options_.clickHandler.call(this, arguments);\n }\n }\n\n /**\n * Event handler that is called when a `ClickableComponent` receives a\n * `keydown` event.\n *\n * By default, if the key is Space or Enter, it will trigger a `click` event.\n *\n * @param {KeyboardEvent} event\n * The `keydown` event that caused this function to be called.\n *\n * @listens keydown\n */\n }, {\n key: \"handleKeyDown\",\n value: function handleKeyDown(event) {\n // Support Space or Enter key operation to fire a click event. Also,\n // prevent the event from propagating through the DOM and triggering\n // Player hotkeys.\n if (keycode.isEventKey(event, 'Space') || keycode.isEventKey(event, 'Enter')) {\n event.preventDefault();\n event.stopPropagation();\n this.trigger('click');\n } else {\n // Pass keypress handling up for unsupported keys\n _get(_getPrototypeOf(ClickableComponent.prototype), \"handleKeyDown\", this).call(this, event);\n }\n }\n }]);\n return ClickableComponent;\n}(Component$1);\nComponent$1.registerComponent('ClickableComponent', ClickableComponent);\n\n/**\n * @file poster-image.js\n */\n\n/**\n * A `ClickableComponent` that handles showing the poster image for the player.\n *\n * @extends ClickableComponent\n */\nvar PosterImage = /*#__PURE__*/function (_ClickableComponent) {\n _inherits(PosterImage, _ClickableComponent);\n var _super14 = _createSuper(PosterImage);\n /**\n * Create an instance of this class.\n *\n * @param { import('./player').default } player\n * The `Player` that this class should attach to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n function PosterImage(player, options) {\n var _this35;\n _classCallCheck(this, PosterImage);\n _this35 = _super14.call(this, player, options);\n _this35.update();\n _this35.update_ = function (e) {\n return _this35.update(e);\n };\n player.on('posterchange', _this35.update_);\n return _this35;\n }\n\n /**\n * Clean up and dispose of the `PosterImage`.\n */\n _createClass(PosterImage, [{\n key: \"dispose\",\n value: function dispose() {\n this.player().off('posterchange', this.update_);\n _get(_getPrototypeOf(PosterImage.prototype), \"dispose\", this).call(this);\n }\n\n /**\n * Create the `PosterImage`s DOM element.\n *\n * @return {Element}\n * The element that gets created.\n */\n }, {\n key: \"createEl\",\n value: function createEl() {\n // The el is an empty div to keep position in the DOM\n // A picture and img el will be inserted when a source is set\n return _createEl('div', {\n className: 'vjs-poster'\n });\n }\n\n /**\n * Get or set the `PosterImage`'s crossOrigin option.\n *\n * @param {string|null} [value]\n * The value to set the crossOrigin to. If an argument is\n * given, must be one of `'anonymous'` or `'use-credentials'`, or 'null'.\n *\n * @return {string|null}\n * - The current crossOrigin value of the `Player` when getting.\n * - undefined when setting\n */\n }, {\n key: \"crossOrigin\",\n value: function crossOrigin(value) {\n // `null` can be set to unset a value\n if (typeof value === 'undefined') {\n if (this.$('img')) {\n // If the poster's element exists, give its value\n return this.$('img').crossOrigin;\n } else if (this.player_.tech_ && this.player_.tech_.isReady_) {\n // If not but the tech is ready, query the tech\n return this.player_.crossOrigin();\n }\n // Otherwise check options as the poster is usually set before the state of crossorigin\n // can be retrieved by the getter\n return this.player_.options_.crossOrigin || this.player_.options_.crossorigin || null;\n }\n if (value !== null && value !== 'anonymous' && value !== 'use-credentials') {\n this.player_.log.warn(\"crossOrigin must be null, \\\"anonymous\\\" or \\\"use-credentials\\\", given \\\"\".concat(value, \"\\\"\"));\n return;\n }\n if (this.$('img')) {\n this.$('img').crossOrigin = value;\n }\n return;\n }\n\n /**\n * An {@link EventTarget~EventListener} for {@link Player#posterchange} events.\n *\n * @listens Player#posterchange\n *\n * @param {Event} [event]\n * The `Player#posterchange` event that triggered this function.\n */\n }, {\n key: \"update\",\n value: function update(event) {\n var url = this.player().poster();\n this.setSrc(url);\n\n // If there's no poster source we should display:none on this component\n // so it's not still clickable or right-clickable\n if (url) {\n this.show();\n } else {\n this.hide();\n }\n }\n\n /**\n * Set the source of the `PosterImage` depending on the display method. (Re)creates\n * the inner picture and img elementss when needed.\n *\n * @param {string} [url]\n * The URL to the source for the `PosterImage`. If not specified or falsy,\n * any source and ant inner picture/img are removed.\n */\n }, {\n key: \"setSrc\",\n value: function setSrc(url) {\n if (!url) {\n this.el_.textContent = '';\n return;\n }\n if (!this.$('img')) {\n this.el_.appendChild(_createEl('picture', {\n className: 'vjs-poster',\n // Don't want poster to be tabbable.\n tabIndex: -1\n }, {}, _createEl('img', {\n loading: 'lazy',\n crossOrigin: this.crossOrigin()\n }, {\n alt: ''\n })));\n }\n this.$('img').src = url;\n }\n\n /**\n * An {@link EventTarget~EventListener} for clicks on the `PosterImage`. See\n * {@link ClickableComponent#handleClick} for instances where this will be triggered.\n *\n * @listens tap\n * @listens click\n * @listens keydown\n *\n * @param {Event} event\n + The `click`, `tap` or `keydown` event that caused this function to be called.\n */\n }, {\n key: \"handleClick\",\n value: function handleClick(event) {\n // We don't want a click to trigger playback when controls are disabled\n if (!this.player_.controls()) {\n return;\n }\n if (this.player_.tech(true)) {\n this.player_.tech(true).focus();\n }\n if (this.player_.paused()) {\n silencePromise(this.player_.play());\n } else {\n this.player_.pause();\n }\n }\n }]);\n return PosterImage;\n}(ClickableComponent);\n/**\n * Get or set the `PosterImage`'s crossorigin option. For the HTML5 player, this\n * sets the `crossOrigin` property on the `<img>` tag to control the CORS\n * behavior.\n *\n * @param {string|null} [value]\n * The value to set the `PosterImages`'s crossorigin to. If an argument is\n * given, must be one of `anonymous` or `use-credentials`.\n *\n * @return {string|null|undefined}\n * - The current crossorigin value of the `Player` when getting.\n * - undefined when setting\n */\nPosterImage.prototype.crossorigin = PosterImage.prototype.crossOrigin;\nComponent$1.registerComponent('PosterImage', PosterImage);\n\n/**\n * @file text-track-display.js\n */\nvar darkGray = '#222';\nvar lightGray = '#ccc';\nvar fontMap = {\n monospace: 'monospace',\n sansSerif: 'sans-serif',\n serif: 'serif',\n monospaceSansSerif: '\"Andale Mono\", \"Lucida Console\", monospace',\n monospaceSerif: '\"Courier New\", monospace',\n proportionalSansSerif: 'sans-serif',\n proportionalSerif: 'serif',\n casual: '\"Comic Sans MS\", Impact, fantasy',\n script: '\"Monotype Corsiva\", cursive',\n smallcaps: '\"Andale Mono\", \"Lucida Console\", monospace, sans-serif'\n};\n\n/**\n * Construct an rgba color from a given hex color code.\n *\n * @param {number} color\n * Hex number for color, like #f0e or #f604e2.\n *\n * @param {number} opacity\n * Value for opacity, 0.0 - 1.0.\n *\n * @return {string}\n * The rgba color that was created, like 'rgba(255, 0, 0, 0.3)'.\n */\nfunction constructColor(color, opacity) {\n var hex;\n if (color.length === 4) {\n // color looks like \"#f0e\"\n hex = color[1] + color[1] + color[2] + color[2] + color[3] + color[3];\n } else if (color.length === 7) {\n // color looks like \"#f604e2\"\n hex = color.slice(1);\n } else {\n throw new Error('Invalid color code provided, ' + color + '; must be formatted as e.g. #f0e or #f604e2.');\n }\n return 'rgba(' + parseInt(hex.slice(0, 2), 16) + ',' + parseInt(hex.slice(2, 4), 16) + ',' + parseInt(hex.slice(4, 6), 16) + ',' + opacity + ')';\n}\n\n/**\n * Try to update the style of a DOM element. Some style changes will throw an error,\n * particularly in IE8. Those should be noops.\n *\n * @param {Element} el\n * The DOM element to be styled.\n *\n * @param {string} style\n * The CSS property on the element that should be styled.\n *\n * @param {string} rule\n * The style rule that should be applied to the property.\n *\n * @private\n */\nfunction tryUpdateStyle(el, style, rule) {\n try {\n el.style[style] = rule;\n } catch (e) {\n // Satisfies linter.\n return;\n }\n}\n\n/**\n * Converts the CSS top/right/bottom/left property numeric value to string in pixels.\n *\n * @param {number} position\n * The CSS top/right/bottom/left property value.\n *\n * @return {string}\n * The CSS property value that was created, like '10px'.\n *\n * @private\n */\nfunction getCSSPositionValue(position) {\n return position ? \"\".concat(position, \"px\") : '';\n}\n\n/**\n * The component for displaying text track cues.\n *\n * @extends Component\n */\nvar TextTrackDisplay = /*#__PURE__*/function (_Component$5) {\n _inherits(TextTrackDisplay, _Component$5);\n var _super15 = _createSuper(TextTrackDisplay);\n /**\n * Creates an instance of this class.\n *\n * @param { import('../player').default } player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n *\n * @param {Function} [ready]\n * The function to call when `TextTrackDisplay` is ready.\n */\n function TextTrackDisplay(player, options, ready) {\n var _this36;\n _classCallCheck(this, TextTrackDisplay);\n _this36 = _super15.call(this, player, options, ready);\n var updateDisplayTextHandler = function updateDisplayTextHandler(e) {\n return _this36.updateDisplay(e);\n };\n var updateDisplayHandler = function updateDisplayHandler(e) {\n _this36.updateDisplayOverlay();\n _this36.updateDisplay(e);\n };\n player.on('loadstart', function (e) {\n return _this36.toggleDisplay(e);\n });\n player.on('texttrackchange', updateDisplayTextHandler);\n player.on('loadedmetadata', function (e) {\n _this36.updateDisplayOverlay();\n _this36.preselectTrack(e);\n });\n\n // This used to be called during player init, but was causing an error\n // if a track should show by default and the display hadn't loaded yet.\n // Should probably be moved to an external track loader when we support\n // tracks that don't need a display.\n player.ready(bind_(_assertThisInitialized(_this36), function () {\n if (player.tech_ && player.tech_.featuresNativeTextTracks) {\n this.hide();\n return;\n }\n player.on('fullscreenchange', updateDisplayHandler);\n player.on('playerresize', updateDisplayHandler);\n var screenOrientation = window$1.screen.orientation || window$1;\n var changeOrientationEvent = window$1.screen.orientation ? 'change' : 'orientationchange';\n screenOrientation.addEventListener(changeOrientationEvent, updateDisplayHandler);\n player.on('dispose', function () {\n return screenOrientation.removeEventListener(changeOrientationEvent, updateDisplayHandler);\n });\n var tracks = this.options_.playerOptions.tracks || [];\n for (var _i34 = 0; _i34 < tracks.length; _i34++) {\n this.player_.addRemoteTextTrack(tracks[_i34], true);\n }\n this.preselectTrack();\n }));\n return _this36;\n }\n\n /**\n * Preselect a track following this precedence:\n * - matches the previously selected {@link TextTrack}'s language and kind\n * - matches the previously selected {@link TextTrack}'s language only\n * - is the first default captions track\n * - is the first default descriptions track\n *\n * @listens Player#loadstart\n */\n _createClass(TextTrackDisplay, [{\n key: \"preselectTrack\",\n value: function preselectTrack() {\n var modes = {\n captions: 1,\n subtitles: 1\n };\n var trackList = this.player_.textTracks();\n var userPref = this.player_.cache_.selectedLanguage;\n var firstDesc;\n var firstCaptions;\n var preferredTrack;\n for (var _i35 = 0; _i35 < trackList.length; _i35++) {\n var track = trackList[_i35];\n if (userPref && userPref.enabled && userPref.language && userPref.language === track.language && track.kind in modes) {\n // Always choose the track that matches both language and kind\n if (track.kind === userPref.kind) {\n preferredTrack = track;\n // or choose the first track that matches language\n } else if (!preferredTrack) {\n preferredTrack = track;\n }\n\n // clear everything if offTextTrackMenuItem was clicked\n } else if (userPref && !userPref.enabled) {\n preferredTrack = null;\n firstDesc = null;\n firstCaptions = null;\n } else if (track[\"default\"]) {\n if (track.kind === 'descriptions' && !firstDesc) {\n firstDesc = track;\n } else if (track.kind in modes && !firstCaptions) {\n firstCaptions = track;\n }\n }\n }\n\n // The preferredTrack matches the user preference and takes\n // precedence over all the other tracks.\n // So, display the preferredTrack before the first default track\n // and the subtitles/captions track before the descriptions track\n if (preferredTrack) {\n preferredTrack.mode = 'showing';\n } else if (firstCaptions) {\n firstCaptions.mode = 'showing';\n } else if (firstDesc) {\n firstDesc.mode = 'showing';\n }\n }\n\n /**\n * Turn display of {@link TextTrack}'s from the current state into the other state.\n * There are only two states:\n * - 'shown'\n * - 'hidden'\n *\n * @listens Player#loadstart\n */\n }, {\n key: \"toggleDisplay\",\n value: function toggleDisplay() {\n if (this.player_.tech_ && this.player_.tech_.featuresNativeTextTracks) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n /**\n * Create the {@link Component}'s DOM element.\n *\n * @return {Element}\n * The element that was created.\n */\n }, {\n key: \"createEl\",\n value: function createEl() {\n return _get(_getPrototypeOf(TextTrackDisplay.prototype), \"createEl\", this).call(this, 'div', {\n className: 'vjs-text-track-display'\n }, {\n 'translate': 'yes',\n 'aria-live': 'off',\n 'aria-atomic': 'true'\n });\n }\n\n /**\n * Clear all displayed {@link TextTrack}s.\n */\n }, {\n key: \"clearDisplay\",\n value: function clearDisplay() {\n if (typeof window$1.WebVTT === 'function') {\n window$1.WebVTT.processCues(window$1, [], this.el_);\n }\n }\n\n /**\n * Update the displayed TextTrack when a either a {@link Player#texttrackchange} or\n * a {@link Player#fullscreenchange} is fired.\n *\n * @listens Player#texttrackchange\n * @listens Player#fullscreenchange\n */\n }, {\n key: \"updateDisplay\",\n value: function updateDisplay() {\n var tracks = this.player_.textTracks();\n var allowMultipleShowingTracks = this.options_.allowMultipleShowingTracks;\n this.clearDisplay();\n if (allowMultipleShowingTracks) {\n var showingTracks = [];\n for (var _i36 = 0; _i36 < tracks.length; ++_i36) {\n var track = tracks[_i36];\n if (track.mode !== 'showing') {\n continue;\n }\n showingTracks.push(track);\n }\n this.updateForTrack(showingTracks);\n return;\n }\n\n // Track display prioritization model: if multiple tracks are 'showing',\n // display the first 'subtitles' or 'captions' track which is 'showing',\n // otherwise display the first 'descriptions' track which is 'showing'\n\n var descriptionsTrack = null;\n var captionsSubtitlesTrack = null;\n var i = tracks.length;\n while (i--) {\n var _track = tracks[i];\n if (_track.mode === 'showing') {\n if (_track.kind === 'descriptions') {\n descriptionsTrack = _track;\n } else {\n captionsSubtitlesTrack = _track;\n }\n }\n }\n if (captionsSubtitlesTrack) {\n if (this.getAttribute('aria-live') !== 'off') {\n this.setAttribute('aria-live', 'off');\n }\n this.updateForTrack(captionsSubtitlesTrack);\n } else if (descriptionsTrack) {\n if (this.getAttribute('aria-live') !== 'assertive') {\n this.setAttribute('aria-live', 'assertive');\n }\n this.updateForTrack(descriptionsTrack);\n }\n }\n\n /**\n * Updates the displayed TextTrack to be sure it overlays the video when a either\n * a {@link Player#texttrackchange} or a {@link Player#fullscreenchange} is fired.\n */\n }, {\n key: \"updateDisplayOverlay\",\n value: function updateDisplayOverlay() {\n // inset-inline and inset-block are not supprted on old chrome, but these are\n // only likely to be used on TV devices\n if (!this.player_.videoHeight() || !window$1.CSS.supports('inset-inline: 10px')) {\n return;\n }\n var playerWidth = this.player_.currentWidth();\n var playerHeight = this.player_.currentHeight();\n var playerAspectRatio = playerWidth / playerHeight;\n var videoAspectRatio = this.player_.videoWidth() / this.player_.videoHeight();\n var insetInlineMatch = 0;\n var insetBlockMatch = 0;\n if (Math.abs(playerAspectRatio - videoAspectRatio) > 0.1) {\n if (playerAspectRatio > videoAspectRatio) {\n insetInlineMatch = Math.round((playerWidth - playerHeight * videoAspectRatio) / 2);\n } else {\n insetBlockMatch = Math.round((playerHeight - playerWidth / videoAspectRatio) / 2);\n }\n }\n tryUpdateStyle(this.el_, 'insetInline', getCSSPositionValue(insetInlineMatch));\n tryUpdateStyle(this.el_, 'insetBlock', getCSSPositionValue(insetBlockMatch));\n }\n\n /**\n * Style {@Link TextTrack} activeCues according to {@Link TextTrackSettings}.\n *\n * @param {TextTrack} track\n * Text track object containing active cues to style.\n */\n }, {\n key: \"updateDisplayState\",\n value: function updateDisplayState(track) {\n var overrides = this.player_.textTrackSettings.getValues();\n var cues = track.activeCues;\n var i = cues.length;\n while (i--) {\n var cue = cues[i];\n if (!cue) {\n continue;\n }\n var cueDiv = cue.displayState;\n if (overrides.color) {\n cueDiv.firstChild.style.color = overrides.color;\n }\n if (overrides.textOpacity) {\n tryUpdateStyle(cueDiv.firstChild, 'color', constructColor(overrides.color || '#fff', overrides.textOpacity));\n }\n if (overrides.backgroundColor) {\n cueDiv.firstChild.style.backgroundColor = overrides.backgroundColor;\n }\n if (overrides.backgroundOpacity) {\n tryUpdateStyle(cueDiv.firstChild, 'backgroundColor', constructColor(overrides.backgroundColor || '#000', overrides.backgroundOpacity));\n }\n if (overrides.windowColor) {\n if (overrides.windowOpacity) {\n tryUpdateStyle(cueDiv, 'backgroundColor', constructColor(overrides.windowColor, overrides.windowOpacity));\n } else {\n cueDiv.style.backgroundColor = overrides.windowColor;\n }\n }\n if (overrides.edgeStyle) {\n if (overrides.edgeStyle === 'dropshadow') {\n cueDiv.firstChild.style.textShadow = \"2px 2px 3px \".concat(darkGray, \", 2px 2px 4px \").concat(darkGray, \", 2px 2px 5px \").concat(darkGray);\n } else if (overrides.edgeStyle === 'raised') {\n cueDiv.firstChild.style.textShadow = \"1px 1px \".concat(darkGray, \", 2px 2px \").concat(darkGray, \", 3px 3px \").concat(darkGray);\n } else if (overrides.edgeStyle === 'depressed') {\n cueDiv.firstChild.style.textShadow = \"1px 1px \".concat(lightGray, \", 0 1px \").concat(lightGray, \", -1px -1px \").concat(darkGray, \", 0 -1px \").concat(darkGray);\n } else if (overrides.edgeStyle === 'uniform') {\n cueDiv.firstChild.style.textShadow = \"0 0 4px \".concat(darkGray, \", 0 0 4px \").concat(darkGray, \", 0 0 4px \").concat(darkGray, \", 0 0 4px \").concat(darkGray);\n }\n }\n if (overrides.fontPercent && overrides.fontPercent !== 1) {\n var fontSize = window$1.parseFloat(cueDiv.style.fontSize);\n cueDiv.style.fontSize = fontSize * overrides.fontPercent + 'px';\n cueDiv.style.height = 'auto';\n cueDiv.style.top = 'auto';\n }\n if (overrides.fontFamily && overrides.fontFamily !== 'default') {\n if (overrides.fontFamily === 'small-caps') {\n cueDiv.firstChild.style.fontVariant = 'small-caps';\n } else {\n cueDiv.firstChild.style.fontFamily = fontMap[overrides.fontFamily];\n }\n }\n }\n }\n\n /**\n * Add an {@link TextTrack} to to the {@link Tech}s {@link TextTrackList}.\n *\n * @param {TextTrack|TextTrack[]} tracks\n * Text track object or text track array to be added to the list.\n */\n }, {\n key: \"updateForTrack\",\n value: function updateForTrack(tracks) {\n if (!Array.isArray(tracks)) {\n tracks = [tracks];\n }\n if (typeof window$1.WebVTT !== 'function' || tracks.every(function (track) {\n return !track.activeCues;\n })) {\n return;\n }\n var cues = [];\n\n // push all active track cues\n for (var _i37 = 0; _i37 < tracks.length; ++_i37) {\n var track = tracks[_i37];\n for (var j = 0; j < track.activeCues.length; ++j) {\n cues.push(track.activeCues[j]);\n }\n }\n\n // removes all cues before it processes new ones\n window$1.WebVTT.processCues(window$1, cues, this.el_);\n\n // add unique class to each language text track & add settings styling if necessary\n for (var _i38 = 0; _i38 < tracks.length; ++_i38) {\n var _track2 = tracks[_i38];\n for (var _j = 0; _j < _track2.activeCues.length; ++_j) {\n var cueEl = _track2.activeCues[_j].displayState;\n _addClass(cueEl, 'vjs-text-track-cue', 'vjs-text-track-cue-' + (_track2.language ? _track2.language : _i38));\n if (_track2.language) {\n _setAttribute(cueEl, 'lang', _track2.language);\n }\n }\n if (this.player_.textTrackSettings) {\n this.updateDisplayState(_track2);\n }\n }\n }\n }]);\n return TextTrackDisplay;\n}(Component$1);\nComponent$1.registerComponent('TextTrackDisplay', TextTrackDisplay);\n\n/**\n * @file loading-spinner.js\n */\n\n/**\n * A loading spinner for use during waiting/loading events.\n *\n * @extends Component\n */\nvar LoadingSpinner = /*#__PURE__*/function (_Component$6) {\n _inherits(LoadingSpinner, _Component$6);\n var _super16 = _createSuper(LoadingSpinner);\n function LoadingSpinner() {\n _classCallCheck(this, LoadingSpinner);\n return _super16.apply(this, arguments);\n }\n _createClass(LoadingSpinner, [{\n key: \"createEl\",\n value:\n /**\n * Create the `LoadingSpinner`s DOM element.\n *\n * @return {Element}\n * The dom element that gets created.\n */\n function createEl() {\n var isAudio = this.player_.isAudio();\n var playerType = this.localize(isAudio ? 'Audio Player' : 'Video Player');\n var controlText = _createEl('span', {\n className: 'vjs-control-text',\n textContent: this.localize('{1} is loading.', [playerType])\n });\n var el = _get(_getPrototypeOf(LoadingSpinner.prototype), \"createEl\", this).call(this, 'div', {\n className: 'vjs-loading-spinner',\n dir: 'ltr'\n });\n el.appendChild(controlText);\n return el;\n }\n\n /**\n * Update control text on languagechange\n */\n }, {\n key: \"handleLanguagechange\",\n value: function handleLanguagechange() {\n this.$('.vjs-control-text').textContent = this.localize('{1} is loading.', [this.player_.isAudio() ? 'Audio Player' : 'Video Player']);\n }\n }]);\n return LoadingSpinner;\n}(Component$1);\nComponent$1.registerComponent('LoadingSpinner', LoadingSpinner);\n\n/**\n * @file button.js\n */\n\n/**\n * Base class for all buttons.\n *\n * @extends ClickableComponent\n */\nvar Button = /*#__PURE__*/function (_ClickableComponent2) {\n _inherits(Button, _ClickableComponent2);\n var _super17 = _createSuper(Button);\n function Button() {\n _classCallCheck(this, Button);\n return _super17.apply(this, arguments);\n }\n _createClass(Button, [{\n key: \"createEl\",\n value:\n /**\n * Create the `Button`s DOM element.\n *\n * @param {string} [tag=\"button\"]\n * The element's node type. This argument is IGNORED: no matter what\n * is passed, it will always create a `button` element.\n *\n * @param {Object} [props={}]\n * An object of properties that should be set on the element.\n *\n * @param {Object} [attributes={}]\n * An object of attributes that should be set on the element.\n *\n * @return {Element}\n * The element that gets created.\n */\n function createEl(tag) {\n var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var attributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n tag = 'button';\n props = Object.assign({\n className: this.buildCSSClass()\n }, props);\n\n // Add attributes for button element\n attributes = Object.assign({\n // Necessary since the default button type is \"submit\"\n type: 'button'\n }, attributes);\n var el = _createEl(tag, props, attributes);\n if (!this.player_.options_.experimentalSvgIcons) {\n el.appendChild(_createEl('span', {\n className: 'vjs-icon-placeholder'\n }, {\n 'aria-hidden': true\n }));\n }\n this.createControlTextEl(el);\n return el;\n }\n\n /**\n * Add a child `Component` inside of this `Button`.\n *\n * @param {string|Component} child\n * The name or instance of a child to add.\n *\n * @param {Object} [options={}]\n * The key/value store of options that will get passed to children of\n * the child.\n *\n * @return {Component}\n * The `Component` that gets added as a child. When using a string the\n * `Component` will get created by this process.\n *\n * @deprecated since version 5\n */\n }, {\n key: \"addChild\",\n value: function addChild(child) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var className = this.constructor.name;\n log$1.warn(\"Adding an actionable (user controllable) child to a Button (\".concat(className, \") is not supported; use a ClickableComponent instead.\"));\n\n // Avoid the error message generated by ClickableComponent's addChild method\n return Component$1.prototype.addChild.call(this, child, options);\n }\n\n /**\n * Enable the `Button` element so that it can be activated or clicked. Use this with\n * {@link Button#disable}.\n */\n }, {\n key: \"enable\",\n value: function enable() {\n _get(_getPrototypeOf(Button.prototype), \"enable\", this).call(this);\n this.el_.removeAttribute('disabled');\n }\n\n /**\n * Disable the `Button` element so that it cannot be activated or clicked. Use this with\n * {@link Button#enable}.\n */\n }, {\n key: \"disable\",\n value: function disable() {\n _get(_getPrototypeOf(Button.prototype), \"disable\", this).call(this);\n this.el_.setAttribute('disabled', 'disabled');\n }\n\n /**\n * This gets called when a `Button` has focus and `keydown` is triggered via a key\n * press.\n *\n * @param {KeyboardEvent} event\n * The event that caused this function to get called.\n *\n * @listens keydown\n */\n }, {\n key: \"handleKeyDown\",\n value: function handleKeyDown(event) {\n // Ignore Space or Enter key operation, which is handled by the browser for\n // a button - though not for its super class, ClickableComponent. Also,\n // prevent the event from propagating through the DOM and triggering Player\n // hotkeys. We do not preventDefault here because we _want_ the browser to\n // handle it.\n if (keycode.isEventKey(event, 'Space') || keycode.isEventKey(event, 'Enter')) {\n event.stopPropagation();\n return;\n }\n\n // Pass keypress handling up for unsupported keys\n _get(_getPrototypeOf(Button.prototype), \"handleKeyDown\", this).call(this, event);\n }\n }]);\n return Button;\n}(ClickableComponent);\nComponent$1.registerComponent('Button', Button);\n\n/**\n * @file big-play-button.js\n */\n\n/**\n * The initial play button that shows before the video has played. The hiding of the\n * `BigPlayButton` get done via CSS and `Player` states.\n *\n * @extends Button\n */\nvar BigPlayButton = /*#__PURE__*/function (_Button) {\n _inherits(BigPlayButton, _Button);\n var _super18 = _createSuper(BigPlayButton);\n function BigPlayButton(player, options) {\n var _this37;\n _classCallCheck(this, BigPlayButton);\n _this37 = _super18.call(this, player, options);\n _this37.mouseused_ = false;\n _this37.setIcon('play');\n _this37.on('mousedown', function (e) {\n return _this37.handleMouseDown(e);\n });\n return _this37;\n }\n\n /**\n * Builds the default DOM `className`.\n *\n * @return {string}\n * The DOM `className` for this object. Always returns 'vjs-big-play-button'.\n */\n _createClass(BigPlayButton, [{\n key: \"buildCSSClass\",\n value: function buildCSSClass() {\n return 'vjs-big-play-button';\n }\n\n /**\n * This gets called when a `BigPlayButton` \"clicked\". See {@link ClickableComponent}\n * for more detailed information on what a click can be.\n *\n * @param {KeyboardEvent|MouseEvent|TouchEvent} event\n * The `keydown`, `tap`, or `click` event that caused this function to be\n * called.\n *\n * @listens tap\n * @listens click\n */\n }, {\n key: \"handleClick\",\n value: function handleClick(event) {\n var playPromise = this.player_.play();\n\n // exit early if clicked via the mouse\n if (this.mouseused_ && 'clientX' in event && 'clientY' in event) {\n silencePromise(playPromise);\n if (this.player_.tech(true)) {\n this.player_.tech(true).focus();\n }\n return;\n }\n var cb = this.player_.getChild('controlBar');\n var playToggle = cb && cb.getChild('playToggle');\n if (!playToggle) {\n this.player_.tech(true).focus();\n return;\n }\n var playFocus = function playFocus() {\n return playToggle.focus();\n };\n if (isPromise(playPromise)) {\n playPromise.then(playFocus, function () {});\n } else {\n this.setTimeout(playFocus, 1);\n }\n }\n\n /**\n * Event handler that is called when a `BigPlayButton` receives a\n * `keydown` event.\n *\n * @param {KeyboardEvent} event\n * The `keydown` event that caused this function to be called.\n *\n * @listens keydown\n */\n }, {\n key: \"handleKeyDown\",\n value: function handleKeyDown(event) {\n this.mouseused_ = false;\n _get(_getPrototypeOf(BigPlayButton.prototype), \"handleKeyDown\", this).call(this, event);\n }\n\n /**\n * Handle `mousedown` events on the `BigPlayButton`.\n *\n * @param {MouseEvent} event\n * `mousedown` or `touchstart` event that triggered this function\n *\n * @listens mousedown\n */\n }, {\n key: \"handleMouseDown\",\n value: function handleMouseDown(event) {\n this.mouseused_ = true;\n }\n }]);\n return BigPlayButton;\n}(Button);\n/**\n * The text that should display over the `BigPlayButton`s controls. Added to for localization.\n *\n * @type {string}\n * @protected\n */\nBigPlayButton.prototype.controlText_ = 'Play Video';\nComponent$1.registerComponent('BigPlayButton', BigPlayButton);\n\n/**\n * @file close-button.js\n */\n\n/**\n * The `CloseButton` is a `{@link Button}` that fires a `close` event when\n * it gets clicked.\n *\n * @extends Button\n */\nvar CloseButton = /*#__PURE__*/function (_Button2) {\n _inherits(CloseButton, _Button2);\n var _super19 = _createSuper(CloseButton);\n /**\n * Creates an instance of the this class.\n *\n * @param { import('./player').default } player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n function CloseButton(player, options) {\n var _this38;\n _classCallCheck(this, CloseButton);\n _this38 = _super19.call(this, player, options);\n _this38.setIcon('cancel');\n _this38.controlText(options && options.controlText || _this38.localize('Close'));\n return _this38;\n }\n\n /**\n * Builds the default DOM `className`.\n *\n * @return {string}\n * The DOM `className` for this object.\n */\n _createClass(CloseButton, [{\n key: \"buildCSSClass\",\n value: function buildCSSClass() {\n return \"vjs-close-button \".concat(_get(_getPrototypeOf(CloseButton.prototype), \"buildCSSClass\", this).call(this));\n }\n\n /**\n * This gets called when a `CloseButton` gets clicked. See\n * {@link ClickableComponent#handleClick} for more information on when\n * this will be triggered\n *\n * @param {Event} event\n * The `keydown`, `tap`, or `click` event that caused this function to be\n * called.\n *\n * @listens tap\n * @listens click\n * @fires CloseButton#close\n */\n }, {\n key: \"handleClick\",\n value: function handleClick(event) {\n /**\n * Triggered when the a `CloseButton` is clicked.\n *\n * @event CloseButton#close\n * @type {Event}\n *\n * @property {boolean} [bubbles=false]\n * set to false so that the close event does not\n * bubble up to parents if there is no listener\n */\n this.trigger({\n type: 'close',\n bubbles: false\n });\n }\n /**\n * Event handler that is called when a `CloseButton` receives a\n * `keydown` event.\n *\n * By default, if the key is Esc, it will trigger a `click` event.\n *\n * @param {KeyboardEvent} event\n * The `keydown` event that caused this function to be called.\n *\n * @listens keydown\n */\n }, {\n key: \"handleKeyDown\",\n value: function handleKeyDown(event) {\n // Esc button will trigger `click` event\n if (keycode.isEventKey(event, 'Esc')) {\n event.preventDefault();\n event.stopPropagation();\n this.trigger('click');\n } else {\n // Pass keypress handling up for unsupported keys\n _get(_getPrototypeOf(CloseButton.prototype), \"handleKeyDown\", this).call(this, event);\n }\n }\n }]);\n return CloseButton;\n}(Button);\nComponent$1.registerComponent('CloseButton', CloseButton);\n\n/**\n * @file play-toggle.js\n */\n\n/**\n * Button to toggle between play and pause.\n *\n * @extends Button\n */\nvar PlayToggle = /*#__PURE__*/function (_Button3) {\n _inherits(PlayToggle, _Button3);\n var _super20 = _createSuper(PlayToggle);\n /**\n * Creates an instance of this class.\n *\n * @param { import('./player').default } player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options={}]\n * The key/value store of player options.\n */\n function PlayToggle(player) {\n var _this39;\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n _classCallCheck(this, PlayToggle);\n _this39 = _super20.call(this, player, options);\n\n // show or hide replay icon\n options.replay = options.replay === undefined || options.replay;\n _this39.setIcon('play');\n _this39.on(player, 'play', function (e) {\n return _this39.handlePlay(e);\n });\n _this39.on(player, 'pause', function (e) {\n return _this39.handlePause(e);\n });\n if (options.replay) {\n _this39.on(player, 'ended', function (e) {\n return _this39.handleEnded(e);\n });\n }\n return _this39;\n }\n\n /**\n * Builds the default DOM `className`.\n *\n * @return {string}\n * The DOM `className` for this object.\n */\n _createClass(PlayToggle, [{\n key: \"buildCSSClass\",\n value: function buildCSSClass() {\n return \"vjs-play-control \".concat(_get(_getPrototypeOf(PlayToggle.prototype), \"buildCSSClass\", this).call(this));\n }\n\n /**\n * This gets called when an `PlayToggle` is \"clicked\". See\n * {@link ClickableComponent} for more detailed information on what a click can be.\n *\n * @param {Event} [event]\n * The `keydown`, `tap`, or `click` event that caused this function to be\n * called.\n *\n * @listens tap\n * @listens click\n */\n }, {\n key: \"handleClick\",\n value: function handleClick(event) {\n if (this.player_.paused()) {\n silencePromise(this.player_.play());\n } else {\n this.player_.pause();\n }\n }\n\n /**\n * This gets called once after the video has ended and the user seeks so that\n * we can change the replay button back to a play button.\n *\n * @param {Event} [event]\n * The event that caused this function to run.\n *\n * @listens Player#seeked\n */\n }, {\n key: \"handleSeeked\",\n value: function handleSeeked(event) {\n this.removeClass('vjs-ended');\n if (this.player_.paused()) {\n this.handlePause(event);\n } else {\n this.handlePlay(event);\n }\n }\n\n /**\n * Add the vjs-playing class to the element so it can change appearance.\n *\n * @param {Event} [event]\n * The event that caused this function to run.\n *\n * @listens Player#play\n */\n }, {\n key: \"handlePlay\",\n value: function handlePlay(event) {\n this.removeClass('vjs-ended', 'vjs-paused');\n this.addClass('vjs-playing');\n // change the button text to \"Pause\"\n this.setIcon('pause');\n this.controlText('Pause');\n }\n\n /**\n * Add the vjs-paused class to the element so it can change appearance.\n *\n * @param {Event} [event]\n * The event that caused this function to run.\n *\n * @listens Player#pause\n */\n }, {\n key: \"handlePause\",\n value: function handlePause(event) {\n this.removeClass('vjs-playing');\n this.addClass('vjs-paused');\n // change the button text to \"Play\"\n this.setIcon('play');\n this.controlText('Play');\n }\n\n /**\n * Add the vjs-ended class to the element so it can change appearance\n *\n * @param {Event} [event]\n * The event that caused this function to run.\n *\n * @listens Player#ended\n */\n }, {\n key: \"handleEnded\",\n value: function handleEnded(event) {\n var _this40 = this;\n this.removeClass('vjs-playing');\n this.addClass('vjs-ended');\n // change the button text to \"Replay\"\n this.setIcon('replay');\n this.controlText('Replay');\n\n // on the next seek remove the replay button\n this.one(this.player_, 'seeked', function (e) {\n return _this40.handleSeeked(e);\n });\n }\n }]);\n return PlayToggle;\n}(Button);\n/**\n * The text that should display over the `PlayToggle`s controls. Added for localization.\n *\n * @type {string}\n * @protected\n */\nPlayToggle.prototype.controlText_ = 'Play';\nComponent$1.registerComponent('PlayToggle', PlayToggle);\n\n/**\n * @file time-display.js\n */\n\n/**\n * Displays time information about the video\n *\n * @extends Component\n */\nvar TimeDisplay = /*#__PURE__*/function (_Component$7) {\n _inherits(TimeDisplay, _Component$7);\n var _super21 = _createSuper(TimeDisplay);\n /**\n * Creates an instance of this class.\n *\n * @param { import('../../player').default } player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n function TimeDisplay(player, options) {\n var _this41;\n _classCallCheck(this, TimeDisplay);\n _this41 = _super21.call(this, player, options);\n _this41.on(player, ['timeupdate', 'ended'], function (e) {\n return _this41.updateContent(e);\n });\n _this41.updateTextNode_();\n return _this41;\n }\n\n /**\n * Create the `Component`'s DOM element\n *\n * @return {Element}\n * The element that was created.\n */\n _createClass(TimeDisplay, [{\n key: \"createEl\",\n value: function createEl() {\n var className = this.buildCSSClass();\n var el = _get(_getPrototypeOf(TimeDisplay.prototype), \"createEl\", this).call(this, 'div', {\n className: \"\".concat(className, \" vjs-time-control vjs-control\")\n });\n var span = _createEl('span', {\n className: 'vjs-control-text',\n textContent: \"\".concat(this.localize(this.labelText_), \"\\xA0\")\n }, {\n role: 'presentation'\n });\n el.appendChild(span);\n this.contentEl_ = _createEl('span', {\n className: \"\".concat(className, \"-display\")\n }, {\n // span elements have no implicit role, but some screen readers (notably VoiceOver)\n // treat them as a break between items in the DOM when using arrow keys\n // (or left-to-right swipes on iOS) to read contents of a page. Using\n // role='presentation' causes VoiceOver to NOT treat this span as a break.\n role: 'presentation'\n });\n el.appendChild(this.contentEl_);\n return el;\n }\n }, {\n key: \"dispose\",\n value: function dispose() {\n this.contentEl_ = null;\n this.textNode_ = null;\n _get(_getPrototypeOf(TimeDisplay.prototype), \"dispose\", this).call(this);\n }\n\n /**\n * Updates the time display text node with a new time\n *\n * @param {number} [time=0] the time to update to\n *\n * @private\n */\n }, {\n key: \"updateTextNode_\",\n value: function updateTextNode_() {\n var _this42 = this;\n var time = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n time = formatTime(time);\n if (this.formattedTime_ === time) {\n return;\n }\n this.formattedTime_ = time;\n this.requestNamedAnimationFrame('TimeDisplay#updateTextNode_', function () {\n if (!_this42.contentEl_) {\n return;\n }\n var oldNode = _this42.textNode_;\n if (oldNode && _this42.contentEl_.firstChild !== oldNode) {\n oldNode = null;\n log$1.warn('TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.');\n }\n _this42.textNode_ = document.createTextNode(_this42.formattedTime_);\n if (!_this42.textNode_) {\n return;\n }\n if (oldNode) {\n _this42.contentEl_.replaceChild(_this42.textNode_, oldNode);\n } else {\n _this42.contentEl_.appendChild(_this42.textNode_);\n }\n });\n }\n\n /**\n * To be filled out in the child class, should update the displayed time\n * in accordance with the fact that the current time has changed.\n *\n * @param {Event} [event]\n * The `timeupdate` event that caused this to run.\n *\n * @listens Player#timeupdate\n */\n }, {\n key: \"updateContent\",\n value: function updateContent(event) {}\n }]);\n return TimeDisplay;\n}(Component$1);\n/**\n * The text that is added to the `TimeDisplay` for screen reader users.\n *\n * @type {string}\n * @private\n */\nTimeDisplay.prototype.labelText_ = 'Time';\n\n/**\n * The text that should display over the `TimeDisplay`s controls. Added to for localization.\n *\n * @type {string}\n * @protected\n *\n * @deprecated in v7; controlText_ is not used in non-active display Components\n */\nTimeDisplay.prototype.controlText_ = 'Time';\nComponent$1.registerComponent('TimeDisplay', TimeDisplay);\n\n/**\n * @file current-time-display.js\n */\n\n/**\n * Displays the current time\n *\n * @extends Component\n */\nvar CurrentTimeDisplay = /*#__PURE__*/function (_TimeDisplay) {\n _inherits(CurrentTimeDisplay, _TimeDisplay);\n var _super22 = _createSuper(CurrentTimeDisplay);\n function CurrentTimeDisplay() {\n _classCallCheck(this, CurrentTimeDisplay);\n return _super22.apply(this, arguments);\n }\n _createClass(CurrentTimeDisplay, [{\n key: \"buildCSSClass\",\n value:\n /**\n * Builds the default DOM `className`.\n *\n * @return {string}\n * The DOM `className` for this object.\n */\n function buildCSSClass() {\n return 'vjs-current-time';\n }\n\n /**\n * Update current time display\n *\n * @param {Event} [event]\n * The `timeupdate` event that caused this function to run.\n *\n * @listens Player#timeupdate\n */\n }, {\n key: \"updateContent\",\n value: function updateContent(event) {\n // Allows for smooth scrubbing, when player can't keep up.\n var time;\n if (this.player_.ended()) {\n time = this.player_.duration();\n } else {\n time = this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime();\n }\n this.updateTextNode_(time);\n }\n }]);\n return CurrentTimeDisplay;\n}(TimeDisplay);\n/**\n * The text that is added to the `CurrentTimeDisplay` for screen reader users.\n *\n * @type {string}\n * @private\n */\nCurrentTimeDisplay.prototype.labelText_ = 'Current Time';\n\n/**\n * The text that should display over the `CurrentTimeDisplay`s controls. Added to for localization.\n *\n * @type {string}\n * @protected\n *\n * @deprecated in v7; controlText_ is not used in non-active display Components\n */\nCurrentTimeDisplay.prototype.controlText_ = 'Current Time';\nComponent$1.registerComponent('CurrentTimeDisplay', CurrentTimeDisplay);\n\n/**\n * @file duration-display.js\n */\n\n/**\n * Displays the duration\n *\n * @extends Component\n */\nvar DurationDisplay = /*#__PURE__*/function (_TimeDisplay2) {\n _inherits(DurationDisplay, _TimeDisplay2);\n var _super23 = _createSuper(DurationDisplay);\n /**\n * Creates an instance of this class.\n *\n * @param { import('../../player').default } player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n function DurationDisplay(player, options) {\n var _this43;\n _classCallCheck(this, DurationDisplay);\n _this43 = _super23.call(this, player, options);\n var updateContent = function updateContent(e) {\n return _this43.updateContent(e);\n };\n\n // we do not want to/need to throttle duration changes,\n // as they should always display the changed duration as\n // it has changed\n _this43.on(player, 'durationchange', updateContent);\n\n // Listen to loadstart because the player duration is reset when a new media element is loaded,\n // but the durationchange on the user agent will not fire.\n // @see [Spec]{@link https://www.w3.org/TR/2011/WD-html5-20110113/video.html#media-element-load-algorithm}\n _this43.on(player, 'loadstart', updateContent);\n\n // Also listen for timeupdate (in the parent) and loadedmetadata because removing those\n // listeners could have broken dependent applications/libraries. These\n // can likely be removed for 7.0.\n _this43.on(player, 'loadedmetadata', updateContent);\n return _this43;\n }\n\n /**\n * Builds the default DOM `className`.\n *\n * @return {string}\n * The DOM `className` for this object.\n */\n _createClass(DurationDisplay, [{\n key: \"buildCSSClass\",\n value: function buildCSSClass() {\n return 'vjs-duration';\n }\n\n /**\n * Update duration time display.\n *\n * @param {Event} [event]\n * The `durationchange`, `timeupdate`, or `loadedmetadata` event that caused\n * this function to be called.\n *\n * @listens Player#durationchange\n * @listens Player#timeupdate\n * @listens Player#loadedmetadata\n */\n }, {\n key: \"updateContent\",\n value: function updateContent(event) {\n var duration = this.player_.duration();\n this.updateTextNode_(duration);\n }\n }]);\n return DurationDisplay;\n}(TimeDisplay);\n/**\n * The text that is added to the `DurationDisplay` for screen reader users.\n *\n * @type {string}\n * @private\n */\nDurationDisplay.prototype.labelText_ = 'Duration';\n\n/**\n * The text that should display over the `DurationDisplay`s controls. Added to for localization.\n *\n * @type {string}\n * @protected\n *\n * @deprecated in v7; controlText_ is not used in non-active display Components\n */\nDurationDisplay.prototype.controlText_ = 'Duration';\nComponent$1.registerComponent('DurationDisplay', DurationDisplay);\n\n/**\n * @file time-divider.js\n */\n\n/**\n * The separator between the current time and duration.\n * Can be hidden if it's not needed in the design.\n *\n * @extends Component\n */\nvar TimeDivider = /*#__PURE__*/function (_Component$8) {\n _inherits(TimeDivider, _Component$8);\n var _super24 = _createSuper(TimeDivider);\n function TimeDivider() {\n _classCallCheck(this, TimeDivider);\n return _super24.apply(this, arguments);\n }\n _createClass(TimeDivider, [{\n key: \"createEl\",\n value:\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * The element that was created.\n */\n function createEl() {\n var el = _get(_getPrototypeOf(TimeDivider.prototype), \"createEl\", this).call(this, 'div', {\n className: 'vjs-time-control vjs-time-divider'\n }, {\n // this element and its contents can be hidden from assistive techs since\n // it is made extraneous by the announcement of the control text\n // for the current time and duration displays\n 'aria-hidden': true\n });\n var div = _get(_getPrototypeOf(TimeDivider.prototype), \"createEl\", this).call(this, 'div');\n var span = _get(_getPrototypeOf(TimeDivider.prototype), \"createEl\", this).call(this, 'span', {\n textContent: '/'\n });\n div.appendChild(span);\n el.appendChild(div);\n return el;\n }\n }]);\n return TimeDivider;\n}(Component$1);\nComponent$1.registerComponent('TimeDivider', TimeDivider);\n\n/**\n * @file remaining-time-display.js\n */\n\n/**\n * Displays the time left in the video\n *\n * @extends Component\n */\nvar RemainingTimeDisplay = /*#__PURE__*/function (_TimeDisplay3) {\n _inherits(RemainingTimeDisplay, _TimeDisplay3);\n var _super25 = _createSuper(RemainingTimeDisplay);\n /**\n * Creates an instance of this class.\n *\n * @param { import('../../player').default } player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n function RemainingTimeDisplay(player, options) {\n var _this44;\n _classCallCheck(this, RemainingTimeDisplay);\n _this44 = _super25.call(this, player, options);\n _this44.on(player, 'durationchange', function (e) {\n return _this44.updateContent(e);\n });\n return _this44;\n }\n\n /**\n * Builds the default DOM `className`.\n *\n * @return {string}\n * The DOM `className` for this object.\n */\n _createClass(RemainingTimeDisplay, [{\n key: \"buildCSSClass\",\n value: function buildCSSClass() {\n return 'vjs-remaining-time';\n }\n\n /**\n * Create the `Component`'s DOM element with the \"minus\" character prepend to the time\n *\n * @return {Element}\n * The element that was created.\n */\n }, {\n key: \"createEl\",\n value: function createEl() {\n var el = _get(_getPrototypeOf(RemainingTimeDisplay.prototype), \"createEl\", this).call(this);\n if (this.options_.displayNegative !== false) {\n el.insertBefore(_createEl('span', {}, {\n 'aria-hidden': true\n }, '-'), this.contentEl_);\n }\n return el;\n }\n\n /**\n * Update remaining time display.\n *\n * @param {Event} [event]\n * The `timeupdate` or `durationchange` event that caused this to run.\n *\n * @listens Player#timeupdate\n * @listens Player#durationchange\n */\n }, {\n key: \"updateContent\",\n value: function updateContent(event) {\n if (typeof this.player_.duration() !== 'number') {\n return;\n }\n var time;\n\n // @deprecated We should only use remainingTimeDisplay\n // as of video.js 7\n if (this.player_.ended()) {\n time = 0;\n } else if (this.player_.remainingTimeDisplay) {\n time = this.player_.remainingTimeDisplay();\n } else {\n time = this.player_.remainingTime();\n }\n this.updateTextNode_(time);\n }\n }]);\n return RemainingTimeDisplay;\n}(TimeDisplay);\n/**\n * The text that is added to the `RemainingTimeDisplay` for screen reader users.\n *\n * @type {string}\n * @private\n */\nRemainingTimeDisplay.prototype.labelText_ = 'Remaining Time';\n\n/**\n * The text that should display over the `RemainingTimeDisplay`s controls. Added to for localization.\n *\n * @type {string}\n * @protected\n *\n * @deprecated in v7; controlText_ is not used in non-active display Components\n */\nRemainingTimeDisplay.prototype.controlText_ = 'Remaining Time';\nComponent$1.registerComponent('RemainingTimeDisplay', RemainingTimeDisplay);\n\n/**\n * @file live-display.js\n */\n\n// TODO - Future make it click to snap to live\n\n/**\n * Displays the live indicator when duration is Infinity.\n *\n * @extends Component\n */\nvar LiveDisplay = /*#__PURE__*/function (_Component$9) {\n _inherits(LiveDisplay, _Component$9);\n var _super26 = _createSuper(LiveDisplay);\n /**\n * Creates an instance of this class.\n *\n * @param { import('./player').default } player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n function LiveDisplay(player, options) {\n var _this45;\n _classCallCheck(this, LiveDisplay);\n _this45 = _super26.call(this, player, options);\n _this45.updateShowing();\n _this45.on(_this45.player(), 'durationchange', function (e) {\n return _this45.updateShowing(e);\n });\n return _this45;\n }\n\n /**\n * Create the `Component`'s DOM element\n *\n * @return {Element}\n * The element that was created.\n */\n _createClass(LiveDisplay, [{\n key: \"createEl\",\n value: function createEl() {\n var el = _get(_getPrototypeOf(LiveDisplay.prototype), \"createEl\", this).call(this, 'div', {\n className: 'vjs-live-control vjs-control'\n });\n this.contentEl_ = _createEl('div', {\n className: 'vjs-live-display'\n }, {\n 'aria-live': 'off'\n });\n this.contentEl_.appendChild(_createEl('span', {\n className: 'vjs-control-text',\n textContent: \"\".concat(this.localize('Stream Type'), \"\\xA0\")\n }));\n this.contentEl_.appendChild(document.createTextNode(this.localize('LIVE')));\n el.appendChild(this.contentEl_);\n return el;\n }\n }, {\n key: \"dispose\",\n value: function dispose() {\n this.contentEl_ = null;\n _get(_getPrototypeOf(LiveDisplay.prototype), \"dispose\", this).call(this);\n }\n\n /**\n * Check the duration to see if the LiveDisplay should be showing or not. Then show/hide\n * it accordingly\n *\n * @param {Event} [event]\n * The {@link Player#durationchange} event that caused this function to run.\n *\n * @listens Player#durationchange\n */\n }, {\n key: \"updateShowing\",\n value: function updateShowing(event) {\n if (this.player().duration() === Infinity) {\n this.show();\n } else {\n this.hide();\n }\n }\n }]);\n return LiveDisplay;\n}(Component$1);\nComponent$1.registerComponent('LiveDisplay', LiveDisplay);\n\n/**\n * @file seek-to-live.js\n */\n\n/**\n * Displays the live indicator when duration is Infinity.\n *\n * @extends Component\n */\nvar SeekToLive = /*#__PURE__*/function (_Button4) {\n _inherits(SeekToLive, _Button4);\n var _super27 = _createSuper(SeekToLive);\n /**\n * Creates an instance of this class.\n *\n * @param { import('./player').default } player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n function SeekToLive(player, options) {\n var _this46;\n _classCallCheck(this, SeekToLive);\n _this46 = _super27.call(this, player, options);\n _this46.updateLiveEdgeStatus();\n if (_this46.player_.liveTracker) {\n _this46.updateLiveEdgeStatusHandler_ = function (e) {\n return _this46.updateLiveEdgeStatus(e);\n };\n _this46.on(_this46.player_.liveTracker, 'liveedgechange', _this46.updateLiveEdgeStatusHandler_);\n }\n return _this46;\n }\n\n /**\n * Create the `Component`'s DOM element\n *\n * @return {Element}\n * The element that was created.\n */\n _createClass(SeekToLive, [{\n key: \"createEl\",\n value: function createEl() {\n var el = _get(_getPrototypeOf(SeekToLive.prototype), \"createEl\", this).call(this, 'button', {\n className: 'vjs-seek-to-live-control vjs-control'\n });\n this.setIcon('circle', el);\n this.textEl_ = _createEl('span', {\n className: 'vjs-seek-to-live-text',\n textContent: this.localize('LIVE')\n }, {\n 'aria-hidden': 'true'\n });\n el.appendChild(this.textEl_);\n return el;\n }\n\n /**\n * Update the state of this button if we are at the live edge\n * or not\n */\n }, {\n key: \"updateLiveEdgeStatus\",\n value: function updateLiveEdgeStatus() {\n // default to live edge\n if (!this.player_.liveTracker || this.player_.liveTracker.atLiveEdge()) {\n this.setAttribute('aria-disabled', true);\n this.addClass('vjs-at-live-edge');\n this.controlText('Seek to live, currently playing live');\n } else {\n this.setAttribute('aria-disabled', false);\n this.removeClass('vjs-at-live-edge');\n this.controlText('Seek to live, currently behind live');\n }\n }\n\n /**\n * On click bring us as near to the live point as possible.\n * This requires that we wait for the next `live-seekable-change`\n * event which will happen every segment length seconds.\n */\n }, {\n key: \"handleClick\",\n value: function handleClick() {\n this.player_.liveTracker.seekToLiveEdge();\n }\n\n /**\n * Dispose of the element and stop tracking\n */\n }, {\n key: \"dispose\",\n value: function dispose() {\n if (this.player_.liveTracker) {\n this.off(this.player_.liveTracker, 'liveedgechange', this.updateLiveEdgeStatusHandler_);\n }\n this.textEl_ = null;\n _get(_getPrototypeOf(SeekToLive.prototype), \"dispose\", this).call(this);\n }\n }]);\n return SeekToLive;\n}(Button);\n/**\n * The text that should display over the `SeekToLive`s control. Added for localization.\n *\n * @type {string}\n * @protected\n */\nSeekToLive.prototype.controlText_ = 'Seek to live, currently playing live';\nComponent$1.registerComponent('SeekToLive', SeekToLive);\n\n/**\n * @file num.js\n * @module num\n */\n\n/**\n * Keep a number between a min and a max value\n *\n * @param {number} number\n * The number to clamp\n *\n * @param {number} min\n * The minimum value\n * @param {number} max\n * The maximum value\n *\n * @return {number}\n * the clamped number\n */\nfunction clamp(number, min, max) {\n number = Number(number);\n return Math.min(max, Math.max(min, isNaN(number) ? min : number));\n}\nvar Num = /*#__PURE__*/Object.freeze({\n __proto__: null,\n clamp: clamp\n});\n\n/**\n * @file slider.js\n */\n\n/**\n * The base functionality for a slider. Can be vertical or horizontal.\n * For instance the volume bar or the seek bar on a video is a slider.\n *\n * @extends Component\n */\nvar Slider = /*#__PURE__*/function (_Component$10) {\n _inherits(Slider, _Component$10);\n var _super28 = _createSuper(Slider);\n /**\n * Create an instance of this class\n *\n * @param { import('../player').default } player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n function Slider(player, options) {\n var _this47;\n _classCallCheck(this, Slider);\n _this47 = _super28.call(this, player, options);\n _this47.handleMouseDown_ = function (e) {\n return _this47.handleMouseDown(e);\n };\n _this47.handleMouseUp_ = function (e) {\n return _this47.handleMouseUp(e);\n };\n _this47.handleKeyDown_ = function (e) {\n return _this47.handleKeyDown(e);\n };\n _this47.handleClick_ = function (e) {\n return _this47.handleClick(e);\n };\n _this47.handleMouseMove_ = function (e) {\n return _this47.handleMouseMove(e);\n };\n _this47.update_ = function (e) {\n return _this47.update(e);\n };\n\n // Set property names to bar to match with the child Slider class is looking for\n _this47.bar = _this47.getChild(_this47.options_.barName);\n\n // Set a horizontal or vertical class on the slider depending on the slider type\n _this47.vertical(!!_this47.options_.vertical);\n _this47.enable();\n return _this47;\n }\n\n /**\n * Are controls are currently enabled for this slider or not.\n *\n * @return {boolean}\n * true if controls are enabled, false otherwise\n */\n _createClass(Slider, [{\n key: \"enabled\",\n value: function enabled() {\n return this.enabled_;\n }\n\n /**\n * Enable controls for this slider if they are disabled\n */\n }, {\n key: \"enable\",\n value: function enable() {\n if (this.enabled()) {\n return;\n }\n this.on('mousedown', this.handleMouseDown_);\n this.on('touchstart', this.handleMouseDown_);\n this.on('keydown', this.handleKeyDown_);\n this.on('click', this.handleClick_);\n\n // TODO: deprecated, controlsvisible does not seem to be fired\n this.on(this.player_, 'controlsvisible', this.update);\n if (this.playerEvent) {\n this.on(this.player_, this.playerEvent, this.update);\n }\n this.removeClass('disabled');\n this.setAttribute('tabindex', 0);\n this.enabled_ = true;\n }\n\n /**\n * Disable controls for this slider if they are enabled\n */\n }, {\n key: \"disable\",\n value: function disable() {\n if (!this.enabled()) {\n return;\n }\n var doc = this.bar.el_.ownerDocument;\n this.off('mousedown', this.handleMouseDown_);\n this.off('touchstart', this.handleMouseDown_);\n this.off('keydown', this.handleKeyDown_);\n this.off('click', this.handleClick_);\n this.off(this.player_, 'controlsvisible', this.update_);\n this.off(doc, 'mousemove', this.handleMouseMove_);\n this.off(doc, 'mouseup', this.handleMouseUp_);\n this.off(doc, 'touchmove', this.handleMouseMove_);\n this.off(doc, 'touchend', this.handleMouseUp_);\n this.removeAttribute('tabindex');\n this.addClass('disabled');\n if (this.playerEvent) {\n this.off(this.player_, this.playerEvent, this.update);\n }\n this.enabled_ = false;\n }\n\n /**\n * Create the `Slider`s DOM element.\n *\n * @param {string} type\n * Type of element to create.\n *\n * @param {Object} [props={}]\n * List of properties in Object form.\n *\n * @param {Object} [attributes={}]\n * list of attributes in Object form.\n *\n * @return {Element}\n * The element that gets created.\n */\n }, {\n key: \"createEl\",\n value: function createEl(type) {\n var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var attributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n // Add the slider element class to all sub classes\n props.className = props.className + ' vjs-slider';\n props = Object.assign({\n tabIndex: 0\n }, props);\n attributes = Object.assign({\n 'role': 'slider',\n 'aria-valuenow': 0,\n 'aria-valuemin': 0,\n 'aria-valuemax': 100\n }, attributes);\n return _get(_getPrototypeOf(Slider.prototype), \"createEl\", this).call(this, type, props, attributes);\n }\n\n /**\n * Handle `mousedown` or `touchstart` events on the `Slider`.\n *\n * @param {MouseEvent} event\n * `mousedown` or `touchstart` event that triggered this function\n *\n * @listens mousedown\n * @listens touchstart\n * @fires Slider#slideractive\n */\n }, {\n key: \"handleMouseDown\",\n value: function handleMouseDown(event) {\n var doc = this.bar.el_.ownerDocument;\n if (event.type === 'mousedown') {\n event.preventDefault();\n }\n // Do not call preventDefault() on touchstart in Chrome\n // to avoid console warnings. Use a 'touch-action: none' style\n // instead to prevent unintended scrolling.\n // https://developers.google.com/web/updates/2017/01/scrolling-intervention\n if (event.type === 'touchstart' && !IS_CHROME) {\n event.preventDefault();\n }\n blockTextSelection();\n this.addClass('vjs-sliding');\n /**\n * Triggered when the slider is in an active state\n *\n * @event Slider#slideractive\n * @type {MouseEvent}\n */\n this.trigger('slideractive');\n this.on(doc, 'mousemove', this.handleMouseMove_);\n this.on(doc, 'mouseup', this.handleMouseUp_);\n this.on(doc, 'touchmove', this.handleMouseMove_);\n this.on(doc, 'touchend', this.handleMouseUp_);\n this.handleMouseMove(event, true);\n }\n\n /**\n * Handle the `mousemove`, `touchmove`, and `mousedown` events on this `Slider`.\n * The `mousemove` and `touchmove` events will only only trigger this function during\n * `mousedown` and `touchstart`. This is due to {@link Slider#handleMouseDown} and\n * {@link Slider#handleMouseUp}.\n *\n * @param {MouseEvent} event\n * `mousedown`, `mousemove`, `touchstart`, or `touchmove` event that triggered\n * this function\n * @param {boolean} mouseDown this is a flag that should be set to true if `handleMouseMove` is called directly. It allows us to skip things that should not happen if coming from mouse down but should happen on regular mouse move handler. Defaults to false.\n *\n * @listens mousemove\n * @listens touchmove\n */\n }, {\n key: \"handleMouseMove\",\n value: function handleMouseMove(event) {}\n\n /**\n * Handle `mouseup` or `touchend` events on the `Slider`.\n *\n * @param {MouseEvent} event\n * `mouseup` or `touchend` event that triggered this function.\n *\n * @listens touchend\n * @listens mouseup\n * @fires Slider#sliderinactive\n */\n }, {\n key: \"handleMouseUp\",\n value: function handleMouseUp(event) {\n var doc = this.bar.el_.ownerDocument;\n unblockTextSelection();\n this.removeClass('vjs-sliding');\n /**\n * Triggered when the slider is no longer in an active state.\n *\n * @event Slider#sliderinactive\n * @type {Event}\n */\n this.trigger('sliderinactive');\n this.off(doc, 'mousemove', this.handleMouseMove_);\n this.off(doc, 'mouseup', this.handleMouseUp_);\n this.off(doc, 'touchmove', this.handleMouseMove_);\n this.off(doc, 'touchend', this.handleMouseUp_);\n this.update();\n }\n\n /**\n * Update the progress bar of the `Slider`.\n *\n * @return {number}\n * The percentage of progress the progress bar represents as a\n * number from 0 to 1.\n */\n }, {\n key: \"update\",\n value: function update() {\n var _this48 = this;\n // In VolumeBar init we have a setTimeout for update that pops and update\n // to the end of the execution stack. The player is destroyed before then\n // update will cause an error\n // If there's no bar...\n if (!this.el_ || !this.bar) {\n return;\n }\n\n // clamp progress between 0 and 1\n // and only round to four decimal places, as we round to two below\n var progress = this.getProgress();\n if (progress === this.progress_) {\n return progress;\n }\n this.progress_ = progress;\n this.requestNamedAnimationFrame('Slider#update', function () {\n // Set the new bar width or height\n var sizeKey = _this48.vertical() ? 'height' : 'width';\n\n // Convert to a percentage for css value\n _this48.bar.el().style[sizeKey] = (progress * 100).toFixed(2) + '%';\n });\n return progress;\n }\n\n /**\n * Get the percentage of the bar that should be filled\n * but clamped and rounded.\n *\n * @return {number}\n * percentage filled that the slider is\n */\n }, {\n key: \"getProgress\",\n value: function getProgress() {\n return Number(clamp(this.getPercent(), 0, 1).toFixed(4));\n }\n\n /**\n * Calculate distance for slider\n *\n * @param {Event} event\n * The event that caused this function to run.\n *\n * @return {number}\n * The current position of the Slider.\n * - position.x for vertical `Slider`s\n * - position.y for horizontal `Slider`s\n */\n }, {\n key: \"calculateDistance\",\n value: function calculateDistance(event) {\n var position = getPointerPosition(this.el_, event);\n if (this.vertical()) {\n return position.y;\n }\n return position.x;\n }\n\n /**\n * Handle a `keydown` event on the `Slider`. Watches for left, right, up, and down\n * arrow keys. This function will only be called when the slider has focus. See\n * {@link Slider#handleFocus} and {@link Slider#handleBlur}.\n *\n * @param {KeyboardEvent} event\n * the `keydown` event that caused this function to run.\n *\n * @listens keydown\n */\n }, {\n key: \"handleKeyDown\",\n value: function handleKeyDown(event) {\n // Left and Down Arrows\n if (keycode.isEventKey(event, 'Left') || keycode.isEventKey(event, 'Down')) {\n event.preventDefault();\n event.stopPropagation();\n this.stepBack();\n\n // Up and Right Arrows\n } else if (keycode.isEventKey(event, 'Right') || keycode.isEventKey(event, 'Up')) {\n event.preventDefault();\n event.stopPropagation();\n this.stepForward();\n } else {\n // Pass keydown handling up for unsupported keys\n _get(_getPrototypeOf(Slider.prototype), \"handleKeyDown\", this).call(this, event);\n }\n }\n\n /**\n * Listener for click events on slider, used to prevent clicks\n * from bubbling up to parent elements like button menus.\n *\n * @param {Object} event\n * Event that caused this object to run\n */\n }, {\n key: \"handleClick\",\n value: function handleClick(event) {\n event.stopPropagation();\n event.preventDefault();\n }\n\n /**\n * Get/set if slider is horizontal for vertical\n *\n * @param {boolean} [bool]\n * - true if slider is vertical,\n * - false is horizontal\n *\n * @return {boolean}\n * - true if slider is vertical, and getting\n * - false if the slider is horizontal, and getting\n */\n }, {\n key: \"vertical\",\n value: function vertical(bool) {\n if (bool === undefined) {\n return this.vertical_ || false;\n }\n this.vertical_ = !!bool;\n if (this.vertical_) {\n this.addClass('vjs-slider-vertical');\n } else {\n this.addClass('vjs-slider-horizontal');\n }\n }\n }]);\n return Slider;\n}(Component$1);\nComponent$1.registerComponent('Slider', Slider);\n\n/**\n * @file load-progress-bar.js\n */\n\n// get the percent width of a time compared to the total end\nvar percentify = function percentify(time, end) {\n return clamp(time / end * 100, 0, 100).toFixed(2) + '%';\n};\n\n/**\n * Shows loading progress\n *\n * @extends Component\n */\nvar LoadProgressBar = /*#__PURE__*/function (_Component$11) {\n _inherits(LoadProgressBar, _Component$11);\n var _super29 = _createSuper(LoadProgressBar);\n /**\n * Creates an instance of this class.\n *\n * @param { import('../../player').default } player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n function LoadProgressBar(player, options) {\n var _this49;\n _classCallCheck(this, LoadProgressBar);\n _this49 = _super29.call(this, player, options);\n _this49.partEls_ = [];\n _this49.on(player, 'progress', function (e) {\n return _this49.update(e);\n });\n return _this49;\n }\n\n /**\n * Create the `Component`'s DOM element\n *\n * @return {Element}\n * The element that was created.\n */\n _createClass(LoadProgressBar, [{\n key: \"createEl\",\n value: function createEl() {\n var el = _get(_getPrototypeOf(LoadProgressBar.prototype), \"createEl\", this).call(this, 'div', {\n className: 'vjs-load-progress'\n });\n var wrapper = _createEl('span', {\n className: 'vjs-control-text'\n });\n var loadedText = _createEl('span', {\n textContent: this.localize('Loaded')\n });\n var separator = document.createTextNode(': ');\n this.percentageEl_ = _createEl('span', {\n className: 'vjs-control-text-loaded-percentage',\n textContent: '0%'\n });\n el.appendChild(wrapper);\n wrapper.appendChild(loadedText);\n wrapper.appendChild(separator);\n wrapper.appendChild(this.percentageEl_);\n return el;\n }\n }, {\n key: \"dispose\",\n value: function dispose() {\n this.partEls_ = null;\n this.percentageEl_ = null;\n _get(_getPrototypeOf(LoadProgressBar.prototype), \"dispose\", this).call(this);\n }\n\n /**\n * Update progress bar\n *\n * @param {Event} [event]\n * The `progress` event that caused this function to run.\n *\n * @listens Player#progress\n */\n }, {\n key: \"update\",\n value: function update(event) {\n var _this50 = this;\n this.requestNamedAnimationFrame('LoadProgressBar#update', function () {\n var liveTracker = _this50.player_.liveTracker;\n var buffered = _this50.player_.buffered();\n var duration = liveTracker && liveTracker.isLive() ? liveTracker.seekableEnd() : _this50.player_.duration();\n var bufferedEnd = _this50.player_.bufferedEnd();\n var children = _this50.partEls_;\n var percent = percentify(bufferedEnd, duration);\n if (_this50.percent_ !== percent) {\n // update the width of the progress bar\n _this50.el_.style.width = percent;\n // update the control-text\n textContent(_this50.percentageEl_, percent);\n _this50.percent_ = percent;\n }\n\n // add child elements to represent the individual buffered time ranges\n for (var _i39 = 0; _i39 < buffered.length; _i39++) {\n var start = buffered.start(_i39);\n var end = buffered.end(_i39);\n var part = children[_i39];\n if (!part) {\n part = _this50.el_.appendChild(_createEl());\n children[_i39] = part;\n }\n\n // only update if changed\n if (part.dataset.start === start && part.dataset.end === end) {\n continue;\n }\n part.dataset.start = start;\n part.dataset.end = end;\n\n // set the percent based on the width of the progress bar (bufferedEnd)\n part.style.left = percentify(start, bufferedEnd);\n part.style.width = percentify(end - start, bufferedEnd);\n }\n\n // remove unused buffered range elements\n for (var _i40 = children.length; _i40 > buffered.length; _i40--) {\n _this50.el_.removeChild(children[_i40 - 1]);\n }\n children.length = buffered.length;\n });\n }\n }]);\n return LoadProgressBar;\n}(Component$1);\nComponent$1.registerComponent('LoadProgressBar', LoadProgressBar);\n\n/**\n * @file time-tooltip.js\n */\n\n/**\n * Time tooltips display a time above the progress bar.\n *\n * @extends Component\n */\nvar TimeTooltip = /*#__PURE__*/function (_Component$12) {\n _inherits(TimeTooltip, _Component$12);\n var _super30 = _createSuper(TimeTooltip);\n /**\n * Creates an instance of this class.\n *\n * @param { import('../../player').default } player\n * The {@link Player} that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n function TimeTooltip(player, options) {\n var _this51;\n _classCallCheck(this, TimeTooltip);\n _this51 = _super30.call(this, player, options);\n _this51.update = throttle(bind_(_assertThisInitialized(_this51), _this51.update), UPDATE_REFRESH_INTERVAL);\n return _this51;\n }\n\n /**\n * Create the time tooltip DOM element\n *\n * @return {Element}\n * The element that was created.\n */\n _createClass(TimeTooltip, [{\n key: \"createEl\",\n value: function createEl() {\n return _get(_getPrototypeOf(TimeTooltip.prototype), \"createEl\", this).call(this, 'div', {\n className: 'vjs-time-tooltip'\n }, {\n 'aria-hidden': 'true'\n });\n }\n\n /**\n * Updates the position of the time tooltip relative to the `SeekBar`.\n *\n * @param {Object} seekBarRect\n * The `ClientRect` for the {@link SeekBar} element.\n *\n * @param {number} seekBarPoint\n * A number from 0 to 1, representing a horizontal reference point\n * from the left edge of the {@link SeekBar}\n */\n }, {\n key: \"update\",\n value: function update(seekBarRect, seekBarPoint, content) {\n var tooltipRect = findPosition(this.el_);\n var playerRect = getBoundingClientRect(this.player_.el());\n var seekBarPointPx = seekBarRect.width * seekBarPoint;\n\n // do nothing if either rect isn't available\n // for example, if the player isn't in the DOM for testing\n if (!playerRect || !tooltipRect) {\n return;\n }\n\n // This is the space left of the `seekBarPoint` available within the bounds\n // of the player. We calculate any gap between the left edge of the player\n // and the left edge of the `SeekBar` and add the number of pixels in the\n // `SeekBar` before hitting the `seekBarPoint`\n var spaceLeftOfPoint = seekBarRect.left - playerRect.left + seekBarPointPx;\n\n // This is the space right of the `seekBarPoint` available within the bounds\n // of the player. We calculate the number of pixels from the `seekBarPoint`\n // to the right edge of the `SeekBar` and add to that any gap between the\n // right edge of the `SeekBar` and the player.\n var spaceRightOfPoint = seekBarRect.width - seekBarPointPx + (playerRect.right - seekBarRect.right);\n\n // This is the number of pixels by which the tooltip will need to be pulled\n // further to the right to center it over the `seekBarPoint`.\n var pullTooltipBy = tooltipRect.width / 2;\n\n // Adjust the `pullTooltipBy` distance to the left or right depending on\n // the results of the space calculations above.\n if (spaceLeftOfPoint < pullTooltipBy) {\n pullTooltipBy += pullTooltipBy - spaceLeftOfPoint;\n } else if (spaceRightOfPoint < pullTooltipBy) {\n pullTooltipBy = spaceRightOfPoint;\n }\n\n // Due to the imprecision of decimal/ratio based calculations and varying\n // rounding behaviors, there are cases where the spacing adjustment is off\n // by a pixel or two. This adds insurance to these calculations.\n if (pullTooltipBy < 0) {\n pullTooltipBy = 0;\n } else if (pullTooltipBy > tooltipRect.width) {\n pullTooltipBy = tooltipRect.width;\n }\n\n // prevent small width fluctuations within 0.4px from\n // changing the value below.\n // This really helps for live to prevent the play\n // progress time tooltip from jittering\n pullTooltipBy = Math.round(pullTooltipBy);\n this.el_.style.right = \"-\".concat(pullTooltipBy, \"px\");\n this.write(content);\n }\n\n /**\n * Write the time to the tooltip DOM element.\n *\n * @param {string} content\n * The formatted time for the tooltip.\n */\n }, {\n key: \"write\",\n value: function write(content) {\n textContent(this.el_, content);\n }\n\n /**\n * Updates the position of the time tooltip relative to the `SeekBar`.\n *\n * @param {Object} seekBarRect\n * The `ClientRect` for the {@link SeekBar} element.\n *\n * @param {number} seekBarPoint\n * A number from 0 to 1, representing a horizontal reference point\n * from the left edge of the {@link SeekBar}\n *\n * @param {number} time\n * The time to update the tooltip to, not used during live playback\n *\n * @param {Function} cb\n * A function that will be called during the request animation frame\n * for tooltips that need to do additional animations from the default\n */\n }, {\n key: \"updateTime\",\n value: function updateTime(seekBarRect, seekBarPoint, time, cb) {\n var _this52 = this;\n this.requestNamedAnimationFrame('TimeTooltip#updateTime', function () {\n var content;\n var duration = _this52.player_.duration();\n if (_this52.player_.liveTracker && _this52.player_.liveTracker.isLive()) {\n var liveWindow = _this52.player_.liveTracker.liveWindow();\n var secondsBehind = liveWindow - seekBarPoint * liveWindow;\n content = (secondsBehind < 1 ? '' : '-') + formatTime(secondsBehind, liveWindow);\n } else {\n content = formatTime(time, duration);\n }\n _this52.update(seekBarRect, seekBarPoint, content);\n if (cb) {\n cb();\n }\n });\n }\n }]);\n return TimeTooltip;\n}(Component$1);\nComponent$1.registerComponent('TimeTooltip', TimeTooltip);\n\n/**\n * @file play-progress-bar.js\n */\n\n/**\n * Used by {@link SeekBar} to display media playback progress as part of the\n * {@link ProgressControl}.\n *\n * @extends Component\n */\nvar PlayProgressBar = /*#__PURE__*/function (_Component$13) {\n _inherits(PlayProgressBar, _Component$13);\n var _super31 = _createSuper(PlayProgressBar);\n /**\n * Creates an instance of this class.\n *\n * @param { import('../../player').default } player\n * The {@link Player} that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n function PlayProgressBar(player, options) {\n var _this53;\n _classCallCheck(this, PlayProgressBar);\n _this53 = _super31.call(this, player, options);\n _this53.setIcon('circle');\n _this53.update = throttle(bind_(_assertThisInitialized(_this53), _this53.update), UPDATE_REFRESH_INTERVAL);\n return _this53;\n }\n\n /**\n * Create the the DOM element for this class.\n *\n * @return {Element}\n * The element that was created.\n */\n _createClass(PlayProgressBar, [{\n key: \"createEl\",\n value: function createEl() {\n return _get(_getPrototypeOf(PlayProgressBar.prototype), \"createEl\", this).call(this, 'div', {\n className: 'vjs-play-progress vjs-slider-bar'\n }, {\n 'aria-hidden': 'true'\n });\n }\n\n /**\n * Enqueues updates to its own DOM as well as the DOM of its\n * {@link TimeTooltip} child.\n *\n * @param {Object} seekBarRect\n * The `ClientRect` for the {@link SeekBar} element.\n *\n * @param {number} seekBarPoint\n * A number from 0 to 1, representing a horizontal reference point\n * from the left edge of the {@link SeekBar}\n */\n }, {\n key: \"update\",\n value: function update(seekBarRect, seekBarPoint) {\n var timeTooltip = this.getChild('timeTooltip');\n if (!timeTooltip) {\n return;\n }\n var time = this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime();\n timeTooltip.updateTime(seekBarRect, seekBarPoint, time);\n }\n }]);\n return PlayProgressBar;\n}(Component$1);\n/**\n * Default options for {@link PlayProgressBar}.\n *\n * @type {Object}\n * @private\n */\nPlayProgressBar.prototype.options_ = {\n children: []\n};\n\n// Time tooltips should not be added to a player on mobile devices\nif (!IS_IOS && !IS_ANDROID) {\n PlayProgressBar.prototype.options_.children.push('timeTooltip');\n}\nComponent$1.registerComponent('PlayProgressBar', PlayProgressBar);\n\n/**\n * @file mouse-time-display.js\n */\n\n/**\n * The {@link MouseTimeDisplay} component tracks mouse movement over the\n * {@link ProgressControl}. It displays an indicator and a {@link TimeTooltip}\n * indicating the time which is represented by a given point in the\n * {@link ProgressControl}.\n *\n * @extends Component\n */\nvar MouseTimeDisplay = /*#__PURE__*/function (_Component$14) {\n _inherits(MouseTimeDisplay, _Component$14);\n var _super32 = _createSuper(MouseTimeDisplay);\n /**\n * Creates an instance of this class.\n *\n * @param { import('../../player').default } player\n * The {@link Player} that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n function MouseTimeDisplay(player, options) {\n var _this54;\n _classCallCheck(this, MouseTimeDisplay);\n _this54 = _super32.call(this, player, options);\n _this54.update = throttle(bind_(_assertThisInitialized(_this54), _this54.update), UPDATE_REFRESH_INTERVAL);\n return _this54;\n }\n\n /**\n * Create the DOM element for this class.\n *\n * @return {Element}\n * The element that was created.\n */\n _createClass(MouseTimeDisplay, [{\n key: \"createEl\",\n value: function createEl() {\n return _get(_getPrototypeOf(MouseTimeDisplay.prototype), \"createEl\", this).call(this, 'div', {\n className: 'vjs-mouse-display'\n });\n }\n\n /**\n * Enqueues updates to its own DOM as well as the DOM of its\n * {@link TimeTooltip} child.\n *\n * @param {Object} seekBarRect\n * The `ClientRect` for the {@link SeekBar} element.\n *\n * @param {number} seekBarPoint\n * A number from 0 to 1, representing a horizontal reference point\n * from the left edge of the {@link SeekBar}\n */\n }, {\n key: \"update\",\n value: function update(seekBarRect, seekBarPoint) {\n var _this55 = this;\n var time = seekBarPoint * this.player_.duration();\n this.getChild('timeTooltip').updateTime(seekBarRect, seekBarPoint, time, function () {\n _this55.el_.style.left = \"\".concat(seekBarRect.width * seekBarPoint, \"px\");\n });\n }\n }]);\n return MouseTimeDisplay;\n}(Component$1);\n/**\n * Default options for `MouseTimeDisplay`\n *\n * @type {Object}\n * @private\n */\nMouseTimeDisplay.prototype.options_ = {\n children: ['timeTooltip']\n};\nComponent$1.registerComponent('MouseTimeDisplay', MouseTimeDisplay);\n\n/**\n * @file seek-bar.js\n */\n\n// The number of seconds the `step*` functions move the timeline.\nvar STEP_SECONDS = 5;\n\n// The multiplier of STEP_SECONDS that PgUp/PgDown move the timeline.\nvar PAGE_KEY_MULTIPLIER = 12;\n\n/**\n * Seek bar and container for the progress bars. Uses {@link PlayProgressBar}\n * as its `bar`.\n *\n * @extends Slider\n */\nvar SeekBar = /*#__PURE__*/function (_Slider) {\n _inherits(SeekBar, _Slider);\n var _super33 = _createSuper(SeekBar);\n /**\n * Creates an instance of this class.\n *\n * @param { import('../../player').default } player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n function SeekBar(player, options) {\n var _this56;\n _classCallCheck(this, SeekBar);\n _this56 = _super33.call(this, player, options);\n _this56.setEventHandlers_();\n return _this56;\n }\n\n /**\n * Sets the event handlers\n *\n * @private\n */\n _createClass(SeekBar, [{\n key: \"setEventHandlers_\",\n value: function setEventHandlers_() {\n var _this57 = this;\n this.update_ = bind_(this, this.update);\n this.update = throttle(this.update_, UPDATE_REFRESH_INTERVAL);\n this.on(this.player_, ['ended', 'durationchange', 'timeupdate'], this.update);\n if (this.player_.liveTracker) {\n this.on(this.player_.liveTracker, 'liveedgechange', this.update);\n }\n\n // when playing, let's ensure we smoothly update the play progress bar\n // via an interval\n this.updateInterval = null;\n this.enableIntervalHandler_ = function (e) {\n return _this57.enableInterval_(e);\n };\n this.disableIntervalHandler_ = function (e) {\n return _this57.disableInterval_(e);\n };\n this.on(this.player_, ['playing'], this.enableIntervalHandler_);\n this.on(this.player_, ['ended', 'pause', 'waiting'], this.disableIntervalHandler_);\n\n // we don't need to update the play progress if the document is hidden,\n // also, this causes the CPU to spike and eventually crash the page on IE11.\n if ('hidden' in document && 'visibilityState' in document) {\n this.on(document, 'visibilitychange', this.toggleVisibility_);\n }\n }\n }, {\n key: \"toggleVisibility_\",\n value: function toggleVisibility_(e) {\n if (document.visibilityState === 'hidden') {\n this.cancelNamedAnimationFrame('SeekBar#update');\n this.cancelNamedAnimationFrame('Slider#update');\n this.disableInterval_(e);\n } else {\n if (!this.player_.ended() && !this.player_.paused()) {\n this.enableInterval_();\n }\n\n // we just switched back to the page and someone may be looking, so, update ASAP\n this.update();\n }\n }\n }, {\n key: \"enableInterval_\",\n value: function enableInterval_() {\n if (this.updateInterval) {\n return;\n }\n this.updateInterval = this.setInterval(this.update, UPDATE_REFRESH_INTERVAL);\n }\n }, {\n key: \"disableInterval_\",\n value: function disableInterval_(e) {\n if (this.player_.liveTracker && this.player_.liveTracker.isLive() && e && e.type !== 'ended') {\n return;\n }\n if (!this.updateInterval) {\n return;\n }\n this.clearInterval(this.updateInterval);\n this.updateInterval = null;\n }\n\n /**\n * Create the `Component`'s DOM element\n *\n * @return {Element}\n * The element that was created.\n */\n }, {\n key: \"createEl\",\n value: function createEl() {\n return _get(_getPrototypeOf(SeekBar.prototype), \"createEl\", this).call(this, 'div', {\n className: 'vjs-progress-holder'\n }, {\n 'aria-label': this.localize('Progress Bar')\n });\n }\n\n /**\n * This function updates the play progress bar and accessibility\n * attributes to whatever is passed in.\n *\n * @param {Event} [event]\n * The `timeupdate` or `ended` event that caused this to run.\n *\n * @listens Player#timeupdate\n *\n * @return {number}\n * The current percent at a number from 0-1\n */\n }, {\n key: \"update\",\n value: function update(event) {\n var _this58 = this;\n // ignore updates while the tab is hidden\n if (document.visibilityState === 'hidden') {\n return;\n }\n var percent = _get(_getPrototypeOf(SeekBar.prototype), \"update\", this).call(this);\n this.requestNamedAnimationFrame('SeekBar#update', function () {\n var currentTime = _this58.player_.ended() ? _this58.player_.duration() : _this58.getCurrentTime_();\n var liveTracker = _this58.player_.liveTracker;\n var duration = _this58.player_.duration();\n if (liveTracker && liveTracker.isLive()) {\n duration = _this58.player_.liveTracker.liveCurrentTime();\n }\n if (_this58.percent_ !== percent) {\n // machine readable value of progress bar (percentage complete)\n _this58.el_.setAttribute('aria-valuenow', (percent * 100).toFixed(2));\n _this58.percent_ = percent;\n }\n if (_this58.currentTime_ !== currentTime || _this58.duration_ !== duration) {\n // human readable value of progress bar (time complete)\n _this58.el_.setAttribute('aria-valuetext', _this58.localize('progress bar timing: currentTime={1} duration={2}', [formatTime(currentTime, duration), formatTime(duration, duration)], '{1} of {2}'));\n _this58.currentTime_ = currentTime;\n _this58.duration_ = duration;\n }\n\n // update the progress bar time tooltip with the current time\n if (_this58.bar) {\n _this58.bar.update(getBoundingClientRect(_this58.el()), _this58.getProgress());\n }\n });\n return percent;\n }\n\n /**\n * Prevent liveThreshold from causing seeks to seem like they\n * are not happening from a user perspective.\n *\n * @param {number} ct\n * current time to seek to\n */\n }, {\n key: \"userSeek_\",\n value: function userSeek_(ct) {\n if (this.player_.liveTracker && this.player_.liveTracker.isLive()) {\n this.player_.liveTracker.nextSeekedFromUser();\n }\n this.player_.currentTime(ct);\n }\n\n /**\n * Get the value of current time but allows for smooth scrubbing,\n * when player can't keep up.\n *\n * @return {number}\n * The current time value to display\n *\n * @private\n */\n }, {\n key: \"getCurrentTime_\",\n value: function getCurrentTime_() {\n return this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime();\n }\n\n /**\n * Get the percentage of media played so far.\n *\n * @return {number}\n * The percentage of media played so far (0 to 1).\n */\n }, {\n key: \"getPercent\",\n value: function getPercent() {\n var currentTime = this.getCurrentTime_();\n var percent;\n var liveTracker = this.player_.liveTracker;\n if (liveTracker && liveTracker.isLive()) {\n percent = (currentTime - liveTracker.seekableStart()) / liveTracker.liveWindow();\n\n // prevent the percent from changing at the live edge\n if (liveTracker.atLiveEdge()) {\n percent = 1;\n }\n } else {\n percent = currentTime / this.player_.duration();\n }\n return percent;\n }\n\n /**\n * Handle mouse down on seek bar\n *\n * @param {MouseEvent} event\n * The `mousedown` event that caused this to run.\n *\n * @listens mousedown\n */\n }, {\n key: \"handleMouseDown\",\n value: function handleMouseDown(event) {\n if (!isSingleLeftClick(event)) {\n return;\n }\n\n // Stop event propagation to prevent double fire in progress-control.js\n event.stopPropagation();\n this.videoWasPlaying = !this.player_.paused();\n this.player_.pause();\n _get(_getPrototypeOf(SeekBar.prototype), \"handleMouseDown\", this).call(this, event);\n }\n\n /**\n * Handle mouse move on seek bar\n *\n * @param {MouseEvent} event\n * The `mousemove` event that caused this to run.\n * @param {boolean} mouseDown this is a flag that should be set to true if `handleMouseMove` is called directly. It allows us to skip things that should not happen if coming from mouse down but should happen on regular mouse move handler. Defaults to false\n *\n * @listens mousemove\n */\n }, {\n key: \"handleMouseMove\",\n value: function handleMouseMove(event) {\n var mouseDown = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n if (!isSingleLeftClick(event) || isNaN(this.player_.duration())) {\n return;\n }\n if (!mouseDown && !this.player_.scrubbing()) {\n this.player_.scrubbing(true);\n }\n var newTime;\n var distance = this.calculateDistance(event);\n var liveTracker = this.player_.liveTracker;\n if (!liveTracker || !liveTracker.isLive()) {\n newTime = distance * this.player_.duration();\n\n // Don't let video end while scrubbing.\n if (newTime === this.player_.duration()) {\n newTime = newTime - 0.1;\n }\n } else {\n if (distance >= 0.99) {\n liveTracker.seekToLiveEdge();\n return;\n }\n var seekableStart = liveTracker.seekableStart();\n var seekableEnd = liveTracker.liveCurrentTime();\n newTime = seekableStart + distance * liveTracker.liveWindow();\n\n // Don't let video end while scrubbing.\n if (newTime >= seekableEnd) {\n newTime = seekableEnd;\n }\n\n // Compensate for precision differences so that currentTime is not less\n // than seekable start\n if (newTime <= seekableStart) {\n newTime = seekableStart + 0.1;\n }\n\n // On android seekableEnd can be Infinity sometimes,\n // this will cause newTime to be Infinity, which is\n // not a valid currentTime.\n if (newTime === Infinity) {\n return;\n }\n }\n\n // Set new time (tell player to seek to new time)\n this.userSeek_(newTime);\n }\n }, {\n key: \"enable\",\n value: function enable() {\n _get(_getPrototypeOf(SeekBar.prototype), \"enable\", this).call(this);\n var mouseTimeDisplay = this.getChild('mouseTimeDisplay');\n if (!mouseTimeDisplay) {\n return;\n }\n mouseTimeDisplay.show();\n }\n }, {\n key: \"disable\",\n value: function disable() {\n _get(_getPrototypeOf(SeekBar.prototype), \"disable\", this).call(this);\n var mouseTimeDisplay = this.getChild('mouseTimeDisplay');\n if (!mouseTimeDisplay) {\n return;\n }\n mouseTimeDisplay.hide();\n }\n\n /**\n * Handle mouse up on seek bar\n *\n * @param {MouseEvent} event\n * The `mouseup` event that caused this to run.\n *\n * @listens mouseup\n */\n }, {\n key: \"handleMouseUp\",\n value: function handleMouseUp(event) {\n _get(_getPrototypeOf(SeekBar.prototype), \"handleMouseUp\", this).call(this, event);\n\n // Stop event propagation to prevent double fire in progress-control.js\n if (event) {\n event.stopPropagation();\n }\n this.player_.scrubbing(false);\n\n /**\n * Trigger timeupdate because we're done seeking and the time has changed.\n * This is particularly useful for if the player is paused to time the time displays.\n *\n * @event Tech#timeupdate\n * @type {Event}\n */\n this.player_.trigger({\n type: 'timeupdate',\n target: this,\n manuallyTriggered: true\n });\n if (this.videoWasPlaying) {\n silencePromise(this.player_.play());\n } else {\n // We're done seeking and the time has changed.\n // If the player is paused, make sure we display the correct time on the seek bar.\n this.update_();\n }\n }\n\n /**\n * Move more quickly fast forward for keyboard-only users\n */\n }, {\n key: \"stepForward\",\n value: function stepForward() {\n this.userSeek_(this.player_.currentTime() + STEP_SECONDS);\n }\n\n /**\n * Move more quickly rewind for keyboard-only users\n */\n }, {\n key: \"stepBack\",\n value: function stepBack() {\n this.userSeek_(this.player_.currentTime() - STEP_SECONDS);\n }\n\n /**\n * Toggles the playback state of the player\n * This gets called when enter or space is used on the seekbar\n *\n * @param {KeyboardEvent} event\n * The `keydown` event that caused this function to be called\n *\n */\n }, {\n key: \"handleAction\",\n value: function handleAction(event) {\n if (this.player_.paused()) {\n this.player_.play();\n } else {\n this.player_.pause();\n }\n }\n\n /**\n * Called when this SeekBar has focus and a key gets pressed down.\n * Supports the following keys:\n *\n * Space or Enter key fire a click event\n * Home key moves to start of the timeline\n * End key moves to end of the timeline\n * Digit \"0\" through \"9\" keys move to 0%, 10% ... 80%, 90% of the timeline\n * PageDown key moves back a larger step than ArrowDown\n * PageUp key moves forward a large step\n *\n * @param {KeyboardEvent} event\n * The `keydown` event that caused this function to be called.\n *\n * @listens keydown\n */\n }, {\n key: \"handleKeyDown\",\n value: function handleKeyDown(event) {\n var liveTracker = this.player_.liveTracker;\n if (keycode.isEventKey(event, 'Space') || keycode.isEventKey(event, 'Enter')) {\n event.preventDefault();\n event.stopPropagation();\n this.handleAction(event);\n } else if (keycode.isEventKey(event, 'Home')) {\n event.preventDefault();\n event.stopPropagation();\n this.userSeek_(0);\n } else if (keycode.isEventKey(event, 'End')) {\n event.preventDefault();\n event.stopPropagation();\n if (liveTracker && liveTracker.isLive()) {\n this.userSeek_(liveTracker.liveCurrentTime());\n } else {\n this.userSeek_(this.player_.duration());\n }\n } else if (/^[0-9]$/.test(keycode(event))) {\n event.preventDefault();\n event.stopPropagation();\n var gotoFraction = (keycode.codes[keycode(event)] - keycode.codes['0']) * 10.0 / 100.0;\n if (liveTracker && liveTracker.isLive()) {\n this.userSeek_(liveTracker.seekableStart() + liveTracker.liveWindow() * gotoFraction);\n } else {\n this.userSeek_(this.player_.duration() * gotoFraction);\n }\n } else if (keycode.isEventKey(event, 'PgDn')) {\n event.preventDefault();\n event.stopPropagation();\n this.userSeek_(this.player_.currentTime() - STEP_SECONDS * PAGE_KEY_MULTIPLIER);\n } else if (keycode.isEventKey(event, 'PgUp')) {\n event.preventDefault();\n event.stopPropagation();\n this.userSeek_(this.player_.currentTime() + STEP_SECONDS * PAGE_KEY_MULTIPLIER);\n } else {\n // Pass keydown handling up for unsupported keys\n _get(_getPrototypeOf(SeekBar.prototype), \"handleKeyDown\", this).call(this, event);\n }\n }\n }, {\n key: \"dispose\",\n value: function dispose() {\n this.disableInterval_();\n this.off(this.player_, ['ended', 'durationchange', 'timeupdate'], this.update);\n if (this.player_.liveTracker) {\n this.off(this.player_.liveTracker, 'liveedgechange', this.update);\n }\n this.off(this.player_, ['playing'], this.enableIntervalHandler_);\n this.off(this.player_, ['ended', 'pause', 'waiting'], this.disableIntervalHandler_);\n\n // we don't need to update the play progress if the document is hidden,\n // also, this causes the CPU to spike and eventually crash the page on IE11.\n if ('hidden' in document && 'visibilityState' in document) {\n this.off(document, 'visibilitychange', this.toggleVisibility_);\n }\n _get(_getPrototypeOf(SeekBar.prototype), \"dispose\", this).call(this);\n }\n }]);\n return SeekBar;\n}(Slider);\n/**\n * Default options for the `SeekBar`\n *\n * @type {Object}\n * @private\n */\nSeekBar.prototype.options_ = {\n children: ['loadProgressBar', 'playProgressBar'],\n barName: 'playProgressBar'\n};\n\n// MouseTimeDisplay tooltips should not be added to a player on mobile devices\nif (!IS_IOS && !IS_ANDROID) {\n SeekBar.prototype.options_.children.splice(1, 0, 'mouseTimeDisplay');\n}\nComponent$1.registerComponent('SeekBar', SeekBar);\n\n/**\n * @file progress-control.js\n */\n\n/**\n * The Progress Control component contains the seek bar, load progress,\n * and play progress.\n *\n * @extends Component\n */\nvar ProgressControl = /*#__PURE__*/function (_Component$15) {\n _inherits(ProgressControl, _Component$15);\n var _super34 = _createSuper(ProgressControl);\n /**\n * Creates an instance of this class.\n *\n * @param { import('../../player').default } player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n function ProgressControl(player, options) {\n var _this59;\n _classCallCheck(this, ProgressControl);\n _this59 = _super34.call(this, player, options);\n _this59.handleMouseMove = throttle(bind_(_assertThisInitialized(_this59), _this59.handleMouseMove), UPDATE_REFRESH_INTERVAL);\n _this59.throttledHandleMouseSeek = throttle(bind_(_assertThisInitialized(_this59), _this59.handleMouseSeek), UPDATE_REFRESH_INTERVAL);\n _this59.handleMouseUpHandler_ = function (e) {\n return _this59.handleMouseUp(e);\n };\n _this59.handleMouseDownHandler_ = function (e) {\n return _this59.handleMouseDown(e);\n };\n _this59.enable();\n return _this59;\n }\n\n /**\n * Create the `Component`'s DOM element\n *\n * @return {Element}\n * The element that was created.\n */\n _createClass(ProgressControl, [{\n key: \"createEl\",\n value: function createEl() {\n return _get(_getPrototypeOf(ProgressControl.prototype), \"createEl\", this).call(this, 'div', {\n className: 'vjs-progress-control vjs-control'\n });\n }\n\n /**\n * When the mouse moves over the `ProgressControl`, the pointer position\n * gets passed down to the `MouseTimeDisplay` component.\n *\n * @param {Event} event\n * The `mousemove` event that caused this function to run.\n *\n * @listen mousemove\n */\n }, {\n key: \"handleMouseMove\",\n value: function handleMouseMove(event) {\n var seekBar = this.getChild('seekBar');\n if (!seekBar) {\n return;\n }\n var playProgressBar = seekBar.getChild('playProgressBar');\n var mouseTimeDisplay = seekBar.getChild('mouseTimeDisplay');\n if (!playProgressBar && !mouseTimeDisplay) {\n return;\n }\n var seekBarEl = seekBar.el();\n var seekBarRect = findPosition(seekBarEl);\n var seekBarPoint = getPointerPosition(seekBarEl, event).x;\n\n // The default skin has a gap on either side of the `SeekBar`. This means\n // that it's possible to trigger this behavior outside the boundaries of\n // the `SeekBar`. This ensures we stay within it at all times.\n seekBarPoint = clamp(seekBarPoint, 0, 1);\n if (mouseTimeDisplay) {\n mouseTimeDisplay.update(seekBarRect, seekBarPoint);\n }\n if (playProgressBar) {\n playProgressBar.update(seekBarRect, seekBar.getProgress());\n }\n }\n\n /**\n * A throttled version of the {@link ProgressControl#handleMouseSeek} listener.\n *\n * @method ProgressControl#throttledHandleMouseSeek\n * @param {Event} event\n * The `mousemove` event that caused this function to run.\n *\n * @listen mousemove\n * @listen touchmove\n */\n\n /**\n * Handle `mousemove` or `touchmove` events on the `ProgressControl`.\n *\n * @param {Event} event\n * `mousedown` or `touchstart` event that triggered this function\n *\n * @listens mousemove\n * @listens touchmove\n */\n }, {\n key: \"handleMouseSeek\",\n value: function handleMouseSeek(event) {\n var seekBar = this.getChild('seekBar');\n if (seekBar) {\n seekBar.handleMouseMove(event);\n }\n }\n\n /**\n * Are controls are currently enabled for this progress control.\n *\n * @return {boolean}\n * true if controls are enabled, false otherwise\n */\n }, {\n key: \"enabled\",\n value: function enabled() {\n return this.enabled_;\n }\n\n /**\n * Disable all controls on the progress control and its children\n */\n }, {\n key: \"disable\",\n value: function disable() {\n this.children().forEach(function (child) {\n return child.disable && child.disable();\n });\n if (!this.enabled()) {\n return;\n }\n this.off(['mousedown', 'touchstart'], this.handleMouseDownHandler_);\n this.off(this.el_, 'mousemove', this.handleMouseMove);\n this.removeListenersAddedOnMousedownAndTouchstart();\n this.addClass('disabled');\n this.enabled_ = false;\n\n // Restore normal playback state if controls are disabled while scrubbing\n if (this.player_.scrubbing()) {\n var seekBar = this.getChild('seekBar');\n this.player_.scrubbing(false);\n if (seekBar.videoWasPlaying) {\n silencePromise(this.player_.play());\n }\n }\n }\n\n /**\n * Enable all controls on the progress control and its children\n */\n }, {\n key: \"enable\",\n value: function enable() {\n this.children().forEach(function (child) {\n return child.enable && child.enable();\n });\n if (this.enabled()) {\n return;\n }\n this.on(['mousedown', 'touchstart'], this.handleMouseDownHandler_);\n this.on(this.el_, 'mousemove', this.handleMouseMove);\n this.removeClass('disabled');\n this.enabled_ = true;\n }\n\n /**\n * Cleanup listeners after the user finishes interacting with the progress controls\n */\n }, {\n key: \"removeListenersAddedOnMousedownAndTouchstart\",\n value: function removeListenersAddedOnMousedownAndTouchstart() {\n var doc = this.el_.ownerDocument;\n this.off(doc, 'mousemove', this.throttledHandleMouseSeek);\n this.off(doc, 'touchmove', this.throttledHandleMouseSeek);\n this.off(doc, 'mouseup', this.handleMouseUpHandler_);\n this.off(doc, 'touchend', this.handleMouseUpHandler_);\n }\n\n /**\n * Handle `mousedown` or `touchstart` events on the `ProgressControl`.\n *\n * @param {Event} event\n * `mousedown` or `touchstart` event that triggered this function\n *\n * @listens mousedown\n * @listens touchstart\n */\n }, {\n key: \"handleMouseDown\",\n value: function handleMouseDown(event) {\n var doc = this.el_.ownerDocument;\n var seekBar = this.getChild('seekBar');\n if (seekBar) {\n seekBar.handleMouseDown(event);\n }\n this.on(doc, 'mousemove', this.throttledHandleMouseSeek);\n this.on(doc, 'touchmove', this.throttledHandleMouseSeek);\n this.on(doc, 'mouseup', this.handleMouseUpHandler_);\n this.on(doc, 'touchend', this.handleMouseUpHandler_);\n }\n\n /**\n * Handle `mouseup` or `touchend` events on the `ProgressControl`.\n *\n * @param {Event} event\n * `mouseup` or `touchend` event that triggered this function.\n *\n * @listens touchend\n * @listens mouseup\n */\n }, {\n key: \"handleMouseUp\",\n value: function handleMouseUp(event) {\n var seekBar = this.getChild('seekBar');\n if (seekBar) {\n seekBar.handleMouseUp(event);\n }\n this.removeListenersAddedOnMousedownAndTouchstart();\n }\n }]);\n return ProgressControl;\n}(Component$1);\n/**\n * Default options for `ProgressControl`\n *\n * @type {Object}\n * @private\n */\nProgressControl.prototype.options_ = {\n children: ['seekBar']\n};\nComponent$1.registerComponent('ProgressControl', ProgressControl);\n\n/**\n * @file picture-in-picture-toggle.js\n */\n\n/**\n * Toggle Picture-in-Picture mode\n *\n * @extends Button\n */\nvar PictureInPictureToggle = /*#__PURE__*/function (_Button5) {\n _inherits(PictureInPictureToggle, _Button5);\n var _super35 = _createSuper(PictureInPictureToggle);\n /**\n * Creates an instance of this class.\n *\n * @param { import('./player').default } player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n *\n * @listens Player#enterpictureinpicture\n * @listens Player#leavepictureinpicture\n */\n function PictureInPictureToggle(player, options) {\n var _this60;\n _classCallCheck(this, PictureInPictureToggle);\n _this60 = _super35.call(this, player, options);\n _this60.setIcon('picture-in-picture-enter');\n _this60.on(player, ['enterpictureinpicture', 'leavepictureinpicture'], function (e) {\n return _this60.handlePictureInPictureChange(e);\n });\n _this60.on(player, ['disablepictureinpicturechanged', 'loadedmetadata'], function (e) {\n return _this60.handlePictureInPictureEnabledChange(e);\n });\n _this60.on(player, ['loadedmetadata', 'audioonlymodechange', 'audiopostermodechange'], function () {\n return _this60.handlePictureInPictureAudioModeChange();\n });\n\n // TODO: Deactivate button on player emptied event.\n _this60.disable();\n return _this60;\n }\n\n /**\n * Builds the default DOM `className`.\n *\n * @return {string}\n * The DOM `className` for this object.\n */\n _createClass(PictureInPictureToggle, [{\n key: \"buildCSSClass\",\n value: function buildCSSClass() {\n return \"vjs-picture-in-picture-control vjs-hidden \".concat(_get(_getPrototypeOf(PictureInPictureToggle.prototype), \"buildCSSClass\", this).call(this));\n }\n\n /**\n * Displays or hides the button depending on the audio mode detection.\n * Exits picture-in-picture if it is enabled when switching to audio mode.\n */\n }, {\n key: \"handlePictureInPictureAudioModeChange\",\n value: function handlePictureInPictureAudioModeChange() {\n // This audio detection will not detect HLS or DASH audio-only streams because there was no reliable way to detect them at the time\n var isSourceAudio = this.player_.currentType().substring(0, 5) === 'audio';\n var isAudioMode = isSourceAudio || this.player_.audioPosterMode() || this.player_.audioOnlyMode();\n if (!isAudioMode) {\n this.show();\n return;\n }\n if (this.player_.isInPictureInPicture()) {\n this.player_.exitPictureInPicture();\n }\n this.hide();\n }\n\n /**\n * Enables or disables button based on availability of a Picture-In-Picture mode.\n *\n * Enabled if\n * - `player.options().enableDocumentPictureInPicture` is true and\n * window.documentPictureInPicture is available; or\n * - `player.disablePictureInPicture()` is false and\n * element.requestPictureInPicture is available\n */\n }, {\n key: \"handlePictureInPictureEnabledChange\",\n value: function handlePictureInPictureEnabledChange() {\n if (document.pictureInPictureEnabled && this.player_.disablePictureInPicture() === false || this.player_.options_.enableDocumentPictureInPicture && 'documentPictureInPicture' in window$1) {\n this.enable();\n } else {\n this.disable();\n }\n }\n\n /**\n * Handles enterpictureinpicture and leavepictureinpicture on the player and change control text accordingly.\n *\n * @param {Event} [event]\n * The {@link Player#enterpictureinpicture} or {@link Player#leavepictureinpicture} event that caused this function to be\n * called.\n *\n * @listens Player#enterpictureinpicture\n * @listens Player#leavepictureinpicture\n */\n }, {\n key: \"handlePictureInPictureChange\",\n value: function handlePictureInPictureChange(event) {\n if (this.player_.isInPictureInPicture()) {\n this.setIcon('picture-in-picture-exit');\n this.controlText('Exit Picture-in-Picture');\n } else {\n this.setIcon('picture-in-picture-enter');\n this.controlText('Picture-in-Picture');\n }\n this.handlePictureInPictureEnabledChange();\n }\n\n /**\n * This gets called when an `PictureInPictureToggle` is \"clicked\". See\n * {@link ClickableComponent} for more detailed information on what a click can be.\n *\n * @param {Event} [event]\n * The `keydown`, `tap`, or `click` event that caused this function to be\n * called.\n *\n * @listens tap\n * @listens click\n */\n }, {\n key: \"handleClick\",\n value: function handleClick(event) {\n if (!this.player_.isInPictureInPicture()) {\n this.player_.requestPictureInPicture();\n } else {\n this.player_.exitPictureInPicture();\n }\n }\n\n /**\n * Show the `Component`s element if it is hidden by removing the\n * 'vjs-hidden' class name from it only in browsers that support the Picture-in-Picture API.\n */\n }, {\n key: \"show\",\n value: function show() {\n // Does not allow to display the pictureInPictureToggle in browsers that do not support the Picture-in-Picture API, e.g. Firefox.\n if (typeof document.exitPictureInPicture !== 'function') {\n return;\n }\n _get(_getPrototypeOf(PictureInPictureToggle.prototype), \"show\", this).call(this);\n }\n }]);\n return PictureInPictureToggle;\n}(Button);\n/**\n * The text that should display over the `PictureInPictureToggle`s controls. Added for localization.\n *\n * @type {string}\n * @protected\n */\nPictureInPictureToggle.prototype.controlText_ = 'Picture-in-Picture';\nComponent$1.registerComponent('PictureInPictureToggle', PictureInPictureToggle);\n\n/**\n * @file fullscreen-toggle.js\n */\n\n/**\n * Toggle fullscreen video\n *\n * @extends Button\n */\nvar FullscreenToggle = /*#__PURE__*/function (_Button6) {\n _inherits(FullscreenToggle, _Button6);\n var _super36 = _createSuper(FullscreenToggle);\n /**\n * Creates an instance of this class.\n *\n * @param { import('./player').default } player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n function FullscreenToggle(player, options) {\n var _this61;\n _classCallCheck(this, FullscreenToggle);\n _this61 = _super36.call(this, player, options);\n _this61.setIcon('fullscreen-enter');\n _this61.on(player, 'fullscreenchange', function (e) {\n return _this61.handleFullscreenChange(e);\n });\n if (document[player.fsApi_.fullscreenEnabled] === false) {\n _this61.disable();\n }\n return _this61;\n }\n\n /**\n * Builds the default DOM `className`.\n *\n * @return {string}\n * The DOM `className` for this object.\n */\n _createClass(FullscreenToggle, [{\n key: \"buildCSSClass\",\n value: function buildCSSClass() {\n return \"vjs-fullscreen-control \".concat(_get(_getPrototypeOf(FullscreenToggle.prototype), \"buildCSSClass\", this).call(this));\n }\n\n /**\n * Handles fullscreenchange on the player and change control text accordingly.\n *\n * @param {Event} [event]\n * The {@link Player#fullscreenchange} event that caused this function to be\n * called.\n *\n * @listens Player#fullscreenchange\n */\n }, {\n key: \"handleFullscreenChange\",\n value: function handleFullscreenChange(event) {\n if (this.player_.isFullscreen()) {\n this.controlText('Exit Fullscreen');\n this.setIcon('fullscreen-exit');\n } else {\n this.controlText('Fullscreen');\n this.setIcon('fullscreen-enter');\n }\n }\n\n /**\n * This gets called when an `FullscreenToggle` is \"clicked\". See\n * {@link ClickableComponent} for more detailed information on what a click can be.\n *\n * @param {Event} [event]\n * The `keydown`, `tap`, or `click` event that caused this function to be\n * called.\n *\n * @listens tap\n * @listens click\n */\n }, {\n key: \"handleClick\",\n value: function handleClick(event) {\n if (!this.player_.isFullscreen()) {\n this.player_.requestFullscreen();\n } else {\n this.player_.exitFullscreen();\n }\n }\n }]);\n return FullscreenToggle;\n}(Button);\n/**\n * The text that should display over the `FullscreenToggle`s controls. Added for localization.\n *\n * @type {string}\n * @protected\n */\nFullscreenToggle.prototype.controlText_ = 'Fullscreen';\nComponent$1.registerComponent('FullscreenToggle', FullscreenToggle);\n\n/**\n * Check if volume control is supported and if it isn't hide the\n * `Component` that was passed using the `vjs-hidden` class.\n *\n * @param { import('../../component').default } self\n * The component that should be hidden if volume is unsupported\n *\n * @param { import('../../player').default } player\n * A reference to the player\n *\n * @private\n */\nvar checkVolumeSupport = function checkVolumeSupport(self, player) {\n // hide volume controls when they're not supported by the current tech\n if (player.tech_ && !player.tech_.featuresVolumeControl) {\n self.addClass('vjs-hidden');\n }\n self.on(player, 'loadstart', function () {\n if (!player.tech_.featuresVolumeControl) {\n self.addClass('vjs-hidden');\n } else {\n self.removeClass('vjs-hidden');\n }\n });\n};\n\n/**\n * @file volume-level.js\n */\n\n/**\n * Shows volume level\n *\n * @extends Component\n */\nvar VolumeLevel = /*#__PURE__*/function (_Component$16) {\n _inherits(VolumeLevel, _Component$16);\n var _super37 = _createSuper(VolumeLevel);\n function VolumeLevel() {\n _classCallCheck(this, VolumeLevel);\n return _super37.apply(this, arguments);\n }\n _createClass(VolumeLevel, [{\n key: \"createEl\",\n value:\n /**\n * Create the `Component`'s DOM element\n *\n * @return {Element}\n * The element that was created.\n */\n function createEl() {\n var el = _get(_getPrototypeOf(VolumeLevel.prototype), \"createEl\", this).call(this, 'div', {\n className: 'vjs-volume-level'\n });\n this.setIcon('circle', el);\n el.appendChild(_get(_getPrototypeOf(VolumeLevel.prototype), \"createEl\", this).call(this, 'span', {\n className: 'vjs-control-text'\n }));\n return el;\n }\n }]);\n return VolumeLevel;\n}(Component$1);\nComponent$1.registerComponent('VolumeLevel', VolumeLevel);\n\n/**\n * @file volume-level-tooltip.js\n */\n\n/**\n * Volume level tooltips display a volume above or side by side the volume bar.\n *\n * @extends Component\n */\nvar VolumeLevelTooltip = /*#__PURE__*/function (_Component$17) {\n _inherits(VolumeLevelTooltip, _Component$17);\n var _super38 = _createSuper(VolumeLevelTooltip);\n /**\n * Creates an instance of this class.\n *\n * @param { import('../../player').default } player\n * The {@link Player} that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n function VolumeLevelTooltip(player, options) {\n var _this62;\n _classCallCheck(this, VolumeLevelTooltip);\n _this62 = _super38.call(this, player, options);\n _this62.update = throttle(bind_(_assertThisInitialized(_this62), _this62.update), UPDATE_REFRESH_INTERVAL);\n return _this62;\n }\n\n /**\n * Create the volume tooltip DOM element\n *\n * @return {Element}\n * The element that was created.\n */\n _createClass(VolumeLevelTooltip, [{\n key: \"createEl\",\n value: function createEl() {\n return _get(_getPrototypeOf(VolumeLevelTooltip.prototype), \"createEl\", this).call(this, 'div', {\n className: 'vjs-volume-tooltip'\n }, {\n 'aria-hidden': 'true'\n });\n }\n\n /**\n * Updates the position of the tooltip relative to the `VolumeBar` and\n * its content text.\n *\n * @param {Object} rangeBarRect\n * The `ClientRect` for the {@link VolumeBar} element.\n *\n * @param {number} rangeBarPoint\n * A number from 0 to 1, representing a horizontal/vertical reference point\n * from the left edge of the {@link VolumeBar}\n *\n * @param {boolean} vertical\n * Referees to the Volume control position\n * in the control bar{@link VolumeControl}\n *\n */\n }, {\n key: \"update\",\n value: function update(rangeBarRect, rangeBarPoint, vertical, content) {\n if (!vertical) {\n var tooltipRect = getBoundingClientRect(this.el_);\n var playerRect = getBoundingClientRect(this.player_.el());\n var volumeBarPointPx = rangeBarRect.width * rangeBarPoint;\n if (!playerRect || !tooltipRect) {\n return;\n }\n var spaceLeftOfPoint = rangeBarRect.left - playerRect.left + volumeBarPointPx;\n var spaceRightOfPoint = rangeBarRect.width - volumeBarPointPx + (playerRect.right - rangeBarRect.right);\n var pullTooltipBy = tooltipRect.width / 2;\n if (spaceLeftOfPoint < pullTooltipBy) {\n pullTooltipBy += pullTooltipBy - spaceLeftOfPoint;\n } else if (spaceRightOfPoint < pullTooltipBy) {\n pullTooltipBy = spaceRightOfPoint;\n }\n if (pullTooltipBy < 0) {\n pullTooltipBy = 0;\n } else if (pullTooltipBy > tooltipRect.width) {\n pullTooltipBy = tooltipRect.width;\n }\n this.el_.style.right = \"-\".concat(pullTooltipBy, \"px\");\n }\n this.write(\"\".concat(content, \"%\"));\n }\n\n /**\n * Write the volume to the tooltip DOM element.\n *\n * @param {string} content\n * The formatted volume for the tooltip.\n */\n }, {\n key: \"write\",\n value: function write(content) {\n textContent(this.el_, content);\n }\n\n /**\n * Updates the position of the volume tooltip relative to the `VolumeBar`.\n *\n * @param {Object} rangeBarRect\n * The `ClientRect` for the {@link VolumeBar} element.\n *\n * @param {number} rangeBarPoint\n * A number from 0 to 1, representing a horizontal/vertical reference point\n * from the left edge of the {@link VolumeBar}\n *\n * @param {boolean} vertical\n * Referees to the Volume control position\n * in the control bar{@link VolumeControl}\n *\n * @param {number} volume\n * The volume level to update the tooltip to\n *\n * @param {Function} cb\n * A function that will be called during the request animation frame\n * for tooltips that need to do additional animations from the default\n */\n }, {\n key: \"updateVolume\",\n value: function updateVolume(rangeBarRect, rangeBarPoint, vertical, volume, cb) {\n var _this63 = this;\n this.requestNamedAnimationFrame('VolumeLevelTooltip#updateVolume', function () {\n _this63.update(rangeBarRect, rangeBarPoint, vertical, volume.toFixed(0));\n if (cb) {\n cb();\n }\n });\n }\n }]);\n return VolumeLevelTooltip;\n}(Component$1);\nComponent$1.registerComponent('VolumeLevelTooltip', VolumeLevelTooltip);\n\n/**\n * @file mouse-volume-level-display.js\n */\n\n/**\n * The {@link MouseVolumeLevelDisplay} component tracks mouse movement over the\n * {@link VolumeControl}. It displays an indicator and a {@link VolumeLevelTooltip}\n * indicating the volume level which is represented by a given point in the\n * {@link VolumeBar}.\n *\n * @extends Component\n */\nvar MouseVolumeLevelDisplay = /*#__PURE__*/function (_Component$18) {\n _inherits(MouseVolumeLevelDisplay, _Component$18);\n var _super39 = _createSuper(MouseVolumeLevelDisplay);\n /**\n * Creates an instance of this class.\n *\n * @param { import('../../player').default } player\n * The {@link Player} that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n function MouseVolumeLevelDisplay(player, options) {\n var _this64;\n _classCallCheck(this, MouseVolumeLevelDisplay);\n _this64 = _super39.call(this, player, options);\n _this64.update = throttle(bind_(_assertThisInitialized(_this64), _this64.update), UPDATE_REFRESH_INTERVAL);\n return _this64;\n }\n\n /**\n * Create the DOM element for this class.\n *\n * @return {Element}\n * The element that was created.\n */\n _createClass(MouseVolumeLevelDisplay, [{\n key: \"createEl\",\n value: function createEl() {\n return _get(_getPrototypeOf(MouseVolumeLevelDisplay.prototype), \"createEl\", this).call(this, 'div', {\n className: 'vjs-mouse-display'\n });\n }\n\n /**\n * Enquires updates to its own DOM as well as the DOM of its\n * {@link VolumeLevelTooltip} child.\n *\n * @param {Object} rangeBarRect\n * The `ClientRect` for the {@link VolumeBar} element.\n *\n * @param {number} rangeBarPoint\n * A number from 0 to 1, representing a horizontal/vertical reference point\n * from the left edge of the {@link VolumeBar}\n *\n * @param {boolean} vertical\n * Referees to the Volume control position\n * in the control bar{@link VolumeControl}\n *\n */\n }, {\n key: \"update\",\n value: function update(rangeBarRect, rangeBarPoint, vertical) {\n var _this65 = this;\n var volume = 100 * rangeBarPoint;\n this.getChild('volumeLevelTooltip').updateVolume(rangeBarRect, rangeBarPoint, vertical, volume, function () {\n if (vertical) {\n _this65.el_.style.bottom = \"\".concat(rangeBarRect.height * rangeBarPoint, \"px\");\n } else {\n _this65.el_.style.left = \"\".concat(rangeBarRect.width * rangeBarPoint, \"px\");\n }\n });\n }\n }]);\n return MouseVolumeLevelDisplay;\n}(Component$1);\n/**\n * Default options for `MouseVolumeLevelDisplay`\n *\n * @type {Object}\n * @private\n */\nMouseVolumeLevelDisplay.prototype.options_ = {\n children: ['volumeLevelTooltip']\n};\nComponent$1.registerComponent('MouseVolumeLevelDisplay', MouseVolumeLevelDisplay);\n\n/**\n * @file volume-bar.js\n */\n\n/**\n * The bar that contains the volume level and can be clicked on to adjust the level\n *\n * @extends Slider\n */\nvar VolumeBar = /*#__PURE__*/function (_Slider2) {\n _inherits(VolumeBar, _Slider2);\n var _super40 = _createSuper(VolumeBar);\n /**\n * Creates an instance of this class.\n *\n * @param { import('../../player').default } player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n function VolumeBar(player, options) {\n var _this66;\n _classCallCheck(this, VolumeBar);\n _this66 = _super40.call(this, player, options);\n _this66.on('slideractive', function (e) {\n return _this66.updateLastVolume_(e);\n });\n _this66.on(player, 'volumechange', function (e) {\n return _this66.updateARIAAttributes(e);\n });\n player.ready(function () {\n return _this66.updateARIAAttributes();\n });\n return _this66;\n }\n\n /**\n * Create the `Component`'s DOM element\n *\n * @return {Element}\n * The element that was created.\n */\n _createClass(VolumeBar, [{\n key: \"createEl\",\n value: function createEl() {\n return _get(_getPrototypeOf(VolumeBar.prototype), \"createEl\", this).call(this, 'div', {\n className: 'vjs-volume-bar vjs-slider-bar'\n }, {\n 'aria-label': this.localize('Volume Level'),\n 'aria-live': 'polite'\n });\n }\n\n /**\n * Handle mouse down on volume bar\n *\n * @param {Event} event\n * The `mousedown` event that caused this to run.\n *\n * @listens mousedown\n */\n }, {\n key: \"handleMouseDown\",\n value: function handleMouseDown(event) {\n if (!isSingleLeftClick(event)) {\n return;\n }\n _get(_getPrototypeOf(VolumeBar.prototype), \"handleMouseDown\", this).call(this, event);\n }\n\n /**\n * Handle movement events on the {@link VolumeMenuButton}.\n *\n * @param {Event} event\n * The event that caused this function to run.\n *\n * @listens mousemove\n */\n }, {\n key: \"handleMouseMove\",\n value: function handleMouseMove(event) {\n var mouseVolumeLevelDisplay = this.getChild('mouseVolumeLevelDisplay');\n if (mouseVolumeLevelDisplay) {\n var volumeBarEl = this.el();\n var volumeBarRect = getBoundingClientRect(volumeBarEl);\n var vertical = this.vertical();\n var volumeBarPoint = getPointerPosition(volumeBarEl, event);\n volumeBarPoint = vertical ? volumeBarPoint.y : volumeBarPoint.x;\n // The default skin has a gap on either side of the `VolumeBar`. This means\n // that it's possible to trigger this behavior outside the boundaries of\n // the `VolumeBar`. This ensures we stay within it at all times.\n volumeBarPoint = clamp(volumeBarPoint, 0, 1);\n mouseVolumeLevelDisplay.update(volumeBarRect, volumeBarPoint, vertical);\n }\n if (!isSingleLeftClick(event)) {\n return;\n }\n this.checkMuted();\n this.player_.volume(this.calculateDistance(event));\n }\n\n /**\n * If the player is muted unmute it.\n */\n }, {\n key: \"checkMuted\",\n value: function checkMuted() {\n if (this.player_.muted()) {\n this.player_.muted(false);\n }\n }\n\n /**\n * Get percent of volume level\n *\n * @return {number}\n * Volume level percent as a decimal number.\n */\n }, {\n key: \"getPercent\",\n value: function getPercent() {\n if (this.player_.muted()) {\n return 0;\n }\n return this.player_.volume();\n }\n\n /**\n * Increase volume level for keyboard users\n */\n }, {\n key: \"stepForward\",\n value: function stepForward() {\n this.checkMuted();\n this.player_.volume(this.player_.volume() + 0.1);\n }\n\n /**\n * Decrease volume level for keyboard users\n */\n }, {\n key: \"stepBack\",\n value: function stepBack() {\n this.checkMuted();\n this.player_.volume(this.player_.volume() - 0.1);\n }\n\n /**\n * Update ARIA accessibility attributes\n *\n * @param {Event} [event]\n * The `volumechange` event that caused this function to run.\n *\n * @listens Player#volumechange\n */\n }, {\n key: \"updateARIAAttributes\",\n value: function updateARIAAttributes(event) {\n var ariaValue = this.player_.muted() ? 0 : this.volumeAsPercentage_();\n this.el_.setAttribute('aria-valuenow', ariaValue);\n this.el_.setAttribute('aria-valuetext', ariaValue + '%');\n }\n\n /**\n * Returns the current value of the player volume as a percentage\n *\n * @private\n */\n }, {\n key: \"volumeAsPercentage_\",\n value: function volumeAsPercentage_() {\n return Math.round(this.player_.volume() * 100);\n }\n\n /**\n * When user starts dragging the VolumeBar, store the volume and listen for\n * the end of the drag. When the drag ends, if the volume was set to zero,\n * set lastVolume to the stored volume.\n *\n * @listens slideractive\n * @private\n */\n }, {\n key: \"updateLastVolume_\",\n value: function updateLastVolume_() {\n var _this67 = this;\n var volumeBeforeDrag = this.player_.volume();\n this.one('sliderinactive', function () {\n if (_this67.player_.volume() === 0) {\n _this67.player_.lastVolume_(volumeBeforeDrag);\n }\n });\n }\n }]);\n return VolumeBar;\n}(Slider);\n/**\n * Default options for the `VolumeBar`\n *\n * @type {Object}\n * @private\n */\nVolumeBar.prototype.options_ = {\n children: ['volumeLevel'],\n barName: 'volumeLevel'\n};\n\n// MouseVolumeLevelDisplay tooltip should not be added to a player on mobile devices\nif (!IS_IOS && !IS_ANDROID) {\n VolumeBar.prototype.options_.children.splice(0, 0, 'mouseVolumeLevelDisplay');\n}\n\n/**\n * Call the update event for this Slider when this event happens on the player.\n *\n * @type {string}\n */\nVolumeBar.prototype.playerEvent = 'volumechange';\nComponent$1.registerComponent('VolumeBar', VolumeBar);\n\n/**\n * @file volume-control.js\n */\n\n/**\n * The component for controlling the volume level\n *\n * @extends Component\n */\nvar VolumeControl = /*#__PURE__*/function (_Component$19) {\n _inherits(VolumeControl, _Component$19);\n var _super41 = _createSuper(VolumeControl);\n /**\n * Creates an instance of this class.\n *\n * @param { import('../../player').default } player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options={}]\n * The key/value store of player options.\n */\n function VolumeControl(player) {\n var _this68;\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n _classCallCheck(this, VolumeControl);\n options.vertical = options.vertical || false;\n\n // Pass the vertical option down to the VolumeBar if\n // the VolumeBar is turned on.\n if (typeof options.volumeBar === 'undefined' || isPlain(options.volumeBar)) {\n options.volumeBar = options.volumeBar || {};\n options.volumeBar.vertical = options.vertical;\n }\n _this68 = _super41.call(this, player, options);\n\n // hide this control if volume support is missing\n checkVolumeSupport(_assertThisInitialized(_this68), player);\n _this68.throttledHandleMouseMove = throttle(bind_(_assertThisInitialized(_this68), _this68.handleMouseMove), UPDATE_REFRESH_INTERVAL);\n _this68.handleMouseUpHandler_ = function (e) {\n return _this68.handleMouseUp(e);\n };\n _this68.on('mousedown', function (e) {\n return _this68.handleMouseDown(e);\n });\n _this68.on('touchstart', function (e) {\n return _this68.handleMouseDown(e);\n });\n _this68.on('mousemove', function (e) {\n return _this68.handleMouseMove(e);\n });\n\n // while the slider is active (the mouse has been pressed down and\n // is dragging) or in focus we do not want to hide the VolumeBar\n _this68.on(_this68.volumeBar, ['focus', 'slideractive'], function () {\n _this68.volumeBar.addClass('vjs-slider-active');\n _this68.addClass('vjs-slider-active');\n _this68.trigger('slideractive');\n });\n _this68.on(_this68.volumeBar, ['blur', 'sliderinactive'], function () {\n _this68.volumeBar.removeClass('vjs-slider-active');\n _this68.removeClass('vjs-slider-active');\n _this68.trigger('sliderinactive');\n });\n return _this68;\n }\n\n /**\n * Create the `Component`'s DOM element\n *\n * @return {Element}\n * The element that was created.\n */\n _createClass(VolumeControl, [{\n key: \"createEl\",\n value: function createEl() {\n var orientationClass = 'vjs-volume-horizontal';\n if (this.options_.vertical) {\n orientationClass = 'vjs-volume-vertical';\n }\n return _get(_getPrototypeOf(VolumeControl.prototype), \"createEl\", this).call(this, 'div', {\n className: \"vjs-volume-control vjs-control \".concat(orientationClass)\n });\n }\n\n /**\n * Handle `mousedown` or `touchstart` events on the `VolumeControl`.\n *\n * @param {Event} event\n * `mousedown` or `touchstart` event that triggered this function\n *\n * @listens mousedown\n * @listens touchstart\n */\n }, {\n key: \"handleMouseDown\",\n value: function handleMouseDown(event) {\n var doc = this.el_.ownerDocument;\n this.on(doc, 'mousemove', this.throttledHandleMouseMove);\n this.on(doc, 'touchmove', this.throttledHandleMouseMove);\n this.on(doc, 'mouseup', this.handleMouseUpHandler_);\n this.on(doc, 'touchend', this.handleMouseUpHandler_);\n }\n\n /**\n * Handle `mouseup` or `touchend` events on the `VolumeControl`.\n *\n * @param {Event} event\n * `mouseup` or `touchend` event that triggered this function.\n *\n * @listens touchend\n * @listens mouseup\n */\n }, {\n key: \"handleMouseUp\",\n value: function handleMouseUp(event) {\n var doc = this.el_.ownerDocument;\n this.off(doc, 'mousemove', this.throttledHandleMouseMove);\n this.off(doc, 'touchmove', this.throttledHandleMouseMove);\n this.off(doc, 'mouseup', this.handleMouseUpHandler_);\n this.off(doc, 'touchend', this.handleMouseUpHandler_);\n }\n\n /**\n * Handle `mousedown` or `touchstart` events on the `VolumeControl`.\n *\n * @param {Event} event\n * `mousedown` or `touchstart` event that triggered this function\n *\n * @listens mousedown\n * @listens touchstart\n */\n }, {\n key: \"handleMouseMove\",\n value: function handleMouseMove(event) {\n this.volumeBar.handleMouseMove(event);\n }\n }]);\n return VolumeControl;\n}(Component$1);\n/**\n * Default options for the `VolumeControl`\n *\n * @type {Object}\n * @private\n */\nVolumeControl.prototype.options_ = {\n children: ['volumeBar']\n};\nComponent$1.registerComponent('VolumeControl', VolumeControl);\n\n/**\n * Check if muting volume is supported and if it isn't hide the mute toggle\n * button.\n *\n * @param { import('../../component').default } self\n * A reference to the mute toggle button\n *\n * @param { import('../../player').default } player\n * A reference to the player\n *\n * @private\n */\nvar checkMuteSupport = function checkMuteSupport(self, player) {\n // hide mute toggle button if it's not supported by the current tech\n if (player.tech_ && !player.tech_.featuresMuteControl) {\n self.addClass('vjs-hidden');\n }\n self.on(player, 'loadstart', function () {\n if (!player.tech_.featuresMuteControl) {\n self.addClass('vjs-hidden');\n } else {\n self.removeClass('vjs-hidden');\n }\n });\n};\n\n/**\n * @file mute-toggle.js\n */\n\n/**\n * A button component for muting the audio.\n *\n * @extends Button\n */\nvar MuteToggle = /*#__PURE__*/function (_Button7) {\n _inherits(MuteToggle, _Button7);\n var _super42 = _createSuper(MuteToggle);\n /**\n * Creates an instance of this class.\n *\n * @param { import('./player').default } player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n function MuteToggle(player, options) {\n var _this69;\n _classCallCheck(this, MuteToggle);\n _this69 = _super42.call(this, player, options);\n\n // hide this control if volume support is missing\n checkMuteSupport(_assertThisInitialized(_this69), player);\n _this69.on(player, ['loadstart', 'volumechange'], function (e) {\n return _this69.update(e);\n });\n return _this69;\n }\n\n /**\n * Builds the default DOM `className`.\n *\n * @return {string}\n * The DOM `className` for this object.\n */\n _createClass(MuteToggle, [{\n key: \"buildCSSClass\",\n value: function buildCSSClass() {\n return \"vjs-mute-control \".concat(_get(_getPrototypeOf(MuteToggle.prototype), \"buildCSSClass\", this).call(this));\n }\n\n /**\n * This gets called when an `MuteToggle` is \"clicked\". See\n * {@link ClickableComponent} for more detailed information on what a click can be.\n *\n * @param {Event} [event]\n * The `keydown`, `tap`, or `click` event that caused this function to be\n * called.\n *\n * @listens tap\n * @listens click\n */\n }, {\n key: \"handleClick\",\n value: function handleClick(event) {\n var vol = this.player_.volume();\n var lastVolume = this.player_.lastVolume_();\n if (vol === 0) {\n var volumeToSet = lastVolume < 0.1 ? 0.1 : lastVolume;\n this.player_.volume(volumeToSet);\n this.player_.muted(false);\n } else {\n this.player_.muted(this.player_.muted() ? false : true);\n }\n }\n\n /**\n * Update the `MuteToggle` button based on the state of `volume` and `muted`\n * on the player.\n *\n * @param {Event} [event]\n * The {@link Player#loadstart} event if this function was called\n * through an event.\n *\n * @listens Player#loadstart\n * @listens Player#volumechange\n */\n }, {\n key: \"update\",\n value: function update(event) {\n this.updateIcon_();\n this.updateControlText_();\n }\n\n /**\n * Update the appearance of the `MuteToggle` icon.\n *\n * Possible states (given `level` variable below):\n * - 0: crossed out\n * - 1: zero bars of volume\n * - 2: one bar of volume\n * - 3: two bars of volume\n *\n * @private\n */\n }, {\n key: \"updateIcon_\",\n value: function updateIcon_() {\n var vol = this.player_.volume();\n var level = 3;\n this.setIcon('volume-high');\n\n // in iOS when a player is loaded with muted attribute\n // and volume is changed with a native mute button\n // we want to make sure muted state is updated\n if (IS_IOS && this.player_.tech_ && this.player_.tech_.el_) {\n this.player_.muted(this.player_.tech_.el_.muted);\n }\n if (vol === 0 || this.player_.muted()) {\n this.setIcon('volume-mute');\n level = 0;\n } else if (vol < 0.33) {\n this.setIcon('volume-low');\n level = 1;\n } else if (vol < 0.67) {\n this.setIcon('volume-medium');\n level = 2;\n }\n _removeClass(this.el_, [0, 1, 2, 3].reduce(function (str, i) {\n return str + \"\".concat(i ? ' ' : '', \"vjs-vol-\").concat(i);\n }, ''));\n _addClass(this.el_, \"vjs-vol-\".concat(level));\n }\n\n /**\n * If `muted` has changed on the player, update the control text\n * (`title` attribute on `vjs-mute-control` element and content of\n * `vjs-control-text` element).\n *\n * @private\n */\n }, {\n key: \"updateControlText_\",\n value: function updateControlText_() {\n var soundOff = this.player_.muted() || this.player_.volume() === 0;\n var text = soundOff ? 'Unmute' : 'Mute';\n if (this.controlText() !== text) {\n this.controlText(text);\n }\n }\n }]);\n return MuteToggle;\n}(Button);\n/**\n * The text that should display over the `MuteToggle`s controls. Added for localization.\n *\n * @type {string}\n * @protected\n */\nMuteToggle.prototype.controlText_ = 'Mute';\nComponent$1.registerComponent('MuteToggle', MuteToggle);\n\n/**\n * @file volume-control.js\n */\n\n/**\n * A Component to contain the MuteToggle and VolumeControl so that\n * they can work together.\n *\n * @extends Component\n */\nvar VolumePanel = /*#__PURE__*/function (_Component$20) {\n _inherits(VolumePanel, _Component$20);\n var _super43 = _createSuper(VolumePanel);\n /**\n * Creates an instance of this class.\n *\n * @param { import('./player').default } player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options={}]\n * The key/value store of player options.\n */\n function VolumePanel(player) {\n var _this70;\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n _classCallCheck(this, VolumePanel);\n if (typeof options.inline !== 'undefined') {\n options.inline = options.inline;\n } else {\n options.inline = true;\n }\n\n // pass the inline option down to the VolumeControl as vertical if\n // the VolumeControl is on.\n if (typeof options.volumeControl === 'undefined' || isPlain(options.volumeControl)) {\n options.volumeControl = options.volumeControl || {};\n options.volumeControl.vertical = !options.inline;\n }\n _this70 = _super43.call(this, player, options);\n\n // this handler is used by mouse handler methods below\n _this70.handleKeyPressHandler_ = function (e) {\n return _this70.handleKeyPress(e);\n };\n _this70.on(player, ['loadstart'], function (e) {\n return _this70.volumePanelState_(e);\n });\n _this70.on(_this70.muteToggle, 'keyup', function (e) {\n return _this70.handleKeyPress(e);\n });\n _this70.on(_this70.volumeControl, 'keyup', function (e) {\n return _this70.handleVolumeControlKeyUp(e);\n });\n _this70.on('keydown', function (e) {\n return _this70.handleKeyPress(e);\n });\n _this70.on('mouseover', function (e) {\n return _this70.handleMouseOver(e);\n });\n _this70.on('mouseout', function (e) {\n return _this70.handleMouseOut(e);\n });\n\n // while the slider is active (the mouse has been pressed down and\n // is dragging) we do not want to hide the VolumeBar\n _this70.on(_this70.volumeControl, ['slideractive'], _this70.sliderActive_);\n _this70.on(_this70.volumeControl, ['sliderinactive'], _this70.sliderInactive_);\n return _this70;\n }\n\n /**\n * Add vjs-slider-active class to the VolumePanel\n *\n * @listens VolumeControl#slideractive\n * @private\n */\n _createClass(VolumePanel, [{\n key: \"sliderActive_\",\n value: function sliderActive_() {\n this.addClass('vjs-slider-active');\n }\n\n /**\n * Removes vjs-slider-active class to the VolumePanel\n *\n * @listens VolumeControl#sliderinactive\n * @private\n */\n }, {\n key: \"sliderInactive_\",\n value: function sliderInactive_() {\n this.removeClass('vjs-slider-active');\n }\n\n /**\n * Adds vjs-hidden or vjs-mute-toggle-only to the VolumePanel\n * depending on MuteToggle and VolumeControl state\n *\n * @listens Player#loadstart\n * @private\n */\n }, {\n key: \"volumePanelState_\",\n value: function volumePanelState_() {\n // hide volume panel if neither volume control or mute toggle\n // are displayed\n if (this.volumeControl.hasClass('vjs-hidden') && this.muteToggle.hasClass('vjs-hidden')) {\n this.addClass('vjs-hidden');\n }\n\n // if only mute toggle is visible we don't want\n // volume panel expanding when hovered or active\n if (this.volumeControl.hasClass('vjs-hidden') && !this.muteToggle.hasClass('vjs-hidden')) {\n this.addClass('vjs-mute-toggle-only');\n }\n }\n\n /**\n * Create the `Component`'s DOM element\n *\n * @return {Element}\n * The element that was created.\n */\n }, {\n key: \"createEl\",\n value: function createEl() {\n var orientationClass = 'vjs-volume-panel-horizontal';\n if (!this.options_.inline) {\n orientationClass = 'vjs-volume-panel-vertical';\n }\n return _get(_getPrototypeOf(VolumePanel.prototype), \"createEl\", this).call(this, 'div', {\n className: \"vjs-volume-panel vjs-control \".concat(orientationClass)\n });\n }\n\n /**\n * Dispose of the `volume-panel` and all child components.\n */\n }, {\n key: \"dispose\",\n value: function dispose() {\n this.handleMouseOut();\n _get(_getPrototypeOf(VolumePanel.prototype), \"dispose\", this).call(this);\n }\n\n /**\n * Handles `keyup` events on the `VolumeControl`, looking for ESC, which closes\n * the volume panel and sets focus on `MuteToggle`.\n *\n * @param {Event} event\n * The `keyup` event that caused this function to be called.\n *\n * @listens keyup\n */\n }, {\n key: \"handleVolumeControlKeyUp\",\n value: function handleVolumeControlKeyUp(event) {\n if (keycode.isEventKey(event, 'Esc')) {\n this.muteToggle.focus();\n }\n }\n\n /**\n * This gets called when a `VolumePanel` gains hover via a `mouseover` event.\n * Turns on listening for `mouseover` event. When they happen it\n * calls `this.handleMouseOver`.\n *\n * @param {Event} event\n * The `mouseover` event that caused this function to be called.\n *\n * @listens mouseover\n */\n }, {\n key: \"handleMouseOver\",\n value: function handleMouseOver(event) {\n this.addClass('vjs-hover');\n _on(document, 'keyup', this.handleKeyPressHandler_);\n }\n\n /**\n * This gets called when a `VolumePanel` gains hover via a `mouseout` event.\n * Turns on listening for `mouseout` event. When they happen it\n * calls `this.handleMouseOut`.\n *\n * @param {Event} event\n * The `mouseout` event that caused this function to be called.\n *\n * @listens mouseout\n */\n }, {\n key: \"handleMouseOut\",\n value: function handleMouseOut(event) {\n this.removeClass('vjs-hover');\n _off(document, 'keyup', this.handleKeyPressHandler_);\n }\n\n /**\n * Handles `keyup` event on the document or `keydown` event on the `VolumePanel`,\n * looking for ESC, which hides the `VolumeControl`.\n *\n * @param {Event} event\n * The keypress that triggered this event.\n *\n * @listens keydown | keyup\n */\n }, {\n key: \"handleKeyPress\",\n value: function handleKeyPress(event) {\n if (keycode.isEventKey(event, 'Esc')) {\n this.handleMouseOut();\n }\n }\n }]);\n return VolumePanel;\n}(Component$1);\n/**\n * Default options for the `VolumeControl`\n *\n * @type {Object}\n * @private\n */\nVolumePanel.prototype.options_ = {\n children: ['muteToggle', 'volumeControl']\n};\nComponent$1.registerComponent('VolumePanel', VolumePanel);\n\n/**\n * Button to skip forward a configurable amount of time\n * through a video. Renders in the control bar.\n *\n * e.g. options: {controlBar: {skipButtons: forward: 5}}\n *\n * @extends Button\n */\nvar SkipForward = /*#__PURE__*/function (_Button8) {\n _inherits(SkipForward, _Button8);\n var _super44 = _createSuper(SkipForward);\n function SkipForward(player, options) {\n var _this71;\n _classCallCheck(this, SkipForward);\n _this71 = _super44.call(this, player, options);\n _this71.validOptions = [5, 10, 30];\n _this71.skipTime = _this71.getSkipForwardTime();\n if (_this71.skipTime && _this71.validOptions.includes(_this71.skipTime)) {\n _this71.setIcon(\"forward-\".concat(_this71.skipTime));\n _this71.controlText(_this71.localize('Skip forward {1} seconds', [_this71.skipTime]));\n _this71.show();\n } else {\n _this71.hide();\n }\n return _this71;\n }\n _createClass(SkipForward, [{\n key: \"getSkipForwardTime\",\n value: function getSkipForwardTime() {\n var playerOptions = this.options_.playerOptions;\n return playerOptions.controlBar && playerOptions.controlBar.skipButtons && playerOptions.controlBar.skipButtons.forward;\n }\n }, {\n key: \"buildCSSClass\",\n value: function buildCSSClass() {\n return \"vjs-skip-forward-\".concat(this.getSkipForwardTime(), \" \").concat(_get(_getPrototypeOf(SkipForward.prototype), \"buildCSSClass\", this).call(this));\n }\n\n /**\n * On click, skips forward in the duration/seekable range by a configurable amount of seconds.\n * If the time left in the duration/seekable range is less than the configured 'skip forward' time,\n * skips to end of duration/seekable range.\n *\n * Handle a click on a `SkipForward` button\n *\n * @param {EventTarget~Event} event\n * The `click` event that caused this function\n * to be called\n */\n }, {\n key: \"handleClick\",\n value: function handleClick(event) {\n if (isNaN(this.player_.duration())) {\n return;\n }\n var currentVideoTime = this.player_.currentTime();\n var liveTracker = this.player_.liveTracker;\n var duration = liveTracker && liveTracker.isLive() ? liveTracker.seekableEnd() : this.player_.duration();\n var newTime;\n if (currentVideoTime + this.skipTime <= duration) {\n newTime = currentVideoTime + this.skipTime;\n } else {\n newTime = duration;\n }\n this.player_.currentTime(newTime);\n }\n\n /**\n * Update control text on languagechange\n */\n }, {\n key: \"handleLanguagechange\",\n value: function handleLanguagechange() {\n this.controlText(this.localize('Skip forward {1} seconds', [this.skipTime]));\n }\n }]);\n return SkipForward;\n}(Button);\nComponent$1.registerComponent('SkipForward', SkipForward);\n\n/**\n * Button to skip backward a configurable amount of time\n * through a video. Renders in the control bar.\n *\n * * e.g. options: {controlBar: {skipButtons: backward: 5}}\n *\n * @extends Button\n */\nvar SkipBackward = /*#__PURE__*/function (_Button9) {\n _inherits(SkipBackward, _Button9);\n var _super45 = _createSuper(SkipBackward);\n function SkipBackward(player, options) {\n var _this72;\n _classCallCheck(this, SkipBackward);\n _this72 = _super45.call(this, player, options);\n _this72.validOptions = [5, 10, 30];\n _this72.skipTime = _this72.getSkipBackwardTime();\n if (_this72.skipTime && _this72.validOptions.includes(_this72.skipTime)) {\n _this72.setIcon(\"replay-\".concat(_this72.skipTime));\n _this72.controlText(_this72.localize('Skip backward {1} seconds', [_this72.skipTime]));\n _this72.show();\n } else {\n _this72.hide();\n }\n return _this72;\n }\n _createClass(SkipBackward, [{\n key: \"getSkipBackwardTime\",\n value: function getSkipBackwardTime() {\n var playerOptions = this.options_.playerOptions;\n return playerOptions.controlBar && playerOptions.controlBar.skipButtons && playerOptions.controlBar.skipButtons.backward;\n }\n }, {\n key: \"buildCSSClass\",\n value: function buildCSSClass() {\n return \"vjs-skip-backward-\".concat(this.getSkipBackwardTime(), \" \").concat(_get(_getPrototypeOf(SkipBackward.prototype), \"buildCSSClass\", this).call(this));\n }\n\n /**\n * On click, skips backward in the video by a configurable amount of seconds.\n * If the current time in the video is less than the configured 'skip backward' time,\n * skips to beginning of video or seekable range.\n *\n * Handle a click on a `SkipBackward` button\n *\n * @param {EventTarget~Event} event\n * The `click` event that caused this function\n * to be called\n */\n }, {\n key: \"handleClick\",\n value: function handleClick(event) {\n var currentVideoTime = this.player_.currentTime();\n var liveTracker = this.player_.liveTracker;\n var seekableStart = liveTracker && liveTracker.isLive() && liveTracker.seekableStart();\n var newTime;\n if (seekableStart && currentVideoTime - this.skipTime <= seekableStart) {\n newTime = seekableStart;\n } else if (currentVideoTime >= this.skipTime) {\n newTime = currentVideoTime - this.skipTime;\n } else {\n newTime = 0;\n }\n this.player_.currentTime(newTime);\n }\n\n /**\n * Update control text on languagechange\n */\n }, {\n key: \"handleLanguagechange\",\n value: function handleLanguagechange() {\n this.controlText(this.localize('Skip backward {1} seconds', [this.skipTime]));\n }\n }]);\n return SkipBackward;\n}(Button);\nSkipBackward.prototype.controlText_ = 'Skip Backward';\nComponent$1.registerComponent('SkipBackward', SkipBackward);\n\n/**\n * @file menu.js\n */\n\n/**\n * The Menu component is used to build popup menus, including subtitle and\n * captions selection menus.\n *\n * @extends Component\n */\nvar Menu = /*#__PURE__*/function (_Component$21) {\n _inherits(Menu, _Component$21);\n var _super46 = _createSuper(Menu);\n /**\n * Create an instance of this class.\n *\n * @param { import('../player').default } player\n * the player that this component should attach to\n *\n * @param {Object} [options]\n * Object of option names and values\n *\n */\n function Menu(player, options) {\n var _this73;\n _classCallCheck(this, Menu);\n _this73 = _super46.call(this, player, options);\n if (options) {\n _this73.menuButton_ = options.menuButton;\n }\n _this73.focusedChild_ = -1;\n _this73.on('keydown', function (e) {\n return _this73.handleKeyDown(e);\n });\n\n // All the menu item instances share the same blur handler provided by the menu container.\n _this73.boundHandleBlur_ = function (e) {\n return _this73.handleBlur(e);\n };\n _this73.boundHandleTapClick_ = function (e) {\n return _this73.handleTapClick(e);\n };\n return _this73;\n }\n\n /**\n * Add event listeners to the {@link MenuItem}.\n *\n * @param {Object} component\n * The instance of the `MenuItem` to add listeners to.\n *\n */\n _createClass(Menu, [{\n key: \"addEventListenerForItem\",\n value: function addEventListenerForItem(component) {\n if (!(component instanceof Component$1)) {\n return;\n }\n this.on(component, 'blur', this.boundHandleBlur_);\n this.on(component, ['tap', 'click'], this.boundHandleTapClick_);\n }\n\n /**\n * Remove event listeners from the {@link MenuItem}.\n *\n * @param {Object} component\n * The instance of the `MenuItem` to remove listeners.\n *\n */\n }, {\n key: \"removeEventListenerForItem\",\n value: function removeEventListenerForItem(component) {\n if (!(component instanceof Component$1)) {\n return;\n }\n this.off(component, 'blur', this.boundHandleBlur_);\n this.off(component, ['tap', 'click'], this.boundHandleTapClick_);\n }\n\n /**\n * This method will be called indirectly when the component has been added\n * before the component adds to the new menu instance by `addItem`.\n * In this case, the original menu instance will remove the component\n * by calling `removeChild`.\n *\n * @param {Object} component\n * The instance of the `MenuItem`\n */\n }, {\n key: \"removeChild\",\n value: function removeChild(component) {\n if (typeof component === 'string') {\n component = this.getChild(component);\n }\n this.removeEventListenerForItem(component);\n _get(_getPrototypeOf(Menu.prototype), \"removeChild\", this).call(this, component);\n }\n\n /**\n * Add a {@link MenuItem} to the menu.\n *\n * @param {Object|string} component\n * The name or instance of the `MenuItem` to add.\n *\n */\n }, {\n key: \"addItem\",\n value: function addItem(component) {\n var childComponent = this.addChild(component);\n if (childComponent) {\n this.addEventListenerForItem(childComponent);\n }\n }\n\n /**\n * Create the `Menu`s DOM element.\n *\n * @return {Element}\n * the element that was created\n */\n }, {\n key: \"createEl\",\n value: function createEl() {\n var contentElType = this.options_.contentElType || 'ul';\n this.contentEl_ = _createEl(contentElType, {\n className: 'vjs-menu-content'\n });\n this.contentEl_.setAttribute('role', 'menu');\n var el = _get(_getPrototypeOf(Menu.prototype), \"createEl\", this).call(this, 'div', {\n append: this.contentEl_,\n className: 'vjs-menu'\n });\n el.appendChild(this.contentEl_);\n\n // Prevent clicks from bubbling up. Needed for Menu Buttons,\n // where a click on the parent is significant\n _on(el, 'click', function (event) {\n event.preventDefault();\n event.stopImmediatePropagation();\n });\n return el;\n }\n }, {\n key: \"dispose\",\n value: function dispose() {\n this.contentEl_ = null;\n this.boundHandleBlur_ = null;\n this.boundHandleTapClick_ = null;\n _get(_getPrototypeOf(Menu.prototype), \"dispose\", this).call(this);\n }\n\n /**\n * Called when a `MenuItem` loses focus.\n *\n * @param {Event} event\n * The `blur` event that caused this function to be called.\n *\n * @listens blur\n */\n }, {\n key: \"handleBlur\",\n value: function handleBlur(event) {\n var relatedTarget = event.relatedTarget || document.activeElement;\n\n // Close menu popup when a user clicks outside the menu\n if (!this.children().some(function (element) {\n return element.el() === relatedTarget;\n })) {\n var btn = this.menuButton_;\n if (btn && btn.buttonPressed_ && relatedTarget !== btn.el().firstChild) {\n btn.unpressButton();\n }\n }\n }\n\n /**\n * Called when a `MenuItem` gets clicked or tapped.\n *\n * @param {Event} event\n * The `click` or `tap` event that caused this function to be called.\n *\n * @listens click,tap\n */\n }, {\n key: \"handleTapClick\",\n value: function handleTapClick(event) {\n // Unpress the associated MenuButton, and move focus back to it\n if (this.menuButton_) {\n this.menuButton_.unpressButton();\n var childComponents = this.children();\n if (!Array.isArray(childComponents)) {\n return;\n }\n var foundComponent = childComponents.filter(function (component) {\n return component.el() === event.target;\n })[0];\n if (!foundComponent) {\n return;\n }\n\n // don't focus menu button if item is a caption settings item\n // because focus will move elsewhere\n if (foundComponent.name() !== 'CaptionSettingsMenuItem') {\n this.menuButton_.focus();\n }\n }\n }\n\n /**\n * Handle a `keydown` event on this menu. This listener is added in the constructor.\n *\n * @param {KeyboardEvent} event\n * A `keydown` event that happened on the menu.\n *\n * @listens keydown\n */\n }, {\n key: \"handleKeyDown\",\n value: function handleKeyDown(event) {\n // Left and Down Arrows\n if (keycode.isEventKey(event, 'Left') || keycode.isEventKey(event, 'Down')) {\n event.preventDefault();\n event.stopPropagation();\n this.stepForward();\n\n // Up and Right Arrows\n } else if (keycode.isEventKey(event, 'Right') || keycode.isEventKey(event, 'Up')) {\n event.preventDefault();\n event.stopPropagation();\n this.stepBack();\n }\n }\n\n /**\n * Move to next (lower) menu item for keyboard users.\n */\n }, {\n key: \"stepForward\",\n value: function stepForward() {\n var stepChild = 0;\n if (this.focusedChild_ !== undefined) {\n stepChild = this.focusedChild_ + 1;\n }\n this.focus(stepChild);\n }\n\n /**\n * Move to previous (higher) menu item for keyboard users.\n */\n }, {\n key: \"stepBack\",\n value: function stepBack() {\n var stepChild = 0;\n if (this.focusedChild_ !== undefined) {\n stepChild = this.focusedChild_ - 1;\n }\n this.focus(stepChild);\n }\n\n /**\n * Set focus on a {@link MenuItem} in the `Menu`.\n *\n * @param {Object|string} [item=0]\n * Index of child item set focus on.\n */\n }, {\n key: \"focus\",\n value: function focus() {\n var item = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n var children = this.children().slice();\n var haveTitle = children.length && children[0].hasClass('vjs-menu-title');\n if (haveTitle) {\n children.shift();\n }\n if (children.length > 0) {\n if (item < 0) {\n item = 0;\n } else if (item >= children.length) {\n item = children.length - 1;\n }\n this.focusedChild_ = item;\n children[item].el_.focus();\n }\n }\n }]);\n return Menu;\n}(Component$1);\nComponent$1.registerComponent('Menu', Menu);\n\n/**\n * @file menu-button.js\n */\n\n/**\n * A `MenuButton` class for any popup {@link Menu}.\n *\n * @extends Component\n */\nvar MenuButton = /*#__PURE__*/function (_Component$22) {\n _inherits(MenuButton, _Component$22);\n var _super47 = _createSuper(MenuButton);\n /**\n * Creates an instance of this class.\n *\n * @param { import('../player').default } player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options={}]\n * The key/value store of player options.\n */\n function MenuButton(player) {\n var _this74;\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n _classCallCheck(this, MenuButton);\n _this74 = _super47.call(this, player, options);\n _this74.menuButton_ = new Button(player, options);\n _this74.menuButton_.controlText(_this74.controlText_);\n _this74.menuButton_.el_.setAttribute('aria-haspopup', 'true');\n\n // Add buildCSSClass values to the button, not the wrapper\n var buttonClass = Button.prototype.buildCSSClass();\n _this74.menuButton_.el_.className = _this74.buildCSSClass() + ' ' + buttonClass;\n _this74.menuButton_.removeClass('vjs-control');\n _this74.addChild(_this74.menuButton_);\n _this74.update();\n _this74.enabled_ = true;\n var handleClick = function handleClick(e) {\n return _this74.handleClick(e);\n };\n _this74.handleMenuKeyUp_ = function (e) {\n return _this74.handleMenuKeyUp(e);\n };\n _this74.on(_this74.menuButton_, 'tap', handleClick);\n _this74.on(_this74.menuButton_, 'click', handleClick);\n _this74.on(_this74.menuButton_, 'keydown', function (e) {\n return _this74.handleKeyDown(e);\n });\n _this74.on(_this74.menuButton_, 'mouseenter', function () {\n _this74.addClass('vjs-hover');\n _this74.menu.show();\n _on(document, 'keyup', _this74.handleMenuKeyUp_);\n });\n _this74.on('mouseleave', function (e) {\n return _this74.handleMouseLeave(e);\n });\n _this74.on('keydown', function (e) {\n return _this74.handleSubmenuKeyDown(e);\n });\n return _this74;\n }\n\n /**\n * Update the menu based on the current state of its items.\n */\n _createClass(MenuButton, [{\n key: \"update\",\n value: function update() {\n var menu = this.createMenu();\n if (this.menu) {\n this.menu.dispose();\n this.removeChild(this.menu);\n }\n this.menu = menu;\n this.addChild(menu);\n\n /**\n * Track the state of the menu button\n *\n * @type {Boolean}\n * @private\n */\n this.buttonPressed_ = false;\n this.menuButton_.el_.setAttribute('aria-expanded', 'false');\n if (this.items && this.items.length <= this.hideThreshold_) {\n this.hide();\n this.menu.contentEl_.removeAttribute('role');\n } else {\n this.show();\n this.menu.contentEl_.setAttribute('role', 'menu');\n }\n }\n\n /**\n * Create the menu and add all items to it.\n *\n * @return {Menu}\n * The constructed menu\n */\n }, {\n key: \"createMenu\",\n value: function createMenu() {\n var menu = new Menu(this.player_, {\n menuButton: this\n });\n\n /**\n * Hide the menu if the number of items is less than or equal to this threshold. This defaults\n * to 0 and whenever we add items which can be hidden to the menu we'll increment it. We list\n * it here because every time we run `createMenu` we need to reset the value.\n *\n * @protected\n * @type {Number}\n */\n this.hideThreshold_ = 0;\n\n // Add a title list item to the top\n if (this.options_.title) {\n var titleEl = _createEl('li', {\n className: 'vjs-menu-title',\n textContent: toTitleCase$1(this.options_.title),\n tabIndex: -1\n });\n var titleComponent = new Component$1(this.player_, {\n el: titleEl\n });\n menu.addItem(titleComponent);\n }\n this.items = this.createItems();\n if (this.items) {\n // Add menu items to the menu\n for (var _i41 = 0; _i41 < this.items.length; _i41++) {\n menu.addItem(this.items[_i41]);\n }\n }\n return menu;\n }\n\n /**\n * Create the list of menu items. Specific to each subclass.\n *\n * @abstract\n */\n }, {\n key: \"createItems\",\n value: function createItems() {}\n\n /**\n * Create the `MenuButtons`s DOM element.\n *\n * @return {Element}\n * The element that gets created.\n */\n }, {\n key: \"createEl\",\n value: function createEl() {\n return _get(_getPrototypeOf(MenuButton.prototype), \"createEl\", this).call(this, 'div', {\n className: this.buildWrapperCSSClass()\n }, {});\n }\n\n /**\n * Overwrites the `setIcon` method from `Component`.\n * In this case, we want the icon to be appended to the menuButton.\n *\n * @param {string} name\n * The icon name to be added.\n */\n }, {\n key: \"setIcon\",\n value: function setIcon(name) {\n _get(_getPrototypeOf(MenuButton.prototype), \"setIcon\", this).call(this, name, this.menuButton_.el_);\n }\n\n /**\n * Allow sub components to stack CSS class names for the wrapper element\n *\n * @return {string}\n * The constructed wrapper DOM `className`\n */\n }, {\n key: \"buildWrapperCSSClass\",\n value: function buildWrapperCSSClass() {\n var menuButtonClass = 'vjs-menu-button';\n\n // If the inline option is passed, we want to use different styles altogether.\n if (this.options_.inline === true) {\n menuButtonClass += '-inline';\n } else {\n menuButtonClass += '-popup';\n }\n\n // TODO: Fix the CSS so that this isn't necessary\n var buttonClass = Button.prototype.buildCSSClass();\n return \"vjs-menu-button \".concat(menuButtonClass, \" \").concat(buttonClass, \" \").concat(_get(_getPrototypeOf(MenuButton.prototype), \"buildCSSClass\", this).call(this));\n }\n\n /**\n * Builds the default DOM `className`.\n *\n * @return {string}\n * The DOM `className` for this object.\n */\n }, {\n key: \"buildCSSClass\",\n value: function buildCSSClass() {\n var menuButtonClass = 'vjs-menu-button';\n\n // If the inline option is passed, we want to use different styles altogether.\n if (this.options_.inline === true) {\n menuButtonClass += '-inline';\n } else {\n menuButtonClass += '-popup';\n }\n return \"vjs-menu-button \".concat(menuButtonClass, \" \").concat(_get(_getPrototypeOf(MenuButton.prototype), \"buildCSSClass\", this).call(this));\n }\n\n /**\n * Get or set the localized control text that will be used for accessibility.\n *\n * > NOTE: This will come from the internal `menuButton_` element.\n *\n * @param {string} [text]\n * Control text for element.\n *\n * @param {Element} [el=this.menuButton_.el()]\n * Element to set the title on.\n *\n * @return {string}\n * - The control text when getting\n */\n }, {\n key: \"controlText\",\n value: function controlText(text) {\n var el = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.menuButton_.el();\n return this.menuButton_.controlText(text, el);\n }\n\n /**\n * Dispose of the `menu-button` and all child components.\n */\n }, {\n key: \"dispose\",\n value: function dispose() {\n this.handleMouseLeave();\n _get(_getPrototypeOf(MenuButton.prototype), \"dispose\", this).call(this);\n }\n\n /**\n * Handle a click on a `MenuButton`.\n * See {@link ClickableComponent#handleClick} for instances where this is called.\n *\n * @param {Event} event\n * The `keydown`, `tap`, or `click` event that caused this function to be\n * called.\n *\n * @listens tap\n * @listens click\n */\n }, {\n key: \"handleClick\",\n value: function handleClick(event) {\n if (this.buttonPressed_) {\n this.unpressButton();\n } else {\n this.pressButton();\n }\n }\n\n /**\n * Handle `mouseleave` for `MenuButton`.\n *\n * @param {Event} event\n * The `mouseleave` event that caused this function to be called.\n *\n * @listens mouseleave\n */\n }, {\n key: \"handleMouseLeave\",\n value: function handleMouseLeave(event) {\n this.removeClass('vjs-hover');\n _off(document, 'keyup', this.handleMenuKeyUp_);\n }\n\n /**\n * Set the focus to the actual button, not to this element\n */\n }, {\n key: \"focus\",\n value: function focus() {\n this.menuButton_.focus();\n }\n\n /**\n * Remove the focus from the actual button, not this element\n */\n }, {\n key: \"blur\",\n value: function blur() {\n this.menuButton_.blur();\n }\n\n /**\n * Handle tab, escape, down arrow, and up arrow keys for `MenuButton`. See\n * {@link ClickableComponent#handleKeyDown} for instances where this is called.\n *\n * @param {Event} event\n * The `keydown` event that caused this function to be called.\n *\n * @listens keydown\n */\n }, {\n key: \"handleKeyDown\",\n value: function handleKeyDown(event) {\n // Escape or Tab unpress the 'button'\n if (keycode.isEventKey(event, 'Esc') || keycode.isEventKey(event, 'Tab')) {\n if (this.buttonPressed_) {\n this.unpressButton();\n }\n\n // Don't preventDefault for Tab key - we still want to lose focus\n if (!keycode.isEventKey(event, 'Tab')) {\n event.preventDefault();\n // Set focus back to the menu button's button\n this.menuButton_.focus();\n }\n // Up Arrow or Down Arrow also 'press' the button to open the menu\n } else if (keycode.isEventKey(event, 'Up') || keycode.isEventKey(event, 'Down')) {\n if (!this.buttonPressed_) {\n event.preventDefault();\n this.pressButton();\n }\n }\n }\n\n /**\n * Handle a `keyup` event on a `MenuButton`. The listener for this is added in\n * the constructor.\n *\n * @param {Event} event\n * Key press event\n *\n * @listens keyup\n */\n }, {\n key: \"handleMenuKeyUp\",\n value: function handleMenuKeyUp(event) {\n // Escape hides popup menu\n if (keycode.isEventKey(event, 'Esc') || keycode.isEventKey(event, 'Tab')) {\n this.removeClass('vjs-hover');\n }\n }\n\n /**\n * This method name now delegates to `handleSubmenuKeyDown`. This means\n * anyone calling `handleSubmenuKeyPress` will not see their method calls\n * stop working.\n *\n * @param {Event} event\n * The event that caused this function to be called.\n */\n }, {\n key: \"handleSubmenuKeyPress\",\n value: function handleSubmenuKeyPress(event) {\n this.handleSubmenuKeyDown(event);\n }\n\n /**\n * Handle a `keydown` event on a sub-menu. The listener for this is added in\n * the constructor.\n *\n * @param {Event} event\n * Key press event\n *\n * @listens keydown\n */\n }, {\n key: \"handleSubmenuKeyDown\",\n value: function handleSubmenuKeyDown(event) {\n // Escape or Tab unpress the 'button'\n if (keycode.isEventKey(event, 'Esc') || keycode.isEventKey(event, 'Tab')) {\n if (this.buttonPressed_) {\n this.unpressButton();\n }\n // Don't preventDefault for Tab key - we still want to lose focus\n if (!keycode.isEventKey(event, 'Tab')) {\n event.preventDefault();\n // Set focus back to the menu button's button\n this.menuButton_.focus();\n }\n }\n }\n\n /**\n * Put the current `MenuButton` into a pressed state.\n */\n }, {\n key: \"pressButton\",\n value: function pressButton() {\n if (this.enabled_) {\n this.buttonPressed_ = true;\n this.menu.show();\n this.menu.lockShowing();\n this.menuButton_.el_.setAttribute('aria-expanded', 'true');\n\n // set the focus into the submenu, except on iOS where it is resulting in\n // undesired scrolling behavior when the player is in an iframe\n if (IS_IOS && isInFrame()) {\n // Return early so that the menu isn't focused\n return;\n }\n this.menu.focus();\n }\n }\n\n /**\n * Take the current `MenuButton` out of a pressed state.\n */\n }, {\n key: \"unpressButton\",\n value: function unpressButton() {\n if (this.enabled_) {\n this.buttonPressed_ = false;\n this.menu.unlockShowing();\n this.menu.hide();\n this.menuButton_.el_.setAttribute('aria-expanded', 'false');\n }\n }\n\n /**\n * Disable the `MenuButton`. Don't allow it to be clicked.\n */\n }, {\n key: \"disable\",\n value: function disable() {\n this.unpressButton();\n this.enabled_ = false;\n this.addClass('vjs-disabled');\n this.menuButton_.disable();\n }\n\n /**\n * Enable the `MenuButton`. Allow it to be clicked.\n */\n }, {\n key: \"enable\",\n value: function enable() {\n this.enabled_ = true;\n this.removeClass('vjs-disabled');\n this.menuButton_.enable();\n }\n }]);\n return MenuButton;\n}(Component$1);\nComponent$1.registerComponent('MenuButton', MenuButton);\n\n/**\n * @file track-button.js\n */\n\n/**\n * The base class for buttons that toggle specific track types (e.g. subtitles).\n *\n * @extends MenuButton\n */\nvar TrackButton = /*#__PURE__*/function (_MenuButton) {\n _inherits(TrackButton, _MenuButton);\n var _super48 = _createSuper(TrackButton);\n /**\n * Creates an instance of this class.\n *\n * @param { import('./player').default } player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n function TrackButton(player, options) {\n var _this75;\n _classCallCheck(this, TrackButton);\n var tracks = options.tracks;\n _this75 = _super48.call(this, player, options);\n if (_this75.items.length <= 1) {\n _this75.hide();\n }\n if (!tracks) {\n return _possibleConstructorReturn(_this75);\n }\n var updateHandler = bind_(_assertThisInitialized(_this75), _this75.update);\n tracks.addEventListener('removetrack', updateHandler);\n tracks.addEventListener('addtrack', updateHandler);\n tracks.addEventListener('labelchange', updateHandler);\n _this75.player_.on('ready', updateHandler);\n _this75.player_.on('dispose', function () {\n tracks.removeEventListener('removetrack', updateHandler);\n tracks.removeEventListener('addtrack', updateHandler);\n tracks.removeEventListener('labelchange', updateHandler);\n });\n return _this75;\n }\n return _createClass(TrackButton);\n}(MenuButton);\nComponent$1.registerComponent('TrackButton', TrackButton);\n\n/**\n * @file menu-keys.js\n */\n\n/**\n * All keys used for operation of a menu (`MenuButton`, `Menu`, and `MenuItem`)\n * Note that 'Enter' and 'Space' are not included here (otherwise they would\n * prevent the `MenuButton` and `MenuItem` from being keyboard-clickable)\n *\n * @typedef MenuKeys\n * @array\n */\nvar MenuKeys = ['Tab', 'Esc', 'Up', 'Down', 'Right', 'Left'];\n\n/**\n * @file menu-item.js\n */\n\n/**\n * The component for a menu item. `<li>`\n *\n * @extends ClickableComponent\n */\nvar MenuItem = /*#__PURE__*/function (_ClickableComponent3) {\n _inherits(MenuItem, _ClickableComponent3);\n var _super49 = _createSuper(MenuItem);\n /**\n * Creates an instance of the this class.\n *\n * @param { import('../player').default } player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options={}]\n * The key/value store of player options.\n *\n */\n function MenuItem(player, options) {\n var _this76;\n _classCallCheck(this, MenuItem);\n _this76 = _super49.call(this, player, options);\n _this76.selectable = options.selectable;\n _this76.isSelected_ = options.selected || false;\n _this76.multiSelectable = options.multiSelectable;\n _this76.selected(_this76.isSelected_);\n if (_this76.selectable) {\n if (_this76.multiSelectable) {\n _this76.el_.setAttribute('role', 'menuitemcheckbox');\n } else {\n _this76.el_.setAttribute('role', 'menuitemradio');\n }\n } else {\n _this76.el_.setAttribute('role', 'menuitem');\n }\n return _this76;\n }\n\n /**\n * Create the `MenuItem's DOM element\n *\n * @param {string} [type=li]\n * Element's node type, not actually used, always set to `li`.\n *\n * @param {Object} [props={}]\n * An object of properties that should be set on the element\n *\n * @param {Object} [attrs={}]\n * An object of attributes that should be set on the element\n *\n * @return {Element}\n * The element that gets created.\n */\n _createClass(MenuItem, [{\n key: \"createEl\",\n value: function createEl(type, props, attrs) {\n // The control is textual, not just an icon\n this.nonIconControl = true;\n var el = _get(_getPrototypeOf(MenuItem.prototype), \"createEl\", this).call(this, 'li', Object.assign({\n className: 'vjs-menu-item',\n tabIndex: -1\n }, props), attrs);\n\n // swap icon with menu item text.\n var menuItemEl = _createEl('span', {\n className: 'vjs-menu-item-text',\n textContent: this.localize(this.options_.label)\n });\n\n // If using SVG icons, the element with vjs-icon-placeholder will be added separately.\n if (this.player_.options_.experimentalSvgIcons) {\n el.appendChild(menuItemEl);\n } else {\n el.replaceChild(menuItemEl, el.querySelector('.vjs-icon-placeholder'));\n }\n return el;\n }\n\n /**\n * Ignore keys which are used by the menu, but pass any other ones up. See\n * {@link ClickableComponent#handleKeyDown} for instances where this is called.\n *\n * @param {KeyboardEvent} event\n * The `keydown` event that caused this function to be called.\n *\n * @listens keydown\n */\n }, {\n key: \"handleKeyDown\",\n value: function handleKeyDown(event) {\n if (!MenuKeys.some(function (key) {\n return keycode.isEventKey(event, key);\n })) {\n // Pass keydown handling up for unused keys\n _get(_getPrototypeOf(MenuItem.prototype), \"handleKeyDown\", this).call(this, event);\n }\n }\n\n /**\n * Any click on a `MenuItem` puts it into the selected state.\n * See {@link ClickableComponent#handleClick} for instances where this is called.\n *\n * @param {Event} event\n * The `keydown`, `tap`, or `click` event that caused this function to be\n * called.\n *\n * @listens tap\n * @listens click\n */\n }, {\n key: \"handleClick\",\n value: function handleClick(event) {\n this.selected(true);\n }\n\n /**\n * Set the state for this menu item as selected or not.\n *\n * @param {boolean} selected\n * if the menu item is selected or not\n */\n }, {\n key: \"selected\",\n value: function selected(_selected) {\n if (this.selectable) {\n if (_selected) {\n this.addClass('vjs-selected');\n this.el_.setAttribute('aria-checked', 'true');\n // aria-checked isn't fully supported by browsers/screen readers,\n // so indicate selected state to screen reader in the control text.\n this.controlText(', selected');\n this.isSelected_ = true;\n } else {\n this.removeClass('vjs-selected');\n this.el_.setAttribute('aria-checked', 'false');\n // Indicate un-selected state to screen reader\n this.controlText('');\n this.isSelected_ = false;\n }\n }\n }\n }]);\n return MenuItem;\n}(ClickableComponent);\nComponent$1.registerComponent('MenuItem', MenuItem);\n\n/**\n * @file text-track-menu-item.js\n */\n\n/**\n * The specific menu item type for selecting a language within a text track kind\n *\n * @extends MenuItem\n */\nvar TextTrackMenuItem = /*#__PURE__*/function (_MenuItem) {\n _inherits(TextTrackMenuItem, _MenuItem);\n var _super50 = _createSuper(TextTrackMenuItem);\n /**\n * Creates an instance of this class.\n *\n * @param { import('../../player').default } player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n function TextTrackMenuItem(player, options) {\n var _this77;\n _classCallCheck(this, TextTrackMenuItem);\n var track = options.track;\n var tracks = player.textTracks();\n\n // Modify options for parent MenuItem class's init.\n options.label = track.label || track.language || 'Unknown';\n options.selected = track.mode === 'showing';\n _this77 = _super50.call(this, player, options);\n _this77.track = track;\n // Determine the relevant kind(s) of tracks for this component and filter\n // out empty kinds.\n _this77.kinds = (options.kinds || [options.kind || _this77.track.kind]).filter(Boolean);\n var changeHandler = function changeHandler() {\n for (var _len16 = arguments.length, args = new Array(_len16), _key16 = 0; _key16 < _len16; _key16++) {\n args[_key16] = arguments[_key16];\n }\n _this77.handleTracksChange.apply(_assertThisInitialized(_this77), args);\n };\n var selectedLanguageChangeHandler = function selectedLanguageChangeHandler() {\n for (var _len17 = arguments.length, args = new Array(_len17), _key17 = 0; _key17 < _len17; _key17++) {\n args[_key17] = arguments[_key17];\n }\n _this77.handleSelectedLanguageChange.apply(_assertThisInitialized(_this77), args);\n };\n player.on(['loadstart', 'texttrackchange'], changeHandler);\n tracks.addEventListener('change', changeHandler);\n tracks.addEventListener('selectedlanguagechange', selectedLanguageChangeHandler);\n _this77.on('dispose', function () {\n player.off(['loadstart', 'texttrackchange'], changeHandler);\n tracks.removeEventListener('change', changeHandler);\n tracks.removeEventListener('selectedlanguagechange', selectedLanguageChangeHandler);\n });\n\n // iOS7 doesn't dispatch change events to TextTrackLists when an\n // associated track's mode changes. Without something like\n // Object.observe() (also not present on iOS7), it's not\n // possible to detect changes to the mode attribute and polyfill\n // the change event. As a poor substitute, we manually dispatch\n // change events whenever the controls modify the mode.\n if (tracks.onchange === undefined) {\n var _event;\n _this77.on(['tap', 'click'], function () {\n if (_typeof(window$1.Event) !== 'object') {\n // Android 2.3 throws an Illegal Constructor error for window.Event\n try {\n _event = new window$1.Event('change');\n } catch (err) {\n // continue regardless of error\n }\n }\n if (!_event) {\n _event = document.createEvent('Event');\n _event.initEvent('change', true, true);\n }\n tracks.dispatchEvent(_event);\n });\n }\n\n // set the default state based on current tracks\n _this77.handleTracksChange();\n return _this77;\n }\n\n /**\n * This gets called when an `TextTrackMenuItem` is \"clicked\". See\n * {@link ClickableComponent} for more detailed information on what a click can be.\n *\n * @param {Event} event\n * The `keydown`, `tap`, or `click` event that caused this function to be\n * called.\n *\n * @listens tap\n * @listens click\n */\n _createClass(TextTrackMenuItem, [{\n key: \"handleClick\",\n value: function handleClick(event) {\n var referenceTrack = this.track;\n var tracks = this.player_.textTracks();\n _get(_getPrototypeOf(TextTrackMenuItem.prototype), \"handleClick\", this).call(this, event);\n if (!tracks) {\n return;\n }\n for (var _i42 = 0; _i42 < tracks.length; _i42++) {\n var track = tracks[_i42];\n\n // If the track from the text tracks list is not of the right kind,\n // skip it. We do not want to affect tracks of incompatible kind(s).\n if (this.kinds.indexOf(track.kind) === -1) {\n continue;\n }\n\n // If this text track is the component's track and it is not showing,\n // set it to showing.\n if (track === referenceTrack) {\n if (track.mode !== 'showing') {\n track.mode = 'showing';\n }\n\n // If this text track is not the component's track and it is not\n // disabled, set it to disabled.\n } else if (track.mode !== 'disabled') {\n track.mode = 'disabled';\n }\n }\n }\n\n /**\n * Handle text track list change\n *\n * @param {Event} event\n * The `change` event that caused this function to be called.\n *\n * @listens TextTrackList#change\n */\n }, {\n key: \"handleTracksChange\",\n value: function handleTracksChange(event) {\n var shouldBeSelected = this.track.mode === 'showing';\n\n // Prevent redundant selected() calls because they may cause\n // screen readers to read the appended control text unnecessarily\n if (shouldBeSelected !== this.isSelected_) {\n this.selected(shouldBeSelected);\n }\n }\n }, {\n key: \"handleSelectedLanguageChange\",\n value: function handleSelectedLanguageChange(event) {\n if (this.track.mode === 'showing') {\n var selectedLanguage = this.player_.cache_.selectedLanguage;\n\n // Don't replace the kind of track across the same language\n if (selectedLanguage && selectedLanguage.enabled && selectedLanguage.language === this.track.language && selectedLanguage.kind !== this.track.kind) {\n return;\n }\n this.player_.cache_.selectedLanguage = {\n enabled: true,\n language: this.track.language,\n kind: this.track.kind\n };\n }\n }\n }, {\n key: \"dispose\",\n value: function dispose() {\n // remove reference to track object on dispose\n this.track = null;\n _get(_getPrototypeOf(TextTrackMenuItem.prototype), \"dispose\", this).call(this);\n }\n }]);\n return TextTrackMenuItem;\n}(MenuItem);\nComponent$1.registerComponent('TextTrackMenuItem', TextTrackMenuItem);\n\n/**\n * @file off-text-track-menu-item.js\n */\n\n/**\n * A special menu item for turning off a specific type of text track\n *\n * @extends TextTrackMenuItem\n */\nvar OffTextTrackMenuItem = /*#__PURE__*/function (_TextTrackMenuItem) {\n _inherits(OffTextTrackMenuItem, _TextTrackMenuItem);\n var _super51 = _createSuper(OffTextTrackMenuItem);\n /**\n * Creates an instance of this class.\n *\n * @param { import('../../player').default } player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n function OffTextTrackMenuItem(player, options) {\n _classCallCheck(this, OffTextTrackMenuItem);\n // Create pseudo track info\n // Requires options['kind']\n options.track = {\n player: player,\n // it is no longer necessary to store `kind` or `kinds` on the track itself\n // since they are now stored in the `kinds` property of all instances of\n // TextTrackMenuItem, but this will remain for backwards compatibility\n kind: options.kind,\n kinds: options.kinds,\n \"default\": false,\n mode: 'disabled'\n };\n if (!options.kinds) {\n options.kinds = [options.kind];\n }\n if (options.label) {\n options.track.label = options.label;\n } else {\n options.track.label = options.kinds.join(' and ') + ' off';\n }\n\n // MenuItem is selectable\n options.selectable = true;\n // MenuItem is NOT multiSelectable (i.e. only one can be marked \"selected\" at a time)\n options.multiSelectable = false;\n return _super51.call(this, player, options);\n }\n\n /**\n * Handle text track change\n *\n * @param {Event} event\n * The event that caused this function to run\n */\n _createClass(OffTextTrackMenuItem, [{\n key: \"handleTracksChange\",\n value: function handleTracksChange(event) {\n var tracks = this.player().textTracks();\n var shouldBeSelected = true;\n for (var _i43 = 0, l = tracks.length; _i43 < l; _i43++) {\n var track = tracks[_i43];\n if (this.options_.kinds.indexOf(track.kind) > -1 && track.mode === 'showing') {\n shouldBeSelected = false;\n break;\n }\n }\n\n // Prevent redundant selected() calls because they may cause\n // screen readers to read the appended control text unnecessarily\n if (shouldBeSelected !== this.isSelected_) {\n this.selected(shouldBeSelected);\n }\n }\n }, {\n key: \"handleSelectedLanguageChange\",\n value: function handleSelectedLanguageChange(event) {\n var tracks = this.player().textTracks();\n var allHidden = true;\n for (var _i44 = 0, l = tracks.length; _i44 < l; _i44++) {\n var track = tracks[_i44];\n if (['captions', 'descriptions', 'subtitles'].indexOf(track.kind) > -1 && track.mode === 'showing') {\n allHidden = false;\n break;\n }\n }\n if (allHidden) {\n this.player_.cache_.selectedLanguage = {\n enabled: false\n };\n }\n }\n\n /**\n * Update control text and label on languagechange\n */\n }, {\n key: \"handleLanguagechange\",\n value: function handleLanguagechange() {\n this.$('.vjs-menu-item-text').textContent = this.player_.localize(this.options_.label);\n _get(_getPrototypeOf(OffTextTrackMenuItem.prototype), \"handleLanguagechange\", this).call(this);\n }\n }]);\n return OffTextTrackMenuItem;\n}(TextTrackMenuItem);\nComponent$1.registerComponent('OffTextTrackMenuItem', OffTextTrackMenuItem);\n\n/**\n * @file text-track-button.js\n */\n\n/**\n * The base class for buttons that toggle specific text track types (e.g. subtitles)\n *\n * @extends MenuButton\n */\nvar TextTrackButton = /*#__PURE__*/function (_TrackButton) {\n _inherits(TextTrackButton, _TrackButton);\n var _super52 = _createSuper(TextTrackButton);\n /**\n * Creates an instance of this class.\n *\n * @param { import('../../player').default } player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options={}]\n * The key/value store of player options.\n */\n function TextTrackButton(player) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n _classCallCheck(this, TextTrackButton);\n options.tracks = player.textTracks();\n return _super52.call(this, player, options);\n }\n\n /**\n * Create a menu item for each text track\n *\n * @param {TextTrackMenuItem[]} [items=[]]\n * Existing array of items to use during creation\n *\n * @return {TextTrackMenuItem[]}\n * Array of menu items that were created\n */\n _createClass(TextTrackButton, [{\n key: \"createItems\",\n value: function createItems() {\n var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n var TrackMenuItem = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : TextTrackMenuItem;\n // Label is an override for the [track] off label\n // USed to localise captions/subtitles\n var label;\n if (this.label_) {\n label = \"\".concat(this.label_, \" off\");\n }\n // Add an OFF menu item to turn all tracks off\n items.push(new OffTextTrackMenuItem(this.player_, {\n kinds: this.kinds_,\n kind: this.kind_,\n label: label\n }));\n this.hideThreshold_ += 1;\n var tracks = this.player_.textTracks();\n if (!Array.isArray(this.kinds_)) {\n this.kinds_ = [this.kind_];\n }\n for (var _i45 = 0; _i45 < tracks.length; _i45++) {\n var track = tracks[_i45];\n\n // only add tracks that are of an appropriate kind and have a label\n if (this.kinds_.indexOf(track.kind) > -1) {\n var item = new TrackMenuItem(this.player_, {\n track: track,\n kinds: this.kinds_,\n kind: this.kind_,\n // MenuItem is selectable\n selectable: true,\n // MenuItem is NOT multiSelectable (i.e. only one can be marked \"selected\" at a time)\n multiSelectable: false\n });\n item.addClass(\"vjs-\".concat(track.kind, \"-menu-item\"));\n items.push(item);\n }\n }\n return items;\n }\n }]);\n return TextTrackButton;\n}(TrackButton);\nComponent$1.registerComponent('TextTrackButton', TextTrackButton);\n\n/**\n * @file chapters-track-menu-item.js\n */\n\n/**\n * The chapter track menu item\n *\n * @extends MenuItem\n */\nvar ChaptersTrackMenuItem = /*#__PURE__*/function (_MenuItem2) {\n _inherits(ChaptersTrackMenuItem, _MenuItem2);\n var _super53 = _createSuper(ChaptersTrackMenuItem);\n /**\n * Creates an instance of this class.\n *\n * @param { import('../../player').default } player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n function ChaptersTrackMenuItem(player, options) {\n var _this78;\n _classCallCheck(this, ChaptersTrackMenuItem);\n var track = options.track;\n var cue = options.cue;\n var currentTime = player.currentTime();\n\n // Modify options for parent MenuItem class's init.\n options.selectable = true;\n options.multiSelectable = false;\n options.label = cue.text;\n options.selected = cue.startTime <= currentTime && currentTime < cue.endTime;\n _this78 = _super53.call(this, player, options);\n _this78.track = track;\n _this78.cue = cue;\n return _this78;\n }\n\n /**\n * This gets called when an `ChaptersTrackMenuItem` is \"clicked\". See\n * {@link ClickableComponent} for more detailed information on what a click can be.\n *\n * @param {Event} [event]\n * The `keydown`, `tap`, or `click` event that caused this function to be\n * called.\n *\n * @listens tap\n * @listens click\n */\n _createClass(ChaptersTrackMenuItem, [{\n key: \"handleClick\",\n value: function handleClick(event) {\n _get(_getPrototypeOf(ChaptersTrackMenuItem.prototype), \"handleClick\", this).call(this);\n this.player_.currentTime(this.cue.startTime);\n }\n }]);\n return ChaptersTrackMenuItem;\n}(MenuItem);\nComponent$1.registerComponent('ChaptersTrackMenuItem', ChaptersTrackMenuItem);\n\n/**\n * @file chapters-button.js\n */\n\n/**\n * The button component for toggling and selecting chapters\n * Chapters act much differently than other text tracks\n * Cues are navigation vs. other tracks of alternative languages\n *\n * @extends TextTrackButton\n */\nvar ChaptersButton = /*#__PURE__*/function (_TextTrackButton) {\n _inherits(ChaptersButton, _TextTrackButton);\n var _super54 = _createSuper(ChaptersButton);\n /**\n * Creates an instance of this class.\n *\n * @param { import('../../player').default } player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n *\n * @param {Function} [ready]\n * The function to call when this function is ready.\n */\n function ChaptersButton(player, options, ready) {\n var _this79;\n _classCallCheck(this, ChaptersButton);\n _this79 = _super54.call(this, player, options, ready);\n _this79.setIcon('chapters');\n _this79.selectCurrentItem_ = function () {\n _this79.items.forEach(function (item) {\n item.selected(_this79.track_.activeCues[0] === item.cue);\n });\n };\n return _this79;\n }\n\n /**\n * Builds the default DOM `className`.\n *\n * @return {string}\n * The DOM `className` for this object.\n */\n _createClass(ChaptersButton, [{\n key: \"buildCSSClass\",\n value: function buildCSSClass() {\n return \"vjs-chapters-button \".concat(_get(_getPrototypeOf(ChaptersButton.prototype), \"buildCSSClass\", this).call(this));\n }\n }, {\n key: \"buildWrapperCSSClass\",\n value: function buildWrapperCSSClass() {\n return \"vjs-chapters-button \".concat(_get(_getPrototypeOf(ChaptersButton.prototype), \"buildWrapperCSSClass\", this).call(this));\n }\n\n /**\n * Update the menu based on the current state of its items.\n *\n * @param {Event} [event]\n * An event that triggered this function to run.\n *\n * @listens TextTrackList#addtrack\n * @listens TextTrackList#removetrack\n * @listens TextTrackList#change\n */\n }, {\n key: \"update\",\n value: function update(event) {\n if (event && event.track && event.track.kind !== 'chapters') {\n return;\n }\n var track = this.findChaptersTrack();\n if (track !== this.track_) {\n this.setTrack(track);\n _get(_getPrototypeOf(ChaptersButton.prototype), \"update\", this).call(this);\n } else if (!this.items || track && track.cues && track.cues.length !== this.items.length) {\n // Update the menu initially or if the number of cues has changed since set\n _get(_getPrototypeOf(ChaptersButton.prototype), \"update\", this).call(this);\n }\n }\n\n /**\n * Set the currently selected track for the chapters button.\n *\n * @param {TextTrack} track\n * The new track to select. Nothing will change if this is the currently selected\n * track.\n */\n }, {\n key: \"setTrack\",\n value: function setTrack(track) {\n if (this.track_ === track) {\n return;\n }\n if (!this.updateHandler_) {\n this.updateHandler_ = this.update.bind(this);\n }\n\n // here this.track_ refers to the old track instance\n if (this.track_) {\n var remoteTextTrackEl = this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);\n if (remoteTextTrackEl) {\n remoteTextTrackEl.removeEventListener('load', this.updateHandler_);\n }\n this.track_.removeEventListener('cuechange', this.selectCurrentItem_);\n this.track_ = null;\n }\n this.track_ = track;\n\n // here this.track_ refers to the new track instance\n if (this.track_) {\n this.track_.mode = 'hidden';\n var _remoteTextTrackEl = this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);\n if (_remoteTextTrackEl) {\n _remoteTextTrackEl.addEventListener('load', this.updateHandler_);\n }\n this.track_.addEventListener('cuechange', this.selectCurrentItem_);\n }\n }\n\n /**\n * Find the track object that is currently in use by this ChaptersButton\n *\n * @return {TextTrack|undefined}\n * The current track or undefined if none was found.\n */\n }, {\n key: \"findChaptersTrack\",\n value: function findChaptersTrack() {\n var tracks = this.player_.textTracks() || [];\n for (var _i46 = tracks.length - 1; _i46 >= 0; _i46--) {\n // We will always choose the last track as our chaptersTrack\n var track = tracks[_i46];\n if (track.kind === this.kind_) {\n return track;\n }\n }\n }\n\n /**\n * Get the caption for the ChaptersButton based on the track label. This will also\n * use the current tracks localized kind as a fallback if a label does not exist.\n *\n * @return {string}\n * The tracks current label or the localized track kind.\n */\n }, {\n key: \"getMenuCaption\",\n value: function getMenuCaption() {\n if (this.track_ && this.track_.label) {\n return this.track_.label;\n }\n return this.localize(toTitleCase$1(this.kind_));\n }\n\n /**\n * Create menu from chapter track\n *\n * @return { import('../../menu/menu').default }\n * New menu for the chapter buttons\n */\n }, {\n key: \"createMenu\",\n value: function createMenu() {\n this.options_.title = this.getMenuCaption();\n return _get(_getPrototypeOf(ChaptersButton.prototype), \"createMenu\", this).call(this);\n }\n\n /**\n * Create a menu item for each text track\n *\n * @return { import('./text-track-menu-item').default[] }\n * Array of menu items\n */\n }, {\n key: \"createItems\",\n value: function createItems() {\n var items = [];\n if (!this.track_) {\n return items;\n }\n var cues = this.track_.cues;\n if (!cues) {\n return items;\n }\n for (var _i47 = 0, l = cues.length; _i47 < l; _i47++) {\n var cue = cues[_i47];\n var mi = new ChaptersTrackMenuItem(this.player_, {\n track: this.track_,\n cue: cue\n });\n items.push(mi);\n }\n return items;\n }\n }]);\n return ChaptersButton;\n}(TextTrackButton);\n/**\n * `kind` of TextTrack to look for to associate it with this menu.\n *\n * @type {string}\n * @private\n */\nChaptersButton.prototype.kind_ = 'chapters';\n\n/**\n * The text that should display over the `ChaptersButton`s controls. Added for localization.\n *\n * @type {string}\n * @protected\n */\nChaptersButton.prototype.controlText_ = 'Chapters';\nComponent$1.registerComponent('ChaptersButton', ChaptersButton);\n\n/**\n * @file descriptions-button.js\n */\n\n/**\n * The button component for toggling and selecting descriptions\n *\n * @extends TextTrackButton\n */\nvar DescriptionsButton = /*#__PURE__*/function (_TextTrackButton2) {\n _inherits(DescriptionsButton, _TextTrackButton2);\n var _super55 = _createSuper(DescriptionsButton);\n /**\n * Creates an instance of this class.\n *\n * @param { import('../../player').default } player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n *\n * @param {Function} [ready]\n * The function to call when this component is ready.\n */\n function DescriptionsButton(player, options, ready) {\n var _this80;\n _classCallCheck(this, DescriptionsButton);\n _this80 = _super55.call(this, player, options, ready);\n _this80.setIcon('audio-description');\n var tracks = player.textTracks();\n var changeHandler = bind_(_assertThisInitialized(_this80), _this80.handleTracksChange);\n tracks.addEventListener('change', changeHandler);\n _this80.on('dispose', function () {\n tracks.removeEventListener('change', changeHandler);\n });\n return _this80;\n }\n\n /**\n * Handle text track change\n *\n * @param {Event} event\n * The event that caused this function to run\n *\n * @listens TextTrackList#change\n */\n _createClass(DescriptionsButton, [{\n key: \"handleTracksChange\",\n value: function handleTracksChange(event) {\n var tracks = this.player().textTracks();\n var disabled = false;\n\n // Check whether a track of a different kind is showing\n for (var _i48 = 0, l = tracks.length; _i48 < l; _i48++) {\n var track = tracks[_i48];\n if (track.kind !== this.kind_ && track.mode === 'showing') {\n disabled = true;\n break;\n }\n }\n\n // If another track is showing, disable this menu button\n if (disabled) {\n this.disable();\n } else {\n this.enable();\n }\n }\n\n /**\n * Builds the default DOM `className`.\n *\n * @return {string}\n * The DOM `className` for this object.\n */\n }, {\n key: \"buildCSSClass\",\n value: function buildCSSClass() {\n return \"vjs-descriptions-button \".concat(_get(_getPrototypeOf(DescriptionsButton.prototype), \"buildCSSClass\", this).call(this));\n }\n }, {\n key: \"buildWrapperCSSClass\",\n value: function buildWrapperCSSClass() {\n return \"vjs-descriptions-button \".concat(_get(_getPrototypeOf(DescriptionsButton.prototype), \"buildWrapperCSSClass\", this).call(this));\n }\n }]);\n return DescriptionsButton;\n}(TextTrackButton);\n/**\n * `kind` of TextTrack to look for to associate it with this menu.\n *\n * @type {string}\n * @private\n */\nDescriptionsButton.prototype.kind_ = 'descriptions';\n\n/**\n * The text that should display over the `DescriptionsButton`s controls. Added for localization.\n *\n * @type {string}\n * @protected\n */\nDescriptionsButton.prototype.controlText_ = 'Descriptions';\nComponent$1.registerComponent('DescriptionsButton', DescriptionsButton);\n\n/**\n * @file subtitles-button.js\n */\n\n/**\n * The button component for toggling and selecting subtitles\n *\n * @extends TextTrackButton\n */\nvar SubtitlesButton = /*#__PURE__*/function (_TextTrackButton3) {\n _inherits(SubtitlesButton, _TextTrackButton3);\n var _super56 = _createSuper(SubtitlesButton);\n /**\n * Creates an instance of this class.\n *\n * @param { import('../../player').default } player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n *\n * @param {Function} [ready]\n * The function to call when this component is ready.\n */\n function SubtitlesButton(player, options, ready) {\n var _this81;\n _classCallCheck(this, SubtitlesButton);\n _this81 = _super56.call(this, player, options, ready);\n _this81.setIcon('subtitles');\n return _this81;\n }\n\n /**\n * Builds the default DOM `className`.\n *\n * @return {string}\n * The DOM `className` for this object.\n */\n _createClass(SubtitlesButton, [{\n key: \"buildCSSClass\",\n value: function buildCSSClass() {\n return \"vjs-subtitles-button \".concat(_get(_getPrototypeOf(SubtitlesButton.prototype), \"buildCSSClass\", this).call(this));\n }\n }, {\n key: \"buildWrapperCSSClass\",\n value: function buildWrapperCSSClass() {\n return \"vjs-subtitles-button \".concat(_get(_getPrototypeOf(SubtitlesButton.prototype), \"buildWrapperCSSClass\", this).call(this));\n }\n }]);\n return SubtitlesButton;\n}(TextTrackButton);\n/**\n * `kind` of TextTrack to look for to associate it with this menu.\n *\n * @type {string}\n * @private\n */\nSubtitlesButton.prototype.kind_ = 'subtitles';\n\n/**\n * The text that should display over the `SubtitlesButton`s controls. Added for localization.\n *\n * @type {string}\n * @protected\n */\nSubtitlesButton.prototype.controlText_ = 'Subtitles';\nComponent$1.registerComponent('SubtitlesButton', SubtitlesButton);\n\n/**\n * @file caption-settings-menu-item.js\n */\n\n/**\n * The menu item for caption track settings menu\n *\n * @extends TextTrackMenuItem\n */\nvar CaptionSettingsMenuItem = /*#__PURE__*/function (_TextTrackMenuItem2) {\n _inherits(CaptionSettingsMenuItem, _TextTrackMenuItem2);\n var _super57 = _createSuper(CaptionSettingsMenuItem);\n /**\n * Creates an instance of this class.\n *\n * @param { import('../../player').default } player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n function CaptionSettingsMenuItem(player, options) {\n var _this82;\n _classCallCheck(this, CaptionSettingsMenuItem);\n options.track = {\n player: player,\n kind: options.kind,\n label: options.kind + ' settings',\n selectable: false,\n \"default\": false,\n mode: 'disabled'\n };\n\n // CaptionSettingsMenuItem has no concept of 'selected'\n options.selectable = false;\n options.name = 'CaptionSettingsMenuItem';\n _this82 = _super57.call(this, player, options);\n _this82.addClass('vjs-texttrack-settings');\n _this82.controlText(', opens ' + options.kind + ' settings dialog');\n return _this82;\n }\n\n /**\n * This gets called when an `CaptionSettingsMenuItem` is \"clicked\". See\n * {@link ClickableComponent} for more detailed information on what a click can be.\n *\n * @param {Event} [event]\n * The `keydown`, `tap`, or `click` event that caused this function to be\n * called.\n *\n * @listens tap\n * @listens click\n */\n _createClass(CaptionSettingsMenuItem, [{\n key: \"handleClick\",\n value: function handleClick(event) {\n this.player().getChild('textTrackSettings').open();\n }\n\n /**\n * Update control text and label on languagechange\n */\n }, {\n key: \"handleLanguagechange\",\n value: function handleLanguagechange() {\n this.$('.vjs-menu-item-text').textContent = this.player_.localize(this.options_.kind + ' settings');\n _get(_getPrototypeOf(CaptionSettingsMenuItem.prototype), \"handleLanguagechange\", this).call(this);\n }\n }]);\n return CaptionSettingsMenuItem;\n}(TextTrackMenuItem);\nComponent$1.registerComponent('CaptionSettingsMenuItem', CaptionSettingsMenuItem);\n\n/**\n * @file captions-button.js\n */\n\n/**\n * The button component for toggling and selecting captions\n *\n * @extends TextTrackButton\n */\nvar CaptionsButton = /*#__PURE__*/function (_TextTrackButton4) {\n _inherits(CaptionsButton, _TextTrackButton4);\n var _super58 = _createSuper(CaptionsButton);\n /**\n * Creates an instance of this class.\n *\n * @param { import('../../player').default } player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n *\n * @param {Function} [ready]\n * The function to call when this component is ready.\n */\n function CaptionsButton(player, options, ready) {\n var _this83;\n _classCallCheck(this, CaptionsButton);\n _this83 = _super58.call(this, player, options, ready);\n _this83.setIcon('captions');\n return _this83;\n }\n\n /**\n * Builds the default DOM `className`.\n *\n * @return {string}\n * The DOM `className` for this object.\n */\n _createClass(CaptionsButton, [{\n key: \"buildCSSClass\",\n value: function buildCSSClass() {\n return \"vjs-captions-button \".concat(_get(_getPrototypeOf(CaptionsButton.prototype), \"buildCSSClass\", this).call(this));\n }\n }, {\n key: \"buildWrapperCSSClass\",\n value: function buildWrapperCSSClass() {\n return \"vjs-captions-button \".concat(_get(_getPrototypeOf(CaptionsButton.prototype), \"buildWrapperCSSClass\", this).call(this));\n }\n\n /**\n * Create caption menu items\n *\n * @return {CaptionSettingsMenuItem[]}\n * The array of current menu items.\n */\n }, {\n key: \"createItems\",\n value: function createItems() {\n var items = [];\n if (!(this.player().tech_ && this.player().tech_.featuresNativeTextTracks) && this.player().getChild('textTrackSettings')) {\n items.push(new CaptionSettingsMenuItem(this.player_, {\n kind: this.kind_\n }));\n this.hideThreshold_ += 1;\n }\n return _get(_getPrototypeOf(CaptionsButton.prototype), \"createItems\", this).call(this, items);\n }\n }]);\n return CaptionsButton;\n}(TextTrackButton);\n/**\n * `kind` of TextTrack to look for to associate it with this menu.\n *\n * @type {string}\n * @private\n */\nCaptionsButton.prototype.kind_ = 'captions';\n\n/**\n * The text that should display over the `CaptionsButton`s controls. Added for localization.\n *\n * @type {string}\n * @protected\n */\nCaptionsButton.prototype.controlText_ = 'Captions';\nComponent$1.registerComponent('CaptionsButton', CaptionsButton);\n\n/**\n * @file subs-caps-menu-item.js\n */\n\n/**\n * SubsCapsMenuItem has an [cc] icon to distinguish captions from subtitles\n * in the SubsCapsMenu.\n *\n * @extends TextTrackMenuItem\n */\nvar SubsCapsMenuItem = /*#__PURE__*/function (_TextTrackMenuItem3) {\n _inherits(SubsCapsMenuItem, _TextTrackMenuItem3);\n var _super59 = _createSuper(SubsCapsMenuItem);\n function SubsCapsMenuItem() {\n _classCallCheck(this, SubsCapsMenuItem);\n return _super59.apply(this, arguments);\n }\n _createClass(SubsCapsMenuItem, [{\n key: \"createEl\",\n value: function createEl(type, props, attrs) {\n var el = _get(_getPrototypeOf(SubsCapsMenuItem.prototype), \"createEl\", this).call(this, type, props, attrs);\n var parentSpan = el.querySelector('.vjs-menu-item-text');\n if (this.options_.track.kind === 'captions') {\n if (this.player_.options_.experimentalSvgIcons) {\n this.setIcon('captions', el);\n } else {\n parentSpan.appendChild(_createEl('span', {\n className: 'vjs-icon-placeholder'\n }, {\n 'aria-hidden': true\n }));\n }\n parentSpan.appendChild(_createEl('span', {\n className: 'vjs-control-text',\n // space added as the text will visually flow with the\n // label\n textContent: \" \".concat(this.localize('Captions'))\n }));\n }\n return el;\n }\n }]);\n return SubsCapsMenuItem;\n}(TextTrackMenuItem);\nComponent$1.registerComponent('SubsCapsMenuItem', SubsCapsMenuItem);\n\n/**\n * @file sub-caps-button.js\n */\n\n/**\n * The button component for toggling and selecting captions and/or subtitles\n *\n * @extends TextTrackButton\n */\nvar SubsCapsButton = /*#__PURE__*/function (_TextTrackButton5) {\n _inherits(SubsCapsButton, _TextTrackButton5);\n var _super60 = _createSuper(SubsCapsButton);\n /**\n * Creates an instance of this class.\n *\n * @param { import('../../player').default } player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n *\n * @param {Function} [ready]\n * The function to call when this component is ready.\n */\n function SubsCapsButton(player) {\n var _this84;\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n _classCallCheck(this, SubsCapsButton);\n _this84 = _super60.call(this, player, options);\n\n // Although North America uses \"captions\" in most cases for\n // \"captions and subtitles\" other locales use \"subtitles\"\n _this84.label_ = 'subtitles';\n _this84.setIcon('subtitles');\n if (['en', 'en-us', 'en-ca', 'fr-ca'].indexOf(_this84.player_.language_) > -1) {\n _this84.label_ = 'captions';\n _this84.setIcon('captions');\n }\n _this84.menuButton_.controlText(toTitleCase$1(_this84.label_));\n return _this84;\n }\n\n /**\n * Builds the default DOM `className`.\n *\n * @return {string}\n * The DOM `className` for this object.\n */\n _createClass(SubsCapsButton, [{\n key: \"buildCSSClass\",\n value: function buildCSSClass() {\n return \"vjs-subs-caps-button \".concat(_get(_getPrototypeOf(SubsCapsButton.prototype), \"buildCSSClass\", this).call(this));\n }\n }, {\n key: \"buildWrapperCSSClass\",\n value: function buildWrapperCSSClass() {\n return \"vjs-subs-caps-button \".concat(_get(_getPrototypeOf(SubsCapsButton.prototype), \"buildWrapperCSSClass\", this).call(this));\n }\n\n /**\n * Create caption/subtitles menu items\n *\n * @return {CaptionSettingsMenuItem[]}\n * The array of current menu items.\n */\n }, {\n key: \"createItems\",\n value: function createItems() {\n var items = [];\n if (!(this.player().tech_ && this.player().tech_.featuresNativeTextTracks) && this.player().getChild('textTrackSettings')) {\n items.push(new CaptionSettingsMenuItem(this.player_, {\n kind: this.label_\n }));\n this.hideThreshold_ += 1;\n }\n items = _get(_getPrototypeOf(SubsCapsButton.prototype), \"createItems\", this).call(this, items, SubsCapsMenuItem);\n return items;\n }\n }]);\n return SubsCapsButton;\n}(TextTrackButton);\n/**\n * `kind`s of TextTrack to look for to associate it with this menu.\n *\n * @type {array}\n * @private\n */\nSubsCapsButton.prototype.kinds_ = ['captions', 'subtitles'];\n\n/**\n * The text that should display over the `SubsCapsButton`s controls.\n *\n *\n * @type {string}\n * @protected\n */\nSubsCapsButton.prototype.controlText_ = 'Subtitles';\nComponent$1.registerComponent('SubsCapsButton', SubsCapsButton);\n\n/**\n * @file audio-track-menu-item.js\n */\n\n/**\n * An {@link AudioTrack} {@link MenuItem}\n *\n * @extends MenuItem\n */\nvar AudioTrackMenuItem = /*#__PURE__*/function (_MenuItem3) {\n _inherits(AudioTrackMenuItem, _MenuItem3);\n var _super61 = _createSuper(AudioTrackMenuItem);\n /**\n * Creates an instance of this class.\n *\n * @param { import('../../player').default } player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n function AudioTrackMenuItem(player, options) {\n var _this85;\n _classCallCheck(this, AudioTrackMenuItem);\n var track = options.track;\n var tracks = player.audioTracks();\n\n // Modify options for parent MenuItem class's init.\n options.label = track.label || track.language || 'Unknown';\n options.selected = track.enabled;\n _this85 = _super61.call(this, player, options);\n _this85.track = track;\n _this85.addClass(\"vjs-\".concat(track.kind, \"-menu-item\"));\n var changeHandler = function changeHandler() {\n for (var _len18 = arguments.length, args = new Array(_len18), _key18 = 0; _key18 < _len18; _key18++) {\n args[_key18] = arguments[_key18];\n }\n _this85.handleTracksChange.apply(_assertThisInitialized(_this85), args);\n };\n tracks.addEventListener('change', changeHandler);\n _this85.on('dispose', function () {\n tracks.removeEventListener('change', changeHandler);\n });\n return _this85;\n }\n _createClass(AudioTrackMenuItem, [{\n key: \"createEl\",\n value: function createEl(type, props, attrs) {\n var el = _get(_getPrototypeOf(AudioTrackMenuItem.prototype), \"createEl\", this).call(this, type, props, attrs);\n var parentSpan = el.querySelector('.vjs-menu-item-text');\n if (['main-desc', 'description'].indexOf(this.options_.track.kind) >= 0) {\n parentSpan.appendChild(_createEl('span', {\n className: 'vjs-icon-placeholder'\n }, {\n 'aria-hidden': true\n }));\n parentSpan.appendChild(_createEl('span', {\n className: 'vjs-control-text',\n textContent: ' ' + this.localize('Descriptions')\n }));\n }\n return el;\n }\n\n /**\n * This gets called when an `AudioTrackMenuItem is \"clicked\". See {@link ClickableComponent}\n * for more detailed information on what a click can be.\n *\n * @param {Event} [event]\n * The `keydown`, `tap`, or `click` event that caused this function to be\n * called.\n *\n * @listens tap\n * @listens click\n */\n }, {\n key: \"handleClick\",\n value: function handleClick(event) {\n _get(_getPrototypeOf(AudioTrackMenuItem.prototype), \"handleClick\", this).call(this, event);\n\n // the audio track list will automatically toggle other tracks\n // off for us.\n this.track.enabled = true;\n\n // when native audio tracks are used, we want to make sure that other tracks are turned off\n if (this.player_.tech_.featuresNativeAudioTracks) {\n var tracks = this.player_.audioTracks();\n for (var _i49 = 0; _i49 < tracks.length; _i49++) {\n var track = tracks[_i49];\n\n // skip the current track since we enabled it above\n if (track === this.track) {\n continue;\n }\n track.enabled = track === this.track;\n }\n }\n }\n\n /**\n * Handle any {@link AudioTrack} change.\n *\n * @param {Event} [event]\n * The {@link AudioTrackList#change} event that caused this to run.\n *\n * @listens AudioTrackList#change\n */\n }, {\n key: \"handleTracksChange\",\n value: function handleTracksChange(event) {\n this.selected(this.track.enabled);\n }\n }]);\n return AudioTrackMenuItem;\n}(MenuItem);\nComponent$1.registerComponent('AudioTrackMenuItem', AudioTrackMenuItem);\n\n/**\n * @file audio-track-button.js\n */\n\n/**\n * The base class for buttons that toggle specific {@link AudioTrack} types.\n *\n * @extends TrackButton\n */\nvar AudioTrackButton = /*#__PURE__*/function (_TrackButton2) {\n _inherits(AudioTrackButton, _TrackButton2);\n var _super62 = _createSuper(AudioTrackButton);\n /**\n * Creates an instance of this class.\n *\n * @param {Player} player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options={}]\n * The key/value store of player options.\n */\n function AudioTrackButton(player) {\n var _this86;\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n _classCallCheck(this, AudioTrackButton);\n options.tracks = player.audioTracks();\n _this86 = _super62.call(this, player, options);\n _this86.setIcon('audio');\n return _this86;\n }\n\n /**\n * Builds the default DOM `className`.\n *\n * @return {string}\n * The DOM `className` for this object.\n */\n _createClass(AudioTrackButton, [{\n key: \"buildCSSClass\",\n value: function buildCSSClass() {\n return \"vjs-audio-button \".concat(_get(_getPrototypeOf(AudioTrackButton.prototype), \"buildCSSClass\", this).call(this));\n }\n }, {\n key: \"buildWrapperCSSClass\",\n value: function buildWrapperCSSClass() {\n return \"vjs-audio-button \".concat(_get(_getPrototypeOf(AudioTrackButton.prototype), \"buildWrapperCSSClass\", this).call(this));\n }\n\n /**\n * Create a menu item for each audio track\n *\n * @param {AudioTrackMenuItem[]} [items=[]]\n * An array of existing menu items to use.\n *\n * @return {AudioTrackMenuItem[]}\n * An array of menu items\n */\n }, {\n key: \"createItems\",\n value: function createItems() {\n var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n // if there's only one audio track, there no point in showing it\n this.hideThreshold_ = 1;\n var tracks = this.player_.audioTracks();\n for (var _i50 = 0; _i50 < tracks.length; _i50++) {\n var track = tracks[_i50];\n items.push(new AudioTrackMenuItem(this.player_, {\n track: track,\n // MenuItem is selectable\n selectable: true,\n // MenuItem is NOT multiSelectable (i.e. only one can be marked \"selected\" at a time)\n multiSelectable: false\n }));\n }\n return items;\n }\n }]);\n return AudioTrackButton;\n}(TrackButton);\n/**\n * The text that should display over the `AudioTrackButton`s controls. Added for localization.\n *\n * @type {string}\n * @protected\n */\nAudioTrackButton.prototype.controlText_ = 'Audio Track';\nComponent$1.registerComponent('AudioTrackButton', AudioTrackButton);\n\n/**\n * @file playback-rate-menu-item.js\n */\n\n/**\n * The specific menu item type for selecting a playback rate.\n *\n * @extends MenuItem\n */\nvar PlaybackRateMenuItem = /*#__PURE__*/function (_MenuItem4) {\n _inherits(PlaybackRateMenuItem, _MenuItem4);\n var _super63 = _createSuper(PlaybackRateMenuItem);\n /**\n * Creates an instance of this class.\n *\n * @param { import('../../player').default } player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n function PlaybackRateMenuItem(player, options) {\n var _this87;\n _classCallCheck(this, PlaybackRateMenuItem);\n var label = options.rate;\n var rate = parseFloat(label, 10);\n\n // Modify options for parent MenuItem class's init.\n options.label = label;\n options.selected = rate === player.playbackRate();\n options.selectable = true;\n options.multiSelectable = false;\n _this87 = _super63.call(this, player, options);\n _this87.label = label;\n _this87.rate = rate;\n _this87.on(player, 'ratechange', function (e) {\n return _this87.update(e);\n });\n return _this87;\n }\n\n /**\n * This gets called when an `PlaybackRateMenuItem` is \"clicked\". See\n * {@link ClickableComponent} for more detailed information on what a click can be.\n *\n * @param {Event} [event]\n * The `keydown`, `tap`, or `click` event that caused this function to be\n * called.\n *\n * @listens tap\n * @listens click\n */\n _createClass(PlaybackRateMenuItem, [{\n key: \"handleClick\",\n value: function handleClick(event) {\n _get(_getPrototypeOf(PlaybackRateMenuItem.prototype), \"handleClick\", this).call(this);\n this.player().playbackRate(this.rate);\n }\n\n /**\n * Update the PlaybackRateMenuItem when the playbackrate changes.\n *\n * @param {Event} [event]\n * The `ratechange` event that caused this function to run.\n *\n * @listens Player#ratechange\n */\n }, {\n key: \"update\",\n value: function update(event) {\n this.selected(this.player().playbackRate() === this.rate);\n }\n }]);\n return PlaybackRateMenuItem;\n}(MenuItem);\n/**\n * The text that should display over the `PlaybackRateMenuItem`s controls. Added for localization.\n *\n * @type {string}\n * @private\n */\nPlaybackRateMenuItem.prototype.contentElType = 'button';\nComponent$1.registerComponent('PlaybackRateMenuItem', PlaybackRateMenuItem);\n\n/**\n * @file playback-rate-menu-button.js\n */\n\n/**\n * The component for controlling the playback rate.\n *\n * @extends MenuButton\n */\nvar PlaybackRateMenuButton = /*#__PURE__*/function (_MenuButton2) {\n _inherits(PlaybackRateMenuButton, _MenuButton2);\n var _super64 = _createSuper(PlaybackRateMenuButton);\n /**\n * Creates an instance of this class.\n *\n * @param { import('../../player').default } player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n function PlaybackRateMenuButton(player, options) {\n var _this88;\n _classCallCheck(this, PlaybackRateMenuButton);\n _this88 = _super64.call(this, player, options);\n _this88.menuButton_.el_.setAttribute('aria-describedby', _this88.labelElId_);\n _this88.updateVisibility();\n _this88.updateLabel();\n _this88.on(player, 'loadstart', function (e) {\n return _this88.updateVisibility(e);\n });\n _this88.on(player, 'ratechange', function (e) {\n return _this88.updateLabel(e);\n });\n _this88.on(player, 'playbackrateschange', function (e) {\n return _this88.handlePlaybackRateschange(e);\n });\n return _this88;\n }\n\n /**\n * Create the `Component`'s DOM element\n *\n * @return {Element}\n * The element that was created.\n */\n _createClass(PlaybackRateMenuButton, [{\n key: \"createEl\",\n value: function createEl() {\n var el = _get(_getPrototypeOf(PlaybackRateMenuButton.prototype), \"createEl\", this).call(this);\n this.labelElId_ = 'vjs-playback-rate-value-label-' + this.id_;\n this.labelEl_ = _createEl('div', {\n className: 'vjs-playback-rate-value',\n id: this.labelElId_,\n textContent: '1x'\n });\n el.appendChild(this.labelEl_);\n return el;\n }\n }, {\n key: \"dispose\",\n value: function dispose() {\n this.labelEl_ = null;\n _get(_getPrototypeOf(PlaybackRateMenuButton.prototype), \"dispose\", this).call(this);\n }\n\n /**\n * Builds the default DOM `className`.\n *\n * @return {string}\n * The DOM `className` for this object.\n */\n }, {\n key: \"buildCSSClass\",\n value: function buildCSSClass() {\n return \"vjs-playback-rate \".concat(_get(_getPrototypeOf(PlaybackRateMenuButton.prototype), \"buildCSSClass\", this).call(this));\n }\n }, {\n key: \"buildWrapperCSSClass\",\n value: function buildWrapperCSSClass() {\n return \"vjs-playback-rate \".concat(_get(_getPrototypeOf(PlaybackRateMenuButton.prototype), \"buildWrapperCSSClass\", this).call(this));\n }\n\n /**\n * Create the list of menu items. Specific to each subclass.\n *\n */\n }, {\n key: \"createItems\",\n value: function createItems() {\n var rates = this.playbackRates();\n var items = [];\n for (var _i51 = rates.length - 1; _i51 >= 0; _i51--) {\n items.push(new PlaybackRateMenuItem(this.player(), {\n rate: rates[_i51] + 'x'\n }));\n }\n return items;\n }\n\n /**\n * On playbackrateschange, update the menu to account for the new items.\n *\n * @listens Player#playbackrateschange\n */\n }, {\n key: \"handlePlaybackRateschange\",\n value: function handlePlaybackRateschange(event) {\n this.update();\n }\n\n /**\n * Get possible playback rates\n *\n * @return {Array}\n * All possible playback rates\n */\n }, {\n key: \"playbackRates\",\n value: function playbackRates() {\n var player = this.player();\n return player.playbackRates && player.playbackRates() || [];\n }\n\n /**\n * Get whether playback rates is supported by the tech\n * and an array of playback rates exists\n *\n * @return {boolean}\n * Whether changing playback rate is supported\n */\n }, {\n key: \"playbackRateSupported\",\n value: function playbackRateSupported() {\n return this.player().tech_ && this.player().tech_.featuresPlaybackRate && this.playbackRates() && this.playbackRates().length > 0;\n }\n\n /**\n * Hide playback rate controls when they're no playback rate options to select\n *\n * @param {Event} [event]\n * The event that caused this function to run.\n *\n * @listens Player#loadstart\n */\n }, {\n key: \"updateVisibility\",\n value: function updateVisibility(event) {\n if (this.playbackRateSupported()) {\n this.removeClass('vjs-hidden');\n } else {\n this.addClass('vjs-hidden');\n }\n }\n\n /**\n * Update button label when rate changed\n *\n * @param {Event} [event]\n * The event that caused this function to run.\n *\n * @listens Player#ratechange\n */\n }, {\n key: \"updateLabel\",\n value: function updateLabel(event) {\n if (this.playbackRateSupported()) {\n this.labelEl_.textContent = this.player().playbackRate() + 'x';\n }\n }\n }]);\n return PlaybackRateMenuButton;\n}(MenuButton);\n/**\n * The text that should display over the `PlaybackRateMenuButton`s controls.\n *\n * Added for localization.\n *\n * @type {string}\n * @protected\n */\nPlaybackRateMenuButton.prototype.controlText_ = 'Playback Rate';\nComponent$1.registerComponent('PlaybackRateMenuButton', PlaybackRateMenuButton);\n\n/**\n * @file spacer.js\n */\n\n/**\n * Just an empty spacer element that can be used as an append point for plugins, etc.\n * Also can be used to create space between elements when necessary.\n *\n * @extends Component\n */\nvar Spacer = /*#__PURE__*/function (_Component$23) {\n _inherits(Spacer, _Component$23);\n var _super65 = _createSuper(Spacer);\n function Spacer() {\n _classCallCheck(this, Spacer);\n return _super65.apply(this, arguments);\n }\n _createClass(Spacer, [{\n key: \"buildCSSClass\",\n value:\n /**\n * Builds the default DOM `className`.\n *\n * @return {string}\n * The DOM `className` for this object.\n */\n function buildCSSClass() {\n return \"vjs-spacer \".concat(_get(_getPrototypeOf(Spacer.prototype), \"buildCSSClass\", this).call(this));\n }\n\n /**\n * Create the `Component`'s DOM element\n *\n * @return {Element}\n * The element that was created.\n */\n }, {\n key: \"createEl\",\n value: function createEl() {\n var tag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'div';\n var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var attributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n if (!props.className) {\n props.className = this.buildCSSClass();\n }\n return _get(_getPrototypeOf(Spacer.prototype), \"createEl\", this).call(this, tag, props, attributes);\n }\n }]);\n return Spacer;\n}(Component$1);\nComponent$1.registerComponent('Spacer', Spacer);\n\n/**\n * @file custom-control-spacer.js\n */\n\n/**\n * Spacer specifically meant to be used as an insertion point for new plugins, etc.\n *\n * @extends Spacer\n */\nvar CustomControlSpacer = /*#__PURE__*/function (_Spacer) {\n _inherits(CustomControlSpacer, _Spacer);\n var _super66 = _createSuper(CustomControlSpacer);\n function CustomControlSpacer() {\n _classCallCheck(this, CustomControlSpacer);\n return _super66.apply(this, arguments);\n }\n _createClass(CustomControlSpacer, [{\n key: \"buildCSSClass\",\n value:\n /**\n * Builds the default DOM `className`.\n *\n * @return {string}\n * The DOM `className` for this object.\n */\n function buildCSSClass() {\n return \"vjs-custom-control-spacer \".concat(_get(_getPrototypeOf(CustomControlSpacer.prototype), \"buildCSSClass\", this).call(this));\n }\n\n /**\n * Create the `Component`'s DOM element\n *\n * @return {Element}\n * The element that was created.\n */\n }, {\n key: \"createEl\",\n value: function createEl() {\n return _get(_getPrototypeOf(CustomControlSpacer.prototype), \"createEl\", this).call(this, 'div', {\n className: this.buildCSSClass(),\n // No-flex/table-cell mode requires there be some content\n // in the cell to fill the remaining space of the table.\n textContent: \"\\xA0\"\n });\n }\n }]);\n return CustomControlSpacer;\n}(Spacer);\nComponent$1.registerComponent('CustomControlSpacer', CustomControlSpacer);\n\n/**\n * @file control-bar.js\n */\n\n/**\n * Container of main controls.\n *\n * @extends Component\n */\nvar ControlBar = /*#__PURE__*/function (_Component$24) {\n _inherits(ControlBar, _Component$24);\n var _super67 = _createSuper(ControlBar);\n function ControlBar() {\n _classCallCheck(this, ControlBar);\n return _super67.apply(this, arguments);\n }\n _createClass(ControlBar, [{\n key: \"createEl\",\n value:\n /**\n * Create the `Component`'s DOM element\n *\n * @return {Element}\n * The element that was created.\n */\n function createEl() {\n return _get(_getPrototypeOf(ControlBar.prototype), \"createEl\", this).call(this, 'div', {\n className: 'vjs-control-bar',\n dir: 'ltr'\n });\n }\n }]);\n return ControlBar;\n}(Component$1);\n/**\n * Default options for `ControlBar`\n *\n * @type {Object}\n * @private\n */\nControlBar.prototype.options_ = {\n children: ['playToggle', 'skipBackward', 'skipForward', 'volumePanel', 'currentTimeDisplay', 'timeDivider', 'durationDisplay', 'progressControl', 'liveDisplay', 'seekToLive', 'remainingTimeDisplay', 'customControlSpacer', 'playbackRateMenuButton', 'chaptersButton', 'descriptionsButton', 'subsCapsButton', 'audioTrackButton', 'pictureInPictureToggle', 'fullscreenToggle']\n};\nComponent$1.registerComponent('ControlBar', ControlBar);\n\n/**\n * @file error-display.js\n */\n\n/**\n * A display that indicates an error has occurred. This means that the video\n * is unplayable.\n *\n * @extends ModalDialog\n */\nvar ErrorDisplay = /*#__PURE__*/function (_ModalDialog) {\n _inherits(ErrorDisplay, _ModalDialog);\n var _super68 = _createSuper(ErrorDisplay);\n /**\n * Creates an instance of this class.\n *\n * @param { import('./player').default } player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n function ErrorDisplay(player, options) {\n var _this89;\n _classCallCheck(this, ErrorDisplay);\n _this89 = _super68.call(this, player, options);\n _this89.on(player, 'error', function (e) {\n return _this89.open(e);\n });\n return _this89;\n }\n\n /**\n * Builds the default DOM `className`.\n *\n * @return {string}\n * The DOM `className` for this object.\n *\n * @deprecated Since version 5.\n */\n _createClass(ErrorDisplay, [{\n key: \"buildCSSClass\",\n value: function buildCSSClass() {\n return \"vjs-error-display \".concat(_get(_getPrototypeOf(ErrorDisplay.prototype), \"buildCSSClass\", this).call(this));\n }\n\n /**\n * Gets the localized error message based on the `Player`s error.\n *\n * @return {string}\n * The `Player`s error message localized or an empty string.\n */\n }, {\n key: \"content\",\n value: function content() {\n var error = this.player().error();\n return error ? this.localize(error.message) : '';\n }\n }]);\n return ErrorDisplay;\n}(ModalDialog);\n/**\n * The default options for an `ErrorDisplay`.\n *\n * @private\n */\nErrorDisplay.prototype.options_ = Object.assign({}, ModalDialog.prototype.options_, {\n pauseOnOpen: false,\n fillAlways: true,\n temporary: false,\n uncloseable: true\n});\nComponent$1.registerComponent('ErrorDisplay', ErrorDisplay);\n\n/**\n * @file text-track-settings.js\n */\nvar LOCAL_STORAGE_KEY$1 = 'vjs-text-track-settings';\nvar COLOR_BLACK = ['#000', 'Black'];\nvar COLOR_BLUE = ['#00F', 'Blue'];\nvar COLOR_CYAN = ['#0FF', 'Cyan'];\nvar COLOR_GREEN = ['#0F0', 'Green'];\nvar COLOR_MAGENTA = ['#F0F', 'Magenta'];\nvar COLOR_RED = ['#F00', 'Red'];\nvar COLOR_WHITE = ['#FFF', 'White'];\nvar COLOR_YELLOW = ['#FF0', 'Yellow'];\nvar OPACITY_OPAQUE = ['1', 'Opaque'];\nvar OPACITY_SEMI = ['0.5', 'Semi-Transparent'];\nvar OPACITY_TRANS = ['0', 'Transparent'];\n\n// Configuration for the various <select> elements in the DOM of this component.\n//\n// Possible keys include:\n//\n// `default`:\n// The default option index. Only needs to be provided if not zero.\n// `parser`:\n// A function which is used to parse the value from the selected option in\n// a customized way.\n// `selector`:\n// The selector used to find the associated <select> element.\nvar selectConfigs = {\n backgroundColor: {\n selector: '.vjs-bg-color > select',\n id: 'captions-background-color-%s',\n label: 'Color',\n options: [COLOR_BLACK, COLOR_WHITE, COLOR_RED, COLOR_GREEN, COLOR_BLUE, COLOR_YELLOW, COLOR_MAGENTA, COLOR_CYAN]\n },\n backgroundOpacity: {\n selector: '.vjs-bg-opacity > select',\n id: 'captions-background-opacity-%s',\n label: 'Opacity',\n options: [OPACITY_OPAQUE, OPACITY_SEMI, OPACITY_TRANS]\n },\n color: {\n selector: '.vjs-text-color > select',\n id: 'captions-foreground-color-%s',\n label: 'Color',\n options: [COLOR_WHITE, COLOR_BLACK, COLOR_RED, COLOR_GREEN, COLOR_BLUE, COLOR_YELLOW, COLOR_MAGENTA, COLOR_CYAN]\n },\n edgeStyle: {\n selector: '.vjs-edge-style > select',\n id: '%s',\n label: 'Text Edge Style',\n options: [['none', 'None'], ['raised', 'Raised'], ['depressed', 'Depressed'], ['uniform', 'Uniform'], ['dropshadow', 'Drop shadow']]\n },\n fontFamily: {\n selector: '.vjs-font-family > select',\n id: 'captions-font-family-%s',\n label: 'Font Family',\n options: [['proportionalSansSerif', 'Proportional Sans-Serif'], ['monospaceSansSerif', 'Monospace Sans-Serif'], ['proportionalSerif', 'Proportional Serif'], ['monospaceSerif', 'Monospace Serif'], ['casual', 'Casual'], ['script', 'Script'], ['small-caps', 'Small Caps']]\n },\n fontPercent: {\n selector: '.vjs-font-percent > select',\n id: 'captions-font-size-%s',\n label: 'Font Size',\n options: [['0.50', '50%'], ['0.75', '75%'], ['1.00', '100%'], ['1.25', '125%'], ['1.50', '150%'], ['1.75', '175%'], ['2.00', '200%'], ['3.00', '300%'], ['4.00', '400%']],\n \"default\": 2,\n parser: function parser(v) {\n return v === '1.00' ? null : Number(v);\n }\n },\n textOpacity: {\n selector: '.vjs-text-opacity > select',\n id: 'captions-foreground-opacity-%s',\n label: 'Opacity',\n options: [OPACITY_OPAQUE, OPACITY_SEMI]\n },\n // Options for this object are defined below.\n windowColor: {\n selector: '.vjs-window-color > select',\n id: 'captions-window-color-%s',\n label: 'Color'\n },\n // Options for this object are defined below.\n windowOpacity: {\n selector: '.vjs-window-opacity > select',\n id: 'captions-window-opacity-%s',\n label: 'Opacity',\n options: [OPACITY_TRANS, OPACITY_SEMI, OPACITY_OPAQUE]\n }\n};\nselectConfigs.windowColor.options = selectConfigs.backgroundColor.options;\n\n/**\n * Get the actual value of an option.\n *\n * @param {string} value\n * The value to get\n *\n * @param {Function} [parser]\n * Optional function to adjust the value.\n *\n * @return {*}\n * - Will be `undefined` if no value exists\n * - Will be `undefined` if the given value is \"none\".\n * - Will be the actual value otherwise.\n *\n * @private\n */\nfunction parseOptionValue(value, parser) {\n if (parser) {\n value = parser(value);\n }\n if (value && value !== 'none') {\n return value;\n }\n}\n\n/**\n * Gets the value of the selected <option> element within a <select> element.\n *\n * @param {Element} el\n * the element to look in\n *\n * @param {Function} [parser]\n * Optional function to adjust the value.\n *\n * @return {*}\n * - Will be `undefined` if no value exists\n * - Will be `undefined` if the given value is \"none\".\n * - Will be the actual value otherwise.\n *\n * @private\n */\nfunction getSelectedOptionValue(el, parser) {\n var value = el.options[el.options.selectedIndex].value;\n return parseOptionValue(value, parser);\n}\n\n/**\n * Sets the selected <option> element within a <select> element based on a\n * given value.\n *\n * @param {Element} el\n * The element to look in.\n *\n * @param {string} value\n * the property to look on.\n *\n * @param {Function} [parser]\n * Optional function to adjust the value before comparing.\n *\n * @private\n */\nfunction setSelectedOption(el, value, parser) {\n if (!value) {\n return;\n }\n for (var _i52 = 0; _i52 < el.options.length; _i52++) {\n if (parseOptionValue(el.options[_i52].value, parser) === value) {\n el.selectedIndex = _i52;\n break;\n }\n }\n}\n\n/**\n * Manipulate Text Tracks settings.\n *\n * @extends ModalDialog\n */\nvar TextTrackSettings = /*#__PURE__*/function (_ModalDialog2) {\n _inherits(TextTrackSettings, _ModalDialog2);\n var _super69 = _createSuper(TextTrackSettings);\n /**\n * Creates an instance of this class.\n *\n * @param { import('../player').default } player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n */\n function TextTrackSettings(player, options) {\n var _this90;\n _classCallCheck(this, TextTrackSettings);\n options.temporary = false;\n _this90 = _super69.call(this, player, options);\n _this90.updateDisplay = _this90.updateDisplay.bind(_assertThisInitialized(_this90));\n\n // fill the modal and pretend we have opened it\n _this90.fill();\n _this90.hasBeenOpened_ = _this90.hasBeenFilled_ = true;\n _this90.endDialog = _createEl('p', {\n className: 'vjs-control-text',\n textContent: _this90.localize('End of dialog window.')\n });\n _this90.el().appendChild(_this90.endDialog);\n _this90.setDefaults();\n\n // Grab `persistTextTrackSettings` from the player options if not passed in child options\n if (options.persistTextTrackSettings === undefined) {\n _this90.options_.persistTextTrackSettings = _this90.options_.playerOptions.persistTextTrackSettings;\n }\n _this90.on(_this90.$('.vjs-done-button'), 'click', function () {\n _this90.saveSettings();\n _this90.close();\n });\n _this90.on(_this90.$('.vjs-default-button'), 'click', function () {\n _this90.setDefaults();\n _this90.updateDisplay();\n });\n each(selectConfigs, function (config) {\n _this90.on(_this90.$(config.selector), 'change', _this90.updateDisplay);\n });\n if (_this90.options_.persistTextTrackSettings) {\n _this90.restoreSettings();\n }\n return _this90;\n }\n _createClass(TextTrackSettings, [{\n key: \"dispose\",\n value: function dispose() {\n this.endDialog = null;\n _get(_getPrototypeOf(TextTrackSettings.prototype), \"dispose\", this).call(this);\n }\n\n /**\n * Create a <select> element with configured options.\n *\n * @param {string} key\n * Configuration key to use during creation.\n *\n * @return {string}\n * An HTML string.\n *\n * @private\n */\n }, {\n key: \"createElSelect_\",\n value: function createElSelect_(key) {\n var _this91 = this;\n var legendId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'label';\n var config = selectConfigs[key];\n var id = config.id.replace('%s', this.id_);\n var selectLabelledbyIds = [legendId, id].join(' ').trim();\n return [\"<\".concat(type, \" id=\\\"\").concat(id, \"\\\" class=\\\"\").concat(type === 'label' ? 'vjs-label' : '', \"\\\">\"), this.localize(config.label), \"</\".concat(type, \">\"), \"<select aria-labelledby=\\\"\".concat(selectLabelledbyIds, \"\\\">\")].concat(config.options.map(function (o) {\n var optionId = id + '-' + o[1].replace(/\\W+/g, '');\n return [\"<option id=\\\"\".concat(optionId, \"\\\" value=\\\"\").concat(o[0], \"\\\" \"), \"aria-labelledby=\\\"\".concat(selectLabelledbyIds, \" \").concat(optionId, \"\\\">\"), _this91.localize(o[1]), '</option>'].join('');\n })).concat('</select>').join('');\n }\n\n /**\n * Create foreground color element for the component\n *\n * @return {string}\n * An HTML string.\n *\n * @private\n */\n }, {\n key: \"createElFgColor_\",\n value: function createElFgColor_() {\n var legendId = \"captions-text-legend-\".concat(this.id_);\n return ['<fieldset class=\"vjs-fg vjs-track-setting\">', \"<legend id=\\\"\".concat(legendId, \"\\\">\"), this.localize('Text'), '</legend>', '<span class=\"vjs-text-color\">', this.createElSelect_('color', legendId), '</span>', '<span class=\"vjs-text-opacity vjs-opacity\">', this.createElSelect_('textOpacity', legendId), '</span>', '</fieldset>'].join('');\n }\n\n /**\n * Create background color element for the component\n *\n * @return {string}\n * An HTML string.\n *\n * @private\n */\n }, {\n key: \"createElBgColor_\",\n value: function createElBgColor_() {\n var legendId = \"captions-background-\".concat(this.id_);\n return ['<fieldset class=\"vjs-bg vjs-track-setting\">', \"<legend id=\\\"\".concat(legendId, \"\\\">\"), this.localize('Text Background'), '</legend>', '<span class=\"vjs-bg-color\">', this.createElSelect_('backgroundColor', legendId), '</span>', '<span class=\"vjs-bg-opacity vjs-opacity\">', this.createElSelect_('backgroundOpacity', legendId), '</span>', '</fieldset>'].join('');\n }\n\n /**\n * Create window color element for the component\n *\n * @return {string}\n * An HTML string.\n *\n * @private\n */\n }, {\n key: \"createElWinColor_\",\n value: function createElWinColor_() {\n var legendId = \"captions-window-\".concat(this.id_);\n return ['<fieldset class=\"vjs-window vjs-track-setting\">', \"<legend id=\\\"\".concat(legendId, \"\\\">\"), this.localize('Caption Area Background'), '</legend>', '<span class=\"vjs-window-color\">', this.createElSelect_('windowColor', legendId), '</span>', '<span class=\"vjs-window-opacity vjs-opacity\">', this.createElSelect_('windowOpacity', legendId), '</span>', '</fieldset>'].join('');\n }\n\n /**\n * Create color elements for the component\n *\n * @return {Element}\n * The element that was created\n *\n * @private\n */\n }, {\n key: \"createElColors_\",\n value: function createElColors_() {\n return _createEl('div', {\n className: 'vjs-track-settings-colors',\n innerHTML: [this.createElFgColor_(), this.createElBgColor_(), this.createElWinColor_()].join('')\n });\n }\n\n /**\n * Create font elements for the component\n *\n * @return {Element}\n * The element that was created.\n *\n * @private\n */\n }, {\n key: \"createElFont_\",\n value: function createElFont_() {\n return _createEl('div', {\n className: 'vjs-track-settings-font',\n innerHTML: ['<fieldset class=\"vjs-font-percent vjs-track-setting\">', this.createElSelect_('fontPercent', '', 'legend'), '</fieldset>', '<fieldset class=\"vjs-edge-style vjs-track-setting\">', this.createElSelect_('edgeStyle', '', 'legend'), '</fieldset>', '<fieldset class=\"vjs-font-family vjs-track-setting\">', this.createElSelect_('fontFamily', '', 'legend'), '</fieldset>'].join('')\n });\n }\n\n /**\n * Create controls for the component\n *\n * @return {Element}\n * The element that was created.\n *\n * @private\n */\n }, {\n key: \"createElControls_\",\n value: function createElControls_() {\n var defaultsDescription = this.localize('restore all settings to the default values');\n return _createEl('div', {\n className: 'vjs-track-settings-controls',\n innerHTML: [\"<button type=\\\"button\\\" class=\\\"vjs-default-button\\\" title=\\\"\".concat(defaultsDescription, \"\\\">\"), this.localize('Reset'), \"<span class=\\\"vjs-control-text\\\"> \".concat(defaultsDescription, \"</span>\"), '</button>', \"<button type=\\\"button\\\" class=\\\"vjs-done-button\\\">\".concat(this.localize('Done'), \"</button>\")].join('')\n });\n }\n }, {\n key: \"content\",\n value: function content() {\n return [this.createElColors_(), this.createElFont_(), this.createElControls_()];\n }\n }, {\n key: \"label\",\n value: function label() {\n return this.localize('Caption Settings Dialog');\n }\n }, {\n key: \"description\",\n value: function description() {\n return this.localize('Beginning of dialog window. Escape will cancel and close the window.');\n }\n }, {\n key: \"buildCSSClass\",\n value: function buildCSSClass() {\n return _get(_getPrototypeOf(TextTrackSettings.prototype), \"buildCSSClass\", this).call(this) + ' vjs-text-track-settings';\n }\n\n /**\n * Gets an object of text track settings (or null).\n *\n * @return {Object}\n * An object with config values parsed from the DOM or localStorage.\n */\n }, {\n key: \"getValues\",\n value: function getValues() {\n var _this92 = this;\n return reduce(selectConfigs, function (accum, config, key) {\n var value = getSelectedOptionValue(_this92.$(config.selector), config.parser);\n if (value !== undefined) {\n accum[key] = value;\n }\n return accum;\n }, {});\n }\n\n /**\n * Sets text track settings from an object of values.\n *\n * @param {Object} values\n * An object with config values parsed from the DOM or localStorage.\n */\n }, {\n key: \"setValues\",\n value: function setValues(values) {\n var _this93 = this;\n each(selectConfigs, function (config, key) {\n setSelectedOption(_this93.$(config.selector), values[key], config.parser);\n });\n }\n\n /**\n * Sets all `<select>` elements to their default values.\n */\n }, {\n key: \"setDefaults\",\n value: function setDefaults() {\n var _this94 = this;\n each(selectConfigs, function (config) {\n var index = config.hasOwnProperty('default') ? config[\"default\"] : 0;\n _this94.$(config.selector).selectedIndex = index;\n });\n }\n\n /**\n * Restore texttrack settings from localStorage\n */\n }, {\n key: \"restoreSettings\",\n value: function restoreSettings() {\n var values;\n try {\n values = JSON.parse(window$1.localStorage.getItem(LOCAL_STORAGE_KEY$1));\n } catch (err) {\n log$1.warn(err);\n }\n if (values) {\n this.setValues(values);\n }\n }\n\n /**\n * Save text track settings to localStorage\n */\n }, {\n key: \"saveSettings\",\n value: function saveSettings() {\n if (!this.options_.persistTextTrackSettings) {\n return;\n }\n var values = this.getValues();\n try {\n if (Object.keys(values).length) {\n window$1.localStorage.setItem(LOCAL_STORAGE_KEY$1, JSON.stringify(values));\n } else {\n window$1.localStorage.removeItem(LOCAL_STORAGE_KEY$1);\n }\n } catch (err) {\n log$1.warn(err);\n }\n }\n\n /**\n * Update display of text track settings\n */\n }, {\n key: \"updateDisplay\",\n value: function updateDisplay() {\n var ttDisplay = this.player_.getChild('textTrackDisplay');\n if (ttDisplay) {\n ttDisplay.updateDisplay();\n }\n }\n\n /**\n * conditionally blur the element and refocus the captions button\n *\n * @private\n */\n }, {\n key: \"conditionalBlur_\",\n value: function conditionalBlur_() {\n this.previouslyActiveEl_ = null;\n var cb = this.player_.controlBar;\n var subsCapsBtn = cb && cb.subsCapsButton;\n var ccBtn = cb && cb.captionsButton;\n if (subsCapsBtn) {\n subsCapsBtn.focus();\n } else if (ccBtn) {\n ccBtn.focus();\n }\n }\n\n /**\n * Repopulate dialog with new localizations on languagechange\n */\n }, {\n key: \"handleLanguagechange\",\n value: function handleLanguagechange() {\n this.fill();\n }\n }]);\n return TextTrackSettings;\n}(ModalDialog);\nComponent$1.registerComponent('TextTrackSettings', TextTrackSettings);\n\n/**\n * @file resize-manager.js\n */\n\n/**\n * A Resize Manager. It is in charge of triggering `playerresize` on the player in the right conditions.\n *\n * It'll either create an iframe and use a debounced resize handler on it or use the new {@link https://wicg.github.io/ResizeObserver/|ResizeObserver}.\n *\n * If the ResizeObserver is available natively, it will be used. A polyfill can be passed in as an option.\n * If a `playerresize` event is not needed, the ResizeManager component can be removed from the player, see the example below.\n *\n * @example <caption>How to disable the resize manager</caption>\n * const player = videojs('#vid', {\n * resizeManager: false\n * });\n *\n * @see {@link https://wicg.github.io/ResizeObserver/|ResizeObserver specification}\n *\n * @extends Component\n */\nvar ResizeManager = /*#__PURE__*/function (_Component$25) {\n _inherits(ResizeManager, _Component$25);\n var _super70 = _createSuper(ResizeManager);\n /**\n * Create the ResizeManager.\n *\n * @param {Object} player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of ResizeManager options.\n *\n * @param {Object} [options.ResizeObserver]\n * A polyfill for ResizeObserver can be passed in here.\n * If this is set to null it will ignore the native ResizeObserver and fall back to the iframe fallback.\n */\n function ResizeManager(player, options) {\n var _this95;\n _classCallCheck(this, ResizeManager);\n var RESIZE_OBSERVER_AVAILABLE = options.ResizeObserver || window$1.ResizeObserver;\n\n // if `null` was passed, we want to disable the ResizeObserver\n if (options.ResizeObserver === null) {\n RESIZE_OBSERVER_AVAILABLE = false;\n }\n\n // Only create an element when ResizeObserver isn't available\n var options_ = merge$1({\n createEl: !RESIZE_OBSERVER_AVAILABLE,\n reportTouchActivity: false\n }, options);\n _this95 = _super70.call(this, player, options_);\n _this95.ResizeObserver = options.ResizeObserver || window$1.ResizeObserver;\n _this95.loadListener_ = null;\n _this95.resizeObserver_ = null;\n _this95.debouncedHandler_ = debounce(function () {\n _this95.resizeHandler();\n }, 100, false, _assertThisInitialized(_this95));\n if (RESIZE_OBSERVER_AVAILABLE) {\n _this95.resizeObserver_ = new _this95.ResizeObserver(_this95.debouncedHandler_);\n _this95.resizeObserver_.observe(player.el());\n } else {\n _this95.loadListener_ = function () {\n if (!_this95.el_ || !_this95.el_.contentWindow) {\n return;\n }\n var debouncedHandler_ = _this95.debouncedHandler_;\n var unloadListener_ = _this95.unloadListener_ = function () {\n _off(this, 'resize', debouncedHandler_);\n _off(this, 'unload', unloadListener_);\n unloadListener_ = null;\n };\n\n // safari and edge can unload the iframe before resizemanager dispose\n // we have to dispose of event handlers correctly before that happens\n _on(_this95.el_.contentWindow, 'unload', unloadListener_);\n _on(_this95.el_.contentWindow, 'resize', debouncedHandler_);\n };\n _this95.one('load', _this95.loadListener_);\n }\n return _this95;\n }\n _createClass(ResizeManager, [{\n key: \"createEl\",\n value: function createEl() {\n return _get(_getPrototypeOf(ResizeManager.prototype), \"createEl\", this).call(this, 'iframe', {\n className: 'vjs-resize-manager',\n tabIndex: -1,\n title: this.localize('No content')\n }, {\n 'aria-hidden': 'true'\n });\n }\n\n /**\n * Called when a resize is triggered on the iframe or a resize is observed via the ResizeObserver\n *\n * @fires Player#playerresize\n */\n }, {\n key: \"resizeHandler\",\n value: function resizeHandler() {\n /**\n * Called when the player size has changed\n *\n * @event Player#playerresize\n * @type {Event}\n */\n // make sure player is still around to trigger\n // prevents this from causing an error after dispose\n if (!this.player_ || !this.player_.trigger) {\n return;\n }\n this.player_.trigger('playerresize');\n }\n }, {\n key: \"dispose\",\n value: function dispose() {\n if (this.debouncedHandler_) {\n this.debouncedHandler_.cancel();\n }\n if (this.resizeObserver_) {\n if (this.player_.el()) {\n this.resizeObserver_.unobserve(this.player_.el());\n }\n this.resizeObserver_.disconnect();\n }\n if (this.loadListener_) {\n this.off('load', this.loadListener_);\n }\n if (this.el_ && this.el_.contentWindow && this.unloadListener_) {\n this.unloadListener_.call(this.el_.contentWindow);\n }\n this.ResizeObserver = null;\n this.resizeObserver = null;\n this.debouncedHandler_ = null;\n this.loadListener_ = null;\n _get(_getPrototypeOf(ResizeManager.prototype), \"dispose\", this).call(this);\n }\n }]);\n return ResizeManager;\n}(Component$1);\nComponent$1.registerComponent('ResizeManager', ResizeManager);\nvar defaults = {\n trackingThreshold: 20,\n liveTolerance: 15\n};\n\n/*\n track when we are at the live edge, and other helpers for live playback */\n\n/**\n * A class for checking live current time and determining when the player\n * is at or behind the live edge.\n */\nvar LiveTracker = /*#__PURE__*/function (_Component$26) {\n _inherits(LiveTracker, _Component$26);\n var _super71 = _createSuper(LiveTracker);\n /**\n * Creates an instance of this class.\n *\n * @param { import('./player').default } player\n * The `Player` that this class should be attached to.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n *\n * @param {number} [options.trackingThreshold=20]\n * Number of seconds of live window (seekableEnd - seekableStart) that\n * media needs to have before the liveui will be shown.\n *\n * @param {number} [options.liveTolerance=15]\n * Number of seconds behind live that we have to be\n * before we will be considered non-live. Note that this will only\n * be used when playing at the live edge. This allows large seekable end\n * changes to not effect whether we are live or not.\n */\n function LiveTracker(player, options) {\n var _this96;\n _classCallCheck(this, LiveTracker);\n // LiveTracker does not need an element\n var options_ = merge$1(defaults, options, {\n createEl: false\n });\n _this96 = _super71.call(this, player, options_);\n _this96.trackLiveHandler_ = function () {\n return _this96.trackLive_();\n };\n _this96.handlePlay_ = function (e) {\n return _this96.handlePlay(e);\n };\n _this96.handleFirstTimeupdate_ = function (e) {\n return _this96.handleFirstTimeupdate(e);\n };\n _this96.handleSeeked_ = function (e) {\n return _this96.handleSeeked(e);\n };\n _this96.seekToLiveEdge_ = function (e) {\n return _this96.seekToLiveEdge(e);\n };\n _this96.reset_();\n _this96.on(_this96.player_, 'durationchange', function (e) {\n return _this96.handleDurationchange(e);\n });\n // we should try to toggle tracking on canplay as native playback engines, like Safari\n // may not have the proper values for things like seekableEnd until then\n _this96.on(_this96.player_, 'canplay', function () {\n return _this96.toggleTracking();\n });\n return _this96;\n }\n\n /**\n * all the functionality for tracking when seek end changes\n * and for tracking how far past seek end we should be\n */\n _createClass(LiveTracker, [{\n key: \"trackLive_\",\n value: function trackLive_() {\n var seekable = this.player_.seekable();\n\n // skip undefined seekable\n if (!seekable || !seekable.length) {\n return;\n }\n var newTime = Number(window$1.performance.now().toFixed(4));\n var deltaTime = this.lastTime_ === -1 ? 0 : (newTime - this.lastTime_) / 1000;\n this.lastTime_ = newTime;\n this.pastSeekEnd_ = this.pastSeekEnd() + deltaTime;\n var liveCurrentTime = this.liveCurrentTime();\n var currentTime = this.player_.currentTime();\n\n // we are behind live if any are true\n // 1. the player is paused\n // 2. the user seeked to a location 2 seconds away from live\n // 3. the difference between live and current time is greater\n // liveTolerance which defaults to 15s\n var isBehind = this.player_.paused() || this.seekedBehindLive_ || Math.abs(liveCurrentTime - currentTime) > this.options_.liveTolerance;\n\n // we cannot be behind if\n // 1. until we have not seen a timeupdate yet\n // 2. liveCurrentTime is Infinity, which happens on Android and Native Safari\n if (!this.timeupdateSeen_ || liveCurrentTime === Infinity) {\n isBehind = false;\n }\n if (isBehind !== this.behindLiveEdge_) {\n this.behindLiveEdge_ = isBehind;\n this.trigger('liveedgechange');\n }\n }\n\n /**\n * handle a durationchange event on the player\n * and start/stop tracking accordingly.\n */\n }, {\n key: \"handleDurationchange\",\n value: function handleDurationchange() {\n this.toggleTracking();\n }\n\n /**\n * start/stop tracking\n */\n }, {\n key: \"toggleTracking\",\n value: function toggleTracking() {\n if (this.player_.duration() === Infinity && this.liveWindow() >= this.options_.trackingThreshold) {\n if (this.player_.options_.liveui) {\n this.player_.addClass('vjs-liveui');\n }\n this.startTracking();\n } else {\n this.player_.removeClass('vjs-liveui');\n this.stopTracking();\n }\n }\n\n /**\n * start tracking live playback\n */\n }, {\n key: \"startTracking\",\n value: function startTracking() {\n if (this.isTracking()) {\n return;\n }\n\n // If we haven't seen a timeupdate, we need to check whether playback\n // began before this component started tracking. This can happen commonly\n // when using autoplay.\n if (!this.timeupdateSeen_) {\n this.timeupdateSeen_ = this.player_.hasStarted();\n }\n this.trackingInterval_ = this.setInterval(this.trackLiveHandler_, UPDATE_REFRESH_INTERVAL);\n this.trackLive_();\n this.on(this.player_, ['play', 'pause'], this.trackLiveHandler_);\n if (!this.timeupdateSeen_) {\n this.one(this.player_, 'play', this.handlePlay_);\n this.one(this.player_, 'timeupdate', this.handleFirstTimeupdate_);\n } else {\n this.on(this.player_, 'seeked', this.handleSeeked_);\n }\n }\n\n /**\n * handle the first timeupdate on the player if it wasn't already playing\n * when live tracker started tracking.\n */\n }, {\n key: \"handleFirstTimeupdate\",\n value: function handleFirstTimeupdate() {\n this.timeupdateSeen_ = true;\n this.on(this.player_, 'seeked', this.handleSeeked_);\n }\n\n /**\n * Keep track of what time a seek starts, and listen for seeked\n * to find where a seek ends.\n */\n }, {\n key: \"handleSeeked\",\n value: function handleSeeked() {\n var timeDiff = Math.abs(this.liveCurrentTime() - this.player_.currentTime());\n this.seekedBehindLive_ = this.nextSeekedFromUser_ && timeDiff > 2;\n this.nextSeekedFromUser_ = false;\n this.trackLive_();\n }\n\n /**\n * handle the first play on the player, and make sure that we seek\n * right to the live edge.\n */\n }, {\n key: \"handlePlay\",\n value: function handlePlay() {\n this.one(this.player_, 'timeupdate', this.seekToLiveEdge_);\n }\n\n /**\n * Stop tracking, and set all internal variables to\n * their initial value.\n */\n }, {\n key: \"reset_\",\n value: function reset_() {\n this.lastTime_ = -1;\n this.pastSeekEnd_ = 0;\n this.lastSeekEnd_ = -1;\n this.behindLiveEdge_ = true;\n this.timeupdateSeen_ = false;\n this.seekedBehindLive_ = false;\n this.nextSeekedFromUser_ = false;\n this.clearInterval(this.trackingInterval_);\n this.trackingInterval_ = null;\n this.off(this.player_, ['play', 'pause'], this.trackLiveHandler_);\n this.off(this.player_, 'seeked', this.handleSeeked_);\n this.off(this.player_, 'play', this.handlePlay_);\n this.off(this.player_, 'timeupdate', this.handleFirstTimeupdate_);\n this.off(this.player_, 'timeupdate', this.seekToLiveEdge_);\n }\n\n /**\n * The next seeked event is from the user. Meaning that any seek\n * > 2s behind live will be considered behind live for real and\n * liveTolerance will be ignored.\n */\n }, {\n key: \"nextSeekedFromUser\",\n value: function nextSeekedFromUser() {\n this.nextSeekedFromUser_ = true;\n }\n\n /**\n * stop tracking live playback\n */\n }, {\n key: \"stopTracking\",\n value: function stopTracking() {\n if (!this.isTracking()) {\n return;\n }\n this.reset_();\n this.trigger('liveedgechange');\n }\n\n /**\n * A helper to get the player seekable end\n * so that we don't have to null check everywhere\n *\n * @return {number}\n * The furthest seekable end or Infinity.\n */\n }, {\n key: \"seekableEnd\",\n value: function seekableEnd() {\n var seekable = this.player_.seekable();\n var seekableEnds = [];\n var i = seekable ? seekable.length : 0;\n while (i--) {\n seekableEnds.push(seekable.end(i));\n }\n\n // grab the furthest seekable end after sorting, or if there are none\n // default to Infinity\n return seekableEnds.length ? seekableEnds.sort()[seekableEnds.length - 1] : Infinity;\n }\n\n /**\n * A helper to get the player seekable start\n * so that we don't have to null check everywhere\n *\n * @return {number}\n * The earliest seekable start or 0.\n */\n }, {\n key: \"seekableStart\",\n value: function seekableStart() {\n var seekable = this.player_.seekable();\n var seekableStarts = [];\n var i = seekable ? seekable.length : 0;\n while (i--) {\n seekableStarts.push(seekable.start(i));\n }\n\n // grab the first seekable start after sorting, or if there are none\n // default to 0\n return seekableStarts.length ? seekableStarts.sort()[0] : 0;\n }\n\n /**\n * Get the live time window aka\n * the amount of time between seekable start and\n * live current time.\n *\n * @return {number}\n * The amount of seconds that are seekable in\n * the live video.\n */\n }, {\n key: \"liveWindow\",\n value: function liveWindow() {\n var liveCurrentTime = this.liveCurrentTime();\n\n // if liveCurrenTime is Infinity then we don't have a liveWindow at all\n if (liveCurrentTime === Infinity) {\n return 0;\n }\n return liveCurrentTime - this.seekableStart();\n }\n\n /**\n * Determines if the player is live, only checks if this component\n * is tracking live playback or not\n *\n * @return {boolean}\n * Whether liveTracker is tracking\n */\n }, {\n key: \"isLive\",\n value: function isLive() {\n return this.isTracking();\n }\n\n /**\n * Determines if currentTime is at the live edge and won't fall behind\n * on each seekableendchange\n *\n * @return {boolean}\n * Whether playback is at the live edge\n */\n }, {\n key: \"atLiveEdge\",\n value: function atLiveEdge() {\n return !this.behindLiveEdge();\n }\n\n /**\n * get what we expect the live current time to be\n *\n * @return {number}\n * The expected live current time\n */\n }, {\n key: \"liveCurrentTime\",\n value: function liveCurrentTime() {\n return this.pastSeekEnd() + this.seekableEnd();\n }\n\n /**\n * The number of seconds that have occurred after seekable end\n * changed. This will be reset to 0 once seekable end changes.\n *\n * @return {number}\n * Seconds past the current seekable end\n */\n }, {\n key: \"pastSeekEnd\",\n value: function pastSeekEnd() {\n var seekableEnd = this.seekableEnd();\n if (this.lastSeekEnd_ !== -1 && seekableEnd !== this.lastSeekEnd_) {\n this.pastSeekEnd_ = 0;\n }\n this.lastSeekEnd_ = seekableEnd;\n return this.pastSeekEnd_;\n }\n\n /**\n * If we are currently behind the live edge, aka currentTime will be\n * behind on a seekableendchange\n *\n * @return {boolean}\n * If we are behind the live edge\n */\n }, {\n key: \"behindLiveEdge\",\n value: function behindLiveEdge() {\n return this.behindLiveEdge_;\n }\n\n /**\n * Whether live tracker is currently tracking or not.\n */\n }, {\n key: \"isTracking\",\n value: function isTracking() {\n return typeof this.trackingInterval_ === 'number';\n }\n\n /**\n * Seek to the live edge if we are behind the live edge\n */\n }, {\n key: \"seekToLiveEdge\",\n value: function seekToLiveEdge() {\n this.seekedBehindLive_ = false;\n if (this.atLiveEdge()) {\n return;\n }\n this.nextSeekedFromUser_ = false;\n this.player_.currentTime(this.liveCurrentTime());\n }\n\n /**\n * Dispose of liveTracker\n */\n }, {\n key: \"dispose\",\n value: function dispose() {\n this.stopTracking();\n _get(_getPrototypeOf(LiveTracker.prototype), \"dispose\", this).call(this);\n }\n }]);\n return LiveTracker;\n}(Component$1);\nComponent$1.registerComponent('LiveTracker', LiveTracker);\n\n/**\n * Displays an element over the player which contains an optional title and\n * description for the current content.\n *\n * Much of the code for this component originated in the now obsolete\n * videojs-dock plugin: https://github.com/brightcove/videojs-dock/\n *\n * @extends Component\n */\nvar TitleBar = /*#__PURE__*/function (_Component$27) {\n _inherits(TitleBar, _Component$27);\n var _super72 = _createSuper(TitleBar);\n function TitleBar(player, options) {\n var _this97;\n _classCallCheck(this, TitleBar);\n _this97 = _super72.call(this, player, options);\n _this97.on('statechanged', function (e) {\n return _this97.updateDom_();\n });\n _this97.updateDom_();\n return _this97;\n }\n\n /**\n * Create the `TitleBar`'s DOM element\n *\n * @return {Element}\n * The element that was created.\n */\n _createClass(TitleBar, [{\n key: \"createEl\",\n value: function createEl() {\n this.els = {\n title: _createEl('div', {\n className: 'vjs-title-bar-title',\n id: \"vjs-title-bar-title-\".concat(newGUID())\n }),\n description: _createEl('div', {\n className: 'vjs-title-bar-description',\n id: \"vjs-title-bar-description-\".concat(newGUID())\n })\n };\n return _createEl('div', {\n className: 'vjs-title-bar'\n }, {}, values(this.els));\n }\n\n /**\n * Updates the DOM based on the component's state object.\n */\n }, {\n key: \"updateDom_\",\n value: function updateDom_() {\n var _this98 = this;\n var tech = this.player_.tech_;\n var techEl = tech && tech.el_;\n var techAriaAttrs = {\n title: 'aria-labelledby',\n description: 'aria-describedby'\n };\n ['title', 'description'].forEach(function (k) {\n var value = _this98.state[k];\n var el = _this98.els[k];\n var techAriaAttr = techAriaAttrs[k];\n emptyEl(el);\n if (value) {\n textContent(el, value);\n }\n\n // If there is a tech element available, update its ARIA attributes\n // according to whether a title and/or description have been provided.\n if (techEl) {\n techEl.removeAttribute(techAriaAttr);\n if (value) {\n techEl.setAttribute(techAriaAttr, el.id);\n }\n }\n });\n if (this.state.title || this.state.description) {\n this.show();\n } else {\n this.hide();\n }\n }\n\n /**\n * Update the contents of the title bar component with new title and\n * description text.\n *\n * If both title and description are missing, the title bar will be hidden.\n *\n * If either title or description are present, the title bar will be visible.\n *\n * NOTE: Any previously set value will be preserved. To unset a previously\n * set value, you must pass an empty string or null.\n *\n * For example:\n *\n * ```\n * update({title: 'foo', description: 'bar'}) // title: 'foo', description: 'bar'\n * update({description: 'bar2'}) // title: 'foo', description: 'bar2'\n * update({title: ''}) // title: '', description: 'bar2'\n * update({title: 'foo', description: null}) // title: 'foo', description: null\n * ```\n *\n * @param {Object} [options={}]\n * An options object. When empty, the title bar will be hidden.\n *\n * @param {string} [options.title]\n * A title to display in the title bar.\n *\n * @param {string} [options.description]\n * A description to display in the title bar.\n */\n }, {\n key: \"update\",\n value: function update(options) {\n this.setState(options);\n }\n\n /**\n * Dispose the component.\n */\n }, {\n key: \"dispose\",\n value: function dispose() {\n var tech = this.player_.tech_;\n var techEl = tech && tech.el_;\n if (techEl) {\n techEl.removeAttribute('aria-labelledby');\n techEl.removeAttribute('aria-describedby');\n }\n _get(_getPrototypeOf(TitleBar.prototype), \"dispose\", this).call(this);\n this.els = null;\n }\n }]);\n return TitleBar;\n}(Component$1);\nComponent$1.registerComponent('TitleBar', TitleBar);\n\n/**\n * This function is used to fire a sourceset when there is something\n * similar to `mediaEl.load()` being called. It will try to find the source via\n * the `src` attribute and then the `<source>` elements. It will then fire `sourceset`\n * with the source that was found or empty string if we cannot know. If it cannot\n * find a source then `sourceset` will not be fired.\n *\n * @param { import('./html5').default } tech\n * The tech object that sourceset was setup on\n *\n * @return {boolean}\n * returns false if the sourceset was not fired and true otherwise.\n */\nvar sourcesetLoad = function sourcesetLoad(tech) {\n var el = tech.el();\n\n // if `el.src` is set, that source will be loaded.\n if (el.hasAttribute('src')) {\n tech.triggerSourceset(el.src);\n return true;\n }\n\n /**\n * Since there isn't a src property on the media element, source elements will be used for\n * implementing the source selection algorithm. This happens asynchronously and\n * for most cases were there is more than one source we cannot tell what source will\n * be loaded, without re-implementing the source selection algorithm. At this time we are not\n * going to do that. There are three special cases that we do handle here though:\n *\n * 1. If there are no sources, do not fire `sourceset`.\n * 2. If there is only one `<source>` with a `src` property/attribute that is our `src`\n * 3. If there is more than one `<source>` but all of them have the same `src` url.\n * That will be our src.\n */\n var sources = tech.$$('source');\n var srcUrls = [];\n var src = '';\n\n // if there are no sources, do not fire sourceset\n if (!sources.length) {\n return false;\n }\n\n // only count valid/non-duplicate source elements\n for (var _i53 = 0; _i53 < sources.length; _i53++) {\n var url = sources[_i53].src;\n if (url && srcUrls.indexOf(url) === -1) {\n srcUrls.push(url);\n }\n }\n\n // there were no valid sources\n if (!srcUrls.length) {\n return false;\n }\n\n // there is only one valid source element url\n // use that\n if (srcUrls.length === 1) {\n src = srcUrls[0];\n }\n tech.triggerSourceset(src);\n return true;\n};\n\n/**\n * our implementation of an `innerHTML` descriptor for browsers\n * that do not have one.\n */\nvar innerHTMLDescriptorPolyfill = Object.defineProperty({}, 'innerHTML', {\n get: function get() {\n return this.cloneNode(true).innerHTML;\n },\n set: function set(v) {\n // make a dummy node to use innerHTML on\n var dummy = document.createElement(this.nodeName.toLowerCase());\n\n // set innerHTML to the value provided\n dummy.innerHTML = v;\n\n // make a document fragment to hold the nodes from dummy\n var docFrag = document.createDocumentFragment();\n\n // copy all of the nodes created by the innerHTML on dummy\n // to the document fragment\n while (dummy.childNodes.length) {\n docFrag.appendChild(dummy.childNodes[0]);\n }\n\n // remove content\n this.innerText = '';\n\n // now we add all of that html in one by appending the\n // document fragment. This is how innerHTML does it.\n window$1.Element.prototype.appendChild.call(this, docFrag);\n\n // then return the result that innerHTML's setter would\n return this.innerHTML;\n }\n});\n\n/**\n * Get a property descriptor given a list of priorities and the\n * property to get.\n */\nvar getDescriptor = function getDescriptor(priority, prop) {\n var descriptor = {};\n for (var _i54 = 0; _i54 < priority.length; _i54++) {\n descriptor = Object.getOwnPropertyDescriptor(priority[_i54], prop);\n if (descriptor && descriptor.set && descriptor.get) {\n break;\n }\n }\n descriptor.enumerable = true;\n descriptor.configurable = true;\n return descriptor;\n};\nvar getInnerHTMLDescriptor = function getInnerHTMLDescriptor(tech) {\n return getDescriptor([tech.el(), window$1.HTMLMediaElement.prototype, window$1.Element.prototype, innerHTMLDescriptorPolyfill], 'innerHTML');\n};\n\n/**\n * Patches browser internal functions so that we can tell synchronously\n * if a `<source>` was appended to the media element. For some reason this\n * causes a `sourceset` if the the media element is ready and has no source.\n * This happens when:\n * - The page has just loaded and the media element does not have a source.\n * - The media element was emptied of all sources, then `load()` was called.\n *\n * It does this by patching the following functions/properties when they are supported:\n *\n * - `append()` - can be used to add a `<source>` element to the media element\n * - `appendChild()` - can be used to add a `<source>` element to the media element\n * - `insertAdjacentHTML()` - can be used to add a `<source>` element to the media element\n * - `innerHTML` - can be used to add a `<source>` element to the media element\n *\n * @param {Html5} tech\n * The tech object that sourceset is being setup on.\n */\nvar firstSourceWatch = function firstSourceWatch(tech) {\n var el = tech.el();\n\n // make sure firstSourceWatch isn't setup twice.\n if (el.resetSourceWatch_) {\n return;\n }\n var old = {};\n var innerDescriptor = getInnerHTMLDescriptor(tech);\n var appendWrapper = function appendWrapper(appendFn) {\n return function () {\n for (var _len19 = arguments.length, args = new Array(_len19), _key19 = 0; _key19 < _len19; _key19++) {\n args[_key19] = arguments[_key19];\n }\n var retval = appendFn.apply(el, args);\n sourcesetLoad(tech);\n return retval;\n };\n };\n ['append', 'appendChild', 'insertAdjacentHTML'].forEach(function (k) {\n if (!el[k]) {\n return;\n }\n\n // store the old function\n old[k] = el[k];\n\n // call the old function with a sourceset if a source\n // was loaded\n el[k] = appendWrapper(old[k]);\n });\n Object.defineProperty(el, 'innerHTML', merge$1(innerDescriptor, {\n set: appendWrapper(innerDescriptor.set)\n }));\n el.resetSourceWatch_ = function () {\n el.resetSourceWatch_ = null;\n Object.keys(old).forEach(function (k) {\n el[k] = old[k];\n });\n Object.defineProperty(el, 'innerHTML', innerDescriptor);\n };\n\n // on the first sourceset, we need to revert our changes\n tech.one('sourceset', el.resetSourceWatch_);\n};\n\n/**\n * our implementation of a `src` descriptor for browsers\n * that do not have one\n */\nvar srcDescriptorPolyfill = Object.defineProperty({}, 'src', {\n get: function get() {\n if (this.hasAttribute('src')) {\n return getAbsoluteURL(window$1.Element.prototype.getAttribute.call(this, 'src'));\n }\n return '';\n },\n set: function set(v) {\n window$1.Element.prototype.setAttribute.call(this, 'src', v);\n return v;\n }\n});\nvar getSrcDescriptor = function getSrcDescriptor(tech) {\n return getDescriptor([tech.el(), window$1.HTMLMediaElement.prototype, srcDescriptorPolyfill], 'src');\n};\n\n/**\n * setup `sourceset` handling on the `Html5` tech. This function\n * patches the following element properties/functions:\n *\n * - `src` - to determine when `src` is set\n * - `setAttribute()` - to determine when `src` is set\n * - `load()` - this re-triggers the source selection algorithm, and can\n * cause a sourceset.\n *\n * If there is no source when we are adding `sourceset` support or during a `load()`\n * we also patch the functions listed in `firstSourceWatch`.\n *\n * @param {Html5} tech\n * The tech to patch\n */\nvar setupSourceset = function setupSourceset(tech) {\n if (!tech.featuresSourceset) {\n return;\n }\n var el = tech.el();\n\n // make sure sourceset isn't setup twice.\n if (el.resetSourceset_) {\n return;\n }\n var srcDescriptor = getSrcDescriptor(tech);\n var oldSetAttribute = el.setAttribute;\n var oldLoad = el.load;\n Object.defineProperty(el, 'src', merge$1(srcDescriptor, {\n set: function set(v) {\n var retval = srcDescriptor.set.call(el, v);\n\n // we use the getter here to get the actual value set on src\n tech.triggerSourceset(el.src);\n return retval;\n }\n }));\n el.setAttribute = function (n, v) {\n var retval = oldSetAttribute.call(el, n, v);\n if (/src/i.test(n)) {\n tech.triggerSourceset(el.src);\n }\n return retval;\n };\n el.load = function () {\n var retval = oldLoad.call(el);\n\n // if load was called, but there was no source to fire\n // sourceset on. We have to watch for a source append\n // as that can trigger a `sourceset` when the media element\n // has no source\n if (!sourcesetLoad(tech)) {\n tech.triggerSourceset('');\n firstSourceWatch(tech);\n }\n return retval;\n };\n if (el.currentSrc) {\n tech.triggerSourceset(el.currentSrc);\n } else if (!sourcesetLoad(tech)) {\n firstSourceWatch(tech);\n }\n el.resetSourceset_ = function () {\n el.resetSourceset_ = null;\n el.load = oldLoad;\n el.setAttribute = oldSetAttribute;\n Object.defineProperty(el, 'src', srcDescriptor);\n if (el.resetSourceWatch_) {\n el.resetSourceWatch_();\n }\n };\n};\n\n/**\n * @file html5.js\n */\n\n/**\n * HTML5 Media Controller - Wrapper for HTML5 Media API\n *\n * @mixes Tech~SourceHandlerAdditions\n * @extends Tech\n */\nvar Html5 = /*#__PURE__*/function (_Tech3) {\n _inherits(Html5, _Tech3);\n var _super73 = _createSuper(Html5);\n /**\n * Create an instance of this Tech.\n *\n * @param {Object} [options]\n * The key/value store of player options.\n *\n * @param {Function} [ready]\n * Callback function to call when the `HTML5` Tech is ready.\n */\n function Html5(options, ready) {\n var _this99;\n _classCallCheck(this, Html5);\n _this99 = _super73.call(this, options, ready);\n var source = options.source;\n var crossoriginTracks = false;\n _this99.featuresVideoFrameCallback = _this99.featuresVideoFrameCallback && _this99.el_.tagName === 'VIDEO';\n\n // Set the source if one is provided\n // 1) Check if the source is new (if not, we want to keep the original so playback isn't interrupted)\n // 2) Check to see if the network state of the tag was failed at init, and if so, reset the source\n // anyway so the error gets fired.\n if (source && (_this99.el_.currentSrc !== source.src || options.tag && options.tag.initNetworkState_ === 3)) {\n _this99.setSource(source);\n } else {\n _this99.handleLateInit_(_this99.el_);\n }\n\n // setup sourceset after late sourceset/init\n if (options.enableSourceset) {\n _this99.setupSourcesetHandling_();\n }\n _this99.isScrubbing_ = false;\n if (_this99.el_.hasChildNodes()) {\n var nodes = _this99.el_.childNodes;\n var nodesLength = nodes.length;\n var removeNodes = [];\n while (nodesLength--) {\n var node = nodes[nodesLength];\n var nodeName = node.nodeName.toLowerCase();\n if (nodeName === 'track') {\n if (!_this99.featuresNativeTextTracks) {\n // Empty video tag tracks so the built-in player doesn't use them also.\n // This may not be fast enough to stop HTML5 browsers from reading the tags\n // so we'll need to turn off any default tracks if we're manually doing\n // captions and subtitles. videoElement.textTracks\n removeNodes.push(node);\n } else {\n // store HTMLTrackElement and TextTrack to remote list\n _this99.remoteTextTrackEls().addTrackElement_(node);\n _this99.remoteTextTracks().addTrack(node.track);\n _this99.textTracks().addTrack(node.track);\n if (!crossoriginTracks && !_this99.el_.hasAttribute('crossorigin') && isCrossOrigin(node.src)) {\n crossoriginTracks = true;\n }\n }\n }\n }\n for (var _i55 = 0; _i55 < removeNodes.length; _i55++) {\n _this99.el_.removeChild(removeNodes[_i55]);\n }\n }\n _this99.proxyNativeTracks_();\n if (_this99.featuresNativeTextTracks && crossoriginTracks) {\n log$1.warn('Text Tracks are being loaded from another origin but the crossorigin attribute isn\\'t used.\\n' + 'This may prevent text tracks from loading.');\n }\n\n // prevent iOS Safari from disabling metadata text tracks during native playback\n _this99.restoreMetadataTracksInIOSNativePlayer_();\n\n // Determine if native controls should be used\n // Our goal should be to get the custom controls on mobile solid everywhere\n // so we can remove this all together. Right now this will block custom\n // controls on touch enabled laptops like the Chrome Pixel\n if ((TOUCH_ENABLED || IS_IPHONE) && options.nativeControlsForTouch === true) {\n _this99.setControls(true);\n }\n\n // on iOS, we want to proxy `webkitbeginfullscreen` and `webkitendfullscreen`\n // into a `fullscreenchange` event\n _this99.proxyWebkitFullscreen_();\n _this99.triggerReady();\n return _this99;\n }\n\n /**\n * Dispose of `HTML5` media element and remove all tracks.\n */\n _createClass(Html5, [{\n key: \"dispose\",\n value: function dispose() {\n if (this.el_ && this.el_.resetSourceset_) {\n this.el_.resetSourceset_();\n }\n Html5.disposeMediaElement(this.el_);\n this.options_ = null;\n\n // tech will handle clearing of the emulated track list\n _get(_getPrototypeOf(Html5.prototype), \"dispose\", this).call(this);\n }\n\n /**\n * Modify the media element so that we can detect when\n * the source is changed. Fires `sourceset` just after the source has changed\n */\n }, {\n key: \"setupSourcesetHandling_\",\n value: function setupSourcesetHandling_() {\n setupSourceset(this);\n }\n\n /**\n * When a captions track is enabled in the iOS Safari native player, all other\n * tracks are disabled (including metadata tracks), which nulls all of their\n * associated cue points. This will restore metadata tracks to their pre-fullscreen\n * state in those cases so that cue points are not needlessly lost.\n *\n * @private\n */\n }, {\n key: \"restoreMetadataTracksInIOSNativePlayer_\",\n value: function restoreMetadataTracksInIOSNativePlayer_() {\n var textTracks = this.textTracks();\n var metadataTracksPreFullscreenState;\n\n // captures a snapshot of every metadata track's current state\n var takeMetadataTrackSnapshot = function takeMetadataTrackSnapshot() {\n metadataTracksPreFullscreenState = [];\n for (var _i56 = 0; _i56 < textTracks.length; _i56++) {\n var track = textTracks[_i56];\n if (track.kind === 'metadata') {\n metadataTracksPreFullscreenState.push({\n track: track,\n storedMode: track.mode\n });\n }\n }\n };\n\n // snapshot each metadata track's initial state, and update the snapshot\n // each time there is a track 'change' event\n takeMetadataTrackSnapshot();\n textTracks.addEventListener('change', takeMetadataTrackSnapshot);\n this.on('dispose', function () {\n return textTracks.removeEventListener('change', takeMetadataTrackSnapshot);\n });\n var restoreTrackMode = function restoreTrackMode() {\n for (var _i57 = 0; _i57 < metadataTracksPreFullscreenState.length; _i57++) {\n var storedTrack = metadataTracksPreFullscreenState[_i57];\n if (storedTrack.track.mode === 'disabled' && storedTrack.track.mode !== storedTrack.storedMode) {\n storedTrack.track.mode = storedTrack.storedMode;\n }\n }\n // we only want this handler to be executed on the first 'change' event\n textTracks.removeEventListener('change', restoreTrackMode);\n };\n\n // when we enter fullscreen playback, stop updating the snapshot and\n // restore all track modes to their pre-fullscreen state\n this.on('webkitbeginfullscreen', function () {\n textTracks.removeEventListener('change', takeMetadataTrackSnapshot);\n\n // remove the listener before adding it just in case it wasn't previously removed\n textTracks.removeEventListener('change', restoreTrackMode);\n textTracks.addEventListener('change', restoreTrackMode);\n });\n\n // start updating the snapshot again after leaving fullscreen\n this.on('webkitendfullscreen', function () {\n // remove the listener before adding it just in case it wasn't previously removed\n textTracks.removeEventListener('change', takeMetadataTrackSnapshot);\n textTracks.addEventListener('change', takeMetadataTrackSnapshot);\n\n // remove the restoreTrackMode handler in case it wasn't triggered during fullscreen playback\n textTracks.removeEventListener('change', restoreTrackMode);\n });\n }\n\n /**\n * Attempt to force override of tracks for the given type\n *\n * @param {string} type - Track type to override, possible values include 'Audio',\n * 'Video', and 'Text'.\n * @param {boolean} override - If set to true native audio/video will be overridden,\n * otherwise native audio/video will potentially be used.\n * @private\n */\n }, {\n key: \"overrideNative_\",\n value: function overrideNative_(type, override) {\n var _this100 = this;\n // If there is no behavioral change don't add/remove listeners\n if (override !== this[\"featuresNative\".concat(type, \"Tracks\")]) {\n return;\n }\n var lowerCaseType = type.toLowerCase();\n if (this[\"\".concat(lowerCaseType, \"TracksListeners_\")]) {\n Object.keys(this[\"\".concat(lowerCaseType, \"TracksListeners_\")]).forEach(function (eventName) {\n var elTracks = _this100.el()[\"\".concat(lowerCaseType, \"Tracks\")];\n elTracks.removeEventListener(eventName, _this100[\"\".concat(lowerCaseType, \"TracksListeners_\")][eventName]);\n });\n }\n this[\"featuresNative\".concat(type, \"Tracks\")] = !override;\n this[\"\".concat(lowerCaseType, \"TracksListeners_\")] = null;\n this.proxyNativeTracksForType_(lowerCaseType);\n }\n\n /**\n * Attempt to force override of native audio tracks.\n *\n * @param {boolean} override - If set to true native audio will be overridden,\n * otherwise native audio will potentially be used.\n */\n }, {\n key: \"overrideNativeAudioTracks\",\n value: function overrideNativeAudioTracks(override) {\n this.overrideNative_('Audio', override);\n }\n\n /**\n * Attempt to force override of native video tracks.\n *\n * @param {boolean} override - If set to true native video will be overridden,\n * otherwise native video will potentially be used.\n */\n }, {\n key: \"overrideNativeVideoTracks\",\n value: function overrideNativeVideoTracks(override) {\n this.overrideNative_('Video', override);\n }\n\n /**\n * Proxy native track list events for the given type to our track\n * lists if the browser we are playing in supports that type of track list.\n *\n * @param {string} name - Track type; values include 'audio', 'video', and 'text'\n * @private\n */\n }, {\n key: \"proxyNativeTracksForType_\",\n value: function proxyNativeTracksForType_(name) {\n var _this101 = this;\n var props = NORMAL[name];\n var elTracks = this.el()[props.getterName];\n var techTracks = this[props.getterName]();\n if (!this[\"featuresNative\".concat(props.capitalName, \"Tracks\")] || !elTracks || !elTracks.addEventListener) {\n return;\n }\n var listeners = {\n change: function change(e) {\n var event = {\n type: 'change',\n target: techTracks,\n currentTarget: techTracks,\n srcElement: techTracks\n };\n techTracks.trigger(event);\n\n // if we are a text track change event, we should also notify the\n // remote text track list. This can potentially cause a false positive\n // if we were to get a change event on a non-remote track and\n // we triggered the event on the remote text track list which doesn't\n // contain that track. However, best practices mean looping through the\n // list of tracks and searching for the appropriate mode value, so,\n // this shouldn't pose an issue\n if (name === 'text') {\n _this101[REMOTE.remoteText.getterName]().trigger(event);\n }\n },\n addtrack: function addtrack(e) {\n techTracks.addTrack(e.track);\n },\n removetrack: function removetrack(e) {\n techTracks.removeTrack(e.track);\n }\n };\n var removeOldTracks = function removeOldTracks() {\n var removeTracks = [];\n for (var _i58 = 0; _i58 < techTracks.length; _i58++) {\n var found = false;\n for (var j = 0; j < elTracks.length; j++) {\n if (elTracks[j] === techTracks[_i58]) {\n found = true;\n break;\n }\n }\n if (!found) {\n removeTracks.push(techTracks[_i58]);\n }\n }\n while (removeTracks.length) {\n techTracks.removeTrack(removeTracks.shift());\n }\n };\n this[props.getterName + 'Listeners_'] = listeners;\n Object.keys(listeners).forEach(function (eventName) {\n var listener = listeners[eventName];\n elTracks.addEventListener(eventName, listener);\n _this101.on('dispose', function (e) {\n return elTracks.removeEventListener(eventName, listener);\n });\n });\n\n // Remove (native) tracks that are not used anymore\n this.on('loadstart', removeOldTracks);\n this.on('dispose', function (e) {\n return _this101.off('loadstart', removeOldTracks);\n });\n }\n\n /**\n * Proxy all native track list events to our track lists if the browser we are playing\n * in supports that type of track list.\n *\n * @private\n */\n }, {\n key: \"proxyNativeTracks_\",\n value: function proxyNativeTracks_() {\n var _this102 = this;\n NORMAL.names.forEach(function (name) {\n _this102.proxyNativeTracksForType_(name);\n });\n }\n\n /**\n * Create the `Html5` Tech's DOM element.\n *\n * @return {Element}\n * The element that gets created.\n */\n }, {\n key: \"createEl\",\n value: function createEl() {\n var el = this.options_.tag;\n\n // Check if this browser supports moving the element into the box.\n // On the iPhone video will break if you move the element,\n // So we have to create a brand new element.\n // If we ingested the player div, we do not need to move the media element.\n if (!el || !(this.options_.playerElIngest || this.movingMediaElementInDOM)) {\n // If the original tag is still there, clone and remove it.\n if (el) {\n var clone = el.cloneNode(true);\n if (el.parentNode) {\n el.parentNode.insertBefore(clone, el);\n }\n Html5.disposeMediaElement(el);\n el = clone;\n } else {\n el = document.createElement('video');\n\n // determine if native controls should be used\n var tagAttributes = this.options_.tag && getAttributes(this.options_.tag);\n var attributes = merge$1({}, tagAttributes);\n if (!TOUCH_ENABLED || this.options_.nativeControlsForTouch !== true) {\n delete attributes.controls;\n }\n setAttributes(el, Object.assign(attributes, {\n id: this.options_.techId,\n \"class\": 'vjs-tech'\n }));\n }\n el.playerId = this.options_.playerId;\n }\n if (typeof this.options_.preload !== 'undefined') {\n _setAttribute(el, 'preload', this.options_.preload);\n }\n if (this.options_.disablePictureInPicture !== undefined) {\n el.disablePictureInPicture = this.options_.disablePictureInPicture;\n }\n\n // Update specific tag settings, in case they were overridden\n // `autoplay` has to be *last* so that `muted` and `playsinline` are present\n // when iOS/Safari or other browsers attempt to autoplay.\n var settingsAttrs = ['loop', 'muted', 'playsinline', 'autoplay'];\n for (var _i59 = 0; _i59 < settingsAttrs.length; _i59++) {\n var attr = settingsAttrs[_i59];\n var value = this.options_[attr];\n if (typeof value !== 'undefined') {\n if (value) {\n _setAttribute(el, attr, attr);\n } else {\n _removeAttribute(el, attr);\n }\n el[attr] = value;\n }\n }\n return el;\n }\n\n /**\n * This will be triggered if the loadstart event has already fired, before videojs was\n * ready. Two known examples of when this can happen are:\n * 1. If we're loading the playback object after it has started loading\n * 2. The media is already playing the (often with autoplay on) then\n *\n * This function will fire another loadstart so that videojs can catchup.\n *\n * @fires Tech#loadstart\n *\n * @return {undefined}\n * returns nothing.\n */\n }, {\n key: \"handleLateInit_\",\n value: function handleLateInit_(el) {\n if (el.networkState === 0 || el.networkState === 3) {\n // The video element hasn't started loading the source yet\n // or didn't find a source\n return;\n }\n if (el.readyState === 0) {\n // NetworkState is set synchronously BUT loadstart is fired at the\n // end of the current stack, usually before setInterval(fn, 0).\n // So at this point we know loadstart may have already fired or is\n // about to fire, and either way the player hasn't seen it yet.\n // We don't want to fire loadstart prematurely here and cause a\n // double loadstart so we'll wait and see if it happens between now\n // and the next loop, and fire it if not.\n // HOWEVER, we also want to make sure it fires before loadedmetadata\n // which could also happen between now and the next loop, so we'll\n // watch for that also.\n var loadstartFired = false;\n var setLoadstartFired = function setLoadstartFired() {\n loadstartFired = true;\n };\n this.on('loadstart', setLoadstartFired);\n var triggerLoadstart = function triggerLoadstart() {\n // We did miss the original loadstart. Make sure the player\n // sees loadstart before loadedmetadata\n if (!loadstartFired) {\n this.trigger('loadstart');\n }\n };\n this.on('loadedmetadata', triggerLoadstart);\n this.ready(function () {\n this.off('loadstart', setLoadstartFired);\n this.off('loadedmetadata', triggerLoadstart);\n if (!loadstartFired) {\n // We did miss the original native loadstart. Fire it now.\n this.trigger('loadstart');\n }\n });\n return;\n }\n\n // From here on we know that loadstart already fired and we missed it.\n // The other readyState events aren't as much of a problem if we double\n // them, so not going to go to as much trouble as loadstart to prevent\n // that unless we find reason to.\n var eventsToTrigger = ['loadstart'];\n\n // loadedmetadata: newly equal to HAVE_METADATA (1) or greater\n eventsToTrigger.push('loadedmetadata');\n\n // loadeddata: newly increased to HAVE_CURRENT_DATA (2) or greater\n if (el.readyState >= 2) {\n eventsToTrigger.push('loadeddata');\n }\n\n // canplay: newly increased to HAVE_FUTURE_DATA (3) or greater\n if (el.readyState >= 3) {\n eventsToTrigger.push('canplay');\n }\n\n // canplaythrough: newly equal to HAVE_ENOUGH_DATA (4)\n if (el.readyState >= 4) {\n eventsToTrigger.push('canplaythrough');\n }\n\n // We still need to give the player time to add event listeners\n this.ready(function () {\n eventsToTrigger.forEach(function (type) {\n this.trigger(type);\n }, this);\n });\n }\n\n /**\n * Set whether we are scrubbing or not.\n * This is used to decide whether we should use `fastSeek` or not.\n * `fastSeek` is used to provide trick play on Safari browsers.\n *\n * @param {boolean} isScrubbing\n * - true for we are currently scrubbing\n * - false for we are no longer scrubbing\n */\n }, {\n key: \"setScrubbing\",\n value: function setScrubbing(isScrubbing) {\n this.isScrubbing_ = isScrubbing;\n }\n\n /**\n * Get whether we are scrubbing or not.\n *\n * @return {boolean} isScrubbing\n * - true for we are currently scrubbing\n * - false for we are no longer scrubbing\n */\n }, {\n key: \"scrubbing\",\n value: function scrubbing() {\n return this.isScrubbing_;\n }\n\n /**\n * Set current time for the `HTML5` tech.\n *\n * @param {number} seconds\n * Set the current time of the media to this.\n */\n }, {\n key: \"setCurrentTime\",\n value: function setCurrentTime(seconds) {\n try {\n if (this.isScrubbing_ && this.el_.fastSeek && IS_ANY_SAFARI) {\n this.el_.fastSeek(seconds);\n } else {\n this.el_.currentTime = seconds;\n }\n } catch (e) {\n log$1(e, 'Video is not ready. (Video.js)');\n // this.warning(VideoJS.warnings.videoNotReady);\n }\n }\n\n /**\n * Get the current duration of the HTML5 media element.\n *\n * @return {number}\n * The duration of the media or 0 if there is no duration.\n */\n }, {\n key: \"duration\",\n value: function duration() {\n var _this103 = this;\n // Android Chrome will report duration as Infinity for VOD HLS until after\n // playback has started, which triggers the live display erroneously.\n // Return NaN if playback has not started and trigger a durationupdate once\n // the duration can be reliably known.\n if (this.el_.duration === Infinity && IS_ANDROID && IS_CHROME && this.el_.currentTime === 0) {\n // Wait for the first `timeupdate` with currentTime > 0 - there may be\n // several with 0\n var checkProgress = function checkProgress() {\n if (_this103.el_.currentTime > 0) {\n // Trigger durationchange for genuinely live video\n if (_this103.el_.duration === Infinity) {\n _this103.trigger('durationchange');\n }\n _this103.off('timeupdate', checkProgress);\n }\n };\n this.on('timeupdate', checkProgress);\n return NaN;\n }\n return this.el_.duration || NaN;\n }\n\n /**\n * Get the current width of the HTML5 media element.\n *\n * @return {number}\n * The width of the HTML5 media element.\n */\n }, {\n key: \"width\",\n value: function width() {\n return this.el_.offsetWidth;\n }\n\n /**\n * Get the current height of the HTML5 media element.\n *\n * @return {number}\n * The height of the HTML5 media element.\n */\n }, {\n key: \"height\",\n value: function height() {\n return this.el_.offsetHeight;\n }\n\n /**\n * Proxy iOS `webkitbeginfullscreen` and `webkitendfullscreen` into\n * `fullscreenchange` event.\n *\n * @private\n * @fires fullscreenchange\n * @listens webkitendfullscreen\n * @listens webkitbeginfullscreen\n * @listens webkitbeginfullscreen\n */\n }, {\n key: \"proxyWebkitFullscreen_\",\n value: function proxyWebkitFullscreen_() {\n var _this104 = this;\n if (!('webkitDisplayingFullscreen' in this.el_)) {\n return;\n }\n var endFn = function endFn() {\n this.trigger('fullscreenchange', {\n isFullscreen: false\n });\n // Safari will sometimes set controls on the videoelement when existing fullscreen.\n if (this.el_.controls && !this.options_.nativeControlsForTouch && this.controls()) {\n this.el_.controls = false;\n }\n };\n var beginFn = function beginFn() {\n if ('webkitPresentationMode' in this.el_ && this.el_.webkitPresentationMode !== 'picture-in-picture') {\n this.one('webkitendfullscreen', endFn);\n this.trigger('fullscreenchange', {\n isFullscreen: true,\n // set a flag in case another tech triggers fullscreenchange\n nativeIOSFullscreen: true\n });\n }\n };\n this.on('webkitbeginfullscreen', beginFn);\n this.on('dispose', function () {\n _this104.off('webkitbeginfullscreen', beginFn);\n _this104.off('webkitendfullscreen', endFn);\n });\n }\n\n /**\n * Check if fullscreen is supported on the video el.\n *\n * @return {boolean}\n * - True if fullscreen is supported.\n * - False if fullscreen is not supported.\n */\n }, {\n key: \"supportsFullScreen\",\n value: function supportsFullScreen() {\n return typeof this.el_.webkitEnterFullScreen === 'function';\n }\n\n /**\n * Request that the `HTML5` Tech enter fullscreen.\n */\n }, {\n key: \"enterFullScreen\",\n value: function enterFullScreen() {\n var video = this.el_;\n if (video.paused && video.networkState <= video.HAVE_METADATA) {\n // attempt to prime the video element for programmatic access\n // this isn't necessary on the desktop but shouldn't hurt\n silencePromise(this.el_.play());\n\n // playing and pausing synchronously during the transition to fullscreen\n // can get iOS ~6.1 devices into a play/pause loop\n this.setTimeout(function () {\n video.pause();\n try {\n video.webkitEnterFullScreen();\n } catch (e) {\n this.trigger('fullscreenerror', e);\n }\n }, 0);\n } else {\n try {\n video.webkitEnterFullScreen();\n } catch (e) {\n this.trigger('fullscreenerror', e);\n }\n }\n }\n\n /**\n * Request that the `HTML5` Tech exit fullscreen.\n */\n }, {\n key: \"exitFullScreen\",\n value: function exitFullScreen() {\n if (!this.el_.webkitDisplayingFullscreen) {\n this.trigger('fullscreenerror', new Error('The video is not fullscreen'));\n return;\n }\n this.el_.webkitExitFullScreen();\n }\n\n /**\n * Create a floating video window always on top of other windows so that users may\n * continue consuming media while they interact with other content sites, or\n * applications on their device.\n *\n * @see [Spec]{@link https://wicg.github.io/picture-in-picture}\n *\n * @return {Promise}\n * A promise with a Picture-in-Picture window.\n */\n }, {\n key: \"requestPictureInPicture\",\n value: function requestPictureInPicture() {\n return this.el_.requestPictureInPicture();\n }\n\n /**\n * Native requestVideoFrameCallback if supported by browser/tech, or fallback\n * Don't use rVCF on Safari when DRM is playing, as it doesn't fire\n * Needs to be checked later than the constructor\n * This will be a false positive for clear sources loaded after a Fairplay source\n *\n * @param {function} cb function to call\n * @return {number} id of request\n */\n }, {\n key: \"requestVideoFrameCallback\",\n value: function requestVideoFrameCallback(cb) {\n if (this.featuresVideoFrameCallback && !this.el_.webkitKeys) {\n return this.el_.requestVideoFrameCallback(cb);\n }\n return _get(_getPrototypeOf(Html5.prototype), \"requestVideoFrameCallback\", this).call(this, cb);\n }\n\n /**\n * Native or fallback requestVideoFrameCallback\n *\n * @param {number} id request id to cancel\n */\n }, {\n key: \"cancelVideoFrameCallback\",\n value: function cancelVideoFrameCallback(id) {\n if (this.featuresVideoFrameCallback && !this.el_.webkitKeys) {\n this.el_.cancelVideoFrameCallback(id);\n } else {\n _get(_getPrototypeOf(Html5.prototype), \"cancelVideoFrameCallback\", this).call(this, id);\n }\n }\n\n /**\n * A getter/setter for the `Html5` Tech's source object.\n * > Note: Please use {@link Html5#setSource}\n *\n * @param {Tech~SourceObject} [src]\n * The source object you want to set on the `HTML5` techs element.\n *\n * @return {Tech~SourceObject|undefined}\n * - The current source object when a source is not passed in.\n * - undefined when setting\n *\n * @deprecated Since version 5.\n */\n }, {\n key: \"src\",\n value: function src(_src2) {\n if (_src2 === undefined) {\n return this.el_.src;\n }\n\n // Setting src through `src` instead of `setSrc` will be deprecated\n this.setSrc(_src2);\n }\n\n /**\n * Reset the tech by removing all sources and then calling\n * {@link Html5.resetMediaElement}.\n */\n }, {\n key: \"reset\",\n value: function reset() {\n Html5.resetMediaElement(this.el_);\n }\n\n /**\n * Get the current source on the `HTML5` Tech. Falls back to returning the source from\n * the HTML5 media element.\n *\n * @return {Tech~SourceObject}\n * The current source object from the HTML5 tech. With a fallback to the\n * elements source.\n */\n }, {\n key: \"currentSrc\",\n value: function currentSrc() {\n if (this.currentSource_) {\n return this.currentSource_.src;\n }\n return this.el_.currentSrc;\n }\n\n /**\n * Set controls attribute for the HTML5 media Element.\n *\n * @param {string} val\n * Value to set the controls attribute to\n */\n }, {\n key: \"setControls\",\n value: function setControls(val) {\n this.el_.controls = !!val;\n }\n\n /**\n * Create and returns a remote {@link TextTrack} object.\n *\n * @param {string} kind\n * `TextTrack` kind (subtitles, captions, descriptions, chapters, or metadata)\n *\n * @param {string} [label]\n * Label to identify the text track\n *\n * @param {string} [language]\n * Two letter language abbreviation\n *\n * @return {TextTrack}\n * The TextTrack that gets created.\n */\n }, {\n key: \"addTextTrack\",\n value: function addTextTrack(kind, label, language) {\n if (!this.featuresNativeTextTracks) {\n return _get(_getPrototypeOf(Html5.prototype), \"addTextTrack\", this).call(this, kind, label, language);\n }\n return this.el_.addTextTrack(kind, label, language);\n }\n\n /**\n * Creates either native TextTrack or an emulated TextTrack depending\n * on the value of `featuresNativeTextTracks`\n *\n * @param {Object} options\n * The object should contain the options to initialize the TextTrack with.\n *\n * @param {string} [options.kind]\n * `TextTrack` kind (subtitles, captions, descriptions, chapters, or metadata).\n *\n * @param {string} [options.label]\n * Label to identify the text track\n *\n * @param {string} [options.language]\n * Two letter language abbreviation.\n *\n * @param {boolean} [options.default]\n * Default this track to on.\n *\n * @param {string} [options.id]\n * The internal id to assign this track.\n *\n * @param {string} [options.src]\n * A source url for the track.\n *\n * @return {HTMLTrackElement}\n * The track element that gets created.\n */\n }, {\n key: \"createRemoteTextTrack\",\n value: function createRemoteTextTrack(options) {\n if (!this.featuresNativeTextTracks) {\n return _get(_getPrototypeOf(Html5.prototype), \"createRemoteTextTrack\", this).call(this, options);\n }\n var htmlTrackElement = document.createElement('track');\n if (options.kind) {\n htmlTrackElement.kind = options.kind;\n }\n if (options.label) {\n htmlTrackElement.label = options.label;\n }\n if (options.language || options.srclang) {\n htmlTrackElement.srclang = options.language || options.srclang;\n }\n if (options[\"default\"]) {\n htmlTrackElement[\"default\"] = options[\"default\"];\n }\n if (options.id) {\n htmlTrackElement.id = options.id;\n }\n if (options.src) {\n htmlTrackElement.src = options.src;\n }\n return htmlTrackElement;\n }\n\n /**\n * Creates a remote text track object and returns an html track element.\n *\n * @param {Object} options The object should contain values for\n * kind, language, label, and src (location of the WebVTT file)\n * @param {boolean} [manualCleanup=false] if set to true, the TextTrack\n * will not be removed from the TextTrackList and HtmlTrackElementList\n * after a source change\n * @return {HTMLTrackElement} An Html Track Element.\n * This can be an emulated {@link HTMLTrackElement} or a native one.\n *\n */\n }, {\n key: \"addRemoteTextTrack\",\n value: function addRemoteTextTrack(options, manualCleanup) {\n var htmlTrackElement = _get(_getPrototypeOf(Html5.prototype), \"addRemoteTextTrack\", this).call(this, options, manualCleanup);\n if (this.featuresNativeTextTracks) {\n this.el().appendChild(htmlTrackElement);\n }\n return htmlTrackElement;\n }\n\n /**\n * Remove remote `TextTrack` from `TextTrackList` object\n *\n * @param {TextTrack} track\n * `TextTrack` object to remove\n */\n }, {\n key: \"removeRemoteTextTrack\",\n value: function removeRemoteTextTrack(track) {\n _get(_getPrototypeOf(Html5.prototype), \"removeRemoteTextTrack\", this).call(this, track);\n if (this.featuresNativeTextTracks) {\n var tracks = this.$$('track');\n var _i60 = tracks.length;\n while (_i60--) {\n if (track === tracks[_i60] || track === tracks[_i60].track) {\n this.el().removeChild(tracks[_i60]);\n }\n }\n }\n }\n\n /**\n * Gets available media playback quality metrics as specified by the W3C's Media\n * Playback Quality API.\n *\n * @see [Spec]{@link https://wicg.github.io/media-playback-quality}\n *\n * @return {Object}\n * An object with supported media playback quality metrics\n */\n }, {\n key: \"getVideoPlaybackQuality\",\n value: function getVideoPlaybackQuality() {\n if (typeof this.el().getVideoPlaybackQuality === 'function') {\n return this.el().getVideoPlaybackQuality();\n }\n var videoPlaybackQuality = {};\n if (typeof this.el().webkitDroppedFrameCount !== 'undefined' && typeof this.el().webkitDecodedFrameCount !== 'undefined') {\n videoPlaybackQuality.droppedVideoFrames = this.el().webkitDroppedFrameCount;\n videoPlaybackQuality.totalVideoFrames = this.el().webkitDecodedFrameCount;\n }\n if (window$1.performance) {\n videoPlaybackQuality.creationTime = window$1.performance.now();\n }\n return videoPlaybackQuality;\n }\n }]);\n return Html5;\n}(Tech);\n/* HTML5 Support Testing ---------------------------------------------------- */\n/**\n * Element for testing browser HTML5 media capabilities\n *\n * @type {Element}\n * @constant\n * @private\n */\ndefineLazyProperty(Html5, 'TEST_VID', function () {\n if (!isReal()) {\n return;\n }\n var video = document.createElement('video');\n var track = document.createElement('track');\n track.kind = 'captions';\n track.srclang = 'en';\n track.label = 'English';\n video.appendChild(track);\n return video;\n});\n\n/**\n * Check if HTML5 media is supported by this browser/device.\n *\n * @return {boolean}\n * - True if HTML5 media is supported.\n * - False if HTML5 media is not supported.\n */\nHtml5.isSupported = function () {\n // IE with no Media Player is a LIAR! (#984)\n try {\n Html5.TEST_VID.volume = 0.5;\n } catch (e) {\n return false;\n }\n return !!(Html5.TEST_VID && Html5.TEST_VID.canPlayType);\n};\n\n/**\n * Check if the tech can support the given type\n *\n * @param {string} type\n * The mimetype to check\n * @return {string} 'probably', 'maybe', or '' (empty string)\n */\nHtml5.canPlayType = function (type) {\n return Html5.TEST_VID.canPlayType(type);\n};\n\n/**\n * Check if the tech can support the given source\n *\n * @param {Object} srcObj\n * The source object\n * @param {Object} options\n * The options passed to the tech\n * @return {string} 'probably', 'maybe', or '' (empty string)\n */\nHtml5.canPlaySource = function (srcObj, options) {\n return Html5.canPlayType(srcObj.type);\n};\n\n/**\n * Check if the volume can be changed in this browser/device.\n * Volume cannot be changed in a lot of mobile devices.\n * Specifically, it can't be changed from 1 on iOS.\n *\n * @return {boolean}\n * - True if volume can be controlled\n * - False otherwise\n */\nHtml5.canControlVolume = function () {\n // IE will error if Windows Media Player not installed #3315\n try {\n var volume = Html5.TEST_VID.volume;\n Html5.TEST_VID.volume = volume / 2 + 0.1;\n var canControl = volume !== Html5.TEST_VID.volume;\n\n // With the introduction of iOS 15, there are cases where the volume is read as\n // changed but reverts back to its original state at the start of the next tick.\n // To determine whether volume can be controlled on iOS,\n // a timeout is set and the volume is checked asynchronously.\n // Since `features` doesn't currently work asynchronously, the value is manually set.\n if (canControl && IS_IOS) {\n window$1.setTimeout(function () {\n if (Html5 && Html5.prototype) {\n Html5.prototype.featuresVolumeControl = volume !== Html5.TEST_VID.volume;\n }\n });\n\n // default iOS to false, which will be updated in the timeout above.\n return false;\n }\n return canControl;\n } catch (e) {\n return false;\n }\n};\n\n/**\n * Check if the volume can be muted in this browser/device.\n * Some devices, e.g. iOS, don't allow changing volume\n * but permits muting/unmuting.\n *\n * @return {boolean}\n * - True if volume can be muted\n * - False otherwise\n */\nHtml5.canMuteVolume = function () {\n try {\n var muted = Html5.TEST_VID.muted;\n\n // in some versions of iOS muted property doesn't always\n // work, so we want to set both property and attribute\n Html5.TEST_VID.muted = !muted;\n if (Html5.TEST_VID.muted) {\n _setAttribute(Html5.TEST_VID, 'muted', 'muted');\n } else {\n _removeAttribute(Html5.TEST_VID, 'muted', 'muted');\n }\n return muted !== Html5.TEST_VID.muted;\n } catch (e) {\n return false;\n }\n};\n\n/**\n * Check if the playback rate can be changed in this browser/device.\n *\n * @return {boolean}\n * - True if playback rate can be controlled\n * - False otherwise\n */\nHtml5.canControlPlaybackRate = function () {\n // Playback rate API is implemented in Android Chrome, but doesn't do anything\n // https://github.com/videojs/video.js/issues/3180\n if (IS_ANDROID && IS_CHROME && CHROME_VERSION < 58) {\n return false;\n }\n // IE will error if Windows Media Player not installed #3315\n try {\n var playbackRate = Html5.TEST_VID.playbackRate;\n Html5.TEST_VID.playbackRate = playbackRate / 2 + 0.1;\n return playbackRate !== Html5.TEST_VID.playbackRate;\n } catch (e) {\n return false;\n }\n};\n\n/**\n * Check if we can override a video/audio elements attributes, with\n * Object.defineProperty.\n *\n * @return {boolean}\n * - True if builtin attributes can be overridden\n * - False otherwise\n */\nHtml5.canOverrideAttributes = function () {\n // if we cannot overwrite the src/innerHTML property, there is no support\n // iOS 7 safari for instance cannot do this.\n try {\n var _noop = function _noop() {};\n Object.defineProperty(document.createElement('video'), 'src', {\n get: _noop,\n set: _noop\n });\n Object.defineProperty(document.createElement('audio'), 'src', {\n get: _noop,\n set: _noop\n });\n Object.defineProperty(document.createElement('video'), 'innerHTML', {\n get: _noop,\n set: _noop\n });\n Object.defineProperty(document.createElement('audio'), 'innerHTML', {\n get: _noop,\n set: _noop\n });\n } catch (e) {\n return false;\n }\n return true;\n};\n\n/**\n * Check to see if native `TextTrack`s are supported by this browser/device.\n *\n * @return {boolean}\n * - True if native `TextTrack`s are supported.\n * - False otherwise\n */\nHtml5.supportsNativeTextTracks = function () {\n return IS_ANY_SAFARI || IS_IOS && IS_CHROME;\n};\n\n/**\n * Check to see if native `VideoTrack`s are supported by this browser/device\n *\n * @return {boolean}\n * - True if native `VideoTrack`s are supported.\n * - False otherwise\n */\nHtml5.supportsNativeVideoTracks = function () {\n return !!(Html5.TEST_VID && Html5.TEST_VID.videoTracks);\n};\n\n/**\n * Check to see if native `AudioTrack`s are supported by this browser/device\n *\n * @return {boolean}\n * - True if native `AudioTrack`s are supported.\n * - False otherwise\n */\nHtml5.supportsNativeAudioTracks = function () {\n return !!(Html5.TEST_VID && Html5.TEST_VID.audioTracks);\n};\n\n/**\n * An array of events available on the Html5 tech.\n *\n * @private\n * @type {Array}\n */\nHtml5.Events = ['loadstart', 'suspend', 'abort', 'error', 'emptied', 'stalled', 'loadedmetadata', 'loadeddata', 'canplay', 'canplaythrough', 'playing', 'waiting', 'seeking', 'seeked', 'ended', 'durationchange', 'timeupdate', 'progress', 'play', 'pause', 'ratechange', 'resize', 'volumechange'];\n\n/**\n * Boolean indicating whether the `Tech` supports volume control.\n *\n * @type {boolean}\n * @default {@link Html5.canControlVolume}\n */\n/**\n * Boolean indicating whether the `Tech` supports muting volume.\n *\n * @type {boolean}\n * @default {@link Html5.canMuteVolume}\n */\n\n/**\n * Boolean indicating whether the `Tech` supports changing the speed at which the media\n * plays. Examples:\n * - Set player to play 2x (twice) as fast\n * - Set player to play 0.5x (half) as fast\n *\n * @type {boolean}\n * @default {@link Html5.canControlPlaybackRate}\n */\n\n/**\n * Boolean indicating whether the `Tech` supports the `sourceset` event.\n *\n * @type {boolean}\n * @default\n */\n/**\n * Boolean indicating whether the `HTML5` tech currently supports native `TextTrack`s.\n *\n * @type {boolean}\n * @default {@link Html5.supportsNativeTextTracks}\n */\n/**\n * Boolean indicating whether the `HTML5` tech currently supports native `VideoTrack`s.\n *\n * @type {boolean}\n * @default {@link Html5.supportsNativeVideoTracks}\n */\n/**\n * Boolean indicating whether the `HTML5` tech currently supports native `AudioTrack`s.\n *\n * @type {boolean}\n * @default {@link Html5.supportsNativeAudioTracks}\n */\n[['featuresMuteControl', 'canMuteVolume'], ['featuresPlaybackRate', 'canControlPlaybackRate'], ['featuresSourceset', 'canOverrideAttributes'], ['featuresNativeTextTracks', 'supportsNativeTextTracks'], ['featuresNativeVideoTracks', 'supportsNativeVideoTracks'], ['featuresNativeAudioTracks', 'supportsNativeAudioTracks']].forEach(function (_ref3) {\n var _ref4 = _slicedToArray(_ref3, 2),\n key = _ref4[0],\n fn = _ref4[1];\n defineLazyProperty(Html5.prototype, key, function () {\n return Html5[fn]();\n }, true);\n});\nHtml5.prototype.featuresVolumeControl = Html5.canControlVolume();\n\n/**\n * Boolean indicating whether the `HTML5` tech currently supports the media element\n * moving in the DOM. iOS breaks if you move the media element, so this is set this to\n * false there. Everywhere else this should be true.\n *\n * @type {boolean}\n * @default\n */\nHtml5.prototype.movingMediaElementInDOM = !IS_IOS;\n\n// TODO: Previous comment: No longer appears to be used. Can probably be removed.\n// Is this true?\n/**\n * Boolean indicating whether the `HTML5` tech currently supports automatic media resize\n * when going into fullscreen.\n *\n * @type {boolean}\n * @default\n */\nHtml5.prototype.featuresFullscreenResize = true;\n\n/**\n * Boolean indicating whether the `HTML5` tech currently supports the progress event.\n * If this is false, manual `progress` events will be triggered instead.\n *\n * @type {boolean}\n * @default\n */\nHtml5.prototype.featuresProgressEvents = true;\n\n/**\n * Boolean indicating whether the `HTML5` tech currently supports the timeupdate event.\n * If this is false, manual `timeupdate` events will be triggered instead.\n *\n * @default\n */\nHtml5.prototype.featuresTimeupdateEvents = true;\n\n/**\n * Whether the HTML5 el supports `requestVideoFrameCallback`\n *\n * @type {boolean}\n */\nHtml5.prototype.featuresVideoFrameCallback = !!(Html5.TEST_VID && Html5.TEST_VID.requestVideoFrameCallback);\nHtml5.disposeMediaElement = function (el) {\n if (!el) {\n return;\n }\n if (el.parentNode) {\n el.parentNode.removeChild(el);\n }\n\n // remove any child track or source nodes to prevent their loading\n while (el.hasChildNodes()) {\n el.removeChild(el.firstChild);\n }\n\n // remove any src reference. not setting `src=''` because that causes a warning\n // in firefox\n el.removeAttribute('src');\n\n // force the media element to update its loading state by calling load()\n // however IE on Windows 7N has a bug that throws an error so need a try/catch (#793)\n if (typeof el.load === 'function') {\n // wrapping in an iife so it's not deoptimized (#1060#discussion_r10324473)\n (function () {\n try {\n el.load();\n } catch (e) {\n // not supported\n }\n })();\n }\n};\nHtml5.resetMediaElement = function (el) {\n if (!el) {\n return;\n }\n var sources = el.querySelectorAll('source');\n var i = sources.length;\n while (i--) {\n el.removeChild(sources[i]);\n }\n\n // remove any src reference.\n // not setting `src=''` because that throws an error\n el.removeAttribute('src');\n if (typeof el.load === 'function') {\n // wrapping in an iife so it's not deoptimized (#1060#discussion_r10324473)\n (function () {\n try {\n el.load();\n } catch (e) {\n // satisfy linter\n }\n })();\n }\n};\n\n/* Native HTML5 element property wrapping ----------------------------------- */\n// Wrap native boolean attributes with getters that check both property and attribute\n// The list is as followed:\n// muted, defaultMuted, autoplay, controls, loop, playsinline\n[\n/**\n * Get the value of `muted` from the media element. `muted` indicates\n * that the volume for the media should be set to silent. This does not actually change\n * the `volume` attribute.\n *\n * @method Html5#muted\n * @return {boolean}\n * - True if the value of `volume` should be ignored and the audio set to silent.\n * - False if the value of `volume` should be used.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-muted}\n */\n'muted',\n/**\n * Get the value of `defaultMuted` from the media element. `defaultMuted` indicates\n * whether the media should start muted or not. Only changes the default state of the\n * media. `muted` and `defaultMuted` can have different values. {@link Html5#muted} indicates the\n * current state.\n *\n * @method Html5#defaultMuted\n * @return {boolean}\n * - The value of `defaultMuted` from the media element.\n * - True indicates that the media should start muted.\n * - False indicates that the media should not start muted\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-defaultmuted}\n */\n'defaultMuted',\n/**\n * Get the value of `autoplay` from the media element. `autoplay` indicates\n * that the media should start to play as soon as the page is ready.\n *\n * @method Html5#autoplay\n * @return {boolean}\n * - The value of `autoplay` from the media element.\n * - True indicates that the media should start as soon as the page loads.\n * - False indicates that the media should not start as soon as the page loads.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-autoplay}\n */\n'autoplay',\n/**\n * Get the value of `controls` from the media element. `controls` indicates\n * whether the native media controls should be shown or hidden.\n *\n * @method Html5#controls\n * @return {boolean}\n * - The value of `controls` from the media element.\n * - True indicates that native controls should be showing.\n * - False indicates that native controls should be hidden.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-controls}\n */\n'controls',\n/**\n * Get the value of `loop` from the media element. `loop` indicates\n * that the media should return to the start of the media and continue playing once\n * it reaches the end.\n *\n * @method Html5#loop\n * @return {boolean}\n * - The value of `loop` from the media element.\n * - True indicates that playback should seek back to start once\n * the end of a media is reached.\n * - False indicates that playback should not loop back to the start when the\n * end of the media is reached.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-loop}\n */\n'loop',\n/**\n * Get the value of `playsinline` from the media element. `playsinline` indicates\n * to the browser that non-fullscreen playback is preferred when fullscreen\n * playback is the native default, such as in iOS Safari.\n *\n * @method Html5#playsinline\n * @return {boolean}\n * - The value of `playsinline` from the media element.\n * - True indicates that the media should play inline.\n * - False indicates that the media should not play inline.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/#attr-video-playsinline}\n */\n'playsinline'].forEach(function (prop) {\n Html5.prototype[prop] = function () {\n return this.el_[prop] || this.el_.hasAttribute(prop);\n };\n});\n\n// Wrap native boolean attributes with setters that set both property and attribute\n// The list is as followed:\n// setMuted, setDefaultMuted, setAutoplay, setLoop, setPlaysinline\n// setControls is special-cased above\n[\n/**\n * Set the value of `muted` on the media element. `muted` indicates that the current\n * audio level should be silent.\n *\n * @method Html5#setMuted\n * @param {boolean} muted\n * - True if the audio should be set to silent\n * - False otherwise\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-muted}\n */\n'muted',\n/**\n * Set the value of `defaultMuted` on the media element. `defaultMuted` indicates that the current\n * audio level should be silent, but will only effect the muted level on initial playback..\n *\n * @method Html5.prototype.setDefaultMuted\n * @param {boolean} defaultMuted\n * - True if the audio should be set to silent\n * - False otherwise\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-defaultmuted}\n */\n'defaultMuted',\n/**\n * Set the value of `autoplay` on the media element. `autoplay` indicates\n * that the media should start to play as soon as the page is ready.\n *\n * @method Html5#setAutoplay\n * @param {boolean} autoplay\n * - True indicates that the media should start as soon as the page loads.\n * - False indicates that the media should not start as soon as the page loads.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-autoplay}\n */\n'autoplay',\n/**\n * Set the value of `loop` on the media element. `loop` indicates\n * that the media should return to the start of the media and continue playing once\n * it reaches the end.\n *\n * @method Html5#setLoop\n * @param {boolean} loop\n * - True indicates that playback should seek back to start once\n * the end of a media is reached.\n * - False indicates that playback should not loop back to the start when the\n * end of the media is reached.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-loop}\n */\n'loop',\n/**\n * Set the value of `playsinline` from the media element. `playsinline` indicates\n * to the browser that non-fullscreen playback is preferred when fullscreen\n * playback is the native default, such as in iOS Safari.\n *\n * @method Html5#setPlaysinline\n * @param {boolean} playsinline\n * - True indicates that the media should play inline.\n * - False indicates that the media should not play inline.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/#attr-video-playsinline}\n */\n'playsinline'].forEach(function (prop) {\n Html5.prototype['set' + toTitleCase$1(prop)] = function (v) {\n this.el_[prop] = v;\n if (v) {\n this.el_.setAttribute(prop, prop);\n } else {\n this.el_.removeAttribute(prop);\n }\n };\n});\n\n// Wrap native properties with a getter\n// The list is as followed\n// paused, currentTime, buffered, volume, poster, preload, error, seeking\n// seekable, ended, playbackRate, defaultPlaybackRate, disablePictureInPicture\n// played, networkState, readyState, videoWidth, videoHeight, crossOrigin\n[\n/**\n * Get the value of `paused` from the media element. `paused` indicates whether the media element\n * is currently paused or not.\n *\n * @method Html5#paused\n * @return {boolean}\n * The value of `paused` from the media element.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-paused}\n */\n'paused',\n/**\n * Get the value of `currentTime` from the media element. `currentTime` indicates\n * the current second that the media is at in playback.\n *\n * @method Html5#currentTime\n * @return {number}\n * The value of `currentTime` from the media element.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-currenttime}\n */\n'currentTime',\n/**\n * Get the value of `buffered` from the media element. `buffered` is a `TimeRange`\n * object that represents the parts of the media that are already downloaded and\n * available for playback.\n *\n * @method Html5#buffered\n * @return {TimeRange}\n * The value of `buffered` from the media element.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-buffered}\n */\n'buffered',\n/**\n * Get the value of `volume` from the media element. `volume` indicates\n * the current playback volume of audio for a media. `volume` will be a value from 0\n * (silent) to 1 (loudest and default).\n *\n * @method Html5#volume\n * @return {number}\n * The value of `volume` from the media element. Value will be between 0-1.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-a-volume}\n */\n'volume',\n/**\n * Get the value of `poster` from the media element. `poster` indicates\n * that the url of an image file that can/will be shown when no media data is available.\n *\n * @method Html5#poster\n * @return {string}\n * The value of `poster` from the media element. Value will be a url to an\n * image.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-video-poster}\n */\n'poster',\n/**\n * Get the value of `preload` from the media element. `preload` indicates\n * what should download before the media is interacted with. It can have the following\n * values:\n * - none: nothing should be downloaded\n * - metadata: poster and the first few frames of the media may be downloaded to get\n * media dimensions and other metadata\n * - auto: allow the media and metadata for the media to be downloaded before\n * interaction\n *\n * @method Html5#preload\n * @return {string}\n * The value of `preload` from the media element. Will be 'none', 'metadata',\n * or 'auto'.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-preload}\n */\n'preload',\n/**\n * Get the value of the `error` from the media element. `error` indicates any\n * MediaError that may have occurred during playback. If error returns null there is no\n * current error.\n *\n * @method Html5#error\n * @return {MediaError|null}\n * The value of `error` from the media element. Will be `MediaError` if there\n * is a current error and null otherwise.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-error}\n */\n'error',\n/**\n * Get the value of `seeking` from the media element. `seeking` indicates whether the\n * media is currently seeking to a new position or not.\n *\n * @method Html5#seeking\n * @return {boolean}\n * - The value of `seeking` from the media element.\n * - True indicates that the media is currently seeking to a new position.\n * - False indicates that the media is not seeking to a new position at this time.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-seeking}\n */\n'seeking',\n/**\n * Get the value of `seekable` from the media element. `seekable` returns a\n * `TimeRange` object indicating ranges of time that can currently be `seeked` to.\n *\n * @method Html5#seekable\n * @return {TimeRange}\n * The value of `seekable` from the media element. A `TimeRange` object\n * indicating the current ranges of time that can be seeked to.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-seekable}\n */\n'seekable',\n/**\n * Get the value of `ended` from the media element. `ended` indicates whether\n * the media has reached the end or not.\n *\n * @method Html5#ended\n * @return {boolean}\n * - The value of `ended` from the media element.\n * - True indicates that the media has ended.\n * - False indicates that the media has not ended.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-ended}\n */\n'ended',\n/**\n * Get the value of `playbackRate` from the media element. `playbackRate` indicates\n * the rate at which the media is currently playing back. Examples:\n * - if playbackRate is set to 2, media will play twice as fast.\n * - if playbackRate is set to 0.5, media will play half as fast.\n *\n * @method Html5#playbackRate\n * @return {number}\n * The value of `playbackRate` from the media element. A number indicating\n * the current playback speed of the media, where 1 is normal speed.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-playbackrate}\n */\n'playbackRate',\n/**\n * Get the value of `defaultPlaybackRate` from the media element. `defaultPlaybackRate` indicates\n * the rate at which the media is currently playing back. This value will not indicate the current\n * `playbackRate` after playback has started, use {@link Html5#playbackRate} for that.\n *\n * Examples:\n * - if defaultPlaybackRate is set to 2, media will play twice as fast.\n * - if defaultPlaybackRate is set to 0.5, media will play half as fast.\n *\n * @method Html5.prototype.defaultPlaybackRate\n * @return {number}\n * The value of `defaultPlaybackRate` from the media element. A number indicating\n * the current playback speed of the media, where 1 is normal speed.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-playbackrate}\n */\n'defaultPlaybackRate',\n/**\n * Get the value of 'disablePictureInPicture' from the video element.\n *\n * @method Html5#disablePictureInPicture\n * @return {boolean} value\n * - The value of `disablePictureInPicture` from the video element.\n * - True indicates that the video can't be played in Picture-In-Picture mode\n * - False indicates that the video can be played in Picture-In-Picture mode\n *\n * @see [Spec]{@link https://w3c.github.io/picture-in-picture/#disable-pip}\n */\n'disablePictureInPicture',\n/**\n * Get the value of `played` from the media element. `played` returns a `TimeRange`\n * object representing points in the media timeline that have been played.\n *\n * @method Html5#played\n * @return {TimeRange}\n * The value of `played` from the media element. A `TimeRange` object indicating\n * the ranges of time that have been played.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-played}\n */\n'played',\n/**\n * Get the value of `networkState` from the media element. `networkState` indicates\n * the current network state. It returns an enumeration from the following list:\n * - 0: NETWORK_EMPTY\n * - 1: NETWORK_IDLE\n * - 2: NETWORK_LOADING\n * - 3: NETWORK_NO_SOURCE\n *\n * @method Html5#networkState\n * @return {number}\n * The value of `networkState` from the media element. This will be a number\n * from the list in the description.\n *\n * @see [Spec] {@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-networkstate}\n */\n'networkState',\n/**\n * Get the value of `readyState` from the media element. `readyState` indicates\n * the current state of the media element. It returns an enumeration from the\n * following list:\n * - 0: HAVE_NOTHING\n * - 1: HAVE_METADATA\n * - 2: HAVE_CURRENT_DATA\n * - 3: HAVE_FUTURE_DATA\n * - 4: HAVE_ENOUGH_DATA\n *\n * @method Html5#readyState\n * @return {number}\n * The value of `readyState` from the media element. This will be a number\n * from the list in the description.\n *\n * @see [Spec] {@link https://www.w3.org/TR/html5/embedded-content-0.html#ready-states}\n */\n'readyState',\n/**\n * Get the value of `videoWidth` from the video element. `videoWidth` indicates\n * the current width of the video in css pixels.\n *\n * @method Html5#videoWidth\n * @return {number}\n * The value of `videoWidth` from the video element. This will be a number\n * in css pixels.\n *\n * @see [Spec] {@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-video-videowidth}\n */\n'videoWidth',\n/**\n * Get the value of `videoHeight` from the video element. `videoHeight` indicates\n * the current height of the video in css pixels.\n *\n * @method Html5#videoHeight\n * @return {number}\n * The value of `videoHeight` from the video element. This will be a number\n * in css pixels.\n *\n * @see [Spec] {@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-video-videowidth}\n */\n'videoHeight',\n/**\n * Get the value of `crossOrigin` from the media element. `crossOrigin` indicates\n * to the browser that should sent the cookies along with the requests for the\n * different assets/playlists\n *\n * @method Html5#crossOrigin\n * @return {string}\n * - anonymous indicates that the media should not sent cookies.\n * - use-credentials indicates that the media should sent cookies along the requests.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/#attr-media-crossorigin}\n */\n'crossOrigin'].forEach(function (prop) {\n Html5.prototype[prop] = function () {\n return this.el_[prop];\n };\n});\n\n// Wrap native properties with a setter in this format:\n// set + toTitleCase(name)\n// The list is as follows:\n// setVolume, setSrc, setPoster, setPreload, setPlaybackRate, setDefaultPlaybackRate,\n// setDisablePictureInPicture, setCrossOrigin\n[\n/**\n * Set the value of `volume` on the media element. `volume` indicates the current\n * audio level as a percentage in decimal form. This means that 1 is 100%, 0.5 is 50%, and\n * so on.\n *\n * @method Html5#setVolume\n * @param {number} percentAsDecimal\n * The volume percent as a decimal. Valid range is from 0-1.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-a-volume}\n */\n'volume',\n/**\n * Set the value of `src` on the media element. `src` indicates the current\n * {@link Tech~SourceObject} for the media.\n *\n * @method Html5#setSrc\n * @param {Tech~SourceObject} src\n * The source object to set as the current source.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-src}\n */\n'src',\n/**\n * Set the value of `poster` on the media element. `poster` is the url to\n * an image file that can/will be shown when no media data is available.\n *\n * @method Html5#setPoster\n * @param {string} poster\n * The url to an image that should be used as the `poster` for the media\n * element.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-poster}\n */\n'poster',\n/**\n * Set the value of `preload` on the media element. `preload` indicates\n * what should download before the media is interacted with. It can have the following\n * values:\n * - none: nothing should be downloaded\n * - metadata: poster and the first few frames of the media may be downloaded to get\n * media dimensions and other metadata\n * - auto: allow the media and metadata for the media to be downloaded before\n * interaction\n *\n * @method Html5#setPreload\n * @param {string} preload\n * The value of `preload` to set on the media element. Must be 'none', 'metadata',\n * or 'auto'.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-preload}\n */\n'preload',\n/**\n * Set the value of `playbackRate` on the media element. `playbackRate` indicates\n * the rate at which the media should play back. Examples:\n * - if playbackRate is set to 2, media will play twice as fast.\n * - if playbackRate is set to 0.5, media will play half as fast.\n *\n * @method Html5#setPlaybackRate\n * @return {number}\n * The value of `playbackRate` from the media element. A number indicating\n * the current playback speed of the media, where 1 is normal speed.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-playbackrate}\n */\n'playbackRate',\n/**\n * Set the value of `defaultPlaybackRate` on the media element. `defaultPlaybackRate` indicates\n * the rate at which the media should play back upon initial startup. Changing this value\n * after a video has started will do nothing. Instead you should used {@link Html5#setPlaybackRate}.\n *\n * Example Values:\n * - if playbackRate is set to 2, media will play twice as fast.\n * - if playbackRate is set to 0.5, media will play half as fast.\n *\n * @method Html5.prototype.setDefaultPlaybackRate\n * @return {number}\n * The value of `defaultPlaybackRate` from the media element. A number indicating\n * the current playback speed of the media, where 1 is normal speed.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-defaultplaybackrate}\n */\n'defaultPlaybackRate',\n/**\n * Prevents the browser from suggesting a Picture-in-Picture context menu\n * or to request Picture-in-Picture automatically in some cases.\n *\n * @method Html5#setDisablePictureInPicture\n * @param {boolean} value\n * The true value will disable Picture-in-Picture mode.\n *\n * @see [Spec]{@link https://w3c.github.io/picture-in-picture/#disable-pip}\n */\n'disablePictureInPicture',\n/**\n * Set the value of `crossOrigin` from the media element. `crossOrigin` indicates\n * to the browser that should sent the cookies along with the requests for the\n * different assets/playlists\n *\n * @method Html5#setCrossOrigin\n * @param {string} crossOrigin\n * - anonymous indicates that the media should not sent cookies.\n * - use-credentials indicates that the media should sent cookies along the requests.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/#attr-media-crossorigin}\n */\n'crossOrigin'].forEach(function (prop) {\n Html5.prototype['set' + toTitleCase$1(prop)] = function (v) {\n this.el_[prop] = v;\n };\n});\n\n// wrap native functions with a function\n// The list is as follows:\n// pause, load, play\n[\n/**\n * A wrapper around the media elements `pause` function. This will call the `HTML5`\n * media elements `pause` function.\n *\n * @method Html5#pause\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-pause}\n */\n'pause',\n/**\n * A wrapper around the media elements `load` function. This will call the `HTML5`s\n * media element `load` function.\n *\n * @method Html5#load\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-load}\n */\n'load',\n/**\n * A wrapper around the media elements `play` function. This will call the `HTML5`s\n * media element `play` function.\n *\n * @method Html5#play\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-play}\n */\n'play'].forEach(function (prop) {\n Html5.prototype[prop] = function () {\n return this.el_[prop]();\n };\n});\nTech.withSourceHandlers(Html5);\n\n/**\n * Native source handler for Html5, simply passes the source to the media element.\n *\n * @property {Tech~SourceObject} source\n * The source object\n *\n * @property {Html5} tech\n * The instance of the HTML5 tech.\n */\nHtml5.nativeSourceHandler = {};\n\n/**\n * Check if the media element can play the given mime type.\n *\n * @param {string} type\n * The mimetype to check\n *\n * @return {string}\n * 'probably', 'maybe', or '' (empty string)\n */\nHtml5.nativeSourceHandler.canPlayType = function (type) {\n // IE without MediaPlayer throws an error (#519)\n try {\n return Html5.TEST_VID.canPlayType(type);\n } catch (e) {\n return '';\n }\n};\n\n/**\n * Check if the media element can handle a source natively.\n *\n * @param {Tech~SourceObject} source\n * The source object\n *\n * @param {Object} [options]\n * Options to be passed to the tech.\n *\n * @return {string}\n * 'probably', 'maybe', or '' (empty string).\n */\nHtml5.nativeSourceHandler.canHandleSource = function (source, options) {\n // If a type was provided we should rely on that\n if (source.type) {\n return Html5.nativeSourceHandler.canPlayType(source.type);\n\n // If no type, fall back to checking 'video/[EXTENSION]'\n } else if (source.src) {\n var ext = getFileExtension(source.src);\n return Html5.nativeSourceHandler.canPlayType(\"video/\".concat(ext));\n }\n return '';\n};\n\n/**\n * Pass the source to the native media element.\n *\n * @param {Tech~SourceObject} source\n * The source object\n *\n * @param {Html5} tech\n * The instance of the Html5 tech\n *\n * @param {Object} [options]\n * The options to pass to the source\n */\nHtml5.nativeSourceHandler.handleSource = function (source, tech, options) {\n tech.setSrc(source.src);\n};\n\n/**\n * A noop for the native dispose function, as cleanup is not needed.\n */\nHtml5.nativeSourceHandler.dispose = function () {};\n\n// Register the native source handler\nHtml5.registerSourceHandler(Html5.nativeSourceHandler);\nTech.registerTech('Html5', Html5);\n\n/**\n * @file player.js\n */\n\n// The following tech events are simply re-triggered\n// on the player when they happen\nvar TECH_EVENTS_RETRIGGER = [\n/**\n * Fired while the user agent is downloading media data.\n *\n * @event Player#progress\n * @type {Event}\n */\n/**\n * Retrigger the `progress` event that was triggered by the {@link Tech}.\n *\n * @private\n * @method Player#handleTechProgress_\n * @fires Player#progress\n * @listens Tech#progress\n */\n'progress',\n/**\n * Fires when the loading of an audio/video is aborted.\n *\n * @event Player#abort\n * @type {Event}\n */\n/**\n * Retrigger the `abort` event that was triggered by the {@link Tech}.\n *\n * @private\n * @method Player#handleTechAbort_\n * @fires Player#abort\n * @listens Tech#abort\n */\n'abort',\n/**\n * Fires when the browser is intentionally not getting media data.\n *\n * @event Player#suspend\n * @type {Event}\n */\n/**\n * Retrigger the `suspend` event that was triggered by the {@link Tech}.\n *\n * @private\n * @method Player#handleTechSuspend_\n * @fires Player#suspend\n * @listens Tech#suspend\n */\n'suspend',\n/**\n * Fires when the current playlist is empty.\n *\n * @event Player#emptied\n * @type {Event}\n */\n/**\n * Retrigger the `emptied` event that was triggered by the {@link Tech}.\n *\n * @private\n * @method Player#handleTechEmptied_\n * @fires Player#emptied\n * @listens Tech#emptied\n */\n'emptied',\n/**\n * Fires when the browser is trying to get media data, but data is not available.\n *\n * @event Player#stalled\n * @type {Event}\n */\n/**\n * Retrigger the `stalled` event that was triggered by the {@link Tech}.\n *\n * @private\n * @method Player#handleTechStalled_\n * @fires Player#stalled\n * @listens Tech#stalled\n */\n'stalled',\n/**\n * Fires when the browser has loaded meta data for the audio/video.\n *\n * @event Player#loadedmetadata\n * @type {Event}\n */\n/**\n * Retrigger the `loadedmetadata` event that was triggered by the {@link Tech}.\n *\n * @private\n * @method Player#handleTechLoadedmetadata_\n * @fires Player#loadedmetadata\n * @listens Tech#loadedmetadata\n */\n'loadedmetadata',\n/**\n * Fires when the browser has loaded the current frame of the audio/video.\n *\n * @event Player#loadeddata\n * @type {event}\n */\n/**\n * Retrigger the `loadeddata` event that was triggered by the {@link Tech}.\n *\n * @private\n * @method Player#handleTechLoaddeddata_\n * @fires Player#loadeddata\n * @listens Tech#loadeddata\n */\n'loadeddata',\n/**\n * Fires when the current playback position has changed.\n *\n * @event Player#timeupdate\n * @type {event}\n */\n/**\n * Retrigger the `timeupdate` event that was triggered by the {@link Tech}.\n *\n * @private\n * @method Player#handleTechTimeUpdate_\n * @fires Player#timeupdate\n * @listens Tech#timeupdate\n */\n'timeupdate',\n/**\n * Fires when the video's intrinsic dimensions change\n *\n * @event Player#resize\n * @type {event}\n */\n/**\n * Retrigger the `resize` event that was triggered by the {@link Tech}.\n *\n * @private\n * @method Player#handleTechResize_\n * @fires Player#resize\n * @listens Tech#resize\n */\n'resize',\n/**\n * Fires when the volume has been changed\n *\n * @event Player#volumechange\n * @type {event}\n */\n/**\n * Retrigger the `volumechange` event that was triggered by the {@link Tech}.\n *\n * @private\n * @method Player#handleTechVolumechange_\n * @fires Player#volumechange\n * @listens Tech#volumechange\n */\n'volumechange',\n/**\n * Fires when the text track has been changed\n *\n * @event Player#texttrackchange\n * @type {event}\n */\n/**\n * Retrigger the `texttrackchange` event that was triggered by the {@link Tech}.\n *\n * @private\n * @method Player#handleTechTexttrackchange_\n * @fires Player#texttrackchange\n * @listens Tech#texttrackchange\n */\n'texttrackchange'];\n\n// events to queue when playback rate is zero\n// this is a hash for the sole purpose of mapping non-camel-cased event names\n// to camel-cased function names\nvar TECH_EVENTS_QUEUE = {\n canplay: 'CanPlay',\n canplaythrough: 'CanPlayThrough',\n playing: 'Playing',\n seeked: 'Seeked'\n};\nvar BREAKPOINT_ORDER = ['tiny', 'xsmall', 'small', 'medium', 'large', 'xlarge', 'huge'];\nvar BREAKPOINT_CLASSES = {};\n\n// grep: vjs-layout-tiny\n// grep: vjs-layout-x-small\n// grep: vjs-layout-small\n// grep: vjs-layout-medium\n// grep: vjs-layout-large\n// grep: vjs-layout-x-large\n// grep: vjs-layout-huge\nBREAKPOINT_ORDER.forEach(function (k) {\n var v = k.charAt(0) === 'x' ? \"x-\".concat(k.substring(1)) : k;\n BREAKPOINT_CLASSES[k] = \"vjs-layout-\".concat(v);\n});\nvar DEFAULT_BREAKPOINTS = {\n tiny: 210,\n xsmall: 320,\n small: 425,\n medium: 768,\n large: 1440,\n xlarge: 2560,\n huge: Infinity\n};\n\n/**\n * An instance of the `Player` class is created when any of the Video.js setup methods\n * are used to initialize a video.\n *\n * After an instance has been created it can be accessed globally in three ways:\n * 1. By calling `videojs.getPlayer('example_video_1');`\n * 2. By calling `videojs('example_video_1');` (not recommended)\n * 2. By using it directly via `videojs.players.example_video_1;`\n *\n * @extends Component\n * @global\n */\nvar Player = /*#__PURE__*/function (_Component$28) {\n _inherits(Player, _Component$28);\n var _super74 = _createSuper(Player);\n /**\n * Create an instance of this class.\n *\n * @param {Element} tag\n * The original video DOM element used for configuring options.\n *\n * @param {Object} [options]\n * Object of option names and values.\n *\n * @param {Function} [ready]\n * Ready callback function.\n */\n function Player(tag, options, ready) {\n var _this105;\n _classCallCheck(this, Player);\n // Make sure tag ID exists\n // also here.. probably better\n tag.id = tag.id || options.id || \"vjs_video_\".concat(newGUID());\n\n // Set Options\n // The options argument overrides options set in the video tag\n // which overrides globally set options.\n // This latter part coincides with the load order\n // (tag must exist before Player)\n options = Object.assign(Player.getTagSettings(tag), options);\n\n // Delay the initialization of children because we need to set up\n // player properties first, and can't use `this` before `super()`\n options.initChildren = false;\n\n // Same with creating the element\n options.createEl = false;\n\n // don't auto mixin the evented mixin\n options.evented = false;\n\n // we don't want the player to report touch activity on itself\n // see enableTouchActivity in Component\n options.reportTouchActivity = false;\n\n // If language is not set, get the closest lang attribute\n if (!options.language) {\n var closest = tag.closest('[lang]');\n if (closest) {\n options.language = closest.getAttribute('lang');\n }\n }\n\n // Run base component initializing with new options\n _this105 = _super74.call(this, null, options, ready);\n\n // Create bound methods for document listeners.\n _this105.boundDocumentFullscreenChange_ = function (e) {\n return _this105.documentFullscreenChange_(e);\n };\n _this105.boundFullWindowOnEscKey_ = function (e) {\n return _this105.fullWindowOnEscKey(e);\n };\n _this105.boundUpdateStyleEl_ = function (e) {\n return _this105.updateStyleEl_(e);\n };\n _this105.boundApplyInitTime_ = function (e) {\n return _this105.applyInitTime_(e);\n };\n _this105.boundUpdateCurrentBreakpoint_ = function (e) {\n return _this105.updateCurrentBreakpoint_(e);\n };\n _this105.boundHandleTechClick_ = function (e) {\n return _this105.handleTechClick_(e);\n };\n _this105.boundHandleTechDoubleClick_ = function (e) {\n return _this105.handleTechDoubleClick_(e);\n };\n _this105.boundHandleTechTouchStart_ = function (e) {\n return _this105.handleTechTouchStart_(e);\n };\n _this105.boundHandleTechTouchMove_ = function (e) {\n return _this105.handleTechTouchMove_(e);\n };\n _this105.boundHandleTechTouchEnd_ = function (e) {\n return _this105.handleTechTouchEnd_(e);\n };\n _this105.boundHandleTechTap_ = function (e) {\n return _this105.handleTechTap_(e);\n };\n\n // default isFullscreen_ to false\n _this105.isFullscreen_ = false;\n\n // create logger\n _this105.log = createLogger(_this105.id_);\n\n // Hold our own reference to fullscreen api so it can be mocked in tests\n _this105.fsApi_ = FullscreenApi;\n\n // Tracks when a tech changes the poster\n _this105.isPosterFromTech_ = false;\n\n // Holds callback info that gets queued when playback rate is zero\n // and a seek is happening\n _this105.queuedCallbacks_ = [];\n\n // Turn off API access because we're loading a new tech that might load asynchronously\n _this105.isReady_ = false;\n\n // Init state hasStarted_\n _this105.hasStarted_ = false;\n\n // Init state userActive_\n _this105.userActive_ = false;\n\n // Init debugEnabled_\n _this105.debugEnabled_ = false;\n\n // Init state audioOnlyMode_\n _this105.audioOnlyMode_ = false;\n\n // Init state audioPosterMode_\n _this105.audioPosterMode_ = false;\n\n // Init state audioOnlyCache_\n _this105.audioOnlyCache_ = {\n playerHeight: null,\n hiddenChildren: []\n };\n\n // if the global option object was accidentally blown away by\n // someone, bail early with an informative error\n if (!_this105.options_ || !_this105.options_.techOrder || !_this105.options_.techOrder.length) {\n throw new Error('No techOrder specified. Did you overwrite ' + 'videojs.options instead of just changing the ' + 'properties you want to override?');\n }\n\n // Store the original tag used to set options\n _this105.tag = tag;\n\n // Store the tag attributes used to restore html5 element\n _this105.tagAttributes = tag && getAttributes(tag);\n\n // Update current language\n _this105.language(_this105.options_.language);\n\n // Update Supported Languages\n if (options.languages) {\n // Normalise player option languages to lowercase\n var languagesToLower = {};\n Object.getOwnPropertyNames(options.languages).forEach(function (name) {\n languagesToLower[name.toLowerCase()] = options.languages[name];\n });\n _this105.languages_ = languagesToLower;\n } else {\n _this105.languages_ = Player.prototype.options_.languages;\n }\n _this105.resetCache_();\n\n // Set poster\n /** @type string */\n _this105.poster_ = options.poster || '';\n\n // Set controls\n /** @type {boolean} */\n _this105.controls_ = !!options.controls;\n\n // Original tag settings stored in options\n // now remove immediately so native controls don't flash.\n // May be turned back on by HTML5 tech if nativeControlsForTouch is true\n tag.controls = false;\n tag.removeAttribute('controls');\n _this105.changingSrc_ = false;\n _this105.playCallbacks_ = [];\n _this105.playTerminatedQueue_ = [];\n\n // the attribute overrides the option\n if (tag.hasAttribute('autoplay')) {\n _this105.autoplay(true);\n } else {\n // otherwise use the setter to validate and\n // set the correct value.\n _this105.autoplay(_this105.options_.autoplay);\n }\n\n // check plugins\n if (options.plugins) {\n Object.keys(options.plugins).forEach(function (name) {\n if (typeof _this105[name] !== 'function') {\n throw new Error(\"plugin \\\"\".concat(name, \"\\\" does not exist\"));\n }\n });\n }\n\n /*\n * Store the internal state of scrubbing\n *\n * @private\n * @return {Boolean} True if the user is scrubbing\n */\n _this105.scrubbing_ = false;\n _this105.el_ = _this105.createEl();\n\n // Make this an evented object and use `el_` as its event bus.\n evented(_assertThisInitialized(_this105), {\n eventBusKey: 'el_'\n });\n\n // listen to document and player fullscreenchange handlers so we receive those events\n // before a user can receive them so we can update isFullscreen appropriately.\n // make sure that we listen to fullscreenchange events before everything else to make sure that\n // our isFullscreen method is updated properly for internal components as well as external.\n if (_this105.fsApi_.requestFullscreen) {\n _on(document, _this105.fsApi_.fullscreenchange, _this105.boundDocumentFullscreenChange_);\n _this105.on(_this105.fsApi_.fullscreenchange, _this105.boundDocumentFullscreenChange_);\n }\n if (_this105.fluid_) {\n _this105.on(['playerreset', 'resize'], _this105.boundUpdateStyleEl_);\n }\n // We also want to pass the original player options to each component and plugin\n // as well so they don't need to reach back into the player for options later.\n // We also need to do another copy of this.options_ so we don't end up with\n // an infinite loop.\n var playerOptionsCopy = merge$1(_this105.options_);\n\n // Load plugins\n if (options.plugins) {\n Object.keys(options.plugins).forEach(function (name) {\n _this105[name](options.plugins[name]);\n });\n }\n\n // Enable debug mode to fire debugon event for all plugins.\n if (options.debug) {\n _this105.debug(true);\n }\n _this105.options_.playerOptions = playerOptionsCopy;\n _this105.middleware_ = [];\n _this105.playbackRates(options.playbackRates);\n if (options.experimentalSvgIcons) {\n // Add SVG Sprite to the DOM\n var parser = new window$1.DOMParser();\n var parsedSVG = parser.parseFromString(icons, 'image/svg+xml');\n var errorNode = parsedSVG.querySelector('parsererror');\n if (errorNode) {\n log$1.warn('Failed to load SVG Icons. Falling back to Font Icons.');\n _this105.options_.experimentalSvgIcons = null;\n } else {\n var sprite = parsedSVG.documentElement;\n sprite.style.display = 'none';\n _this105.el_.appendChild(sprite);\n _this105.addClass('vjs-svg-icons-enabled');\n }\n }\n _this105.initChildren();\n\n // Set isAudio based on whether or not an audio tag was used\n _this105.isAudio(tag.nodeName.toLowerCase() === 'audio');\n\n // Update controls className. Can't do this when the controls are initially\n // set because the element doesn't exist yet.\n if (_this105.controls()) {\n _this105.addClass('vjs-controls-enabled');\n } else {\n _this105.addClass('vjs-controls-disabled');\n }\n\n // Set ARIA label and region role depending on player type\n _this105.el_.setAttribute('role', 'region');\n if (_this105.isAudio()) {\n _this105.el_.setAttribute('aria-label', _this105.localize('Audio Player'));\n } else {\n _this105.el_.setAttribute('aria-label', _this105.localize('Video Player'));\n }\n if (_this105.isAudio()) {\n _this105.addClass('vjs-audio');\n }\n\n // TODO: Make this smarter. Toggle user state between touching/mousing\n // using events, since devices can have both touch and mouse events.\n // TODO: Make this check be performed again when the window switches between monitors\n // (See https://github.com/videojs/video.js/issues/5683)\n if (TOUCH_ENABLED) {\n _this105.addClass('vjs-touch-enabled');\n }\n\n // iOS Safari has broken hover handling\n if (!IS_IOS) {\n _this105.addClass('vjs-workinghover');\n }\n\n // Make player easily findable by ID\n Player.players[_this105.id_] = _assertThisInitialized(_this105);\n\n // Add a major version class to aid css in plugins\n var majorVersion = version$6.split('.')[0];\n _this105.addClass(\"vjs-v\".concat(majorVersion));\n\n // When the player is first initialized, trigger activity so components\n // like the control bar show themselves if needed\n _this105.userActive(true);\n _this105.reportUserActivity();\n _this105.one('play', function (e) {\n return _this105.listenForUserActivity_(e);\n });\n _this105.on('keydown', function (e) {\n return _this105.handleKeyDown(e);\n });\n _this105.on('languagechange', function (e) {\n return _this105.handleLanguagechange(e);\n });\n _this105.breakpoints(_this105.options_.breakpoints);\n _this105.responsive(_this105.options_.responsive);\n\n // Calling both the audio mode methods after the player is fully\n // setup to be able to listen to the events triggered by them\n _this105.on('ready', function () {\n // Calling the audioPosterMode method first so that\n // the audioOnlyMode can take precedence when both options are set to true\n _this105.audioPosterMode(_this105.options_.audioPosterMode);\n _this105.audioOnlyMode(_this105.options_.audioOnlyMode);\n });\n return _this105;\n }\n\n /**\n * Destroys the video player and does any necessary cleanup.\n *\n * This is especially helpful if you are dynamically adding and removing videos\n * to/from the DOM.\n *\n * @fires Player#dispose\n */\n _createClass(Player, [{\n key: \"dispose\",\n value: function dispose() {\n var _this106 = this;\n /**\n * Called when the player is being disposed of.\n *\n * @event Player#dispose\n * @type {Event}\n */\n this.trigger('dispose');\n // prevent dispose from being called twice\n this.off('dispose');\n\n // Make sure all player-specific document listeners are unbound. This is\n _off(document, this.fsApi_.fullscreenchange, this.boundDocumentFullscreenChange_);\n _off(document, 'keydown', this.boundFullWindowOnEscKey_);\n if (this.styleEl_ && this.styleEl_.parentNode) {\n this.styleEl_.parentNode.removeChild(this.styleEl_);\n this.styleEl_ = null;\n }\n\n // Kill reference to this player\n Player.players[this.id_] = null;\n if (this.tag && this.tag.player) {\n this.tag.player = null;\n }\n if (this.el_ && this.el_.player) {\n this.el_.player = null;\n }\n if (this.tech_) {\n this.tech_.dispose();\n this.isPosterFromTech_ = false;\n this.poster_ = '';\n }\n if (this.playerElIngest_) {\n this.playerElIngest_ = null;\n }\n if (this.tag) {\n this.tag = null;\n }\n clearCacheForPlayer(this);\n\n // remove all event handlers for track lists\n // all tracks and track listeners are removed on\n // tech dispose\n ALL.names.forEach(function (name) {\n var props = ALL[name];\n var list = _this106[props.getterName]();\n\n // if it is not a native list\n // we have to manually remove event listeners\n if (list && list.off) {\n list.off();\n }\n });\n\n // the actual .el_ is removed here, or replaced if\n _get(_getPrototypeOf(Player.prototype), \"dispose\", this).call(this, {\n restoreEl: this.options_.restoreEl\n });\n }\n\n /**\n * Create the `Player`'s DOM element.\n *\n * @return {Element}\n * The DOM element that gets created.\n */\n }, {\n key: \"createEl\",\n value: function createEl() {\n var tag = this.tag;\n var el;\n var playerElIngest = this.playerElIngest_ = tag.parentNode && tag.parentNode.hasAttribute && tag.parentNode.hasAttribute('data-vjs-player');\n var divEmbed = this.tag.tagName.toLowerCase() === 'video-js';\n if (playerElIngest) {\n el = this.el_ = tag.parentNode;\n } else if (!divEmbed) {\n el = this.el_ = _get(_getPrototypeOf(Player.prototype), \"createEl\", this).call(this, 'div');\n }\n\n // Copy over all the attributes from the tag, including ID and class\n // ID will now reference player box, not the video tag\n var attrs = getAttributes(tag);\n if (divEmbed) {\n el = this.el_ = tag;\n tag = this.tag = document.createElement('video');\n while (el.children.length) {\n tag.appendChild(el.firstChild);\n }\n if (!_hasClass(el, 'video-js')) {\n _addClass(el, 'video-js');\n }\n el.appendChild(tag);\n playerElIngest = this.playerElIngest_ = el;\n // move properties over from our custom `video-js` element\n // to our new `video` element. This will move things like\n // `src` or `controls` that were set via js before the player\n // was initialized.\n Object.keys(el).forEach(function (k) {\n try {\n tag[k] = el[k];\n } catch (e) {\n // we got a a property like outerHTML which we can't actually copy, ignore it\n }\n });\n }\n\n // set tabindex to -1 to remove the video element from the focus order\n tag.setAttribute('tabindex', '-1');\n attrs.tabindex = '-1';\n\n // Workaround for #4583 on Chrome (on Windows) with JAWS.\n // See https://github.com/FreedomScientific/VFO-standards-support/issues/78\n // Note that we can't detect if JAWS is being used, but this ARIA attribute\n // doesn't change behavior of Chrome if JAWS is not being used\n if (IS_CHROME && IS_WINDOWS) {\n tag.setAttribute('role', 'application');\n attrs.role = 'application';\n }\n\n // Remove width/height attrs from tag so CSS can make it 100% width/height\n tag.removeAttribute('width');\n tag.removeAttribute('height');\n if ('width' in attrs) {\n delete attrs.width;\n }\n if ('height' in attrs) {\n delete attrs.height;\n }\n Object.getOwnPropertyNames(attrs).forEach(function (attr) {\n // don't copy over the class attribute to the player element when we're in a div embed\n // the class is already set up properly in the divEmbed case\n // and we want to make sure that the `video-js` class doesn't get lost\n if (!(divEmbed && attr === 'class')) {\n el.setAttribute(attr, attrs[attr]);\n }\n if (divEmbed) {\n tag.setAttribute(attr, attrs[attr]);\n }\n });\n\n // Update tag id/class for use as HTML5 playback tech\n // Might think we should do this after embedding in container so .vjs-tech class\n // doesn't flash 100% width/height, but class only applies with .video-js parent\n tag.playerId = tag.id;\n tag.id += '_html5_api';\n tag.className = 'vjs-tech';\n\n // Make player findable on elements\n tag.player = el.player = this;\n // Default state of video is paused\n this.addClass('vjs-paused');\n\n // Add a style element in the player that we'll use to set the width/height\n // of the player in a way that's still overridable by CSS, just like the\n // video element\n if (window$1.VIDEOJS_NO_DYNAMIC_STYLE !== true) {\n this.styleEl_ = createStyleElement('vjs-styles-dimensions');\n var defaultsStyleEl = _$('.vjs-styles-defaults');\n var head = _$('head');\n head.insertBefore(this.styleEl_, defaultsStyleEl ? defaultsStyleEl.nextSibling : head.firstChild);\n }\n this.fill_ = false;\n this.fluid_ = false;\n\n // Pass in the width/height/aspectRatio options which will update the style el\n this.width(this.options_.width);\n this.height(this.options_.height);\n this.fill(this.options_.fill);\n this.fluid(this.options_.fluid);\n this.aspectRatio(this.options_.aspectRatio);\n // support both crossOrigin and crossorigin to reduce confusion and issues around the name\n this.crossOrigin(this.options_.crossOrigin || this.options_.crossorigin);\n\n // Hide any links within the video/audio tag,\n // because IE doesn't hide them completely from screen readers.\n var links = tag.getElementsByTagName('a');\n for (var _i61 = 0; _i61 < links.length; _i61++) {\n var linkEl = links.item(_i61);\n _addClass(linkEl, 'vjs-hidden');\n linkEl.setAttribute('hidden', 'hidden');\n }\n\n // insertElFirst seems to cause the networkState to flicker from 3 to 2, so\n // keep track of the original for later so we can know if the source originally failed\n tag.initNetworkState_ = tag.networkState;\n\n // Wrap video tag in div (el/box) container\n if (tag.parentNode && !playerElIngest) {\n tag.parentNode.insertBefore(el, tag);\n }\n\n // insert the tag as the first child of the player element\n // then manually add it to the children array so that this.addChild\n // will work properly for other components\n //\n // Breaks iPhone, fixed in HTML5 setup.\n prependTo(tag, el);\n this.children_.unshift(tag);\n\n // Set lang attr on player to ensure CSS :lang() in consistent with player\n // if it's been set to something different to the doc\n this.el_.setAttribute('lang', this.language_);\n this.el_.setAttribute('translate', 'no');\n this.el_ = el;\n return el;\n }\n\n /**\n * Get or set the `Player`'s crossOrigin option. For the HTML5 player, this\n * sets the `crossOrigin` property on the `<video>` tag to control the CORS\n * behavior.\n *\n * @see [Video Element Attributes]{@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video#attr-crossorigin}\n *\n * @param {string|null} [value]\n * The value to set the `Player`'s crossOrigin to. If an argument is\n * given, must be one of `'anonymous'` or `'use-credentials'`, or 'null'.\n *\n * @return {string|null|undefined}\n * - The current crossOrigin value of the `Player` when getting.\n * - undefined when setting\n */\n }, {\n key: \"crossOrigin\",\n value: function crossOrigin(value) {\n // `null` can be set to unset a value\n if (typeof value === 'undefined') {\n return this.techGet_('crossOrigin');\n }\n if (value !== null && value !== 'anonymous' && value !== 'use-credentials') {\n log$1.warn(\"crossOrigin must be null, \\\"anonymous\\\" or \\\"use-credentials\\\", given \\\"\".concat(value, \"\\\"\"));\n return;\n }\n this.techCall_('setCrossOrigin', value);\n if (this.posterImage) {\n this.posterImage.crossOrigin(value);\n }\n return;\n }\n\n /**\n * A getter/setter for the `Player`'s width. Returns the player's configured value.\n * To get the current width use `currentWidth()`.\n *\n * @param {number|string} [value]\n * CSS value to set the `Player`'s width to.\n *\n * @return {number|undefined}\n * - The current width of the `Player` when getting.\n * - Nothing when setting\n */\n }, {\n key: \"width\",\n value: function width(value) {\n return this.dimension('width', value);\n }\n\n /**\n * A getter/setter for the `Player`'s height. Returns the player's configured value.\n * To get the current height use `currentheight()`.\n *\n * @param {number|string} [value]\n * CSS value to set the `Player`'s height to.\n *\n * @return {number|undefined}\n * - The current height of the `Player` when getting.\n * - Nothing when setting\n */\n }, {\n key: \"height\",\n value: function height(value) {\n return this.dimension('height', value);\n }\n\n /**\n * A getter/setter for the `Player`'s width & height.\n *\n * @param {string} dimension\n * This string can be:\n * - 'width'\n * - 'height'\n *\n * @param {number|string} [value]\n * Value for dimension specified in the first argument.\n *\n * @return {number}\n * The dimension arguments value when getting (width/height).\n */\n }, {\n key: \"dimension\",\n value: function dimension(_dimension, value) {\n var privDimension = _dimension + '_';\n if (value === undefined) {\n return this[privDimension] || 0;\n }\n if (value === '' || value === 'auto') {\n // If an empty string is given, reset the dimension to be automatic\n this[privDimension] = undefined;\n this.updateStyleEl_();\n return;\n }\n var parsedVal = parseFloat(value);\n if (isNaN(parsedVal)) {\n log$1.error(\"Improper value \\\"\".concat(value, \"\\\" supplied for for \").concat(_dimension));\n return;\n }\n this[privDimension] = parsedVal;\n this.updateStyleEl_();\n }\n\n /**\n * A getter/setter/toggler for the vjs-fluid `className` on the `Player`.\n *\n * Turning this on will turn off fill mode.\n *\n * @param {boolean} [bool]\n * - A value of true adds the class.\n * - A value of false removes the class.\n * - No value will be a getter.\n *\n * @return {boolean|undefined}\n * - The value of fluid when getting.\n * - `undefined` when setting.\n */\n }, {\n key: \"fluid\",\n value: function fluid(bool) {\n var _this107 = this;\n if (bool === undefined) {\n return !!this.fluid_;\n }\n this.fluid_ = !!bool;\n if (isEvented(this)) {\n this.off(['playerreset', 'resize'], this.boundUpdateStyleEl_);\n }\n if (bool) {\n this.addClass('vjs-fluid');\n this.fill(false);\n addEventedCallback(this, function () {\n _this107.on(['playerreset', 'resize'], _this107.boundUpdateStyleEl_);\n });\n } else {\n this.removeClass('vjs-fluid');\n }\n this.updateStyleEl_();\n }\n\n /**\n * A getter/setter/toggler for the vjs-fill `className` on the `Player`.\n *\n * Turning this on will turn off fluid mode.\n *\n * @param {boolean} [bool]\n * - A value of true adds the class.\n * - A value of false removes the class.\n * - No value will be a getter.\n *\n * @return {boolean|undefined}\n * - The value of fluid when getting.\n * - `undefined` when setting.\n */\n }, {\n key: \"fill\",\n value: function fill(bool) {\n if (bool === undefined) {\n return !!this.fill_;\n }\n this.fill_ = !!bool;\n if (bool) {\n this.addClass('vjs-fill');\n this.fluid(false);\n } else {\n this.removeClass('vjs-fill');\n }\n }\n\n /**\n * Get/Set the aspect ratio\n *\n * @param {string} [ratio]\n * Aspect ratio for player\n *\n * @return {string|undefined}\n * returns the current aspect ratio when getting\n */\n\n /**\n * A getter/setter for the `Player`'s aspect ratio.\n *\n * @param {string} [ratio]\n * The value to set the `Player`'s aspect ratio to.\n *\n * @return {string|undefined}\n * - The current aspect ratio of the `Player` when getting.\n * - undefined when setting\n */\n }, {\n key: \"aspectRatio\",\n value: function aspectRatio(ratio) {\n if (ratio === undefined) {\n return this.aspectRatio_;\n }\n\n // Check for width:height format\n if (!/^\\d+\\:\\d+$/.test(ratio)) {\n throw new Error('Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.');\n }\n this.aspectRatio_ = ratio;\n\n // We're assuming if you set an aspect ratio you want fluid mode,\n // because in fixed mode you could calculate width and height yourself.\n this.fluid(true);\n this.updateStyleEl_();\n }\n\n /**\n * Update styles of the `Player` element (height, width and aspect ratio).\n *\n * @private\n * @listens Tech#loadedmetadata\n */\n }, {\n key: \"updateStyleEl_\",\n value: function updateStyleEl_() {\n if (window$1.VIDEOJS_NO_DYNAMIC_STYLE === true) {\n var _width = typeof this.width_ === 'number' ? this.width_ : this.options_.width;\n var _height = typeof this.height_ === 'number' ? this.height_ : this.options_.height;\n var techEl = this.tech_ && this.tech_.el();\n if (techEl) {\n if (_width >= 0) {\n techEl.width = _width;\n }\n if (_height >= 0) {\n techEl.height = _height;\n }\n }\n return;\n }\n var width;\n var height;\n var aspectRatio;\n var idClass;\n\n // The aspect ratio is either used directly or to calculate width and height.\n if (this.aspectRatio_ !== undefined && this.aspectRatio_ !== 'auto') {\n // Use any aspectRatio that's been specifically set\n aspectRatio = this.aspectRatio_;\n } else if (this.videoWidth() > 0) {\n // Otherwise try to get the aspect ratio from the video metadata\n aspectRatio = this.videoWidth() + ':' + this.videoHeight();\n } else {\n // Or use a default. The video element's is 2:1, but 16:9 is more common.\n aspectRatio = '16:9';\n }\n\n // Get the ratio as a decimal we can use to calculate dimensions\n var ratioParts = aspectRatio.split(':');\n var ratioMultiplier = ratioParts[1] / ratioParts[0];\n if (this.width_ !== undefined) {\n // Use any width that's been specifically set\n width = this.width_;\n } else if (this.height_ !== undefined) {\n // Or calculate the width from the aspect ratio if a height has been set\n width = this.height_ / ratioMultiplier;\n } else {\n // Or use the video's metadata, or use the video el's default of 300\n width = this.videoWidth() || 300;\n }\n if (this.height_ !== undefined) {\n // Use any height that's been specifically set\n height = this.height_;\n } else {\n // Otherwise calculate the height from the ratio and the width\n height = width * ratioMultiplier;\n }\n\n // Ensure the CSS class is valid by starting with an alpha character\n if (/^[^a-zA-Z]/.test(this.id())) {\n idClass = 'dimensions-' + this.id();\n } else {\n idClass = this.id() + '-dimensions';\n }\n\n // Ensure the right class is still on the player for the style element\n this.addClass(idClass);\n setTextContent(this.styleEl_, \"\\n .\".concat(idClass, \" {\\n width: \").concat(width, \"px;\\n height: \").concat(height, \"px;\\n }\\n\\n .\").concat(idClass, \".vjs-fluid:not(.vjs-audio-only-mode) {\\n padding-top: \").concat(ratioMultiplier * 100, \"%;\\n }\\n \"));\n }\n\n /**\n * Load/Create an instance of playback {@link Tech} including element\n * and API methods. Then append the `Tech` element in `Player` as a child.\n *\n * @param {string} techName\n * name of the playback technology\n *\n * @param {string} source\n * video source\n *\n * @private\n */\n }, {\n key: \"loadTech_\",\n value: function loadTech_(techName, source) {\n var _this108 = this;\n // Pause and remove current playback technology\n if (this.tech_) {\n this.unloadTech_();\n }\n var titleTechName = toTitleCase$1(techName);\n var camelTechName = techName.charAt(0).toLowerCase() + techName.slice(1);\n\n // get rid of the HTML5 video tag as soon as we are using another tech\n if (titleTechName !== 'Html5' && this.tag) {\n Tech.getTech('Html5').disposeMediaElement(this.tag);\n this.tag.player = null;\n this.tag = null;\n }\n this.techName_ = titleTechName;\n\n // Turn off API access because we're loading a new tech that might load asynchronously\n this.isReady_ = false;\n var autoplay = this.autoplay();\n\n // if autoplay is a string (or `true` with normalizeAutoplay: true) we pass false to the tech\n // because the player is going to handle autoplay on `loadstart`\n if (typeof this.autoplay() === 'string' || this.autoplay() === true && this.options_.normalizeAutoplay) {\n autoplay = false;\n }\n\n // Grab tech-specific options from player options and add source and parent element to use.\n var techOptions = {\n source: source,\n autoplay: autoplay,\n 'nativeControlsForTouch': this.options_.nativeControlsForTouch,\n 'playerId': this.id(),\n 'techId': \"\".concat(this.id(), \"_\").concat(camelTechName, \"_api\"),\n 'playsinline': this.options_.playsinline,\n 'preload': this.options_.preload,\n 'loop': this.options_.loop,\n 'disablePictureInPicture': this.options_.disablePictureInPicture,\n 'muted': this.options_.muted,\n 'poster': this.poster(),\n 'language': this.language(),\n 'playerElIngest': this.playerElIngest_ || false,\n 'vtt.js': this.options_['vtt.js'],\n 'canOverridePoster': !!this.options_.techCanOverridePoster,\n 'enableSourceset': this.options_.enableSourceset\n };\n ALL.names.forEach(function (name) {\n var props = ALL[name];\n techOptions[props.getterName] = _this108[props.privateName];\n });\n Object.assign(techOptions, this.options_[titleTechName]);\n Object.assign(techOptions, this.options_[camelTechName]);\n Object.assign(techOptions, this.options_[techName.toLowerCase()]);\n if (this.tag) {\n techOptions.tag = this.tag;\n }\n if (source && source.src === this.cache_.src && this.cache_.currentTime > 0) {\n techOptions.startTime = this.cache_.currentTime;\n }\n\n // Initialize tech instance\n var TechClass = Tech.getTech(techName);\n if (!TechClass) {\n throw new Error(\"No Tech named '\".concat(titleTechName, \"' exists! '\").concat(titleTechName, \"' should be registered using videojs.registerTech()'\"));\n }\n this.tech_ = new TechClass(techOptions);\n\n // player.triggerReady is always async, so don't need this to be async\n this.tech_.ready(bind_(this, this.handleTechReady_), true);\n textTrackConverter.jsonToTextTracks(this.textTracksJson_ || [], this.tech_);\n\n // Listen to all HTML5-defined events and trigger them on the player\n TECH_EVENTS_RETRIGGER.forEach(function (event) {\n _this108.on(_this108.tech_, event, function (e) {\n return _this108[\"handleTech\".concat(toTitleCase$1(event), \"_\")](e);\n });\n });\n Object.keys(TECH_EVENTS_QUEUE).forEach(function (event) {\n _this108.on(_this108.tech_, event, function (eventObj) {\n if (_this108.tech_.playbackRate() === 0 && _this108.tech_.seeking()) {\n _this108.queuedCallbacks_.push({\n callback: _this108[\"handleTech\".concat(TECH_EVENTS_QUEUE[event], \"_\")].bind(_this108),\n event: eventObj\n });\n return;\n }\n _this108[\"handleTech\".concat(TECH_EVENTS_QUEUE[event], \"_\")](eventObj);\n });\n });\n this.on(this.tech_, 'loadstart', function (e) {\n return _this108.handleTechLoadStart_(e);\n });\n this.on(this.tech_, 'sourceset', function (e) {\n return _this108.handleTechSourceset_(e);\n });\n this.on(this.tech_, 'waiting', function (e) {\n return _this108.handleTechWaiting_(e);\n });\n this.on(this.tech_, 'ended', function (e) {\n return _this108.handleTechEnded_(e);\n });\n this.on(this.tech_, 'seeking', function (e) {\n return _this108.handleTechSeeking_(e);\n });\n this.on(this.tech_, 'play', function (e) {\n return _this108.handleTechPlay_(e);\n });\n this.on(this.tech_, 'pause', function (e) {\n return _this108.handleTechPause_(e);\n });\n this.on(this.tech_, 'durationchange', function (e) {\n return _this108.handleTechDurationChange_(e);\n });\n this.on(this.tech_, 'fullscreenchange', function (e, data) {\n return _this108.handleTechFullscreenChange_(e, data);\n });\n this.on(this.tech_, 'fullscreenerror', function (e, err) {\n return _this108.handleTechFullscreenError_(e, err);\n });\n this.on(this.tech_, 'enterpictureinpicture', function (e) {\n return _this108.handleTechEnterPictureInPicture_(e);\n });\n this.on(this.tech_, 'leavepictureinpicture', function (e) {\n return _this108.handleTechLeavePictureInPicture_(e);\n });\n this.on(this.tech_, 'error', function (e) {\n return _this108.handleTechError_(e);\n });\n this.on(this.tech_, 'posterchange', function (e) {\n return _this108.handleTechPosterChange_(e);\n });\n this.on(this.tech_, 'textdata', function (e) {\n return _this108.handleTechTextData_(e);\n });\n this.on(this.tech_, 'ratechange', function (e) {\n return _this108.handleTechRateChange_(e);\n });\n this.on(this.tech_, 'loadedmetadata', this.boundUpdateStyleEl_);\n this.usingNativeControls(this.techGet_('controls'));\n if (this.controls() && !this.usingNativeControls()) {\n this.addTechControlsListeners_();\n }\n\n // Add the tech element in the DOM if it was not already there\n // Make sure to not insert the original video element if using Html5\n if (this.tech_.el().parentNode !== this.el() && (titleTechName !== 'Html5' || !this.tag)) {\n prependTo(this.tech_.el(), this.el());\n }\n\n // Get rid of the original video tag reference after the first tech is loaded\n if (this.tag) {\n this.tag.player = null;\n this.tag = null;\n }\n }\n\n /**\n * Unload and dispose of the current playback {@link Tech}.\n *\n * @private\n */\n }, {\n key: \"unloadTech_\",\n value: function unloadTech_() {\n var _this109 = this;\n // Save the current text tracks so that we can reuse the same text tracks with the next tech\n ALL.names.forEach(function (name) {\n var props = ALL[name];\n _this109[props.privateName] = _this109[props.getterName]();\n });\n this.textTracksJson_ = textTrackConverter.textTracksToJson(this.tech_);\n this.isReady_ = false;\n this.tech_.dispose();\n this.tech_ = false;\n if (this.isPosterFromTech_) {\n this.poster_ = '';\n this.trigger('posterchange');\n }\n this.isPosterFromTech_ = false;\n }\n\n /**\n * Return a reference to the current {@link Tech}.\n * It will print a warning by default about the danger of using the tech directly\n * but any argument that is passed in will silence the warning.\n *\n * @param {*} [safety]\n * Anything passed in to silence the warning\n *\n * @return {Tech}\n * The Tech\n */\n }, {\n key: \"tech\",\n value: function tech(safety) {\n if (safety === undefined) {\n log$1.warn('Using the tech directly can be dangerous. I hope you know what you\\'re doing.\\n' + 'See https://github.com/videojs/video.js/issues/2617 for more info.\\n');\n }\n return this.tech_;\n }\n\n /**\n * Set up click and touch listeners for the playback element\n *\n * - On desktops: a click on the video itself will toggle playback\n * - On mobile devices: a click on the video toggles controls\n * which is done by toggling the user state between active and\n * inactive\n * - A tap can signal that a user has become active or has become inactive\n * e.g. a quick tap on an iPhone movie should reveal the controls. Another\n * quick tap should hide them again (signaling the user is in an inactive\n * viewing state)\n * - In addition to this, we still want the user to be considered inactive after\n * a few seconds of inactivity.\n *\n * > Note: the only part of iOS interaction we can't mimic with this setup\n * is a touch and hold on the video element counting as activity in order to\n * keep the controls showing, but that shouldn't be an issue. A touch and hold\n * on any controls will still keep the user active\n *\n * @private\n */\n }, {\n key: \"addTechControlsListeners_\",\n value: function addTechControlsListeners_() {\n // Make sure to remove all the previous listeners in case we are called multiple times.\n this.removeTechControlsListeners_();\n this.on(this.tech_, 'click', this.boundHandleTechClick_);\n this.on(this.tech_, 'dblclick', this.boundHandleTechDoubleClick_);\n\n // If the controls were hidden we don't want that to change without a tap event\n // so we'll check if the controls were already showing before reporting user\n // activity\n this.on(this.tech_, 'touchstart', this.boundHandleTechTouchStart_);\n this.on(this.tech_, 'touchmove', this.boundHandleTechTouchMove_);\n this.on(this.tech_, 'touchend', this.boundHandleTechTouchEnd_);\n\n // The tap listener needs to come after the touchend listener because the tap\n // listener cancels out any reportedUserActivity when setting userActive(false)\n this.on(this.tech_, 'tap', this.boundHandleTechTap_);\n }\n\n /**\n * Remove the listeners used for click and tap controls. This is needed for\n * toggling to controls disabled, where a tap/touch should do nothing.\n *\n * @private\n */\n }, {\n key: \"removeTechControlsListeners_\",\n value: function removeTechControlsListeners_() {\n // We don't want to just use `this.off()` because there might be other needed\n // listeners added by techs that extend this.\n this.off(this.tech_, 'tap', this.boundHandleTechTap_);\n this.off(this.tech_, 'touchstart', this.boundHandleTechTouchStart_);\n this.off(this.tech_, 'touchmove', this.boundHandleTechTouchMove_);\n this.off(this.tech_, 'touchend', this.boundHandleTechTouchEnd_);\n this.off(this.tech_, 'click', this.boundHandleTechClick_);\n this.off(this.tech_, 'dblclick', this.boundHandleTechDoubleClick_);\n }\n\n /**\n * Player waits for the tech to be ready\n *\n * @private\n */\n }, {\n key: \"handleTechReady_\",\n value: function handleTechReady_() {\n this.triggerReady();\n\n // Keep the same volume as before\n if (this.cache_.volume) {\n this.techCall_('setVolume', this.cache_.volume);\n }\n\n // Look if the tech found a higher resolution poster while loading\n this.handleTechPosterChange_();\n\n // Update the duration if available\n this.handleTechDurationChange_();\n }\n\n /**\n * Retrigger the `loadstart` event that was triggered by the {@link Tech}.\n *\n * @fires Player#loadstart\n * @listens Tech#loadstart\n * @private\n */\n }, {\n key: \"handleTechLoadStart_\",\n value: function handleTechLoadStart_() {\n // TODO: Update to use `emptied` event instead. See #1277.\n\n this.removeClass('vjs-ended', 'vjs-seeking');\n\n // reset the error state\n this.error(null);\n\n // Update the duration\n this.handleTechDurationChange_();\n if (!this.paused()) {\n /**\n * Fired when the user agent begins looking for media data\n *\n * @event Player#loadstart\n * @type {Event}\n */\n this.trigger('loadstart');\n } else {\n // reset the hasStarted state\n this.hasStarted(false);\n this.trigger('loadstart');\n }\n\n // autoplay happens after loadstart for the browser,\n // so we mimic that behavior\n this.manualAutoplay_(this.autoplay() === true && this.options_.normalizeAutoplay ? 'play' : this.autoplay());\n }\n\n /**\n * Handle autoplay string values, rather than the typical boolean\n * values that should be handled by the tech. Note that this is not\n * part of any specification. Valid values and what they do can be\n * found on the autoplay getter at Player#autoplay()\n */\n }, {\n key: \"manualAutoplay_\",\n value: function manualAutoplay_(type) {\n var _this110 = this;\n if (!this.tech_ || typeof type !== 'string') {\n return;\n }\n\n // Save original muted() value, set muted to true, and attempt to play().\n // On promise rejection, restore muted from saved value\n var resolveMuted = function resolveMuted() {\n var previouslyMuted = _this110.muted();\n _this110.muted(true);\n var restoreMuted = function restoreMuted() {\n _this110.muted(previouslyMuted);\n };\n\n // restore muted on play terminatation\n _this110.playTerminatedQueue_.push(restoreMuted);\n var mutedPromise = _this110.play();\n if (!isPromise(mutedPromise)) {\n return;\n }\n return mutedPromise[\"catch\"](function (err) {\n restoreMuted();\n throw new Error(\"Rejection at manualAutoplay. Restoring muted value. \".concat(err ? err : ''));\n });\n };\n var promise;\n\n // if muted defaults to true\n // the only thing we can do is call play\n if (type === 'any' && !this.muted()) {\n promise = this.play();\n if (isPromise(promise)) {\n promise = promise[\"catch\"](resolveMuted);\n }\n } else if (type === 'muted' && !this.muted()) {\n promise = resolveMuted();\n } else {\n promise = this.play();\n }\n if (!isPromise(promise)) {\n return;\n }\n return promise.then(function () {\n _this110.trigger({\n type: 'autoplay-success',\n autoplay: type\n });\n })[\"catch\"](function () {\n _this110.trigger({\n type: 'autoplay-failure',\n autoplay: type\n });\n });\n }\n\n /**\n * Update the internal source caches so that we return the correct source from\n * `src()`, `currentSource()`, and `currentSources()`.\n *\n * > Note: `currentSources` will not be updated if the source that is passed in exists\n * in the current `currentSources` cache.\n *\n *\n * @param {Tech~SourceObject} srcObj\n * A string or object source to update our caches to.\n */\n }, {\n key: \"updateSourceCaches_\",\n value: function updateSourceCaches_() {\n var srcObj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var src = srcObj;\n var type = '';\n if (typeof src !== 'string') {\n src = srcObj.src;\n type = srcObj.type;\n }\n\n // make sure all the caches are set to default values\n // to prevent null checking\n this.cache_.source = this.cache_.source || {};\n this.cache_.sources = this.cache_.sources || [];\n\n // try to get the type of the src that was passed in\n if (src && !type) {\n type = findMimetype(this, src);\n }\n\n // update `currentSource` cache always\n this.cache_.source = merge$1({}, srcObj, {\n src: src,\n type: type\n });\n var matchingSources = this.cache_.sources.filter(function (s) {\n return s.src && s.src === src;\n });\n var sourceElSources = [];\n var sourceEls = this.$$('source');\n var matchingSourceEls = [];\n for (var _i62 = 0; _i62 < sourceEls.length; _i62++) {\n var sourceObj = getAttributes(sourceEls[_i62]);\n sourceElSources.push(sourceObj);\n if (sourceObj.src && sourceObj.src === src) {\n matchingSourceEls.push(sourceObj.src);\n }\n }\n\n // if we have matching source els but not matching sources\n // the current source cache is not up to date\n if (matchingSourceEls.length && !matchingSources.length) {\n this.cache_.sources = sourceElSources;\n // if we don't have matching source or source els set the\n // sources cache to the `currentSource` cache\n } else if (!matchingSources.length) {\n this.cache_.sources = [this.cache_.source];\n }\n\n // update the tech `src` cache\n this.cache_.src = src;\n }\n\n /**\n * *EXPERIMENTAL* Fired when the source is set or changed on the {@link Tech}\n * causing the media element to reload.\n *\n * It will fire for the initial source and each subsequent source.\n * This event is a custom event from Video.js and is triggered by the {@link Tech}.\n *\n * The event object for this event contains a `src` property that will contain the source\n * that was available when the event was triggered. This is generally only necessary if Video.js\n * is switching techs while the source was being changed.\n *\n * It is also fired when `load` is called on the player (or media element)\n * because the {@link https://html.spec.whatwg.org/multipage/media.html#dom-media-load|specification for `load`}\n * says that the resource selection algorithm needs to be aborted and restarted.\n * In this case, it is very likely that the `src` property will be set to the\n * empty string `\"\"` to indicate we do not know what the source will be but\n * that it is changing.\n *\n * *This event is currently still experimental and may change in minor releases.*\n * __To use this, pass `enableSourceset` option to the player.__\n *\n * @event Player#sourceset\n * @type {Event}\n * @prop {string} src\n * The source url available when the `sourceset` was triggered.\n * It will be an empty string if we cannot know what the source is\n * but know that the source will change.\n */\n /**\n * Retrigger the `sourceset` event that was triggered by the {@link Tech}.\n *\n * @fires Player#sourceset\n * @listens Tech#sourceset\n * @private\n */\n }, {\n key: \"handleTechSourceset_\",\n value: function handleTechSourceset_(event) {\n var _this111 = this;\n // only update the source cache when the source\n // was not updated using the player api\n if (!this.changingSrc_) {\n var updateSourceCaches = function updateSourceCaches(src) {\n return _this111.updateSourceCaches_(src);\n };\n var playerSrc = this.currentSource().src;\n var eventSrc = event.src;\n\n // if we have a playerSrc that is not a blob, and a tech src that is a blob\n if (playerSrc && !/^blob:/.test(playerSrc) && /^blob:/.test(eventSrc)) {\n // if both the tech source and the player source were updated we assume\n // something like @videojs/http-streaming did the sourceset and skip updating the source cache.\n if (!this.lastSource_ || this.lastSource_.tech !== eventSrc && this.lastSource_.player !== playerSrc) {\n updateSourceCaches = function updateSourceCaches() {};\n }\n }\n\n // update the source to the initial source right away\n // in some cases this will be empty string\n updateSourceCaches(eventSrc);\n\n // if the `sourceset` `src` was an empty string\n // wait for a `loadstart` to update the cache to `currentSrc`.\n // If a sourceset happens before a `loadstart`, we reset the state\n if (!event.src) {\n this.tech_.any(['sourceset', 'loadstart'], function (e) {\n // if a sourceset happens before a `loadstart` there\n // is nothing to do as this `handleTechSourceset_`\n // will be called again and this will be handled there.\n if (e.type === 'sourceset') {\n return;\n }\n var techSrc = _this111.techGet_('currentSrc');\n _this111.lastSource_.tech = techSrc;\n _this111.updateSourceCaches_(techSrc);\n });\n }\n }\n this.lastSource_ = {\n player: this.currentSource().src,\n tech: event.src\n };\n this.trigger({\n src: event.src,\n type: 'sourceset'\n });\n }\n\n /**\n * Add/remove the vjs-has-started class\n *\n *\n * @param {boolean} request\n * - true: adds the class\n * - false: remove the class\n *\n * @return {boolean}\n * the boolean value of hasStarted_\n */\n }, {\n key: \"hasStarted\",\n value: function hasStarted(request) {\n if (request === undefined) {\n // act as getter, if we have no request to change\n return this.hasStarted_;\n }\n if (request === this.hasStarted_) {\n return;\n }\n this.hasStarted_ = request;\n if (this.hasStarted_) {\n this.addClass('vjs-has-started');\n } else {\n this.removeClass('vjs-has-started');\n }\n }\n\n /**\n * Fired whenever the media begins or resumes playback\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-play}\n * @fires Player#play\n * @listens Tech#play\n * @private\n */\n }, {\n key: \"handleTechPlay_\",\n value: function handleTechPlay_() {\n this.removeClass('vjs-ended', 'vjs-paused');\n this.addClass('vjs-playing');\n\n // hide the poster when the user hits play\n this.hasStarted(true);\n /**\n * Triggered whenever an {@link Tech#play} event happens. Indicates that\n * playback has started or resumed.\n *\n * @event Player#play\n * @type {Event}\n */\n this.trigger('play');\n }\n\n /**\n * Retrigger the `ratechange` event that was triggered by the {@link Tech}.\n *\n * If there were any events queued while the playback rate was zero, fire\n * those events now.\n *\n * @private\n * @method Player#handleTechRateChange_\n * @fires Player#ratechange\n * @listens Tech#ratechange\n */\n }, {\n key: \"handleTechRateChange_\",\n value: function handleTechRateChange_() {\n if (this.tech_.playbackRate() > 0 && this.cache_.lastPlaybackRate === 0) {\n this.queuedCallbacks_.forEach(function (queued) {\n return queued.callback(queued.event);\n });\n this.queuedCallbacks_ = [];\n }\n this.cache_.lastPlaybackRate = this.tech_.playbackRate();\n /**\n * Fires when the playing speed of the audio/video is changed\n *\n * @event Player#ratechange\n * @type {event}\n */\n this.trigger('ratechange');\n }\n\n /**\n * Retrigger the `waiting` event that was triggered by the {@link Tech}.\n *\n * @fires Player#waiting\n * @listens Tech#waiting\n * @private\n */\n }, {\n key: \"handleTechWaiting_\",\n value: function handleTechWaiting_() {\n var _this112 = this;\n this.addClass('vjs-waiting');\n /**\n * A readyState change on the DOM element has caused playback to stop.\n *\n * @event Player#waiting\n * @type {Event}\n */\n this.trigger('waiting');\n\n // Browsers may emit a timeupdate event after a waiting event. In order to prevent\n // premature removal of the waiting class, wait for the time to change.\n var timeWhenWaiting = this.currentTime();\n var timeUpdateListener = function timeUpdateListener() {\n if (timeWhenWaiting !== _this112.currentTime()) {\n _this112.removeClass('vjs-waiting');\n _this112.off('timeupdate', timeUpdateListener);\n }\n };\n this.on('timeupdate', timeUpdateListener);\n }\n\n /**\n * Retrigger the `canplay` event that was triggered by the {@link Tech}.\n * > Note: This is not consistent between browsers. See #1351\n *\n * @fires Player#canplay\n * @listens Tech#canplay\n * @private\n */\n }, {\n key: \"handleTechCanPlay_\",\n value: function handleTechCanPlay_() {\n this.removeClass('vjs-waiting');\n /**\n * The media has a readyState of HAVE_FUTURE_DATA or greater.\n *\n * @event Player#canplay\n * @type {Event}\n */\n this.trigger('canplay');\n }\n\n /**\n * Retrigger the `canplaythrough` event that was triggered by the {@link Tech}.\n *\n * @fires Player#canplaythrough\n * @listens Tech#canplaythrough\n * @private\n */\n }, {\n key: \"handleTechCanPlayThrough_\",\n value: function handleTechCanPlayThrough_() {\n this.removeClass('vjs-waiting');\n /**\n * The media has a readyState of HAVE_ENOUGH_DATA or greater. This means that the\n * entire media file can be played without buffering.\n *\n * @event Player#canplaythrough\n * @type {Event}\n */\n this.trigger('canplaythrough');\n }\n\n /**\n * Retrigger the `playing` event that was triggered by the {@link Tech}.\n *\n * @fires Player#playing\n * @listens Tech#playing\n * @private\n */\n }, {\n key: \"handleTechPlaying_\",\n value: function handleTechPlaying_() {\n this.removeClass('vjs-waiting');\n /**\n * The media is no longer blocked from playback, and has started playing.\n *\n * @event Player#playing\n * @type {Event}\n */\n this.trigger('playing');\n }\n\n /**\n * Retrigger the `seeking` event that was triggered by the {@link Tech}.\n *\n * @fires Player#seeking\n * @listens Tech#seeking\n * @private\n */\n }, {\n key: \"handleTechSeeking_\",\n value: function handleTechSeeking_() {\n this.addClass('vjs-seeking');\n /**\n * Fired whenever the player is jumping to a new time\n *\n * @event Player#seeking\n * @type {Event}\n */\n this.trigger('seeking');\n }\n\n /**\n * Retrigger the `seeked` event that was triggered by the {@link Tech}.\n *\n * @fires Player#seeked\n * @listens Tech#seeked\n * @private\n */\n }, {\n key: \"handleTechSeeked_\",\n value: function handleTechSeeked_() {\n this.removeClass('vjs-seeking', 'vjs-ended');\n /**\n * Fired when the player has finished jumping to a new time\n *\n * @event Player#seeked\n * @type {Event}\n */\n this.trigger('seeked');\n }\n\n /**\n * Retrigger the `pause` event that was triggered by the {@link Tech}.\n *\n * @fires Player#pause\n * @listens Tech#pause\n * @private\n */\n }, {\n key: \"handleTechPause_\",\n value: function handleTechPause_() {\n this.removeClass('vjs-playing');\n this.addClass('vjs-paused');\n /**\n * Fired whenever the media has been paused\n *\n * @event Player#pause\n * @type {Event}\n */\n this.trigger('pause');\n }\n\n /**\n * Retrigger the `ended` event that was triggered by the {@link Tech}.\n *\n * @fires Player#ended\n * @listens Tech#ended\n * @private\n */\n }, {\n key: \"handleTechEnded_\",\n value: function handleTechEnded_() {\n this.addClass('vjs-ended');\n this.removeClass('vjs-waiting');\n if (this.options_.loop) {\n this.currentTime(0);\n this.play();\n } else if (!this.paused()) {\n this.pause();\n }\n\n /**\n * Fired when the end of the media resource is reached (currentTime == duration)\n *\n * @event Player#ended\n * @type {Event}\n */\n this.trigger('ended');\n }\n\n /**\n * Fired when the duration of the media resource is first known or changed\n *\n * @listens Tech#durationchange\n * @private\n */\n }, {\n key: \"handleTechDurationChange_\",\n value: function handleTechDurationChange_() {\n this.duration(this.techGet_('duration'));\n }\n\n /**\n * Handle a click on the media element to play/pause\n *\n * @param {Event} event\n * the event that caused this function to trigger\n *\n * @listens Tech#click\n * @private\n */\n }, {\n key: \"handleTechClick_\",\n value: function handleTechClick_(event) {\n // When controls are disabled a click should not toggle playback because\n // the click is considered a control\n if (!this.controls_) {\n return;\n }\n if (this.options_ === undefined || this.options_.userActions === undefined || this.options_.userActions.click === undefined || this.options_.userActions.click !== false) {\n if (this.options_ !== undefined && this.options_.userActions !== undefined && typeof this.options_.userActions.click === 'function') {\n this.options_.userActions.click.call(this, event);\n } else if (this.paused()) {\n silencePromise(this.play());\n } else {\n this.pause();\n }\n }\n }\n\n /**\n * Handle a double-click on the media element to enter/exit fullscreen\n *\n * @param {Event} event\n * the event that caused this function to trigger\n *\n * @listens Tech#dblclick\n * @private\n */\n }, {\n key: \"handleTechDoubleClick_\",\n value: function handleTechDoubleClick_(event) {\n if (!this.controls_) {\n return;\n }\n\n // we do not want to toggle fullscreen state\n // when double-clicking inside a control bar or a modal\n var inAllowedEls = Array.prototype.some.call(this.$$('.vjs-control-bar, .vjs-modal-dialog'), function (el) {\n return el.contains(event.target);\n });\n if (!inAllowedEls) {\n /*\n * options.userActions.doubleClick\n *\n * If `undefined` or `true`, double-click toggles fullscreen if controls are present\n * Set to `false` to disable double-click handling\n * Set to a function to substitute an external double-click handler\n */\n if (this.options_ === undefined || this.options_.userActions === undefined || this.options_.userActions.doubleClick === undefined || this.options_.userActions.doubleClick !== false) {\n if (this.options_ !== undefined && this.options_.userActions !== undefined && typeof this.options_.userActions.doubleClick === 'function') {\n this.options_.userActions.doubleClick.call(this, event);\n } else if (this.isFullscreen()) {\n this.exitFullscreen();\n } else {\n this.requestFullscreen();\n }\n }\n }\n }\n\n /**\n * Handle a tap on the media element. It will toggle the user\n * activity state, which hides and shows the controls.\n *\n * @listens Tech#tap\n * @private\n */\n }, {\n key: \"handleTechTap_\",\n value: function handleTechTap_() {\n this.userActive(!this.userActive());\n }\n\n /**\n * Handle touch to start\n *\n * @listens Tech#touchstart\n * @private\n */\n }, {\n key: \"handleTechTouchStart_\",\n value: function handleTechTouchStart_() {\n this.userWasActive = this.userActive();\n }\n\n /**\n * Handle touch to move\n *\n * @listens Tech#touchmove\n * @private\n */\n }, {\n key: \"handleTechTouchMove_\",\n value: function handleTechTouchMove_() {\n if (this.userWasActive) {\n this.reportUserActivity();\n }\n }\n\n /**\n * Handle touch to end\n *\n * @param {Event} event\n * the touchend event that triggered\n * this function\n *\n * @listens Tech#touchend\n * @private\n */\n }, {\n key: \"handleTechTouchEnd_\",\n value: function handleTechTouchEnd_(event) {\n // Stop the mouse events from also happening\n if (event.cancelable) {\n event.preventDefault();\n }\n }\n\n /**\n * @private\n */\n }, {\n key: \"toggleFullscreenClass_\",\n value: function toggleFullscreenClass_() {\n if (this.isFullscreen()) {\n this.addClass('vjs-fullscreen');\n } else {\n this.removeClass('vjs-fullscreen');\n }\n }\n\n /**\n * when the document fschange event triggers it calls this\n */\n }, {\n key: \"documentFullscreenChange_\",\n value: function documentFullscreenChange_(e) {\n var targetPlayer = e.target.player;\n\n // if another player was fullscreen\n // do a null check for targetPlayer because older firefox's would put document as e.target\n if (targetPlayer && targetPlayer !== this) {\n return;\n }\n var el = this.el();\n var isFs = document[this.fsApi_.fullscreenElement] === el;\n if (!isFs && el.matches) {\n isFs = el.matches(':' + this.fsApi_.fullscreen);\n }\n this.isFullscreen(isFs);\n }\n\n /**\n * Handle Tech Fullscreen Change\n *\n * @param {Event} event\n * the fullscreenchange event that triggered this function\n *\n * @param {Object} data\n * the data that was sent with the event\n *\n * @private\n * @listens Tech#fullscreenchange\n * @fires Player#fullscreenchange\n */\n }, {\n key: \"handleTechFullscreenChange_\",\n value: function handleTechFullscreenChange_(event, data) {\n var _this113 = this;\n if (data) {\n if (data.nativeIOSFullscreen) {\n this.addClass('vjs-ios-native-fs');\n this.tech_.one('webkitendfullscreen', function () {\n _this113.removeClass('vjs-ios-native-fs');\n });\n }\n this.isFullscreen(data.isFullscreen);\n }\n }\n }, {\n key: \"handleTechFullscreenError_\",\n value: function handleTechFullscreenError_(event, err) {\n this.trigger('fullscreenerror', err);\n }\n\n /**\n * @private\n */\n }, {\n key: \"togglePictureInPictureClass_\",\n value: function togglePictureInPictureClass_() {\n if (this.isInPictureInPicture()) {\n this.addClass('vjs-picture-in-picture');\n } else {\n this.removeClass('vjs-picture-in-picture');\n }\n }\n\n /**\n * Handle Tech Enter Picture-in-Picture.\n *\n * @param {Event} event\n * the enterpictureinpicture event that triggered this function\n *\n * @private\n * @listens Tech#enterpictureinpicture\n */\n }, {\n key: \"handleTechEnterPictureInPicture_\",\n value: function handleTechEnterPictureInPicture_(event) {\n this.isInPictureInPicture(true);\n }\n\n /**\n * Handle Tech Leave Picture-in-Picture.\n *\n * @param {Event} event\n * the leavepictureinpicture event that triggered this function\n *\n * @private\n * @listens Tech#leavepictureinpicture\n */\n }, {\n key: \"handleTechLeavePictureInPicture_\",\n value: function handleTechLeavePictureInPicture_(event) {\n this.isInPictureInPicture(false);\n }\n\n /**\n * Fires when an error occurred during the loading of an audio/video.\n *\n * @private\n * @listens Tech#error\n */\n }, {\n key: \"handleTechError_\",\n value: function handleTechError_() {\n var error = this.tech_.error();\n if (error) {\n this.error(error);\n }\n }\n\n /**\n * Retrigger the `textdata` event that was triggered by the {@link Tech}.\n *\n * @fires Player#textdata\n * @listens Tech#textdata\n * @private\n */\n }, {\n key: \"handleTechTextData_\",\n value: function handleTechTextData_() {\n var data = null;\n if (arguments.length > 1) {\n data = arguments[1];\n }\n\n /**\n * Fires when we get a textdata event from tech\n *\n * @event Player#textdata\n * @type {Event}\n */\n this.trigger('textdata', data);\n }\n\n /**\n * Get object for cached values.\n *\n * @return {Object}\n * get the current object cache\n */\n }, {\n key: \"getCache\",\n value: function getCache() {\n return this.cache_;\n }\n\n /**\n * Resets the internal cache object.\n *\n * Using this function outside the player constructor or reset method may\n * have unintended side-effects.\n *\n * @private\n */\n }, {\n key: \"resetCache_\",\n value: function resetCache_() {\n this.cache_ = {\n // Right now, the currentTime is not _really_ cached because it is always\n // retrieved from the tech (see: currentTime). However, for completeness,\n // we set it to zero here to ensure that if we do start actually caching\n // it, we reset it along with everything else.\n currentTime: 0,\n initTime: 0,\n inactivityTimeout: this.options_.inactivityTimeout,\n duration: NaN,\n lastVolume: 1,\n lastPlaybackRate: this.defaultPlaybackRate(),\n media: null,\n src: '',\n source: {},\n sources: [],\n playbackRates: [],\n volume: 1\n };\n }\n\n /**\n * Pass values to the playback tech\n *\n * @param {string} [method]\n * the method to call\n *\n * @param {Object} [arg]\n * the argument to pass\n *\n * @private\n */\n }, {\n key: \"techCall_\",\n value: function techCall_(method, arg) {\n // If it's not ready yet, call method when it is\n\n this.ready(function () {\n if (method in allowedSetters) {\n return set(this.middleware_, this.tech_, method, arg);\n } else if (method in allowedMediators) {\n return mediate(this.middleware_, this.tech_, method, arg);\n }\n try {\n if (this.tech_) {\n this.tech_[method](arg);\n }\n } catch (e) {\n log$1(e);\n throw e;\n }\n }, true);\n }\n\n /**\n * Mediate attempt to call playback tech method\n * and return the value of the method called.\n *\n * @param {string} method\n * Tech method\n *\n * @return {*}\n * Value returned by the tech method called, undefined if tech\n * is not ready or tech method is not present\n *\n * @private\n */\n }, {\n key: \"techGet_\",\n value: function techGet_(method) {\n if (!this.tech_ || !this.tech_.isReady_) {\n return;\n }\n if (method in allowedGetters) {\n return get(this.middleware_, this.tech_, method);\n } else if (method in allowedMediators) {\n return mediate(this.middleware_, this.tech_, method);\n }\n\n // Log error when playback tech object is present but method\n // is undefined or unavailable\n try {\n return this.tech_[method]();\n } catch (e) {\n // When building additional tech libs, an expected method may not be defined yet\n if (this.tech_[method] === undefined) {\n log$1(\"Video.js: \".concat(method, \" method not defined for \").concat(this.techName_, \" playback technology.\"), e);\n throw e;\n }\n\n // When a method isn't available on the object it throws a TypeError\n if (e.name === 'TypeError') {\n log$1(\"Video.js: \".concat(method, \" unavailable on \").concat(this.techName_, \" playback technology element.\"), e);\n this.tech_.isReady_ = false;\n throw e;\n }\n\n // If error unknown, just log and throw\n log$1(e);\n throw e;\n }\n }\n\n /**\n * Attempt to begin playback at the first opportunity.\n *\n * @return {Promise|undefined}\n * Returns a promise if the browser supports Promises (or one\n * was passed in as an option). This promise will be resolved on\n * the return value of play. If this is undefined it will fulfill the\n * promise chain otherwise the promise chain will be fulfilled when\n * the promise from play is fulfilled.\n */\n }, {\n key: \"play\",\n value: function play() {\n var _this114 = this;\n return new Promise(function (resolve) {\n _this114.play_(resolve);\n });\n }\n\n /**\n * The actual logic for play, takes a callback that will be resolved on the\n * return value of play. This allows us to resolve to the play promise if there\n * is one on modern browsers.\n *\n * @private\n * @param {Function} [callback]\n * The callback that should be called when the techs play is actually called\n */\n }, {\n key: \"play_\",\n value: function play_() {\n var _this115 = this;\n var callback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : silencePromise;\n this.playCallbacks_.push(callback);\n var isSrcReady = Boolean(!this.changingSrc_ && (this.src() || this.currentSrc()));\n var isSafariOrIOS = Boolean(IS_ANY_SAFARI || IS_IOS);\n\n // treat calls to play_ somewhat like the `one` event function\n if (this.waitToPlay_) {\n this.off(['ready', 'loadstart'], this.waitToPlay_);\n this.waitToPlay_ = null;\n }\n\n // if the player/tech is not ready or the src itself is not ready\n // queue up a call to play on `ready` or `loadstart`\n if (!this.isReady_ || !isSrcReady) {\n this.waitToPlay_ = function (e) {\n _this115.play_();\n };\n this.one(['ready', 'loadstart'], this.waitToPlay_);\n\n // if we are in Safari, there is a high chance that loadstart will trigger after the gesture timeperiod\n // in that case, we need to prime the video element by calling load so it'll be ready in time\n if (!isSrcReady && isSafariOrIOS) {\n this.load();\n }\n return;\n }\n\n // If the player/tech is ready and we have a source, we can attempt playback.\n var val = this.techGet_('play');\n\n // For native playback, reset the progress bar if we get a play call from a replay.\n var isNativeReplay = isSafariOrIOS && this.hasClass('vjs-ended');\n if (isNativeReplay) {\n this.resetProgressBar_();\n }\n // play was terminated if the returned value is null\n if (val === null) {\n this.runPlayTerminatedQueue_();\n } else {\n this.runPlayCallbacks_(val);\n }\n }\n\n /**\n * These functions will be run when if play is terminated. If play\n * runPlayCallbacks_ is run these function will not be run. This allows us\n * to differentiate between a terminated play and an actual call to play.\n */\n }, {\n key: \"runPlayTerminatedQueue_\",\n value: function runPlayTerminatedQueue_() {\n var queue = this.playTerminatedQueue_.slice(0);\n this.playTerminatedQueue_ = [];\n queue.forEach(function (q) {\n q();\n });\n }\n\n /**\n * When a callback to play is delayed we have to run these\n * callbacks when play is actually called on the tech. This function\n * runs the callbacks that were delayed and accepts the return value\n * from the tech.\n *\n * @param {undefined|Promise} val\n * The return value from the tech.\n */\n }, {\n key: \"runPlayCallbacks_\",\n value: function runPlayCallbacks_(val) {\n var callbacks = this.playCallbacks_.slice(0);\n this.playCallbacks_ = [];\n // clear play terminatedQueue since we finished a real play\n this.playTerminatedQueue_ = [];\n callbacks.forEach(function (cb) {\n cb(val);\n });\n }\n\n /**\n * Pause the video playback\n */\n }, {\n key: \"pause\",\n value: function pause() {\n this.techCall_('pause');\n }\n\n /**\n * Check if the player is paused or has yet to play\n *\n * @return {boolean}\n * - false: if the media is currently playing\n * - true: if media is not currently playing\n */\n }, {\n key: \"paused\",\n value: function paused() {\n // The initial state of paused should be true (in Safari it's actually false)\n return this.techGet_('paused') === false ? false : true;\n }\n\n /**\n * Get a TimeRange object representing the current ranges of time that the user\n * has played.\n *\n * @return { import('./utils/time').TimeRange }\n * A time range object that represents all the increments of time that have\n * been played.\n */\n }, {\n key: \"played\",\n value: function played() {\n return this.techGet_('played') || createTimeRanges$1(0, 0);\n }\n\n /**\n * Sets or returns whether or not the user is \"scrubbing\". Scrubbing is\n * when the user has clicked the progress bar handle and is\n * dragging it along the progress bar.\n *\n * @param {boolean} [isScrubbing]\n * whether the user is or is not scrubbing\n *\n * @return {boolean|undefined}\n * - The value of scrubbing when getting\n * - Nothing when setting\n */\n }, {\n key: \"scrubbing\",\n value: function scrubbing(isScrubbing) {\n if (typeof isScrubbing === 'undefined') {\n return this.scrubbing_;\n }\n this.scrubbing_ = !!isScrubbing;\n this.techCall_('setScrubbing', this.scrubbing_);\n if (isScrubbing) {\n this.addClass('vjs-scrubbing');\n } else {\n this.removeClass('vjs-scrubbing');\n }\n }\n\n /**\n * Get or set the current time (in seconds)\n *\n * @param {number|string} [seconds]\n * The time to seek to in seconds\n *\n * @return {number|undefined}\n * - the current time in seconds when getting\n * - Nothing when setting\n */\n }, {\n key: \"currentTime\",\n value: function currentTime(seconds) {\n if (seconds === undefined) {\n // cache last currentTime and return. default to 0 seconds\n //\n // Caching the currentTime is meant to prevent a massive amount of reads on the tech's\n // currentTime when scrubbing, but may not provide much performance benefit after all.\n // Should be tested. Also something has to read the actual current time or the cache will\n // never get updated.\n this.cache_.currentTime = this.techGet_('currentTime') || 0;\n return this.cache_.currentTime;\n }\n if (seconds < 0) {\n seconds = 0;\n }\n if (!this.isReady_ || this.changingSrc_ || !this.tech_ || !this.tech_.isReady_) {\n this.cache_.initTime = seconds;\n this.off('canplay', this.boundApplyInitTime_);\n this.one('canplay', this.boundApplyInitTime_);\n return;\n }\n this.techCall_('setCurrentTime', seconds);\n this.cache_.initTime = 0;\n if (isFinite(seconds)) {\n this.cache_.currentTime = Number(seconds);\n }\n }\n\n /**\n * Apply the value of initTime stored in cache as currentTime.\n *\n * @private\n */\n }, {\n key: \"applyInitTime_\",\n value: function applyInitTime_() {\n this.currentTime(this.cache_.initTime);\n }\n\n /**\n * Normally gets the length in time of the video in seconds;\n * in all but the rarest use cases an argument will NOT be passed to the method\n *\n * > **NOTE**: The video must have started loading before the duration can be\n * known, and depending on preload behaviour may not be known until the video starts\n * playing.\n *\n * @fires Player#durationchange\n *\n * @param {number} [seconds]\n * The duration of the video to set in seconds\n *\n * @return {number|undefined}\n * - The duration of the video in seconds when getting\n * - Nothing when setting\n */\n }, {\n key: \"duration\",\n value: function duration(seconds) {\n if (seconds === undefined) {\n // return NaN if the duration is not known\n return this.cache_.duration !== undefined ? this.cache_.duration : NaN;\n }\n seconds = parseFloat(seconds);\n\n // Standardize on Infinity for signaling video is live\n if (seconds < 0) {\n seconds = Infinity;\n }\n if (seconds !== this.cache_.duration) {\n // Cache the last set value for optimized scrubbing\n this.cache_.duration = seconds;\n if (seconds === Infinity) {\n this.addClass('vjs-live');\n } else {\n this.removeClass('vjs-live');\n }\n if (!isNaN(seconds)) {\n // Do not fire durationchange unless the duration value is known.\n // @see [Spec]{@link https://www.w3.org/TR/2011/WD-html5-20110113/video.html#media-element-load-algorithm}\n\n /**\n * @event Player#durationchange\n * @type {Event}\n */\n this.trigger('durationchange');\n }\n }\n }\n\n /**\n * Calculates how much time is left in the video. Not part\n * of the native video API.\n *\n * @return {number}\n * The time remaining in seconds\n */\n }, {\n key: \"remainingTime\",\n value: function remainingTime() {\n return this.duration() - this.currentTime();\n }\n\n /**\n * A remaining time function that is intended to be used when\n * the time is to be displayed directly to the user.\n *\n * @return {number}\n * The rounded time remaining in seconds\n */\n }, {\n key: \"remainingTimeDisplay\",\n value: function remainingTimeDisplay() {\n return Math.floor(this.duration()) - Math.floor(this.currentTime());\n }\n\n //\n // Kind of like an array of portions of the video that have been downloaded.\n\n /**\n * Get a TimeRange object with an array of the times of the video\n * that have been downloaded. If you just want the percent of the\n * video that's been downloaded, use bufferedPercent.\n *\n * @see [Buffered Spec]{@link http://dev.w3.org/html5/spec/video.html#dom-media-buffered}\n *\n * @return { import('./utils/time').TimeRange }\n * A mock {@link TimeRanges} object (following HTML spec)\n */\n }, {\n key: \"buffered\",\n value: function buffered() {\n var buffered = this.techGet_('buffered');\n if (!buffered || !buffered.length) {\n buffered = createTimeRanges$1(0, 0);\n }\n return buffered;\n }\n\n /**\n * Get the percent (as a decimal) of the video that's been downloaded.\n * This method is not a part of the native HTML video API.\n *\n * @return {number}\n * A decimal between 0 and 1 representing the percent\n * that is buffered 0 being 0% and 1 being 100%\n */\n }, {\n key: \"bufferedPercent\",\n value: function bufferedPercent() {\n return _bufferedPercent(this.buffered(), this.duration());\n }\n\n /**\n * Get the ending time of the last buffered time range\n * This is used in the progress bar to encapsulate all time ranges.\n *\n * @return {number}\n * The end of the last buffered time range\n */\n }, {\n key: \"bufferedEnd\",\n value: function bufferedEnd() {\n var buffered = this.buffered();\n var duration = this.duration();\n var end = buffered.end(buffered.length - 1);\n if (end > duration) {\n end = duration;\n }\n return end;\n }\n\n /**\n * Get or set the current volume of the media\n *\n * @param {number} [percentAsDecimal]\n * The new volume as a decimal percent:\n * - 0 is muted/0%/off\n * - 1.0 is 100%/full\n * - 0.5 is half volume or 50%\n *\n * @return {number|undefined}\n * The current volume as a percent when getting\n */\n }, {\n key: \"volume\",\n value: function volume(percentAsDecimal) {\n var vol;\n if (percentAsDecimal !== undefined) {\n // Force value to between 0 and 1\n vol = Math.max(0, Math.min(1, percentAsDecimal));\n this.cache_.volume = vol;\n this.techCall_('setVolume', vol);\n if (vol > 0) {\n this.lastVolume_(vol);\n }\n return;\n }\n\n // Default to 1 when returning current volume.\n vol = parseFloat(this.techGet_('volume'));\n return isNaN(vol) ? 1 : vol;\n }\n\n /**\n * Get the current muted state, or turn mute on or off\n *\n * @param {boolean} [muted]\n * - true to mute\n * - false to unmute\n *\n * @return {boolean|undefined}\n * - true if mute is on and getting\n * - false if mute is off and getting\n * - nothing if setting\n */\n }, {\n key: \"muted\",\n value: function muted(_muted) {\n if (_muted !== undefined) {\n this.techCall_('setMuted', _muted);\n return;\n }\n return this.techGet_('muted') || false;\n }\n\n /**\n * Get the current defaultMuted state, or turn defaultMuted on or off. defaultMuted\n * indicates the state of muted on initial playback.\n *\n * ```js\n * var myPlayer = videojs('some-player-id');\n *\n * myPlayer.src(\"http://www.example.com/path/to/video.mp4\");\n *\n * // get, should be false\n * console.log(myPlayer.defaultMuted());\n * // set to true\n * myPlayer.defaultMuted(true);\n * // get should be true\n * console.log(myPlayer.defaultMuted());\n * ```\n *\n * @param {boolean} [defaultMuted]\n * - true to mute\n * - false to unmute\n *\n * @return {boolean|undefined}\n * - true if defaultMuted is on and getting\n * - false if defaultMuted is off and getting\n * - Nothing when setting\n */\n }, {\n key: \"defaultMuted\",\n value: function defaultMuted(_defaultMuted) {\n if (_defaultMuted !== undefined) {\n this.techCall_('setDefaultMuted', _defaultMuted);\n }\n return this.techGet_('defaultMuted') || false;\n }\n\n /**\n * Get the last volume, or set it\n *\n * @param {number} [percentAsDecimal]\n * The new last volume as a decimal percent:\n * - 0 is muted/0%/off\n * - 1.0 is 100%/full\n * - 0.5 is half volume or 50%\n *\n * @return {number|undefined}\n * - The current value of lastVolume as a percent when getting\n * - Nothing when setting\n *\n * @private\n */\n }, {\n key: \"lastVolume_\",\n value: function lastVolume_(percentAsDecimal) {\n if (percentAsDecimal !== undefined && percentAsDecimal !== 0) {\n this.cache_.lastVolume = percentAsDecimal;\n return;\n }\n return this.cache_.lastVolume;\n }\n\n /**\n * Check if current tech can support native fullscreen\n * (e.g. with built in controls like iOS)\n *\n * @return {boolean}\n * if native fullscreen is supported\n */\n }, {\n key: \"supportsFullScreen\",\n value: function supportsFullScreen() {\n return this.techGet_('supportsFullScreen') || false;\n }\n\n /**\n * Check if the player is in fullscreen mode or tell the player that it\n * is or is not in fullscreen mode.\n *\n * > NOTE: As of the latest HTML5 spec, isFullscreen is no longer an official\n * property and instead document.fullscreenElement is used. But isFullscreen is\n * still a valuable property for internal player workings.\n *\n * @param {boolean} [isFS]\n * Set the players current fullscreen state\n *\n * @return {boolean|undefined}\n * - true if fullscreen is on and getting\n * - false if fullscreen is off and getting\n * - Nothing when setting\n */\n }, {\n key: \"isFullscreen\",\n value: function isFullscreen(isFS) {\n if (isFS !== undefined) {\n var oldValue = this.isFullscreen_;\n this.isFullscreen_ = Boolean(isFS);\n\n // if we changed fullscreen state and we're in prefixed mode, trigger fullscreenchange\n // this is the only place where we trigger fullscreenchange events for older browsers\n // fullWindow mode is treated as a prefixed event and will get a fullscreenchange event as well\n if (this.isFullscreen_ !== oldValue && this.fsApi_.prefixed) {\n /**\n * @event Player#fullscreenchange\n * @type {Event}\n */\n this.trigger('fullscreenchange');\n }\n this.toggleFullscreenClass_();\n return;\n }\n return this.isFullscreen_;\n }\n\n /**\n * Increase the size of the video to full screen\n * In some browsers, full screen is not supported natively, so it enters\n * \"full window mode\", where the video fills the browser window.\n * In browsers and devices that support native full screen, sometimes the\n * browser's default controls will be shown, and not the Video.js custom skin.\n * This includes most mobile devices (iOS, Android) and older versions of\n * Safari.\n *\n * @param {Object} [fullscreenOptions]\n * Override the player fullscreen options\n *\n * @fires Player#fullscreenchange\n */\n }, {\n key: \"requestFullscreen\",\n value: function requestFullscreen(fullscreenOptions) {\n if (this.isInPictureInPicture()) {\n this.exitPictureInPicture();\n }\n var self = this;\n return new Promise(function (resolve, reject) {\n function offHandler() {\n self.off('fullscreenerror', errorHandler);\n self.off('fullscreenchange', changeHandler);\n }\n function changeHandler() {\n offHandler();\n resolve();\n }\n function errorHandler(e, err) {\n offHandler();\n reject(err);\n }\n self.one('fullscreenchange', changeHandler);\n self.one('fullscreenerror', errorHandler);\n var promise = self.requestFullscreenHelper_(fullscreenOptions);\n if (promise) {\n promise.then(offHandler, offHandler);\n promise.then(resolve, reject);\n }\n });\n }\n }, {\n key: \"requestFullscreenHelper_\",\n value: function requestFullscreenHelper_(fullscreenOptions) {\n var _this116 = this;\n var fsOptions;\n\n // Only pass fullscreen options to requestFullscreen in spec-compliant browsers.\n // Use defaults or player configured option unless passed directly to this method.\n if (!this.fsApi_.prefixed) {\n fsOptions = this.options_.fullscreen && this.options_.fullscreen.options || {};\n if (fullscreenOptions !== undefined) {\n fsOptions = fullscreenOptions;\n }\n }\n\n // This method works as follows:\n // 1. if a fullscreen api is available, use it\n // 1. call requestFullscreen with potential options\n // 2. if we got a promise from above, use it to update isFullscreen()\n // 2. otherwise, if the tech supports fullscreen, call `enterFullScreen` on it.\n // This is particularly used for iPhone, older iPads, and non-safari browser on iOS.\n // 3. otherwise, use \"fullWindow\" mode\n if (this.fsApi_.requestFullscreen) {\n var promise = this.el_[this.fsApi_.requestFullscreen](fsOptions);\n\n // Even on browsers with promise support this may not return a promise\n if (promise) {\n promise.then(function () {\n return _this116.isFullscreen(true);\n }, function () {\n return _this116.isFullscreen(false);\n });\n }\n return promise;\n } else if (this.tech_.supportsFullScreen() && !this.options_.preferFullWindow === true) {\n // we can't take the video.js controls fullscreen but we can go fullscreen\n // with native controls\n this.techCall_('enterFullScreen');\n } else {\n // fullscreen isn't supported so we'll just stretch the video element to\n // fill the viewport\n this.enterFullWindow();\n }\n }\n\n /**\n * Return the video to its normal size after having been in full screen mode\n *\n * @fires Player#fullscreenchange\n */\n }, {\n key: \"exitFullscreen\",\n value: function exitFullscreen() {\n var self = this;\n return new Promise(function (resolve, reject) {\n function offHandler() {\n self.off('fullscreenerror', errorHandler);\n self.off('fullscreenchange', changeHandler);\n }\n function changeHandler() {\n offHandler();\n resolve();\n }\n function errorHandler(e, err) {\n offHandler();\n reject(err);\n }\n self.one('fullscreenchange', changeHandler);\n self.one('fullscreenerror', errorHandler);\n var promise = self.exitFullscreenHelper_();\n if (promise) {\n promise.then(offHandler, offHandler);\n // map the promise to our resolve/reject methods\n promise.then(resolve, reject);\n }\n });\n }\n }, {\n key: \"exitFullscreenHelper_\",\n value: function exitFullscreenHelper_() {\n var _this117 = this;\n if (this.fsApi_.requestFullscreen) {\n var promise = document[this.fsApi_.exitFullscreen]();\n\n // Even on browsers with promise support this may not return a promise\n if (promise) {\n // we're splitting the promise here, so, we want to catch the\n // potential error so that this chain doesn't have unhandled errors\n silencePromise(promise.then(function () {\n return _this117.isFullscreen(false);\n }));\n }\n return promise;\n } else if (this.tech_.supportsFullScreen() && !this.options_.preferFullWindow === true) {\n this.techCall_('exitFullScreen');\n } else {\n this.exitFullWindow();\n }\n }\n\n /**\n * When fullscreen isn't supported we can stretch the\n * video container to as wide as the browser will let us.\n *\n * @fires Player#enterFullWindow\n */\n }, {\n key: \"enterFullWindow\",\n value: function enterFullWindow() {\n this.isFullscreen(true);\n this.isFullWindow = true;\n\n // Storing original doc overflow value to return to when fullscreen is off\n this.docOrigOverflow = document.documentElement.style.overflow;\n\n // Add listener for esc key to exit fullscreen\n _on(document, 'keydown', this.boundFullWindowOnEscKey_);\n\n // Hide any scroll bars\n document.documentElement.style.overflow = 'hidden';\n\n // Apply fullscreen styles\n _addClass(document.body, 'vjs-full-window');\n\n /**\n * @event Player#enterFullWindow\n * @type {Event}\n */\n this.trigger('enterFullWindow');\n }\n\n /**\n * Check for call to either exit full window or\n * full screen on ESC key\n *\n * @param {string} event\n * Event to check for key press\n */\n }, {\n key: \"fullWindowOnEscKey\",\n value: function fullWindowOnEscKey(event) {\n if (keycode.isEventKey(event, 'Esc')) {\n if (this.isFullscreen() === true) {\n if (!this.isFullWindow) {\n this.exitFullscreen();\n } else {\n this.exitFullWindow();\n }\n }\n }\n }\n\n /**\n * Exit full window\n *\n * @fires Player#exitFullWindow\n */\n }, {\n key: \"exitFullWindow\",\n value: function exitFullWindow() {\n this.isFullscreen(false);\n this.isFullWindow = false;\n _off(document, 'keydown', this.boundFullWindowOnEscKey_);\n\n // Unhide scroll bars.\n document.documentElement.style.overflow = this.docOrigOverflow;\n\n // Remove fullscreen styles\n _removeClass(document.body, 'vjs-full-window');\n\n // Resize the box, controller, and poster to original sizes\n // this.positionAll();\n /**\n * @event Player#exitFullWindow\n * @type {Event}\n */\n this.trigger('exitFullWindow');\n }\n\n /**\n * Get or set disable Picture-in-Picture mode.\n *\n * @param {boolean} [value]\n * - true will disable Picture-in-Picture mode\n * - false will enable Picture-in-Picture mode\n */\n }, {\n key: \"disablePictureInPicture\",\n value: function disablePictureInPicture(value) {\n if (value === undefined) {\n return this.techGet_('disablePictureInPicture');\n }\n this.techCall_('setDisablePictureInPicture', value);\n this.options_.disablePictureInPicture = value;\n this.trigger('disablepictureinpicturechanged');\n }\n\n /**\n * Check if the player is in Picture-in-Picture mode or tell the player that it\n * is or is not in Picture-in-Picture mode.\n *\n * @param {boolean} [isPiP]\n * Set the players current Picture-in-Picture state\n *\n * @return {boolean|undefined}\n * - true if Picture-in-Picture is on and getting\n * - false if Picture-in-Picture is off and getting\n * - nothing if setting\n */\n }, {\n key: \"isInPictureInPicture\",\n value: function isInPictureInPicture(isPiP) {\n if (isPiP !== undefined) {\n this.isInPictureInPicture_ = !!isPiP;\n this.togglePictureInPictureClass_();\n return;\n }\n return !!this.isInPictureInPicture_;\n }\n\n /**\n * Create a floating video window always on top of other windows so that users may\n * continue consuming media while they interact with other content sites, or\n * applications on their device.\n *\n * This can use document picture-in-picture or element picture in picture\n *\n * Set `enableDocumentPictureInPicture` to `true` to use docPiP on a supported browser\n * Else set `disablePictureInPicture` to `false` to disable elPiP on a supported browser\n *\n *\n * @see [Spec]{@link https://w3c.github.io/picture-in-picture/}\n * @see [Spec]{@link https://wicg.github.io/document-picture-in-picture/}\n *\n * @fires Player#enterpictureinpicture\n *\n * @return {Promise}\n * A promise with a Picture-in-Picture window.\n */\n }, {\n key: \"requestPictureInPicture\",\n value: function requestPictureInPicture() {\n var _this118 = this;\n if (this.options_.enableDocumentPictureInPicture && window$1.documentPictureInPicture) {\n var pipContainer = document.createElement(this.el().tagName);\n pipContainer.classList = this.el().classList;\n pipContainer.classList.add('vjs-pip-container');\n if (this.posterImage) {\n pipContainer.appendChild(this.posterImage.el().cloneNode(true));\n }\n if (this.titleBar) {\n pipContainer.appendChild(this.titleBar.el().cloneNode(true));\n }\n pipContainer.appendChild(_createEl('p', {\n className: 'vjs-pip-text'\n }, {}, this.localize('Playing in picture-in-picture')));\n return window$1.documentPictureInPicture.requestWindow({\n // The aspect ratio won't be correct, Chrome bug https://crbug.com/1407629\n width: this.videoWidth(),\n height: this.videoHeight()\n }).then(function (pipWindow) {\n copyStyleSheetsToWindow(pipWindow);\n _this118.el_.parentNode.insertBefore(pipContainer, _this118.el_);\n pipWindow.document.body.appendChild(_this118.el_);\n pipWindow.document.body.classList.add('vjs-pip-window');\n _this118.player_.isInPictureInPicture(true);\n _this118.player_.trigger('enterpictureinpicture');\n\n // Listen for the PiP closing event to move the video back.\n pipWindow.addEventListener('pagehide', function (event) {\n var pipVideo = event.target.querySelector('.video-js');\n pipContainer.parentNode.replaceChild(pipVideo, pipContainer);\n _this118.player_.isInPictureInPicture(false);\n _this118.player_.trigger('leavepictureinpicture');\n });\n return pipWindow;\n });\n }\n if ('pictureInPictureEnabled' in document && this.disablePictureInPicture() === false) {\n /**\n * This event fires when the player enters picture in picture mode\n *\n * @event Player#enterpictureinpicture\n * @type {Event}\n */\n return this.techGet_('requestPictureInPicture');\n }\n return Promise.reject('No PiP mode is available');\n }\n\n /**\n * Exit Picture-in-Picture mode.\n *\n * @see [Spec]{@link https://wicg.github.io/picture-in-picture}\n *\n * @fires Player#leavepictureinpicture\n *\n * @return {Promise}\n * A promise.\n */\n }, {\n key: \"exitPictureInPicture\",\n value: function exitPictureInPicture() {\n if (window$1.documentPictureInPicture && window$1.documentPictureInPicture.window) {\n // With documentPictureInPicture, Player#leavepictureinpicture is fired in the pagehide handler\n window$1.documentPictureInPicture.window.close();\n return Promise.resolve();\n }\n if ('pictureInPictureEnabled' in document) {\n /**\n * This event fires when the player leaves picture in picture mode\n *\n * @event Player#leavepictureinpicture\n * @type {Event}\n */\n return document.exitPictureInPicture();\n }\n }\n\n /**\n * Called when this Player has focus and a key gets pressed down, or when\n * any Component of this player receives a key press that it doesn't handle.\n * This allows player-wide hotkeys (either as defined below, or optionally\n * by an external function).\n *\n * @param {KeyboardEvent} event\n * The `keydown` event that caused this function to be called.\n *\n * @listens keydown\n */\n }, {\n key: \"handleKeyDown\",\n value: function handleKeyDown(event) {\n var userActions = this.options_.userActions;\n\n // Bail out if hotkeys are not configured.\n if (!userActions || !userActions.hotkeys) {\n return;\n }\n\n // Function that determines whether or not to exclude an element from\n // hotkeys handling.\n var excludeElement = function excludeElement(el) {\n var tagName = el.tagName.toLowerCase();\n\n // The first and easiest test is for `contenteditable` elements.\n if (el.isContentEditable) {\n return true;\n }\n\n // Inputs matching these types will still trigger hotkey handling as\n // they are not text inputs.\n var allowedInputTypes = ['button', 'checkbox', 'hidden', 'radio', 'reset', 'submit'];\n if (tagName === 'input') {\n return allowedInputTypes.indexOf(el.type) === -1;\n }\n\n // The final test is by tag name. These tags will be excluded entirely.\n var excludedTags = ['textarea'];\n return excludedTags.indexOf(tagName) !== -1;\n };\n\n // Bail out if the user is focused on an interactive form element.\n if (excludeElement(this.el_.ownerDocument.activeElement)) {\n return;\n }\n if (typeof userActions.hotkeys === 'function') {\n userActions.hotkeys.call(this, event);\n } else {\n this.handleHotkeys(event);\n }\n }\n\n /**\n * Called when this Player receives a hotkey keydown event.\n * Supported player-wide hotkeys are:\n *\n * f - toggle fullscreen\n * m - toggle mute\n * k or Space - toggle play/pause\n *\n * @param {Event} event\n * The `keydown` event that caused this function to be called.\n */\n }, {\n key: \"handleHotkeys\",\n value: function handleHotkeys(event) {\n var hotkeys = this.options_.userActions ? this.options_.userActions.hotkeys : {};\n\n // set fullscreenKey, muteKey, playPauseKey from `hotkeys`, use defaults if not set\n var _hotkeys$fullscreenKe = hotkeys.fullscreenKey,\n fullscreenKey = _hotkeys$fullscreenKe === void 0 ? function (keydownEvent) {\n return keycode.isEventKey(keydownEvent, 'f');\n } : _hotkeys$fullscreenKe,\n _hotkeys$muteKey = hotkeys.muteKey,\n muteKey = _hotkeys$muteKey === void 0 ? function (keydownEvent) {\n return keycode.isEventKey(keydownEvent, 'm');\n } : _hotkeys$muteKey,\n _hotkeys$playPauseKey = hotkeys.playPauseKey,\n playPauseKey = _hotkeys$playPauseKey === void 0 ? function (keydownEvent) {\n return keycode.isEventKey(keydownEvent, 'k') || keycode.isEventKey(keydownEvent, 'Space');\n } : _hotkeys$playPauseKey;\n if (fullscreenKey.call(this, event)) {\n event.preventDefault();\n event.stopPropagation();\n var FSToggle = Component$1.getComponent('FullscreenToggle');\n if (document[this.fsApi_.fullscreenEnabled] !== false) {\n FSToggle.prototype.handleClick.call(this, event);\n }\n } else if (muteKey.call(this, event)) {\n event.preventDefault();\n event.stopPropagation();\n var _MuteToggle = Component$1.getComponent('MuteToggle');\n _MuteToggle.prototype.handleClick.call(this, event);\n } else if (playPauseKey.call(this, event)) {\n event.preventDefault();\n event.stopPropagation();\n var _PlayToggle = Component$1.getComponent('PlayToggle');\n _PlayToggle.prototype.handleClick.call(this, event);\n }\n }\n\n /**\n * Check whether the player can play a given mimetype\n *\n * @see https://www.w3.org/TR/2011/WD-html5-20110113/video.html#dom-navigator-canplaytype\n *\n * @param {string} type\n * The mimetype to check\n *\n * @return {string}\n * 'probably', 'maybe', or '' (empty string)\n */\n }, {\n key: \"canPlayType\",\n value: function canPlayType(type) {\n var can;\n\n // Loop through each playback technology in the options order\n for (var _i63 = 0, j = this.options_.techOrder; _i63 < j.length; _i63++) {\n var techName = j[_i63];\n var tech = Tech.getTech(techName);\n\n // Support old behavior of techs being registered as components.\n // Remove once that deprecated behavior is removed.\n if (!tech) {\n tech = Component$1.getComponent(techName);\n }\n\n // Check if the current tech is defined before continuing\n if (!tech) {\n log$1.error(\"The \\\"\".concat(techName, \"\\\" tech is undefined. Skipped browser support check for that tech.\"));\n continue;\n }\n\n // Check if the browser supports this technology\n if (tech.isSupported()) {\n can = tech.canPlayType(type);\n if (can) {\n return can;\n }\n }\n }\n return '';\n }\n\n /**\n * Select source based on tech-order or source-order\n * Uses source-order selection if `options.sourceOrder` is truthy. Otherwise,\n * defaults to tech-order selection\n *\n * @param {Array} sources\n * The sources for a media asset\n *\n * @return {Object|boolean}\n * Object of source and tech order or false\n */\n }, {\n key: \"selectSource\",\n value: function selectSource(sources) {\n var _this119 = this;\n // Get only the techs specified in `techOrder` that exist and are supported by the\n // current platform\n var techs = this.options_.techOrder.map(function (techName) {\n return [techName, Tech.getTech(techName)];\n }).filter(function (_ref5) {\n var _ref6 = _slicedToArray(_ref5, 2),\n techName = _ref6[0],\n tech = _ref6[1];\n // Check if the current tech is defined before continuing\n if (tech) {\n // Check if the browser supports this technology\n return tech.isSupported();\n }\n log$1.error(\"The \\\"\".concat(techName, \"\\\" tech is undefined. Skipped browser support check for that tech.\"));\n return false;\n });\n\n // Iterate over each `innerArray` element once per `outerArray` element and execute\n // `tester` with both. If `tester` returns a non-falsy value, exit early and return\n // that value.\n var findFirstPassingTechSourcePair = function findFirstPassingTechSourcePair(outerArray, innerArray, tester) {\n var found;\n outerArray.some(function (outerChoice) {\n return innerArray.some(function (innerChoice) {\n found = tester(outerChoice, innerChoice);\n if (found) {\n return true;\n }\n });\n });\n return found;\n };\n var foundSourceAndTech;\n var flip = function flip(fn) {\n return function (a, b) {\n return fn(b, a);\n };\n };\n var finder = function finder(_ref7, source) {\n var _ref8 = _slicedToArray(_ref7, 2),\n techName = _ref8[0],\n tech = _ref8[1];\n if (tech.canPlaySource(source, _this119.options_[techName.toLowerCase()])) {\n return {\n source: source,\n tech: techName\n };\n }\n };\n\n // Depending on the truthiness of `options.sourceOrder`, we swap the order of techs and sources\n // to select from them based on their priority.\n if (this.options_.sourceOrder) {\n // Source-first ordering\n foundSourceAndTech = findFirstPassingTechSourcePair(sources, techs, flip(finder));\n } else {\n // Tech-first ordering\n foundSourceAndTech = findFirstPassingTechSourcePair(techs, sources, finder);\n }\n return foundSourceAndTech || false;\n }\n\n /**\n * Executes source setting and getting logic\n *\n * @param {Tech~SourceObject|Tech~SourceObject[]|string} [source]\n * A SourceObject, an array of SourceObjects, or a string referencing\n * a URL to a media source. It is _highly recommended_ that an object\n * or array of objects is used here, so that source selection\n * algorithms can take the `type` into account.\n *\n * If not provided, this method acts as a getter.\n * @param {boolean} [isRetry]\n * Indicates whether this is being called internally as a result of a retry\n *\n * @return {string|undefined}\n * If the `source` argument is missing, returns the current source\n * URL. Otherwise, returns nothing/undefined.\n */\n }, {\n key: \"handleSrc_\",\n value: function handleSrc_(source, isRetry) {\n var _this120 = this;\n // getter usage\n if (typeof source === 'undefined') {\n return this.cache_.src || '';\n }\n\n // Reset retry behavior for new source\n if (this.resetRetryOnError_) {\n this.resetRetryOnError_();\n }\n\n // filter out invalid sources and turn our source into\n // an array of source objects\n var sources = filterSource(source);\n\n // if a source was passed in then it is invalid because\n // it was filtered to a zero length Array. So we have to\n // show an error\n if (!sources.length) {\n this.setTimeout(function () {\n this.error({\n code: 4,\n message: this.options_.notSupportedMessage\n });\n }, 0);\n return;\n }\n\n // initial sources\n this.changingSrc_ = true;\n\n // Only update the cached source list if we are not retrying a new source after error,\n // since in that case we want to include the failed source(s) in the cache\n if (!isRetry) {\n this.cache_.sources = sources;\n }\n this.updateSourceCaches_(sources[0]);\n\n // middlewareSource is the source after it has been changed by middleware\n setSource(this, sources[0], function (middlewareSource, mws) {\n _this120.middleware_ = mws;\n\n // since sourceSet is async we have to update the cache again after we select a source since\n // the source that is selected could be out of order from the cache update above this callback.\n if (!isRetry) {\n _this120.cache_.sources = sources;\n }\n _this120.updateSourceCaches_(middlewareSource);\n var err = _this120.src_(middlewareSource);\n if (err) {\n if (sources.length > 1) {\n return _this120.handleSrc_(sources.slice(1));\n }\n _this120.changingSrc_ = false;\n\n // We need to wrap this in a timeout to give folks a chance to add error event handlers\n _this120.setTimeout(function () {\n this.error({\n code: 4,\n message: this.options_.notSupportedMessage\n });\n }, 0);\n\n // we could not find an appropriate tech, but let's still notify the delegate that this is it\n // this needs a better comment about why this is needed\n _this120.triggerReady();\n return;\n }\n setTech(mws, _this120.tech_);\n });\n\n // Try another available source if this one fails before playback.\n if (sources.length > 1) {\n var retry = function retry() {\n // Remove the error modal\n _this120.error(null);\n _this120.handleSrc_(sources.slice(1), true);\n };\n var stopListeningForErrors = function stopListeningForErrors() {\n _this120.off('error', retry);\n };\n this.one('error', retry);\n this.one('playing', stopListeningForErrors);\n this.resetRetryOnError_ = function () {\n _this120.off('error', retry);\n _this120.off('playing', stopListeningForErrors);\n };\n }\n }\n\n /**\n * Get or set the video source.\n *\n * @param {Tech~SourceObject|Tech~SourceObject[]|string} [source]\n * A SourceObject, an array of SourceObjects, or a string referencing\n * a URL to a media source. It is _highly recommended_ that an object\n * or array of objects is used here, so that source selection\n * algorithms can take the `type` into account.\n *\n * If not provided, this method acts as a getter.\n *\n * @return {string|undefined}\n * If the `source` argument is missing, returns the current source\n * URL. Otherwise, returns nothing/undefined.\n */\n }, {\n key: \"src\",\n value: function src(source) {\n return this.handleSrc_(source, false);\n }\n\n /**\n * Set the source object on the tech, returns a boolean that indicates whether\n * there is a tech that can play the source or not\n *\n * @param {Tech~SourceObject} source\n * The source object to set on the Tech\n *\n * @return {boolean}\n * - True if there is no Tech to playback this source\n * - False otherwise\n *\n * @private\n */\n }, {\n key: \"src_\",\n value: function src_(source) {\n var _this121 = this;\n var sourceTech = this.selectSource([source]);\n if (!sourceTech) {\n return true;\n }\n if (!titleCaseEquals(sourceTech.tech, this.techName_)) {\n this.changingSrc_ = true;\n // load this technology with the chosen source\n this.loadTech_(sourceTech.tech, sourceTech.source);\n this.tech_.ready(function () {\n _this121.changingSrc_ = false;\n });\n return false;\n }\n\n // wait until the tech is ready to set the source\n // and set it synchronously if possible (#2326)\n this.ready(function () {\n // The setSource tech method was added with source handlers\n // so older techs won't support it\n // We need to check the direct prototype for the case where subclasses\n // of the tech do not support source handlers\n if (this.tech_.constructor.prototype.hasOwnProperty('setSource')) {\n this.techCall_('setSource', source);\n } else {\n this.techCall_('src', source.src);\n }\n this.changingSrc_ = false;\n }, true);\n return false;\n }\n\n /**\n * Begin loading the src data.\n */\n }, {\n key: \"load\",\n value: function load() {\n // Workaround to use the load method with the VHS.\n // Does not cover the case when the load method is called directly from the mediaElement.\n if (this.tech_ && this.tech_.vhs) {\n this.src(this.currentSource());\n return;\n }\n this.techCall_('load');\n }\n\n /**\n * Reset the player. Loads the first tech in the techOrder,\n * removes all the text tracks in the existing `tech`,\n * and calls `reset` on the `tech`.\n */\n }, {\n key: \"reset\",\n value: function reset() {\n var _this122 = this;\n if (this.paused()) {\n this.doReset_();\n } else {\n var playPromise = this.play();\n silencePromise(playPromise.then(function () {\n return _this122.doReset_();\n }));\n }\n }\n }, {\n key: \"doReset_\",\n value: function doReset_() {\n if (this.tech_) {\n this.tech_.clearTracks('text');\n }\n this.resetCache_();\n this.poster('');\n this.loadTech_(this.options_.techOrder[0], null);\n this.techCall_('reset');\n this.resetControlBarUI_();\n if (isEvented(this)) {\n this.trigger('playerreset');\n }\n }\n\n /**\n * Reset Control Bar's UI by calling sub-methods that reset\n * all of Control Bar's components\n */\n }, {\n key: \"resetControlBarUI_\",\n value: function resetControlBarUI_() {\n this.resetProgressBar_();\n this.resetPlaybackRate_();\n this.resetVolumeBar_();\n }\n\n /**\n * Reset tech's progress so progress bar is reset in the UI\n */\n }, {\n key: \"resetProgressBar_\",\n value: function resetProgressBar_() {\n this.currentTime(0);\n var _ref9 = this.controlBar || {},\n currentTimeDisplay = _ref9.currentTimeDisplay,\n durationDisplay = _ref9.durationDisplay,\n progressControl = _ref9.progressControl,\n remainingTimeDisplay = _ref9.remainingTimeDisplay;\n var _ref10 = progressControl || {},\n seekBar = _ref10.seekBar;\n if (currentTimeDisplay) {\n currentTimeDisplay.updateContent();\n }\n if (durationDisplay) {\n durationDisplay.updateContent();\n }\n if (remainingTimeDisplay) {\n remainingTimeDisplay.updateContent();\n }\n if (seekBar) {\n seekBar.update();\n if (seekBar.loadProgressBar) {\n seekBar.loadProgressBar.update();\n }\n }\n }\n\n /**\n * Reset Playback ratio\n */\n }, {\n key: \"resetPlaybackRate_\",\n value: function resetPlaybackRate_() {\n this.playbackRate(this.defaultPlaybackRate());\n this.handleTechRateChange_();\n }\n\n /**\n * Reset Volume bar\n */\n }, {\n key: \"resetVolumeBar_\",\n value: function resetVolumeBar_() {\n this.volume(1.0);\n this.trigger('volumechange');\n }\n\n /**\n * Returns all of the current source objects.\n *\n * @return {Tech~SourceObject[]}\n * The current source objects\n */\n }, {\n key: \"currentSources\",\n value: function currentSources() {\n var source = this.currentSource();\n var sources = [];\n\n // assume `{}` or `{ src }`\n if (Object.keys(source).length !== 0) {\n sources.push(source);\n }\n return this.cache_.sources || sources;\n }\n\n /**\n * Returns the current source object.\n *\n * @return {Tech~SourceObject}\n * The current source object\n */\n }, {\n key: \"currentSource\",\n value: function currentSource() {\n return this.cache_.source || {};\n }\n\n /**\n * Returns the fully qualified URL of the current source value e.g. http://mysite.com/video.mp4\n * Can be used in conjunction with `currentType` to assist in rebuilding the current source object.\n *\n * @return {string}\n * The current source\n */\n }, {\n key: \"currentSrc\",\n value: function currentSrc() {\n return this.currentSource() && this.currentSource().src || '';\n }\n\n /**\n * Get the current source type e.g. video/mp4\n * This can allow you rebuild the current source object so that you could load the same\n * source and tech later\n *\n * @return {string}\n * The source MIME type\n */\n }, {\n key: \"currentType\",\n value: function currentType() {\n return this.currentSource() && this.currentSource().type || '';\n }\n\n /**\n * Get or set the preload attribute\n *\n * @param {'none'|'auto'|'metadata'} [value]\n * Preload mode to pass to tech\n *\n * @return {string|undefined}\n * - The preload attribute value when getting\n * - Nothing when setting\n */\n }, {\n key: \"preload\",\n value: function preload(value) {\n if (value !== undefined) {\n this.techCall_('setPreload', value);\n this.options_.preload = value;\n return;\n }\n return this.techGet_('preload');\n }\n\n /**\n * Get or set the autoplay option. When this is a boolean it will\n * modify the attribute on the tech. When this is a string the attribute on\n * the tech will be removed and `Player` will handle autoplay on loadstarts.\n *\n * @param {boolean|'play'|'muted'|'any'} [value]\n * - true: autoplay using the browser behavior\n * - false: do not autoplay\n * - 'play': call play() on every loadstart\n * - 'muted': call muted() then play() on every loadstart\n * - 'any': call play() on every loadstart. if that fails call muted() then play().\n * - *: values other than those listed here will be set `autoplay` to true\n *\n * @return {boolean|string|undefined}\n * - The current value of autoplay when getting\n * - Nothing when setting\n */\n }, {\n key: \"autoplay\",\n value: function autoplay(value) {\n // getter usage\n if (value === undefined) {\n return this.options_.autoplay || false;\n }\n var techAutoplay;\n\n // if the value is a valid string set it to that, or normalize `true` to 'play', if need be\n if (typeof value === 'string' && /(any|play|muted)/.test(value) || value === true && this.options_.normalizeAutoplay) {\n this.options_.autoplay = value;\n this.manualAutoplay_(typeof value === 'string' ? value : 'play');\n techAutoplay = false;\n\n // any falsy value sets autoplay to false in the browser,\n // lets do the same\n } else if (!value) {\n this.options_.autoplay = false;\n\n // any other value (ie truthy) sets autoplay to true\n } else {\n this.options_.autoplay = true;\n }\n techAutoplay = typeof techAutoplay === 'undefined' ? this.options_.autoplay : techAutoplay;\n\n // if we don't have a tech then we do not queue up\n // a setAutoplay call on tech ready. We do this because the\n // autoplay option will be passed in the constructor and we\n // do not need to set it twice\n if (this.tech_) {\n this.techCall_('setAutoplay', techAutoplay);\n }\n }\n\n /**\n * Set or unset the playsinline attribute.\n * Playsinline tells the browser that non-fullscreen playback is preferred.\n *\n * @param {boolean} [value]\n * - true means that we should try to play inline by default\n * - false means that we should use the browser's default playback mode,\n * which in most cases is inline. iOS Safari is a notable exception\n * and plays fullscreen by default.\n *\n * @return {string|undefined}\n * - the current value of playsinline\n * - Nothing when setting\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/#attr-video-playsinline}\n */\n }, {\n key: \"playsinline\",\n value: function playsinline(value) {\n if (value !== undefined) {\n this.techCall_('setPlaysinline', value);\n this.options_.playsinline = value;\n }\n return this.techGet_('playsinline');\n }\n\n /**\n * Get or set the loop attribute on the video element.\n *\n * @param {boolean} [value]\n * - true means that we should loop the video\n * - false means that we should not loop the video\n *\n * @return {boolean|undefined}\n * - The current value of loop when getting\n * - Nothing when setting\n */\n }, {\n key: \"loop\",\n value: function loop(value) {\n if (value !== undefined) {\n this.techCall_('setLoop', value);\n this.options_.loop = value;\n return;\n }\n return this.techGet_('loop');\n }\n\n /**\n * Get or set the poster image source url\n *\n * @fires Player#posterchange\n *\n * @param {string} [src]\n * Poster image source URL\n *\n * @return {string|undefined}\n * - The current value of poster when getting\n * - Nothing when setting\n */\n }, {\n key: \"poster\",\n value: function poster(src) {\n if (src === undefined) {\n return this.poster_;\n }\n\n // The correct way to remove a poster is to set as an empty string\n // other falsey values will throw errors\n if (!src) {\n src = '';\n }\n if (src === this.poster_) {\n return;\n }\n\n // update the internal poster variable\n this.poster_ = src;\n\n // update the tech's poster\n this.techCall_('setPoster', src);\n this.isPosterFromTech_ = false;\n\n // alert components that the poster has been set\n /**\n * This event fires when the poster image is changed on the player.\n *\n * @event Player#posterchange\n * @type {Event}\n */\n this.trigger('posterchange');\n }\n\n /**\n * Some techs (e.g. YouTube) can provide a poster source in an\n * asynchronous way. We want the poster component to use this\n * poster source so that it covers up the tech's controls.\n * (YouTube's play button). However we only want to use this\n * source if the player user hasn't set a poster through\n * the normal APIs.\n *\n * @fires Player#posterchange\n * @listens Tech#posterchange\n * @private\n */\n }, {\n key: \"handleTechPosterChange_\",\n value: function handleTechPosterChange_() {\n if ((!this.poster_ || this.options_.techCanOverridePoster) && this.tech_ && this.tech_.poster) {\n var newPoster = this.tech_.poster() || '';\n if (newPoster !== this.poster_) {\n this.poster_ = newPoster;\n this.isPosterFromTech_ = true;\n\n // Let components know the poster has changed\n this.trigger('posterchange');\n }\n }\n }\n\n /**\n * Get or set whether or not the controls are showing.\n *\n * @fires Player#controlsenabled\n *\n * @param {boolean} [bool]\n * - true to turn controls on\n * - false to turn controls off\n *\n * @return {boolean|undefined}\n * - The current value of controls when getting\n * - Nothing when setting\n */\n }, {\n key: \"controls\",\n value: function controls(bool) {\n if (bool === undefined) {\n return !!this.controls_;\n }\n bool = !!bool;\n\n // Don't trigger a change event unless it actually changed\n if (this.controls_ === bool) {\n return;\n }\n this.controls_ = bool;\n if (this.usingNativeControls()) {\n this.techCall_('setControls', bool);\n }\n if (this.controls_) {\n this.removeClass('vjs-controls-disabled');\n this.addClass('vjs-controls-enabled');\n /**\n * @event Player#controlsenabled\n * @type {Event}\n */\n this.trigger('controlsenabled');\n if (!this.usingNativeControls()) {\n this.addTechControlsListeners_();\n }\n } else {\n this.removeClass('vjs-controls-enabled');\n this.addClass('vjs-controls-disabled');\n /**\n * @event Player#controlsdisabled\n * @type {Event}\n */\n this.trigger('controlsdisabled');\n if (!this.usingNativeControls()) {\n this.removeTechControlsListeners_();\n }\n }\n }\n\n /**\n * Toggle native controls on/off. Native controls are the controls built into\n * devices (e.g. default iPhone controls) or other techs\n * (e.g. Vimeo Controls)\n * **This should only be set by the current tech, because only the tech knows\n * if it can support native controls**\n *\n * @fires Player#usingnativecontrols\n * @fires Player#usingcustomcontrols\n *\n * @param {boolean} [bool]\n * - true to turn native controls on\n * - false to turn native controls off\n *\n * @return {boolean|undefined}\n * - The current value of native controls when getting\n * - Nothing when setting\n */\n }, {\n key: \"usingNativeControls\",\n value: function usingNativeControls(bool) {\n if (bool === undefined) {\n return !!this.usingNativeControls_;\n }\n bool = !!bool;\n\n // Don't trigger a change event unless it actually changed\n if (this.usingNativeControls_ === bool) {\n return;\n }\n this.usingNativeControls_ = bool;\n if (this.usingNativeControls_) {\n this.addClass('vjs-using-native-controls');\n\n /**\n * player is using the native device controls\n *\n * @event Player#usingnativecontrols\n * @type {Event}\n */\n this.trigger('usingnativecontrols');\n } else {\n this.removeClass('vjs-using-native-controls');\n\n /**\n * player is using the custom HTML controls\n *\n * @event Player#usingcustomcontrols\n * @type {Event}\n */\n this.trigger('usingcustomcontrols');\n }\n }\n\n /**\n * Set or get the current MediaError\n *\n * @fires Player#error\n *\n * @param {MediaError|string|number} [err]\n * A MediaError or a string/number to be turned\n * into a MediaError\n *\n * @return {MediaError|null|undefined}\n * - The current MediaError when getting (or null)\n * - Nothing when setting\n */\n }, {\n key: \"error\",\n value: function error(err) {\n var _this123 = this;\n if (err === undefined) {\n return this.error_ || null;\n }\n\n // allow hooks to modify error object\n hooks('beforeerror').forEach(function (hookFunction) {\n var newErr = hookFunction(_this123, err);\n if (!(isObject(newErr) && !Array.isArray(newErr) || typeof newErr === 'string' || typeof newErr === 'number' || newErr === null)) {\n _this123.log.error('please return a value that MediaError expects in beforeerror hooks');\n return;\n }\n err = newErr;\n });\n\n // Suppress the first error message for no compatible source until\n // user interaction\n if (this.options_.suppressNotSupportedError && err && err.code === 4) {\n var triggerSuppressedError = function triggerSuppressedError() {\n this.error(err);\n };\n this.options_.suppressNotSupportedError = false;\n this.any(['click', 'touchstart'], triggerSuppressedError);\n this.one('loadstart', function () {\n this.off(['click', 'touchstart'], triggerSuppressedError);\n });\n return;\n }\n\n // restoring to default\n if (err === null) {\n this.error_ = null;\n this.removeClass('vjs-error');\n if (this.errorDisplay) {\n this.errorDisplay.close();\n }\n return;\n }\n this.error_ = new MediaError(err);\n\n // add the vjs-error classname to the player\n this.addClass('vjs-error');\n\n // log the name of the error type and any message\n // IE11 logs \"[object object]\" and required you to expand message to see error object\n log$1.error(\"(CODE:\".concat(this.error_.code, \" \").concat(MediaError.errorTypes[this.error_.code], \")\"), this.error_.message, this.error_);\n\n /**\n * @event Player#error\n * @type {Event}\n */\n this.trigger('error');\n\n // notify hooks of the per player error\n hooks('error').forEach(function (hookFunction) {\n return hookFunction(_this123, _this123.error_);\n });\n return;\n }\n\n /**\n * Report user activity\n *\n * @param {Object} event\n * Event object\n */\n }, {\n key: \"reportUserActivity\",\n value: function reportUserActivity(event) {\n this.userActivity_ = true;\n }\n\n /**\n * Get/set if user is active\n *\n * @fires Player#useractive\n * @fires Player#userinactive\n *\n * @param {boolean} [bool]\n * - true if the user is active\n * - false if the user is inactive\n *\n * @return {boolean|undefined}\n * - The current value of userActive when getting\n * - Nothing when setting\n */\n }, {\n key: \"userActive\",\n value: function userActive(bool) {\n if (bool === undefined) {\n return this.userActive_;\n }\n bool = !!bool;\n if (bool === this.userActive_) {\n return;\n }\n this.userActive_ = bool;\n if (this.userActive_) {\n this.userActivity_ = true;\n this.removeClass('vjs-user-inactive');\n this.addClass('vjs-user-active');\n /**\n * @event Player#useractive\n * @type {Event}\n */\n this.trigger('useractive');\n return;\n }\n\n // Chrome/Safari/IE have bugs where when you change the cursor it can\n // trigger a mousemove event. This causes an issue when you're hiding\n // the cursor when the user is inactive, and a mousemove signals user\n // activity. Making it impossible to go into inactive mode. Specifically\n // this happens in fullscreen when we really need to hide the cursor.\n //\n // When this gets resolved in ALL browsers it can be removed\n // https://code.google.com/p/chromium/issues/detail?id=103041\n if (this.tech_) {\n this.tech_.one('mousemove', function (e) {\n e.stopPropagation();\n e.preventDefault();\n });\n }\n this.userActivity_ = false;\n this.removeClass('vjs-user-active');\n this.addClass('vjs-user-inactive');\n /**\n * @event Player#userinactive\n * @type {Event}\n */\n this.trigger('userinactive');\n }\n\n /**\n * Listen for user activity based on timeout value\n *\n * @private\n */\n }, {\n key: \"listenForUserActivity_\",\n value: function listenForUserActivity_() {\n var mouseInProgress;\n var lastMoveX;\n var lastMoveY;\n var handleActivity = bind_(this, this.reportUserActivity);\n var handleMouseMove = function handleMouseMove(e) {\n // #1068 - Prevent mousemove spamming\n // Chrome Bug: https://code.google.com/p/chromium/issues/detail?id=366970\n if (e.screenX !== lastMoveX || e.screenY !== lastMoveY) {\n lastMoveX = e.screenX;\n lastMoveY = e.screenY;\n handleActivity();\n }\n };\n var handleMouseDown = function handleMouseDown() {\n handleActivity();\n // For as long as the they are touching the device or have their mouse down,\n // we consider them active even if they're not moving their finger or mouse.\n // So we want to continue to update that they are active\n this.clearInterval(mouseInProgress);\n // Setting userActivity=true now and setting the interval to the same time\n // as the activityCheck interval (250) should ensure we never miss the\n // next activityCheck\n mouseInProgress = this.setInterval(handleActivity, 250);\n };\n var handleMouseUpAndMouseLeave = function handleMouseUpAndMouseLeave(event) {\n handleActivity();\n // Stop the interval that maintains activity if the mouse/touch is down\n this.clearInterval(mouseInProgress);\n };\n\n // Any mouse movement will be considered user activity\n this.on('mousedown', handleMouseDown);\n this.on('mousemove', handleMouseMove);\n this.on('mouseup', handleMouseUpAndMouseLeave);\n this.on('mouseleave', handleMouseUpAndMouseLeave);\n var controlBar = this.getChild('controlBar');\n\n // Fixes bug on Android & iOS where when tapping progressBar (when control bar is displayed)\n // controlBar would no longer be hidden by default timeout.\n if (controlBar && !IS_IOS && !IS_ANDROID) {\n controlBar.on('mouseenter', function (event) {\n if (this.player().options_.inactivityTimeout !== 0) {\n this.player().cache_.inactivityTimeout = this.player().options_.inactivityTimeout;\n }\n this.player().options_.inactivityTimeout = 0;\n });\n controlBar.on('mouseleave', function (event) {\n this.player().options_.inactivityTimeout = this.player().cache_.inactivityTimeout;\n });\n }\n\n // Listen for keyboard navigation\n // Shouldn't need to use inProgress interval because of key repeat\n this.on('keydown', handleActivity);\n this.on('keyup', handleActivity);\n\n // Run an interval every 250 milliseconds instead of stuffing everything into\n // the mousemove/touchmove function itself, to prevent performance degradation.\n // `this.reportUserActivity` simply sets this.userActivity_ to true, which\n // then gets picked up by this loop\n // http://ejohn.org/blog/learning-from-twitter/\n var inactivityTimeout;\n\n /** @this Player */\n var activityCheck = function activityCheck() {\n // Check to see if mouse/touch activity has happened\n if (!this.userActivity_) {\n return;\n }\n\n // Reset the activity tracker\n this.userActivity_ = false;\n\n // If the user state was inactive, set the state to active\n this.userActive(true);\n\n // Clear any existing inactivity timeout to start the timer over\n this.clearTimeout(inactivityTimeout);\n var timeout = this.options_.inactivityTimeout;\n if (timeout <= 0) {\n return;\n }\n\n // In <timeout> milliseconds, if no more activity has occurred the\n // user will be considered inactive\n inactivityTimeout = this.setTimeout(function () {\n // Protect against the case where the inactivityTimeout can trigger just\n // before the next user activity is picked up by the activity check loop\n // causing a flicker\n if (!this.userActivity_) {\n this.userActive(false);\n }\n }, timeout);\n };\n this.setInterval(activityCheck, 250);\n }\n\n /**\n * Gets or sets the current playback rate. A playback rate of\n * 1.0 represents normal speed and 0.5 would indicate half-speed\n * playback, for instance.\n *\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-playbackrate\n *\n * @param {number} [rate]\n * New playback rate to set.\n *\n * @return {number|undefined}\n * - The current playback rate when getting or 1.0\n * - Nothing when setting\n */\n }, {\n key: \"playbackRate\",\n value: function playbackRate(rate) {\n if (rate !== undefined) {\n // NOTE: this.cache_.lastPlaybackRate is set from the tech handler\n // that is registered above\n this.techCall_('setPlaybackRate', rate);\n return;\n }\n if (this.tech_ && this.tech_.featuresPlaybackRate) {\n return this.cache_.lastPlaybackRate || this.techGet_('playbackRate');\n }\n return 1.0;\n }\n\n /**\n * Gets or sets the current default playback rate. A default playback rate of\n * 1.0 represents normal speed and 0.5 would indicate half-speed playback, for instance.\n * defaultPlaybackRate will only represent what the initial playbackRate of a video was, not\n * not the current playbackRate.\n *\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-defaultplaybackrate\n *\n * @param {number} [rate]\n * New default playback rate to set.\n *\n * @return {number|undefined}\n * - The default playback rate when getting or 1.0\n * - Nothing when setting\n */\n }, {\n key: \"defaultPlaybackRate\",\n value: function defaultPlaybackRate(rate) {\n if (rate !== undefined) {\n return this.techCall_('setDefaultPlaybackRate', rate);\n }\n if (this.tech_ && this.tech_.featuresPlaybackRate) {\n return this.techGet_('defaultPlaybackRate');\n }\n return 1.0;\n }\n\n /**\n * Gets or sets the audio flag\n *\n * @param {boolean} [bool]\n * - true signals that this is an audio player\n * - false signals that this is not an audio player\n *\n * @return {boolean|undefined}\n * - The current value of isAudio when getting\n * - Nothing when setting\n */\n }, {\n key: \"isAudio\",\n value: function isAudio(bool) {\n if (bool !== undefined) {\n this.isAudio_ = !!bool;\n return;\n }\n return !!this.isAudio_;\n }\n }, {\n key: \"enableAudioOnlyUI_\",\n value: function enableAudioOnlyUI_() {\n var _this124 = this;\n // Update styling immediately to show the control bar so we can get its height\n this.addClass('vjs-audio-only-mode');\n var playerChildren = this.children();\n var controlBar = this.getChild('ControlBar');\n var controlBarHeight = controlBar && controlBar.currentHeight();\n\n // Hide all player components except the control bar. Control bar components\n // needed only for video are hidden with CSS\n playerChildren.forEach(function (child) {\n if (child === controlBar) {\n return;\n }\n if (child.el_ && !child.hasClass('vjs-hidden')) {\n child.hide();\n _this124.audioOnlyCache_.hiddenChildren.push(child);\n }\n });\n this.audioOnlyCache_.playerHeight = this.currentHeight();\n\n // Set the player height the same as the control bar\n this.height(controlBarHeight);\n this.trigger('audioonlymodechange');\n }\n }, {\n key: \"disableAudioOnlyUI_\",\n value: function disableAudioOnlyUI_() {\n this.removeClass('vjs-audio-only-mode');\n\n // Show player components that were previously hidden\n this.audioOnlyCache_.hiddenChildren.forEach(function (child) {\n return child.show();\n });\n\n // Reset player height\n this.height(this.audioOnlyCache_.playerHeight);\n this.trigger('audioonlymodechange');\n }\n\n /**\n * Get the current audioOnlyMode state or set audioOnlyMode to true or false.\n *\n * Setting this to `true` will hide all player components except the control bar,\n * as well as control bar components needed only for video.\n *\n * @param {boolean} [value]\n * The value to set audioOnlyMode to.\n *\n * @return {Promise|boolean}\n * A Promise is returned when setting the state, and a boolean when getting\n * the present state\n */\n }, {\n key: \"audioOnlyMode\",\n value: function audioOnlyMode(value) {\n var _this125 = this;\n if (typeof value !== 'boolean' || value === this.audioOnlyMode_) {\n return this.audioOnlyMode_;\n }\n this.audioOnlyMode_ = value;\n\n // Enable Audio Only Mode\n if (value) {\n var exitPromises = [];\n\n // Fullscreen and PiP are not supported in audioOnlyMode, so exit if we need to.\n if (this.isInPictureInPicture()) {\n exitPromises.push(this.exitPictureInPicture());\n }\n if (this.isFullscreen()) {\n exitPromises.push(this.exitFullscreen());\n }\n if (this.audioPosterMode()) {\n exitPromises.push(this.audioPosterMode(false));\n }\n return Promise.all(exitPromises).then(function () {\n return _this125.enableAudioOnlyUI_();\n });\n }\n\n // Disable Audio Only Mode\n return Promise.resolve().then(function () {\n return _this125.disableAudioOnlyUI_();\n });\n }\n }, {\n key: \"enablePosterModeUI_\",\n value: function enablePosterModeUI_() {\n // Hide the video element and show the poster image to enable posterModeUI\n var tech = this.tech_ && this.tech_;\n tech.hide();\n this.addClass('vjs-audio-poster-mode');\n this.trigger('audiopostermodechange');\n }\n }, {\n key: \"disablePosterModeUI_\",\n value: function disablePosterModeUI_() {\n // Show the video element and hide the poster image to disable posterModeUI\n var tech = this.tech_ && this.tech_;\n tech.show();\n this.removeClass('vjs-audio-poster-mode');\n this.trigger('audiopostermodechange');\n }\n\n /**\n * Get the current audioPosterMode state or set audioPosterMode to true or false\n *\n * @param {boolean} [value]\n * The value to set audioPosterMode to.\n *\n * @return {Promise|boolean}\n * A Promise is returned when setting the state, and a boolean when getting\n * the present state\n */\n }, {\n key: \"audioPosterMode\",\n value: function audioPosterMode(value) {\n var _this126 = this;\n if (typeof value !== 'boolean' || value === this.audioPosterMode_) {\n return this.audioPosterMode_;\n }\n this.audioPosterMode_ = value;\n if (value) {\n if (this.audioOnlyMode()) {\n var audioOnlyModePromise = this.audioOnlyMode(false);\n return audioOnlyModePromise.then(function () {\n // enable audio poster mode after audio only mode is disabled\n _this126.enablePosterModeUI_();\n });\n }\n return Promise.resolve().then(function () {\n // enable audio poster mode\n _this126.enablePosterModeUI_();\n });\n }\n return Promise.resolve().then(function () {\n // disable audio poster mode\n _this126.disablePosterModeUI_();\n });\n }\n\n /**\n * A helper method for adding a {@link TextTrack} to our\n * {@link TextTrackList}.\n *\n * In addition to the W3C settings we allow adding additional info through options.\n *\n * @see http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-addtexttrack\n *\n * @param {string} [kind]\n * the kind of TextTrack you are adding\n *\n * @param {string} [label]\n * the label to give the TextTrack label\n *\n * @param {string} [language]\n * the language to set on the TextTrack\n *\n * @return {TextTrack|undefined}\n * the TextTrack that was added or undefined\n * if there is no tech\n */\n }, {\n key: \"addTextTrack\",\n value: function addTextTrack(kind, label, language) {\n if (this.tech_) {\n return this.tech_.addTextTrack(kind, label, language);\n }\n }\n\n /**\n * Create a remote {@link TextTrack} and an {@link HTMLTrackElement}.\n *\n * @param {Object} options\n * Options to pass to {@link HTMLTrackElement} during creation. See\n * {@link HTMLTrackElement} for object properties that you should use.\n *\n * @param {boolean} [manualCleanup=false] if set to true, the TextTrack will not be removed\n * from the TextTrackList and HtmlTrackElementList\n * after a source change\n *\n * @return { import('./tracks/html-track-element').default }\n * the HTMLTrackElement that was created and added\n * to the HtmlTrackElementList and the remote\n * TextTrackList\n *\n */\n }, {\n key: \"addRemoteTextTrack\",\n value: function addRemoteTextTrack(options, manualCleanup) {\n if (this.tech_) {\n return this.tech_.addRemoteTextTrack(options, manualCleanup);\n }\n }\n\n /**\n * Remove a remote {@link TextTrack} from the respective\n * {@link TextTrackList} and {@link HtmlTrackElementList}.\n *\n * @param {Object} track\n * Remote {@link TextTrack} to remove\n *\n * @return {undefined}\n * does not return anything\n */\n }, {\n key: \"removeRemoteTextTrack\",\n value: function removeRemoteTextTrack() {\n var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var track = obj.track;\n if (!track) {\n track = obj;\n }\n\n // destructure the input into an object with a track argument, defaulting to arguments[0]\n // default the whole argument to an empty object if nothing was passed in\n\n if (this.tech_) {\n return this.tech_.removeRemoteTextTrack(track);\n }\n }\n\n /**\n * Gets available media playback quality metrics as specified by the W3C's Media\n * Playback Quality API.\n *\n * @see [Spec]{@link https://wicg.github.io/media-playback-quality}\n *\n * @return {Object|undefined}\n * An object with supported media playback quality metrics or undefined if there\n * is no tech or the tech does not support it.\n */\n }, {\n key: \"getVideoPlaybackQuality\",\n value: function getVideoPlaybackQuality() {\n return this.techGet_('getVideoPlaybackQuality');\n }\n\n /**\n * Get video width\n *\n * @return {number}\n * current video width\n */\n }, {\n key: \"videoWidth\",\n value: function videoWidth() {\n return this.tech_ && this.tech_.videoWidth && this.tech_.videoWidth() || 0;\n }\n\n /**\n * Get video height\n *\n * @return {number}\n * current video height\n */\n }, {\n key: \"videoHeight\",\n value: function videoHeight() {\n return this.tech_ && this.tech_.videoHeight && this.tech_.videoHeight() || 0;\n }\n\n /**\n * Set or get the player's language code.\n *\n * Changing the language will trigger\n * [languagechange]{@link Player#event:languagechange}\n * which Components can use to update control text.\n * ClickableComponent will update its control text by default on\n * [languagechange]{@link Player#event:languagechange}.\n *\n * @fires Player#languagechange\n *\n * @param {string} [code]\n * the language code to set the player to\n *\n * @return {string|undefined}\n * - The current language code when getting\n * - Nothing when setting\n */\n }, {\n key: \"language\",\n value: function language(code) {\n if (code === undefined) {\n return this.language_;\n }\n if (this.language_ !== String(code).toLowerCase()) {\n this.language_ = String(code).toLowerCase();\n\n // during first init, it's possible some things won't be evented\n if (isEvented(this)) {\n /**\n * fires when the player language change\n *\n * @event Player#languagechange\n * @type {Event}\n */\n this.trigger('languagechange');\n }\n }\n }\n\n /**\n * Get the player's language dictionary\n * Merge every time, because a newly added plugin might call videojs.addLanguage() at any time\n * Languages specified directly in the player options have precedence\n *\n * @return {Array}\n * An array of of supported languages\n */\n }, {\n key: \"languages\",\n value: function languages() {\n return merge$1(Player.prototype.options_.languages, this.languages_);\n }\n\n /**\n * returns a JavaScript object representing the current track\n * information. **DOES not return it as JSON**\n *\n * @return {Object}\n * Object representing the current of track info\n */\n }, {\n key: \"toJSON\",\n value: function toJSON() {\n var options = merge$1(this.options_);\n var tracks = options.tracks;\n options.tracks = [];\n for (var _i64 = 0; _i64 < tracks.length; _i64++) {\n var track = tracks[_i64];\n\n // deep merge tracks and null out player so no circular references\n track = merge$1(track);\n track.player = undefined;\n options.tracks[_i64] = track;\n }\n return options;\n }\n\n /**\n * Creates a simple modal dialog (an instance of the {@link ModalDialog}\n * component) that immediately overlays the player with arbitrary\n * content and removes itself when closed.\n *\n * @param {string|Function|Element|Array|null} content\n * Same as {@link ModalDialog#content}'s param of the same name.\n * The most straight-forward usage is to provide a string or DOM\n * element.\n *\n * @param {Object} [options]\n * Extra options which will be passed on to the {@link ModalDialog}.\n *\n * @return {ModalDialog}\n * the {@link ModalDialog} that was created\n */\n }, {\n key: \"createModal\",\n value: function createModal(content, options) {\n var _this127 = this;\n options = options || {};\n options.content = content || '';\n var modal = new ModalDialog(this, options);\n this.addChild(modal);\n modal.on('dispose', function () {\n _this127.removeChild(modal);\n });\n modal.open();\n return modal;\n }\n\n /**\n * Change breakpoint classes when the player resizes.\n *\n * @private\n */\n }, {\n key: \"updateCurrentBreakpoint_\",\n value: function updateCurrentBreakpoint_() {\n if (!this.responsive()) {\n return;\n }\n var currentBreakpoint = this.currentBreakpoint();\n var currentWidth = this.currentWidth();\n for (var _i65 = 0; _i65 < BREAKPOINT_ORDER.length; _i65++) {\n var candidateBreakpoint = BREAKPOINT_ORDER[_i65];\n var maxWidth = this.breakpoints_[candidateBreakpoint];\n if (currentWidth <= maxWidth) {\n // The current breakpoint did not change, nothing to do.\n if (currentBreakpoint === candidateBreakpoint) {\n return;\n }\n\n // Only remove a class if there is a current breakpoint.\n if (currentBreakpoint) {\n this.removeClass(BREAKPOINT_CLASSES[currentBreakpoint]);\n }\n this.addClass(BREAKPOINT_CLASSES[candidateBreakpoint]);\n this.breakpoint_ = candidateBreakpoint;\n break;\n }\n }\n }\n\n /**\n * Removes the current breakpoint.\n *\n * @private\n */\n }, {\n key: \"removeCurrentBreakpoint_\",\n value: function removeCurrentBreakpoint_() {\n var className = this.currentBreakpointClass();\n this.breakpoint_ = '';\n if (className) {\n this.removeClass(className);\n }\n }\n\n /**\n * Get or set breakpoints on the player.\n *\n * Calling this method with an object or `true` will remove any previous\n * custom breakpoints and start from the defaults again.\n *\n * @param {Object|boolean} [breakpoints]\n * If an object is given, it can be used to provide custom\n * breakpoints. If `true` is given, will set default breakpoints.\n * If this argument is not given, will simply return the current\n * breakpoints.\n *\n * @param {number} [breakpoints.tiny]\n * The maximum width for the \"vjs-layout-tiny\" class.\n *\n * @param {number} [breakpoints.xsmall]\n * The maximum width for the \"vjs-layout-x-small\" class.\n *\n * @param {number} [breakpoints.small]\n * The maximum width for the \"vjs-layout-small\" class.\n *\n * @param {number} [breakpoints.medium]\n * The maximum width for the \"vjs-layout-medium\" class.\n *\n * @param {number} [breakpoints.large]\n * The maximum width for the \"vjs-layout-large\" class.\n *\n * @param {number} [breakpoints.xlarge]\n * The maximum width for the \"vjs-layout-x-large\" class.\n *\n * @param {number} [breakpoints.huge]\n * The maximum width for the \"vjs-layout-huge\" class.\n *\n * @return {Object}\n * An object mapping breakpoint names to maximum width values.\n */\n }, {\n key: \"breakpoints\",\n value: function breakpoints(_breakpoints) {\n // Used as a getter.\n if (_breakpoints === undefined) {\n return Object.assign(this.breakpoints_);\n }\n this.breakpoint_ = '';\n this.breakpoints_ = Object.assign({}, DEFAULT_BREAKPOINTS, _breakpoints);\n\n // When breakpoint definitions change, we need to update the currently\n // selected breakpoint.\n this.updateCurrentBreakpoint_();\n\n // Clone the breakpoints before returning.\n return Object.assign(this.breakpoints_);\n }\n\n /**\n * Get or set a flag indicating whether or not this player should adjust\n * its UI based on its dimensions.\n *\n * @param {boolean} [value]\n * Should be `true` if the player should adjust its UI based on its\n * dimensions; otherwise, should be `false`.\n *\n * @return {boolean|undefined}\n * Will be `true` if this player should adjust its UI based on its\n * dimensions; otherwise, will be `false`.\n * Nothing if setting\n */\n }, {\n key: \"responsive\",\n value: function responsive(value) {\n // Used as a getter.\n if (value === undefined) {\n return this.responsive_;\n }\n value = Boolean(value);\n var current = this.responsive_;\n\n // Nothing changed.\n if (value === current) {\n return;\n }\n\n // The value actually changed, set it.\n this.responsive_ = value;\n\n // Start listening for breakpoints and set the initial breakpoint if the\n // player is now responsive.\n if (value) {\n this.on('playerresize', this.boundUpdateCurrentBreakpoint_);\n this.updateCurrentBreakpoint_();\n\n // Stop listening for breakpoints if the player is no longer responsive.\n } else {\n this.off('playerresize', this.boundUpdateCurrentBreakpoint_);\n this.removeCurrentBreakpoint_();\n }\n return value;\n }\n\n /**\n * Get current breakpoint name, if any.\n *\n * @return {string}\n * If there is currently a breakpoint set, returns a the key from the\n * breakpoints object matching it. Otherwise, returns an empty string.\n */\n }, {\n key: \"currentBreakpoint\",\n value: function currentBreakpoint() {\n return this.breakpoint_;\n }\n\n /**\n * Get the current breakpoint class name.\n *\n * @return {string}\n * The matching class name (e.g. `\"vjs-layout-tiny\"` or\n * `\"vjs-layout-large\"`) for the current breakpoint. Empty string if\n * there is no current breakpoint.\n */\n }, {\n key: \"currentBreakpointClass\",\n value: function currentBreakpointClass() {\n return BREAKPOINT_CLASSES[this.breakpoint_] || '';\n }\n\n /**\n * An object that describes a single piece of media.\n *\n * Properties that are not part of this type description will be retained; so,\n * this can be viewed as a generic metadata storage mechanism as well.\n *\n * @see {@link https://wicg.github.io/mediasession/#the-mediametadata-interface}\n * @typedef {Object} Player~MediaObject\n *\n * @property {string} [album]\n * Unused, except if this object is passed to the `MediaSession`\n * API.\n *\n * @property {string} [artist]\n * Unused, except if this object is passed to the `MediaSession`\n * API.\n *\n * @property {Object[]} [artwork]\n * Unused, except if this object is passed to the `MediaSession`\n * API. If not specified, will be populated via the `poster`, if\n * available.\n *\n * @property {string} [poster]\n * URL to an image that will display before playback.\n *\n * @property {Tech~SourceObject|Tech~SourceObject[]|string} [src]\n * A single source object, an array of source objects, or a string\n * referencing a URL to a media source. It is _highly recommended_\n * that an object or array of objects is used here, so that source\n * selection algorithms can take the `type` into account.\n *\n * @property {string} [title]\n * Unused, except if this object is passed to the `MediaSession`\n * API.\n *\n * @property {Object[]} [textTracks]\n * An array of objects to be used to create text tracks, following\n * the {@link https://www.w3.org/TR/html50/embedded-content-0.html#the-track-element|native track element format}.\n * For ease of removal, these will be created as \"remote\" text\n * tracks and set to automatically clean up on source changes.\n *\n * These objects may have properties like `src`, `kind`, `label`,\n * and `language`, see {@link Tech#createRemoteTextTrack}.\n */\n\n /**\n * Populate the player using a {@link Player~MediaObject|MediaObject}.\n *\n * @param {Player~MediaObject} media\n * A media object.\n *\n * @param {Function} ready\n * A callback to be called when the player is ready.\n */\n }, {\n key: \"loadMedia\",\n value: function loadMedia(media, ready) {\n var _this128 = this;\n if (!media || _typeof(media) !== 'object') {\n return;\n }\n var crossOrigin = this.crossOrigin();\n this.reset();\n\n // Clone the media object so it cannot be mutated from outside.\n this.cache_.media = merge$1(media);\n var _this$cache_$media = this.cache_.media,\n artist = _this$cache_$media.artist,\n artwork = _this$cache_$media.artwork,\n description = _this$cache_$media.description,\n poster = _this$cache_$media.poster,\n src = _this$cache_$media.src,\n textTracks = _this$cache_$media.textTracks,\n title = _this$cache_$media.title;\n\n // If `artwork` is not given, create it using `poster`.\n if (!artwork && poster) {\n this.cache_.media.artwork = [{\n src: poster,\n type: getMimetype(poster)\n }];\n }\n if (crossOrigin) {\n this.crossOrigin(crossOrigin);\n }\n if (src) {\n this.src(src);\n }\n if (poster) {\n this.poster(poster);\n }\n if (Array.isArray(textTracks)) {\n textTracks.forEach(function (tt) {\n return _this128.addRemoteTextTrack(tt, false);\n });\n }\n if (this.titleBar) {\n this.titleBar.update({\n title: title,\n description: description || artist || ''\n });\n }\n this.ready(ready);\n }\n\n /**\n * Get a clone of the current {@link Player~MediaObject} for this player.\n *\n * If the `loadMedia` method has not been used, will attempt to return a\n * {@link Player~MediaObject} based on the current state of the player.\n *\n * @return {Player~MediaObject}\n */\n }, {\n key: \"getMedia\",\n value: function getMedia() {\n if (!this.cache_.media) {\n var poster = this.poster();\n var src = this.currentSources();\n var textTracks = Array.prototype.map.call(this.remoteTextTracks(), function (tt) {\n return {\n kind: tt.kind,\n label: tt.label,\n language: tt.language,\n src: tt.src\n };\n });\n var media = {\n src: src,\n textTracks: textTracks\n };\n if (poster) {\n media.poster = poster;\n media.artwork = [{\n src: media.poster,\n type: getMimetype(media.poster)\n }];\n }\n return media;\n }\n return merge$1(this.cache_.media);\n }\n\n /**\n * Gets tag settings\n *\n * @param {Element} tag\n * The player tag\n *\n * @return {Object}\n * An object containing all of the settings\n * for a player tag\n */\n }, {\n key: \"debug\",\n value:\n /**\n * Set debug mode to enable/disable logs at info level.\n *\n * @param {boolean} enabled\n * @fires Player#debugon\n * @fires Player#debugoff\n * @return {boolean|undefined}\n */\n function debug(enabled) {\n if (enabled === undefined) {\n return this.debugEnabled_;\n }\n if (enabled) {\n this.trigger('debugon');\n this.previousLogLevel_ = this.log.level;\n this.log.level('debug');\n this.debugEnabled_ = true;\n } else {\n this.trigger('debugoff');\n this.log.level(this.previousLogLevel_);\n this.previousLogLevel_ = undefined;\n this.debugEnabled_ = false;\n }\n }\n\n /**\n * Set or get current playback rates.\n * Takes an array and updates the playback rates menu with the new items.\n * Pass in an empty array to hide the menu.\n * Values other than arrays are ignored.\n *\n * @fires Player#playbackrateschange\n * @param {number[]} newRates\n * The new rates that the playback rates menu should update to.\n * An empty array will hide the menu\n * @return {number[]} When used as a getter will return the current playback rates\n */\n }, {\n key: \"playbackRates\",\n value: function playbackRates(newRates) {\n if (newRates === undefined) {\n return this.cache_.playbackRates;\n }\n\n // ignore any value that isn't an array\n if (!Array.isArray(newRates)) {\n return;\n }\n\n // ignore any arrays that don't only contain numbers\n if (!newRates.every(function (rate) {\n return typeof rate === 'number';\n })) {\n return;\n }\n this.cache_.playbackRates = newRates;\n\n /**\n * fires when the playback rates in a player are changed\n *\n * @event Player#playbackrateschange\n * @type {Event}\n */\n this.trigger('playbackrateschange');\n }\n }], [{\n key: \"getTagSettings\",\n value: function getTagSettings(tag) {\n var baseOptions = {\n sources: [],\n tracks: []\n };\n var tagOptions = getAttributes(tag);\n var dataSetup = tagOptions['data-setup'];\n if (_hasClass(tag, 'vjs-fill')) {\n tagOptions.fill = true;\n }\n if (_hasClass(tag, 'vjs-fluid')) {\n tagOptions.fluid = true;\n }\n\n // Check if data-setup attr exists.\n if (dataSetup !== null) {\n // Parse options JSON\n // If empty string, make it a parsable json object.\n var _safeParseTuple = safeParseTuple(dataSetup || '{}'),\n _safeParseTuple2 = _slicedToArray(_safeParseTuple, 2),\n err = _safeParseTuple2[0],\n data = _safeParseTuple2[1];\n if (err) {\n log$1.error(err);\n }\n Object.assign(tagOptions, data);\n }\n Object.assign(baseOptions, tagOptions);\n\n // Get tag children settings\n if (tag.hasChildNodes()) {\n var children = tag.childNodes;\n for (var _i66 = 0, j = children.length; _i66 < j; _i66++) {\n var child = children[_i66];\n // Change case needed: http://ejohn.org/blog/nodename-case-sensitivity/\n var childName = child.nodeName.toLowerCase();\n if (childName === 'source') {\n baseOptions.sources.push(getAttributes(child));\n } else if (childName === 'track') {\n baseOptions.tracks.push(getAttributes(child));\n }\n }\n }\n return baseOptions;\n }\n }]);\n return Player;\n}(Component$1);\n/**\n * Get the {@link VideoTrackList}\n *\n * @link https://html.spec.whatwg.org/multipage/embedded-content.html#videotracklist\n *\n * @return {VideoTrackList}\n * the current video track list\n *\n * @method Player.prototype.videoTracks\n */\n/**\n * Get the {@link AudioTrackList}\n *\n * @link https://html.spec.whatwg.org/multipage/embedded-content.html#audiotracklist\n *\n * @return {AudioTrackList}\n * the current audio track list\n *\n * @method Player.prototype.audioTracks\n */\n/**\n * Get the {@link TextTrackList}\n *\n * @link http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-texttracks\n *\n * @return {TextTrackList}\n * the current text track list\n *\n * @method Player.prototype.textTracks\n */\n/**\n * Get the remote {@link TextTrackList}\n *\n * @return {TextTrackList}\n * The current remote text track list\n *\n * @method Player.prototype.remoteTextTracks\n */\n/**\n * Get the remote {@link HtmlTrackElementList} tracks.\n *\n * @return {HtmlTrackElementList}\n * The current remote text track element list\n *\n * @method Player.prototype.remoteTextTrackEls\n */\nALL.names.forEach(function (name) {\n var props = ALL[name];\n Player.prototype[props.getterName] = function () {\n if (this.tech_) {\n return this.tech_[props.getterName]();\n }\n\n // if we have not yet loadTech_, we create {video,audio,text}Tracks_\n // these will be passed to the tech during loading\n this[props.privateName] = this[props.privateName] || new props.ListClass();\n return this[props.privateName];\n };\n});\n\n/**\n * Get or set the `Player`'s crossorigin option. For the HTML5 player, this\n * sets the `crossOrigin` property on the `<video>` tag to control the CORS\n * behavior.\n *\n * @see [Video Element Attributes]{@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video#attr-crossorigin}\n *\n * @param {string} [value]\n * The value to set the `Player`'s crossorigin to. If an argument is\n * given, must be one of `anonymous` or `use-credentials`.\n *\n * @return {string|undefined}\n * - The current crossorigin value of the `Player` when getting.\n * - undefined when setting\n */\nPlayer.prototype.crossorigin = Player.prototype.crossOrigin;\n\n/**\n * Global enumeration of players.\n *\n * The keys are the player IDs and the values are either the {@link Player}\n * instance or `null` for disposed players.\n *\n * @type {Object}\n */\nPlayer.players = {};\nvar navigator = window$1.navigator;\n\n/*\n * Player instance options, surfaced using options\n * options = Player.prototype.options_\n * Make changes in options, not here.\n *\n * @type {Object}\n * @private\n */\nPlayer.prototype.options_ = {\n // Default order of fallback technology\n techOrder: Tech.defaultTechOrder_,\n html5: {},\n // enable sourceset by default\n enableSourceset: true,\n // default inactivity timeout\n inactivityTimeout: 2000,\n // default playback rates\n playbackRates: [],\n // Add playback rate selection by adding rates\n // 'playbackRates': [0.5, 1, 1.5, 2],\n liveui: false,\n // Included control sets\n children: ['mediaLoader', 'posterImage', 'titleBar', 'textTrackDisplay', 'loadingSpinner', 'bigPlayButton', 'liveTracker', 'controlBar', 'errorDisplay', 'textTrackSettings', 'resizeManager'],\n language: navigator && (navigator.languages && navigator.languages[0] || navigator.userLanguage || navigator.language) || 'en',\n // locales and their language translations\n languages: {},\n // Default message to show when a video cannot be played.\n notSupportedMessage: 'No compatible source was found for this media.',\n normalizeAutoplay: false,\n fullscreen: {\n options: {\n navigationUI: 'hide'\n }\n },\n breakpoints: {},\n responsive: false,\n audioOnlyMode: false,\n audioPosterMode: false\n};\n[\n/**\n * Returns whether or not the player is in the \"ended\" state.\n *\n * @return {Boolean} True if the player is in the ended state, false if not.\n * @method Player#ended\n */\n'ended',\n/**\n * Returns whether or not the player is in the \"seeking\" state.\n *\n * @return {Boolean} True if the player is in the seeking state, false if not.\n * @method Player#seeking\n */\n'seeking',\n/**\n * Returns the TimeRanges of the media that are currently available\n * for seeking to.\n *\n * @return {TimeRanges} the seekable intervals of the media timeline\n * @method Player#seekable\n */\n'seekable',\n/**\n * Returns the current state of network activity for the element, from\n * the codes in the list below.\n * - NETWORK_EMPTY (numeric value 0)\n * The element has not yet been initialised. All attributes are in\n * their initial states.\n * - NETWORK_IDLE (numeric value 1)\n * The element's resource selection algorithm is active and has\n * selected a resource, but it is not actually using the network at\n * this time.\n * - NETWORK_LOADING (numeric value 2)\n * The user agent is actively trying to download data.\n * - NETWORK_NO_SOURCE (numeric value 3)\n * The element's resource selection algorithm is active, but it has\n * not yet found a resource to use.\n *\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#network-states\n * @return {number} the current network activity state\n * @method Player#networkState\n */\n'networkState',\n/**\n * Returns a value that expresses the current state of the element\n * with respect to rendering the current playback position, from the\n * codes in the list below.\n * - HAVE_NOTHING (numeric value 0)\n * No information regarding the media resource is available.\n * - HAVE_METADATA (numeric value 1)\n * Enough of the resource has been obtained that the duration of the\n * resource is available.\n * - HAVE_CURRENT_DATA (numeric value 2)\n * Data for the immediate current playback position is available.\n * - HAVE_FUTURE_DATA (numeric value 3)\n * Data for the immediate current playback position is available, as\n * well as enough data for the user agent to advance the current\n * playback position in the direction of playback.\n * - HAVE_ENOUGH_DATA (numeric value 4)\n * The user agent estimates that enough data is available for\n * playback to proceed uninterrupted.\n *\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-readystate\n * @return {number} the current playback rendering state\n * @method Player#readyState\n */\n'readyState'].forEach(function (fn) {\n Player.prototype[fn] = function () {\n return this.techGet_(fn);\n };\n});\nTECH_EVENTS_RETRIGGER.forEach(function (event) {\n Player.prototype[\"handleTech\".concat(toTitleCase$1(event), \"_\")] = function () {\n return this.trigger(event);\n };\n});\n\n/**\n * Fired when the player has initial duration and dimension information\n *\n * @event Player#loadedmetadata\n * @type {Event}\n */\n\n/**\n * Fired when the player has downloaded data at the current playback position\n *\n * @event Player#loadeddata\n * @type {Event}\n */\n\n/**\n * Fired when the current playback position has changed *\n * During playback this is fired every 15-250 milliseconds, depending on the\n * playback technology in use.\n *\n * @event Player#timeupdate\n * @type {Event}\n */\n\n/**\n * Fired when the volume changes\n *\n * @event Player#volumechange\n * @type {Event}\n */\n\n/**\n * Reports whether or not a player has a plugin available.\n *\n * This does not report whether or not the plugin has ever been initialized\n * on this player. For that, [usingPlugin]{@link Player#usingPlugin}.\n *\n * @method Player#hasPlugin\n * @param {string} name\n * The name of a plugin.\n *\n * @return {boolean}\n * Whether or not this player has the requested plugin available.\n */\n\n/**\n * Reports whether or not a player is using a plugin by name.\n *\n * For basic plugins, this only reports whether the plugin has _ever_ been\n * initialized on this player.\n *\n * @method Player#usingPlugin\n * @param {string} name\n * The name of a plugin.\n *\n * @return {boolean}\n * Whether or not this player is using the requested plugin.\n */\n\nComponent$1.registerComponent('Player', Player);\n\n/**\n * @file plugin.js\n */\n\n/**\n * The base plugin name.\n *\n * @private\n * @constant\n * @type {string}\n */\nvar BASE_PLUGIN_NAME = 'plugin';\n\n/**\n * The key on which a player's active plugins cache is stored.\n *\n * @private\n * @constant\n * @type {string}\n */\nvar PLUGIN_CACHE_KEY = 'activePlugins_';\n\n/**\n * Stores registered plugins in a private space.\n *\n * @private\n * @type {Object}\n */\nvar pluginStorage = {};\n\n/**\n * Reports whether or not a plugin has been registered.\n *\n * @private\n * @param {string} name\n * The name of a plugin.\n *\n * @return {boolean}\n * Whether or not the plugin has been registered.\n */\nvar pluginExists = function pluginExists(name) {\n return pluginStorage.hasOwnProperty(name);\n};\n\n/**\n * Get a single registered plugin by name.\n *\n * @private\n * @param {string} name\n * The name of a plugin.\n *\n * @return {typeof Plugin|Function|undefined}\n * The plugin (or undefined).\n */\nvar getPlugin = function getPlugin(name) {\n return pluginExists(name) ? pluginStorage[name] : undefined;\n};\n\n/**\n * Marks a plugin as \"active\" on a player.\n *\n * Also, ensures that the player has an object for tracking active plugins.\n *\n * @private\n * @param {Player} player\n * A Video.js player instance.\n *\n * @param {string} name\n * The name of a plugin.\n */\nvar markPluginAsActive = function markPluginAsActive(player, name) {\n player[PLUGIN_CACHE_KEY] = player[PLUGIN_CACHE_KEY] || {};\n player[PLUGIN_CACHE_KEY][name] = true;\n};\n\n/**\n * Triggers a pair of plugin setup events.\n *\n * @private\n * @param {Player} player\n * A Video.js player instance.\n *\n * @param {PluginEventHash} hash\n * A plugin event hash.\n *\n * @param {boolean} [before]\n * If true, prefixes the event name with \"before\". In other words,\n * use this to trigger \"beforepluginsetup\" instead of \"pluginsetup\".\n */\nvar triggerSetupEvent = function triggerSetupEvent(player, hash, before) {\n var eventName = (before ? 'before' : '') + 'pluginsetup';\n player.trigger(eventName, hash);\n player.trigger(eventName + ':' + hash.name, hash);\n};\n\n/**\n * Takes a basic plugin function and returns a wrapper function which marks\n * on the player that the plugin has been activated.\n *\n * @private\n * @param {string} name\n * The name of the plugin.\n *\n * @param {Function} plugin\n * The basic plugin.\n *\n * @return {Function}\n * A wrapper function for the given plugin.\n */\nvar createBasicPlugin = function createBasicPlugin(name, plugin) {\n var basicPluginWrapper = function basicPluginWrapper() {\n // We trigger the \"beforepluginsetup\" and \"pluginsetup\" events on the player\n // regardless, but we want the hash to be consistent with the hash provided\n // for advanced plugins.\n //\n // The only potentially counter-intuitive thing here is the `instance` in\n // the \"pluginsetup\" event is the value returned by the `plugin` function.\n triggerSetupEvent(this, {\n name: name,\n plugin: plugin,\n instance: null\n }, true);\n var instance = plugin.apply(this, arguments);\n markPluginAsActive(this, name);\n triggerSetupEvent(this, {\n name: name,\n plugin: plugin,\n instance: instance\n });\n return instance;\n };\n Object.keys(plugin).forEach(function (prop) {\n basicPluginWrapper[prop] = plugin[prop];\n });\n return basicPluginWrapper;\n};\n\n/**\n * Takes a plugin sub-class and returns a factory function for generating\n * instances of it.\n *\n * This factory function will replace itself with an instance of the requested\n * sub-class of Plugin.\n *\n * @private\n * @param {string} name\n * The name of the plugin.\n *\n * @param {Plugin} PluginSubClass\n * The advanced plugin.\n *\n * @return {Function}\n */\nvar createPluginFactory = function createPluginFactory(name, PluginSubClass) {\n // Add a `name` property to the plugin prototype so that each plugin can\n // refer to itself by name.\n PluginSubClass.prototype.name = name;\n return function () {\n triggerSetupEvent(this, {\n name: name,\n plugin: PluginSubClass,\n instance: null\n }, true);\n for (var _len20 = arguments.length, args = new Array(_len20), _key20 = 0; _key20 < _len20; _key20++) {\n args[_key20] = arguments[_key20];\n }\n var instance = _construct(PluginSubClass, [this].concat(args));\n\n // The plugin is replaced by a function that returns the current instance.\n this[name] = function () {\n return instance;\n };\n triggerSetupEvent(this, instance.getEventHash());\n return instance;\n };\n};\n\n/**\n * Parent class for all advanced plugins.\n *\n * @mixes module:evented~EventedMixin\n * @mixes module:stateful~StatefulMixin\n * @fires Player#beforepluginsetup\n * @fires Player#beforepluginsetup:$name\n * @fires Player#pluginsetup\n * @fires Player#pluginsetup:$name\n * @listens Player#dispose\n * @throws {Error}\n * If attempting to instantiate the base {@link Plugin} class\n * directly instead of via a sub-class.\n */\nvar Plugin = /*#__PURE__*/function () {\n /**\n * Creates an instance of this class.\n *\n * Sub-classes should call `super` to ensure plugins are properly initialized.\n *\n * @param {Player} player\n * A Video.js player instance.\n */\n function Plugin(player) {\n _classCallCheck(this, Plugin);\n if (this.constructor === Plugin) {\n throw new Error('Plugin must be sub-classed; not directly instantiated.');\n }\n this.player = player;\n if (!this.log) {\n this.log = this.player.log.createLogger(this.name);\n }\n\n // Make this object evented, but remove the added `trigger` method so we\n // use the prototype version instead.\n evented(this);\n delete this.trigger;\n stateful(this, this.constructor.defaultState);\n markPluginAsActive(player, this.name);\n\n // Auto-bind the dispose method so we can use it as a listener and unbind\n // it later easily.\n this.dispose = this.dispose.bind(this);\n\n // If the player is disposed, dispose the plugin.\n player.on('dispose', this.dispose);\n }\n\n /**\n * Get the version of the plugin that was set on <pluginName>.VERSION\n */\n _createClass(Plugin, [{\n key: \"version\",\n value: function version() {\n return this.constructor.VERSION;\n }\n\n /**\n * Each event triggered by plugins includes a hash of additional data with\n * conventional properties.\n *\n * This returns that object or mutates an existing hash.\n *\n * @param {Object} [hash={}]\n * An object to be used as event an event hash.\n *\n * @return {PluginEventHash}\n * An event hash object with provided properties mixed-in.\n */\n }, {\n key: \"getEventHash\",\n value: function getEventHash() {\n var hash = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n hash.name = this.name;\n hash.plugin = this.constructor;\n hash.instance = this;\n return hash;\n }\n\n /**\n * Triggers an event on the plugin object and overrides\n * {@link module:evented~EventedMixin.trigger|EventedMixin.trigger}.\n *\n * @param {string|Object} event\n * An event type or an object with a type property.\n *\n * @param {Object} [hash={}]\n * Additional data hash to merge with a\n * {@link PluginEventHash|PluginEventHash}.\n *\n * @return {boolean}\n * Whether or not default was prevented.\n */\n }, {\n key: \"trigger\",\n value: function trigger(event) {\n var hash = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return _trigger(this.eventBusEl_, event, this.getEventHash(hash));\n }\n\n /**\n * Handles \"statechanged\" events on the plugin. No-op by default, override by\n * subclassing.\n *\n * @abstract\n * @param {Event} e\n * An event object provided by a \"statechanged\" event.\n *\n * @param {Object} e.changes\n * An object describing changes that occurred with the \"statechanged\"\n * event.\n */\n }, {\n key: \"handleStateChanged\",\n value: function handleStateChanged(e) {}\n\n /**\n * Disposes a plugin.\n *\n * Subclasses can override this if they want, but for the sake of safety,\n * it's probably best to subscribe the \"dispose\" event.\n *\n * @fires Plugin#dispose\n */\n }, {\n key: \"dispose\",\n value: function dispose() {\n var name = this.name,\n player = this.player;\n\n /**\n * Signals that a advanced plugin is about to be disposed.\n *\n * @event Plugin#dispose\n * @type {Event}\n */\n this.trigger('dispose');\n this.off();\n player.off('dispose', this.dispose);\n\n // Eliminate any possible sources of leaking memory by clearing up\n // references between the player and the plugin instance and nulling out\n // the plugin's state and replacing methods with a function that throws.\n player[PLUGIN_CACHE_KEY][name] = false;\n this.player = this.state = null;\n\n // Finally, replace the plugin name on the player with a new factory\n // function, so that the plugin is ready to be set up again.\n player[name] = createPluginFactory(name, pluginStorage[name]);\n }\n\n /**\n * Determines if a plugin is a basic plugin (i.e. not a sub-class of `Plugin`).\n *\n * @param {string|Function} plugin\n * If a string, matches the name of a plugin. If a function, will be\n * tested directly.\n *\n * @return {boolean}\n * Whether or not a plugin is a basic plugin.\n */\n }], [{\n key: \"isBasic\",\n value: function isBasic(plugin) {\n var p = typeof plugin === 'string' ? getPlugin(plugin) : plugin;\n return typeof p === 'function' && !Plugin.prototype.isPrototypeOf(p.prototype);\n }\n\n /**\n * Register a Video.js plugin.\n *\n * @param {string} name\n * The name of the plugin to be registered. Must be a string and\n * must not match an existing plugin or a method on the `Player`\n * prototype.\n *\n * @param {typeof Plugin|Function} plugin\n * A sub-class of `Plugin` or a function for basic plugins.\n *\n * @return {typeof Plugin|Function}\n * For advanced plugins, a factory function for that plugin. For\n * basic plugins, a wrapper function that initializes the plugin.\n */\n }, {\n key: \"registerPlugin\",\n value: function registerPlugin(name, plugin) {\n if (typeof name !== 'string') {\n throw new Error(\"Illegal plugin name, \\\"\".concat(name, \"\\\", must be a string, was \").concat(_typeof(name), \".\"));\n }\n if (pluginExists(name)) {\n log$1.warn(\"A plugin named \\\"\".concat(name, \"\\\" already exists. You may want to avoid re-registering plugins!\"));\n } else if (Player.prototype.hasOwnProperty(name)) {\n throw new Error(\"Illegal plugin name, \\\"\".concat(name, \"\\\", cannot share a name with an existing player method!\"));\n }\n if (typeof plugin !== 'function') {\n throw new Error(\"Illegal plugin for \\\"\".concat(name, \"\\\", must be a function, was \").concat(_typeof(plugin), \".\"));\n }\n pluginStorage[name] = plugin;\n\n // Add a player prototype method for all sub-classed plugins (but not for\n // the base Plugin class).\n if (name !== BASE_PLUGIN_NAME) {\n if (Plugin.isBasic(plugin)) {\n Player.prototype[name] = createBasicPlugin(name, plugin);\n } else {\n Player.prototype[name] = createPluginFactory(name, plugin);\n }\n }\n return plugin;\n }\n\n /**\n * De-register a Video.js plugin.\n *\n * @param {string} name\n * The name of the plugin to be de-registered. Must be a string that\n * matches an existing plugin.\n *\n * @throws {Error}\n * If an attempt is made to de-register the base plugin.\n */\n }, {\n key: \"deregisterPlugin\",\n value: function deregisterPlugin(name) {\n if (name === BASE_PLUGIN_NAME) {\n throw new Error('Cannot de-register base plugin.');\n }\n if (pluginExists(name)) {\n delete pluginStorage[name];\n delete Player.prototype[name];\n }\n }\n\n /**\n * Gets an object containing multiple Video.js plugins.\n *\n * @param {Array} [names]\n * If provided, should be an array of plugin names. Defaults to _all_\n * plugin names.\n *\n * @return {Object|undefined}\n * An object containing plugin(s) associated with their name(s) or\n * `undefined` if no matching plugins exist).\n */\n }, {\n key: \"getPlugins\",\n value: function getPlugins() {\n var names = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Object.keys(pluginStorage);\n var result;\n names.forEach(function (name) {\n var plugin = getPlugin(name);\n if (plugin) {\n result = result || {};\n result[name] = plugin;\n }\n });\n return result;\n }\n\n /**\n * Gets a plugin's version, if available\n *\n * @param {string} name\n * The name of a plugin.\n *\n * @return {string}\n * The plugin's version or an empty string.\n */\n }, {\n key: \"getPluginVersion\",\n value: function getPluginVersion(name) {\n var plugin = getPlugin(name);\n return plugin && plugin.VERSION || '';\n }\n }]);\n return Plugin;\n}();\n/**\n * Gets a plugin by name if it exists.\n *\n * @static\n * @method getPlugin\n * @memberOf Plugin\n * @param {string} name\n * The name of a plugin.\n *\n * @returns {typeof Plugin|Function|undefined}\n * The plugin (or `undefined`).\n */\nPlugin.getPlugin = getPlugin;\n\n/**\n * The name of the base plugin class as it is registered.\n *\n * @type {string}\n */\nPlugin.BASE_PLUGIN_NAME = BASE_PLUGIN_NAME;\nPlugin.registerPlugin(BASE_PLUGIN_NAME, Plugin);\n\n/**\n * Documented in player.js\n *\n * @ignore\n */\nPlayer.prototype.usingPlugin = function (name) {\n return !!this[PLUGIN_CACHE_KEY] && this[PLUGIN_CACHE_KEY][name] === true;\n};\n\n/**\n * Documented in player.js\n *\n * @ignore\n */\nPlayer.prototype.hasPlugin = function (name) {\n return !!pluginExists(name);\n};\n\n/**\n * Signals that a plugin is about to be set up on a player.\n *\n * @event Player#beforepluginsetup\n * @type {PluginEventHash}\n */\n\n/**\n * Signals that a plugin is about to be set up on a player - by name. The name\n * is the name of the plugin.\n *\n * @event Player#beforepluginsetup:$name\n * @type {PluginEventHash}\n */\n\n/**\n * Signals that a plugin has just been set up on a player.\n *\n * @event Player#pluginsetup\n * @type {PluginEventHash}\n */\n\n/**\n * Signals that a plugin has just been set up on a player - by name. The name\n * is the name of the plugin.\n *\n * @event Player#pluginsetup:$name\n * @type {PluginEventHash}\n */\n\n/**\n * @typedef {Object} PluginEventHash\n *\n * @property {string} instance\n * For basic plugins, the return value of the plugin function. For\n * advanced plugins, the plugin instance on which the event is fired.\n *\n * @property {string} name\n * The name of the plugin.\n *\n * @property {string} plugin\n * For basic plugins, the plugin function. For advanced plugins, the\n * plugin class/constructor.\n */\n\n/**\n * @file deprecate.js\n * @module deprecate\n */\n\n/**\n * Decorate a function with a deprecation message the first time it is called.\n *\n * @param {string} message\n * A deprecation message to log the first time the returned function\n * is called.\n *\n * @param {Function} fn\n * The function to be deprecated.\n *\n * @return {Function}\n * A wrapper function that will log a deprecation warning the first\n * time it is called. The return value will be the return value of\n * the wrapped function.\n */\nfunction deprecate(message, fn) {\n var warned = false;\n return function () {\n if (!warned) {\n log$1.warn(message);\n }\n warned = true;\n for (var _len21 = arguments.length, args = new Array(_len21), _key21 = 0; _key21 < _len21; _key21++) {\n args[_key21] = arguments[_key21];\n }\n return fn.apply(this, args);\n };\n}\n\n/**\n * Internal function used to mark a function as deprecated in the next major\n * version with consistent messaging.\n *\n * @param {number} major The major version where it will be removed\n * @param {string} oldName The old function name\n * @param {string} newName The new function name\n * @param {Function} fn The function to deprecate\n * @return {Function} The decorated function\n */\nfunction deprecateForMajor(major, oldName, newName, fn) {\n return deprecate(\"\".concat(oldName, \" is deprecated and will be removed in \").concat(major, \".0; please use \").concat(newName, \" instead.\"), fn);\n}\n\n/**\n * @file video.js\n * @module videojs\n */\n\n/**\n * Normalize an `id` value by trimming off a leading `#`\n *\n * @private\n * @param {string} id\n * A string, maybe with a leading `#`.\n *\n * @return {string}\n * The string, without any leading `#`.\n */\nvar normalizeId = function normalizeId(id) {\n return id.indexOf('#') === 0 ? id.slice(1) : id;\n};\n\n/**\n * A callback that is called when a component is ready. Does not have any\n * parameters and any callback value will be ignored. See: {@link Component~ReadyCallback}\n *\n * @callback ReadyCallback\n */\n\n/**\n * The `videojs()` function doubles as the main function for users to create a\n * {@link Player} instance as well as the main library namespace.\n *\n * It can also be used as a getter for a pre-existing {@link Player} instance.\n * However, we _strongly_ recommend using `videojs.getPlayer()` for this\n * purpose because it avoids any potential for unintended initialization.\n *\n * Due to [limitations](https://github.com/jsdoc3/jsdoc/issues/955#issuecomment-313829149)\n * of our JSDoc template, we cannot properly document this as both a function\n * and a namespace, so its function signature is documented here.\n *\n * #### Arguments\n * ##### id\n * string|Element, **required**\n *\n * Video element or video element ID.\n *\n * ##### options\n * Object, optional\n *\n * Options object for providing settings.\n * See: [Options Guide](https://docs.videojs.com/tutorial-options.html).\n *\n * ##### ready\n * {@link Component~ReadyCallback}, optional\n *\n * A function to be called when the {@link Player} and {@link Tech} are ready.\n *\n * #### Return Value\n *\n * The `videojs()` function returns a {@link Player} instance.\n *\n * @namespace\n *\n * @borrows AudioTrack as AudioTrack\n * @borrows Component.getComponent as getComponent\n * @borrows module:events.on as on\n * @borrows module:events.one as one\n * @borrows module:events.off as off\n * @borrows module:events.trigger as trigger\n * @borrows EventTarget as EventTarget\n * @borrows module:middleware.use as use\n * @borrows Player.players as players\n * @borrows Plugin.registerPlugin as registerPlugin\n * @borrows Plugin.deregisterPlugin as deregisterPlugin\n * @borrows Plugin.getPlugins as getPlugins\n * @borrows Plugin.getPlugin as getPlugin\n * @borrows Plugin.getPluginVersion as getPluginVersion\n * @borrows Tech.getTech as getTech\n * @borrows Tech.registerTech as registerTech\n * @borrows TextTrack as TextTrack\n * @borrows VideoTrack as VideoTrack\n *\n * @param {string|Element} id\n * Video element or video element ID.\n *\n * @param {Object} [options]\n * Options object for providing settings.\n * See: [Options Guide](https://docs.videojs.com/tutorial-options.html).\n *\n * @param {ReadyCallback} [ready]\n * A function to be called when the {@link Player} and {@link Tech} are\n * ready.\n *\n * @return {Player}\n * The `videojs()` function returns a {@link Player|Player} instance.\n */\nfunction videojs(id, options, ready) {\n var player = videojs.getPlayer(id);\n if (player) {\n if (options) {\n log$1.warn(\"Player \\\"\".concat(id, \"\\\" is already initialised. Options will not be applied.\"));\n }\n if (ready) {\n player.ready(ready);\n }\n return player;\n }\n var el = typeof id === 'string' ? _$('#' + normalizeId(id)) : id;\n if (!isEl(el)) {\n throw new TypeError('The element or ID supplied is not valid. (videojs)');\n }\n\n // document.body.contains(el) will only check if el is contained within that one document.\n // This causes problems for elements in iframes.\n // Instead, use the element's ownerDocument instead of the global document.\n // This will make sure that the element is indeed in the dom of that document.\n // Additionally, check that the document in question has a default view.\n // If the document is no longer attached to the dom, the defaultView of the document will be null.\n // If element is inside Shadow DOM (e.g. is part of a Custom element), ownerDocument.body\n // always returns false. Instead, use the Shadow DOM root.\n var inShadowDom = 'getRootNode' in el ? el.getRootNode() instanceof window$1.ShadowRoot : false;\n var rootNode = inShadowDom ? el.getRootNode() : el.ownerDocument.body;\n if (!el.ownerDocument.defaultView || !rootNode.contains(el)) {\n log$1.warn('The element supplied is not included in the DOM');\n }\n options = options || {};\n\n // Store a copy of the el before modification, if it is to be restored in destroy()\n // If div ingest, store the parent div\n if (options.restoreEl === true) {\n options.restoreEl = (el.parentNode && el.parentNode.hasAttribute('data-vjs-player') ? el.parentNode : el).cloneNode(true);\n }\n hooks('beforesetup').forEach(function (hookFunction) {\n var opts = hookFunction(el, merge$1(options));\n if (!isObject(opts) || Array.isArray(opts)) {\n log$1.error('please return an object in beforesetup hooks');\n return;\n }\n options = merge$1(options, opts);\n });\n\n // We get the current \"Player\" component here in case an integration has\n // replaced it with a custom player.\n var PlayerComponent = Component$1.getComponent('Player');\n player = new PlayerComponent(el, options, ready);\n hooks('setup').forEach(function (hookFunction) {\n return hookFunction(player);\n });\n return player;\n}\nvideojs.hooks_ = hooks_;\nvideojs.hooks = hooks;\nvideojs.hook = hook;\nvideojs.hookOnce = hookOnce;\nvideojs.removeHook = removeHook;\n\n// Add default styles\nif (window$1.VIDEOJS_NO_DYNAMIC_STYLE !== true && isReal()) {\n var style = _$('.vjs-styles-defaults');\n if (!style) {\n style = createStyleElement('vjs-styles-defaults');\n var head = _$('head');\n if (head) {\n head.insertBefore(style, head.firstChild);\n }\n setTextContent(style, \"\\n .video-js {\\n width: 300px;\\n height: 150px;\\n }\\n\\n .vjs-fluid:not(.vjs-audio-only-mode) {\\n padding-top: 56.25%\\n }\\n \");\n }\n}\n\n// Run Auto-load players\n// You have to wait at least once in case this script is loaded after your\n// video in the DOM (weird behavior only with minified version)\nautoSetupTimeout(1, videojs);\n\n/**\n * Current Video.js version. Follows [semantic versioning](https://semver.org/).\n *\n * @type {string}\n */\nvideojs.VERSION = version$6;\n\n/**\n * The global options object. These are the settings that take effect\n * if no overrides are specified when the player is created.\n *\n * @type {Object}\n */\nvideojs.options = Player.prototype.options_;\n\n/**\n * Get an object with the currently created players, keyed by player ID\n *\n * @return {Object}\n * The created players\n */\nvideojs.getPlayers = function () {\n return Player.players;\n};\n\n/**\n * Get a single player based on an ID or DOM element.\n *\n * This is useful if you want to check if an element or ID has an associated\n * Video.js player, but not create one if it doesn't.\n *\n * @param {string|Element} id\n * An HTML element - `<video>`, `<audio>`, or `<video-js>` -\n * or a string matching the `id` of such an element.\n *\n * @return {Player|undefined}\n * A player instance or `undefined` if there is no player instance\n * matching the argument.\n */\nvideojs.getPlayer = function (id) {\n var players = Player.players;\n var tag;\n if (typeof id === 'string') {\n var nId = normalizeId(id);\n var player = players[nId];\n if (player) {\n return player;\n }\n tag = _$('#' + nId);\n } else {\n tag = id;\n }\n if (isEl(tag)) {\n var _tag = tag,\n _player2 = _tag.player,\n playerId = _tag.playerId;\n\n // Element may have a `player` property referring to an already created\n // player instance. If so, return that.\n if (_player2 || players[playerId]) {\n return _player2 || players[playerId];\n }\n }\n};\n\n/**\n * Returns an array of all current players.\n *\n * @return {Array}\n * An array of all players. The array will be in the order that\n * `Object.keys` provides, which could potentially vary between\n * JavaScript engines.\n *\n */\nvideojs.getAllPlayers = function () {\n return (\n // Disposed players leave a key with a `null` value, so we need to make sure\n // we filter those out.\n Object.keys(Player.players).map(function (k) {\n return Player.players[k];\n }).filter(Boolean)\n );\n};\nvideojs.players = Player.players;\nvideojs.getComponent = Component$1.getComponent;\n\n/**\n * Register a component so it can referred to by name. Used when adding to other\n * components, either through addChild `component.addChild('myComponent')` or through\n * default children options `{ children: ['myComponent'] }`.\n *\n * > NOTE: You could also just initialize the component before adding.\n * `component.addChild(new MyComponent());`\n *\n * @param {string} name\n * The class name of the component\n *\n * @param {typeof Component} comp\n * The component class\n *\n * @return {typeof Component}\n * The newly registered component\n */\nvideojs.registerComponent = function (name, comp) {\n if (Tech.isTech(comp)) {\n log$1.warn(\"The \".concat(name, \" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)\"));\n }\n return Component$1.registerComponent.call(Component$1, name, comp);\n};\nvideojs.getTech = Tech.getTech;\nvideojs.registerTech = Tech.registerTech;\nvideojs.use = use;\n\n/**\n * An object that can be returned by a middleware to signify\n * that the middleware is being terminated.\n *\n * @type {object}\n * @property {object} middleware.TERMINATOR\n */\nObject.defineProperty(videojs, 'middleware', {\n value: {},\n writeable: false,\n enumerable: true\n});\nObject.defineProperty(videojs.middleware, 'TERMINATOR', {\n value: TERMINATOR,\n writeable: false,\n enumerable: true\n});\n\n/**\n * A reference to the {@link module:browser|browser utility module} as an object.\n *\n * @type {Object}\n * @see {@link module:browser|browser}\n */\nvideojs.browser = browser;\n\n/**\n * A reference to the {@link module:obj|obj utility module} as an object.\n *\n * @type {Object}\n * @see {@link module:obj|obj}\n */\nvideojs.obj = Obj;\n\n/**\n * Deprecated reference to the {@link module:obj.merge|merge function}\n *\n * @type {Function}\n * @see {@link module:obj.merge|merge}\n * @deprecated Deprecated and will be removed in 9.0. Please use videojs.obj.merge instead.\n */\nvideojs.mergeOptions = deprecateForMajor(9, 'videojs.mergeOptions', 'videojs.obj.merge', merge$1);\n\n/**\n * Deprecated reference to the {@link module:obj.defineLazyProperty|defineLazyProperty function}\n *\n * @type {Function}\n * @see {@link module:obj.defineLazyProperty|defineLazyProperty}\n * @deprecated Deprecated and will be removed in 9.0. Please use videojs.obj.defineLazyProperty instead.\n */\nvideojs.defineLazyProperty = deprecateForMajor(9, 'videojs.defineLazyProperty', 'videojs.obj.defineLazyProperty', defineLazyProperty);\n\n/**\n * Deprecated reference to the {@link module:fn.bind_|fn.bind_ function}\n *\n * @type {Function}\n * @see {@link module:fn.bind_|fn.bind_}\n * @deprecated Deprecated and will be removed in 9.0. Please use native Function.prototype.bind instead.\n */\nvideojs.bind = deprecateForMajor(9, 'videojs.bind', 'native Function.prototype.bind', bind_);\nvideojs.registerPlugin = Plugin.registerPlugin;\nvideojs.deregisterPlugin = Plugin.deregisterPlugin;\n\n/**\n * Deprecated method to register a plugin with Video.js\n *\n * @deprecated Deprecated and will be removed in 9.0. Use videojs.registerPlugin() instead.\n *\n * @param {string} name\n * The plugin name\n*\n * @param {typeof Plugin|Function} plugin\n * The plugin sub-class or function\n *\n * @return {typeof Plugin|Function}\n */\nvideojs.plugin = function (name, plugin) {\n log$1.warn('videojs.plugin() is deprecated; use videojs.registerPlugin() instead');\n return Plugin.registerPlugin(name, plugin);\n};\nvideojs.getPlugins = Plugin.getPlugins;\nvideojs.getPlugin = Plugin.getPlugin;\nvideojs.getPluginVersion = Plugin.getPluginVersion;\n\n/**\n * Adding languages so that they're available to all players.\n * Example: `videojs.addLanguage('es', { 'Hello': 'Hola' });`\n *\n * @param {string} code\n * The language code or dictionary property\n *\n * @param {Object} data\n * The data values to be translated\n *\n * @return {Object}\n * The resulting language dictionary object\n */\nvideojs.addLanguage = function (code, data) {\n code = ('' + code).toLowerCase();\n videojs.options.languages = merge$1(videojs.options.languages, _defineProperty({}, code, data));\n return videojs.options.languages[code];\n};\n\n/**\n * A reference to the {@link module:log|log utility module} as an object.\n *\n * @type {Function}\n * @see {@link module:log|log}\n */\nvideojs.log = log$1;\nvideojs.createLogger = createLogger;\n\n/**\n * A reference to the {@link module:time|time utility module} as an object.\n *\n * @type {Object}\n * @see {@link module:time|time}\n */\nvideojs.time = Time;\n\n/**\n * Deprecated reference to the {@link module:time.createTimeRanges|createTimeRanges function}\n *\n * @type {Function}\n * @see {@link module:time.createTimeRanges|createTimeRanges}\n * @deprecated Deprecated and will be removed in 9.0. Please use videojs.time.createTimeRanges instead.\n */\nvideojs.createTimeRange = deprecateForMajor(9, 'videojs.createTimeRange', 'videojs.time.createTimeRanges', createTimeRanges$1);\n\n/**\n * Deprecated reference to the {@link module:time.createTimeRanges|createTimeRanges function}\n *\n * @type {Function}\n * @see {@link module:time.createTimeRanges|createTimeRanges}\n * @deprecated Deprecated and will be removed in 9.0. Please use videojs.time.createTimeRanges instead.\n */\nvideojs.createTimeRanges = deprecateForMajor(9, 'videojs.createTimeRanges', 'videojs.time.createTimeRanges', createTimeRanges$1);\n\n/**\n * Deprecated reference to the {@link module:time.formatTime|formatTime function}\n *\n * @type {Function}\n * @see {@link module:time.formatTime|formatTime}\n * @deprecated Deprecated and will be removed in 9.0. Please use videojs.time.format instead.\n */\nvideojs.formatTime = deprecateForMajor(9, 'videojs.formatTime', 'videojs.time.formatTime', formatTime);\n\n/**\n * Deprecated reference to the {@link module:time.setFormatTime|setFormatTime function}\n *\n * @type {Function}\n * @see {@link module:time.setFormatTime|setFormatTime}\n * @deprecated Deprecated and will be removed in 9.0. Please use videojs.time.setFormat instead.\n */\nvideojs.setFormatTime = deprecateForMajor(9, 'videojs.setFormatTime', 'videojs.time.setFormatTime', setFormatTime);\n\n/**\n * Deprecated reference to the {@link module:time.resetFormatTime|resetFormatTime function}\n *\n * @type {Function}\n * @see {@link module:time.resetFormatTime|resetFormatTime}\n * @deprecated Deprecated and will be removed in 9.0. Please use videojs.time.resetFormat instead.\n */\nvideojs.resetFormatTime = deprecateForMajor(9, 'videojs.resetFormatTime', 'videojs.time.resetFormatTime', resetFormatTime);\n\n/**\n * Deprecated reference to the {@link module:url.parseUrl|Url.parseUrl function}\n *\n * @type {Function}\n * @see {@link module:url.parseUrl|parseUrl}\n * @deprecated Deprecated and will be removed in 9.0. Please use videojs.url.parseUrl instead.\n */\nvideojs.parseUrl = deprecateForMajor(9, 'videojs.parseUrl', 'videojs.url.parseUrl', parseUrl);\n\n/**\n * Deprecated reference to the {@link module:url.isCrossOrigin|Url.isCrossOrigin function}\n *\n * @type {Function}\n * @see {@link module:url.isCrossOrigin|isCrossOrigin}\n * @deprecated Deprecated and will be removed in 9.0. Please use videojs.url.isCrossOrigin instead.\n */\nvideojs.isCrossOrigin = deprecateForMajor(9, 'videojs.isCrossOrigin', 'videojs.url.isCrossOrigin', isCrossOrigin);\nvideojs.EventTarget = EventTarget$2;\nvideojs.any = _any;\nvideojs.on = _on;\nvideojs.one = _one;\nvideojs.off = _off;\nvideojs.trigger = _trigger;\n\n/**\n * A cross-browser XMLHttpRequest wrapper.\n *\n * @function\n * @param {Object} options\n * Settings for the request.\n *\n * @return {XMLHttpRequest|XDomainRequest}\n * The request object.\n *\n * @see https://github.com/Raynos/xhr\n */\nvideojs.xhr = XHR;\nvideojs.TextTrack = TextTrack;\nvideojs.AudioTrack = AudioTrack;\nvideojs.VideoTrack = VideoTrack;\n['isEl', 'isTextNode', 'createEl', 'hasClass', 'addClass', 'removeClass', 'toggleClass', 'setAttributes', 'getAttributes', 'emptyEl', 'appendContent', 'insertContent'].forEach(function (k) {\n videojs[k] = function () {\n log$1.warn(\"videojs.\".concat(k, \"() is deprecated; use videojs.dom.\").concat(k, \"() instead\"));\n return Dom[k].apply(null, arguments);\n };\n});\nvideojs.computedStyle = deprecateForMajor(9, 'videojs.computedStyle', 'videojs.dom.computedStyle', computedStyle);\n\n/**\n * A reference to the {@link module:dom|DOM utility module} as an object.\n *\n * @type {Object}\n * @see {@link module:dom|dom}\n */\nvideojs.dom = Dom;\n\n/**\n * A reference to the {@link module:fn|fn utility module} as an object.\n *\n * @type {Object}\n * @see {@link module:fn|fn}\n */\nvideojs.fn = Fn;\n\n/**\n * A reference to the {@link module:num|num utility module} as an object.\n *\n * @type {Object}\n * @see {@link module:num|num}\n */\nvideojs.num = Num;\n\n/**\n * A reference to the {@link module:str|str utility module} as an object.\n *\n * @type {Object}\n * @see {@link module:str|str}\n */\nvideojs.str = Str;\n\n/**\n * A reference to the {@link module:url|URL utility module} as an object.\n *\n * @type {Object}\n * @see {@link module:url|url}\n */\nvideojs.url = Url;\n\n/*! @name videojs-contrib-quality-levels @version 4.0.0 @license Apache-2.0 */\n\n/**\n * A single QualityLevel.\n *\n * interface QualityLevel {\n * readonly attribute DOMString id;\n * attribute DOMString label;\n * readonly attribute long width;\n * readonly attribute long height;\n * readonly attribute long bitrate;\n * attribute boolean enabled;\n * };\n *\n * @class QualityLevel\n */\nvar QualityLevel = /*#__PURE__*/_createClass(\n/**\n * Creates a QualityLevel\n *\n * @param {Representation|Object} representation The representation of the quality level\n * @param {string} representation.id Unique id of the QualityLevel\n * @param {number=} representation.width Resolution width of the QualityLevel\n * @param {number=} representation.height Resolution height of the QualityLevel\n * @param {number} representation.bandwidth Bitrate of the QualityLevel\n * @param {number=} representation.frameRate Frame-rate of the QualityLevel\n * @param {Function} representation.enabled Callback to enable/disable QualityLevel\n */\nfunction QualityLevel(representation) {\n _classCallCheck(this, QualityLevel);\n var level = this; // eslint-disable-line\n\n level.id = representation.id;\n level.label = level.id;\n level.width = representation.width;\n level.height = representation.height;\n level.bitrate = representation.bandwidth;\n level.frameRate = representation.frameRate;\n level.enabled_ = representation.enabled;\n Object.defineProperty(level, 'enabled', {\n /**\n * Get whether the QualityLevel is enabled.\n *\n * @return {boolean} True if the QualityLevel is enabled.\n */\n get: function get() {\n return level.enabled_();\n },\n /**\n * Enable or disable the QualityLevel.\n *\n * @param {boolean} enable true to enable QualityLevel, false to disable.\n */\n set: function set(enable) {\n level.enabled_(enable);\n }\n });\n return level;\n});\n/**\n * A list of QualityLevels.\n *\n * interface QualityLevelList : EventTarget {\n * getter QualityLevel (unsigned long index);\n * readonly attribute unsigned long length;\n * readonly attribute long selectedIndex;\n *\n * void addQualityLevel(QualityLevel qualityLevel)\n * void removeQualityLevel(QualityLevel remove)\n * QualityLevel? getQualityLevelById(DOMString id);\n *\n * attribute EventHandler onchange;\n * attribute EventHandler onaddqualitylevel;\n * attribute EventHandler onremovequalitylevel;\n * };\n *\n * @extends videojs.EventTarget\n * @class QualityLevelList\n */\nvar QualityLevelList = /*#__PURE__*/function (_videojs$EventTarget) {\n _inherits(QualityLevelList, _videojs$EventTarget);\n var _super75 = _createSuper(QualityLevelList);\n /**\n * Creates a QualityLevelList.\n */\n function QualityLevelList() {\n var _this129;\n _classCallCheck(this, QualityLevelList);\n _this129 = _super75.call(this);\n var list = _assertThisInitialized(_this129); // eslint-disable-line\n\n list.levels_ = [];\n list.selectedIndex_ = -1;\n /**\n * Get the index of the currently selected QualityLevel.\n *\n * @returns {number} The index of the selected QualityLevel. -1 if none selected.\n * @readonly\n */\n\n Object.defineProperty(list, 'selectedIndex', {\n get: function get() {\n return list.selectedIndex_;\n }\n });\n /**\n * Get the length of the list of QualityLevels.\n *\n * @returns {number} The length of the list.\n * @readonly\n */\n\n Object.defineProperty(list, 'length', {\n get: function get() {\n return list.levels_.length;\n }\n });\n list[Symbol.iterator] = function () {\n return list.levels_.values();\n };\n return _possibleConstructorReturn(_this129, list);\n }\n /**\n * Adds a quality level to the list.\n *\n * @param {Representation|Object} representation The representation of the quality level\n * @param {string} representation.id Unique id of the QualityLevel\n * @param {number=} representation.width Resolution width of the QualityLevel\n * @param {number=} representation.height Resolution height of the QualityLevel\n * @param {number} representation.bandwidth Bitrate of the QualityLevel\n * @param {number=} representation.frameRate Frame-rate of the QualityLevel\n * @param {Function} representation.enabled Callback to enable/disable QualityLevel\n * @return {QualityLevel} the QualityLevel added to the list\n * @method addQualityLevel\n */\n _createClass(QualityLevelList, [{\n key: \"addQualityLevel\",\n value: function addQualityLevel(representation) {\n var qualityLevel = this.getQualityLevelById(representation.id); // Do not add duplicate quality levels\n\n if (qualityLevel) {\n return qualityLevel;\n }\n var index = this.levels_.length;\n qualityLevel = new QualityLevel(representation);\n if (!('' + index in this)) {\n Object.defineProperty(this, index, {\n get: function get() {\n return this.levels_[index];\n }\n });\n }\n this.levels_.push(qualityLevel);\n this.trigger({\n qualityLevel: qualityLevel,\n type: 'addqualitylevel'\n });\n return qualityLevel;\n }\n /**\n * Removes a quality level from the list.\n *\n * @param {QualityLevel} qualityLevel The QualityLevel to remove from the list.\n * @return {QualityLevel|null} the QualityLevel removed or null if nothing removed\n * @method removeQualityLevel\n */\n }, {\n key: \"removeQualityLevel\",\n value: function removeQualityLevel(qualityLevel) {\n var removed = null;\n for (var _i67 = 0, l = this.length; _i67 < l; _i67++) {\n if (this[_i67] === qualityLevel) {\n removed = this.levels_.splice(_i67, 1)[0];\n if (this.selectedIndex_ === _i67) {\n this.selectedIndex_ = -1;\n } else if (this.selectedIndex_ > _i67) {\n this.selectedIndex_--;\n }\n break;\n }\n }\n if (removed) {\n this.trigger({\n qualityLevel: qualityLevel,\n type: 'removequalitylevel'\n });\n }\n return removed;\n }\n /**\n * Searches for a QualityLevel with the given id.\n *\n * @param {string} id The id of the QualityLevel to find.\n * @return {QualityLevel|null} The QualityLevel with id, or null if not found.\n * @method getQualityLevelById\n */\n }, {\n key: \"getQualityLevelById\",\n value: function getQualityLevelById(id) {\n for (var _i68 = 0, l = this.length; _i68 < l; _i68++) {\n var level = this[_i68];\n if (level.id === id) {\n return level;\n }\n }\n return null;\n }\n /**\n * Resets the list of QualityLevels to empty\n *\n * @method dispose\n */\n }, {\n key: \"dispose\",\n value: function dispose() {\n this.selectedIndex_ = -1;\n this.levels_.length = 0;\n }\n }]);\n return QualityLevelList;\n}(videojs.EventTarget);\n/**\n * change - The selected QualityLevel has changed.\n * addqualitylevel - A QualityLevel has been added to the QualityLevelList.\n * removequalitylevel - A QualityLevel has been removed from the QualityLevelList.\n */\nQualityLevelList.prototype.allowedEvents_ = {\n change: 'change',\n addqualitylevel: 'addqualitylevel',\n removequalitylevel: 'removequalitylevel'\n}; // emulate attribute EventHandler support to allow for feature detection\n\nfor (var _event2 in QualityLevelList.prototype.allowedEvents_) {\n QualityLevelList.prototype['on' + _event2] = null;\n}\nvar version$5 = \"4.0.0\";\n\n/**\n * Initialization function for the qualityLevels plugin. Sets up the QualityLevelList and\n * event handlers.\n *\n * @param {Player} player Player object.\n * @param {Object} options Plugin options object.\n * @return {QualityLevelList} a list of QualityLevels\n */\n\nvar initPlugin$1 = function initPlugin$1(player, options) {\n var originalPluginFn = player.qualityLevels;\n var qualityLevelList = new QualityLevelList();\n var disposeHandler = function disposeHandler() {\n qualityLevelList.dispose();\n player.qualityLevels = originalPluginFn;\n player.off('dispose', disposeHandler);\n };\n player.on('dispose', disposeHandler);\n player.qualityLevels = function () {\n return qualityLevelList;\n };\n player.qualityLevels.VERSION = version$5;\n return qualityLevelList;\n};\n/**\n * A video.js plugin.\n *\n * In the plugin function, the value of `this` is a video.js `Player`\n * instance. You cannot rely on the player being in a \"ready\" state here,\n * depending on how the plugin is invoked. This may or may not be important\n * to you; if not, remove the wait for \"ready\"!\n *\n * @param {Object} options Plugin options object\n * @return {QualityLevelList} a list of QualityLevels\n */\n\nvar qualityLevels = function qualityLevels(options) {\n return initPlugin$1(this, videojs.obj.merge({}, options));\n}; // Register the plugin with video.js.\n\nvideojs.registerPlugin('qualityLevels', qualityLevels); // Include the version number.\n\nqualityLevels.VERSION = version$5;\n\n/*! @name @videojs/http-streaming @version 3.7.0 @license Apache-2.0 */\n\n/**\n * @file resolve-url.js - Handling how URLs are resolved and manipulated\n */\nvar resolveUrl = _resolveUrl;\n/**\n * If the xhr request was redirected, return the responseURL, otherwise,\n * return the original url.\n *\n * @api private\n *\n * @param {string} url - an url being requested\n * @param {XMLHttpRequest} req - xhr request result\n *\n * @return {string}\n */\n\nvar resolveManifestRedirect = function resolveManifestRedirect(url, req) {\n // To understand how the responseURL below is set and generated:\n // - https://fetch.spec.whatwg.org/#concept-response-url\n // - https://fetch.spec.whatwg.org/#atomic-http-redirect-handling\n if (req && req.responseURL && url !== req.responseURL) {\n return req.responseURL;\n }\n return url;\n};\nvar logger = function logger(source) {\n if (videojs.log.debug) {\n return videojs.log.debug.bind(videojs, 'VHS:', \"\".concat(source, \" >\"));\n }\n return function () {};\n};\n\n/**\n * Provides a compatibility layer between Video.js 7 and 8 API changes for VHS.\n */\n/**\n * Delegates to videojs.obj.merge (Video.js 8) or\n * videojs.mergeOptions (Video.js 7).\n */\n\nfunction merge() {\n var context = videojs.obj || videojs;\n var fn = context.merge || context.mergeOptions;\n for (var _len22 = arguments.length, args = new Array(_len22), _key22 = 0; _key22 < _len22; _key22++) {\n args[_key22] = arguments[_key22];\n }\n return fn.apply(context, args);\n}\n/**\n * Delegates to videojs.time.createTimeRanges (Video.js 8) or\n * videojs.createTimeRanges (Video.js 7).\n */\n\nfunction createTimeRanges() {\n var context = videojs.time || videojs;\n var fn = context.createTimeRanges || context.createTimeRanges;\n for (var _len23 = arguments.length, args = new Array(_len23), _key23 = 0; _key23 < _len23; _key23++) {\n args[_key23] = arguments[_key23];\n }\n return fn.apply(context, args);\n}\n/**\n * Converts any buffered time range to a descriptive string\n *\n * @param {TimeRanges} buffered - time ranges\n * @return {string} - descriptive string\n */\n\nfunction prettyBuffered(buffered) {\n var result = '';\n for (var _i69 = 0; _i69 < buffered.length; _i69++) {\n var start = buffered.start(_i69);\n var end = buffered.end(_i69);\n var _duration = end - start;\n if (result.length) {\n result += '\\n';\n }\n result += \"[\".concat(_duration, \"](\").concat(start, \" -> \").concat(end, \")\");\n }\n return result || 'empty';\n}\n\n/**\n * ranges\n *\n * Utilities for working with TimeRanges.\n *\n */\n\nvar TIME_FUDGE_FACTOR = 1 / 30; // Comparisons between time values such as current time and the end of the buffered range\n// can be misleading because of precision differences or when the current media has poorly\n// aligned audio and video, which can cause values to be slightly off from what you would\n// expect. This value is what we consider to be safe to use in such comparisons to account\n// for these scenarios.\n\nvar SAFE_TIME_DELTA = TIME_FUDGE_FACTOR * 3;\nvar filterRanges = function filterRanges(timeRanges, predicate) {\n var results = [];\n var i;\n if (timeRanges && timeRanges.length) {\n // Search for ranges that match the predicate\n for (i = 0; i < timeRanges.length; i++) {\n if (predicate(timeRanges.start(i), timeRanges.end(i))) {\n results.push([timeRanges.start(i), timeRanges.end(i)]);\n }\n }\n }\n return createTimeRanges(results);\n};\n/**\n * Attempts to find the buffered TimeRange that contains the specified\n * time.\n *\n * @param {TimeRanges} buffered - the TimeRanges object to query\n * @param {number} time - the time to filter on.\n * @return {TimeRanges} a new TimeRanges object\n */\n\nvar findRange = function findRange(buffered, time) {\n return filterRanges(buffered, function (start, end) {\n return start - SAFE_TIME_DELTA <= time && end + SAFE_TIME_DELTA >= time;\n });\n};\n/**\n * Returns the TimeRanges that begin later than the specified time.\n *\n * @param {TimeRanges} timeRanges - the TimeRanges object to query\n * @param {number} time - the time to filter on.\n * @return {TimeRanges} a new TimeRanges object.\n */\n\nvar findNextRange = function findNextRange(timeRanges, time) {\n return filterRanges(timeRanges, function (start) {\n return start - TIME_FUDGE_FACTOR >= time;\n });\n};\n/**\n * Returns gaps within a list of TimeRanges\n *\n * @param {TimeRanges} buffered - the TimeRanges object\n * @return {TimeRanges} a TimeRanges object of gaps\n */\n\nvar findGaps = function findGaps(buffered) {\n if (buffered.length < 2) {\n return createTimeRanges();\n }\n var ranges = [];\n for (var _i70 = 1; _i70 < buffered.length; _i70++) {\n var start = buffered.end(_i70 - 1);\n var end = buffered.start(_i70);\n ranges.push([start, end]);\n }\n return createTimeRanges(ranges);\n};\n/**\n * Calculate the intersection of two TimeRanges\n *\n * @param {TimeRanges} bufferA\n * @param {TimeRanges} bufferB\n * @return {TimeRanges} The interesection of `bufferA` with `bufferB`\n */\n\nvar bufferIntersection = function bufferIntersection(bufferA, bufferB) {\n var start = null;\n var end = null;\n var arity = 0;\n var extents = [];\n var ranges = [];\n if (!bufferA || !bufferA.length || !bufferB || !bufferB.length) {\n return createTimeRanges();\n } // Handle the case where we have both buffers and create an\n // intersection of the two\n\n var count = bufferA.length; // A) Gather up all start and end times\n\n while (count--) {\n extents.push({\n time: bufferA.start(count),\n type: 'start'\n });\n extents.push({\n time: bufferA.end(count),\n type: 'end'\n });\n }\n count = bufferB.length;\n while (count--) {\n extents.push({\n time: bufferB.start(count),\n type: 'start'\n });\n extents.push({\n time: bufferB.end(count),\n type: 'end'\n });\n } // B) Sort them by time\n\n extents.sort(function (a, b) {\n return a.time - b.time;\n }); // C) Go along one by one incrementing arity for start and decrementing\n // arity for ends\n\n for (count = 0; count < extents.length; count++) {\n if (extents[count].type === 'start') {\n arity++; // D) If arity is ever incremented to 2 we are entering an\n // overlapping range\n\n if (arity === 2) {\n start = extents[count].time;\n }\n } else if (extents[count].type === 'end') {\n arity--; // E) If arity is ever decremented to 1 we leaving an\n // overlapping range\n\n if (arity === 1) {\n end = extents[count].time;\n }\n } // F) Record overlapping ranges\n\n if (start !== null && end !== null) {\n ranges.push([start, end]);\n start = null;\n end = null;\n }\n }\n return createTimeRanges(ranges);\n};\n/**\n * Gets a human readable string for a TimeRange\n *\n * @param {TimeRange} range\n * @return {string} a human readable string\n */\n\nvar printableRange = function printableRange(range) {\n var strArr = [];\n if (!range || !range.length) {\n return '';\n }\n for (var _i71 = 0; _i71 < range.length; _i71++) {\n strArr.push(range.start(_i71) + ' => ' + range.end(_i71));\n }\n return strArr.join(', ');\n};\n/**\n * Calculates the amount of time left in seconds until the player hits the end of the\n * buffer and causes a rebuffer\n *\n * @param {TimeRange} buffered\n * The state of the buffer\n * @param {Numnber} currentTime\n * The current time of the player\n * @param {number} playbackRate\n * The current playback rate of the player. Defaults to 1.\n * @return {number}\n * Time until the player has to start rebuffering in seconds.\n * @function timeUntilRebuffer\n */\n\nvar timeUntilRebuffer = function timeUntilRebuffer(buffered, currentTime) {\n var playbackRate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n var bufferedEnd = buffered.length ? buffered.end(buffered.length - 1) : 0;\n return (bufferedEnd - currentTime) / playbackRate;\n};\n/**\n * Converts a TimeRanges object into an array representation\n *\n * @param {TimeRanges} timeRanges\n * @return {Array}\n */\n\nvar timeRangesToArray = function timeRangesToArray(timeRanges) {\n var timeRangesList = [];\n for (var _i72 = 0; _i72 < timeRanges.length; _i72++) {\n timeRangesList.push({\n start: timeRanges.start(_i72),\n end: timeRanges.end(_i72)\n });\n }\n return timeRangesList;\n};\n/**\n * Determines if two time range objects are different.\n *\n * @param {TimeRange} a\n * the first time range object to check\n *\n * @param {TimeRange} b\n * the second time range object to check\n *\n * @return {Boolean}\n * Whether the time range objects differ\n */\n\nvar isRangeDifferent = function isRangeDifferent(a, b) {\n // same object\n if (a === b) {\n return false;\n } // one or the other is undefined\n\n if (!a && b || !b && a) {\n return true;\n } // length is different\n\n if (a.length !== b.length) {\n return true;\n } // see if any start/end pair is different\n\n for (var _i73 = 0; _i73 < a.length; _i73++) {\n if (a.start(_i73) !== b.start(_i73) || a.end(_i73) !== b.end(_i73)) {\n return true;\n }\n } // if the length and every pair is the same\n // this is the same time range\n\n return false;\n};\nvar lastBufferedEnd = function lastBufferedEnd(a) {\n if (!a || !a.length || !a.end) {\n return;\n }\n return a.end(a.length - 1);\n};\n/**\n * A utility function to add up the amount of time in a timeRange\n * after a specified startTime.\n * ie:[[0, 10], [20, 40], [50, 60]] with a startTime 0\n * would return 40 as there are 40s seconds after 0 in the timeRange\n *\n * @param {TimeRange} range\n * The range to check against\n * @param {number} startTime\n * The time in the time range that you should start counting from\n *\n * @return {number}\n * The number of seconds in the buffer passed the specified time.\n */\n\nvar timeAheadOf = function timeAheadOf(range, startTime) {\n var time = 0;\n if (!range || !range.length) {\n return time;\n }\n for (var _i74 = 0; _i74 < range.length; _i74++) {\n var start = range.start(_i74);\n var end = range.end(_i74); // startTime is after this range entirely\n\n if (startTime > end) {\n continue;\n } // startTime is within this range\n\n if (startTime > start && startTime <= end) {\n time += end - startTime;\n continue;\n } // startTime is before this range.\n\n time += end - start;\n }\n return time;\n};\n\n/**\n * @file playlist.js\n *\n * Playlist related utilities.\n */\n/**\n * Get the duration of a segment, with special cases for\n * llhls segments that do not have a duration yet.\n *\n * @param {Object} playlist\n * the playlist that the segment belongs to.\n * @param {Object} segment\n * the segment to get a duration for.\n *\n * @return {number}\n * the segment duration\n */\n\nvar segmentDurationWithParts = function segmentDurationWithParts(playlist, segment) {\n // if this isn't a preload segment\n // then we will have a segment duration that is accurate.\n if (!segment.preload) {\n return segment.duration;\n } // otherwise we have to add up parts and preload hints\n // to get an up to date duration.\n\n var result = 0;\n (segment.parts || []).forEach(function (p) {\n result += p.duration;\n }); // for preload hints we have to use partTargetDuration\n // as they won't even have a duration yet.\n\n (segment.preloadHints || []).forEach(function (p) {\n if (p.type === 'PART') {\n result += playlist.partTargetDuration;\n }\n });\n return result;\n};\n/**\n * A function to get a combined list of parts and segments with durations\n * and indexes.\n *\n * @param {Playlist} playlist the playlist to get the list for.\n *\n * @return {Array} The part/segment list.\n */\n\nvar getPartsAndSegments = function getPartsAndSegments(playlist) {\n return (playlist.segments || []).reduce(function (acc, segment, si) {\n if (segment.parts) {\n segment.parts.forEach(function (part, pi) {\n acc.push({\n duration: part.duration,\n segmentIndex: si,\n partIndex: pi,\n part: part,\n segment: segment\n });\n });\n } else {\n acc.push({\n duration: segment.duration,\n segmentIndex: si,\n partIndex: null,\n segment: segment,\n part: null\n });\n }\n return acc;\n }, []);\n};\nvar getLastParts = function getLastParts(media) {\n var lastSegment = media.segments && media.segments.length && media.segments[media.segments.length - 1];\n return lastSegment && lastSegment.parts || [];\n};\nvar getKnownPartCount = function getKnownPartCount(_ref11) {\n var preloadSegment = _ref11.preloadSegment;\n if (!preloadSegment) {\n return;\n }\n var parts = preloadSegment.parts,\n preloadHints = preloadSegment.preloadHints;\n var partCount = (preloadHints || []).reduce(function (count, hint) {\n return count + (hint.type === 'PART' ? 1 : 0);\n }, 0);\n partCount += parts && parts.length ? parts.length : 0;\n return partCount;\n};\n/**\n * Get the number of seconds to delay from the end of a\n * live playlist.\n *\n * @param {Playlist} main the main playlist\n * @param {Playlist} media the media playlist\n * @return {number} the hold back in seconds.\n */\n\nvar liveEdgeDelay = function liveEdgeDelay(main, media) {\n if (media.endList) {\n return 0;\n } // dash suggestedPresentationDelay trumps everything\n\n if (main && main.suggestedPresentationDelay) {\n return main.suggestedPresentationDelay;\n }\n var hasParts = getLastParts(media).length > 0; // look for \"part\" delays from ll-hls first\n\n if (hasParts && media.serverControl && media.serverControl.partHoldBack) {\n return media.serverControl.partHoldBack;\n } else if (hasParts && media.partTargetDuration) {\n return media.partTargetDuration * 3; // finally look for full segment delays\n } else if (media.serverControl && media.serverControl.holdBack) {\n return media.serverControl.holdBack;\n } else if (media.targetDuration) {\n return media.targetDuration * 3;\n }\n return 0;\n};\n/**\n * walk backward until we find a duration we can use\n * or return a failure\n *\n * @param {Playlist} playlist the playlist to walk through\n * @param {Number} endSequence the mediaSequence to stop walking on\n */\n\nvar backwardDuration = function backwardDuration(playlist, endSequence) {\n var result = 0;\n var i = endSequence - playlist.mediaSequence; // if a start time is available for segment immediately following\n // the interval, use it\n\n var segment = playlist.segments[i]; // Walk backward until we find the latest segment with timeline\n // information that is earlier than endSequence\n\n if (segment) {\n if (typeof segment.start !== 'undefined') {\n return {\n result: segment.start,\n precise: true\n };\n }\n if (typeof segment.end !== 'undefined') {\n return {\n result: segment.end - segment.duration,\n precise: true\n };\n }\n }\n while (i--) {\n segment = playlist.segments[i];\n if (typeof segment.end !== 'undefined') {\n return {\n result: result + segment.end,\n precise: true\n };\n }\n result += segmentDurationWithParts(playlist, segment);\n if (typeof segment.start !== 'undefined') {\n return {\n result: result + segment.start,\n precise: true\n };\n }\n }\n return {\n result: result,\n precise: false\n };\n};\n/**\n * walk forward until we find a duration we can use\n * or return a failure\n *\n * @param {Playlist} playlist the playlist to walk through\n * @param {number} endSequence the mediaSequence to stop walking on\n */\n\nvar forwardDuration = function forwardDuration(playlist, endSequence) {\n var result = 0;\n var segment;\n var i = endSequence - playlist.mediaSequence; // Walk forward until we find the earliest segment with timeline\n // information\n\n for (; i < playlist.segments.length; i++) {\n segment = playlist.segments[i];\n if (typeof segment.start !== 'undefined') {\n return {\n result: segment.start - result,\n precise: true\n };\n }\n result += segmentDurationWithParts(playlist, segment);\n if (typeof segment.end !== 'undefined') {\n return {\n result: segment.end - result,\n precise: true\n };\n }\n } // indicate we didn't find a useful duration estimate\n\n return {\n result: -1,\n precise: false\n };\n};\n/**\n * Calculate the media duration from the segments associated with a\n * playlist. The duration of a subinterval of the available segments\n * may be calculated by specifying an end index.\n *\n * @param {Object} playlist a media playlist object\n * @param {number=} endSequence an exclusive upper boundary\n * for the playlist. Defaults to playlist length.\n * @param {number} expired the amount of time that has dropped\n * off the front of the playlist in a live scenario\n * @return {number} the duration between the first available segment\n * and end index.\n */\n\nvar intervalDuration = function intervalDuration(playlist, endSequence, expired) {\n if (typeof endSequence === 'undefined') {\n endSequence = playlist.mediaSequence + playlist.segments.length;\n }\n if (endSequence < playlist.mediaSequence) {\n return 0;\n } // do a backward walk to estimate the duration\n\n var backward = backwardDuration(playlist, endSequence);\n if (backward.precise) {\n // if we were able to base our duration estimate on timing\n // information provided directly from the Media Source, return\n // it\n return backward.result;\n } // walk forward to see if a precise duration estimate can be made\n // that way\n\n var forward = forwardDuration(playlist, endSequence);\n if (forward.precise) {\n // we found a segment that has been buffered and so it's\n // position is known precisely\n return forward.result;\n } // return the less-precise, playlist-based duration estimate\n\n return backward.result + expired;\n};\n/**\n * Calculates the duration of a playlist. If a start and end index\n * are specified, the duration will be for the subset of the media\n * timeline between those two indices. The total duration for live\n * playlists is always Infinity.\n *\n * @param {Object} playlist a media playlist object\n * @param {number=} endSequence an exclusive upper\n * boundary for the playlist. Defaults to the playlist media\n * sequence number plus its length.\n * @param {number=} expired the amount of time that has\n * dropped off the front of the playlist in a live scenario\n * @return {number} the duration between the start index and end\n * index.\n */\n\nvar duration = function duration(playlist, endSequence, expired) {\n if (!playlist) {\n return 0;\n }\n if (typeof expired !== 'number') {\n expired = 0;\n } // if a slice of the total duration is not requested, use\n // playlist-level duration indicators when they're present\n\n if (typeof endSequence === 'undefined') {\n // if present, use the duration specified in the playlist\n if (playlist.totalDuration) {\n return playlist.totalDuration;\n } // duration should be Infinity for live playlists\n\n if (!playlist.endList) {\n return window$1.Infinity;\n }\n } // calculate the total duration based on the segment durations\n\n return intervalDuration(playlist, endSequence, expired);\n};\n/**\n * Calculate the time between two indexes in the current playlist\n * neight the start- nor the end-index need to be within the current\n * playlist in which case, the targetDuration of the playlist is used\n * to approximate the durations of the segments\n *\n * @param {Array} options.durationList list to iterate over for durations.\n * @param {number} options.defaultDuration duration to use for elements before or after the durationList\n * @param {number} options.startIndex partsAndSegments index to start\n * @param {number} options.endIndex partsAndSegments index to end.\n * @return {number} the number of seconds between startIndex and endIndex\n */\n\nvar sumDurations = function sumDurations(_ref12) {\n var defaultDuration = _ref12.defaultDuration,\n durationList = _ref12.durationList,\n startIndex = _ref12.startIndex,\n endIndex = _ref12.endIndex;\n var durations = 0;\n if (startIndex > endIndex) {\n var _ref13 = [endIndex, startIndex];\n startIndex = _ref13[0];\n endIndex = _ref13[1];\n }\n if (startIndex < 0) {\n for (var _i75 = startIndex; _i75 < Math.min(0, endIndex); _i75++) {\n durations += defaultDuration;\n }\n startIndex = 0;\n }\n for (var _i76 = startIndex; _i76 < endIndex; _i76++) {\n durations += durationList[_i76].duration;\n }\n return durations;\n};\n/**\n * Calculates the playlist end time\n *\n * @param {Object} playlist a media playlist object\n * @param {number=} expired the amount of time that has\n * dropped off the front of the playlist in a live scenario\n * @param {boolean|false} useSafeLiveEnd a boolean value indicating whether or not the\n * playlist end calculation should consider the safe live end\n * (truncate the playlist end by three segments). This is normally\n * used for calculating the end of the playlist's seekable range.\n * This takes into account the value of liveEdgePadding.\n * Setting liveEdgePadding to 0 is equivalent to setting this to false.\n * @param {number} liveEdgePadding a number indicating how far from the end of the playlist we should be in seconds.\n * If this is provided, it is used in the safe live end calculation.\n * Setting useSafeLiveEnd=false or liveEdgePadding=0 are equivalent.\n * Corresponds to suggestedPresentationDelay in DASH manifests.\n * @return {number} the end time of playlist\n * @function playlistEnd\n */\n\nvar playlistEnd = function playlistEnd(playlist, expired, useSafeLiveEnd, liveEdgePadding) {\n if (!playlist || !playlist.segments) {\n return null;\n }\n if (playlist.endList) {\n return duration(playlist);\n }\n if (expired === null) {\n return null;\n }\n expired = expired || 0;\n var lastSegmentEndTime = intervalDuration(playlist, playlist.mediaSequence + playlist.segments.length, expired);\n if (useSafeLiveEnd) {\n liveEdgePadding = typeof liveEdgePadding === 'number' ? liveEdgePadding : liveEdgeDelay(null, playlist);\n lastSegmentEndTime -= liveEdgePadding;\n } // don't return a time less than zero\n\n return Math.max(0, lastSegmentEndTime);\n};\n/**\n * Calculates the interval of time that is currently seekable in a\n * playlist. The returned time ranges are relative to the earliest\n * moment in the specified playlist that is still available. A full\n * seekable implementation for live streams would need to offset\n * these values by the duration of content that has expired from the\n * stream.\n *\n * @param {Object} playlist a media playlist object\n * dropped off the front of the playlist in a live scenario\n * @param {number=} expired the amount of time that has\n * dropped off the front of the playlist in a live scenario\n * @param {number} liveEdgePadding how far from the end of the playlist we should be in seconds.\n * Corresponds to suggestedPresentationDelay in DASH manifests.\n * @return {TimeRanges} the periods of time that are valid targets\n * for seeking\n */\n\nvar seekable = function seekable(playlist, expired, liveEdgePadding) {\n var useSafeLiveEnd = true;\n var seekableStart = expired || 0;\n var seekableEnd = playlistEnd(playlist, expired, useSafeLiveEnd, liveEdgePadding);\n if (seekableEnd === null) {\n return createTimeRanges();\n } // Clamp seekable end since it can not be less than the seekable start\n\n if (seekableEnd < seekableStart) {\n seekableEnd = seekableStart;\n }\n return createTimeRanges(seekableStart, seekableEnd);\n};\n/**\n * Determine the index and estimated starting time of the segment that\n * contains a specified playback position in a media playlist.\n *\n * @param {Object} options.playlist the media playlist to query\n * @param {number} options.currentTime The number of seconds since the earliest\n * possible position to determine the containing segment for\n * @param {number} options.startTime the time when the segment/part starts\n * @param {number} options.startingSegmentIndex the segment index to start looking at.\n * @param {number?} [options.startingPartIndex] the part index to look at within the segment.\n *\n * @return {Object} an object with partIndex, segmentIndex, and startTime.\n */\n\nvar getMediaInfoForTime = function getMediaInfoForTime(_ref14) {\n var playlist = _ref14.playlist,\n currentTime = _ref14.currentTime,\n startingSegmentIndex = _ref14.startingSegmentIndex,\n startingPartIndex = _ref14.startingPartIndex,\n startTime = _ref14.startTime,\n exactManifestTimings = _ref14.exactManifestTimings;\n var time = currentTime - startTime;\n var partsAndSegments = getPartsAndSegments(playlist);\n var startIndex = 0;\n for (var _i77 = 0; _i77 < partsAndSegments.length; _i77++) {\n var partAndSegment = partsAndSegments[_i77];\n if (startingSegmentIndex !== partAndSegment.segmentIndex) {\n continue;\n } // skip this if part index does not match.\n\n if (typeof startingPartIndex === 'number' && typeof partAndSegment.partIndex === 'number' && startingPartIndex !== partAndSegment.partIndex) {\n continue;\n }\n startIndex = _i77;\n break;\n }\n if (time < 0) {\n // Walk backward from startIndex in the playlist, adding durations\n // until we find a segment that contains `time` and return it\n if (startIndex > 0) {\n for (var _i78 = startIndex - 1; _i78 >= 0; _i78--) {\n var _partAndSegment = partsAndSegments[_i78];\n time += _partAndSegment.duration;\n if (exactManifestTimings) {\n if (time < 0) {\n continue;\n }\n } else if (time + TIME_FUDGE_FACTOR <= 0) {\n continue;\n }\n return {\n partIndex: _partAndSegment.partIndex,\n segmentIndex: _partAndSegment.segmentIndex,\n startTime: startTime - sumDurations({\n defaultDuration: playlist.targetDuration,\n durationList: partsAndSegments,\n startIndex: startIndex,\n endIndex: _i78\n })\n };\n }\n } // We were unable to find a good segment within the playlist\n // so select the first segment\n\n return {\n partIndex: partsAndSegments[0] && partsAndSegments[0].partIndex || null,\n segmentIndex: partsAndSegments[0] && partsAndSegments[0].segmentIndex || 0,\n startTime: currentTime\n };\n } // When startIndex is negative, we first walk forward to first segment\n // adding target durations. If we \"run out of time\" before getting to\n // the first segment, return the first segment\n\n if (startIndex < 0) {\n for (var _i79 = startIndex; _i79 < 0; _i79++) {\n time -= playlist.targetDuration;\n if (time < 0) {\n return {\n partIndex: partsAndSegments[0] && partsAndSegments[0].partIndex || null,\n segmentIndex: partsAndSegments[0] && partsAndSegments[0].segmentIndex || 0,\n startTime: currentTime\n };\n }\n }\n startIndex = 0;\n } // Walk forward from startIndex in the playlist, subtracting durations\n // until we find a segment that contains `time` and return it\n\n for (var _i80 = startIndex; _i80 < partsAndSegments.length; _i80++) {\n var _partAndSegment2 = partsAndSegments[_i80];\n time -= _partAndSegment2.duration;\n if (exactManifestTimings) {\n if (time > 0) {\n continue;\n }\n } else if (time - TIME_FUDGE_FACTOR >= 0) {\n continue;\n }\n return {\n partIndex: _partAndSegment2.partIndex,\n segmentIndex: _partAndSegment2.segmentIndex,\n startTime: startTime + sumDurations({\n defaultDuration: playlist.targetDuration,\n durationList: partsAndSegments,\n startIndex: startIndex,\n endIndex: _i80\n })\n };\n } // We are out of possible candidates so load the last one...\n\n return {\n segmentIndex: partsAndSegments[partsAndSegments.length - 1].segmentIndex,\n partIndex: partsAndSegments[partsAndSegments.length - 1].partIndex,\n startTime: currentTime\n };\n};\n/**\n * Check whether the playlist is excluded or not.\n *\n * @param {Object} playlist the media playlist object\n * @return {boolean} whether the playlist is excluded or not\n * @function isExcluded\n */\n\nvar isExcluded = function isExcluded(playlist) {\n return playlist.excludeUntil && playlist.excludeUntil > Date.now();\n};\n/**\n * Check whether the playlist is compatible with current playback configuration or has\n * been excluded permanently for being incompatible.\n *\n * @param {Object} playlist the media playlist object\n * @return {boolean} whether the playlist is incompatible or not\n * @function isIncompatible\n */\n\nvar isIncompatible = function isIncompatible(playlist) {\n return playlist.excludeUntil && playlist.excludeUntil === Infinity;\n};\n/**\n * Check whether the playlist is enabled or not.\n *\n * @param {Object} playlist the media playlist object\n * @return {boolean} whether the playlist is enabled or not\n * @function isEnabled\n */\n\nvar isEnabled = function isEnabled(playlist) {\n var excluded = isExcluded(playlist);\n return !playlist.disabled && !excluded;\n};\n/**\n * Check whether the playlist has been manually disabled through the representations api.\n *\n * @param {Object} playlist the media playlist object\n * @return {boolean} whether the playlist is disabled manually or not\n * @function isDisabled\n */\n\nvar isDisabled = function isDisabled(playlist) {\n return playlist.disabled;\n};\n/**\n * Returns whether the current playlist is an AES encrypted HLS stream\n *\n * @return {boolean} true if it's an AES encrypted HLS stream\n */\n\nvar isAes = function isAes(media) {\n for (var _i81 = 0; _i81 < media.segments.length; _i81++) {\n if (media.segments[_i81].key) {\n return true;\n }\n }\n return false;\n};\n/**\n * Checks if the playlist has a value for the specified attribute\n *\n * @param {string} attr\n * Attribute to check for\n * @param {Object} playlist\n * The media playlist object\n * @return {boolean}\n * Whether the playlist contains a value for the attribute or not\n * @function hasAttribute\n */\n\nvar hasAttribute = function hasAttribute(attr, playlist) {\n return playlist.attributes && playlist.attributes[attr];\n};\n/**\n * Estimates the time required to complete a segment download from the specified playlist\n *\n * @param {number} segmentDuration\n * Duration of requested segment\n * @param {number} bandwidth\n * Current measured bandwidth of the player\n * @param {Object} playlist\n * The media playlist object\n * @param {number=} bytesReceived\n * Number of bytes already received for the request. Defaults to 0\n * @return {number|NaN}\n * The estimated time to request the segment. NaN if bandwidth information for\n * the given playlist is unavailable\n * @function estimateSegmentRequestTime\n */\n\nvar estimateSegmentRequestTime = function estimateSegmentRequestTime(segmentDuration, bandwidth, playlist) {\n var bytesReceived = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n if (!hasAttribute('BANDWIDTH', playlist)) {\n return NaN;\n }\n var size = segmentDuration * playlist.attributes.BANDWIDTH;\n return (size - bytesReceived * 8) / bandwidth;\n};\n/*\n * Returns whether the current playlist is the lowest rendition\n *\n * @return {Boolean} true if on lowest rendition\n */\n\nvar isLowestEnabledRendition = function isLowestEnabledRendition(main, media) {\n if (main.playlists.length === 1) {\n return true;\n }\n var currentBandwidth = media.attributes.BANDWIDTH || Number.MAX_VALUE;\n return main.playlists.filter(function (playlist) {\n if (!isEnabled(playlist)) {\n return false;\n }\n return (playlist.attributes.BANDWIDTH || 0) < currentBandwidth;\n }).length === 0;\n};\nvar playlistMatch = function playlistMatch(a, b) {\n // both playlits are null\n // or only one playlist is non-null\n // no match\n if (!a && !b || !a && b || a && !b) {\n return false;\n } // playlist objects are the same, match\n\n if (a === b) {\n return true;\n } // first try to use id as it should be the most\n // accurate\n\n if (a.id && b.id && a.id === b.id) {\n return true;\n } // next try to use reslovedUri as it should be the\n // second most accurate.\n\n if (a.resolvedUri && b.resolvedUri && a.resolvedUri === b.resolvedUri) {\n return true;\n } // finally try to use uri as it should be accurate\n // but might miss a few cases for relative uris\n\n if (a.uri && b.uri && a.uri === b.uri) {\n return true;\n }\n return false;\n};\nvar someAudioVariant = function someAudioVariant(main, callback) {\n var AUDIO = main && main.mediaGroups && main.mediaGroups.AUDIO || {};\n var found = false;\n for (var groupName in AUDIO) {\n for (var label in AUDIO[groupName]) {\n found = callback(AUDIO[groupName][label]);\n if (found) {\n break;\n }\n }\n if (found) {\n break;\n }\n }\n return !!found;\n};\nvar isAudioOnly = function isAudioOnly(main) {\n // we are audio only if we have no main playlists but do\n // have media group playlists.\n if (!main || !main.playlists || !main.playlists.length) {\n // without audio variants or playlists this\n // is not an audio only main.\n var found = someAudioVariant(main, function (variant) {\n return variant.playlists && variant.playlists.length || variant.uri;\n });\n return found;\n } // if every playlist has only an audio codec it is audio only\n var _loop2 = function _loop2() {\n var playlist = main.playlists[_i82];\n var CODECS = playlist.attributes && playlist.attributes.CODECS; // all codecs are audio, this is an audio playlist.\n\n if (CODECS && CODECS.split(',').every(function (c) {\n return isAudioCodec(c);\n })) {\n return 0; // continue\n } // playlist is in an audio group it is audio only\n\n var found = someAudioVariant(main, function (variant) {\n return playlistMatch(playlist, variant);\n });\n if (found) {\n return 0; // continue\n } // if we make it here this playlist isn't audio and we\n // are not audio only\n return {\n v: false\n };\n },\n _ret;\n for (var _i82 = 0; _i82 < main.playlists.length; _i82++) {\n _ret = _loop2();\n if (_ret === 0) continue;\n if (_ret) return _ret.v;\n } // if we make it past every playlist without returning, then\n // this is an audio only playlist.\n\n return true;\n}; // exports\n\nvar Playlist = {\n liveEdgeDelay: liveEdgeDelay,\n duration: duration,\n seekable: seekable,\n getMediaInfoForTime: getMediaInfoForTime,\n isEnabled: isEnabled,\n isDisabled: isDisabled,\n isExcluded: isExcluded,\n isIncompatible: isIncompatible,\n playlistEnd: playlistEnd,\n isAes: isAes,\n hasAttribute: hasAttribute,\n estimateSegmentRequestTime: estimateSegmentRequestTime,\n isLowestEnabledRendition: isLowestEnabledRendition,\n isAudioOnly: isAudioOnly,\n playlistMatch: playlistMatch,\n segmentDurationWithParts: segmentDurationWithParts\n};\nvar log = videojs.log;\nvar createPlaylistID = function createPlaylistID(index, uri) {\n return \"\".concat(index, \"-\").concat(uri);\n}; // default function for creating a group id\n\nvar groupID = function groupID(type, group, label) {\n return \"placeholder-uri-\".concat(type, \"-\").concat(group, \"-\").concat(label);\n};\n/**\n * Parses a given m3u8 playlist\n *\n * @param {Function} [onwarn]\n * a function to call when the parser triggers a warning event.\n * @param {Function} [oninfo]\n * a function to call when the parser triggers an info event.\n * @param {string} manifestString\n * The downloaded manifest string\n * @param {Object[]} [customTagParsers]\n * An array of custom tag parsers for the m3u8-parser instance\n * @param {Object[]} [customTagMappers]\n * An array of custom tag mappers for the m3u8-parser instance\n * @param {boolean} [llhls]\n * Whether to keep ll-hls features in the manifest after parsing.\n * @return {Object}\n * The manifest object\n */\n\nvar parseManifest = function parseManifest(_ref15) {\n var onwarn = _ref15.onwarn,\n oninfo = _ref15.oninfo,\n manifestString = _ref15.manifestString,\n _ref15$customTagParse = _ref15.customTagParsers,\n customTagParsers = _ref15$customTagParse === void 0 ? [] : _ref15$customTagParse,\n _ref15$customTagMappe = _ref15.customTagMappers,\n customTagMappers = _ref15$customTagMappe === void 0 ? [] : _ref15$customTagMappe,\n llhls = _ref15.llhls;\n var parser = new Parser();\n if (onwarn) {\n parser.on('warn', onwarn);\n }\n if (oninfo) {\n parser.on('info', oninfo);\n }\n customTagParsers.forEach(function (customParser) {\n return parser.addParser(customParser);\n });\n customTagMappers.forEach(function (mapper) {\n return parser.addTagMapper(mapper);\n });\n parser.push(manifestString);\n parser.end();\n var manifest = parser.manifest; // remove llhls features from the parsed manifest\n // if we don't want llhls support.\n\n if (!llhls) {\n ['preloadSegment', 'skip', 'serverControl', 'renditionReports', 'partInf', 'partTargetDuration'].forEach(function (k) {\n if (manifest.hasOwnProperty(k)) {\n delete manifest[k];\n }\n });\n if (manifest.segments) {\n manifest.segments.forEach(function (segment) {\n ['parts', 'preloadHints'].forEach(function (k) {\n if (segment.hasOwnProperty(k)) {\n delete segment[k];\n }\n });\n });\n }\n }\n if (!manifest.targetDuration) {\n var targetDuration = 10;\n if (manifest.segments && manifest.segments.length) {\n targetDuration = manifest.segments.reduce(function (acc, s) {\n return Math.max(acc, s.duration);\n }, 0);\n }\n if (onwarn) {\n onwarn(\"manifest has no targetDuration defaulting to \".concat(targetDuration));\n }\n manifest.targetDuration = targetDuration;\n }\n var parts = getLastParts(manifest);\n if (parts.length && !manifest.partTargetDuration) {\n var partTargetDuration = parts.reduce(function (acc, p) {\n return Math.max(acc, p.duration);\n }, 0);\n if (onwarn) {\n onwarn(\"manifest has no partTargetDuration defaulting to \".concat(partTargetDuration));\n log.error('LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.');\n }\n manifest.partTargetDuration = partTargetDuration;\n }\n return manifest;\n};\n/**\n * Loops through all supported media groups in main and calls the provided\n * callback for each group\n *\n * @param {Object} main\n * The parsed main manifest object\n * @param {Function} callback\n * Callback to call for each media group\n */\n\nvar forEachMediaGroup = function forEachMediaGroup(main, callback) {\n if (!main.mediaGroups) {\n return;\n }\n ['AUDIO', 'SUBTITLES'].forEach(function (mediaType) {\n if (!main.mediaGroups[mediaType]) {\n return;\n }\n for (var groupKey in main.mediaGroups[mediaType]) {\n for (var labelKey in main.mediaGroups[mediaType][groupKey]) {\n var mediaProperties = main.mediaGroups[mediaType][groupKey][labelKey];\n callback(mediaProperties, mediaType, groupKey, labelKey);\n }\n }\n });\n};\n/**\n * Adds properties and attributes to the playlist to keep consistent functionality for\n * playlists throughout VHS.\n *\n * @param {Object} config\n * Arguments object\n * @param {Object} config.playlist\n * The media playlist\n * @param {string} [config.uri]\n * The uri to the media playlist (if media playlist is not from within a main\n * playlist)\n * @param {string} id\n * ID to use for the playlist\n */\n\nvar setupMediaPlaylist = function setupMediaPlaylist(_ref16) {\n var playlist = _ref16.playlist,\n uri = _ref16.uri,\n id = _ref16.id;\n playlist.id = id;\n playlist.playlistErrors_ = 0;\n if (uri) {\n // For media playlists, m3u8-parser does not have access to a URI, as HLS media\n // playlists do not contain their own source URI, but one is needed for consistency in\n // VHS.\n playlist.uri = uri;\n } // For HLS main playlists, even though certain attributes MUST be defined, the\n // stream may still be played without them.\n // For HLS media playlists, m3u8-parser does not attach an attributes object to the\n // manifest.\n //\n // To avoid undefined reference errors through the project, and make the code easier\n // to write/read, add an empty attributes object for these cases.\n\n playlist.attributes = playlist.attributes || {};\n};\n/**\n * Adds ID, resolvedUri, and attributes properties to each playlist of the main, where\n * necessary. In addition, creates playlist IDs for each playlist and adds playlist ID to\n * playlist references to the playlists array.\n *\n * @param {Object} main\n * The main playlist\n */\n\nvar setupMediaPlaylists = function setupMediaPlaylists(main) {\n var i = main.playlists.length;\n while (i--) {\n var playlist = main.playlists[i];\n setupMediaPlaylist({\n playlist: playlist,\n id: createPlaylistID(i, playlist.uri)\n });\n playlist.resolvedUri = resolveUrl(main.uri, playlist.uri);\n main.playlists[playlist.id] = playlist; // URI reference added for backwards compatibility\n\n main.playlists[playlist.uri] = playlist; // Although the spec states an #EXT-X-STREAM-INF tag MUST have a BANDWIDTH attribute,\n // the stream can be played without it. Although an attributes property may have been\n // added to the playlist to prevent undefined references, issue a warning to fix the\n // manifest.\n\n if (!playlist.attributes.BANDWIDTH) {\n log.warn('Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.');\n }\n }\n};\n/**\n * Adds resolvedUri properties to each media group.\n *\n * @param {Object} main\n * The main playlist\n */\n\nvar resolveMediaGroupUris = function resolveMediaGroupUris(main) {\n forEachMediaGroup(main, function (properties) {\n if (properties.uri) {\n properties.resolvedUri = resolveUrl(main.uri, properties.uri);\n }\n });\n};\n/**\n * Creates a main playlist wrapper to insert a sole media playlist into.\n *\n * @param {Object} media\n * Media playlist\n * @param {string} uri\n * The media URI\n *\n * @return {Object}\n * main playlist\n */\n\nvar mainForMedia = function mainForMedia(media, uri) {\n var id = createPlaylistID(0, uri);\n var main = {\n mediaGroups: {\n 'AUDIO': {},\n 'VIDEO': {},\n 'CLOSED-CAPTIONS': {},\n 'SUBTITLES': {}\n },\n uri: window$1.location.href,\n resolvedUri: window$1.location.href,\n playlists: [{\n uri: uri,\n id: id,\n resolvedUri: uri,\n // m3u8-parser does not attach an attributes property to media playlists so make\n // sure that the property is attached to avoid undefined reference errors\n attributes: {}\n }]\n }; // set up ID reference\n\n main.playlists[id] = main.playlists[0]; // URI reference added for backwards compatibility\n\n main.playlists[uri] = main.playlists[0];\n return main;\n};\n/**\n * Does an in-place update of the main manifest to add updated playlist URI references\n * as well as other properties needed by VHS that aren't included by the parser.\n *\n * @param {Object} main\n * main manifest object\n * @param {string} uri\n * The source URI\n * @param {function} createGroupID\n * A function to determine how to create the groupID for mediaGroups\n */\n\nvar addPropertiesToMain = function addPropertiesToMain(main, uri) {\n var createGroupID = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : groupID;\n main.uri = uri;\n for (var _i83 = 0; _i83 < main.playlists.length; _i83++) {\n if (!main.playlists[_i83].uri) {\n // Set up phony URIs for the playlists since playlists are referenced by their URIs\n // throughout VHS, but some formats (e.g., DASH) don't have external URIs\n // TODO: consider adding dummy URIs in mpd-parser\n var phonyUri = \"placeholder-uri-\".concat(_i83);\n main.playlists[_i83].uri = phonyUri;\n }\n }\n var audioOnlyMain = isAudioOnly(main);\n forEachMediaGroup(main, function (properties, mediaType, groupKey, labelKey) {\n // add a playlist array under properties\n if (!properties.playlists || !properties.playlists.length) {\n // If the manifest is audio only and this media group does not have a uri, check\n // if the media group is located in the main list of playlists. If it is, don't add\n // placeholder properties as it shouldn't be considered an alternate audio track.\n if (audioOnlyMain && mediaType === 'AUDIO' && !properties.uri) {\n for (var _i84 = 0; _i84 < main.playlists.length; _i84++) {\n var p = main.playlists[_i84];\n if (p.attributes && p.attributes.AUDIO && p.attributes.AUDIO === groupKey) {\n return;\n }\n }\n }\n properties.playlists = [_extends({}, properties)];\n }\n properties.playlists.forEach(function (p, i) {\n var groupId = createGroupID(mediaType, groupKey, labelKey, p);\n var id = createPlaylistID(i, groupId);\n if (p.uri) {\n p.resolvedUri = p.resolvedUri || resolveUrl(main.uri, p.uri);\n } else {\n // DEPRECATED, this has been added to prevent a breaking change.\n // previously we only ever had a single media group playlist, so\n // we mark the first playlist uri without prepending the index as we used to\n // ideally we would do all of the playlists the same way.\n p.uri = i === 0 ? groupId : id; // don't resolve a placeholder uri to an absolute url, just use\n // the placeholder again\n\n p.resolvedUri = p.uri;\n }\n p.id = p.id || id; // add an empty attributes object, all playlists are\n // expected to have this.\n\n p.attributes = p.attributes || {}; // setup ID and URI references (URI for backwards compatibility)\n\n main.playlists[p.id] = p;\n main.playlists[p.uri] = p;\n });\n });\n setupMediaPlaylists(main);\n resolveMediaGroupUris(main);\n};\nvar DateRangesStorage = /*#__PURE__*/function () {\n function DateRangesStorage() {\n _classCallCheck(this, DateRangesStorage);\n this.offset_ = null;\n this.pendingDateRanges_ = new Map();\n this.processedDateRanges_ = new Map();\n }\n _createClass(DateRangesStorage, [{\n key: \"setOffset\",\n value: function setOffset() {\n var segments = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n // already set\n if (this.offset_ !== null) {\n return;\n } // no segment to process\n\n if (!segments.length) {\n return;\n }\n var _segments = _slicedToArray(segments, 1),\n firstSegment = _segments[0]; // no program date time\n\n if (firstSegment.programDateTime === undefined) {\n return;\n } // Set offset as ProgramDateTime for the very first segment of the very first playlist load:\n\n this.offset_ = firstSegment.programDateTime / 1000;\n }\n }, {\n key: \"setPendingDateRanges\",\n value: function setPendingDateRanges() {\n var dateRanges = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n if (!dateRanges.length) {\n return;\n }\n var _dateRanges = _slicedToArray(dateRanges, 1),\n dateRange = _dateRanges[0];\n var startTime = dateRange.startDate.getTime();\n this.trimProcessedDateRanges_(startTime);\n this.pendingDateRanges_ = dateRanges.reduce(function (map, pendingDateRange) {\n map.set(pendingDateRange.id, pendingDateRange);\n return map;\n }, new Map());\n }\n }, {\n key: \"processDateRange\",\n value: function processDateRange(dateRange) {\n this.pendingDateRanges_[\"delete\"](dateRange.id);\n this.processedDateRanges_.set(dateRange.id, dateRange);\n }\n }, {\n key: \"getDateRangesToProcess\",\n value: function getDateRangesToProcess() {\n var _this130 = this;\n if (this.offset_ === null) {\n return [];\n }\n var dateRangeClasses = {};\n var dateRangesToProcess = [];\n this.pendingDateRanges_.forEach(function (dateRange, id) {\n if (_this130.processedDateRanges_.has(id)) {\n return;\n }\n dateRange.startTime = dateRange.startDate.getTime() / 1000 - _this130.offset_;\n dateRange.processDateRange = function () {\n return _this130.processDateRange(dateRange);\n };\n dateRangesToProcess.push(dateRange);\n if (!dateRange[\"class\"]) {\n return;\n }\n if (dateRangeClasses[dateRange[\"class\"]]) {\n var length = dateRangeClasses[dateRange[\"class\"]].push(dateRange);\n dateRange.classListIndex = length - 1;\n } else {\n dateRangeClasses[dateRange[\"class\"]] = [dateRange];\n dateRange.classListIndex = 0;\n }\n });\n for (var _i85 = 0, _dateRangesToProcess = dateRangesToProcess; _i85 < _dateRangesToProcess.length; _i85++) {\n var dateRange = _dateRangesToProcess[_i85];\n var classList = dateRangeClasses[dateRange[\"class\"]] || [];\n if (dateRange.endDate) {\n dateRange.endTime = dateRange.endDate.getTime() / 1000 - this.offset_;\n } else if (dateRange.endOnNext && classList[dateRange.classListIndex + 1]) {\n dateRange.endTime = classList[dateRange.classListIndex + 1].startTime;\n } else if (dateRange.duration) {\n dateRange.endTime = dateRange.startTime + dateRange.duration;\n } else if (dateRange.plannedDuration) {\n dateRange.endTime = dateRange.startTime + dateRange.plannedDuration;\n } else {\n dateRange.endTime = dateRange.startTime;\n }\n }\n return dateRangesToProcess;\n }\n }, {\n key: \"trimProcessedDateRanges_\",\n value: function trimProcessedDateRanges_(startTime) {\n var _this131 = this;\n var copy = new Map(this.processedDateRanges_);\n copy.forEach(function (dateRange, id) {\n if (dateRange.startDate.getTime() < startTime) {\n _this131.processedDateRanges_[\"delete\"](id);\n }\n });\n }\n }]);\n return DateRangesStorage;\n}();\n/**\n * @file playlist-loader.js\n *\n * A state machine that manages the loading, caching, and updating of\n * M3U8 playlists.\n *\n */\nvar EventTarget$1 = videojs.EventTarget;\nvar addLLHLSQueryDirectives = function addLLHLSQueryDirectives(uri, media) {\n if (media.endList || !media.serverControl) {\n return uri;\n }\n var parameters = {};\n if (media.serverControl.canBlockReload) {\n var preloadSegment = media.preloadSegment; // next msn is a zero based value, length is not.\n\n var nextMSN = media.mediaSequence + media.segments.length; // If preload segment has parts then it is likely\n // that we are going to request a part of that preload segment.\n // the logic below is used to determine that.\n\n if (preloadSegment) {\n var parts = preloadSegment.parts || []; // _HLS_part is a zero based index\n\n var nextPart = getKnownPartCount(media) - 1; // if nextPart is > -1 and not equal to just the\n // length of parts, then we know we had part preload hints\n // and we need to add the _HLS_part= query\n\n if (nextPart > -1 && nextPart !== parts.length - 1) {\n // add existing parts to our preload hints\n // eslint-disable-next-line\n parameters._HLS_part = nextPart;\n } // this if statement makes sure that we request the msn\n // of the preload segment if:\n // 1. the preload segment had parts (and was not yet a full segment)\n // but was added to our segments array\n // 2. the preload segment had preload hints for parts that are not in\n // the manifest yet.\n // in all other cases we want the segment after the preload segment\n // which will be given by using media.segments.length because it is 1 based\n // rather than 0 based.\n\n if (nextPart > -1 || parts.length) {\n nextMSN--;\n }\n } // add _HLS_msn= in front of any _HLS_part query\n // eslint-disable-next-line\n\n parameters._HLS_msn = nextMSN;\n }\n if (media.serverControl && media.serverControl.canSkipUntil) {\n // add _HLS_skip= infront of all other queries.\n // eslint-disable-next-line\n parameters._HLS_skip = media.serverControl.canSkipDateranges ? 'v2' : 'YES';\n }\n if (Object.keys(parameters).length) {\n var parsedUri = new window$1.URL(uri);\n ['_HLS_skip', '_HLS_msn', '_HLS_part'].forEach(function (name) {\n if (!parameters.hasOwnProperty(name)) {\n return;\n }\n parsedUri.searchParams.set(name, parameters[name]);\n });\n uri = parsedUri.toString();\n }\n return uri;\n};\n/**\n * Returns a new segment object with properties and\n * the parts array merged.\n *\n * @param {Object} a the old segment\n * @param {Object} b the new segment\n *\n * @return {Object} the merged segment\n */\n\nvar updateSegment = function updateSegment(a, b) {\n if (!a) {\n return b;\n }\n var result = merge(a, b); // if only the old segment has preload hints\n // and the new one does not, remove preload hints.\n\n if (a.preloadHints && !b.preloadHints) {\n delete result.preloadHints;\n } // if only the old segment has parts\n // then the parts are no longer valid\n\n if (a.parts && !b.parts) {\n delete result.parts; // if both segments have parts\n // copy part propeties from the old segment\n // to the new one.\n } else if (a.parts && b.parts) {\n for (var _i86 = 0; _i86 < b.parts.length; _i86++) {\n if (a.parts && a.parts[_i86]) {\n result.parts[_i86] = merge(a.parts[_i86], b.parts[_i86]);\n }\n }\n } // set skipped to false for segments that have\n // have had information merged from the old segment.\n\n if (!a.skipped && b.skipped) {\n result.skipped = false;\n } // set preload to false for segments that have\n // had information added in the new segment.\n\n if (a.preload && !b.preload) {\n result.preload = false;\n }\n return result;\n};\n/**\n * Returns a new array of segments that is the result of merging\n * properties from an older list of segments onto an updated\n * list. No properties on the updated playlist will be ovewritten.\n *\n * @param {Array} original the outdated list of segments\n * @param {Array} update the updated list of segments\n * @param {number=} offset the index of the first update\n * segment in the original segment list. For non-live playlists,\n * this should always be zero and does not need to be\n * specified. For live playlists, it should be the difference\n * between the media sequence numbers in the original and updated\n * playlists.\n * @return {Array} a list of merged segment objects\n */\n\nvar updateSegments = function updateSegments(original, update, offset) {\n var oldSegments = original.slice();\n var newSegments = update.slice();\n offset = offset || 0;\n var result = [];\n var currentMap;\n for (var newIndex = 0; newIndex < newSegments.length; newIndex++) {\n var oldSegment = oldSegments[newIndex + offset];\n var newSegment = newSegments[newIndex];\n if (oldSegment) {\n currentMap = oldSegment.map || currentMap;\n result.push(updateSegment(oldSegment, newSegment));\n } else {\n // carry over map to new segment if it is missing\n if (currentMap && !newSegment.map) {\n newSegment.map = currentMap;\n }\n result.push(newSegment);\n }\n }\n return result;\n};\nvar resolveSegmentUris = function resolveSegmentUris(segment, baseUri) {\n // preloadSegment will not have a uri at all\n // as the segment isn't actually in the manifest yet, only parts\n if (!segment.resolvedUri && segment.uri) {\n segment.resolvedUri = resolveUrl(baseUri, segment.uri);\n }\n if (segment.key && !segment.key.resolvedUri) {\n segment.key.resolvedUri = resolveUrl(baseUri, segment.key.uri);\n }\n if (segment.map && !segment.map.resolvedUri) {\n segment.map.resolvedUri = resolveUrl(baseUri, segment.map.uri);\n }\n if (segment.map && segment.map.key && !segment.map.key.resolvedUri) {\n segment.map.key.resolvedUri = resolveUrl(baseUri, segment.map.key.uri);\n }\n if (segment.parts && segment.parts.length) {\n segment.parts.forEach(function (p) {\n if (p.resolvedUri) {\n return;\n }\n p.resolvedUri = resolveUrl(baseUri, p.uri);\n });\n }\n if (segment.preloadHints && segment.preloadHints.length) {\n segment.preloadHints.forEach(function (p) {\n if (p.resolvedUri) {\n return;\n }\n p.resolvedUri = resolveUrl(baseUri, p.uri);\n });\n }\n};\nvar getAllSegments = function getAllSegments(media) {\n var segments = media.segments || [];\n var preloadSegment = media.preloadSegment; // a preloadSegment with only preloadHints is not currently\n // a usable segment, only include a preloadSegment that has\n // parts.\n\n if (preloadSegment && preloadSegment.parts && preloadSegment.parts.length) {\n // if preloadHints has a MAP that means that the\n // init segment is going to change. We cannot use any of the parts\n // from this preload segment.\n if (preloadSegment.preloadHints) {\n for (var _i87 = 0; _i87 < preloadSegment.preloadHints.length; _i87++) {\n if (preloadSegment.preloadHints[_i87].type === 'MAP') {\n return segments;\n }\n }\n } // set the duration for our preload segment to target duration.\n\n preloadSegment.duration = media.targetDuration;\n preloadSegment.preload = true;\n segments.push(preloadSegment);\n }\n return segments;\n}; // consider the playlist unchanged if the playlist object is the same or\n// the number of segments is equal, the media sequence number is unchanged,\n// and this playlist hasn't become the end of the playlist\n\nvar isPlaylistUnchanged = function isPlaylistUnchanged(a, b) {\n return a === b || a.segments && b.segments && a.segments.length === b.segments.length && a.endList === b.endList && a.mediaSequence === b.mediaSequence && a.preloadSegment === b.preloadSegment;\n};\n/**\n * Returns a new main playlist that is the result of merging an\n * updated media playlist into the original version. If the\n * updated media playlist does not match any of the playlist\n * entries in the original main playlist, null is returned.\n *\n * @param {Object} main a parsed main M3U8 object\n * @param {Object} media a parsed media M3U8 object\n * @return {Object} a new object that represents the original\n * main playlist with the updated media playlist merged in, or\n * null if the merge produced no change.\n */\n\nvar updateMain$1 = function updateMain$1(main, newMedia) {\n var unchangedCheck = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : isPlaylistUnchanged;\n var result = merge(main, {});\n var oldMedia = result.playlists[newMedia.id];\n if (!oldMedia) {\n return null;\n }\n if (unchangedCheck(oldMedia, newMedia)) {\n return null;\n }\n newMedia.segments = getAllSegments(newMedia);\n var mergedPlaylist = merge(oldMedia, newMedia); // always use the new media's preload segment\n\n if (mergedPlaylist.preloadSegment && !newMedia.preloadSegment) {\n delete mergedPlaylist.preloadSegment;\n } // if the update could overlap existing segment information, merge the two segment lists\n\n if (oldMedia.segments) {\n if (newMedia.skip) {\n newMedia.segments = newMedia.segments || []; // add back in objects for skipped segments, so that we merge\n // old properties into the new segments\n\n for (var _i88 = 0; _i88 < newMedia.skip.skippedSegments; _i88++) {\n newMedia.segments.unshift({\n skipped: true\n });\n }\n }\n mergedPlaylist.segments = updateSegments(oldMedia.segments, newMedia.segments, newMedia.mediaSequence - oldMedia.mediaSequence);\n } // resolve any segment URIs to prevent us from having to do it later\n\n mergedPlaylist.segments.forEach(function (segment) {\n resolveSegmentUris(segment, mergedPlaylist.resolvedUri);\n }); // TODO Right now in the playlists array there are two references to each playlist, one\n // that is referenced by index, and one by URI. The index reference may no longer be\n // necessary.\n\n for (var _i89 = 0; _i89 < result.playlists.length; _i89++) {\n if (result.playlists[_i89].id === newMedia.id) {\n result.playlists[_i89] = mergedPlaylist;\n }\n }\n result.playlists[newMedia.id] = mergedPlaylist; // URI reference added for backwards compatibility\n\n result.playlists[newMedia.uri] = mergedPlaylist; // update media group playlist references.\n\n forEachMediaGroup(main, function (properties, mediaType, groupKey, labelKey) {\n if (!properties.playlists) {\n return;\n }\n for (var _i90 = 0; _i90 < properties.playlists.length; _i90++) {\n if (newMedia.id === properties.playlists[_i90].id) {\n properties.playlists[_i90] = mergedPlaylist;\n }\n }\n });\n return result;\n};\n/**\n * Calculates the time to wait before refreshing a live playlist\n *\n * @param {Object} media\n * The current media\n * @param {boolean} update\n * True if there were any updates from the last refresh, false otherwise\n * @return {number}\n * The time in ms to wait before refreshing the live playlist\n */\n\nvar refreshDelay = function refreshDelay(media, update) {\n var segments = media.segments || [];\n var lastSegment = segments[segments.length - 1];\n var lastPart = lastSegment && lastSegment.parts && lastSegment.parts[lastSegment.parts.length - 1];\n var lastDuration = lastPart && lastPart.duration || lastSegment && lastSegment.duration;\n if (update && lastDuration) {\n return lastDuration * 1000;\n } // if the playlist is unchanged since the last reload or last segment duration\n // cannot be determined, try again after half the target duration\n\n return (media.partTargetDuration || media.targetDuration || 10) * 500;\n};\n/**\n * Load a playlist from a remote location\n *\n * @class PlaylistLoader\n * @extends Stream\n * @param {string|Object} src url or object of manifest\n * @param {boolean} withCredentials the withCredentials xhr option\n * @class\n */\nvar PlaylistLoader = /*#__PURE__*/function (_EventTarget$4) {\n _inherits(PlaylistLoader, _EventTarget$4);\n var _super76 = _createSuper(PlaylistLoader);\n function PlaylistLoader(src, vhs) {\n var _this132;\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n _classCallCheck(this, PlaylistLoader);\n _this132 = _super76.call(this);\n if (!src) {\n throw new Error('A non-empty playlist URL or object is required');\n }\n _this132.logger_ = logger('PlaylistLoader');\n var _options$withCredenti = options.withCredentials,\n withCredentials = _options$withCredenti === void 0 ? false : _options$withCredenti;\n _this132.src = src;\n _this132.vhs_ = vhs;\n _this132.withCredentials = withCredentials;\n _this132.addDateRangesToTextTrack_ = options.addDateRangesToTextTrack;\n var vhsOptions = vhs.options_;\n _this132.customTagParsers = vhsOptions && vhsOptions.customTagParsers || [];\n _this132.customTagMappers = vhsOptions && vhsOptions.customTagMappers || [];\n _this132.llhls = vhsOptions && vhsOptions.llhls;\n _this132.dateRangesStorage_ = new DateRangesStorage(); // initialize the loader state\n\n _this132.state = 'HAVE_NOTHING'; // live playlist staleness timeout\n\n _this132.handleMediaupdatetimeout_ = _this132.handleMediaupdatetimeout_.bind(_assertThisInitialized(_this132));\n _this132.on('mediaupdatetimeout', _this132.handleMediaupdatetimeout_);\n _this132.on('loadedplaylist', _this132.handleLoadedPlaylist_.bind(_assertThisInitialized(_this132)));\n return _this132;\n }\n _createClass(PlaylistLoader, [{\n key: \"handleLoadedPlaylist_\",\n value: function handleLoadedPlaylist_() {\n var mediaPlaylist = this.media();\n if (!mediaPlaylist) {\n return;\n }\n this.dateRangesStorage_.setOffset(mediaPlaylist.segments);\n this.dateRangesStorage_.setPendingDateRanges(mediaPlaylist.dateRanges);\n var availableDateRanges = this.dateRangesStorage_.getDateRangesToProcess();\n if (!availableDateRanges.length || !this.addDateRangesToTextTrack_) {\n return;\n }\n this.addDateRangesToTextTrack_(availableDateRanges);\n }\n }, {\n key: \"handleMediaupdatetimeout_\",\n value: function handleMediaupdatetimeout_() {\n var _this133 = this;\n if (this.state !== 'HAVE_METADATA') {\n // only refresh the media playlist if no other activity is going on\n return;\n }\n var media = this.media();\n var uri = resolveUrl(this.main.uri, media.uri);\n if (this.llhls) {\n uri = addLLHLSQueryDirectives(uri, media);\n }\n this.state = 'HAVE_CURRENT_METADATA';\n this.request = this.vhs_.xhr({\n uri: uri,\n withCredentials: this.withCredentials\n }, function (error, req) {\n // disposed\n if (!_this133.request) {\n return;\n }\n if (error) {\n return _this133.playlistRequestError(_this133.request, _this133.media(), 'HAVE_METADATA');\n }\n _this133.haveMetadata({\n playlistString: _this133.request.responseText,\n url: _this133.media().uri,\n id: _this133.media().id\n });\n });\n }\n }, {\n key: \"playlistRequestError\",\n value: function playlistRequestError(xhr, playlist, startingState) {\n var uri = playlist.uri,\n id = playlist.id; // any in-flight request is now finished\n\n this.request = null;\n if (startingState) {\n this.state = startingState;\n }\n this.error = {\n playlist: this.main.playlists[id],\n status: xhr.status,\n message: \"HLS playlist request error at URL: \".concat(uri, \".\"),\n responseText: xhr.responseText,\n code: xhr.status >= 500 ? 4 : 2\n };\n this.trigger('error');\n }\n }, {\n key: \"parseManifest_\",\n value: function parseManifest_(_ref17) {\n var _this134 = this;\n var url = _ref17.url,\n manifestString = _ref17.manifestString;\n return parseManifest({\n onwarn: function onwarn(_ref18) {\n var message = _ref18.message;\n return _this134.logger_(\"m3u8-parser warn for \".concat(url, \": \").concat(message));\n },\n oninfo: function oninfo(_ref19) {\n var message = _ref19.message;\n return _this134.logger_(\"m3u8-parser info for \".concat(url, \": \").concat(message));\n },\n manifestString: manifestString,\n customTagParsers: this.customTagParsers,\n customTagMappers: this.customTagMappers,\n llhls: this.llhls\n });\n }\n /**\n * Update the playlist loader's state in response to a new or updated playlist.\n *\n * @param {string} [playlistString]\n * Playlist string (if playlistObject is not provided)\n * @param {Object} [playlistObject]\n * Playlist object (if playlistString is not provided)\n * @param {string} url\n * URL of playlist\n * @param {string} id\n * ID to use for playlist\n */\n }, {\n key: \"haveMetadata\",\n value: function haveMetadata(_ref20) {\n var playlistString = _ref20.playlistString,\n playlistObject = _ref20.playlistObject,\n url = _ref20.url,\n id = _ref20.id;\n // any in-flight request is now finished\n this.request = null;\n this.state = 'HAVE_METADATA';\n var playlist = playlistObject || this.parseManifest_({\n url: url,\n manifestString: playlistString\n });\n playlist.lastRequest = Date.now();\n setupMediaPlaylist({\n playlist: playlist,\n uri: url,\n id: id\n }); // merge this playlist into the main manifest\n\n var update = updateMain$1(this.main, playlist);\n this.targetDuration = playlist.partTargetDuration || playlist.targetDuration;\n this.pendingMedia_ = null;\n if (update) {\n this.main = update;\n this.media_ = this.main.playlists[id];\n } else {\n this.trigger('playlistunchanged');\n }\n this.updateMediaUpdateTimeout_(refreshDelay(this.media(), !!update));\n this.trigger('loadedplaylist');\n }\n /**\n * Abort any outstanding work and clean up.\n */\n }, {\n key: \"dispose\",\n value: function dispose() {\n this.trigger('dispose');\n this.stopRequest();\n window$1.clearTimeout(this.mediaUpdateTimeout);\n window$1.clearTimeout(this.finalRenditionTimeout);\n this.dateRangesStorage_ = new DateRangesStorage();\n this.off();\n }\n }, {\n key: \"stopRequest\",\n value: function stopRequest() {\n if (this.request) {\n var oldRequest = this.request;\n this.request = null;\n oldRequest.onreadystatechange = null;\n oldRequest.abort();\n }\n }\n /**\n * When called without any arguments, returns the currently\n * active media playlist. When called with a single argument,\n * triggers the playlist loader to asynchronously switch to the\n * specified media playlist. Calling this method while the\n * loader is in the HAVE_NOTHING causes an error to be emitted\n * but otherwise has no effect.\n *\n * @param {Object=} playlist the parsed media playlist\n * object to switch to\n * @param {boolean=} shouldDelay whether we should delay the request by half target duration\n *\n * @return {Playlist} the current loaded media\n */\n }, {\n key: \"media\",\n value: function media(playlist, shouldDelay) {\n var _this135 = this;\n // getter\n if (!playlist) {\n return this.media_;\n } // setter\n\n if (this.state === 'HAVE_NOTHING') {\n throw new Error('Cannot switch media playlist from ' + this.state);\n } // find the playlist object if the target playlist has been\n // specified by URI\n\n if (typeof playlist === 'string') {\n if (!this.main.playlists[playlist]) {\n throw new Error('Unknown playlist URI: ' + playlist);\n }\n playlist = this.main.playlists[playlist];\n }\n window$1.clearTimeout(this.finalRenditionTimeout);\n if (shouldDelay) {\n var delay = (playlist.partTargetDuration || playlist.targetDuration) / 2 * 1000 || 5 * 1000;\n this.finalRenditionTimeout = window$1.setTimeout(this.media.bind(this, playlist, false), delay);\n return;\n }\n var startingState = this.state;\n var mediaChange = !this.media_ || playlist.id !== this.media_.id;\n var mainPlaylistRef = this.main.playlists[playlist.id]; // switch to fully loaded playlists immediately\n\n if (mainPlaylistRef && mainPlaylistRef.endList ||\n // handle the case of a playlist object (e.g., if using vhs-json with a resolved\n // media playlist or, for the case of demuxed audio, a resolved audio media group)\n playlist.endList && playlist.segments.length) {\n // abort outstanding playlist requests\n if (this.request) {\n this.request.onreadystatechange = null;\n this.request.abort();\n this.request = null;\n }\n this.state = 'HAVE_METADATA';\n this.media_ = playlist; // trigger media change if the active media has been updated\n\n if (mediaChange) {\n this.trigger('mediachanging');\n if (startingState === 'HAVE_MAIN_MANIFEST') {\n // The initial playlist was a main manifest, and the first media selected was\n // also provided (in the form of a resolved playlist object) as part of the\n // source object (rather than just a URL). Therefore, since the media playlist\n // doesn't need to be requested, loadedmetadata won't trigger as part of the\n // normal flow, and needs an explicit trigger here.\n this.trigger('loadedmetadata');\n } else {\n this.trigger('mediachange');\n }\n }\n return;\n } // We update/set the timeout here so that live playlists\n // that are not a media change will \"start\" the loader as expected.\n // We expect that this function will start the media update timeout\n // cycle again. This also prevents a playlist switch failure from\n // causing us to stall during live.\n\n this.updateMediaUpdateTimeout_(refreshDelay(playlist, true)); // switching to the active playlist is a no-op\n\n if (!mediaChange) {\n return;\n }\n this.state = 'SWITCHING_MEDIA'; // there is already an outstanding playlist request\n\n if (this.request) {\n if (playlist.resolvedUri === this.request.url) {\n // requesting to switch to the same playlist multiple times\n // has no effect after the first\n return;\n }\n this.request.onreadystatechange = null;\n this.request.abort();\n this.request = null;\n } // request the new playlist\n\n if (this.media_) {\n this.trigger('mediachanging');\n }\n this.pendingMedia_ = playlist;\n this.request = this.vhs_.xhr({\n uri: playlist.resolvedUri,\n withCredentials: this.withCredentials\n }, function (error, req) {\n // disposed\n if (!_this135.request) {\n return;\n }\n playlist.lastRequest = Date.now();\n playlist.resolvedUri = resolveManifestRedirect(playlist.resolvedUri, req);\n if (error) {\n return _this135.playlistRequestError(_this135.request, playlist, startingState);\n }\n _this135.haveMetadata({\n playlistString: req.responseText,\n url: playlist.uri,\n id: playlist.id\n }); // fire loadedmetadata the first time a media playlist is loaded\n\n if (startingState === 'HAVE_MAIN_MANIFEST') {\n _this135.trigger('loadedmetadata');\n } else {\n _this135.trigger('mediachange');\n }\n });\n }\n /**\n * pause loading of the playlist\n */\n }, {\n key: \"pause\",\n value: function pause() {\n if (this.mediaUpdateTimeout) {\n window$1.clearTimeout(this.mediaUpdateTimeout);\n this.mediaUpdateTimeout = null;\n }\n this.stopRequest();\n if (this.state === 'HAVE_NOTHING') {\n // If we pause the loader before any data has been retrieved, its as if we never\n // started, so reset to an unstarted state.\n this.started = false;\n } // Need to restore state now that no activity is happening\n\n if (this.state === 'SWITCHING_MEDIA') {\n // if the loader was in the process of switching media, it should either return to\n // HAVE_MAIN_MANIFEST or HAVE_METADATA depending on if the loader has loaded a media\n // playlist yet. This is determined by the existence of loader.media_\n if (this.media_) {\n this.state = 'HAVE_METADATA';\n } else {\n this.state = 'HAVE_MAIN_MANIFEST';\n }\n } else if (this.state === 'HAVE_CURRENT_METADATA') {\n this.state = 'HAVE_METADATA';\n }\n }\n /**\n * start loading of the playlist\n */\n }, {\n key: \"load\",\n value: function load(shouldDelay) {\n var _this136 = this;\n if (this.mediaUpdateTimeout) {\n window$1.clearTimeout(this.mediaUpdateTimeout);\n this.mediaUpdateTimeout = null;\n }\n var media = this.media();\n if (shouldDelay) {\n var delay = media ? (media.partTargetDuration || media.targetDuration) / 2 * 1000 : 5 * 1000;\n this.mediaUpdateTimeout = window$1.setTimeout(function () {\n _this136.mediaUpdateTimeout = null;\n _this136.load();\n }, delay);\n return;\n }\n if (!this.started) {\n this.start();\n return;\n }\n if (media && !media.endList) {\n this.trigger('mediaupdatetimeout');\n } else {\n this.trigger('loadedplaylist');\n }\n }\n }, {\n key: \"updateMediaUpdateTimeout_\",\n value: function updateMediaUpdateTimeout_(delay) {\n var _this137 = this;\n if (this.mediaUpdateTimeout) {\n window$1.clearTimeout(this.mediaUpdateTimeout);\n this.mediaUpdateTimeout = null;\n } // we only have use mediaupdatetimeout for live playlists.\n\n if (!this.media() || this.media().endList) {\n return;\n }\n this.mediaUpdateTimeout = window$1.setTimeout(function () {\n _this137.mediaUpdateTimeout = null;\n _this137.trigger('mediaupdatetimeout');\n _this137.updateMediaUpdateTimeout_(delay);\n }, delay);\n }\n /**\n * start loading of the playlist\n */\n }, {\n key: \"start\",\n value: function start() {\n var _this138 = this;\n this.started = true;\n if (_typeof(this.src) === 'object') {\n // in the case of an entirely constructed manifest object (meaning there's no actual\n // manifest on a server), default the uri to the page's href\n if (!this.src.uri) {\n this.src.uri = window$1.location.href;\n } // resolvedUri is added on internally after the initial request. Since there's no\n // request for pre-resolved manifests, add on resolvedUri here.\n\n this.src.resolvedUri = this.src.uri; // Since a manifest object was passed in as the source (instead of a URL), the first\n // request can be skipped (since the top level of the manifest, at a minimum, is\n // already available as a parsed manifest object). However, if the manifest object\n // represents a main playlist, some media playlists may need to be resolved before\n // the starting segment list is available. Therefore, go directly to setup of the\n // initial playlist, and let the normal flow continue from there.\n //\n // Note that the call to setup is asynchronous, as other sections of VHS may assume\n // that the first request is asynchronous.\n\n setTimeout(function () {\n _this138.setupInitialPlaylist(_this138.src);\n }, 0);\n return;\n } // request the specified URL\n\n this.request = this.vhs_.xhr({\n uri: this.src,\n withCredentials: this.withCredentials\n }, function (error, req) {\n // disposed\n if (!_this138.request) {\n return;\n } // clear the loader's request reference\n\n _this138.request = null;\n if (error) {\n _this138.error = {\n status: req.status,\n message: \"HLS playlist request error at URL: \".concat(_this138.src, \".\"),\n responseText: req.responseText,\n // MEDIA_ERR_NETWORK\n code: 2\n };\n if (_this138.state === 'HAVE_NOTHING') {\n _this138.started = false;\n }\n return _this138.trigger('error');\n }\n _this138.src = resolveManifestRedirect(_this138.src, req);\n var manifest = _this138.parseManifest_({\n manifestString: req.responseText,\n url: _this138.src\n });\n _this138.setupInitialPlaylist(manifest);\n });\n }\n }, {\n key: \"srcUri\",\n value: function srcUri() {\n return typeof this.src === 'string' ? this.src : this.src.uri;\n }\n /**\n * Given a manifest object that's either a main or media playlist, trigger the proper\n * events and set the state of the playlist loader.\n *\n * If the manifest object represents a main playlist, `loadedplaylist` will be\n * triggered to allow listeners to select a playlist. If none is selected, the loader\n * will default to the first one in the playlists array.\n *\n * If the manifest object represents a media playlist, `loadedplaylist` will be\n * triggered followed by `loadedmetadata`, as the only available playlist is loaded.\n *\n * In the case of a media playlist, a main playlist object wrapper with one playlist\n * will be created so that all logic can handle playlists in the same fashion (as an\n * assumed manifest object schema).\n *\n * @param {Object} manifest\n * The parsed manifest object\n */\n }, {\n key: \"setupInitialPlaylist\",\n value: function setupInitialPlaylist(manifest) {\n this.state = 'HAVE_MAIN_MANIFEST';\n if (manifest.playlists) {\n this.main = manifest;\n addPropertiesToMain(this.main, this.srcUri()); // If the initial main playlist has playlists wtih segments already resolved,\n // then resolve URIs in advance, as they are usually done after a playlist request,\n // which may not happen if the playlist is resolved.\n\n manifest.playlists.forEach(function (playlist) {\n playlist.segments = getAllSegments(playlist);\n playlist.segments.forEach(function (segment) {\n resolveSegmentUris(segment, playlist.resolvedUri);\n });\n });\n this.trigger('loadedplaylist');\n if (!this.request) {\n // no media playlist was specifically selected so start\n // from the first listed one\n this.media(this.main.playlists[0]);\n }\n return;\n } // In order to support media playlists passed in as vhs-json, the case where the uri\n // is not provided as part of the manifest should be considered, and an appropriate\n // default used.\n\n var uri = this.srcUri() || window$1.location.href;\n this.main = mainForMedia(manifest, uri);\n this.haveMetadata({\n playlistObject: manifest,\n url: uri,\n id: this.main.playlists[0].id\n });\n this.trigger('loadedmetadata');\n }\n }]);\n return PlaylistLoader;\n}(EventTarget$1);\n/**\n * @file xhr.js\n */\nvar videojsXHR = videojs.xhr;\nvar callbackWrapper = function callbackWrapper(request, error, response, callback) {\n var reqResponse = request.responseType === 'arraybuffer' ? request.response : request.responseText;\n if (!error && reqResponse) {\n request.responseTime = Date.now();\n request.roundTripTime = request.responseTime - request.requestTime;\n request.bytesReceived = reqResponse.byteLength || reqResponse.length;\n if (!request.bandwidth) {\n request.bandwidth = Math.floor(request.bytesReceived / request.roundTripTime * 8 * 1000);\n }\n }\n if (response.headers) {\n request.responseHeaders = response.headers;\n } // videojs.xhr now uses a specific code on the error\n // object to signal that a request has timed out instead\n // of setting a boolean on the request object\n\n if (error && error.code === 'ETIMEDOUT') {\n request.timedout = true;\n } // videojs.xhr no longer considers status codes outside of 200 and 0\n // (for file uris) to be errors, but the old XHR did, so emulate that\n // behavior. Status 206 may be used in response to byterange requests.\n\n if (!error && !request.aborted && response.statusCode !== 200 && response.statusCode !== 206 && response.statusCode !== 0) {\n error = new Error('XHR Failed with a response of: ' + (request && (reqResponse || request.responseText)));\n }\n callback(error, request);\n};\n/**\n * Iterates over the request hooks Set and calls them in order\n *\n * @param {Set} hooks the hook Set to iterate over\n * @param {Object} options the request options to pass to the xhr wrapper\n * @return the callback hook function return value, the modified or new options Object.\n */\n\nvar callAllRequestHooks = function callAllRequestHooks(requestSet, options) {\n if (!requestSet || !requestSet.size) {\n return;\n }\n var newOptions = options;\n requestSet.forEach(function (requestCallback) {\n newOptions = requestCallback(newOptions);\n });\n return newOptions;\n};\n/**\n * Iterates over the response hooks Set and calls them in order.\n *\n * @param {Set} hooks the hook Set to iterate over\n * @param {Object} request the xhr request object\n * @param {Object} error the xhr error object\n * @param {Object} response the xhr response object\n */\n\nvar callAllResponseHooks = function callAllResponseHooks(responseSet, request, error, response) {\n if (!responseSet || !responseSet.size) {\n return;\n }\n responseSet.forEach(function (responseCallback) {\n responseCallback(request, error, response);\n });\n};\nvar xhrFactory = function xhrFactory() {\n var xhr = function XhrFunction(options, callback) {\n // Add a default timeout\n options = merge({\n timeout: 45e3\n }, options); // Allow an optional user-specified function to modify the option\n // object before we construct the xhr request\n // TODO: Remove beforeRequest in the next major release.\n\n var beforeRequest = XhrFunction.beforeRequest || videojs.Vhs.xhr.beforeRequest; // onRequest and onResponse hooks as a Set, at either the player or global level.\n // TODO: new Set added here for beforeRequest alias. Remove this when beforeRequest is removed.\n\n var _requestCallbackSet = XhrFunction._requestCallbackSet || videojs.Vhs.xhr._requestCallbackSet || new Set();\n var _responseCallbackSet = XhrFunction._responseCallbackSet || videojs.Vhs.xhr._responseCallbackSet;\n if (beforeRequest && typeof beforeRequest === 'function') {\n videojs.log.warn('beforeRequest is deprecated, use onRequest instead.');\n _requestCallbackSet.add(beforeRequest);\n } // Use the standard videojs.xhr() method unless `videojs.Vhs.xhr` has been overriden\n // TODO: switch back to videojs.Vhs.xhr.name === 'XhrFunction' when we drop IE11\n\n var xhrMethod = videojs.Vhs.xhr.original === true ? videojsXHR : videojs.Vhs.xhr; // call all registered onRequest hooks, assign new options.\n\n var beforeRequestOptions = callAllRequestHooks(_requestCallbackSet, options); // Remove the beforeRequest function from the hooks set so stale beforeRequest functions are not called.\n\n _requestCallbackSet[\"delete\"](beforeRequest); // xhrMethod will call XMLHttpRequest.open and XMLHttpRequest.send\n\n var request = xhrMethod(beforeRequestOptions || options, function (error, response) {\n // call all registered onResponse hooks\n callAllResponseHooks(_responseCallbackSet, request, error, response);\n return callbackWrapper(request, error, response, callback);\n });\n var originalAbort = request.abort;\n request.abort = function () {\n request.aborted = true;\n return originalAbort.apply(request, arguments);\n };\n request.uri = options.uri;\n request.requestTime = Date.now();\n return request;\n };\n xhr.original = true;\n return xhr;\n};\n/**\n * Turns segment byterange into a string suitable for use in\n * HTTP Range requests\n *\n * @param {Object} byterange - an object with two values defining the start and end\n * of a byte-range\n */\n\nvar byterangeStr = function byterangeStr(byterange) {\n // `byterangeEnd` is one less than `offset + length` because the HTTP range\n // header uses inclusive ranges\n var byterangeEnd;\n var byterangeStart = byterange.offset;\n if (typeof byterange.offset === 'bigint' || typeof byterange.length === 'bigint') {\n byterangeEnd = window$1.BigInt(byterange.offset) + window$1.BigInt(byterange.length) - window$1.BigInt(1);\n } else {\n byterangeEnd = byterange.offset + byterange.length - 1;\n }\n return 'bytes=' + byterangeStart + '-' + byterangeEnd;\n};\n/**\n * Defines headers for use in the xhr request for a particular segment.\n *\n * @param {Object} segment - a simplified copy of the segmentInfo object\n * from SegmentLoader\n */\n\nvar segmentXhrHeaders = function segmentXhrHeaders(segment) {\n var headers = {};\n if (segment.byterange) {\n headers.Range = byterangeStr(segment.byterange);\n }\n return headers;\n};\n\n/**\n * @file bin-utils.js\n */\n\n/**\n * convert a TimeRange to text\n *\n * @param {TimeRange} range the timerange to use for conversion\n * @param {number} i the iterator on the range to convert\n * @return {string} the range in string format\n */\n\nvar textRange = function textRange(range, i) {\n return range.start(i) + '-' + range.end(i);\n};\n/**\n * format a number as hex string\n *\n * @param {number} e The number\n * @param {number} i the iterator\n * @return {string} the hex formatted number as a string\n */\n\nvar formatHexString = function formatHexString(e, i) {\n var value = e.toString(16);\n return '00'.substring(0, 2 - value.length) + value + (i % 2 ? ' ' : '');\n};\nvar formatAsciiString = function formatAsciiString(e) {\n if (e >= 0x20 && e < 0x7e) {\n return String.fromCharCode(e);\n }\n return '.';\n};\n/**\n * Creates an object for sending to a web worker modifying properties that are TypedArrays\n * into a new object with seperated properties for the buffer, byteOffset, and byteLength.\n *\n * @param {Object} message\n * Object of properties and values to send to the web worker\n * @return {Object}\n * Modified message with TypedArray values expanded\n * @function createTransferableMessage\n */\n\nvar createTransferableMessage = function createTransferableMessage(message) {\n var transferable = {};\n Object.keys(message).forEach(function (key) {\n var value = message[key];\n if (isArrayBufferView(value)) {\n transferable[key] = {\n bytes: value.buffer,\n byteOffset: value.byteOffset,\n byteLength: value.byteLength\n };\n } else {\n transferable[key] = value;\n }\n });\n return transferable;\n};\n/**\n * Returns a unique string identifier for a media initialization\n * segment.\n *\n * @param {Object} initSegment\n * the init segment object.\n *\n * @return {string} the generated init segment id\n */\n\nvar initSegmentId = function initSegmentId(initSegment) {\n var byterange = initSegment.byterange || {\n length: Infinity,\n offset: 0\n };\n return [byterange.length, byterange.offset, initSegment.resolvedUri].join(',');\n};\n/**\n * Returns a unique string identifier for a media segment key.\n *\n * @param {Object} key the encryption key\n * @return {string} the unique id for the media segment key.\n */\n\nvar segmentKeyId = function segmentKeyId(key) {\n return key.resolvedUri;\n};\n/**\n * utils to help dump binary data to the console\n *\n * @param {Array|TypedArray} data\n * data to dump to a string\n *\n * @return {string} the data as a hex string.\n */\n\nvar hexDump = function hexDump(data) {\n var bytes = Array.prototype.slice.call(data);\n var step = 16;\n var result = '';\n var hex;\n var ascii;\n for (var j = 0; j < bytes.length / step; j++) {\n hex = bytes.slice(j * step, j * step + step).map(formatHexString).join('');\n ascii = bytes.slice(j * step, j * step + step).map(formatAsciiString).join('');\n result += hex + ' ' + ascii + '\\n';\n }\n return result;\n};\nvar tagDump = function tagDump(_ref21) {\n var bytes = _ref21.bytes;\n return hexDump(bytes);\n};\nvar textRanges = function textRanges(ranges) {\n var result = '';\n var i;\n for (i = 0; i < ranges.length; i++) {\n result += textRange(ranges, i) + ' ';\n }\n return result;\n};\nvar utils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n createTransferableMessage: createTransferableMessage,\n initSegmentId: initSegmentId,\n segmentKeyId: segmentKeyId,\n hexDump: hexDump,\n tagDump: tagDump,\n textRanges: textRanges\n});\n\n// TODO handle fmp4 case where the timing info is accurate and doesn't involve transmux\n// 25% was arbitrarily chosen, and may need to be refined over time.\n\nvar SEGMENT_END_FUDGE_PERCENT = 0.25;\n/**\n * Converts a player time (any time that can be gotten/set from player.currentTime(),\n * e.g., any time within player.seekable().start(0) to player.seekable().end(0)) to a\n * program time (any time referencing the real world (e.g., EXT-X-PROGRAM-DATE-TIME)).\n *\n * The containing segment is required as the EXT-X-PROGRAM-DATE-TIME serves as an \"anchor\n * point\" (a point where we have a mapping from program time to player time, with player\n * time being the post transmux start of the segment).\n *\n * For more details, see [this doc](../../docs/program-time-from-player-time.md).\n *\n * @param {number} playerTime the player time\n * @param {Object} segment the segment which contains the player time\n * @return {Date} program time\n */\n\nvar playerTimeToProgramTime = function playerTimeToProgramTime(playerTime, segment) {\n if (!segment.dateTimeObject) {\n // Can't convert without an \"anchor point\" for the program time (i.e., a time that can\n // be used to map the start of a segment with a real world time).\n return null;\n }\n var transmuxerPrependedSeconds = segment.videoTimingInfo.transmuxerPrependedSeconds;\n var transmuxedStart = segment.videoTimingInfo.transmuxedPresentationStart; // get the start of the content from before old content is prepended\n\n var startOfSegment = transmuxedStart + transmuxerPrependedSeconds;\n var offsetFromSegmentStart = playerTime - startOfSegment;\n return new Date(segment.dateTimeObject.getTime() + offsetFromSegmentStart * 1000);\n};\nvar originalSegmentVideoDuration = function originalSegmentVideoDuration(videoTimingInfo) {\n return videoTimingInfo.transmuxedPresentationEnd - videoTimingInfo.transmuxedPresentationStart - videoTimingInfo.transmuxerPrependedSeconds;\n};\n/**\n * Finds a segment that contains the time requested given as an ISO-8601 string. The\n * returned segment might be an estimate or an accurate match.\n *\n * @param {string} programTime The ISO-8601 programTime to find a match for\n * @param {Object} playlist A playlist object to search within\n */\n\nvar findSegmentForProgramTime = function findSegmentForProgramTime(programTime, playlist) {\n // Assumptions:\n // - verifyProgramDateTimeTags has already been run\n // - live streams have been started\n var dateTimeObject;\n try {\n dateTimeObject = new Date(programTime);\n } catch (e) {\n return null;\n }\n if (!playlist || !playlist.segments || playlist.segments.length === 0) {\n return null;\n }\n var segment = playlist.segments[0];\n if (dateTimeObject < new Date(segment.dateTimeObject)) {\n // Requested time is before stream start.\n return null;\n }\n for (var _i91 = 0; _i91 < playlist.segments.length - 1; _i91++) {\n segment = playlist.segments[_i91];\n var nextSegmentStart = new Date(playlist.segments[_i91 + 1].dateTimeObject);\n if (dateTimeObject < nextSegmentStart) {\n break;\n }\n }\n var lastSegment = playlist.segments[playlist.segments.length - 1];\n var lastSegmentStart = lastSegment.dateTimeObject;\n var lastSegmentDuration = lastSegment.videoTimingInfo ? originalSegmentVideoDuration(lastSegment.videoTimingInfo) : lastSegment.duration + lastSegment.duration * SEGMENT_END_FUDGE_PERCENT;\n var lastSegmentEnd = new Date(lastSegmentStart.getTime() + lastSegmentDuration * 1000);\n if (dateTimeObject > lastSegmentEnd) {\n // Beyond the end of the stream, or our best guess of the end of the stream.\n return null;\n }\n if (dateTimeObject > new Date(lastSegmentStart)) {\n segment = lastSegment;\n }\n return {\n segment: segment,\n estimatedStart: segment.videoTimingInfo ? segment.videoTimingInfo.transmuxedPresentationStart : Playlist.duration(playlist, playlist.mediaSequence + playlist.segments.indexOf(segment)),\n // Although, given that all segments have accurate date time objects, the segment\n // selected should be accurate, unless the video has been transmuxed at some point\n // (determined by the presence of the videoTimingInfo object), the segment's \"player\n // time\" (the start time in the player) can't be considered accurate.\n type: segment.videoTimingInfo ? 'accurate' : 'estimate'\n };\n};\n/**\n * Finds a segment that contains the given player time(in seconds).\n *\n * @param {number} time The player time to find a match for\n * @param {Object} playlist A playlist object to search within\n */\n\nvar findSegmentForPlayerTime = function findSegmentForPlayerTime(time, playlist) {\n // Assumptions:\n // - there will always be a segment.duration\n // - we can start from zero\n // - segments are in time order\n if (!playlist || !playlist.segments || playlist.segments.length === 0) {\n return null;\n }\n var segmentEnd = 0;\n var segment;\n for (var _i92 = 0; _i92 < playlist.segments.length; _i92++) {\n segment = playlist.segments[_i92]; // videoTimingInfo is set after the segment is downloaded and transmuxed, and\n // should contain the most accurate values we have for the segment's player times.\n //\n // Use the accurate transmuxedPresentationEnd value if it is available, otherwise fall\n // back to an estimate based on the manifest derived (inaccurate) segment.duration, to\n // calculate an end value.\n\n segmentEnd = segment.videoTimingInfo ? segment.videoTimingInfo.transmuxedPresentationEnd : segmentEnd + segment.duration;\n if (time <= segmentEnd) {\n break;\n }\n }\n var lastSegment = playlist.segments[playlist.segments.length - 1];\n if (lastSegment.videoTimingInfo && lastSegment.videoTimingInfo.transmuxedPresentationEnd < time) {\n // The time requested is beyond the stream end.\n return null;\n }\n if (time > segmentEnd) {\n // The time is within or beyond the last segment.\n //\n // Check to see if the time is beyond a reasonable guess of the end of the stream.\n if (time > segmentEnd + lastSegment.duration * SEGMENT_END_FUDGE_PERCENT) {\n // Technically, because the duration value is only an estimate, the time may still\n // exist in the last segment, however, there isn't enough information to make even\n // a reasonable estimate.\n return null;\n }\n segment = lastSegment;\n }\n return {\n segment: segment,\n estimatedStart: segment.videoTimingInfo ? segment.videoTimingInfo.transmuxedPresentationStart : segmentEnd - segment.duration,\n // Because videoTimingInfo is only set after transmux, it is the only way to get\n // accurate timing values.\n type: segment.videoTimingInfo ? 'accurate' : 'estimate'\n };\n};\n/**\n * Gives the offset of the comparisonTimestamp from the programTime timestamp in seconds.\n * If the offset returned is positive, the programTime occurs after the\n * comparisonTimestamp.\n * If the offset is negative, the programTime occurs before the comparisonTimestamp.\n *\n * @param {string} comparisonTimeStamp An ISO-8601 timestamp to compare against\n * @param {string} programTime The programTime as an ISO-8601 string\n * @return {number} offset\n */\n\nvar getOffsetFromTimestamp = function getOffsetFromTimestamp(comparisonTimeStamp, programTime) {\n var segmentDateTime;\n var programDateTime;\n try {\n segmentDateTime = new Date(comparisonTimeStamp);\n programDateTime = new Date(programTime);\n } catch (e) {// TODO handle error\n }\n var segmentTimeEpoch = segmentDateTime.getTime();\n var programTimeEpoch = programDateTime.getTime();\n return (programTimeEpoch - segmentTimeEpoch) / 1000;\n};\n/**\n * Checks that all segments in this playlist have programDateTime tags.\n *\n * @param {Object} playlist A playlist object\n */\n\nvar verifyProgramDateTimeTags = function verifyProgramDateTimeTags(playlist) {\n if (!playlist.segments || playlist.segments.length === 0) {\n return false;\n }\n for (var _i93 = 0; _i93 < playlist.segments.length; _i93++) {\n var segment = playlist.segments[_i93];\n if (!segment.dateTimeObject) {\n return false;\n }\n }\n return true;\n};\n/**\n * Returns the programTime of the media given a playlist and a playerTime.\n * The playlist must have programDateTime tags for a programDateTime tag to be returned.\n * If the segments containing the time requested have not been buffered yet, an estimate\n * may be returned to the callback.\n *\n * @param {Object} args\n * @param {Object} args.playlist A playlist object to search within\n * @param {number} time A playerTime in seconds\n * @param {Function} callback(err, programTime)\n * @return {string} err.message A detailed error message\n * @return {Object} programTime\n * @return {number} programTime.mediaSeconds The streamTime in seconds\n * @return {string} programTime.programDateTime The programTime as an ISO-8601 String\n */\n\nvar getProgramTime = function getProgramTime(_ref22) {\n var playlist = _ref22.playlist,\n _ref22$time = _ref22.time,\n time = _ref22$time === void 0 ? undefined : _ref22$time,\n callback = _ref22.callback;\n if (!callback) {\n throw new Error('getProgramTime: callback must be provided');\n }\n if (!playlist || time === undefined) {\n return callback({\n message: 'getProgramTime: playlist and time must be provided'\n });\n }\n var matchedSegment = findSegmentForPlayerTime(time, playlist);\n if (!matchedSegment) {\n return callback({\n message: 'valid programTime was not found'\n });\n }\n if (matchedSegment.type === 'estimate') {\n return callback({\n message: 'Accurate programTime could not be determined.' + ' Please seek to e.seekTime and try again',\n seekTime: matchedSegment.estimatedStart\n });\n }\n var programTimeObject = {\n mediaSeconds: time\n };\n var programTime = playerTimeToProgramTime(time, matchedSegment.segment);\n if (programTime) {\n programTimeObject.programDateTime = programTime.toISOString();\n }\n return callback(null, programTimeObject);\n};\n/**\n * Seeks in the player to a time that matches the given programTime ISO-8601 string.\n *\n * @param {Object} args\n * @param {string} args.programTime A programTime to seek to as an ISO-8601 String\n * @param {Object} args.playlist A playlist to look within\n * @param {number} args.retryCount The number of times to try for an accurate seek. Default is 2.\n * @param {Function} args.seekTo A method to perform a seek\n * @param {boolean} args.pauseAfterSeek Whether to end in a paused state after seeking. Default is true.\n * @param {Object} args.tech The tech to seek on\n * @param {Function} args.callback(err, newTime) A callback to return the new time to\n * @return {string} err.message A detailed error message\n * @return {number} newTime The exact time that was seeked to in seconds\n */\n\nvar _seekToProgramTime = function seekToProgramTime(_ref23) {\n var programTime = _ref23.programTime,\n playlist = _ref23.playlist,\n _ref23$retryCount = _ref23.retryCount,\n retryCount = _ref23$retryCount === void 0 ? 2 : _ref23$retryCount,\n seekTo = _ref23.seekTo,\n _ref23$pauseAfterSeek = _ref23.pauseAfterSeek,\n pauseAfterSeek = _ref23$pauseAfterSeek === void 0 ? true : _ref23$pauseAfterSeek,\n tech = _ref23.tech,\n callback = _ref23.callback;\n if (!callback) {\n throw new Error('seekToProgramTime: callback must be provided');\n }\n if (typeof programTime === 'undefined' || !playlist || !seekTo) {\n return callback({\n message: 'seekToProgramTime: programTime, seekTo and playlist must be provided'\n });\n }\n if (!playlist.endList && !tech.hasStarted_) {\n return callback({\n message: 'player must be playing a live stream to start buffering'\n });\n }\n if (!verifyProgramDateTimeTags(playlist)) {\n return callback({\n message: 'programDateTime tags must be provided in the manifest ' + playlist.resolvedUri\n });\n }\n var matchedSegment = findSegmentForProgramTime(programTime, playlist); // no match\n\n if (!matchedSegment) {\n return callback({\n message: \"\".concat(programTime, \" was not found in the stream\")\n });\n }\n var segment = matchedSegment.segment;\n var mediaOffset = getOffsetFromTimestamp(segment.dateTimeObject, programTime);\n if (matchedSegment.type === 'estimate') {\n // we've run out of retries\n if (retryCount === 0) {\n return callback({\n message: \"\".concat(programTime, \" is not buffered yet. Try again\")\n });\n }\n seekTo(matchedSegment.estimatedStart + mediaOffset);\n tech.one('seeked', function () {\n _seekToProgramTime({\n programTime: programTime,\n playlist: playlist,\n retryCount: retryCount - 1,\n seekTo: seekTo,\n pauseAfterSeek: pauseAfterSeek,\n tech: tech,\n callback: callback\n });\n });\n return;\n } // Since the segment.start value is determined from the buffered end or ending time\n // of the prior segment, the seekToTime doesn't need to account for any transmuxer\n // modifications.\n\n var seekToTime = segment.start + mediaOffset;\n var seekedCallback = function seekedCallback() {\n return callback(null, tech.currentTime());\n }; // listen for seeked event\n\n tech.one('seeked', seekedCallback); // pause before seeking as video.js will restore this state\n\n if (pauseAfterSeek) {\n tech.pause();\n }\n seekTo(seekToTime);\n};\n\n// which will only happen if the request is complete.\n\nvar callbackOnCompleted = function callbackOnCompleted(request, cb) {\n if (request.readyState === 4) {\n return cb();\n }\n return;\n};\nvar containerRequest = function containerRequest(uri, xhr, cb) {\n var bytes = [];\n var id3Offset;\n var finished = false;\n var endRequestAndCallback = function endRequestAndCallback(err, req, type, _bytes) {\n req.abort();\n finished = true;\n return cb(err, req, type, _bytes);\n };\n var progressListener = function progressListener(error, request) {\n if (finished) {\n return;\n }\n if (error) {\n return endRequestAndCallback(error, request, '', bytes);\n } // grap the new part of content that was just downloaded\n\n var newPart = request.responseText.substring(bytes && bytes.byteLength || 0, request.responseText.length); // add that onto bytes\n\n bytes = concatTypedArrays(bytes, stringToBytes(newPart, true));\n id3Offset = id3Offset || getId3Offset(bytes); // we need at least 10 bytes to determine a type\n // or we need at least two bytes after an id3Offset\n\n if (bytes.length < 10 || id3Offset && bytes.length < id3Offset + 2) {\n return callbackOnCompleted(request, function () {\n return endRequestAndCallback(error, request, '', bytes);\n });\n }\n var type = detectContainerForBytes(bytes); // if this looks like a ts segment but we don't have enough data\n // to see the second sync byte, wait until we have enough data\n // before declaring it ts\n\n if (type === 'ts' && bytes.length < 188) {\n return callbackOnCompleted(request, function () {\n return endRequestAndCallback(error, request, '', bytes);\n });\n } // this may be an unsynced ts segment\n // wait for 376 bytes before detecting no container\n\n if (!type && bytes.length < 376) {\n return callbackOnCompleted(request, function () {\n return endRequestAndCallback(error, request, '', bytes);\n });\n }\n return endRequestAndCallback(null, request, type, bytes);\n };\n var options = {\n uri: uri,\n beforeSend: function beforeSend(request) {\n // this forces the browser to pass the bytes to us unprocessed\n request.overrideMimeType('text/plain; charset=x-user-defined');\n request.addEventListener('progress', function (_ref24) {\n var total = _ref24.total,\n loaded = _ref24.loaded;\n return callbackWrapper(request, null, {\n statusCode: request.status\n }, progressListener);\n });\n }\n };\n var request = xhr(options, function (error, response) {\n return callbackWrapper(request, error, response, progressListener);\n });\n return request;\n};\nvar EventTarget = videojs.EventTarget;\nvar dashPlaylistUnchanged = function dashPlaylistUnchanged(a, b) {\n if (!isPlaylistUnchanged(a, b)) {\n return false;\n } // for dash the above check will often return true in scenarios where\n // the playlist actually has changed because mediaSequence isn't a\n // dash thing, and we often set it to 1. So if the playlists have the same amount\n // of segments we return true.\n // So for dash we need to make sure that the underlying segments are different.\n // if sidx changed then the playlists are different.\n\n if (a.sidx && b.sidx && (a.sidx.offset !== b.sidx.offset || a.sidx.length !== b.sidx.length)) {\n return false;\n } else if (!a.sidx && b.sidx || a.sidx && !b.sidx) {\n return false;\n } // one or the other does not have segments\n // there was a change.\n\n if (a.segments && !b.segments || !a.segments && b.segments) {\n return false;\n } // neither has segments nothing changed\n\n if (!a.segments && !b.segments) {\n return true;\n } // check segments themselves\n\n for (var _i94 = 0; _i94 < a.segments.length; _i94++) {\n var aSegment = a.segments[_i94];\n var bSegment = b.segments[_i94]; // if uris are different between segments there was a change\n\n if (aSegment.uri !== bSegment.uri) {\n return false;\n } // neither segment has a byterange, there will be no byterange change.\n\n if (!aSegment.byterange && !bSegment.byterange) {\n continue;\n }\n var aByterange = aSegment.byterange;\n var bByterange = bSegment.byterange; // if byterange only exists on one of the segments, there was a change.\n\n if (aByterange && !bByterange || !aByterange && bByterange) {\n return false;\n } // if both segments have byterange with different offsets, there was a change.\n\n if (aByterange.offset !== bByterange.offset || aByterange.length !== bByterange.length) {\n return false;\n }\n } // if everything was the same with segments, this is the same playlist.\n\n return true;\n};\n/**\n * Use the representation IDs from the mpd object to create groupIDs, the NAME is set to mandatory representation\n * ID in the parser. This allows for continuous playout across periods with the same representation IDs\n * (continuous periods as defined in DASH-IF 3.2.12). This is assumed in the mpd-parser as well. If we want to support\n * periods without continuous playback this function may need modification as well as the parser.\n */\n\nvar dashGroupId = function dashGroupId(type, group, label, playlist) {\n // If the manifest somehow does not have an ID (non-dash compliant), use the label.\n var playlistId = playlist.attributes.NAME || label;\n return \"placeholder-uri-\".concat(type, \"-\").concat(group, \"-\").concat(playlistId);\n};\n/**\n * Parses the main XML string and updates playlist URI references.\n *\n * @param {Object} config\n * Object of arguments\n * @param {string} config.mainXml\n * The mpd XML\n * @param {string} config.srcUrl\n * The mpd URL\n * @param {Date} config.clientOffset\n * A time difference between server and client\n * @param {Object} config.sidxMapping\n * SIDX mappings for moof/mdat URIs and byte ranges\n * @return {Object}\n * The parsed mpd manifest object\n */\n\nvar parseMainXml = function parseMainXml(_ref25) {\n var mainXml = _ref25.mainXml,\n srcUrl = _ref25.srcUrl,\n clientOffset = _ref25.clientOffset,\n sidxMapping = _ref25.sidxMapping,\n previousManifest = _ref25.previousManifest;\n var manifest = parse(mainXml, {\n manifestUri: srcUrl,\n clientOffset: clientOffset,\n sidxMapping: sidxMapping,\n previousManifest: previousManifest\n });\n addPropertiesToMain(manifest, srcUrl, dashGroupId);\n return manifest;\n};\n/**\n * Removes any mediaGroup labels that no longer exist in the newMain\n *\n * @param {Object} update\n * The previous mpd object being updated\n * @param {Object} newMain\n * The new mpd object\n */\n\nvar removeOldMediaGroupLabels = function removeOldMediaGroupLabels(update, newMain) {\n forEachMediaGroup(update, function (properties, type, group, label) {\n if (!(label in newMain.mediaGroups[type][group])) {\n delete update.mediaGroups[type][group][label];\n }\n });\n};\n/**\n * Returns a new main manifest that is the result of merging an updated main manifest\n * into the original version.\n *\n * @param {Object} oldMain\n * The old parsed mpd object\n * @param {Object} newMain\n * The updated parsed mpd object\n * @return {Object}\n * A new object representing the original main manifest with the updated media\n * playlists merged in\n */\n\nvar updateMain = function updateMain(oldMain, newMain, sidxMapping) {\n var noChanges = true;\n var update = merge(oldMain, {\n // These are top level properties that can be updated\n duration: newMain.duration,\n minimumUpdatePeriod: newMain.minimumUpdatePeriod,\n timelineStarts: newMain.timelineStarts\n }); // First update the playlists in playlist list\n\n for (var _i95 = 0; _i95 < newMain.playlists.length; _i95++) {\n var playlist = newMain.playlists[_i95];\n if (playlist.sidx) {\n var sidxKey = generateSidxKey(playlist.sidx); // add sidx segments to the playlist if we have all the sidx info already\n\n if (sidxMapping && sidxMapping[sidxKey] && sidxMapping[sidxKey].sidx) {\n addSidxSegmentsToPlaylist(playlist, sidxMapping[sidxKey].sidx, playlist.sidx.resolvedUri);\n }\n }\n var playlistUpdate = updateMain$1(update, playlist, dashPlaylistUnchanged);\n if (playlistUpdate) {\n update = playlistUpdate;\n noChanges = false;\n }\n } // Then update media group playlists\n\n forEachMediaGroup(newMain, function (properties, type, group, label) {\n if (properties.playlists && properties.playlists.length) {\n var id = properties.playlists[0].id;\n var _playlistUpdate = updateMain$1(update, properties.playlists[0], dashPlaylistUnchanged);\n if (_playlistUpdate) {\n update = _playlistUpdate; // add new mediaGroup label if it doesn't exist and assign the new mediaGroup.\n\n if (!(label in update.mediaGroups[type][group])) {\n update.mediaGroups[type][group][label] = properties;\n } // update the playlist reference within media groups\n\n update.mediaGroups[type][group][label].playlists[0] = update.playlists[id];\n noChanges = false;\n }\n }\n }); // remove mediaGroup labels and references that no longer exist in the newMain\n\n removeOldMediaGroupLabels(update, newMain);\n if (newMain.minimumUpdatePeriod !== oldMain.minimumUpdatePeriod) {\n noChanges = false;\n }\n if (noChanges) {\n return null;\n }\n return update;\n}; // SIDX should be equivalent if the URI and byteranges of the SIDX match.\n// If the SIDXs have maps, the two maps should match,\n// both `a` and `b` missing SIDXs is considered matching.\n// If `a` or `b` but not both have a map, they aren't matching.\n\nvar equivalentSidx = function equivalentSidx(a, b) {\n var neitherMap = Boolean(!a.map && !b.map);\n var equivalentMap = neitherMap || Boolean(a.map && b.map && a.map.byterange.offset === b.map.byterange.offset && a.map.byterange.length === b.map.byterange.length);\n return equivalentMap && a.uri === b.uri && a.byterange.offset === b.byterange.offset && a.byterange.length === b.byterange.length;\n}; // exported for testing\n\nvar compareSidxEntry = function compareSidxEntry(playlists, oldSidxMapping) {\n var newSidxMapping = {};\n for (var id in playlists) {\n var playlist = playlists[id];\n var currentSidxInfo = playlist.sidx;\n if (currentSidxInfo) {\n var key = generateSidxKey(currentSidxInfo);\n if (!oldSidxMapping[key]) {\n break;\n }\n var savedSidxInfo = oldSidxMapping[key].sidxInfo;\n if (equivalentSidx(savedSidxInfo, currentSidxInfo)) {\n newSidxMapping[key] = oldSidxMapping[key];\n }\n }\n }\n return newSidxMapping;\n};\n/**\n * A function that filters out changed items as they need to be requested separately.\n *\n * The method is exported for testing\n *\n * @param {Object} main the parsed mpd XML returned via mpd-parser\n * @param {Object} oldSidxMapping the SIDX to compare against\n */\n\nvar filterChangedSidxMappings = function filterChangedSidxMappings(main, oldSidxMapping) {\n var videoSidx = compareSidxEntry(main.playlists, oldSidxMapping);\n var mediaGroupSidx = videoSidx;\n forEachMediaGroup(main, function (properties, mediaType, groupKey, labelKey) {\n if (properties.playlists && properties.playlists.length) {\n var playlists = properties.playlists;\n mediaGroupSidx = merge(mediaGroupSidx, compareSidxEntry(playlists, oldSidxMapping));\n }\n });\n return mediaGroupSidx;\n};\nvar DashPlaylistLoader = /*#__PURE__*/function (_EventTarget) {\n _inherits(DashPlaylistLoader, _EventTarget);\n var _super77 = _createSuper(DashPlaylistLoader);\n // DashPlaylistLoader must accept either a src url or a playlist because subsequent\n // playlist loader setups from media groups will expect to be able to pass a playlist\n // (since there aren't external URLs to media playlists with DASH)\n function DashPlaylistLoader(srcUrlOrPlaylist, vhs) {\n var _this139;\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var mainPlaylistLoader = arguments.length > 3 ? arguments[3] : undefined;\n _classCallCheck(this, DashPlaylistLoader);\n _this139 = _super77.call(this);\n _this139.mainPlaylistLoader_ = mainPlaylistLoader || _assertThisInitialized(_this139);\n if (!mainPlaylistLoader) {\n _this139.isMain_ = true;\n }\n var _options$withCredenti2 = options.withCredentials,\n withCredentials = _options$withCredenti2 === void 0 ? false : _options$withCredenti2;\n _this139.vhs_ = vhs;\n _this139.withCredentials = withCredentials;\n _this139.addMetadataToTextTrack = options.addMetadataToTextTrack;\n if (!srcUrlOrPlaylist) {\n throw new Error('A non-empty playlist URL or object is required');\n } // event naming?\n\n _this139.on('minimumUpdatePeriod', function () {\n _this139.refreshXml_();\n }); // live playlist staleness timeout\n\n _this139.on('mediaupdatetimeout', function () {\n // We handle live content steering in the playlist controller\n if (!_this139.media().attributes.serviceLocation) {\n _this139.refreshMedia_(_this139.media().id);\n }\n });\n _this139.state = 'HAVE_NOTHING';\n _this139.loadedPlaylists_ = {};\n _this139.logger_ = logger('DashPlaylistLoader'); // initialize the loader state\n // The mainPlaylistLoader will be created with a string\n\n if (_this139.isMain_) {\n _this139.mainPlaylistLoader_.srcUrl = srcUrlOrPlaylist; // TODO: reset sidxMapping between period changes\n // once multi-period is refactored\n\n _this139.mainPlaylistLoader_.sidxMapping_ = {};\n } else {\n _this139.childPlaylist_ = srcUrlOrPlaylist;\n }\n return _this139;\n }\n _createClass(DashPlaylistLoader, [{\n key: \"requestErrored_\",\n value: function requestErrored_(err, request, startingState) {\n // disposed\n if (!this.request) {\n return true;\n } // pending request is cleared\n\n this.request = null;\n if (err) {\n // use the provided error object or create one\n // based on the request/response\n this.error = _typeof(err) === 'object' && !(err instanceof Error) ? err : {\n status: request.status,\n message: 'DASH request error at URL: ' + request.uri,\n response: request.response,\n // MEDIA_ERR_NETWORK\n code: 2\n };\n if (startingState) {\n this.state = startingState;\n }\n this.trigger('error');\n return true;\n }\n }\n /**\n * Verify that the container of the sidx segment can be parsed\n * and if it can, get and parse that segment.\n */\n }, {\n key: \"addSidxSegments_\",\n value: function addSidxSegments_(playlist, startingState, cb) {\n var _this140 = this;\n var sidxKey = playlist.sidx && generateSidxKey(playlist.sidx); // playlist lacks sidx or sidx segments were added to this playlist already.\n\n if (!playlist.sidx || !sidxKey || this.mainPlaylistLoader_.sidxMapping_[sidxKey]) {\n // keep this function async\n this.mediaRequest_ = window$1.setTimeout(function () {\n return cb(false);\n }, 0);\n return;\n } // resolve the segment URL relative to the playlist\n\n var uri = resolveManifestRedirect(playlist.sidx.resolvedUri);\n var fin = function fin(err, request) {\n if (_this140.requestErrored_(err, request, startingState)) {\n return;\n }\n var sidxMapping = _this140.mainPlaylistLoader_.sidxMapping_;\n var sidx;\n try {\n sidx = parseSidx(toUint8(request.response).subarray(8));\n } catch (e) {\n // sidx parsing failed.\n _this140.requestErrored_(e, request, startingState);\n return;\n }\n sidxMapping[sidxKey] = {\n sidxInfo: playlist.sidx,\n sidx: sidx\n };\n addSidxSegmentsToPlaylist(playlist, sidx, playlist.sidx.resolvedUri);\n return cb(true);\n };\n this.request = containerRequest(uri, this.vhs_.xhr, function (err, request, container, bytes) {\n if (err) {\n return fin(err, request);\n }\n if (!container || container !== 'mp4') {\n return fin({\n status: request.status,\n message: \"Unsupported \".concat(container || 'unknown', \" container type for sidx segment at URL: \").concat(uri),\n // response is just bytes in this case\n // but we really don't want to return that.\n response: '',\n playlist: playlist,\n internal: true,\n playlistExclusionDuration: Infinity,\n // MEDIA_ERR_NETWORK\n code: 2\n }, request);\n } // if we already downloaded the sidx bytes in the container request, use them\n\n var _playlist$sidx$bytera = playlist.sidx.byterange,\n offset = _playlist$sidx$bytera.offset,\n length = _playlist$sidx$bytera.length;\n if (bytes.length >= length + offset) {\n return fin(err, {\n response: bytes.subarray(offset, offset + length),\n status: request.status,\n uri: request.uri\n });\n } // otherwise request sidx bytes\n\n _this140.request = _this140.vhs_.xhr({\n uri: uri,\n responseType: 'arraybuffer',\n headers: segmentXhrHeaders({\n byterange: playlist.sidx.byterange\n })\n }, fin);\n });\n }\n }, {\n key: \"dispose\",\n value: function dispose() {\n this.trigger('dispose');\n this.stopRequest();\n this.loadedPlaylists_ = {};\n window$1.clearTimeout(this.minimumUpdatePeriodTimeout_);\n window$1.clearTimeout(this.mediaRequest_);\n window$1.clearTimeout(this.mediaUpdateTimeout);\n this.mediaUpdateTimeout = null;\n this.mediaRequest_ = null;\n this.minimumUpdatePeriodTimeout_ = null;\n if (this.mainPlaylistLoader_.createMupOnMedia_) {\n this.off('loadedmetadata', this.mainPlaylistLoader_.createMupOnMedia_);\n this.mainPlaylistLoader_.createMupOnMedia_ = null;\n }\n this.off();\n }\n }, {\n key: \"hasPendingRequest\",\n value: function hasPendingRequest() {\n return this.request || this.mediaRequest_;\n }\n }, {\n key: \"stopRequest\",\n value: function stopRequest() {\n if (this.request) {\n var oldRequest = this.request;\n this.request = null;\n oldRequest.onreadystatechange = null;\n oldRequest.abort();\n }\n }\n }, {\n key: \"media\",\n value: function media(playlist) {\n var _this141 = this;\n // getter\n if (!playlist) {\n return this.media_;\n } // setter\n\n if (this.state === 'HAVE_NOTHING') {\n throw new Error('Cannot switch media playlist from ' + this.state);\n }\n var startingState = this.state; // find the playlist object if the target playlist has been specified by URI\n\n if (typeof playlist === 'string') {\n if (!this.mainPlaylistLoader_.main.playlists[playlist]) {\n throw new Error('Unknown playlist URI: ' + playlist);\n }\n playlist = this.mainPlaylistLoader_.main.playlists[playlist];\n }\n var mediaChange = !this.media_ || playlist.id !== this.media_.id; // switch to previously loaded playlists immediately\n\n if (mediaChange && this.loadedPlaylists_[playlist.id] && this.loadedPlaylists_[playlist.id].endList) {\n this.state = 'HAVE_METADATA';\n this.media_ = playlist; // trigger media change if the active media has been updated\n\n if (mediaChange) {\n this.trigger('mediachanging');\n this.trigger('mediachange');\n }\n return;\n } // switching to the active playlist is a no-op\n\n if (!mediaChange) {\n return;\n } // switching from an already loaded playlist\n\n if (this.media_) {\n this.trigger('mediachanging');\n }\n this.addSidxSegments_(playlist, startingState, function (sidxChanged) {\n // everything is ready just continue to haveMetadata\n _this141.haveMetadata({\n startingState: startingState,\n playlist: playlist\n });\n });\n }\n }, {\n key: \"haveMetadata\",\n value: function haveMetadata(_ref26) {\n var startingState = _ref26.startingState,\n playlist = _ref26.playlist;\n this.state = 'HAVE_METADATA';\n this.loadedPlaylists_[playlist.id] = playlist;\n this.mediaRequest_ = null; // This will trigger loadedplaylist\n\n this.refreshMedia_(playlist.id); // fire loadedmetadata the first time a media playlist is loaded\n // to resolve setup of media groups\n\n if (startingState === 'HAVE_MAIN_MANIFEST') {\n this.trigger('loadedmetadata');\n } else {\n // trigger media change if the active media has been updated\n this.trigger('mediachange');\n }\n }\n }, {\n key: \"pause\",\n value: function pause() {\n if (this.mainPlaylistLoader_.createMupOnMedia_) {\n this.off('loadedmetadata', this.mainPlaylistLoader_.createMupOnMedia_);\n this.mainPlaylistLoader_.createMupOnMedia_ = null;\n }\n this.stopRequest();\n window$1.clearTimeout(this.mediaUpdateTimeout);\n this.mediaUpdateTimeout = null;\n if (this.isMain_) {\n window$1.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_);\n this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_ = null;\n }\n if (this.state === 'HAVE_NOTHING') {\n // If we pause the loader before any data has been retrieved, its as if we never\n // started, so reset to an unstarted state.\n this.started = false;\n }\n }\n }, {\n key: \"load\",\n value: function load(isFinalRendition) {\n var _this142 = this;\n window$1.clearTimeout(this.mediaUpdateTimeout);\n this.mediaUpdateTimeout = null;\n var media = this.media();\n if (isFinalRendition) {\n var delay = media ? media.targetDuration / 2 * 1000 : 5 * 1000;\n this.mediaUpdateTimeout = window$1.setTimeout(function () {\n return _this142.load();\n }, delay);\n return;\n } // because the playlists are internal to the manifest, load should either load the\n // main manifest, or do nothing but trigger an event\n\n if (!this.started) {\n this.start();\n return;\n }\n if (media && !media.endList) {\n // Check to see if this is the main loader and the MUP was cleared (this happens\n // when the loader was paused). `media` should be set at this point since one is always\n // set during `start()`.\n if (this.isMain_ && !this.minimumUpdatePeriodTimeout_) {\n // Trigger minimumUpdatePeriod to refresh the main manifest\n this.trigger('minimumUpdatePeriod'); // Since there was no prior minimumUpdatePeriodTimeout it should be recreated\n\n this.updateMinimumUpdatePeriodTimeout_();\n }\n this.trigger('mediaupdatetimeout');\n } else {\n this.trigger('loadedplaylist');\n }\n }\n }, {\n key: \"start\",\n value: function start() {\n var _this143 = this;\n this.started = true; // We don't need to request the main manifest again\n // Call this asynchronously to match the xhr request behavior below\n\n if (!this.isMain_) {\n this.mediaRequest_ = window$1.setTimeout(function () {\n return _this143.haveMain_();\n }, 0);\n return;\n }\n this.requestMain_(function (req, mainChanged) {\n _this143.haveMain_();\n if (!_this143.hasPendingRequest() && !_this143.media_) {\n _this143.media(_this143.mainPlaylistLoader_.main.playlists[0]);\n }\n });\n }\n }, {\n key: \"requestMain_\",\n value: function requestMain_(cb) {\n var _this144 = this;\n this.request = this.vhs_.xhr({\n uri: this.mainPlaylistLoader_.srcUrl,\n withCredentials: this.withCredentials\n }, function (error, req) {\n if (_this144.requestErrored_(error, req)) {\n if (_this144.state === 'HAVE_NOTHING') {\n _this144.started = false;\n }\n return;\n }\n var mainChanged = req.responseText !== _this144.mainPlaylistLoader_.mainXml_;\n _this144.mainPlaylistLoader_.mainXml_ = req.responseText;\n if (req.responseHeaders && req.responseHeaders.date) {\n _this144.mainLoaded_ = Date.parse(req.responseHeaders.date);\n } else {\n _this144.mainLoaded_ = Date.now();\n }\n _this144.mainPlaylistLoader_.srcUrl = resolveManifestRedirect(_this144.mainPlaylistLoader_.srcUrl, req);\n if (mainChanged) {\n _this144.handleMain_();\n _this144.syncClientServerClock_(function () {\n return cb(req, mainChanged);\n });\n return;\n }\n return cb(req, mainChanged);\n });\n }\n /**\n * Parses the main xml for UTCTiming node to sync the client clock to the server\n * clock. If the UTCTiming node requires a HEAD or GET request, that request is made.\n *\n * @param {Function} done\n * Function to call when clock sync has completed\n */\n }, {\n key: \"syncClientServerClock_\",\n value: function syncClientServerClock_(done) {\n var _this145 = this;\n var utcTiming = parseUTCTiming(this.mainPlaylistLoader_.mainXml_); // No UTCTiming element found in the mpd. Use Date header from mpd request as the\n // server clock\n\n if (utcTiming === null) {\n this.mainPlaylistLoader_.clientOffset_ = this.mainLoaded_ - Date.now();\n return done();\n }\n if (utcTiming.method === 'DIRECT') {\n this.mainPlaylistLoader_.clientOffset_ = utcTiming.value - Date.now();\n return done();\n }\n this.request = this.vhs_.xhr({\n uri: resolveUrl(this.mainPlaylistLoader_.srcUrl, utcTiming.value),\n method: utcTiming.method,\n withCredentials: this.withCredentials\n }, function (error, req) {\n // disposed\n if (!_this145.request) {\n return;\n }\n if (error) {\n // sync request failed, fall back to using date header from mpd\n // TODO: log warning\n _this145.mainPlaylistLoader_.clientOffset_ = _this145.mainLoaded_ - Date.now();\n return done();\n }\n var serverTime;\n if (utcTiming.method === 'HEAD') {\n if (!req.responseHeaders || !req.responseHeaders.date) {\n // expected date header not preset, fall back to using date header from mpd\n // TODO: log warning\n serverTime = _this145.mainLoaded_;\n } else {\n serverTime = Date.parse(req.responseHeaders.date);\n }\n } else {\n serverTime = Date.parse(req.responseText);\n }\n _this145.mainPlaylistLoader_.clientOffset_ = serverTime - Date.now();\n done();\n });\n }\n }, {\n key: \"haveMain_\",\n value: function haveMain_() {\n this.state = 'HAVE_MAIN_MANIFEST';\n if (this.isMain_) {\n // We have the main playlist at this point, so\n // trigger this to allow PlaylistController\n // to make an initial playlist selection\n this.trigger('loadedplaylist');\n } else if (!this.media_) {\n // no media playlist was specifically selected so select\n // the one the child playlist loader was created with\n this.media(this.childPlaylist_);\n }\n }\n }, {\n key: \"handleMain_\",\n value: function handleMain_() {\n // clear media request\n this.mediaRequest_ = null;\n var oldMain = this.mainPlaylistLoader_.main;\n var newMain = parseMainXml({\n mainXml: this.mainPlaylistLoader_.mainXml_,\n srcUrl: this.mainPlaylistLoader_.srcUrl,\n clientOffset: this.mainPlaylistLoader_.clientOffset_,\n sidxMapping: this.mainPlaylistLoader_.sidxMapping_,\n previousManifest: oldMain\n }); // if we have an old main to compare the new main against\n\n if (oldMain) {\n newMain = updateMain(oldMain, newMain, this.mainPlaylistLoader_.sidxMapping_);\n } // only update main if we have a new main\n\n this.mainPlaylistLoader_.main = newMain ? newMain : oldMain;\n var location = this.mainPlaylistLoader_.main.locations && this.mainPlaylistLoader_.main.locations[0];\n if (location && location !== this.mainPlaylistLoader_.srcUrl) {\n this.mainPlaylistLoader_.srcUrl = location;\n }\n if (!oldMain || newMain && newMain.minimumUpdatePeriod !== oldMain.minimumUpdatePeriod) {\n this.updateMinimumUpdatePeriodTimeout_();\n }\n this.addEventStreamToMetadataTrack_(newMain);\n return Boolean(newMain);\n }\n }, {\n key: \"updateMinimumUpdatePeriodTimeout_\",\n value: function updateMinimumUpdatePeriodTimeout_() {\n var mpl = this.mainPlaylistLoader_; // cancel any pending creation of mup on media\n // a new one will be added if needed.\n\n if (mpl.createMupOnMedia_) {\n mpl.off('loadedmetadata', mpl.createMupOnMedia_);\n mpl.createMupOnMedia_ = null;\n } // clear any pending timeouts\n\n if (mpl.minimumUpdatePeriodTimeout_) {\n window$1.clearTimeout(mpl.minimumUpdatePeriodTimeout_);\n mpl.minimumUpdatePeriodTimeout_ = null;\n }\n var mup = mpl.main && mpl.main.minimumUpdatePeriod; // If the minimumUpdatePeriod has a value of 0, that indicates that the current\n // MPD has no future validity, so a new one will need to be acquired when new\n // media segments are to be made available. Thus, we use the target duration\n // in this case\n\n if (mup === 0) {\n if (mpl.media()) {\n mup = mpl.media().targetDuration * 1000;\n } else {\n mpl.createMupOnMedia_ = mpl.updateMinimumUpdatePeriodTimeout_;\n mpl.one('loadedmetadata', mpl.createMupOnMedia_);\n }\n } // if minimumUpdatePeriod is invalid or <= zero, which\n // can happen when a live video becomes VOD. skip timeout\n // creation.\n\n if (typeof mup !== 'number' || mup <= 0) {\n if (mup < 0) {\n this.logger_(\"found invalid minimumUpdatePeriod of \".concat(mup, \", not setting a timeout\"));\n }\n return;\n }\n this.createMUPTimeout_(mup);\n }\n }, {\n key: \"createMUPTimeout_\",\n value: function createMUPTimeout_(mup) {\n var mpl = this.mainPlaylistLoader_;\n mpl.minimumUpdatePeriodTimeout_ = window$1.setTimeout(function () {\n mpl.minimumUpdatePeriodTimeout_ = null;\n mpl.trigger('minimumUpdatePeriod');\n mpl.createMUPTimeout_(mup);\n }, mup);\n }\n /**\n * Sends request to refresh the main xml and updates the parsed main manifest\n */\n }, {\n key: \"refreshXml_\",\n value: function refreshXml_() {\n var _this146 = this;\n this.requestMain_(function (req, mainChanged) {\n if (!mainChanged) {\n return;\n }\n if (_this146.media_) {\n _this146.media_ = _this146.mainPlaylistLoader_.main.playlists[_this146.media_.id];\n } // This will filter out updated sidx info from the mapping\n\n _this146.mainPlaylistLoader_.sidxMapping_ = filterChangedSidxMappings(_this146.mainPlaylistLoader_.main, _this146.mainPlaylistLoader_.sidxMapping_);\n _this146.addSidxSegments_(_this146.media(), _this146.state, function (sidxChanged) {\n // TODO: do we need to reload the current playlist?\n _this146.refreshMedia_(_this146.media().id);\n });\n });\n }\n /**\n * Refreshes the media playlist by re-parsing the main xml and updating playlist\n * references. If this is an alternate loader, the updated parsed manifest is retrieved\n * from the main loader.\n */\n }, {\n key: \"refreshMedia_\",\n value: function refreshMedia_(mediaID) {\n var _this147 = this;\n if (!mediaID) {\n throw new Error('refreshMedia_ must take a media id');\n } // for main we have to reparse the main xml\n // to re-create segments based on current timing values\n // which may change media. We only skip updating the main manifest\n // if this is the first time this.media_ is being set.\n // as main was just parsed in that case.\n\n if (this.media_ && this.isMain_) {\n this.handleMain_();\n }\n var playlists = this.mainPlaylistLoader_.main.playlists;\n var mediaChanged = !this.media_ || this.media_ !== playlists[mediaID];\n if (mediaChanged) {\n this.media_ = playlists[mediaID];\n } else {\n this.trigger('playlistunchanged');\n }\n if (!this.mediaUpdateTimeout) {\n var createMediaUpdateTimeout = function createMediaUpdateTimeout() {\n if (_this147.media().endList) {\n return;\n }\n _this147.mediaUpdateTimeout = window$1.setTimeout(function () {\n _this147.trigger('mediaupdatetimeout');\n createMediaUpdateTimeout();\n }, refreshDelay(_this147.media(), Boolean(mediaChanged)));\n };\n createMediaUpdateTimeout();\n }\n this.trigger('loadedplaylist');\n }\n /**\n * Takes eventstream data from a parsed DASH manifest and adds it to the metadata text track.\n *\n * @param {manifest} newMain the newly parsed manifest\n */\n }, {\n key: \"addEventStreamToMetadataTrack_\",\n value: function addEventStreamToMetadataTrack_(newMain) {\n // Only add new event stream metadata if we have a new manifest.\n if (newMain && this.mainPlaylistLoader_.main.eventStream) {\n // convert EventStream to ID3-like data.\n var metadataArray = this.mainPlaylistLoader_.main.eventStream.map(function (eventStreamNode) {\n return {\n cueTime: eventStreamNode.start,\n frames: [{\n data: eventStreamNode.messageData\n }]\n };\n });\n this.addMetadataToTextTrack('EventStream', metadataArray, this.mainPlaylistLoader_.main.duration);\n }\n }\n }]);\n return DashPlaylistLoader;\n}(EventTarget);\nvar Config = {\n GOAL_BUFFER_LENGTH: 30,\n MAX_GOAL_BUFFER_LENGTH: 60,\n BACK_BUFFER_LENGTH: 30,\n GOAL_BUFFER_LENGTH_RATE: 1,\n // 0.5 MB/s\n INITIAL_BANDWIDTH: 4194304,\n // A fudge factor to apply to advertised playlist bitrates to account for\n // temporary flucations in client bandwidth\n BANDWIDTH_VARIANCE: 1.2,\n // How much of the buffer must be filled before we consider upswitching\n BUFFER_LOW_WATER_LINE: 0,\n MAX_BUFFER_LOW_WATER_LINE: 30,\n // TODO: Remove this when experimentalBufferBasedABR is removed\n EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE: 16,\n BUFFER_LOW_WATER_LINE_RATE: 1,\n // If the buffer is greater than the high water line, we won't switch down\n BUFFER_HIGH_WATER_LINE: 30\n};\nvar stringToArrayBuffer = function stringToArrayBuffer(string) {\n var view = new Uint8Array(new ArrayBuffer(string.length));\n for (var _i96 = 0; _i96 < string.length; _i96++) {\n view[_i96] = string.charCodeAt(_i96);\n }\n return view.buffer;\n};\n\n/* global Blob, BlobBuilder, Worker */\n// unify worker interface\nvar browserWorkerPolyFill = function browserWorkerPolyFill(workerObj) {\n // node only supports on/off\n workerObj.on = workerObj.addEventListener;\n workerObj.off = workerObj.removeEventListener;\n return workerObj;\n};\nvar createObjectURL = function createObjectURL(str) {\n try {\n return URL.createObjectURL(new Blob([str], {\n type: 'application/javascript'\n }));\n } catch (e) {\n var blob = new BlobBuilder();\n blob.append(str);\n return URL.createObjectURL(blob.getBlob());\n }\n};\nvar factory = function factory(code) {\n return function () {\n var objectUrl = createObjectURL(code);\n var worker = browserWorkerPolyFill(new Worker(objectUrl));\n worker.objURL = objectUrl;\n var terminate = worker.terminate;\n worker.on = worker.addEventListener;\n worker.off = worker.removeEventListener;\n worker.terminate = function () {\n URL.revokeObjectURL(objectUrl);\n return terminate.call(this);\n };\n return worker;\n };\n};\nvar transform = function transform(code) {\n return \"var browserWorkerPolyFill = \".concat(browserWorkerPolyFill.toString(), \";\\n\") + 'browserWorkerPolyFill(self);\\n' + code;\n};\nvar getWorkerString = function getWorkerString(fn) {\n return fn.toString().replace(/^function.+?{/, '').slice(0, -1);\n};\n\n/* rollup-plugin-worker-factory start for worker!/home/runner/work/http-streaming/http-streaming/src/transmuxer-worker.js */\nvar workerCode$1 = transform(getWorkerString(function () {\n var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * A lightweight readable stream implemention that handles event dispatching.\n * Objects that inherit from streams should call init in their constructors.\n */\n\n var Stream$8 = function Stream$8() {\n this.init = function () {\n var listeners = {};\n /**\n * Add a listener for a specified event type.\n * @param type {string} the event name\n * @param listener {function} the callback to be invoked when an event of\n * the specified type occurs\n */\n\n this.on = function (type, listener) {\n if (!listeners[type]) {\n listeners[type] = [];\n }\n listeners[type] = listeners[type].concat(listener);\n };\n /**\n * Remove a listener for a specified event type.\n * @param type {string} the event name\n * @param listener {function} a function previously registered for this\n * type of event through `on`\n */\n\n this.off = function (type, listener) {\n var index;\n if (!listeners[type]) {\n return false;\n }\n index = listeners[type].indexOf(listener);\n listeners[type] = listeners[type].slice();\n listeners[type].splice(index, 1);\n return index > -1;\n };\n /**\n * Trigger an event of the specified type on this stream. Any additional\n * arguments to this function are passed as parameters to event listeners.\n * @param type {string} the event name\n */\n\n this.trigger = function (type) {\n var callbacks, i, length, args;\n callbacks = listeners[type];\n if (!callbacks) {\n return;\n } // Slicing the arguments on every invocation of this method\n // can add a significant amount of overhead. Avoid the\n // intermediate object creation for the common case of a\n // single callback argument\n\n if (arguments.length === 2) {\n length = callbacks.length;\n for (i = 0; i < length; ++i) {\n callbacks[i].call(this, arguments[1]);\n }\n } else {\n args = [];\n i = arguments.length;\n for (i = 1; i < arguments.length; ++i) {\n args.push(arguments[i]);\n }\n length = callbacks.length;\n for (i = 0; i < length; ++i) {\n callbacks[i].apply(this, args);\n }\n }\n };\n /**\n * Destroys the stream and cleans up.\n */\n\n this.dispose = function () {\n listeners = {};\n };\n };\n };\n /**\n * Forwards all `data` events on this stream to the destination stream. The\n * destination stream should provide a method `push` to receive the data\n * events as they arrive.\n * @param destination {stream} the stream that will receive all `data` events\n * @param autoFlush {boolean} if false, we will not call `flush` on the destination\n * when the current stream emits a 'done' event\n * @see http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options\n */\n\n Stream$8.prototype.pipe = function (destination) {\n this.on('data', function (data) {\n destination.push(data);\n });\n this.on('done', function (flushSource) {\n destination.flush(flushSource);\n });\n this.on('partialdone', function (flushSource) {\n destination.partialFlush(flushSource);\n });\n this.on('endedtimeline', function (flushSource) {\n destination.endTimeline(flushSource);\n });\n this.on('reset', function (flushSource) {\n destination.reset(flushSource);\n });\n return destination;\n }; // Default stream functions that are expected to be overridden to perform\n // actual work. These are provided by the prototype as a sort of no-op\n // implementation so that we don't have to check for their existence in the\n // `pipe` function above.\n\n Stream$8.prototype.push = function (data) {\n this.trigger('data', data);\n };\n Stream$8.prototype.flush = function (flushSource) {\n this.trigger('done', flushSource);\n };\n Stream$8.prototype.partialFlush = function (flushSource) {\n this.trigger('partialdone', flushSource);\n };\n Stream$8.prototype.endTimeline = function (flushSource) {\n this.trigger('endedtimeline', flushSource);\n };\n Stream$8.prototype.reset = function (flushSource) {\n this.trigger('reset', flushSource);\n };\n var stream = Stream$8;\n var MAX_UINT32$1 = Math.pow(2, 32);\n var getUint64$3 = function getUint64$3(uint8) {\n var dv = new DataView(uint8.buffer, uint8.byteOffset, uint8.byteLength);\n var value;\n if (dv.getBigUint64) {\n value = dv.getBigUint64(0);\n if (value < Number.MAX_SAFE_INTEGER) {\n return Number(value);\n }\n return value;\n }\n return dv.getUint32(0) * MAX_UINT32$1 + dv.getUint32(4);\n };\n var numbers = {\n getUint64: getUint64$3,\n MAX_UINT32: MAX_UINT32$1\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Functions that generate fragmented MP4s suitable for use with Media\n * Source Extensions.\n */\n\n var MAX_UINT32 = numbers.MAX_UINT32;\n var box, dinf, esds, ftyp, mdat, mfhd, minf, moof, moov, mvex, mvhd, trak, tkhd, mdia, mdhd, hdlr, sdtp, stbl, stsd, traf, trex, trun$1, types, MAJOR_BRAND, MINOR_VERSION, AVC1_BRAND, VIDEO_HDLR, AUDIO_HDLR, HDLR_TYPES, VMHD, SMHD, DREF, STCO, STSC, STSZ, STTS; // pre-calculate constants\n\n (function () {\n var i;\n types = {\n avc1: [],\n // codingname\n avcC: [],\n btrt: [],\n dinf: [],\n dref: [],\n esds: [],\n ftyp: [],\n hdlr: [],\n mdat: [],\n mdhd: [],\n mdia: [],\n mfhd: [],\n minf: [],\n moof: [],\n moov: [],\n mp4a: [],\n // codingname\n mvex: [],\n mvhd: [],\n pasp: [],\n sdtp: [],\n smhd: [],\n stbl: [],\n stco: [],\n stsc: [],\n stsd: [],\n stsz: [],\n stts: [],\n styp: [],\n tfdt: [],\n tfhd: [],\n traf: [],\n trak: [],\n trun: [],\n trex: [],\n tkhd: [],\n vmhd: []\n }; // In environments where Uint8Array is undefined (e.g., IE8), skip set up so that we\n // don't throw an error\n\n if (typeof Uint8Array === 'undefined') {\n return;\n }\n for (i in types) {\n if (types.hasOwnProperty(i)) {\n types[i] = [i.charCodeAt(0), i.charCodeAt(1), i.charCodeAt(2), i.charCodeAt(3)];\n }\n }\n MAJOR_BRAND = new Uint8Array(['i'.charCodeAt(0), 's'.charCodeAt(0), 'o'.charCodeAt(0), 'm'.charCodeAt(0)]);\n AVC1_BRAND = new Uint8Array(['a'.charCodeAt(0), 'v'.charCodeAt(0), 'c'.charCodeAt(0), '1'.charCodeAt(0)]);\n MINOR_VERSION = new Uint8Array([0, 0, 0, 1]);\n VIDEO_HDLR = new Uint8Array([0x00,\n // version 0\n 0x00, 0x00, 0x00,\n // flags\n 0x00, 0x00, 0x00, 0x00,\n // pre_defined\n 0x76, 0x69, 0x64, 0x65,\n // handler_type: 'vide'\n 0x00, 0x00, 0x00, 0x00,\n // reserved\n 0x00, 0x00, 0x00, 0x00,\n // reserved\n 0x00, 0x00, 0x00, 0x00,\n // reserved\n 0x56, 0x69, 0x64, 0x65, 0x6f, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x00 // name: 'VideoHandler'\n ]);\n AUDIO_HDLR = new Uint8Array([0x00,\n // version 0\n 0x00, 0x00, 0x00,\n // flags\n 0x00, 0x00, 0x00, 0x00,\n // pre_defined\n 0x73, 0x6f, 0x75, 0x6e,\n // handler_type: 'soun'\n 0x00, 0x00, 0x00, 0x00,\n // reserved\n 0x00, 0x00, 0x00, 0x00,\n // reserved\n 0x00, 0x00, 0x00, 0x00,\n // reserved\n 0x53, 0x6f, 0x75, 0x6e, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x00 // name: 'SoundHandler'\n ]);\n HDLR_TYPES = {\n video: VIDEO_HDLR,\n audio: AUDIO_HDLR\n };\n DREF = new Uint8Array([0x00,\n // version 0\n 0x00, 0x00, 0x00,\n // flags\n 0x00, 0x00, 0x00, 0x01,\n // entry_count\n 0x00, 0x00, 0x00, 0x0c,\n // entry_size\n 0x75, 0x72, 0x6c, 0x20,\n // 'url' type\n 0x00,\n // version 0\n 0x00, 0x00, 0x01 // entry_flags\n ]);\n SMHD = new Uint8Array([0x00,\n // version\n 0x00, 0x00, 0x00,\n // flags\n 0x00, 0x00,\n // balance, 0 means centered\n 0x00, 0x00 // reserved\n ]);\n STCO = new Uint8Array([0x00,\n // version\n 0x00, 0x00, 0x00,\n // flags\n 0x00, 0x00, 0x00, 0x00 // entry_count\n ]);\n STSC = STCO;\n STSZ = new Uint8Array([0x00,\n // version\n 0x00, 0x00, 0x00,\n // flags\n 0x00, 0x00, 0x00, 0x00,\n // sample_size\n 0x00, 0x00, 0x00, 0x00 // sample_count\n ]);\n STTS = STCO;\n VMHD = new Uint8Array([0x00,\n // version\n 0x00, 0x00, 0x01,\n // flags\n 0x00, 0x00,\n // graphicsmode\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // opcolor\n ]);\n })();\n box = function box(type) {\n var payload = [],\n size = 0,\n i,\n result,\n view;\n for (i = 1; i < arguments.length; i++) {\n payload.push(arguments[i]);\n }\n i = payload.length; // calculate the total size we need to allocate\n\n while (i--) {\n size += payload[i].byteLength;\n }\n result = new Uint8Array(size + 8);\n view = new DataView(result.buffer, result.byteOffset, result.byteLength);\n view.setUint32(0, result.byteLength);\n result.set(type, 4); // copy the payload into the result\n\n for (i = 0, size = 8; i < payload.length; i++) {\n result.set(payload[i], size);\n size += payload[i].byteLength;\n }\n return result;\n };\n dinf = function dinf() {\n return box(types.dinf, box(types.dref, DREF));\n };\n esds = function esds(track) {\n return box(types.esds, new Uint8Array([0x00,\n // version\n 0x00, 0x00, 0x00,\n // flags\n // ES_Descriptor\n 0x03,\n // tag, ES_DescrTag\n 0x19,\n // length\n 0x00, 0x00,\n // ES_ID\n 0x00,\n // streamDependenceFlag, URL_flag, reserved, streamPriority\n // DecoderConfigDescriptor\n 0x04,\n // tag, DecoderConfigDescrTag\n 0x11,\n // length\n 0x40,\n // object type\n 0x15,\n // streamType\n 0x00, 0x06, 0x00,\n // bufferSizeDB\n 0x00, 0x00, 0xda, 0xc0,\n // maxBitrate\n 0x00, 0x00, 0xda, 0xc0,\n // avgBitrate\n // DecoderSpecificInfo\n 0x05,\n // tag, DecoderSpecificInfoTag\n 0x02,\n // length\n // ISO/IEC 14496-3, AudioSpecificConfig\n // for samplingFrequencyIndex see ISO/IEC 13818-7:2006, 8.1.3.2.2, Table 35\n track.audioobjecttype << 3 | track.samplingfrequencyindex >>> 1, track.samplingfrequencyindex << 7 | track.channelcount << 3, 0x06, 0x01, 0x02 // GASpecificConfig\n ]));\n };\n ftyp = function ftyp() {\n return box(types.ftyp, MAJOR_BRAND, MINOR_VERSION, MAJOR_BRAND, AVC1_BRAND);\n };\n hdlr = function hdlr(type) {\n return box(types.hdlr, HDLR_TYPES[type]);\n };\n mdat = function mdat(data) {\n return box(types.mdat, data);\n };\n mdhd = function mdhd(track) {\n var result = new Uint8Array([0x00,\n // version 0\n 0x00, 0x00, 0x00,\n // flags\n 0x00, 0x00, 0x00, 0x02,\n // creation_time\n 0x00, 0x00, 0x00, 0x03,\n // modification_time\n 0x00, 0x01, 0x5f, 0x90,\n // timescale, 90,000 \"ticks\" per second\n track.duration >>> 24 & 0xFF, track.duration >>> 16 & 0xFF, track.duration >>> 8 & 0xFF, track.duration & 0xFF,\n // duration\n 0x55, 0xc4,\n // 'und' language (undetermined)\n 0x00, 0x00]); // Use the sample rate from the track metadata, when it is\n // defined. The sample rate can be parsed out of an ADTS header, for\n // instance.\n\n if (track.samplerate) {\n result[12] = track.samplerate >>> 24 & 0xFF;\n result[13] = track.samplerate >>> 16 & 0xFF;\n result[14] = track.samplerate >>> 8 & 0xFF;\n result[15] = track.samplerate & 0xFF;\n }\n return box(types.mdhd, result);\n };\n mdia = function mdia(track) {\n return box(types.mdia, mdhd(track), hdlr(track.type), minf(track));\n };\n mfhd = function mfhd(sequenceNumber) {\n return box(types.mfhd, new Uint8Array([0x00, 0x00, 0x00, 0x00,\n // flags\n (sequenceNumber & 0xFF000000) >> 24, (sequenceNumber & 0xFF0000) >> 16, (sequenceNumber & 0xFF00) >> 8, sequenceNumber & 0xFF // sequence_number\n ]));\n };\n minf = function minf(track) {\n return box(types.minf, track.type === 'video' ? box(types.vmhd, VMHD) : box(types.smhd, SMHD), dinf(), stbl(track));\n };\n moof = function moof(sequenceNumber, tracks) {\n var trackFragments = [],\n i = tracks.length; // build traf boxes for each track fragment\n\n while (i--) {\n trackFragments[i] = traf(tracks[i]);\n }\n return box.apply(null, [types.moof, mfhd(sequenceNumber)].concat(trackFragments));\n };\n /**\n * Returns a movie box.\n * @param tracks {array} the tracks associated with this movie\n * @see ISO/IEC 14496-12:2012(E), section 8.2.1\n */\n\n moov = function moov(tracks) {\n var i = tracks.length,\n boxes = [];\n while (i--) {\n boxes[i] = trak(tracks[i]);\n }\n return box.apply(null, [types.moov, mvhd(0xffffffff)].concat(boxes).concat(mvex(tracks)));\n };\n mvex = function mvex(tracks) {\n var i = tracks.length,\n boxes = [];\n while (i--) {\n boxes[i] = trex(tracks[i]);\n }\n return box.apply(null, [types.mvex].concat(boxes));\n };\n mvhd = function mvhd(duration) {\n var bytes = new Uint8Array([0x00,\n // version 0\n 0x00, 0x00, 0x00,\n // flags\n 0x00, 0x00, 0x00, 0x01,\n // creation_time\n 0x00, 0x00, 0x00, 0x02,\n // modification_time\n 0x00, 0x01, 0x5f, 0x90,\n // timescale, 90,000 \"ticks\" per second\n (duration & 0xFF000000) >> 24, (duration & 0xFF0000) >> 16, (duration & 0xFF00) >> 8, duration & 0xFF,\n // duration\n 0x00, 0x01, 0x00, 0x00,\n // 1.0 rate\n 0x01, 0x00,\n // 1.0 volume\n 0x00, 0x00,\n // reserved\n 0x00, 0x00, 0x00, 0x00,\n // reserved\n 0x00, 0x00, 0x00, 0x00,\n // reserved\n 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,\n // transformation: unity matrix\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n // pre_defined\n 0xff, 0xff, 0xff, 0xff // next_track_ID\n ]);\n return box(types.mvhd, bytes);\n };\n sdtp = function sdtp(track) {\n var samples = track.samples || [],\n bytes = new Uint8Array(4 + samples.length),\n flags,\n i; // leave the full box header (4 bytes) all zero\n // write the sample table\n\n for (i = 0; i < samples.length; i++) {\n flags = samples[i].flags;\n bytes[i + 4] = flags.dependsOn << 4 | flags.isDependedOn << 2 | flags.hasRedundancy;\n }\n return box(types.sdtp, bytes);\n };\n stbl = function stbl(track) {\n return box(types.stbl, stsd(track), box(types.stts, STTS), box(types.stsc, STSC), box(types.stsz, STSZ), box(types.stco, STCO));\n };\n (function () {\n var videoSample, audioSample;\n stsd = function stsd(track) {\n return box(types.stsd, new Uint8Array([0x00,\n // version 0\n 0x00, 0x00, 0x00,\n // flags\n 0x00, 0x00, 0x00, 0x01]), track.type === 'video' ? videoSample(track) : audioSample(track));\n };\n videoSample = function videoSample(track) {\n var sps = track.sps || [],\n pps = track.pps || [],\n sequenceParameterSets = [],\n pictureParameterSets = [],\n i,\n avc1Box; // assemble the SPSs\n\n for (i = 0; i < sps.length; i++) {\n sequenceParameterSets.push((sps[i].byteLength & 0xFF00) >>> 8);\n sequenceParameterSets.push(sps[i].byteLength & 0xFF); // sequenceParameterSetLength\n\n sequenceParameterSets = sequenceParameterSets.concat(Array.prototype.slice.call(sps[i])); // SPS\n } // assemble the PPSs\n\n for (i = 0; i < pps.length; i++) {\n pictureParameterSets.push((pps[i].byteLength & 0xFF00) >>> 8);\n pictureParameterSets.push(pps[i].byteLength & 0xFF);\n pictureParameterSets = pictureParameterSets.concat(Array.prototype.slice.call(pps[i]));\n }\n avc1Box = [types.avc1, new Uint8Array([0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n // reserved\n 0x00, 0x01,\n // data_reference_index\n 0x00, 0x00,\n // pre_defined\n 0x00, 0x00,\n // reserved\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n // pre_defined\n (track.width & 0xff00) >> 8, track.width & 0xff,\n // width\n (track.height & 0xff00) >> 8, track.height & 0xff,\n // height\n 0x00, 0x48, 0x00, 0x00,\n // horizresolution\n 0x00, 0x48, 0x00, 0x00,\n // vertresolution\n 0x00, 0x00, 0x00, 0x00,\n // reserved\n 0x00, 0x01,\n // frame_count\n 0x13, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x6a, 0x73, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x2d, 0x68, 0x6c, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n // compressorname\n 0x00, 0x18,\n // depth = 24\n 0x11, 0x11 // pre_defined = -1\n ]), box(types.avcC, new Uint8Array([0x01,\n // configurationVersion\n track.profileIdc,\n // AVCProfileIndication\n track.profileCompatibility,\n // profile_compatibility\n track.levelIdc,\n // AVCLevelIndication\n 0xff // lengthSizeMinusOne, hard-coded to 4 bytes\n ].concat([sps.length],\n // numOfSequenceParameterSets\n sequenceParameterSets,\n // \"SPS\"\n [pps.length],\n // numOfPictureParameterSets\n pictureParameterSets // \"PPS\"\n ))), box(types.btrt, new Uint8Array([0x00, 0x1c, 0x9c, 0x80,\n // bufferSizeDB\n 0x00, 0x2d, 0xc6, 0xc0,\n // maxBitrate\n 0x00, 0x2d, 0xc6, 0xc0 // avgBitrate\n ]))];\n if (track.sarRatio) {\n var hSpacing = track.sarRatio[0],\n vSpacing = track.sarRatio[1];\n avc1Box.push(box(types.pasp, new Uint8Array([(hSpacing & 0xFF000000) >> 24, (hSpacing & 0xFF0000) >> 16, (hSpacing & 0xFF00) >> 8, hSpacing & 0xFF, (vSpacing & 0xFF000000) >> 24, (vSpacing & 0xFF0000) >> 16, (vSpacing & 0xFF00) >> 8, vSpacing & 0xFF])));\n }\n return box.apply(null, avc1Box);\n };\n audioSample = function audioSample(track) {\n return box(types.mp4a, new Uint8Array([\n // SampleEntry, ISO/IEC 14496-12\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n // reserved\n 0x00, 0x01,\n // data_reference_index\n // AudioSampleEntry, ISO/IEC 14496-12\n 0x00, 0x00, 0x00, 0x00,\n // reserved\n 0x00, 0x00, 0x00, 0x00,\n // reserved\n (track.channelcount & 0xff00) >> 8, track.channelcount & 0xff,\n // channelcount\n (track.samplesize & 0xff00) >> 8, track.samplesize & 0xff,\n // samplesize\n 0x00, 0x00,\n // pre_defined\n 0x00, 0x00,\n // reserved\n (track.samplerate & 0xff00) >> 8, track.samplerate & 0xff, 0x00, 0x00 // samplerate, 16.16\n // MP4AudioSampleEntry, ISO/IEC 14496-14\n ]), esds(track));\n };\n })();\n tkhd = function tkhd(track) {\n var result = new Uint8Array([0x00,\n // version 0\n 0x00, 0x00, 0x07,\n // flags\n 0x00, 0x00, 0x00, 0x00,\n // creation_time\n 0x00, 0x00, 0x00, 0x00,\n // modification_time\n (track.id & 0xFF000000) >> 24, (track.id & 0xFF0000) >> 16, (track.id & 0xFF00) >> 8, track.id & 0xFF,\n // track_ID\n 0x00, 0x00, 0x00, 0x00,\n // reserved\n (track.duration & 0xFF000000) >> 24, (track.duration & 0xFF0000) >> 16, (track.duration & 0xFF00) >> 8, track.duration & 0xFF,\n // duration\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n // reserved\n 0x00, 0x00,\n // layer\n 0x00, 0x00,\n // alternate_group\n 0x01, 0x00,\n // non-audio track volume\n 0x00, 0x00,\n // reserved\n 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,\n // transformation: unity matrix\n (track.width & 0xFF00) >> 8, track.width & 0xFF, 0x00, 0x00,\n // width\n (track.height & 0xFF00) >> 8, track.height & 0xFF, 0x00, 0x00 // height\n ]);\n return box(types.tkhd, result);\n };\n /**\n * Generate a track fragment (traf) box. A traf box collects metadata\n * about tracks in a movie fragment (moof) box.\n */\n\n traf = function traf(track) {\n var trackFragmentHeader, trackFragmentDecodeTime, trackFragmentRun, sampleDependencyTable, dataOffset, upperWordBaseMediaDecodeTime, lowerWordBaseMediaDecodeTime;\n trackFragmentHeader = box(types.tfhd, new Uint8Array([0x00,\n // version 0\n 0x00, 0x00, 0x3a,\n // flags\n (track.id & 0xFF000000) >> 24, (track.id & 0xFF0000) >> 16, (track.id & 0xFF00) >> 8, track.id & 0xFF,\n // track_ID\n 0x00, 0x00, 0x00, 0x01,\n // sample_description_index\n 0x00, 0x00, 0x00, 0x00,\n // default_sample_duration\n 0x00, 0x00, 0x00, 0x00,\n // default_sample_size\n 0x00, 0x00, 0x00, 0x00 // default_sample_flags\n ]));\n upperWordBaseMediaDecodeTime = Math.floor(track.baseMediaDecodeTime / MAX_UINT32);\n lowerWordBaseMediaDecodeTime = Math.floor(track.baseMediaDecodeTime % MAX_UINT32);\n trackFragmentDecodeTime = box(types.tfdt, new Uint8Array([0x01,\n // version 1\n 0x00, 0x00, 0x00,\n // flags\n // baseMediaDecodeTime\n upperWordBaseMediaDecodeTime >>> 24 & 0xFF, upperWordBaseMediaDecodeTime >>> 16 & 0xFF, upperWordBaseMediaDecodeTime >>> 8 & 0xFF, upperWordBaseMediaDecodeTime & 0xFF, lowerWordBaseMediaDecodeTime >>> 24 & 0xFF, lowerWordBaseMediaDecodeTime >>> 16 & 0xFF, lowerWordBaseMediaDecodeTime >>> 8 & 0xFF, lowerWordBaseMediaDecodeTime & 0xFF])); // the data offset specifies the number of bytes from the start of\n // the containing moof to the first payload byte of the associated\n // mdat\n\n dataOffset = 32 +\n // tfhd\n 20 +\n // tfdt\n 8 +\n // traf header\n 16 +\n // mfhd\n 8 +\n // moof header\n 8; // mdat header\n // audio tracks require less metadata\n\n if (track.type === 'audio') {\n trackFragmentRun = trun$1(track, dataOffset);\n return box(types.traf, trackFragmentHeader, trackFragmentDecodeTime, trackFragmentRun);\n } // video tracks should contain an independent and disposable samples\n // box (sdtp)\n // generate one and adjust offsets to match\n\n sampleDependencyTable = sdtp(track);\n trackFragmentRun = trun$1(track, sampleDependencyTable.length + dataOffset);\n return box(types.traf, trackFragmentHeader, trackFragmentDecodeTime, trackFragmentRun, sampleDependencyTable);\n };\n /**\n * Generate a track box.\n * @param track {object} a track definition\n * @return {Uint8Array} the track box\n */\n\n trak = function trak(track) {\n track.duration = track.duration || 0xffffffff;\n return box(types.trak, tkhd(track), mdia(track));\n };\n trex = function trex(track) {\n var result = new Uint8Array([0x00,\n // version 0\n 0x00, 0x00, 0x00,\n // flags\n (track.id & 0xFF000000) >> 24, (track.id & 0xFF0000) >> 16, (track.id & 0xFF00) >> 8, track.id & 0xFF,\n // track_ID\n 0x00, 0x00, 0x00, 0x01,\n // default_sample_description_index\n 0x00, 0x00, 0x00, 0x00,\n // default_sample_duration\n 0x00, 0x00, 0x00, 0x00,\n // default_sample_size\n 0x00, 0x01, 0x00, 0x01 // default_sample_flags\n ]); // the last two bytes of default_sample_flags is the sample\n // degradation priority, a hint about the importance of this sample\n // relative to others. Lower the degradation priority for all sample\n // types other than video.\n\n if (track.type !== 'video') {\n result[result.length - 1] = 0x00;\n }\n return box(types.trex, result);\n };\n (function () {\n var audioTrun, videoTrun, trunHeader; // This method assumes all samples are uniform. That is, if a\n // duration is present for the first sample, it will be present for\n // all subsequent samples.\n // see ISO/IEC 14496-12:2012, Section 8.8.8.1\n\n trunHeader = function trunHeader(samples, offset) {\n var durationPresent = 0,\n sizePresent = 0,\n flagsPresent = 0,\n compositionTimeOffset = 0; // trun flag constants\n\n if (samples.length) {\n if (samples[0].duration !== undefined) {\n durationPresent = 0x1;\n }\n if (samples[0].size !== undefined) {\n sizePresent = 0x2;\n }\n if (samples[0].flags !== undefined) {\n flagsPresent = 0x4;\n }\n if (samples[0].compositionTimeOffset !== undefined) {\n compositionTimeOffset = 0x8;\n }\n }\n return [0x00,\n // version 0\n 0x00, durationPresent | sizePresent | flagsPresent | compositionTimeOffset, 0x01,\n // flags\n (samples.length & 0xFF000000) >>> 24, (samples.length & 0xFF0000) >>> 16, (samples.length & 0xFF00) >>> 8, samples.length & 0xFF,\n // sample_count\n (offset & 0xFF000000) >>> 24, (offset & 0xFF0000) >>> 16, (offset & 0xFF00) >>> 8, offset & 0xFF // data_offset\n ];\n };\n videoTrun = function videoTrun(track, offset) {\n var bytesOffest, bytes, header, samples, sample, i;\n samples = track.samples || [];\n offset += 8 + 12 + 16 * samples.length;\n header = trunHeader(samples, offset);\n bytes = new Uint8Array(header.length + samples.length * 16);\n bytes.set(header);\n bytesOffest = header.length;\n for (i = 0; i < samples.length; i++) {\n sample = samples[i];\n bytes[bytesOffest++] = (sample.duration & 0xFF000000) >>> 24;\n bytes[bytesOffest++] = (sample.duration & 0xFF0000) >>> 16;\n bytes[bytesOffest++] = (sample.duration & 0xFF00) >>> 8;\n bytes[bytesOffest++] = sample.duration & 0xFF; // sample_duration\n\n bytes[bytesOffest++] = (sample.size & 0xFF000000) >>> 24;\n bytes[bytesOffest++] = (sample.size & 0xFF0000) >>> 16;\n bytes[bytesOffest++] = (sample.size & 0xFF00) >>> 8;\n bytes[bytesOffest++] = sample.size & 0xFF; // sample_size\n\n bytes[bytesOffest++] = sample.flags.isLeading << 2 | sample.flags.dependsOn;\n bytes[bytesOffest++] = sample.flags.isDependedOn << 6 | sample.flags.hasRedundancy << 4 | sample.flags.paddingValue << 1 | sample.flags.isNonSyncSample;\n bytes[bytesOffest++] = sample.flags.degradationPriority & 0xF0 << 8;\n bytes[bytesOffest++] = sample.flags.degradationPriority & 0x0F; // sample_flags\n\n bytes[bytesOffest++] = (sample.compositionTimeOffset & 0xFF000000) >>> 24;\n bytes[bytesOffest++] = (sample.compositionTimeOffset & 0xFF0000) >>> 16;\n bytes[bytesOffest++] = (sample.compositionTimeOffset & 0xFF00) >>> 8;\n bytes[bytesOffest++] = sample.compositionTimeOffset & 0xFF; // sample_composition_time_offset\n }\n return box(types.trun, bytes);\n };\n audioTrun = function audioTrun(track, offset) {\n var bytes, bytesOffest, header, samples, sample, i;\n samples = track.samples || [];\n offset += 8 + 12 + 8 * samples.length;\n header = trunHeader(samples, offset);\n bytes = new Uint8Array(header.length + samples.length * 8);\n bytes.set(header);\n bytesOffest = header.length;\n for (i = 0; i < samples.length; i++) {\n sample = samples[i];\n bytes[bytesOffest++] = (sample.duration & 0xFF000000) >>> 24;\n bytes[bytesOffest++] = (sample.duration & 0xFF0000) >>> 16;\n bytes[bytesOffest++] = (sample.duration & 0xFF00) >>> 8;\n bytes[bytesOffest++] = sample.duration & 0xFF; // sample_duration\n\n bytes[bytesOffest++] = (sample.size & 0xFF000000) >>> 24;\n bytes[bytesOffest++] = (sample.size & 0xFF0000) >>> 16;\n bytes[bytesOffest++] = (sample.size & 0xFF00) >>> 8;\n bytes[bytesOffest++] = sample.size & 0xFF; // sample_size\n }\n return box(types.trun, bytes);\n };\n trun$1 = function trun$1(track, offset) {\n if (track.type === 'audio') {\n return audioTrun(track, offset);\n }\n return videoTrun(track, offset);\n };\n })();\n var mp4Generator = {\n ftyp: ftyp,\n mdat: mdat,\n moof: moof,\n moov: moov,\n initSegment: function initSegment(tracks) {\n var fileType = ftyp(),\n movie = moov(tracks),\n result;\n result = new Uint8Array(fileType.byteLength + movie.byteLength);\n result.set(fileType);\n result.set(movie, fileType.byteLength);\n return result;\n }\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n */\n // composed of the nal units that make up that frame\n // Also keep track of cummulative data about the frame from the nal units such\n // as the frame duration, starting pts, etc.\n\n var groupNalsIntoFrames = function groupNalsIntoFrames(nalUnits) {\n var i,\n currentNal,\n currentFrame = [],\n frames = []; // TODO added for LHLS, make sure this is OK\n\n frames.byteLength = 0;\n frames.nalCount = 0;\n frames.duration = 0;\n currentFrame.byteLength = 0;\n for (i = 0; i < nalUnits.length; i++) {\n currentNal = nalUnits[i]; // Split on 'aud'-type nal units\n\n if (currentNal.nalUnitType === 'access_unit_delimiter_rbsp') {\n // Since the very first nal unit is expected to be an AUD\n // only push to the frames array when currentFrame is not empty\n if (currentFrame.length) {\n currentFrame.duration = currentNal.dts - currentFrame.dts; // TODO added for LHLS, make sure this is OK\n\n frames.byteLength += currentFrame.byteLength;\n frames.nalCount += currentFrame.length;\n frames.duration += currentFrame.duration;\n frames.push(currentFrame);\n }\n currentFrame = [currentNal];\n currentFrame.byteLength = currentNal.data.byteLength;\n currentFrame.pts = currentNal.pts;\n currentFrame.dts = currentNal.dts;\n } else {\n // Specifically flag key frames for ease of use later\n if (currentNal.nalUnitType === 'slice_layer_without_partitioning_rbsp_idr') {\n currentFrame.keyFrame = true;\n }\n currentFrame.duration = currentNal.dts - currentFrame.dts;\n currentFrame.byteLength += currentNal.data.byteLength;\n currentFrame.push(currentNal);\n }\n } // For the last frame, use the duration of the previous frame if we\n // have nothing better to go on\n\n if (frames.length && (!currentFrame.duration || currentFrame.duration <= 0)) {\n currentFrame.duration = frames[frames.length - 1].duration;\n } // Push the final frame\n // TODO added for LHLS, make sure this is OK\n\n frames.byteLength += currentFrame.byteLength;\n frames.nalCount += currentFrame.length;\n frames.duration += currentFrame.duration;\n frames.push(currentFrame);\n return frames;\n }; // Convert an array of frames into an array of Gop with each Gop being composed\n // of the frames that make up that Gop\n // Also keep track of cummulative data about the Gop from the frames such as the\n // Gop duration, starting pts, etc.\n\n var groupFramesIntoGops = function groupFramesIntoGops(frames) {\n var i,\n currentFrame,\n currentGop = [],\n gops = []; // We must pre-set some of the values on the Gop since we\n // keep running totals of these values\n\n currentGop.byteLength = 0;\n currentGop.nalCount = 0;\n currentGop.duration = 0;\n currentGop.pts = frames[0].pts;\n currentGop.dts = frames[0].dts; // store some metadata about all the Gops\n\n gops.byteLength = 0;\n gops.nalCount = 0;\n gops.duration = 0;\n gops.pts = frames[0].pts;\n gops.dts = frames[0].dts;\n for (i = 0; i < frames.length; i++) {\n currentFrame = frames[i];\n if (currentFrame.keyFrame) {\n // Since the very first frame is expected to be an keyframe\n // only push to the gops array when currentGop is not empty\n if (currentGop.length) {\n gops.push(currentGop);\n gops.byteLength += currentGop.byteLength;\n gops.nalCount += currentGop.nalCount;\n gops.duration += currentGop.duration;\n }\n currentGop = [currentFrame];\n currentGop.nalCount = currentFrame.length;\n currentGop.byteLength = currentFrame.byteLength;\n currentGop.pts = currentFrame.pts;\n currentGop.dts = currentFrame.dts;\n currentGop.duration = currentFrame.duration;\n } else {\n currentGop.duration += currentFrame.duration;\n currentGop.nalCount += currentFrame.length;\n currentGop.byteLength += currentFrame.byteLength;\n currentGop.push(currentFrame);\n }\n }\n if (gops.length && currentGop.duration <= 0) {\n currentGop.duration = gops[gops.length - 1].duration;\n }\n gops.byteLength += currentGop.byteLength;\n gops.nalCount += currentGop.nalCount;\n gops.duration += currentGop.duration; // push the final Gop\n\n gops.push(currentGop);\n return gops;\n };\n /*\n * Search for the first keyframe in the GOPs and throw away all frames\n * until that keyframe. Then extend the duration of the pulled keyframe\n * and pull the PTS and DTS of the keyframe so that it covers the time\n * range of the frames that were disposed.\n *\n * @param {Array} gops video GOPs\n * @returns {Array} modified video GOPs\n */\n\n var extendFirstKeyFrame = function extendFirstKeyFrame(gops) {\n var currentGop;\n if (!gops[0][0].keyFrame && gops.length > 1) {\n // Remove the first GOP\n currentGop = gops.shift();\n gops.byteLength -= currentGop.byteLength;\n gops.nalCount -= currentGop.nalCount; // Extend the first frame of what is now the\n // first gop to cover the time period of the\n // frames we just removed\n\n gops[0][0].dts = currentGop.dts;\n gops[0][0].pts = currentGop.pts;\n gops[0][0].duration += currentGop.duration;\n }\n return gops;\n };\n /**\n * Default sample object\n * see ISO/IEC 14496-12:2012, section 8.6.4.3\n */\n\n var createDefaultSample = function createDefaultSample() {\n return {\n size: 0,\n flags: {\n isLeading: 0,\n dependsOn: 1,\n isDependedOn: 0,\n hasRedundancy: 0,\n degradationPriority: 0,\n isNonSyncSample: 1\n }\n };\n };\n /*\n * Collates information from a video frame into an object for eventual\n * entry into an MP4 sample table.\n *\n * @param {Object} frame the video frame\n * @param {Number} dataOffset the byte offset to position the sample\n * @return {Object} object containing sample table info for a frame\n */\n\n var sampleForFrame = function sampleForFrame(frame, dataOffset) {\n var sample = createDefaultSample();\n sample.dataOffset = dataOffset;\n sample.compositionTimeOffset = frame.pts - frame.dts;\n sample.duration = frame.duration;\n sample.size = 4 * frame.length; // Space for nal unit size\n\n sample.size += frame.byteLength;\n if (frame.keyFrame) {\n sample.flags.dependsOn = 2;\n sample.flags.isNonSyncSample = 0;\n }\n return sample;\n }; // generate the track's sample table from an array of gops\n\n var generateSampleTable$1 = function generateSampleTable$1(gops, baseDataOffset) {\n var h,\n i,\n sample,\n currentGop,\n currentFrame,\n dataOffset = baseDataOffset || 0,\n samples = [];\n for (h = 0; h < gops.length; h++) {\n currentGop = gops[h];\n for (i = 0; i < currentGop.length; i++) {\n currentFrame = currentGop[i];\n sample = sampleForFrame(currentFrame, dataOffset);\n dataOffset += sample.size;\n samples.push(sample);\n }\n }\n return samples;\n }; // generate the track's raw mdat data from an array of gops\n\n var concatenateNalData = function concatenateNalData(gops) {\n var h,\n i,\n j,\n currentGop,\n currentFrame,\n currentNal,\n dataOffset = 0,\n nalsByteLength = gops.byteLength,\n numberOfNals = gops.nalCount,\n totalByteLength = nalsByteLength + 4 * numberOfNals,\n data = new Uint8Array(totalByteLength),\n view = new DataView(data.buffer); // For each Gop..\n\n for (h = 0; h < gops.length; h++) {\n currentGop = gops[h]; // For each Frame..\n\n for (i = 0; i < currentGop.length; i++) {\n currentFrame = currentGop[i]; // For each NAL..\n\n for (j = 0; j < currentFrame.length; j++) {\n currentNal = currentFrame[j];\n view.setUint32(dataOffset, currentNal.data.byteLength);\n dataOffset += 4;\n data.set(currentNal.data, dataOffset);\n dataOffset += currentNal.data.byteLength;\n }\n }\n }\n return data;\n }; // generate the track's sample table from a frame\n\n var generateSampleTableForFrame = function generateSampleTableForFrame(frame, baseDataOffset) {\n var sample,\n dataOffset = baseDataOffset || 0,\n samples = [];\n sample = sampleForFrame(frame, dataOffset);\n samples.push(sample);\n return samples;\n }; // generate the track's raw mdat data from a frame\n\n var concatenateNalDataForFrame = function concatenateNalDataForFrame(frame) {\n var i,\n currentNal,\n dataOffset = 0,\n nalsByteLength = frame.byteLength,\n numberOfNals = frame.length,\n totalByteLength = nalsByteLength + 4 * numberOfNals,\n data = new Uint8Array(totalByteLength),\n view = new DataView(data.buffer); // For each NAL..\n\n for (i = 0; i < frame.length; i++) {\n currentNal = frame[i];\n view.setUint32(dataOffset, currentNal.data.byteLength);\n dataOffset += 4;\n data.set(currentNal.data, dataOffset);\n dataOffset += currentNal.data.byteLength;\n }\n return data;\n };\n var frameUtils$1 = {\n groupNalsIntoFrames: groupNalsIntoFrames,\n groupFramesIntoGops: groupFramesIntoGops,\n extendFirstKeyFrame: extendFirstKeyFrame,\n generateSampleTable: generateSampleTable$1,\n concatenateNalData: concatenateNalData,\n generateSampleTableForFrame: generateSampleTableForFrame,\n concatenateNalDataForFrame: concatenateNalDataForFrame\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n */\n\n var highPrefix = [33, 16, 5, 32, 164, 27];\n var lowPrefix = [33, 65, 108, 84, 1, 2, 4, 8, 168, 2, 4, 8, 17, 191, 252];\n var zeroFill = function zeroFill(count) {\n var a = [];\n while (count--) {\n a.push(0);\n }\n return a;\n };\n var makeTable = function makeTable(metaTable) {\n return Object.keys(metaTable).reduce(function (obj, key) {\n obj[key] = new Uint8Array(metaTable[key].reduce(function (arr, part) {\n return arr.concat(part);\n }, []));\n return obj;\n }, {});\n };\n var silence;\n var silence_1 = function silence_1() {\n if (!silence) {\n // Frames-of-silence to use for filling in missing AAC frames\n var coneOfSilence = {\n 96000: [highPrefix, [227, 64], zeroFill(154), [56]],\n 88200: [highPrefix, [231], zeroFill(170), [56]],\n 64000: [highPrefix, [248, 192], zeroFill(240), [56]],\n 48000: [highPrefix, [255, 192], zeroFill(268), [55, 148, 128], zeroFill(54), [112]],\n 44100: [highPrefix, [255, 192], zeroFill(268), [55, 163, 128], zeroFill(84), [112]],\n 32000: [highPrefix, [255, 192], zeroFill(268), [55, 234], zeroFill(226), [112]],\n 24000: [highPrefix, [255, 192], zeroFill(268), [55, 255, 128], zeroFill(268), [111, 112], zeroFill(126), [224]],\n 16000: [highPrefix, [255, 192], zeroFill(268), [55, 255, 128], zeroFill(268), [111, 255], zeroFill(269), [223, 108], zeroFill(195), [1, 192]],\n 12000: [lowPrefix, zeroFill(268), [3, 127, 248], zeroFill(268), [6, 255, 240], zeroFill(268), [13, 255, 224], zeroFill(268), [27, 253, 128], zeroFill(259), [56]],\n 11025: [lowPrefix, zeroFill(268), [3, 127, 248], zeroFill(268), [6, 255, 240], zeroFill(268), [13, 255, 224], zeroFill(268), [27, 255, 192], zeroFill(268), [55, 175, 128], zeroFill(108), [112]],\n 8000: [lowPrefix, zeroFill(268), [3, 121, 16], zeroFill(47), [7]]\n };\n silence = makeTable(coneOfSilence);\n }\n return silence;\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n */\n\n var ONE_SECOND_IN_TS$4 = 90000,\n // 90kHz clock\n secondsToVideoTs,\n secondsToAudioTs,\n videoTsToSeconds,\n audioTsToSeconds,\n audioTsToVideoTs,\n videoTsToAudioTs,\n metadataTsToSeconds;\n secondsToVideoTs = function secondsToVideoTs(seconds) {\n return seconds * ONE_SECOND_IN_TS$4;\n };\n secondsToAudioTs = function secondsToAudioTs(seconds, sampleRate) {\n return seconds * sampleRate;\n };\n videoTsToSeconds = function videoTsToSeconds(timestamp) {\n return timestamp / ONE_SECOND_IN_TS$4;\n };\n audioTsToSeconds = function audioTsToSeconds(timestamp, sampleRate) {\n return timestamp / sampleRate;\n };\n audioTsToVideoTs = function audioTsToVideoTs(timestamp, sampleRate) {\n return secondsToVideoTs(audioTsToSeconds(timestamp, sampleRate));\n };\n videoTsToAudioTs = function videoTsToAudioTs(timestamp, sampleRate) {\n return secondsToAudioTs(videoTsToSeconds(timestamp), sampleRate);\n };\n /**\n * Adjust ID3 tag or caption timing information by the timeline pts values\n * (if keepOriginalTimestamps is false) and convert to seconds\n */\n\n metadataTsToSeconds = function metadataTsToSeconds(timestamp, timelineStartPts, keepOriginalTimestamps) {\n return videoTsToSeconds(keepOriginalTimestamps ? timestamp : timestamp - timelineStartPts);\n };\n var clock$2 = {\n ONE_SECOND_IN_TS: ONE_SECOND_IN_TS$4,\n secondsToVideoTs: secondsToVideoTs,\n secondsToAudioTs: secondsToAudioTs,\n videoTsToSeconds: videoTsToSeconds,\n audioTsToSeconds: audioTsToSeconds,\n audioTsToVideoTs: audioTsToVideoTs,\n videoTsToAudioTs: videoTsToAudioTs,\n metadataTsToSeconds: metadataTsToSeconds\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n */\n\n var coneOfSilence = silence_1;\n var clock$1 = clock$2;\n /**\n * Sum the `byteLength` properties of the data in each AAC frame\n */\n\n var sumFrameByteLengths = function sumFrameByteLengths(array) {\n var i,\n currentObj,\n sum = 0; // sum the byteLength's all each nal unit in the frame\n\n for (i = 0; i < array.length; i++) {\n currentObj = array[i];\n sum += currentObj.data.byteLength;\n }\n return sum;\n }; // Possibly pad (prefix) the audio track with silence if appending this track\n // would lead to the introduction of a gap in the audio buffer\n\n var prefixWithSilence = function prefixWithSilence(track, frames, audioAppendStartTs, videoBaseMediaDecodeTime) {\n var baseMediaDecodeTimeTs,\n frameDuration = 0,\n audioGapDuration = 0,\n audioFillFrameCount = 0,\n audioFillDuration = 0,\n silentFrame,\n i,\n firstFrame;\n if (!frames.length) {\n return;\n }\n baseMediaDecodeTimeTs = clock$1.audioTsToVideoTs(track.baseMediaDecodeTime, track.samplerate); // determine frame clock duration based on sample rate, round up to avoid overfills\n\n frameDuration = Math.ceil(clock$1.ONE_SECOND_IN_TS / (track.samplerate / 1024));\n if (audioAppendStartTs && videoBaseMediaDecodeTime) {\n // insert the shortest possible amount (audio gap or audio to video gap)\n audioGapDuration = baseMediaDecodeTimeTs - Math.max(audioAppendStartTs, videoBaseMediaDecodeTime); // number of full frames in the audio gap\n\n audioFillFrameCount = Math.floor(audioGapDuration / frameDuration);\n audioFillDuration = audioFillFrameCount * frameDuration;\n } // don't attempt to fill gaps smaller than a single frame or larger\n // than a half second\n\n if (audioFillFrameCount < 1 || audioFillDuration > clock$1.ONE_SECOND_IN_TS / 2) {\n return;\n }\n silentFrame = coneOfSilence()[track.samplerate];\n if (!silentFrame) {\n // we don't have a silent frame pregenerated for the sample rate, so use a frame\n // from the content instead\n silentFrame = frames[0].data;\n }\n for (i = 0; i < audioFillFrameCount; i++) {\n firstFrame = frames[0];\n frames.splice(0, 0, {\n data: silentFrame,\n dts: firstFrame.dts - frameDuration,\n pts: firstFrame.pts - frameDuration\n });\n }\n track.baseMediaDecodeTime -= Math.floor(clock$1.videoTsToAudioTs(audioFillDuration, track.samplerate));\n return audioFillDuration;\n }; // If the audio segment extends before the earliest allowed dts\n // value, remove AAC frames until starts at or after the earliest\n // allowed DTS so that we don't end up with a negative baseMedia-\n // DecodeTime for the audio track\n\n var trimAdtsFramesByEarliestDts = function trimAdtsFramesByEarliestDts(adtsFrames, track, earliestAllowedDts) {\n if (track.minSegmentDts >= earliestAllowedDts) {\n return adtsFrames;\n } // We will need to recalculate the earliest segment Dts\n\n track.minSegmentDts = Infinity;\n return adtsFrames.filter(function (currentFrame) {\n // If this is an allowed frame, keep it and record it's Dts\n if (currentFrame.dts >= earliestAllowedDts) {\n track.minSegmentDts = Math.min(track.minSegmentDts, currentFrame.dts);\n track.minSegmentPts = track.minSegmentDts;\n return true;\n } // Otherwise, discard it\n\n return false;\n });\n }; // generate the track's raw mdat data from an array of frames\n\n var generateSampleTable = function generateSampleTable(frames) {\n var i,\n currentFrame,\n samples = [];\n for (i = 0; i < frames.length; i++) {\n currentFrame = frames[i];\n samples.push({\n size: currentFrame.data.byteLength,\n duration: 1024 // For AAC audio, all samples contain 1024 samples\n });\n }\n return samples;\n }; // generate the track's sample table from an array of frames\n\n var concatenateFrameData = function concatenateFrameData(frames) {\n var i,\n currentFrame,\n dataOffset = 0,\n data = new Uint8Array(sumFrameByteLengths(frames));\n for (i = 0; i < frames.length; i++) {\n currentFrame = frames[i];\n data.set(currentFrame.data, dataOffset);\n dataOffset += currentFrame.data.byteLength;\n }\n return data;\n };\n var audioFrameUtils$1 = {\n prefixWithSilence: prefixWithSilence,\n trimAdtsFramesByEarliestDts: trimAdtsFramesByEarliestDts,\n generateSampleTable: generateSampleTable,\n concatenateFrameData: concatenateFrameData\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n */\n\n var ONE_SECOND_IN_TS$3 = clock$2.ONE_SECOND_IN_TS;\n /**\n * Store information about the start and end of the track and the\n * duration for each frame/sample we process in order to calculate\n * the baseMediaDecodeTime\n */\n\n var collectDtsInfo = function collectDtsInfo(track, data) {\n if (typeof data.pts === 'number') {\n if (track.timelineStartInfo.pts === undefined) {\n track.timelineStartInfo.pts = data.pts;\n }\n if (track.minSegmentPts === undefined) {\n track.minSegmentPts = data.pts;\n } else {\n track.minSegmentPts = Math.min(track.minSegmentPts, data.pts);\n }\n if (track.maxSegmentPts === undefined) {\n track.maxSegmentPts = data.pts;\n } else {\n track.maxSegmentPts = Math.max(track.maxSegmentPts, data.pts);\n }\n }\n if (typeof data.dts === 'number') {\n if (track.timelineStartInfo.dts === undefined) {\n track.timelineStartInfo.dts = data.dts;\n }\n if (track.minSegmentDts === undefined) {\n track.minSegmentDts = data.dts;\n } else {\n track.minSegmentDts = Math.min(track.minSegmentDts, data.dts);\n }\n if (track.maxSegmentDts === undefined) {\n track.maxSegmentDts = data.dts;\n } else {\n track.maxSegmentDts = Math.max(track.maxSegmentDts, data.dts);\n }\n }\n };\n /**\n * Clear values used to calculate the baseMediaDecodeTime between\n * tracks\n */\n\n var clearDtsInfo = function clearDtsInfo(track) {\n delete track.minSegmentDts;\n delete track.maxSegmentDts;\n delete track.minSegmentPts;\n delete track.maxSegmentPts;\n };\n /**\n * Calculate the track's baseMediaDecodeTime based on the earliest\n * DTS the transmuxer has ever seen and the minimum DTS for the\n * current track\n * @param track {object} track metadata configuration\n * @param keepOriginalTimestamps {boolean} If true, keep the timestamps\n * in the source; false to adjust the first segment to start at 0.\n */\n\n var calculateTrackBaseMediaDecodeTime = function calculateTrackBaseMediaDecodeTime(track, keepOriginalTimestamps) {\n var baseMediaDecodeTime,\n scale,\n minSegmentDts = track.minSegmentDts; // Optionally adjust the time so the first segment starts at zero.\n\n if (!keepOriginalTimestamps) {\n minSegmentDts -= track.timelineStartInfo.dts;\n } // track.timelineStartInfo.baseMediaDecodeTime is the location, in time, where\n // we want the start of the first segment to be placed\n\n baseMediaDecodeTime = track.timelineStartInfo.baseMediaDecodeTime; // Add to that the distance this segment is from the very first\n\n baseMediaDecodeTime += minSegmentDts; // baseMediaDecodeTime must not become negative\n\n baseMediaDecodeTime = Math.max(0, baseMediaDecodeTime);\n if (track.type === 'audio') {\n // Audio has a different clock equal to the sampling_rate so we need to\n // scale the PTS values into the clock rate of the track\n scale = track.samplerate / ONE_SECOND_IN_TS$3;\n baseMediaDecodeTime *= scale;\n baseMediaDecodeTime = Math.floor(baseMediaDecodeTime);\n }\n return baseMediaDecodeTime;\n };\n var trackDecodeInfo$1 = {\n clearDtsInfo: clearDtsInfo,\n calculateTrackBaseMediaDecodeTime: calculateTrackBaseMediaDecodeTime,\n collectDtsInfo: collectDtsInfo\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Reads in-band caption information from a video elementary\n * stream. Captions must follow the CEA-708 standard for injection\n * into an MPEG-2 transport streams.\n * @see https://en.wikipedia.org/wiki/CEA-708\n * @see https://www.gpo.gov/fdsys/pkg/CFR-2007-title47-vol1/pdf/CFR-2007-title47-vol1-sec15-119.pdf\n */\n // payload type field to indicate how they are to be\n // interpreted. CEAS-708 caption content is always transmitted with\n // payload type 0x04.\n\n var USER_DATA_REGISTERED_ITU_T_T35 = 4,\n RBSP_TRAILING_BITS = 128;\n /**\n * Parse a supplemental enhancement information (SEI) NAL unit.\n * Stops parsing once a message of type ITU T T35 has been found.\n *\n * @param bytes {Uint8Array} the bytes of a SEI NAL unit\n * @return {object} the parsed SEI payload\n * @see Rec. ITU-T H.264, 7.3.2.3.1\n */\n\n var parseSei = function parseSei(bytes) {\n var i = 0,\n result = {\n payloadType: -1,\n payloadSize: 0\n },\n payloadType = 0,\n payloadSize = 0; // go through the sei_rbsp parsing each each individual sei_message\n\n while (i < bytes.byteLength) {\n // stop once we have hit the end of the sei_rbsp\n if (bytes[i] === RBSP_TRAILING_BITS) {\n break;\n } // Parse payload type\n\n while (bytes[i] === 0xFF) {\n payloadType += 255;\n i++;\n }\n payloadType += bytes[i++]; // Parse payload size\n\n while (bytes[i] === 0xFF) {\n payloadSize += 255;\n i++;\n }\n payloadSize += bytes[i++]; // this sei_message is a 608/708 caption so save it and break\n // there can only ever be one caption message in a frame's sei\n\n if (!result.payload && payloadType === USER_DATA_REGISTERED_ITU_T_T35) {\n var userIdentifier = String.fromCharCode(bytes[i + 3], bytes[i + 4], bytes[i + 5], bytes[i + 6]);\n if (userIdentifier === 'GA94') {\n result.payloadType = payloadType;\n result.payloadSize = payloadSize;\n result.payload = bytes.subarray(i, i + payloadSize);\n break;\n } else {\n result.payload = void 0;\n }\n } // skip the payload and parse the next message\n\n i += payloadSize;\n payloadType = 0;\n payloadSize = 0;\n }\n return result;\n }; // see ANSI/SCTE 128-1 (2013), section 8.1\n\n var parseUserData = function parseUserData(sei) {\n // itu_t_t35_contry_code must be 181 (United States) for\n // captions\n if (sei.payload[0] !== 181) {\n return null;\n } // itu_t_t35_provider_code should be 49 (ATSC) for captions\n\n if ((sei.payload[1] << 8 | sei.payload[2]) !== 49) {\n return null;\n } // the user_identifier should be \"GA94\" to indicate ATSC1 data\n\n if (String.fromCharCode(sei.payload[3], sei.payload[4], sei.payload[5], sei.payload[6]) !== 'GA94') {\n return null;\n } // finally, user_data_type_code should be 0x03 for caption data\n\n if (sei.payload[7] !== 0x03) {\n return null;\n } // return the user_data_type_structure and strip the trailing\n // marker bits\n\n return sei.payload.subarray(8, sei.payload.length - 1);\n }; // see CEA-708-D, section 4.4\n\n var parseCaptionPackets = function parseCaptionPackets(pts, userData) {\n var results = [],\n i,\n count,\n offset,\n data; // if this is just filler, return immediately\n\n if (!(userData[0] & 0x40)) {\n return results;\n } // parse out the cc_data_1 and cc_data_2 fields\n\n count = userData[0] & 0x1f;\n for (i = 0; i < count; i++) {\n offset = i * 3;\n data = {\n type: userData[offset + 2] & 0x03,\n pts: pts\n }; // capture cc data when cc_valid is 1\n\n if (userData[offset + 2] & 0x04) {\n data.ccData = userData[offset + 3] << 8 | userData[offset + 4];\n results.push(data);\n }\n }\n return results;\n };\n var discardEmulationPreventionBytes$1 = function discardEmulationPreventionBytes$1(data) {\n var length = data.byteLength,\n emulationPreventionBytesPositions = [],\n i = 1,\n newLength,\n newData; // Find all `Emulation Prevention Bytes`\n\n while (i < length - 2) {\n if (data[i] === 0 && data[i + 1] === 0 && data[i + 2] === 0x03) {\n emulationPreventionBytesPositions.push(i + 2);\n i += 2;\n } else {\n i++;\n }\n } // If no Emulation Prevention Bytes were found just return the original\n // array\n\n if (emulationPreventionBytesPositions.length === 0) {\n return data;\n } // Create a new array to hold the NAL unit data\n\n newLength = length - emulationPreventionBytesPositions.length;\n newData = new Uint8Array(newLength);\n var sourceIndex = 0;\n for (i = 0; i < newLength; sourceIndex++, i++) {\n if (sourceIndex === emulationPreventionBytesPositions[0]) {\n // Skip this byte\n sourceIndex++; // Remove this position index\n\n emulationPreventionBytesPositions.shift();\n }\n newData[i] = data[sourceIndex];\n }\n return newData;\n }; // exports\n\n var captionPacketParser = {\n parseSei: parseSei,\n parseUserData: parseUserData,\n parseCaptionPackets: parseCaptionPackets,\n discardEmulationPreventionBytes: discardEmulationPreventionBytes$1,\n USER_DATA_REGISTERED_ITU_T_T35: USER_DATA_REGISTERED_ITU_T_T35\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Reads in-band caption information from a video elementary\n * stream. Captions must follow the CEA-708 standard for injection\n * into an MPEG-2 transport streams.\n * @see https://en.wikipedia.org/wiki/CEA-708\n * @see https://www.gpo.gov/fdsys/pkg/CFR-2007-title47-vol1/pdf/CFR-2007-title47-vol1-sec15-119.pdf\n */\n // Link To Transport\n // -----------------\n\n var Stream$7 = stream;\n var cea708Parser = captionPacketParser;\n var CaptionStream$2 = function CaptionStream$2(options) {\n options = options || {};\n CaptionStream$2.prototype.init.call(this); // parse708captions flag, default to true\n\n this.parse708captions_ = typeof options.parse708captions === 'boolean' ? options.parse708captions : true;\n this.captionPackets_ = [];\n this.ccStreams_ = [new Cea608Stream(0, 0),\n // eslint-disable-line no-use-before-define\n new Cea608Stream(0, 1),\n // eslint-disable-line no-use-before-define\n new Cea608Stream(1, 0),\n // eslint-disable-line no-use-before-define\n new Cea608Stream(1, 1) // eslint-disable-line no-use-before-define\n ];\n if (this.parse708captions_) {\n this.cc708Stream_ = new Cea708Stream({\n captionServices: options.captionServices\n }); // eslint-disable-line no-use-before-define\n }\n this.reset(); // forward data and done events from CCs to this CaptionStream\n\n this.ccStreams_.forEach(function (cc) {\n cc.on('data', this.trigger.bind(this, 'data'));\n cc.on('partialdone', this.trigger.bind(this, 'partialdone'));\n cc.on('done', this.trigger.bind(this, 'done'));\n }, this);\n if (this.parse708captions_) {\n this.cc708Stream_.on('data', this.trigger.bind(this, 'data'));\n this.cc708Stream_.on('partialdone', this.trigger.bind(this, 'partialdone'));\n this.cc708Stream_.on('done', this.trigger.bind(this, 'done'));\n }\n };\n CaptionStream$2.prototype = new Stream$7();\n CaptionStream$2.prototype.push = function (event) {\n var sei, userData, newCaptionPackets; // only examine SEI NALs\n\n if (event.nalUnitType !== 'sei_rbsp') {\n return;\n } // parse the sei\n\n sei = cea708Parser.parseSei(event.escapedRBSP); // no payload data, skip\n\n if (!sei.payload) {\n return;\n } // ignore everything but user_data_registered_itu_t_t35\n\n if (sei.payloadType !== cea708Parser.USER_DATA_REGISTERED_ITU_T_T35) {\n return;\n } // parse out the user data payload\n\n userData = cea708Parser.parseUserData(sei); // ignore unrecognized userData\n\n if (!userData) {\n return;\n } // Sometimes, the same segment # will be downloaded twice. To stop the\n // caption data from being processed twice, we track the latest dts we've\n // received and ignore everything with a dts before that. However, since\n // data for a specific dts can be split across packets on either side of\n // a segment boundary, we need to make sure we *don't* ignore the packets\n // from the *next* segment that have dts === this.latestDts_. By constantly\n // tracking the number of packets received with dts === this.latestDts_, we\n // know how many should be ignored once we start receiving duplicates.\n\n if (event.dts < this.latestDts_) {\n // We've started getting older data, so set the flag.\n this.ignoreNextEqualDts_ = true;\n return;\n } else if (event.dts === this.latestDts_ && this.ignoreNextEqualDts_) {\n this.numSameDts_--;\n if (!this.numSameDts_) {\n // We've received the last duplicate packet, time to start processing again\n this.ignoreNextEqualDts_ = false;\n }\n return;\n } // parse out CC data packets and save them for later\n\n newCaptionPackets = cea708Parser.parseCaptionPackets(event.pts, userData);\n this.captionPackets_ = this.captionPackets_.concat(newCaptionPackets);\n if (this.latestDts_ !== event.dts) {\n this.numSameDts_ = 0;\n }\n this.numSameDts_++;\n this.latestDts_ = event.dts;\n };\n CaptionStream$2.prototype.flushCCStreams = function (flushType) {\n this.ccStreams_.forEach(function (cc) {\n return flushType === 'flush' ? cc.flush() : cc.partialFlush();\n }, this);\n };\n CaptionStream$2.prototype.flushStream = function (flushType) {\n // make sure we actually parsed captions before proceeding\n if (!this.captionPackets_.length) {\n this.flushCCStreams(flushType);\n return;\n } // In Chrome, the Array#sort function is not stable so add a\n // presortIndex that we can use to ensure we get a stable-sort\n\n this.captionPackets_.forEach(function (elem, idx) {\n elem.presortIndex = idx;\n }); // sort caption byte-pairs based on their PTS values\n\n this.captionPackets_.sort(function (a, b) {\n if (a.pts === b.pts) {\n return a.presortIndex - b.presortIndex;\n }\n return a.pts - b.pts;\n });\n this.captionPackets_.forEach(function (packet) {\n if (packet.type < 2) {\n // Dispatch packet to the right Cea608Stream\n this.dispatchCea608Packet(packet);\n } else {\n // Dispatch packet to the Cea708Stream\n this.dispatchCea708Packet(packet);\n }\n }, this);\n this.captionPackets_.length = 0;\n this.flushCCStreams(flushType);\n };\n CaptionStream$2.prototype.flush = function () {\n return this.flushStream('flush');\n }; // Only called if handling partial data\n\n CaptionStream$2.prototype.partialFlush = function () {\n return this.flushStream('partialFlush');\n };\n CaptionStream$2.prototype.reset = function () {\n this.latestDts_ = null;\n this.ignoreNextEqualDts_ = false;\n this.numSameDts_ = 0;\n this.activeCea608Channel_ = [null, null];\n this.ccStreams_.forEach(function (ccStream) {\n ccStream.reset();\n });\n }; // From the CEA-608 spec:\n\n /*\n * When XDS sub-packets are interleaved with other services, the end of each sub-packet shall be followed\n * by a control pair to change to a different service. When any of the control codes from 0x10 to 0x1F is\n * used to begin a control code pair, it indicates the return to captioning or Text data. The control code pair\n * and subsequent data should then be processed according to the FCC rules. It may be necessary for the\n * line 21 data encoder to automatically insert a control code pair (i.e. RCL, RU2, RU3, RU4, RDC, or RTD)\n * to switch to captioning or Text.\n */\n // With that in mind, we ignore any data between an XDS control code and a\n // subsequent closed-captioning control code.\n\n CaptionStream$2.prototype.dispatchCea608Packet = function (packet) {\n // NOTE: packet.type is the CEA608 field\n if (this.setsTextOrXDSActive(packet)) {\n this.activeCea608Channel_[packet.type] = null;\n } else if (this.setsChannel1Active(packet)) {\n this.activeCea608Channel_[packet.type] = 0;\n } else if (this.setsChannel2Active(packet)) {\n this.activeCea608Channel_[packet.type] = 1;\n }\n if (this.activeCea608Channel_[packet.type] === null) {\n // If we haven't received anything to set the active channel, or the\n // packets are Text/XDS data, discard the data; we don't want jumbled\n // captions\n return;\n }\n this.ccStreams_[(packet.type << 1) + this.activeCea608Channel_[packet.type]].push(packet);\n };\n CaptionStream$2.prototype.setsChannel1Active = function (packet) {\n return (packet.ccData & 0x7800) === 0x1000;\n };\n CaptionStream$2.prototype.setsChannel2Active = function (packet) {\n return (packet.ccData & 0x7800) === 0x1800;\n };\n CaptionStream$2.prototype.setsTextOrXDSActive = function (packet) {\n return (packet.ccData & 0x7100) === 0x0100 || (packet.ccData & 0x78fe) === 0x102a || (packet.ccData & 0x78fe) === 0x182a;\n };\n CaptionStream$2.prototype.dispatchCea708Packet = function (packet) {\n if (this.parse708captions_) {\n this.cc708Stream_.push(packet);\n }\n }; // ----------------------\n // Session to Application\n // ----------------------\n // This hash maps special and extended character codes to their\n // proper Unicode equivalent. The first one-byte key is just a\n // non-standard character code. The two-byte keys that follow are\n // the extended CEA708 character codes, along with the preceding\n // 0x10 extended character byte to distinguish these codes from\n // non-extended character codes. Every CEA708 character code that\n // is not in this object maps directly to a standard unicode\n // character code.\n // The transparent space and non-breaking transparent space are\n // technically not fully supported since there is no code to\n // make them transparent, so they have normal non-transparent\n // stand-ins.\n // The special closed caption (CC) character isn't a standard\n // unicode character, so a fairly similar unicode character was\n // chosen in it's place.\n\n var CHARACTER_TRANSLATION_708 = {\n 0x7f: 0x266a,\n // ♪\n 0x1020: 0x20,\n // Transparent Space\n 0x1021: 0xa0,\n // Nob-breaking Transparent Space\n 0x1025: 0x2026,\n // …\n 0x102a: 0x0160,\n // Š\n 0x102c: 0x0152,\n // Œ\n 0x1030: 0x2588,\n // █\n 0x1031: 0x2018,\n // ‘\n 0x1032: 0x2019,\n // ’\n 0x1033: 0x201c,\n // “\n 0x1034: 0x201d,\n // ”\n 0x1035: 0x2022,\n // •\n 0x1039: 0x2122,\n // ™\n 0x103a: 0x0161,\n // š\n 0x103c: 0x0153,\n // œ\n 0x103d: 0x2120,\n // ℠\n 0x103f: 0x0178,\n // Ÿ\n 0x1076: 0x215b,\n // ⅛\n 0x1077: 0x215c,\n // ⅜\n 0x1078: 0x215d,\n // ⅝\n 0x1079: 0x215e,\n // ⅞\n 0x107a: 0x23d0,\n // ⏐\n 0x107b: 0x23a4,\n // ⎤\n 0x107c: 0x23a3,\n // ⎣\n 0x107d: 0x23af,\n // ⎯\n 0x107e: 0x23a6,\n // ⎦\n 0x107f: 0x23a1,\n // ⎡\n 0x10a0: 0x3138 // ㄸ (CC char)\n };\n var get708CharFromCode = function get708CharFromCode(code) {\n var newCode = CHARACTER_TRANSLATION_708[code] || code;\n if (code & 0x1000 && code === newCode) {\n // Invalid extended code\n return '';\n }\n return String.fromCharCode(newCode);\n };\n var within708TextBlock = function within708TextBlock(b) {\n return 0x20 <= b && b <= 0x7f || 0xa0 <= b && b <= 0xff;\n };\n var Cea708Window = function Cea708Window(windowNum) {\n this.windowNum = windowNum;\n this.reset();\n };\n Cea708Window.prototype.reset = function () {\n this.clearText();\n this.pendingNewLine = false;\n this.winAttr = {};\n this.penAttr = {};\n this.penLoc = {};\n this.penColor = {}; // These default values are arbitrary,\n // defineWindow will usually override them\n\n this.visible = 0;\n this.rowLock = 0;\n this.columnLock = 0;\n this.priority = 0;\n this.relativePositioning = 0;\n this.anchorVertical = 0;\n this.anchorHorizontal = 0;\n this.anchorPoint = 0;\n this.rowCount = 1;\n this.virtualRowCount = this.rowCount + 1;\n this.columnCount = 41;\n this.windowStyle = 0;\n this.penStyle = 0;\n };\n Cea708Window.prototype.getText = function () {\n return this.rows.join('\\n');\n };\n Cea708Window.prototype.clearText = function () {\n this.rows = [''];\n this.rowIdx = 0;\n };\n Cea708Window.prototype.newLine = function (pts) {\n if (this.rows.length >= this.virtualRowCount && typeof this.beforeRowOverflow === 'function') {\n this.beforeRowOverflow(pts);\n }\n if (this.rows.length > 0) {\n this.rows.push('');\n this.rowIdx++;\n } // Show all virtual rows since there's no visible scrolling\n\n while (this.rows.length > this.virtualRowCount) {\n this.rows.shift();\n this.rowIdx--;\n }\n };\n Cea708Window.prototype.isEmpty = function () {\n if (this.rows.length === 0) {\n return true;\n } else if (this.rows.length === 1) {\n return this.rows[0] === '';\n }\n return false;\n };\n Cea708Window.prototype.addText = function (text) {\n this.rows[this.rowIdx] += text;\n };\n Cea708Window.prototype.backspace = function () {\n if (!this.isEmpty()) {\n var row = this.rows[this.rowIdx];\n this.rows[this.rowIdx] = row.substr(0, row.length - 1);\n }\n };\n var Cea708Service = function Cea708Service(serviceNum, encoding, stream) {\n this.serviceNum = serviceNum;\n this.text = '';\n this.currentWindow = new Cea708Window(-1);\n this.windows = [];\n this.stream = stream; // Try to setup a TextDecoder if an `encoding` value was provided\n\n if (typeof encoding === 'string') {\n this.createTextDecoder(encoding);\n }\n };\n /**\n * Initialize service windows\n * Must be run before service use\n *\n * @param {Integer} pts PTS value\n * @param {Function} beforeRowOverflow Function to execute before row overflow of a window\n */\n\n Cea708Service.prototype.init = function (pts, beforeRowOverflow) {\n this.startPts = pts;\n for (var win = 0; win < 8; win++) {\n this.windows[win] = new Cea708Window(win);\n if (typeof beforeRowOverflow === 'function') {\n this.windows[win].beforeRowOverflow = beforeRowOverflow;\n }\n }\n };\n /**\n * Set current window of service to be affected by commands\n *\n * @param {Integer} windowNum Window number\n */\n\n Cea708Service.prototype.setCurrentWindow = function (windowNum) {\n this.currentWindow = this.windows[windowNum];\n };\n /**\n * Try to create a TextDecoder if it is natively supported\n */\n\n Cea708Service.prototype.createTextDecoder = function (encoding) {\n if (typeof TextDecoder === 'undefined') {\n this.stream.trigger('log', {\n level: 'warn',\n message: 'The `encoding` option is unsupported without TextDecoder support'\n });\n } else {\n try {\n this.textDecoder_ = new TextDecoder(encoding);\n } catch (error) {\n this.stream.trigger('log', {\n level: 'warn',\n message: 'TextDecoder could not be created with ' + encoding + ' encoding. ' + error\n });\n }\n }\n };\n var Cea708Stream = function Cea708Stream(options) {\n options = options || {};\n Cea708Stream.prototype.init.call(this);\n var self = this;\n var captionServices = options.captionServices || {};\n var captionServiceEncodings = {};\n var serviceProps; // Get service encodings from captionServices option block\n\n Object.keys(captionServices).forEach(function (serviceName) {\n serviceProps = captionServices[serviceName];\n if (/^SERVICE/.test(serviceName)) {\n captionServiceEncodings[serviceName] = serviceProps.encoding;\n }\n });\n this.serviceEncodings = captionServiceEncodings;\n this.current708Packet = null;\n this.services = {};\n this.push = function (packet) {\n if (packet.type === 3) {\n // 708 packet start\n self.new708Packet();\n self.add708Bytes(packet);\n } else {\n if (self.current708Packet === null) {\n // This should only happen at the start of a file if there's no packet start.\n self.new708Packet();\n }\n self.add708Bytes(packet);\n }\n };\n };\n Cea708Stream.prototype = new Stream$7();\n /**\n * Push current 708 packet, create new 708 packet.\n */\n\n Cea708Stream.prototype.new708Packet = function () {\n if (this.current708Packet !== null) {\n this.push708Packet();\n }\n this.current708Packet = {\n data: [],\n ptsVals: []\n };\n };\n /**\n * Add pts and both bytes from packet into current 708 packet.\n */\n\n Cea708Stream.prototype.add708Bytes = function (packet) {\n var data = packet.ccData;\n var byte0 = data >>> 8;\n var byte1 = data & 0xff; // I would just keep a list of packets instead of bytes, but it isn't clear in the spec\n // that service blocks will always line up with byte pairs.\n\n this.current708Packet.ptsVals.push(packet.pts);\n this.current708Packet.data.push(byte0);\n this.current708Packet.data.push(byte1);\n };\n /**\n * Parse completed 708 packet into service blocks and push each service block.\n */\n\n Cea708Stream.prototype.push708Packet = function () {\n var packet708 = this.current708Packet;\n var packetData = packet708.data;\n var serviceNum = null;\n var blockSize = null;\n var i = 0;\n var b = packetData[i++];\n packet708.seq = b >> 6;\n packet708.sizeCode = b & 0x3f; // 0b00111111;\n\n for (; i < packetData.length; i++) {\n b = packetData[i++];\n serviceNum = b >> 5;\n blockSize = b & 0x1f; // 0b00011111\n\n if (serviceNum === 7 && blockSize > 0) {\n // Extended service num\n b = packetData[i++];\n serviceNum = b;\n }\n this.pushServiceBlock(serviceNum, i, blockSize);\n if (blockSize > 0) {\n i += blockSize - 1;\n }\n }\n };\n /**\n * Parse service block, execute commands, read text.\n *\n * Note: While many of these commands serve important purposes,\n * many others just parse out the parameters or attributes, but\n * nothing is done with them because this is not a full and complete\n * implementation of the entire 708 spec.\n *\n * @param {Integer} serviceNum Service number\n * @param {Integer} start Start index of the 708 packet data\n * @param {Integer} size Block size\n */\n\n Cea708Stream.prototype.pushServiceBlock = function (serviceNum, start, size) {\n var b;\n var i = start;\n var packetData = this.current708Packet.data;\n var service = this.services[serviceNum];\n if (!service) {\n service = this.initService(serviceNum, i);\n }\n for (; i < start + size && i < packetData.length; i++) {\n b = packetData[i];\n if (within708TextBlock(b)) {\n i = this.handleText(i, service);\n } else if (b === 0x18) {\n i = this.multiByteCharacter(i, service);\n } else if (b === 0x10) {\n i = this.extendedCommands(i, service);\n } else if (0x80 <= b && b <= 0x87) {\n i = this.setCurrentWindow(i, service);\n } else if (0x98 <= b && b <= 0x9f) {\n i = this.defineWindow(i, service);\n } else if (b === 0x88) {\n i = this.clearWindows(i, service);\n } else if (b === 0x8c) {\n i = this.deleteWindows(i, service);\n } else if (b === 0x89) {\n i = this.displayWindows(i, service);\n } else if (b === 0x8a) {\n i = this.hideWindows(i, service);\n } else if (b === 0x8b) {\n i = this.toggleWindows(i, service);\n } else if (b === 0x97) {\n i = this.setWindowAttributes(i, service);\n } else if (b === 0x90) {\n i = this.setPenAttributes(i, service);\n } else if (b === 0x91) {\n i = this.setPenColor(i, service);\n } else if (b === 0x92) {\n i = this.setPenLocation(i, service);\n } else if (b === 0x8f) {\n service = this.reset(i, service);\n } else if (b === 0x08) {\n // BS: Backspace\n service.currentWindow.backspace();\n } else if (b === 0x0c) {\n // FF: Form feed\n service.currentWindow.clearText();\n } else if (b === 0x0d) {\n // CR: Carriage return\n service.currentWindow.pendingNewLine = true;\n } else if (b === 0x0e) {\n // HCR: Horizontal carriage return\n service.currentWindow.clearText();\n } else if (b === 0x8d) {\n // DLY: Delay, nothing to do\n i++;\n } else ;\n }\n };\n /**\n * Execute an extended command\n *\n * @param {Integer} i Current index in the 708 packet\n * @param {Service} service The service object to be affected\n * @return {Integer} New index after parsing\n */\n\n Cea708Stream.prototype.extendedCommands = function (i, service) {\n var packetData = this.current708Packet.data;\n var b = packetData[++i];\n if (within708TextBlock(b)) {\n i = this.handleText(i, service, {\n isExtended: true\n });\n }\n return i;\n };\n /**\n * Get PTS value of a given byte index\n *\n * @param {Integer} byteIndex Index of the byte\n * @return {Integer} PTS\n */\n\n Cea708Stream.prototype.getPts = function (byteIndex) {\n // There's 1 pts value per 2 bytes\n return this.current708Packet.ptsVals[Math.floor(byteIndex / 2)];\n };\n /**\n * Initializes a service\n *\n * @param {Integer} serviceNum Service number\n * @return {Service} Initialized service object\n */\n\n Cea708Stream.prototype.initService = function (serviceNum, i) {\n var serviceName = 'SERVICE' + serviceNum;\n var self = this;\n var serviceName;\n var encoding;\n if (serviceName in this.serviceEncodings) {\n encoding = this.serviceEncodings[serviceName];\n }\n this.services[serviceNum] = new Cea708Service(serviceNum, encoding, self);\n this.services[serviceNum].init(this.getPts(i), function (pts) {\n self.flushDisplayed(pts, self.services[serviceNum]);\n });\n return this.services[serviceNum];\n };\n /**\n * Execute text writing to current window\n *\n * @param {Integer} i Current index in the 708 packet\n * @param {Service} service The service object to be affected\n * @return {Integer} New index after parsing\n */\n\n Cea708Stream.prototype.handleText = function (i, service, options) {\n var isExtended = options && options.isExtended;\n var isMultiByte = options && options.isMultiByte;\n var packetData = this.current708Packet.data;\n var extended = isExtended ? 0x1000 : 0x0000;\n var currentByte = packetData[i];\n var nextByte = packetData[i + 1];\n var win = service.currentWindow;\n var _char;\n var charCodeArray; // Converts an array of bytes to a unicode hex string.\n\n function toHexString(byteArray) {\n return byteArray.map(function (_byte) {\n return ('0' + (_byte & 0xFF).toString(16)).slice(-2);\n }).join('');\n }\n if (isMultiByte) {\n charCodeArray = [currentByte, nextByte];\n i++;\n } else {\n charCodeArray = [currentByte];\n } // Use the TextDecoder if one was created for this service\n\n if (service.textDecoder_ && !isExtended) {\n _char = service.textDecoder_.decode(new Uint8Array(charCodeArray));\n } else {\n // We assume any multi-byte char without a decoder is unicode.\n if (isMultiByte) {\n var unicode = toHexString(charCodeArray); // Takes a unicode hex string and creates a single character.\n\n _char = String.fromCharCode(parseInt(unicode, 16));\n } else {\n _char = get708CharFromCode(extended | currentByte);\n }\n }\n if (win.pendingNewLine && !win.isEmpty()) {\n win.newLine(this.getPts(i));\n }\n win.pendingNewLine = false;\n win.addText(_char);\n return i;\n };\n /**\n * Handle decoding of multibyte character\n *\n * @param {Integer} i Current index in the 708 packet\n * @param {Service} service The service object to be affected\n * @return {Integer} New index after parsing\n */\n\n Cea708Stream.prototype.multiByteCharacter = function (i, service) {\n var packetData = this.current708Packet.data;\n var firstByte = packetData[i + 1];\n var secondByte = packetData[i + 2];\n if (within708TextBlock(firstByte) && within708TextBlock(secondByte)) {\n i = this.handleText(++i, service, {\n isMultiByte: true\n });\n }\n return i;\n };\n /**\n * Parse and execute the CW# command.\n *\n * Set the current window.\n *\n * @param {Integer} i Current index in the 708 packet\n * @param {Service} service The service object to be affected\n * @return {Integer} New index after parsing\n */\n\n Cea708Stream.prototype.setCurrentWindow = function (i, service) {\n var packetData = this.current708Packet.data;\n var b = packetData[i];\n var windowNum = b & 0x07;\n service.setCurrentWindow(windowNum);\n return i;\n };\n /**\n * Parse and execute the DF# command.\n *\n * Define a window and set it as the current window.\n *\n * @param {Integer} i Current index in the 708 packet\n * @param {Service} service The service object to be affected\n * @return {Integer} New index after parsing\n */\n\n Cea708Stream.prototype.defineWindow = function (i, service) {\n var packetData = this.current708Packet.data;\n var b = packetData[i];\n var windowNum = b & 0x07;\n service.setCurrentWindow(windowNum);\n var win = service.currentWindow;\n b = packetData[++i];\n win.visible = (b & 0x20) >> 5; // v\n\n win.rowLock = (b & 0x10) >> 4; // rl\n\n win.columnLock = (b & 0x08) >> 3; // cl\n\n win.priority = b & 0x07; // p\n\n b = packetData[++i];\n win.relativePositioning = (b & 0x80) >> 7; // rp\n\n win.anchorVertical = b & 0x7f; // av\n\n b = packetData[++i];\n win.anchorHorizontal = b; // ah\n\n b = packetData[++i];\n win.anchorPoint = (b & 0xf0) >> 4; // ap\n\n win.rowCount = b & 0x0f; // rc\n\n b = packetData[++i];\n win.columnCount = b & 0x3f; // cc\n\n b = packetData[++i];\n win.windowStyle = (b & 0x38) >> 3; // ws\n\n win.penStyle = b & 0x07; // ps\n // The spec says there are (rowCount+1) \"virtual rows\"\n\n win.virtualRowCount = win.rowCount + 1;\n return i;\n };\n /**\n * Parse and execute the SWA command.\n *\n * Set attributes of the current window.\n *\n * @param {Integer} i Current index in the 708 packet\n * @param {Service} service The service object to be affected\n * @return {Integer} New index after parsing\n */\n\n Cea708Stream.prototype.setWindowAttributes = function (i, service) {\n var packetData = this.current708Packet.data;\n var b = packetData[i];\n var winAttr = service.currentWindow.winAttr;\n b = packetData[++i];\n winAttr.fillOpacity = (b & 0xc0) >> 6; // fo\n\n winAttr.fillRed = (b & 0x30) >> 4; // fr\n\n winAttr.fillGreen = (b & 0x0c) >> 2; // fg\n\n winAttr.fillBlue = b & 0x03; // fb\n\n b = packetData[++i];\n winAttr.borderType = (b & 0xc0) >> 6; // bt\n\n winAttr.borderRed = (b & 0x30) >> 4; // br\n\n winAttr.borderGreen = (b & 0x0c) >> 2; // bg\n\n winAttr.borderBlue = b & 0x03; // bb\n\n b = packetData[++i];\n winAttr.borderType += (b & 0x80) >> 5; // bt\n\n winAttr.wordWrap = (b & 0x40) >> 6; // ww\n\n winAttr.printDirection = (b & 0x30) >> 4; // pd\n\n winAttr.scrollDirection = (b & 0x0c) >> 2; // sd\n\n winAttr.justify = b & 0x03; // j\n\n b = packetData[++i];\n winAttr.effectSpeed = (b & 0xf0) >> 4; // es\n\n winAttr.effectDirection = (b & 0x0c) >> 2; // ed\n\n winAttr.displayEffect = b & 0x03; // de\n\n return i;\n };\n /**\n * Gather text from all displayed windows and push a caption to output.\n *\n * @param {Integer} i Current index in the 708 packet\n * @param {Service} service The service object to be affected\n */\n\n Cea708Stream.prototype.flushDisplayed = function (pts, service) {\n var displayedText = []; // TODO: Positioning not supported, displaying multiple windows will not necessarily\n // display text in the correct order, but sample files so far have not shown any issue.\n\n for (var winId = 0; winId < 8; winId++) {\n if (service.windows[winId].visible && !service.windows[winId].isEmpty()) {\n displayedText.push(service.windows[winId].getText());\n }\n }\n service.endPts = pts;\n service.text = displayedText.join('\\n\\n');\n this.pushCaption(service);\n service.startPts = pts;\n };\n /**\n * Push a caption to output if the caption contains text.\n *\n * @param {Service} service The service object to be affected\n */\n\n Cea708Stream.prototype.pushCaption = function (service) {\n if (service.text !== '') {\n this.trigger('data', {\n startPts: service.startPts,\n endPts: service.endPts,\n text: service.text,\n stream: 'cc708_' + service.serviceNum\n });\n service.text = '';\n service.startPts = service.endPts;\n }\n };\n /**\n * Parse and execute the DSW command.\n *\n * Set visible property of windows based on the parsed bitmask.\n *\n * @param {Integer} i Current index in the 708 packet\n * @param {Service} service The service object to be affected\n * @return {Integer} New index after parsing\n */\n\n Cea708Stream.prototype.displayWindows = function (i, service) {\n var packetData = this.current708Packet.data;\n var b = packetData[++i];\n var pts = this.getPts(i);\n this.flushDisplayed(pts, service);\n for (var winId = 0; winId < 8; winId++) {\n if (b & 0x01 << winId) {\n service.windows[winId].visible = 1;\n }\n }\n return i;\n };\n /**\n * Parse and execute the HDW command.\n *\n * Set visible property of windows based on the parsed bitmask.\n *\n * @param {Integer} i Current index in the 708 packet\n * @param {Service} service The service object to be affected\n * @return {Integer} New index after parsing\n */\n\n Cea708Stream.prototype.hideWindows = function (i, service) {\n var packetData = this.current708Packet.data;\n var b = packetData[++i];\n var pts = this.getPts(i);\n this.flushDisplayed(pts, service);\n for (var winId = 0; winId < 8; winId++) {\n if (b & 0x01 << winId) {\n service.windows[winId].visible = 0;\n }\n }\n return i;\n };\n /**\n * Parse and execute the TGW command.\n *\n * Set visible property of windows based on the parsed bitmask.\n *\n * @param {Integer} i Current index in the 708 packet\n * @param {Service} service The service object to be affected\n * @return {Integer} New index after parsing\n */\n\n Cea708Stream.prototype.toggleWindows = function (i, service) {\n var packetData = this.current708Packet.data;\n var b = packetData[++i];\n var pts = this.getPts(i);\n this.flushDisplayed(pts, service);\n for (var winId = 0; winId < 8; winId++) {\n if (b & 0x01 << winId) {\n service.windows[winId].visible ^= 1;\n }\n }\n return i;\n };\n /**\n * Parse and execute the CLW command.\n *\n * Clear text of windows based on the parsed bitmask.\n *\n * @param {Integer} i Current index in the 708 packet\n * @param {Service} service The service object to be affected\n * @return {Integer} New index after parsing\n */\n\n Cea708Stream.prototype.clearWindows = function (i, service) {\n var packetData = this.current708Packet.data;\n var b = packetData[++i];\n var pts = this.getPts(i);\n this.flushDisplayed(pts, service);\n for (var winId = 0; winId < 8; winId++) {\n if (b & 0x01 << winId) {\n service.windows[winId].clearText();\n }\n }\n return i;\n };\n /**\n * Parse and execute the DLW command.\n *\n * Re-initialize windows based on the parsed bitmask.\n *\n * @param {Integer} i Current index in the 708 packet\n * @param {Service} service The service object to be affected\n * @return {Integer} New index after parsing\n */\n\n Cea708Stream.prototype.deleteWindows = function (i, service) {\n var packetData = this.current708Packet.data;\n var b = packetData[++i];\n var pts = this.getPts(i);\n this.flushDisplayed(pts, service);\n for (var winId = 0; winId < 8; winId++) {\n if (b & 0x01 << winId) {\n service.windows[winId].reset();\n }\n }\n return i;\n };\n /**\n * Parse and execute the SPA command.\n *\n * Set pen attributes of the current window.\n *\n * @param {Integer} i Current index in the 708 packet\n * @param {Service} service The service object to be affected\n * @return {Integer} New index after parsing\n */\n\n Cea708Stream.prototype.setPenAttributes = function (i, service) {\n var packetData = this.current708Packet.data;\n var b = packetData[i];\n var penAttr = service.currentWindow.penAttr;\n b = packetData[++i];\n penAttr.textTag = (b & 0xf0) >> 4; // tt\n\n penAttr.offset = (b & 0x0c) >> 2; // o\n\n penAttr.penSize = b & 0x03; // s\n\n b = packetData[++i];\n penAttr.italics = (b & 0x80) >> 7; // i\n\n penAttr.underline = (b & 0x40) >> 6; // u\n\n penAttr.edgeType = (b & 0x38) >> 3; // et\n\n penAttr.fontStyle = b & 0x07; // fs\n\n return i;\n };\n /**\n * Parse and execute the SPC command.\n *\n * Set pen color of the current window.\n *\n * @param {Integer} i Current index in the 708 packet\n * @param {Service} service The service object to be affected\n * @return {Integer} New index after parsing\n */\n\n Cea708Stream.prototype.setPenColor = function (i, service) {\n var packetData = this.current708Packet.data;\n var b = packetData[i];\n var penColor = service.currentWindow.penColor;\n b = packetData[++i];\n penColor.fgOpacity = (b & 0xc0) >> 6; // fo\n\n penColor.fgRed = (b & 0x30) >> 4; // fr\n\n penColor.fgGreen = (b & 0x0c) >> 2; // fg\n\n penColor.fgBlue = b & 0x03; // fb\n\n b = packetData[++i];\n penColor.bgOpacity = (b & 0xc0) >> 6; // bo\n\n penColor.bgRed = (b & 0x30) >> 4; // br\n\n penColor.bgGreen = (b & 0x0c) >> 2; // bg\n\n penColor.bgBlue = b & 0x03; // bb\n\n b = packetData[++i];\n penColor.edgeRed = (b & 0x30) >> 4; // er\n\n penColor.edgeGreen = (b & 0x0c) >> 2; // eg\n\n penColor.edgeBlue = b & 0x03; // eb\n\n return i;\n };\n /**\n * Parse and execute the SPL command.\n *\n * Set pen location of the current window.\n *\n * @param {Integer} i Current index in the 708 packet\n * @param {Service} service The service object to be affected\n * @return {Integer} New index after parsing\n */\n\n Cea708Stream.prototype.setPenLocation = function (i, service) {\n var packetData = this.current708Packet.data;\n var b = packetData[i];\n var penLoc = service.currentWindow.penLoc; // Positioning isn't really supported at the moment, so this essentially just inserts a linebreak\n\n service.currentWindow.pendingNewLine = true;\n b = packetData[++i];\n penLoc.row = b & 0x0f; // r\n\n b = packetData[++i];\n penLoc.column = b & 0x3f; // c\n\n return i;\n };\n /**\n * Execute the RST command.\n *\n * Reset service to a clean slate. Re-initialize.\n *\n * @param {Integer} i Current index in the 708 packet\n * @param {Service} service The service object to be affected\n * @return {Service} Re-initialized service\n */\n\n Cea708Stream.prototype.reset = function (i, service) {\n var pts = this.getPts(i);\n this.flushDisplayed(pts, service);\n return this.initService(service.serviceNum, i);\n }; // This hash maps non-ASCII, special, and extended character codes to their\n // proper Unicode equivalent. The first keys that are only a single byte\n // are the non-standard ASCII characters, which simply map the CEA608 byte\n // to the standard ASCII/Unicode. The two-byte keys that follow are the CEA608\n // character codes, but have their MSB bitmasked with 0x03 so that a lookup\n // can be performed regardless of the field and data channel on which the\n // character code was received.\n\n var CHARACTER_TRANSLATION = {\n 0x2a: 0xe1,\n // á\n 0x5c: 0xe9,\n // é\n 0x5e: 0xed,\n // í\n 0x5f: 0xf3,\n // ó\n 0x60: 0xfa,\n // ú\n 0x7b: 0xe7,\n // ç\n 0x7c: 0xf7,\n // ÷\n 0x7d: 0xd1,\n // Ñ\n 0x7e: 0xf1,\n // ñ\n 0x7f: 0x2588,\n // █\n 0x0130: 0xae,\n // ®\n 0x0131: 0xb0,\n // °\n 0x0132: 0xbd,\n // ½\n 0x0133: 0xbf,\n // ¿\n 0x0134: 0x2122,\n // ™\n 0x0135: 0xa2,\n // ¢\n 0x0136: 0xa3,\n // £\n 0x0137: 0x266a,\n // ♪\n 0x0138: 0xe0,\n // à\n 0x0139: 0xa0,\n //\n 0x013a: 0xe8,\n // è\n 0x013b: 0xe2,\n // â\n 0x013c: 0xea,\n // ê\n 0x013d: 0xee,\n // î\n 0x013e: 0xf4,\n // ô\n 0x013f: 0xfb,\n // û\n 0x0220: 0xc1,\n // Á\n 0x0221: 0xc9,\n // É\n 0x0222: 0xd3,\n // Ó\n 0x0223: 0xda,\n // Ú\n 0x0224: 0xdc,\n // Ü\n 0x0225: 0xfc,\n // ü\n 0x0226: 0x2018,\n // ‘\n 0x0227: 0xa1,\n // ¡\n 0x0228: 0x2a,\n // *\n 0x0229: 0x27,\n // '\n 0x022a: 0x2014,\n // —\n 0x022b: 0xa9,\n // ©\n 0x022c: 0x2120,\n // ℠\n 0x022d: 0x2022,\n // •\n 0x022e: 0x201c,\n // “\n 0x022f: 0x201d,\n // ”\n 0x0230: 0xc0,\n // À\n 0x0231: 0xc2,\n // Â\n 0x0232: 0xc7,\n // Ç\n 0x0233: 0xc8,\n // È\n 0x0234: 0xca,\n // Ê\n 0x0235: 0xcb,\n // Ë\n 0x0236: 0xeb,\n // ë\n 0x0237: 0xce,\n // Î\n 0x0238: 0xcf,\n // Ï\n 0x0239: 0xef,\n // ï\n 0x023a: 0xd4,\n // Ô\n 0x023b: 0xd9,\n // Ù\n 0x023c: 0xf9,\n // ù\n 0x023d: 0xdb,\n // Û\n 0x023e: 0xab,\n // «\n 0x023f: 0xbb,\n // »\n 0x0320: 0xc3,\n // Ã\n 0x0321: 0xe3,\n // ã\n 0x0322: 0xcd,\n // Í\n 0x0323: 0xcc,\n // Ì\n 0x0324: 0xec,\n // ì\n 0x0325: 0xd2,\n // Ò\n 0x0326: 0xf2,\n // ò\n 0x0327: 0xd5,\n // Õ\n 0x0328: 0xf5,\n // õ\n 0x0329: 0x7b,\n // {\n 0x032a: 0x7d,\n // }\n 0x032b: 0x5c,\n // \\\n 0x032c: 0x5e,\n // ^\n 0x032d: 0x5f,\n // _\n 0x032e: 0x7c,\n // |\n 0x032f: 0x7e,\n // ~\n 0x0330: 0xc4,\n // Ä\n 0x0331: 0xe4,\n // ä\n 0x0332: 0xd6,\n // Ö\n 0x0333: 0xf6,\n // ö\n 0x0334: 0xdf,\n // ß\n 0x0335: 0xa5,\n // ¥\n 0x0336: 0xa4,\n // ¤\n 0x0337: 0x2502,\n // │\n 0x0338: 0xc5,\n // Å\n 0x0339: 0xe5,\n // å\n 0x033a: 0xd8,\n // Ø\n 0x033b: 0xf8,\n // ø\n 0x033c: 0x250c,\n // ┌\n 0x033d: 0x2510,\n // ┐\n 0x033e: 0x2514,\n // └\n 0x033f: 0x2518 // ┘\n };\n var getCharFromCode = function getCharFromCode(code) {\n if (code === null) {\n return '';\n }\n code = CHARACTER_TRANSLATION[code] || code;\n return String.fromCharCode(code);\n }; // the index of the last row in a CEA-608 display buffer\n\n var BOTTOM_ROW = 14; // This array is used for mapping PACs -> row #, since there's no way of\n // getting it through bit logic.\n\n var ROWS = [0x1100, 0x1120, 0x1200, 0x1220, 0x1500, 0x1520, 0x1600, 0x1620, 0x1700, 0x1720, 0x1000, 0x1300, 0x1320, 0x1400, 0x1420]; // CEA-608 captions are rendered onto a 34x15 matrix of character\n // cells. The \"bottom\" row is the last element in the outer array.\n // We keep track of positioning information as we go by storing the\n // number of indentations and the tab offset in this buffer.\n\n var createDisplayBuffer = function createDisplayBuffer() {\n var result = [],\n i = BOTTOM_ROW + 1;\n while (i--) {\n result.push({\n text: '',\n indent: 0,\n offset: 0\n });\n }\n return result;\n };\n var Cea608Stream = function Cea608Stream(field, dataChannel) {\n Cea608Stream.prototype.init.call(this);\n this.field_ = field || 0;\n this.dataChannel_ = dataChannel || 0;\n this.name_ = 'CC' + ((this.field_ << 1 | this.dataChannel_) + 1);\n this.setConstants();\n this.reset();\n this.push = function (packet) {\n var data, swap, char0, char1, text; // remove the parity bits\n\n data = packet.ccData & 0x7f7f; // ignore duplicate control codes; the spec demands they're sent twice\n\n if (data === this.lastControlCode_) {\n this.lastControlCode_ = null;\n return;\n } // Store control codes\n\n if ((data & 0xf000) === 0x1000) {\n this.lastControlCode_ = data;\n } else if (data !== this.PADDING_) {\n this.lastControlCode_ = null;\n }\n char0 = data >>> 8;\n char1 = data & 0xff;\n if (data === this.PADDING_) {\n return;\n } else if (data === this.RESUME_CAPTION_LOADING_) {\n this.mode_ = 'popOn';\n } else if (data === this.END_OF_CAPTION_) {\n // If an EOC is received while in paint-on mode, the displayed caption\n // text should be swapped to non-displayed memory as if it was a pop-on\n // caption. Because of that, we should explicitly switch back to pop-on\n // mode\n this.mode_ = 'popOn';\n this.clearFormatting(packet.pts); // if a caption was being displayed, it's gone now\n\n this.flushDisplayed(packet.pts); // flip memory\n\n swap = this.displayed_;\n this.displayed_ = this.nonDisplayed_;\n this.nonDisplayed_ = swap; // start measuring the time to display the caption\n\n this.startPts_ = packet.pts;\n } else if (data === this.ROLL_UP_2_ROWS_) {\n this.rollUpRows_ = 2;\n this.setRollUp(packet.pts);\n } else if (data === this.ROLL_UP_3_ROWS_) {\n this.rollUpRows_ = 3;\n this.setRollUp(packet.pts);\n } else if (data === this.ROLL_UP_4_ROWS_) {\n this.rollUpRows_ = 4;\n this.setRollUp(packet.pts);\n } else if (data === this.CARRIAGE_RETURN_) {\n this.clearFormatting(packet.pts);\n this.flushDisplayed(packet.pts);\n this.shiftRowsUp_();\n this.startPts_ = packet.pts;\n } else if (data === this.BACKSPACE_) {\n if (this.mode_ === 'popOn') {\n this.nonDisplayed_[this.row_].text = this.nonDisplayed_[this.row_].text.slice(0, -1);\n } else {\n this.displayed_[this.row_].text = this.displayed_[this.row_].text.slice(0, -1);\n }\n } else if (data === this.ERASE_DISPLAYED_MEMORY_) {\n this.flushDisplayed(packet.pts);\n this.displayed_ = createDisplayBuffer();\n } else if (data === this.ERASE_NON_DISPLAYED_MEMORY_) {\n this.nonDisplayed_ = createDisplayBuffer();\n } else if (data === this.RESUME_DIRECT_CAPTIONING_) {\n if (this.mode_ !== 'paintOn') {\n // NOTE: This should be removed when proper caption positioning is\n // implemented\n this.flushDisplayed(packet.pts);\n this.displayed_ = createDisplayBuffer();\n }\n this.mode_ = 'paintOn';\n this.startPts_ = packet.pts; // Append special characters to caption text\n } else if (this.isSpecialCharacter(char0, char1)) {\n // Bitmask char0 so that we can apply character transformations\n // regardless of field and data channel.\n // Then byte-shift to the left and OR with char1 so we can pass the\n // entire character code to `getCharFromCode`.\n char0 = (char0 & 0x03) << 8;\n text = getCharFromCode(char0 | char1);\n this[this.mode_](packet.pts, text);\n this.column_++; // Append extended characters to caption text\n } else if (this.isExtCharacter(char0, char1)) {\n // Extended characters always follow their \"non-extended\" equivalents.\n // IE if a \"è\" is desired, you'll always receive \"eè\"; non-compliant\n // decoders are supposed to drop the \"è\", while compliant decoders\n // backspace the \"e\" and insert \"è\".\n // Delete the previous character\n if (this.mode_ === 'popOn') {\n this.nonDisplayed_[this.row_].text = this.nonDisplayed_[this.row_].text.slice(0, -1);\n } else {\n this.displayed_[this.row_].text = this.displayed_[this.row_].text.slice(0, -1);\n } // Bitmask char0 so that we can apply character transformations\n // regardless of field and data channel.\n // Then byte-shift to the left and OR with char1 so we can pass the\n // entire character code to `getCharFromCode`.\n\n char0 = (char0 & 0x03) << 8;\n text = getCharFromCode(char0 | char1);\n this[this.mode_](packet.pts, text);\n this.column_++; // Process mid-row codes\n } else if (this.isMidRowCode(char0, char1)) {\n // Attributes are not additive, so clear all formatting\n this.clearFormatting(packet.pts); // According to the standard, mid-row codes\n // should be replaced with spaces, so add one now\n\n this[this.mode_](packet.pts, ' ');\n this.column_++;\n if ((char1 & 0xe) === 0xe) {\n this.addFormatting(packet.pts, ['i']);\n }\n if ((char1 & 0x1) === 0x1) {\n this.addFormatting(packet.pts, ['u']);\n } // Detect offset control codes and adjust cursor\n } else if (this.isOffsetControlCode(char0, char1)) {\n // Cursor position is set by indent PAC (see below) in 4-column\n // increments, with an additional offset code of 1-3 to reach any\n // of the 32 columns specified by CEA-608. So all we need to do\n // here is increment the column cursor by the given offset.\n var offset = char1 & 0x03; // For an offest value 1-3, set the offset for that caption\n // in the non-displayed array.\n\n this.nonDisplayed_[this.row_].offset = offset;\n this.column_ += offset; // Detect PACs (Preamble Address Codes)\n } else if (this.isPAC(char0, char1)) {\n // There's no logic for PAC -> row mapping, so we have to just\n // find the row code in an array and use its index :(\n var row = ROWS.indexOf(data & 0x1f20); // Configure the caption window if we're in roll-up mode\n\n if (this.mode_ === 'rollUp') {\n // This implies that the base row is incorrectly set.\n // As per the recommendation in CEA-608(Base Row Implementation), defer to the number\n // of roll-up rows set.\n if (row - this.rollUpRows_ + 1 < 0) {\n row = this.rollUpRows_ - 1;\n }\n this.setRollUp(packet.pts, row);\n }\n if (row !== this.row_) {\n // formatting is only persistent for current row\n this.clearFormatting(packet.pts);\n this.row_ = row;\n } // All PACs can apply underline, so detect and apply\n // (All odd-numbered second bytes set underline)\n\n if (char1 & 0x1 && this.formatting_.indexOf('u') === -1) {\n this.addFormatting(packet.pts, ['u']);\n }\n if ((data & 0x10) === 0x10) {\n // We've got an indent level code. Each successive even number\n // increments the column cursor by 4, so we can get the desired\n // column position by bit-shifting to the right (to get n/2)\n // and multiplying by 4.\n var indentations = (data & 0xe) >> 1;\n this.column_ = indentations * 4; // add to the number of indentations for positioning\n\n this.nonDisplayed_[this.row_].indent += indentations;\n }\n if (this.isColorPAC(char1)) {\n // it's a color code, though we only support white, which\n // can be either normal or italicized. white italics can be\n // either 0x4e or 0x6e depending on the row, so we just\n // bitwise-and with 0xe to see if italics should be turned on\n if ((char1 & 0xe) === 0xe) {\n this.addFormatting(packet.pts, ['i']);\n }\n } // We have a normal character in char0, and possibly one in char1\n } else if (this.isNormalChar(char0)) {\n if (char1 === 0x00) {\n char1 = null;\n }\n text = getCharFromCode(char0);\n text += getCharFromCode(char1);\n this[this.mode_](packet.pts, text);\n this.column_ += text.length;\n } // finish data processing\n };\n };\n Cea608Stream.prototype = new Stream$7(); // Trigger a cue point that captures the current state of the\n // display buffer\n\n Cea608Stream.prototype.flushDisplayed = function (pts) {\n var _this148 = this;\n var logWarning = function logWarning(index) {\n _this148.trigger('log', {\n level: 'warn',\n message: 'Skipping a malformed 608 caption at index ' + index + '.'\n });\n };\n var content = [];\n this.displayed_.forEach(function (row, i) {\n if (row && row.text && row.text.length) {\n try {\n // remove spaces from the start and end of the string\n row.text = row.text.trim();\n } catch (e) {\n // Ordinarily, this shouldn't happen. However, caption\n // parsing errors should not throw exceptions and\n // break playback.\n logWarning(i);\n } // See the below link for more details on the following fields:\n // https://dvcs.w3.org/hg/text-tracks/raw-file/default/608toVTT/608toVTT.html#positioning-in-cea-608\n\n if (row.text.length) {\n content.push({\n // The text to be displayed in the caption from this specific row, with whitespace removed.\n text: row.text,\n // Value between 1 and 15 representing the PAC row used to calculate line height.\n line: i + 1,\n // A number representing the indent position by percentage (CEA-608 PAC indent code).\n // The value will be a number between 10 and 80. Offset is used to add an aditional\n // value to the position if necessary.\n position: 10 + Math.min(70, row.indent * 10) + row.offset * 2.5\n });\n }\n } else if (row === undefined || row === null) {\n logWarning(i);\n }\n });\n if (content.length) {\n this.trigger('data', {\n startPts: this.startPts_,\n endPts: pts,\n content: content,\n stream: this.name_\n });\n }\n };\n /**\n * Zero out the data, used for startup and on seek\n */\n\n Cea608Stream.prototype.reset = function () {\n this.mode_ = 'popOn'; // When in roll-up mode, the index of the last row that will\n // actually display captions. If a caption is shifted to a row\n // with a lower index than this, it is cleared from the display\n // buffer\n\n this.topRow_ = 0;\n this.startPts_ = 0;\n this.displayed_ = createDisplayBuffer();\n this.nonDisplayed_ = createDisplayBuffer();\n this.lastControlCode_ = null; // Track row and column for proper line-breaking and spacing\n\n this.column_ = 0;\n this.row_ = BOTTOM_ROW;\n this.rollUpRows_ = 2; // This variable holds currently-applied formatting\n\n this.formatting_ = [];\n };\n /**\n * Sets up control code and related constants for this instance\n */\n\n Cea608Stream.prototype.setConstants = function () {\n // The following attributes have these uses:\n // ext_ : char0 for mid-row codes, and the base for extended\n // chars (ext_+0, ext_+1, and ext_+2 are char0s for\n // extended codes)\n // control_: char0 for control codes, except byte-shifted to the\n // left so that we can do this.control_ | CONTROL_CODE\n // offset_: char0 for tab offset codes\n //\n // It's also worth noting that control codes, and _only_ control codes,\n // differ between field 1 and field2. Field 2 control codes are always\n // their field 1 value plus 1. That's why there's the \"| field\" on the\n // control value.\n if (this.dataChannel_ === 0) {\n this.BASE_ = 0x10;\n this.EXT_ = 0x11;\n this.CONTROL_ = (0x14 | this.field_) << 8;\n this.OFFSET_ = 0x17;\n } else if (this.dataChannel_ === 1) {\n this.BASE_ = 0x18;\n this.EXT_ = 0x19;\n this.CONTROL_ = (0x1c | this.field_) << 8;\n this.OFFSET_ = 0x1f;\n } // Constants for the LSByte command codes recognized by Cea608Stream. This\n // list is not exhaustive. For a more comprehensive listing and semantics see\n // http://www.gpo.gov/fdsys/pkg/CFR-2010-title47-vol1/pdf/CFR-2010-title47-vol1-sec15-119.pdf\n // Padding\n\n this.PADDING_ = 0x0000; // Pop-on Mode\n\n this.RESUME_CAPTION_LOADING_ = this.CONTROL_ | 0x20;\n this.END_OF_CAPTION_ = this.CONTROL_ | 0x2f; // Roll-up Mode\n\n this.ROLL_UP_2_ROWS_ = this.CONTROL_ | 0x25;\n this.ROLL_UP_3_ROWS_ = this.CONTROL_ | 0x26;\n this.ROLL_UP_4_ROWS_ = this.CONTROL_ | 0x27;\n this.CARRIAGE_RETURN_ = this.CONTROL_ | 0x2d; // paint-on mode\n\n this.RESUME_DIRECT_CAPTIONING_ = this.CONTROL_ | 0x29; // Erasure\n\n this.BACKSPACE_ = this.CONTROL_ | 0x21;\n this.ERASE_DISPLAYED_MEMORY_ = this.CONTROL_ | 0x2c;\n this.ERASE_NON_DISPLAYED_MEMORY_ = this.CONTROL_ | 0x2e;\n };\n /**\n * Detects if the 2-byte packet data is a special character\n *\n * Special characters have a second byte in the range 0x30 to 0x3f,\n * with the first byte being 0x11 (for data channel 1) or 0x19 (for\n * data channel 2).\n *\n * @param {Integer} char0 The first byte\n * @param {Integer} char1 The second byte\n * @return {Boolean} Whether the 2 bytes are an special character\n */\n\n Cea608Stream.prototype.isSpecialCharacter = function (char0, char1) {\n return char0 === this.EXT_ && char1 >= 0x30 && char1 <= 0x3f;\n };\n /**\n * Detects if the 2-byte packet data is an extended character\n *\n * Extended characters have a second byte in the range 0x20 to 0x3f,\n * with the first byte being 0x12 or 0x13 (for data channel 1) or\n * 0x1a or 0x1b (for data channel 2).\n *\n * @param {Integer} char0 The first byte\n * @param {Integer} char1 The second byte\n * @return {Boolean} Whether the 2 bytes are an extended character\n */\n\n Cea608Stream.prototype.isExtCharacter = function (char0, char1) {\n return (char0 === this.EXT_ + 1 || char0 === this.EXT_ + 2) && char1 >= 0x20 && char1 <= 0x3f;\n };\n /**\n * Detects if the 2-byte packet is a mid-row code\n *\n * Mid-row codes have a second byte in the range 0x20 to 0x2f, with\n * the first byte being 0x11 (for data channel 1) or 0x19 (for data\n * channel 2).\n *\n * @param {Integer} char0 The first byte\n * @param {Integer} char1 The second byte\n * @return {Boolean} Whether the 2 bytes are a mid-row code\n */\n\n Cea608Stream.prototype.isMidRowCode = function (char0, char1) {\n return char0 === this.EXT_ && char1 >= 0x20 && char1 <= 0x2f;\n };\n /**\n * Detects if the 2-byte packet is an offset control code\n *\n * Offset control codes have a second byte in the range 0x21 to 0x23,\n * with the first byte being 0x17 (for data channel 1) or 0x1f (for\n * data channel 2).\n *\n * @param {Integer} char0 The first byte\n * @param {Integer} char1 The second byte\n * @return {Boolean} Whether the 2 bytes are an offset control code\n */\n\n Cea608Stream.prototype.isOffsetControlCode = function (char0, char1) {\n return char0 === this.OFFSET_ && char1 >= 0x21 && char1 <= 0x23;\n };\n /**\n * Detects if the 2-byte packet is a Preamble Address Code\n *\n * PACs have a first byte in the range 0x10 to 0x17 (for data channel 1)\n * or 0x18 to 0x1f (for data channel 2), with the second byte in the\n * range 0x40 to 0x7f.\n *\n * @param {Integer} char0 The first byte\n * @param {Integer} char1 The second byte\n * @return {Boolean} Whether the 2 bytes are a PAC\n */\n\n Cea608Stream.prototype.isPAC = function (char0, char1) {\n return char0 >= this.BASE_ && char0 < this.BASE_ + 8 && char1 >= 0x40 && char1 <= 0x7f;\n };\n /**\n * Detects if a packet's second byte is in the range of a PAC color code\n *\n * PAC color codes have the second byte be in the range 0x40 to 0x4f, or\n * 0x60 to 0x6f.\n *\n * @param {Integer} char1 The second byte\n * @return {Boolean} Whether the byte is a color PAC\n */\n\n Cea608Stream.prototype.isColorPAC = function (char1) {\n return char1 >= 0x40 && char1 <= 0x4f || char1 >= 0x60 && char1 <= 0x7f;\n };\n /**\n * Detects if a single byte is in the range of a normal character\n *\n * Normal text bytes are in the range 0x20 to 0x7f.\n *\n * @param {Integer} char The byte\n * @return {Boolean} Whether the byte is a normal character\n */\n\n Cea608Stream.prototype.isNormalChar = function (_char2) {\n return _char2 >= 0x20 && _char2 <= 0x7f;\n };\n /**\n * Configures roll-up\n *\n * @param {Integer} pts Current PTS\n * @param {Integer} newBaseRow Used by PACs to slide the current window to\n * a new position\n */\n\n Cea608Stream.prototype.setRollUp = function (pts, newBaseRow) {\n // Reset the base row to the bottom row when switching modes\n if (this.mode_ !== 'rollUp') {\n this.row_ = BOTTOM_ROW;\n this.mode_ = 'rollUp'; // Spec says to wipe memories when switching to roll-up\n\n this.flushDisplayed(pts);\n this.nonDisplayed_ = createDisplayBuffer();\n this.displayed_ = createDisplayBuffer();\n }\n if (newBaseRow !== undefined && newBaseRow !== this.row_) {\n // move currently displayed captions (up or down) to the new base row\n for (var i = 0; i < this.rollUpRows_; i++) {\n this.displayed_[newBaseRow - i] = this.displayed_[this.row_ - i];\n this.displayed_[this.row_ - i] = {\n text: '',\n indent: 0,\n offset: 0\n };\n }\n }\n if (newBaseRow === undefined) {\n newBaseRow = this.row_;\n }\n this.topRow_ = newBaseRow - this.rollUpRows_ + 1;\n }; // Adds the opening HTML tag for the passed character to the caption text,\n // and keeps track of it for later closing\n\n Cea608Stream.prototype.addFormatting = function (pts, format) {\n this.formatting_ = this.formatting_.concat(format);\n var text = format.reduce(function (text, format) {\n return text + '<' + format + '>';\n }, '');\n this[this.mode_](pts, text);\n }; // Adds HTML closing tags for current formatting to caption text and\n // clears remembered formatting\n\n Cea608Stream.prototype.clearFormatting = function (pts) {\n if (!this.formatting_.length) {\n return;\n }\n var text = this.formatting_.reverse().reduce(function (text, format) {\n return text + '</' + format + '>';\n }, '');\n this.formatting_ = [];\n this[this.mode_](pts, text);\n }; // Mode Implementations\n\n Cea608Stream.prototype.popOn = function (pts, text) {\n var baseRow = this.nonDisplayed_[this.row_].text; // buffer characters\n\n baseRow += text;\n this.nonDisplayed_[this.row_].text = baseRow;\n };\n Cea608Stream.prototype.rollUp = function (pts, text) {\n var baseRow = this.displayed_[this.row_].text;\n baseRow += text;\n this.displayed_[this.row_].text = baseRow;\n };\n Cea608Stream.prototype.shiftRowsUp_ = function () {\n var i; // clear out inactive rows\n\n for (i = 0; i < this.topRow_; i++) {\n this.displayed_[i] = {\n text: '',\n indent: 0,\n offset: 0\n };\n }\n for (i = this.row_ + 1; i < BOTTOM_ROW + 1; i++) {\n this.displayed_[i] = {\n text: '',\n indent: 0,\n offset: 0\n };\n } // shift displayed rows up\n\n for (i = this.topRow_; i < this.row_; i++) {\n this.displayed_[i] = this.displayed_[i + 1];\n } // clear out the bottom row\n\n this.displayed_[this.row_] = {\n text: '',\n indent: 0,\n offset: 0\n };\n };\n Cea608Stream.prototype.paintOn = function (pts, text) {\n var baseRow = this.displayed_[this.row_].text;\n baseRow += text;\n this.displayed_[this.row_].text = baseRow;\n }; // exports\n\n var captionStream = {\n CaptionStream: CaptionStream$2,\n Cea608Stream: Cea608Stream,\n Cea708Stream: Cea708Stream\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n */\n\n var streamTypes = {\n H264_STREAM_TYPE: 0x1B,\n ADTS_STREAM_TYPE: 0x0F,\n METADATA_STREAM_TYPE: 0x15\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Accepts program elementary stream (PES) data events and corrects\n * decode and presentation time stamps to account for a rollover\n * of the 33 bit value.\n */\n\n var Stream$6 = stream;\n var MAX_TS = 8589934592;\n var RO_THRESH = 4294967296;\n var TYPE_SHARED = 'shared';\n var handleRollover$1 = function handleRollover$1(value, reference) {\n var direction = 1;\n if (value > reference) {\n // If the current timestamp value is greater than our reference timestamp and we detect a\n // timestamp rollover, this means the roll over is happening in the opposite direction.\n // Example scenario: Enter a long stream/video just after a rollover occurred. The reference\n // point will be set to a small number, e.g. 1. The user then seeks backwards over the\n // rollover point. In loading this segment, the timestamp values will be very large,\n // e.g. 2^33 - 1. Since this comes before the data we loaded previously, we want to adjust\n // the time stamp to be `value - 2^33`.\n direction = -1;\n } // Note: A seek forwards or back that is greater than the RO_THRESH (2^32, ~13 hours) will\n // cause an incorrect adjustment.\n\n while (Math.abs(reference - value) > RO_THRESH) {\n value += direction * MAX_TS;\n }\n return value;\n };\n var TimestampRolloverStream$1 = function TimestampRolloverStream$1(type) {\n var lastDTS, referenceDTS;\n TimestampRolloverStream$1.prototype.init.call(this); // The \"shared\" type is used in cases where a stream will contain muxed\n // video and audio. We could use `undefined` here, but having a string\n // makes debugging a little clearer.\n\n this.type_ = type || TYPE_SHARED;\n this.push = function (data) {\n // Any \"shared\" rollover streams will accept _all_ data. Otherwise,\n // streams will only accept data that matches their type.\n if (this.type_ !== TYPE_SHARED && data.type !== this.type_) {\n return;\n }\n if (referenceDTS === undefined) {\n referenceDTS = data.dts;\n }\n data.dts = handleRollover$1(data.dts, referenceDTS);\n data.pts = handleRollover$1(data.pts, referenceDTS);\n lastDTS = data.dts;\n this.trigger('data', data);\n };\n this.flush = function () {\n referenceDTS = lastDTS;\n this.trigger('done');\n };\n this.endTimeline = function () {\n this.flush();\n this.trigger('endedtimeline');\n };\n this.discontinuity = function () {\n referenceDTS = void 0;\n lastDTS = void 0;\n };\n this.reset = function () {\n this.discontinuity();\n this.trigger('reset');\n };\n };\n TimestampRolloverStream$1.prototype = new Stream$6();\n var timestampRolloverStream = {\n TimestampRolloverStream: TimestampRolloverStream$1,\n handleRollover: handleRollover$1\n }; // Once IE11 support is dropped, this function should be removed.\n\n var typedArrayIndexOf$1 = function typedArrayIndexOf$1(typedArray, element, fromIndex) {\n if (!typedArray) {\n return -1;\n }\n var currentIndex = fromIndex;\n for (; currentIndex < typedArray.length; currentIndex++) {\n if (typedArray[currentIndex] === element) {\n return currentIndex;\n }\n }\n return -1;\n };\n var typedArray = {\n typedArrayIndexOf: typedArrayIndexOf$1\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Tools for parsing ID3 frame data\n * @see http://id3.org/id3v2.3.0\n */\n\n var typedArrayIndexOf = typedArray.typedArrayIndexOf,\n // Frames that allow different types of text encoding contain a text\n // encoding description byte [ID3v2.4.0 section 4.]\n textEncodingDescriptionByte = {\n Iso88591: 0x00,\n // ISO-8859-1, terminated with \\0.\n Utf16: 0x01,\n // UTF-16 encoded Unicode BOM, terminated with \\0\\0\n Utf16be: 0x02,\n // UTF-16BE encoded Unicode, without BOM, terminated with \\0\\0\n Utf8: 0x03 // UTF-8 encoded Unicode, terminated with \\0\n },\n // return a percent-encoded representation of the specified byte range\n // @see http://en.wikipedia.org/wiki/Percent-encoding \n percentEncode$1 = function percentEncode$1(bytes, start, end) {\n var i,\n result = '';\n for (i = start; i < end; i++) {\n result += '%' + ('00' + bytes[i].toString(16)).slice(-2);\n }\n return result;\n },\n // return the string representation of the specified byte range,\n // interpreted as UTf-8.\n parseUtf8 = function parseUtf8(bytes, start, end) {\n return decodeURIComponent(percentEncode$1(bytes, start, end));\n },\n // return the string representation of the specified byte range,\n // interpreted as ISO-8859-1.\n parseIso88591$1 = function parseIso88591$1(bytes, start, end) {\n return unescape(percentEncode$1(bytes, start, end)); // jshint ignore:line\n },\n parseSyncSafeInteger$1 = function parseSyncSafeInteger$1(data) {\n return data[0] << 21 | data[1] << 14 | data[2] << 7 | data[3];\n },\n frameParsers = {\n 'APIC': function APIC(frame) {\n var i = 1,\n mimeTypeEndIndex,\n descriptionEndIndex,\n LINK_MIME_TYPE = '-->';\n if (frame.data[0] !== textEncodingDescriptionByte.Utf8) {\n // ignore frames with unrecognized character encodings\n return;\n } // parsing fields [ID3v2.4.0 section 4.14.]\n\n mimeTypeEndIndex = typedArrayIndexOf(frame.data, 0, i);\n if (mimeTypeEndIndex < 0) {\n // malformed frame\n return;\n } // parsing Mime type field (terminated with \\0)\n\n frame.mimeType = parseIso88591$1(frame.data, i, mimeTypeEndIndex);\n i = mimeTypeEndIndex + 1; // parsing 1-byte Picture Type field\n\n frame.pictureType = frame.data[i];\n i++;\n descriptionEndIndex = typedArrayIndexOf(frame.data, 0, i);\n if (descriptionEndIndex < 0) {\n // malformed frame\n return;\n } // parsing Description field (terminated with \\0)\n\n frame.description = parseUtf8(frame.data, i, descriptionEndIndex);\n i = descriptionEndIndex + 1;\n if (frame.mimeType === LINK_MIME_TYPE) {\n // parsing Picture Data field as URL (always represented as ISO-8859-1 [ID3v2.4.0 section 4.])\n frame.url = parseIso88591$1(frame.data, i, frame.data.length);\n } else {\n // parsing Picture Data field as binary data\n frame.pictureData = frame.data.subarray(i, frame.data.length);\n }\n },\n 'T*': function T(frame) {\n if (frame.data[0] !== textEncodingDescriptionByte.Utf8) {\n // ignore frames with unrecognized character encodings\n return;\n } // parse text field, do not include null terminator in the frame value\n // frames that allow different types of encoding contain terminated text [ID3v2.4.0 section 4.]\n\n frame.value = parseUtf8(frame.data, 1, frame.data.length).replace(/\\0*$/, ''); // text information frames supports multiple strings, stored as a terminator separated list [ID3v2.4.0 section 4.2.]\n\n frame.values = frame.value.split('\\0');\n },\n 'TXXX': function TXXX(frame) {\n var descriptionEndIndex;\n if (frame.data[0] !== textEncodingDescriptionByte.Utf8) {\n // ignore frames with unrecognized character encodings\n return;\n }\n descriptionEndIndex = typedArrayIndexOf(frame.data, 0, 1);\n if (descriptionEndIndex === -1) {\n return;\n } // parse the text fields\n\n frame.description = parseUtf8(frame.data, 1, descriptionEndIndex); // do not include the null terminator in the tag value\n // frames that allow different types of encoding contain terminated text\n // [ID3v2.4.0 section 4.]\n\n frame.value = parseUtf8(frame.data, descriptionEndIndex + 1, frame.data.length).replace(/\\0*$/, '');\n frame.data = frame.value;\n },\n 'W*': function W(frame) {\n // parse URL field; URL fields are always represented as ISO-8859-1 [ID3v2.4.0 section 4.]\n // if the value is followed by a string termination all the following information should be ignored [ID3v2.4.0 section 4.3]\n frame.url = parseIso88591$1(frame.data, 0, frame.data.length).replace(/\\0.*$/, '');\n },\n 'WXXX': function WXXX(frame) {\n var descriptionEndIndex;\n if (frame.data[0] !== textEncodingDescriptionByte.Utf8) {\n // ignore frames with unrecognized character encodings\n return;\n }\n descriptionEndIndex = typedArrayIndexOf(frame.data, 0, 1);\n if (descriptionEndIndex === -1) {\n return;\n } // parse the description and URL fields\n\n frame.description = parseUtf8(frame.data, 1, descriptionEndIndex); // URL fields are always represented as ISO-8859-1 [ID3v2.4.0 section 4.]\n // if the value is followed by a string termination all the following information\n // should be ignored [ID3v2.4.0 section 4.3]\n\n frame.url = parseIso88591$1(frame.data, descriptionEndIndex + 1, frame.data.length).replace(/\\0.*$/, '');\n },\n 'PRIV': function PRIV(frame) {\n var i;\n for (i = 0; i < frame.data.length; i++) {\n if (frame.data[i] === 0) {\n // parse the description and URL fields\n frame.owner = parseIso88591$1(frame.data, 0, i);\n break;\n }\n }\n frame.privateData = frame.data.subarray(i + 1);\n frame.data = frame.privateData;\n }\n };\n var parseId3Frames$1 = function parseId3Frames$1(data) {\n var frameSize,\n frameHeader,\n frameStart = 10,\n tagSize = 0,\n frames = []; // If we don't have enough data for a header, 10 bytes, \n // or 'ID3' in the first 3 bytes this is not a valid ID3 tag.\n\n if (data.length < 10 || data[0] !== 'I'.charCodeAt(0) || data[1] !== 'D'.charCodeAt(0) || data[2] !== '3'.charCodeAt(0)) {\n return;\n } // the frame size is transmitted as a 28-bit integer in the\n // last four bytes of the ID3 header.\n // The most significant bit of each byte is dropped and the\n // results concatenated to recover the actual value.\n\n tagSize = parseSyncSafeInteger$1(data.subarray(6, 10)); // ID3 reports the tag size excluding the header but it's more\n // convenient for our comparisons to include it\n\n tagSize += 10; // check bit 6 of byte 5 for the extended header flag.\n\n var hasExtendedHeader = data[5] & 0x40;\n if (hasExtendedHeader) {\n // advance the frame start past the extended header\n frameStart += 4; // header size field\n\n frameStart += parseSyncSafeInteger$1(data.subarray(10, 14));\n tagSize -= parseSyncSafeInteger$1(data.subarray(16, 20)); // clip any padding off the end\n } // parse one or more ID3 frames\n // http://id3.org/id3v2.3.0#ID3v2_frame_overview\n\n do {\n // determine the number of bytes in this frame\n frameSize = parseSyncSafeInteger$1(data.subarray(frameStart + 4, frameStart + 8));\n if (frameSize < 1) {\n break;\n }\n frameHeader = String.fromCharCode(data[frameStart], data[frameStart + 1], data[frameStart + 2], data[frameStart + 3]);\n var frame = {\n id: frameHeader,\n data: data.subarray(frameStart + 10, frameStart + frameSize + 10)\n };\n frame.key = frame.id; // parse frame values\n\n if (frameParsers[frame.id]) {\n // use frame specific parser\n frameParsers[frame.id](frame);\n } else if (frame.id[0] === 'T') {\n // use text frame generic parser\n frameParsers['T*'](frame);\n } else if (frame.id[0] === 'W') {\n // use URL link frame generic parser\n frameParsers['W*'](frame);\n }\n frames.push(frame);\n frameStart += 10; // advance past the frame header\n\n frameStart += frameSize; // advance past the frame body\n } while (frameStart < tagSize);\n return frames;\n };\n var parseId3 = {\n parseId3Frames: parseId3Frames$1,\n parseSyncSafeInteger: parseSyncSafeInteger$1,\n frameParsers: frameParsers\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Accepts program elementary stream (PES) data events and parses out\n * ID3 metadata from them, if present.\n * @see http://id3.org/id3v2.3.0\n */\n\n var Stream$5 = stream,\n StreamTypes$3 = streamTypes,\n id3 = parseId3,\n _MetadataStream;\n _MetadataStream = function MetadataStream(options) {\n var settings = {\n // the bytes of the program-level descriptor field in MP2T\n // see ISO/IEC 13818-1:2013 (E), section 2.6 \"Program and\n // program element descriptors\"\n descriptor: options && options.descriptor\n },\n // the total size in bytes of the ID3 tag being parsed\n tagSize = 0,\n // tag data that is not complete enough to be parsed\n buffer = [],\n // the total number of bytes currently in the buffer\n bufferSize = 0,\n i;\n _MetadataStream.prototype.init.call(this); // calculate the text track in-band metadata track dispatch type\n // https://html.spec.whatwg.org/multipage/embedded-content.html#steps-to-expose-a-media-resource-specific-text-track\n\n this.dispatchType = StreamTypes$3.METADATA_STREAM_TYPE.toString(16);\n if (settings.descriptor) {\n for (i = 0; i < settings.descriptor.length; i++) {\n this.dispatchType += ('00' + settings.descriptor[i].toString(16)).slice(-2);\n }\n }\n this.push = function (chunk) {\n var tag, frameStart, frameSize, frame, i, frameHeader;\n if (chunk.type !== 'timed-metadata') {\n return;\n } // if data_alignment_indicator is set in the PES header,\n // we must have the start of a new ID3 tag. Assume anything\n // remaining in the buffer was malformed and throw it out\n\n if (chunk.dataAlignmentIndicator) {\n bufferSize = 0;\n buffer.length = 0;\n } // ignore events that don't look like ID3 data\n\n if (buffer.length === 0 && (chunk.data.length < 10 || chunk.data[0] !== 'I'.charCodeAt(0) || chunk.data[1] !== 'D'.charCodeAt(0) || chunk.data[2] !== '3'.charCodeAt(0))) {\n this.trigger('log', {\n level: 'warn',\n message: 'Skipping unrecognized metadata packet'\n });\n return;\n } // add this chunk to the data we've collected so far\n\n buffer.push(chunk);\n bufferSize += chunk.data.byteLength; // grab the size of the entire frame from the ID3 header\n\n if (buffer.length === 1) {\n // the frame size is transmitted as a 28-bit integer in the\n // last four bytes of the ID3 header.\n // The most significant bit of each byte is dropped and the\n // results concatenated to recover the actual value.\n tagSize = id3.parseSyncSafeInteger(chunk.data.subarray(6, 10)); // ID3 reports the tag size excluding the header but it's more\n // convenient for our comparisons to include it\n\n tagSize += 10;\n } // if the entire frame has not arrived, wait for more data\n\n if (bufferSize < tagSize) {\n return;\n } // collect the entire frame so it can be parsed\n\n tag = {\n data: new Uint8Array(tagSize),\n frames: [],\n pts: buffer[0].pts,\n dts: buffer[0].dts\n };\n for (i = 0; i < tagSize;) {\n tag.data.set(buffer[0].data.subarray(0, tagSize - i), i);\n i += buffer[0].data.byteLength;\n bufferSize -= buffer[0].data.byteLength;\n buffer.shift();\n } // find the start of the first frame and the end of the tag\n\n frameStart = 10;\n if (tag.data[5] & 0x40) {\n // advance the frame start past the extended header\n frameStart += 4; // header size field\n\n frameStart += id3.parseSyncSafeInteger(tag.data.subarray(10, 14)); // clip any padding off the end\n\n tagSize -= id3.parseSyncSafeInteger(tag.data.subarray(16, 20));\n } // parse one or more ID3 frames\n // http://id3.org/id3v2.3.0#ID3v2_frame_overview\n\n do {\n // determine the number of bytes in this frame\n frameSize = id3.parseSyncSafeInteger(tag.data.subarray(frameStart + 4, frameStart + 8));\n if (frameSize < 1) {\n this.trigger('log', {\n level: 'warn',\n message: 'Malformed ID3 frame encountered. Skipping remaining metadata parsing.'\n }); // If the frame is malformed, don't parse any further frames but allow previous valid parsed frames\n // to be sent along.\n\n break;\n }\n frameHeader = String.fromCharCode(tag.data[frameStart], tag.data[frameStart + 1], tag.data[frameStart + 2], tag.data[frameStart + 3]);\n frame = {\n id: frameHeader,\n data: tag.data.subarray(frameStart + 10, frameStart + frameSize + 10)\n };\n frame.key = frame.id; // parse frame values\n\n if (id3.frameParsers[frame.id]) {\n // use frame specific parser\n id3.frameParsers[frame.id](frame);\n } else if (frame.id[0] === 'T') {\n // use text frame generic parser\n id3.frameParsers['T*'](frame);\n } else if (frame.id[0] === 'W') {\n // use URL link frame generic parser\n id3.frameParsers['W*'](frame);\n } // handle the special PRIV frame used to indicate the start\n // time for raw AAC data\n\n if (frame.owner === 'com.apple.streaming.transportStreamTimestamp') {\n var d = frame.data,\n size = (d[3] & 0x01) << 30 | d[4] << 22 | d[5] << 14 | d[6] << 6 | d[7] >>> 2;\n size *= 4;\n size += d[7] & 0x03;\n frame.timeStamp = size; // in raw AAC, all subsequent data will be timestamped based\n // on the value of this frame\n // we couldn't have known the appropriate pts and dts before\n // parsing this ID3 tag so set those values now\n\n if (tag.pts === undefined && tag.dts === undefined) {\n tag.pts = frame.timeStamp;\n tag.dts = frame.timeStamp;\n }\n this.trigger('timestamp', frame);\n }\n tag.frames.push(frame);\n frameStart += 10; // advance past the frame header\n\n frameStart += frameSize; // advance past the frame body\n } while (frameStart < tagSize);\n this.trigger('data', tag);\n };\n };\n _MetadataStream.prototype = new Stream$5();\n var metadataStream = _MetadataStream;\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * A stream-based mp2t to mp4 converter. This utility can be used to\n * deliver mp4s to a SourceBuffer on platforms that support native\n * Media Source Extensions.\n */\n\n var Stream$4 = stream,\n CaptionStream$1 = captionStream,\n StreamTypes$2 = streamTypes,\n TimestampRolloverStream = timestampRolloverStream.TimestampRolloverStream; // object types\n\n var _TransportPacketStream, _TransportParseStream, _ElementaryStream; // constants\n\n var MP2T_PACKET_LENGTH$1 = 188,\n // bytes\n SYNC_BYTE$1 = 0x47;\n /**\n * Splits an incoming stream of binary data into MPEG-2 Transport\n * Stream packets.\n */\n\n _TransportPacketStream = function TransportPacketStream() {\n var buffer = new Uint8Array(MP2T_PACKET_LENGTH$1),\n bytesInBuffer = 0;\n _TransportPacketStream.prototype.init.call(this); // Deliver new bytes to the stream.\n\n /**\n * Split a stream of data into M2TS packets\n **/\n\n this.push = function (bytes) {\n var startIndex = 0,\n endIndex = MP2T_PACKET_LENGTH$1,\n everything; // If there are bytes remaining from the last segment, prepend them to the\n // bytes that were pushed in\n\n if (bytesInBuffer) {\n everything = new Uint8Array(bytes.byteLength + bytesInBuffer);\n everything.set(buffer.subarray(0, bytesInBuffer));\n everything.set(bytes, bytesInBuffer);\n bytesInBuffer = 0;\n } else {\n everything = bytes;\n } // While we have enough data for a packet\n\n while (endIndex < everything.byteLength) {\n // Look for a pair of start and end sync bytes in the data..\n if (everything[startIndex] === SYNC_BYTE$1 && everything[endIndex] === SYNC_BYTE$1) {\n // We found a packet so emit it and jump one whole packet forward in\n // the stream\n this.trigger('data', everything.subarray(startIndex, endIndex));\n startIndex += MP2T_PACKET_LENGTH$1;\n endIndex += MP2T_PACKET_LENGTH$1;\n continue;\n } // If we get here, we have somehow become de-synchronized and we need to step\n // forward one byte at a time until we find a pair of sync bytes that denote\n // a packet\n\n startIndex++;\n endIndex++;\n } // If there was some data left over at the end of the segment that couldn't\n // possibly be a whole packet, keep it because it might be the start of a packet\n // that continues in the next segment\n\n if (startIndex < everything.byteLength) {\n buffer.set(everything.subarray(startIndex), 0);\n bytesInBuffer = everything.byteLength - startIndex;\n }\n };\n /**\n * Passes identified M2TS packets to the TransportParseStream to be parsed\n **/\n\n this.flush = function () {\n // If the buffer contains a whole packet when we are being flushed, emit it\n // and empty the buffer. Otherwise hold onto the data because it may be\n // important for decoding the next segment\n if (bytesInBuffer === MP2T_PACKET_LENGTH$1 && buffer[0] === SYNC_BYTE$1) {\n this.trigger('data', buffer);\n bytesInBuffer = 0;\n }\n this.trigger('done');\n };\n this.endTimeline = function () {\n this.flush();\n this.trigger('endedtimeline');\n };\n this.reset = function () {\n bytesInBuffer = 0;\n this.trigger('reset');\n };\n };\n _TransportPacketStream.prototype = new Stream$4();\n /**\n * Accepts an MP2T TransportPacketStream and emits data events with parsed\n * forms of the individual transport stream packets.\n */\n\n _TransportParseStream = function TransportParseStream() {\n var parsePsi, parsePat, parsePmt, self;\n _TransportParseStream.prototype.init.call(this);\n self = this;\n this.packetsWaitingForPmt = [];\n this.programMapTable = undefined;\n parsePsi = function parsePsi(payload, psi) {\n var offset = 0; // PSI packets may be split into multiple sections and those\n // sections may be split into multiple packets. If a PSI\n // section starts in this packet, the payload_unit_start_indicator\n // will be true and the first byte of the payload will indicate\n // the offset from the current position to the start of the\n // section.\n\n if (psi.payloadUnitStartIndicator) {\n offset += payload[offset] + 1;\n }\n if (psi.type === 'pat') {\n parsePat(payload.subarray(offset), psi);\n } else {\n parsePmt(payload.subarray(offset), psi);\n }\n };\n parsePat = function parsePat(payload, pat) {\n pat.section_number = payload[7]; // eslint-disable-line camelcase\n\n pat.last_section_number = payload[8]; // eslint-disable-line camelcase\n // skip the PSI header and parse the first PMT entry\n\n self.pmtPid = (payload[10] & 0x1F) << 8 | payload[11];\n pat.pmtPid = self.pmtPid;\n };\n /**\n * Parse out the relevant fields of a Program Map Table (PMT).\n * @param payload {Uint8Array} the PMT-specific portion of an MP2T\n * packet. The first byte in this array should be the table_id\n * field.\n * @param pmt {object} the object that should be decorated with\n * fields parsed from the PMT.\n */\n\n parsePmt = function parsePmt(payload, pmt) {\n var sectionLength, tableEnd, programInfoLength, offset; // PMTs can be sent ahead of the time when they should actually\n // take effect. We don't believe this should ever be the case\n // for HLS but we'll ignore \"forward\" PMT declarations if we see\n // them. Future PMT declarations have the current_next_indicator\n // set to zero.\n\n if (!(payload[5] & 0x01)) {\n return;\n } // overwrite any existing program map table\n\n self.programMapTable = {\n video: null,\n audio: null,\n 'timed-metadata': {}\n }; // the mapping table ends at the end of the current section\n\n sectionLength = (payload[1] & 0x0f) << 8 | payload[2];\n tableEnd = 3 + sectionLength - 4; // to determine where the table is, we have to figure out how\n // long the program info descriptors are\n\n programInfoLength = (payload[10] & 0x0f) << 8 | payload[11]; // advance the offset to the first entry in the mapping table\n\n offset = 12 + programInfoLength;\n while (offset < tableEnd) {\n var streamType = payload[offset];\n var pid = (payload[offset + 1] & 0x1F) << 8 | payload[offset + 2]; // only map a single elementary_pid for audio and video stream types\n // TODO: should this be done for metadata too? for now maintain behavior of\n // multiple metadata streams\n\n if (streamType === StreamTypes$2.H264_STREAM_TYPE && self.programMapTable.video === null) {\n self.programMapTable.video = pid;\n } else if (streamType === StreamTypes$2.ADTS_STREAM_TYPE && self.programMapTable.audio === null) {\n self.programMapTable.audio = pid;\n } else if (streamType === StreamTypes$2.METADATA_STREAM_TYPE) {\n // map pid to stream type for metadata streams\n self.programMapTable['timed-metadata'][pid] = streamType;\n } // move to the next table entry\n // skip past the elementary stream descriptors, if present\n\n offset += ((payload[offset + 3] & 0x0F) << 8 | payload[offset + 4]) + 5;\n } // record the map on the packet as well\n\n pmt.programMapTable = self.programMapTable;\n };\n /**\n * Deliver a new MP2T packet to the next stream in the pipeline.\n */\n\n this.push = function (packet) {\n var result = {},\n offset = 4;\n result.payloadUnitStartIndicator = !!(packet[1] & 0x40); // pid is a 13-bit field starting at the last bit of packet[1]\n\n result.pid = packet[1] & 0x1f;\n result.pid <<= 8;\n result.pid |= packet[2]; // if an adaption field is present, its length is specified by the\n // fifth byte of the TS packet header. The adaptation field is\n // used to add stuffing to PES packets that don't fill a complete\n // TS packet, and to specify some forms of timing and control data\n // that we do not currently use.\n\n if ((packet[3] & 0x30) >>> 4 > 0x01) {\n offset += packet[offset] + 1;\n } // parse the rest of the packet based on the type\n\n if (result.pid === 0) {\n result.type = 'pat';\n parsePsi(packet.subarray(offset), result);\n this.trigger('data', result);\n } else if (result.pid === this.pmtPid) {\n result.type = 'pmt';\n parsePsi(packet.subarray(offset), result);\n this.trigger('data', result); // if there are any packets waiting for a PMT to be found, process them now\n\n while (this.packetsWaitingForPmt.length) {\n this.processPes_.apply(this, this.packetsWaitingForPmt.shift());\n }\n } else if (this.programMapTable === undefined) {\n // When we have not seen a PMT yet, defer further processing of\n // PES packets until one has been parsed\n this.packetsWaitingForPmt.push([packet, offset, result]);\n } else {\n this.processPes_(packet, offset, result);\n }\n };\n this.processPes_ = function (packet, offset, result) {\n // set the appropriate stream type\n if (result.pid === this.programMapTable.video) {\n result.streamType = StreamTypes$2.H264_STREAM_TYPE;\n } else if (result.pid === this.programMapTable.audio) {\n result.streamType = StreamTypes$2.ADTS_STREAM_TYPE;\n } else {\n // if not video or audio, it is timed-metadata or unknown\n // if unknown, streamType will be undefined\n result.streamType = this.programMapTable['timed-metadata'][result.pid];\n }\n result.type = 'pes';\n result.data = packet.subarray(offset);\n this.trigger('data', result);\n };\n };\n _TransportParseStream.prototype = new Stream$4();\n _TransportParseStream.STREAM_TYPES = {\n h264: 0x1b,\n adts: 0x0f\n };\n /**\n * Reconsistutes program elementary stream (PES) packets from parsed\n * transport stream packets. That is, if you pipe an\n * mp2t.TransportParseStream into a mp2t.ElementaryStream, the output\n * events will be events which capture the bytes for individual PES\n * packets plus relevant metadata that has been extracted from the\n * container.\n */\n\n _ElementaryStream = function ElementaryStream() {\n var self = this,\n segmentHadPmt = false,\n // PES packet fragments\n video = {\n data: [],\n size: 0\n },\n audio = {\n data: [],\n size: 0\n },\n timedMetadata = {\n data: [],\n size: 0\n },\n programMapTable,\n parsePes = function parsePes(payload, pes) {\n var ptsDtsFlags;\n var startPrefix = payload[0] << 16 | payload[1] << 8 | payload[2]; // default to an empty array\n\n pes.data = new Uint8Array(); // In certain live streams, the start of a TS fragment has ts packets\n // that are frame data that is continuing from the previous fragment. This\n // is to check that the pes data is the start of a new pes payload\n\n if (startPrefix !== 1) {\n return;\n } // get the packet length, this will be 0 for video\n\n pes.packetLength = 6 + (payload[4] << 8 | payload[5]); // find out if this packets starts a new keyframe\n\n pes.dataAlignmentIndicator = (payload[6] & 0x04) !== 0; // PES packets may be annotated with a PTS value, or a PTS value\n // and a DTS value. Determine what combination of values is\n // available to work with.\n\n ptsDtsFlags = payload[7]; // PTS and DTS are normally stored as a 33-bit number. Javascript\n // performs all bitwise operations on 32-bit integers but javascript\n // supports a much greater range (52-bits) of integer using standard\n // mathematical operations.\n // We construct a 31-bit value using bitwise operators over the 31\n // most significant bits and then multiply by 4 (equal to a left-shift\n // of 2) before we add the final 2 least significant bits of the\n // timestamp (equal to an OR.)\n\n if (ptsDtsFlags & 0xC0) {\n // the PTS and DTS are not written out directly. For information\n // on how they are encoded, see\n // http://dvd.sourceforge.net/dvdinfo/pes-hdr.html\n pes.pts = (payload[9] & 0x0E) << 27 | (payload[10] & 0xFF) << 20 | (payload[11] & 0xFE) << 12 | (payload[12] & 0xFF) << 5 | (payload[13] & 0xFE) >>> 3;\n pes.pts *= 4; // Left shift by 2\n\n pes.pts += (payload[13] & 0x06) >>> 1; // OR by the two LSBs\n\n pes.dts = pes.pts;\n if (ptsDtsFlags & 0x40) {\n pes.dts = (payload[14] & 0x0E) << 27 | (payload[15] & 0xFF) << 20 | (payload[16] & 0xFE) << 12 | (payload[17] & 0xFF) << 5 | (payload[18] & 0xFE) >>> 3;\n pes.dts *= 4; // Left shift by 2\n\n pes.dts += (payload[18] & 0x06) >>> 1; // OR by the two LSBs\n }\n } // the data section starts immediately after the PES header.\n // pes_header_data_length specifies the number of header bytes\n // that follow the last byte of the field.\n\n pes.data = payload.subarray(9 + payload[8]);\n },\n /**\n * Pass completely parsed PES packets to the next stream in the pipeline\n **/\n flushStream = function flushStream(stream, type, forceFlush) {\n var packetData = new Uint8Array(stream.size),\n event = {\n type: type\n },\n i = 0,\n offset = 0,\n packetFlushable = false,\n fragment; // do nothing if there is not enough buffered data for a complete\n // PES header\n\n if (!stream.data.length || stream.size < 9) {\n return;\n }\n event.trackId = stream.data[0].pid; // reassemble the packet\n\n for (i = 0; i < stream.data.length; i++) {\n fragment = stream.data[i];\n packetData.set(fragment.data, offset);\n offset += fragment.data.byteLength;\n } // parse assembled packet's PES header\n\n parsePes(packetData, event); // non-video PES packets MUST have a non-zero PES_packet_length\n // check that there is enough stream data to fill the packet\n\n packetFlushable = type === 'video' || event.packetLength <= stream.size; // flush pending packets if the conditions are right\n\n if (forceFlush || packetFlushable) {\n stream.size = 0;\n stream.data.length = 0;\n } // only emit packets that are complete. this is to avoid assembling\n // incomplete PES packets due to poor segmentation\n\n if (packetFlushable) {\n self.trigger('data', event);\n }\n };\n _ElementaryStream.prototype.init.call(this);\n /**\n * Identifies M2TS packet types and parses PES packets using metadata\n * parsed from the PMT\n **/\n\n this.push = function (data) {\n ({\n pat: function pat() {// we have to wait for the PMT to arrive as well before we\n // have any meaningful metadata\n },\n pes: function pes() {\n var stream, streamType;\n switch (data.streamType) {\n case StreamTypes$2.H264_STREAM_TYPE:\n stream = video;\n streamType = 'video';\n break;\n case StreamTypes$2.ADTS_STREAM_TYPE:\n stream = audio;\n streamType = 'audio';\n break;\n case StreamTypes$2.METADATA_STREAM_TYPE:\n stream = timedMetadata;\n streamType = 'timed-metadata';\n break;\n default:\n // ignore unknown stream types\n return;\n } // if a new packet is starting, we can flush the completed\n // packet\n\n if (data.payloadUnitStartIndicator) {\n flushStream(stream, streamType, true);\n } // buffer this fragment until we are sure we've received the\n // complete payload\n\n stream.data.push(data);\n stream.size += data.data.byteLength;\n },\n pmt: function pmt() {\n var event = {\n type: 'metadata',\n tracks: []\n };\n programMapTable = data.programMapTable; // translate audio and video streams to tracks\n\n if (programMapTable.video !== null) {\n event.tracks.push({\n timelineStartInfo: {\n baseMediaDecodeTime: 0\n },\n id: +programMapTable.video,\n codec: 'avc',\n type: 'video'\n });\n }\n if (programMapTable.audio !== null) {\n event.tracks.push({\n timelineStartInfo: {\n baseMediaDecodeTime: 0\n },\n id: +programMapTable.audio,\n codec: 'adts',\n type: 'audio'\n });\n }\n segmentHadPmt = true;\n self.trigger('data', event);\n }\n })[data.type]();\n };\n this.reset = function () {\n video.size = 0;\n video.data.length = 0;\n audio.size = 0;\n audio.data.length = 0;\n this.trigger('reset');\n };\n /**\n * Flush any remaining input. Video PES packets may be of variable\n * length. Normally, the start of a new video packet can trigger the\n * finalization of the previous packet. That is not possible if no\n * more video is forthcoming, however. In that case, some other\n * mechanism (like the end of the file) has to be employed. When it is\n * clear that no additional data is forthcoming, calling this method\n * will flush the buffered packets.\n */\n\n this.flushStreams_ = function () {\n // !!THIS ORDER IS IMPORTANT!!\n // video first then audio\n flushStream(video, 'video');\n flushStream(audio, 'audio');\n flushStream(timedMetadata, 'timed-metadata');\n };\n this.flush = function () {\n // if on flush we haven't had a pmt emitted\n // and we have a pmt to emit. emit the pmt\n // so that we trigger a trackinfo downstream.\n if (!segmentHadPmt && programMapTable) {\n var pmt = {\n type: 'metadata',\n tracks: []\n }; // translate audio and video streams to tracks\n\n if (programMapTable.video !== null) {\n pmt.tracks.push({\n timelineStartInfo: {\n baseMediaDecodeTime: 0\n },\n id: +programMapTable.video,\n codec: 'avc',\n type: 'video'\n });\n }\n if (programMapTable.audio !== null) {\n pmt.tracks.push({\n timelineStartInfo: {\n baseMediaDecodeTime: 0\n },\n id: +programMapTable.audio,\n codec: 'adts',\n type: 'audio'\n });\n }\n self.trigger('data', pmt);\n }\n segmentHadPmt = false;\n this.flushStreams_();\n this.trigger('done');\n };\n };\n _ElementaryStream.prototype = new Stream$4();\n var m2ts$1 = {\n PAT_PID: 0x0000,\n MP2T_PACKET_LENGTH: MP2T_PACKET_LENGTH$1,\n TransportPacketStream: _TransportPacketStream,\n TransportParseStream: _TransportParseStream,\n ElementaryStream: _ElementaryStream,\n TimestampRolloverStream: TimestampRolloverStream,\n CaptionStream: CaptionStream$1.CaptionStream,\n Cea608Stream: CaptionStream$1.Cea608Stream,\n Cea708Stream: CaptionStream$1.Cea708Stream,\n MetadataStream: metadataStream\n };\n for (var type in StreamTypes$2) {\n if (StreamTypes$2.hasOwnProperty(type)) {\n m2ts$1[type] = StreamTypes$2[type];\n }\n }\n var m2ts_1 = m2ts$1;\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n */\n\n var Stream$3 = stream;\n var ONE_SECOND_IN_TS$2 = clock$2.ONE_SECOND_IN_TS;\n var _AdtsStream$;\n var ADTS_SAMPLING_FREQUENCIES$1 = [96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 7350];\n /*\n * Accepts a ElementaryStream and emits data events with parsed\n * AAC Audio Frames of the individual packets. Input audio in ADTS\n * format is unpacked and re-emitted as AAC frames.\n *\n * @see http://wiki.multimedia.cx/index.php?title=ADTS\n * @see http://wiki.multimedia.cx/?title=Understanding_AAC\n */\n\n _AdtsStream$ = function AdtsStream$1(handlePartialSegments) {\n var buffer,\n frameNum = 0;\n _AdtsStream$.prototype.init.call(this);\n this.skipWarn_ = function (start, end) {\n this.trigger('log', {\n level: 'warn',\n message: \"adts skiping bytes \".concat(start, \" to \").concat(end, \" in frame \").concat(frameNum, \" outside syncword\")\n });\n };\n this.push = function (packet) {\n var i = 0,\n frameLength,\n protectionSkipBytes,\n oldBuffer,\n sampleCount,\n adtsFrameDuration;\n if (!handlePartialSegments) {\n frameNum = 0;\n }\n if (packet.type !== 'audio') {\n // ignore non-audio data\n return;\n } // Prepend any data in the buffer to the input data so that we can parse\n // aac frames the cross a PES packet boundary\n\n if (buffer && buffer.length) {\n oldBuffer = buffer;\n buffer = new Uint8Array(oldBuffer.byteLength + packet.data.byteLength);\n buffer.set(oldBuffer);\n buffer.set(packet.data, oldBuffer.byteLength);\n } else {\n buffer = packet.data;\n } // unpack any ADTS frames which have been fully received\n // for details on the ADTS header, see http://wiki.multimedia.cx/index.php?title=ADTS\n\n var skip; // We use i + 7 here because we want to be able to parse the entire header.\n // If we don't have enough bytes to do that, then we definitely won't have a full frame.\n\n while (i + 7 < buffer.length) {\n // Look for the start of an ADTS header..\n if (buffer[i] !== 0xFF || (buffer[i + 1] & 0xF6) !== 0xF0) {\n if (typeof skip !== 'number') {\n skip = i;\n } // If a valid header was not found, jump one forward and attempt to\n // find a valid ADTS header starting at the next byte\n\n i++;\n continue;\n }\n if (typeof skip === 'number') {\n this.skipWarn_(skip, i);\n skip = null;\n } // The protection skip bit tells us if we have 2 bytes of CRC data at the\n // end of the ADTS header\n\n protectionSkipBytes = (~buffer[i + 1] & 0x01) * 2; // Frame length is a 13 bit integer starting 16 bits from the\n // end of the sync sequence\n // NOTE: frame length includes the size of the header\n\n frameLength = (buffer[i + 3] & 0x03) << 11 | buffer[i + 4] << 3 | (buffer[i + 5] & 0xe0) >> 5;\n sampleCount = ((buffer[i + 6] & 0x03) + 1) * 1024;\n adtsFrameDuration = sampleCount * ONE_SECOND_IN_TS$2 / ADTS_SAMPLING_FREQUENCIES$1[(buffer[i + 2] & 0x3c) >>> 2]; // If we don't have enough data to actually finish this ADTS frame,\n // then we have to wait for more data\n\n if (buffer.byteLength - i < frameLength) {\n break;\n } // Otherwise, deliver the complete AAC frame\n\n this.trigger('data', {\n pts: packet.pts + frameNum * adtsFrameDuration,\n dts: packet.dts + frameNum * adtsFrameDuration,\n sampleCount: sampleCount,\n audioobjecttype: (buffer[i + 2] >>> 6 & 0x03) + 1,\n channelcount: (buffer[i + 2] & 1) << 2 | (buffer[i + 3] & 0xc0) >>> 6,\n samplerate: ADTS_SAMPLING_FREQUENCIES$1[(buffer[i + 2] & 0x3c) >>> 2],\n samplingfrequencyindex: (buffer[i + 2] & 0x3c) >>> 2,\n // assume ISO/IEC 14496-12 AudioSampleEntry default of 16\n samplesize: 16,\n // data is the frame without it's header\n data: buffer.subarray(i + 7 + protectionSkipBytes, i + frameLength)\n });\n frameNum++;\n i += frameLength;\n }\n if (typeof skip === 'number') {\n this.skipWarn_(skip, i);\n skip = null;\n } // remove processed bytes from the buffer.\n\n buffer = buffer.subarray(i);\n };\n this.flush = function () {\n frameNum = 0;\n this.trigger('done');\n };\n this.reset = function () {\n buffer = void 0;\n this.trigger('reset');\n };\n this.endTimeline = function () {\n buffer = void 0;\n this.trigger('endedtimeline');\n };\n };\n _AdtsStream$.prototype = new Stream$3();\n var adts = _AdtsStream$;\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n */\n\n var ExpGolomb$1;\n /**\n * Parser for exponential Golomb codes, a variable-bitwidth number encoding\n * scheme used by h264.\n */\n\n ExpGolomb$1 = function ExpGolomb$1(workingData) {\n var\n // the number of bytes left to examine in workingData\n workingBytesAvailable = workingData.byteLength,\n // the current word being examined\n workingWord = 0,\n // :uint\n // the number of bits left to examine in the current word\n workingBitsAvailable = 0; // :uint;\n // ():uint\n\n this.length = function () {\n return 8 * workingBytesAvailable;\n }; // ():uint\n\n this.bitsAvailable = function () {\n return 8 * workingBytesAvailable + workingBitsAvailable;\n }; // ():void\n\n this.loadWord = function () {\n var position = workingData.byteLength - workingBytesAvailable,\n workingBytes = new Uint8Array(4),\n availableBytes = Math.min(4, workingBytesAvailable);\n if (availableBytes === 0) {\n throw new Error('no bytes available');\n }\n workingBytes.set(workingData.subarray(position, position + availableBytes));\n workingWord = new DataView(workingBytes.buffer).getUint32(0); // track the amount of workingData that has been processed\n\n workingBitsAvailable = availableBytes * 8;\n workingBytesAvailable -= availableBytes;\n }; // (count:int):void\n\n this.skipBits = function (count) {\n var skipBytes; // :int\n\n if (workingBitsAvailable > count) {\n workingWord <<= count;\n workingBitsAvailable -= count;\n } else {\n count -= workingBitsAvailable;\n skipBytes = Math.floor(count / 8);\n count -= skipBytes * 8;\n workingBytesAvailable -= skipBytes;\n this.loadWord();\n workingWord <<= count;\n workingBitsAvailable -= count;\n }\n }; // (size:int):uint\n\n this.readBits = function (size) {\n var bits = Math.min(workingBitsAvailable, size),\n // :uint\n valu = workingWord >>> 32 - bits; // :uint\n // if size > 31, handle error\n\n workingBitsAvailable -= bits;\n if (workingBitsAvailable > 0) {\n workingWord <<= bits;\n } else if (workingBytesAvailable > 0) {\n this.loadWord();\n }\n bits = size - bits;\n if (bits > 0) {\n return valu << bits | this.readBits(bits);\n }\n return valu;\n }; // ():uint\n\n this.skipLeadingZeros = function () {\n var leadingZeroCount; // :uint\n\n for (leadingZeroCount = 0; leadingZeroCount < workingBitsAvailable; ++leadingZeroCount) {\n if ((workingWord & 0x80000000 >>> leadingZeroCount) !== 0) {\n // the first bit of working word is 1\n workingWord <<= leadingZeroCount;\n workingBitsAvailable -= leadingZeroCount;\n return leadingZeroCount;\n }\n } // we exhausted workingWord and still have not found a 1\n\n this.loadWord();\n return leadingZeroCount + this.skipLeadingZeros();\n }; // ():void\n\n this.skipUnsignedExpGolomb = function () {\n this.skipBits(1 + this.skipLeadingZeros());\n }; // ():void\n\n this.skipExpGolomb = function () {\n this.skipBits(1 + this.skipLeadingZeros());\n }; // ():uint\n\n this.readUnsignedExpGolomb = function () {\n var clz = this.skipLeadingZeros(); // :uint\n\n return this.readBits(clz + 1) - 1;\n }; // ():int\n\n this.readExpGolomb = function () {\n var valu = this.readUnsignedExpGolomb(); // :int\n\n if (0x01 & valu) {\n // the number is odd if the low order bit is set\n return 1 + valu >>> 1; // add 1 to make it even, and divide by 2\n }\n return -1 * (valu >>> 1); // divide by two then make it negative\n }; // Some convenience functions\n // :Boolean\n\n this.readBoolean = function () {\n return this.readBits(1) === 1;\n }; // ():int\n\n this.readUnsignedByte = function () {\n return this.readBits(8);\n };\n this.loadWord();\n };\n var expGolomb = ExpGolomb$1;\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n */\n\n var Stream$2 = stream;\n var ExpGolomb = expGolomb;\n var _H264Stream$, _NalByteStream;\n var PROFILES_WITH_OPTIONAL_SPS_DATA;\n /**\n * Accepts a NAL unit byte stream and unpacks the embedded NAL units.\n */\n\n _NalByteStream = function NalByteStream() {\n var syncPoint = 0,\n i,\n buffer;\n _NalByteStream.prototype.init.call(this);\n /*\n * Scans a byte stream and triggers a data event with the NAL units found.\n * @param {Object} data Event received from H264Stream\n * @param {Uint8Array} data.data The h264 byte stream to be scanned\n *\n * @see H264Stream.push\n */\n\n this.push = function (data) {\n var swapBuffer;\n if (!buffer) {\n buffer = data.data;\n } else {\n swapBuffer = new Uint8Array(buffer.byteLength + data.data.byteLength);\n swapBuffer.set(buffer);\n swapBuffer.set(data.data, buffer.byteLength);\n buffer = swapBuffer;\n }\n var len = buffer.byteLength; // Rec. ITU-T H.264, Annex B\n // scan for NAL unit boundaries\n // a match looks like this:\n // 0 0 1 .. NAL .. 0 0 1\n // ^ sync point ^ i\n // or this:\n // 0 0 1 .. NAL .. 0 0 0\n // ^ sync point ^ i\n // advance the sync point to a NAL start, if necessary\n\n for (; syncPoint < len - 3; syncPoint++) {\n if (buffer[syncPoint + 2] === 1) {\n // the sync point is properly aligned\n i = syncPoint + 5;\n break;\n }\n }\n while (i < len) {\n // look at the current byte to determine if we've hit the end of\n // a NAL unit boundary\n switch (buffer[i]) {\n case 0:\n // skip past non-sync sequences\n if (buffer[i - 1] !== 0) {\n i += 2;\n break;\n } else if (buffer[i - 2] !== 0) {\n i++;\n break;\n } // deliver the NAL unit if it isn't empty\n\n if (syncPoint + 3 !== i - 2) {\n this.trigger('data', buffer.subarray(syncPoint + 3, i - 2));\n } // drop trailing zeroes\n\n do {\n i++;\n } while (buffer[i] !== 1 && i < len);\n syncPoint = i - 2;\n i += 3;\n break;\n case 1:\n // skip past non-sync sequences\n if (buffer[i - 1] !== 0 || buffer[i - 2] !== 0) {\n i += 3;\n break;\n } // deliver the NAL unit\n\n this.trigger('data', buffer.subarray(syncPoint + 3, i - 2));\n syncPoint = i - 2;\n i += 3;\n break;\n default:\n // the current byte isn't a one or zero, so it cannot be part\n // of a sync sequence\n i += 3;\n break;\n }\n } // filter out the NAL units that were delivered\n\n buffer = buffer.subarray(syncPoint);\n i -= syncPoint;\n syncPoint = 0;\n };\n this.reset = function () {\n buffer = null;\n syncPoint = 0;\n this.trigger('reset');\n };\n this.flush = function () {\n // deliver the last buffered NAL unit\n if (buffer && buffer.byteLength > 3) {\n this.trigger('data', buffer.subarray(syncPoint + 3));\n } // reset the stream state\n\n buffer = null;\n syncPoint = 0;\n this.trigger('done');\n };\n this.endTimeline = function () {\n this.flush();\n this.trigger('endedtimeline');\n };\n };\n _NalByteStream.prototype = new Stream$2(); // values of profile_idc that indicate additional fields are included in the SPS\n // see Recommendation ITU-T H.264 (4/2013),\n // 7.3.2.1.1 Sequence parameter set data syntax\n\n PROFILES_WITH_OPTIONAL_SPS_DATA = {\n 100: true,\n 110: true,\n 122: true,\n 244: true,\n 44: true,\n 83: true,\n 86: true,\n 118: true,\n 128: true,\n // TODO: the three profiles below don't\n // appear to have sps data in the specificiation anymore?\n 138: true,\n 139: true,\n 134: true\n };\n /**\n * Accepts input from a ElementaryStream and produces H.264 NAL unit data\n * events.\n */\n\n _H264Stream$ = function H264Stream$1() {\n var nalByteStream = new _NalByteStream(),\n self,\n trackId,\n currentPts,\n currentDts,\n discardEmulationPreventionBytes,\n readSequenceParameterSet,\n skipScalingList;\n _H264Stream$.prototype.init.call(this);\n self = this;\n /*\n * Pushes a packet from a stream onto the NalByteStream\n *\n * @param {Object} packet - A packet received from a stream\n * @param {Uint8Array} packet.data - The raw bytes of the packet\n * @param {Number} packet.dts - Decode timestamp of the packet\n * @param {Number} packet.pts - Presentation timestamp of the packet\n * @param {Number} packet.trackId - The id of the h264 track this packet came from\n * @param {('video'|'audio')} packet.type - The type of packet\n *\n */\n\n this.push = function (packet) {\n if (packet.type !== 'video') {\n return;\n }\n trackId = packet.trackId;\n currentPts = packet.pts;\n currentDts = packet.dts;\n nalByteStream.push(packet);\n };\n /*\n * Identify NAL unit types and pass on the NALU, trackId, presentation and decode timestamps\n * for the NALUs to the next stream component.\n * Also, preprocess caption and sequence parameter NALUs.\n *\n * @param {Uint8Array} data - A NAL unit identified by `NalByteStream.push`\n * @see NalByteStream.push\n */\n\n nalByteStream.on('data', function (data) {\n var event = {\n trackId: trackId,\n pts: currentPts,\n dts: currentDts,\n data: data,\n nalUnitTypeCode: data[0] & 0x1f\n };\n switch (event.nalUnitTypeCode) {\n case 0x05:\n event.nalUnitType = 'slice_layer_without_partitioning_rbsp_idr';\n break;\n case 0x06:\n event.nalUnitType = 'sei_rbsp';\n event.escapedRBSP = discardEmulationPreventionBytes(data.subarray(1));\n break;\n case 0x07:\n event.nalUnitType = 'seq_parameter_set_rbsp';\n event.escapedRBSP = discardEmulationPreventionBytes(data.subarray(1));\n event.config = readSequenceParameterSet(event.escapedRBSP);\n break;\n case 0x08:\n event.nalUnitType = 'pic_parameter_set_rbsp';\n break;\n case 0x09:\n event.nalUnitType = 'access_unit_delimiter_rbsp';\n break;\n } // This triggers data on the H264Stream\n\n self.trigger('data', event);\n });\n nalByteStream.on('done', function () {\n self.trigger('done');\n });\n nalByteStream.on('partialdone', function () {\n self.trigger('partialdone');\n });\n nalByteStream.on('reset', function () {\n self.trigger('reset');\n });\n nalByteStream.on('endedtimeline', function () {\n self.trigger('endedtimeline');\n });\n this.flush = function () {\n nalByteStream.flush();\n };\n this.partialFlush = function () {\n nalByteStream.partialFlush();\n };\n this.reset = function () {\n nalByteStream.reset();\n };\n this.endTimeline = function () {\n nalByteStream.endTimeline();\n };\n /**\n * Advance the ExpGolomb decoder past a scaling list. The scaling\n * list is optionally transmitted as part of a sequence parameter\n * set and is not relevant to transmuxing.\n * @param count {number} the number of entries in this scaling list\n * @param expGolombDecoder {object} an ExpGolomb pointed to the\n * start of a scaling list\n * @see Recommendation ITU-T H.264, Section 7.3.2.1.1.1\n */\n\n skipScalingList = function skipScalingList(count, expGolombDecoder) {\n var lastScale = 8,\n nextScale = 8,\n j,\n deltaScale;\n for (j = 0; j < count; j++) {\n if (nextScale !== 0) {\n deltaScale = expGolombDecoder.readExpGolomb();\n nextScale = (lastScale + deltaScale + 256) % 256;\n }\n lastScale = nextScale === 0 ? lastScale : nextScale;\n }\n };\n /**\n * Expunge any \"Emulation Prevention\" bytes from a \"Raw Byte\n * Sequence Payload\"\n * @param data {Uint8Array} the bytes of a RBSP from a NAL\n * unit\n * @return {Uint8Array} the RBSP without any Emulation\n * Prevention Bytes\n */\n\n discardEmulationPreventionBytes = function discardEmulationPreventionBytes(data) {\n var length = data.byteLength,\n emulationPreventionBytesPositions = [],\n i = 1,\n newLength,\n newData; // Find all `Emulation Prevention Bytes`\n\n while (i < length - 2) {\n if (data[i] === 0 && data[i + 1] === 0 && data[i + 2] === 0x03) {\n emulationPreventionBytesPositions.push(i + 2);\n i += 2;\n } else {\n i++;\n }\n } // If no Emulation Prevention Bytes were found just return the original\n // array\n\n if (emulationPreventionBytesPositions.length === 0) {\n return data;\n } // Create a new array to hold the NAL unit data\n\n newLength = length - emulationPreventionBytesPositions.length;\n newData = new Uint8Array(newLength);\n var sourceIndex = 0;\n for (i = 0; i < newLength; sourceIndex++, i++) {\n if (sourceIndex === emulationPreventionBytesPositions[0]) {\n // Skip this byte\n sourceIndex++; // Remove this position index\n\n emulationPreventionBytesPositions.shift();\n }\n newData[i] = data[sourceIndex];\n }\n return newData;\n };\n /**\n * Read a sequence parameter set and return some interesting video\n * properties. A sequence parameter set is the H264 metadata that\n * describes the properties of upcoming video frames.\n * @param data {Uint8Array} the bytes of a sequence parameter set\n * @return {object} an object with configuration parsed from the\n * sequence parameter set, including the dimensions of the\n * associated video frames.\n */\n\n readSequenceParameterSet = function readSequenceParameterSet(data) {\n var frameCropLeftOffset = 0,\n frameCropRightOffset = 0,\n frameCropTopOffset = 0,\n frameCropBottomOffset = 0,\n expGolombDecoder,\n profileIdc,\n levelIdc,\n profileCompatibility,\n chromaFormatIdc,\n picOrderCntType,\n numRefFramesInPicOrderCntCycle,\n picWidthInMbsMinus1,\n picHeightInMapUnitsMinus1,\n frameMbsOnlyFlag,\n scalingListCount,\n sarRatio = [1, 1],\n aspectRatioIdc,\n i;\n expGolombDecoder = new ExpGolomb(data);\n profileIdc = expGolombDecoder.readUnsignedByte(); // profile_idc\n\n profileCompatibility = expGolombDecoder.readUnsignedByte(); // constraint_set[0-5]_flag\n\n levelIdc = expGolombDecoder.readUnsignedByte(); // level_idc u(8)\n\n expGolombDecoder.skipUnsignedExpGolomb(); // seq_parameter_set_id\n // some profiles have more optional data we don't need\n\n if (PROFILES_WITH_OPTIONAL_SPS_DATA[profileIdc]) {\n chromaFormatIdc = expGolombDecoder.readUnsignedExpGolomb();\n if (chromaFormatIdc === 3) {\n expGolombDecoder.skipBits(1); // separate_colour_plane_flag\n }\n expGolombDecoder.skipUnsignedExpGolomb(); // bit_depth_luma_minus8\n\n expGolombDecoder.skipUnsignedExpGolomb(); // bit_depth_chroma_minus8\n\n expGolombDecoder.skipBits(1); // qpprime_y_zero_transform_bypass_flag\n\n if (expGolombDecoder.readBoolean()) {\n // seq_scaling_matrix_present_flag\n scalingListCount = chromaFormatIdc !== 3 ? 8 : 12;\n for (i = 0; i < scalingListCount; i++) {\n if (expGolombDecoder.readBoolean()) {\n // seq_scaling_list_present_flag[ i ]\n if (i < 6) {\n skipScalingList(16, expGolombDecoder);\n } else {\n skipScalingList(64, expGolombDecoder);\n }\n }\n }\n }\n }\n expGolombDecoder.skipUnsignedExpGolomb(); // log2_max_frame_num_minus4\n\n picOrderCntType = expGolombDecoder.readUnsignedExpGolomb();\n if (picOrderCntType === 0) {\n expGolombDecoder.readUnsignedExpGolomb(); // log2_max_pic_order_cnt_lsb_minus4\n } else if (picOrderCntType === 1) {\n expGolombDecoder.skipBits(1); // delta_pic_order_always_zero_flag\n\n expGolombDecoder.skipExpGolomb(); // offset_for_non_ref_pic\n\n expGolombDecoder.skipExpGolomb(); // offset_for_top_to_bottom_field\n\n numRefFramesInPicOrderCntCycle = expGolombDecoder.readUnsignedExpGolomb();\n for (i = 0; i < numRefFramesInPicOrderCntCycle; i++) {\n expGolombDecoder.skipExpGolomb(); // offset_for_ref_frame[ i ]\n }\n }\n expGolombDecoder.skipUnsignedExpGolomb(); // max_num_ref_frames\n\n expGolombDecoder.skipBits(1); // gaps_in_frame_num_value_allowed_flag\n\n picWidthInMbsMinus1 = expGolombDecoder.readUnsignedExpGolomb();\n picHeightInMapUnitsMinus1 = expGolombDecoder.readUnsignedExpGolomb();\n frameMbsOnlyFlag = expGolombDecoder.readBits(1);\n if (frameMbsOnlyFlag === 0) {\n expGolombDecoder.skipBits(1); // mb_adaptive_frame_field_flag\n }\n expGolombDecoder.skipBits(1); // direct_8x8_inference_flag\n\n if (expGolombDecoder.readBoolean()) {\n // frame_cropping_flag\n frameCropLeftOffset = expGolombDecoder.readUnsignedExpGolomb();\n frameCropRightOffset = expGolombDecoder.readUnsignedExpGolomb();\n frameCropTopOffset = expGolombDecoder.readUnsignedExpGolomb();\n frameCropBottomOffset = expGolombDecoder.readUnsignedExpGolomb();\n }\n if (expGolombDecoder.readBoolean()) {\n // vui_parameters_present_flag\n if (expGolombDecoder.readBoolean()) {\n // aspect_ratio_info_present_flag\n aspectRatioIdc = expGolombDecoder.readUnsignedByte();\n switch (aspectRatioIdc) {\n case 1:\n sarRatio = [1, 1];\n break;\n case 2:\n sarRatio = [12, 11];\n break;\n case 3:\n sarRatio = [10, 11];\n break;\n case 4:\n sarRatio = [16, 11];\n break;\n case 5:\n sarRatio = [40, 33];\n break;\n case 6:\n sarRatio = [24, 11];\n break;\n case 7:\n sarRatio = [20, 11];\n break;\n case 8:\n sarRatio = [32, 11];\n break;\n case 9:\n sarRatio = [80, 33];\n break;\n case 10:\n sarRatio = [18, 11];\n break;\n case 11:\n sarRatio = [15, 11];\n break;\n case 12:\n sarRatio = [64, 33];\n break;\n case 13:\n sarRatio = [160, 99];\n break;\n case 14:\n sarRatio = [4, 3];\n break;\n case 15:\n sarRatio = [3, 2];\n break;\n case 16:\n sarRatio = [2, 1];\n break;\n case 255:\n {\n sarRatio = [expGolombDecoder.readUnsignedByte() << 8 | expGolombDecoder.readUnsignedByte(), expGolombDecoder.readUnsignedByte() << 8 | expGolombDecoder.readUnsignedByte()];\n break;\n }\n }\n if (sarRatio) {\n sarRatio[0] / sarRatio[1];\n }\n }\n }\n return {\n profileIdc: profileIdc,\n levelIdc: levelIdc,\n profileCompatibility: profileCompatibility,\n width: (picWidthInMbsMinus1 + 1) * 16 - frameCropLeftOffset * 2 - frameCropRightOffset * 2,\n height: (2 - frameMbsOnlyFlag) * (picHeightInMapUnitsMinus1 + 1) * 16 - frameCropTopOffset * 2 - frameCropBottomOffset * 2,\n // sar is sample aspect ratio\n sarRatio: sarRatio\n };\n };\n };\n _H264Stream$.prototype = new Stream$2();\n var h264 = {\n H264Stream: _H264Stream$,\n NalByteStream: _NalByteStream\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Utilities to detect basic properties and metadata about Aac data.\n */\n\n var ADTS_SAMPLING_FREQUENCIES = [96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 7350];\n var parseId3TagSize = function parseId3TagSize(header, byteIndex) {\n var returnSize = header[byteIndex + 6] << 21 | header[byteIndex + 7] << 14 | header[byteIndex + 8] << 7 | header[byteIndex + 9],\n flags = header[byteIndex + 5],\n footerPresent = (flags & 16) >> 4; // if we get a negative returnSize clamp it to 0\n\n returnSize = returnSize >= 0 ? returnSize : 0;\n if (footerPresent) {\n return returnSize + 20;\n }\n return returnSize + 10;\n };\n var getId3Offset = function getId3Offset(data, offset) {\n if (data.length - offset < 10 || data[offset] !== 'I'.charCodeAt(0) || data[offset + 1] !== 'D'.charCodeAt(0) || data[offset + 2] !== '3'.charCodeAt(0)) {\n return offset;\n }\n offset += parseId3TagSize(data, offset);\n return getId3Offset(data, offset);\n }; // TODO: use vhs-utils\n\n var isLikelyAacData$1 = function isLikelyAacData$1(data) {\n var offset = getId3Offset(data, 0);\n return data.length >= offset + 2 && (data[offset] & 0xFF) === 0xFF && (data[offset + 1] & 0xF0) === 0xF0 &&\n // verify that the 2 layer bits are 0, aka this\n // is not mp3 data but aac data.\n (data[offset + 1] & 0x16) === 0x10;\n };\n var parseSyncSafeInteger = function parseSyncSafeInteger(data) {\n return data[0] << 21 | data[1] << 14 | data[2] << 7 | data[3];\n }; // return a percent-encoded representation of the specified byte range\n // @see http://en.wikipedia.org/wiki/Percent-encoding\n\n var percentEncode = function percentEncode(bytes, start, end) {\n var i,\n result = '';\n for (i = start; i < end; i++) {\n result += '%' + ('00' + bytes[i].toString(16)).slice(-2);\n }\n return result;\n }; // return the string representation of the specified byte range,\n // interpreted as ISO-8859-1.\n\n var parseIso88591 = function parseIso88591(bytes, start, end) {\n return unescape(percentEncode(bytes, start, end)); // jshint ignore:line\n };\n var parseAdtsSize = function parseAdtsSize(header, byteIndex) {\n var lowThree = (header[byteIndex + 5] & 0xE0) >> 5,\n middle = header[byteIndex + 4] << 3,\n highTwo = header[byteIndex + 3] & 0x3 << 11;\n return highTwo | middle | lowThree;\n };\n var parseType$4 = function parseType$4(header, byteIndex) {\n if (header[byteIndex] === 'I'.charCodeAt(0) && header[byteIndex + 1] === 'D'.charCodeAt(0) && header[byteIndex + 2] === '3'.charCodeAt(0)) {\n return 'timed-metadata';\n } else if (header[byteIndex] & 0xff === 0xff && (header[byteIndex + 1] & 0xf0) === 0xf0) {\n return 'audio';\n }\n return null;\n };\n var parseSampleRate = function parseSampleRate(packet) {\n var i = 0;\n while (i + 5 < packet.length) {\n if (packet[i] !== 0xFF || (packet[i + 1] & 0xF6) !== 0xF0) {\n // If a valid header was not found, jump one forward and attempt to\n // find a valid ADTS header starting at the next byte\n i++;\n continue;\n }\n return ADTS_SAMPLING_FREQUENCIES[(packet[i + 2] & 0x3c) >>> 2];\n }\n return null;\n };\n var parseAacTimestamp = function parseAacTimestamp(packet) {\n var frameStart, frameSize, frame, frameHeader; // find the start of the first frame and the end of the tag\n\n frameStart = 10;\n if (packet[5] & 0x40) {\n // advance the frame start past the extended header\n frameStart += 4; // header size field\n\n frameStart += parseSyncSafeInteger(packet.subarray(10, 14));\n } // parse one or more ID3 frames\n // http://id3.org/id3v2.3.0#ID3v2_frame_overview\n\n do {\n // determine the number of bytes in this frame\n frameSize = parseSyncSafeInteger(packet.subarray(frameStart + 4, frameStart + 8));\n if (frameSize < 1) {\n return null;\n }\n frameHeader = String.fromCharCode(packet[frameStart], packet[frameStart + 1], packet[frameStart + 2], packet[frameStart + 3]);\n if (frameHeader === 'PRIV') {\n frame = packet.subarray(frameStart + 10, frameStart + frameSize + 10);\n for (var i = 0; i < frame.byteLength; i++) {\n if (frame[i] === 0) {\n var owner = parseIso88591(frame, 0, i);\n if (owner === 'com.apple.streaming.transportStreamTimestamp') {\n var d = frame.subarray(i + 1);\n var size = (d[3] & 0x01) << 30 | d[4] << 22 | d[5] << 14 | d[6] << 6 | d[7] >>> 2;\n size *= 4;\n size += d[7] & 0x03;\n return size;\n }\n break;\n }\n }\n }\n frameStart += 10; // advance past the frame header\n\n frameStart += frameSize; // advance past the frame body\n } while (frameStart < packet.byteLength);\n return null;\n };\n var utils = {\n isLikelyAacData: isLikelyAacData$1,\n parseId3TagSize: parseId3TagSize,\n parseAdtsSize: parseAdtsSize,\n parseType: parseType$4,\n parseSampleRate: parseSampleRate,\n parseAacTimestamp: parseAacTimestamp\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * A stream-based aac to mp4 converter. This utility can be used to\n * deliver mp4s to a SourceBuffer on platforms that support native\n * Media Source Extensions.\n */\n\n var Stream$1 = stream;\n var aacUtils = utils; // Constants\n\n var _AacStream$;\n /**\n * Splits an incoming stream of binary data into ADTS and ID3 Frames.\n */\n\n _AacStream$ = function AacStream$1() {\n var everything = new Uint8Array(),\n timeStamp = 0;\n _AacStream$.prototype.init.call(this);\n this.setTimestamp = function (timestamp) {\n timeStamp = timestamp;\n };\n this.push = function (bytes) {\n var frameSize = 0,\n byteIndex = 0,\n bytesLeft,\n chunk,\n packet,\n tempLength; // If there are bytes remaining from the last segment, prepend them to the\n // bytes that were pushed in\n\n if (everything.length) {\n tempLength = everything.length;\n everything = new Uint8Array(bytes.byteLength + tempLength);\n everything.set(everything.subarray(0, tempLength));\n everything.set(bytes, tempLength);\n } else {\n everything = bytes;\n }\n while (everything.length - byteIndex >= 3) {\n if (everything[byteIndex] === 'I'.charCodeAt(0) && everything[byteIndex + 1] === 'D'.charCodeAt(0) && everything[byteIndex + 2] === '3'.charCodeAt(0)) {\n // Exit early because we don't have enough to parse\n // the ID3 tag header\n if (everything.length - byteIndex < 10) {\n break;\n } // check framesize\n\n frameSize = aacUtils.parseId3TagSize(everything, byteIndex); // Exit early if we don't have enough in the buffer\n // to emit a full packet\n // Add to byteIndex to support multiple ID3 tags in sequence\n\n if (byteIndex + frameSize > everything.length) {\n break;\n }\n chunk = {\n type: 'timed-metadata',\n data: everything.subarray(byteIndex, byteIndex + frameSize)\n };\n this.trigger('data', chunk);\n byteIndex += frameSize;\n continue;\n } else if ((everything[byteIndex] & 0xff) === 0xff && (everything[byteIndex + 1] & 0xf0) === 0xf0) {\n // Exit early because we don't have enough to parse\n // the ADTS frame header\n if (everything.length - byteIndex < 7) {\n break;\n }\n frameSize = aacUtils.parseAdtsSize(everything, byteIndex); // Exit early if we don't have enough in the buffer\n // to emit a full packet\n\n if (byteIndex + frameSize > everything.length) {\n break;\n }\n packet = {\n type: 'audio',\n data: everything.subarray(byteIndex, byteIndex + frameSize),\n pts: timeStamp,\n dts: timeStamp\n };\n this.trigger('data', packet);\n byteIndex += frameSize;\n continue;\n }\n byteIndex++;\n }\n bytesLeft = everything.length - byteIndex;\n if (bytesLeft > 0) {\n everything = everything.subarray(byteIndex);\n } else {\n everything = new Uint8Array();\n }\n };\n this.reset = function () {\n everything = new Uint8Array();\n this.trigger('reset');\n };\n this.endTimeline = function () {\n everything = new Uint8Array();\n this.trigger('endedtimeline');\n };\n };\n _AacStream$.prototype = new Stream$1();\n var aac = _AacStream$;\n var AUDIO_PROPERTIES$1 = ['audioobjecttype', 'channelcount', 'samplerate', 'samplingfrequencyindex', 'samplesize'];\n var audioProperties = AUDIO_PROPERTIES$1;\n var VIDEO_PROPERTIES$1 = ['width', 'height', 'profileIdc', 'levelIdc', 'profileCompatibility', 'sarRatio'];\n var videoProperties = VIDEO_PROPERTIES$1;\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * A stream-based mp2t to mp4 converter. This utility can be used to\n * deliver mp4s to a SourceBuffer on platforms that support native\n * Media Source Extensions.\n */\n\n var Stream = stream;\n var mp4 = mp4Generator;\n var frameUtils = frameUtils$1;\n var audioFrameUtils = audioFrameUtils$1;\n var trackDecodeInfo = trackDecodeInfo$1;\n var m2ts = m2ts_1;\n var clock = clock$2;\n var AdtsStream = adts;\n var H264Stream = h264.H264Stream;\n var AacStream = aac;\n var isLikelyAacData = utils.isLikelyAacData;\n var ONE_SECOND_IN_TS$1 = clock$2.ONE_SECOND_IN_TS;\n var AUDIO_PROPERTIES = audioProperties;\n var VIDEO_PROPERTIES = videoProperties; // object types\n\n var _VideoSegmentStream, _AudioSegmentStream, _Transmuxer, _CoalesceStream;\n var retriggerForStream = function retriggerForStream(key, event) {\n event.stream = key;\n this.trigger('log', event);\n };\n var addPipelineLogRetriggers = function addPipelineLogRetriggers(transmuxer, pipeline) {\n var keys = Object.keys(pipeline);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i]; // skip non-stream keys and headOfPipeline\n // which is just a duplicate\n\n if (key === 'headOfPipeline' || !pipeline[key].on) {\n continue;\n }\n pipeline[key].on('log', retriggerForStream.bind(transmuxer, key));\n }\n };\n /**\n * Compare two arrays (even typed) for same-ness\n */\n\n var arrayEquals = function arrayEquals(a, b) {\n var i;\n if (a.length !== b.length) {\n return false;\n } // compare the value of each element in the array\n\n for (i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n return true;\n };\n var generateSegmentTimingInfo = function generateSegmentTimingInfo(baseMediaDecodeTime, startDts, startPts, endDts, endPts, prependedContentDuration) {\n var ptsOffsetFromDts = startPts - startDts,\n decodeDuration = endDts - startDts,\n presentationDuration = endPts - startPts; // The PTS and DTS values are based on the actual stream times from the segment,\n // however, the player time values will reflect a start from the baseMediaDecodeTime.\n // In order to provide relevant values for the player times, base timing info on the\n // baseMediaDecodeTime and the DTS and PTS durations of the segment.\n\n return {\n start: {\n dts: baseMediaDecodeTime,\n pts: baseMediaDecodeTime + ptsOffsetFromDts\n },\n end: {\n dts: baseMediaDecodeTime + decodeDuration,\n pts: baseMediaDecodeTime + presentationDuration\n },\n prependedContentDuration: prependedContentDuration,\n baseMediaDecodeTime: baseMediaDecodeTime\n };\n };\n /**\n * Constructs a single-track, ISO BMFF media segment from AAC data\n * events. The output of this stream can be fed to a SourceBuffer\n * configured with a suitable initialization segment.\n * @param track {object} track metadata configuration\n * @param options {object} transmuxer options object\n * @param options.keepOriginalTimestamps {boolean} If true, keep the timestamps\n * in the source; false to adjust the first segment to start at 0.\n */\n\n _AudioSegmentStream = function AudioSegmentStream(track, options) {\n var adtsFrames = [],\n sequenceNumber,\n earliestAllowedDts = 0,\n audioAppendStartTs = 0,\n videoBaseMediaDecodeTime = Infinity;\n options = options || {};\n sequenceNumber = options.firstSequenceNumber || 0;\n _AudioSegmentStream.prototype.init.call(this);\n this.push = function (data) {\n trackDecodeInfo.collectDtsInfo(track, data);\n if (track) {\n AUDIO_PROPERTIES.forEach(function (prop) {\n track[prop] = data[prop];\n });\n } // buffer audio data until end() is called\n\n adtsFrames.push(data);\n };\n this.setEarliestDts = function (earliestDts) {\n earliestAllowedDts = earliestDts;\n };\n this.setVideoBaseMediaDecodeTime = function (baseMediaDecodeTime) {\n videoBaseMediaDecodeTime = baseMediaDecodeTime;\n };\n this.setAudioAppendStart = function (timestamp) {\n audioAppendStartTs = timestamp;\n };\n this.flush = function () {\n var frames, moof, mdat, boxes, frameDuration, segmentDuration, videoClockCyclesOfSilencePrefixed; // return early if no audio data has been observed\n\n if (adtsFrames.length === 0) {\n this.trigger('done', 'AudioSegmentStream');\n return;\n }\n frames = audioFrameUtils.trimAdtsFramesByEarliestDts(adtsFrames, track, earliestAllowedDts);\n track.baseMediaDecodeTime = trackDecodeInfo.calculateTrackBaseMediaDecodeTime(track, options.keepOriginalTimestamps); // amount of audio filled but the value is in video clock rather than audio clock\n\n videoClockCyclesOfSilencePrefixed = audioFrameUtils.prefixWithSilence(track, frames, audioAppendStartTs, videoBaseMediaDecodeTime); // we have to build the index from byte locations to\n // samples (that is, adts frames) in the audio data\n\n track.samples = audioFrameUtils.generateSampleTable(frames); // concatenate the audio data to constuct the mdat\n\n mdat = mp4.mdat(audioFrameUtils.concatenateFrameData(frames));\n adtsFrames = [];\n moof = mp4.moof(sequenceNumber, [track]);\n boxes = new Uint8Array(moof.byteLength + mdat.byteLength); // bump the sequence number for next time\n\n sequenceNumber++;\n boxes.set(moof);\n boxes.set(mdat, moof.byteLength);\n trackDecodeInfo.clearDtsInfo(track);\n frameDuration = Math.ceil(ONE_SECOND_IN_TS$1 * 1024 / track.samplerate); // TODO this check was added to maintain backwards compatibility (particularly with\n // tests) on adding the timingInfo event. However, it seems unlikely that there's a\n // valid use-case where an init segment/data should be triggered without associated\n // frames. Leaving for now, but should be looked into.\n\n if (frames.length) {\n segmentDuration = frames.length * frameDuration;\n this.trigger('segmentTimingInfo', generateSegmentTimingInfo(\n // The audio track's baseMediaDecodeTime is in audio clock cycles, but the\n // frame info is in video clock cycles. Convert to match expectation of\n // listeners (that all timestamps will be based on video clock cycles).\n clock.audioTsToVideoTs(track.baseMediaDecodeTime, track.samplerate),\n // frame times are already in video clock, as is segment duration\n frames[0].dts, frames[0].pts, frames[0].dts + segmentDuration, frames[0].pts + segmentDuration, videoClockCyclesOfSilencePrefixed || 0));\n this.trigger('timingInfo', {\n start: frames[0].pts,\n end: frames[0].pts + segmentDuration\n });\n }\n this.trigger('data', {\n track: track,\n boxes: boxes\n });\n this.trigger('done', 'AudioSegmentStream');\n };\n this.reset = function () {\n trackDecodeInfo.clearDtsInfo(track);\n adtsFrames = [];\n this.trigger('reset');\n };\n };\n _AudioSegmentStream.prototype = new Stream();\n /**\n * Constructs a single-track, ISO BMFF media segment from H264 data\n * events. The output of this stream can be fed to a SourceBuffer\n * configured with a suitable initialization segment.\n * @param track {object} track metadata configuration\n * @param options {object} transmuxer options object\n * @param options.alignGopsAtEnd {boolean} If true, start from the end of the\n * gopsToAlignWith list when attempting to align gop pts\n * @param options.keepOriginalTimestamps {boolean} If true, keep the timestamps\n * in the source; false to adjust the first segment to start at 0.\n */\n\n _VideoSegmentStream = function VideoSegmentStream(track, options) {\n var sequenceNumber,\n nalUnits = [],\n gopsToAlignWith = [],\n config,\n pps;\n options = options || {};\n sequenceNumber = options.firstSequenceNumber || 0;\n _VideoSegmentStream.prototype.init.call(this);\n delete track.minPTS;\n this.gopCache_ = [];\n /**\n * Constructs a ISO BMFF segment given H264 nalUnits\n * @param {Object} nalUnit A data event representing a nalUnit\n * @param {String} nalUnit.nalUnitType\n * @param {Object} nalUnit.config Properties for a mp4 track\n * @param {Uint8Array} nalUnit.data The nalUnit bytes\n * @see lib/codecs/h264.js\n **/\n\n this.push = function (nalUnit) {\n trackDecodeInfo.collectDtsInfo(track, nalUnit); // record the track config\n\n if (nalUnit.nalUnitType === 'seq_parameter_set_rbsp' && !config) {\n config = nalUnit.config;\n track.sps = [nalUnit.data];\n VIDEO_PROPERTIES.forEach(function (prop) {\n track[prop] = config[prop];\n }, this);\n }\n if (nalUnit.nalUnitType === 'pic_parameter_set_rbsp' && !pps) {\n pps = nalUnit.data;\n track.pps = [nalUnit.data];\n } // buffer video until flush() is called\n\n nalUnits.push(nalUnit);\n };\n /**\n * Pass constructed ISO BMFF track and boxes on to the\n * next stream in the pipeline\n **/\n\n this.flush = function () {\n var frames,\n gopForFusion,\n gops,\n moof,\n mdat,\n boxes,\n prependedContentDuration = 0,\n firstGop,\n lastGop; // Throw away nalUnits at the start of the byte stream until\n // we find the first AUD\n\n while (nalUnits.length) {\n if (nalUnits[0].nalUnitType === 'access_unit_delimiter_rbsp') {\n break;\n }\n nalUnits.shift();\n } // Return early if no video data has been observed\n\n if (nalUnits.length === 0) {\n this.resetStream_();\n this.trigger('done', 'VideoSegmentStream');\n return;\n } // Organize the raw nal-units into arrays that represent\n // higher-level constructs such as frames and gops\n // (group-of-pictures)\n\n frames = frameUtils.groupNalsIntoFrames(nalUnits);\n gops = frameUtils.groupFramesIntoGops(frames); // If the first frame of this fragment is not a keyframe we have\n // a problem since MSE (on Chrome) requires a leading keyframe.\n //\n // We have two approaches to repairing this situation:\n // 1) GOP-FUSION:\n // This is where we keep track of the GOPS (group-of-pictures)\n // from previous fragments and attempt to find one that we can\n // prepend to the current fragment in order to create a valid\n // fragment.\n // 2) KEYFRAME-PULLING:\n // Here we search for the first keyframe in the fragment and\n // throw away all the frames between the start of the fragment\n // and that keyframe. We then extend the duration and pull the\n // PTS of the keyframe forward so that it covers the time range\n // of the frames that were disposed of.\n //\n // #1 is far prefereable over #2 which can cause \"stuttering\" but\n // requires more things to be just right.\n\n if (!gops[0][0].keyFrame) {\n // Search for a gop for fusion from our gopCache\n gopForFusion = this.getGopForFusion_(nalUnits[0], track);\n if (gopForFusion) {\n // in order to provide more accurate timing information about the segment, save\n // the number of seconds prepended to the original segment due to GOP fusion\n prependedContentDuration = gopForFusion.duration;\n gops.unshift(gopForFusion); // Adjust Gops' metadata to account for the inclusion of the\n // new gop at the beginning\n\n gops.byteLength += gopForFusion.byteLength;\n gops.nalCount += gopForFusion.nalCount;\n gops.pts = gopForFusion.pts;\n gops.dts = gopForFusion.dts;\n gops.duration += gopForFusion.duration;\n } else {\n // If we didn't find a candidate gop fall back to keyframe-pulling\n gops = frameUtils.extendFirstKeyFrame(gops);\n }\n } // Trim gops to align with gopsToAlignWith\n\n if (gopsToAlignWith.length) {\n var alignedGops;\n if (options.alignGopsAtEnd) {\n alignedGops = this.alignGopsAtEnd_(gops);\n } else {\n alignedGops = this.alignGopsAtStart_(gops);\n }\n if (!alignedGops) {\n // save all the nals in the last GOP into the gop cache\n this.gopCache_.unshift({\n gop: gops.pop(),\n pps: track.pps,\n sps: track.sps\n }); // Keep a maximum of 6 GOPs in the cache\n\n this.gopCache_.length = Math.min(6, this.gopCache_.length); // Clear nalUnits\n\n nalUnits = []; // return early no gops can be aligned with desired gopsToAlignWith\n\n this.resetStream_();\n this.trigger('done', 'VideoSegmentStream');\n return;\n } // Some gops were trimmed. clear dts info so minSegmentDts and pts are correct\n // when recalculated before sending off to CoalesceStream\n\n trackDecodeInfo.clearDtsInfo(track);\n gops = alignedGops;\n }\n trackDecodeInfo.collectDtsInfo(track, gops); // First, we have to build the index from byte locations to\n // samples (that is, frames) in the video data\n\n track.samples = frameUtils.generateSampleTable(gops); // Concatenate the video data and construct the mdat\n\n mdat = mp4.mdat(frameUtils.concatenateNalData(gops));\n track.baseMediaDecodeTime = trackDecodeInfo.calculateTrackBaseMediaDecodeTime(track, options.keepOriginalTimestamps);\n this.trigger('processedGopsInfo', gops.map(function (gop) {\n return {\n pts: gop.pts,\n dts: gop.dts,\n byteLength: gop.byteLength\n };\n }));\n firstGop = gops[0];\n lastGop = gops[gops.length - 1];\n this.trigger('segmentTimingInfo', generateSegmentTimingInfo(track.baseMediaDecodeTime, firstGop.dts, firstGop.pts, lastGop.dts + lastGop.duration, lastGop.pts + lastGop.duration, prependedContentDuration));\n this.trigger('timingInfo', {\n start: gops[0].pts,\n end: gops[gops.length - 1].pts + gops[gops.length - 1].duration\n }); // save all the nals in the last GOP into the gop cache\n\n this.gopCache_.unshift({\n gop: gops.pop(),\n pps: track.pps,\n sps: track.sps\n }); // Keep a maximum of 6 GOPs in the cache\n\n this.gopCache_.length = Math.min(6, this.gopCache_.length); // Clear nalUnits\n\n nalUnits = [];\n this.trigger('baseMediaDecodeTime', track.baseMediaDecodeTime);\n this.trigger('timelineStartInfo', track.timelineStartInfo);\n moof = mp4.moof(sequenceNumber, [track]); // it would be great to allocate this array up front instead of\n // throwing away hundreds of media segment fragments\n\n boxes = new Uint8Array(moof.byteLength + mdat.byteLength); // Bump the sequence number for next time\n\n sequenceNumber++;\n boxes.set(moof);\n boxes.set(mdat, moof.byteLength);\n this.trigger('data', {\n track: track,\n boxes: boxes\n });\n this.resetStream_(); // Continue with the flush process now\n\n this.trigger('done', 'VideoSegmentStream');\n };\n this.reset = function () {\n this.resetStream_();\n nalUnits = [];\n this.gopCache_.length = 0;\n gopsToAlignWith.length = 0;\n this.trigger('reset');\n };\n this.resetStream_ = function () {\n trackDecodeInfo.clearDtsInfo(track); // reset config and pps because they may differ across segments\n // for instance, when we are rendition switching\n\n config = undefined;\n pps = undefined;\n }; // Search for a candidate Gop for gop-fusion from the gop cache and\n // return it or return null if no good candidate was found\n\n this.getGopForFusion_ = function (nalUnit) {\n var halfSecond = 45000,\n // Half-a-second in a 90khz clock\n allowableOverlap = 10000,\n // About 3 frames @ 30fps\n nearestDistance = Infinity,\n dtsDistance,\n nearestGopObj,\n currentGop,\n currentGopObj,\n i; // Search for the GOP nearest to the beginning of this nal unit\n\n for (i = 0; i < this.gopCache_.length; i++) {\n currentGopObj = this.gopCache_[i];\n currentGop = currentGopObj.gop; // Reject Gops with different SPS or PPS\n\n if (!(track.pps && arrayEquals(track.pps[0], currentGopObj.pps[0])) || !(track.sps && arrayEquals(track.sps[0], currentGopObj.sps[0]))) {\n continue;\n } // Reject Gops that would require a negative baseMediaDecodeTime\n\n if (currentGop.dts < track.timelineStartInfo.dts) {\n continue;\n } // The distance between the end of the gop and the start of the nalUnit\n\n dtsDistance = nalUnit.dts - currentGop.dts - currentGop.duration; // Only consider GOPS that start before the nal unit and end within\n // a half-second of the nal unit\n\n if (dtsDistance >= -allowableOverlap && dtsDistance <= halfSecond) {\n // Always use the closest GOP we found if there is more than\n // one candidate\n if (!nearestGopObj || nearestDistance > dtsDistance) {\n nearestGopObj = currentGopObj;\n nearestDistance = dtsDistance;\n }\n }\n }\n if (nearestGopObj) {\n return nearestGopObj.gop;\n }\n return null;\n }; // trim gop list to the first gop found that has a matching pts with a gop in the list\n // of gopsToAlignWith starting from the START of the list\n\n this.alignGopsAtStart_ = function (gops) {\n var alignIndex, gopIndex, align, gop, byteLength, nalCount, duration, alignedGops;\n byteLength = gops.byteLength;\n nalCount = gops.nalCount;\n duration = gops.duration;\n alignIndex = gopIndex = 0;\n while (alignIndex < gopsToAlignWith.length && gopIndex < gops.length) {\n align = gopsToAlignWith[alignIndex];\n gop = gops[gopIndex];\n if (align.pts === gop.pts) {\n break;\n }\n if (gop.pts > align.pts) {\n // this current gop starts after the current gop we want to align on, so increment\n // align index\n alignIndex++;\n continue;\n } // current gop starts before the current gop we want to align on. so increment gop\n // index\n\n gopIndex++;\n byteLength -= gop.byteLength;\n nalCount -= gop.nalCount;\n duration -= gop.duration;\n }\n if (gopIndex === 0) {\n // no gops to trim\n return gops;\n }\n if (gopIndex === gops.length) {\n // all gops trimmed, skip appending all gops\n return null;\n }\n alignedGops = gops.slice(gopIndex);\n alignedGops.byteLength = byteLength;\n alignedGops.duration = duration;\n alignedGops.nalCount = nalCount;\n alignedGops.pts = alignedGops[0].pts;\n alignedGops.dts = alignedGops[0].dts;\n return alignedGops;\n }; // trim gop list to the first gop found that has a matching pts with a gop in the list\n // of gopsToAlignWith starting from the END of the list\n\n this.alignGopsAtEnd_ = function (gops) {\n var alignIndex, gopIndex, align, gop, alignEndIndex, matchFound;\n alignIndex = gopsToAlignWith.length - 1;\n gopIndex = gops.length - 1;\n alignEndIndex = null;\n matchFound = false;\n while (alignIndex >= 0 && gopIndex >= 0) {\n align = gopsToAlignWith[alignIndex];\n gop = gops[gopIndex];\n if (align.pts === gop.pts) {\n matchFound = true;\n break;\n }\n if (align.pts > gop.pts) {\n alignIndex--;\n continue;\n }\n if (alignIndex === gopsToAlignWith.length - 1) {\n // gop.pts is greater than the last alignment candidate. If no match is found\n // by the end of this loop, we still want to append gops that come after this\n // point\n alignEndIndex = gopIndex;\n }\n gopIndex--;\n }\n if (!matchFound && alignEndIndex === null) {\n return null;\n }\n var trimIndex;\n if (matchFound) {\n trimIndex = gopIndex;\n } else {\n trimIndex = alignEndIndex;\n }\n if (trimIndex === 0) {\n return gops;\n }\n var alignedGops = gops.slice(trimIndex);\n var metadata = alignedGops.reduce(function (total, gop) {\n total.byteLength += gop.byteLength;\n total.duration += gop.duration;\n total.nalCount += gop.nalCount;\n return total;\n }, {\n byteLength: 0,\n duration: 0,\n nalCount: 0\n });\n alignedGops.byteLength = metadata.byteLength;\n alignedGops.duration = metadata.duration;\n alignedGops.nalCount = metadata.nalCount;\n alignedGops.pts = alignedGops[0].pts;\n alignedGops.dts = alignedGops[0].dts;\n return alignedGops;\n };\n this.alignGopsWith = function (newGopsToAlignWith) {\n gopsToAlignWith = newGopsToAlignWith;\n };\n };\n _VideoSegmentStream.prototype = new Stream();\n /**\n * A Stream that can combine multiple streams (ie. audio & video)\n * into a single output segment for MSE. Also supports audio-only\n * and video-only streams.\n * @param options {object} transmuxer options object\n * @param options.keepOriginalTimestamps {boolean} If true, keep the timestamps\n * in the source; false to adjust the first segment to start at media timeline start.\n */\n\n _CoalesceStream = function CoalesceStream(options, metadataStream) {\n // Number of Tracks per output segment\n // If greater than 1, we combine multiple\n // tracks into a single segment\n this.numberOfTracks = 0;\n this.metadataStream = metadataStream;\n options = options || {};\n if (typeof options.remux !== 'undefined') {\n this.remuxTracks = !!options.remux;\n } else {\n this.remuxTracks = true;\n }\n if (typeof options.keepOriginalTimestamps === 'boolean') {\n this.keepOriginalTimestamps = options.keepOriginalTimestamps;\n } else {\n this.keepOriginalTimestamps = false;\n }\n this.pendingTracks = [];\n this.videoTrack = null;\n this.pendingBoxes = [];\n this.pendingCaptions = [];\n this.pendingMetadata = [];\n this.pendingBytes = 0;\n this.emittedTracks = 0;\n _CoalesceStream.prototype.init.call(this); // Take output from multiple\n\n this.push = function (output) {\n // buffer incoming captions until the associated video segment\n // finishes\n if (output.content || output.text) {\n return this.pendingCaptions.push(output);\n } // buffer incoming id3 tags until the final flush\n\n if (output.frames) {\n return this.pendingMetadata.push(output);\n } // Add this track to the list of pending tracks and store\n // important information required for the construction of\n // the final segment\n\n this.pendingTracks.push(output.track);\n this.pendingBytes += output.boxes.byteLength; // TODO: is there an issue for this against chrome?\n // We unshift audio and push video because\n // as of Chrome 75 when switching from\n // one init segment to another if the video\n // mdat does not appear after the audio mdat\n // only audio will play for the duration of our transmux.\n\n if (output.track.type === 'video') {\n this.videoTrack = output.track;\n this.pendingBoxes.push(output.boxes);\n }\n if (output.track.type === 'audio') {\n this.audioTrack = output.track;\n this.pendingBoxes.unshift(output.boxes);\n }\n };\n };\n _CoalesceStream.prototype = new Stream();\n _CoalesceStream.prototype.flush = function (flushSource) {\n var offset = 0,\n event = {\n captions: [],\n captionStreams: {},\n metadata: [],\n info: {}\n },\n caption,\n id3,\n initSegment,\n timelineStartPts = 0,\n i;\n if (this.pendingTracks.length < this.numberOfTracks) {\n if (flushSource !== 'VideoSegmentStream' && flushSource !== 'AudioSegmentStream') {\n // Return because we haven't received a flush from a data-generating\n // portion of the segment (meaning that we have only recieved meta-data\n // or captions.)\n return;\n } else if (this.remuxTracks) {\n // Return until we have enough tracks from the pipeline to remux (if we\n // are remuxing audio and video into a single MP4)\n return;\n } else if (this.pendingTracks.length === 0) {\n // In the case where we receive a flush without any data having been\n // received we consider it an emitted track for the purposes of coalescing\n // `done` events.\n // We do this for the case where there is an audio and video track in the\n // segment but no audio data. (seen in several playlists with alternate\n // audio tracks and no audio present in the main TS segments.)\n this.emittedTracks++;\n if (this.emittedTracks >= this.numberOfTracks) {\n this.trigger('done');\n this.emittedTracks = 0;\n }\n return;\n }\n }\n if (this.videoTrack) {\n timelineStartPts = this.videoTrack.timelineStartInfo.pts;\n VIDEO_PROPERTIES.forEach(function (prop) {\n event.info[prop] = this.videoTrack[prop];\n }, this);\n } else if (this.audioTrack) {\n timelineStartPts = this.audioTrack.timelineStartInfo.pts;\n AUDIO_PROPERTIES.forEach(function (prop) {\n event.info[prop] = this.audioTrack[prop];\n }, this);\n }\n if (this.videoTrack || this.audioTrack) {\n if (this.pendingTracks.length === 1) {\n event.type = this.pendingTracks[0].type;\n } else {\n event.type = 'combined';\n }\n this.emittedTracks += this.pendingTracks.length;\n initSegment = mp4.initSegment(this.pendingTracks); // Create a new typed array to hold the init segment\n\n event.initSegment = new Uint8Array(initSegment.byteLength); // Create an init segment containing a moov\n // and track definitions\n\n event.initSegment.set(initSegment); // Create a new typed array to hold the moof+mdats\n\n event.data = new Uint8Array(this.pendingBytes); // Append each moof+mdat (one per track) together\n\n for (i = 0; i < this.pendingBoxes.length; i++) {\n event.data.set(this.pendingBoxes[i], offset);\n offset += this.pendingBoxes[i].byteLength;\n } // Translate caption PTS times into second offsets to match the\n // video timeline for the segment, and add track info\n\n for (i = 0; i < this.pendingCaptions.length; i++) {\n caption = this.pendingCaptions[i];\n caption.startTime = clock.metadataTsToSeconds(caption.startPts, timelineStartPts, this.keepOriginalTimestamps);\n caption.endTime = clock.metadataTsToSeconds(caption.endPts, timelineStartPts, this.keepOriginalTimestamps);\n event.captionStreams[caption.stream] = true;\n event.captions.push(caption);\n } // Translate ID3 frame PTS times into second offsets to match the\n // video timeline for the segment\n\n for (i = 0; i < this.pendingMetadata.length; i++) {\n id3 = this.pendingMetadata[i];\n id3.cueTime = clock.metadataTsToSeconds(id3.pts, timelineStartPts, this.keepOriginalTimestamps);\n event.metadata.push(id3);\n } // We add this to every single emitted segment even though we only need\n // it for the first\n\n event.metadata.dispatchType = this.metadataStream.dispatchType; // Reset stream state\n\n this.pendingTracks.length = 0;\n this.videoTrack = null;\n this.pendingBoxes.length = 0;\n this.pendingCaptions.length = 0;\n this.pendingBytes = 0;\n this.pendingMetadata.length = 0; // Emit the built segment\n // We include captions and ID3 tags for backwards compatibility,\n // ideally we should send only video and audio in the data event\n\n this.trigger('data', event); // Emit each caption to the outside world\n // Ideally, this would happen immediately on parsing captions,\n // but we need to ensure that video data is sent back first\n // so that caption timing can be adjusted to match video timing\n\n for (i = 0; i < event.captions.length; i++) {\n caption = event.captions[i];\n this.trigger('caption', caption);\n } // Emit each id3 tag to the outside world\n // Ideally, this would happen immediately on parsing the tag,\n // but we need to ensure that video data is sent back first\n // so that ID3 frame timing can be adjusted to match video timing\n\n for (i = 0; i < event.metadata.length; i++) {\n id3 = event.metadata[i];\n this.trigger('id3Frame', id3);\n }\n } // Only emit `done` if all tracks have been flushed and emitted\n\n if (this.emittedTracks >= this.numberOfTracks) {\n this.trigger('done');\n this.emittedTracks = 0;\n }\n };\n _CoalesceStream.prototype.setRemux = function (val) {\n this.remuxTracks = val;\n };\n /**\n * A Stream that expects MP2T binary data as input and produces\n * corresponding media segments, suitable for use with Media Source\n * Extension (MSE) implementations that support the ISO BMFF byte\n * stream format, like Chrome.\n */\n\n _Transmuxer = function Transmuxer(options) {\n var self = this,\n hasFlushed = true,\n videoTrack,\n audioTrack;\n _Transmuxer.prototype.init.call(this);\n options = options || {};\n this.baseMediaDecodeTime = options.baseMediaDecodeTime || 0;\n this.transmuxPipeline_ = {};\n this.setupAacPipeline = function () {\n var pipeline = {};\n this.transmuxPipeline_ = pipeline;\n pipeline.type = 'aac';\n pipeline.metadataStream = new m2ts.MetadataStream(); // set up the parsing pipeline\n\n pipeline.aacStream = new AacStream();\n pipeline.audioTimestampRolloverStream = new m2ts.TimestampRolloverStream('audio');\n pipeline.timedMetadataTimestampRolloverStream = new m2ts.TimestampRolloverStream('timed-metadata');\n pipeline.adtsStream = new AdtsStream();\n pipeline.coalesceStream = new _CoalesceStream(options, pipeline.metadataStream);\n pipeline.headOfPipeline = pipeline.aacStream;\n pipeline.aacStream.pipe(pipeline.audioTimestampRolloverStream).pipe(pipeline.adtsStream);\n pipeline.aacStream.pipe(pipeline.timedMetadataTimestampRolloverStream).pipe(pipeline.metadataStream).pipe(pipeline.coalesceStream);\n pipeline.metadataStream.on('timestamp', function (frame) {\n pipeline.aacStream.setTimestamp(frame.timeStamp);\n });\n pipeline.aacStream.on('data', function (data) {\n if (data.type !== 'timed-metadata' && data.type !== 'audio' || pipeline.audioSegmentStream) {\n return;\n }\n audioTrack = audioTrack || {\n timelineStartInfo: {\n baseMediaDecodeTime: self.baseMediaDecodeTime\n },\n codec: 'adts',\n type: 'audio'\n }; // hook up the audio segment stream to the first track with aac data\n\n pipeline.coalesceStream.numberOfTracks++;\n pipeline.audioSegmentStream = new _AudioSegmentStream(audioTrack, options);\n pipeline.audioSegmentStream.on('log', self.getLogTrigger_('audioSegmentStream'));\n pipeline.audioSegmentStream.on('timingInfo', self.trigger.bind(self, 'audioTimingInfo')); // Set up the final part of the audio pipeline\n\n pipeline.adtsStream.pipe(pipeline.audioSegmentStream).pipe(pipeline.coalesceStream); // emit pmt info\n\n self.trigger('trackinfo', {\n hasAudio: !!audioTrack,\n hasVideo: !!videoTrack\n });\n }); // Re-emit any data coming from the coalesce stream to the outside world\n\n pipeline.coalesceStream.on('data', this.trigger.bind(this, 'data')); // Let the consumer know we have finished flushing the entire pipeline\n\n pipeline.coalesceStream.on('done', this.trigger.bind(this, 'done'));\n addPipelineLogRetriggers(this, pipeline);\n };\n this.setupTsPipeline = function () {\n var pipeline = {};\n this.transmuxPipeline_ = pipeline;\n pipeline.type = 'ts';\n pipeline.metadataStream = new m2ts.MetadataStream(); // set up the parsing pipeline\n\n pipeline.packetStream = new m2ts.TransportPacketStream();\n pipeline.parseStream = new m2ts.TransportParseStream();\n pipeline.elementaryStream = new m2ts.ElementaryStream();\n pipeline.timestampRolloverStream = new m2ts.TimestampRolloverStream();\n pipeline.adtsStream = new AdtsStream();\n pipeline.h264Stream = new H264Stream();\n pipeline.captionStream = new m2ts.CaptionStream(options);\n pipeline.coalesceStream = new _CoalesceStream(options, pipeline.metadataStream);\n pipeline.headOfPipeline = pipeline.packetStream; // disassemble MPEG2-TS packets into elementary streams\n\n pipeline.packetStream.pipe(pipeline.parseStream).pipe(pipeline.elementaryStream).pipe(pipeline.timestampRolloverStream); // !!THIS ORDER IS IMPORTANT!!\n // demux the streams\n\n pipeline.timestampRolloverStream.pipe(pipeline.h264Stream);\n pipeline.timestampRolloverStream.pipe(pipeline.adtsStream);\n pipeline.timestampRolloverStream.pipe(pipeline.metadataStream).pipe(pipeline.coalesceStream); // Hook up CEA-608/708 caption stream\n\n pipeline.h264Stream.pipe(pipeline.captionStream).pipe(pipeline.coalesceStream);\n pipeline.elementaryStream.on('data', function (data) {\n var i;\n if (data.type === 'metadata') {\n i = data.tracks.length; // scan the tracks listed in the metadata\n\n while (i--) {\n if (!videoTrack && data.tracks[i].type === 'video') {\n videoTrack = data.tracks[i];\n videoTrack.timelineStartInfo.baseMediaDecodeTime = self.baseMediaDecodeTime;\n } else if (!audioTrack && data.tracks[i].type === 'audio') {\n audioTrack = data.tracks[i];\n audioTrack.timelineStartInfo.baseMediaDecodeTime = self.baseMediaDecodeTime;\n }\n } // hook up the video segment stream to the first track with h264 data\n\n if (videoTrack && !pipeline.videoSegmentStream) {\n pipeline.coalesceStream.numberOfTracks++;\n pipeline.videoSegmentStream = new _VideoSegmentStream(videoTrack, options);\n pipeline.videoSegmentStream.on('log', self.getLogTrigger_('videoSegmentStream'));\n pipeline.videoSegmentStream.on('timelineStartInfo', function (timelineStartInfo) {\n // When video emits timelineStartInfo data after a flush, we forward that\n // info to the AudioSegmentStream, if it exists, because video timeline\n // data takes precedence. Do not do this if keepOriginalTimestamps is set,\n // because this is a particularly subtle form of timestamp alteration.\n if (audioTrack && !options.keepOriginalTimestamps) {\n audioTrack.timelineStartInfo = timelineStartInfo; // On the first segment we trim AAC frames that exist before the\n // very earliest DTS we have seen in video because Chrome will\n // interpret any video track with a baseMediaDecodeTime that is\n // non-zero as a gap.\n\n pipeline.audioSegmentStream.setEarliestDts(timelineStartInfo.dts - self.baseMediaDecodeTime);\n }\n });\n pipeline.videoSegmentStream.on('processedGopsInfo', self.trigger.bind(self, 'gopInfo'));\n pipeline.videoSegmentStream.on('segmentTimingInfo', self.trigger.bind(self, 'videoSegmentTimingInfo'));\n pipeline.videoSegmentStream.on('baseMediaDecodeTime', function (baseMediaDecodeTime) {\n if (audioTrack) {\n pipeline.audioSegmentStream.setVideoBaseMediaDecodeTime(baseMediaDecodeTime);\n }\n });\n pipeline.videoSegmentStream.on('timingInfo', self.trigger.bind(self, 'videoTimingInfo')); // Set up the final part of the video pipeline\n\n pipeline.h264Stream.pipe(pipeline.videoSegmentStream).pipe(pipeline.coalesceStream);\n }\n if (audioTrack && !pipeline.audioSegmentStream) {\n // hook up the audio segment stream to the first track with aac data\n pipeline.coalesceStream.numberOfTracks++;\n pipeline.audioSegmentStream = new _AudioSegmentStream(audioTrack, options);\n pipeline.audioSegmentStream.on('log', self.getLogTrigger_('audioSegmentStream'));\n pipeline.audioSegmentStream.on('timingInfo', self.trigger.bind(self, 'audioTimingInfo'));\n pipeline.audioSegmentStream.on('segmentTimingInfo', self.trigger.bind(self, 'audioSegmentTimingInfo')); // Set up the final part of the audio pipeline\n\n pipeline.adtsStream.pipe(pipeline.audioSegmentStream).pipe(pipeline.coalesceStream);\n } // emit pmt info\n\n self.trigger('trackinfo', {\n hasAudio: !!audioTrack,\n hasVideo: !!videoTrack\n });\n }\n }); // Re-emit any data coming from the coalesce stream to the outside world\n\n pipeline.coalesceStream.on('data', this.trigger.bind(this, 'data'));\n pipeline.coalesceStream.on('id3Frame', function (id3Frame) {\n id3Frame.dispatchType = pipeline.metadataStream.dispatchType;\n self.trigger('id3Frame', id3Frame);\n });\n pipeline.coalesceStream.on('caption', this.trigger.bind(this, 'caption')); // Let the consumer know we have finished flushing the entire pipeline\n\n pipeline.coalesceStream.on('done', this.trigger.bind(this, 'done'));\n addPipelineLogRetriggers(this, pipeline);\n }; // hook up the segment streams once track metadata is delivered\n\n this.setBaseMediaDecodeTime = function (baseMediaDecodeTime) {\n var pipeline = this.transmuxPipeline_;\n if (!options.keepOriginalTimestamps) {\n this.baseMediaDecodeTime = baseMediaDecodeTime;\n }\n if (audioTrack) {\n audioTrack.timelineStartInfo.dts = undefined;\n audioTrack.timelineStartInfo.pts = undefined;\n trackDecodeInfo.clearDtsInfo(audioTrack);\n if (pipeline.audioTimestampRolloverStream) {\n pipeline.audioTimestampRolloverStream.discontinuity();\n }\n }\n if (videoTrack) {\n if (pipeline.videoSegmentStream) {\n pipeline.videoSegmentStream.gopCache_ = [];\n }\n videoTrack.timelineStartInfo.dts = undefined;\n videoTrack.timelineStartInfo.pts = undefined;\n trackDecodeInfo.clearDtsInfo(videoTrack);\n pipeline.captionStream.reset();\n }\n if (pipeline.timestampRolloverStream) {\n pipeline.timestampRolloverStream.discontinuity();\n }\n };\n this.setAudioAppendStart = function (timestamp) {\n if (audioTrack) {\n this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(timestamp);\n }\n };\n this.setRemux = function (val) {\n var pipeline = this.transmuxPipeline_;\n options.remux = val;\n if (pipeline && pipeline.coalesceStream) {\n pipeline.coalesceStream.setRemux(val);\n }\n };\n this.alignGopsWith = function (gopsToAlignWith) {\n if (videoTrack && this.transmuxPipeline_.videoSegmentStream) {\n this.transmuxPipeline_.videoSegmentStream.alignGopsWith(gopsToAlignWith);\n }\n };\n this.getLogTrigger_ = function (key) {\n var self = this;\n return function (event) {\n event.stream = key;\n self.trigger('log', event);\n };\n }; // feed incoming data to the front of the parsing pipeline\n\n this.push = function (data) {\n if (hasFlushed) {\n var isAac = isLikelyAacData(data);\n if (isAac && this.transmuxPipeline_.type !== 'aac') {\n this.setupAacPipeline();\n } else if (!isAac && this.transmuxPipeline_.type !== 'ts') {\n this.setupTsPipeline();\n }\n hasFlushed = false;\n }\n this.transmuxPipeline_.headOfPipeline.push(data);\n }; // flush any buffered data\n\n this.flush = function () {\n hasFlushed = true; // Start at the top of the pipeline and flush all pending work\n\n this.transmuxPipeline_.headOfPipeline.flush();\n };\n this.endTimeline = function () {\n this.transmuxPipeline_.headOfPipeline.endTimeline();\n };\n this.reset = function () {\n if (this.transmuxPipeline_.headOfPipeline) {\n this.transmuxPipeline_.headOfPipeline.reset();\n }\n }; // Caption data has to be reset when seeking outside buffered range\n\n this.resetCaptions = function () {\n if (this.transmuxPipeline_.captionStream) {\n this.transmuxPipeline_.captionStream.reset();\n }\n };\n };\n _Transmuxer.prototype = new Stream();\n var transmuxer = {\n Transmuxer: _Transmuxer,\n VideoSegmentStream: _VideoSegmentStream,\n AudioSegmentStream: _AudioSegmentStream,\n AUDIO_PROPERTIES: AUDIO_PROPERTIES,\n VIDEO_PROPERTIES: VIDEO_PROPERTIES,\n // exported for testing\n generateSegmentTimingInfo: generateSegmentTimingInfo\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n */\n\n var toUnsigned$3 = function toUnsigned$3(value) {\n return value >>> 0;\n };\n var toHexString$1 = function toHexString$1(value) {\n return ('00' + value.toString(16)).slice(-2);\n };\n var bin = {\n toUnsigned: toUnsigned$3,\n toHexString: toHexString$1\n };\n var parseType$3 = function parseType$3(buffer) {\n var result = '';\n result += String.fromCharCode(buffer[0]);\n result += String.fromCharCode(buffer[1]);\n result += String.fromCharCode(buffer[2]);\n result += String.fromCharCode(buffer[3]);\n return result;\n };\n var parseType_1 = parseType$3;\n var toUnsigned$2 = bin.toUnsigned;\n var parseType$2 = parseType_1;\n var findBox$2 = function findBox$2(data, path) {\n var results = [],\n i,\n size,\n type,\n end,\n subresults;\n if (!path.length) {\n // short-circuit the search for empty paths\n return null;\n }\n for (i = 0; i < data.byteLength;) {\n size = toUnsigned$2(data[i] << 24 | data[i + 1] << 16 | data[i + 2] << 8 | data[i + 3]);\n type = parseType$2(data.subarray(i + 4, i + 8));\n end = size > 1 ? i + size : data.byteLength;\n if (type === path[0]) {\n if (path.length === 1) {\n // this is the end of the path and we've found the box we were\n // looking for\n results.push(data.subarray(i + 8, end));\n } else {\n // recursively search for the next box along the path\n subresults = findBox$2(data.subarray(i + 8, end), path.slice(1));\n if (subresults.length) {\n results = results.concat(subresults);\n }\n }\n }\n i = end;\n } // we've finished searching all of data\n\n return results;\n };\n var findBox_1 = findBox$2;\n var toUnsigned$1 = bin.toUnsigned;\n var getUint64$2 = numbers.getUint64;\n var tfdt = function tfdt(data) {\n var result = {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4))\n };\n if (result.version === 1) {\n result.baseMediaDecodeTime = getUint64$2(data.subarray(4));\n } else {\n result.baseMediaDecodeTime = toUnsigned$1(data[4] << 24 | data[5] << 16 | data[6] << 8 | data[7]);\n }\n return result;\n };\n var parseTfdt$2 = tfdt;\n var parseSampleFlags$1 = function parseSampleFlags$1(flags) {\n return {\n isLeading: (flags[0] & 0x0c) >>> 2,\n dependsOn: flags[0] & 0x03,\n isDependedOn: (flags[1] & 0xc0) >>> 6,\n hasRedundancy: (flags[1] & 0x30) >>> 4,\n paddingValue: (flags[1] & 0x0e) >>> 1,\n isNonSyncSample: flags[1] & 0x01,\n degradationPriority: flags[2] << 8 | flags[3]\n };\n };\n var parseSampleFlags_1 = parseSampleFlags$1;\n var parseSampleFlags = parseSampleFlags_1;\n var trun = function trun(data) {\n var result = {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4)),\n samples: []\n },\n view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n // Flag interpretation\n dataOffsetPresent = result.flags[2] & 0x01,\n // compare with 2nd byte of 0x1\n firstSampleFlagsPresent = result.flags[2] & 0x04,\n // compare with 2nd byte of 0x4\n sampleDurationPresent = result.flags[1] & 0x01,\n // compare with 2nd byte of 0x100\n sampleSizePresent = result.flags[1] & 0x02,\n // compare with 2nd byte of 0x200\n sampleFlagsPresent = result.flags[1] & 0x04,\n // compare with 2nd byte of 0x400\n sampleCompositionTimeOffsetPresent = result.flags[1] & 0x08,\n // compare with 2nd byte of 0x800\n sampleCount = view.getUint32(4),\n offset = 8,\n sample;\n if (dataOffsetPresent) {\n // 32 bit signed integer\n result.dataOffset = view.getInt32(offset);\n offset += 4;\n } // Overrides the flags for the first sample only. The order of\n // optional values will be: duration, size, compositionTimeOffset\n\n if (firstSampleFlagsPresent && sampleCount) {\n sample = {\n flags: parseSampleFlags(data.subarray(offset, offset + 4))\n };\n offset += 4;\n if (sampleDurationPresent) {\n sample.duration = view.getUint32(offset);\n offset += 4;\n }\n if (sampleSizePresent) {\n sample.size = view.getUint32(offset);\n offset += 4;\n }\n if (sampleCompositionTimeOffsetPresent) {\n if (result.version === 1) {\n sample.compositionTimeOffset = view.getInt32(offset);\n } else {\n sample.compositionTimeOffset = view.getUint32(offset);\n }\n offset += 4;\n }\n result.samples.push(sample);\n sampleCount--;\n }\n while (sampleCount--) {\n sample = {};\n if (sampleDurationPresent) {\n sample.duration = view.getUint32(offset);\n offset += 4;\n }\n if (sampleSizePresent) {\n sample.size = view.getUint32(offset);\n offset += 4;\n }\n if (sampleFlagsPresent) {\n sample.flags = parseSampleFlags(data.subarray(offset, offset + 4));\n offset += 4;\n }\n if (sampleCompositionTimeOffsetPresent) {\n if (result.version === 1) {\n sample.compositionTimeOffset = view.getInt32(offset);\n } else {\n sample.compositionTimeOffset = view.getUint32(offset);\n }\n offset += 4;\n }\n result.samples.push(sample);\n }\n return result;\n };\n var parseTrun$2 = trun;\n var tfhd = function tfhd(data) {\n var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n result = {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4)),\n trackId: view.getUint32(4)\n },\n baseDataOffsetPresent = result.flags[2] & 0x01,\n sampleDescriptionIndexPresent = result.flags[2] & 0x02,\n defaultSampleDurationPresent = result.flags[2] & 0x08,\n defaultSampleSizePresent = result.flags[2] & 0x10,\n defaultSampleFlagsPresent = result.flags[2] & 0x20,\n durationIsEmpty = result.flags[0] & 0x010000,\n defaultBaseIsMoof = result.flags[0] & 0x020000,\n i;\n i = 8;\n if (baseDataOffsetPresent) {\n i += 4; // truncate top 4 bytes\n // FIXME: should we read the full 64 bits?\n\n result.baseDataOffset = view.getUint32(12);\n i += 4;\n }\n if (sampleDescriptionIndexPresent) {\n result.sampleDescriptionIndex = view.getUint32(i);\n i += 4;\n }\n if (defaultSampleDurationPresent) {\n result.defaultSampleDuration = view.getUint32(i);\n i += 4;\n }\n if (defaultSampleSizePresent) {\n result.defaultSampleSize = view.getUint32(i);\n i += 4;\n }\n if (defaultSampleFlagsPresent) {\n result.defaultSampleFlags = view.getUint32(i);\n }\n if (durationIsEmpty) {\n result.durationIsEmpty = true;\n }\n if (!baseDataOffsetPresent && defaultBaseIsMoof) {\n result.baseDataOffsetIsMoof = true;\n }\n return result;\n };\n var parseTfhd$2 = tfhd;\n var win;\n if (typeof window !== \"undefined\") {\n win = window;\n } else if (typeof commonjsGlobal !== \"undefined\") {\n win = commonjsGlobal;\n } else if (typeof self !== \"undefined\") {\n win = self;\n } else {\n win = {};\n }\n var window_1 = win;\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Reads in-band CEA-708 captions out of FMP4 segments.\n * @see https://en.wikipedia.org/wiki/CEA-708\n */\n\n var discardEmulationPreventionBytes = captionPacketParser.discardEmulationPreventionBytes;\n var CaptionStream = captionStream.CaptionStream;\n var findBox$1 = findBox_1;\n var parseTfdt$1 = parseTfdt$2;\n var parseTrun$1 = parseTrun$2;\n var parseTfhd$1 = parseTfhd$2;\n var window$2 = window_1;\n /**\n * Maps an offset in the mdat to a sample based on the the size of the samples.\n * Assumes that `parseSamples` has been called first.\n *\n * @param {Number} offset - The offset into the mdat\n * @param {Object[]} samples - An array of samples, parsed using `parseSamples`\n * @return {?Object} The matching sample, or null if no match was found.\n *\n * @see ISO-BMFF-12/2015, Section 8.8.8\n **/\n\n var mapToSample = function mapToSample(offset, samples) {\n var approximateOffset = offset;\n for (var i = 0; i < samples.length; i++) {\n var sample = samples[i];\n if (approximateOffset < sample.size) {\n return sample;\n }\n approximateOffset -= sample.size;\n }\n return null;\n };\n /**\n * Finds SEI nal units contained in a Media Data Box.\n * Assumes that `parseSamples` has been called first.\n *\n * @param {Uint8Array} avcStream - The bytes of the mdat\n * @param {Object[]} samples - The samples parsed out by `parseSamples`\n * @param {Number} trackId - The trackId of this video track\n * @return {Object[]} seiNals - the parsed SEI NALUs found.\n * The contents of the seiNal should match what is expected by\n * CaptionStream.push (nalUnitType, size, data, escapedRBSP, pts, dts)\n *\n * @see ISO-BMFF-12/2015, Section 8.1.1\n * @see Rec. ITU-T H.264, 7.3.2.3.1\n **/\n\n var findSeiNals = function findSeiNals(avcStream, samples, trackId) {\n var avcView = new DataView(avcStream.buffer, avcStream.byteOffset, avcStream.byteLength),\n result = {\n logs: [],\n seiNals: []\n },\n seiNal,\n i,\n length,\n lastMatchedSample;\n for (i = 0; i + 4 < avcStream.length; i += length) {\n length = avcView.getUint32(i);\n i += 4; // Bail if this doesn't appear to be an H264 stream\n\n if (length <= 0) {\n continue;\n }\n switch (avcStream[i] & 0x1F) {\n case 0x06:\n var data = avcStream.subarray(i + 1, i + 1 + length);\n var matchingSample = mapToSample(i, samples);\n seiNal = {\n nalUnitType: 'sei_rbsp',\n size: length,\n data: data,\n escapedRBSP: discardEmulationPreventionBytes(data),\n trackId: trackId\n };\n if (matchingSample) {\n seiNal.pts = matchingSample.pts;\n seiNal.dts = matchingSample.dts;\n lastMatchedSample = matchingSample;\n } else if (lastMatchedSample) {\n // If a matching sample cannot be found, use the last\n // sample's values as they should be as close as possible\n seiNal.pts = lastMatchedSample.pts;\n seiNal.dts = lastMatchedSample.dts;\n } else {\n result.logs.push({\n level: 'warn',\n message: 'We\\'ve encountered a nal unit without data at ' + i + ' for trackId ' + trackId + '. See mux.js#223.'\n });\n break;\n }\n result.seiNals.push(seiNal);\n break;\n }\n }\n return result;\n };\n /**\n * Parses sample information out of Track Run Boxes and calculates\n * the absolute presentation and decode timestamps of each sample.\n *\n * @param {Array<Uint8Array>} truns - The Trun Run boxes to be parsed\n * @param {Number|BigInt} baseMediaDecodeTime - base media decode time from tfdt\n @see ISO-BMFF-12/2015, Section 8.8.12\n * @param {Object} tfhd - The parsed Track Fragment Header\n * @see inspect.parseTfhd\n * @return {Object[]} the parsed samples\n *\n * @see ISO-BMFF-12/2015, Section 8.8.8\n **/\n\n var parseSamples = function parseSamples(truns, baseMediaDecodeTime, tfhd) {\n var currentDts = baseMediaDecodeTime;\n var defaultSampleDuration = tfhd.defaultSampleDuration || 0;\n var defaultSampleSize = tfhd.defaultSampleSize || 0;\n var trackId = tfhd.trackId;\n var allSamples = [];\n truns.forEach(function (trun) {\n // Note: We currently do not parse the sample table as well\n // as the trun. It's possible some sources will require this.\n // moov > trak > mdia > minf > stbl\n var trackRun = parseTrun$1(trun);\n var samples = trackRun.samples;\n samples.forEach(function (sample) {\n if (sample.duration === undefined) {\n sample.duration = defaultSampleDuration;\n }\n if (sample.size === undefined) {\n sample.size = defaultSampleSize;\n }\n sample.trackId = trackId;\n sample.dts = currentDts;\n if (sample.compositionTimeOffset === undefined) {\n sample.compositionTimeOffset = 0;\n }\n if (typeof currentDts === 'bigint') {\n sample.pts = currentDts + window$2.BigInt(sample.compositionTimeOffset);\n currentDts += window$2.BigInt(sample.duration);\n } else {\n sample.pts = currentDts + sample.compositionTimeOffset;\n currentDts += sample.duration;\n }\n });\n allSamples = allSamples.concat(samples);\n });\n return allSamples;\n };\n /**\n * Parses out caption nals from an FMP4 segment's video tracks.\n *\n * @param {Uint8Array} segment - The bytes of a single segment\n * @param {Number} videoTrackId - The trackId of a video track in the segment\n * @return {Object.<Number, Object[]>} A mapping of video trackId to\n * a list of seiNals found in that track\n **/\n\n var parseCaptionNals = function parseCaptionNals(segment, videoTrackId) {\n // To get the samples\n var trafs = findBox$1(segment, ['moof', 'traf']); // To get SEI NAL units\n\n var mdats = findBox$1(segment, ['mdat']);\n var captionNals = {};\n var mdatTrafPairs = []; // Pair up each traf with a mdat as moofs and mdats are in pairs\n\n mdats.forEach(function (mdat, index) {\n var matchingTraf = trafs[index];\n mdatTrafPairs.push({\n mdat: mdat,\n traf: matchingTraf\n });\n });\n mdatTrafPairs.forEach(function (pair) {\n var mdat = pair.mdat;\n var traf = pair.traf;\n var tfhd = findBox$1(traf, ['tfhd']); // Exactly 1 tfhd per traf\n\n var headerInfo = parseTfhd$1(tfhd[0]);\n var trackId = headerInfo.trackId;\n var tfdt = findBox$1(traf, ['tfdt']); // Either 0 or 1 tfdt per traf\n\n var baseMediaDecodeTime = tfdt.length > 0 ? parseTfdt$1(tfdt[0]).baseMediaDecodeTime : 0;\n var truns = findBox$1(traf, ['trun']);\n var samples;\n var result; // Only parse video data for the chosen video track\n\n if (videoTrackId === trackId && truns.length > 0) {\n samples = parseSamples(truns, baseMediaDecodeTime, headerInfo);\n result = findSeiNals(mdat, samples, trackId);\n if (!captionNals[trackId]) {\n captionNals[trackId] = {\n seiNals: [],\n logs: []\n };\n }\n captionNals[trackId].seiNals = captionNals[trackId].seiNals.concat(result.seiNals);\n captionNals[trackId].logs = captionNals[trackId].logs.concat(result.logs);\n }\n });\n return captionNals;\n };\n /**\n * Parses out inband captions from an MP4 container and returns\n * caption objects that can be used by WebVTT and the TextTrack API.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/VTTCue\n * @see https://developer.mozilla.org/en-US/docs/Web/API/TextTrack\n * Assumes that `probe.getVideoTrackIds` and `probe.timescale` have been called first\n *\n * @param {Uint8Array} segment - The fmp4 segment containing embedded captions\n * @param {Number} trackId - The id of the video track to parse\n * @param {Number} timescale - The timescale for the video track from the init segment\n *\n * @return {?Object[]} parsedCaptions - A list of captions or null if no video tracks\n * @return {Number} parsedCaptions[].startTime - The time to show the caption in seconds\n * @return {Number} parsedCaptions[].endTime - The time to stop showing the caption in seconds\n * @return {Object[]} parsedCaptions[].content - A list of individual caption segments\n * @return {String} parsedCaptions[].content.text - The visible content of the caption segment\n * @return {Number} parsedCaptions[].content.line - The line height from 1-15 for positioning of the caption segment\n * @return {Number} parsedCaptions[].content.position - The column indent percentage for cue positioning from 10-80\n **/\n\n var parseEmbeddedCaptions = function parseEmbeddedCaptions(segment, trackId, timescale) {\n var captionNals; // the ISO-BMFF spec says that trackId can't be zero, but there's some broken content out there\n\n if (trackId === null) {\n return null;\n }\n captionNals = parseCaptionNals(segment, trackId);\n var trackNals = captionNals[trackId] || {};\n return {\n seiNals: trackNals.seiNals,\n logs: trackNals.logs,\n timescale: timescale\n };\n };\n /**\n * Converts SEI NALUs into captions that can be used by video.js\n **/\n\n var CaptionParser = function CaptionParser() {\n var isInitialized = false;\n var captionStream; // Stores segments seen before trackId and timescale are set\n\n var segmentCache; // Stores video track ID of the track being parsed\n\n var trackId; // Stores the timescale of the track being parsed\n\n var timescale; // Stores captions parsed so far\n\n var parsedCaptions; // Stores whether we are receiving partial data or not\n\n var parsingPartial;\n /**\n * A method to indicate whether a CaptionParser has been initalized\n * @returns {Boolean}\n **/\n\n this.isInitialized = function () {\n return isInitialized;\n };\n /**\n * Initializes the underlying CaptionStream, SEI NAL parsing\n * and management, and caption collection\n **/\n\n this.init = function (options) {\n captionStream = new CaptionStream();\n isInitialized = true;\n parsingPartial = options ? options.isPartial : false; // Collect dispatched captions\n\n captionStream.on('data', function (event) {\n // Convert to seconds in the source's timescale\n event.startTime = event.startPts / timescale;\n event.endTime = event.endPts / timescale;\n parsedCaptions.captions.push(event);\n parsedCaptions.captionStreams[event.stream] = true;\n });\n captionStream.on('log', function (log) {\n parsedCaptions.logs.push(log);\n });\n };\n /**\n * Determines if a new video track will be selected\n * or if the timescale changed\n * @return {Boolean}\n **/\n\n this.isNewInit = function (videoTrackIds, timescales) {\n if (videoTrackIds && videoTrackIds.length === 0 || timescales && _typeof(timescales) === 'object' && Object.keys(timescales).length === 0) {\n return false;\n }\n return trackId !== videoTrackIds[0] || timescale !== timescales[trackId];\n };\n /**\n * Parses out SEI captions and interacts with underlying\n * CaptionStream to return dispatched captions\n *\n * @param {Uint8Array} segment - The fmp4 segment containing embedded captions\n * @param {Number[]} videoTrackIds - A list of video tracks found in the init segment\n * @param {Object.<Number, Number>} timescales - The timescales found in the init segment\n * @see parseEmbeddedCaptions\n * @see m2ts/caption-stream.js\n **/\n\n this.parse = function (segment, videoTrackIds, timescales) {\n var parsedData;\n if (!this.isInitialized()) {\n return null; // This is not likely to be a video segment\n } else if (!videoTrackIds || !timescales) {\n return null;\n } else if (this.isNewInit(videoTrackIds, timescales)) {\n // Use the first video track only as there is no\n // mechanism to switch to other video tracks\n trackId = videoTrackIds[0];\n timescale = timescales[trackId]; // If an init segment has not been seen yet, hold onto segment\n // data until we have one.\n // the ISO-BMFF spec says that trackId can't be zero, but there's some broken content out there\n } else if (trackId === null || !timescale) {\n segmentCache.push(segment);\n return null;\n } // Now that a timescale and trackId is set, parse cached segments\n\n while (segmentCache.length > 0) {\n var cachedSegment = segmentCache.shift();\n this.parse(cachedSegment, videoTrackIds, timescales);\n }\n parsedData = parseEmbeddedCaptions(segment, trackId, timescale);\n if (parsedData && parsedData.logs) {\n parsedCaptions.logs = parsedCaptions.logs.concat(parsedData.logs);\n }\n if (parsedData === null || !parsedData.seiNals) {\n if (parsedCaptions.logs.length) {\n return {\n logs: parsedCaptions.logs,\n captions: [],\n captionStreams: []\n };\n }\n return null;\n }\n this.pushNals(parsedData.seiNals); // Force the parsed captions to be dispatched\n\n this.flushStream();\n return parsedCaptions;\n };\n /**\n * Pushes SEI NALUs onto CaptionStream\n * @param {Object[]} nals - A list of SEI nals parsed using `parseCaptionNals`\n * Assumes that `parseCaptionNals` has been called first\n * @see m2ts/caption-stream.js\n **/\n\n this.pushNals = function (nals) {\n if (!this.isInitialized() || !nals || nals.length === 0) {\n return null;\n }\n nals.forEach(function (nal) {\n captionStream.push(nal);\n });\n };\n /**\n * Flushes underlying CaptionStream to dispatch processed, displayable captions\n * @see m2ts/caption-stream.js\n **/\n\n this.flushStream = function () {\n if (!this.isInitialized()) {\n return null;\n }\n if (!parsingPartial) {\n captionStream.flush();\n } else {\n captionStream.partialFlush();\n }\n };\n /**\n * Reset caption buckets for new data\n **/\n\n this.clearParsedCaptions = function () {\n parsedCaptions.captions = [];\n parsedCaptions.captionStreams = {};\n parsedCaptions.logs = [];\n };\n /**\n * Resets underlying CaptionStream\n * @see m2ts/caption-stream.js\n **/\n\n this.resetCaptionStream = function () {\n if (!this.isInitialized()) {\n return null;\n }\n captionStream.reset();\n };\n /**\n * Convenience method to clear all captions flushed from the\n * CaptionStream and still being parsed\n * @see m2ts/caption-stream.js\n **/\n\n this.clearAllCaptions = function () {\n this.clearParsedCaptions();\n this.resetCaptionStream();\n };\n /**\n * Reset caption parser\n **/\n\n this.reset = function () {\n segmentCache = [];\n trackId = null;\n timescale = null;\n if (!parsedCaptions) {\n parsedCaptions = {\n captions: [],\n // CC1, CC2, CC3, CC4\n captionStreams: {},\n logs: []\n };\n } else {\n this.clearParsedCaptions();\n }\n this.resetCaptionStream();\n };\n this.reset();\n };\n var captionParser = CaptionParser;\n /**\n * Returns the first string in the data array ending with a null char '\\0'\n * @param {UInt8} data \n * @returns the string with the null char\n */\n\n var uint8ToCString$1 = function uint8ToCString$1(data) {\n var index = 0;\n var curChar = String.fromCharCode(data[index]);\n var retString = '';\n while (curChar !== '\\0') {\n retString += curChar;\n index++;\n curChar = String.fromCharCode(data[index]);\n } // Add nullChar\n\n retString += curChar;\n return retString;\n };\n var string = {\n uint8ToCString: uint8ToCString$1\n };\n var uint8ToCString = string.uint8ToCString;\n var getUint64$1 = numbers.getUint64;\n /**\n * Based on: ISO/IEC 23009 Section: 5.10.3.3\n * References:\n * https://dashif-documents.azurewebsites.net/Events/master/event.html#emsg-format\n * https://aomediacodec.github.io/id3-emsg/\n * \n * Takes emsg box data as a uint8 array and returns a emsg box object\n * @param {UInt8Array} boxData data from emsg box\n * @returns A parsed emsg box object\n */\n\n var parseEmsgBox = function parseEmsgBox(boxData) {\n // version + flags\n var offset = 4;\n var version = boxData[0];\n var scheme_id_uri, value, timescale, presentation_time, presentation_time_delta, event_duration, id, message_data;\n if (version === 0) {\n scheme_id_uri = uint8ToCString(boxData.subarray(offset));\n offset += scheme_id_uri.length;\n value = uint8ToCString(boxData.subarray(offset));\n offset += value.length;\n var dv = new DataView(boxData.buffer);\n timescale = dv.getUint32(offset);\n offset += 4;\n presentation_time_delta = dv.getUint32(offset);\n offset += 4;\n event_duration = dv.getUint32(offset);\n offset += 4;\n id = dv.getUint32(offset);\n offset += 4;\n } else if (version === 1) {\n var dv = new DataView(boxData.buffer);\n timescale = dv.getUint32(offset);\n offset += 4;\n presentation_time = getUint64$1(boxData.subarray(offset));\n offset += 8;\n event_duration = dv.getUint32(offset);\n offset += 4;\n id = dv.getUint32(offset);\n offset += 4;\n scheme_id_uri = uint8ToCString(boxData.subarray(offset));\n offset += scheme_id_uri.length;\n value = uint8ToCString(boxData.subarray(offset));\n offset += value.length;\n }\n message_data = new Uint8Array(boxData.subarray(offset, boxData.byteLength));\n var emsgBox = {\n scheme_id_uri: scheme_id_uri,\n value: value,\n // if timescale is undefined or 0 set to 1 \n timescale: timescale ? timescale : 1,\n presentation_time: presentation_time,\n presentation_time_delta: presentation_time_delta,\n event_duration: event_duration,\n id: id,\n message_data: message_data\n };\n return isValidEmsgBox(version, emsgBox) ? emsgBox : undefined;\n };\n /**\n * Scales a presentation time or time delta with an offset with a provided timescale\n * @param {number} presentationTime \n * @param {number} timescale \n * @param {number} timeDelta \n * @param {number} offset \n * @returns the scaled time as a number\n */\n\n var scaleTime = function scaleTime(presentationTime, timescale, timeDelta, offset) {\n return presentationTime || presentationTime === 0 ? presentationTime / timescale : offset + timeDelta / timescale;\n };\n /**\n * Checks the emsg box data for validity based on the version\n * @param {number} version of the emsg box to validate\n * @param {Object} emsg the emsg data to validate\n * @returns if the box is valid as a boolean\n */\n\n var isValidEmsgBox = function isValidEmsgBox(version, emsg) {\n var hasScheme = emsg.scheme_id_uri !== '\\0';\n var isValidV0Box = version === 0 && isDefined(emsg.presentation_time_delta) && hasScheme;\n var isValidV1Box = version === 1 && isDefined(emsg.presentation_time) && hasScheme; // Only valid versions of emsg are 0 and 1\n\n return !(version > 1) && isValidV0Box || isValidV1Box;\n }; // Utility function to check if an object is defined\n\n var isDefined = function isDefined(data) {\n return data !== undefined || data !== null;\n };\n var emsg$1 = {\n parseEmsgBox: parseEmsgBox,\n scaleTime: scaleTime\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Utilities to detect basic properties and metadata about MP4s.\n */\n\n var toUnsigned = bin.toUnsigned;\n var toHexString = bin.toHexString;\n var findBox = findBox_1;\n var parseType$1 = parseType_1;\n var emsg = emsg$1;\n var parseTfhd = parseTfhd$2;\n var parseTrun = parseTrun$2;\n var parseTfdt = parseTfdt$2;\n var getUint64 = numbers.getUint64;\n var timescale, startTime, compositionStartTime, getVideoTrackIds, getTracks, getTimescaleFromMediaHeader, getEmsgID3;\n var window$1 = window_1;\n var parseId3Frames = parseId3.parseId3Frames;\n /**\n * Parses an MP4 initialization segment and extracts the timescale\n * values for any declared tracks. Timescale values indicate the\n * number of clock ticks per second to assume for time-based values\n * elsewhere in the MP4.\n *\n * To determine the start time of an MP4, you need two pieces of\n * information: the timescale unit and the earliest base media decode\n * time. Multiple timescales can be specified within an MP4 but the\n * base media decode time is always expressed in the timescale from\n * the media header box for the track:\n * ```\n * moov > trak > mdia > mdhd.timescale\n * ```\n * @param init {Uint8Array} the bytes of the init segment\n * @return {object} a hash of track ids to timescale values or null if\n * the init segment is malformed.\n */\n\n timescale = function timescale(init) {\n var result = {},\n traks = findBox(init, ['moov', 'trak']); // mdhd timescale\n\n return traks.reduce(function (result, trak) {\n var tkhd, version, index, id, mdhd;\n tkhd = findBox(trak, ['tkhd'])[0];\n if (!tkhd) {\n return null;\n }\n version = tkhd[0];\n index = version === 0 ? 12 : 20;\n id = toUnsigned(tkhd[index] << 24 | tkhd[index + 1] << 16 | tkhd[index + 2] << 8 | tkhd[index + 3]);\n mdhd = findBox(trak, ['mdia', 'mdhd'])[0];\n if (!mdhd) {\n return null;\n }\n version = mdhd[0];\n index = version === 0 ? 12 : 20;\n result[id] = toUnsigned(mdhd[index] << 24 | mdhd[index + 1] << 16 | mdhd[index + 2] << 8 | mdhd[index + 3]);\n return result;\n }, result);\n };\n /**\n * Determine the base media decode start time, in seconds, for an MP4\n * fragment. If multiple fragments are specified, the earliest time is\n * returned.\n *\n * The base media decode time can be parsed from track fragment\n * metadata:\n * ```\n * moof > traf > tfdt.baseMediaDecodeTime\n * ```\n * It requires the timescale value from the mdhd to interpret.\n *\n * @param timescale {object} a hash of track ids to timescale values.\n * @return {number} the earliest base media decode start time for the\n * fragment, in seconds\n */\n\n startTime = function startTime(timescale, fragment) {\n var trafs; // we need info from two childrend of each track fragment box\n\n trafs = findBox(fragment, ['moof', 'traf']); // determine the start times for each track\n\n var lowestTime = trafs.reduce(function (acc, traf) {\n var tfhd = findBox(traf, ['tfhd'])[0]; // get the track id from the tfhd\n\n var id = toUnsigned(tfhd[4] << 24 | tfhd[5] << 16 | tfhd[6] << 8 | tfhd[7]); // assume a 90kHz clock if no timescale was specified\n\n var scale = timescale[id] || 90e3; // get the base media decode time from the tfdt\n\n var tfdt = findBox(traf, ['tfdt'])[0];\n var dv = new DataView(tfdt.buffer, tfdt.byteOffset, tfdt.byteLength);\n var baseTime; // version 1 is 64 bit\n\n if (tfdt[0] === 1) {\n baseTime = getUint64(tfdt.subarray(4, 12));\n } else {\n baseTime = dv.getUint32(4);\n } // convert base time to seconds if it is a valid number.\n\n var seconds;\n if (typeof baseTime === 'bigint') {\n seconds = baseTime / window$1.BigInt(scale);\n } else if (typeof baseTime === 'number' && !isNaN(baseTime)) {\n seconds = baseTime / scale;\n }\n if (seconds < Number.MAX_SAFE_INTEGER) {\n seconds = Number(seconds);\n }\n if (seconds < acc) {\n acc = seconds;\n }\n return acc;\n }, Infinity);\n return typeof lowestTime === 'bigint' || isFinite(lowestTime) ? lowestTime : 0;\n };\n /**\n * Determine the composition start, in seconds, for an MP4\n * fragment.\n *\n * The composition start time of a fragment can be calculated using the base\n * media decode time, composition time offset, and timescale, as follows:\n *\n * compositionStartTime = (baseMediaDecodeTime + compositionTimeOffset) / timescale\n *\n * All of the aforementioned information is contained within a media fragment's\n * `traf` box, except for timescale info, which comes from the initialization\n * segment, so a track id (also contained within a `traf`) is also necessary to\n * associate it with a timescale\n *\n *\n * @param timescales {object} - a hash of track ids to timescale values.\n * @param fragment {Unit8Array} - the bytes of a media segment\n * @return {number} the composition start time for the fragment, in seconds\n **/\n\n compositionStartTime = function compositionStartTime(timescales, fragment) {\n var trafBoxes = findBox(fragment, ['moof', 'traf']);\n var baseMediaDecodeTime = 0;\n var compositionTimeOffset = 0;\n var trackId;\n if (trafBoxes && trafBoxes.length) {\n // The spec states that track run samples contained within a `traf` box are contiguous, but\n // it does not explicitly state whether the `traf` boxes themselves are contiguous.\n // We will assume that they are, so we only need the first to calculate start time.\n var tfhd = findBox(trafBoxes[0], ['tfhd'])[0];\n var trun = findBox(trafBoxes[0], ['trun'])[0];\n var tfdt = findBox(trafBoxes[0], ['tfdt'])[0];\n if (tfhd) {\n var parsedTfhd = parseTfhd(tfhd);\n trackId = parsedTfhd.trackId;\n }\n if (tfdt) {\n var parsedTfdt = parseTfdt(tfdt);\n baseMediaDecodeTime = parsedTfdt.baseMediaDecodeTime;\n }\n if (trun) {\n var parsedTrun = parseTrun(trun);\n if (parsedTrun.samples && parsedTrun.samples.length) {\n compositionTimeOffset = parsedTrun.samples[0].compositionTimeOffset || 0;\n }\n }\n } // Get timescale for this specific track. Assume a 90kHz clock if no timescale was\n // specified.\n\n var timescale = timescales[trackId] || 90e3; // return the composition start time, in seconds\n\n if (typeof baseMediaDecodeTime === 'bigint') {\n compositionTimeOffset = window$1.BigInt(compositionTimeOffset);\n timescale = window$1.BigInt(timescale);\n }\n var result = (baseMediaDecodeTime + compositionTimeOffset) / timescale;\n if (typeof result === 'bigint' && result < Number.MAX_SAFE_INTEGER) {\n result = Number(result);\n }\n return result;\n };\n /**\n * Find the trackIds of the video tracks in this source.\n * Found by parsing the Handler Reference and Track Header Boxes:\n * moov > trak > mdia > hdlr\n * moov > trak > tkhd\n *\n * @param {Uint8Array} init - The bytes of the init segment for this source\n * @return {Number[]} A list of trackIds\n *\n * @see ISO-BMFF-12/2015, Section 8.4.3\n **/\n\n getVideoTrackIds = function getVideoTrackIds(init) {\n var traks = findBox(init, ['moov', 'trak']);\n var videoTrackIds = [];\n traks.forEach(function (trak) {\n var hdlrs = findBox(trak, ['mdia', 'hdlr']);\n var tkhds = findBox(trak, ['tkhd']);\n hdlrs.forEach(function (hdlr, index) {\n var handlerType = parseType$1(hdlr.subarray(8, 12));\n var tkhd = tkhds[index];\n var view;\n var version;\n var trackId;\n if (handlerType === 'vide') {\n view = new DataView(tkhd.buffer, tkhd.byteOffset, tkhd.byteLength);\n version = view.getUint8(0);\n trackId = version === 0 ? view.getUint32(12) : view.getUint32(20);\n videoTrackIds.push(trackId);\n }\n });\n });\n return videoTrackIds;\n };\n getTimescaleFromMediaHeader = function getTimescaleFromMediaHeader(mdhd) {\n // mdhd is a FullBox, meaning it will have its own version as the first byte\n var version = mdhd[0];\n var index = version === 0 ? 12 : 20;\n return toUnsigned(mdhd[index] << 24 | mdhd[index + 1] << 16 | mdhd[index + 2] << 8 | mdhd[index + 3]);\n };\n /**\n * Get all the video, audio, and hint tracks from a non fragmented\n * mp4 segment\n */\n\n getTracks = function getTracks(init) {\n var traks = findBox(init, ['moov', 'trak']);\n var tracks = [];\n traks.forEach(function (trak) {\n var track = {};\n var tkhd = findBox(trak, ['tkhd'])[0];\n var view, tkhdVersion; // id\n\n if (tkhd) {\n view = new DataView(tkhd.buffer, tkhd.byteOffset, tkhd.byteLength);\n tkhdVersion = view.getUint8(0);\n track.id = tkhdVersion === 0 ? view.getUint32(12) : view.getUint32(20);\n }\n var hdlr = findBox(trak, ['mdia', 'hdlr'])[0]; // type\n\n if (hdlr) {\n var type = parseType$1(hdlr.subarray(8, 12));\n if (type === 'vide') {\n track.type = 'video';\n } else if (type === 'soun') {\n track.type = 'audio';\n } else {\n track.type = type;\n }\n } // codec\n\n var stsd = findBox(trak, ['mdia', 'minf', 'stbl', 'stsd'])[0];\n if (stsd) {\n var sampleDescriptions = stsd.subarray(8); // gives the codec type string\n\n track.codec = parseType$1(sampleDescriptions.subarray(4, 8));\n var codecBox = findBox(sampleDescriptions, [track.codec])[0];\n var codecConfig, codecConfigType;\n if (codecBox) {\n // https://tools.ietf.org/html/rfc6381#section-3.3\n if (/^[asm]vc[1-9]$/i.test(track.codec)) {\n // we don't need anything but the \"config\" parameter of the\n // avc1 codecBox\n codecConfig = codecBox.subarray(78);\n codecConfigType = parseType$1(codecConfig.subarray(4, 8));\n if (codecConfigType === 'avcC' && codecConfig.length > 11) {\n track.codec += '.'; // left padded with zeroes for single digit hex\n // profile idc\n\n track.codec += toHexString(codecConfig[9]); // the byte containing the constraint_set flags\n\n track.codec += toHexString(codecConfig[10]); // level idc\n\n track.codec += toHexString(codecConfig[11]);\n } else {\n // TODO: show a warning that we couldn't parse the codec\n // and are using the default\n track.codec = 'avc1.4d400d';\n }\n } else if (/^mp4[a,v]$/i.test(track.codec)) {\n // we do not need anything but the streamDescriptor of the mp4a codecBox\n codecConfig = codecBox.subarray(28);\n codecConfigType = parseType$1(codecConfig.subarray(4, 8));\n if (codecConfigType === 'esds' && codecConfig.length > 20 && codecConfig[19] !== 0) {\n track.codec += '.' + toHexString(codecConfig[19]); // this value is only a single digit\n\n track.codec += '.' + toHexString(codecConfig[20] >>> 2 & 0x3f).replace(/^0/, '');\n } else {\n // TODO: show a warning that we couldn't parse the codec\n // and are using the default\n track.codec = 'mp4a.40.2';\n }\n } else {\n // flac, opus, etc\n track.codec = track.codec.toLowerCase();\n }\n }\n }\n var mdhd = findBox(trak, ['mdia', 'mdhd'])[0];\n if (mdhd) {\n track.timescale = getTimescaleFromMediaHeader(mdhd);\n }\n tracks.push(track);\n });\n return tracks;\n };\n /**\n * Returns an array of emsg ID3 data from the provided segmentData.\n * An offset can also be provided as the Latest Arrival Time to calculate \n * the Event Start Time of v0 EMSG boxes. \n * See: https://dashif-documents.azurewebsites.net/Events/master/event.html#Inband-event-timing\n * \n * @param {Uint8Array} segmentData the segment byte array.\n * @param {number} offset the segment start time or Latest Arrival Time, \n * @return {Object[]} an array of ID3 parsed from EMSG boxes\n */\n\n getEmsgID3 = function getEmsgID3(segmentData) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var emsgBoxes = findBox(segmentData, ['emsg']);\n return emsgBoxes.map(function (data) {\n var parsedBox = emsg.parseEmsgBox(new Uint8Array(data));\n var parsedId3Frames = parseId3Frames(parsedBox.message_data);\n return {\n cueTime: emsg.scaleTime(parsedBox.presentation_time, parsedBox.timescale, parsedBox.presentation_time_delta, offset),\n duration: emsg.scaleTime(parsedBox.event_duration, parsedBox.timescale),\n frames: parsedId3Frames\n };\n });\n };\n var probe$2 = {\n // export mp4 inspector's findBox and parseType for backwards compatibility\n findBox: findBox,\n parseType: parseType$1,\n timescale: timescale,\n startTime: startTime,\n compositionStartTime: compositionStartTime,\n videoTrackIds: getVideoTrackIds,\n tracks: getTracks,\n getTimescaleFromMediaHeader: getTimescaleFromMediaHeader,\n getEmsgID3: getEmsgID3\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Utilities to detect basic properties and metadata about TS Segments.\n */\n\n var StreamTypes$1 = streamTypes;\n var parsePid = function parsePid(packet) {\n var pid = packet[1] & 0x1f;\n pid <<= 8;\n pid |= packet[2];\n return pid;\n };\n var parsePayloadUnitStartIndicator = function parsePayloadUnitStartIndicator(packet) {\n return !!(packet[1] & 0x40);\n };\n var parseAdaptionField = function parseAdaptionField(packet) {\n var offset = 0; // if an adaption field is present, its length is specified by the\n // fifth byte of the TS packet header. The adaptation field is\n // used to add stuffing to PES packets that don't fill a complete\n // TS packet, and to specify some forms of timing and control data\n // that we do not currently use.\n\n if ((packet[3] & 0x30) >>> 4 > 0x01) {\n offset += packet[4] + 1;\n }\n return offset;\n };\n var parseType = function parseType(packet, pmtPid) {\n var pid = parsePid(packet);\n if (pid === 0) {\n return 'pat';\n } else if (pid === pmtPid) {\n return 'pmt';\n } else if (pmtPid) {\n return 'pes';\n }\n return null;\n };\n var parsePat = function parsePat(packet) {\n var pusi = parsePayloadUnitStartIndicator(packet);\n var offset = 4 + parseAdaptionField(packet);\n if (pusi) {\n offset += packet[offset] + 1;\n }\n return (packet[offset + 10] & 0x1f) << 8 | packet[offset + 11];\n };\n var parsePmt = function parsePmt(packet) {\n var programMapTable = {};\n var pusi = parsePayloadUnitStartIndicator(packet);\n var payloadOffset = 4 + parseAdaptionField(packet);\n if (pusi) {\n payloadOffset += packet[payloadOffset] + 1;\n } // PMTs can be sent ahead of the time when they should actually\n // take effect. We don't believe this should ever be the case\n // for HLS but we'll ignore \"forward\" PMT declarations if we see\n // them. Future PMT declarations have the current_next_indicator\n // set to zero.\n\n if (!(packet[payloadOffset + 5] & 0x01)) {\n return;\n }\n var sectionLength, tableEnd, programInfoLength; // the mapping table ends at the end of the current section\n\n sectionLength = (packet[payloadOffset + 1] & 0x0f) << 8 | packet[payloadOffset + 2];\n tableEnd = 3 + sectionLength - 4; // to determine where the table is, we have to figure out how\n // long the program info descriptors are\n\n programInfoLength = (packet[payloadOffset + 10] & 0x0f) << 8 | packet[payloadOffset + 11]; // advance the offset to the first entry in the mapping table\n\n var offset = 12 + programInfoLength;\n while (offset < tableEnd) {\n var i = payloadOffset + offset; // add an entry that maps the elementary_pid to the stream_type\n\n programMapTable[(packet[i + 1] & 0x1F) << 8 | packet[i + 2]] = packet[i]; // move to the next table entry\n // skip past the elementary stream descriptors, if present\n\n offset += ((packet[i + 3] & 0x0F) << 8 | packet[i + 4]) + 5;\n }\n return programMapTable;\n };\n var parsePesType = function parsePesType(packet, programMapTable) {\n var pid = parsePid(packet);\n var type = programMapTable[pid];\n switch (type) {\n case StreamTypes$1.H264_STREAM_TYPE:\n return 'video';\n case StreamTypes$1.ADTS_STREAM_TYPE:\n return 'audio';\n case StreamTypes$1.METADATA_STREAM_TYPE:\n return 'timed-metadata';\n default:\n return null;\n }\n };\n var parsePesTime = function parsePesTime(packet) {\n var pusi = parsePayloadUnitStartIndicator(packet);\n if (!pusi) {\n return null;\n }\n var offset = 4 + parseAdaptionField(packet);\n if (offset >= packet.byteLength) {\n // From the H 222.0 MPEG-TS spec\n // \"For transport stream packets carrying PES packets, stuffing is needed when there\n // is insufficient PES packet data to completely fill the transport stream packet\n // payload bytes. Stuffing is accomplished by defining an adaptation field longer than\n // the sum of the lengths of the data elements in it, so that the payload bytes\n // remaining after the adaptation field exactly accommodates the available PES packet\n // data.\"\n //\n // If the offset is >= the length of the packet, then the packet contains no data\n // and instead is just adaption field stuffing bytes\n return null;\n }\n var pes = null;\n var ptsDtsFlags; // PES packets may be annotated with a PTS value, or a PTS value\n // and a DTS value. Determine what combination of values is\n // available to work with.\n\n ptsDtsFlags = packet[offset + 7]; // PTS and DTS are normally stored as a 33-bit number. Javascript\n // performs all bitwise operations on 32-bit integers but javascript\n // supports a much greater range (52-bits) of integer using standard\n // mathematical operations.\n // We construct a 31-bit value using bitwise operators over the 31\n // most significant bits and then multiply by 4 (equal to a left-shift\n // of 2) before we add the final 2 least significant bits of the\n // timestamp (equal to an OR.)\n\n if (ptsDtsFlags & 0xC0) {\n pes = {}; // the PTS and DTS are not written out directly. For information\n // on how they are encoded, see\n // http://dvd.sourceforge.net/dvdinfo/pes-hdr.html\n\n pes.pts = (packet[offset + 9] & 0x0E) << 27 | (packet[offset + 10] & 0xFF) << 20 | (packet[offset + 11] & 0xFE) << 12 | (packet[offset + 12] & 0xFF) << 5 | (packet[offset + 13] & 0xFE) >>> 3;\n pes.pts *= 4; // Left shift by 2\n\n pes.pts += (packet[offset + 13] & 0x06) >>> 1; // OR by the two LSBs\n\n pes.dts = pes.pts;\n if (ptsDtsFlags & 0x40) {\n pes.dts = (packet[offset + 14] & 0x0E) << 27 | (packet[offset + 15] & 0xFF) << 20 | (packet[offset + 16] & 0xFE) << 12 | (packet[offset + 17] & 0xFF) << 5 | (packet[offset + 18] & 0xFE) >>> 3;\n pes.dts *= 4; // Left shift by 2\n\n pes.dts += (packet[offset + 18] & 0x06) >>> 1; // OR by the two LSBs\n }\n }\n return pes;\n };\n var parseNalUnitType = function parseNalUnitType(type) {\n switch (type) {\n case 0x05:\n return 'slice_layer_without_partitioning_rbsp_idr';\n case 0x06:\n return 'sei_rbsp';\n case 0x07:\n return 'seq_parameter_set_rbsp';\n case 0x08:\n return 'pic_parameter_set_rbsp';\n case 0x09:\n return 'access_unit_delimiter_rbsp';\n default:\n return null;\n }\n };\n var videoPacketContainsKeyFrame = function videoPacketContainsKeyFrame(packet) {\n var offset = 4 + parseAdaptionField(packet);\n var frameBuffer = packet.subarray(offset);\n var frameI = 0;\n var frameSyncPoint = 0;\n var foundKeyFrame = false;\n var nalType; // advance the sync point to a NAL start, if necessary\n\n for (; frameSyncPoint < frameBuffer.byteLength - 3; frameSyncPoint++) {\n if (frameBuffer[frameSyncPoint + 2] === 1) {\n // the sync point is properly aligned\n frameI = frameSyncPoint + 5;\n break;\n }\n }\n while (frameI < frameBuffer.byteLength) {\n // look at the current byte to determine if we've hit the end of\n // a NAL unit boundary\n switch (frameBuffer[frameI]) {\n case 0:\n // skip past non-sync sequences\n if (frameBuffer[frameI - 1] !== 0) {\n frameI += 2;\n break;\n } else if (frameBuffer[frameI - 2] !== 0) {\n frameI++;\n break;\n }\n if (frameSyncPoint + 3 !== frameI - 2) {\n nalType = parseNalUnitType(frameBuffer[frameSyncPoint + 3] & 0x1f);\n if (nalType === 'slice_layer_without_partitioning_rbsp_idr') {\n foundKeyFrame = true;\n }\n } // drop trailing zeroes\n\n do {\n frameI++;\n } while (frameBuffer[frameI] !== 1 && frameI < frameBuffer.length);\n frameSyncPoint = frameI - 2;\n frameI += 3;\n break;\n case 1:\n // skip past non-sync sequences\n if (frameBuffer[frameI - 1] !== 0 || frameBuffer[frameI - 2] !== 0) {\n frameI += 3;\n break;\n }\n nalType = parseNalUnitType(frameBuffer[frameSyncPoint + 3] & 0x1f);\n if (nalType === 'slice_layer_without_partitioning_rbsp_idr') {\n foundKeyFrame = true;\n }\n frameSyncPoint = frameI - 2;\n frameI += 3;\n break;\n default:\n // the current byte isn't a one or zero, so it cannot be part\n // of a sync sequence\n frameI += 3;\n break;\n }\n }\n frameBuffer = frameBuffer.subarray(frameSyncPoint);\n frameI -= frameSyncPoint;\n frameSyncPoint = 0; // parse the final nal\n\n if (frameBuffer && frameBuffer.byteLength > 3) {\n nalType = parseNalUnitType(frameBuffer[frameSyncPoint + 3] & 0x1f);\n if (nalType === 'slice_layer_without_partitioning_rbsp_idr') {\n foundKeyFrame = true;\n }\n }\n return foundKeyFrame;\n };\n var probe$1 = {\n parseType: parseType,\n parsePat: parsePat,\n parsePmt: parsePmt,\n parsePayloadUnitStartIndicator: parsePayloadUnitStartIndicator,\n parsePesType: parsePesType,\n parsePesTime: parsePesTime,\n videoPacketContainsKeyFrame: videoPacketContainsKeyFrame\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Parse mpeg2 transport stream packets to extract basic timing information\n */\n\n var StreamTypes = streamTypes;\n var handleRollover = timestampRolloverStream.handleRollover;\n var probe = {};\n probe.ts = probe$1;\n probe.aac = utils;\n var ONE_SECOND_IN_TS = clock$2.ONE_SECOND_IN_TS;\n var MP2T_PACKET_LENGTH = 188,\n // bytes\n SYNC_BYTE = 0x47;\n /**\n * walks through segment data looking for pat and pmt packets to parse out\n * program map table information\n */\n\n var parsePsi_ = function parsePsi_(bytes, pmt) {\n var startIndex = 0,\n endIndex = MP2T_PACKET_LENGTH,\n packet,\n type;\n while (endIndex < bytes.byteLength) {\n // Look for a pair of start and end sync bytes in the data..\n if (bytes[startIndex] === SYNC_BYTE && bytes[endIndex] === SYNC_BYTE) {\n // We found a packet\n packet = bytes.subarray(startIndex, endIndex);\n type = probe.ts.parseType(packet, pmt.pid);\n switch (type) {\n case 'pat':\n pmt.pid = probe.ts.parsePat(packet);\n break;\n case 'pmt':\n var table = probe.ts.parsePmt(packet);\n pmt.table = pmt.table || {};\n Object.keys(table).forEach(function (key) {\n pmt.table[key] = table[key];\n });\n break;\n }\n startIndex += MP2T_PACKET_LENGTH;\n endIndex += MP2T_PACKET_LENGTH;\n continue;\n } // If we get here, we have somehow become de-synchronized and we need to step\n // forward one byte at a time until we find a pair of sync bytes that denote\n // a packet\n\n startIndex++;\n endIndex++;\n }\n };\n /**\n * walks through the segment data from the start and end to get timing information\n * for the first and last audio pes packets\n */\n\n var parseAudioPes_ = function parseAudioPes_(bytes, pmt, result) {\n var startIndex = 0,\n endIndex = MP2T_PACKET_LENGTH,\n packet,\n type,\n pesType,\n pusi,\n parsed;\n var endLoop = false; // Start walking from start of segment to get first audio packet\n\n while (endIndex <= bytes.byteLength) {\n // Look for a pair of start and end sync bytes in the data..\n if (bytes[startIndex] === SYNC_BYTE && (bytes[endIndex] === SYNC_BYTE || endIndex === bytes.byteLength)) {\n // We found a packet\n packet = bytes.subarray(startIndex, endIndex);\n type = probe.ts.parseType(packet, pmt.pid);\n switch (type) {\n case 'pes':\n pesType = probe.ts.parsePesType(packet, pmt.table);\n pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\n if (pesType === 'audio' && pusi) {\n parsed = probe.ts.parsePesTime(packet);\n if (parsed) {\n parsed.type = 'audio';\n result.audio.push(parsed);\n endLoop = true;\n }\n }\n break;\n }\n if (endLoop) {\n break;\n }\n startIndex += MP2T_PACKET_LENGTH;\n endIndex += MP2T_PACKET_LENGTH;\n continue;\n } // If we get here, we have somehow become de-synchronized and we need to step\n // forward one byte at a time until we find a pair of sync bytes that denote\n // a packet\n\n startIndex++;\n endIndex++;\n } // Start walking from end of segment to get last audio packet\n\n endIndex = bytes.byteLength;\n startIndex = endIndex - MP2T_PACKET_LENGTH;\n endLoop = false;\n while (startIndex >= 0) {\n // Look for a pair of start and end sync bytes in the data..\n if (bytes[startIndex] === SYNC_BYTE && (bytes[endIndex] === SYNC_BYTE || endIndex === bytes.byteLength)) {\n // We found a packet\n packet = bytes.subarray(startIndex, endIndex);\n type = probe.ts.parseType(packet, pmt.pid);\n switch (type) {\n case 'pes':\n pesType = probe.ts.parsePesType(packet, pmt.table);\n pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\n if (pesType === 'audio' && pusi) {\n parsed = probe.ts.parsePesTime(packet);\n if (parsed) {\n parsed.type = 'audio';\n result.audio.push(parsed);\n endLoop = true;\n }\n }\n break;\n }\n if (endLoop) {\n break;\n }\n startIndex -= MP2T_PACKET_LENGTH;\n endIndex -= MP2T_PACKET_LENGTH;\n continue;\n } // If we get here, we have somehow become de-synchronized and we need to step\n // forward one byte at a time until we find a pair of sync bytes that denote\n // a packet\n\n startIndex--;\n endIndex--;\n }\n };\n /**\n * walks through the segment data from the start and end to get timing information\n * for the first and last video pes packets as well as timing information for the first\n * key frame.\n */\n\n var parseVideoPes_ = function parseVideoPes_(bytes, pmt, result) {\n var startIndex = 0,\n endIndex = MP2T_PACKET_LENGTH,\n packet,\n type,\n pesType,\n pusi,\n parsed,\n frame,\n i,\n pes;\n var endLoop = false;\n var currentFrame = {\n data: [],\n size: 0\n }; // Start walking from start of segment to get first video packet\n\n while (endIndex < bytes.byteLength) {\n // Look for a pair of start and end sync bytes in the data..\n if (bytes[startIndex] === SYNC_BYTE && bytes[endIndex] === SYNC_BYTE) {\n // We found a packet\n packet = bytes.subarray(startIndex, endIndex);\n type = probe.ts.parseType(packet, pmt.pid);\n switch (type) {\n case 'pes':\n pesType = probe.ts.parsePesType(packet, pmt.table);\n pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\n if (pesType === 'video') {\n if (pusi && !endLoop) {\n parsed = probe.ts.parsePesTime(packet);\n if (parsed) {\n parsed.type = 'video';\n result.video.push(parsed);\n endLoop = true;\n }\n }\n if (!result.firstKeyFrame) {\n if (pusi) {\n if (currentFrame.size !== 0) {\n frame = new Uint8Array(currentFrame.size);\n i = 0;\n while (currentFrame.data.length) {\n pes = currentFrame.data.shift();\n frame.set(pes, i);\n i += pes.byteLength;\n }\n if (probe.ts.videoPacketContainsKeyFrame(frame)) {\n var firstKeyFrame = probe.ts.parsePesTime(frame); // PTS/DTS may not be available. Simply *not* setting\n // the keyframe seems to work fine with HLS playback\n // and definitely preferable to a crash with TypeError...\n\n if (firstKeyFrame) {\n result.firstKeyFrame = firstKeyFrame;\n result.firstKeyFrame.type = 'video';\n } else {\n // eslint-disable-next-line\n console.warn('Failed to extract PTS/DTS from PES at first keyframe. ' + 'This could be an unusual TS segment, or else mux.js did not ' + 'parse your TS segment correctly. If you know your TS ' + 'segments do contain PTS/DTS on keyframes please file a bug ' + 'report! You can try ffprobe to double check for yourself.');\n }\n }\n currentFrame.size = 0;\n }\n }\n currentFrame.data.push(packet);\n currentFrame.size += packet.byteLength;\n }\n }\n break;\n }\n if (endLoop && result.firstKeyFrame) {\n break;\n }\n startIndex += MP2T_PACKET_LENGTH;\n endIndex += MP2T_PACKET_LENGTH;\n continue;\n } // If we get here, we have somehow become de-synchronized and we need to step\n // forward one byte at a time until we find a pair of sync bytes that denote\n // a packet\n\n startIndex++;\n endIndex++;\n } // Start walking from end of segment to get last video packet\n\n endIndex = bytes.byteLength;\n startIndex = endIndex - MP2T_PACKET_LENGTH;\n endLoop = false;\n while (startIndex >= 0) {\n // Look for a pair of start and end sync bytes in the data..\n if (bytes[startIndex] === SYNC_BYTE && bytes[endIndex] === SYNC_BYTE) {\n // We found a packet\n packet = bytes.subarray(startIndex, endIndex);\n type = probe.ts.parseType(packet, pmt.pid);\n switch (type) {\n case 'pes':\n pesType = probe.ts.parsePesType(packet, pmt.table);\n pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\n if (pesType === 'video' && pusi) {\n parsed = probe.ts.parsePesTime(packet);\n if (parsed) {\n parsed.type = 'video';\n result.video.push(parsed);\n endLoop = true;\n }\n }\n break;\n }\n if (endLoop) {\n break;\n }\n startIndex -= MP2T_PACKET_LENGTH;\n endIndex -= MP2T_PACKET_LENGTH;\n continue;\n } // If we get here, we have somehow become de-synchronized and we need to step\n // forward one byte at a time until we find a pair of sync bytes that denote\n // a packet\n\n startIndex--;\n endIndex--;\n }\n };\n /**\n * Adjusts the timestamp information for the segment to account for\n * rollover and convert to seconds based on pes packet timescale (90khz clock)\n */\n\n var adjustTimestamp_ = function adjustTimestamp_(segmentInfo, baseTimestamp) {\n if (segmentInfo.audio && segmentInfo.audio.length) {\n var audioBaseTimestamp = baseTimestamp;\n if (typeof audioBaseTimestamp === 'undefined' || isNaN(audioBaseTimestamp)) {\n audioBaseTimestamp = segmentInfo.audio[0].dts;\n }\n segmentInfo.audio.forEach(function (info) {\n info.dts = handleRollover(info.dts, audioBaseTimestamp);\n info.pts = handleRollover(info.pts, audioBaseTimestamp); // time in seconds\n\n info.dtsTime = info.dts / ONE_SECOND_IN_TS;\n info.ptsTime = info.pts / ONE_SECOND_IN_TS;\n });\n }\n if (segmentInfo.video && segmentInfo.video.length) {\n var videoBaseTimestamp = baseTimestamp;\n if (typeof videoBaseTimestamp === 'undefined' || isNaN(videoBaseTimestamp)) {\n videoBaseTimestamp = segmentInfo.video[0].dts;\n }\n segmentInfo.video.forEach(function (info) {\n info.dts = handleRollover(info.dts, videoBaseTimestamp);\n info.pts = handleRollover(info.pts, videoBaseTimestamp); // time in seconds\n\n info.dtsTime = info.dts / ONE_SECOND_IN_TS;\n info.ptsTime = info.pts / ONE_SECOND_IN_TS;\n });\n if (segmentInfo.firstKeyFrame) {\n var frame = segmentInfo.firstKeyFrame;\n frame.dts = handleRollover(frame.dts, videoBaseTimestamp);\n frame.pts = handleRollover(frame.pts, videoBaseTimestamp); // time in seconds\n\n frame.dtsTime = frame.dts / ONE_SECOND_IN_TS;\n frame.ptsTime = frame.pts / ONE_SECOND_IN_TS;\n }\n }\n };\n /**\n * inspects the aac data stream for start and end time information\n */\n\n var inspectAac_ = function inspectAac_(bytes) {\n var endLoop = false,\n audioCount = 0,\n sampleRate = null,\n timestamp = null,\n frameSize = 0,\n byteIndex = 0,\n packet;\n while (bytes.length - byteIndex >= 3) {\n var type = probe.aac.parseType(bytes, byteIndex);\n switch (type) {\n case 'timed-metadata':\n // Exit early because we don't have enough to parse\n // the ID3 tag header\n if (bytes.length - byteIndex < 10) {\n endLoop = true;\n break;\n }\n frameSize = probe.aac.parseId3TagSize(bytes, byteIndex); // Exit early if we don't have enough in the buffer\n // to emit a full packet\n\n if (frameSize > bytes.length) {\n endLoop = true;\n break;\n }\n if (timestamp === null) {\n packet = bytes.subarray(byteIndex, byteIndex + frameSize);\n timestamp = probe.aac.parseAacTimestamp(packet);\n }\n byteIndex += frameSize;\n break;\n case 'audio':\n // Exit early because we don't have enough to parse\n // the ADTS frame header\n if (bytes.length - byteIndex < 7) {\n endLoop = true;\n break;\n }\n frameSize = probe.aac.parseAdtsSize(bytes, byteIndex); // Exit early if we don't have enough in the buffer\n // to emit a full packet\n\n if (frameSize > bytes.length) {\n endLoop = true;\n break;\n }\n if (sampleRate === null) {\n packet = bytes.subarray(byteIndex, byteIndex + frameSize);\n sampleRate = probe.aac.parseSampleRate(packet);\n }\n audioCount++;\n byteIndex += frameSize;\n break;\n default:\n byteIndex++;\n break;\n }\n if (endLoop) {\n return null;\n }\n }\n if (sampleRate === null || timestamp === null) {\n return null;\n }\n var audioTimescale = ONE_SECOND_IN_TS / sampleRate;\n var result = {\n audio: [{\n type: 'audio',\n dts: timestamp,\n pts: timestamp\n }, {\n type: 'audio',\n dts: timestamp + audioCount * 1024 * audioTimescale,\n pts: timestamp + audioCount * 1024 * audioTimescale\n }]\n };\n return result;\n };\n /**\n * inspects the transport stream segment data for start and end time information\n * of the audio and video tracks (when present) as well as the first key frame's\n * start time.\n */\n\n var inspectTs_ = function inspectTs_(bytes) {\n var pmt = {\n pid: null,\n table: null\n };\n var result = {};\n parsePsi_(bytes, pmt);\n for (var pid in pmt.table) {\n if (pmt.table.hasOwnProperty(pid)) {\n var type = pmt.table[pid];\n switch (type) {\n case StreamTypes.H264_STREAM_TYPE:\n result.video = [];\n parseVideoPes_(bytes, pmt, result);\n if (result.video.length === 0) {\n delete result.video;\n }\n break;\n case StreamTypes.ADTS_STREAM_TYPE:\n result.audio = [];\n parseAudioPes_(bytes, pmt, result);\n if (result.audio.length === 0) {\n delete result.audio;\n }\n break;\n }\n }\n }\n return result;\n };\n /**\n * Inspects segment byte data and returns an object with start and end timing information\n *\n * @param {Uint8Array} bytes The segment byte data\n * @param {Number} baseTimestamp Relative reference timestamp used when adjusting frame\n * timestamps for rollover. This value must be in 90khz clock.\n * @return {Object} Object containing start and end frame timing info of segment.\n */\n\n var inspect = function inspect(bytes, baseTimestamp) {\n var isAacData = probe.aac.isLikelyAacData(bytes);\n var result;\n if (isAacData) {\n result = inspectAac_(bytes);\n } else {\n result = inspectTs_(bytes);\n }\n if (!result || !result.audio && !result.video) {\n return null;\n }\n adjustTimestamp_(result, baseTimestamp);\n return result;\n };\n var tsInspector = {\n inspect: inspect,\n parseAudioPes_: parseAudioPes_\n };\n /* global self */\n\n /**\n * Re-emits transmuxer events by converting them into messages to the\n * world outside the worker.\n *\n * @param {Object} transmuxer the transmuxer to wire events on\n * @private\n */\n\n var wireTransmuxerEvents = function wireTransmuxerEvents(self, transmuxer) {\n transmuxer.on('data', function (segment) {\n // transfer ownership of the underlying ArrayBuffer\n // instead of doing a copy to save memory\n // ArrayBuffers are transferable but generic TypedArrays are not\n // @link https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers#Passing_data_by_transferring_ownership_(transferable_objects)\n var initArray = segment.initSegment;\n segment.initSegment = {\n data: initArray.buffer,\n byteOffset: initArray.byteOffset,\n byteLength: initArray.byteLength\n };\n var typedArray = segment.data;\n segment.data = typedArray.buffer;\n self.postMessage({\n action: 'data',\n segment: segment,\n byteOffset: typedArray.byteOffset,\n byteLength: typedArray.byteLength\n }, [segment.data]);\n });\n transmuxer.on('done', function (data) {\n self.postMessage({\n action: 'done'\n });\n });\n transmuxer.on('gopInfo', function (gopInfo) {\n self.postMessage({\n action: 'gopInfo',\n gopInfo: gopInfo\n });\n });\n transmuxer.on('videoSegmentTimingInfo', function (timingInfo) {\n var videoSegmentTimingInfo = {\n start: {\n decode: clock$2.videoTsToSeconds(timingInfo.start.dts),\n presentation: clock$2.videoTsToSeconds(timingInfo.start.pts)\n },\n end: {\n decode: clock$2.videoTsToSeconds(timingInfo.end.dts),\n presentation: clock$2.videoTsToSeconds(timingInfo.end.pts)\n },\n baseMediaDecodeTime: clock$2.videoTsToSeconds(timingInfo.baseMediaDecodeTime)\n };\n if (timingInfo.prependedContentDuration) {\n videoSegmentTimingInfo.prependedContentDuration = clock$2.videoTsToSeconds(timingInfo.prependedContentDuration);\n }\n self.postMessage({\n action: 'videoSegmentTimingInfo',\n videoSegmentTimingInfo: videoSegmentTimingInfo\n });\n });\n transmuxer.on('audioSegmentTimingInfo', function (timingInfo) {\n // Note that all times for [audio/video]SegmentTimingInfo events are in video clock\n var audioSegmentTimingInfo = {\n start: {\n decode: clock$2.videoTsToSeconds(timingInfo.start.dts),\n presentation: clock$2.videoTsToSeconds(timingInfo.start.pts)\n },\n end: {\n decode: clock$2.videoTsToSeconds(timingInfo.end.dts),\n presentation: clock$2.videoTsToSeconds(timingInfo.end.pts)\n },\n baseMediaDecodeTime: clock$2.videoTsToSeconds(timingInfo.baseMediaDecodeTime)\n };\n if (timingInfo.prependedContentDuration) {\n audioSegmentTimingInfo.prependedContentDuration = clock$2.videoTsToSeconds(timingInfo.prependedContentDuration);\n }\n self.postMessage({\n action: 'audioSegmentTimingInfo',\n audioSegmentTimingInfo: audioSegmentTimingInfo\n });\n });\n transmuxer.on('id3Frame', function (id3Frame) {\n self.postMessage({\n action: 'id3Frame',\n id3Frame: id3Frame\n });\n });\n transmuxer.on('caption', function (caption) {\n self.postMessage({\n action: 'caption',\n caption: caption\n });\n });\n transmuxer.on('trackinfo', function (trackInfo) {\n self.postMessage({\n action: 'trackinfo',\n trackInfo: trackInfo\n });\n });\n transmuxer.on('audioTimingInfo', function (audioTimingInfo) {\n // convert to video TS since we prioritize video time over audio\n self.postMessage({\n action: 'audioTimingInfo',\n audioTimingInfo: {\n start: clock$2.videoTsToSeconds(audioTimingInfo.start),\n end: clock$2.videoTsToSeconds(audioTimingInfo.end)\n }\n });\n });\n transmuxer.on('videoTimingInfo', function (videoTimingInfo) {\n self.postMessage({\n action: 'videoTimingInfo',\n videoTimingInfo: {\n start: clock$2.videoTsToSeconds(videoTimingInfo.start),\n end: clock$2.videoTsToSeconds(videoTimingInfo.end)\n }\n });\n });\n transmuxer.on('log', function (log) {\n self.postMessage({\n action: 'log',\n log: log\n });\n });\n };\n /**\n * All incoming messages route through this hash. If no function exists\n * to handle an incoming message, then we ignore the message.\n *\n * @class MessageHandlers\n * @param {Object} options the options to initialize with\n */\n var MessageHandlers = /*#__PURE__*/function () {\n function MessageHandlers(self, options) {\n _classCallCheck(this, MessageHandlers);\n this.options = options || {};\n this.self = self;\n this.init();\n }\n /**\n * initialize our web worker and wire all the events.\n */\n _createClass(MessageHandlers, [{\n key: \"init\",\n value: function init() {\n if (this.transmuxer) {\n this.transmuxer.dispose();\n }\n this.transmuxer = new transmuxer.Transmuxer(this.options);\n wireTransmuxerEvents(this.self, this.transmuxer);\n }\n }, {\n key: \"pushMp4Captions\",\n value: function pushMp4Captions(data) {\n if (!this.captionParser) {\n this.captionParser = new captionParser();\n this.captionParser.init();\n }\n var segment = new Uint8Array(data.data, data.byteOffset, data.byteLength);\n var parsed = this.captionParser.parse(segment, data.trackIds, data.timescales);\n this.self.postMessage({\n action: 'mp4Captions',\n captions: parsed && parsed.captions || [],\n logs: parsed && parsed.logs || [],\n data: segment.buffer\n }, [segment.buffer]);\n }\n }, {\n key: \"probeMp4StartTime\",\n value: function probeMp4StartTime(_ref27) {\n var timescales = _ref27.timescales,\n data = _ref27.data;\n var startTime = probe$2.startTime(timescales, data);\n this.self.postMessage({\n action: 'probeMp4StartTime',\n startTime: startTime,\n data: data\n }, [data.buffer]);\n }\n }, {\n key: \"probeMp4Tracks\",\n value: function probeMp4Tracks(_ref28) {\n var data = _ref28.data;\n var tracks = probe$2.tracks(data);\n this.self.postMessage({\n action: 'probeMp4Tracks',\n tracks: tracks,\n data: data\n }, [data.buffer]);\n }\n /**\n * Probes an mp4 segment for EMSG boxes containing ID3 data.\n * https://aomediacodec.github.io/id3-emsg/\n *\n * @param {Uint8Array} data segment data\n * @param {number} offset segment start time\n * @return {Object[]} an array of ID3 frames\n */\n }, {\n key: \"probeEmsgID3\",\n value: function probeEmsgID3(_ref29) {\n var data = _ref29.data,\n offset = _ref29.offset;\n var id3Frames = probe$2.getEmsgID3(data, offset);\n this.self.postMessage({\n action: 'probeEmsgID3',\n id3Frames: id3Frames,\n emsgData: data\n }, [data.buffer]);\n }\n /**\n * Probe an mpeg2-ts segment to determine the start time of the segment in it's\n * internal \"media time,\" as well as whether it contains video and/or audio.\n *\n * @private\n * @param {Uint8Array} bytes - segment bytes\n * @param {number} baseStartTime\n * Relative reference timestamp used when adjusting frame timestamps for rollover.\n * This value should be in seconds, as it's converted to a 90khz clock within the\n * function body.\n * @return {Object} The start time of the current segment in \"media time\" as well as\n * whether it contains video and/or audio\n */\n }, {\n key: \"probeTs\",\n value: function probeTs(_ref30) {\n var data = _ref30.data,\n baseStartTime = _ref30.baseStartTime;\n var tsStartTime = typeof baseStartTime === 'number' && !isNaN(baseStartTime) ? baseStartTime * clock$2.ONE_SECOND_IN_TS : void 0;\n var timeInfo = tsInspector.inspect(data, tsStartTime);\n var result = null;\n if (timeInfo) {\n result = {\n // each type's time info comes back as an array of 2 times, start and end\n hasVideo: timeInfo.video && timeInfo.video.length === 2 || false,\n hasAudio: timeInfo.audio && timeInfo.audio.length === 2 || false\n };\n if (result.hasVideo) {\n result.videoStart = timeInfo.video[0].ptsTime;\n }\n if (result.hasAudio) {\n result.audioStart = timeInfo.audio[0].ptsTime;\n }\n }\n this.self.postMessage({\n action: 'probeTs',\n result: result,\n data: data\n }, [data.buffer]);\n }\n }, {\n key: \"clearAllMp4Captions\",\n value: function clearAllMp4Captions() {\n if (this.captionParser) {\n this.captionParser.clearAllCaptions();\n }\n }\n }, {\n key: \"clearParsedMp4Captions\",\n value: function clearParsedMp4Captions() {\n if (this.captionParser) {\n this.captionParser.clearParsedCaptions();\n }\n }\n /**\n * Adds data (a ts segment) to the start of the transmuxer pipeline for\n * processing.\n *\n * @param {ArrayBuffer} data data to push into the muxer\n */\n }, {\n key: \"push\",\n value: function push(data) {\n // Cast array buffer to correct type for transmuxer\n var segment = new Uint8Array(data.data, data.byteOffset, data.byteLength);\n this.transmuxer.push(segment);\n }\n /**\n * Recreate the transmuxer so that the next segment added via `push`\n * start with a fresh transmuxer.\n */\n }, {\n key: \"reset\",\n value: function reset() {\n this.transmuxer.reset();\n }\n /**\n * Set the value that will be used as the `baseMediaDecodeTime` time for the\n * next segment pushed in. Subsequent segments will have their `baseMediaDecodeTime`\n * set relative to the first based on the PTS values.\n *\n * @param {Object} data used to set the timestamp offset in the muxer\n */\n }, {\n key: \"setTimestampOffset\",\n value: function setTimestampOffset(data) {\n var timestampOffset = data.timestampOffset || 0;\n this.transmuxer.setBaseMediaDecodeTime(Math.round(clock$2.secondsToVideoTs(timestampOffset)));\n }\n }, {\n key: \"setAudioAppendStart\",\n value: function setAudioAppendStart(data) {\n this.transmuxer.setAudioAppendStart(Math.ceil(clock$2.secondsToVideoTs(data.appendStart)));\n }\n }, {\n key: \"setRemux\",\n value: function setRemux(data) {\n this.transmuxer.setRemux(data.remux);\n }\n /**\n * Forces the pipeline to finish processing the last segment and emit it's\n * results.\n *\n * @param {Object} data event data, not really used\n */\n }, {\n key: \"flush\",\n value: function flush(data) {\n this.transmuxer.flush(); // transmuxed done action is fired after both audio/video pipelines are flushed\n\n self.postMessage({\n action: 'done',\n type: 'transmuxed'\n });\n }\n }, {\n key: \"endTimeline\",\n value: function endTimeline() {\n this.transmuxer.endTimeline(); // transmuxed endedtimeline action is fired after both audio/video pipelines end their\n // timelines\n\n self.postMessage({\n action: 'endedtimeline',\n type: 'transmuxed'\n });\n }\n }, {\n key: \"alignGopsWith\",\n value: function alignGopsWith(data) {\n this.transmuxer.alignGopsWith(data.gopsToAlignWith.slice());\n }\n }]);\n return MessageHandlers;\n }();\n /**\n * Our web worker interface so that things can talk to mux.js\n * that will be running in a web worker. the scope is passed to this by\n * webworkify.\n *\n * @param {Object} self the scope for the web worker\n */\n self.onmessage = function (event) {\n if (event.data.action === 'init' && event.data.options) {\n this.messageHandlers = new MessageHandlers(self, event.data.options);\n return;\n }\n if (!this.messageHandlers) {\n this.messageHandlers = new MessageHandlers(self);\n }\n if (event.data && event.data.action && event.data.action !== 'init') {\n if (this.messageHandlers[event.data.action]) {\n this.messageHandlers[event.data.action](event.data);\n }\n }\n };\n}));\nvar TransmuxWorker = factory(workerCode$1);\n/* rollup-plugin-worker-factory end for worker!/home/runner/work/http-streaming/http-streaming/src/transmuxer-worker.js */\n\nvar handleData_ = function handleData_(event, transmuxedData, callback) {\n var _event$data$segment = event.data.segment,\n type = _event$data$segment.type,\n initSegment = _event$data$segment.initSegment,\n captions = _event$data$segment.captions,\n captionStreams = _event$data$segment.captionStreams,\n metadata = _event$data$segment.metadata,\n videoFrameDtsTime = _event$data$segment.videoFrameDtsTime,\n videoFramePtsTime = _event$data$segment.videoFramePtsTime;\n transmuxedData.buffer.push({\n captions: captions,\n captionStreams: captionStreams,\n metadata: metadata\n });\n var boxes = event.data.segment.boxes || {\n data: event.data.segment.data\n };\n var result = {\n type: type,\n // cast ArrayBuffer to TypedArray\n data: new Uint8Array(boxes.data, boxes.data.byteOffset, boxes.data.byteLength),\n initSegment: new Uint8Array(initSegment.data, initSegment.byteOffset, initSegment.byteLength)\n };\n if (typeof videoFrameDtsTime !== 'undefined') {\n result.videoFrameDtsTime = videoFrameDtsTime;\n }\n if (typeof videoFramePtsTime !== 'undefined') {\n result.videoFramePtsTime = videoFramePtsTime;\n }\n callback(result);\n};\nvar handleDone_ = function handleDone_(_ref31) {\n var transmuxedData = _ref31.transmuxedData,\n callback = _ref31.callback;\n // Previously we only returned data on data events,\n // not on done events. Clear out the buffer to keep that consistent.\n transmuxedData.buffer = []; // all buffers should have been flushed from the muxer, so start processing anything we\n // have received\n\n callback(transmuxedData);\n};\nvar handleGopInfo_ = function handleGopInfo_(event, transmuxedData) {\n transmuxedData.gopInfo = event.data.gopInfo;\n};\nvar processTransmux = function processTransmux(options) {\n var transmuxer = options.transmuxer,\n bytes = options.bytes,\n audioAppendStart = options.audioAppendStart,\n gopsToAlignWith = options.gopsToAlignWith,\n remux = options.remux,\n onData = options.onData,\n onTrackInfo = options.onTrackInfo,\n onAudioTimingInfo = options.onAudioTimingInfo,\n onVideoTimingInfo = options.onVideoTimingInfo,\n onVideoSegmentTimingInfo = options.onVideoSegmentTimingInfo,\n onAudioSegmentTimingInfo = options.onAudioSegmentTimingInfo,\n onId3 = options.onId3,\n onCaptions = options.onCaptions,\n onDone = options.onDone,\n onEndedTimeline = options.onEndedTimeline,\n onTransmuxerLog = options.onTransmuxerLog,\n isEndOfTimeline = options.isEndOfTimeline;\n var transmuxedData = {\n buffer: []\n };\n var waitForEndedTimelineEvent = isEndOfTimeline;\n var handleMessage = function handleMessage(event) {\n if (transmuxer.currentTransmux !== options) {\n // disposed\n return;\n }\n if (event.data.action === 'data') {\n handleData_(event, transmuxedData, onData);\n }\n if (event.data.action === 'trackinfo') {\n onTrackInfo(event.data.trackInfo);\n }\n if (event.data.action === 'gopInfo') {\n handleGopInfo_(event, transmuxedData);\n }\n if (event.data.action === 'audioTimingInfo') {\n onAudioTimingInfo(event.data.audioTimingInfo);\n }\n if (event.data.action === 'videoTimingInfo') {\n onVideoTimingInfo(event.data.videoTimingInfo);\n }\n if (event.data.action === 'videoSegmentTimingInfo') {\n onVideoSegmentTimingInfo(event.data.videoSegmentTimingInfo);\n }\n if (event.data.action === 'audioSegmentTimingInfo') {\n onAudioSegmentTimingInfo(event.data.audioSegmentTimingInfo);\n }\n if (event.data.action === 'id3Frame') {\n onId3([event.data.id3Frame], event.data.id3Frame.dispatchType);\n }\n if (event.data.action === 'caption') {\n onCaptions(event.data.caption);\n }\n if (event.data.action === 'endedtimeline') {\n waitForEndedTimelineEvent = false;\n onEndedTimeline();\n }\n if (event.data.action === 'log') {\n onTransmuxerLog(event.data.log);\n } // wait for the transmuxed event since we may have audio and video\n\n if (event.data.type !== 'transmuxed') {\n return;\n } // If the \"endedtimeline\" event has not yet fired, and this segment represents the end\n // of a timeline, that means there may still be data events before the segment\n // processing can be considerred complete. In that case, the final event should be\n // an \"endedtimeline\" event with the type \"transmuxed.\"\n\n if (waitForEndedTimelineEvent) {\n return;\n }\n transmuxer.onmessage = null;\n handleDone_({\n transmuxedData: transmuxedData,\n callback: onDone\n });\n /* eslint-disable no-use-before-define */\n\n dequeue(transmuxer);\n /* eslint-enable */\n };\n transmuxer.onmessage = handleMessage;\n if (audioAppendStart) {\n transmuxer.postMessage({\n action: 'setAudioAppendStart',\n appendStart: audioAppendStart\n });\n } // allow empty arrays to be passed to clear out GOPs\n\n if (Array.isArray(gopsToAlignWith)) {\n transmuxer.postMessage({\n action: 'alignGopsWith',\n gopsToAlignWith: gopsToAlignWith\n });\n }\n if (typeof remux !== 'undefined') {\n transmuxer.postMessage({\n action: 'setRemux',\n remux: remux\n });\n }\n if (bytes.byteLength) {\n var buffer = bytes instanceof ArrayBuffer ? bytes : bytes.buffer;\n var byteOffset = bytes instanceof ArrayBuffer ? 0 : bytes.byteOffset;\n transmuxer.postMessage({\n action: 'push',\n // Send the typed-array of data as an ArrayBuffer so that\n // it can be sent as a \"Transferable\" and avoid the costly\n // memory copy\n data: buffer,\n // To recreate the original typed-array, we need information\n // about what portion of the ArrayBuffer it was a view into\n byteOffset: byteOffset,\n byteLength: bytes.byteLength\n }, [buffer]);\n }\n if (isEndOfTimeline) {\n transmuxer.postMessage({\n action: 'endTimeline'\n });\n } // even if we didn't push any bytes, we have to make sure we flush in case we reached\n // the end of the segment\n\n transmuxer.postMessage({\n action: 'flush'\n });\n};\nvar dequeue = function dequeue(transmuxer) {\n transmuxer.currentTransmux = null;\n if (transmuxer.transmuxQueue.length) {\n transmuxer.currentTransmux = transmuxer.transmuxQueue.shift();\n if (typeof transmuxer.currentTransmux === 'function') {\n transmuxer.currentTransmux();\n } else {\n processTransmux(transmuxer.currentTransmux);\n }\n }\n};\nvar processAction = function processAction(transmuxer, action) {\n transmuxer.postMessage({\n action: action\n });\n dequeue(transmuxer);\n};\nvar enqueueAction = function enqueueAction(action, transmuxer) {\n if (!transmuxer.currentTransmux) {\n transmuxer.currentTransmux = action;\n processAction(transmuxer, action);\n return;\n }\n transmuxer.transmuxQueue.push(processAction.bind(null, transmuxer, action));\n};\nvar reset = function reset(transmuxer) {\n enqueueAction('reset', transmuxer);\n};\nvar endTimeline = function endTimeline(transmuxer) {\n enqueueAction('endTimeline', transmuxer);\n};\nvar transmux = function transmux(options) {\n if (!options.transmuxer.currentTransmux) {\n options.transmuxer.currentTransmux = options;\n processTransmux(options);\n return;\n }\n options.transmuxer.transmuxQueue.push(options);\n};\nvar createTransmuxer = function createTransmuxer(options) {\n var transmuxer = new TransmuxWorker();\n transmuxer.currentTransmux = null;\n transmuxer.transmuxQueue = [];\n var term = transmuxer.terminate;\n transmuxer.terminate = function () {\n transmuxer.currentTransmux = null;\n transmuxer.transmuxQueue.length = 0;\n return term.call(transmuxer);\n };\n transmuxer.postMessage({\n action: 'init',\n options: options\n });\n return transmuxer;\n};\nvar segmentTransmuxer = {\n reset: reset,\n endTimeline: endTimeline,\n transmux: transmux,\n createTransmuxer: createTransmuxer\n};\nvar workerCallback = function workerCallback(options) {\n var transmuxer = options.transmuxer;\n var endAction = options.endAction || options.action;\n var callback = options.callback;\n var message = _extends({}, options, {\n endAction: null,\n transmuxer: null,\n callback: null\n });\n var listenForEndEvent = function listenForEndEvent(event) {\n if (event.data.action !== endAction) {\n return;\n }\n transmuxer.removeEventListener('message', listenForEndEvent); // transfer ownership of bytes back to us.\n\n if (event.data.data) {\n event.data.data = new Uint8Array(event.data.data, options.byteOffset || 0, options.byteLength || event.data.data.byteLength);\n if (options.data) {\n options.data = event.data.data;\n }\n }\n callback(event.data);\n };\n transmuxer.addEventListener('message', listenForEndEvent);\n if (options.data) {\n var isArrayBuffer = options.data instanceof ArrayBuffer;\n message.byteOffset = isArrayBuffer ? 0 : options.data.byteOffset;\n message.byteLength = options.data.byteLength;\n var transfers = [isArrayBuffer ? options.data : options.data.buffer];\n transmuxer.postMessage(message, transfers);\n } else {\n transmuxer.postMessage(message);\n }\n};\nvar REQUEST_ERRORS = {\n FAILURE: 2,\n TIMEOUT: -101,\n ABORTED: -102\n};\n/**\n * Abort all requests\n *\n * @param {Object} activeXhrs - an object that tracks all XHR requests\n */\n\nvar abortAll = function abortAll(activeXhrs) {\n activeXhrs.forEach(function (xhr) {\n xhr.abort();\n });\n};\n/**\n * Gather important bandwidth stats once a request has completed\n *\n * @param {Object} request - the XHR request from which to gather stats\n */\n\nvar getRequestStats = function getRequestStats(request) {\n return {\n bandwidth: request.bandwidth,\n bytesReceived: request.bytesReceived || 0,\n roundTripTime: request.roundTripTime || 0\n };\n};\n/**\n * If possible gather bandwidth stats as a request is in\n * progress\n *\n * @param {Event} progressEvent - an event object from an XHR's progress event\n */\n\nvar getProgressStats = function getProgressStats(progressEvent) {\n var request = progressEvent.target;\n var roundTripTime = Date.now() - request.requestTime;\n var stats = {\n bandwidth: Infinity,\n bytesReceived: 0,\n roundTripTime: roundTripTime || 0\n };\n stats.bytesReceived = progressEvent.loaded; // This can result in Infinity if stats.roundTripTime is 0 but that is ok\n // because we should only use bandwidth stats on progress to determine when\n // abort a request early due to insufficient bandwidth\n\n stats.bandwidth = Math.floor(stats.bytesReceived / stats.roundTripTime * 8 * 1000);\n return stats;\n};\n/**\n * Handle all error conditions in one place and return an object\n * with all the information\n *\n * @param {Error|null} error - if non-null signals an error occured with the XHR\n * @param {Object} request - the XHR request that possibly generated the error\n */\n\nvar handleErrors = function handleErrors(error, request) {\n if (request.timedout) {\n return {\n status: request.status,\n message: 'HLS request timed-out at URL: ' + request.uri,\n code: REQUEST_ERRORS.TIMEOUT,\n xhr: request\n };\n }\n if (request.aborted) {\n return {\n status: request.status,\n message: 'HLS request aborted at URL: ' + request.uri,\n code: REQUEST_ERRORS.ABORTED,\n xhr: request\n };\n }\n if (error) {\n return {\n status: request.status,\n message: 'HLS request errored at URL: ' + request.uri,\n code: REQUEST_ERRORS.FAILURE,\n xhr: request\n };\n }\n if (request.responseType === 'arraybuffer' && request.response.byteLength === 0) {\n return {\n status: request.status,\n message: 'Empty HLS response at URL: ' + request.uri,\n code: REQUEST_ERRORS.FAILURE,\n xhr: request\n };\n }\n return null;\n};\n/**\n * Handle responses for key data and convert the key data to the correct format\n * for the decryption step later\n *\n * @param {Object} segment - a simplified copy of the segmentInfo object\n * from SegmentLoader\n * @param {Array} objects - objects to add the key bytes to.\n * @param {Function} finishProcessingFn - a callback to execute to continue processing\n * this request\n */\n\nvar handleKeyResponse = function handleKeyResponse(segment, objects, finishProcessingFn) {\n return function (error, request) {\n var response = request.response;\n var errorObj = handleErrors(error, request);\n if (errorObj) {\n return finishProcessingFn(errorObj, segment);\n }\n if (response.byteLength !== 16) {\n return finishProcessingFn({\n status: request.status,\n message: 'Invalid HLS key at URL: ' + request.uri,\n code: REQUEST_ERRORS.FAILURE,\n xhr: request\n }, segment);\n }\n var view = new DataView(response);\n var bytes = new Uint32Array([view.getUint32(0), view.getUint32(4), view.getUint32(8), view.getUint32(12)]);\n for (var _i97 = 0; _i97 < objects.length; _i97++) {\n objects[_i97].bytes = bytes;\n }\n return finishProcessingFn(null, segment);\n };\n};\nvar parseInitSegment = function parseInitSegment(segment, _callback) {\n var type = detectContainerForBytes(segment.map.bytes); // TODO: We should also handle ts init segments here, but we\n // only know how to parse mp4 init segments at the moment\n\n if (type !== 'mp4') {\n var uri = segment.map.resolvedUri || segment.map.uri;\n return _callback({\n internal: true,\n message: \"Found unsupported \".concat(type || 'unknown', \" container for initialization segment at URL: \").concat(uri),\n code: REQUEST_ERRORS.FAILURE\n });\n }\n workerCallback({\n action: 'probeMp4Tracks',\n data: segment.map.bytes,\n transmuxer: segment.transmuxer,\n callback: function callback(_ref32) {\n var tracks = _ref32.tracks,\n data = _ref32.data;\n // transfer bytes back to us\n segment.map.bytes = data;\n tracks.forEach(function (track) {\n segment.map.tracks = segment.map.tracks || {}; // only support one track of each type for now\n\n if (segment.map.tracks[track.type]) {\n return;\n }\n segment.map.tracks[track.type] = track;\n if (typeof track.id === 'number' && track.timescale) {\n segment.map.timescales = segment.map.timescales || {};\n segment.map.timescales[track.id] = track.timescale;\n }\n });\n return _callback(null);\n }\n });\n};\n/**\n * Handle init-segment responses\n *\n * @param {Object} segment - a simplified copy of the segmentInfo object\n * from SegmentLoader\n * @param {Function} finishProcessingFn - a callback to execute to continue processing\n * this request\n */\n\nvar handleInitSegmentResponse = function handleInitSegmentResponse(_ref33) {\n var segment = _ref33.segment,\n finishProcessingFn = _ref33.finishProcessingFn;\n return function (error, request) {\n var errorObj = handleErrors(error, request);\n if (errorObj) {\n return finishProcessingFn(errorObj, segment);\n }\n var bytes = new Uint8Array(request.response); // init segment is encypted, we will have to wait\n // until the key request is done to decrypt.\n\n if (segment.map.key) {\n segment.map.encryptedBytes = bytes;\n return finishProcessingFn(null, segment);\n }\n segment.map.bytes = bytes;\n parseInitSegment(segment, function (parseError) {\n if (parseError) {\n parseError.xhr = request;\n parseError.status = request.status;\n return finishProcessingFn(parseError, segment);\n }\n finishProcessingFn(null, segment);\n });\n };\n};\n/**\n * Response handler for segment-requests being sure to set the correct\n * property depending on whether the segment is encryped or not\n * Also records and keeps track of stats that are used for ABR purposes\n *\n * @param {Object} segment - a simplified copy of the segmentInfo object\n * from SegmentLoader\n * @param {Function} finishProcessingFn - a callback to execute to continue processing\n * this request\n */\n\nvar handleSegmentResponse = function handleSegmentResponse(_ref34) {\n var segment = _ref34.segment,\n finishProcessingFn = _ref34.finishProcessingFn,\n responseType = _ref34.responseType;\n return function (error, request) {\n var errorObj = handleErrors(error, request);\n if (errorObj) {\n return finishProcessingFn(errorObj, segment);\n }\n var newBytes =\n // although responseText \"should\" exist, this guard serves to prevent an error being\n // thrown for two primary cases:\n // 1. the mime type override stops working, or is not implemented for a specific\n // browser\n // 2. when using mock XHR libraries like sinon that do not allow the override behavior\n responseType === 'arraybuffer' || !request.responseText ? request.response : stringToArrayBuffer(request.responseText.substring(segment.lastReachedChar || 0));\n segment.stats = getRequestStats(request);\n if (segment.key) {\n segment.encryptedBytes = new Uint8Array(newBytes);\n } else {\n segment.bytes = new Uint8Array(newBytes);\n }\n return finishProcessingFn(null, segment);\n };\n};\nvar transmuxAndNotify = function transmuxAndNotify(_ref35) {\n var segment = _ref35.segment,\n bytes = _ref35.bytes,\n trackInfoFn = _ref35.trackInfoFn,\n timingInfoFn = _ref35.timingInfoFn,\n videoSegmentTimingInfoFn = _ref35.videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn = _ref35.audioSegmentTimingInfoFn,\n id3Fn = _ref35.id3Fn,\n captionsFn = _ref35.captionsFn,\n isEndOfTimeline = _ref35.isEndOfTimeline,\n endedTimelineFn = _ref35.endedTimelineFn,\n dataFn = _ref35.dataFn,\n doneFn = _ref35.doneFn,\n onTransmuxerLog = _ref35.onTransmuxerLog;\n var fmp4Tracks = segment.map && segment.map.tracks || {};\n var isMuxed = Boolean(fmp4Tracks.audio && fmp4Tracks.video); // Keep references to each function so we can null them out after we're done with them.\n // One reason for this is that in the case of full segments, we want to trust start\n // times from the probe, rather than the transmuxer.\n\n var audioStartFn = timingInfoFn.bind(null, segment, 'audio', 'start');\n var audioEndFn = timingInfoFn.bind(null, segment, 'audio', 'end');\n var videoStartFn = timingInfoFn.bind(null, segment, 'video', 'start');\n var videoEndFn = timingInfoFn.bind(null, segment, 'video', 'end');\n var finish = function finish() {\n return transmux({\n bytes: bytes,\n transmuxer: segment.transmuxer,\n audioAppendStart: segment.audioAppendStart,\n gopsToAlignWith: segment.gopsToAlignWith,\n remux: isMuxed,\n onData: function onData(result) {\n result.type = result.type === 'combined' ? 'video' : result.type;\n dataFn(segment, result);\n },\n onTrackInfo: function onTrackInfo(trackInfo) {\n if (trackInfoFn) {\n if (isMuxed) {\n trackInfo.isMuxed = true;\n }\n trackInfoFn(segment, trackInfo);\n }\n },\n onAudioTimingInfo: function onAudioTimingInfo(audioTimingInfo) {\n // we only want the first start value we encounter\n if (audioStartFn && typeof audioTimingInfo.start !== 'undefined') {\n audioStartFn(audioTimingInfo.start);\n audioStartFn = null;\n } // we want to continually update the end time\n\n if (audioEndFn && typeof audioTimingInfo.end !== 'undefined') {\n audioEndFn(audioTimingInfo.end);\n }\n },\n onVideoTimingInfo: function onVideoTimingInfo(videoTimingInfo) {\n // we only want the first start value we encounter\n if (videoStartFn && typeof videoTimingInfo.start !== 'undefined') {\n videoStartFn(videoTimingInfo.start);\n videoStartFn = null;\n } // we want to continually update the end time\n\n if (videoEndFn && typeof videoTimingInfo.end !== 'undefined') {\n videoEndFn(videoTimingInfo.end);\n }\n },\n onVideoSegmentTimingInfo: function onVideoSegmentTimingInfo(videoSegmentTimingInfo) {\n videoSegmentTimingInfoFn(videoSegmentTimingInfo);\n },\n onAudioSegmentTimingInfo: function onAudioSegmentTimingInfo(audioSegmentTimingInfo) {\n audioSegmentTimingInfoFn(audioSegmentTimingInfo);\n },\n onId3: function onId3(id3Frames, dispatchType) {\n id3Fn(segment, id3Frames, dispatchType);\n },\n onCaptions: function onCaptions(captions) {\n captionsFn(segment, [captions]);\n },\n isEndOfTimeline: isEndOfTimeline,\n onEndedTimeline: function onEndedTimeline() {\n endedTimelineFn();\n },\n onTransmuxerLog: onTransmuxerLog,\n onDone: function onDone(result) {\n if (!doneFn) {\n return;\n }\n result.type = result.type === 'combined' ? 'video' : result.type;\n doneFn(null, segment, result);\n }\n });\n }; // In the transmuxer, we don't yet have the ability to extract a \"proper\" start time.\n // Meaning cached frame data may corrupt our notion of where this segment\n // really starts. To get around this, probe for the info needed.\n\n workerCallback({\n action: 'probeTs',\n transmuxer: segment.transmuxer,\n data: bytes,\n baseStartTime: segment.baseStartTime,\n callback: function callback(data) {\n segment.bytes = bytes = data.data;\n var probeResult = data.result;\n if (probeResult) {\n trackInfoFn(segment, {\n hasAudio: probeResult.hasAudio,\n hasVideo: probeResult.hasVideo,\n isMuxed: isMuxed\n });\n trackInfoFn = null;\n }\n finish();\n }\n });\n};\nvar handleSegmentBytes = function handleSegmentBytes(_ref36) {\n var segment = _ref36.segment,\n bytes = _ref36.bytes,\n trackInfoFn = _ref36.trackInfoFn,\n timingInfoFn = _ref36.timingInfoFn,\n videoSegmentTimingInfoFn = _ref36.videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn = _ref36.audioSegmentTimingInfoFn,\n id3Fn = _ref36.id3Fn,\n captionsFn = _ref36.captionsFn,\n isEndOfTimeline = _ref36.isEndOfTimeline,\n endedTimelineFn = _ref36.endedTimelineFn,\n dataFn = _ref36.dataFn,\n doneFn = _ref36.doneFn,\n onTransmuxerLog = _ref36.onTransmuxerLog;\n var bytesAsUint8Array = new Uint8Array(bytes); // TODO:\n // We should have a handler that fetches the number of bytes required\n // to check if something is fmp4. This will allow us to save bandwidth\n // because we can only exclude a playlist and abort requests\n // by codec after trackinfo triggers.\n\n if (isLikelyFmp4MediaSegment(bytesAsUint8Array)) {\n segment.isFmp4 = true;\n var tracks = segment.map.tracks;\n var trackInfo = {\n isFmp4: true,\n hasVideo: !!tracks.video,\n hasAudio: !!tracks.audio\n }; // if we have a audio track, with a codec that is not set to\n // encrypted audio\n\n if (tracks.audio && tracks.audio.codec && tracks.audio.codec !== 'enca') {\n trackInfo.audioCodec = tracks.audio.codec;\n } // if we have a video track, with a codec that is not set to\n // encrypted video\n\n if (tracks.video && tracks.video.codec && tracks.video.codec !== 'encv') {\n trackInfo.videoCodec = tracks.video.codec;\n }\n if (tracks.video && tracks.audio) {\n trackInfo.isMuxed = true;\n } // since we don't support appending fmp4 data on progress, we know we have the full\n // segment here\n\n trackInfoFn(segment, trackInfo); // The probe doesn't provide the segment end time, so only callback with the start\n // time. The end time can be roughly calculated by the receiver using the duration.\n //\n // Note that the start time returned by the probe reflects the baseMediaDecodeTime, as\n // that is the true start of the segment (where the playback engine should begin\n // decoding).\n\n var finishLoading = function finishLoading(captions, id3Frames) {\n // if the track still has audio at this point it is only possible\n // for it to be audio only. See `tracks.video && tracks.audio` if statement\n // above.\n // we make sure to use segment.bytes here as that\n dataFn(segment, {\n data: bytesAsUint8Array,\n type: trackInfo.hasAudio && !trackInfo.isMuxed ? 'audio' : 'video'\n });\n if (id3Frames && id3Frames.length) {\n id3Fn(segment, id3Frames);\n }\n if (captions && captions.length) {\n captionsFn(segment, captions);\n }\n doneFn(null, segment, {});\n };\n workerCallback({\n action: 'probeMp4StartTime',\n timescales: segment.map.timescales,\n data: bytesAsUint8Array,\n transmuxer: segment.transmuxer,\n callback: function callback(_ref37) {\n var data = _ref37.data,\n startTime = _ref37.startTime;\n // transfer bytes back to us\n bytes = data.buffer;\n segment.bytes = bytesAsUint8Array = data;\n if (trackInfo.hasAudio && !trackInfo.isMuxed) {\n timingInfoFn(segment, 'audio', 'start', startTime);\n }\n if (trackInfo.hasVideo) {\n timingInfoFn(segment, 'video', 'start', startTime);\n }\n workerCallback({\n action: 'probeEmsgID3',\n data: bytesAsUint8Array,\n transmuxer: segment.transmuxer,\n offset: startTime,\n callback: function callback(_ref38) {\n var emsgData = _ref38.emsgData,\n id3Frames = _ref38.id3Frames;\n // transfer bytes back to us\n bytes = emsgData.buffer;\n segment.bytes = bytesAsUint8Array = emsgData; // Run through the CaptionParser in case there are captions.\n // Initialize CaptionParser if it hasn't been yet\n\n if (!tracks.video || !emsgData.byteLength || !segment.transmuxer) {\n finishLoading(undefined, id3Frames);\n return;\n }\n workerCallback({\n action: 'pushMp4Captions',\n endAction: 'mp4Captions',\n transmuxer: segment.transmuxer,\n data: bytesAsUint8Array,\n timescales: segment.map.timescales,\n trackIds: [tracks.video.id],\n callback: function callback(message) {\n // transfer bytes back to us\n bytes = message.data.buffer;\n segment.bytes = bytesAsUint8Array = message.data;\n message.logs.forEach(function (log) {\n onTransmuxerLog(merge(log, {\n stream: 'mp4CaptionParser'\n }));\n });\n finishLoading(message.captions, id3Frames);\n }\n });\n }\n });\n }\n });\n return;\n } // VTT or other segments that don't need processing\n\n if (!segment.transmuxer) {\n doneFn(null, segment, {});\n return;\n }\n if (typeof segment.container === 'undefined') {\n segment.container = detectContainerForBytes(bytesAsUint8Array);\n }\n if (segment.container !== 'ts' && segment.container !== 'aac') {\n trackInfoFn(segment, {\n hasAudio: false,\n hasVideo: false\n });\n doneFn(null, segment, {});\n return;\n } // ts or aac\n\n transmuxAndNotify({\n segment: segment,\n bytes: bytes,\n trackInfoFn: trackInfoFn,\n timingInfoFn: timingInfoFn,\n videoSegmentTimingInfoFn: videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn: audioSegmentTimingInfoFn,\n id3Fn: id3Fn,\n captionsFn: captionsFn,\n isEndOfTimeline: isEndOfTimeline,\n endedTimelineFn: endedTimelineFn,\n dataFn: dataFn,\n doneFn: doneFn,\n onTransmuxerLog: onTransmuxerLog\n });\n};\nvar decrypt = function decrypt(_ref39, callback) {\n var id = _ref39.id,\n key = _ref39.key,\n encryptedBytes = _ref39.encryptedBytes,\n decryptionWorker = _ref39.decryptionWorker;\n var decryptionHandler = function decryptionHandler(event) {\n if (event.data.source === id) {\n decryptionWorker.removeEventListener('message', decryptionHandler);\n var decrypted = event.data.decrypted;\n callback(new Uint8Array(decrypted.bytes, decrypted.byteOffset, decrypted.byteLength));\n }\n };\n decryptionWorker.addEventListener('message', decryptionHandler);\n var keyBytes;\n if (key.bytes.slice) {\n keyBytes = key.bytes.slice();\n } else {\n keyBytes = new Uint32Array(Array.prototype.slice.call(key.bytes));\n } // incrementally decrypt the bytes\n\n decryptionWorker.postMessage(createTransferableMessage({\n source: id,\n encrypted: encryptedBytes,\n key: keyBytes,\n iv: key.iv\n }), [encryptedBytes.buffer, keyBytes.buffer]);\n};\n/**\n * Decrypt the segment via the decryption web worker\n *\n * @param {WebWorker} decryptionWorker - a WebWorker interface to AES-128 decryption\n * routines\n * @param {Object} segment - a simplified copy of the segmentInfo object\n * from SegmentLoader\n * @param {Function} trackInfoFn - a callback that receives track info\n * @param {Function} timingInfoFn - a callback that receives timing info\n * @param {Function} videoSegmentTimingInfoFn\n * a callback that receives video timing info based on media times and\n * any adjustments made by the transmuxer\n * @param {Function} audioSegmentTimingInfoFn\n * a callback that receives audio timing info based on media times and\n * any adjustments made by the transmuxer\n * @param {boolean} isEndOfTimeline\n * true if this segment represents the last segment in a timeline\n * @param {Function} endedTimelineFn\n * a callback made when a timeline is ended, will only be called if\n * isEndOfTimeline is true\n * @param {Function} dataFn - a callback that is executed when segment bytes are available\n * and ready to use\n * @param {Function} doneFn - a callback that is executed after decryption has completed\n */\n\nvar decryptSegment = function decryptSegment(_ref40) {\n var decryptionWorker = _ref40.decryptionWorker,\n segment = _ref40.segment,\n trackInfoFn = _ref40.trackInfoFn,\n timingInfoFn = _ref40.timingInfoFn,\n videoSegmentTimingInfoFn = _ref40.videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn = _ref40.audioSegmentTimingInfoFn,\n id3Fn = _ref40.id3Fn,\n captionsFn = _ref40.captionsFn,\n isEndOfTimeline = _ref40.isEndOfTimeline,\n endedTimelineFn = _ref40.endedTimelineFn,\n dataFn = _ref40.dataFn,\n doneFn = _ref40.doneFn,\n onTransmuxerLog = _ref40.onTransmuxerLog;\n decrypt({\n id: segment.requestId,\n key: segment.key,\n encryptedBytes: segment.encryptedBytes,\n decryptionWorker: decryptionWorker\n }, function (decryptedBytes) {\n segment.bytes = decryptedBytes;\n handleSegmentBytes({\n segment: segment,\n bytes: segment.bytes,\n trackInfoFn: trackInfoFn,\n timingInfoFn: timingInfoFn,\n videoSegmentTimingInfoFn: videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn: audioSegmentTimingInfoFn,\n id3Fn: id3Fn,\n captionsFn: captionsFn,\n isEndOfTimeline: isEndOfTimeline,\n endedTimelineFn: endedTimelineFn,\n dataFn: dataFn,\n doneFn: doneFn,\n onTransmuxerLog: onTransmuxerLog\n });\n });\n};\n/**\n * This function waits for all XHRs to finish (with either success or failure)\n * before continueing processing via it's callback. The function gathers errors\n * from each request into a single errors array so that the error status for\n * each request can be examined later.\n *\n * @param {Object} activeXhrs - an object that tracks all XHR requests\n * @param {WebWorker} decryptionWorker - a WebWorker interface to AES-128 decryption\n * routines\n * @param {Function} trackInfoFn - a callback that receives track info\n * @param {Function} timingInfoFn - a callback that receives timing info\n * @param {Function} videoSegmentTimingInfoFn\n * a callback that receives video timing info based on media times and\n * any adjustments made by the transmuxer\n * @param {Function} audioSegmentTimingInfoFn\n * a callback that receives audio timing info based on media times and\n * any adjustments made by the transmuxer\n * @param {Function} id3Fn - a callback that receives ID3 metadata\n * @param {Function} captionsFn - a callback that receives captions\n * @param {boolean} isEndOfTimeline\n * true if this segment represents the last segment in a timeline\n * @param {Function} endedTimelineFn\n * a callback made when a timeline is ended, will only be called if\n * isEndOfTimeline is true\n * @param {Function} dataFn - a callback that is executed when segment bytes are available\n * and ready to use\n * @param {Function} doneFn - a callback that is executed after all resources have been\n * downloaded and any decryption completed\n */\n\nvar waitForCompletion = function waitForCompletion(_ref41) {\n var activeXhrs = _ref41.activeXhrs,\n decryptionWorker = _ref41.decryptionWorker,\n trackInfoFn = _ref41.trackInfoFn,\n timingInfoFn = _ref41.timingInfoFn,\n videoSegmentTimingInfoFn = _ref41.videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn = _ref41.audioSegmentTimingInfoFn,\n id3Fn = _ref41.id3Fn,\n captionsFn = _ref41.captionsFn,\n isEndOfTimeline = _ref41.isEndOfTimeline,\n endedTimelineFn = _ref41.endedTimelineFn,\n dataFn = _ref41.dataFn,\n doneFn = _ref41.doneFn,\n onTransmuxerLog = _ref41.onTransmuxerLog;\n var count = 0;\n var didError = false;\n return function (error, segment) {\n if (didError) {\n return;\n }\n if (error) {\n didError = true; // If there are errors, we have to abort any outstanding requests\n\n abortAll(activeXhrs); // Even though the requests above are aborted, and in theory we could wait until we\n // handle the aborted events from those requests, there are some cases where we may\n // never get an aborted event. For instance, if the network connection is lost and\n // there were two requests, the first may have triggered an error immediately, while\n // the second request remains unsent. In that case, the aborted algorithm will not\n // trigger an abort: see https://xhr.spec.whatwg.org/#the-abort()-method\n //\n // We also can't rely on the ready state of the XHR, since the request that\n // triggered the connection error may also show as a ready state of 0 (unsent).\n // Therefore, we have to finish this group of requests immediately after the first\n // seen error.\n\n return doneFn(error, segment);\n }\n count += 1;\n if (count === activeXhrs.length) {\n var segmentFinish = function segmentFinish() {\n if (segment.encryptedBytes) {\n return decryptSegment({\n decryptionWorker: decryptionWorker,\n segment: segment,\n trackInfoFn: trackInfoFn,\n timingInfoFn: timingInfoFn,\n videoSegmentTimingInfoFn: videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn: audioSegmentTimingInfoFn,\n id3Fn: id3Fn,\n captionsFn: captionsFn,\n isEndOfTimeline: isEndOfTimeline,\n endedTimelineFn: endedTimelineFn,\n dataFn: dataFn,\n doneFn: doneFn,\n onTransmuxerLog: onTransmuxerLog\n });\n } // Otherwise, everything is ready just continue\n\n handleSegmentBytes({\n segment: segment,\n bytes: segment.bytes,\n trackInfoFn: trackInfoFn,\n timingInfoFn: timingInfoFn,\n videoSegmentTimingInfoFn: videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn: audioSegmentTimingInfoFn,\n id3Fn: id3Fn,\n captionsFn: captionsFn,\n isEndOfTimeline: isEndOfTimeline,\n endedTimelineFn: endedTimelineFn,\n dataFn: dataFn,\n doneFn: doneFn,\n onTransmuxerLog: onTransmuxerLog\n });\n }; // Keep track of when *all* of the requests have completed\n\n segment.endOfAllRequests = Date.now();\n if (segment.map && segment.map.encryptedBytes && !segment.map.bytes) {\n return decrypt({\n decryptionWorker: decryptionWorker,\n // add -init to the \"id\" to differentiate between segment\n // and init segment decryption, just in case they happen\n // at the same time at some point in the future.\n id: segment.requestId + '-init',\n encryptedBytes: segment.map.encryptedBytes,\n key: segment.map.key\n }, function (decryptedBytes) {\n segment.map.bytes = decryptedBytes;\n parseInitSegment(segment, function (parseError) {\n if (parseError) {\n abortAll(activeXhrs);\n return doneFn(parseError, segment);\n }\n segmentFinish();\n });\n });\n }\n segmentFinish();\n }\n };\n};\n/**\n * Calls the abort callback if any request within the batch was aborted. Will only call\n * the callback once per batch of requests, even if multiple were aborted.\n *\n * @param {Object} loadendState - state to check to see if the abort function was called\n * @param {Function} abortFn - callback to call for abort\n */\n\nvar handleLoadEnd = function handleLoadEnd(_ref42) {\n var loadendState = _ref42.loadendState,\n abortFn = _ref42.abortFn;\n return function (event) {\n var request = event.target;\n if (request.aborted && abortFn && !loadendState.calledAbortFn) {\n abortFn();\n loadendState.calledAbortFn = true;\n }\n };\n};\n/**\n * Simple progress event callback handler that gathers some stats before\n * executing a provided callback with the `segment` object\n *\n * @param {Object} segment - a simplified copy of the segmentInfo object\n * from SegmentLoader\n * @param {Function} progressFn - a callback that is executed each time a progress event\n * is received\n * @param {Function} trackInfoFn - a callback that receives track info\n * @param {Function} timingInfoFn - a callback that receives timing info\n * @param {Function} videoSegmentTimingInfoFn\n * a callback that receives video timing info based on media times and\n * any adjustments made by the transmuxer\n * @param {Function} audioSegmentTimingInfoFn\n * a callback that receives audio timing info based on media times and\n * any adjustments made by the transmuxer\n * @param {boolean} isEndOfTimeline\n * true if this segment represents the last segment in a timeline\n * @param {Function} endedTimelineFn\n * a callback made when a timeline is ended, will only be called if\n * isEndOfTimeline is true\n * @param {Function} dataFn - a callback that is executed when segment bytes are available\n * and ready to use\n * @param {Event} event - the progress event object from XMLHttpRequest\n */\n\nvar handleProgress = function handleProgress(_ref43) {\n var segment = _ref43.segment,\n progressFn = _ref43.progressFn,\n trackInfoFn = _ref43.trackInfoFn,\n timingInfoFn = _ref43.timingInfoFn,\n videoSegmentTimingInfoFn = _ref43.videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn = _ref43.audioSegmentTimingInfoFn,\n id3Fn = _ref43.id3Fn,\n captionsFn = _ref43.captionsFn,\n isEndOfTimeline = _ref43.isEndOfTimeline,\n endedTimelineFn = _ref43.endedTimelineFn,\n dataFn = _ref43.dataFn;\n return function (event) {\n var request = event.target;\n if (request.aborted) {\n return;\n }\n segment.stats = merge(segment.stats, getProgressStats(event)); // record the time that we receive the first byte of data\n\n if (!segment.stats.firstBytesReceivedAt && segment.stats.bytesReceived) {\n segment.stats.firstBytesReceivedAt = Date.now();\n }\n return progressFn(event, segment);\n };\n};\n/**\n * Load all resources and does any processing necessary for a media-segment\n *\n * Features:\n * decrypts the media-segment if it has a key uri and an iv\n * aborts *all* requests if *any* one request fails\n *\n * The segment object, at minimum, has the following format:\n * {\n * resolvedUri: String,\n * [transmuxer]: Object,\n * [byterange]: {\n * offset: Number,\n * length: Number\n * },\n * [key]: {\n * resolvedUri: String\n * [byterange]: {\n * offset: Number,\n * length: Number\n * },\n * iv: {\n * bytes: Uint32Array\n * }\n * },\n * [map]: {\n * resolvedUri: String,\n * [byterange]: {\n * offset: Number,\n * length: Number\n * },\n * [bytes]: Uint8Array\n * }\n * }\n * ...where [name] denotes optional properties\n *\n * @param {Function} xhr - an instance of the xhr wrapper in xhr.js\n * @param {Object} xhrOptions - the base options to provide to all xhr requests\n * @param {WebWorker} decryptionWorker - a WebWorker interface to AES-128\n * decryption routines\n * @param {Object} segment - a simplified copy of the segmentInfo object\n * from SegmentLoader\n * @param {Function} abortFn - a callback called (only once) if any piece of a request was\n * aborted\n * @param {Function} progressFn - a callback that receives progress events from the main\n * segment's xhr request\n * @param {Function} trackInfoFn - a callback that receives track info\n * @param {Function} timingInfoFn - a callback that receives timing info\n * @param {Function} videoSegmentTimingInfoFn\n * a callback that receives video timing info based on media times and\n * any adjustments made by the transmuxer\n * @param {Function} audioSegmentTimingInfoFn\n * a callback that receives audio timing info based on media times and\n * any adjustments made by the transmuxer\n * @param {Function} id3Fn - a callback that receives ID3 metadata\n * @param {Function} captionsFn - a callback that receives captions\n * @param {boolean} isEndOfTimeline\n * true if this segment represents the last segment in a timeline\n * @param {Function} endedTimelineFn\n * a callback made when a timeline is ended, will only be called if\n * isEndOfTimeline is true\n * @param {Function} dataFn - a callback that receives data from the main segment's xhr\n * request, transmuxed if needed\n * @param {Function} doneFn - a callback that is executed only once all requests have\n * succeeded or failed\n * @return {Function} a function that, when invoked, immediately aborts all\n * outstanding requests\n */\n\nvar mediaSegmentRequest = function mediaSegmentRequest(_ref44) {\n var xhr = _ref44.xhr,\n xhrOptions = _ref44.xhrOptions,\n decryptionWorker = _ref44.decryptionWorker,\n segment = _ref44.segment,\n abortFn = _ref44.abortFn,\n progressFn = _ref44.progressFn,\n trackInfoFn = _ref44.trackInfoFn,\n timingInfoFn = _ref44.timingInfoFn,\n videoSegmentTimingInfoFn = _ref44.videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn = _ref44.audioSegmentTimingInfoFn,\n id3Fn = _ref44.id3Fn,\n captionsFn = _ref44.captionsFn,\n isEndOfTimeline = _ref44.isEndOfTimeline,\n endedTimelineFn = _ref44.endedTimelineFn,\n dataFn = _ref44.dataFn,\n doneFn = _ref44.doneFn,\n onTransmuxerLog = _ref44.onTransmuxerLog;\n var activeXhrs = [];\n var finishProcessingFn = waitForCompletion({\n activeXhrs: activeXhrs,\n decryptionWorker: decryptionWorker,\n trackInfoFn: trackInfoFn,\n timingInfoFn: timingInfoFn,\n videoSegmentTimingInfoFn: videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn: audioSegmentTimingInfoFn,\n id3Fn: id3Fn,\n captionsFn: captionsFn,\n isEndOfTimeline: isEndOfTimeline,\n endedTimelineFn: endedTimelineFn,\n dataFn: dataFn,\n doneFn: doneFn,\n onTransmuxerLog: onTransmuxerLog\n }); // optionally, request the decryption key\n\n if (segment.key && !segment.key.bytes) {\n var objects = [segment.key];\n if (segment.map && !segment.map.bytes && segment.map.key && segment.map.key.resolvedUri === segment.key.resolvedUri) {\n objects.push(segment.map.key);\n }\n var keyRequestOptions = merge(xhrOptions, {\n uri: segment.key.resolvedUri,\n responseType: 'arraybuffer'\n });\n var keyRequestCallback = handleKeyResponse(segment, objects, finishProcessingFn);\n var keyXhr = xhr(keyRequestOptions, keyRequestCallback);\n activeXhrs.push(keyXhr);\n } // optionally, request the associated media init segment\n\n if (segment.map && !segment.map.bytes) {\n var differentMapKey = segment.map.key && (!segment.key || segment.key.resolvedUri !== segment.map.key.resolvedUri);\n if (differentMapKey) {\n var mapKeyRequestOptions = merge(xhrOptions, {\n uri: segment.map.key.resolvedUri,\n responseType: 'arraybuffer'\n });\n var mapKeyRequestCallback = handleKeyResponse(segment, [segment.map.key], finishProcessingFn);\n var mapKeyXhr = xhr(mapKeyRequestOptions, mapKeyRequestCallback);\n activeXhrs.push(mapKeyXhr);\n }\n var initSegmentOptions = merge(xhrOptions, {\n uri: segment.map.resolvedUri,\n responseType: 'arraybuffer',\n headers: segmentXhrHeaders(segment.map)\n });\n var initSegmentRequestCallback = handleInitSegmentResponse({\n segment: segment,\n finishProcessingFn: finishProcessingFn\n });\n var initSegmentXhr = xhr(initSegmentOptions, initSegmentRequestCallback);\n activeXhrs.push(initSegmentXhr);\n }\n var segmentRequestOptions = merge(xhrOptions, {\n uri: segment.part && segment.part.resolvedUri || segment.resolvedUri,\n responseType: 'arraybuffer',\n headers: segmentXhrHeaders(segment)\n });\n var segmentRequestCallback = handleSegmentResponse({\n segment: segment,\n finishProcessingFn: finishProcessingFn,\n responseType: segmentRequestOptions.responseType\n });\n var segmentXhr = xhr(segmentRequestOptions, segmentRequestCallback);\n segmentXhr.addEventListener('progress', handleProgress({\n segment: segment,\n progressFn: progressFn,\n trackInfoFn: trackInfoFn,\n timingInfoFn: timingInfoFn,\n videoSegmentTimingInfoFn: videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn: audioSegmentTimingInfoFn,\n id3Fn: id3Fn,\n captionsFn: captionsFn,\n isEndOfTimeline: isEndOfTimeline,\n endedTimelineFn: endedTimelineFn,\n dataFn: dataFn\n }));\n activeXhrs.push(segmentXhr); // since all parts of the request must be considered, but should not make callbacks\n // multiple times, provide a shared state object\n\n var loadendState = {};\n activeXhrs.forEach(function (activeXhr) {\n activeXhr.addEventListener('loadend', handleLoadEnd({\n loadendState: loadendState,\n abortFn: abortFn\n }));\n });\n return function () {\n return abortAll(activeXhrs);\n };\n};\n\n/**\n * @file - codecs.js - Handles tasks regarding codec strings such as translating them to\n * codec strings, or translating codec strings into objects that can be examined.\n */\nvar logFn$1 = logger('CodecUtils');\n/**\n * Returns a set of codec strings parsed from the playlist or the default\n * codec strings if no codecs were specified in the playlist\n *\n * @param {Playlist} media the current media playlist\n * @return {Object} an object with the video and audio codecs\n */\n\nvar getCodecs = function getCodecs(media) {\n // if the codecs were explicitly specified, use them instead of the\n // defaults\n var mediaAttributes = media.attributes || {};\n if (mediaAttributes.CODECS) {\n return parseCodecs(mediaAttributes.CODECS);\n }\n};\nvar isMaat = function isMaat(main, media) {\n var mediaAttributes = media.attributes || {};\n return main && main.mediaGroups && main.mediaGroups.AUDIO && mediaAttributes.AUDIO && main.mediaGroups.AUDIO[mediaAttributes.AUDIO];\n};\nvar isMuxed = function isMuxed(main, media) {\n if (!isMaat(main, media)) {\n return true;\n }\n var mediaAttributes = media.attributes || {};\n var audioGroup = main.mediaGroups.AUDIO[mediaAttributes.AUDIO];\n for (var groupId in audioGroup) {\n // If an audio group has a URI (the case for HLS, as HLS will use external playlists),\n // or there are listed playlists (the case for DASH, as the manifest will have already\n // provided all of the details necessary to generate the audio playlist, as opposed to\n // HLS' externally requested playlists), then the content is demuxed.\n if (!audioGroup[groupId].uri && !audioGroup[groupId].playlists) {\n return true;\n }\n }\n return false;\n};\nvar unwrapCodecList = function unwrapCodecList(codecList) {\n var codecs = {};\n codecList.forEach(function (_ref45) {\n var mediaType = _ref45.mediaType,\n type = _ref45.type,\n details = _ref45.details;\n codecs[mediaType] = codecs[mediaType] || [];\n codecs[mediaType].push(translateLegacyCodec(\"\".concat(type).concat(details)));\n });\n Object.keys(codecs).forEach(function (mediaType) {\n if (codecs[mediaType].length > 1) {\n logFn$1(\"multiple \".concat(mediaType, \" codecs found as attributes: \").concat(codecs[mediaType].join(', '), \". Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.\"));\n codecs[mediaType] = null;\n return;\n }\n codecs[mediaType] = codecs[mediaType][0];\n });\n return codecs;\n};\nvar codecCount = function codecCount(codecObj) {\n var count = 0;\n if (codecObj.audio) {\n count++;\n }\n if (codecObj.video) {\n count++;\n }\n return count;\n};\n/**\n * Calculates the codec strings for a working configuration of\n * SourceBuffers to play variant streams in a main playlist. If\n * there is no possible working configuration, an empty object will be\n * returned.\n *\n * @param main {Object} the m3u8 object for the main playlist\n * @param media {Object} the m3u8 object for the variant playlist\n * @return {Object} the codec strings.\n *\n * @private\n */\n\nvar codecsForPlaylist = function codecsForPlaylist(main, media) {\n var mediaAttributes = media.attributes || {};\n var codecInfo = unwrapCodecList(getCodecs(media) || []); // HLS with multiple-audio tracks must always get an audio codec.\n // Put another way, there is no way to have a video-only multiple-audio HLS!\n\n if (isMaat(main, media) && !codecInfo.audio) {\n if (!isMuxed(main, media)) {\n // It is possible for codecs to be specified on the audio media group playlist but\n // not on the rendition playlist. This is mostly the case for DASH, where audio and\n // video are always separate (and separately specified).\n var defaultCodecs = unwrapCodecList(codecsFromDefault(main, mediaAttributes.AUDIO) || []);\n if (defaultCodecs.audio) {\n codecInfo.audio = defaultCodecs.audio;\n }\n }\n }\n return codecInfo;\n};\nvar logFn = logger('PlaylistSelector');\nvar representationToString = function representationToString(representation) {\n if (!representation || !representation.playlist) {\n return;\n }\n var playlist = representation.playlist;\n return JSON.stringify({\n id: playlist.id,\n bandwidth: representation.bandwidth,\n width: representation.width,\n height: representation.height,\n codecs: playlist.attributes && playlist.attributes.CODECS || ''\n });\n}; // Utilities\n\n/**\n * Returns the CSS value for the specified property on an element\n * using `getComputedStyle`. Firefox has a long-standing issue where\n * getComputedStyle() may return null when running in an iframe with\n * `display: none`.\n *\n * @see https://bugzilla.mozilla.org/show_bug.cgi?id=548397\n * @param {HTMLElement} el the htmlelement to work on\n * @param {string} the proprety to get the style for\n */\n\nvar safeGetComputedStyle = function safeGetComputedStyle(el, property) {\n if (!el) {\n return '';\n }\n var result = window$1.getComputedStyle(el);\n if (!result) {\n return '';\n }\n return result[property];\n};\n/**\n * Resuable stable sort function\n *\n * @param {Playlists} array\n * @param {Function} sortFn Different comparators\n * @function stableSort\n */\n\nvar stableSort = function stableSort(array, sortFn) {\n var newArray = array.slice();\n array.sort(function (left, right) {\n var cmp = sortFn(left, right);\n if (cmp === 0) {\n return newArray.indexOf(left) - newArray.indexOf(right);\n }\n return cmp;\n });\n};\n/**\n * A comparator function to sort two playlist object by bandwidth.\n *\n * @param {Object} left a media playlist object\n * @param {Object} right a media playlist object\n * @return {number} Greater than zero if the bandwidth attribute of\n * left is greater than the corresponding attribute of right. Less\n * than zero if the bandwidth of right is greater than left and\n * exactly zero if the two are equal.\n */\n\nvar comparePlaylistBandwidth = function comparePlaylistBandwidth(left, right) {\n var leftBandwidth;\n var rightBandwidth;\n if (left.attributes.BANDWIDTH) {\n leftBandwidth = left.attributes.BANDWIDTH;\n }\n leftBandwidth = leftBandwidth || window$1.Number.MAX_VALUE;\n if (right.attributes.BANDWIDTH) {\n rightBandwidth = right.attributes.BANDWIDTH;\n }\n rightBandwidth = rightBandwidth || window$1.Number.MAX_VALUE;\n return leftBandwidth - rightBandwidth;\n};\n/**\n * A comparator function to sort two playlist object by resolution (width).\n *\n * @param {Object} left a media playlist object\n * @param {Object} right a media playlist object\n * @return {number} Greater than zero if the resolution.width attribute of\n * left is greater than the corresponding attribute of right. Less\n * than zero if the resolution.width of right is greater than left and\n * exactly zero if the two are equal.\n */\n\nvar comparePlaylistResolution = function comparePlaylistResolution(left, right) {\n var leftWidth;\n var rightWidth;\n if (left.attributes.RESOLUTION && left.attributes.RESOLUTION.width) {\n leftWidth = left.attributes.RESOLUTION.width;\n }\n leftWidth = leftWidth || window$1.Number.MAX_VALUE;\n if (right.attributes.RESOLUTION && right.attributes.RESOLUTION.width) {\n rightWidth = right.attributes.RESOLUTION.width;\n }\n rightWidth = rightWidth || window$1.Number.MAX_VALUE; // NOTE - Fallback to bandwidth sort as appropriate in cases where multiple renditions\n // have the same media dimensions/ resolution\n\n if (leftWidth === rightWidth && left.attributes.BANDWIDTH && right.attributes.BANDWIDTH) {\n return left.attributes.BANDWIDTH - right.attributes.BANDWIDTH;\n }\n return leftWidth - rightWidth;\n};\n/**\n * Chooses the appropriate media playlist based on bandwidth and player size\n *\n * @param {Object} main\n * Object representation of the main manifest\n * @param {number} playerBandwidth\n * Current calculated bandwidth of the player\n * @param {number} playerWidth\n * Current width of the player element (should account for the device pixel ratio)\n * @param {number} playerHeight\n * Current height of the player element (should account for the device pixel ratio)\n * @param {boolean} limitRenditionByPlayerDimensions\n * True if the player width and height should be used during the selection, false otherwise\n * @param {Object} playlistController\n * the current playlistController object\n * @return {Playlist} the highest bitrate playlist less than the\n * currently detected bandwidth, accounting for some amount of\n * bandwidth variance\n */\n\nvar simpleSelector = function simpleSelector(main, playerBandwidth, playerWidth, playerHeight, limitRenditionByPlayerDimensions, playlistController) {\n // If we end up getting called before `main` is available, exit early\n if (!main) {\n return;\n }\n var options = {\n bandwidth: playerBandwidth,\n width: playerWidth,\n height: playerHeight,\n limitRenditionByPlayerDimensions: limitRenditionByPlayerDimensions\n };\n var playlists = main.playlists; // if playlist is audio only, select between currently active audio group playlists.\n\n if (Playlist.isAudioOnly(main)) {\n playlists = playlistController.getAudioTrackPlaylists_(); // add audioOnly to options so that we log audioOnly: true\n // at the buttom of this function for debugging.\n\n options.audioOnly = true;\n } // convert the playlists to an intermediary representation to make comparisons easier\n\n var sortedPlaylistReps = playlists.map(function (playlist) {\n var bandwidth;\n var width = playlist.attributes && playlist.attributes.RESOLUTION && playlist.attributes.RESOLUTION.width;\n var height = playlist.attributes && playlist.attributes.RESOLUTION && playlist.attributes.RESOLUTION.height;\n bandwidth = playlist.attributes && playlist.attributes.BANDWIDTH;\n bandwidth = bandwidth || window$1.Number.MAX_VALUE;\n return {\n bandwidth: bandwidth,\n width: width,\n height: height,\n playlist: playlist\n };\n });\n stableSort(sortedPlaylistReps, function (left, right) {\n return left.bandwidth - right.bandwidth;\n }); // filter out any playlists that have been excluded due to\n // incompatible configurations\n\n sortedPlaylistReps = sortedPlaylistReps.filter(function (rep) {\n return !Playlist.isIncompatible(rep.playlist);\n }); // filter out any playlists that have been disabled manually through the representations\n // api or excluded temporarily due to playback errors.\n\n var enabledPlaylistReps = sortedPlaylistReps.filter(function (rep) {\n return Playlist.isEnabled(rep.playlist);\n });\n if (!enabledPlaylistReps.length) {\n // if there are no enabled playlists, then they have all been excluded or disabled\n // by the user through the representations api. In this case, ignore exclusion and\n // fallback to what the user wants by using playlists the user has not disabled.\n enabledPlaylistReps = sortedPlaylistReps.filter(function (rep) {\n return !Playlist.isDisabled(rep.playlist);\n });\n } // filter out any variant that has greater effective bitrate\n // than the current estimated bandwidth\n\n var bandwidthPlaylistReps = enabledPlaylistReps.filter(function (rep) {\n return rep.bandwidth * Config.BANDWIDTH_VARIANCE < playerBandwidth;\n });\n var highestRemainingBandwidthRep = bandwidthPlaylistReps[bandwidthPlaylistReps.length - 1]; // get all of the renditions with the same (highest) bandwidth\n // and then taking the very first element\n\n var bandwidthBestRep = bandwidthPlaylistReps.filter(function (rep) {\n return rep.bandwidth === highestRemainingBandwidthRep.bandwidth;\n })[0]; // if we're not going to limit renditions by player size, make an early decision.\n\n if (limitRenditionByPlayerDimensions === false) {\n var _chosenRep = bandwidthBestRep || enabledPlaylistReps[0] || sortedPlaylistReps[0];\n if (_chosenRep && _chosenRep.playlist) {\n var type = 'sortedPlaylistReps';\n if (bandwidthBestRep) {\n type = 'bandwidthBestRep';\n }\n if (enabledPlaylistReps[0]) {\n type = 'enabledPlaylistReps';\n }\n logFn(\"choosing \".concat(representationToString(_chosenRep), \" using \").concat(type, \" with options\"), options);\n return _chosenRep.playlist;\n }\n logFn('could not choose a playlist with options', options);\n return null;\n } // filter out playlists without resolution information\n\n var haveResolution = bandwidthPlaylistReps.filter(function (rep) {\n return rep.width && rep.height;\n }); // sort variants by resolution\n\n stableSort(haveResolution, function (left, right) {\n return left.width - right.width;\n }); // if we have the exact resolution as the player use it\n\n var resolutionBestRepList = haveResolution.filter(function (rep) {\n return rep.width === playerWidth && rep.height === playerHeight;\n });\n highestRemainingBandwidthRep = resolutionBestRepList[resolutionBestRepList.length - 1]; // ensure that we pick the highest bandwidth variant that have exact resolution\n\n var resolutionBestRep = resolutionBestRepList.filter(function (rep) {\n return rep.bandwidth === highestRemainingBandwidthRep.bandwidth;\n })[0];\n var resolutionPlusOneList;\n var resolutionPlusOneSmallest;\n var resolutionPlusOneRep; // find the smallest variant that is larger than the player\n // if there is no match of exact resolution\n\n if (!resolutionBestRep) {\n resolutionPlusOneList = haveResolution.filter(function (rep) {\n return rep.width > playerWidth || rep.height > playerHeight;\n }); // find all the variants have the same smallest resolution\n\n resolutionPlusOneSmallest = resolutionPlusOneList.filter(function (rep) {\n return rep.width === resolutionPlusOneList[0].width && rep.height === resolutionPlusOneList[0].height;\n }); // ensure that we also pick the highest bandwidth variant that\n // is just-larger-than the video player\n\n highestRemainingBandwidthRep = resolutionPlusOneSmallest[resolutionPlusOneSmallest.length - 1];\n resolutionPlusOneRep = resolutionPlusOneSmallest.filter(function (rep) {\n return rep.bandwidth === highestRemainingBandwidthRep.bandwidth;\n })[0];\n }\n var leastPixelDiffRep; // If this selector proves to be better than others,\n // resolutionPlusOneRep and resolutionBestRep and all\n // the code involving them should be removed.\n\n if (playlistController.leastPixelDiffSelector) {\n // find the variant that is closest to the player's pixel size\n var leastPixelDiffList = haveResolution.map(function (rep) {\n rep.pixelDiff = Math.abs(rep.width - playerWidth) + Math.abs(rep.height - playerHeight);\n return rep;\n }); // get the highest bandwidth, closest resolution playlist\n\n stableSort(leastPixelDiffList, function (left, right) {\n // sort by highest bandwidth if pixelDiff is the same\n if (left.pixelDiff === right.pixelDiff) {\n return right.bandwidth - left.bandwidth;\n }\n return left.pixelDiff - right.pixelDiff;\n });\n leastPixelDiffRep = leastPixelDiffList[0];\n } // fallback chain of variants\n\n var chosenRep = leastPixelDiffRep || resolutionPlusOneRep || resolutionBestRep || bandwidthBestRep || enabledPlaylistReps[0] || sortedPlaylistReps[0];\n if (chosenRep && chosenRep.playlist) {\n var _type2 = 'sortedPlaylistReps';\n if (leastPixelDiffRep) {\n _type2 = 'leastPixelDiffRep';\n } else if (resolutionPlusOneRep) {\n _type2 = 'resolutionPlusOneRep';\n } else if (resolutionBestRep) {\n _type2 = 'resolutionBestRep';\n } else if (bandwidthBestRep) {\n _type2 = 'bandwidthBestRep';\n } else if (enabledPlaylistReps[0]) {\n _type2 = 'enabledPlaylistReps';\n }\n logFn(\"choosing \".concat(representationToString(chosenRep), \" using \").concat(_type2, \" with options\"), options);\n return chosenRep.playlist;\n }\n logFn('could not choose a playlist with options', options);\n return null;\n};\n\n/**\n * Chooses the appropriate media playlist based on the most recent\n * bandwidth estimate and the player size.\n *\n * Expects to be called within the context of an instance of VhsHandler\n *\n * @return {Playlist} the highest bitrate playlist less than the\n * currently detected bandwidth, accounting for some amount of\n * bandwidth variance\n */\n\nvar lastBandwidthSelector = function lastBandwidthSelector() {\n var pixelRatio = this.useDevicePixelRatio ? window$1.devicePixelRatio || 1 : 1;\n return simpleSelector(this.playlists.main, this.systemBandwidth, parseInt(safeGetComputedStyle(this.tech_.el(), 'width'), 10) * pixelRatio, parseInt(safeGetComputedStyle(this.tech_.el(), 'height'), 10) * pixelRatio, this.limitRenditionByPlayerDimensions, this.playlistController_);\n};\n/**\n * Chooses the appropriate media playlist based on an\n * exponential-weighted moving average of the bandwidth after\n * filtering for player size.\n *\n * Expects to be called within the context of an instance of VhsHandler\n *\n * @param {number} decay - a number between 0 and 1. Higher values of\n * this parameter will cause previous bandwidth estimates to lose\n * significance more quickly.\n * @return {Function} a function which can be invoked to create a new\n * playlist selector function.\n * @see https://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average\n */\n\nvar movingAverageBandwidthSelector = function movingAverageBandwidthSelector(decay) {\n var average = -1;\n var lastSystemBandwidth = -1;\n if (decay < 0 || decay > 1) {\n throw new Error('Moving average bandwidth decay must be between 0 and 1.');\n }\n return function () {\n var pixelRatio = this.useDevicePixelRatio ? window$1.devicePixelRatio || 1 : 1;\n if (average < 0) {\n average = this.systemBandwidth;\n lastSystemBandwidth = this.systemBandwidth;\n } // stop the average value from decaying for every 250ms\n // when the systemBandwidth is constant\n // and\n // stop average from setting to a very low value when the\n // systemBandwidth becomes 0 in case of chunk cancellation\n\n if (this.systemBandwidth > 0 && this.systemBandwidth !== lastSystemBandwidth) {\n average = decay * this.systemBandwidth + (1 - decay) * average;\n lastSystemBandwidth = this.systemBandwidth;\n }\n return simpleSelector(this.playlists.main, average, parseInt(safeGetComputedStyle(this.tech_.el(), 'width'), 10) * pixelRatio, parseInt(safeGetComputedStyle(this.tech_.el(), 'height'), 10) * pixelRatio, this.limitRenditionByPlayerDimensions, this.playlistController_);\n };\n};\n/**\n * Chooses the appropriate media playlist based on the potential to rebuffer\n *\n * @param {Object} settings\n * Object of information required to use this selector\n * @param {Object} settings.main\n * Object representation of the main manifest\n * @param {number} settings.currentTime\n * The current time of the player\n * @param {number} settings.bandwidth\n * Current measured bandwidth\n * @param {number} settings.duration\n * Duration of the media\n * @param {number} settings.segmentDuration\n * Segment duration to be used in round trip time calculations\n * @param {number} settings.timeUntilRebuffer\n * Time left in seconds until the player has to rebuffer\n * @param {number} settings.currentTimeline\n * The current timeline segments are being loaded from\n * @param {SyncController} settings.syncController\n * SyncController for determining if we have a sync point for a given playlist\n * @return {Object|null}\n * {Object} return.playlist\n * The highest bandwidth playlist with the least amount of rebuffering\n * {Number} return.rebufferingImpact\n * The amount of time in seconds switching to this playlist will rebuffer. A\n * negative value means that switching will cause zero rebuffering.\n */\n\nvar minRebufferMaxBandwidthSelector = function minRebufferMaxBandwidthSelector(settings) {\n var main = settings.main,\n currentTime = settings.currentTime,\n bandwidth = settings.bandwidth,\n duration = settings.duration,\n segmentDuration = settings.segmentDuration,\n timeUntilRebuffer = settings.timeUntilRebuffer,\n currentTimeline = settings.currentTimeline,\n syncController = settings.syncController; // filter out any playlists that have been excluded due to\n // incompatible configurations\n\n var compatiblePlaylists = main.playlists.filter(function (playlist) {\n return !Playlist.isIncompatible(playlist);\n }); // filter out any playlists that have been disabled manually through the representations\n // api or excluded temporarily due to playback errors.\n\n var enabledPlaylists = compatiblePlaylists.filter(Playlist.isEnabled);\n if (!enabledPlaylists.length) {\n // if there are no enabled playlists, then they have all been excluded or disabled\n // by the user through the representations api. In this case, ignore exclusion and\n // fallback to what the user wants by using playlists the user has not disabled.\n enabledPlaylists = compatiblePlaylists.filter(function (playlist) {\n return !Playlist.isDisabled(playlist);\n });\n }\n var bandwidthPlaylists = enabledPlaylists.filter(Playlist.hasAttribute.bind(null, 'BANDWIDTH'));\n var rebufferingEstimates = bandwidthPlaylists.map(function (playlist) {\n var syncPoint = syncController.getSyncPoint(playlist, duration, currentTimeline, currentTime); // If there is no sync point for this playlist, switching to it will require a\n // sync request first. This will double the request time\n\n var numRequests = syncPoint ? 1 : 2;\n var requestTimeEstimate = Playlist.estimateSegmentRequestTime(segmentDuration, bandwidth, playlist);\n var rebufferingImpact = requestTimeEstimate * numRequests - timeUntilRebuffer;\n return {\n playlist: playlist,\n rebufferingImpact: rebufferingImpact\n };\n });\n var noRebufferingPlaylists = rebufferingEstimates.filter(function (estimate) {\n return estimate.rebufferingImpact <= 0;\n }); // Sort by bandwidth DESC\n\n stableSort(noRebufferingPlaylists, function (a, b) {\n return comparePlaylistBandwidth(b.playlist, a.playlist);\n });\n if (noRebufferingPlaylists.length) {\n return noRebufferingPlaylists[0];\n }\n stableSort(rebufferingEstimates, function (a, b) {\n return a.rebufferingImpact - b.rebufferingImpact;\n });\n return rebufferingEstimates[0] || null;\n};\n/**\n * Chooses the appropriate media playlist, which in this case is the lowest bitrate\n * one with video. If no renditions with video exist, return the lowest audio rendition.\n *\n * Expects to be called within the context of an instance of VhsHandler\n *\n * @return {Object|null}\n * {Object} return.playlist\n * The lowest bitrate playlist that contains a video codec. If no such rendition\n * exists pick the lowest audio rendition.\n */\n\nvar lowestBitrateCompatibleVariantSelector = function lowestBitrateCompatibleVariantSelector() {\n var _this149 = this;\n // filter out any playlists that have been excluded due to\n // incompatible configurations or playback errors\n var playlists = this.playlists.main.playlists.filter(Playlist.isEnabled); // Sort ascending by bitrate\n\n stableSort(playlists, function (a, b) {\n return comparePlaylistBandwidth(a, b);\n }); // Parse and assume that playlists with no video codec have no video\n // (this is not necessarily true, although it is generally true).\n //\n // If an entire manifest has no valid videos everything will get filtered\n // out.\n\n var playlistsWithVideo = playlists.filter(function (playlist) {\n return !!codecsForPlaylist(_this149.playlists.main, playlist).video;\n });\n return playlistsWithVideo[0] || null;\n};\n\n/**\n * Combine all segments into a single Uint8Array\n *\n * @param {Object} segmentObj\n * @return {Uint8Array} concatenated bytes\n * @private\n */\nvar concatSegments = function concatSegments(segmentObj) {\n var offset = 0;\n var tempBuffer;\n if (segmentObj.bytes) {\n tempBuffer = new Uint8Array(segmentObj.bytes); // combine the individual segments into one large typed-array\n\n segmentObj.segments.forEach(function (segment) {\n tempBuffer.set(segment, offset);\n offset += segment.byteLength;\n });\n }\n return tempBuffer;\n};\n\n/**\n * @file text-tracks.js\n */\n/**\n * Create captions text tracks on video.js if they do not exist\n *\n * @param {Object} inbandTextTracks a reference to current inbandTextTracks\n * @param {Object} tech the video.js tech\n * @param {Object} captionStream the caption stream to create\n * @private\n */\n\nvar createCaptionsTrackIfNotExists = function createCaptionsTrackIfNotExists(inbandTextTracks, tech, captionStream) {\n if (!inbandTextTracks[captionStream]) {\n tech.trigger({\n type: 'usage',\n name: 'vhs-608'\n });\n var instreamId = captionStream; // we need to translate SERVICEn for 708 to how mux.js currently labels them\n\n if (/^cc708_/.test(captionStream)) {\n instreamId = 'SERVICE' + captionStream.split('_')[1];\n }\n var track = tech.textTracks().getTrackById(instreamId);\n if (track) {\n // Resuse an existing track with a CC# id because this was\n // very likely created by videojs-contrib-hls from information\n // in the m3u8 for us to use\n inbandTextTracks[captionStream] = track;\n } else {\n // This section gets called when we have caption services that aren't specified in the manifest.\n // Manifest level caption services are handled in media-groups.js under CLOSED-CAPTIONS.\n var captionServices = tech.options_.vhs && tech.options_.vhs.captionServices || {};\n var label = captionStream;\n var language = captionStream;\n var def = false;\n var captionService = captionServices[instreamId];\n if (captionService) {\n label = captionService.label;\n language = captionService.language;\n def = captionService[\"default\"];\n } // Otherwise, create a track with the default `CC#` label and\n // without a language\n\n inbandTextTracks[captionStream] = tech.addRemoteTextTrack({\n kind: 'captions',\n id: instreamId,\n // TODO: investigate why this doesn't seem to turn the caption on by default\n \"default\": def,\n label: label,\n language: language\n }, false).track;\n }\n }\n};\n/**\n * Add caption text track data to a source handler given an array of captions\n *\n * @param {Object}\n * @param {Object} inbandTextTracks the inband text tracks\n * @param {number} timestampOffset the timestamp offset of the source buffer\n * @param {Array} captionArray an array of caption data\n * @private\n */\n\nvar addCaptionData = function addCaptionData(_ref46) {\n var inbandTextTracks = _ref46.inbandTextTracks,\n captionArray = _ref46.captionArray,\n timestampOffset = _ref46.timestampOffset;\n if (!captionArray) {\n return;\n }\n var Cue = window$1.WebKitDataCue || window$1.VTTCue;\n captionArray.forEach(function (caption) {\n var track = caption.stream; // in CEA 608 captions, video.js/mux.js sends a content array\n // with positioning data\n\n if (caption.content) {\n caption.content.forEach(function (value) {\n var cue = new Cue(caption.startTime + timestampOffset, caption.endTime + timestampOffset, value.text);\n cue.line = value.line;\n cue.align = 'left';\n cue.position = value.position;\n cue.positionAlign = 'line-left';\n inbandTextTracks[track].addCue(cue);\n });\n } else {\n // otherwise, a text value with combined captions is sent\n inbandTextTracks[track].addCue(new Cue(caption.startTime + timestampOffset, caption.endTime + timestampOffset, caption.text));\n }\n });\n};\n/**\n * Define properties on a cue for backwards compatability,\n * but warn the user that the way that they are using it\n * is depricated and will be removed at a later date.\n *\n * @param {Cue} cue the cue to add the properties on\n * @private\n */\n\nvar deprecateOldCue = function deprecateOldCue(cue) {\n Object.defineProperties(cue.frame, {\n id: {\n get: function get() {\n videojs.log.warn('cue.frame.id is deprecated. Use cue.value.key instead.');\n return cue.value.key;\n }\n },\n value: {\n get: function get() {\n videojs.log.warn('cue.frame.value is deprecated. Use cue.value.data instead.');\n return cue.value.data;\n }\n },\n privateData: {\n get: function get() {\n videojs.log.warn('cue.frame.privateData is deprecated. Use cue.value.data instead.');\n return cue.value.data;\n }\n }\n });\n};\n/**\n * Add metadata text track data to a source handler given an array of metadata\n *\n * @param {Object}\n * @param {Object} inbandTextTracks the inband text tracks\n * @param {Array} metadataArray an array of meta data\n * @param {number} timestampOffset the timestamp offset of the source buffer\n * @param {number} videoDuration the duration of the video\n * @private\n */\n\nvar addMetadata = function addMetadata(_ref47) {\n var inbandTextTracks = _ref47.inbandTextTracks,\n metadataArray = _ref47.metadataArray,\n timestampOffset = _ref47.timestampOffset,\n videoDuration = _ref47.videoDuration;\n if (!metadataArray) {\n return;\n }\n var Cue = window$1.WebKitDataCue || window$1.VTTCue;\n var metadataTrack = inbandTextTracks.metadataTrack_;\n if (!metadataTrack) {\n return;\n }\n metadataArray.forEach(function (metadata) {\n var time = metadata.cueTime + timestampOffset; // if time isn't a finite number between 0 and Infinity, like NaN,\n // ignore this bit of metadata.\n // This likely occurs when you have an non-timed ID3 tag like TIT2,\n // which is the \"Title/Songname/Content description\" frame\n\n if (typeof time !== 'number' || window$1.isNaN(time) || time < 0 || !(time < Infinity)) {\n return;\n } // If we have no frames, we can't create a cue.\n\n if (!metadata.frames || !metadata.frames.length) {\n return;\n }\n metadata.frames.forEach(function (frame) {\n var cue = new Cue(time, time, frame.value || frame.url || frame.data || '');\n cue.frame = frame;\n cue.value = frame;\n deprecateOldCue(cue);\n metadataTrack.addCue(cue);\n });\n });\n if (!metadataTrack.cues || !metadataTrack.cues.length) {\n return;\n } // Updating the metadeta cues so that\n // the endTime of each cue is the startTime of the next cue\n // the endTime of last cue is the duration of the video\n\n var cues = metadataTrack.cues;\n var cuesArray = []; // Create a copy of the TextTrackCueList...\n // ...disregarding cues with a falsey value\n\n for (var _i98 = 0; _i98 < cues.length; _i98++) {\n if (cues[_i98]) {\n cuesArray.push(cues[_i98]);\n }\n } // Group cues by their startTime value\n\n var cuesGroupedByStartTime = cuesArray.reduce(function (obj, cue) {\n var timeSlot = obj[cue.startTime] || [];\n timeSlot.push(cue);\n obj[cue.startTime] = timeSlot;\n return obj;\n }, {}); // Sort startTimes by ascending order\n\n var sortedStartTimes = Object.keys(cuesGroupedByStartTime).sort(function (a, b) {\n return Number(a) - Number(b);\n }); // Map each cue group's endTime to the next group's startTime\n\n sortedStartTimes.forEach(function (startTime, idx) {\n var cueGroup = cuesGroupedByStartTime[startTime];\n var finiteDuration = isFinite(videoDuration) ? videoDuration : 0;\n var nextTime = Number(sortedStartTimes[idx + 1]) || finiteDuration; // Map each cue's endTime the next group's startTime\n\n cueGroup.forEach(function (cue) {\n cue.endTime = nextTime;\n });\n });\n}; // object for mapping daterange attributes\n\nvar dateRangeAttr = {\n id: 'ID',\n \"class\": 'CLASS',\n startDate: 'START-DATE',\n duration: 'DURATION',\n endDate: 'END-DATE',\n endOnNext: 'END-ON-NEXT',\n plannedDuration: 'PLANNED-DURATION',\n scte35Out: 'SCTE35-OUT',\n scte35In: 'SCTE35-IN'\n};\nvar dateRangeKeysToOmit = new Set(['id', 'class', 'startDate', 'duration', 'endDate', 'endOnNext', 'startTime', 'endTime', 'processDateRange']);\n/**\n * Add DateRange metadata text track to a source handler given an array of metadata\n *\n * @param {Object}\n * @param {Object} inbandTextTracks the inband text tracks\n * @param {Array} dateRanges parsed media playlist\n * @private\n */\n\nvar addDateRangeMetadata = function addDateRangeMetadata(_ref48) {\n var inbandTextTracks = _ref48.inbandTextTracks,\n dateRanges = _ref48.dateRanges;\n var metadataTrack = inbandTextTracks.metadataTrack_;\n if (!metadataTrack) {\n return;\n }\n var Cue = window$1.WebKitDataCue || window$1.VTTCue;\n dateRanges.forEach(function (dateRange) {\n // we generate multiple cues for each date range with different attributes\n for (var _i99 = 0, _Object$keys = Object.keys(dateRange); _i99 < _Object$keys.length; _i99++) {\n var key = _Object$keys[_i99];\n if (dateRangeKeysToOmit.has(key)) {\n continue;\n }\n var cue = new Cue(dateRange.startTime, dateRange.endTime, '');\n cue.id = dateRange.id;\n cue.type = 'com.apple.quicktime.HLS';\n cue.value = {\n key: dateRangeAttr[key],\n data: dateRange[key]\n };\n if (key === 'scte35Out' || key === 'scte35In') {\n cue.value.data = new Uint8Array(cue.value.data.match(/[\\da-f]{2}/gi)).buffer;\n }\n metadataTrack.addCue(cue);\n }\n dateRange.processDateRange();\n });\n};\n/**\n * Create metadata text track on video.js if it does not exist\n *\n * @param {Object} inbandTextTracks a reference to current inbandTextTracks\n * @param {string} dispatchType the inband metadata track dispatch type\n * @param {Object} tech the video.js tech\n * @private\n */\n\nvar createMetadataTrackIfNotExists = function createMetadataTrackIfNotExists(inbandTextTracks, dispatchType, tech) {\n if (inbandTextTracks.metadataTrack_) {\n return;\n }\n inbandTextTracks.metadataTrack_ = tech.addRemoteTextTrack({\n kind: 'metadata',\n label: 'Timed Metadata'\n }, false).track;\n if (!videojs.browser.IS_ANY_SAFARI) {\n inbandTextTracks.metadataTrack_.inBandMetadataTrackDispatchType = dispatchType;\n }\n};\n/**\n * Remove cues from a track on video.js.\n *\n * @param {Double} start start of where we should remove the cue\n * @param {Double} end end of where the we should remove the cue\n * @param {Object} track the text track to remove the cues from\n * @private\n */\n\nvar removeCuesFromTrack = function removeCuesFromTrack(start, end, track) {\n var i;\n var cue;\n if (!track) {\n return;\n }\n if (!track.cues) {\n return;\n }\n i = track.cues.length;\n while (i--) {\n cue = track.cues[i]; // Remove any cue within the provided start and end time\n\n if (cue.startTime >= start && cue.endTime <= end) {\n track.removeCue(cue);\n }\n }\n};\n/**\n * Remove duplicate cues from a track on video.js (a cue is considered a\n * duplicate if it has the same time interval and text as another)\n *\n * @param {Object} track the text track to remove the duplicate cues from\n * @private\n */\n\nvar removeDuplicateCuesFromTrack = function removeDuplicateCuesFromTrack(track) {\n var cues = track.cues;\n if (!cues) {\n return;\n }\n var uniqueCues = {};\n for (var _i100 = cues.length - 1; _i100 >= 0; _i100--) {\n var cue = cues[_i100];\n var cueKey = \"\".concat(cue.startTime, \"-\").concat(cue.endTime, \"-\").concat(cue.text);\n if (uniqueCues[cueKey]) {\n track.removeCue(cue);\n } else {\n uniqueCues[cueKey] = cue;\n }\n }\n};\n\n/**\n * Returns a list of gops in the buffer that have a pts value of 3 seconds or more in\n * front of current time.\n *\n * @param {Array} buffer\n * The current buffer of gop information\n * @param {number} currentTime\n * The current time\n * @param {Double} mapping\n * Offset to map display time to stream presentation time\n * @return {Array}\n * List of gops considered safe to append over\n */\n\nvar gopsSafeToAlignWith = function gopsSafeToAlignWith(buffer, currentTime, mapping) {\n if (typeof currentTime === 'undefined' || currentTime === null || !buffer.length) {\n return [];\n } // pts value for current time + 3 seconds to give a bit more wiggle room\n\n var currentTimePts = Math.ceil((currentTime - mapping + 3) * ONE_SECOND_IN_TS);\n var i;\n for (i = 0; i < buffer.length; i++) {\n if (buffer[i].pts > currentTimePts) {\n break;\n }\n }\n return buffer.slice(i);\n};\n/**\n * Appends gop information (timing and byteLength) received by the transmuxer for the\n * gops appended in the last call to appendBuffer\n *\n * @param {Array} buffer\n * The current buffer of gop information\n * @param {Array} gops\n * List of new gop information\n * @param {boolean} replace\n * If true, replace the buffer with the new gop information. If false, append the\n * new gop information to the buffer in the right location of time.\n * @return {Array}\n * Updated list of gop information\n */\n\nvar updateGopBuffer = function updateGopBuffer(buffer, gops, replace) {\n if (!gops.length) {\n return buffer;\n }\n if (replace) {\n // If we are in safe append mode, then completely overwrite the gop buffer\n // with the most recent appeneded data. This will make sure that when appending\n // future segments, we only try to align with gops that are both ahead of current\n // time and in the last segment appended.\n return gops.slice();\n }\n var start = gops[0].pts;\n var i = 0;\n for (i; i < buffer.length; i++) {\n if (buffer[i].pts >= start) {\n break;\n }\n }\n return buffer.slice(0, i).concat(gops);\n};\n/**\n * Removes gop information in buffer that overlaps with provided start and end\n *\n * @param {Array} buffer\n * The current buffer of gop information\n * @param {Double} start\n * position to start the remove at\n * @param {Double} end\n * position to end the remove at\n * @param {Double} mapping\n * Offset to map display time to stream presentation time\n */\n\nvar removeGopBuffer = function removeGopBuffer(buffer, start, end, mapping) {\n var startPts = Math.ceil((start - mapping) * ONE_SECOND_IN_TS);\n var endPts = Math.ceil((end - mapping) * ONE_SECOND_IN_TS);\n var updatedBuffer = buffer.slice();\n var i = buffer.length;\n while (i--) {\n if (buffer[i].pts <= endPts) {\n break;\n }\n }\n if (i === -1) {\n // no removal because end of remove range is before start of buffer\n return updatedBuffer;\n }\n var j = i + 1;\n while (j--) {\n if (buffer[j].pts <= startPts) {\n break;\n }\n } // clamp remove range start to 0 index\n\n j = Math.max(j, 0);\n updatedBuffer.splice(j, i - j + 1);\n return updatedBuffer;\n};\nvar shallowEqual = function shallowEqual(a, b) {\n // if both are undefined\n // or one or the other is undefined\n // they are not equal\n if (!a && !b || !a && b || a && !b) {\n return false;\n } // they are the same object and thus, equal\n\n if (a === b) {\n return true;\n } // sort keys so we can make sure they have\n // all the same keys later.\n\n var akeys = Object.keys(a).sort();\n var bkeys = Object.keys(b).sort(); // different number of keys, not equal\n\n if (akeys.length !== bkeys.length) {\n return false;\n }\n for (var _i101 = 0; _i101 < akeys.length; _i101++) {\n var key = akeys[_i101]; // different sorted keys, not equal\n\n if (key !== bkeys[_i101]) {\n return false;\n } // different values, not equal\n\n if (a[key] !== b[key]) {\n return false;\n }\n }\n return true;\n};\n\n// https://www.w3.org/TR/WebIDL-1/#quotaexceedederror\nvar QUOTA_EXCEEDED_ERR = 22;\n\n/**\n * The segment loader has no recourse except to fetch a segment in the\n * current playlist and use the internal timestamps in that segment to\n * generate a syncPoint. This function returns a good candidate index\n * for that process.\n *\n * @param {Array} segments - the segments array from a playlist.\n * @return {number} An index of a segment from the playlist to load\n */\n\nvar getSyncSegmentCandidate = function getSyncSegmentCandidate(currentTimeline, segments, targetTime) {\n segments = segments || [];\n var timelineSegments = [];\n var time = 0;\n for (var _i102 = 0; _i102 < segments.length; _i102++) {\n var segment = segments[_i102];\n if (currentTimeline === segment.timeline) {\n timelineSegments.push(_i102);\n time += segment.duration;\n if (time > targetTime) {\n return _i102;\n }\n }\n }\n if (timelineSegments.length === 0) {\n return 0;\n } // default to the last timeline segment\n\n return timelineSegments[timelineSegments.length - 1];\n}; // In the event of a quota exceeded error, keep at least one second of back buffer. This\n// number was arbitrarily chosen and may be updated in the future, but seemed reasonable\n// as a start to prevent any potential issues with removing content too close to the\n// playhead.\n\nvar MIN_BACK_BUFFER = 1; // in ms\n\nvar CHECK_BUFFER_DELAY = 500;\nvar finite = function finite(num) {\n return typeof num === 'number' && isFinite(num);\n}; // With most content hovering around 30fps, if a segment has a duration less than a half\n// frame at 30fps or one frame at 60fps, the bandwidth and throughput calculations will\n// not accurately reflect the rest of the content.\n\nvar MIN_SEGMENT_DURATION_TO_SAVE_STATS = 1 / 60;\nvar illegalMediaSwitch = function illegalMediaSwitch(loaderType, startingMedia, trackInfo) {\n // Although these checks should most likely cover non 'main' types, for now it narrows\n // the scope of our checks.\n if (loaderType !== 'main' || !startingMedia || !trackInfo) {\n return null;\n }\n if (!trackInfo.hasAudio && !trackInfo.hasVideo) {\n return 'Neither audio nor video found in segment.';\n }\n if (startingMedia.hasVideo && !trackInfo.hasVideo) {\n return 'Only audio found in segment when we expected video.' + ' We can\\'t switch to audio only from a stream that had video.' + ' To get rid of this message, please add codec information to the manifest.';\n }\n if (!startingMedia.hasVideo && trackInfo.hasVideo) {\n return 'Video found in segment when we expected only audio.' + ' We can\\'t switch to a stream with video from an audio only stream.' + ' To get rid of this message, please add codec information to the manifest.';\n }\n return null;\n};\n/**\n * Calculates a time value that is safe to remove from the back buffer without interrupting\n * playback.\n *\n * @param {TimeRange} seekable\n * The current seekable range\n * @param {number} currentTime\n * The current time of the player\n * @param {number} targetDuration\n * The target duration of the current playlist\n * @return {number}\n * Time that is safe to remove from the back buffer without interrupting playback\n */\n\nvar safeBackBufferTrimTime = function safeBackBufferTrimTime(seekable, currentTime, targetDuration) {\n // 30 seconds before the playhead provides a safe default for trimming.\n //\n // Choosing a reasonable default is particularly important for high bitrate content and\n // VOD videos/live streams with large windows, as the buffer may end up overfilled and\n // throw an APPEND_BUFFER_ERR.\n var trimTime = currentTime - Config.BACK_BUFFER_LENGTH;\n if (seekable.length) {\n // Some live playlists may have a shorter window of content than the full allowed back\n // buffer. For these playlists, don't save content that's no longer within the window.\n trimTime = Math.max(trimTime, seekable.start(0));\n } // Don't remove within target duration of the current time to avoid the possibility of\n // removing the GOP currently being played, as removing it can cause playback stalls.\n\n var maxTrimTime = currentTime - targetDuration;\n return Math.min(maxTrimTime, trimTime);\n};\nvar segmentInfoString = function segmentInfoString(segmentInfo) {\n var startOfSegment = segmentInfo.startOfSegment,\n duration = segmentInfo.duration,\n segment = segmentInfo.segment,\n part = segmentInfo.part,\n _segmentInfo$playlist = segmentInfo.playlist,\n seq = _segmentInfo$playlist.mediaSequence,\n id = _segmentInfo$playlist.id,\n _segmentInfo$playlist2 = _segmentInfo$playlist.segments,\n segments = _segmentInfo$playlist2 === void 0 ? [] : _segmentInfo$playlist2,\n index = segmentInfo.mediaIndex,\n partIndex = segmentInfo.partIndex,\n timeline = segmentInfo.timeline;\n var segmentLen = segments.length - 1;\n var selection = 'mediaIndex/partIndex increment';\n if (segmentInfo.getMediaInfoForTime) {\n selection = \"getMediaInfoForTime (\".concat(segmentInfo.getMediaInfoForTime, \")\");\n } else if (segmentInfo.isSyncRequest) {\n selection = 'getSyncSegmentCandidate (isSyncRequest)';\n }\n if (segmentInfo.independent) {\n selection += \" with independent \".concat(segmentInfo.independent);\n }\n var hasPartIndex = typeof partIndex === 'number';\n var name = segmentInfo.segment.uri ? 'segment' : 'pre-segment';\n var zeroBasedPartCount = hasPartIndex ? getKnownPartCount({\n preloadSegment: segment\n }) - 1 : 0;\n return \"\".concat(name, \" [\").concat(seq + index, \"/\").concat(seq + segmentLen, \"]\") + (hasPartIndex ? \" part [\".concat(partIndex, \"/\").concat(zeroBasedPartCount, \"]\") : '') + \" segment start/end [\".concat(segment.start, \" => \").concat(segment.end, \"]\") + (hasPartIndex ? \" part start/end [\".concat(part.start, \" => \").concat(part.end, \"]\") : '') + \" startOfSegment [\".concat(startOfSegment, \"]\") + \" duration [\".concat(duration, \"]\") + \" timeline [\".concat(timeline, \"]\") + \" selected by [\".concat(selection, \"]\") + \" playlist [\".concat(id, \"]\");\n};\nvar timingInfoPropertyForMedia = function timingInfoPropertyForMedia(mediaType) {\n return \"\".concat(mediaType, \"TimingInfo\");\n};\nvar getBufferedEndOrFallback = function getBufferedEndOrFallback(buffered, fallback) {\n return buffered.length ? buffered.end(buffered.length - 1) : fallback;\n};\n/**\n * Returns the timestamp offset to use for the segment.\n *\n * @param {number} segmentTimeline\n * The timeline of the segment\n * @param {number} currentTimeline\n * The timeline currently being followed by the loader\n * @param {number} startOfSegment\n * The estimated segment start\n * @param {TimeRange[]} buffered\n * The loader's buffer\n * @param {boolean} calculateTimestampOffsetForEachSegment\n * Feature flag to always calculate timestampOffset\n * @param {boolean} overrideCheck\n * If true, no checks are made to see if the timestamp offset value should be set,\n * but sets it directly to a value.\n *\n * @return {number|null}\n * Either a number representing a new timestamp offset, or null if the segment is\n * part of the same timeline\n */\n\nvar timestampOffsetForSegment = function timestampOffsetForSegment(_ref49) {\n var segmentTimeline = _ref49.segmentTimeline,\n currentTimeline = _ref49.currentTimeline,\n startOfSegment = _ref49.startOfSegment,\n buffered = _ref49.buffered,\n calculateTimestampOffsetForEachSegment = _ref49.calculateTimestampOffsetForEachSegment,\n overrideCheck = _ref49.overrideCheck;\n if (calculateTimestampOffsetForEachSegment) {\n return getBufferedEndOrFallback(buffered, startOfSegment);\n } // Check to see if we are crossing a discontinuity to see if we need to set the\n // timestamp offset on the transmuxer and source buffer.\n //\n // Previously, we changed the timestampOffset if the start of this segment was less than\n // the currently set timestampOffset, but this isn't desirable as it can produce bad\n // behavior, especially around long running live streams.\n\n if (!overrideCheck && segmentTimeline === currentTimeline) {\n return null;\n } // When changing renditions, it's possible to request a segment on an older timeline. For\n // instance, given two renditions with the following:\n //\n // #EXTINF:10\n // segment1\n // #EXT-X-DISCONTINUITY\n // #EXTINF:10\n // segment2\n // #EXTINF:10\n // segment3\n //\n // And the current player state:\n //\n // current time: 8\n // buffer: 0 => 20\n //\n // The next segment on the current rendition would be segment3, filling the buffer from\n // 20s onwards. However, if a rendition switch happens after segment2 was requested,\n // then the next segment to be requested will be segment1 from the new rendition in\n // order to fill time 8 and onwards. Using the buffered end would result in repeated\n // content (since it would position segment1 of the new rendition starting at 20s). This\n // case can be identified when the new segment's timeline is a prior value. Instead of\n // using the buffered end, the startOfSegment can be used, which, hopefully, will be\n // more accurate to the actual start time of the segment.\n\n if (segmentTimeline < currentTimeline) {\n return startOfSegment;\n } // segmentInfo.startOfSegment used to be used as the timestamp offset, however, that\n // value uses the end of the last segment if it is available. While this value\n // should often be correct, it's better to rely on the buffered end, as the new\n // content post discontinuity should line up with the buffered end as if it were\n // time 0 for the new content.\n\n return getBufferedEndOrFallback(buffered, startOfSegment);\n};\n/**\n * Returns whether or not the loader should wait for a timeline change from the timeline\n * change controller before processing the segment.\n *\n * Primary timing in VHS goes by video. This is different from most media players, as\n * audio is more often used as the primary timing source. For the foreseeable future, VHS\n * will continue to use video as the primary timing source, due to the current logic and\n * expectations built around it.\n\n * Since the timing follows video, in order to maintain sync, the video loader is\n * responsible for setting both audio and video source buffer timestamp offsets.\n *\n * Setting different values for audio and video source buffers could lead to\n * desyncing. The following examples demonstrate some of the situations where this\n * distinction is important. Note that all of these cases involve demuxed content. When\n * content is muxed, the audio and video are packaged together, therefore syncing\n * separate media playlists is not an issue.\n *\n * CASE 1: Audio prepares to load a new timeline before video:\n *\n * Timeline: 0 1\n * Audio Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n * Audio Loader: ^\n * Video Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n * Video Loader ^\n *\n * In the above example, the audio loader is preparing to load the 6th segment, the first\n * after a discontinuity, while the video loader is still loading the 5th segment, before\n * the discontinuity.\n *\n * If the audio loader goes ahead and loads and appends the 6th segment before the video\n * loader crosses the discontinuity, then when appended, the 6th audio segment will use\n * the timestamp offset from timeline 0. This will likely lead to desyncing. In addition,\n * the audio loader must provide the audioAppendStart value to trim the content in the\n * transmuxer, and that value relies on the audio timestamp offset. Since the audio\n * timestamp offset is set by the video (main) loader, the audio loader shouldn't load the\n * segment until that value is provided.\n *\n * CASE 2: Video prepares to load a new timeline before audio:\n *\n * Timeline: 0 1\n * Audio Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n * Audio Loader: ^\n * Video Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n * Video Loader ^\n *\n * In the above example, the video loader is preparing to load the 6th segment, the first\n * after a discontinuity, while the audio loader is still loading the 5th segment, before\n * the discontinuity.\n *\n * If the video loader goes ahead and loads and appends the 6th segment, then once the\n * segment is loaded and processed, both the video and audio timestamp offsets will be\n * set, since video is used as the primary timing source. This is to ensure content lines\n * up appropriately, as any modifications to the video timing are reflected by audio when\n * the video loader sets the audio and video timestamp offsets to the same value. However,\n * setting the timestamp offset for audio before audio has had a chance to change\n * timelines will likely lead to desyncing, as the audio loader will append segment 5 with\n * a timestamp intended to apply to segments from timeline 1 rather than timeline 0.\n *\n * CASE 3: When seeking, audio prepares to load a new timeline before video\n *\n * Timeline: 0 1\n * Audio Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n * Audio Loader: ^\n * Video Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n * Video Loader ^\n *\n * In the above example, both audio and video loaders are loading segments from timeline\n * 0, but imagine that the seek originated from timeline 1.\n *\n * When seeking to a new timeline, the timestamp offset will be set based on the expected\n * segment start of the loaded video segment. In order to maintain sync, the audio loader\n * must wait for the video loader to load its segment and update both the audio and video\n * timestamp offsets before it may load and append its own segment. This is the case\n * whether the seek results in a mismatched segment request (e.g., the audio loader\n * chooses to load segment 3 and the video loader chooses to load segment 4) or the\n * loaders choose to load the same segment index from each playlist, as the segments may\n * not be aligned perfectly, even for matching segment indexes.\n *\n * @param {Object} timelinechangeController\n * @param {number} currentTimeline\n * The timeline currently being followed by the loader\n * @param {number} segmentTimeline\n * The timeline of the segment being loaded\n * @param {('main'|'audio')} loaderType\n * The loader type\n * @param {boolean} audioDisabled\n * Whether the audio is disabled for the loader. This should only be true when the\n * loader may have muxed audio in its segment, but should not append it, e.g., for\n * the main loader when an alternate audio playlist is active.\n *\n * @return {boolean}\n * Whether the loader should wait for a timeline change from the timeline change\n * controller before processing the segment\n */\n\nvar shouldWaitForTimelineChange = function shouldWaitForTimelineChange(_ref50) {\n var timelineChangeController = _ref50.timelineChangeController,\n currentTimeline = _ref50.currentTimeline,\n segmentTimeline = _ref50.segmentTimeline,\n loaderType = _ref50.loaderType,\n audioDisabled = _ref50.audioDisabled;\n if (currentTimeline === segmentTimeline) {\n return false;\n }\n if (loaderType === 'audio') {\n var lastMainTimelineChange = timelineChangeController.lastTimelineChange({\n type: 'main'\n }); // Audio loader should wait if:\n //\n // * main hasn't had a timeline change yet (thus has not loaded its first segment)\n // * main hasn't yet changed to the timeline audio is looking to load\n\n return !lastMainTimelineChange || lastMainTimelineChange.to !== segmentTimeline;\n } // The main loader only needs to wait for timeline changes if there's demuxed audio.\n // Otherwise, there's nothing to wait for, since audio would be muxed into the main\n // loader's segments (or the content is audio/video only and handled by the main\n // loader).\n\n if (loaderType === 'main' && audioDisabled) {\n var pendingAudioTimelineChange = timelineChangeController.pendingTimelineChange({\n type: 'audio'\n }); // Main loader should wait for the audio loader if audio is not pending a timeline\n // change to the current timeline.\n //\n // Since the main loader is responsible for setting the timestamp offset for both\n // audio and video, the main loader must wait for audio to be about to change to its\n // timeline before setting the offset, otherwise, if audio is behind in loading,\n // segments from the previous timeline would be adjusted by the new timestamp offset.\n //\n // This requirement means that video will not cross a timeline until the audio is\n // about to cross to it, so that way audio and video will always cross the timeline\n // together.\n //\n // In addition to normal timeline changes, these rules also apply to the start of a\n // stream (going from a non-existent timeline, -1, to timeline 0). It's important\n // that these rules apply to the first timeline change because if they did not, it's\n // possible that the main loader will cross two timelines before the audio loader has\n // crossed one. Logic may be implemented to handle the startup as a special case, but\n // it's easier to simply treat all timeline changes the same.\n\n if (pendingAudioTimelineChange && pendingAudioTimelineChange.to === segmentTimeline) {\n return false;\n }\n return true;\n }\n return false;\n};\nvar mediaDuration = function mediaDuration(timingInfos) {\n var maxDuration = 0;\n ['video', 'audio'].forEach(function (type) {\n var typeTimingInfo = timingInfos[\"\".concat(type, \"TimingInfo\")];\n if (!typeTimingInfo) {\n return;\n }\n var start = typeTimingInfo.start,\n end = typeTimingInfo.end;\n var duration;\n if (typeof start === 'bigint' || typeof end === 'bigint') {\n duration = window$1.BigInt(end) - window$1.BigInt(start);\n } else if (typeof start === 'number' && typeof end === 'number') {\n duration = end - start;\n }\n if (typeof duration !== 'undefined' && duration > maxDuration) {\n maxDuration = duration;\n }\n }); // convert back to a number if it is lower than MAX_SAFE_INTEGER\n // as we only need BigInt when we are above that.\n\n if (typeof maxDuration === 'bigint' && maxDuration < Number.MAX_SAFE_INTEGER) {\n maxDuration = Number(maxDuration);\n }\n return maxDuration;\n};\nvar segmentTooLong = function segmentTooLong(_ref51) {\n var segmentDuration = _ref51.segmentDuration,\n maxDuration = _ref51.maxDuration;\n // 0 duration segments are most likely due to metadata only segments or a lack of\n // information.\n if (!segmentDuration) {\n return false;\n } // For HLS:\n //\n // https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1\n // The EXTINF duration of each Media Segment in the Playlist\n // file, when rounded to the nearest integer, MUST be less than or equal\n // to the target duration; longer segments can trigger playback stalls\n // or other errors.\n //\n // For DASH, the mpd-parser uses the largest reported segment duration as the target\n // duration. Although that reported duration is occasionally approximate (i.e., not\n // exact), a strict check may report that a segment is too long more often in DASH.\n\n return Math.round(segmentDuration) > maxDuration + TIME_FUDGE_FACTOR;\n};\nvar getTroublesomeSegmentDurationMessage = function getTroublesomeSegmentDurationMessage(segmentInfo, sourceType) {\n // Right now we aren't following DASH's timing model exactly, so only perform\n // this check for HLS content.\n if (sourceType !== 'hls') {\n return null;\n }\n var segmentDuration = mediaDuration({\n audioTimingInfo: segmentInfo.audioTimingInfo,\n videoTimingInfo: segmentInfo.videoTimingInfo\n }); // Don't report if we lack information.\n //\n // If the segment has a duration of 0 it is either a lack of information or a\n // metadata only segment and shouldn't be reported here.\n\n if (!segmentDuration) {\n return null;\n }\n var targetDuration = segmentInfo.playlist.targetDuration;\n var isSegmentWayTooLong = segmentTooLong({\n segmentDuration: segmentDuration,\n maxDuration: targetDuration * 2\n });\n var isSegmentSlightlyTooLong = segmentTooLong({\n segmentDuration: segmentDuration,\n maxDuration: targetDuration\n });\n var segmentTooLongMessage = \"Segment with index \".concat(segmentInfo.mediaIndex, \" \") + \"from playlist \".concat(segmentInfo.playlist.id, \" \") + \"has a duration of \".concat(segmentDuration, \" \") + \"when the reported duration is \".concat(segmentInfo.duration, \" \") + \"and the target duration is \".concat(targetDuration, \". \") + 'For HLS content, a duration in excess of the target duration may result in ' + 'playback issues. See the HLS specification section on EXT-X-TARGETDURATION for ' + 'more details: ' + 'https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1';\n if (isSegmentWayTooLong || isSegmentSlightlyTooLong) {\n return {\n severity: isSegmentWayTooLong ? 'warn' : 'info',\n message: segmentTooLongMessage\n };\n }\n return null;\n};\n/**\n * An object that manages segment loading and appending.\n *\n * @class SegmentLoader\n * @param {Object} options required and optional options\n * @extends videojs.EventTarget\n */\nvar SegmentLoader = /*#__PURE__*/function (_videojs$EventTarget2) {\n _inherits(SegmentLoader, _videojs$EventTarget2);\n var _super78 = _createSuper(SegmentLoader);\n function SegmentLoader(settings) {\n var _this150;\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n _classCallCheck(this, SegmentLoader);\n _this150 = _super78.call(this); // check pre-conditions\n\n if (!settings) {\n throw new TypeError('Initialization settings are required');\n }\n if (typeof settings.currentTime !== 'function') {\n throw new TypeError('No currentTime getter specified');\n }\n if (!settings.mediaSource) {\n throw new TypeError('No MediaSource specified');\n } // public properties\n\n _this150.bandwidth = settings.bandwidth;\n _this150.throughput = {\n rate: 0,\n count: 0\n };\n _this150.roundTrip = NaN;\n _this150.resetStats_();\n _this150.mediaIndex = null;\n _this150.partIndex = null; // private settings\n\n _this150.hasPlayed_ = settings.hasPlayed;\n _this150.currentTime_ = settings.currentTime;\n _this150.seekable_ = settings.seekable;\n _this150.seeking_ = settings.seeking;\n _this150.duration_ = settings.duration;\n _this150.mediaSource_ = settings.mediaSource;\n _this150.vhs_ = settings.vhs;\n _this150.loaderType_ = settings.loaderType;\n _this150.currentMediaInfo_ = void 0;\n _this150.startingMediaInfo_ = void 0;\n _this150.segmentMetadataTrack_ = settings.segmentMetadataTrack;\n _this150.goalBufferLength_ = settings.goalBufferLength;\n _this150.sourceType_ = settings.sourceType;\n _this150.sourceUpdater_ = settings.sourceUpdater;\n _this150.inbandTextTracks_ = settings.inbandTextTracks;\n _this150.state_ = 'INIT';\n _this150.timelineChangeController_ = settings.timelineChangeController;\n _this150.shouldSaveSegmentTimingInfo_ = true;\n _this150.parse708captions_ = settings.parse708captions;\n _this150.useDtsForTimestampOffset_ = settings.useDtsForTimestampOffset;\n _this150.calculateTimestampOffsetForEachSegment_ = settings.calculateTimestampOffsetForEachSegment;\n _this150.captionServices_ = settings.captionServices;\n _this150.exactManifestTimings = settings.exactManifestTimings;\n _this150.addMetadataToTextTrack = settings.addMetadataToTextTrack; // private instance variables\n\n _this150.checkBufferTimeout_ = null;\n _this150.error_ = void 0;\n _this150.currentTimeline_ = -1;\n _this150.pendingSegment_ = null;\n _this150.xhrOptions_ = null;\n _this150.pendingSegments_ = [];\n _this150.audioDisabled_ = false;\n _this150.isPendingTimestampOffset_ = false; // TODO possibly move gopBuffer and timeMapping info to a separate controller\n\n _this150.gopBuffer_ = [];\n _this150.timeMapping_ = 0;\n _this150.safeAppend_ = false;\n _this150.appendInitSegment_ = {\n audio: true,\n video: true\n };\n _this150.playlistOfLastInitSegment_ = {\n audio: null,\n video: null\n };\n _this150.callQueue_ = []; // If the segment loader prepares to load a segment, but does not have enough\n // information yet to start the loading process (e.g., if the audio loader wants to\n // load a segment from the next timeline but the main loader hasn't yet crossed that\n // timeline), then the load call will be added to the queue until it is ready to be\n // processed.\n\n _this150.loadQueue_ = [];\n _this150.metadataQueue_ = {\n id3: [],\n caption: []\n };\n _this150.waitingOnRemove_ = false;\n _this150.quotaExceededErrorRetryTimeout_ = null; // Fragmented mp4 playback\n\n _this150.activeInitSegmentId_ = null;\n _this150.initSegments_ = {}; // HLSe playback\n\n _this150.cacheEncryptionKeys_ = settings.cacheEncryptionKeys;\n _this150.keyCache_ = {};\n _this150.decrypter_ = settings.decrypter; // Manages the tracking and generation of sync-points, mappings\n // between a time in the display time and a segment index within\n // a playlist\n\n _this150.syncController_ = settings.syncController;\n _this150.syncPoint_ = {\n segmentIndex: 0,\n time: 0\n };\n _this150.transmuxer_ = _this150.createTransmuxer_();\n _this150.triggerSyncInfoUpdate_ = function () {\n return _this150.trigger('syncinfoupdate');\n };\n _this150.syncController_.on('syncinfoupdate', _this150.triggerSyncInfoUpdate_);\n _this150.mediaSource_.addEventListener('sourceopen', function () {\n if (!_this150.isEndOfStream_()) {\n _this150.ended_ = false;\n }\n }); // ...for determining the fetch location\n\n _this150.fetchAtBuffer_ = false; // For comparing with currentTime when overwriting segments on fastQualityChange_ changes. Use -1 as the inactive flag.\n\n _this150.replaceSegmentsUntil_ = -1;\n _this150.logger_ = logger(\"SegmentLoader[\".concat(_this150.loaderType_, \"]\"));\n Object.defineProperty(_assertThisInitialized(_this150), 'state', {\n get: function get() {\n return this.state_;\n },\n set: function set(newState) {\n if (newState !== this.state_) {\n this.logger_(\"\".concat(this.state_, \" -> \").concat(newState));\n this.state_ = newState;\n this.trigger('statechange');\n }\n }\n });\n _this150.sourceUpdater_.on('ready', function () {\n if (_this150.hasEnoughInfoToAppend_()) {\n _this150.processCallQueue_();\n }\n }); // Only the main loader needs to listen for pending timeline changes, as the main\n // loader should wait for audio to be ready to change its timeline so that both main\n // and audio timelines change together. For more details, see the\n // shouldWaitForTimelineChange function.\n\n if (_this150.loaderType_ === 'main') {\n _this150.timelineChangeController_.on('pendingtimelinechange', function () {\n if (_this150.hasEnoughInfoToAppend_()) {\n _this150.processCallQueue_();\n }\n });\n } // The main loader only listens on pending timeline changes, but the audio loader,\n // since its loads follow main, needs to listen on timeline changes. For more details,\n // see the shouldWaitForTimelineChange function.\n\n if (_this150.loaderType_ === 'audio') {\n _this150.timelineChangeController_.on('timelinechange', function () {\n if (_this150.hasEnoughInfoToLoad_()) {\n _this150.processLoadQueue_();\n }\n if (_this150.hasEnoughInfoToAppend_()) {\n _this150.processCallQueue_();\n }\n });\n }\n return _this150;\n }\n _createClass(SegmentLoader, [{\n key: \"createTransmuxer_\",\n value: function createTransmuxer_() {\n return segmentTransmuxer.createTransmuxer({\n remux: false,\n alignGopsAtEnd: this.safeAppend_,\n keepOriginalTimestamps: true,\n parse708captions: this.parse708captions_,\n captionServices: this.captionServices_\n });\n }\n /**\n * reset all of our media stats\n *\n * @private\n */\n }, {\n key: \"resetStats_\",\n value: function resetStats_() {\n this.mediaBytesTransferred = 0;\n this.mediaRequests = 0;\n this.mediaRequestsAborted = 0;\n this.mediaRequestsTimedout = 0;\n this.mediaRequestsErrored = 0;\n this.mediaTransferDuration = 0;\n this.mediaSecondsLoaded = 0;\n this.mediaAppends = 0;\n }\n /**\n * dispose of the SegmentLoader and reset to the default state\n */\n }, {\n key: \"dispose\",\n value: function dispose() {\n this.trigger('dispose');\n this.state = 'DISPOSED';\n this.pause();\n this.abort_();\n if (this.transmuxer_) {\n this.transmuxer_.terminate();\n }\n this.resetStats_();\n if (this.checkBufferTimeout_) {\n window$1.clearTimeout(this.checkBufferTimeout_);\n }\n if (this.syncController_ && this.triggerSyncInfoUpdate_) {\n this.syncController_.off('syncinfoupdate', this.triggerSyncInfoUpdate_);\n }\n this.off();\n }\n }, {\n key: \"setAudio\",\n value: function setAudio(enable) {\n this.audioDisabled_ = !enable;\n if (enable) {\n this.appendInitSegment_.audio = true;\n } else {\n // remove current track audio if it gets disabled\n this.sourceUpdater_.removeAudio(0, this.duration_());\n }\n }\n /**\n * abort anything that is currently doing on with the SegmentLoader\n * and reset to a default state\n */\n }, {\n key: \"abort\",\n value: function abort() {\n if (this.state !== 'WAITING') {\n if (this.pendingSegment_) {\n this.pendingSegment_ = null;\n }\n return;\n }\n this.abort_(); // We aborted the requests we were waiting on, so reset the loader's state to READY\n // since we are no longer \"waiting\" on any requests. XHR callback is not always run\n // when the request is aborted. This will prevent the loader from being stuck in the\n // WAITING state indefinitely.\n\n this.state = 'READY'; // don't wait for buffer check timeouts to begin fetching the\n // next segment\n\n if (!this.paused()) {\n this.monitorBuffer_();\n }\n }\n /**\n * abort all pending xhr requests and null any pending segements\n *\n * @private\n */\n }, {\n key: \"abort_\",\n value: function abort_() {\n if (this.pendingSegment_ && this.pendingSegment_.abortRequests) {\n this.pendingSegment_.abortRequests();\n } // clear out the segment being processed\n\n this.pendingSegment_ = null;\n this.callQueue_ = [];\n this.loadQueue_ = [];\n this.metadataQueue_.id3 = [];\n this.metadataQueue_.caption = [];\n this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);\n this.waitingOnRemove_ = false;\n window$1.clearTimeout(this.quotaExceededErrorRetryTimeout_);\n this.quotaExceededErrorRetryTimeout_ = null;\n }\n }, {\n key: \"checkForAbort_\",\n value: function checkForAbort_(requestId) {\n // If the state is APPENDING, then aborts will not modify the state, meaning the first\n // callback that happens should reset the state to READY so that loading can continue.\n if (this.state === 'APPENDING' && !this.pendingSegment_) {\n this.state = 'READY';\n return true;\n }\n if (!this.pendingSegment_ || this.pendingSegment_.requestId !== requestId) {\n return true;\n }\n return false;\n }\n /**\n * set an error on the segment loader and null out any pending segements\n *\n * @param {Error} error the error to set on the SegmentLoader\n * @return {Error} the error that was set or that is currently set\n */\n }, {\n key: \"error\",\n value: function error(_error) {\n if (typeof _error !== 'undefined') {\n this.logger_('error occurred:', _error);\n this.error_ = _error;\n }\n this.pendingSegment_ = null;\n return this.error_;\n }\n }, {\n key: \"endOfStream\",\n value: function endOfStream() {\n this.ended_ = true;\n if (this.transmuxer_) {\n // need to clear out any cached data to prepare for the new segment\n segmentTransmuxer.reset(this.transmuxer_);\n }\n this.gopBuffer_.length = 0;\n this.pause();\n this.trigger('ended');\n }\n /**\n * Indicates which time ranges are buffered\n *\n * @return {TimeRange}\n * TimeRange object representing the current buffered ranges\n */\n }, {\n key: \"buffered_\",\n value: function buffered_() {\n var trackInfo = this.getMediaInfo_();\n if (!this.sourceUpdater_ || !trackInfo) {\n return createTimeRanges();\n }\n if (this.loaderType_ === 'main') {\n var hasAudio = trackInfo.hasAudio,\n hasVideo = trackInfo.hasVideo,\n _isMuxed = trackInfo.isMuxed;\n if (hasVideo && hasAudio && !this.audioDisabled_ && !_isMuxed) {\n return this.sourceUpdater_.buffered();\n }\n if (hasVideo) {\n return this.sourceUpdater_.videoBuffered();\n }\n } // One case that can be ignored for now is audio only with alt audio,\n // as we don't yet have proper support for that.\n\n return this.sourceUpdater_.audioBuffered();\n }\n /**\n * Gets and sets init segment for the provided map\n *\n * @param {Object} map\n * The map object representing the init segment to get or set\n * @param {boolean=} set\n * If true, the init segment for the provided map should be saved\n * @return {Object}\n * map object for desired init segment\n */\n }, {\n key: \"initSegmentForMap\",\n value: function initSegmentForMap(map) {\n var set = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n if (!map) {\n return null;\n }\n var id = initSegmentId(map);\n var storedMap = this.initSegments_[id];\n if (set && !storedMap && map.bytes) {\n this.initSegments_[id] = storedMap = {\n resolvedUri: map.resolvedUri,\n byterange: map.byterange,\n bytes: map.bytes,\n tracks: map.tracks,\n timescales: map.timescales\n };\n }\n return storedMap || map;\n }\n /**\n * Gets and sets key for the provided key\n *\n * @param {Object} key\n * The key object representing the key to get or set\n * @param {boolean=} set\n * If true, the key for the provided key should be saved\n * @return {Object}\n * Key object for desired key\n */\n }, {\n key: \"segmentKey\",\n value: function segmentKey(key) {\n var set = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n if (!key) {\n return null;\n }\n var id = segmentKeyId(key);\n var storedKey = this.keyCache_[id]; // TODO: We should use the HTTP Expires header to invalidate our cache per\n // https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-6.2.3\n\n if (this.cacheEncryptionKeys_ && set && !storedKey && key.bytes) {\n this.keyCache_[id] = storedKey = {\n resolvedUri: key.resolvedUri,\n bytes: key.bytes\n };\n }\n var result = {\n resolvedUri: (storedKey || key).resolvedUri\n };\n if (storedKey) {\n result.bytes = storedKey.bytes;\n }\n return result;\n }\n /**\n * Returns true if all configuration required for loading is present, otherwise false.\n *\n * @return {boolean} True if the all configuration is ready for loading\n * @private\n */\n }, {\n key: \"couldBeginLoading_\",\n value: function couldBeginLoading_() {\n return this.playlist_ && !this.paused();\n }\n /**\n * load a playlist and start to fill the buffer\n */\n }, {\n key: \"load\",\n value: function load() {\n // un-pause\n this.monitorBuffer_(); // if we don't have a playlist yet, keep waiting for one to be\n // specified\n\n if (!this.playlist_) {\n return;\n } // if all the configuration is ready, initialize and begin loading\n\n if (this.state === 'INIT' && this.couldBeginLoading_()) {\n return this.init_();\n } // if we're in the middle of processing a segment already, don't\n // kick off an additional segment request\n\n if (!this.couldBeginLoading_() || this.state !== 'READY' && this.state !== 'INIT') {\n return;\n }\n this.state = 'READY';\n }\n /**\n * Once all the starting parameters have been specified, begin\n * operation. This method should only be invoked from the INIT\n * state.\n *\n * @private\n */\n }, {\n key: \"init_\",\n value: function init_() {\n this.state = 'READY'; // if this is the audio segment loader, and it hasn't been inited before, then any old\n // audio data from the muxed content should be removed\n\n this.resetEverything();\n return this.monitorBuffer_();\n }\n /**\n * set a playlist on the segment loader\n *\n * @param {PlaylistLoader} media the playlist to set on the segment loader\n */\n }, {\n key: \"playlist\",\n value: function playlist(newPlaylist) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n if (!newPlaylist) {\n return;\n }\n var oldPlaylist = this.playlist_;\n var segmentInfo = this.pendingSegment_;\n this.playlist_ = newPlaylist;\n this.xhrOptions_ = options; // when we haven't started playing yet, the start of a live playlist\n // is always our zero-time so force a sync update each time the playlist\n // is refreshed from the server\n //\n // Use the INIT state to determine if playback has started, as the playlist sync info\n // should be fixed once requests begin (as sync points are generated based on sync\n // info), but not before then.\n\n if (this.state === 'INIT') {\n newPlaylist.syncInfo = {\n mediaSequence: newPlaylist.mediaSequence,\n time: 0\n }; // Setting the date time mapping means mapping the program date time (if available)\n // to time 0 on the player's timeline. The playlist's syncInfo serves a similar\n // purpose, mapping the initial mediaSequence to time zero. Since the syncInfo can\n // be updated as the playlist is refreshed before the loader starts loading, the\n // program date time mapping needs to be updated as well.\n //\n // This mapping is only done for the main loader because a program date time should\n // map equivalently between playlists.\n\n if (this.loaderType_ === 'main') {\n this.syncController_.setDateTimeMappingForStart(newPlaylist);\n }\n }\n var oldId = null;\n if (oldPlaylist) {\n if (oldPlaylist.id) {\n oldId = oldPlaylist.id;\n } else if (oldPlaylist.uri) {\n oldId = oldPlaylist.uri;\n }\n }\n this.logger_(\"playlist update [\".concat(oldId, \" => \").concat(newPlaylist.id || newPlaylist.uri, \"]\")); // in VOD, this is always a rendition switch (or we updated our syncInfo above)\n // in LIVE, we always want to update with new playlists (including refreshes)\n\n this.trigger('syncinfoupdate'); // if we were unpaused but waiting for a playlist, start\n // buffering now\n\n if (this.state === 'INIT' && this.couldBeginLoading_()) {\n return this.init_();\n }\n if (!oldPlaylist || oldPlaylist.uri !== newPlaylist.uri) {\n if (this.mediaIndex !== null) {\n // we must reset/resync the segment loader when we switch renditions and\n // the segment loader is already synced to the previous rendition\n // We only want to reset the loader here for LLHLS playback, as resetLoader sets fetchAtBuffer_\n // to false, resulting in fetching segments at currentTime and causing repeated\n // same-segment requests on playlist change. This erroneously drives up the playback watcher\n // stalled segment count, as re-requesting segments at the currentTime or browser cached segments\n // will not change the buffer.\n // Reference for LLHLS fixes: https://github.com/videojs/http-streaming/pull/1201\n var isLLHLS = !newPlaylist.endList && typeof newPlaylist.partTargetDuration === 'number';\n if (isLLHLS) {\n this.resetLoader();\n } else {\n this.resyncLoader();\n }\n }\n this.currentMediaInfo_ = void 0;\n this.trigger('playlistupdate'); // the rest of this function depends on `oldPlaylist` being defined\n\n return;\n } // we reloaded the same playlist so we are in a live scenario\n // and we will likely need to adjust the mediaIndex\n\n var mediaSequenceDiff = newPlaylist.mediaSequence - oldPlaylist.mediaSequence;\n this.logger_(\"live window shift [\".concat(mediaSequenceDiff, \"]\")); // update the mediaIndex on the SegmentLoader\n // this is important because we can abort a request and this value must be\n // equal to the last appended mediaIndex\n\n if (this.mediaIndex !== null) {\n this.mediaIndex -= mediaSequenceDiff; // this can happen if we are going to load the first segment, but get a playlist\n // update during that. mediaIndex would go from 0 to -1 if mediaSequence in the\n // new playlist was incremented by 1.\n\n if (this.mediaIndex < 0) {\n this.mediaIndex = null;\n this.partIndex = null;\n } else {\n var segment = this.playlist_.segments[this.mediaIndex]; // partIndex should remain the same for the same segment\n // unless parts fell off of the playlist for this segment.\n // In that case we need to reset partIndex and resync\n\n if (this.partIndex && (!segment.parts || !segment.parts.length || !segment.parts[this.partIndex])) {\n var mediaIndex = this.mediaIndex;\n this.logger_(\"currently processing part (index \".concat(this.partIndex, \") no longer exists.\"));\n this.resetLoader(); // We want to throw away the partIndex and the data associated with it,\n // as the part was dropped from our current playlists segment.\n // The mediaIndex will still be valid so keep that around.\n\n this.mediaIndex = mediaIndex;\n }\n }\n } // update the mediaIndex on the SegmentInfo object\n // this is important because we will update this.mediaIndex with this value\n // in `handleAppendsDone_` after the segment has been successfully appended\n\n if (segmentInfo) {\n segmentInfo.mediaIndex -= mediaSequenceDiff;\n if (segmentInfo.mediaIndex < 0) {\n segmentInfo.mediaIndex = null;\n segmentInfo.partIndex = null;\n } else {\n // we need to update the referenced segment so that timing information is\n // saved for the new playlist's segment, however, if the segment fell off the\n // playlist, we can leave the old reference and just lose the timing info\n if (segmentInfo.mediaIndex >= 0) {\n segmentInfo.segment = newPlaylist.segments[segmentInfo.mediaIndex];\n }\n if (segmentInfo.partIndex >= 0 && segmentInfo.segment.parts) {\n segmentInfo.part = segmentInfo.segment.parts[segmentInfo.partIndex];\n }\n }\n }\n this.syncController_.saveExpiredSegmentInfo(oldPlaylist, newPlaylist);\n }\n /**\n * Prevent the loader from fetching additional segments. If there\n * is a segment request outstanding, it will finish processing\n * before the loader halts. A segment loader can be unpaused by\n * calling load().\n */\n }, {\n key: \"pause\",\n value: function pause() {\n if (this.checkBufferTimeout_) {\n window$1.clearTimeout(this.checkBufferTimeout_);\n this.checkBufferTimeout_ = null;\n }\n }\n /**\n * Returns whether the segment loader is fetching additional\n * segments when given the opportunity. This property can be\n * modified through calls to pause() and load().\n */\n }, {\n key: \"paused\",\n value: function paused() {\n return this.checkBufferTimeout_ === null;\n }\n /**\n * Resets the segment loader ended and init properties.\n */\n }, {\n key: \"resetLoaderProperties\",\n value: function resetLoaderProperties() {\n this.ended_ = false;\n this.activeInitSegmentId_ = null;\n this.appendInitSegment_ = {\n audio: true,\n video: true\n };\n }\n /**\n * Delete all the buffered data and reset the SegmentLoader\n *\n * @param {Function} [done] an optional callback to be executed when the remove\n * operation is complete\n */\n }, {\n key: \"resetEverything\",\n value: function resetEverything(done) {\n this.resetLoaderProperties();\n this.resetLoader(); // remove from 0, the earliest point, to Infinity, to signify removal of everything.\n // VTT Segment Loader doesn't need to do anything but in the regular SegmentLoader,\n // we then clamp the value to duration if necessary.\n\n this.remove(0, Infinity, done); // clears fmp4 captions\n\n if (this.transmuxer_) {\n this.transmuxer_.postMessage({\n action: 'clearAllMp4Captions'\n }); // reset the cache in the transmuxer\n\n this.transmuxer_.postMessage({\n action: 'reset'\n });\n }\n }\n /**\n * Force the SegmentLoader to resync and start loading around the currentTime instead\n * of starting at the end of the buffer\n *\n * Useful for fast quality changes\n */\n }, {\n key: \"resetLoader\",\n value: function resetLoader() {\n this.fetchAtBuffer_ = false;\n this.resyncLoader();\n }\n /**\n * Force the SegmentLoader to restart synchronization and make a conservative guess\n * before returning to the simple walk-forward method\n */\n }, {\n key: \"resyncLoader\",\n value: function resyncLoader() {\n if (this.transmuxer_) {\n // need to clear out any cached data to prepare for the new segment\n segmentTransmuxer.reset(this.transmuxer_);\n }\n this.mediaIndex = null;\n this.partIndex = null;\n this.syncPoint_ = null;\n this.isPendingTimestampOffset_ = false;\n this.callQueue_ = [];\n this.loadQueue_ = [];\n this.metadataQueue_.id3 = [];\n this.metadataQueue_.caption = [];\n this.abort();\n if (this.transmuxer_) {\n this.transmuxer_.postMessage({\n action: 'clearParsedMp4Captions'\n });\n }\n }\n /**\n * Remove any data in the source buffer between start and end times\n *\n * @param {number} start - the start time of the region to remove from the buffer\n * @param {number} end - the end time of the region to remove from the buffer\n * @param {Function} [done] - an optional callback to be executed when the remove\n * @param {boolean} force - force all remove operations to happen\n * operation is complete\n */\n }, {\n key: \"remove\",\n value: function remove(start, end) {\n var done = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function () {};\n var force = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n // clamp end to duration if we need to remove everything.\n // This is due to a browser bug that causes issues if we remove to Infinity.\n // videojs/videojs-contrib-hls#1225\n if (end === Infinity) {\n end = this.duration_();\n } // skip removes that would throw an error\n // commonly happens during a rendition switch at the start of a video\n // from start 0 to end 0\n\n if (end <= start) {\n this.logger_('skipping remove because end ${end} is <= start ${start}');\n return;\n }\n if (!this.sourceUpdater_ || !this.getMediaInfo_()) {\n this.logger_('skipping remove because no source updater or starting media info'); // nothing to remove if we haven't processed any media\n\n return;\n } // set it to one to complete this function's removes\n\n var removesRemaining = 1;\n var removeFinished = function removeFinished() {\n removesRemaining--;\n if (removesRemaining === 0) {\n done();\n }\n };\n if (force || !this.audioDisabled_) {\n removesRemaining++;\n this.sourceUpdater_.removeAudio(start, end, removeFinished);\n } // While it would be better to only remove video if the main loader has video, this\n // should be safe with audio only as removeVideo will call back even if there's no\n // video buffer.\n //\n // In theory we can check to see if there's video before calling the remove, but in\n // the event that we're switching between renditions and from video to audio only\n // (when we add support for that), we may need to clear the video contents despite\n // what the new media will contain.\n\n if (force || this.loaderType_ === 'main') {\n this.gopBuffer_ = removeGopBuffer(this.gopBuffer_, start, end, this.timeMapping_);\n removesRemaining++;\n this.sourceUpdater_.removeVideo(start, end, removeFinished);\n } // remove any captions and ID3 tags\n\n for (var track in this.inbandTextTracks_) {\n removeCuesFromTrack(start, end, this.inbandTextTracks_[track]);\n }\n removeCuesFromTrack(start, end, this.segmentMetadataTrack_); // finished this function's removes\n\n removeFinished();\n }\n /**\n * (re-)schedule monitorBufferTick_ to run as soon as possible\n *\n * @private\n */\n }, {\n key: \"monitorBuffer_\",\n value: function monitorBuffer_() {\n if (this.checkBufferTimeout_) {\n window$1.clearTimeout(this.checkBufferTimeout_);\n }\n this.checkBufferTimeout_ = window$1.setTimeout(this.monitorBufferTick_.bind(this), 1);\n }\n /**\n * As long as the SegmentLoader is in the READY state, periodically\n * invoke fillBuffer_().\n *\n * @private\n */\n }, {\n key: \"monitorBufferTick_\",\n value: function monitorBufferTick_() {\n if (this.state === 'READY') {\n this.fillBuffer_();\n }\n if (this.checkBufferTimeout_) {\n window$1.clearTimeout(this.checkBufferTimeout_);\n }\n this.checkBufferTimeout_ = window$1.setTimeout(this.monitorBufferTick_.bind(this), CHECK_BUFFER_DELAY);\n }\n /**\n * fill the buffer with segements unless the sourceBuffers are\n * currently updating\n *\n * Note: this function should only ever be called by monitorBuffer_\n * and never directly\n *\n * @private\n */\n }, {\n key: \"fillBuffer_\",\n value: function fillBuffer_() {\n // TODO since the source buffer maintains a queue, and we shouldn't call this function\n // except when we're ready for the next segment, this check can most likely be removed\n if (this.sourceUpdater_.updating()) {\n return;\n } // see if we need to begin loading immediately\n\n var segmentInfo = this.chooseNextRequest_();\n if (!segmentInfo) {\n return;\n }\n if (typeof segmentInfo.timestampOffset === 'number') {\n this.isPendingTimestampOffset_ = false;\n this.timelineChangeController_.pendingTimelineChange({\n type: this.loaderType_,\n from: this.currentTimeline_,\n to: segmentInfo.timeline\n });\n }\n this.loadSegment_(segmentInfo);\n }\n /**\n * Determines if we should call endOfStream on the media source based\n * on the state of the buffer or if appened segment was the final\n * segment in the playlist.\n *\n * @param {number} [mediaIndex] the media index of segment we last appended\n * @param {Object} [playlist] a media playlist object\n * @return {boolean} do we need to call endOfStream on the MediaSource\n */\n }, {\n key: \"isEndOfStream_\",\n value: function isEndOfStream_() {\n var mediaIndex = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.mediaIndex;\n var playlist = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.playlist_;\n var partIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.partIndex;\n if (!playlist || !this.mediaSource_) {\n return false;\n }\n var segment = typeof mediaIndex === 'number' && playlist.segments[mediaIndex]; // mediaIndex is zero based but length is 1 based\n\n var appendedLastSegment = mediaIndex + 1 === playlist.segments.length; // true if there are no parts, or this is the last part.\n\n var appendedLastPart = !segment || !segment.parts || partIndex + 1 === segment.parts.length; // if we've buffered to the end of the video, we need to call endOfStream\n // so that MediaSources can trigger the `ended` event when it runs out of\n // buffered data instead of waiting for me\n\n return playlist.endList && this.mediaSource_.readyState === 'open' && appendedLastSegment && appendedLastPart;\n }\n /**\n * Determines what request should be made given current segment loader state.\n *\n * @return {Object} a request object that describes the segment/part to load\n */\n }, {\n key: \"chooseNextRequest_\",\n value: function chooseNextRequest_() {\n var buffered = this.buffered_();\n var bufferedEnd = lastBufferedEnd(buffered) || 0;\n var bufferedTime = timeAheadOf(buffered, this.currentTime_());\n var preloaded = !this.hasPlayed_() && bufferedTime >= 1;\n var haveEnoughBuffer = bufferedTime >= this.goalBufferLength_();\n var segments = this.playlist_.segments; // return no segment if:\n // 1. we don't have segments\n // 2. The video has not yet played and we already downloaded a segment\n // 3. we already have enough buffered time\n\n if (!segments.length || preloaded || haveEnoughBuffer) {\n return null;\n }\n this.syncPoint_ = this.syncPoint_ || this.syncController_.getSyncPoint(this.playlist_, this.duration_(), this.currentTimeline_, this.currentTime_());\n var next = {\n partIndex: null,\n mediaIndex: null,\n startOfSegment: null,\n playlist: this.playlist_,\n isSyncRequest: Boolean(!this.syncPoint_)\n };\n if (next.isSyncRequest) {\n next.mediaIndex = getSyncSegmentCandidate(this.currentTimeline_, segments, bufferedEnd);\n } else if (this.mediaIndex !== null) {\n var segment = segments[this.mediaIndex];\n var partIndex = typeof this.partIndex === 'number' ? this.partIndex : -1;\n next.startOfSegment = segment.end ? segment.end : bufferedEnd;\n if (segment.parts && segment.parts[partIndex + 1]) {\n next.mediaIndex = this.mediaIndex;\n next.partIndex = partIndex + 1;\n } else {\n next.mediaIndex = this.mediaIndex + 1;\n }\n } else {\n // Find the segment containing the end of the buffer or current time.\n var _Playlist$getMediaInf = Playlist.getMediaInfoForTime({\n exactManifestTimings: this.exactManifestTimings,\n playlist: this.playlist_,\n currentTime: this.fetchAtBuffer_ ? bufferedEnd : this.currentTime_(),\n startingPartIndex: this.syncPoint_.partIndex,\n startingSegmentIndex: this.syncPoint_.segmentIndex,\n startTime: this.syncPoint_.time\n }),\n segmentIndex = _Playlist$getMediaInf.segmentIndex,\n startTime = _Playlist$getMediaInf.startTime,\n _partIndex = _Playlist$getMediaInf.partIndex;\n next.getMediaInfoForTime = this.fetchAtBuffer_ ? \"bufferedEnd \".concat(bufferedEnd) : \"currentTime \".concat(this.currentTime_());\n next.mediaIndex = segmentIndex;\n next.startOfSegment = startTime;\n next.partIndex = _partIndex;\n }\n var nextSegment = segments[next.mediaIndex];\n var nextPart = nextSegment && typeof next.partIndex === 'number' && nextSegment.parts && nextSegment.parts[next.partIndex]; // if the next segment index is invalid or\n // the next partIndex is invalid do not choose a next segment.\n\n if (!nextSegment || typeof next.partIndex === 'number' && !nextPart) {\n return null;\n } // if the next segment has parts, and we don't have a partIndex.\n // Set partIndex to 0\n\n if (typeof next.partIndex !== 'number' && nextSegment.parts) {\n next.partIndex = 0;\n nextPart = nextSegment.parts[0];\n } // independentSegments applies to every segment in a playlist. If independentSegments appears in a main playlist,\n // it applies to each segment in each media playlist.\n // https://datatracker.ietf.org/doc/html/draft-pantos-http-live-streaming-23#section-4.3.5.1\n\n var hasIndependentSegments = this.vhs_.playlists && this.vhs_.playlists.main && this.vhs_.playlists.main.independentSegments || this.playlist_.independentSegments; // if we have no buffered data then we need to make sure\n // that the next part we append is \"independent\" if possible.\n // So we check if the previous part is independent, and request\n // it if it is.\n\n if (!bufferedTime && nextPart && !hasIndependentSegments && !nextPart.independent) {\n if (next.partIndex === 0) {\n var lastSegment = segments[next.mediaIndex - 1];\n var lastSegmentLastPart = lastSegment.parts && lastSegment.parts.length && lastSegment.parts[lastSegment.parts.length - 1];\n if (lastSegmentLastPart && lastSegmentLastPart.independent) {\n next.mediaIndex -= 1;\n next.partIndex = lastSegment.parts.length - 1;\n next.independent = 'previous segment';\n }\n } else if (nextSegment.parts[next.partIndex - 1].independent) {\n next.partIndex -= 1;\n next.independent = 'previous part';\n }\n }\n var ended = this.mediaSource_ && this.mediaSource_.readyState === 'ended'; // do not choose a next segment if all of the following:\n // 1. this is the last segment in the playlist\n // 2. end of stream has been called on the media source already\n // 3. the player is not seeking\n\n if (next.mediaIndex >= segments.length - 1 && ended && !this.seeking_()) {\n return null;\n }\n return this.generateSegmentInfo_(next);\n }\n }, {\n key: \"generateSegmentInfo_\",\n value: function generateSegmentInfo_(options) {\n var independent = options.independent,\n playlist = options.playlist,\n mediaIndex = options.mediaIndex,\n startOfSegment = options.startOfSegment,\n isSyncRequest = options.isSyncRequest,\n partIndex = options.partIndex,\n forceTimestampOffset = options.forceTimestampOffset,\n getMediaInfoForTime = options.getMediaInfoForTime;\n var segment = playlist.segments[mediaIndex];\n var part = typeof partIndex === 'number' && segment.parts[partIndex];\n var segmentInfo = {\n requestId: 'segment-loader-' + Math.random(),\n // resolve the segment URL relative to the playlist\n uri: part && part.resolvedUri || segment.resolvedUri,\n // the segment's mediaIndex at the time it was requested\n mediaIndex: mediaIndex,\n partIndex: part ? partIndex : null,\n // whether or not to update the SegmentLoader's state with this\n // segment's mediaIndex\n isSyncRequest: isSyncRequest,\n startOfSegment: startOfSegment,\n // the segment's playlist\n playlist: playlist,\n // unencrypted bytes of the segment\n bytes: null,\n // when a key is defined for this segment, the encrypted bytes\n encryptedBytes: null,\n // The target timestampOffset for this segment when we append it\n // to the source buffer\n timestampOffset: null,\n // The timeline that the segment is in\n timeline: segment.timeline,\n // The expected duration of the segment in seconds\n duration: part && part.duration || segment.duration,\n // retain the segment in case the playlist updates while doing an async process\n segment: segment,\n part: part,\n byteLength: 0,\n transmuxer: this.transmuxer_,\n // type of getMediaInfoForTime that was used to get this segment\n getMediaInfoForTime: getMediaInfoForTime,\n independent: independent\n };\n var overrideCheck = typeof forceTimestampOffset !== 'undefined' ? forceTimestampOffset : this.isPendingTimestampOffset_;\n segmentInfo.timestampOffset = this.timestampOffsetForSegment_({\n segmentTimeline: segment.timeline,\n currentTimeline: this.currentTimeline_,\n startOfSegment: startOfSegment,\n buffered: this.buffered_(),\n calculateTimestampOffsetForEachSegment: this.calculateTimestampOffsetForEachSegment_,\n overrideCheck: overrideCheck\n });\n var audioBufferedEnd = lastBufferedEnd(this.sourceUpdater_.audioBuffered());\n if (typeof audioBufferedEnd === 'number') {\n // since the transmuxer is using the actual timing values, but the buffer is\n // adjusted by the timestamp offset, we must adjust the value here\n segmentInfo.audioAppendStart = audioBufferedEnd - this.sourceUpdater_.audioTimestampOffset();\n }\n if (this.sourceUpdater_.videoBuffered().length) {\n segmentInfo.gopsToAlignWith = gopsSafeToAlignWith(this.gopBuffer_,\n // since the transmuxer is using the actual timing values, but the time is\n // adjusted by the timestmap offset, we must adjust the value here\n this.currentTime_() - this.sourceUpdater_.videoTimestampOffset(), this.timeMapping_);\n }\n return segmentInfo;\n } // get the timestampoffset for a segment,\n // added so that vtt segment loader can override and prevent\n // adding timestamp offsets.\n }, {\n key: \"timestampOffsetForSegment_\",\n value: function timestampOffsetForSegment_(options) {\n return timestampOffsetForSegment(options);\n }\n /**\n * Determines if the network has enough bandwidth to complete the current segment\n * request in a timely manner. If not, the request will be aborted early and bandwidth\n * updated to trigger a playlist switch.\n *\n * @param {Object} stats\n * Object containing stats about the request timing and size\n * @private\n */\n }, {\n key: \"earlyAbortWhenNeeded_\",\n value: function earlyAbortWhenNeeded_(stats) {\n if (this.vhs_.tech_.paused() ||\n // Don't abort if the current playlist is on the lowestEnabledRendition\n // TODO: Replace using timeout with a boolean indicating whether this playlist is\n // the lowestEnabledRendition.\n !this.xhrOptions_.timeout ||\n // Don't abort if we have no bandwidth information to estimate segment sizes\n !this.playlist_.attributes.BANDWIDTH) {\n return;\n } // Wait at least 1 second since the first byte of data has been received before\n // using the calculated bandwidth from the progress event to allow the bitrate\n // to stabilize\n\n if (Date.now() - (stats.firstBytesReceivedAt || Date.now()) < 1000) {\n return;\n }\n var currentTime = this.currentTime_();\n var measuredBandwidth = stats.bandwidth;\n var segmentDuration = this.pendingSegment_.duration;\n var requestTimeRemaining = Playlist.estimateSegmentRequestTime(segmentDuration, measuredBandwidth, this.playlist_, stats.bytesReceived); // Subtract 1 from the timeUntilRebuffer so we still consider an early abort\n // if we are only left with less than 1 second when the request completes.\n // A negative timeUntilRebuffering indicates we are already rebuffering\n\n var timeUntilRebuffer$1 = timeUntilRebuffer(this.buffered_(), currentTime, this.vhs_.tech_.playbackRate()) - 1; // Only consider aborting early if the estimated time to finish the download\n // is larger than the estimated time until the player runs out of forward buffer\n\n if (requestTimeRemaining <= timeUntilRebuffer$1) {\n return;\n }\n var switchCandidate = minRebufferMaxBandwidthSelector({\n main: this.vhs_.playlists.main,\n currentTime: currentTime,\n bandwidth: measuredBandwidth,\n duration: this.duration_(),\n segmentDuration: segmentDuration,\n timeUntilRebuffer: timeUntilRebuffer$1,\n currentTimeline: this.currentTimeline_,\n syncController: this.syncController_\n });\n if (!switchCandidate) {\n return;\n }\n var rebufferingImpact = requestTimeRemaining - timeUntilRebuffer$1;\n var timeSavedBySwitching = rebufferingImpact - switchCandidate.rebufferingImpact;\n var minimumTimeSaving = 0.5; // If we are already rebuffering, increase the amount of variance we add to the\n // potential round trip time of the new request so that we are not too aggressive\n // with switching to a playlist that might save us a fraction of a second.\n\n if (timeUntilRebuffer$1 <= TIME_FUDGE_FACTOR) {\n minimumTimeSaving = 1;\n }\n if (!switchCandidate.playlist || switchCandidate.playlist.uri === this.playlist_.uri || timeSavedBySwitching < minimumTimeSaving) {\n return;\n } // set the bandwidth to that of the desired playlist being sure to scale by\n // BANDWIDTH_VARIANCE and add one so the playlist selector does not exclude it\n // don't trigger a bandwidthupdate as the bandwidth is artifial\n\n this.bandwidth = switchCandidate.playlist.attributes.BANDWIDTH * Config.BANDWIDTH_VARIANCE + 1;\n this.trigger('earlyabort');\n }\n }, {\n key: \"handleAbort_\",\n value: function handleAbort_(segmentInfo) {\n this.logger_(\"Aborting \".concat(segmentInfoString(segmentInfo)));\n this.mediaRequestsAborted += 1;\n }\n /**\n * XHR `progress` event handler\n *\n * @param {Event}\n * The XHR `progress` event\n * @param {Object} simpleSegment\n * A simplified segment object copy\n * @private\n */\n }, {\n key: \"handleProgress_\",\n value: function handleProgress_(event, simpleSegment) {\n this.earlyAbortWhenNeeded_(simpleSegment.stats);\n if (this.checkForAbort_(simpleSegment.requestId)) {\n return;\n }\n this.trigger('progress');\n }\n }, {\n key: \"handleTrackInfo_\",\n value: function handleTrackInfo_(simpleSegment, trackInfo) {\n this.earlyAbortWhenNeeded_(simpleSegment.stats);\n if (this.checkForAbort_(simpleSegment.requestId)) {\n return;\n }\n if (this.checkForIllegalMediaSwitch(trackInfo)) {\n return;\n }\n trackInfo = trackInfo || {}; // When we have track info, determine what media types this loader is dealing with.\n // Guard against cases where we're not getting track info at all until we are\n // certain that all streams will provide it.\n\n if (!shallowEqual(this.currentMediaInfo_, trackInfo)) {\n this.appendInitSegment_ = {\n audio: true,\n video: true\n };\n this.startingMediaInfo_ = trackInfo;\n this.currentMediaInfo_ = trackInfo;\n this.logger_('trackinfo update', trackInfo);\n this.trigger('trackinfo');\n } // trackinfo may cause an abort if the trackinfo\n // causes a codec change to an unsupported codec.\n\n if (this.checkForAbort_(simpleSegment.requestId)) {\n return;\n } // set trackinfo on the pending segment so that\n // it can append.\n\n this.pendingSegment_.trackInfo = trackInfo; // check if any calls were waiting on the track info\n\n if (this.hasEnoughInfoToAppend_()) {\n this.processCallQueue_();\n }\n }\n }, {\n key: \"handleTimingInfo_\",\n value: function handleTimingInfo_(simpleSegment, mediaType, timeType, time) {\n this.earlyAbortWhenNeeded_(simpleSegment.stats);\n if (this.checkForAbort_(simpleSegment.requestId)) {\n return;\n }\n var segmentInfo = this.pendingSegment_;\n var timingInfoProperty = timingInfoPropertyForMedia(mediaType);\n segmentInfo[timingInfoProperty] = segmentInfo[timingInfoProperty] || {};\n segmentInfo[timingInfoProperty][timeType] = time;\n this.logger_(\"timinginfo: \".concat(mediaType, \" - \").concat(timeType, \" - \").concat(time)); // check if any calls were waiting on the timing info\n\n if (this.hasEnoughInfoToAppend_()) {\n this.processCallQueue_();\n }\n }\n }, {\n key: \"handleCaptions_\",\n value: function handleCaptions_(simpleSegment, captionData) {\n var _this151 = this;\n this.earlyAbortWhenNeeded_(simpleSegment.stats);\n if (this.checkForAbort_(simpleSegment.requestId)) {\n return;\n } // This could only happen with fmp4 segments, but\n // should still not happen in general\n\n if (captionData.length === 0) {\n this.logger_('SegmentLoader received no captions from a caption event');\n return;\n }\n var segmentInfo = this.pendingSegment_; // Wait until we have some video data so that caption timing\n // can be adjusted by the timestamp offset\n\n if (!segmentInfo.hasAppendedData_) {\n this.metadataQueue_.caption.push(this.handleCaptions_.bind(this, simpleSegment, captionData));\n return;\n }\n var timestampOffset = this.sourceUpdater_.videoTimestampOffset() === null ? this.sourceUpdater_.audioTimestampOffset() : this.sourceUpdater_.videoTimestampOffset();\n var captionTracks = {}; // get total start/end and captions for each track/stream\n\n captionData.forEach(function (caption) {\n // caption.stream is actually a track name...\n // set to the existing values in tracks or default values\n captionTracks[caption.stream] = captionTracks[caption.stream] || {\n // Infinity, as any other value will be less than this\n startTime: Infinity,\n captions: [],\n // 0 as an other value will be more than this\n endTime: 0\n };\n var captionTrack = captionTracks[caption.stream];\n captionTrack.startTime = Math.min(captionTrack.startTime, caption.startTime + timestampOffset);\n captionTrack.endTime = Math.max(captionTrack.endTime, caption.endTime + timestampOffset);\n captionTrack.captions.push(caption);\n });\n Object.keys(captionTracks).forEach(function (trackName) {\n var _captionTracks$trackN = captionTracks[trackName],\n startTime = _captionTracks$trackN.startTime,\n endTime = _captionTracks$trackN.endTime,\n captions = _captionTracks$trackN.captions;\n var inbandTextTracks = _this151.inbandTextTracks_;\n _this151.logger_(\"adding cues from \".concat(startTime, \" -> \").concat(endTime, \" for \").concat(trackName));\n createCaptionsTrackIfNotExists(inbandTextTracks, _this151.vhs_.tech_, trackName); // clear out any cues that start and end at the same time period for the same track.\n // We do this because a rendition change that also changes the timescale for captions\n // will result in captions being re-parsed for certain segments. If we add them again\n // without clearing we will have two of the same captions visible.\n\n removeCuesFromTrack(startTime, endTime, inbandTextTracks[trackName]);\n addCaptionData({\n captionArray: captions,\n inbandTextTracks: inbandTextTracks,\n timestampOffset: timestampOffset\n });\n }); // Reset stored captions since we added parsed\n // captions to a text track at this point\n\n if (this.transmuxer_) {\n this.transmuxer_.postMessage({\n action: 'clearParsedMp4Captions'\n });\n }\n }\n }, {\n key: \"handleId3_\",\n value: function handleId3_(simpleSegment, id3Frames, dispatchType) {\n this.earlyAbortWhenNeeded_(simpleSegment.stats);\n if (this.checkForAbort_(simpleSegment.requestId)) {\n return;\n }\n var segmentInfo = this.pendingSegment_; // we need to have appended data in order for the timestamp offset to be set\n\n if (!segmentInfo.hasAppendedData_) {\n this.metadataQueue_.id3.push(this.handleId3_.bind(this, simpleSegment, id3Frames, dispatchType));\n return;\n }\n this.addMetadataToTextTrack(dispatchType, id3Frames, this.duration_());\n }\n }, {\n key: \"processMetadataQueue_\",\n value: function processMetadataQueue_() {\n this.metadataQueue_.id3.forEach(function (fn) {\n return fn();\n });\n this.metadataQueue_.caption.forEach(function (fn) {\n return fn();\n });\n this.metadataQueue_.id3 = [];\n this.metadataQueue_.caption = [];\n }\n }, {\n key: \"processCallQueue_\",\n value: function processCallQueue_() {\n var callQueue = this.callQueue_; // Clear out the queue before the queued functions are run, since some of the\n // functions may check the length of the load queue and default to pushing themselves\n // back onto the queue.\n\n this.callQueue_ = [];\n callQueue.forEach(function (fun) {\n return fun();\n });\n }\n }, {\n key: \"processLoadQueue_\",\n value: function processLoadQueue_() {\n var loadQueue = this.loadQueue_; // Clear out the queue before the queued functions are run, since some of the\n // functions may check the length of the load queue and default to pushing themselves\n // back onto the queue.\n\n this.loadQueue_ = [];\n loadQueue.forEach(function (fun) {\n return fun();\n });\n }\n /**\n * Determines whether the loader has enough info to load the next segment.\n *\n * @return {boolean}\n * Whether or not the loader has enough info to load the next segment\n */\n }, {\n key: \"hasEnoughInfoToLoad_\",\n value: function hasEnoughInfoToLoad_() {\n // Since primary timing goes by video, only the audio loader potentially needs to wait\n // to load.\n if (this.loaderType_ !== 'audio') {\n return true;\n }\n var segmentInfo = this.pendingSegment_; // A fill buffer must have already run to establish a pending segment before there's\n // enough info to load.\n\n if (!segmentInfo) {\n return false;\n } // The first segment can and should be loaded immediately so that source buffers are\n // created together (before appending). Source buffer creation uses the presence of\n // audio and video data to determine whether to create audio/video source buffers, and\n // uses processed (transmuxed or parsed) media to determine the types required.\n\n if (!this.getCurrentMediaInfo_()) {\n return true;\n }\n if (\n // Technically, instead of waiting to load a segment on timeline changes, a segment\n // can be requested and downloaded and only wait before it is transmuxed or parsed.\n // But in practice, there are a few reasons why it is better to wait until a loader\n // is ready to append that segment before requesting and downloading:\n //\n // 1. Because audio and main loaders cross discontinuities together, if this loader\n // is waiting for the other to catch up, then instead of requesting another\n // segment and using up more bandwidth, by not yet loading, more bandwidth is\n // allotted to the loader currently behind.\n // 2. media-segment-request doesn't have to have logic to consider whether a segment\n // is ready to be processed or not, isolating the queueing behavior to the loader.\n // 3. The audio loader bases some of its segment properties on timing information\n // provided by the main loader, meaning that, if the logic for waiting on\n // processing was in media-segment-request, then it would also need to know how\n // to re-generate the segment information after the main loader caught up.\n shouldWaitForTimelineChange({\n timelineChangeController: this.timelineChangeController_,\n currentTimeline: this.currentTimeline_,\n segmentTimeline: segmentInfo.timeline,\n loaderType: this.loaderType_,\n audioDisabled: this.audioDisabled_\n })) {\n return false;\n }\n return true;\n }\n }, {\n key: \"getCurrentMediaInfo_\",\n value: function getCurrentMediaInfo_() {\n var segmentInfo = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.pendingSegment_;\n return segmentInfo && segmentInfo.trackInfo || this.currentMediaInfo_;\n }\n }, {\n key: \"getMediaInfo_\",\n value: function getMediaInfo_() {\n var segmentInfo = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.pendingSegment_;\n return this.getCurrentMediaInfo_(segmentInfo) || this.startingMediaInfo_;\n }\n }, {\n key: \"getPendingSegmentPlaylist\",\n value: function getPendingSegmentPlaylist() {\n return this.pendingSegment_ ? this.pendingSegment_.playlist : null;\n }\n }, {\n key: \"hasEnoughInfoToAppend_\",\n value: function hasEnoughInfoToAppend_() {\n if (!this.sourceUpdater_.ready()) {\n return false;\n } // If content needs to be removed or the loader is waiting on an append reattempt,\n // then no additional content should be appended until the prior append is resolved.\n\n if (this.waitingOnRemove_ || this.quotaExceededErrorRetryTimeout_) {\n return false;\n }\n var segmentInfo = this.pendingSegment_;\n var trackInfo = this.getCurrentMediaInfo_(); // no segment to append any data for or\n // we do not have information on this specific\n // segment yet\n\n if (!segmentInfo || !trackInfo) {\n return false;\n }\n var hasAudio = trackInfo.hasAudio,\n hasVideo = trackInfo.hasVideo,\n isMuxed = trackInfo.isMuxed;\n if (hasVideo && !segmentInfo.videoTimingInfo) {\n return false;\n } // muxed content only relies on video timing information for now.\n\n if (hasAudio && !this.audioDisabled_ && !isMuxed && !segmentInfo.audioTimingInfo) {\n return false;\n }\n if (shouldWaitForTimelineChange({\n timelineChangeController: this.timelineChangeController_,\n currentTimeline: this.currentTimeline_,\n segmentTimeline: segmentInfo.timeline,\n loaderType: this.loaderType_,\n audioDisabled: this.audioDisabled_\n })) {\n return false;\n }\n return true;\n }\n }, {\n key: \"handleData_\",\n value: function handleData_(simpleSegment, result) {\n this.earlyAbortWhenNeeded_(simpleSegment.stats);\n if (this.checkForAbort_(simpleSegment.requestId)) {\n return;\n } // If there's anything in the call queue, then this data came later and should be\n // executed after the calls currently queued.\n\n if (this.callQueue_.length || !this.hasEnoughInfoToAppend_()) {\n this.callQueue_.push(this.handleData_.bind(this, simpleSegment, result));\n return;\n }\n var segmentInfo = this.pendingSegment_; // update the time mapping so we can translate from display time to media time\n\n this.setTimeMapping_(segmentInfo.timeline); // for tracking overall stats\n\n this.updateMediaSecondsLoaded_(segmentInfo.part || segmentInfo.segment); // Note that the state isn't changed from loading to appending. This is because abort\n // logic may change behavior depending on the state, and changing state too early may\n // inflate our estimates of bandwidth. In the future this should be re-examined to\n // note more granular states.\n // don't process and append data if the mediaSource is closed\n\n if (this.mediaSource_.readyState === 'closed') {\n return;\n } // if this request included an initialization segment, save that data\n // to the initSegment cache\n\n if (simpleSegment.map) {\n simpleSegment.map = this.initSegmentForMap(simpleSegment.map, true); // move over init segment properties to media request\n\n segmentInfo.segment.map = simpleSegment.map;\n } // if this request included a segment key, save that data in the cache\n\n if (simpleSegment.key) {\n this.segmentKey(simpleSegment.key, true);\n }\n segmentInfo.isFmp4 = simpleSegment.isFmp4;\n segmentInfo.timingInfo = segmentInfo.timingInfo || {};\n if (segmentInfo.isFmp4) {\n this.trigger('fmp4');\n segmentInfo.timingInfo.start = segmentInfo[timingInfoPropertyForMedia(result.type)].start;\n } else {\n var trackInfo = this.getCurrentMediaInfo_();\n var useVideoTimingInfo = this.loaderType_ === 'main' && trackInfo && trackInfo.hasVideo;\n var firstVideoFrameTimeForData;\n if (useVideoTimingInfo) {\n firstVideoFrameTimeForData = segmentInfo.videoTimingInfo.start;\n } // Segment loader knows more about segment timing than the transmuxer (in certain\n // aspects), so make any changes required for a more accurate start time.\n // Don't set the end time yet, as the segment may not be finished processing.\n\n segmentInfo.timingInfo.start = this.trueSegmentStart_({\n currentStart: segmentInfo.timingInfo.start,\n playlist: segmentInfo.playlist,\n mediaIndex: segmentInfo.mediaIndex,\n currentVideoTimestampOffset: this.sourceUpdater_.videoTimestampOffset(),\n useVideoTimingInfo: useVideoTimingInfo,\n firstVideoFrameTimeForData: firstVideoFrameTimeForData,\n videoTimingInfo: segmentInfo.videoTimingInfo,\n audioTimingInfo: segmentInfo.audioTimingInfo\n });\n } // Init segments for audio and video only need to be appended in certain cases. Now\n // that data is about to be appended, we can check the final cases to determine\n // whether we should append an init segment.\n\n this.updateAppendInitSegmentStatus(segmentInfo, result.type); // Timestamp offset should be updated once we get new data and have its timing info,\n // as we use the start of the segment to offset the best guess (playlist provided)\n // timestamp offset.\n\n this.updateSourceBufferTimestampOffset_(segmentInfo); // if this is a sync request we need to determine whether it should\n // be appended or not.\n\n if (segmentInfo.isSyncRequest) {\n // first save/update our timing info for this segment.\n // this is what allows us to choose an accurate segment\n // and the main reason we make a sync request.\n this.updateTimingInfoEnd_(segmentInfo);\n this.syncController_.saveSegmentTimingInfo({\n segmentInfo: segmentInfo,\n shouldSaveTimelineMapping: this.loaderType_ === 'main'\n });\n var next = this.chooseNextRequest_(); // If the sync request isn't the segment that would be requested next\n // after taking into account its timing info, do not append it.\n\n if (next.mediaIndex !== segmentInfo.mediaIndex || next.partIndex !== segmentInfo.partIndex) {\n this.logger_('sync segment was incorrect, not appending');\n return;\n } // otherwise append it like any other segment as our guess was correct.\n\n this.logger_('sync segment was correct, appending');\n } // Save some state so that in the future anything waiting on first append (and/or\n // timestamp offset(s)) can process immediately. While the extra state isn't optimal,\n // we need some notion of whether the timestamp offset or other relevant information\n // has had a chance to be set.\n\n segmentInfo.hasAppendedData_ = true; // Now that the timestamp offset should be set, we can append any waiting ID3 tags.\n\n this.processMetadataQueue_();\n this.appendData_(segmentInfo, result);\n }\n }, {\n key: \"updateAppendInitSegmentStatus\",\n value: function updateAppendInitSegmentStatus(segmentInfo, type) {\n // alt audio doesn't manage timestamp offset\n if (this.loaderType_ === 'main' && typeof segmentInfo.timestampOffset === 'number' &&\n // in the case that we're handling partial data, we don't want to append an init\n // segment for each chunk\n !segmentInfo.changedTimestampOffset) {\n // if the timestamp offset changed, the timeline may have changed, so we have to re-\n // append init segments\n this.appendInitSegment_ = {\n audio: true,\n video: true\n };\n }\n if (this.playlistOfLastInitSegment_[type] !== segmentInfo.playlist) {\n // make sure we append init segment on playlist changes, in case the media config\n // changed\n this.appendInitSegment_[type] = true;\n }\n }\n }, {\n key: \"getInitSegmentAndUpdateState_\",\n value: function getInitSegmentAndUpdateState_(_ref52) {\n var type = _ref52.type,\n initSegment = _ref52.initSegment,\n map = _ref52.map,\n playlist = _ref52.playlist;\n // \"The EXT-X-MAP tag specifies how to obtain the Media Initialization Section\n // (Section 3) required to parse the applicable Media Segments. It applies to every\n // Media Segment that appears after it in the Playlist until the next EXT-X-MAP tag\n // or until the end of the playlist.\"\n // https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.2.5\n if (map) {\n var id = initSegmentId(map);\n if (this.activeInitSegmentId_ === id) {\n // don't need to re-append the init segment if the ID matches\n return null;\n } // a map-specified init segment takes priority over any transmuxed (or otherwise\n // obtained) init segment\n //\n // this also caches the init segment for later use\n\n initSegment = this.initSegmentForMap(map, true).bytes;\n this.activeInitSegmentId_ = id;\n } // We used to always prepend init segments for video, however, that shouldn't be\n // necessary. Instead, we should only append on changes, similar to what we've always\n // done for audio. This is more important (though may not be that important) for\n // frame-by-frame appending for LHLS, simply because of the increased quantity of\n // appends.\n\n if (initSegment && this.appendInitSegment_[type]) {\n // Make sure we track the playlist that we last used for the init segment, so that\n // we can re-append the init segment in the event that we get data from a new\n // playlist. Discontinuities and track changes are handled in other sections.\n this.playlistOfLastInitSegment_[type] = playlist; // Disable future init segment appends for this type. Until a change is necessary.\n\n this.appendInitSegment_[type] = false; // we need to clear out the fmp4 active init segment id, since\n // we are appending the muxer init segment\n\n this.activeInitSegmentId_ = null;\n return initSegment;\n }\n return null;\n }\n }, {\n key: \"handleQuotaExceededError_\",\n value: function handleQuotaExceededError_(_ref53, error) {\n var _this152 = this;\n var segmentInfo = _ref53.segmentInfo,\n type = _ref53.type,\n bytes = _ref53.bytes;\n var audioBuffered = this.sourceUpdater_.audioBuffered();\n var videoBuffered = this.sourceUpdater_.videoBuffered(); // For now we're ignoring any notion of gaps in the buffer, but they, in theory,\n // should be cleared out during the buffer removals. However, log in case it helps\n // debug.\n\n if (audioBuffered.length > 1) {\n this.logger_('On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: ' + timeRangesToArray(audioBuffered).join(', '));\n }\n if (videoBuffered.length > 1) {\n this.logger_('On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: ' + timeRangesToArray(videoBuffered).join(', '));\n }\n var audioBufferStart = audioBuffered.length ? audioBuffered.start(0) : 0;\n var audioBufferEnd = audioBuffered.length ? audioBuffered.end(audioBuffered.length - 1) : 0;\n var videoBufferStart = videoBuffered.length ? videoBuffered.start(0) : 0;\n var videoBufferEnd = videoBuffered.length ? videoBuffered.end(videoBuffered.length - 1) : 0;\n if (audioBufferEnd - audioBufferStart <= MIN_BACK_BUFFER && videoBufferEnd - videoBufferStart <= MIN_BACK_BUFFER) {\n // Can't remove enough buffer to make room for new segment (or the browser doesn't\n // allow for appends of segments this size). In the future, it may be possible to\n // split up the segment and append in pieces, but for now, error out this playlist\n // in an attempt to switch to a more manageable rendition.\n this.logger_('On QUOTA_EXCEEDED_ERR, single segment too large to append to ' + 'buffer, triggering an error. ' + \"Appended byte length: \".concat(bytes.byteLength, \", \") + \"audio buffer: \".concat(timeRangesToArray(audioBuffered).join(', '), \", \") + \"video buffer: \".concat(timeRangesToArray(videoBuffered).join(', '), \", \"));\n this.error({\n message: 'Quota exceeded error with append of a single segment of content',\n excludeUntil: Infinity\n });\n this.trigger('error');\n return;\n } // To try to resolve the quota exceeded error, clear back buffer and retry. This means\n // that the segment-loader should block on future events until this one is handled, so\n // that it doesn't keep moving onto further segments. Adding the call to the call\n // queue will prevent further appends until waitingOnRemove_ and\n // quotaExceededErrorRetryTimeout_ are cleared.\n //\n // Note that this will only block the current loader. In the case of demuxed content,\n // the other load may keep filling as fast as possible. In practice, this should be\n // OK, as it is a rare case when either audio has a high enough bitrate to fill up a\n // source buffer, or video fills without enough room for audio to append (and without\n // the availability of clearing out seconds of back buffer to make room for audio).\n // But it might still be good to handle this case in the future as a TODO.\n\n this.waitingOnRemove_ = true;\n this.callQueue_.push(this.appendToSourceBuffer_.bind(this, {\n segmentInfo: segmentInfo,\n type: type,\n bytes: bytes\n }));\n var currentTime = this.currentTime_(); // Try to remove as much audio and video as possible to make room for new content\n // before retrying.\n\n var timeToRemoveUntil = currentTime - MIN_BACK_BUFFER;\n this.logger_(\"On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to \".concat(timeToRemoveUntil));\n this.remove(0, timeToRemoveUntil, function () {\n _this152.logger_(\"On QUOTA_EXCEEDED_ERR, retrying append in \".concat(MIN_BACK_BUFFER, \"s\"));\n _this152.waitingOnRemove_ = false; // wait the length of time alotted in the back buffer to prevent wasted\n // attempts (since we can't clear less than the minimum)\n\n _this152.quotaExceededErrorRetryTimeout_ = window$1.setTimeout(function () {\n _this152.logger_('On QUOTA_EXCEEDED_ERR, re-processing call queue');\n _this152.quotaExceededErrorRetryTimeout_ = null;\n _this152.processCallQueue_();\n }, MIN_BACK_BUFFER * 1000);\n }, true);\n }\n }, {\n key: \"handleAppendError_\",\n value: function handleAppendError_(_ref54, error) {\n var segmentInfo = _ref54.segmentInfo,\n type = _ref54.type,\n bytes = _ref54.bytes;\n // if there's no error, nothing to do\n if (!error) {\n return;\n }\n if (error.code === QUOTA_EXCEEDED_ERR) {\n this.handleQuotaExceededError_({\n segmentInfo: segmentInfo,\n type: type,\n bytes: bytes\n }); // A quota exceeded error should be recoverable with a future re-append, so no need\n // to trigger an append error.\n\n return;\n }\n this.logger_('Received non QUOTA_EXCEEDED_ERR on append', error);\n this.error(\"\".concat(type, \" append of \").concat(bytes.length, \"b failed for segment \") + \"#\".concat(segmentInfo.mediaIndex, \" in playlist \").concat(segmentInfo.playlist.id)); // If an append errors, we often can't recover.\n // (see https://w3c.github.io/media-source/#sourcebuffer-append-error).\n //\n // Trigger a special error so that it can be handled separately from normal,\n // recoverable errors.\n\n this.trigger('appenderror');\n }\n }, {\n key: \"appendToSourceBuffer_\",\n value: function appendToSourceBuffer_(_ref55) {\n var segmentInfo = _ref55.segmentInfo,\n type = _ref55.type,\n initSegment = _ref55.initSegment,\n data = _ref55.data,\n bytes = _ref55.bytes;\n // If this is a re-append, bytes were already created and don't need to be recreated\n if (!bytes) {\n var segments = [data];\n var byteLength = data.byteLength;\n if (initSegment) {\n // if the media initialization segment is changing, append it before the content\n // segment\n segments.unshift(initSegment);\n byteLength += initSegment.byteLength;\n } // Technically we should be OK appending the init segment separately, however, we\n // haven't yet tested that, and prepending is how we have always done things.\n\n bytes = concatSegments({\n bytes: byteLength,\n segments: segments\n });\n }\n this.sourceUpdater_.appendBuffer({\n segmentInfo: segmentInfo,\n type: type,\n bytes: bytes\n }, this.handleAppendError_.bind(this, {\n segmentInfo: segmentInfo,\n type: type,\n bytes: bytes\n }));\n }\n }, {\n key: \"handleSegmentTimingInfo_\",\n value: function handleSegmentTimingInfo_(type, requestId, segmentTimingInfo) {\n if (!this.pendingSegment_ || requestId !== this.pendingSegment_.requestId) {\n return;\n }\n var segment = this.pendingSegment_.segment;\n var timingInfoProperty = \"\".concat(type, \"TimingInfo\");\n if (!segment[timingInfoProperty]) {\n segment[timingInfoProperty] = {};\n }\n segment[timingInfoProperty].transmuxerPrependedSeconds = segmentTimingInfo.prependedContentDuration || 0;\n segment[timingInfoProperty].transmuxedPresentationStart = segmentTimingInfo.start.presentation;\n segment[timingInfoProperty].transmuxedDecodeStart = segmentTimingInfo.start.decode;\n segment[timingInfoProperty].transmuxedPresentationEnd = segmentTimingInfo.end.presentation;\n segment[timingInfoProperty].transmuxedDecodeEnd = segmentTimingInfo.end.decode; // mainly used as a reference for debugging\n\n segment[timingInfoProperty].baseMediaDecodeTime = segmentTimingInfo.baseMediaDecodeTime;\n }\n }, {\n key: \"appendData_\",\n value: function appendData_(segmentInfo, result) {\n var type = result.type,\n data = result.data;\n if (!data || !data.byteLength) {\n return;\n }\n if (type === 'audio' && this.audioDisabled_) {\n return;\n }\n var initSegment = this.getInitSegmentAndUpdateState_({\n type: type,\n initSegment: result.initSegment,\n playlist: segmentInfo.playlist,\n map: segmentInfo.isFmp4 ? segmentInfo.segment.map : null\n });\n this.appendToSourceBuffer_({\n segmentInfo: segmentInfo,\n type: type,\n initSegment: initSegment,\n data: data\n });\n }\n /**\n * load a specific segment from a request into the buffer\n *\n * @private\n */\n }, {\n key: \"loadSegment_\",\n value: function loadSegment_(segmentInfo) {\n var _this153 = this;\n this.state = 'WAITING';\n this.pendingSegment_ = segmentInfo;\n this.trimBackBuffer_(segmentInfo);\n if (typeof segmentInfo.timestampOffset === 'number') {\n if (this.transmuxer_) {\n this.transmuxer_.postMessage({\n action: 'clearAllMp4Captions'\n });\n }\n }\n if (!this.hasEnoughInfoToLoad_()) {\n this.loadQueue_.push(function () {\n // regenerate the audioAppendStart, timestampOffset, etc as they\n // may have changed since this function was added to the queue.\n var options = _extends({}, segmentInfo, {\n forceTimestampOffset: true\n });\n _extends(segmentInfo, _this153.generateSegmentInfo_(options));\n _this153.isPendingTimestampOffset_ = false;\n _this153.updateTransmuxerAndRequestSegment_(segmentInfo);\n });\n return;\n }\n this.updateTransmuxerAndRequestSegment_(segmentInfo);\n }\n }, {\n key: \"updateTransmuxerAndRequestSegment_\",\n value: function updateTransmuxerAndRequestSegment_(segmentInfo) {\n var _this154 = this;\n // We'll update the source buffer's timestamp offset once we have transmuxed data, but\n // the transmuxer still needs to be updated before then.\n //\n // Even though keepOriginalTimestamps is set to true for the transmuxer, timestamp\n // offset must be passed to the transmuxer for stream correcting adjustments.\n if (this.shouldUpdateTransmuxerTimestampOffset_(segmentInfo.timestampOffset)) {\n this.gopBuffer_.length = 0; // gopsToAlignWith was set before the GOP buffer was cleared\n\n segmentInfo.gopsToAlignWith = [];\n this.timeMapping_ = 0; // reset values in the transmuxer since a discontinuity should start fresh\n\n this.transmuxer_.postMessage({\n action: 'reset'\n });\n this.transmuxer_.postMessage({\n action: 'setTimestampOffset',\n timestampOffset: segmentInfo.timestampOffset\n });\n }\n var simpleSegment = this.createSimplifiedSegmentObj_(segmentInfo);\n var isEndOfStream = this.isEndOfStream_(segmentInfo.mediaIndex, segmentInfo.playlist, segmentInfo.partIndex);\n var isWalkingForward = this.mediaIndex !== null;\n var isDiscontinuity = segmentInfo.timeline !== this.currentTimeline_ &&\n // currentTimeline starts at -1, so we shouldn't end the timeline switching to 0,\n // the first timeline\n segmentInfo.timeline > 0;\n var isEndOfTimeline = isEndOfStream || isWalkingForward && isDiscontinuity;\n this.logger_(\"Requesting \".concat(segmentInfoString(segmentInfo))); // If there's an init segment associated with this segment, but it is not cached (identified by a lack of bytes),\n // then this init segment has never been seen before and should be appended.\n //\n // At this point the content type (audio/video or both) is not yet known, but it should be safe to set\n // both to true and leave the decision of whether to append the init segment to append time.\n\n if (simpleSegment.map && !simpleSegment.map.bytes) {\n this.logger_('going to request init segment.');\n this.appendInitSegment_ = {\n video: true,\n audio: true\n };\n }\n segmentInfo.abortRequests = mediaSegmentRequest({\n xhr: this.vhs_.xhr,\n xhrOptions: this.xhrOptions_,\n decryptionWorker: this.decrypter_,\n segment: simpleSegment,\n abortFn: this.handleAbort_.bind(this, segmentInfo),\n progressFn: this.handleProgress_.bind(this),\n trackInfoFn: this.handleTrackInfo_.bind(this),\n timingInfoFn: this.handleTimingInfo_.bind(this),\n videoSegmentTimingInfoFn: this.handleSegmentTimingInfo_.bind(this, 'video', segmentInfo.requestId),\n audioSegmentTimingInfoFn: this.handleSegmentTimingInfo_.bind(this, 'audio', segmentInfo.requestId),\n captionsFn: this.handleCaptions_.bind(this),\n isEndOfTimeline: isEndOfTimeline,\n endedTimelineFn: function endedTimelineFn() {\n _this154.logger_('received endedtimeline callback');\n },\n id3Fn: this.handleId3_.bind(this),\n dataFn: this.handleData_.bind(this),\n doneFn: this.segmentRequestFinished_.bind(this),\n onTransmuxerLog: function onTransmuxerLog(_ref56) {\n var message = _ref56.message,\n level = _ref56.level,\n stream = _ref56.stream;\n _this154.logger_(\"\".concat(segmentInfoString(segmentInfo), \" logged from transmuxer stream \").concat(stream, \" as a \").concat(level, \": \").concat(message));\n }\n });\n }\n /**\n * trim the back buffer so that we don't have too much data\n * in the source buffer\n *\n * @private\n *\n * @param {Object} segmentInfo - the current segment\n */\n }, {\n key: \"trimBackBuffer_\",\n value: function trimBackBuffer_(segmentInfo) {\n var removeToTime = safeBackBufferTrimTime(this.seekable_(), this.currentTime_(), this.playlist_.targetDuration || 10); // Chrome has a hard limit of 150MB of\n // buffer and a very conservative \"garbage collector\"\n // We manually clear out the old buffer to ensure\n // we don't trigger the QuotaExceeded error\n // on the source buffer during subsequent appends\n\n if (removeToTime > 0) {\n this.remove(0, removeToTime);\n }\n }\n /**\n * created a simplified copy of the segment object with just the\n * information necessary to perform the XHR and decryption\n *\n * @private\n *\n * @param {Object} segmentInfo - the current segment\n * @return {Object} a simplified segment object copy\n */\n }, {\n key: \"createSimplifiedSegmentObj_\",\n value: function createSimplifiedSegmentObj_(segmentInfo) {\n var segment = segmentInfo.segment;\n var part = segmentInfo.part;\n var simpleSegment = {\n resolvedUri: part ? part.resolvedUri : segment.resolvedUri,\n byterange: part ? part.byterange : segment.byterange,\n requestId: segmentInfo.requestId,\n transmuxer: segmentInfo.transmuxer,\n audioAppendStart: segmentInfo.audioAppendStart,\n gopsToAlignWith: segmentInfo.gopsToAlignWith,\n part: segmentInfo.part\n };\n var previousSegment = segmentInfo.playlist.segments[segmentInfo.mediaIndex - 1];\n if (previousSegment && previousSegment.timeline === segment.timeline) {\n // The baseStartTime of a segment is used to handle rollover when probing the TS\n // segment to retrieve timing information. Since the probe only looks at the media's\n // times (e.g., PTS and DTS values of the segment), and doesn't consider the\n // player's time (e.g., player.currentTime()), baseStartTime should reflect the\n // media time as well. transmuxedDecodeEnd represents the end time of a segment, in\n // seconds of media time, so should be used here. The previous segment is used since\n // the end of the previous segment should represent the beginning of the current\n // segment, so long as they are on the same timeline.\n if (previousSegment.videoTimingInfo) {\n simpleSegment.baseStartTime = previousSegment.videoTimingInfo.transmuxedDecodeEnd;\n } else if (previousSegment.audioTimingInfo) {\n simpleSegment.baseStartTime = previousSegment.audioTimingInfo.transmuxedDecodeEnd;\n }\n }\n if (segment.key) {\n // if the media sequence is greater than 2^32, the IV will be incorrect\n // assuming 10s segments, that would be about 1300 years\n var iv = segment.key.iv || new Uint32Array([0, 0, 0, segmentInfo.mediaIndex + segmentInfo.playlist.mediaSequence]);\n simpleSegment.key = this.segmentKey(segment.key);\n simpleSegment.key.iv = iv;\n }\n if (segment.map) {\n simpleSegment.map = this.initSegmentForMap(segment.map);\n }\n return simpleSegment;\n }\n }, {\n key: \"saveTransferStats_\",\n value: function saveTransferStats_(stats) {\n // every request counts as a media request even if it has been aborted\n // or canceled due to a timeout\n this.mediaRequests += 1;\n if (stats) {\n this.mediaBytesTransferred += stats.bytesReceived;\n this.mediaTransferDuration += stats.roundTripTime;\n }\n }\n }, {\n key: \"saveBandwidthRelatedStats_\",\n value: function saveBandwidthRelatedStats_(duration, stats) {\n // byteLength will be used for throughput, and should be based on bytes receieved,\n // which we only know at the end of the request and should reflect total bytes\n // downloaded rather than just bytes processed from components of the segment\n this.pendingSegment_.byteLength = stats.bytesReceived;\n if (duration < MIN_SEGMENT_DURATION_TO_SAVE_STATS) {\n this.logger_(\"Ignoring segment's bandwidth because its duration of \".concat(duration) + \" is less than the min to record \".concat(MIN_SEGMENT_DURATION_TO_SAVE_STATS));\n return;\n }\n this.bandwidth = stats.bandwidth;\n this.roundTrip = stats.roundTripTime;\n }\n }, {\n key: \"handleTimeout_\",\n value: function handleTimeout_() {\n // although the VTT segment loader bandwidth isn't really used, it's good to\n // maintain functinality between segment loaders\n this.mediaRequestsTimedout += 1;\n this.bandwidth = 1;\n this.roundTrip = NaN;\n this.trigger('bandwidthupdate');\n this.trigger('timeout');\n }\n /**\n * Handle the callback from the segmentRequest function and set the\n * associated SegmentLoader state and errors if necessary\n *\n * @private\n */\n }, {\n key: \"segmentRequestFinished_\",\n value: function segmentRequestFinished_(error, simpleSegment, result) {\n // TODO handle special cases, e.g., muxed audio/video but only audio in the segment\n // check the call queue directly since this function doesn't need to deal with any\n // data, and can continue even if the source buffers are not set up and we didn't get\n // any data from the segment\n if (this.callQueue_.length) {\n this.callQueue_.push(this.segmentRequestFinished_.bind(this, error, simpleSegment, result));\n return;\n }\n this.saveTransferStats_(simpleSegment.stats); // The request was aborted and the SegmentLoader has already been reset\n\n if (!this.pendingSegment_) {\n return;\n } // the request was aborted and the SegmentLoader has already started\n // another request. this can happen when the timeout for an aborted\n // request triggers due to a limitation in the XHR library\n // do not count this as any sort of request or we risk double-counting\n\n if (simpleSegment.requestId !== this.pendingSegment_.requestId) {\n return;\n } // an error occurred from the active pendingSegment_ so reset everything\n\n if (error) {\n this.pendingSegment_ = null;\n this.state = 'READY'; // aborts are not a true error condition and nothing corrective needs to be done\n\n if (error.code === REQUEST_ERRORS.ABORTED) {\n return;\n }\n this.pause(); // the error is really just that at least one of the requests timed-out\n // set the bandwidth to a very low value and trigger an ABR switch to\n // take emergency action\n\n if (error.code === REQUEST_ERRORS.TIMEOUT) {\n this.handleTimeout_();\n return;\n } // if control-flow has arrived here, then the error is real\n // emit an error event to exclude the current playlist\n\n this.mediaRequestsErrored += 1;\n this.error(error);\n this.trigger('error');\n return;\n }\n var segmentInfo = this.pendingSegment_; // the response was a success so set any bandwidth stats the request\n // generated for ABR purposes\n\n this.saveBandwidthRelatedStats_(segmentInfo.duration, simpleSegment.stats);\n segmentInfo.endOfAllRequests = simpleSegment.endOfAllRequests;\n if (result.gopInfo) {\n this.gopBuffer_ = updateGopBuffer(this.gopBuffer_, result.gopInfo, this.safeAppend_);\n } // Although we may have already started appending on progress, we shouldn't switch the\n // state away from loading until we are officially done loading the segment data.\n\n this.state = 'APPENDING'; // used for testing\n\n this.trigger('appending');\n this.waitForAppendsToComplete_(segmentInfo);\n }\n }, {\n key: \"setTimeMapping_\",\n value: function setTimeMapping_(timeline) {\n var timelineMapping = this.syncController_.mappingForTimeline(timeline);\n if (timelineMapping !== null) {\n this.timeMapping_ = timelineMapping;\n }\n }\n }, {\n key: \"updateMediaSecondsLoaded_\",\n value: function updateMediaSecondsLoaded_(segment) {\n if (typeof segment.start === 'number' && typeof segment.end === 'number') {\n this.mediaSecondsLoaded += segment.end - segment.start;\n } else {\n this.mediaSecondsLoaded += segment.duration;\n }\n }\n }, {\n key: \"shouldUpdateTransmuxerTimestampOffset_\",\n value: function shouldUpdateTransmuxerTimestampOffset_(timestampOffset) {\n if (timestampOffset === null) {\n return false;\n } // note that we're potentially using the same timestamp offset for both video and\n // audio\n\n if (this.loaderType_ === 'main' && timestampOffset !== this.sourceUpdater_.videoTimestampOffset()) {\n return true;\n }\n if (!this.audioDisabled_ && timestampOffset !== this.sourceUpdater_.audioTimestampOffset()) {\n return true;\n }\n return false;\n }\n }, {\n key: \"trueSegmentStart_\",\n value: function trueSegmentStart_(_ref57) {\n var currentStart = _ref57.currentStart,\n playlist = _ref57.playlist,\n mediaIndex = _ref57.mediaIndex,\n firstVideoFrameTimeForData = _ref57.firstVideoFrameTimeForData,\n currentVideoTimestampOffset = _ref57.currentVideoTimestampOffset,\n useVideoTimingInfo = _ref57.useVideoTimingInfo,\n videoTimingInfo = _ref57.videoTimingInfo,\n audioTimingInfo = _ref57.audioTimingInfo;\n if (typeof currentStart !== 'undefined') {\n // if start was set once, keep using it\n return currentStart;\n }\n if (!useVideoTimingInfo) {\n return audioTimingInfo.start;\n }\n var previousSegment = playlist.segments[mediaIndex - 1]; // The start of a segment should be the start of the first full frame contained\n // within that segment. Since the transmuxer maintains a cache of incomplete data\n // from and/or the last frame seen, the start time may reflect a frame that starts\n // in the previous segment. Check for that case and ensure the start time is\n // accurate for the segment.\n\n if (mediaIndex === 0 || !previousSegment || typeof previousSegment.start === 'undefined' || previousSegment.end !== firstVideoFrameTimeForData + currentVideoTimestampOffset) {\n return firstVideoFrameTimeForData;\n }\n return videoTimingInfo.start;\n }\n }, {\n key: \"waitForAppendsToComplete_\",\n value: function waitForAppendsToComplete_(segmentInfo) {\n var trackInfo = this.getCurrentMediaInfo_(segmentInfo);\n if (!trackInfo) {\n this.error({\n message: 'No starting media returned, likely due to an unsupported media format.',\n playlistExclusionDuration: Infinity\n });\n this.trigger('error');\n return;\n } // Although transmuxing is done, appends may not yet be finished. Throw a marker\n // on each queue this loader is responsible for to ensure that the appends are\n // complete.\n\n var hasAudio = trackInfo.hasAudio,\n hasVideo = trackInfo.hasVideo,\n isMuxed = trackInfo.isMuxed;\n var waitForVideo = this.loaderType_ === 'main' && hasVideo;\n var waitForAudio = !this.audioDisabled_ && hasAudio && !isMuxed;\n segmentInfo.waitingOnAppends = 0; // segments with no data\n\n if (!segmentInfo.hasAppendedData_) {\n if (!segmentInfo.timingInfo && typeof segmentInfo.timestampOffset === 'number') {\n // When there's no audio or video data in the segment, there's no audio or video\n // timing information.\n //\n // If there's no audio or video timing information, then the timestamp offset\n // can't be adjusted to the appropriate value for the transmuxer and source\n // buffers.\n //\n // Therefore, the next segment should be used to set the timestamp offset.\n this.isPendingTimestampOffset_ = true;\n } // override settings for metadata only segments\n\n segmentInfo.timingInfo = {\n start: 0\n };\n segmentInfo.waitingOnAppends++;\n if (!this.isPendingTimestampOffset_) {\n // update the timestampoffset\n this.updateSourceBufferTimestampOffset_(segmentInfo); // make sure the metadata queue is processed even though we have\n // no video/audio data.\n\n this.processMetadataQueue_();\n } // append is \"done\" instantly with no data.\n\n this.checkAppendsDone_(segmentInfo);\n return;\n } // Since source updater could call back synchronously, do the increments first.\n\n if (waitForVideo) {\n segmentInfo.waitingOnAppends++;\n }\n if (waitForAudio) {\n segmentInfo.waitingOnAppends++;\n }\n if (waitForVideo) {\n this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this, segmentInfo));\n }\n if (waitForAudio) {\n this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this, segmentInfo));\n }\n }\n }, {\n key: \"checkAppendsDone_\",\n value: function checkAppendsDone_(segmentInfo) {\n if (this.checkForAbort_(segmentInfo.requestId)) {\n return;\n }\n segmentInfo.waitingOnAppends--;\n if (segmentInfo.waitingOnAppends === 0) {\n this.handleAppendsDone_();\n }\n }\n }, {\n key: \"checkForIllegalMediaSwitch\",\n value: function checkForIllegalMediaSwitch(trackInfo) {\n var illegalMediaSwitchError = illegalMediaSwitch(this.loaderType_, this.getCurrentMediaInfo_(), trackInfo);\n if (illegalMediaSwitchError) {\n this.error({\n message: illegalMediaSwitchError,\n playlistExclusionDuration: Infinity\n });\n this.trigger('error');\n return true;\n }\n return false;\n }\n }, {\n key: \"updateSourceBufferTimestampOffset_\",\n value: function updateSourceBufferTimestampOffset_(segmentInfo) {\n if (segmentInfo.timestampOffset === null ||\n // we don't yet have the start for whatever media type (video or audio) has\n // priority, timing-wise, so we must wait\n typeof segmentInfo.timingInfo.start !== 'number' ||\n // already updated the timestamp offset for this segment\n segmentInfo.changedTimestampOffset ||\n // the alt audio loader should not be responsible for setting the timestamp offset\n this.loaderType_ !== 'main') {\n return;\n }\n var didChange = false; // Primary timing goes by video, and audio is trimmed in the transmuxer, meaning that\n // the timing info here comes from video. In the event that the audio is longer than\n // the video, this will trim the start of the audio.\n // This also trims any offset from 0 at the beginning of the media\n\n segmentInfo.timestampOffset -= this.getSegmentStartTimeForTimestampOffsetCalculation_({\n videoTimingInfo: segmentInfo.segment.videoTimingInfo,\n audioTimingInfo: segmentInfo.segment.audioTimingInfo,\n timingInfo: segmentInfo.timingInfo\n }); // In the event that there are part segment downloads, each will try to update the\n // timestamp offset. Retaining this bit of state prevents us from updating in the\n // future (within the same segment), however, there may be a better way to handle it.\n\n segmentInfo.changedTimestampOffset = true;\n if (segmentInfo.timestampOffset !== this.sourceUpdater_.videoTimestampOffset()) {\n this.sourceUpdater_.videoTimestampOffset(segmentInfo.timestampOffset);\n didChange = true;\n }\n if (segmentInfo.timestampOffset !== this.sourceUpdater_.audioTimestampOffset()) {\n this.sourceUpdater_.audioTimestampOffset(segmentInfo.timestampOffset);\n didChange = true;\n }\n if (didChange) {\n this.trigger('timestampoffset');\n }\n }\n }, {\n key: \"getSegmentStartTimeForTimestampOffsetCalculation_\",\n value: function getSegmentStartTimeForTimestampOffsetCalculation_(_ref58) {\n var videoTimingInfo = _ref58.videoTimingInfo,\n audioTimingInfo = _ref58.audioTimingInfo,\n timingInfo = _ref58.timingInfo;\n if (!this.useDtsForTimestampOffset_) {\n return timingInfo.start;\n }\n if (videoTimingInfo && typeof videoTimingInfo.transmuxedDecodeStart === 'number') {\n return videoTimingInfo.transmuxedDecodeStart;\n } // handle audio only\n\n if (audioTimingInfo && typeof audioTimingInfo.transmuxedDecodeStart === 'number') {\n return audioTimingInfo.transmuxedDecodeStart;\n } // handle content not transmuxed (e.g., MP4)\n\n return timingInfo.start;\n }\n }, {\n key: \"updateTimingInfoEnd_\",\n value: function updateTimingInfoEnd_(segmentInfo) {\n segmentInfo.timingInfo = segmentInfo.timingInfo || {};\n var trackInfo = this.getMediaInfo_();\n var useVideoTimingInfo = this.loaderType_ === 'main' && trackInfo && trackInfo.hasVideo;\n var prioritizedTimingInfo = useVideoTimingInfo && segmentInfo.videoTimingInfo ? segmentInfo.videoTimingInfo : segmentInfo.audioTimingInfo;\n if (!prioritizedTimingInfo) {\n return;\n }\n segmentInfo.timingInfo.end = typeof prioritizedTimingInfo.end === 'number' ?\n // End time may not exist in a case where we aren't parsing the full segment (one\n // current example is the case of fmp4), so use the rough duration to calculate an\n // end time.\n prioritizedTimingInfo.end : prioritizedTimingInfo.start + segmentInfo.duration;\n }\n /**\n * callback to run when appendBuffer is finished. detects if we are\n * in a good state to do things with the data we got, or if we need\n * to wait for more\n *\n * @private\n */\n }, {\n key: \"handleAppendsDone_\",\n value: function handleAppendsDone_() {\n // appendsdone can cause an abort\n if (this.pendingSegment_) {\n this.trigger('appendsdone');\n }\n if (!this.pendingSegment_) {\n this.state = 'READY'; // TODO should this move into this.checkForAbort to speed up requests post abort in\n // all appending cases?\n\n if (!this.paused()) {\n this.monitorBuffer_();\n }\n return;\n }\n var segmentInfo = this.pendingSegment_; // Now that the end of the segment has been reached, we can set the end time. It's\n // best to wait until all appends are done so we're sure that the primary media is\n // finished (and we have its end time).\n\n this.updateTimingInfoEnd_(segmentInfo);\n if (this.shouldSaveSegmentTimingInfo_) {\n // Timeline mappings should only be saved for the main loader. This is for multiple\n // reasons:\n //\n // 1) Only one mapping is saved per timeline, meaning that if both the audio loader\n // and the main loader try to save the timeline mapping, whichever comes later\n // will overwrite the first. In theory this is OK, as the mappings should be the\n // same, however, it breaks for (2)\n // 2) In the event of a live stream, the initial live point will make for a somewhat\n // arbitrary mapping. If audio and video streams are not perfectly in-sync, then\n // the mapping will be off for one of the streams, dependent on which one was\n // first saved (see (1)).\n // 3) Primary timing goes by video in VHS, so the mapping should be video.\n //\n // Since the audio loader will wait for the main loader to load the first segment,\n // the main loader will save the first timeline mapping, and ensure that there won't\n // be a case where audio loads two segments without saving a mapping (thus leading\n // to missing segment timing info).\n this.syncController_.saveSegmentTimingInfo({\n segmentInfo: segmentInfo,\n shouldSaveTimelineMapping: this.loaderType_ === 'main'\n });\n }\n var segmentDurationMessage = getTroublesomeSegmentDurationMessage(segmentInfo, this.sourceType_);\n if (segmentDurationMessage) {\n if (segmentDurationMessage.severity === 'warn') {\n videojs.log.warn(segmentDurationMessage.message);\n } else {\n this.logger_(segmentDurationMessage.message);\n }\n }\n this.recordThroughput_(segmentInfo);\n this.pendingSegment_ = null;\n this.state = 'READY';\n if (segmentInfo.isSyncRequest) {\n this.trigger('syncinfoupdate'); // if the sync request was not appended\n // then it was not the correct segment.\n // throw it away and use the data it gave us\n // to get the correct one.\n\n if (!segmentInfo.hasAppendedData_) {\n this.logger_(\"Throwing away un-appended sync request \".concat(segmentInfoString(segmentInfo)));\n return;\n }\n }\n this.logger_(\"Appended \".concat(segmentInfoString(segmentInfo)));\n this.addSegmentMetadataCue_(segmentInfo);\n if (this.currentTime_() >= this.replaceSegmentsUntil_) {\n this.replaceSegmentsUntil_ = -1;\n this.fetchAtBuffer_ = true;\n }\n if (this.currentTimeline_ !== segmentInfo.timeline) {\n this.timelineChangeController_.lastTimelineChange({\n type: this.loaderType_,\n from: this.currentTimeline_,\n to: segmentInfo.timeline\n }); // If audio is not disabled, the main segment loader is responsible for updating\n // the audio timeline as well. If the content is video only, this won't have any\n // impact.\n\n if (this.loaderType_ === 'main' && !this.audioDisabled_) {\n this.timelineChangeController_.lastTimelineChange({\n type: 'audio',\n from: this.currentTimeline_,\n to: segmentInfo.timeline\n });\n }\n }\n this.currentTimeline_ = segmentInfo.timeline; // We must update the syncinfo to recalculate the seekable range before\n // the following conditional otherwise it may consider this a bad \"guess\"\n // and attempt to resync when the post-update seekable window and live\n // point would mean that this was the perfect segment to fetch\n\n this.trigger('syncinfoupdate');\n var segment = segmentInfo.segment;\n var part = segmentInfo.part;\n var badSegmentGuess = segment.end && this.currentTime_() - segment.end > segmentInfo.playlist.targetDuration * 3;\n var badPartGuess = part && part.end && this.currentTime_() - part.end > segmentInfo.playlist.partTargetDuration * 3; // If we previously appended a segment/part that ends more than 3 part/targetDurations before\n // the currentTime_ that means that our conservative guess was too conservative.\n // In that case, reset the loader state so that we try to use any information gained\n // from the previous request to create a new, more accurate, sync-point.\n\n if (badSegmentGuess || badPartGuess) {\n this.logger_(\"bad \".concat(badSegmentGuess ? 'segment' : 'part', \" \").concat(segmentInfoString(segmentInfo)));\n this.resetEverything();\n return;\n }\n var isWalkingForward = this.mediaIndex !== null; // Don't do a rendition switch unless we have enough time to get a sync segment\n // and conservatively guess\n\n if (isWalkingForward) {\n this.trigger('bandwidthupdate');\n }\n this.trigger('progress');\n this.mediaIndex = segmentInfo.mediaIndex;\n this.partIndex = segmentInfo.partIndex; // any time an update finishes and the last segment is in the\n // buffer, end the stream. this ensures the \"ended\" event will\n // fire if playback reaches that point.\n\n if (this.isEndOfStream_(segmentInfo.mediaIndex, segmentInfo.playlist, segmentInfo.partIndex)) {\n this.endOfStream();\n } // used for testing\n\n this.trigger('appended');\n if (segmentInfo.hasAppendedData_) {\n this.mediaAppends++;\n }\n if (!this.paused()) {\n this.monitorBuffer_();\n }\n }\n /**\n * Records the current throughput of the decrypt, transmux, and append\n * portion of the semgment pipeline. `throughput.rate` is a the cumulative\n * moving average of the throughput. `throughput.count` is the number of\n * data points in the average.\n *\n * @private\n * @param {Object} segmentInfo the object returned by loadSegment\n */\n }, {\n key: \"recordThroughput_\",\n value: function recordThroughput_(segmentInfo) {\n if (segmentInfo.duration < MIN_SEGMENT_DURATION_TO_SAVE_STATS) {\n this.logger_(\"Ignoring segment's throughput because its duration of \".concat(segmentInfo.duration) + \" is less than the min to record \".concat(MIN_SEGMENT_DURATION_TO_SAVE_STATS));\n return;\n }\n var rate = this.throughput.rate; // Add one to the time to ensure that we don't accidentally attempt to divide\n // by zero in the case where the throughput is ridiculously high\n\n var segmentProcessingTime = Date.now() - segmentInfo.endOfAllRequests + 1; // Multiply by 8000 to convert from bytes/millisecond to bits/second\n\n var segmentProcessingThroughput = Math.floor(segmentInfo.byteLength / segmentProcessingTime * 8 * 1000); // This is just a cumulative moving average calculation:\n // newAvg = oldAvg + (sample - oldAvg) / (sampleCount + 1)\n\n this.throughput.rate += (segmentProcessingThroughput - rate) / ++this.throughput.count;\n }\n /**\n * Adds a cue to the segment-metadata track with some metadata information about the\n * segment\n *\n * @private\n * @param {Object} segmentInfo\n * the object returned by loadSegment\n * @method addSegmentMetadataCue_\n */\n }, {\n key: \"addSegmentMetadataCue_\",\n value: function addSegmentMetadataCue_(segmentInfo) {\n if (!this.segmentMetadataTrack_) {\n return;\n }\n var segment = segmentInfo.segment;\n var start = segment.start;\n var end = segment.end; // Do not try adding the cue if the start and end times are invalid.\n\n if (!finite(start) || !finite(end)) {\n return;\n }\n removeCuesFromTrack(start, end, this.segmentMetadataTrack_);\n var Cue = window$1.WebKitDataCue || window$1.VTTCue;\n var value = {\n custom: segment.custom,\n dateTimeObject: segment.dateTimeObject,\n dateTimeString: segment.dateTimeString,\n programDateTime: segment.programDateTime,\n bandwidth: segmentInfo.playlist.attributes.BANDWIDTH,\n resolution: segmentInfo.playlist.attributes.RESOLUTION,\n codecs: segmentInfo.playlist.attributes.CODECS,\n byteLength: segmentInfo.byteLength,\n uri: segmentInfo.uri,\n timeline: segmentInfo.timeline,\n playlist: segmentInfo.playlist.id,\n start: start,\n end: end\n };\n var data = JSON.stringify(value);\n var cue = new Cue(start, end, data); // Attach the metadata to the value property of the cue to keep consistency between\n // the differences of WebKitDataCue in safari and VTTCue in other browsers\n\n cue.value = value;\n this.segmentMetadataTrack_.addCue(cue);\n }\n /**\n * Public setter for defining the private replaceSegmentsUntil_ property, which\n * determines when we can return fetchAtBuffer to true if overwriting the buffer.\n *\n * @param {number} bufferedEnd the end of the buffered range to replace segments\n * until currentTime reaches this time.\n */\n }, {\n key: \"replaceSegmentsUntil\",\n set: function set(bufferedEnd) {\n this.logger_(\"Replacing currently buffered segments until \".concat(bufferedEnd));\n this.replaceSegmentsUntil_ = bufferedEnd;\n }\n }]);\n return SegmentLoader;\n}(videojs.EventTarget);\nfunction noop() {}\nvar toTitleCase = function toTitleCase(string) {\n if (typeof string !== 'string') {\n return string;\n }\n return string.replace(/./, function (w) {\n return w.toUpperCase();\n });\n};\n\n/**\n * @file source-updater.js\n */\nvar bufferTypes = ['video', 'audio'];\nvar _updating = function updating(type, sourceUpdater) {\n var sourceBuffer = sourceUpdater[\"\".concat(type, \"Buffer\")];\n return sourceBuffer && sourceBuffer.updating || sourceUpdater.queuePending[type];\n};\nvar nextQueueIndexOfType = function nextQueueIndexOfType(type, queue) {\n for (var _i103 = 0; _i103 < queue.length; _i103++) {\n var queueEntry = queue[_i103];\n if (queueEntry.type === 'mediaSource') {\n // If the next entry is a media source entry (uses multiple source buffers), block\n // processing to allow it to go through first.\n return null;\n }\n if (queueEntry.type === type) {\n return _i103;\n }\n }\n return null;\n};\nvar shiftQueue = function shiftQueue(type, sourceUpdater) {\n if (sourceUpdater.queue.length === 0) {\n return;\n }\n var queueIndex = 0;\n var queueEntry = sourceUpdater.queue[queueIndex];\n if (queueEntry.type === 'mediaSource') {\n if (!sourceUpdater.updating() && sourceUpdater.mediaSource.readyState !== 'closed') {\n sourceUpdater.queue.shift();\n queueEntry.action(sourceUpdater);\n if (queueEntry.doneFn) {\n queueEntry.doneFn();\n } // Only specific source buffer actions must wait for async updateend events. Media\n // Source actions process synchronously. Therefore, both audio and video source\n // buffers are now clear to process the next queue entries.\n\n shiftQueue('audio', sourceUpdater);\n shiftQueue('video', sourceUpdater);\n } // Media Source actions require both source buffers, so if the media source action\n // couldn't process yet (because one or both source buffers are busy), block other\n // queue actions until both are available and the media source action can process.\n\n return;\n }\n if (type === 'mediaSource') {\n // If the queue was shifted by a media source action (this happens when pushing a\n // media source action onto the queue), then it wasn't from an updateend event from an\n // audio or video source buffer, so there's no change from previous state, and no\n // processing should be done.\n return;\n } // Media source queue entries don't need to consider whether the source updater is\n // started (i.e., source buffers are created) as they don't need the source buffers, but\n // source buffer queue entries do.\n\n if (!sourceUpdater.ready() || sourceUpdater.mediaSource.readyState === 'closed' || _updating(type, sourceUpdater)) {\n return;\n }\n if (queueEntry.type !== type) {\n queueIndex = nextQueueIndexOfType(type, sourceUpdater.queue);\n if (queueIndex === null) {\n // Either there's no queue entry that uses this source buffer type in the queue, or\n // there's a media source queue entry before the next entry of this type, in which\n // case wait for that action to process first.\n return;\n }\n queueEntry = sourceUpdater.queue[queueIndex];\n }\n sourceUpdater.queue.splice(queueIndex, 1); // Keep a record that this source buffer type is in use.\n //\n // The queue pending operation must be set before the action is performed in the event\n // that the action results in a synchronous event that is acted upon. For instance, if\n // an exception is thrown that can be handled, it's possible that new actions will be\n // appended to an empty queue and immediately executed, but would not have the correct\n // pending information if this property was set after the action was performed.\n\n sourceUpdater.queuePending[type] = queueEntry;\n queueEntry.action(type, sourceUpdater);\n if (!queueEntry.doneFn) {\n // synchronous operation, process next entry\n sourceUpdater.queuePending[type] = null;\n shiftQueue(type, sourceUpdater);\n return;\n }\n};\nvar cleanupBuffer = function cleanupBuffer(type, sourceUpdater) {\n var buffer = sourceUpdater[\"\".concat(type, \"Buffer\")];\n var titleType = toTitleCase(type);\n if (!buffer) {\n return;\n }\n buffer.removeEventListener('updateend', sourceUpdater[\"on\".concat(titleType, \"UpdateEnd_\")]);\n buffer.removeEventListener('error', sourceUpdater[\"on\".concat(titleType, \"Error_\")]);\n sourceUpdater.codecs[type] = null;\n sourceUpdater[\"\".concat(type, \"Buffer\")] = null;\n};\nvar inSourceBuffers = function inSourceBuffers(mediaSource, sourceBuffer) {\n return mediaSource && sourceBuffer && Array.prototype.indexOf.call(mediaSource.sourceBuffers, sourceBuffer) !== -1;\n};\nvar actions = {\n appendBuffer: function appendBuffer(bytes, segmentInfo, onError) {\n return function (type, sourceUpdater) {\n var sourceBuffer = sourceUpdater[\"\".concat(type, \"Buffer\")]; // can't do anything if the media source / source buffer is null\n // or the media source does not contain this source buffer.\n\n if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n return;\n }\n sourceUpdater.logger_(\"Appending segment \".concat(segmentInfo.mediaIndex, \"'s \").concat(bytes.length, \" bytes to \").concat(type, \"Buffer\"));\n try {\n sourceBuffer.appendBuffer(bytes);\n } catch (e) {\n sourceUpdater.logger_(\"Error with code \".concat(e.code, \" \") + (e.code === QUOTA_EXCEEDED_ERR ? '(QUOTA_EXCEEDED_ERR) ' : '') + \"when appending segment \".concat(segmentInfo.mediaIndex, \" to \").concat(type, \"Buffer\"));\n sourceUpdater.queuePending[type] = null;\n onError(e);\n }\n };\n },\n remove: function remove(start, end) {\n return function (type, sourceUpdater) {\n var sourceBuffer = sourceUpdater[\"\".concat(type, \"Buffer\")]; // can't do anything if the media source / source buffer is null\n // or the media source does not contain this source buffer.\n\n if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n return;\n }\n sourceUpdater.logger_(\"Removing \".concat(start, \" to \").concat(end, \" from \").concat(type, \"Buffer\"));\n try {\n sourceBuffer.remove(start, end);\n } catch (e) {\n sourceUpdater.logger_(\"Remove \".concat(start, \" to \").concat(end, \" from \").concat(type, \"Buffer failed\"));\n }\n };\n },\n timestampOffset: function timestampOffset(offset) {\n return function (type, sourceUpdater) {\n var sourceBuffer = sourceUpdater[\"\".concat(type, \"Buffer\")]; // can't do anything if the media source / source buffer is null\n // or the media source does not contain this source buffer.\n\n if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n return;\n }\n sourceUpdater.logger_(\"Setting \".concat(type, \"timestampOffset to \").concat(offset));\n sourceBuffer.timestampOffset = offset;\n };\n },\n callback: function callback(_callback2) {\n return function (type, sourceUpdater) {\n _callback2();\n };\n },\n endOfStream: function endOfStream(error) {\n return function (sourceUpdater) {\n if (sourceUpdater.mediaSource.readyState !== 'open') {\n return;\n }\n sourceUpdater.logger_(\"Calling mediaSource endOfStream(\".concat(error || '', \")\"));\n try {\n sourceUpdater.mediaSource.endOfStream(error);\n } catch (e) {\n videojs.log.warn('Failed to call media source endOfStream', e);\n }\n };\n },\n duration: function duration(_duration2) {\n return function (sourceUpdater) {\n sourceUpdater.logger_(\"Setting mediaSource duration to \".concat(_duration2));\n try {\n sourceUpdater.mediaSource.duration = _duration2;\n } catch (e) {\n videojs.log.warn('Failed to set media source duration', e);\n }\n };\n },\n abort: function abort() {\n return function (type, sourceUpdater) {\n if (sourceUpdater.mediaSource.readyState !== 'open') {\n return;\n }\n var sourceBuffer = sourceUpdater[\"\".concat(type, \"Buffer\")]; // can't do anything if the media source / source buffer is null\n // or the media source does not contain this source buffer.\n\n if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n return;\n }\n sourceUpdater.logger_(\"calling abort on \".concat(type, \"Buffer\"));\n try {\n sourceBuffer.abort();\n } catch (e) {\n videojs.log.warn(\"Failed to abort on \".concat(type, \"Buffer\"), e);\n }\n };\n },\n addSourceBuffer: function addSourceBuffer(type, codec) {\n return function (sourceUpdater) {\n var titleType = toTitleCase(type);\n var mime = getMimeForCodec(codec);\n sourceUpdater.logger_(\"Adding \".concat(type, \"Buffer with codec \").concat(codec, \" to mediaSource\"));\n var sourceBuffer = sourceUpdater.mediaSource.addSourceBuffer(mime);\n sourceBuffer.addEventListener('updateend', sourceUpdater[\"on\".concat(titleType, \"UpdateEnd_\")]);\n sourceBuffer.addEventListener('error', sourceUpdater[\"on\".concat(titleType, \"Error_\")]);\n sourceUpdater.codecs[type] = codec;\n sourceUpdater[\"\".concat(type, \"Buffer\")] = sourceBuffer;\n };\n },\n removeSourceBuffer: function removeSourceBuffer(type) {\n return function (sourceUpdater) {\n var sourceBuffer = sourceUpdater[\"\".concat(type, \"Buffer\")];\n cleanupBuffer(type, sourceUpdater); // can't do anything if the media source / source buffer is null\n // or the media source does not contain this source buffer.\n\n if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n return;\n }\n sourceUpdater.logger_(\"Removing \".concat(type, \"Buffer with codec \").concat(sourceUpdater.codecs[type], \" from mediaSource\"));\n try {\n sourceUpdater.mediaSource.removeSourceBuffer(sourceBuffer);\n } catch (e) {\n videojs.log.warn(\"Failed to removeSourceBuffer \".concat(type, \"Buffer\"), e);\n }\n };\n },\n changeType: function changeType(codec) {\n return function (type, sourceUpdater) {\n var sourceBuffer = sourceUpdater[\"\".concat(type, \"Buffer\")];\n var mime = getMimeForCodec(codec); // can't do anything if the media source / source buffer is null\n // or the media source does not contain this source buffer.\n\n if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n return;\n } // do not update codec if we don't need to.\n\n if (sourceUpdater.codecs[type] === codec) {\n return;\n }\n sourceUpdater.logger_(\"changing \".concat(type, \"Buffer codec from \").concat(sourceUpdater.codecs[type], \" to \").concat(codec));\n sourceBuffer.changeType(mime);\n sourceUpdater.codecs[type] = codec;\n };\n }\n};\nvar pushQueue = function pushQueue(_ref59) {\n var type = _ref59.type,\n sourceUpdater = _ref59.sourceUpdater,\n action = _ref59.action,\n doneFn = _ref59.doneFn,\n name = _ref59.name;\n sourceUpdater.queue.push({\n type: type,\n action: action,\n doneFn: doneFn,\n name: name\n });\n shiftQueue(type, sourceUpdater);\n};\nvar onUpdateend = function onUpdateend(type, sourceUpdater) {\n return function (e) {\n var buffered = sourceUpdater[\"\".concat(type, \"Buffered\")]();\n var bufferedAsString = prettyBuffered(buffered);\n sourceUpdater.logger_(\"\".concat(type, \" source buffer update end. Buffered: \\n\"), bufferedAsString); // Although there should, in theory, be a pending action for any updateend receieved,\n // there are some actions that may trigger updateend events without set definitions in\n // the w3c spec. For instance, setting the duration on the media source may trigger\n // updateend events on source buffers. This does not appear to be in the spec. As such,\n // if we encounter an updateend without a corresponding pending action from our queue\n // for that source buffer type, process the next action.\n\n if (sourceUpdater.queuePending[type]) {\n var doneFn = sourceUpdater.queuePending[type].doneFn;\n sourceUpdater.queuePending[type] = null;\n if (doneFn) {\n // if there's an error, report it\n doneFn(sourceUpdater[\"\".concat(type, \"Error_\")]);\n }\n }\n shiftQueue(type, sourceUpdater);\n };\n};\n/**\n * A queue of callbacks to be serialized and applied when a\n * MediaSource and its associated SourceBuffers are not in the\n * updating state. It is used by the segment loader to update the\n * underlying SourceBuffers when new data is loaded, for instance.\n *\n * @class SourceUpdater\n * @param {MediaSource} mediaSource the MediaSource to create the SourceBuffer from\n * @param {string} mimeType the desired MIME type of the underlying SourceBuffer\n */\nvar SourceUpdater = /*#__PURE__*/function (_videojs$EventTarget3) {\n _inherits(SourceUpdater, _videojs$EventTarget3);\n var _super79 = _createSuper(SourceUpdater);\n function SourceUpdater(mediaSource) {\n var _this155;\n _classCallCheck(this, SourceUpdater);\n _this155 = _super79.call(this);\n _this155.mediaSource = mediaSource;\n _this155.sourceopenListener_ = function () {\n return shiftQueue('mediaSource', _assertThisInitialized(_this155));\n };\n _this155.mediaSource.addEventListener('sourceopen', _this155.sourceopenListener_);\n _this155.logger_ = logger('SourceUpdater'); // initial timestamp offset is 0\n\n _this155.audioTimestampOffset_ = 0;\n _this155.videoTimestampOffset_ = 0;\n _this155.queue = [];\n _this155.queuePending = {\n audio: null,\n video: null\n };\n _this155.delayedAudioAppendQueue_ = [];\n _this155.videoAppendQueued_ = false;\n _this155.codecs = {};\n _this155.onVideoUpdateEnd_ = onUpdateend('video', _assertThisInitialized(_this155));\n _this155.onAudioUpdateEnd_ = onUpdateend('audio', _assertThisInitialized(_this155));\n _this155.onVideoError_ = function (e) {\n // used for debugging\n _this155.videoError_ = e;\n };\n _this155.onAudioError_ = function (e) {\n // used for debugging\n _this155.audioError_ = e;\n };\n _this155.createdSourceBuffers_ = false;\n _this155.initializedEme_ = false;\n _this155.triggeredReady_ = false;\n return _this155;\n }\n _createClass(SourceUpdater, [{\n key: \"initializedEme\",\n value: function initializedEme() {\n this.initializedEme_ = true;\n this.triggerReady();\n }\n }, {\n key: \"hasCreatedSourceBuffers\",\n value: function hasCreatedSourceBuffers() {\n // if false, likely waiting on one of the segment loaders to get enough data to create\n // source buffers\n return this.createdSourceBuffers_;\n }\n }, {\n key: \"hasInitializedAnyEme\",\n value: function hasInitializedAnyEme() {\n return this.initializedEme_;\n }\n }, {\n key: \"ready\",\n value: function ready() {\n return this.hasCreatedSourceBuffers() && this.hasInitializedAnyEme();\n }\n }, {\n key: \"createSourceBuffers\",\n value: function createSourceBuffers(codecs) {\n if (this.hasCreatedSourceBuffers()) {\n // already created them before\n return;\n } // the intial addOrChangeSourceBuffers will always be\n // two add buffers.\n\n this.addOrChangeSourceBuffers(codecs);\n this.createdSourceBuffers_ = true;\n this.trigger('createdsourcebuffers');\n this.triggerReady();\n }\n }, {\n key: \"triggerReady\",\n value: function triggerReady() {\n // only allow ready to be triggered once, this prevents the case\n // where:\n // 1. we trigger createdsourcebuffers\n // 2. ie 11 synchronously initializates eme\n // 3. the synchronous initialization causes us to trigger ready\n // 4. We go back to the ready check in createSourceBuffers and ready is triggered again.\n if (this.ready() && !this.triggeredReady_) {\n this.triggeredReady_ = true;\n this.trigger('ready');\n }\n }\n /**\n * Add a type of source buffer to the media source.\n *\n * @param {string} type\n * The type of source buffer to add.\n *\n * @param {string} codec\n * The codec to add the source buffer with.\n */\n }, {\n key: \"addSourceBuffer\",\n value: function addSourceBuffer(type, codec) {\n pushQueue({\n type: 'mediaSource',\n sourceUpdater: this,\n action: actions.addSourceBuffer(type, codec),\n name: 'addSourceBuffer'\n });\n }\n /**\n * call abort on a source buffer.\n *\n * @param {string} type\n * The type of source buffer to call abort on.\n */\n }, {\n key: \"abort\",\n value: function abort(type) {\n pushQueue({\n type: type,\n sourceUpdater: this,\n action: actions.abort(type),\n name: 'abort'\n });\n }\n /**\n * Call removeSourceBuffer and remove a specific type\n * of source buffer on the mediaSource.\n *\n * @param {string} type\n * The type of source buffer to remove.\n */\n }, {\n key: \"removeSourceBuffer\",\n value: function removeSourceBuffer(type) {\n if (!this.canRemoveSourceBuffer()) {\n videojs.log.error('removeSourceBuffer is not supported!');\n return;\n }\n pushQueue({\n type: 'mediaSource',\n sourceUpdater: this,\n action: actions.removeSourceBuffer(type),\n name: 'removeSourceBuffer'\n });\n }\n /**\n * Whether or not the removeSourceBuffer function is supported\n * on the mediaSource.\n *\n * @return {boolean}\n * if removeSourceBuffer can be called.\n */\n }, {\n key: \"canRemoveSourceBuffer\",\n value: function canRemoveSourceBuffer() {\n // As of Firefox 83 removeSourceBuffer\n // throws errors, so we report that it does not support this.\n return !videojs.browser.IS_FIREFOX && window$1.MediaSource && window$1.MediaSource.prototype && typeof window$1.MediaSource.prototype.removeSourceBuffer === 'function';\n }\n /**\n * Whether or not the changeType function is supported\n * on our SourceBuffers.\n *\n * @return {boolean}\n * if changeType can be called.\n */\n }, {\n key: \"canChangeType\",\n value:\n /**\n * Whether or not the changeType function is supported\n * on our SourceBuffers.\n *\n * @return {boolean}\n * if changeType can be called.\n */\n\n function canChangeType() {\n return this.constructor.canChangeType();\n }\n /**\n * Call the changeType function on a source buffer, given the code and type.\n *\n * @param {string} type\n * The type of source buffer to call changeType on.\n *\n * @param {string} codec\n * The codec string to change type with on the source buffer.\n */\n }, {\n key: \"changeType\",\n value: function changeType(type, codec) {\n if (!this.canChangeType()) {\n videojs.log.error('changeType is not supported!');\n return;\n }\n pushQueue({\n type: type,\n sourceUpdater: this,\n action: actions.changeType(codec),\n name: 'changeType'\n });\n }\n /**\n * Add source buffers with a codec or, if they are already created,\n * call changeType on source buffers using changeType.\n *\n * @param {Object} codecs\n * Codecs to switch to\n */\n }, {\n key: \"addOrChangeSourceBuffers\",\n value: function addOrChangeSourceBuffers(codecs) {\n var _this156 = this;\n if (!codecs || _typeof(codecs) !== 'object' || Object.keys(codecs).length === 0) {\n throw new Error('Cannot addOrChangeSourceBuffers to undefined codecs');\n }\n Object.keys(codecs).forEach(function (type) {\n var codec = codecs[type];\n if (!_this156.hasCreatedSourceBuffers()) {\n return _this156.addSourceBuffer(type, codec);\n }\n if (_this156.canChangeType()) {\n _this156.changeType(type, codec);\n }\n });\n }\n /**\n * Queue an update to append an ArrayBuffer.\n *\n * @param {MediaObject} object containing audioBytes and/or videoBytes\n * @param {Function} done the function to call when done\n * @see http://www.w3.org/TR/media-source/#widl-SourceBuffer-appendBuffer-void-ArrayBuffer-data\n */\n }, {\n key: \"appendBuffer\",\n value: function appendBuffer(options, doneFn) {\n var _this157 = this;\n var segmentInfo = options.segmentInfo,\n type = options.type,\n bytes = options.bytes;\n this.processedAppend_ = true;\n if (type === 'audio' && this.videoBuffer && !this.videoAppendQueued_) {\n this.delayedAudioAppendQueue_.push([options, doneFn]);\n this.logger_(\"delayed audio append of \".concat(bytes.length, \" until video append\"));\n return;\n } // In the case of certain errors, for instance, QUOTA_EXCEEDED_ERR, updateend will\n // not be fired. This means that the queue will be blocked until the next action\n // taken by the segment-loader. Provide a mechanism for segment-loader to handle\n // these errors by calling the doneFn with the specific error.\n\n var onError = doneFn;\n pushQueue({\n type: type,\n sourceUpdater: this,\n action: actions.appendBuffer(bytes, segmentInfo || {\n mediaIndex: -1\n }, onError),\n doneFn: doneFn,\n name: 'appendBuffer'\n });\n if (type === 'video') {\n this.videoAppendQueued_ = true;\n if (!this.delayedAudioAppendQueue_.length) {\n return;\n }\n var queue = this.delayedAudioAppendQueue_.slice();\n this.logger_(\"queuing delayed audio \".concat(queue.length, \" appendBuffers\"));\n this.delayedAudioAppendQueue_.length = 0;\n queue.forEach(function (que) {\n _this157.appendBuffer.apply(_this157, que);\n });\n }\n }\n /**\n * Get the audio buffer's buffered timerange.\n *\n * @return {TimeRange}\n * The audio buffer's buffered time range\n */\n }, {\n key: \"audioBuffered\",\n value: function audioBuffered() {\n // no media source/source buffer or it isn't in the media sources\n // source buffer list\n if (!inSourceBuffers(this.mediaSource, this.audioBuffer)) {\n return createTimeRanges();\n }\n return this.audioBuffer.buffered ? this.audioBuffer.buffered : createTimeRanges();\n }\n /**\n * Get the video buffer's buffered timerange.\n *\n * @return {TimeRange}\n * The video buffer's buffered time range\n */\n }, {\n key: \"videoBuffered\",\n value: function videoBuffered() {\n // no media source/source buffer or it isn't in the media sources\n // source buffer list\n if (!inSourceBuffers(this.mediaSource, this.videoBuffer)) {\n return createTimeRanges();\n }\n return this.videoBuffer.buffered ? this.videoBuffer.buffered : createTimeRanges();\n }\n /**\n * Get a combined video/audio buffer's buffered timerange.\n *\n * @return {TimeRange}\n * the combined time range\n */\n }, {\n key: \"buffered\",\n value: function buffered() {\n var video = inSourceBuffers(this.mediaSource, this.videoBuffer) ? this.videoBuffer : null;\n var audio = inSourceBuffers(this.mediaSource, this.audioBuffer) ? this.audioBuffer : null;\n if (audio && !video) {\n return this.audioBuffered();\n }\n if (video && !audio) {\n return this.videoBuffered();\n }\n return bufferIntersection(this.audioBuffered(), this.videoBuffered());\n }\n /**\n * Add a callback to the queue that will set duration on the mediaSource.\n *\n * @param {number} duration\n * The duration to set\n *\n * @param {Function} [doneFn]\n * function to run after duration has been set.\n */\n }, {\n key: \"setDuration\",\n value: function setDuration(duration) {\n var doneFn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop;\n // In order to set the duration on the media source, it's necessary to wait for all\n // source buffers to no longer be updating. \"If the updating attribute equals true on\n // any SourceBuffer in sourceBuffers, then throw an InvalidStateError exception and\n // abort these steps.\" (source: https://www.w3.org/TR/media-source/#attributes).\n pushQueue({\n type: 'mediaSource',\n sourceUpdater: this,\n action: actions.duration(duration),\n name: 'duration',\n doneFn: doneFn\n });\n }\n /**\n * Add a mediaSource endOfStream call to the queue\n *\n * @param {Error} [error]\n * Call endOfStream with an error\n *\n * @param {Function} [doneFn]\n * A function that should be called when the\n * endOfStream call has finished.\n */\n }, {\n key: \"endOfStream\",\n value: function endOfStream() {\n var error = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n var doneFn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop;\n if (typeof error !== 'string') {\n error = undefined;\n } // In order to set the duration on the media source, it's necessary to wait for all\n // source buffers to no longer be updating. \"If the updating attribute equals true on\n // any SourceBuffer in sourceBuffers, then throw an InvalidStateError exception and\n // abort these steps.\" (source: https://www.w3.org/TR/media-source/#attributes).\n\n pushQueue({\n type: 'mediaSource',\n sourceUpdater: this,\n action: actions.endOfStream(error),\n name: 'endOfStream',\n doneFn: doneFn\n });\n }\n /**\n * Queue an update to remove a time range from the buffer.\n *\n * @param {number} start where to start the removal\n * @param {number} end where to end the removal\n * @param {Function} [done=noop] optional callback to be executed when the remove\n * operation is complete\n * @see http://www.w3.org/TR/media-source/#widl-SourceBuffer-remove-void-double-start-unrestricted-double-end\n */\n }, {\n key: \"removeAudio\",\n value: function removeAudio(start, end) {\n var done = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : noop;\n if (!this.audioBuffered().length || this.audioBuffered().end(0) === 0) {\n done();\n return;\n }\n pushQueue({\n type: 'audio',\n sourceUpdater: this,\n action: actions.remove(start, end),\n doneFn: done,\n name: 'remove'\n });\n }\n /**\n * Queue an update to remove a time range from the buffer.\n *\n * @param {number} start where to start the removal\n * @param {number} end where to end the removal\n * @param {Function} [done=noop] optional callback to be executed when the remove\n * operation is complete\n * @see http://www.w3.org/TR/media-source/#widl-SourceBuffer-remove-void-double-start-unrestricted-double-end\n */\n }, {\n key: \"removeVideo\",\n value: function removeVideo(start, end) {\n var done = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : noop;\n if (!this.videoBuffered().length || this.videoBuffered().end(0) === 0) {\n done();\n return;\n }\n pushQueue({\n type: 'video',\n sourceUpdater: this,\n action: actions.remove(start, end),\n doneFn: done,\n name: 'remove'\n });\n }\n /**\n * Whether the underlying sourceBuffer is updating or not\n *\n * @return {boolean} the updating status of the SourceBuffer\n */\n }, {\n key: \"updating\",\n value: function updating() {\n // the audio/video source buffer is updating\n if (_updating('audio', this) || _updating('video', this)) {\n return true;\n }\n return false;\n }\n /**\n * Set/get the timestampoffset on the audio SourceBuffer\n *\n * @return {number} the timestamp offset\n */\n }, {\n key: \"audioTimestampOffset\",\n value: function audioTimestampOffset(offset) {\n if (typeof offset !== 'undefined' && this.audioBuffer &&\n // no point in updating if it's the same\n this.audioTimestampOffset_ !== offset) {\n pushQueue({\n type: 'audio',\n sourceUpdater: this,\n action: actions.timestampOffset(offset),\n name: 'timestampOffset'\n });\n this.audioTimestampOffset_ = offset;\n }\n return this.audioTimestampOffset_;\n }\n /**\n * Set/get the timestampoffset on the video SourceBuffer\n *\n * @return {number} the timestamp offset\n */\n }, {\n key: \"videoTimestampOffset\",\n value: function videoTimestampOffset(offset) {\n if (typeof offset !== 'undefined' && this.videoBuffer &&\n // no point in updating if it's the same\n this.videoTimestampOffset !== offset) {\n pushQueue({\n type: 'video',\n sourceUpdater: this,\n action: actions.timestampOffset(offset),\n name: 'timestampOffset'\n });\n this.videoTimestampOffset_ = offset;\n }\n return this.videoTimestampOffset_;\n }\n /**\n * Add a function to the queue that will be called\n * when it is its turn to run in the audio queue.\n *\n * @param {Function} callback\n * The callback to queue.\n */\n }, {\n key: \"audioQueueCallback\",\n value: function audioQueueCallback(callback) {\n if (!this.audioBuffer) {\n return;\n }\n pushQueue({\n type: 'audio',\n sourceUpdater: this,\n action: actions.callback(callback),\n name: 'callback'\n });\n }\n /**\n * Add a function to the queue that will be called\n * when it is its turn to run in the video queue.\n *\n * @param {Function} callback\n * The callback to queue.\n */\n }, {\n key: \"videoQueueCallback\",\n value: function videoQueueCallback(callback) {\n if (!this.videoBuffer) {\n return;\n }\n pushQueue({\n type: 'video',\n sourceUpdater: this,\n action: actions.callback(callback),\n name: 'callback'\n });\n }\n /**\n * dispose of the source updater and the underlying sourceBuffer\n */\n }, {\n key: \"dispose\",\n value: function dispose() {\n var _this158 = this;\n this.trigger('dispose');\n bufferTypes.forEach(function (type) {\n _this158.abort(type);\n if (_this158.canRemoveSourceBuffer()) {\n _this158.removeSourceBuffer(type);\n } else {\n _this158[\"\".concat(type, \"QueueCallback\")](function () {\n return cleanupBuffer(type, _this158);\n });\n }\n });\n this.videoAppendQueued_ = false;\n this.delayedAudioAppendQueue_.length = 0;\n if (this.sourceopenListener_) {\n this.mediaSource.removeEventListener('sourceopen', this.sourceopenListener_);\n }\n this.off();\n }\n }], [{\n key: \"canChangeType\",\n value: function canChangeType() {\n return window$1.SourceBuffer && window$1.SourceBuffer.prototype && typeof window$1.SourceBuffer.prototype.changeType === 'function';\n }\n }]);\n return SourceUpdater;\n}(videojs.EventTarget);\nvar uint8ToUtf8 = function uint8ToUtf8(uintArray) {\n return decodeURIComponent(escape(String.fromCharCode.apply(null, uintArray)));\n};\n\n/**\n * @file vtt-segment-loader.js\n */\nvar VTT_LINE_TERMINATORS = new Uint8Array('\\n\\n'.split('').map(function (_char3) {\n return _char3.charCodeAt(0);\n}));\nvar NoVttJsError = /*#__PURE__*/function (_Error) {\n _inherits(NoVttJsError, _Error);\n var _super80 = _createSuper(NoVttJsError);\n function NoVttJsError() {\n _classCallCheck(this, NoVttJsError);\n return _super80.call(this, 'Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.');\n }\n return _createClass(NoVttJsError);\n}( /*#__PURE__*/_wrapNativeSuper(Error));\n/**\n * An object that manages segment loading and appending.\n *\n * @class VTTSegmentLoader\n * @param {Object} options required and optional options\n * @extends videojs.EventTarget\n */\nvar VTTSegmentLoader = /*#__PURE__*/function (_SegmentLoader) {\n _inherits(VTTSegmentLoader, _SegmentLoader);\n var _super81 = _createSuper(VTTSegmentLoader);\n function VTTSegmentLoader(settings) {\n var _this159;\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n _classCallCheck(this, VTTSegmentLoader);\n _this159 = _super81.call(this, settings, options); // SegmentLoader requires a MediaSource be specified or it will throw an error;\n // however, VTTSegmentLoader has no need of a media source, so delete the reference\n\n _this159.mediaSource_ = null;\n _this159.subtitlesTrack_ = null;\n _this159.loaderType_ = 'subtitle';\n _this159.featuresNativeTextTracks_ = settings.featuresNativeTextTracks;\n _this159.loadVttJs = settings.loadVttJs; // The VTT segment will have its own time mappings. Saving VTT segment timing info in\n // the sync controller leads to improper behavior.\n\n _this159.shouldSaveSegmentTimingInfo_ = false;\n return _this159;\n }\n _createClass(VTTSegmentLoader, [{\n key: \"createTransmuxer_\",\n value: function createTransmuxer_() {\n // don't need to transmux any subtitles\n return null;\n }\n /**\n * Indicates which time ranges are buffered\n *\n * @return {TimeRange}\n * TimeRange object representing the current buffered ranges\n */\n }, {\n key: \"buffered_\",\n value: function buffered_() {\n if (!this.subtitlesTrack_ || !this.subtitlesTrack_.cues || !this.subtitlesTrack_.cues.length) {\n return createTimeRanges();\n }\n var cues = this.subtitlesTrack_.cues;\n var start = cues[0].startTime;\n var end = cues[cues.length - 1].startTime;\n return createTimeRanges([[start, end]]);\n }\n /**\n * Gets and sets init segment for the provided map\n *\n * @param {Object} map\n * The map object representing the init segment to get or set\n * @param {boolean=} set\n * If true, the init segment for the provided map should be saved\n * @return {Object}\n * map object for desired init segment\n */\n }, {\n key: \"initSegmentForMap\",\n value: function initSegmentForMap(map) {\n var set = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n if (!map) {\n return null;\n }\n var id = initSegmentId(map);\n var storedMap = this.initSegments_[id];\n if (set && !storedMap && map.bytes) {\n // append WebVTT line terminators to the media initialization segment if it exists\n // to follow the WebVTT spec (https://w3c.github.io/webvtt/#file-structure) that\n // requires two or more WebVTT line terminators between the WebVTT header and the\n // rest of the file\n var combinedByteLength = VTT_LINE_TERMINATORS.byteLength + map.bytes.byteLength;\n var combinedSegment = new Uint8Array(combinedByteLength);\n combinedSegment.set(map.bytes);\n combinedSegment.set(VTT_LINE_TERMINATORS, map.bytes.byteLength);\n this.initSegments_[id] = storedMap = {\n resolvedUri: map.resolvedUri,\n byterange: map.byterange,\n bytes: combinedSegment\n };\n }\n return storedMap || map;\n }\n /**\n * Returns true if all configuration required for loading is present, otherwise false.\n *\n * @return {boolean} True if the all configuration is ready for loading\n * @private\n */\n }, {\n key: \"couldBeginLoading_\",\n value: function couldBeginLoading_() {\n return this.playlist_ && this.subtitlesTrack_ && !this.paused();\n }\n /**\n * Once all the starting parameters have been specified, begin\n * operation. This method should only be invoked from the INIT\n * state.\n *\n * @private\n */\n }, {\n key: \"init_\",\n value: function init_() {\n this.state = 'READY';\n this.resetEverything();\n return this.monitorBuffer_();\n }\n /**\n * Set a subtitle track on the segment loader to add subtitles to\n *\n * @param {TextTrack=} track\n * The text track to add loaded subtitles to\n * @return {TextTrack}\n * Returns the subtitles track\n */\n }, {\n key: \"track\",\n value: function track(_track3) {\n if (typeof _track3 === 'undefined') {\n return this.subtitlesTrack_;\n }\n this.subtitlesTrack_ = _track3; // if we were unpaused but waiting for a sourceUpdater, start\n // buffering now\n\n if (this.state === 'INIT' && this.couldBeginLoading_()) {\n this.init_();\n }\n return this.subtitlesTrack_;\n }\n /**\n * Remove any data in the source buffer between start and end times\n *\n * @param {number} start - the start time of the region to remove from the buffer\n * @param {number} end - the end time of the region to remove from the buffer\n */\n }, {\n key: \"remove\",\n value: function remove(start, end) {\n removeCuesFromTrack(start, end, this.subtitlesTrack_);\n }\n /**\n * fill the buffer with segements unless the sourceBuffers are\n * currently updating\n *\n * Note: this function should only ever be called by monitorBuffer_\n * and never directly\n *\n * @private\n */\n }, {\n key: \"fillBuffer_\",\n value: function fillBuffer_() {\n var _this160 = this;\n // see if we need to begin loading immediately\n var segmentInfo = this.chooseNextRequest_();\n if (!segmentInfo) {\n return;\n }\n if (this.syncController_.timestampOffsetForTimeline(segmentInfo.timeline) === null) {\n // We don't have the timestamp offset that we need to sync subtitles.\n // Rerun on a timestamp offset or user interaction.\n var checkTimestampOffset = function checkTimestampOffset() {\n _this160.state = 'READY';\n if (!_this160.paused()) {\n // if not paused, queue a buffer check as soon as possible\n _this160.monitorBuffer_();\n }\n };\n this.syncController_.one('timestampoffset', checkTimestampOffset);\n this.state = 'WAITING_ON_TIMELINE';\n return;\n }\n this.loadSegment_(segmentInfo);\n } // never set a timestamp offset for vtt segments.\n }, {\n key: \"timestampOffsetForSegment_\",\n value: function timestampOffsetForSegment_() {\n return null;\n }\n }, {\n key: \"chooseNextRequest_\",\n value: function chooseNextRequest_() {\n return this.skipEmptySegments_(_get(_getPrototypeOf(VTTSegmentLoader.prototype), \"chooseNextRequest_\", this).call(this));\n }\n /**\n * Prevents the segment loader from requesting segments we know contain no subtitles\n * by walking forward until we find the next segment that we don't know whether it is\n * empty or not.\n *\n * @param {Object} segmentInfo\n * a segment info object that describes the current segment\n * @return {Object}\n * a segment info object that describes the current segment\n */\n }, {\n key: \"skipEmptySegments_\",\n value: function skipEmptySegments_(segmentInfo) {\n while (segmentInfo && segmentInfo.segment.empty) {\n // stop at the last possible segmentInfo\n if (segmentInfo.mediaIndex + 1 >= segmentInfo.playlist.segments.length) {\n segmentInfo = null;\n break;\n }\n segmentInfo = this.generateSegmentInfo_({\n playlist: segmentInfo.playlist,\n mediaIndex: segmentInfo.mediaIndex + 1,\n startOfSegment: segmentInfo.startOfSegment + segmentInfo.duration,\n isSyncRequest: segmentInfo.isSyncRequest\n });\n }\n return segmentInfo;\n }\n }, {\n key: \"stopForError\",\n value: function stopForError(error) {\n this.error(error);\n this.state = 'READY';\n this.pause();\n this.trigger('error');\n }\n /**\n * append a decrypted segement to the SourceBuffer through a SourceUpdater\n *\n * @private\n */\n }, {\n key: \"segmentRequestFinished_\",\n value: function segmentRequestFinished_(error, simpleSegment, result) {\n var _this161 = this;\n if (!this.subtitlesTrack_) {\n this.state = 'READY';\n return;\n }\n this.saveTransferStats_(simpleSegment.stats); // the request was aborted\n\n if (!this.pendingSegment_) {\n this.state = 'READY';\n this.mediaRequestsAborted += 1;\n return;\n }\n if (error) {\n if (error.code === REQUEST_ERRORS.TIMEOUT) {\n this.handleTimeout_();\n }\n if (error.code === REQUEST_ERRORS.ABORTED) {\n this.mediaRequestsAborted += 1;\n } else {\n this.mediaRequestsErrored += 1;\n }\n this.stopForError(error);\n return;\n }\n var segmentInfo = this.pendingSegment_; // although the VTT segment loader bandwidth isn't really used, it's good to\n // maintain functionality between segment loaders\n\n this.saveBandwidthRelatedStats_(segmentInfo.duration, simpleSegment.stats); // if this request included a segment key, save that data in the cache\n\n if (simpleSegment.key) {\n this.segmentKey(simpleSegment.key, true);\n }\n this.state = 'APPENDING'; // used for tests\n\n this.trigger('appending');\n var segment = segmentInfo.segment;\n if (segment.map) {\n segment.map.bytes = simpleSegment.map.bytes;\n }\n segmentInfo.bytes = simpleSegment.bytes; // Make sure that vttjs has loaded, otherwise, load it and wait till it finished loading\n\n if (typeof window$1.WebVTT !== 'function' && typeof this.loadVttJs === 'function') {\n this.state = 'WAITING_ON_VTTJS'; // should be fine to call multiple times\n // script will be loaded once but multiple listeners will be added to the queue, which is expected.\n\n this.loadVttJs().then(function () {\n return _this161.segmentRequestFinished_(error, simpleSegment, result);\n }, function () {\n return _this161.stopForError({\n message: 'Error loading vtt.js'\n });\n });\n return;\n }\n segment.requested = true;\n try {\n this.parseVTTCues_(segmentInfo);\n } catch (e) {\n this.stopForError({\n message: e.message\n });\n return;\n }\n this.updateTimeMapping_(segmentInfo, this.syncController_.timelines[segmentInfo.timeline], this.playlist_);\n if (segmentInfo.cues.length) {\n segmentInfo.timingInfo = {\n start: segmentInfo.cues[0].startTime,\n end: segmentInfo.cues[segmentInfo.cues.length - 1].endTime\n };\n } else {\n segmentInfo.timingInfo = {\n start: segmentInfo.startOfSegment,\n end: segmentInfo.startOfSegment + segmentInfo.duration\n };\n }\n if (segmentInfo.isSyncRequest) {\n this.trigger('syncinfoupdate');\n this.pendingSegment_ = null;\n this.state = 'READY';\n return;\n }\n segmentInfo.byteLength = segmentInfo.bytes.byteLength;\n this.mediaSecondsLoaded += segment.duration; // Create VTTCue instances for each cue in the new segment and add them to\n // the subtitle track\n\n segmentInfo.cues.forEach(function (cue) {\n _this161.subtitlesTrack_.addCue(_this161.featuresNativeTextTracks_ ? new window$1.VTTCue(cue.startTime, cue.endTime, cue.text) : cue);\n }); // Remove any duplicate cues from the subtitle track. The WebVTT spec allows\n // cues to have identical time-intervals, but if the text is also identical\n // we can safely assume it is a duplicate that can be removed (ex. when a cue\n // \"overlaps\" VTT segments)\n\n removeDuplicateCuesFromTrack(this.subtitlesTrack_);\n this.handleAppendsDone_();\n }\n }, {\n key: \"handleData_\",\n value: function handleData_() {// noop as we shouldn't be getting video/audio data captions\n // that we do not support here.\n }\n }, {\n key: \"updateTimingInfoEnd_\",\n value: function updateTimingInfoEnd_() {// noop\n }\n /**\n * Uses the WebVTT parser to parse the segment response\n *\n * @throws NoVttJsError\n *\n * @param {Object} segmentInfo\n * a segment info object that describes the current segment\n * @private\n */\n }, {\n key: \"parseVTTCues_\",\n value: function parseVTTCues_(segmentInfo) {\n var decoder;\n var decodeBytesToString = false;\n if (typeof window$1.WebVTT !== 'function') {\n // caller is responsible for exception handling.\n throw new NoVttJsError();\n }\n if (typeof window$1.TextDecoder === 'function') {\n decoder = new window$1.TextDecoder('utf8');\n } else {\n decoder = window$1.WebVTT.StringDecoder();\n decodeBytesToString = true;\n }\n var parser = new window$1.WebVTT.Parser(window$1, window$1.vttjs, decoder);\n segmentInfo.cues = [];\n segmentInfo.timestampmap = {\n MPEGTS: 0,\n LOCAL: 0\n };\n parser.oncue = segmentInfo.cues.push.bind(segmentInfo.cues);\n parser.ontimestampmap = function (map) {\n segmentInfo.timestampmap = map;\n };\n parser.onparsingerror = function (error) {\n videojs.log.warn('Error encountered when parsing cues: ' + error.message);\n };\n if (segmentInfo.segment.map) {\n var mapData = segmentInfo.segment.map.bytes;\n if (decodeBytesToString) {\n mapData = uint8ToUtf8(mapData);\n }\n parser.parse(mapData);\n }\n var segmentData = segmentInfo.bytes;\n if (decodeBytesToString) {\n segmentData = uint8ToUtf8(segmentData);\n }\n parser.parse(segmentData);\n parser.flush();\n }\n /**\n * Updates the start and end times of any cues parsed by the WebVTT parser using\n * the information parsed from the X-TIMESTAMP-MAP header and a TS to media time mapping\n * from the SyncController\n *\n * @param {Object} segmentInfo\n * a segment info object that describes the current segment\n * @param {Object} mappingObj\n * object containing a mapping from TS to media time\n * @param {Object} playlist\n * the playlist object containing the segment\n * @private\n */\n }, {\n key: \"updateTimeMapping_\",\n value: function updateTimeMapping_(segmentInfo, mappingObj, playlist) {\n var segment = segmentInfo.segment;\n if (!mappingObj) {\n // If the sync controller does not have a mapping of TS to Media Time for the\n // timeline, then we don't have enough information to update the cue\n // start/end times\n return;\n }\n if (!segmentInfo.cues.length) {\n // If there are no cues, we also do not have enough information to figure out\n // segment timing. Mark that the segment contains no cues so we don't re-request\n // an empty segment.\n segment.empty = true;\n return;\n }\n var timestampmap = segmentInfo.timestampmap;\n var diff = timestampmap.MPEGTS / ONE_SECOND_IN_TS - timestampmap.LOCAL + mappingObj.mapping;\n segmentInfo.cues.forEach(function (cue) {\n // First convert cue time to TS time using the timestamp-map provided within the vtt\n cue.startTime += diff;\n cue.endTime += diff;\n });\n if (!playlist.syncInfo) {\n var firstStart = segmentInfo.cues[0].startTime;\n var lastStart = segmentInfo.cues[segmentInfo.cues.length - 1].startTime;\n playlist.syncInfo = {\n mediaSequence: playlist.mediaSequence + segmentInfo.mediaIndex,\n time: Math.min(firstStart, lastStart - segment.duration)\n };\n }\n }\n }]);\n return VTTSegmentLoader;\n}(SegmentLoader);\n/**\n * @file ad-cue-tags.js\n */\n/**\n * Searches for an ad cue that overlaps with the given mediaTime\n *\n * @param {Object} track\n * the track to find the cue for\n *\n * @param {number} mediaTime\n * the time to find the cue at\n *\n * @return {Object|null}\n * the found cue or null\n */\nvar findAdCue = function findAdCue(track, mediaTime) {\n var cues = track.cues;\n for (var _i104 = 0; _i104 < cues.length; _i104++) {\n var cue = cues[_i104];\n if (mediaTime >= cue.adStartTime && mediaTime <= cue.adEndTime) {\n return cue;\n }\n }\n return null;\n};\nvar updateAdCues = function updateAdCues(media, track) {\n var offset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n if (!media.segments) {\n return;\n }\n var mediaTime = offset;\n var cue;\n for (var _i105 = 0; _i105 < media.segments.length; _i105++) {\n var segment = media.segments[_i105];\n if (!cue) {\n // Since the cues will span for at least the segment duration, adding a fudge\n // factor of half segment duration will prevent duplicate cues from being\n // created when timing info is not exact (e.g. cue start time initialized\n // at 10.006677, but next call mediaTime is 10.003332 )\n cue = findAdCue(track, mediaTime + segment.duration / 2);\n }\n if (cue) {\n if ('cueIn' in segment) {\n // Found a CUE-IN so end the cue\n cue.endTime = mediaTime;\n cue.adEndTime = mediaTime;\n mediaTime += segment.duration;\n cue = null;\n continue;\n }\n if (mediaTime < cue.endTime) {\n // Already processed this mediaTime for this cue\n mediaTime += segment.duration;\n continue;\n } // otherwise extend cue until a CUE-IN is found\n\n cue.endTime += segment.duration;\n } else {\n if ('cueOut' in segment) {\n cue = new window$1.VTTCue(mediaTime, mediaTime + segment.duration, segment.cueOut);\n cue.adStartTime = mediaTime; // Assumes tag format to be\n // #EXT-X-CUE-OUT:30\n\n cue.adEndTime = mediaTime + parseFloat(segment.cueOut);\n track.addCue(cue);\n }\n if ('cueOutCont' in segment) {\n // Entered into the middle of an ad cue\n // Assumes tag formate to be\n // #EXT-X-CUE-OUT-CONT:10/30\n var _segment$cueOutCont$s = segment.cueOutCont.split('/').map(parseFloat),\n _segment$cueOutCont$s2 = _slicedToArray(_segment$cueOutCont$s, 2),\n adOffset = _segment$cueOutCont$s2[0],\n adTotal = _segment$cueOutCont$s2[1];\n cue = new window$1.VTTCue(mediaTime, mediaTime + segment.duration, '');\n cue.adStartTime = mediaTime - adOffset;\n cue.adEndTime = cue.adStartTime + adTotal;\n track.addCue(cue);\n }\n }\n mediaTime += segment.duration;\n }\n};\n\n/**\n * @file sync-controller.js\n */\n// synchronize expired playlist segments.\n// the max media sequence diff is 48 hours of live stream\n// content with two second segments. Anything larger than that\n// will likely be invalid.\n\nvar MAX_MEDIA_SEQUENCE_DIFF_FOR_SYNC = 86400;\nvar syncPointStrategies = [\n// Stategy \"VOD\": Handle the VOD-case where the sync-point is *always*\n// the equivalence display-time 0 === segment-index 0\n{\n name: 'VOD',\n run: function run(syncController, playlist, duration, currentTimeline, currentTime) {\n if (duration !== Infinity) {\n var syncPoint = {\n time: 0,\n segmentIndex: 0,\n partIndex: null\n };\n return syncPoint;\n }\n return null;\n }\n},\n// Stategy \"ProgramDateTime\": We have a program-date-time tag in this playlist\n{\n name: 'ProgramDateTime',\n run: function run(syncController, playlist, duration, currentTimeline, currentTime) {\n if (!Object.keys(syncController.timelineToDatetimeMappings).length) {\n return null;\n }\n var syncPoint = null;\n var lastDistance = null;\n var partsAndSegments = getPartsAndSegments(playlist);\n currentTime = currentTime || 0;\n for (var _i106 = 0; _i106 < partsAndSegments.length; _i106++) {\n // start from the end and loop backwards for live\n // or start from the front and loop forwards for non-live\n var index = playlist.endList || currentTime === 0 ? _i106 : partsAndSegments.length - (_i106 + 1);\n var partAndSegment = partsAndSegments[index];\n var segment = partAndSegment.segment;\n var datetimeMapping = syncController.timelineToDatetimeMappings[segment.timeline];\n if (!datetimeMapping || !segment.dateTimeObject) {\n continue;\n }\n var segmentTime = segment.dateTimeObject.getTime() / 1000;\n var start = segmentTime + datetimeMapping; // take part duration into account.\n\n if (segment.parts && typeof partAndSegment.partIndex === 'number') {\n for (var z = 0; z < partAndSegment.partIndex; z++) {\n start += segment.parts[z].duration;\n }\n }\n var distance = Math.abs(currentTime - start); // Once the distance begins to increase, or if distance is 0, we have passed\n // currentTime and can stop looking for better candidates\n\n if (lastDistance !== null && (distance === 0 || lastDistance < distance)) {\n break;\n }\n lastDistance = distance;\n syncPoint = {\n time: start,\n segmentIndex: partAndSegment.segmentIndex,\n partIndex: partAndSegment.partIndex\n };\n }\n return syncPoint;\n }\n},\n// Stategy \"Segment\": We have a known time mapping for a timeline and a\n// segment in the current timeline with timing data\n{\n name: 'Segment',\n run: function run(syncController, playlist, duration, currentTimeline, currentTime) {\n var syncPoint = null;\n var lastDistance = null;\n currentTime = currentTime || 0;\n var partsAndSegments = getPartsAndSegments(playlist);\n for (var _i107 = 0; _i107 < partsAndSegments.length; _i107++) {\n // start from the end and loop backwards for live\n // or start from the front and loop forwards for non-live\n var index = playlist.endList || currentTime === 0 ? _i107 : partsAndSegments.length - (_i107 + 1);\n var partAndSegment = partsAndSegments[index];\n var segment = partAndSegment.segment;\n var start = partAndSegment.part && partAndSegment.part.start || segment && segment.start;\n if (segment.timeline === currentTimeline && typeof start !== 'undefined') {\n var distance = Math.abs(currentTime - start); // Once the distance begins to increase, we have passed\n // currentTime and can stop looking for better candidates\n\n if (lastDistance !== null && lastDistance < distance) {\n break;\n }\n if (!syncPoint || lastDistance === null || lastDistance >= distance) {\n lastDistance = distance;\n syncPoint = {\n time: start,\n segmentIndex: partAndSegment.segmentIndex,\n partIndex: partAndSegment.partIndex\n };\n }\n }\n }\n return syncPoint;\n }\n},\n// Stategy \"Discontinuity\": We have a discontinuity with a known\n// display-time\n{\n name: 'Discontinuity',\n run: function run(syncController, playlist, duration, currentTimeline, currentTime) {\n var syncPoint = null;\n currentTime = currentTime || 0;\n if (playlist.discontinuityStarts && playlist.discontinuityStarts.length) {\n var lastDistance = null;\n for (var _i108 = 0; _i108 < playlist.discontinuityStarts.length; _i108++) {\n var segmentIndex = playlist.discontinuityStarts[_i108];\n var discontinuity = playlist.discontinuitySequence + _i108 + 1;\n var discontinuitySync = syncController.discontinuities[discontinuity];\n if (discontinuitySync) {\n var distance = Math.abs(currentTime - discontinuitySync.time); // Once the distance begins to increase, we have passed\n // currentTime and can stop looking for better candidates\n\n if (lastDistance !== null && lastDistance < distance) {\n break;\n }\n if (!syncPoint || lastDistance === null || lastDistance >= distance) {\n lastDistance = distance;\n syncPoint = {\n time: discontinuitySync.time,\n segmentIndex: segmentIndex,\n partIndex: null\n };\n }\n }\n }\n }\n return syncPoint;\n }\n},\n// Stategy \"Playlist\": We have a playlist with a known mapping of\n// segment index to display time\n{\n name: 'Playlist',\n run: function run(syncController, playlist, duration, currentTimeline, currentTime) {\n if (playlist.syncInfo) {\n var syncPoint = {\n time: playlist.syncInfo.time,\n segmentIndex: playlist.syncInfo.mediaSequence - playlist.mediaSequence,\n partIndex: null\n };\n return syncPoint;\n }\n return null;\n }\n}];\nvar SyncController = /*#__PURE__*/function (_videojs$EventTarget4) {\n _inherits(SyncController, _videojs$EventTarget4);\n var _super82 = _createSuper(SyncController);\n function SyncController() {\n var _this162;\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n _classCallCheck(this, SyncController);\n _this162 = _super82.call(this); // ...for synching across variants\n\n _this162.timelines = [];\n _this162.discontinuities = [];\n _this162.timelineToDatetimeMappings = {};\n _this162.logger_ = logger('SyncController');\n return _this162;\n }\n /**\n * Find a sync-point for the playlist specified\n *\n * A sync-point is defined as a known mapping from display-time to\n * a segment-index in the current playlist.\n *\n * @param {Playlist} playlist\n * The playlist that needs a sync-point\n * @param {number} duration\n * Duration of the MediaSource (Infinite if playing a live source)\n * @param {number} currentTimeline\n * The last timeline from which a segment was loaded\n * @return {Object}\n * A sync-point object\n */\n _createClass(SyncController, [{\n key: \"getSyncPoint\",\n value: function getSyncPoint(playlist, duration, currentTimeline, currentTime) {\n var syncPoints = this.runStrategies_(playlist, duration, currentTimeline, currentTime);\n if (!syncPoints.length) {\n // Signal that we need to attempt to get a sync-point manually\n // by fetching a segment in the playlist and constructing\n // a sync-point from that information\n return null;\n } // Now find the sync-point that is closest to the currentTime because\n // that should result in the most accurate guess about which segment\n // to fetch\n\n return this.selectSyncPoint_(syncPoints, {\n key: 'time',\n value: currentTime\n });\n }\n /**\n * Calculate the amount of time that has expired off the playlist during playback\n *\n * @param {Playlist} playlist\n * Playlist object to calculate expired from\n * @param {number} duration\n * Duration of the MediaSource (Infinity if playling a live source)\n * @return {number|null}\n * The amount of time that has expired off the playlist during playback. Null\n * if no sync-points for the playlist can be found.\n */\n }, {\n key: \"getExpiredTime\",\n value: function getExpiredTime(playlist, duration) {\n if (!playlist || !playlist.segments) {\n return null;\n }\n var syncPoints = this.runStrategies_(playlist, duration, playlist.discontinuitySequence, 0); // Without sync-points, there is not enough information to determine the expired time\n\n if (!syncPoints.length) {\n return null;\n }\n var syncPoint = this.selectSyncPoint_(syncPoints, {\n key: 'segmentIndex',\n value: 0\n }); // If the sync-point is beyond the start of the playlist, we want to subtract the\n // duration from index 0 to syncPoint.segmentIndex instead of adding.\n\n if (syncPoint.segmentIndex > 0) {\n syncPoint.time *= -1;\n }\n return Math.abs(syncPoint.time + sumDurations({\n defaultDuration: playlist.targetDuration,\n durationList: playlist.segments,\n startIndex: syncPoint.segmentIndex,\n endIndex: 0\n }));\n }\n /**\n * Runs each sync-point strategy and returns a list of sync-points returned by the\n * strategies\n *\n * @private\n * @param {Playlist} playlist\n * The playlist that needs a sync-point\n * @param {number} duration\n * Duration of the MediaSource (Infinity if playing a live source)\n * @param {number} currentTimeline\n * The last timeline from which a segment was loaded\n * @return {Array}\n * A list of sync-point objects\n */\n }, {\n key: \"runStrategies_\",\n value: function runStrategies_(playlist, duration, currentTimeline, currentTime) {\n var syncPoints = []; // Try to find a sync-point in by utilizing various strategies...\n\n for (var _i109 = 0; _i109 < syncPointStrategies.length; _i109++) {\n var strategy = syncPointStrategies[_i109];\n var syncPoint = strategy.run(this, playlist, duration, currentTimeline, currentTime);\n if (syncPoint) {\n syncPoint.strategy = strategy.name;\n syncPoints.push({\n strategy: strategy.name,\n syncPoint: syncPoint\n });\n }\n }\n return syncPoints;\n }\n /**\n * Selects the sync-point nearest the specified target\n *\n * @private\n * @param {Array} syncPoints\n * List of sync-points to select from\n * @param {Object} target\n * Object specifying the property and value we are targeting\n * @param {string} target.key\n * Specifies the property to target. Must be either 'time' or 'segmentIndex'\n * @param {number} target.value\n * The value to target for the specified key.\n * @return {Object}\n * The sync-point nearest the target\n */\n }, {\n key: \"selectSyncPoint_\",\n value: function selectSyncPoint_(syncPoints, target) {\n var bestSyncPoint = syncPoints[0].syncPoint;\n var bestDistance = Math.abs(syncPoints[0].syncPoint[target.key] - target.value);\n var bestStrategy = syncPoints[0].strategy;\n for (var _i110 = 1; _i110 < syncPoints.length; _i110++) {\n var newDistance = Math.abs(syncPoints[_i110].syncPoint[target.key] - target.value);\n if (newDistance < bestDistance) {\n bestDistance = newDistance;\n bestSyncPoint = syncPoints[_i110].syncPoint;\n bestStrategy = syncPoints[_i110].strategy;\n }\n }\n this.logger_(\"syncPoint for [\".concat(target.key, \": \").concat(target.value, \"] chosen with strategy\") + \" [\".concat(bestStrategy, \"]: [time:\").concat(bestSyncPoint.time, \",\") + \" segmentIndex:\".concat(bestSyncPoint.segmentIndex) + (typeof bestSyncPoint.partIndex === 'number' ? \",partIndex:\".concat(bestSyncPoint.partIndex) : '') + ']');\n return bestSyncPoint;\n }\n /**\n * Save any meta-data present on the segments when segments leave\n * the live window to the playlist to allow for synchronization at the\n * playlist level later.\n *\n * @param {Playlist} oldPlaylist - The previous active playlist\n * @param {Playlist} newPlaylist - The updated and most current playlist\n */\n }, {\n key: \"saveExpiredSegmentInfo\",\n value: function saveExpiredSegmentInfo(oldPlaylist, newPlaylist) {\n var mediaSequenceDiff = newPlaylist.mediaSequence - oldPlaylist.mediaSequence; // Ignore large media sequence gaps\n\n if (mediaSequenceDiff > MAX_MEDIA_SEQUENCE_DIFF_FOR_SYNC) {\n videojs.log.warn(\"Not saving expired segment info. Media sequence gap \".concat(mediaSequenceDiff, \" is too large.\"));\n return;\n } // When a segment expires from the playlist and it has a start time\n // save that information as a possible sync-point reference in future\n\n for (var _i111 = mediaSequenceDiff - 1; _i111 >= 0; _i111--) {\n var lastRemovedSegment = oldPlaylist.segments[_i111];\n if (lastRemovedSegment && typeof lastRemovedSegment.start !== 'undefined') {\n newPlaylist.syncInfo = {\n mediaSequence: oldPlaylist.mediaSequence + _i111,\n time: lastRemovedSegment.start\n };\n this.logger_(\"playlist refresh sync: [time:\".concat(newPlaylist.syncInfo.time, \",\") + \" mediaSequence: \".concat(newPlaylist.syncInfo.mediaSequence, \"]\"));\n this.trigger('syncinfoupdate');\n break;\n }\n }\n }\n /**\n * Save the mapping from playlist's ProgramDateTime to display. This should only happen\n * before segments start to load.\n *\n * @param {Playlist} playlist - The currently active playlist\n */\n }, {\n key: \"setDateTimeMappingForStart\",\n value: function setDateTimeMappingForStart(playlist) {\n // It's possible for the playlist to be updated before playback starts, meaning time\n // zero is not yet set. If, during these playlist refreshes, a discontinuity is\n // crossed, then the old time zero mapping (for the prior timeline) would be retained\n // unless the mappings are cleared.\n this.timelineToDatetimeMappings = {};\n if (playlist.segments && playlist.segments.length && playlist.segments[0].dateTimeObject) {\n var firstSegment = playlist.segments[0];\n var playlistTimestamp = firstSegment.dateTimeObject.getTime() / 1000;\n this.timelineToDatetimeMappings[firstSegment.timeline] = -playlistTimestamp;\n }\n }\n /**\n * Calculates and saves timeline mappings, playlist sync info, and segment timing values\n * based on the latest timing information.\n *\n * @param {Object} options\n * Options object\n * @param {SegmentInfo} options.segmentInfo\n * The current active request information\n * @param {boolean} options.shouldSaveTimelineMapping\n * If there's a timeline change, determines if the timeline mapping should be\n * saved for timeline mapping and program date time mappings.\n */\n }, {\n key: \"saveSegmentTimingInfo\",\n value: function saveSegmentTimingInfo(_ref60) {\n var segmentInfo = _ref60.segmentInfo,\n shouldSaveTimelineMapping = _ref60.shouldSaveTimelineMapping;\n var didCalculateSegmentTimeMapping = this.calculateSegmentTimeMapping_(segmentInfo, segmentInfo.timingInfo, shouldSaveTimelineMapping);\n var segment = segmentInfo.segment;\n if (didCalculateSegmentTimeMapping) {\n this.saveDiscontinuitySyncInfo_(segmentInfo); // If the playlist does not have sync information yet, record that information\n // now with segment timing information\n\n if (!segmentInfo.playlist.syncInfo) {\n segmentInfo.playlist.syncInfo = {\n mediaSequence: segmentInfo.playlist.mediaSequence + segmentInfo.mediaIndex,\n time: segment.start\n };\n }\n }\n var dateTime = segment.dateTimeObject;\n if (segment.discontinuity && shouldSaveTimelineMapping && dateTime) {\n this.timelineToDatetimeMappings[segment.timeline] = -(dateTime.getTime() / 1000);\n }\n }\n }, {\n key: \"timestampOffsetForTimeline\",\n value: function timestampOffsetForTimeline(timeline) {\n if (typeof this.timelines[timeline] === 'undefined') {\n return null;\n }\n return this.timelines[timeline].time;\n }\n }, {\n key: \"mappingForTimeline\",\n value: function mappingForTimeline(timeline) {\n if (typeof this.timelines[timeline] === 'undefined') {\n return null;\n }\n return this.timelines[timeline].mapping;\n }\n /**\n * Use the \"media time\" for a segment to generate a mapping to \"display time\" and\n * save that display time to the segment.\n *\n * @private\n * @param {SegmentInfo} segmentInfo\n * The current active request information\n * @param {Object} timingInfo\n * The start and end time of the current segment in \"media time\"\n * @param {boolean} shouldSaveTimelineMapping\n * If there's a timeline change, determines if the timeline mapping should be\n * saved in timelines.\n * @return {boolean}\n * Returns false if segment time mapping could not be calculated\n */\n }, {\n key: \"calculateSegmentTimeMapping_\",\n value: function calculateSegmentTimeMapping_(segmentInfo, timingInfo, shouldSaveTimelineMapping) {\n // TODO: remove side effects\n var segment = segmentInfo.segment;\n var part = segmentInfo.part;\n var mappingObj = this.timelines[segmentInfo.timeline];\n var start;\n var end;\n if (typeof segmentInfo.timestampOffset === 'number') {\n mappingObj = {\n time: segmentInfo.startOfSegment,\n mapping: segmentInfo.startOfSegment - timingInfo.start\n };\n if (shouldSaveTimelineMapping) {\n this.timelines[segmentInfo.timeline] = mappingObj;\n this.trigger('timestampoffset');\n this.logger_(\"time mapping for timeline \".concat(segmentInfo.timeline, \": \") + \"[time: \".concat(mappingObj.time, \"] [mapping: \").concat(mappingObj.mapping, \"]\"));\n }\n start = segmentInfo.startOfSegment;\n end = timingInfo.end + mappingObj.mapping;\n } else if (mappingObj) {\n start = timingInfo.start + mappingObj.mapping;\n end = timingInfo.end + mappingObj.mapping;\n } else {\n return false;\n }\n if (part) {\n part.start = start;\n part.end = end;\n } // If we don't have a segment start yet or the start value we got\n // is less than our current segment.start value, save a new start value.\n // We have to do this because parts will have segment timing info saved\n // multiple times and we want segment start to be the earliest part start\n // value for that segment.\n\n if (!segment.start || start < segment.start) {\n segment.start = start;\n }\n segment.end = end;\n return true;\n }\n /**\n * Each time we have discontinuity in the playlist, attempt to calculate the location\n * in display of the start of the discontinuity and save that. We also save an accuracy\n * value so that we save values with the most accuracy (closest to 0.)\n *\n * @private\n * @param {SegmentInfo} segmentInfo - The current active request information\n */\n }, {\n key: \"saveDiscontinuitySyncInfo_\",\n value: function saveDiscontinuitySyncInfo_(segmentInfo) {\n var playlist = segmentInfo.playlist;\n var segment = segmentInfo.segment; // If the current segment is a discontinuity then we know exactly where\n // the start of the range and it's accuracy is 0 (greater accuracy values\n // mean more approximation)\n\n if (segment.discontinuity) {\n this.discontinuities[segment.timeline] = {\n time: segment.start,\n accuracy: 0\n };\n } else if (playlist.discontinuityStarts && playlist.discontinuityStarts.length) {\n // Search for future discontinuities that we can provide better timing\n // information for and save that information for sync purposes\n for (var _i112 = 0; _i112 < playlist.discontinuityStarts.length; _i112++) {\n var segmentIndex = playlist.discontinuityStarts[_i112];\n var discontinuity = playlist.discontinuitySequence + _i112 + 1;\n var mediaIndexDiff = segmentIndex - segmentInfo.mediaIndex;\n var accuracy = Math.abs(mediaIndexDiff);\n if (!this.discontinuities[discontinuity] || this.discontinuities[discontinuity].accuracy > accuracy) {\n var time = void 0;\n if (mediaIndexDiff < 0) {\n time = segment.start - sumDurations({\n defaultDuration: playlist.targetDuration,\n durationList: playlist.segments,\n startIndex: segmentInfo.mediaIndex,\n endIndex: segmentIndex\n });\n } else {\n time = segment.end + sumDurations({\n defaultDuration: playlist.targetDuration,\n durationList: playlist.segments,\n startIndex: segmentInfo.mediaIndex + 1,\n endIndex: segmentIndex\n });\n }\n this.discontinuities[discontinuity] = {\n time: time,\n accuracy: accuracy\n };\n }\n }\n }\n }\n }, {\n key: \"dispose\",\n value: function dispose() {\n this.trigger('dispose');\n this.off();\n }\n }]);\n return SyncController;\n}(videojs.EventTarget);\n/**\n * The TimelineChangeController acts as a source for segment loaders to listen for and\n * keep track of latest and pending timeline changes. This is useful to ensure proper\n * sync, as each loader may need to make a consideration for what timeline the other\n * loader is on before making changes which could impact the other loader's media.\n *\n * @class TimelineChangeController\n * @extends videojs.EventTarget\n */\nvar TimelineChangeController = /*#__PURE__*/function (_videojs$EventTarget5) {\n _inherits(TimelineChangeController, _videojs$EventTarget5);\n var _super83 = _createSuper(TimelineChangeController);\n function TimelineChangeController() {\n var _this163;\n _classCallCheck(this, TimelineChangeController);\n _this163 = _super83.call(this);\n _this163.pendingTimelineChanges_ = {};\n _this163.lastTimelineChanges_ = {};\n return _this163;\n }\n _createClass(TimelineChangeController, [{\n key: \"clearPendingTimelineChange\",\n value: function clearPendingTimelineChange(type) {\n this.pendingTimelineChanges_[type] = null;\n this.trigger('pendingtimelinechange');\n }\n }, {\n key: \"pendingTimelineChange\",\n value: function pendingTimelineChange(_ref61) {\n var type = _ref61.type,\n from = _ref61.from,\n to = _ref61.to;\n if (typeof from === 'number' && typeof to === 'number') {\n this.pendingTimelineChanges_[type] = {\n type: type,\n from: from,\n to: to\n };\n this.trigger('pendingtimelinechange');\n }\n return this.pendingTimelineChanges_[type];\n }\n }, {\n key: \"lastTimelineChange\",\n value: function lastTimelineChange(_ref62) {\n var type = _ref62.type,\n from = _ref62.from,\n to = _ref62.to;\n if (typeof from === 'number' && typeof to === 'number') {\n this.lastTimelineChanges_[type] = {\n type: type,\n from: from,\n to: to\n };\n delete this.pendingTimelineChanges_[type];\n this.trigger('timelinechange');\n }\n return this.lastTimelineChanges_[type];\n }\n }, {\n key: \"dispose\",\n value: function dispose() {\n this.trigger('dispose');\n this.pendingTimelineChanges_ = {};\n this.lastTimelineChanges_ = {};\n this.off();\n }\n }]);\n return TimelineChangeController;\n}(videojs.EventTarget);\n/* rollup-plugin-worker-factory start for worker!/home/runner/work/http-streaming/http-streaming/src/decrypter-worker.js */\nvar workerCode = transform(getWorkerString(function () {\n /**\n * @file stream.js\n */\n\n /**\n * A lightweight readable stream implemention that handles event dispatching.\n *\n * @class Stream\n */\n\n var Stream = /*#__PURE__*/function () {\n function Stream() {\n this.listeners = {};\n }\n /**\n * Add a listener for a specified event type.\n *\n * @param {string} type the event name\n * @param {Function} listener the callback to be invoked when an event of\n * the specified type occurs\n */\n\n var _proto = Stream.prototype;\n _proto.on = function on(type, listener) {\n if (!this.listeners[type]) {\n this.listeners[type] = [];\n }\n this.listeners[type].push(listener);\n }\n /**\n * Remove a listener for a specified event type.\n *\n * @param {string} type the event name\n * @param {Function} listener a function previously registered for this\n * type of event through `on`\n * @return {boolean} if we could turn it off or not\n */;\n _proto.off = function off(type, listener) {\n if (!this.listeners[type]) {\n return false;\n }\n var index = this.listeners[type].indexOf(listener); // TODO: which is better?\n // In Video.js we slice listener functions\n // on trigger so that it does not mess up the order\n // while we loop through.\n //\n // Here we slice on off so that the loop in trigger\n // can continue using it's old reference to loop without\n // messing up the order.\n\n this.listeners[type] = this.listeners[type].slice(0);\n this.listeners[type].splice(index, 1);\n return index > -1;\n }\n /**\n * Trigger an event of the specified type on this stream. Any additional\n * arguments to this function are passed as parameters to event listeners.\n *\n * @param {string} type the event name\n */;\n _proto.trigger = function trigger(type) {\n var callbacks = this.listeners[type];\n if (!callbacks) {\n return;\n } // Slicing the arguments on every invocation of this method\n // can add a significant amount of overhead. Avoid the\n // intermediate object creation for the common case of a\n // single callback argument\n\n if (arguments.length === 2) {\n var length = callbacks.length;\n for (var i = 0; i < length; ++i) {\n callbacks[i].call(this, arguments[1]);\n }\n } else {\n var args = Array.prototype.slice.call(arguments, 1);\n var _length = callbacks.length;\n for (var _i = 0; _i < _length; ++_i) {\n callbacks[_i].apply(this, args);\n }\n }\n }\n /**\n * Destroys the stream and cleans up.\n */;\n _proto.dispose = function dispose() {\n this.listeners = {};\n }\n /**\n * Forwards all `data` events on this stream to the destination stream. The\n * destination stream should provide a method `push` to receive the data\n * events as they arrive.\n *\n * @param {Stream} destination the stream that will receive all `data` events\n * @see http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options\n */;\n _proto.pipe = function pipe(destination) {\n this.on('data', function (data) {\n destination.push(data);\n });\n };\n return Stream;\n }();\n /*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */\n\n /**\n * Returns the subarray of a Uint8Array without PKCS#7 padding.\n *\n * @param padded {Uint8Array} unencrypted bytes that have been padded\n * @return {Uint8Array} the unpadded bytes\n * @see http://tools.ietf.org/html/rfc5652\n */\n\n function unpad(padded) {\n return padded.subarray(0, padded.byteLength - padded[padded.byteLength - 1]);\n }\n /*! @name aes-decrypter @version 4.0.1 @license Apache-2.0 */\n\n /**\n * @file aes.js\n *\n * This file contains an adaptation of the AES decryption algorithm\n * from the Standford Javascript Cryptography Library. That work is\n * covered by the following copyright and permissions notice:\n *\n * Copyright 2009-2010 Emily Stark, Mike Hamburg, Dan Boneh.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following\n * disclaimer in the documentation and/or other materials provided\n * with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR\n * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE\n * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN\n * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * The views and conclusions contained in the software and documentation\n * are those of the authors and should not be interpreted as representing\n * official policies, either expressed or implied, of the authors.\n */\n\n /**\n * Expand the S-box tables.\n *\n * @private\n */\n\n var precompute = function precompute() {\n var tables = [[[], [], [], [], []], [[], [], [], [], []]];\n var encTable = tables[0];\n var decTable = tables[1];\n var sbox = encTable[4];\n var sboxInv = decTable[4];\n var i;\n var x;\n var xInv;\n var d = [];\n var th = [];\n var x2;\n var x4;\n var x8;\n var s;\n var tEnc;\n var tDec; // Compute double and third tables\n\n for (i = 0; i < 256; i++) {\n th[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n }\n for (x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n // Compute sbox\n s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n s = s >> 8 ^ s & 255 ^ 99;\n sbox[x] = s;\n sboxInv[s] = x; // Compute MixColumns\n\n x8 = d[x4 = d[x2 = d[x]]];\n tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n tEnc = d[s] * 0x101 ^ s * 0x1010100;\n for (i = 0; i < 4; i++) {\n encTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n decTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n }\n } // Compactify. Considerable speedup on Firefox.\n\n for (i = 0; i < 5; i++) {\n encTable[i] = encTable[i].slice(0);\n decTable[i] = decTable[i].slice(0);\n }\n return tables;\n };\n var aesTables = null;\n /**\n * Schedule out an AES key for both encryption and decryption. This\n * is a low-level class. Use a cipher mode to do bulk encryption.\n *\n * @class AES\n * @param key {Array} The key as an array of 4, 6 or 8 words.\n */\n var AES = /*#__PURE__*/function () {\n function AES(key) {\n _classCallCheck(this, AES);\n /**\n * The expanded S-box and inverse S-box tables. These will be computed\n * on the client so that we don't have to send them down the wire.\n *\n * There are two tables, _tables[0] is for encryption and\n * _tables[1] is for decryption.\n *\n * The first 4 sub-tables are the expanded S-box with MixColumns. The\n * last (_tables[01][4]) is the S-box itself.\n *\n * @private\n */\n // if we have yet to precompute the S-box tables\n // do so now\n if (!aesTables) {\n aesTables = precompute();\n } // then make a copy of that object for use\n\n this._tables = [[aesTables[0][0].slice(), aesTables[0][1].slice(), aesTables[0][2].slice(), aesTables[0][3].slice(), aesTables[0][4].slice()], [aesTables[1][0].slice(), aesTables[1][1].slice(), aesTables[1][2].slice(), aesTables[1][3].slice(), aesTables[1][4].slice()]];\n var i;\n var j;\n var tmp;\n var sbox = this._tables[0][4];\n var decTable = this._tables[1];\n var keyLen = key.length;\n var rcon = 1;\n if (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n throw new Error('Invalid aes key size');\n }\n var encKey = key.slice(0);\n var decKey = [];\n this._key = [encKey, decKey]; // schedule encryption keys\n\n for (i = keyLen; i < 4 * keyLen + 28; i++) {\n tmp = encKey[i - 1]; // apply sbox\n\n if (i % keyLen === 0 || keyLen === 8 && i % keyLen === 4) {\n tmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255]; // shift rows and add rcon\n\n if (i % keyLen === 0) {\n tmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n rcon = rcon << 1 ^ (rcon >> 7) * 283;\n }\n }\n encKey[i] = encKey[i - keyLen] ^ tmp;\n } // schedule decryption keys\n\n for (j = 0; i; j++, i--) {\n tmp = encKey[j & 3 ? i : i - 4];\n if (i <= 4 || j < 4) {\n decKey[j] = tmp;\n } else {\n decKey[j] = decTable[0][sbox[tmp >>> 24]] ^ decTable[1][sbox[tmp >> 16 & 255]] ^ decTable[2][sbox[tmp >> 8 & 255]] ^ decTable[3][sbox[tmp & 255]];\n }\n }\n }\n /**\n * Decrypt 16 bytes, specified as four 32-bit words.\n *\n * @param {number} encrypted0 the first word to decrypt\n * @param {number} encrypted1 the second word to decrypt\n * @param {number} encrypted2 the third word to decrypt\n * @param {number} encrypted3 the fourth word to decrypt\n * @param {Int32Array} out the array to write the decrypted words\n * into\n * @param {number} offset the offset into the output array to start\n * writing results\n * @return {Array} The plaintext.\n */\n _createClass(AES, [{\n key: \"decrypt\",\n value: function decrypt(encrypted0, encrypted1, encrypted2, encrypted3, out, offset) {\n var key = this._key[1]; // state variables a,b,c,d are loaded with pre-whitened data\n\n var a = encrypted0 ^ key[0];\n var b = encrypted3 ^ key[1];\n var c = encrypted2 ^ key[2];\n var d = encrypted1 ^ key[3];\n var a2;\n var b2;\n var c2; // key.length === 2 ?\n\n var nInnerRounds = key.length / 4 - 2;\n var i;\n var kIndex = 4;\n var table = this._tables[1]; // load up the tables\n\n var table0 = table[0];\n var table1 = table[1];\n var table2 = table[2];\n var table3 = table[3];\n var sbox = table[4]; // Inner rounds. Cribbed from OpenSSL.\n\n for (i = 0; i < nInnerRounds; i++) {\n a2 = table0[a >>> 24] ^ table1[b >> 16 & 255] ^ table2[c >> 8 & 255] ^ table3[d & 255] ^ key[kIndex];\n b2 = table0[b >>> 24] ^ table1[c >> 16 & 255] ^ table2[d >> 8 & 255] ^ table3[a & 255] ^ key[kIndex + 1];\n c2 = table0[c >>> 24] ^ table1[d >> 16 & 255] ^ table2[a >> 8 & 255] ^ table3[b & 255] ^ key[kIndex + 2];\n d = table0[d >>> 24] ^ table1[a >> 16 & 255] ^ table2[b >> 8 & 255] ^ table3[c & 255] ^ key[kIndex + 3];\n kIndex += 4;\n a = a2;\n b = b2;\n c = c2;\n } // Last round.\n\n for (i = 0; i < 4; i++) {\n out[(3 & -i) + offset] = sbox[a >>> 24] << 24 ^ sbox[b >> 16 & 255] << 16 ^ sbox[c >> 8 & 255] << 8 ^ sbox[d & 255] ^ key[kIndex++];\n a2 = a;\n a = b;\n b = c;\n c = d;\n d = a2;\n }\n }\n }]);\n return AES;\n }();\n /**\n * @file async-stream.js\n */\n /**\n * A wrapper around the Stream class to use setTimeout\n * and run stream \"jobs\" Asynchronously\n *\n * @class AsyncStream\n * @extends Stream\n */\n var AsyncStream = /*#__PURE__*/function (_Stream) {\n _inherits(AsyncStream, _Stream);\n var _super84 = _createSuper(AsyncStream);\n function AsyncStream() {\n var _this164;\n _classCallCheck(this, AsyncStream);\n _this164 = _super84.call(this, Stream);\n _this164.jobs = [];\n _this164.delay = 1;\n _this164.timeout_ = null;\n return _this164;\n }\n /**\n * process an async job\n *\n * @private\n */\n _createClass(AsyncStream, [{\n key: \"processJob_\",\n value: function processJob_() {\n this.jobs.shift()();\n if (this.jobs.length) {\n this.timeout_ = setTimeout(this.processJob_.bind(this), this.delay);\n } else {\n this.timeout_ = null;\n }\n }\n /**\n * push a job into the stream\n *\n * @param {Function} job the job to push into the stream\n */\n }, {\n key: \"push\",\n value: function push(job) {\n this.jobs.push(job);\n if (!this.timeout_) {\n this.timeout_ = setTimeout(this.processJob_.bind(this), this.delay);\n }\n }\n }]);\n return AsyncStream;\n }(Stream);\n /**\n * @file decrypter.js\n *\n * An asynchronous implementation of AES-128 CBC decryption with\n * PKCS#7 padding.\n */\n /**\n * Convert network-order (big-endian) bytes into their little-endian\n * representation.\n */\n var ntoh = function ntoh(word) {\n return word << 24 | (word & 0xff00) << 8 | (word & 0xff0000) >> 8 | word >>> 24;\n };\n /**\n * Decrypt bytes using AES-128 with CBC and PKCS#7 padding.\n *\n * @param {Uint8Array} encrypted the encrypted bytes\n * @param {Uint32Array} key the bytes of the decryption key\n * @param {Uint32Array} initVector the initialization vector (IV) to\n * use for the first round of CBC.\n * @return {Uint8Array} the decrypted bytes\n *\n * @see http://en.wikipedia.org/wiki/Advanced_Encryption_Standard\n * @see http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Cipher_Block_Chaining_.28CBC.29\n * @see https://tools.ietf.org/html/rfc2315\n */\n\n var decrypt = function decrypt(encrypted, key, initVector) {\n // word-level access to the encrypted bytes\n var encrypted32 = new Int32Array(encrypted.buffer, encrypted.byteOffset, encrypted.byteLength >> 2);\n var decipher = new AES(Array.prototype.slice.call(key)); // byte and word-level access for the decrypted output\n\n var decrypted = new Uint8Array(encrypted.byteLength);\n var decrypted32 = new Int32Array(decrypted.buffer); // temporary variables for working with the IV, encrypted, and\n // decrypted data\n\n var init0;\n var init1;\n var init2;\n var init3;\n var encrypted0;\n var encrypted1;\n var encrypted2;\n var encrypted3; // iteration variable\n\n var wordIx; // pull out the words of the IV to ensure we don't modify the\n // passed-in reference and easier access\n\n init0 = initVector[0];\n init1 = initVector[1];\n init2 = initVector[2];\n init3 = initVector[3]; // decrypt four word sequences, applying cipher-block chaining (CBC)\n // to each decrypted block\n\n for (wordIx = 0; wordIx < encrypted32.length; wordIx += 4) {\n // convert big-endian (network order) words into little-endian\n // (javascript order)\n encrypted0 = ntoh(encrypted32[wordIx]);\n encrypted1 = ntoh(encrypted32[wordIx + 1]);\n encrypted2 = ntoh(encrypted32[wordIx + 2]);\n encrypted3 = ntoh(encrypted32[wordIx + 3]); // decrypt the block\n\n decipher.decrypt(encrypted0, encrypted1, encrypted2, encrypted3, decrypted32, wordIx); // XOR with the IV, and restore network byte-order to obtain the\n // plaintext\n\n decrypted32[wordIx] = ntoh(decrypted32[wordIx] ^ init0);\n decrypted32[wordIx + 1] = ntoh(decrypted32[wordIx + 1] ^ init1);\n decrypted32[wordIx + 2] = ntoh(decrypted32[wordIx + 2] ^ init2);\n decrypted32[wordIx + 3] = ntoh(decrypted32[wordIx + 3] ^ init3); // setup the IV for the next round\n\n init0 = encrypted0;\n init1 = encrypted1;\n init2 = encrypted2;\n init3 = encrypted3;\n }\n return decrypted;\n };\n /**\n * The `Decrypter` class that manages decryption of AES\n * data through `AsyncStream` objects and the `decrypt`\n * function\n *\n * @param {Uint8Array} encrypted the encrypted bytes\n * @param {Uint32Array} key the bytes of the decryption key\n * @param {Uint32Array} initVector the initialization vector (IV) to\n * @param {Function} done the function to run when done\n * @class Decrypter\n */\n var Decrypter = /*#__PURE__*/function () {\n function Decrypter(encrypted, key, initVector, done) {\n _classCallCheck(this, Decrypter);\n var step = Decrypter.STEP;\n var encrypted32 = new Int32Array(encrypted.buffer);\n var decrypted = new Uint8Array(encrypted.byteLength);\n var i = 0;\n this.asyncStream_ = new AsyncStream(); // split up the encryption job and do the individual chunks asynchronously\n\n this.asyncStream_.push(this.decryptChunk_(encrypted32.subarray(i, i + step), key, initVector, decrypted));\n for (i = step; i < encrypted32.length; i += step) {\n initVector = new Uint32Array([ntoh(encrypted32[i - 4]), ntoh(encrypted32[i - 3]), ntoh(encrypted32[i - 2]), ntoh(encrypted32[i - 1])]);\n this.asyncStream_.push(this.decryptChunk_(encrypted32.subarray(i, i + step), key, initVector, decrypted));\n } // invoke the done() callback when everything is finished\n\n this.asyncStream_.push(function () {\n // remove pkcs#7 padding from the decrypted bytes\n done(null, unpad(decrypted));\n });\n }\n /**\n * a getter for step the maximum number of bytes to process at one time\n *\n * @return {number} the value of step 32000\n */\n _createClass(Decrypter, [{\n key: \"decryptChunk_\",\n value:\n /**\n * @private\n */\n\n function decryptChunk_(encrypted, key, initVector, decrypted) {\n return function () {\n var bytes = decrypt(encrypted, key, initVector);\n decrypted.set(bytes, encrypted.byteOffset);\n };\n }\n }], [{\n key: \"STEP\",\n get: function get() {\n // 4 * 8000;\n return 32000;\n }\n }]);\n return Decrypter;\n }();\n var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n var win;\n if (typeof window !== \"undefined\") {\n win = window;\n } else if (typeof commonjsGlobal !== \"undefined\") {\n win = commonjsGlobal;\n } else if (typeof self !== \"undefined\") {\n win = self;\n } else {\n win = {};\n }\n var window_1 = win;\n var isArrayBufferView = function isArrayBufferView(obj) {\n if (ArrayBuffer.isView === 'function') {\n return ArrayBuffer.isView(obj);\n }\n return obj && obj.buffer instanceof ArrayBuffer;\n };\n var BigInt = window_1.BigInt || Number;\n [BigInt('0x1'), BigInt('0x100'), BigInt('0x10000'), BigInt('0x1000000'), BigInt('0x100000000'), BigInt('0x10000000000'), BigInt('0x1000000000000'), BigInt('0x100000000000000'), BigInt('0x10000000000000000')];\n (function () {\n var a = new Uint16Array([0xFFCC]);\n var b = new Uint8Array(a.buffer, a.byteOffset, a.byteLength);\n if (b[0] === 0xFF) {\n return 'big';\n }\n if (b[0] === 0xCC) {\n return 'little';\n }\n return 'unknown';\n })();\n /**\n * Creates an object for sending to a web worker modifying properties that are TypedArrays\n * into a new object with seperated properties for the buffer, byteOffset, and byteLength.\n *\n * @param {Object} message\n * Object of properties and values to send to the web worker\n * @return {Object}\n * Modified message with TypedArray values expanded\n * @function createTransferableMessage\n */\n\n var createTransferableMessage = function createTransferableMessage(message) {\n var transferable = {};\n Object.keys(message).forEach(function (key) {\n var value = message[key];\n if (isArrayBufferView(value)) {\n transferable[key] = {\n bytes: value.buffer,\n byteOffset: value.byteOffset,\n byteLength: value.byteLength\n };\n } else {\n transferable[key] = value;\n }\n });\n return transferable;\n };\n /* global self */\n\n /**\n * Our web worker interface so that things can talk to aes-decrypter\n * that will be running in a web worker. the scope is passed to this by\n * webworkify.\n */\n\n self.onmessage = function (event) {\n var data = event.data;\n var encrypted = new Uint8Array(data.encrypted.bytes, data.encrypted.byteOffset, data.encrypted.byteLength);\n var key = new Uint32Array(data.key.bytes, data.key.byteOffset, data.key.byteLength / 4);\n var iv = new Uint32Array(data.iv.bytes, data.iv.byteOffset, data.iv.byteLength / 4);\n /* eslint-disable no-new, handle-callback-err */\n\n new Decrypter(encrypted, key, iv, function (err, bytes) {\n self.postMessage(createTransferableMessage({\n source: data.source,\n decrypted: bytes\n }), [bytes.buffer]);\n });\n /* eslint-enable */\n };\n}));\nvar Decrypter = factory(workerCode);\n/* rollup-plugin-worker-factory end for worker!/home/runner/work/http-streaming/http-streaming/src/decrypter-worker.js */\n\n/**\n * Convert the properties of an HLS track into an audioTrackKind.\n *\n * @private\n */\n\nvar audioTrackKind_ = function audioTrackKind_(properties) {\n var kind = properties[\"default\"] ? 'main' : 'alternative';\n if (properties.characteristics && properties.characteristics.indexOf('public.accessibility.describes-video') >= 0) {\n kind = 'main-desc';\n }\n return kind;\n};\n/**\n * Pause provided segment loader and playlist loader if active\n *\n * @param {SegmentLoader} segmentLoader\n * SegmentLoader to pause\n * @param {Object} mediaType\n * Active media type\n * @function stopLoaders\n */\n\nvar stopLoaders = function stopLoaders(segmentLoader, mediaType) {\n segmentLoader.abort();\n segmentLoader.pause();\n if (mediaType && mediaType.activePlaylistLoader) {\n mediaType.activePlaylistLoader.pause();\n mediaType.activePlaylistLoader = null;\n }\n};\n/**\n * Start loading provided segment loader and playlist loader\n *\n * @param {PlaylistLoader} playlistLoader\n * PlaylistLoader to start loading\n * @param {Object} mediaType\n * Active media type\n * @function startLoaders\n */\n\nvar startLoaders = function startLoaders(playlistLoader, mediaType) {\n // Segment loader will be started after `loadedmetadata` or `loadedplaylist` from the\n // playlist loader\n mediaType.activePlaylistLoader = playlistLoader;\n playlistLoader.load();\n};\n/**\n * Returns a function to be called when the media group changes. It performs a\n * non-destructive (preserve the buffer) resync of the SegmentLoader. This is because a\n * change of group is merely a rendition switch of the same content at another encoding,\n * rather than a change of content, such as switching audio from English to Spanish.\n *\n * @param {string} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @return {Function}\n * Handler for a non-destructive resync of SegmentLoader when the active media\n * group changes.\n * @function onGroupChanged\n */\n\nvar onGroupChanged = function onGroupChanged(type, settings) {\n return function () {\n var _settings$segmentLoad = settings.segmentLoaders,\n segmentLoader = _settings$segmentLoad[type],\n mainSegmentLoader = _settings$segmentLoad.main,\n mediaType = settings.mediaTypes[type];\n var activeTrack = mediaType.activeTrack();\n var activeGroup = mediaType.getActiveGroup();\n var previousActiveLoader = mediaType.activePlaylistLoader;\n var lastGroup = mediaType.lastGroup_; // the group did not change do nothing\n\n if (activeGroup && lastGroup && activeGroup.id === lastGroup.id) {\n return;\n }\n mediaType.lastGroup_ = activeGroup;\n mediaType.lastTrack_ = activeTrack;\n stopLoaders(segmentLoader, mediaType);\n if (!activeGroup || activeGroup.isMainPlaylist) {\n // there is no group active or active group is a main playlist and won't change\n return;\n }\n if (!activeGroup.playlistLoader) {\n if (previousActiveLoader) {\n // The previous group had a playlist loader but the new active group does not\n // this means we are switching from demuxed to muxed audio. In this case we want to\n // do a destructive reset of the main segment loader and not restart the audio\n // loaders.\n mainSegmentLoader.resetEverything();\n }\n return;\n } // Non-destructive resync\n\n segmentLoader.resyncLoader();\n startLoaders(activeGroup.playlistLoader, mediaType);\n };\n};\nvar onGroupChanging = function onGroupChanging(type, settings) {\n return function () {\n var segmentLoader = settings.segmentLoaders[type],\n mediaType = settings.mediaTypes[type];\n mediaType.lastGroup_ = null;\n segmentLoader.abort();\n segmentLoader.pause();\n };\n};\n/**\n * Returns a function to be called when the media track changes. It performs a\n * destructive reset of the SegmentLoader to ensure we start loading as close to\n * currentTime as possible.\n *\n * @param {string} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @return {Function}\n * Handler for a destructive reset of SegmentLoader when the active media\n * track changes.\n * @function onTrackChanged\n */\n\nvar onTrackChanged = function onTrackChanged(type, settings) {\n return function () {\n var mainPlaylistLoader = settings.mainPlaylistLoader,\n _settings$segmentLoad2 = settings.segmentLoaders,\n segmentLoader = _settings$segmentLoad2[type],\n mainSegmentLoader = _settings$segmentLoad2.main,\n mediaType = settings.mediaTypes[type];\n var activeTrack = mediaType.activeTrack();\n var activeGroup = mediaType.getActiveGroup();\n var previousActiveLoader = mediaType.activePlaylistLoader;\n var lastTrack = mediaType.lastTrack_; // track did not change, do nothing\n\n if (lastTrack && activeTrack && lastTrack.id === activeTrack.id) {\n return;\n }\n mediaType.lastGroup_ = activeGroup;\n mediaType.lastTrack_ = activeTrack;\n stopLoaders(segmentLoader, mediaType);\n if (!activeGroup) {\n // there is no group active so we do not want to restart loaders\n return;\n }\n if (activeGroup.isMainPlaylist) {\n // track did not change, do nothing\n if (!activeTrack || !lastTrack || activeTrack.id === lastTrack.id) {\n return;\n }\n var pc = settings.vhs.playlistController_;\n var newPlaylist = pc.selectPlaylist(); // media will not change do nothing\n\n if (pc.media() === newPlaylist) {\n return;\n }\n mediaType.logger_(\"track change. Switching main audio from \".concat(lastTrack.id, \" to \").concat(activeTrack.id));\n mainPlaylistLoader.pause();\n mainSegmentLoader.resetEverything();\n pc.fastQualityChange_(newPlaylist);\n return;\n }\n if (type === 'AUDIO') {\n if (!activeGroup.playlistLoader) {\n // when switching from demuxed audio/video to muxed audio/video (noted by no\n // playlist loader for the audio group), we want to do a destructive reset of the\n // main segment loader and not restart the audio loaders\n mainSegmentLoader.setAudio(true); // don't have to worry about disabling the audio of the audio segment loader since\n // it should be stopped\n\n mainSegmentLoader.resetEverything();\n return;\n } // although the segment loader is an audio segment loader, call the setAudio\n // function to ensure it is prepared to re-append the init segment (or handle other\n // config changes)\n\n segmentLoader.setAudio(true);\n mainSegmentLoader.setAudio(false);\n }\n if (previousActiveLoader === activeGroup.playlistLoader) {\n // Nothing has actually changed. This can happen because track change events can fire\n // multiple times for a \"single\" change. One for enabling the new active track, and\n // one for disabling the track that was active\n startLoaders(activeGroup.playlistLoader, mediaType);\n return;\n }\n if (segmentLoader.track) {\n // For WebVTT, set the new text track in the segmentloader\n segmentLoader.track(activeTrack);\n } // destructive reset\n\n segmentLoader.resetEverything();\n startLoaders(activeGroup.playlistLoader, mediaType);\n };\n};\nvar onError = {\n /**\n * Returns a function to be called when a SegmentLoader or PlaylistLoader encounters\n * an error.\n *\n * @param {string} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @return {Function}\n * Error handler. Logs warning (or error if the playlist is excluded) to\n * console and switches back to default audio track.\n * @function onError.AUDIO\n */\n AUDIO: function AUDIO(type, settings) {\n return function () {\n var mediaType = settings.mediaTypes[type],\n excludePlaylist = settings.excludePlaylist; // switch back to default audio track\n\n var activeTrack = mediaType.activeTrack();\n var activeGroup = mediaType.activeGroup();\n var id = (activeGroup.filter(function (group) {\n return group[\"default\"];\n })[0] || activeGroup[0]).id;\n var defaultTrack = mediaType.tracks[id];\n if (activeTrack === defaultTrack) {\n // Default track encountered an error. All we can do now is exclude the current\n // rendition and hope another will switch audio groups\n excludePlaylist({\n error: {\n message: 'Problem encountered loading the default audio track.'\n }\n });\n return;\n }\n videojs.log.warn('Problem encountered loading the alternate audio track.' + 'Switching back to default.');\n for (var trackId in mediaType.tracks) {\n mediaType.tracks[trackId].enabled = mediaType.tracks[trackId] === defaultTrack;\n }\n mediaType.onTrackChanged();\n };\n },\n /**\n * Returns a function to be called when a SegmentLoader or PlaylistLoader encounters\n * an error.\n *\n * @param {string} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @return {Function}\n * Error handler. Logs warning to console and disables the active subtitle track\n * @function onError.SUBTITLES\n */\n SUBTITLES: function SUBTITLES(type, settings) {\n return function () {\n var mediaType = settings.mediaTypes[type];\n videojs.log.warn('Problem encountered loading the subtitle track.' + 'Disabling subtitle track.');\n var track = mediaType.activeTrack();\n if (track) {\n track.mode = 'disabled';\n }\n mediaType.onTrackChanged();\n };\n }\n};\nvar setupListeners = {\n /**\n * Setup event listeners for audio playlist loader\n *\n * @param {string} type\n * MediaGroup type\n * @param {PlaylistLoader|null} playlistLoader\n * PlaylistLoader to register listeners on\n * @param {Object} settings\n * Object containing required information for media groups\n * @function setupListeners.AUDIO\n */\n AUDIO: function AUDIO(type, playlistLoader, settings) {\n if (!playlistLoader) {\n // no playlist loader means audio will be muxed with the video\n return;\n }\n var tech = settings.tech,\n requestOptions = settings.requestOptions,\n segmentLoader = settings.segmentLoaders[type];\n playlistLoader.on('loadedmetadata', function () {\n var media = playlistLoader.media();\n segmentLoader.playlist(media, requestOptions); // if the video is already playing, or if this isn't a live video and preload\n // permits, start downloading segments\n\n if (!tech.paused() || media.endList && tech.preload() !== 'none') {\n segmentLoader.load();\n }\n });\n playlistLoader.on('loadedplaylist', function () {\n segmentLoader.playlist(playlistLoader.media(), requestOptions); // If the player isn't paused, ensure that the segment loader is running\n\n if (!tech.paused()) {\n segmentLoader.load();\n }\n });\n playlistLoader.on('error', onError[type](type, settings));\n },\n /**\n * Setup event listeners for subtitle playlist loader\n *\n * @param {string} type\n * MediaGroup type\n * @param {PlaylistLoader|null} playlistLoader\n * PlaylistLoader to register listeners on\n * @param {Object} settings\n * Object containing required information for media groups\n * @function setupListeners.SUBTITLES\n */\n SUBTITLES: function SUBTITLES(type, playlistLoader, settings) {\n var tech = settings.tech,\n requestOptions = settings.requestOptions,\n segmentLoader = settings.segmentLoaders[type],\n mediaType = settings.mediaTypes[type];\n playlistLoader.on('loadedmetadata', function () {\n var media = playlistLoader.media();\n segmentLoader.playlist(media, requestOptions);\n segmentLoader.track(mediaType.activeTrack()); // if the video is already playing, or if this isn't a live video and preload\n // permits, start downloading segments\n\n if (!tech.paused() || media.endList && tech.preload() !== 'none') {\n segmentLoader.load();\n }\n });\n playlistLoader.on('loadedplaylist', function () {\n segmentLoader.playlist(playlistLoader.media(), requestOptions); // If the player isn't paused, ensure that the segment loader is running\n\n if (!tech.paused()) {\n segmentLoader.load();\n }\n });\n playlistLoader.on('error', onError[type](type, settings));\n }\n};\nvar initialize = {\n /**\n * Setup PlaylistLoaders and AudioTracks for the audio groups\n *\n * @param {string} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @function initialize.AUDIO\n */\n 'AUDIO': function AUDIO(type, settings) {\n var vhs = settings.vhs,\n sourceType = settings.sourceType,\n segmentLoader = settings.segmentLoaders[type],\n requestOptions = settings.requestOptions,\n mediaGroups = settings.main.mediaGroups,\n _settings$mediaTypes$ = settings.mediaTypes[type],\n groups = _settings$mediaTypes$.groups,\n tracks = _settings$mediaTypes$.tracks,\n logger_ = _settings$mediaTypes$.logger_,\n mainPlaylistLoader = settings.mainPlaylistLoader;\n var audioOnlyMain = isAudioOnly(mainPlaylistLoader.main); // force a default if we have none\n\n if (!mediaGroups[type] || Object.keys(mediaGroups[type]).length === 0) {\n mediaGroups[type] = {\n main: {\n \"default\": {\n \"default\": true\n }\n }\n };\n if (audioOnlyMain) {\n mediaGroups[type].main[\"default\"].playlists = mainPlaylistLoader.main.playlists;\n }\n }\n for (var groupId in mediaGroups[type]) {\n if (!groups[groupId]) {\n groups[groupId] = [];\n }\n for (var variantLabel in mediaGroups[type][groupId]) {\n var properties = mediaGroups[type][groupId][variantLabel];\n var playlistLoader = void 0;\n if (audioOnlyMain) {\n logger_(\"AUDIO group '\".concat(groupId, \"' label '\").concat(variantLabel, \"' is a main playlist\"));\n properties.isMainPlaylist = true;\n playlistLoader = null; // if vhs-json was provided as the source, and the media playlist was resolved,\n // use the resolved media playlist object\n } else if (sourceType === 'vhs-json' && properties.playlists) {\n playlistLoader = new PlaylistLoader(properties.playlists[0], vhs, requestOptions);\n } else if (properties.resolvedUri) {\n playlistLoader = new PlaylistLoader(properties.resolvedUri, vhs, requestOptions); // TODO: dash isn't the only type with properties.playlists\n // should we even have properties.playlists in this check.\n } else if (properties.playlists && sourceType === 'dash') {\n playlistLoader = new DashPlaylistLoader(properties.playlists[0], vhs, requestOptions, mainPlaylistLoader);\n } else {\n // no resolvedUri means the audio is muxed with the video when using this\n // audio track\n playlistLoader = null;\n }\n properties = merge({\n id: variantLabel,\n playlistLoader: playlistLoader\n }, properties);\n setupListeners[type](type, properties.playlistLoader, settings);\n groups[groupId].push(properties);\n if (typeof tracks[variantLabel] === 'undefined') {\n var track = new videojs.AudioTrack({\n id: variantLabel,\n kind: audioTrackKind_(properties),\n enabled: false,\n language: properties.language,\n \"default\": properties[\"default\"],\n label: variantLabel\n });\n tracks[variantLabel] = track;\n }\n }\n } // setup single error event handler for the segment loader\n\n segmentLoader.on('error', onError[type](type, settings));\n },\n /**\n * Setup PlaylistLoaders and TextTracks for the subtitle groups\n *\n * @param {string} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @function initialize.SUBTITLES\n */\n 'SUBTITLES': function SUBTITLES(type, settings) {\n var tech = settings.tech,\n vhs = settings.vhs,\n sourceType = settings.sourceType,\n segmentLoader = settings.segmentLoaders[type],\n requestOptions = settings.requestOptions,\n mediaGroups = settings.main.mediaGroups,\n _settings$mediaTypes$2 = settings.mediaTypes[type],\n groups = _settings$mediaTypes$2.groups,\n tracks = _settings$mediaTypes$2.tracks,\n mainPlaylistLoader = settings.mainPlaylistLoader;\n for (var groupId in mediaGroups[type]) {\n if (!groups[groupId]) {\n groups[groupId] = [];\n }\n for (var variantLabel in mediaGroups[type][groupId]) {\n if (!vhs.options_.useForcedSubtitles && mediaGroups[type][groupId][variantLabel].forced) {\n // Subtitle playlists with the forced attribute are not selectable in Safari.\n // According to Apple's HLS Authoring Specification:\n // If content has forced subtitles and regular subtitles in a given language,\n // the regular subtitles track in that language MUST contain both the forced\n // subtitles and the regular subtitles for that language.\n // Because of this requirement and that Safari does not add forced subtitles,\n // forced subtitles are skipped here to maintain consistent experience across\n // all platforms\n continue;\n }\n var properties = mediaGroups[type][groupId][variantLabel];\n var playlistLoader = void 0;\n if (sourceType === 'hls') {\n playlistLoader = new PlaylistLoader(properties.resolvedUri, vhs, requestOptions);\n } else if (sourceType === 'dash') {\n var playlists = properties.playlists.filter(function (p) {\n return p.excludeUntil !== Infinity;\n });\n if (!playlists.length) {\n return;\n }\n playlistLoader = new DashPlaylistLoader(properties.playlists[0], vhs, requestOptions, mainPlaylistLoader);\n } else if (sourceType === 'vhs-json') {\n playlistLoader = new PlaylistLoader(\n // if the vhs-json object included the media playlist, use the media playlist\n // as provided, otherwise use the resolved URI to load the playlist\n properties.playlists ? properties.playlists[0] : properties.resolvedUri, vhs, requestOptions);\n }\n properties = merge({\n id: variantLabel,\n playlistLoader: playlistLoader\n }, properties);\n setupListeners[type](type, properties.playlistLoader, settings);\n groups[groupId].push(properties);\n if (typeof tracks[variantLabel] === 'undefined') {\n var track = tech.addRemoteTextTrack({\n id: variantLabel,\n kind: 'subtitles',\n \"default\": properties[\"default\"] && properties.autoselect,\n language: properties.language,\n label: variantLabel\n }, false).track;\n tracks[variantLabel] = track;\n }\n }\n } // setup single error event handler for the segment loader\n\n segmentLoader.on('error', onError[type](type, settings));\n },\n /**\n * Setup TextTracks for the closed-caption groups\n *\n * @param {String} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @function initialize['CLOSED-CAPTIONS']\n */\n 'CLOSED-CAPTIONS': function CLOSEDCAPTIONS(type, settings) {\n var tech = settings.tech,\n mediaGroups = settings.main.mediaGroups,\n _settings$mediaTypes$3 = settings.mediaTypes[type],\n groups = _settings$mediaTypes$3.groups,\n tracks = _settings$mediaTypes$3.tracks;\n for (var groupId in mediaGroups[type]) {\n if (!groups[groupId]) {\n groups[groupId] = [];\n }\n for (var variantLabel in mediaGroups[type][groupId]) {\n var properties = mediaGroups[type][groupId][variantLabel]; // Look for either 608 (CCn) or 708 (SERVICEn) caption services\n\n if (!/^(?:CC|SERVICE)/.test(properties.instreamId)) {\n continue;\n }\n var captionServices = tech.options_.vhs && tech.options_.vhs.captionServices || {};\n var newProps = {\n label: variantLabel,\n language: properties.language,\n instreamId: properties.instreamId,\n \"default\": properties[\"default\"] && properties.autoselect\n };\n if (captionServices[newProps.instreamId]) {\n newProps = merge(newProps, captionServices[newProps.instreamId]);\n }\n if (newProps[\"default\"] === undefined) {\n delete newProps[\"default\"];\n } // No PlaylistLoader is required for Closed-Captions because the captions are\n // embedded within the video stream\n\n groups[groupId].push(merge({\n id: variantLabel\n }, properties));\n if (typeof tracks[variantLabel] === 'undefined') {\n var track = tech.addRemoteTextTrack({\n id: newProps.instreamId,\n kind: 'captions',\n \"default\": newProps[\"default\"],\n language: newProps.language,\n label: newProps.label\n }, false).track;\n tracks[variantLabel] = track;\n }\n }\n }\n }\n};\nvar groupMatch = function groupMatch(list, media) {\n for (var _i113 = 0; _i113 < list.length; _i113++) {\n if (playlistMatch(media, list[_i113])) {\n return true;\n }\n if (list[_i113].playlists && groupMatch(list[_i113].playlists, media)) {\n return true;\n }\n }\n return false;\n};\n/**\n * Returns a function used to get the active group of the provided type\n *\n * @param {string} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @return {Function}\n * Function that returns the active media group for the provided type. Takes an\n * optional parameter {TextTrack} track. If no track is provided, a list of all\n * variants in the group, otherwise the variant corresponding to the provided\n * track is returned.\n * @function activeGroup\n */\n\nvar activeGroup = function activeGroup(type, settings) {\n return function (track) {\n var mainPlaylistLoader = settings.mainPlaylistLoader,\n groups = settings.mediaTypes[type].groups;\n var media = mainPlaylistLoader.media();\n if (!media) {\n return null;\n }\n var variants = null; // set to variants to main media active group\n\n if (media.attributes[type]) {\n variants = groups[media.attributes[type]];\n }\n var groupKeys = Object.keys(groups);\n if (!variants) {\n // find the mainPlaylistLoader media\n // that is in a media group if we are dealing\n // with audio only\n if (type === 'AUDIO' && groupKeys.length > 1 && isAudioOnly(settings.main)) {\n for (var _i114 = 0; _i114 < groupKeys.length; _i114++) {\n var groupPropertyList = groups[groupKeys[_i114]];\n if (groupMatch(groupPropertyList, media)) {\n variants = groupPropertyList;\n break;\n }\n } // use the main group if it exists\n } else if (groups.main) {\n variants = groups.main; // only one group, use that one\n } else if (groupKeys.length === 1) {\n variants = groups[groupKeys[0]];\n }\n }\n if (typeof track === 'undefined') {\n return variants;\n }\n if (track === null || !variants) {\n // An active track was specified so a corresponding group is expected. track === null\n // means no track is currently active so there is no corresponding group\n return null;\n }\n return variants.filter(function (props) {\n return props.id === track.id;\n })[0] || null;\n };\n};\nvar activeTrack = {\n /**\n * Returns a function used to get the active track of type provided\n *\n * @param {string} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @return {Function}\n * Function that returns the active media track for the provided type. Returns\n * null if no track is active\n * @function activeTrack.AUDIO\n */\n AUDIO: function AUDIO(type, settings) {\n return function () {\n var tracks = settings.mediaTypes[type].tracks;\n for (var id in tracks) {\n if (tracks[id].enabled) {\n return tracks[id];\n }\n }\n return null;\n };\n },\n /**\n * Returns a function used to get the active track of type provided\n *\n * @param {string} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @return {Function}\n * Function that returns the active media track for the provided type. Returns\n * null if no track is active\n * @function activeTrack.SUBTITLES\n */\n SUBTITLES: function SUBTITLES(type, settings) {\n return function () {\n var tracks = settings.mediaTypes[type].tracks;\n for (var id in tracks) {\n if (tracks[id].mode === 'showing' || tracks[id].mode === 'hidden') {\n return tracks[id];\n }\n }\n return null;\n };\n }\n};\nvar getActiveGroup = function getActiveGroup(type, _ref63) {\n var mediaTypes = _ref63.mediaTypes;\n return function () {\n var activeTrack_ = mediaTypes[type].activeTrack();\n if (!activeTrack_) {\n return null;\n }\n return mediaTypes[type].activeGroup(activeTrack_);\n };\n};\n/**\n * Setup PlaylistLoaders and Tracks for media groups (Audio, Subtitles,\n * Closed-Captions) specified in the main manifest.\n *\n * @param {Object} settings\n * Object containing required information for setting up the media groups\n * @param {Tech} settings.tech\n * The tech of the player\n * @param {Object} settings.requestOptions\n * XHR request options used by the segment loaders\n * @param {PlaylistLoader} settings.mainPlaylistLoader\n * PlaylistLoader for the main source\n * @param {VhsHandler} settings.vhs\n * VHS SourceHandler\n * @param {Object} settings.main\n * The parsed main manifest\n * @param {Object} settings.mediaTypes\n * Object to store the loaders, tracks, and utility methods for each media type\n * @param {Function} settings.excludePlaylist\n * Excludes the current rendition and forces a rendition switch.\n * @function setupMediaGroups\n */\n\nvar setupMediaGroups = function setupMediaGroups(settings) {\n ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(function (type) {\n initialize[type](type, settings);\n });\n var mediaTypes = settings.mediaTypes,\n mainPlaylistLoader = settings.mainPlaylistLoader,\n tech = settings.tech,\n vhs = settings.vhs,\n _settings$segmentLoad3 = settings.segmentLoaders,\n audioSegmentLoader = _settings$segmentLoad3['AUDIO'],\n mainSegmentLoader = _settings$segmentLoad3.main; // setup active group and track getters and change event handlers\n\n ['AUDIO', 'SUBTITLES'].forEach(function (type) {\n mediaTypes[type].activeGroup = activeGroup(type, settings);\n mediaTypes[type].activeTrack = activeTrack[type](type, settings);\n mediaTypes[type].onGroupChanged = onGroupChanged(type, settings);\n mediaTypes[type].onGroupChanging = onGroupChanging(type, settings);\n mediaTypes[type].onTrackChanged = onTrackChanged(type, settings);\n mediaTypes[type].getActiveGroup = getActiveGroup(type, settings);\n }); // DO NOT enable the default subtitle or caption track.\n // DO enable the default audio track\n\n var audioGroup = mediaTypes.AUDIO.activeGroup();\n if (audioGroup) {\n var groupId = (audioGroup.filter(function (group) {\n return group[\"default\"];\n })[0] || audioGroup[0]).id;\n mediaTypes.AUDIO.tracks[groupId].enabled = true;\n mediaTypes.AUDIO.onGroupChanged();\n mediaTypes.AUDIO.onTrackChanged();\n var activeAudioGroup = mediaTypes.AUDIO.getActiveGroup(); // a similar check for handling setAudio on each loader is run again each time the\n // track is changed, but needs to be handled here since the track may not be considered\n // changed on the first call to onTrackChanged\n\n if (!activeAudioGroup.playlistLoader) {\n // either audio is muxed with video or the stream is audio only\n mainSegmentLoader.setAudio(true);\n } else {\n // audio is demuxed\n mainSegmentLoader.setAudio(false);\n audioSegmentLoader.setAudio(true);\n }\n }\n mainPlaylistLoader.on('mediachange', function () {\n ['AUDIO', 'SUBTITLES'].forEach(function (type) {\n return mediaTypes[type].onGroupChanged();\n });\n });\n mainPlaylistLoader.on('mediachanging', function () {\n ['AUDIO', 'SUBTITLES'].forEach(function (type) {\n return mediaTypes[type].onGroupChanging();\n });\n }); // custom audio track change event handler for usage event\n\n var onAudioTrackChanged = function onAudioTrackChanged() {\n mediaTypes.AUDIO.onTrackChanged();\n tech.trigger({\n type: 'usage',\n name: 'vhs-audio-change'\n });\n };\n tech.audioTracks().addEventListener('change', onAudioTrackChanged);\n tech.remoteTextTracks().addEventListener('change', mediaTypes.SUBTITLES.onTrackChanged);\n vhs.on('dispose', function () {\n tech.audioTracks().removeEventListener('change', onAudioTrackChanged);\n tech.remoteTextTracks().removeEventListener('change', mediaTypes.SUBTITLES.onTrackChanged);\n }); // clear existing audio tracks and add the ones we just created\n\n tech.clearTracks('audio');\n for (var id in mediaTypes.AUDIO.tracks) {\n tech.audioTracks().addTrack(mediaTypes.AUDIO.tracks[id]);\n }\n};\n/**\n * Creates skeleton object used to store the loaders, tracks, and utility methods for each\n * media type\n *\n * @return {Object}\n * Object to store the loaders, tracks, and utility methods for each media type\n * @function createMediaTypes\n */\n\nvar createMediaTypes = function createMediaTypes() {\n var mediaTypes = {};\n ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(function (type) {\n mediaTypes[type] = {\n groups: {},\n tracks: {},\n activePlaylistLoader: null,\n activeGroup: noop,\n activeTrack: noop,\n getActiveGroup: noop,\n onGroupChanged: noop,\n onTrackChanged: noop,\n lastTrack_: null,\n logger_: logger(\"MediaGroups[\".concat(type, \"]\"))\n };\n });\n return mediaTypes;\n};\n\n/**\n * A utility class for setting properties and maintaining the state of the content steering manifest.\n *\n * Content Steering manifest format:\n * VERSION: number (required) currently only version 1 is supported.\n * TTL: number in seconds (optional) until the next content steering manifest reload.\n * RELOAD-URI: string (optional) uri to fetch the next content steering manifest.\n * SERVICE-LOCATION-PRIORITY or PATHWAY-PRIORITY a non empty array of unique string values.\n */\nvar SteeringManifest = /*#__PURE__*/function () {\n function SteeringManifest() {\n _classCallCheck(this, SteeringManifest);\n this.priority_ = [];\n }\n _createClass(SteeringManifest, [{\n key: \"version\",\n get: function get() {\n return this.version_;\n },\n set: function set(number) {\n // Only version 1 is currently supported for both DASH and HLS.\n if (number === 1) {\n this.version_ = number;\n }\n }\n }, {\n key: \"ttl\",\n get: function get() {\n return this.ttl_;\n },\n set: function set(seconds) {\n // TTL = time-to-live, default = 300 seconds.\n this.ttl_ = seconds || 300;\n }\n }, {\n key: \"reloadUri\",\n get: function get() {\n return this.reloadUri_;\n },\n set: function set(uri) {\n if (uri) {\n // reload URI can be relative to the previous reloadUri.\n this.reloadUri_ = resolveUrl(this.reloadUri_, uri);\n }\n }\n }, {\n key: \"priority\",\n get: function get() {\n return this.priority_;\n },\n set: function set(array) {\n // priority must be non-empty and unique values.\n if (array && array.length) {\n this.priority_ = array;\n }\n }\n }]);\n return SteeringManifest;\n}();\n/**\n * This class represents a content steering manifest and associated state. See both HLS and DASH specifications.\n * HLS: https://developer.apple.com/streaming/HLSContentSteeringSpecification.pdf and\n * https://datatracker.ietf.org/doc/draft-pantos-hls-rfc8216bis/ section 4.4.6.6.\n * DASH: https://dashif.org/docs/DASH-IF-CTS-00XX-Content-Steering-Community-Review.pdf\n *\n * @param {function} xhr for making a network request from the browser.\n * @param {function} bandwidth for fetching the current bandwidth from the main segment loader.\n */\nvar ContentSteeringController = /*#__PURE__*/function (_videojs$EventTarget6) {\n _inherits(ContentSteeringController, _videojs$EventTarget6);\n var _super85 = _createSuper(ContentSteeringController);\n function ContentSteeringController(xhr, bandwidth) {\n var _this165;\n _classCallCheck(this, ContentSteeringController);\n _this165 = _super85.call(this);\n _this165.currentPathway = null;\n _this165.defaultPathway = null;\n _this165.queryBeforeStart = null;\n _this165.availablePathways_ = new Set();\n _this165.excludedPathways_ = new Set();\n _this165.steeringManifest = new SteeringManifest();\n _this165.proxyServerUrl_ = null;\n _this165.manifestType_ = null;\n _this165.ttlTimeout_ = null;\n _this165.request_ = null;\n _this165.excludedSteeringManifestURLs = new Set();\n _this165.logger_ = logger('Content Steering');\n _this165.xhr_ = xhr;\n _this165.getBandwidth_ = bandwidth;\n return _this165;\n }\n /**\n * Assigns the content steering tag properties to the steering controller\n *\n * @param {string} baseUrl the baseURL from the manifest for resolving the steering manifest url\n * @param {Object} steeringTag the content steering tag from the main manifest\n */\n _createClass(ContentSteeringController, [{\n key: \"assignTagProperties\",\n value: function assignTagProperties(baseUrl, steeringTag) {\n this.manifestType_ = steeringTag.serverUri ? 'HLS' : 'DASH'; // serverUri is HLS serverURL is DASH\n\n var steeringUri = steeringTag.serverUri || steeringTag.serverURL;\n if (!steeringUri) {\n this.logger_(\"steering manifest URL is \".concat(steeringUri, \", cannot request steering manifest.\"));\n this.trigger('error');\n return;\n } // Content steering manifests can be encoded as a data URI. We can decode, parse and return early if that's the case.\n\n if (steeringUri.startsWith('data:')) {\n this.decodeDataUriManifest_(steeringUri.substring(steeringUri.indexOf(',') + 1));\n return;\n } // With DASH queryBeforeStart, we want to use the steeringUri as soon as possible for the request.\n\n this.steeringManifest.reloadUri = this.queryBeforeStart ? steeringUri : resolveUrl(baseUrl, steeringUri); // pathwayId is HLS defaultServiceLocation is DASH\n\n this.defaultPathway = steeringTag.pathwayId || steeringTag.defaultServiceLocation; // currently only DASH supports the following properties on <ContentSteering> tags.\n\n this.queryBeforeStart = steeringTag.queryBeforeStart || false;\n this.proxyServerUrl_ = steeringTag.proxyServerURL || null; // trigger a steering event if we have a pathway from the content steering tag.\n // this tells VHS which segment pathway to start with.\n // If queryBeforeStart is true we need to wait for the steering manifest response.\n\n if (this.defaultPathway && !this.queryBeforeStart) {\n this.trigger('content-steering');\n }\n if (this.queryBeforeStart) {\n this.requestSteeringManifest(this.steeringManifest.reloadUri);\n }\n }\n /**\n * Requests the content steering manifest and parse the response. This should only be called after\n * assignTagProperties was called with a content steering tag.\n *\n * @param {string} initialUri The optional uri to make the request with.\n * If set, the request should be made with exactly what is passed in this variable.\n * This scenario is specific to DASH when the queryBeforeStart parameter is true.\n * This scenario should only happen once on initalization.\n */\n }, {\n key: \"requestSteeringManifest\",\n value: function requestSteeringManifest(initialUri) {\n var _this166 = this;\n var reloadUri = this.steeringManifest.reloadUri;\n if (!initialUri && !reloadUri) {\n return;\n } // We currently don't support passing MPD query parameters directly to the content steering URL as this requires\n // ExtUrlQueryInfo tag support. See the DASH content steering spec section 8.1.\n // This request URI accounts for manifest URIs that have been excluded.\n\n var uri = initialUri || this.getRequestURI(reloadUri); // If there are no valid manifest URIs, we should stop content steering.\n\n if (!uri) {\n this.logger_('No valid content steering manifest URIs. Stopping content steering.');\n this.trigger('error');\n this.dispose();\n return;\n }\n this.request_ = this.xhr_({\n uri: uri\n }, function (error, errorInfo) {\n if (error) {\n // If the client receives HTTP 410 Gone in response to a manifest request,\n // it MUST NOT issue another request for that URI for the remainder of the\n // playback session. It MAY continue to use the most-recently obtained set\n // of Pathways.\n if (errorInfo.status === 410) {\n _this166.logger_(\"manifest request 410 \".concat(error, \".\"));\n _this166.logger_(\"There will be no more content steering requests to \".concat(uri, \" this session.\"));\n _this166.excludedSteeringManifestURLs.add(uri);\n return;\n } // If the client receives HTTP 429 Too Many Requests with a Retry-After\n // header in response to a manifest request, it SHOULD wait until the time\n // specified by the Retry-After header to reissue the request.\n\n if (errorInfo.status === 429) {\n var retrySeconds = errorInfo.responseHeaders['retry-after'];\n _this166.logger_(\"manifest request 429 \".concat(error, \".\"));\n _this166.logger_(\"content steering will retry in \".concat(retrySeconds, \" seconds.\"));\n _this166.startTTLTimeout_(parseInt(retrySeconds, 10));\n return;\n } // If the Steering Manifest cannot be loaded and parsed correctly, the\n // client SHOULD continue to use the previous values and attempt to reload\n // it after waiting for the previously-specified TTL (or 5 minutes if\n // none).\n\n _this166.logger_(\"manifest failed to load \".concat(error, \".\"));\n _this166.startTTLTimeout_();\n return;\n }\n var steeringManifestJson = JSON.parse(_this166.request_.responseText);\n _this166.startTTLTimeout_();\n _this166.assignSteeringProperties_(steeringManifestJson);\n });\n }\n /**\n * Set the proxy server URL and add the steering manifest url as a URI encoded parameter.\n *\n * @param {string} steeringUrl the steering manifest url\n * @return the steering manifest url to a proxy server with all parameters set\n */\n }, {\n key: \"setProxyServerUrl_\",\n value: function setProxyServerUrl_(steeringUrl) {\n var steeringUrlObject = new window$1.URL(steeringUrl);\n var proxyServerUrlObject = new window$1.URL(this.proxyServerUrl_);\n proxyServerUrlObject.searchParams.set('url', encodeURI(steeringUrlObject.toString()));\n return this.setSteeringParams_(proxyServerUrlObject.toString());\n }\n /**\n * Decodes and parses the data uri encoded steering manifest\n *\n * @param {string} dataUri the data uri to be decoded and parsed.\n */\n }, {\n key: \"decodeDataUriManifest_\",\n value: function decodeDataUriManifest_(dataUri) {\n var steeringManifestJson = JSON.parse(window$1.atob(dataUri));\n this.assignSteeringProperties_(steeringManifestJson);\n }\n /**\n * Set the HLS or DASH content steering manifest request query parameters. For example:\n * _HLS_pathway=\"<CURRENT-PATHWAY-ID>\" and _HLS_throughput=<THROUGHPUT>\n * _DASH_pathway and _DASH_throughput\n *\n * @param {string} uri to add content steering server parameters to.\n * @return a new uri as a string with the added steering query parameters.\n */\n }, {\n key: \"setSteeringParams_\",\n value: function setSteeringParams_(url) {\n var urlObject = new window$1.URL(url);\n var path = this.getPathway();\n var networkThroughput = this.getBandwidth_();\n if (path) {\n var pathwayKey = \"_\".concat(this.manifestType_, \"_pathway\");\n urlObject.searchParams.set(pathwayKey, path);\n }\n if (networkThroughput) {\n var throughputKey = \"_\".concat(this.manifestType_, \"_throughput\");\n urlObject.searchParams.set(throughputKey, networkThroughput);\n }\n return urlObject.toString();\n }\n /**\n * Assigns the current steering manifest properties and to the SteeringManifest object\n *\n * @param {Object} steeringJson the raw JSON steering manifest\n */\n }, {\n key: \"assignSteeringProperties_\",\n value: function assignSteeringProperties_(steeringJson) {\n var _this167 = this;\n this.steeringManifest.version = steeringJson.VERSION;\n if (!this.steeringManifest.version) {\n this.logger_(\"manifest version is \".concat(steeringJson.VERSION, \", which is not supported.\"));\n this.trigger('error');\n return;\n }\n this.steeringManifest.ttl = steeringJson.TTL;\n this.steeringManifest.reloadUri = steeringJson['RELOAD-URI']; // HLS = PATHWAY-PRIORITY required. DASH = SERVICE-LOCATION-PRIORITY optional\n\n this.steeringManifest.priority = steeringJson['PATHWAY-PRIORITY'] || steeringJson['SERVICE-LOCATION-PRIORITY']; // TODO: HLS handle PATHWAY-CLONES. See section 7.2 https://datatracker.ietf.org/doc/draft-pantos-hls-rfc8216bis/\n // 1. apply first pathway from the array.\n // 2. if first pathway doesn't exist in manifest, try next pathway.\n // a. if all pathways are exhausted, ignore the steering manifest priority.\n // 3. if segments fail from an established pathway, try all variants/renditions, then exclude the failed pathway.\n // a. exclude a pathway for a minimum of the last TTL duration. Meaning, from the next steering response,\n // the excluded pathway will be ignored.\n // See excludePathway usage in excludePlaylist().\n // If there are no available pathways, we need to stop content steering.\n\n if (!this.availablePathways_.size) {\n this.logger_('There are no available pathways for content steering. Ending content steering.');\n this.trigger('error');\n this.dispose();\n }\n var chooseNextPathway = function chooseNextPathway(pathwaysByPriority) {\n var _iterator = _createForOfIteratorHelper(pathwaysByPriority),\n _step;\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var path = _step.value;\n if (_this167.availablePathways_.has(path)) {\n return path;\n }\n } // If no pathway matches, ignore the manifest and choose the first available.\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n return _toConsumableArray(_this167.availablePathways_)[0];\n };\n var nextPathway = chooseNextPathway(this.steeringManifest.priority);\n if (this.currentPathway !== nextPathway) {\n this.currentPathway = nextPathway;\n this.trigger('content-steering');\n }\n }\n /**\n * Returns the pathway to use for steering decisions\n *\n * @return {string} returns the current pathway or the default\n */\n }, {\n key: \"getPathway\",\n value: function getPathway() {\n return this.currentPathway || this.defaultPathway;\n }\n /**\n * Chooses the manifest request URI based on proxy URIs and server URLs.\n * Also accounts for exclusion on certain manifest URIs.\n *\n * @param {string} reloadUri the base uri before parameters\n *\n * @return {string} the final URI for the request to the manifest server.\n */\n }, {\n key: \"getRequestURI\",\n value: function getRequestURI(reloadUri) {\n var _this168 = this;\n if (!reloadUri) {\n return null;\n }\n var isExcluded = function isExcluded(uri) {\n return _this168.excludedSteeringManifestURLs.has(uri);\n };\n if (this.proxyServerUrl_) {\n var proxyURI = this.setProxyServerUrl_(reloadUri);\n if (!isExcluded(proxyURI)) {\n return proxyURI;\n }\n }\n var steeringURI = this.setSteeringParams_(reloadUri);\n if (!isExcluded(steeringURI)) {\n return steeringURI;\n } // Return nothing if all valid manifest URIs are excluded.\n\n return null;\n }\n /**\n * Start the timeout for re-requesting the steering manifest at the TTL interval.\n *\n * @param {number} ttl time in seconds of the timeout. Defaults to the\n * ttl interval in the steering manifest\n */\n }, {\n key: \"startTTLTimeout_\",\n value: function startTTLTimeout_() {\n var _this169 = this;\n var ttl = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.steeringManifest.ttl;\n // 300 (5 minutes) is the default value.\n var ttlMS = ttl * 1000;\n this.ttlTimeout_ = window$1.setTimeout(function () {\n _this169.requestSteeringManifest();\n }, ttlMS);\n }\n /**\n * Clear the TTL timeout if necessary.\n */\n }, {\n key: \"clearTTLTimeout_\",\n value: function clearTTLTimeout_() {\n window$1.clearTimeout(this.ttlTimeout_);\n this.ttlTimeout_ = null;\n }\n /**\n * aborts any current steering xhr and sets the current request object to null\n */\n }, {\n key: \"abort\",\n value: function abort() {\n if (this.request_) {\n this.request_.abort();\n }\n this.request_ = null;\n }\n /**\n * aborts steering requests clears the ttl timeout and resets all properties.\n */\n }, {\n key: \"dispose\",\n value: function dispose() {\n this.off('content-steering');\n this.off('error');\n this.abort();\n this.clearTTLTimeout_();\n this.currentPathway = null;\n this.defaultPathway = null;\n this.queryBeforeStart = null;\n this.proxyServerUrl_ = null;\n this.manifestType_ = null;\n this.ttlTimeout_ = null;\n this.request_ = null;\n this.excludedSteeringManifestURLs = new Set();\n this.availablePathways_ = new Set();\n this.excludedPathways_ = new Set();\n this.steeringManifest = new SteeringManifest();\n }\n /**\n * adds a pathway to the available pathways set\n *\n * @param {string} pathway the pathway string to add\n */\n }, {\n key: \"addAvailablePathway\",\n value: function addAvailablePathway(pathway) {\n if (pathway) {\n this.availablePathways_.add(pathway);\n }\n }\n /**\n * clears all pathways from the available pathways set\n */\n }, {\n key: \"clearAvailablePathways\",\n value: function clearAvailablePathways() {\n this.availablePathways_.clear();\n }\n }, {\n key: \"excludePathway\",\n value: function excludePathway(pathway) {\n return this.availablePathways_[\"delete\"](pathway);\n }\n }]);\n return ContentSteeringController;\n}(videojs.EventTarget);\n/**\n * @file playlist-controller.js\n */\nvar ABORT_EARLY_EXCLUSION_SECONDS = 10;\nvar Vhs$1; // SegmentLoader stats that need to have each loader's\n// values summed to calculate the final value\n\nvar loaderStats = ['mediaRequests', 'mediaRequestsAborted', 'mediaRequestsTimedout', 'mediaRequestsErrored', 'mediaTransferDuration', 'mediaBytesTransferred', 'mediaAppends'];\nvar sumLoaderStat = function sumLoaderStat(stat) {\n return this.audioSegmentLoader_[stat] + this.mainSegmentLoader_[stat];\n};\nvar shouldSwitchToMedia = function shouldSwitchToMedia(_ref64) {\n var currentPlaylist = _ref64.currentPlaylist,\n buffered = _ref64.buffered,\n currentTime = _ref64.currentTime,\n nextPlaylist = _ref64.nextPlaylist,\n bufferLowWaterLine = _ref64.bufferLowWaterLine,\n bufferHighWaterLine = _ref64.bufferHighWaterLine,\n duration = _ref64.duration,\n bufferBasedABR = _ref64.bufferBasedABR,\n log = _ref64.log;\n // we have no other playlist to switch to\n if (!nextPlaylist) {\n videojs.log.warn('We received no playlist to switch to. Please check your stream.');\n return false;\n }\n var sharedLogLine = \"allowing switch \".concat(currentPlaylist && currentPlaylist.id || 'null', \" -> \").concat(nextPlaylist.id);\n if (!currentPlaylist) {\n log(\"\".concat(sharedLogLine, \" as current playlist is not set\"));\n return true;\n } // no need to switch if playlist is the same\n\n if (nextPlaylist.id === currentPlaylist.id) {\n return false;\n } // determine if current time is in a buffered range.\n\n var isBuffered = Boolean(findRange(buffered, currentTime).length); // If the playlist is live, then we want to not take low water line into account.\n // This is because in LIVE, the player plays 3 segments from the end of the\n // playlist, and if `BUFFER_LOW_WATER_LINE` is greater than the duration availble\n // in those segments, a viewer will never experience a rendition upswitch.\n\n if (!currentPlaylist.endList) {\n // For LLHLS live streams, don't switch renditions before playback has started, as it almost\n // doubles the time to first playback.\n if (!isBuffered && typeof currentPlaylist.partTargetDuration === 'number') {\n log(\"not \".concat(sharedLogLine, \" as current playlist is live llhls, but currentTime isn't in buffered.\"));\n return false;\n }\n log(\"\".concat(sharedLogLine, \" as current playlist is live\"));\n return true;\n }\n var forwardBuffer = timeAheadOf(buffered, currentTime);\n var maxBufferLowWaterLine = bufferBasedABR ? Config.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE : Config.MAX_BUFFER_LOW_WATER_LINE; // For the same reason as LIVE, we ignore the low water line when the VOD\n // duration is below the max potential low water line\n\n if (duration < maxBufferLowWaterLine) {\n log(\"\".concat(sharedLogLine, \" as duration < max low water line (\").concat(duration, \" < \").concat(maxBufferLowWaterLine, \")\"));\n return true;\n }\n var nextBandwidth = nextPlaylist.attributes.BANDWIDTH;\n var currBandwidth = currentPlaylist.attributes.BANDWIDTH; // when switching down, if our buffer is lower than the high water line,\n // we can switch down\n\n if (nextBandwidth < currBandwidth && (!bufferBasedABR || forwardBuffer < bufferHighWaterLine)) {\n var logLine = \"\".concat(sharedLogLine, \" as next bandwidth < current bandwidth (\").concat(nextBandwidth, \" < \").concat(currBandwidth, \")\");\n if (bufferBasedABR) {\n logLine += \" and forwardBuffer < bufferHighWaterLine (\".concat(forwardBuffer, \" < \").concat(bufferHighWaterLine, \")\");\n }\n log(logLine);\n return true;\n } // and if our buffer is higher than the low water line,\n // we can switch up\n\n if ((!bufferBasedABR || nextBandwidth > currBandwidth) && forwardBuffer >= bufferLowWaterLine) {\n var _logLine = \"\".concat(sharedLogLine, \" as forwardBuffer >= bufferLowWaterLine (\").concat(forwardBuffer, \" >= \").concat(bufferLowWaterLine, \")\");\n if (bufferBasedABR) {\n _logLine += \" and next bandwidth > current bandwidth (\".concat(nextBandwidth, \" > \").concat(currBandwidth, \")\");\n }\n log(_logLine);\n return true;\n }\n log(\"not \".concat(sharedLogLine, \" as no switching criteria met\"));\n return false;\n};\n/**\n * the main playlist controller controller all interactons\n * between playlists and segmentloaders. At this time this mainly\n * involves a main playlist and a series of audio playlists\n * if they are available\n *\n * @class PlaylistController\n * @extends videojs.EventTarget\n */\nvar PlaylistController = /*#__PURE__*/function (_videojs$EventTarget7) {\n _inherits(PlaylistController, _videojs$EventTarget7);\n var _super86 = _createSuper(PlaylistController);\n function PlaylistController(options) {\n var _this170;\n _classCallCheck(this, PlaylistController);\n _this170 = _super86.call(this);\n var src = options.src,\n withCredentials = options.withCredentials,\n tech = options.tech,\n bandwidth = options.bandwidth,\n externVhs = options.externVhs,\n useCueTags = options.useCueTags,\n playlistExclusionDuration = options.playlistExclusionDuration,\n enableLowInitialPlaylist = options.enableLowInitialPlaylist,\n sourceType = options.sourceType,\n cacheEncryptionKeys = options.cacheEncryptionKeys,\n bufferBasedABR = options.bufferBasedABR,\n leastPixelDiffSelector = options.leastPixelDiffSelector,\n captionServices = options.captionServices;\n if (!src) {\n throw new Error('A non-empty playlist URL or JSON manifest string is required');\n }\n var maxPlaylistRetries = options.maxPlaylistRetries;\n if (maxPlaylistRetries === null || typeof maxPlaylistRetries === 'undefined') {\n maxPlaylistRetries = Infinity;\n }\n Vhs$1 = externVhs;\n _this170.bufferBasedABR = Boolean(bufferBasedABR);\n _this170.leastPixelDiffSelector = Boolean(leastPixelDiffSelector);\n _this170.withCredentials = withCredentials;\n _this170.tech_ = tech;\n _this170.vhs_ = tech.vhs;\n _this170.sourceType_ = sourceType;\n _this170.useCueTags_ = useCueTags;\n _this170.playlistExclusionDuration = playlistExclusionDuration;\n _this170.maxPlaylistRetries = maxPlaylistRetries;\n _this170.enableLowInitialPlaylist = enableLowInitialPlaylist;\n if (_this170.useCueTags_) {\n _this170.cueTagsTrack_ = _this170.tech_.addTextTrack('metadata', 'ad-cues');\n _this170.cueTagsTrack_.inBandMetadataTrackDispatchType = '';\n }\n _this170.requestOptions_ = {\n withCredentials: withCredentials,\n maxPlaylistRetries: maxPlaylistRetries,\n timeout: null\n };\n _this170.on('error', _this170.pauseLoading);\n _this170.mediaTypes_ = createMediaTypes();\n _this170.mediaSource = new window$1.MediaSource();\n _this170.handleDurationChange_ = _this170.handleDurationChange_.bind(_assertThisInitialized(_this170));\n _this170.handleSourceOpen_ = _this170.handleSourceOpen_.bind(_assertThisInitialized(_this170));\n _this170.handleSourceEnded_ = _this170.handleSourceEnded_.bind(_assertThisInitialized(_this170));\n _this170.mediaSource.addEventListener('durationchange', _this170.handleDurationChange_); // load the media source into the player\n\n _this170.mediaSource.addEventListener('sourceopen', _this170.handleSourceOpen_);\n _this170.mediaSource.addEventListener('sourceended', _this170.handleSourceEnded_); // we don't have to handle sourceclose since dispose will handle termination of\n // everything, and the MediaSource should not be detached without a proper disposal\n\n _this170.seekable_ = createTimeRanges();\n _this170.hasPlayed_ = false;\n _this170.syncController_ = new SyncController(options);\n _this170.segmentMetadataTrack_ = tech.addRemoteTextTrack({\n kind: 'metadata',\n label: 'segment-metadata'\n }, false).track;\n _this170.decrypter_ = new Decrypter();\n _this170.sourceUpdater_ = new SourceUpdater(_this170.mediaSource);\n _this170.inbandTextTracks_ = {};\n _this170.timelineChangeController_ = new TimelineChangeController();\n var segmentLoaderSettings = {\n vhs: _this170.vhs_,\n parse708captions: options.parse708captions,\n useDtsForTimestampOffset: options.useDtsForTimestampOffset,\n calculateTimestampOffsetForEachSegment: options.calculateTimestampOffsetForEachSegment,\n captionServices: captionServices,\n mediaSource: _this170.mediaSource,\n currentTime: _this170.tech_.currentTime.bind(_this170.tech_),\n seekable: function seekable() {\n return _this170.seekable();\n },\n seeking: function seeking() {\n return _this170.tech_.seeking();\n },\n duration: function duration() {\n return _this170.duration();\n },\n hasPlayed: function hasPlayed() {\n return _this170.hasPlayed_;\n },\n goalBufferLength: function goalBufferLength() {\n return _this170.goalBufferLength();\n },\n bandwidth: bandwidth,\n syncController: _this170.syncController_,\n decrypter: _this170.decrypter_,\n sourceType: _this170.sourceType_,\n inbandTextTracks: _this170.inbandTextTracks_,\n cacheEncryptionKeys: cacheEncryptionKeys,\n sourceUpdater: _this170.sourceUpdater_,\n timelineChangeController: _this170.timelineChangeController_,\n exactManifestTimings: options.exactManifestTimings,\n addMetadataToTextTrack: _this170.addMetadataToTextTrack.bind(_assertThisInitialized(_this170))\n }; // The source type check not only determines whether a special DASH playlist loader\n // should be used, but also covers the case where the provided src is a vhs-json\n // manifest object (instead of a URL). In the case of vhs-json, the default\n // PlaylistLoader should be used.\n\n _this170.mainPlaylistLoader_ = _this170.sourceType_ === 'dash' ? new DashPlaylistLoader(src, _this170.vhs_, merge(_this170.requestOptions_, {\n addMetadataToTextTrack: _this170.addMetadataToTextTrack.bind(_assertThisInitialized(_this170))\n })) : new PlaylistLoader(src, _this170.vhs_, merge(_this170.requestOptions_, {\n addDateRangesToTextTrack: _this170.addDateRangesToTextTrack_.bind(_assertThisInitialized(_this170))\n }));\n _this170.setupMainPlaylistLoaderListeners_(); // setup segment loaders\n // combined audio/video or just video when alternate audio track is selected\n\n _this170.mainSegmentLoader_ = new SegmentLoader(merge(segmentLoaderSettings, {\n segmentMetadataTrack: _this170.segmentMetadataTrack_,\n loaderType: 'main'\n }), options); // alternate audio track\n\n _this170.audioSegmentLoader_ = new SegmentLoader(merge(segmentLoaderSettings, {\n loaderType: 'audio'\n }), options);\n _this170.subtitleSegmentLoader_ = new VTTSegmentLoader(merge(segmentLoaderSettings, {\n loaderType: 'vtt',\n featuresNativeTextTracks: _this170.tech_.featuresNativeTextTracks,\n loadVttJs: function loadVttJs() {\n return new Promise(function (resolve, reject) {\n function onLoad() {\n tech.off('vttjserror', onError);\n resolve();\n }\n function onError() {\n tech.off('vttjsloaded', onLoad);\n reject();\n }\n tech.one('vttjsloaded', onLoad);\n tech.one('vttjserror', onError); // safe to call multiple times, script will be loaded only once:\n\n tech.addWebVttScript_();\n });\n }\n }), options);\n var getBandwidth = function getBandwidth() {\n return _this170.mainSegmentLoader_.bandwidth;\n };\n _this170.contentSteeringController_ = new ContentSteeringController(_this170.vhs_.xhr, getBandwidth);\n _this170.setupSegmentLoaderListeners_();\n if (_this170.bufferBasedABR) {\n _this170.mainPlaylistLoader_.one('loadedplaylist', function () {\n return _this170.startABRTimer_();\n });\n _this170.tech_.on('pause', function () {\n return _this170.stopABRTimer_();\n });\n _this170.tech_.on('play', function () {\n return _this170.startABRTimer_();\n });\n } // Create SegmentLoader stat-getters\n // mediaRequests_\n // mediaRequestsAborted_\n // mediaRequestsTimedout_\n // mediaRequestsErrored_\n // mediaTransferDuration_\n // mediaBytesTransferred_\n // mediaAppends_\n\n loaderStats.forEach(function (stat) {\n _this170[stat + '_'] = sumLoaderStat.bind(_assertThisInitialized(_this170), stat);\n });\n _this170.logger_ = logger('pc');\n _this170.triggeredFmp4Usage = false;\n if (_this170.tech_.preload() === 'none') {\n _this170.loadOnPlay_ = function () {\n _this170.loadOnPlay_ = null;\n _this170.mainPlaylistLoader_.load();\n };\n _this170.tech_.one('play', _this170.loadOnPlay_);\n } else {\n _this170.mainPlaylistLoader_.load();\n }\n _this170.timeToLoadedData__ = -1;\n _this170.mainAppendsToLoadedData__ = -1;\n _this170.audioAppendsToLoadedData__ = -1;\n var event = _this170.tech_.preload() === 'none' ? 'play' : 'loadstart'; // start the first frame timer on loadstart or play (for preload none)\n\n _this170.tech_.one(event, function () {\n var timeToLoadedDataStart = Date.now();\n _this170.tech_.one('loadeddata', function () {\n _this170.timeToLoadedData__ = Date.now() - timeToLoadedDataStart;\n _this170.mainAppendsToLoadedData__ = _this170.mainSegmentLoader_.mediaAppends;\n _this170.audioAppendsToLoadedData__ = _this170.audioSegmentLoader_.mediaAppends;\n });\n });\n return _this170;\n }\n _createClass(PlaylistController, [{\n key: \"mainAppendsToLoadedData_\",\n value: function mainAppendsToLoadedData_() {\n return this.mainAppendsToLoadedData__;\n }\n }, {\n key: \"audioAppendsToLoadedData_\",\n value: function audioAppendsToLoadedData_() {\n return this.audioAppendsToLoadedData__;\n }\n }, {\n key: \"appendsToLoadedData_\",\n value: function appendsToLoadedData_() {\n var main = this.mainAppendsToLoadedData_();\n var audio = this.audioAppendsToLoadedData_();\n if (main === -1 || audio === -1) {\n return -1;\n }\n return main + audio;\n }\n }, {\n key: \"timeToLoadedData_\",\n value: function timeToLoadedData_() {\n return this.timeToLoadedData__;\n }\n /**\n * Run selectPlaylist and switch to the new playlist if we should\n *\n * @param {string} [reason=abr] a reason for why the ABR check is made\n * @private\n */\n }, {\n key: \"checkABR_\",\n value: function checkABR_() {\n var reason = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'abr';\n var nextPlaylist = this.selectPlaylist();\n if (nextPlaylist && this.shouldSwitchToMedia_(nextPlaylist)) {\n this.switchMedia_(nextPlaylist, reason);\n }\n }\n }, {\n key: \"switchMedia_\",\n value: function switchMedia_(playlist, cause, delay) {\n var oldMedia = this.media();\n var oldId = oldMedia && (oldMedia.id || oldMedia.uri);\n var newId = playlist.id || playlist.uri;\n if (oldId && oldId !== newId) {\n this.logger_(\"switch media \".concat(oldId, \" -> \").concat(newId, \" from \").concat(cause));\n this.tech_.trigger({\n type: 'usage',\n name: \"vhs-rendition-change-\".concat(cause)\n });\n }\n this.mainPlaylistLoader_.media(playlist, delay);\n }\n /**\n * A function that ensures we switch our playlists inside of `mediaTypes`\n * to match the current `serviceLocation` provided by the contentSteering controller.\n * We want to check media types of `AUDIO`, `SUBTITLES`, and `CLOSED-CAPTIONS`.\n *\n * This should only be called on a DASH playback scenario while using content steering.\n * This is necessary due to differences in how media in HLS manifests are generally tied to\n * a video playlist, where in DASH that is not always the case.\n */\n }, {\n key: \"switchMediaForDASHContentSteering_\",\n value: function switchMediaForDASHContentSteering_() {\n var _this171 = this;\n ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(function (type) {\n var mediaType = _this171.mediaTypes_[type];\n var activeGroup = mediaType ? mediaType.activeGroup() : null;\n var pathway = _this171.contentSteeringController_.getPathway();\n if (activeGroup && pathway) {\n // activeGroup can be an array or a single group\n var mediaPlaylists = activeGroup.length ? activeGroup[0].playlists : activeGroup.playlists;\n var dashMediaPlaylists = mediaPlaylists.filter(function (p) {\n return p.attributes.serviceLocation === pathway;\n }); // Switch the current active playlist to the correct CDN\n\n if (dashMediaPlaylists.length) {\n _this171.mediaTypes_[type].activePlaylistLoader.media(dashMediaPlaylists[0]);\n }\n }\n });\n }\n /**\n * Start a timer that periodically calls checkABR_\n *\n * @private\n */\n }, {\n key: \"startABRTimer_\",\n value: function startABRTimer_() {\n var _this172 = this;\n this.stopABRTimer_();\n this.abrTimer_ = window$1.setInterval(function () {\n return _this172.checkABR_();\n }, 250);\n }\n /**\n * Stop the timer that periodically calls checkABR_\n *\n * @private\n */\n }, {\n key: \"stopABRTimer_\",\n value: function stopABRTimer_() {\n // if we're scrubbing, we don't need to pause.\n // This getter will be added to Video.js in version 7.11.\n if (this.tech_.scrubbing && this.tech_.scrubbing()) {\n return;\n }\n window$1.clearInterval(this.abrTimer_);\n this.abrTimer_ = null;\n }\n /**\n * Get a list of playlists for the currently selected audio playlist\n *\n * @return {Array} the array of audio playlists\n */\n }, {\n key: \"getAudioTrackPlaylists_\",\n value: function getAudioTrackPlaylists_() {\n var main = this.main();\n var defaultPlaylists = main && main.playlists || []; // if we don't have any audio groups then we can only\n // assume that the audio tracks are contained in main\n // playlist array, use that or an empty array.\n\n if (!main || !main.mediaGroups || !main.mediaGroups.AUDIO) {\n return defaultPlaylists;\n }\n var AUDIO = main.mediaGroups.AUDIO;\n var groupKeys = Object.keys(AUDIO);\n var track; // get the current active track\n\n if (Object.keys(this.mediaTypes_.AUDIO.groups).length) {\n track = this.mediaTypes_.AUDIO.activeTrack(); // or get the default track from main if mediaTypes_ isn't setup yet\n } else {\n // default group is `main` or just the first group.\n var defaultGroup = AUDIO.main || groupKeys.length && AUDIO[groupKeys[0]];\n for (var label in defaultGroup) {\n if (defaultGroup[label][\"default\"]) {\n track = {\n label: label\n };\n break;\n }\n }\n } // no active track no playlists.\n\n if (!track) {\n return defaultPlaylists;\n }\n var playlists = []; // get all of the playlists that are possible for the\n // active track.\n\n for (var group in AUDIO) {\n if (AUDIO[group][track.label]) {\n var properties = AUDIO[group][track.label];\n if (properties.playlists && properties.playlists.length) {\n playlists.push.apply(playlists, properties.playlists);\n } else if (properties.uri) {\n playlists.push(properties);\n } else if (main.playlists.length) {\n // if an audio group does not have a uri\n // see if we have main playlists that use it as a group.\n // if we do then add those to the playlists list.\n for (var _i115 = 0; _i115 < main.playlists.length; _i115++) {\n var playlist = main.playlists[_i115];\n if (playlist.attributes && playlist.attributes.AUDIO && playlist.attributes.AUDIO === group) {\n playlists.push(playlist);\n }\n }\n }\n }\n }\n if (!playlists.length) {\n return defaultPlaylists;\n }\n return playlists;\n }\n /**\n * Register event handlers on the main playlist loader. A helper\n * function for construction time.\n *\n * @private\n */\n }, {\n key: \"setupMainPlaylistLoaderListeners_\",\n value: function setupMainPlaylistLoaderListeners_() {\n var _this173 = this;\n this.mainPlaylistLoader_.on('loadedmetadata', function () {\n var media = _this173.mainPlaylistLoader_.media();\n var requestTimeout = media.targetDuration * 1.5 * 1000; // If we don't have any more available playlists, we don't want to\n // timeout the request.\n\n if (isLowestEnabledRendition(_this173.mainPlaylistLoader_.main, _this173.mainPlaylistLoader_.media())) {\n _this173.requestOptions_.timeout = 0;\n } else {\n _this173.requestOptions_.timeout = requestTimeout;\n } // if this isn't a live video and preload permits, start\n // downloading segments\n\n if (media.endList && _this173.tech_.preload() !== 'none') {\n _this173.mainSegmentLoader_.playlist(media, _this173.requestOptions_);\n _this173.mainSegmentLoader_.load();\n }\n setupMediaGroups({\n sourceType: _this173.sourceType_,\n segmentLoaders: {\n AUDIO: _this173.audioSegmentLoader_,\n SUBTITLES: _this173.subtitleSegmentLoader_,\n main: _this173.mainSegmentLoader_\n },\n tech: _this173.tech_,\n requestOptions: _this173.requestOptions_,\n mainPlaylistLoader: _this173.mainPlaylistLoader_,\n vhs: _this173.vhs_,\n main: _this173.main(),\n mediaTypes: _this173.mediaTypes_,\n excludePlaylist: _this173.excludePlaylist.bind(_this173)\n });\n _this173.triggerPresenceUsage_(_this173.main(), media);\n _this173.setupFirstPlay();\n if (!_this173.mediaTypes_.AUDIO.activePlaylistLoader || _this173.mediaTypes_.AUDIO.activePlaylistLoader.media()) {\n _this173.trigger('selectedinitialmedia');\n } else {\n // We must wait for the active audio playlist loader to\n // finish setting up before triggering this event so the\n // representations API and EME setup is correct\n _this173.mediaTypes_.AUDIO.activePlaylistLoader.one('loadedmetadata', function () {\n _this173.trigger('selectedinitialmedia');\n });\n }\n });\n this.mainPlaylistLoader_.on('loadedplaylist', function () {\n if (_this173.loadOnPlay_) {\n _this173.tech_.off('play', _this173.loadOnPlay_);\n }\n var updatedPlaylist = _this173.mainPlaylistLoader_.media();\n if (!updatedPlaylist) {\n _this173.initContentSteeringController_(); // exclude any variants that are not supported by the browser before selecting\n // an initial media as the playlist selectors do not consider browser support\n\n _this173.excludeUnsupportedVariants_();\n var selectedMedia;\n if (_this173.enableLowInitialPlaylist) {\n selectedMedia = _this173.selectInitialPlaylist();\n }\n if (!selectedMedia) {\n selectedMedia = _this173.selectPlaylist();\n }\n if (!selectedMedia || !_this173.shouldSwitchToMedia_(selectedMedia)) {\n return;\n }\n _this173.initialMedia_ = selectedMedia;\n _this173.switchMedia_(_this173.initialMedia_, 'initial'); // Under the standard case where a source URL is provided, loadedplaylist will\n // fire again since the playlist will be requested. In the case of vhs-json\n // (where the manifest object is provided as the source), when the media\n // playlist's `segments` list is already available, a media playlist won't be\n // requested, and loadedplaylist won't fire again, so the playlist handler must be\n // called on its own here.\n\n var haveJsonSource = _this173.sourceType_ === 'vhs-json' && _this173.initialMedia_.segments;\n if (!haveJsonSource) {\n return;\n }\n updatedPlaylist = _this173.initialMedia_;\n }\n _this173.handleUpdatedMediaPlaylist(updatedPlaylist);\n });\n this.mainPlaylistLoader_.on('error', function () {\n var error = _this173.mainPlaylistLoader_.error;\n _this173.excludePlaylist({\n playlistToExclude: error.playlist,\n error: error\n });\n });\n this.mainPlaylistLoader_.on('mediachanging', function () {\n _this173.mainSegmentLoader_.abort();\n _this173.mainSegmentLoader_.pause();\n });\n this.mainPlaylistLoader_.on('mediachange', function () {\n var media = _this173.mainPlaylistLoader_.media();\n var requestTimeout = media.targetDuration * 1.5 * 1000; // If we don't have any more available playlists, we don't want to\n // timeout the request.\n\n if (isLowestEnabledRendition(_this173.mainPlaylistLoader_.main, _this173.mainPlaylistLoader_.media())) {\n _this173.requestOptions_.timeout = 0;\n } else {\n _this173.requestOptions_.timeout = requestTimeout;\n }\n _this173.mainPlaylistLoader_.load(); // TODO: Create a new event on the PlaylistLoader that signals\n // that the segments have changed in some way and use that to\n // update the SegmentLoader instead of doing it twice here and\n // on `loadedplaylist`\n\n _this173.mainSegmentLoader_.playlist(media, _this173.requestOptions_);\n _this173.mainSegmentLoader_.load();\n _this173.tech_.trigger({\n type: 'mediachange',\n bubbles: true\n });\n });\n this.mainPlaylistLoader_.on('playlistunchanged', function () {\n var updatedPlaylist = _this173.mainPlaylistLoader_.media(); // ignore unchanged playlists that have already been\n // excluded for not-changing. We likely just have a really slowly updating\n // playlist.\n\n if (updatedPlaylist.lastExcludeReason_ === 'playlist-unchanged') {\n return;\n }\n var playlistOutdated = _this173.stuckAtPlaylistEnd_(updatedPlaylist);\n if (playlistOutdated) {\n // Playlist has stopped updating and we're stuck at its end. Try to\n // exclude it and switch to another playlist in the hope that that\n // one is updating (and give the player a chance to re-adjust to the\n // safe live point).\n _this173.excludePlaylist({\n error: {\n message: 'Playlist no longer updating.',\n reason: 'playlist-unchanged'\n }\n }); // useful for monitoring QoS\n\n _this173.tech_.trigger('playliststuck');\n }\n });\n this.mainPlaylistLoader_.on('renditiondisabled', function () {\n _this173.tech_.trigger({\n type: 'usage',\n name: 'vhs-rendition-disabled'\n });\n });\n this.mainPlaylistLoader_.on('renditionenabled', function () {\n _this173.tech_.trigger({\n type: 'usage',\n name: 'vhs-rendition-enabled'\n });\n });\n }\n /**\n * Given an updated media playlist (whether it was loaded for the first time, or\n * refreshed for live playlists), update any relevant properties and state to reflect\n * changes in the media that should be accounted for (e.g., cues and duration).\n *\n * @param {Object} updatedPlaylist the updated media playlist object\n *\n * @private\n */\n }, {\n key: \"handleUpdatedMediaPlaylist\",\n value: function handleUpdatedMediaPlaylist(updatedPlaylist) {\n if (this.useCueTags_) {\n this.updateAdCues_(updatedPlaylist);\n } // TODO: Create a new event on the PlaylistLoader that signals\n // that the segments have changed in some way and use that to\n // update the SegmentLoader instead of doing it twice here and\n // on `mediachange`\n\n this.mainSegmentLoader_.playlist(updatedPlaylist, this.requestOptions_);\n this.updateDuration(!updatedPlaylist.endList); // If the player isn't paused, ensure that the segment loader is running,\n // as it is possible that it was temporarily stopped while waiting for\n // a playlist (e.g., in case the playlist errored and we re-requested it).\n\n if (!this.tech_.paused()) {\n this.mainSegmentLoader_.load();\n if (this.audioSegmentLoader_) {\n this.audioSegmentLoader_.load();\n }\n }\n }\n /**\n * A helper function for triggerring presence usage events once per source\n *\n * @private\n */\n }, {\n key: \"triggerPresenceUsage_\",\n value: function triggerPresenceUsage_(main, media) {\n var mediaGroups = main.mediaGroups || {};\n var defaultDemuxed = true;\n var audioGroupKeys = Object.keys(mediaGroups.AUDIO);\n for (var mediaGroup in mediaGroups.AUDIO) {\n for (var label in mediaGroups.AUDIO[mediaGroup]) {\n var properties = mediaGroups.AUDIO[mediaGroup][label];\n if (!properties.uri) {\n defaultDemuxed = false;\n }\n }\n }\n if (defaultDemuxed) {\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-demuxed'\n });\n }\n if (Object.keys(mediaGroups.SUBTITLES).length) {\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-webvtt'\n });\n }\n if (Vhs$1.Playlist.isAes(media)) {\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-aes'\n });\n }\n if (audioGroupKeys.length && Object.keys(mediaGroups.AUDIO[audioGroupKeys[0]]).length > 1) {\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-alternate-audio'\n });\n }\n if (this.useCueTags_) {\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-playlist-cue-tags'\n });\n }\n }\n }, {\n key: \"shouldSwitchToMedia_\",\n value: function shouldSwitchToMedia_(nextPlaylist) {\n var currentPlaylist = this.mainPlaylistLoader_.media() || this.mainPlaylistLoader_.pendingMedia_;\n var currentTime = this.tech_.currentTime();\n var bufferLowWaterLine = this.bufferLowWaterLine();\n var bufferHighWaterLine = this.bufferHighWaterLine();\n var buffered = this.tech_.buffered();\n return shouldSwitchToMedia({\n buffered: buffered,\n currentTime: currentTime,\n currentPlaylist: currentPlaylist,\n nextPlaylist: nextPlaylist,\n bufferLowWaterLine: bufferLowWaterLine,\n bufferHighWaterLine: bufferHighWaterLine,\n duration: this.duration(),\n bufferBasedABR: this.bufferBasedABR,\n log: this.logger_\n });\n }\n /**\n * Register event handlers on the segment loaders. A helper function\n * for construction time.\n *\n * @private\n */\n }, {\n key: \"setupSegmentLoaderListeners_\",\n value: function setupSegmentLoaderListeners_() {\n var _this174 = this;\n this.mainSegmentLoader_.on('bandwidthupdate', function () {\n // Whether or not buffer based ABR or another ABR is used, on a bandwidth change it's\n // useful to check to see if a rendition switch should be made.\n _this174.checkABR_('bandwidthupdate');\n _this174.tech_.trigger('bandwidthupdate');\n });\n this.mainSegmentLoader_.on('timeout', function () {\n if (_this174.bufferBasedABR) {\n // If a rendition change is needed, then it would've be done on `bandwidthupdate`.\n // Here the only consideration is that for buffer based ABR there's no guarantee\n // of an immediate switch (since the bandwidth is averaged with a timeout\n // bandwidth value of 1), so force a load on the segment loader to keep it going.\n _this174.mainSegmentLoader_.load();\n }\n }); // `progress` events are not reliable enough of a bandwidth measure to trigger buffer\n // based ABR.\n\n if (!this.bufferBasedABR) {\n this.mainSegmentLoader_.on('progress', function () {\n _this174.trigger('progress');\n });\n }\n this.mainSegmentLoader_.on('error', function () {\n var error = _this174.mainSegmentLoader_.error();\n _this174.excludePlaylist({\n playlistToExclude: error.playlist,\n error: error\n });\n });\n this.mainSegmentLoader_.on('appenderror', function () {\n _this174.error = _this174.mainSegmentLoader_.error_;\n _this174.trigger('error');\n });\n this.mainSegmentLoader_.on('syncinfoupdate', function () {\n _this174.onSyncInfoUpdate_();\n });\n this.mainSegmentLoader_.on('timestampoffset', function () {\n _this174.tech_.trigger({\n type: 'usage',\n name: 'vhs-timestamp-offset'\n });\n });\n this.audioSegmentLoader_.on('syncinfoupdate', function () {\n _this174.onSyncInfoUpdate_();\n });\n this.audioSegmentLoader_.on('appenderror', function () {\n _this174.error = _this174.audioSegmentLoader_.error_;\n _this174.trigger('error');\n });\n this.mainSegmentLoader_.on('ended', function () {\n _this174.logger_('main segment loader ended');\n _this174.onEndOfStream();\n });\n this.mainSegmentLoader_.on('earlyabort', function (event) {\n // never try to early abort with the new ABR algorithm\n if (_this174.bufferBasedABR) {\n return;\n }\n _this174.delegateLoaders_('all', ['abort']);\n _this174.excludePlaylist({\n error: {\n message: 'Aborted early because there isn\\'t enough bandwidth to complete ' + 'the request without rebuffering.'\n },\n playlistExclusionDuration: ABORT_EARLY_EXCLUSION_SECONDS\n });\n });\n var updateCodecs = function updateCodecs() {\n if (!_this174.sourceUpdater_.hasCreatedSourceBuffers()) {\n return _this174.tryToCreateSourceBuffers_();\n }\n var codecs = _this174.getCodecsOrExclude_(); // no codecs means that the playlist was excluded\n\n if (!codecs) {\n return;\n }\n _this174.sourceUpdater_.addOrChangeSourceBuffers(codecs);\n };\n this.mainSegmentLoader_.on('trackinfo', updateCodecs);\n this.audioSegmentLoader_.on('trackinfo', updateCodecs);\n this.mainSegmentLoader_.on('fmp4', function () {\n if (!_this174.triggeredFmp4Usage) {\n _this174.tech_.trigger({\n type: 'usage',\n name: 'vhs-fmp4'\n });\n _this174.triggeredFmp4Usage = true;\n }\n });\n this.audioSegmentLoader_.on('fmp4', function () {\n if (!_this174.triggeredFmp4Usage) {\n _this174.tech_.trigger({\n type: 'usage',\n name: 'vhs-fmp4'\n });\n _this174.triggeredFmp4Usage = true;\n }\n });\n this.audioSegmentLoader_.on('ended', function () {\n _this174.logger_('audioSegmentLoader ended');\n _this174.onEndOfStream();\n });\n }\n }, {\n key: \"mediaSecondsLoaded_\",\n value: function mediaSecondsLoaded_() {\n return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded + this.mainSegmentLoader_.mediaSecondsLoaded);\n }\n /**\n * Call load on our SegmentLoaders\n */\n }, {\n key: \"load\",\n value: function load() {\n this.mainSegmentLoader_.load();\n if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n this.audioSegmentLoader_.load();\n }\n if (this.mediaTypes_.SUBTITLES.activePlaylistLoader) {\n this.subtitleSegmentLoader_.load();\n }\n }\n /**\n * Re-tune playback quality level for the current player\n * conditions. This will reset the main segment loader\n * and the next segment position to the currentTime.\n * This is good for manual quality changes.\n *\n * @private\n */\n }, {\n key: \"fastQualityChange_\",\n value: function fastQualityChange_() {\n var media = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.selectPlaylist();\n if (media === this.mainPlaylistLoader_.media()) {\n this.logger_('skipping fastQualityChange because new media is same as old');\n return;\n }\n this.switchMedia_(media, 'fast-quality'); // Reset main segment loader properties and next segment position information.\n // Don't need to reset audio as it is reset when media changes.\n // We resetLoaderProperties separately here as we want to fetch init segments if\n // necessary and ensure we're not in an ended state when we switch playlists.\n\n this.resetMainLoaderReplaceSegments();\n }\n /**\n * Sets the replaceUntil flag on the main segment soader to the buffered end\n * and resets the main segment loaders properties.\n */\n }, {\n key: \"resetMainLoaderReplaceSegments\",\n value: function resetMainLoaderReplaceSegments() {\n var buffered = this.tech_.buffered();\n var bufferedEnd = buffered.end(buffered.length - 1); // Set the replace segments flag to the buffered end, this forces fetchAtBuffer\n // on the main loader to remain, false after the resetLoader call, until we have\n // replaced all content buffered ahead of the currentTime.\n\n this.mainSegmentLoader_.replaceSegmentsUntil = bufferedEnd;\n this.mainSegmentLoader_.resetLoaderProperties();\n this.mainSegmentLoader_.resetLoader();\n }\n /**\n * Begin playback.\n */\n }, {\n key: \"play\",\n value: function play() {\n if (this.setupFirstPlay()) {\n return;\n }\n if (this.tech_.ended()) {\n this.tech_.setCurrentTime(0);\n }\n if (this.hasPlayed_) {\n this.load();\n }\n var seekable = this.tech_.seekable(); // if the viewer has paused and we fell out of the live window,\n // seek forward to the live point\n\n if (this.tech_.duration() === Infinity) {\n if (this.tech_.currentTime() < seekable.start(0)) {\n return this.tech_.setCurrentTime(seekable.end(seekable.length - 1));\n }\n }\n }\n /**\n * Seek to the latest media position if this is a live video and the\n * player and video are loaded and initialized.\n */\n }, {\n key: \"setupFirstPlay\",\n value: function setupFirstPlay() {\n var media = this.mainPlaylistLoader_.media(); // Check that everything is ready to begin buffering for the first call to play\n // If 1) there is no active media\n // 2) the player is paused\n // 3) the first play has already been setup\n // then exit early\n\n if (!media || this.tech_.paused() || this.hasPlayed_) {\n return false;\n } // when the video is a live stream and/or has a start time\n\n if (!media.endList || media.start) {\n var _seekable = this.seekable();\n if (!_seekable.length) {\n // without a seekable range, the player cannot seek to begin buffering at the\n // live or start point\n return false;\n }\n var seekableEnd = _seekable.end(0);\n var startPoint = seekableEnd;\n if (media.start) {\n var offset = media.start.timeOffset;\n if (offset < 0) {\n startPoint = Math.max(seekableEnd + offset, _seekable.start(0));\n } else {\n startPoint = Math.min(seekableEnd, offset);\n }\n } // trigger firstplay to inform the source handler to ignore the next seek event\n\n this.trigger('firstplay'); // seek to the live point\n\n this.tech_.setCurrentTime(startPoint);\n }\n this.hasPlayed_ = true; // we can begin loading now that everything is ready\n\n this.load();\n return true;\n }\n /**\n * handle the sourceopen event on the MediaSource\n *\n * @private\n */\n }, {\n key: \"handleSourceOpen_\",\n value: function handleSourceOpen_() {\n // Only attempt to create the source buffer if none already exist.\n // handleSourceOpen is also called when we are \"re-opening\" a source buffer\n // after `endOfStream` has been called (in response to a seek for instance)\n this.tryToCreateSourceBuffers_(); // if autoplay is enabled, begin playback. This is duplicative of\n // code in video.js but is required because play() must be invoked\n // *after* the media source has opened.\n\n if (this.tech_.autoplay()) {\n var playPromise = this.tech_.play(); // Catch/silence error when a pause interrupts a play request\n // on browsers which return a promise\n\n if (typeof playPromise !== 'undefined' && typeof playPromise.then === 'function') {\n playPromise.then(null, function (e) {});\n }\n }\n this.trigger('sourceopen');\n }\n /**\n * handle the sourceended event on the MediaSource\n *\n * @private\n */\n }, {\n key: \"handleSourceEnded_\",\n value: function handleSourceEnded_() {\n if (!this.inbandTextTracks_.metadataTrack_) {\n return;\n }\n var cues = this.inbandTextTracks_.metadataTrack_.cues;\n if (!cues || !cues.length) {\n return;\n }\n var duration = this.duration();\n cues[cues.length - 1].endTime = isNaN(duration) || Math.abs(duration) === Infinity ? Number.MAX_VALUE : duration;\n }\n /**\n * handle the durationchange event on the MediaSource\n *\n * @private\n */\n }, {\n key: \"handleDurationChange_\",\n value: function handleDurationChange_() {\n this.tech_.trigger('durationchange');\n }\n /**\n * Calls endOfStream on the media source when all active stream types have called\n * endOfStream\n *\n * @param {string} streamType\n * Stream type of the segment loader that called endOfStream\n * @private\n */\n }, {\n key: \"onEndOfStream\",\n value: function onEndOfStream() {\n var isEndOfStream = this.mainSegmentLoader_.ended_;\n if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n var mainMediaInfo = this.mainSegmentLoader_.getCurrentMediaInfo_(); // if the audio playlist loader exists, then alternate audio is active\n\n if (!mainMediaInfo || mainMediaInfo.hasVideo) {\n // if we do not know if the main segment loader contains video yet or if we\n // definitively know the main segment loader contains video, then we need to wait\n // for both main and audio segment loaders to call endOfStream\n isEndOfStream = isEndOfStream && this.audioSegmentLoader_.ended_;\n } else {\n // otherwise just rely on the audio loader\n isEndOfStream = this.audioSegmentLoader_.ended_;\n }\n }\n if (!isEndOfStream) {\n return;\n }\n this.stopABRTimer_();\n this.sourceUpdater_.endOfStream();\n }\n /**\n * Check if a playlist has stopped being updated\n *\n * @param {Object} playlist the media playlist object\n * @return {boolean} whether the playlist has stopped being updated or not\n */\n }, {\n key: \"stuckAtPlaylistEnd_\",\n value: function stuckAtPlaylistEnd_(playlist) {\n var seekable = this.seekable();\n if (!seekable.length) {\n // playlist doesn't have enough information to determine whether we are stuck\n return false;\n }\n var expired = this.syncController_.getExpiredTime(playlist, this.duration());\n if (expired === null) {\n return false;\n } // does not use the safe live end to calculate playlist end, since we\n // don't want to say we are stuck while there is still content\n\n var absolutePlaylistEnd = Vhs$1.Playlist.playlistEnd(playlist, expired);\n var currentTime = this.tech_.currentTime();\n var buffered = this.tech_.buffered();\n if (!buffered.length) {\n // return true if the playhead reached the absolute end of the playlist\n return absolutePlaylistEnd - currentTime <= SAFE_TIME_DELTA;\n }\n var bufferedEnd = buffered.end(buffered.length - 1); // return true if there is too little buffer left and buffer has reached absolute\n // end of playlist\n\n return bufferedEnd - currentTime <= SAFE_TIME_DELTA && absolutePlaylistEnd - bufferedEnd <= SAFE_TIME_DELTA;\n }\n /**\n * Exclude a playlist for a set amount of time, making it unavailable for selection by\n * the rendition selection algorithm, then force a new playlist (rendition) selection.\n *\n * @param {Object=} playlistToExclude\n * the playlist to exclude, defaults to the currently selected playlist\n * @param {Object=} error\n * an optional error\n * @param {number=} playlistExclusionDuration\n * an optional number of seconds to exclude the playlist\n */\n }, {\n key: \"excludePlaylist\",\n value: function excludePlaylist(_ref65) {\n var _this175 = this;\n var _ref65$playlistToExcl = _ref65.playlistToExclude,\n playlistToExclude = _ref65$playlistToExcl === void 0 ? this.mainPlaylistLoader_.media() : _ref65$playlistToExcl,\n _ref65$error = _ref65.error,\n error = _ref65$error === void 0 ? {} : _ref65$error,\n playlistExclusionDuration = _ref65.playlistExclusionDuration;\n // If the `error` was generated by the playlist loader, it will contain\n // the playlist we were trying to load (but failed) and that should be\n // excluded instead of the currently selected playlist which is likely\n // out-of-date in this scenario\n playlistToExclude = playlistToExclude || this.mainPlaylistLoader_.media();\n playlistExclusionDuration = playlistExclusionDuration || error.playlistExclusionDuration || this.playlistExclusionDuration; // If there is no current playlist, then an error occurred while we were\n // trying to load the main OR while we were disposing of the tech\n\n if (!playlistToExclude) {\n this.error = error;\n if (this.mediaSource.readyState !== 'open') {\n this.trigger('error');\n } else {\n this.sourceUpdater_.endOfStream('network');\n }\n return;\n }\n playlistToExclude.playlistErrors_++;\n var playlists = this.mainPlaylistLoader_.main.playlists;\n var enabledPlaylists = playlists.filter(isEnabled);\n var isFinalRendition = enabledPlaylists.length === 1 && enabledPlaylists[0] === playlistToExclude; // Don't exclude the only playlist unless it was excluded\n // forever\n\n if (playlists.length === 1 && playlistExclusionDuration !== Infinity) {\n videojs.log.warn(\"Problem encountered with playlist \".concat(playlistToExclude.id, \". \") + 'Trying again since it is the only playlist.');\n this.tech_.trigger('retryplaylist'); // if this is a final rendition, we should delay\n\n return this.mainPlaylistLoader_.load(isFinalRendition);\n }\n if (isFinalRendition) {\n // If we're content steering, try other pathways.\n if (this.main().contentSteering) {\n var pathway = this.pathwayAttribute_(playlistToExclude); // Ignore at least 1 steering manifest refresh.\n\n var reIncludeDelay = this.contentSteeringController_.steeringManifest.ttl * 1000;\n this.contentSteeringController_.excludePathway(pathway);\n this.excludeThenChangePathway_();\n setTimeout(function () {\n _this175.contentSteeringController_.addAvailablePathway(pathway);\n }, reIncludeDelay);\n return;\n } // Since we're on the final non-excluded playlist, and we're about to exclude\n // it, instead of erring the player or retrying this playlist, clear out the current\n // exclusion list. This allows other playlists to be attempted in case any have been\n // fixed.\n\n var reincluded = false;\n playlists.forEach(function (playlist) {\n // skip current playlist which is about to be excluded\n if (playlist === playlistToExclude) {\n return;\n }\n var excludeUntil = playlist.excludeUntil; // a playlist cannot be reincluded if it wasn't excluded to begin with.\n\n if (typeof excludeUntil !== 'undefined' && excludeUntil !== Infinity) {\n reincluded = true;\n delete playlist.excludeUntil;\n }\n });\n if (reincluded) {\n videojs.log.warn('Removing other playlists from the exclusion list because the last ' + 'rendition is about to be excluded.'); // Technically we are retrying a playlist, in that we are simply retrying a previous\n // playlist. This is needed for users relying on the retryplaylist event to catch a\n // case where the player might be stuck and looping through \"dead\" playlists.\n\n this.tech_.trigger('retryplaylist');\n }\n } // Exclude this playlist\n\n var excludeUntil;\n if (playlistToExclude.playlistErrors_ > this.maxPlaylistRetries) {\n excludeUntil = Infinity;\n } else {\n excludeUntil = Date.now() + playlistExclusionDuration * 1000;\n }\n playlistToExclude.excludeUntil = excludeUntil;\n if (error.reason) {\n playlistToExclude.lastExcludeReason_ = error.reason;\n }\n this.tech_.trigger('excludeplaylist');\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-rendition-excluded'\n }); // TODO: only load a new playlist if we're excluding the current playlist\n // If this function was called with a playlist that's not the current active playlist\n // (e.g., media().id !== playlistToExclude.id),\n // then a new playlist should not be selected and loaded, as there's nothing wrong with the current playlist.\n\n var nextPlaylist = this.selectPlaylist();\n if (!nextPlaylist) {\n this.error = 'Playback cannot continue. No available working or supported playlists.';\n this.trigger('error');\n return;\n }\n var logFn = error.internal ? this.logger_ : videojs.log.warn;\n var errorMessage = error.message ? ' ' + error.message : '';\n logFn(\"\".concat(error.internal ? 'Internal problem' : 'Problem', \" encountered with playlist \").concat(playlistToExclude.id, \".\") + \"\".concat(errorMessage, \" Switching to playlist \").concat(nextPlaylist.id, \".\")); // if audio group changed reset audio loaders\n\n if (nextPlaylist.attributes.AUDIO !== playlistToExclude.attributes.AUDIO) {\n this.delegateLoaders_('audio', ['abort', 'pause']);\n } // if subtitle group changed reset subtitle loaders\n\n if (nextPlaylist.attributes.SUBTITLES !== playlistToExclude.attributes.SUBTITLES) {\n this.delegateLoaders_('subtitle', ['abort', 'pause']);\n }\n this.delegateLoaders_('main', ['abort', 'pause']);\n var delayDuration = nextPlaylist.targetDuration / 2 * 1000 || 5 * 1000;\n var shouldDelay = typeof nextPlaylist.lastRequest === 'number' && Date.now() - nextPlaylist.lastRequest <= delayDuration; // delay if it's a final rendition or if the last refresh is sooner than half targetDuration\n\n return this.switchMedia_(nextPlaylist, 'exclude', isFinalRendition || shouldDelay);\n }\n /**\n * Pause all segment/playlist loaders\n */\n }, {\n key: \"pauseLoading\",\n value: function pauseLoading() {\n this.delegateLoaders_('all', ['abort', 'pause']);\n this.stopABRTimer_();\n }\n /**\n * Call a set of functions in order on playlist loaders, segment loaders,\n * or both types of loaders.\n *\n * @param {string} filter\n * Filter loaders that should call fnNames using a string. Can be:\n * * all - run on all loaders\n * * audio - run on all audio loaders\n * * subtitle - run on all subtitle loaders\n * * main - run on the main loaders\n *\n * @param {Array|string} fnNames\n * A string or array of function names to call.\n */\n }, {\n key: \"delegateLoaders_\",\n value: function delegateLoaders_(filter, fnNames) {\n var _this176 = this;\n var loaders = [];\n var dontFilterPlaylist = filter === 'all';\n if (dontFilterPlaylist || filter === 'main') {\n loaders.push(this.mainPlaylistLoader_);\n }\n var mediaTypes = [];\n if (dontFilterPlaylist || filter === 'audio') {\n mediaTypes.push('AUDIO');\n }\n if (dontFilterPlaylist || filter === 'subtitle') {\n mediaTypes.push('CLOSED-CAPTIONS');\n mediaTypes.push('SUBTITLES');\n }\n mediaTypes.forEach(function (mediaType) {\n var loader = _this176.mediaTypes_[mediaType] && _this176.mediaTypes_[mediaType].activePlaylistLoader;\n if (loader) {\n loaders.push(loader);\n }\n });\n ['main', 'audio', 'subtitle'].forEach(function (name) {\n var loader = _this176[\"\".concat(name, \"SegmentLoader_\")];\n if (loader && (filter === name || filter === 'all')) {\n loaders.push(loader);\n }\n });\n loaders.forEach(function (loader) {\n return fnNames.forEach(function (fnName) {\n if (typeof loader[fnName] === 'function') {\n loader[fnName]();\n }\n });\n });\n }\n /**\n * set the current time on all segment loaders\n *\n * @param {TimeRange} currentTime the current time to set\n * @return {TimeRange} the current time\n */\n }, {\n key: \"setCurrentTime\",\n value: function setCurrentTime(currentTime) {\n var buffered = findRange(this.tech_.buffered(), currentTime);\n if (!(this.mainPlaylistLoader_ && this.mainPlaylistLoader_.media())) {\n // return immediately if the metadata is not ready yet\n return 0;\n } // it's clearly an edge-case but don't thrown an error if asked to\n // seek within an empty playlist\n\n if (!this.mainPlaylistLoader_.media().segments) {\n return 0;\n } // if the seek location is already buffered, continue buffering as usual\n\n if (buffered && buffered.length) {\n return currentTime;\n } // cancel outstanding requests so we begin buffering at the new\n // location\n\n this.mainSegmentLoader_.resetEverything();\n if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n this.audioSegmentLoader_.resetEverything();\n }\n if (this.mediaTypes_.SUBTITLES.activePlaylistLoader) {\n this.subtitleSegmentLoader_.resetEverything();\n } // start segment loader loading in case they are paused\n\n this.load();\n }\n /**\n * get the current duration\n *\n * @return {TimeRange} the duration\n */\n }, {\n key: \"duration\",\n value: function duration() {\n if (!this.mainPlaylistLoader_) {\n return 0;\n }\n var media = this.mainPlaylistLoader_.media();\n if (!media) {\n // no playlists loaded yet, so can't determine a duration\n return 0;\n } // Don't rely on the media source for duration in the case of a live playlist since\n // setting the native MediaSource's duration to infinity ends up with consequences to\n // seekable behavior. See https://github.com/w3c/media-source/issues/5 for details.\n //\n // This is resolved in the spec by https://github.com/w3c/media-source/pull/92,\n // however, few browsers have support for setLiveSeekableRange()\n // https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/setLiveSeekableRange\n //\n // Until a time when the duration of the media source can be set to infinity, and a\n // seekable range specified across browsers, just return Infinity.\n\n if (!media.endList) {\n return Infinity;\n } // Since this is a VOD video, it is safe to rely on the media source's duration (if\n // available). If it's not available, fall back to a playlist-calculated estimate.\n\n if (this.mediaSource) {\n return this.mediaSource.duration;\n }\n return Vhs$1.Playlist.duration(media);\n }\n /**\n * check the seekable range\n *\n * @return {TimeRange} the seekable range\n */\n }, {\n key: \"seekable\",\n value: function seekable() {\n return this.seekable_;\n }\n }, {\n key: \"onSyncInfoUpdate_\",\n value: function onSyncInfoUpdate_() {\n var audioSeekable; // TODO check for creation of both source buffers before updating seekable\n //\n // A fix was made to this function where a check for\n // this.sourceUpdater_.hasCreatedSourceBuffers\n // was added to ensure that both source buffers were created before seekable was\n // updated. However, it originally had a bug where it was checking for a true and\n // returning early instead of checking for false. Setting it to check for false to\n // return early though created other issues. A call to play() would check for seekable\n // end without verifying that a seekable range was present. In addition, even checking\n // for that didn't solve some issues, as handleFirstPlay is sometimes worked around\n // due to a media update calling load on the segment loaders, skipping a seek to live,\n // thereby starting live streams at the beginning of the stream rather than at the end.\n //\n // This conditional should be fixed to wait for the creation of two source buffers at\n // the same time as the other sections of code are fixed to properly seek to live and\n // not throw an error due to checking for a seekable end when no seekable range exists.\n //\n // For now, fall back to the older behavior, with the understanding that the seekable\n // range may not be completely correct, leading to a suboptimal initial live point.\n\n if (!this.mainPlaylistLoader_) {\n return;\n }\n var media = this.mainPlaylistLoader_.media();\n if (!media) {\n return;\n }\n var expired = this.syncController_.getExpiredTime(media, this.duration());\n if (expired === null) {\n // not enough information to update seekable\n return;\n }\n var main = this.mainPlaylistLoader_.main;\n var mainSeekable = Vhs$1.Playlist.seekable(media, expired, Vhs$1.Playlist.liveEdgeDelay(main, media));\n if (mainSeekable.length === 0) {\n return;\n }\n if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n media = this.mediaTypes_.AUDIO.activePlaylistLoader.media();\n expired = this.syncController_.getExpiredTime(media, this.duration());\n if (expired === null) {\n return;\n }\n audioSeekable = Vhs$1.Playlist.seekable(media, expired, Vhs$1.Playlist.liveEdgeDelay(main, media));\n if (audioSeekable.length === 0) {\n return;\n }\n }\n var oldEnd;\n var oldStart;\n if (this.seekable_ && this.seekable_.length) {\n oldEnd = this.seekable_.end(0);\n oldStart = this.seekable_.start(0);\n }\n if (!audioSeekable) {\n // seekable has been calculated based on buffering video data so it\n // can be returned directly\n this.seekable_ = mainSeekable;\n } else if (audioSeekable.start(0) > mainSeekable.end(0) || mainSeekable.start(0) > audioSeekable.end(0)) {\n // seekables are pretty far off, rely on main\n this.seekable_ = mainSeekable;\n } else {\n this.seekable_ = createTimeRanges([[audioSeekable.start(0) > mainSeekable.start(0) ? audioSeekable.start(0) : mainSeekable.start(0), audioSeekable.end(0) < mainSeekable.end(0) ? audioSeekable.end(0) : mainSeekable.end(0)]]);\n } // seekable is the same as last time\n\n if (this.seekable_ && this.seekable_.length) {\n if (this.seekable_.end(0) === oldEnd && this.seekable_.start(0) === oldStart) {\n return;\n }\n }\n this.logger_(\"seekable updated [\".concat(printableRange(this.seekable_), \"]\"));\n this.tech_.trigger('seekablechanged');\n }\n /**\n * Update the player duration\n */\n }, {\n key: \"updateDuration\",\n value: function updateDuration(isLive) {\n if (this.updateDuration_) {\n this.mediaSource.removeEventListener('sourceopen', this.updateDuration_);\n this.updateDuration_ = null;\n }\n if (this.mediaSource.readyState !== 'open') {\n this.updateDuration_ = this.updateDuration.bind(this, isLive);\n this.mediaSource.addEventListener('sourceopen', this.updateDuration_);\n return;\n }\n if (isLive) {\n var _seekable2 = this.seekable();\n if (!_seekable2.length) {\n return;\n } // Even in the case of a live playlist, the native MediaSource's duration should not\n // be set to Infinity (even though this would be expected for a live playlist), since\n // setting the native MediaSource's duration to infinity ends up with consequences to\n // seekable behavior. See https://github.com/w3c/media-source/issues/5 for details.\n //\n // This is resolved in the spec by https://github.com/w3c/media-source/pull/92,\n // however, few browsers have support for setLiveSeekableRange()\n // https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/setLiveSeekableRange\n //\n // Until a time when the duration of the media source can be set to infinity, and a\n // seekable range specified across browsers, the duration should be greater than or\n // equal to the last possible seekable value.\n // MediaSource duration starts as NaN\n // It is possible (and probable) that this case will never be reached for many\n // sources, since the MediaSource reports duration as the highest value without\n // accounting for timestamp offset. For example, if the timestamp offset is -100 and\n // we buffered times 0 to 100 with real times of 100 to 200, even though current\n // time will be between 0 and 100, the native media source may report the duration\n // as 200. However, since we report duration separate from the media source (as\n // Infinity), and as long as the native media source duration value is greater than\n // our reported seekable range, seeks will work as expected. The large number as\n // duration for live is actually a strategy used by some players to work around the\n // issue of live seekable ranges cited above.\n\n if (isNaN(this.mediaSource.duration) || this.mediaSource.duration < _seekable2.end(_seekable2.length - 1)) {\n this.sourceUpdater_.setDuration(_seekable2.end(_seekable2.length - 1));\n }\n return;\n }\n var buffered = this.tech_.buffered();\n var duration = Vhs$1.Playlist.duration(this.mainPlaylistLoader_.media());\n if (buffered.length > 0) {\n duration = Math.max(duration, buffered.end(buffered.length - 1));\n }\n if (this.mediaSource.duration !== duration) {\n this.sourceUpdater_.setDuration(duration);\n }\n }\n /**\n * dispose of the PlaylistController and everything\n * that it controls\n */\n }, {\n key: \"dispose\",\n value: function dispose() {\n var _this177 = this;\n this.trigger('dispose');\n this.decrypter_.terminate();\n this.mainPlaylistLoader_.dispose();\n this.mainSegmentLoader_.dispose();\n this.contentSteeringController_.dispose();\n if (this.loadOnPlay_) {\n this.tech_.off('play', this.loadOnPlay_);\n }\n ['AUDIO', 'SUBTITLES'].forEach(function (type) {\n var groups = _this177.mediaTypes_[type].groups;\n for (var id in groups) {\n groups[id].forEach(function (group) {\n if (group.playlistLoader) {\n group.playlistLoader.dispose();\n }\n });\n }\n });\n this.audioSegmentLoader_.dispose();\n this.subtitleSegmentLoader_.dispose();\n this.sourceUpdater_.dispose();\n this.timelineChangeController_.dispose();\n this.stopABRTimer_();\n if (this.updateDuration_) {\n this.mediaSource.removeEventListener('sourceopen', this.updateDuration_);\n }\n this.mediaSource.removeEventListener('durationchange', this.handleDurationChange_); // load the media source into the player\n\n this.mediaSource.removeEventListener('sourceopen', this.handleSourceOpen_);\n this.mediaSource.removeEventListener('sourceended', this.handleSourceEnded_);\n this.off();\n }\n /**\n * return the main playlist object if we have one\n *\n * @return {Object} the main playlist object that we parsed\n */\n }, {\n key: \"main\",\n value: function main() {\n return this.mainPlaylistLoader_.main;\n }\n /**\n * return the currently selected playlist\n *\n * @return {Object} the currently selected playlist object that we parsed\n */\n }, {\n key: \"media\",\n value: function media() {\n // playlist loader will not return media if it has not been fully loaded\n return this.mainPlaylistLoader_.media() || this.initialMedia_;\n }\n }, {\n key: \"areMediaTypesKnown_\",\n value: function areMediaTypesKnown_() {\n var usingAudioLoader = !!this.mediaTypes_.AUDIO.activePlaylistLoader;\n var hasMainMediaInfo = !!this.mainSegmentLoader_.getCurrentMediaInfo_(); // if we are not using an audio loader, then we have audio media info\n // otherwise check on the segment loader.\n\n var hasAudioMediaInfo = !usingAudioLoader ? true : !!this.audioSegmentLoader_.getCurrentMediaInfo_(); // one or both loaders has not loaded sufficently to get codecs\n\n if (!hasMainMediaInfo || !hasAudioMediaInfo) {\n return false;\n }\n return true;\n }\n }, {\n key: \"getCodecsOrExclude_\",\n value: function getCodecsOrExclude_() {\n var _this178 = this;\n var media = {\n main: this.mainSegmentLoader_.getCurrentMediaInfo_() || {},\n audio: this.audioSegmentLoader_.getCurrentMediaInfo_() || {}\n };\n var playlist = this.mainSegmentLoader_.getPendingSegmentPlaylist() || this.media(); // set \"main\" media equal to video\n\n media.video = media.main;\n var playlistCodecs = codecsForPlaylist(this.main(), playlist);\n var codecs = {};\n var usingAudioLoader = !!this.mediaTypes_.AUDIO.activePlaylistLoader;\n if (media.main.hasVideo) {\n codecs.video = playlistCodecs.video || media.main.videoCodec || DEFAULT_VIDEO_CODEC;\n }\n if (media.main.isMuxed) {\n codecs.video += \",\".concat(playlistCodecs.audio || media.main.audioCodec || DEFAULT_AUDIO_CODEC);\n }\n if (media.main.hasAudio && !media.main.isMuxed || media.audio.hasAudio || usingAudioLoader) {\n codecs.audio = playlistCodecs.audio || media.main.audioCodec || media.audio.audioCodec || DEFAULT_AUDIO_CODEC; // set audio isFmp4 so we use the correct \"supports\" function below\n\n media.audio.isFmp4 = media.main.hasAudio && !media.main.isMuxed ? media.main.isFmp4 : media.audio.isFmp4;\n } // no codecs, no playback.\n\n if (!codecs.audio && !codecs.video) {\n this.excludePlaylist({\n playlistToExclude: playlist,\n error: {\n message: 'Could not determine codecs for playlist.'\n },\n playlistExclusionDuration: Infinity\n });\n return;\n } // fmp4 relies on browser support, while ts relies on muxer support\n\n var supportFunction = function supportFunction(isFmp4, codec) {\n return isFmp4 ? browserSupportsCodec(codec) : muxerSupportsCodec(codec);\n };\n var unsupportedCodecs = {};\n var unsupportedAudio;\n ['video', 'audio'].forEach(function (type) {\n if (codecs.hasOwnProperty(type) && !supportFunction(media[type].isFmp4, codecs[type])) {\n var supporter = media[type].isFmp4 ? 'browser' : 'muxer';\n unsupportedCodecs[supporter] = unsupportedCodecs[supporter] || [];\n unsupportedCodecs[supporter].push(codecs[type]);\n if (type === 'audio') {\n unsupportedAudio = supporter;\n }\n }\n });\n if (usingAudioLoader && unsupportedAudio && playlist.attributes.AUDIO) {\n var audioGroup = playlist.attributes.AUDIO;\n this.main().playlists.forEach(function (variant) {\n var variantAudioGroup = variant.attributes && variant.attributes.AUDIO;\n if (variantAudioGroup === audioGroup && variant !== playlist) {\n variant.excludeUntil = Infinity;\n }\n });\n this.logger_(\"excluding audio group \".concat(audioGroup, \" as \").concat(unsupportedAudio, \" does not support codec(s): \\\"\").concat(codecs.audio, \"\\\"\"));\n } // if we have any unsupported codecs exclude this playlist.\n\n if (Object.keys(unsupportedCodecs).length) {\n var message = Object.keys(unsupportedCodecs).reduce(function (acc, supporter) {\n if (acc) {\n acc += ', ';\n }\n acc += \"\".concat(supporter, \" does not support codec(s): \\\"\").concat(unsupportedCodecs[supporter].join(','), \"\\\"\");\n return acc;\n }, '') + '.';\n this.excludePlaylist({\n playlistToExclude: playlist,\n error: {\n internal: true,\n message: message\n },\n playlistExclusionDuration: Infinity\n });\n return;\n } // check if codec switching is happening\n\n if (this.sourceUpdater_.hasCreatedSourceBuffers() && !this.sourceUpdater_.canChangeType()) {\n var switchMessages = [];\n ['video', 'audio'].forEach(function (type) {\n var newCodec = (parseCodecs(_this178.sourceUpdater_.codecs[type] || '')[0] || {}).type;\n var oldCodec = (parseCodecs(codecs[type] || '')[0] || {}).type;\n if (newCodec && oldCodec && newCodec.toLowerCase() !== oldCodec.toLowerCase()) {\n switchMessages.push(\"\\\"\".concat(_this178.sourceUpdater_.codecs[type], \"\\\" -> \\\"\").concat(codecs[type], \"\\\"\"));\n }\n });\n if (switchMessages.length) {\n this.excludePlaylist({\n playlistToExclude: playlist,\n error: {\n message: \"Codec switching not supported: \".concat(switchMessages.join(', '), \".\"),\n internal: true\n },\n playlistExclusionDuration: Infinity\n });\n return;\n }\n } // TODO: when using the muxer shouldn't we just return\n // the codecs that the muxer outputs?\n\n return codecs;\n }\n /**\n * Create source buffers and exlude any incompatible renditions.\n *\n * @private\n */\n }, {\n key: \"tryToCreateSourceBuffers_\",\n value: function tryToCreateSourceBuffers_() {\n // media source is not ready yet or sourceBuffers are already\n // created.\n if (this.mediaSource.readyState !== 'open' || this.sourceUpdater_.hasCreatedSourceBuffers()) {\n return;\n }\n if (!this.areMediaTypesKnown_()) {\n return;\n }\n var codecs = this.getCodecsOrExclude_(); // no codecs means that the playlist was excluded\n\n if (!codecs) {\n return;\n }\n this.sourceUpdater_.createSourceBuffers(codecs);\n var codecString = [codecs.video, codecs.audio].filter(Boolean).join(',');\n this.excludeIncompatibleVariants_(codecString);\n }\n /**\n * Excludes playlists with codecs that are unsupported by the muxer and browser.\n */\n }, {\n key: \"excludeUnsupportedVariants_\",\n value: function excludeUnsupportedVariants_() {\n var _this179 = this;\n var playlists = this.main().playlists;\n var ids = []; // TODO: why don't we have a property to loop through all\n // playlist? Why did we ever mix indexes and keys?\n\n Object.keys(playlists).forEach(function (key) {\n var variant = playlists[key]; // check if we already processed this playlist.\n\n if (ids.indexOf(variant.id) !== -1) {\n return;\n }\n ids.push(variant.id);\n var codecs = codecsForPlaylist(_this179.main, variant);\n var unsupported = [];\n if (codecs.audio && !muxerSupportsCodec(codecs.audio) && !browserSupportsCodec(codecs.audio)) {\n unsupported.push(\"audio codec \".concat(codecs.audio));\n }\n if (codecs.video && !muxerSupportsCodec(codecs.video) && !browserSupportsCodec(codecs.video)) {\n unsupported.push(\"video codec \".concat(codecs.video));\n }\n if (codecs.text && codecs.text === 'stpp.ttml.im1t') {\n unsupported.push(\"text codec \".concat(codecs.text));\n }\n if (unsupported.length) {\n variant.excludeUntil = Infinity;\n _this179.logger_(\"excluding \".concat(variant.id, \" for unsupported: \").concat(unsupported.join(', ')));\n }\n });\n }\n /**\n * Exclude playlists that are known to be codec or\n * stream-incompatible with the SourceBuffer configuration. For\n * instance, Media Source Extensions would cause the video element to\n * stall waiting for video data if you switched from a variant with\n * video and audio to an audio-only one.\n *\n * @param {Object} media a media playlist compatible with the current\n * set of SourceBuffers. Variants in the current main playlist that\n * do not appear to have compatible codec or stream configurations\n * will be excluded from the default playlist selection algorithm\n * indefinitely.\n * @private\n */\n }, {\n key: \"excludeIncompatibleVariants_\",\n value: function excludeIncompatibleVariants_(codecString) {\n var _this180 = this;\n var ids = [];\n var playlists = this.main().playlists;\n var codecs = unwrapCodecList(parseCodecs(codecString));\n var codecCount_ = codecCount(codecs);\n var videoDetails = codecs.video && parseCodecs(codecs.video)[0] || null;\n var audioDetails = codecs.audio && parseCodecs(codecs.audio)[0] || null;\n Object.keys(playlists).forEach(function (key) {\n var variant = playlists[key]; // check if we already processed this playlist.\n // or it if it is already excluded forever.\n\n if (ids.indexOf(variant.id) !== -1 || variant.excludeUntil === Infinity) {\n return;\n }\n ids.push(variant.id);\n var exclusionReasons = []; // get codecs from the playlist for this variant\n\n var variantCodecs = codecsForPlaylist(_this180.mainPlaylistLoader_.main, variant);\n var variantCodecCount = codecCount(variantCodecs); // if no codecs are listed, we cannot determine that this\n // variant is incompatible. Wait for mux.js to probe\n\n if (!variantCodecs.audio && !variantCodecs.video) {\n return;\n } // TODO: we can support this by removing the\n // old media source and creating a new one, but it will take some work.\n // The number of streams cannot change\n\n if (variantCodecCount !== codecCount_) {\n exclusionReasons.push(\"codec count \\\"\".concat(variantCodecCount, \"\\\" !== \\\"\").concat(codecCount_, \"\\\"\"));\n } // only exclude playlists by codec change, if codecs cannot switch\n // during playback.\n\n if (!_this180.sourceUpdater_.canChangeType()) {\n var variantVideoDetails = variantCodecs.video && parseCodecs(variantCodecs.video)[0] || null;\n var variantAudioDetails = variantCodecs.audio && parseCodecs(variantCodecs.audio)[0] || null; // the video codec cannot change\n\n if (variantVideoDetails && videoDetails && variantVideoDetails.type.toLowerCase() !== videoDetails.type.toLowerCase()) {\n exclusionReasons.push(\"video codec \\\"\".concat(variantVideoDetails.type, \"\\\" !== \\\"\").concat(videoDetails.type, \"\\\"\"));\n } // the audio codec cannot change\n\n if (variantAudioDetails && audioDetails && variantAudioDetails.type.toLowerCase() !== audioDetails.type.toLowerCase()) {\n exclusionReasons.push(\"audio codec \\\"\".concat(variantAudioDetails.type, \"\\\" !== \\\"\").concat(audioDetails.type, \"\\\"\"));\n }\n }\n if (exclusionReasons.length) {\n variant.excludeUntil = Infinity;\n _this180.logger_(\"excluding \".concat(variant.id, \": \").concat(exclusionReasons.join(' && ')));\n }\n });\n }\n }, {\n key: \"updateAdCues_\",\n value: function updateAdCues_(media) {\n var offset = 0;\n var seekable = this.seekable();\n if (seekable.length) {\n offset = seekable.start(0);\n }\n updateAdCues(media, this.cueTagsTrack_, offset);\n }\n /**\n * Calculates the desired forward buffer length based on current time\n *\n * @return {number} Desired forward buffer length in seconds\n */\n }, {\n key: \"goalBufferLength\",\n value: function goalBufferLength() {\n var currentTime = this.tech_.currentTime();\n var initial = Config.GOAL_BUFFER_LENGTH;\n var rate = Config.GOAL_BUFFER_LENGTH_RATE;\n var max = Math.max(initial, Config.MAX_GOAL_BUFFER_LENGTH);\n return Math.min(initial + currentTime * rate, max);\n }\n /**\n * Calculates the desired buffer low water line based on current time\n *\n * @return {number} Desired buffer low water line in seconds\n */\n }, {\n key: \"bufferLowWaterLine\",\n value: function bufferLowWaterLine() {\n var currentTime = this.tech_.currentTime();\n var initial = Config.BUFFER_LOW_WATER_LINE;\n var rate = Config.BUFFER_LOW_WATER_LINE_RATE;\n var max = Math.max(initial, Config.MAX_BUFFER_LOW_WATER_LINE);\n var newMax = Math.max(initial, Config.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);\n return Math.min(initial + currentTime * rate, this.bufferBasedABR ? newMax : max);\n }\n }, {\n key: \"bufferHighWaterLine\",\n value: function bufferHighWaterLine() {\n return Config.BUFFER_HIGH_WATER_LINE;\n }\n }, {\n key: \"addDateRangesToTextTrack_\",\n value: function addDateRangesToTextTrack_(dateRanges) {\n createMetadataTrackIfNotExists(this.inbandTextTracks_, 'com.apple.streaming', this.tech_);\n addDateRangeMetadata({\n inbandTextTracks: this.inbandTextTracks_,\n dateRanges: dateRanges\n });\n }\n }, {\n key: \"addMetadataToTextTrack\",\n value: function addMetadataToTextTrack(dispatchType, metadataArray, videoDuration) {\n var timestampOffset = this.sourceUpdater_.videoBuffer ? this.sourceUpdater_.videoTimestampOffset() : this.sourceUpdater_.audioTimestampOffset(); // There's potentially an issue where we could double add metadata if there's a muxed\n // audio/video source with a metadata track, and an alt audio with a metadata track.\n // However, this probably won't happen, and if it does it can be handled then.\n\n createMetadataTrackIfNotExists(this.inbandTextTracks_, dispatchType, this.tech_);\n addMetadata({\n inbandTextTracks: this.inbandTextTracks_,\n metadataArray: metadataArray,\n timestampOffset: timestampOffset,\n videoDuration: videoDuration\n });\n }\n }, {\n key: \"pathwayAttribute_\",\n value: function pathwayAttribute_(playlist) {\n return playlist.attributes['PATHWAY-ID'] || playlist.attributes.serviceLocation;\n }\n /**\n * Initialize content steering listeners and apply the tag properties.\n */\n }, {\n key: \"initContentSteeringController_\",\n value: function initContentSteeringController_() {\n var _this181 = this;\n var initialMain = this.main();\n if (!initialMain.contentSteering) {\n return;\n }\n var updateSteeringValues = function updateSteeringValues(main) {\n var _iterator2 = _createForOfIteratorHelper(main.playlists),\n _step2;\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var playlist = _step2.value;\n _this181.contentSteeringController_.addAvailablePathway(_this181.pathwayAttribute_(playlist));\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n _this181.contentSteeringController_.assignTagProperties(main.uri, main.contentSteering);\n };\n updateSteeringValues(initialMain);\n this.contentSteeringController_.on('content-steering', this.excludeThenChangePathway_.bind(this)); // We need to ensure we update the content steering values when a new\n // manifest is loaded in live DASH with content steering.\n\n if (this.sourceType_ === 'dash') {\n this.mainPlaylistLoader_.on('mediaupdatetimeout', function () {\n _this181.mainPlaylistLoader_.refreshMedia_(_this181.mainPlaylistLoader_.media().id); // clear past values\n\n _this181.contentSteeringController_.abort();\n _this181.contentSteeringController_.clearTTLTimeout_();\n _this181.contentSteeringController_.clearAvailablePathways();\n updateSteeringValues(_this181.main());\n });\n } // Do this at startup only, after that the steering requests are managed by the Content Steering class.\n // DASH queryBeforeStart scenarios will be handled by the Content Steering class.\n\n if (!this.contentSteeringController_.queryBeforeStart) {\n this.tech_.one('canplay', function () {\n _this181.contentSteeringController_.requestSteeringManifest();\n });\n }\n }\n /**\n * Simple exclude and change playlist logic for content steering.\n */\n }, {\n key: \"excludeThenChangePathway_\",\n value: function excludeThenChangePathway_() {\n var _this182 = this;\n var currentPathway = this.contentSteeringController_.getPathway();\n if (!currentPathway) {\n return;\n }\n var main = this.main();\n var playlists = main.playlists;\n var ids = new Set();\n var didEnablePlaylists = false;\n Object.keys(playlists).forEach(function (key) {\n var variant = playlists[key];\n var pathwayId = _this182.pathwayAttribute_(variant);\n var differentPathwayId = pathwayId && currentPathway !== pathwayId;\n var steeringExclusion = variant.excludeUntil === Infinity && variant.lastExcludeReason_ === 'content-steering';\n if (steeringExclusion && !differentPathwayId) {\n delete variant.excludeUntil;\n delete variant.lastExcludeReason_;\n didEnablePlaylists = true;\n }\n var noExcludeUntil = !variant.excludeUntil && variant.excludeUntil !== Infinity;\n var shouldExclude = !ids.has(variant.id) && differentPathwayId && noExcludeUntil;\n if (!shouldExclude) {\n return;\n }\n ids.add(variant.id);\n variant.excludeUntil = Infinity;\n variant.lastExcludeReason_ = 'content-steering'; // TODO: kind of spammy, maybe move this.\n\n _this182.logger_(\"excluding \".concat(variant.id, \" for \").concat(variant.lastExcludeReason_));\n });\n if (this.contentSteeringController_.manifestType_ === 'DASH') {\n Object.keys(this.mediaTypes_).forEach(function (key) {\n var type = _this182.mediaTypes_[key];\n if (type.activePlaylistLoader) {\n var currentPlaylist = type.activePlaylistLoader.media_; // Check if the current media playlist matches the current CDN\n\n if (currentPlaylist && currentPlaylist.attributes.serviceLocation !== currentPathway) {\n didEnablePlaylists = true;\n }\n }\n });\n }\n if (didEnablePlaylists) {\n this.changeSegmentPathway_();\n }\n }\n /**\n * Changes the current playlists for audio, video and subtitles after a new pathway\n * is chosen from content steering.\n */\n }, {\n key: \"changeSegmentPathway_\",\n value: function changeSegmentPathway_() {\n var nextPlaylist = this.selectPlaylist();\n this.pauseLoading(); // Switch audio and text track playlists if necessary in DASH\n\n if (this.contentSteeringController_.manifestType_ === 'DASH') {\n this.switchMediaForDASHContentSteering_();\n }\n this.switchMedia_(nextPlaylist, 'content-steering');\n }\n }]);\n return PlaylistController;\n}(videojs.EventTarget);\n/**\n * Returns a function that acts as the Enable/disable playlist function.\n *\n * @param {PlaylistLoader} loader - The main playlist loader\n * @param {string} playlistID - id of the playlist\n * @param {Function} changePlaylistFn - A function to be called after a\n * playlist's enabled-state has been changed. Will NOT be called if a\n * playlist's enabled-state is unchanged\n * @param {boolean=} enable - Value to set the playlist enabled-state to\n * or if undefined returns the current enabled-state for the playlist\n * @return {Function} Function for setting/getting enabled\n */\nvar enableFunction = function enableFunction(loader, playlistID, changePlaylistFn) {\n return function (enable) {\n var playlist = loader.main.playlists[playlistID];\n var incompatible = isIncompatible(playlist);\n var currentlyEnabled = isEnabled(playlist);\n if (typeof enable === 'undefined') {\n return currentlyEnabled;\n }\n if (enable) {\n delete playlist.disabled;\n } else {\n playlist.disabled = true;\n }\n if (enable !== currentlyEnabled && !incompatible) {\n // Ensure the outside world knows about our changes\n changePlaylistFn();\n if (enable) {\n loader.trigger('renditionenabled');\n } else {\n loader.trigger('renditiondisabled');\n }\n }\n return enable;\n };\n};\n/**\n * The representation object encapsulates the publicly visible information\n * in a media playlist along with a setter/getter-type function (enabled)\n * for changing the enabled-state of a particular playlist entry\n *\n * @class Representation\n */\nvar Representation = /*#__PURE__*/_createClass(function Representation(vhsHandler, playlist, id) {\n _classCallCheck(this, Representation);\n var pc = vhsHandler.playlistController_;\n var qualityChangeFunction = pc.fastQualityChange_.bind(pc); // some playlist attributes are optional\n\n if (playlist.attributes) {\n var resolution = playlist.attributes.RESOLUTION;\n this.width = resolution && resolution.width;\n this.height = resolution && resolution.height;\n this.bandwidth = playlist.attributes.BANDWIDTH;\n this.frameRate = playlist.attributes['FRAME-RATE'];\n }\n this.codecs = codecsForPlaylist(pc.main(), playlist);\n this.playlist = playlist; // The id is simply the ordinality of the media playlist\n // within the main playlist\n\n this.id = id; // Partially-apply the enableFunction to create a playlist-\n // specific variant\n\n this.enabled = enableFunction(vhsHandler.playlists, playlist.id, qualityChangeFunction);\n});\n/**\n * A mixin function that adds the `representations` api to an instance\n * of the VhsHandler class\n *\n * @param {VhsHandler} vhsHandler - An instance of VhsHandler to add the\n * representation API into\n */\nvar renditionSelectionMixin = function renditionSelectionMixin(vhsHandler) {\n // Add a single API-specific function to the VhsHandler instance\n vhsHandler.representations = function () {\n var main = vhsHandler.playlistController_.main();\n var playlists = isAudioOnly(main) ? vhsHandler.playlistController_.getAudioTrackPlaylists_() : main.playlists;\n if (!playlists) {\n return [];\n }\n return playlists.filter(function (media) {\n return !isIncompatible(media);\n }).map(function (e, i) {\n return new Representation(vhsHandler, e, e.id);\n });\n };\n};\n\n/**\n * @file playback-watcher.js\n *\n * Playback starts, and now my watch begins. It shall not end until my death. I shall\n * take no wait, hold no uncleared timeouts, father no bad seeks. I shall wear no crowns\n * and win no glory. I shall live and die at my post. I am the corrector of the underflow.\n * I am the watcher of gaps. I am the shield that guards the realms of seekable. I pledge\n * my life and honor to the Playback Watch, for this Player and all the Players to come.\n */\n\nvar timerCancelEvents = ['seeking', 'seeked', 'pause', 'playing', 'error'];\n/**\n * @class PlaybackWatcher\n */\nvar PlaybackWatcher = /*#__PURE__*/function () {\n /**\n * Represents an PlaybackWatcher object.\n *\n * @class\n * @param {Object} options an object that includes the tech and settings\n */\n function PlaybackWatcher(options) {\n var _this183 = this;\n _classCallCheck(this, PlaybackWatcher);\n this.playlistController_ = options.playlistController;\n this.tech_ = options.tech;\n this.seekable = options.seekable;\n this.allowSeeksWithinUnsafeLiveWindow = options.allowSeeksWithinUnsafeLiveWindow;\n this.liveRangeSafeTimeDelta = options.liveRangeSafeTimeDelta;\n this.media = options.media;\n this.consecutiveUpdates = 0;\n this.lastRecordedTime = null;\n this.checkCurrentTimeTimeout_ = null;\n this.logger_ = logger('PlaybackWatcher');\n this.logger_('initialize');\n var playHandler = function playHandler() {\n return _this183.monitorCurrentTime_();\n };\n var canPlayHandler = function canPlayHandler() {\n return _this183.monitorCurrentTime_();\n };\n var waitingHandler = function waitingHandler() {\n return _this183.techWaiting_();\n };\n var cancelTimerHandler = function cancelTimerHandler() {\n return _this183.resetTimeUpdate_();\n };\n var pc = this.playlistController_;\n var loaderTypes = ['main', 'subtitle', 'audio'];\n var loaderChecks = {};\n loaderTypes.forEach(function (type) {\n loaderChecks[type] = {\n reset: function reset() {\n return _this183.resetSegmentDownloads_(type);\n },\n updateend: function updateend() {\n return _this183.checkSegmentDownloads_(type);\n }\n };\n pc[\"\".concat(type, \"SegmentLoader_\")].on('appendsdone', loaderChecks[type].updateend); // If a rendition switch happens during a playback stall where the buffer\n // isn't changing we want to reset. We cannot assume that the new rendition\n // will also be stalled, until after new appends.\n\n pc[\"\".concat(type, \"SegmentLoader_\")].on('playlistupdate', loaderChecks[type].reset); // Playback stalls should not be detected right after seeking.\n // This prevents one segment playlists (single vtt or single segment content)\n // from being detected as stalling. As the buffer will not change in those cases, since\n // the buffer is the entire video duration.\n\n _this183.tech_.on(['seeked', 'seeking'], loaderChecks[type].reset);\n });\n /**\n * We check if a seek was into a gap through the following steps:\n * 1. We get a seeking event and we do not get a seeked event. This means that\n * a seek was attempted but not completed.\n * 2. We run `fixesBadSeeks_` on segment loader appends. This means that we already\n * removed everything from our buffer and appended a segment, and should be ready\n * to check for gaps.\n */\n\n var setSeekingHandlers = function setSeekingHandlers(fn) {\n ['main', 'audio'].forEach(function (type) {\n pc[\"\".concat(type, \"SegmentLoader_\")][fn]('appended', _this183.seekingAppendCheck_);\n });\n };\n this.seekingAppendCheck_ = function () {\n if (_this183.fixesBadSeeks_()) {\n _this183.consecutiveUpdates = 0;\n _this183.lastRecordedTime = _this183.tech_.currentTime();\n setSeekingHandlers('off');\n }\n };\n this.clearSeekingAppendCheck_ = function () {\n return setSeekingHandlers('off');\n };\n this.watchForBadSeeking_ = function () {\n _this183.clearSeekingAppendCheck_();\n setSeekingHandlers('on');\n };\n this.tech_.on('seeked', this.clearSeekingAppendCheck_);\n this.tech_.on('seeking', this.watchForBadSeeking_);\n this.tech_.on('waiting', waitingHandler);\n this.tech_.on(timerCancelEvents, cancelTimerHandler);\n this.tech_.on('canplay', canPlayHandler);\n /*\n An edge case exists that results in gaps not being skipped when they exist at the beginning of a stream. This case\n is surfaced in one of two ways:\n 1) The `waiting` event is fired before the player has buffered content, making it impossible\n to find or skip the gap. The `waiting` event is followed by a `play` event. On first play\n we can check if playback is stalled due to a gap, and skip the gap if necessary.\n 2) A source with a gap at the beginning of the stream is loaded programatically while the player\n is in a playing state. To catch this case, it's important that our one-time play listener is setup\n even if the player is in a playing state\n */\n\n this.tech_.one('play', playHandler); // Define the dispose function to clean up our events\n\n this.dispose = function () {\n _this183.clearSeekingAppendCheck_();\n _this183.logger_('dispose');\n _this183.tech_.off('waiting', waitingHandler);\n _this183.tech_.off(timerCancelEvents, cancelTimerHandler);\n _this183.tech_.off('canplay', canPlayHandler);\n _this183.tech_.off('play', playHandler);\n _this183.tech_.off('seeking', _this183.watchForBadSeeking_);\n _this183.tech_.off('seeked', _this183.clearSeekingAppendCheck_);\n loaderTypes.forEach(function (type) {\n pc[\"\".concat(type, \"SegmentLoader_\")].off('appendsdone', loaderChecks[type].updateend);\n pc[\"\".concat(type, \"SegmentLoader_\")].off('playlistupdate', loaderChecks[type].reset);\n _this183.tech_.off(['seeked', 'seeking'], loaderChecks[type].reset);\n });\n if (_this183.checkCurrentTimeTimeout_) {\n window$1.clearTimeout(_this183.checkCurrentTimeTimeout_);\n }\n _this183.resetTimeUpdate_();\n };\n }\n /**\n * Periodically check current time to see if playback stopped\n *\n * @private\n */\n _createClass(PlaybackWatcher, [{\n key: \"monitorCurrentTime_\",\n value: function monitorCurrentTime_() {\n this.checkCurrentTime_();\n if (this.checkCurrentTimeTimeout_) {\n window$1.clearTimeout(this.checkCurrentTimeTimeout_);\n } // 42 = 24 fps // 250 is what Webkit uses // FF uses 15\n\n this.checkCurrentTimeTimeout_ = window$1.setTimeout(this.monitorCurrentTime_.bind(this), 250);\n }\n /**\n * Reset stalled download stats for a specific type of loader\n *\n * @param {string} type\n * The segment loader type to check.\n *\n * @listens SegmentLoader#playlistupdate\n * @listens Tech#seeking\n * @listens Tech#seeked\n */\n }, {\n key: \"resetSegmentDownloads_\",\n value: function resetSegmentDownloads_(type) {\n var loader = this.playlistController_[\"\".concat(type, \"SegmentLoader_\")];\n if (this[\"\".concat(type, \"StalledDownloads_\")] > 0) {\n this.logger_(\"resetting possible stalled download count for \".concat(type, \" loader\"));\n }\n this[\"\".concat(type, \"StalledDownloads_\")] = 0;\n this[\"\".concat(type, \"Buffered_\")] = loader.buffered_();\n }\n /**\n * Checks on every segment `appendsdone` to see\n * if segment appends are making progress. If they are not\n * and we are still downloading bytes. We exclude the playlist.\n *\n * @param {string} type\n * The segment loader type to check.\n *\n * @listens SegmentLoader#appendsdone\n */\n }, {\n key: \"checkSegmentDownloads_\",\n value: function checkSegmentDownloads_(type) {\n var pc = this.playlistController_;\n var loader = pc[\"\".concat(type, \"SegmentLoader_\")];\n var buffered = loader.buffered_();\n var isBufferedDifferent = isRangeDifferent(this[\"\".concat(type, \"Buffered_\")], buffered);\n this[\"\".concat(type, \"Buffered_\")] = buffered; // if another watcher is going to fix the issue or\n // the buffered value for this loader changed\n // appends are working\n\n if (isBufferedDifferent) {\n this.resetSegmentDownloads_(type);\n return;\n }\n this[\"\".concat(type, \"StalledDownloads_\")]++;\n this.logger_(\"found #\".concat(this[\"\".concat(type, \"StalledDownloads_\")], \" \").concat(type, \" appends that did not increase buffer (possible stalled download)\"), {\n playlistId: loader.playlist_ && loader.playlist_.id,\n buffered: timeRangesToArray(buffered)\n }); // after 10 possibly stalled appends with no reset, exclude\n\n if (this[\"\".concat(type, \"StalledDownloads_\")] < 10) {\n return;\n }\n this.logger_(\"\".concat(type, \" loader stalled download exclusion\"));\n this.resetSegmentDownloads_(type);\n this.tech_.trigger({\n type: 'usage',\n name: \"vhs-\".concat(type, \"-download-exclusion\")\n });\n if (type === 'subtitle') {\n return;\n } // TODO: should we exclude audio tracks rather than main tracks\n // when type is audio?\n\n pc.excludePlaylist({\n error: {\n message: \"Excessive \".concat(type, \" segment downloading detected.\")\n },\n playlistExclusionDuration: Infinity\n });\n }\n /**\n * The purpose of this function is to emulate the \"waiting\" event on\n * browsers that do not emit it when they are waiting for more\n * data to continue playback\n *\n * @private\n */\n }, {\n key: \"checkCurrentTime_\",\n value: function checkCurrentTime_() {\n if (this.tech_.paused() || this.tech_.seeking()) {\n return;\n }\n var currentTime = this.tech_.currentTime();\n var buffered = this.tech_.buffered();\n if (this.lastRecordedTime === currentTime && (!buffered.length || currentTime + SAFE_TIME_DELTA >= buffered.end(buffered.length - 1))) {\n // If current time is at the end of the final buffered region, then any playback\n // stall is most likely caused by buffering in a low bandwidth environment. The tech\n // should fire a `waiting` event in this scenario, but due to browser and tech\n // inconsistencies. Calling `techWaiting_` here allows us to simulate\n // responding to a native `waiting` event when the tech fails to emit one.\n return this.techWaiting_();\n }\n if (this.consecutiveUpdates >= 5 && currentTime === this.lastRecordedTime) {\n this.consecutiveUpdates++;\n this.waiting_();\n } else if (currentTime === this.lastRecordedTime) {\n this.consecutiveUpdates++;\n } else {\n this.consecutiveUpdates = 0;\n this.lastRecordedTime = currentTime;\n }\n }\n /**\n * Resets the 'timeupdate' mechanism designed to detect that we are stalled\n *\n * @private\n */\n }, {\n key: \"resetTimeUpdate_\",\n value: function resetTimeUpdate_() {\n this.consecutiveUpdates = 0;\n }\n /**\n * Fixes situations where there's a bad seek\n *\n * @return {boolean} whether an action was taken to fix the seek\n * @private\n */\n }, {\n key: \"fixesBadSeeks_\",\n value: function fixesBadSeeks_() {\n var seeking = this.tech_.seeking();\n if (!seeking) {\n return false;\n } // TODO: It's possible that these seekable checks should be moved out of this function\n // and into a function that runs on seekablechange. It's also possible that we only need\n // afterSeekableWindow as the buffered check at the bottom is good enough to handle before\n // seekable range.\n\n var seekable = this.seekable();\n var currentTime = this.tech_.currentTime();\n var isAfterSeekableRange = this.afterSeekableWindow_(seekable, currentTime, this.media(), this.allowSeeksWithinUnsafeLiveWindow);\n var seekTo;\n if (isAfterSeekableRange) {\n var seekableEnd = seekable.end(seekable.length - 1); // sync to live point (if VOD, our seekable was updated and we're simply adjusting)\n\n seekTo = seekableEnd;\n }\n if (this.beforeSeekableWindow_(seekable, currentTime)) {\n var seekableStart = seekable.start(0); // sync to the beginning of the live window\n // provide a buffer of .1 seconds to handle rounding/imprecise numbers\n\n seekTo = seekableStart + (\n // if the playlist is too short and the seekable range is an exact time (can\n // happen in live with a 3 segment playlist), then don't use a time delta\n seekableStart === seekable.end(0) ? 0 : SAFE_TIME_DELTA);\n }\n if (typeof seekTo !== 'undefined') {\n this.logger_(\"Trying to seek outside of seekable at time \".concat(currentTime, \" with \") + \"seekable range \".concat(printableRange(seekable), \". Seeking to \") + \"\".concat(seekTo, \".\"));\n this.tech_.setCurrentTime(seekTo);\n return true;\n }\n var sourceUpdater = this.playlistController_.sourceUpdater_;\n var buffered = this.tech_.buffered();\n var audioBuffered = sourceUpdater.audioBuffer ? sourceUpdater.audioBuffered() : null;\n var videoBuffered = sourceUpdater.videoBuffer ? sourceUpdater.videoBuffered() : null;\n var media = this.media(); // verify that at least two segment durations or one part duration have been\n // appended before checking for a gap.\n\n var minAppendedDuration = media.partTargetDuration ? media.partTargetDuration : (media.targetDuration - TIME_FUDGE_FACTOR) * 2; // verify that at least two segment durations have been\n // appended before checking for a gap.\n\n var bufferedToCheck = [audioBuffered, videoBuffered];\n for (var _i116 = 0; _i116 < bufferedToCheck.length; _i116++) {\n // skip null buffered\n if (!bufferedToCheck[_i116]) {\n continue;\n }\n var timeAhead = timeAheadOf(bufferedToCheck[_i116], currentTime); // if we are less than two video/audio segment durations or one part\n // duration behind we haven't appended enough to call this a bad seek.\n\n if (timeAhead < minAppendedDuration) {\n return false;\n }\n }\n var nextRange = findNextRange(buffered, currentTime); // we have appended enough content, but we don't have anything buffered\n // to seek over the gap\n\n if (nextRange.length === 0) {\n return false;\n }\n seekTo = nextRange.start(0) + SAFE_TIME_DELTA;\n this.logger_(\"Buffered region starts (\".concat(nextRange.start(0), \") \") + \" just beyond seek point (\".concat(currentTime, \"). Seeking to \").concat(seekTo, \".\"));\n this.tech_.setCurrentTime(seekTo);\n return true;\n }\n /**\n * Handler for situations when we determine the player is waiting.\n *\n * @private\n */\n }, {\n key: \"waiting_\",\n value: function waiting_() {\n if (this.techWaiting_()) {\n return;\n } // All tech waiting checks failed. Use last resort correction\n\n var currentTime = this.tech_.currentTime();\n var buffered = this.tech_.buffered();\n var currentRange = findRange(buffered, currentTime); // Sometimes the player can stall for unknown reasons within a contiguous buffered\n // region with no indication that anything is amiss (seen in Firefox). Seeking to\n // currentTime is usually enough to kickstart the player. This checks that the player\n // is currently within a buffered region before attempting a corrective seek.\n // Chrome does not appear to continue `timeupdate` events after a `waiting` event\n // until there is ~ 3 seconds of forward buffer available. PlaybackWatcher should also\n // make sure there is ~3 seconds of forward buffer before taking any corrective action\n // to avoid triggering an `unknownwaiting` event when the network is slow.\n\n if (currentRange.length && currentTime + 3 <= currentRange.end(0)) {\n this.resetTimeUpdate_();\n this.tech_.setCurrentTime(currentTime);\n this.logger_(\"Stopped at \".concat(currentTime, \" while inside a buffered region \") + \"[\".concat(currentRange.start(0), \" -> \").concat(currentRange.end(0), \"]. Attempting to resume \") + 'playback by seeking to the current time.'); // unknown waiting corrections may be useful for monitoring QoS\n\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-unknown-waiting'\n });\n return;\n }\n }\n /**\n * Handler for situations when the tech fires a `waiting` event\n *\n * @return {boolean}\n * True if an action (or none) was needed to correct the waiting. False if no\n * checks passed\n * @private\n */\n }, {\n key: \"techWaiting_\",\n value: function techWaiting_() {\n var seekable = this.seekable();\n var currentTime = this.tech_.currentTime();\n if (this.tech_.seeking()) {\n // Tech is seeking or already waiting on another action, no action needed\n return true;\n }\n if (this.beforeSeekableWindow_(seekable, currentTime)) {\n var livePoint = seekable.end(seekable.length - 1);\n this.logger_(\"Fell out of live window at time \".concat(currentTime, \". Seeking to \") + \"live point (seekable end) \".concat(livePoint));\n this.resetTimeUpdate_();\n this.tech_.setCurrentTime(livePoint); // live window resyncs may be useful for monitoring QoS\n\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-live-resync'\n });\n return true;\n }\n var sourceUpdater = this.tech_.vhs.playlistController_.sourceUpdater_;\n var buffered = this.tech_.buffered();\n var videoUnderflow = this.videoUnderflow_({\n audioBuffered: sourceUpdater.audioBuffered(),\n videoBuffered: sourceUpdater.videoBuffered(),\n currentTime: currentTime\n });\n if (videoUnderflow) {\n // Even though the video underflowed and was stuck in a gap, the audio overplayed\n // the gap, leading currentTime into a buffered range. Seeking to currentTime\n // allows the video to catch up to the audio position without losing any audio\n // (only suffering ~3 seconds of frozen video and a pause in audio playback).\n this.resetTimeUpdate_();\n this.tech_.setCurrentTime(currentTime); // video underflow may be useful for monitoring QoS\n\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-video-underflow'\n });\n return true;\n }\n var nextRange = findNextRange(buffered, currentTime); // check for gap\n\n if (nextRange.length > 0) {\n this.logger_(\"Stopped at \".concat(currentTime, \" and seeking to \").concat(nextRange.start(0)));\n this.resetTimeUpdate_();\n this.skipTheGap_(currentTime);\n return true;\n } // All checks failed. Returning false to indicate failure to correct waiting\n\n return false;\n }\n }, {\n key: \"afterSeekableWindow_\",\n value: function afterSeekableWindow_(seekable, currentTime, playlist) {\n var allowSeeksWithinUnsafeLiveWindow = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n if (!seekable.length) {\n // we can't make a solid case if there's no seekable, default to false\n return false;\n }\n var allowedEnd = seekable.end(seekable.length - 1) + SAFE_TIME_DELTA;\n var isLive = !playlist.endList;\n var isLLHLS = typeof playlist.partTargetDuration === 'number';\n if (isLive && (isLLHLS || allowSeeksWithinUnsafeLiveWindow)) {\n allowedEnd = seekable.end(seekable.length - 1) + playlist.targetDuration * 3;\n }\n if (currentTime > allowedEnd) {\n return true;\n }\n return false;\n }\n }, {\n key: \"beforeSeekableWindow_\",\n value: function beforeSeekableWindow_(seekable, currentTime) {\n if (seekable.length &&\n // can't fall before 0 and 0 seekable start identifies VOD stream\n seekable.start(0) > 0 && currentTime < seekable.start(0) - this.liveRangeSafeTimeDelta) {\n return true;\n }\n return false;\n }\n }, {\n key: \"videoUnderflow_\",\n value: function videoUnderflow_(_ref66) {\n var videoBuffered = _ref66.videoBuffered,\n audioBuffered = _ref66.audioBuffered,\n currentTime = _ref66.currentTime;\n // audio only content will not have video underflow :)\n if (!videoBuffered) {\n return;\n }\n var gap; // find a gap in demuxed content.\n\n if (videoBuffered.length && audioBuffered.length) {\n // in Chrome audio will continue to play for ~3s when we run out of video\n // so we have to check that the video buffer did have some buffer in the\n // past.\n var lastVideoRange = findRange(videoBuffered, currentTime - 3);\n var videoRange = findRange(videoBuffered, currentTime);\n var audioRange = findRange(audioBuffered, currentTime);\n if (audioRange.length && !videoRange.length && lastVideoRange.length) {\n gap = {\n start: lastVideoRange.end(0),\n end: audioRange.end(0)\n };\n } // find a gap in muxed content.\n } else {\n var nextRange = findNextRange(videoBuffered, currentTime); // Even if there is no available next range, there is still a possibility we are\n // stuck in a gap due to video underflow.\n\n if (!nextRange.length) {\n gap = this.gapFromVideoUnderflow_(videoBuffered, currentTime);\n }\n }\n if (gap) {\n this.logger_(\"Encountered a gap in video from \".concat(gap.start, \" to \").concat(gap.end, \". \") + \"Seeking to current time \".concat(currentTime));\n return true;\n }\n return false;\n }\n /**\n * Timer callback. If playback still has not proceeded, then we seek\n * to the start of the next buffered region.\n *\n * @private\n */\n }, {\n key: \"skipTheGap_\",\n value: function skipTheGap_(scheduledCurrentTime) {\n var buffered = this.tech_.buffered();\n var currentTime = this.tech_.currentTime();\n var nextRange = findNextRange(buffered, currentTime);\n this.resetTimeUpdate_();\n if (nextRange.length === 0 || currentTime !== scheduledCurrentTime) {\n return;\n }\n this.logger_('skipTheGap_:', 'currentTime:', currentTime, 'scheduled currentTime:', scheduledCurrentTime, 'nextRange start:', nextRange.start(0)); // only seek if we still have not played\n\n this.tech_.setCurrentTime(nextRange.start(0) + TIME_FUDGE_FACTOR);\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-gap-skip'\n });\n }\n }, {\n key: \"gapFromVideoUnderflow_\",\n value: function gapFromVideoUnderflow_(buffered, currentTime) {\n // At least in Chrome, if there is a gap in the video buffer, the audio will continue\n // playing for ~3 seconds after the video gap starts. This is done to account for\n // video buffer underflow/underrun (note that this is not done when there is audio\n // buffer underflow/underrun -- in that case the video will stop as soon as it\n // encounters the gap, as audio stalls are more noticeable/jarring to a user than\n // video stalls). The player's time will reflect the playthrough of audio, so the\n // time will appear as if we are in a buffered region, even if we are stuck in a\n // \"gap.\"\n //\n // Example:\n // video buffer: 0 => 10.1, 10.2 => 20\n // audio buffer: 0 => 20\n // overall buffer: 0 => 10.1, 10.2 => 20\n // current time: 13\n //\n // Chrome's video froze at 10 seconds, where the video buffer encountered the gap,\n // however, the audio continued playing until it reached ~3 seconds past the gap\n // (13 seconds), at which point it stops as well. Since current time is past the\n // gap, findNextRange will return no ranges.\n //\n // To check for this issue, we see if there is a gap that starts somewhere within\n // a 3 second range (3 seconds +/- 1 second) back from our current time.\n var gaps = findGaps(buffered);\n for (var _i117 = 0; _i117 < gaps.length; _i117++) {\n var start = gaps.start(_i117);\n var end = gaps.end(_i117); // gap is starts no more than 4 seconds back\n\n if (currentTime - start < 4 && currentTime - start > 2) {\n return {\n start: start,\n end: end\n };\n }\n }\n return null;\n }\n }]);\n return PlaybackWatcher;\n}();\nvar defaultOptions = {\n errorInterval: 30,\n getSource: function getSource(next) {\n var tech = this.tech({\n IWillNotUseThisInPlugins: true\n });\n var sourceObj = tech.currentSource_ || this.currentSource();\n return next(sourceObj);\n }\n};\n/**\n * Main entry point for the plugin\n *\n * @param {Player} player a reference to a videojs Player instance\n * @param {Object} [options] an object with plugin options\n * @private\n */\n\nvar initPlugin = function initPlugin(player, options) {\n var lastCalled = 0;\n var seekTo = 0;\n var localOptions = merge(defaultOptions, options);\n player.ready(function () {\n player.trigger({\n type: 'usage',\n name: 'vhs-error-reload-initialized'\n });\n });\n /**\n * Player modifications to perform that must wait until `loadedmetadata`\n * has been triggered\n *\n * @private\n */\n\n var loadedMetadataHandler = function loadedMetadataHandler() {\n if (seekTo) {\n player.currentTime(seekTo);\n }\n };\n /**\n * Set the source on the player element, play, and seek if necessary\n *\n * @param {Object} sourceObj An object specifying the source url and mime-type to play\n * @private\n */\n\n var setSource = function setSource(sourceObj) {\n if (sourceObj === null || sourceObj === undefined) {\n return;\n }\n seekTo = player.duration() !== Infinity && player.currentTime() || 0;\n player.one('loadedmetadata', loadedMetadataHandler);\n player.src(sourceObj);\n player.trigger({\n type: 'usage',\n name: 'vhs-error-reload'\n });\n player.play();\n };\n /**\n * Attempt to get a source from either the built-in getSource function\n * or a custom function provided via the options\n *\n * @private\n */\n\n var errorHandler = function errorHandler() {\n // Do not attempt to reload the source if a source-reload occurred before\n // 'errorInterval' time has elapsed since the last source-reload\n if (Date.now() - lastCalled < localOptions.errorInterval * 1000) {\n player.trigger({\n type: 'usage',\n name: 'vhs-error-reload-canceled'\n });\n return;\n }\n if (!localOptions.getSource || typeof localOptions.getSource !== 'function') {\n videojs.log.error('ERROR: reloadSourceOnError - The option getSource must be a function!');\n return;\n }\n lastCalled = Date.now();\n return localOptions.getSource.call(player, setSource);\n };\n /**\n * Unbind any event handlers that were bound by the plugin\n *\n * @private\n */\n\n var cleanupEvents = function cleanupEvents() {\n player.off('loadedmetadata', loadedMetadataHandler);\n player.off('error', errorHandler);\n player.off('dispose', cleanupEvents);\n };\n /**\n * Cleanup before re-initializing the plugin\n *\n * @param {Object} [newOptions] an object with plugin options\n * @private\n */\n\n var reinitPlugin = function reinitPlugin(newOptions) {\n cleanupEvents();\n initPlugin(player, newOptions);\n };\n player.on('error', errorHandler);\n player.on('dispose', cleanupEvents); // Overwrite the plugin function so that we can correctly cleanup before\n // initializing the plugin\n\n player.reloadSourceOnError = reinitPlugin;\n};\n/**\n * Reload the source when an error is detected as long as there\n * wasn't an error previously within the last 30 seconds\n *\n * @param {Object} [options] an object with plugin options\n */\n\nvar reloadSourceOnError = function reloadSourceOnError(options) {\n initPlugin(this, options);\n};\nvar version$4 = \"3.7.0\";\nvar version$3 = \"7.0.1\";\nvar version$2 = \"1.2.2\";\nvar version$1 = \"7.1.0\";\nvar _version = \"4.0.1\";\n\n/**\n * @file videojs-http-streaming.js\n *\n * The main file for the VHS project.\n * License: https://github.com/videojs/videojs-http-streaming/blob/main/LICENSE\n */\nvar Vhs = {\n PlaylistLoader: PlaylistLoader,\n Playlist: Playlist,\n utils: utils,\n STANDARD_PLAYLIST_SELECTOR: lastBandwidthSelector,\n INITIAL_PLAYLIST_SELECTOR: lowestBitrateCompatibleVariantSelector,\n lastBandwidthSelector: lastBandwidthSelector,\n movingAverageBandwidthSelector: movingAverageBandwidthSelector,\n comparePlaylistBandwidth: comparePlaylistBandwidth,\n comparePlaylistResolution: comparePlaylistResolution,\n xhr: xhrFactory()\n}; // Define getter/setters for config properties\n\nObject.keys(Config).forEach(function (prop) {\n Object.defineProperty(Vhs, prop, {\n get: function get() {\n videojs.log.warn(\"using Vhs.\".concat(prop, \" is UNSAFE be sure you know what you are doing\"));\n return Config[prop];\n },\n set: function set(value) {\n videojs.log.warn(\"using Vhs.\".concat(prop, \" is UNSAFE be sure you know what you are doing\"));\n if (typeof value !== 'number' || value < 0) {\n videojs.log.warn(\"value of Vhs.\".concat(prop, \" must be greater than or equal to 0\"));\n return;\n }\n Config[prop] = value;\n }\n });\n});\nvar LOCAL_STORAGE_KEY = 'videojs-vhs';\n/**\n * Updates the selectedIndex of the QualityLevelList when a mediachange happens in vhs.\n *\n * @param {QualityLevelList} qualityLevels The QualityLevelList to update.\n * @param {PlaylistLoader} playlistLoader PlaylistLoader containing the new media info.\n * @function handleVhsMediaChange\n */\n\nvar handleVhsMediaChange = function handleVhsMediaChange(qualityLevels, playlistLoader) {\n var newPlaylist = playlistLoader.media();\n var selectedIndex = -1;\n for (var _i118 = 0; _i118 < qualityLevels.length; _i118++) {\n if (qualityLevels[_i118].id === newPlaylist.id) {\n selectedIndex = _i118;\n break;\n }\n }\n qualityLevels.selectedIndex_ = selectedIndex;\n qualityLevels.trigger({\n selectedIndex: selectedIndex,\n type: 'change'\n });\n};\n/**\n * Adds quality levels to list once playlist metadata is available\n *\n * @param {QualityLevelList} qualityLevels The QualityLevelList to attach events to.\n * @param {Object} vhs Vhs object to listen to for media events.\n * @function handleVhsLoadedMetadata\n */\n\nvar handleVhsLoadedMetadata = function handleVhsLoadedMetadata(qualityLevels, vhs) {\n vhs.representations().forEach(function (rep) {\n qualityLevels.addQualityLevel(rep);\n });\n handleVhsMediaChange(qualityLevels, vhs.playlists);\n}; // VHS is a source handler, not a tech. Make sure attempts to use it\n// as one do not cause exceptions.\n\nVhs.canPlaySource = function () {\n return videojs.log.warn('VHS is no longer a tech. Please remove it from ' + 'your player\\'s techOrder.');\n};\nvar emeKeySystems = function emeKeySystems(keySystemOptions, mainPlaylist, audioPlaylist) {\n if (!keySystemOptions) {\n return keySystemOptions;\n }\n var codecs = {};\n if (mainPlaylist && mainPlaylist.attributes && mainPlaylist.attributes.CODECS) {\n codecs = unwrapCodecList(parseCodecs(mainPlaylist.attributes.CODECS));\n }\n if (audioPlaylist && audioPlaylist.attributes && audioPlaylist.attributes.CODECS) {\n codecs.audio = audioPlaylist.attributes.CODECS;\n }\n var videoContentType = getMimeForCodec(codecs.video);\n var audioContentType = getMimeForCodec(codecs.audio); // upsert the content types based on the selected playlist\n\n var keySystemContentTypes = {};\n for (var keySystem in keySystemOptions) {\n keySystemContentTypes[keySystem] = {};\n if (audioContentType) {\n keySystemContentTypes[keySystem].audioContentType = audioContentType;\n }\n if (videoContentType) {\n keySystemContentTypes[keySystem].videoContentType = videoContentType;\n } // Default to using the video playlist's PSSH even though they may be different, as\n // videojs-contrib-eme will only accept one in the options.\n //\n // This shouldn't be an issue for most cases as early intialization will handle all\n // unique PSSH values, and if they aren't, then encrypted events should have the\n // specific information needed for the unique license.\n\n if (mainPlaylist.contentProtection && mainPlaylist.contentProtection[keySystem] && mainPlaylist.contentProtection[keySystem].pssh) {\n keySystemContentTypes[keySystem].pssh = mainPlaylist.contentProtection[keySystem].pssh;\n } // videojs-contrib-eme accepts the option of specifying: 'com.some.cdm': 'url'\n // so we need to prevent overwriting the URL entirely\n\n if (typeof keySystemOptions[keySystem] === 'string') {\n keySystemContentTypes[keySystem].url = keySystemOptions[keySystem];\n }\n }\n return merge(keySystemOptions, keySystemContentTypes);\n};\n/**\n * @typedef {Object} KeySystems\n *\n * keySystems configuration for https://github.com/videojs/videojs-contrib-eme\n * Note: not all options are listed here.\n *\n * @property {Uint8Array} [pssh]\n * Protection System Specific Header\n */\n\n/**\n * Goes through all the playlists and collects an array of KeySystems options objects\n * containing each playlist's keySystems and their pssh values, if available.\n *\n * @param {Object[]} playlists\n * The playlists to look through\n * @param {string[]} keySystems\n * The keySystems to collect pssh values for\n *\n * @return {KeySystems[]}\n * An array of KeySystems objects containing available key systems and their\n * pssh values\n */\n\nvar getAllPsshKeySystemsOptions = function getAllPsshKeySystemsOptions(playlists, keySystems) {\n return playlists.reduce(function (keySystemsArr, playlist) {\n if (!playlist.contentProtection) {\n return keySystemsArr;\n }\n var keySystemsOptions = keySystems.reduce(function (keySystemsObj, keySystem) {\n var keySystemOptions = playlist.contentProtection[keySystem];\n if (keySystemOptions && keySystemOptions.pssh) {\n keySystemsObj[keySystem] = {\n pssh: keySystemOptions.pssh\n };\n }\n return keySystemsObj;\n }, {});\n if (Object.keys(keySystemsOptions).length) {\n keySystemsArr.push(keySystemsOptions);\n }\n return keySystemsArr;\n }, []);\n};\n/**\n * Returns a promise that waits for the\n * [eme plugin](https://github.com/videojs/videojs-contrib-eme) to create a key session.\n *\n * Works around https://bugs.chromium.org/p/chromium/issues/detail?id=895449 in non-IE11\n * browsers.\n *\n * As per the above ticket, this is particularly important for Chrome, where, if\n * unencrypted content is appended before encrypted content and the key session has not\n * been created, a MEDIA_ERR_DECODE will be thrown once the encrypted content is reached\n * during playback.\n *\n * @param {Object} player\n * The player instance\n * @param {Object[]} sourceKeySystems\n * The key systems options from the player source\n * @param {Object} [audioMedia]\n * The active audio media playlist (optional)\n * @param {Object[]} mainPlaylists\n * The playlists found on the main playlist object\n *\n * @return {Object}\n * Promise that resolves when the key session has been created\n */\n\nvar waitForKeySessionCreation = function waitForKeySessionCreation(_ref67) {\n var player = _ref67.player,\n sourceKeySystems = _ref67.sourceKeySystems,\n audioMedia = _ref67.audioMedia,\n mainPlaylists = _ref67.mainPlaylists;\n if (!player.eme.initializeMediaKeys) {\n return Promise.resolve();\n } // TODO should all audio PSSH values be initialized for DRM?\n //\n // All unique video rendition pssh values are initialized for DRM, but here only\n // the initial audio playlist license is initialized. In theory, an encrypted\n // event should be fired if the user switches to an alternative audio playlist\n // where a license is required, but this case hasn't yet been tested. In addition, there\n // may be many alternate audio playlists unlikely to be used (e.g., multiple different\n // languages).\n\n var playlists = audioMedia ? mainPlaylists.concat([audioMedia]) : mainPlaylists;\n var keySystemsOptionsArr = getAllPsshKeySystemsOptions(playlists, Object.keys(sourceKeySystems));\n var initializationFinishedPromises = [];\n var keySessionCreatedPromises = []; // Since PSSH values are interpreted as initData, EME will dedupe any duplicates. The\n // only place where it should not be deduped is for ms-prefixed APIs, but\n // the existence of modern EME APIs in addition to\n // ms-prefixed APIs on Edge should prevent this from being a concern.\n // initializeMediaKeys also won't use the webkit-prefixed APIs.\n\n keySystemsOptionsArr.forEach(function (keySystemsOptions) {\n keySessionCreatedPromises.push(new Promise(function (resolve, reject) {\n player.tech_.one('keysessioncreated', resolve);\n }));\n initializationFinishedPromises.push(new Promise(function (resolve, reject) {\n player.eme.initializeMediaKeys({\n keySystems: keySystemsOptions\n }, function (err) {\n if (err) {\n reject(err);\n return;\n }\n resolve();\n });\n }));\n }); // The reasons Promise.race is chosen over Promise.any:\n //\n // * Promise.any is only available in Safari 14+.\n // * None of these promises are expected to reject. If they do reject, it might be\n // better here for the race to surface the rejection, rather than mask it by using\n // Promise.any.\n\n return Promise.race([\n // If a session was previously created, these will all finish resolving without\n // creating a new session, otherwise it will take until the end of all license\n // requests, which is why the key session check is used (to make setup much faster).\n Promise.all(initializationFinishedPromises),\n // Once a single session is created, the browser knows DRM will be used.\n Promise.race(keySessionCreatedPromises)]);\n};\n/**\n * If the [eme](https://github.com/videojs/videojs-contrib-eme) plugin is available, and\n * there are keySystems on the source, sets up source options to prepare the source for\n * eme.\n *\n * @param {Object} player\n * The player instance\n * @param {Object[]} sourceKeySystems\n * The key systems options from the player source\n * @param {Object} media\n * The active media playlist\n * @param {Object} [audioMedia]\n * The active audio media playlist (optional)\n *\n * @return {boolean}\n * Whether or not options were configured and EME is available\n */\n\nvar setupEmeOptions = function setupEmeOptions(_ref68) {\n var player = _ref68.player,\n sourceKeySystems = _ref68.sourceKeySystems,\n media = _ref68.media,\n audioMedia = _ref68.audioMedia;\n var sourceOptions = emeKeySystems(sourceKeySystems, media, audioMedia);\n if (!sourceOptions) {\n return false;\n }\n player.currentSource().keySystems = sourceOptions; // eme handles the rest of the setup, so if it is missing\n // do nothing.\n\n if (sourceOptions && !player.eme) {\n videojs.log.warn('DRM encrypted source cannot be decrypted without a DRM plugin');\n return false;\n }\n return true;\n};\nvar getVhsLocalStorage = function getVhsLocalStorage() {\n if (!window$1.localStorage) {\n return null;\n }\n var storedObject = window$1.localStorage.getItem(LOCAL_STORAGE_KEY);\n if (!storedObject) {\n return null;\n }\n try {\n return JSON.parse(storedObject);\n } catch (e) {\n // someone may have tampered with the value\n return null;\n }\n};\nvar updateVhsLocalStorage = function updateVhsLocalStorage(options) {\n if (!window$1.localStorage) {\n return false;\n }\n var objectToStore = getVhsLocalStorage();\n objectToStore = objectToStore ? merge(objectToStore, options) : options;\n try {\n window$1.localStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(objectToStore));\n } catch (e) {\n // Throws if storage is full (e.g., always on iOS 5+ Safari private mode, where\n // storage is set to 0).\n // https://developer.mozilla.org/en-US/docs/Web/API/Storage/setItem#Exceptions\n // No need to perform any operation.\n return false;\n }\n return objectToStore;\n};\n/**\n * Parses VHS-supported media types from data URIs. See\n * https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs\n * for information on data URIs.\n *\n * @param {string} dataUri\n * The data URI\n *\n * @return {string|Object}\n * The parsed object/string, or the original string if no supported media type\n * was found\n */\n\nvar expandDataUri = function expandDataUri(dataUri) {\n if (dataUri.toLowerCase().indexOf('data:application/vnd.videojs.vhs+json,') === 0) {\n return JSON.parse(dataUri.substring(dataUri.indexOf(',') + 1));\n } // no known case for this data URI, return the string as-is\n\n return dataUri;\n};\n/**\n * Adds a request hook to an xhr object\n *\n * @param {Object} xhr object to add the onRequest hook to\n * @param {function} callback hook function for an xhr request\n */\n\nvar addOnRequestHook = function addOnRequestHook(xhr, callback) {\n if (!xhr._requestCallbackSet) {\n xhr._requestCallbackSet = new Set();\n }\n xhr._requestCallbackSet.add(callback);\n};\n/**\n * Adds a response hook to an xhr object\n *\n * @param {Object} xhr object to add the onResponse hook to\n * @param {function} callback hook function for an xhr response\n */\n\nvar addOnResponseHook = function addOnResponseHook(xhr, callback) {\n if (!xhr._responseCallbackSet) {\n xhr._responseCallbackSet = new Set();\n }\n xhr._responseCallbackSet.add(callback);\n};\n/**\n * Removes a request hook on an xhr object, deletes the onRequest set if empty.\n *\n * @param {Object} xhr object to remove the onRequest hook from\n * @param {function} callback hook function to remove\n */\n\nvar removeOnRequestHook = function removeOnRequestHook(xhr, callback) {\n if (!xhr._requestCallbackSet) {\n return;\n }\n xhr._requestCallbackSet[\"delete\"](callback);\n if (!xhr._requestCallbackSet.size) {\n delete xhr._requestCallbackSet;\n }\n};\n/**\n * Removes a response hook on an xhr object, deletes the onResponse set if empty.\n *\n * @param {Object} xhr object to remove the onResponse hook from\n * @param {function} callback hook function to remove\n */\n\nvar removeOnResponseHook = function removeOnResponseHook(xhr, callback) {\n if (!xhr._responseCallbackSet) {\n return;\n }\n xhr._responseCallbackSet[\"delete\"](callback);\n if (!xhr._responseCallbackSet.size) {\n delete xhr._responseCallbackSet;\n }\n};\n/**\n * Whether the browser has built-in HLS support.\n */\n\nVhs.supportsNativeHls = function () {\n if (!document || !document.createElement) {\n return false;\n }\n var video = document.createElement('video'); // native HLS is definitely not supported if HTML5 video isn't\n\n if (!videojs.getTech('Html5').isSupported()) {\n return false;\n } // HLS manifests can go by many mime-types\n\n var canPlay = [\n // Apple santioned\n 'application/vnd.apple.mpegurl',\n // Apple sanctioned for backwards compatibility\n 'audio/mpegurl',\n // Very common\n 'audio/x-mpegurl',\n // Very common\n 'application/x-mpegurl',\n // Included for completeness\n 'video/x-mpegurl', 'video/mpegurl', 'application/mpegurl'];\n return canPlay.some(function (canItPlay) {\n return /maybe|probably/i.test(video.canPlayType(canItPlay));\n });\n}();\nVhs.supportsNativeDash = function () {\n if (!document || !document.createElement || !videojs.getTech('Html5').isSupported()) {\n return false;\n }\n return /maybe|probably/i.test(document.createElement('video').canPlayType('application/dash+xml'));\n}();\nVhs.supportsTypeNatively = function (type) {\n if (type === 'hls') {\n return Vhs.supportsNativeHls;\n }\n if (type === 'dash') {\n return Vhs.supportsNativeDash;\n }\n return false;\n};\n/**\n * VHS is a source handler, not a tech. Make sure attempts to use it\n * as one do not cause exceptions.\n */\n\nVhs.isSupported = function () {\n return videojs.log.warn('VHS is no longer a tech. Please remove it from ' + 'your player\\'s techOrder.');\n};\n/**\n * A global function for setting an onRequest hook\n *\n * @param {function} callback for request modifiction\n */\n\nVhs.xhr.onRequest = function (callback) {\n addOnRequestHook(Vhs.xhr, callback);\n};\n/**\n * A global function for setting an onResponse hook\n *\n * @param {callback} callback for response data retrieval\n */\n\nVhs.xhr.onResponse = function (callback) {\n addOnResponseHook(Vhs.xhr, callback);\n};\n/**\n * Deletes a global onRequest callback if it exists\n *\n * @param {function} callback to delete from the global set\n */\n\nVhs.xhr.offRequest = function (callback) {\n removeOnRequestHook(Vhs.xhr, callback);\n};\n/**\n * Deletes a global onResponse callback if it exists\n *\n * @param {function} callback to delete from the global set\n */\n\nVhs.xhr.offResponse = function (callback) {\n removeOnResponseHook(Vhs.xhr, callback);\n};\nvar Component = videojs.getComponent('Component');\n/**\n * The Vhs Handler object, where we orchestrate all of the parts\n * of VHS to interact with video.js\n *\n * @class VhsHandler\n * @extends videojs.Component\n * @param {Object} source the soruce object\n * @param {Tech} tech the parent tech object\n * @param {Object} options optional and required options\n */\nvar VhsHandler = /*#__PURE__*/function (_Component) {\n _inherits(VhsHandler, _Component);\n var _super87 = _createSuper(VhsHandler);\n function VhsHandler(source, tech, options) {\n var _this184;\n _classCallCheck(this, VhsHandler);\n _this184 = _super87.call(this, tech, options.vhs); // if a tech level `initialBandwidth` option was passed\n // use that over the VHS level `bandwidth` option\n\n if (typeof options.initialBandwidth === 'number') {\n _this184.options_.bandwidth = options.initialBandwidth;\n }\n _this184.logger_ = logger('VhsHandler'); // we need access to the player in some cases,\n // so, get it from Video.js via the `playerId`\n\n if (tech.options_ && tech.options_.playerId) {\n var _player = videojs.getPlayer(tech.options_.playerId);\n _this184.player_ = _player;\n }\n _this184.tech_ = tech;\n _this184.source_ = source;\n _this184.stats = {};\n _this184.ignoreNextSeekingEvent_ = false;\n _this184.setOptions_();\n if (_this184.options_.overrideNative && tech.overrideNativeAudioTracks && tech.overrideNativeVideoTracks) {\n tech.overrideNativeAudioTracks(true);\n tech.overrideNativeVideoTracks(true);\n } else if (_this184.options_.overrideNative && (tech.featuresNativeVideoTracks || tech.featuresNativeAudioTracks)) {\n // overriding native VHS only works if audio tracks have been emulated\n // error early if we're misconfigured\n throw new Error('Overriding native VHS requires emulated tracks. ' + 'See https://git.io/vMpjB');\n } // listen for fullscreenchange events for this player so that we\n // can adjust our quality selection quickly\n\n _this184.on(document, ['fullscreenchange', 'webkitfullscreenchange', 'mozfullscreenchange', 'MSFullscreenChange'], function (event) {\n var fullscreenElement = document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement;\n if (fullscreenElement && fullscreenElement.contains(_this184.tech_.el())) {\n _this184.playlistController_.fastQualityChange_();\n } else {\n // When leaving fullscreen, since the in page pixel dimensions should be smaller\n // than full screen, see if there should be a rendition switch down to preserve\n // bandwidth.\n _this184.playlistController_.checkABR_();\n }\n });\n _this184.on(_this184.tech_, 'seeking', function () {\n if (this.ignoreNextSeekingEvent_) {\n this.ignoreNextSeekingEvent_ = false;\n return;\n }\n this.setCurrentTime(this.tech_.currentTime());\n });\n _this184.on(_this184.tech_, 'error', function () {\n // verify that the error was real and we are loaded\n // enough to have pc loaded.\n if (this.tech_.error() && this.playlistController_) {\n this.playlistController_.pauseLoading();\n }\n });\n _this184.on(_this184.tech_, 'play', _this184.play);\n return _this184;\n }\n _createClass(VhsHandler, [{\n key: \"setOptions_\",\n value: function setOptions_() {\n var _this185 = this;\n // defaults\n this.options_.withCredentials = this.options_.withCredentials || false;\n this.options_.limitRenditionByPlayerDimensions = this.options_.limitRenditionByPlayerDimensions === false ? false : true;\n this.options_.useDevicePixelRatio = this.options_.useDevicePixelRatio || false;\n this.options_.useBandwidthFromLocalStorage = typeof this.source_.useBandwidthFromLocalStorage !== 'undefined' ? this.source_.useBandwidthFromLocalStorage : this.options_.useBandwidthFromLocalStorage || false;\n this.options_.useForcedSubtitles = this.options_.useForcedSubtitles || false;\n this.options_.useNetworkInformationApi = this.options_.useNetworkInformationApi || false;\n this.options_.useDtsForTimestampOffset = this.options_.useDtsForTimestampOffset || false;\n this.options_.calculateTimestampOffsetForEachSegment = this.options_.calculateTimestampOffsetForEachSegment || false;\n this.options_.customTagParsers = this.options_.customTagParsers || [];\n this.options_.customTagMappers = this.options_.customTagMappers || [];\n this.options_.cacheEncryptionKeys = this.options_.cacheEncryptionKeys || false;\n this.options_.llhls = this.options_.llhls === false ? false : true;\n this.options_.bufferBasedABR = this.options_.bufferBasedABR || false;\n if (typeof this.options_.playlistExclusionDuration !== 'number') {\n this.options_.playlistExclusionDuration = 60;\n }\n if (typeof this.options_.bandwidth !== 'number') {\n if (this.options_.useBandwidthFromLocalStorage) {\n var storedObject = getVhsLocalStorage();\n if (storedObject && storedObject.bandwidth) {\n this.options_.bandwidth = storedObject.bandwidth;\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-bandwidth-from-local-storage'\n });\n }\n if (storedObject && storedObject.throughput) {\n this.options_.throughput = storedObject.throughput;\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-throughput-from-local-storage'\n });\n }\n }\n } // if bandwidth was not set by options or pulled from local storage, start playlist\n // selection at a reasonable bandwidth\n\n if (typeof this.options_.bandwidth !== 'number') {\n this.options_.bandwidth = Config.INITIAL_BANDWIDTH;\n } // If the bandwidth number is unchanged from the initial setting\n // then this takes precedence over the enableLowInitialPlaylist option\n\n this.options_.enableLowInitialPlaylist = this.options_.enableLowInitialPlaylist && this.options_.bandwidth === Config.INITIAL_BANDWIDTH; // grab options passed to player.src\n\n ['withCredentials', 'useDevicePixelRatio', 'limitRenditionByPlayerDimensions', 'bandwidth', 'customTagParsers', 'customTagMappers', 'cacheEncryptionKeys', 'playlistSelector', 'initialPlaylistSelector', 'bufferBasedABR', 'liveRangeSafeTimeDelta', 'llhls', 'useForcedSubtitles', 'useNetworkInformationApi', 'useDtsForTimestampOffset', 'calculateTimestampOffsetForEachSegment', 'exactManifestTimings', 'leastPixelDiffSelector'].forEach(function (option) {\n if (typeof _this185.source_[option] !== 'undefined') {\n _this185.options_[option] = _this185.source_[option];\n }\n });\n this.limitRenditionByPlayerDimensions = this.options_.limitRenditionByPlayerDimensions;\n this.useDevicePixelRatio = this.options_.useDevicePixelRatio;\n }\n /**\n * called when player.src gets called, handle a new source\n *\n * @param {Object} src the source object to handle\n */\n }, {\n key: \"src\",\n value: function src(_src3, type) {\n var _this186 = this;\n // do nothing if the src is falsey\n if (!_src3) {\n return;\n }\n this.setOptions_(); // add main playlist controller options\n\n this.options_.src = expandDataUri(this.source_.src);\n this.options_.tech = this.tech_;\n this.options_.externVhs = Vhs;\n this.options_.sourceType = simpleTypeFromSourceType(type); // Whenever we seek internally, we should update the tech\n\n this.options_.seekTo = function (time) {\n _this186.tech_.setCurrentTime(time);\n };\n this.playlistController_ = new PlaylistController(this.options_);\n var playbackWatcherOptions = merge({\n liveRangeSafeTimeDelta: SAFE_TIME_DELTA\n }, this.options_, {\n seekable: function seekable() {\n return _this186.seekable();\n },\n media: function media() {\n return _this186.playlistController_.media();\n },\n playlistController: this.playlistController_\n });\n this.playbackWatcher_ = new PlaybackWatcher(playbackWatcherOptions);\n this.playlistController_.on('error', function () {\n var player = videojs.players[_this186.tech_.options_.playerId];\n var error = _this186.playlistController_.error;\n if (_typeof(error) === 'object' && !error.code) {\n error.code = 3;\n } else if (typeof error === 'string') {\n error = {\n message: error,\n code: 3\n };\n }\n player.error(error);\n });\n var defaultSelector = this.options_.bufferBasedABR ? Vhs.movingAverageBandwidthSelector(0.55) : Vhs.STANDARD_PLAYLIST_SELECTOR; // `this` in selectPlaylist should be the VhsHandler for backwards\n // compatibility with < v2\n\n this.playlistController_.selectPlaylist = this.selectPlaylist ? this.selectPlaylist.bind(this) : defaultSelector.bind(this);\n this.playlistController_.selectInitialPlaylist = Vhs.INITIAL_PLAYLIST_SELECTOR.bind(this); // re-expose some internal objects for backwards compatibility with < v2\n\n this.playlists = this.playlistController_.mainPlaylistLoader_;\n this.mediaSource = this.playlistController_.mediaSource; // Proxy assignment of some properties to the main playlist\n // controller. Using a custom property for backwards compatibility\n // with < v2\n\n Object.defineProperties(this, {\n selectPlaylist: {\n get: function get() {\n return this.playlistController_.selectPlaylist;\n },\n set: function set(selectPlaylist) {\n this.playlistController_.selectPlaylist = selectPlaylist.bind(this);\n }\n },\n throughput: {\n get: function get() {\n return this.playlistController_.mainSegmentLoader_.throughput.rate;\n },\n set: function set(throughput) {\n this.playlistController_.mainSegmentLoader_.throughput.rate = throughput; // By setting `count` to 1 the throughput value becomes the starting value\n // for the cumulative average\n\n this.playlistController_.mainSegmentLoader_.throughput.count = 1;\n }\n },\n bandwidth: {\n get: function get() {\n var playerBandwidthEst = this.playlistController_.mainSegmentLoader_.bandwidth;\n var networkInformation = window$1.navigator.connection || window$1.navigator.mozConnection || window$1.navigator.webkitConnection;\n var tenMbpsAsBitsPerSecond = 10e6;\n if (this.options_.useNetworkInformationApi && networkInformation) {\n // downlink returns Mbps\n // https://developer.mozilla.org/en-US/docs/Web/API/NetworkInformation/downlink\n var networkInfoBandwidthEstBitsPerSec = networkInformation.downlink * 1000 * 1000; // downlink maxes out at 10 Mbps. In the event that both networkInformationApi and the player\n // estimate a bandwidth greater than 10 Mbps, use the larger of the two estimates to ensure that\n // high quality streams are not filtered out.\n\n if (networkInfoBandwidthEstBitsPerSec >= tenMbpsAsBitsPerSecond && playerBandwidthEst >= tenMbpsAsBitsPerSecond) {\n playerBandwidthEst = Math.max(playerBandwidthEst, networkInfoBandwidthEstBitsPerSec);\n } else {\n playerBandwidthEst = networkInfoBandwidthEstBitsPerSec;\n }\n }\n return playerBandwidthEst;\n },\n set: function set(bandwidth) {\n this.playlistController_.mainSegmentLoader_.bandwidth = bandwidth; // setting the bandwidth manually resets the throughput counter\n // `count` is set to zero that current value of `rate` isn't included\n // in the cumulative average\n\n this.playlistController_.mainSegmentLoader_.throughput = {\n rate: 0,\n count: 0\n };\n }\n },\n /**\n * `systemBandwidth` is a combination of two serial processes bit-rates. The first\n * is the network bitrate provided by `bandwidth` and the second is the bitrate of\n * the entire process after that - decryption, transmuxing, and appending - provided\n * by `throughput`.\n *\n * Since the two process are serial, the overall system bandwidth is given by:\n * sysBandwidth = 1 / (1 / bandwidth + 1 / throughput)\n */\n systemBandwidth: {\n get: function get() {\n var invBandwidth = 1 / (this.bandwidth || 1);\n var invThroughput;\n if (this.throughput > 0) {\n invThroughput = 1 / this.throughput;\n } else {\n invThroughput = 0;\n }\n var systemBitrate = Math.floor(1 / (invBandwidth + invThroughput));\n return systemBitrate;\n },\n set: function set() {\n videojs.log.error('The \"systemBandwidth\" property is read-only');\n }\n }\n });\n if (this.options_.bandwidth) {\n this.bandwidth = this.options_.bandwidth;\n }\n if (this.options_.throughput) {\n this.throughput = this.options_.throughput;\n }\n Object.defineProperties(this.stats, {\n bandwidth: {\n get: function get() {\n return _this186.bandwidth || 0;\n },\n enumerable: true\n },\n mediaRequests: {\n get: function get() {\n return _this186.playlistController_.mediaRequests_() || 0;\n },\n enumerable: true\n },\n mediaRequestsAborted: {\n get: function get() {\n return _this186.playlistController_.mediaRequestsAborted_() || 0;\n },\n enumerable: true\n },\n mediaRequestsTimedout: {\n get: function get() {\n return _this186.playlistController_.mediaRequestsTimedout_() || 0;\n },\n enumerable: true\n },\n mediaRequestsErrored: {\n get: function get() {\n return _this186.playlistController_.mediaRequestsErrored_() || 0;\n },\n enumerable: true\n },\n mediaTransferDuration: {\n get: function get() {\n return _this186.playlistController_.mediaTransferDuration_() || 0;\n },\n enumerable: true\n },\n mediaBytesTransferred: {\n get: function get() {\n return _this186.playlistController_.mediaBytesTransferred_() || 0;\n },\n enumerable: true\n },\n mediaSecondsLoaded: {\n get: function get() {\n return _this186.playlistController_.mediaSecondsLoaded_() || 0;\n },\n enumerable: true\n },\n mediaAppends: {\n get: function get() {\n return _this186.playlistController_.mediaAppends_() || 0;\n },\n enumerable: true\n },\n mainAppendsToLoadedData: {\n get: function get() {\n return _this186.playlistController_.mainAppendsToLoadedData_() || 0;\n },\n enumerable: true\n },\n audioAppendsToLoadedData: {\n get: function get() {\n return _this186.playlistController_.audioAppendsToLoadedData_() || 0;\n },\n enumerable: true\n },\n appendsToLoadedData: {\n get: function get() {\n return _this186.playlistController_.appendsToLoadedData_() || 0;\n },\n enumerable: true\n },\n timeToLoadedData: {\n get: function get() {\n return _this186.playlistController_.timeToLoadedData_() || 0;\n },\n enumerable: true\n },\n buffered: {\n get: function get() {\n return timeRangesToArray(_this186.tech_.buffered());\n },\n enumerable: true\n },\n currentTime: {\n get: function get() {\n return _this186.tech_.currentTime();\n },\n enumerable: true\n },\n currentSource: {\n get: function get() {\n return _this186.tech_.currentSource_;\n },\n enumerable: true\n },\n currentTech: {\n get: function get() {\n return _this186.tech_.name_;\n },\n enumerable: true\n },\n duration: {\n get: function get() {\n return _this186.tech_.duration();\n },\n enumerable: true\n },\n main: {\n get: function get() {\n return _this186.playlists.main;\n },\n enumerable: true\n },\n playerDimensions: {\n get: function get() {\n return _this186.tech_.currentDimensions();\n },\n enumerable: true\n },\n seekable: {\n get: function get() {\n return timeRangesToArray(_this186.tech_.seekable());\n },\n enumerable: true\n },\n timestamp: {\n get: function get() {\n return Date.now();\n },\n enumerable: true\n },\n videoPlaybackQuality: {\n get: function get() {\n return _this186.tech_.getVideoPlaybackQuality();\n },\n enumerable: true\n }\n });\n this.tech_.one('canplay', this.playlistController_.setupFirstPlay.bind(this.playlistController_));\n this.tech_.on('bandwidthupdate', function () {\n if (_this186.options_.useBandwidthFromLocalStorage) {\n updateVhsLocalStorage({\n bandwidth: _this186.bandwidth,\n throughput: Math.round(_this186.throughput)\n });\n }\n });\n this.playlistController_.on('selectedinitialmedia', function () {\n // Add the manual rendition mix-in to VhsHandler\n renditionSelectionMixin(_this186);\n });\n this.playlistController_.sourceUpdater_.on('createdsourcebuffers', function () {\n _this186.setupEme_();\n }); // the bandwidth of the primary segment loader is our best\n // estimate of overall bandwidth\n\n this.on(this.playlistController_, 'progress', function () {\n this.tech_.trigger('progress');\n }); // In the live case, we need to ignore the very first `seeking` event since\n // that will be the result of the seek-to-live behavior\n\n this.on(this.playlistController_, 'firstplay', function () {\n this.ignoreNextSeekingEvent_ = true;\n });\n this.setupQualityLevels_(); // do nothing if the tech has been disposed already\n // this can occur if someone sets the src in player.ready(), for instance\n\n if (!this.tech_.el()) {\n return;\n }\n this.mediaSourceUrl_ = window$1.URL.createObjectURL(this.playlistController_.mediaSource);\n this.tech_.src(this.mediaSourceUrl_);\n }\n }, {\n key: \"createKeySessions_\",\n value: function createKeySessions_() {\n var _this187 = this;\n var audioPlaylistLoader = this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;\n this.logger_('waiting for EME key session creation');\n waitForKeySessionCreation({\n player: this.player_,\n sourceKeySystems: this.source_.keySystems,\n audioMedia: audioPlaylistLoader && audioPlaylistLoader.media(),\n mainPlaylists: this.playlists.main.playlists\n }).then(function () {\n _this187.logger_('created EME key session');\n _this187.playlistController_.sourceUpdater_.initializedEme();\n })[\"catch\"](function (err) {\n _this187.logger_('error while creating EME key session', err);\n _this187.player_.error({\n message: 'Failed to initialize media keys for EME',\n code: 3\n });\n });\n }\n }, {\n key: \"handleWaitingForKey_\",\n value: function handleWaitingForKey_() {\n // If waitingforkey is fired, it's possible that the data that's necessary to retrieve\n // the key is in the manifest. While this should've happened on initial source load, it\n // may happen again in live streams where the keys change, and the manifest info\n // reflects the update.\n //\n // Because videojs-contrib-eme compares the PSSH data we send to that of PSSH data it's\n // already requested keys for, we don't have to worry about this generating extraneous\n // requests.\n this.logger_('waitingforkey fired, attempting to create any new key sessions');\n this.createKeySessions_();\n }\n /**\n * If necessary and EME is available, sets up EME options and waits for key session\n * creation.\n *\n * This function also updates the source updater so taht it can be used, as for some\n * browsers, EME must be configured before content is appended (if appending unencrypted\n * content before encrypted content).\n */\n }, {\n key: \"setupEme_\",\n value: function setupEme_() {\n var _this188 = this;\n var audioPlaylistLoader = this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;\n var didSetupEmeOptions = setupEmeOptions({\n player: this.player_,\n sourceKeySystems: this.source_.keySystems,\n media: this.playlists.media(),\n audioMedia: audioPlaylistLoader && audioPlaylistLoader.media()\n });\n this.player_.tech_.on('keystatuschange', function (e) {\n if (e.status !== 'output-restricted') {\n return;\n }\n var mainPlaylist = _this188.playlistController_.main();\n if (!mainPlaylist || !mainPlaylist.playlists) {\n return;\n }\n var excludedHDPlaylists = []; // Assume all HD streams are unplayable and exclude them from ABR selection\n\n mainPlaylist.playlists.forEach(function (playlist) {\n if (playlist && playlist.attributes && playlist.attributes.RESOLUTION && playlist.attributes.RESOLUTION.height >= 720) {\n if (!playlist.excludeUntil || playlist.excludeUntil < Infinity) {\n playlist.excludeUntil = Infinity;\n excludedHDPlaylists.push(playlist);\n }\n }\n });\n if (excludedHDPlaylists.length) {\n var _videojs$log;\n (_videojs$log = videojs.log).warn.apply(_videojs$log, ['DRM keystatus changed to \"output-restricted.\" Removing the following HD playlists ' + 'that will most likely fail to play and clearing the buffer. ' + 'This may be due to HDCP restrictions on the stream and the capabilities of the current device.'].concat(excludedHDPlaylists)); // Clear the buffer before switching playlists, since it may already contain unplayable segments\n\n _this188.playlistController_.mainSegmentLoader_.resetEverything();\n _this188.playlistController_.fastQualityChange_();\n }\n });\n this.handleWaitingForKey_ = this.handleWaitingForKey_.bind(this);\n this.player_.tech_.on('waitingforkey', this.handleWaitingForKey_);\n if (!didSetupEmeOptions) {\n // If EME options were not set up, we've done all we could to initialize EME.\n this.playlistController_.sourceUpdater_.initializedEme();\n return;\n }\n this.createKeySessions_();\n }\n /**\n * Initializes the quality levels and sets listeners to update them.\n *\n * @method setupQualityLevels_\n * @private\n */\n }, {\n key: \"setupQualityLevels_\",\n value: function setupQualityLevels_() {\n var _this189 = this;\n var player = videojs.players[this.tech_.options_.playerId]; // if there isn't a player or there isn't a qualityLevels plugin\n // or qualityLevels_ listeners have already been setup, do nothing.\n\n if (!player || !player.qualityLevels || this.qualityLevels_) {\n return;\n }\n this.qualityLevels_ = player.qualityLevels();\n this.playlistController_.on('selectedinitialmedia', function () {\n handleVhsLoadedMetadata(_this189.qualityLevels_, _this189);\n });\n this.playlists.on('mediachange', function () {\n handleVhsMediaChange(_this189.qualityLevels_, _this189.playlists);\n });\n }\n /**\n * return the version\n */\n }, {\n key: \"version\",\n value:\n /**\n * return the version\n */\n\n function version() {\n return this.constructor.version();\n }\n }, {\n key: \"canChangeType\",\n value: function canChangeType() {\n return SourceUpdater.canChangeType();\n }\n /**\n * Begin playing the video.\n */\n }, {\n key: \"play\",\n value: function play() {\n this.playlistController_.play();\n }\n /**\n * a wrapper around the function in PlaylistController\n */\n }, {\n key: \"setCurrentTime\",\n value: function setCurrentTime(currentTime) {\n this.playlistController_.setCurrentTime(currentTime);\n }\n /**\n * a wrapper around the function in PlaylistController\n */\n }, {\n key: \"duration\",\n value: function duration() {\n return this.playlistController_.duration();\n }\n /**\n * a wrapper around the function in PlaylistController\n */\n }, {\n key: \"seekable\",\n value: function seekable() {\n return this.playlistController_.seekable();\n }\n /**\n * Abort all outstanding work and cleanup.\n */\n }, {\n key: \"dispose\",\n value: function dispose() {\n if (this.playbackWatcher_) {\n this.playbackWatcher_.dispose();\n }\n if (this.playlistController_) {\n this.playlistController_.dispose();\n }\n if (this.qualityLevels_) {\n this.qualityLevels_.dispose();\n }\n if (this.tech_ && this.tech_.vhs) {\n delete this.tech_.vhs;\n }\n if (this.mediaSourceUrl_ && window$1.URL.revokeObjectURL) {\n window$1.URL.revokeObjectURL(this.mediaSourceUrl_);\n this.mediaSourceUrl_ = null;\n }\n if (this.tech_) {\n this.tech_.off('waitingforkey', this.handleWaitingForKey_);\n }\n _get(_getPrototypeOf(VhsHandler.prototype), \"dispose\", this).call(this);\n }\n }, {\n key: \"convertToProgramTime\",\n value: function convertToProgramTime(time, callback) {\n return getProgramTime({\n playlist: this.playlistController_.media(),\n time: time,\n callback: callback\n });\n } // the player must be playing before calling this\n }, {\n key: \"seekToProgramTime\",\n value: function seekToProgramTime(programTime, callback) {\n var pauseAfterSeek = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n var retryCount = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 2;\n return _seekToProgramTime({\n programTime: programTime,\n playlist: this.playlistController_.media(),\n retryCount: retryCount,\n pauseAfterSeek: pauseAfterSeek,\n seekTo: this.options_.seekTo,\n tech: this.options_.tech,\n callback: callback\n });\n }\n /**\n * Adds the onRequest, onResponse, offRequest and offResponse functions\n * to the VhsHandler xhr Object.\n */\n }, {\n key: \"setupXhrHooks_\",\n value: function setupXhrHooks_() {\n var _this190 = this;\n /**\n * A player function for setting an onRequest hook\n *\n * @param {function} callback for request modifiction\n */\n this.xhr.onRequest = function (callback) {\n addOnRequestHook(_this190.xhr, callback);\n };\n /**\n * A player function for setting an onResponse hook\n *\n * @param {callback} callback for response data retrieval\n */\n\n this.xhr.onResponse = function (callback) {\n addOnResponseHook(_this190.xhr, callback);\n };\n /**\n * Deletes a player onRequest callback if it exists\n *\n * @param {function} callback to delete from the player set\n */\n\n this.xhr.offRequest = function (callback) {\n removeOnRequestHook(_this190.xhr, callback);\n };\n /**\n * Deletes a player onResponse callback if it exists\n *\n * @param {function} callback to delete from the player set\n */\n\n this.xhr.offResponse = function (callback) {\n removeOnResponseHook(_this190.xhr, callback);\n }; // Trigger an event on the player to notify the user that vhs is ready to set xhr hooks.\n // This allows hooks to be set before the source is set to vhs when handleSource is called.\n\n this.player_.trigger('xhr-hooks-ready');\n }\n }], [{\n key: \"version\",\n value: function version() {\n return {\n '@videojs/http-streaming': version$4,\n 'mux.js': version$3,\n 'mpd-parser': version$2,\n 'm3u8-parser': version$1,\n 'aes-decrypter': _version\n };\n }\n }]);\n return VhsHandler;\n}(Component);\n/**\n * The Source Handler object, which informs video.js what additional\n * MIME types are supported and sets up playback. It is registered\n * automatically to the appropriate tech based on the capabilities of\n * the browser it is running in. It is not necessary to use or modify\n * this object in normal usage.\n */\nvar VhsSourceHandler = {\n name: 'videojs-http-streaming',\n VERSION: version$4,\n canHandleSource: function canHandleSource(srcObj) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var localOptions = merge(videojs.options, options);\n return VhsSourceHandler.canPlayType(srcObj.type, localOptions);\n },\n handleSource: function handleSource(source, tech) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var localOptions = merge(videojs.options, options);\n tech.vhs = new VhsHandler(source, tech, localOptions);\n tech.vhs.xhr = xhrFactory();\n tech.vhs.setupXhrHooks_();\n tech.vhs.src(source.src, source.type);\n return tech.vhs;\n },\n canPlayType: function canPlayType(type, options) {\n var simpleType = simpleTypeFromSourceType(type);\n if (!simpleType) {\n return '';\n }\n var overrideNative = VhsSourceHandler.getOverrideNative(options);\n var supportsTypeNatively = Vhs.supportsTypeNatively(simpleType);\n var canUseMsePlayback = !supportsTypeNatively || overrideNative;\n return canUseMsePlayback ? 'maybe' : '';\n },\n getOverrideNative: function getOverrideNative() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var _options$vhs = options.vhs,\n vhs = _options$vhs === void 0 ? {} : _options$vhs;\n var defaultOverrideNative = !(videojs.browser.IS_ANY_SAFARI || videojs.browser.IS_IOS);\n var _vhs$overrideNative = vhs.overrideNative,\n overrideNative = _vhs$overrideNative === void 0 ? defaultOverrideNative : _vhs$overrideNative;\n return overrideNative;\n }\n};\n/**\n * Check to see if the native MediaSource object exists and supports\n * an MP4 container with both H.264 video and AAC-LC audio.\n *\n * @return {boolean} if native media sources are supported\n */\n\nvar supportsNativeMediaSources = function supportsNativeMediaSources() {\n return browserSupportsCodec('avc1.4d400d,mp4a.40.2');\n}; // register source handlers with the appropriate techs\n\nif (supportsNativeMediaSources()) {\n videojs.getTech('Html5').registerSourceHandler(VhsSourceHandler, 0);\n}\nvideojs.VhsHandler = VhsHandler;\nvideojs.VhsSourceHandler = VhsSourceHandler;\nvideojs.Vhs = Vhs;\nif (!videojs.use) {\n videojs.registerComponent('Vhs', Vhs);\n}\nvideojs.options.vhs = videojs.options.vhs || {};\nif (!videojs.getPlugin || !videojs.getPlugin('reloadSourceOnError')) {\n videojs.registerPlugin('reloadSourceOnError', reloadSourceOnError);\n}\nexport { videojs as default };","import React, { Component } from 'react';\nimport videojs from 'video.js';\nimport axios from 'axios';\nimport Modal from 'react-modal';\n\n// see https://github.com/nmn/react-timeago\nimport TimeAgo from 'react-timeago'\nimport enShortStrings from 'react-timeago/lib/language-strings/en-short'\nimport buildFormatter from 'react-timeago/lib/formatters/buildFormatter'\nconst timeAgoformatter = buildFormatter(enShortStrings)\n\n// TODO: share modal among all posts?\nclass PostFooter extends Component {\n constructor(props) {\n super(props);\n this.state = ({\n modalOpen: false\n });\n }\n\n showModal(e) {\n e.preventDefault();\n this.setState({modalOpen: true});\n }\n\n closeModal(e) {\n e.preventDefault();\n this.setState({modalOpen: false});\n }\n\n clickDeletePost(e) {\n e.preventDefault();\n if (!confirm('Are you sure you want to delete this?')) {\n return;\n }\n axios.delete(\n '/posts/' + this.props.id,\n ).then((response) => {\n window.location.reload(false);\n });\n }\n\n render() {\n let buttons = [];\n let emailHref = 'mailto:?subject=' +\n encodeURIComponent('Check out this photo') +\n '&body=' +\n encodeURIComponent(this.props.url + \"\\n\\nSent via Famgram (https://famgram.com)\");\n buttons.push(<ActionButton key='1' text='Share via email' href={emailHref}/>);\n buttons.push(<ActionButton key='2' text='Download original' href={this.props.originalUrl}/>);\n buttons.push(<ActionButton key='3' text='Link' href={this.props.url}/>);\n if (this.props.permissions.destroy) {\n buttons.push(\n <div key='4' onClick={(e) => this.clickDeletePost(e)}>\n <ActionButton key='4' text='Delete' href='#'/>\n </div>\n );\n }\n\n let commentForm = '';\n if (this.props.permissions.comment) {\n commentForm = <CommentForm id={this.props.id} refreshFromServer={this.props.refreshFromServer} />;\n }\n\n return (\n <div>\n <div className='cf'>\n <div className='w-10-ns pr2 pr0-ns fl'>\n <LikeButton liked={this.props.liked} toggleLike={this.props.toggleLike}/>\n </div>\n <div className='w-80 fl db-ns dn'>\n {commentForm}\n </div>\n <div className='w-10-ns fr pl2 pl0-ns tr'>\n <i className='fa-lg moon-gray pointer fa-solid fa-ellipsis-vertical pt2' onClick={(e) => this.showModal(e)}></i>\n <Modal\n isOpen={this.state.modalOpen}\n contentLabel='actionSheet'\n shouldCloseOnOverlayClick={true}\n onRequestClose={(e) => this.closeModal(e)}\n className='vh-100 dt w-100'\n style={{\n overlay: {\n backgroundColor:'rgba(0,0,0,0.75)'\n },\n }}\n >\n <div className='dtc v-mid tc white ph3 ph4-l'>\n <div className='bg-white h5 w-60-ns w-90 center pa4 relative'>\n <div className='absolute top-0 right-0 gray w2 pvs tc pointer' onClick={(e) => this.closeModal(e)}>\n <i className='icon fa-solid fa-xmark f3'></i>\n </div>\n {buttons}\n </div>\n </div>\n </Modal>\n </div>\n </div>\n <div className='w-100 dn-ns db mt2'>\n {commentForm}\n </div>\n </div>\n );\n }\n}\n\nclass LikeButton extends Component {\n render() {\n let sharedClasses = 'icon icon-2x moon-gray pointer ';\n let iconClass;\n if (this.props.liked) {\n iconClass = sharedClasses + 'fa-icon fa-solid dark-red fa-heart fa-lg pt2';\n } else{\n iconClass = sharedClasses + 'fa-icon fa-regular fa-heart fa-lg pt2';\n }\n return (\n <div onClick={(e) => this.props.toggleLike(e)}>\n <i className={iconClass}></i>\n </div>\n );\n }\n}\n\nclass CommentForm extends Component {\n constructor(props) {\n super(props);\n this.state = {value: ''};\n\n this.handleChange = this.handleChange.bind(this);\n this.handleSubmit = this.handleSubmit.bind(this);\n }\n\n handleChange(event) {\n this.setState({value: event.target.value});\n }\n\n handleSubmit(event) {\n event.preventDefault();\n\n axios.post(\n '/comments',\n {\n comment: {\n post_id: this.props.id,\n body: this.state.value,\n },\n },\n ).then((response) => {\n this.setState({ value: '' });\n this.props.refreshFromServer();\n });\n }\n\n render() {\n return (\n <form\n onSubmit={(e) => this.handleSubmit(e)}\n onChange={(e) => this.handleChange(e)}\n className='db w-100'\n >\n <input\n type='text'\n name='body'\n placeholder='Write a comment...'\n autoComplete='off'\n maxLength='2048'\n value={this.state.value}\n className='input-reset ba b--light-gray pa2 br2 dib w-75 pr3 fl w-100-ns'\n />\n <input type='submit' className='br1 bg-blue white ba b--dark-blue ph2 mn2 w-20 dn-ns fr ml1' value='Post' />\n <div className='cf'></div>\n </form>\n );\n }\n}\n\n// expects text and an href\nclass ActionButton extends Component {\n render() {\n return (\n <div className='h2 mb3'>\n <a\n className='br1 bg-light-gray ba b--moon-gray pv2 ph3 link mid-gray v-mid dib pointer w5'\n href={this.props.href}\n target='_blank'\n >\n {this.props.text}\n </a>\n </div>\n )\n }\n}\n\nclass PostHeader extends Component {\n render() {\n return (\n <div className='ba b--light-gray w-100 cf pa3'>\n <div className='w-50 fl'>\n {this.props.name}\n </div>\n <div className='w-50 fl tr'>\n <TimeAgo date={this.props.date} formatter={timeAgoformatter} />\n </div>\n </div>\n );\n }\n}\n\nclass Photo extends Component {\n render() {\n return (\n <div className='pa0 ma0 lh-none'>\n <img src={this.props.photo.url} />\n </div>\n );\n }\n}\n\nclass Video extends Component {\n componentDidMount() {\n this.player = videojs(this.videoPlayer);\n this.player.ready(() => {\n // log plays\n this.player.on('ended', () => {\n // TODO: log plays w/o Ahoy jQuery dependency\n this.player.bigPlayButton.show()\n });\n });\n window.addEventListener('resize', this.resize);\n this.resize();\n }\n\n // anonymous function to resize players so the addEventListener calls\n // will have a reference to the Video rather than the window.\n // source: https://stackoverflow.com/questions/19014250/reactjs-rerender-on-browser-resize\n // seems like there is some disagreement as to the right way to do this.\n resize = () => this.resizePlayers();\n\n componentWillUnmount() {\n window.removeEventListener('resize', this.resize);\n }\n\n resizePlayers() {\n if (this.videoPlayer === undefined) {\n console.log('no reference to video player');\n return;\n }\n if (!this.videoPlayer.parentNode ||\n !this.videoPlayer.parentNode.parentNode) {\n // some weird state\n console.log(\"video player has no parent node\");\n return;\n }\n // TODO: this seems pretty tied to the DOM, which may not be correct\n let desiredWidth = this.videoPlayer.parentNode.parentNode.clientWidth;\n let aspectRatio = this.props.video.width / this.props.video.height;\n let desiredHeight = desiredWidth * (1 / aspectRatio);\n this.player.width(desiredWidth);\n this.player.height(desiredHeight);\n }\n\n render() {\n return (\n <div className='pa0 ma0 lh-none'>\n <video\n id={this.props.id}\n className='video-js vjs-big-play-centered'\n controls\n preload='none'\n poster={this.props.video.preview_url}\n height={this.props.video.height}\n width={this.props.video.width}\n ref={(c) => { this.videoPlayer = c; }}\n data-setup='{ \"controlBar\": { \"muteToggle\": false } }'\n >\n <source\n src={this.props.video.url}\n type='video/mp4'\n />\n </video>\n </div>\n );\n }\n}\n\nclass LikesContainer extends Component {\n render() {\n if (this.props.likers.length === 0) {\n return null;\n }\n\n // map likes to html\n let likes = this.props.likers.map((liker, index) => {\n let lastElement = (index == this.props.likers.length - 1);\n let padding = lastElement ? '' : 'pr2';\n let classes = 'dib ' + padding;\n return (\n <li className={classes} key={liker.id}>\n {liker.first_name + (lastElement ? '' : ', ')}\n </li>\n );\n });\n\n return (\n <div>\n <ul className='dib pl0 list mt0'>\n <li className='dib pr2' key='heart'><i className='fa-solid fa-icon fa-heart moon-gray pt2'></i></li>\n {likes}\n </ul>\n </div>\n );\n }\n}\n\nclass CommentsContainer extends Component {\n render() {\n if (this.props.comments.length === 0) {\n return null;\n }\n\n let comments = this.props.comments.map((comment, index) => {\n return (\n <Comment\n key={comment.id}\n comment={comment}\n className='mb2'\n refreshFromServer={this.props.refreshFromServer} />\n );\n });\n\n return (\n <ul className='pa0 mt0 mb3 list'>\n {comments}\n </ul>\n );\n }\n}\n\nclass Comment extends Component {\n onDelete(e) {\n e.preventDefault();\n if (confirm('Are you sure you want to delete this comment?')) {\n axios\n .delete(\n '/comments/' + this.props.comment.id\n ).then((response) => {\n this.props.refreshFromServer();\n });\n }\n }\n\n render() {\n let deleteButton = '';\n if (this.props.comment.permissions.destroy) {\n deleteButton = (\n <div className='pointer fr w2 gray glow o-10 tr' onClick={(e) => this.onDelete(e)}>\n <i className='icon icon-times'></i>\n </div>\n );\n }\n return (\n <li className='cf hide-child mb2'>\n <strong className='dib pr2'>{this.props.comment.user.first_name}</strong>\n {this.props.comment.body}\n {deleteButton}\n </li>\n );\n }\n}\n\nclass PostContainer extends Component {\n toggleLike() {\n let isLiked = this.props.toggleLike();\n // also do the animation here\n if (isLiked && !this.heartIcon.classList.contains('js-liked')) {\n this.heartIcon.classList.add('js-liked');\n }\n }\n\n render() {\n let attachment;\n if (this.props.attachment.type == 'photo') {\n attachment = <Photo photo={this.props.attachment} id={this.props.id} />\n } else {\n attachment = <Video video={this.props.attachment} id={this.props.id} />\n }\n return (\n <div className='pa0 ma0 lh-none' onDoubleClick={() => this.toggleLike()}>\n {attachment}\n <i className='icon icon-heart icon-2x dark-red heart-animation' ref={(i) => { this.heartIcon = i; }}></i>\n </div>\n );\n }\n}\n\nclass Post extends Component {\n constructor(props) {\n super(props);\n this.state = {\n likers: this.props.likers.slice(),\n comments: this.props.comments.slice(),\n };\n this.toggleLike = this.toggleLike.bind(this);\n }\n\n toggleLike(e) {\n if (!this.props.current_user) {\n return;\n }\n\n // fire off to the server\n axios.post('/likes/toggle', { post_id: this.props.id });\n\n // update state of client\n let likers = this.state.likers.slice();\n let liked;\n // going from liked -> disliked?\n if (this.isLiked()) {\n likers = likers.filter((like) => {\n if (like.id != this.props.current_user.id) {\n return like;\n } else {\n return null;\n }\n });\n liked = false;\n } else { // disliked -> liked\n likers.push(this.props.current_user);\n liked = true;\n }\n this.setState({ likers: likers });\n return liked;\n }\n\n isLiked() {\n if (!this.props.current_user) {\n return false;\n }\n\n // compute liked from state\n let liked_ids = this.state.likers.slice().map((user) => {\n return user.id;\n });\n return liked_ids.includes(this.props.current_user.id);\n }\n\n refreshFromServer() {\n axios\n .get(this.props.url)\n .then((response) => {\n this.setState({\n likers: response.data.post.likers.slice(),\n comments: response.data.post.comments.slice(),\n });\n });\n }\n\n render() {\n let showBorderAboveFooter = this.state.likers.length > 0 || this.state.comments.length > 0;\n return (\n <div className='mb5 bg-white'>\n <a name={this.props.id}></a>\n <PostHeader name={this.props.user.first_name} date={this.props.created_at} />\n <PostContainer\n attachment={this.props.attachment}\n id={this.props.id}\n toggleLike={() => this.toggleLike()}\n />\n\n <div className='br bl bb b--light-gray lh-solid pa3'>\n <LikesContainer likers={this.state.likers} />\n <CommentsContainer\n comments={this.state.comments}\n refreshFromServer={() => this.refreshFromServer()}\n />\n <div className={showBorderAboveFooter ? 'mt1 pt3 bt b--light-gray' : 'lh-none'}>\n <PostFooter\n liked={this.isLiked()}\n id={this.props.id}\n originalUrl={this.props.attachment.original_url}\n url={this.props.url}\n toggleLike={() => this.toggleLike()}\n refreshFromServer={() => this.refreshFromServer()}\n permissions={this.props.permissions}\n />\n </div>\n </div>\n </div>\n );\n }\n}\n\nexport default Post;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nvar _prodInvariant = require('./reactProdInvariant'),\n _assign = require('object-assign');\nvar ReactNoopUpdateQueue = require('./ReactNoopUpdateQueue');\nvar canDefineProperty = require('./canDefineProperty');\nvar emptyObject = require('fbjs/lib/emptyObject');\nvar invariant = require('fbjs/lib/invariant');\nvar lowPriorityWarning = require('./lowPriorityWarning');\n\n/**\n * Base class helpers for the updating state of a component.\n */\nfunction ReactComponent(props, context, updater) {\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n // We initialize the default updater but the real one gets injected by the\n // renderer.\n this.updater = updater || ReactNoopUpdateQueue;\n}\nReactComponent.prototype.isReactComponent = {};\n\n/**\n * Sets a subset of the state. Always use this to mutate\n * state. You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * There is no guarantee that calls to `setState` will run synchronously,\n * as they may eventually be batched together. You can provide an optional\n * callback that will be executed when the call to setState is actually\n * completed.\n *\n * When a function is provided to setState, it will be called at some point in\n * the future (not synchronously). It will be called with the up to date\n * component arguments (state, props, context). These values can be different\n * from this.* because your function may be called after receiveProps but before\n * shouldComponentUpdate, and this new state, props, and context will not yet be\n * assigned to this.\n *\n * @param {object|function} partialState Next partial state or function to\n * produce next partial state to be merged with current state.\n * @param {?function} callback Called after state is updated.\n * @final\n * @protected\n */\nReactComponent.prototype.setState = function (partialState, callback) {\n !(_typeof(partialState) === 'object' || typeof partialState === 'function' || partialState == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.') : _prodInvariant('85') : void 0;\n this.updater.enqueueSetState(this, partialState);\n if (callback) {\n this.updater.enqueueCallback(this, callback, 'setState');\n }\n};\n\n/**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {?function} callback Called after update is complete.\n * @final\n * @protected\n */\nReactComponent.prototype.forceUpdate = function (callback) {\n this.updater.enqueueForceUpdate(this);\n if (callback) {\n this.updater.enqueueCallback(this, callback, 'forceUpdate');\n }\n};\n\n/**\n * Deprecated APIs. These APIs used to exist on classic React classes but since\n * we would like to deprecate them, we're not going to move them over to this\n * modern base class. Instead, we define a getter that warns if it's accessed.\n */\nif (process.env.NODE_ENV !== 'production') {\n var deprecatedAPIs = {\n isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],\n replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']\n };\n var defineDeprecationWarning = function defineDeprecationWarning(methodName, info) {\n if (canDefineProperty) {\n Object.defineProperty(ReactComponent.prototype, methodName, {\n get: function get() {\n lowPriorityWarning(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);\n return undefined;\n }\n });\n }\n };\n for (var fnName in deprecatedAPIs) {\n if (deprecatedAPIs.hasOwnProperty(fnName)) {\n defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);\n }\n }\n}\n\n/**\n * Base class helpers for the updating state of a component.\n */\nfunction ReactPureComponent(props, context, updater) {\n // Duplicated from ReactComponent.\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n // We initialize the default updater but the real one gets injected by the\n // renderer.\n this.updater = updater || ReactNoopUpdateQueue;\n}\nfunction ComponentDummy() {}\nComponentDummy.prototype = ReactComponent.prototype;\nReactPureComponent.prototype = new ComponentDummy();\nReactPureComponent.prototype.constructor = ReactPureComponent;\n// Avoid an extra prototype jump for these methods.\n_assign(ReactPureComponent.prototype, ReactComponent.prototype);\nReactPureComponent.prototype.isPureReactComponent = true;\nmodule.exports = {\n Component: ReactComponent,\n PureComponent: ReactPureComponent\n};","/**\n * Copyright (c) 2015-present, Facebook, Inc.\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\n'use strict';\n\nvar warning = require('fbjs/lib/warning');\nfunction warnNoop(publicInstance, callerName) {\n if (process.env.NODE_ENV !== 'production') {\n var constructor = publicInstance.constructor;\n process.env.NODE_ENV !== 'production' ? warning(false, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, constructor && (constructor.displayName || constructor.name) || 'ReactClass') : void 0;\n }\n}\n\n/**\n * This is the abstract API for an update queue.\n */\nvar ReactNoopUpdateQueue = {\n /**\n * Checks whether or not this composite component is mounted.\n * @param {ReactClass} publicInstance The instance we want to test.\n * @return {boolean} True if mounted, false otherwise.\n * @protected\n * @final\n */\n isMounted: function isMounted(publicInstance) {\n return false;\n },\n /**\n * Enqueue a callback that will be executed after all the pending updates\n * have processed.\n *\n * @param {ReactClass} publicInstance The instance to use as `this` context.\n * @param {?function} callback Called after state is updated.\n * @internal\n */\n enqueueCallback: function enqueueCallback(publicInstance, callback) {},\n /**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @internal\n */\n enqueueForceUpdate: function enqueueForceUpdate(publicInstance) {\n warnNoop(publicInstance, 'forceUpdate');\n },\n /**\n * Replaces all of the state. Always use this or `setState` to mutate state.\n * You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} completeState Next state.\n * @internal\n */\n enqueueReplaceState: function enqueueReplaceState(publicInstance, completeState) {\n warnNoop(publicInstance, 'replaceState');\n },\n /**\n * Sets a subset of the state. This only exists because _pendingState is\n * internal. This provides a merging strategy that is not available to deep\n * properties which is confusing. TODO: Expose pendingState or don't use it\n * during the merge.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} partialState Next partial state to be merged with state.\n * @internal\n */\n enqueueSetState: function enqueueSetState(publicInstance, partialState) {\n warnNoop(publicInstance, 'setState');\n }\n};\nmodule.exports = ReactNoopUpdateQueue;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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 */\n\n'use strict';\n\nvar canDefineProperty = false;\nif (process.env.NODE_ENV !== 'production') {\n try {\n // $FlowFixMe https://github.com/facebook/flow/issues/285\n Object.defineProperty({}, 'x', {\n get: function get() {}\n });\n canDefineProperty = true;\n } catch (x) {\n // IE will fail on defineProperty\n }\n}\nmodule.exports = canDefineProperty;","/**\n * Copyright (c) 2014-present, Facebook, Inc.\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 */\n\n'use strict';\n\n// The Symbol used to tag the ReactElement type. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;\nmodule.exports = REACT_ELEMENT_TYPE;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n// React 15.5 references this module, and assumes PropTypes are still callable in production.\n// Therefore we re-export development-only version with all the PropTypes checks here.\n// However if one is migrating to the `prop-types` npm library, they will go through the\n// `index.js` entry point, and it will branch depending on the environment.\nvar factory = require('./factoryWithTypeCheckers');\nmodule.exports = function (isValidElement) {\n // It is still allowed in 15.5.\n var throwOnDirectAccess = false;\n return factory(isValidElement, throwOnDirectAccess);\n};","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\nmodule.exports = ReactPropTypesSecret;","module.exports = function (module) {\n if (!module.webpackPolyfill) {\n module.deprecate = function () {};\n module.paths = [];\n // module.parent = undefined by default\n if (!module.children) module.children = [];\n Object.defineProperty(module, \"loaded\", {\n enumerable: true,\n get: function get() {\n return module.l;\n }\n });\n Object.defineProperty(module, \"id\", {\n enumerable: true,\n get: function get() {\n return module.i;\n }\n });\n module.webpackPolyfill = 1;\n }\n return module;\n};","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh <http://feross.org>\n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict';\n\nvar base64 = require('base64-js');\nvar ieee754 = require('ieee754');\nvar isArray = require('isarray');\nexports.Buffer = Buffer;\nexports.SlowBuffer = SlowBuffer;\nexports.INSPECT_MAX_BYTES = 50;\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined ? global.TYPED_ARRAY_SUPPORT : typedArraySupport();\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength();\nfunction typedArraySupport() {\n try {\n var arr = new Uint8Array(1);\n arr.__proto__ = {\n __proto__: Uint8Array.prototype,\n foo: function foo() {\n return 42;\n }\n };\n return arr.foo() === 42 &&\n // typed array instances can be augmented\n typeof arr.subarray === 'function' &&\n // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0; // ie10 has broken `subarray`\n } catch (e) {\n return false;\n }\n}\nfunction kMaxLength() {\n return Buffer.TYPED_ARRAY_SUPPORT ? 0x7fffffff : 0x3fffffff;\n}\nfunction createBuffer(that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length');\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length);\n that.__proto__ = Buffer.prototype;\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length);\n }\n that.length = length;\n }\n return that;\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer(arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length);\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error('If encoding is specified then the first argument must be a string');\n }\n return allocUnsafe(this, arg);\n }\n return from(this, arg, encodingOrOffset, length);\n}\nBuffer.poolSize = 8192; // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype;\n return arr;\n};\nfunction from(that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number');\n }\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length);\n }\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset);\n }\n return fromObject(that, value);\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length);\n};\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype;\n Buffer.__proto__ = Uint8Array;\n if (typeof Symbol !== 'undefined' && Symbol.species && Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n });\n }\n}\nfunction assertSize(size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number');\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative');\n }\n}\nfunction alloc(that, size, fill, encoding) {\n assertSize(size);\n if (size <= 0) {\n return createBuffer(that, size);\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string' ? createBuffer(that, size).fill(fill, encoding) : createBuffer(that, size).fill(fill);\n }\n return createBuffer(that, size);\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding);\n};\nfunction allocUnsafe(that, size) {\n assertSize(size);\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0);\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0;\n }\n }\n return that;\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size);\n};\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size);\n};\nfunction fromString(that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8';\n }\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding');\n }\n var length = byteLength(string, encoding) | 0;\n that = createBuffer(that, length);\n var actual = that.write(string, encoding);\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual);\n }\n return that;\n}\nfunction fromArrayLike(that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0;\n that = createBuffer(that, length);\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255;\n }\n return that;\n}\nfunction fromArrayBuffer(that, array, byteOffset, length) {\n array.byteLength; // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds');\n }\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds');\n }\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array);\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset);\n } else {\n array = new Uint8Array(array, byteOffset, length);\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array;\n that.__proto__ = Buffer.prototype;\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array);\n }\n return that;\n}\nfunction fromObject(that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0;\n that = createBuffer(that, len);\n if (that.length === 0) {\n return that;\n }\n obj.copy(that, 0, 0, len);\n return that;\n }\n if (obj) {\n if (typeof ArrayBuffer !== 'undefined' && obj.buffer instanceof ArrayBuffer || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0);\n }\n return fromArrayLike(that, obj);\n }\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data);\n }\n }\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.');\n}\nfunction checked(length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' + 'size: 0x' + kMaxLength().toString(16) + ' bytes');\n }\n return length | 0;\n}\nfunction SlowBuffer(length) {\n if (+length != length) {\n // eslint-disable-line eqeqeq\n length = 0;\n }\n return Buffer.alloc(+length);\n}\nBuffer.isBuffer = function isBuffer(b) {\n return !!(b != null && b._isBuffer);\n};\nBuffer.compare = function compare(a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers');\n }\n if (a === b) return 0;\n var x = a.length;\n var y = b.length;\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n if (x < y) return -1;\n if (y < x) return 1;\n return 0;\n};\nBuffer.isEncoding = function isEncoding(encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true;\n default:\n return false;\n }\n};\nBuffer.concat = function concat(list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers');\n }\n if (list.length === 0) {\n return Buffer.alloc(0);\n }\n var i;\n if (length === undefined) {\n length = 0;\n for (i = 0; i < list.length; ++i) {\n length += list[i].length;\n }\n }\n var buffer = Buffer.allocUnsafe(length);\n var pos = 0;\n for (i = 0; i < list.length; ++i) {\n var buf = list[i];\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers');\n }\n buf.copy(buffer, pos);\n pos += buf.length;\n }\n return buffer;\n};\nfunction byteLength(string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length;\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength;\n }\n if (typeof string !== 'string') {\n string = '' + string;\n }\n var len = string.length;\n if (len === 0) return 0;\n\n // Use a for loop to avoid recursion\n var loweredCase = false;\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len;\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length;\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2;\n case 'hex':\n return len >>> 1;\n case 'base64':\n return base64ToBytes(string).length;\n default:\n if (loweredCase) return utf8ToBytes(string).length; // assume utf8\n encoding = ('' + encoding).toLowerCase();\n loweredCase = true;\n }\n }\n}\nBuffer.byteLength = byteLength;\nfunction slowToString(encoding, start, end) {\n var loweredCase = false;\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0;\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return '';\n }\n if (end === undefined || end > this.length) {\n end = this.length;\n }\n if (end <= 0) {\n return '';\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0;\n start >>>= 0;\n if (end <= start) {\n return '';\n }\n if (!encoding) encoding = 'utf8';\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end);\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end);\n case 'ascii':\n return asciiSlice(this, start, end);\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end);\n case 'base64':\n return base64Slice(this, start, end);\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end);\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);\n encoding = (encoding + '').toLowerCase();\n loweredCase = true;\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true;\nfunction swap(b, n, m) {\n var i = b[n];\n b[n] = b[m];\n b[m] = i;\n}\nBuffer.prototype.swap16 = function swap16() {\n var len = this.length;\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits');\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1);\n }\n return this;\n};\nBuffer.prototype.swap32 = function swap32() {\n var len = this.length;\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits');\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3);\n swap(this, i + 1, i + 2);\n }\n return this;\n};\nBuffer.prototype.swap64 = function swap64() {\n var len = this.length;\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits');\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7);\n swap(this, i + 1, i + 6);\n swap(this, i + 2, i + 5);\n swap(this, i + 3, i + 4);\n }\n return this;\n};\nBuffer.prototype.toString = function toString() {\n var length = this.length | 0;\n if (length === 0) return '';\n if (arguments.length === 0) return utf8Slice(this, 0, length);\n return slowToString.apply(this, arguments);\n};\nBuffer.prototype.equals = function equals(b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer');\n if (this === b) return true;\n return Buffer.compare(this, b) === 0;\n};\nBuffer.prototype.inspect = function inspect() {\n var str = '';\n var max = exports.INSPECT_MAX_BYTES;\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ');\n if (this.length > max) str += ' ... ';\n }\n return '<Buffer ' + str + '>';\n};\nBuffer.prototype.compare = function compare(target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer');\n }\n if (start === undefined) {\n start = 0;\n }\n if (end === undefined) {\n end = target ? target.length : 0;\n }\n if (thisStart === undefined) {\n thisStart = 0;\n }\n if (thisEnd === undefined) {\n thisEnd = this.length;\n }\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index');\n }\n if (thisStart >= thisEnd && start >= end) {\n return 0;\n }\n if (thisStart >= thisEnd) {\n return -1;\n }\n if (start >= end) {\n return 1;\n }\n start >>>= 0;\n end >>>= 0;\n thisStart >>>= 0;\n thisEnd >>>= 0;\n if (this === target) return 0;\n var x = thisEnd - thisStart;\n var y = end - start;\n var len = Math.min(x, y);\n var thisCopy = this.slice(thisStart, thisEnd);\n var targetCopy = target.slice(start, end);\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i];\n y = targetCopy[i];\n break;\n }\n }\n if (x < y) return -1;\n if (y < x) return 1;\n return 0;\n};\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1;\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset;\n byteOffset = 0;\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff;\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000;\n }\n byteOffset = +byteOffset; // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : buffer.length - 1;\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset;\n if (byteOffset >= buffer.length) {\n if (dir) return -1;else byteOffset = buffer.length - 1;\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0;else return -1;\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding);\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1;\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir);\n } else if (typeof val === 'number') {\n val = val & 0xFF; // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT && typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir);\n }\n throw new TypeError('val must be string, number or Buffer');\n}\nfunction arrayIndexOf(arr, val, byteOffset, encoding, dir) {\n var indexSize = 1;\n var arrLength = arr.length;\n var valLength = val.length;\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase();\n if (encoding === 'ucs2' || encoding === 'ucs-2' || encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1;\n }\n indexSize = 2;\n arrLength /= 2;\n valLength /= 2;\n byteOffset /= 2;\n }\n }\n function read(buf, i) {\n if (indexSize === 1) {\n return buf[i];\n } else {\n return buf.readUInt16BE(i * indexSize);\n }\n }\n var i;\n if (dir) {\n var foundIndex = -1;\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i;\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize;\n } else {\n if (foundIndex !== -1) i -= i - foundIndex;\n foundIndex = -1;\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;\n for (i = byteOffset; i >= 0; i--) {\n var found = true;\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false;\n break;\n }\n }\n if (found) return i;\n }\n }\n return -1;\n}\nBuffer.prototype.includes = function includes(val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1;\n};\nBuffer.prototype.indexOf = function indexOf(val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true);\n};\nBuffer.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false);\n};\nfunction hexWrite(buf, string, offset, length) {\n offset = Number(offset) || 0;\n var remaining = buf.length - offset;\n if (!length) {\n length = remaining;\n } else {\n length = Number(length);\n if (length > remaining) {\n length = remaining;\n }\n }\n\n // must be an even number of digits\n var strLen = string.length;\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string');\n if (length > strLen / 2) {\n length = strLen / 2;\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16);\n if (isNaN(parsed)) return i;\n buf[offset + i] = parsed;\n }\n return i;\n}\nfunction utf8Write(buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length);\n}\nfunction asciiWrite(buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length);\n}\nfunction latin1Write(buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length);\n}\nfunction base64Write(buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length);\n}\nfunction ucs2Write(buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length);\n}\nBuffer.prototype.write = function write(string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8';\n length = this.length;\n offset = 0;\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset;\n length = this.length;\n offset = 0;\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0;\n if (isFinite(length)) {\n length = length | 0;\n if (encoding === undefined) encoding = 'utf8';\n } else {\n encoding = length;\n length = undefined;\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported');\n }\n var remaining = this.length - offset;\n if (length === undefined || length > remaining) length = remaining;\n if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds');\n }\n if (!encoding) encoding = 'utf8';\n var loweredCase = false;\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length);\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length);\n case 'ascii':\n return asciiWrite(this, string, offset, length);\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length);\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length);\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length);\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);\n encoding = ('' + encoding).toLowerCase();\n loweredCase = true;\n }\n }\n};\nBuffer.prototype.toJSON = function toJSON() {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n };\n};\nfunction base64Slice(buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf);\n } else {\n return base64.fromByteArray(buf.slice(start, end));\n }\n}\nfunction utf8Slice(buf, start, end) {\n end = Math.min(buf.length, end);\n var res = [];\n var i = start;\n while (i < end) {\n var firstByte = buf[i];\n var codePoint = null;\n var bytesPerSequence = firstByte > 0xEF ? 4 : firstByte > 0xDF ? 3 : firstByte > 0xBF ? 2 : 1;\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint;\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte;\n }\n break;\n case 2:\n secondByte = buf[i + 1];\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | secondByte & 0x3F;\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint;\n }\n }\n break;\n case 3:\n secondByte = buf[i + 1];\n thirdByte = buf[i + 2];\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | thirdByte & 0x3F;\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint;\n }\n }\n break;\n case 4:\n secondByte = buf[i + 1];\n thirdByte = buf[i + 2];\n fourthByte = buf[i + 3];\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | fourthByte & 0x3F;\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint;\n }\n }\n }\n }\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD;\n bytesPerSequence = 1;\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000;\n res.push(codePoint >>> 10 & 0x3FF | 0xD800);\n codePoint = 0xDC00 | codePoint & 0x3FF;\n }\n res.push(codePoint);\n i += bytesPerSequence;\n }\n return decodeCodePointsArray(res);\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000;\nfunction decodeCodePointsArray(codePoints) {\n var len = codePoints.length;\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints); // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = '';\n var i = 0;\n while (i < len) {\n res += String.fromCharCode.apply(String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH));\n }\n return res;\n}\nfunction asciiSlice(buf, start, end) {\n var ret = '';\n end = Math.min(buf.length, end);\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F);\n }\n return ret;\n}\nfunction latin1Slice(buf, start, end) {\n var ret = '';\n end = Math.min(buf.length, end);\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i]);\n }\n return ret;\n}\nfunction hexSlice(buf, start, end) {\n var len = buf.length;\n if (!start || start < 0) start = 0;\n if (!end || end < 0 || end > len) end = len;\n var out = '';\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i]);\n }\n return out;\n}\nfunction utf16leSlice(buf, start, end) {\n var bytes = buf.slice(start, end);\n var res = '';\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);\n }\n return res;\n}\nBuffer.prototype.slice = function slice(start, end) {\n var len = this.length;\n start = ~~start;\n end = end === undefined ? len : ~~end;\n if (start < 0) {\n start += len;\n if (start < 0) start = 0;\n } else if (start > len) {\n start = len;\n }\n if (end < 0) {\n end += len;\n if (end < 0) end = 0;\n } else if (end > len) {\n end = len;\n }\n if (end < start) end = start;\n var newBuf;\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end);\n newBuf.__proto__ = Buffer.prototype;\n } else {\n var sliceLen = end - start;\n newBuf = new Buffer(sliceLen, undefined);\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start];\n }\n }\n return newBuf;\n};\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset(offset, ext, length) {\n if (offset % 1 !== 0 || offset < 0) throw new RangeError('offset is not uint');\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length');\n}\nBuffer.prototype.readUIntLE = function readUIntLE(offset, byteLength, noAssert) {\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) checkOffset(offset, byteLength, this.length);\n var val = this[offset];\n var mul = 1;\n var i = 0;\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul;\n }\n return val;\n};\nBuffer.prototype.readUIntBE = function readUIntBE(offset, byteLength, noAssert) {\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length);\n }\n var val = this[offset + --byteLength];\n var mul = 1;\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul;\n }\n return val;\n};\nBuffer.prototype.readUInt8 = function readUInt8(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length);\n return this[offset];\n};\nBuffer.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length);\n return this[offset] | this[offset + 1] << 8;\n};\nBuffer.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length);\n return this[offset] << 8 | this[offset + 1];\n};\nBuffer.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 0x1000000;\n};\nBuffer.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n return this[offset] * 0x1000000 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);\n};\nBuffer.prototype.readIntLE = function readIntLE(offset, byteLength, noAssert) {\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) checkOffset(offset, byteLength, this.length);\n var val = this[offset];\n var mul = 1;\n var i = 0;\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul;\n }\n mul *= 0x80;\n if (val >= mul) val -= Math.pow(2, 8 * byteLength);\n return val;\n};\nBuffer.prototype.readIntBE = function readIntBE(offset, byteLength, noAssert) {\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) checkOffset(offset, byteLength, this.length);\n var i = byteLength;\n var mul = 1;\n var val = this[offset + --i];\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul;\n }\n mul *= 0x80;\n if (val >= mul) val -= Math.pow(2, 8 * byteLength);\n return val;\n};\nBuffer.prototype.readInt8 = function readInt8(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length);\n if (!(this[offset] & 0x80)) return this[offset];\n return (0xff - this[offset] + 1) * -1;\n};\nBuffer.prototype.readInt16LE = function readInt16LE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length);\n var val = this[offset] | this[offset + 1] << 8;\n return val & 0x8000 ? val | 0xFFFF0000 : val;\n};\nBuffer.prototype.readInt16BE = function readInt16BE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length);\n var val = this[offset + 1] | this[offset] << 8;\n return val & 0x8000 ? val | 0xFFFF0000 : val;\n};\nBuffer.prototype.readInt32LE = function readInt32LE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;\n};\nBuffer.prototype.readInt32BE = function readInt32BE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];\n};\nBuffer.prototype.readFloatLE = function readFloatLE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n return ieee754.read(this, offset, true, 23, 4);\n};\nBuffer.prototype.readFloatBE = function readFloatBE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n return ieee754.read(this, offset, false, 23, 4);\n};\nBuffer.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length);\n return ieee754.read(this, offset, true, 52, 8);\n};\nBuffer.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length);\n return ieee754.read(this, offset, false, 52, 8);\n};\nfunction checkInt(buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance');\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds');\n if (offset + ext > buf.length) throw new RangeError('Index out of range');\n}\nBuffer.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1;\n checkInt(this, value, offset, byteLength, maxBytes, 0);\n }\n var mul = 1;\n var i = 0;\n this[offset] = value & 0xFF;\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = value / mul & 0xFF;\n }\n return offset + byteLength;\n};\nBuffer.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1;\n checkInt(this, value, offset, byteLength, maxBytes, 0);\n }\n var i = byteLength - 1;\n var mul = 1;\n this[offset + i] = value & 0xFF;\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = value / mul & 0xFF;\n }\n return offset + byteLength;\n};\nBuffer.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0);\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value);\n this[offset] = value & 0xff;\n return offset + 1;\n};\nfunction objectWriteUInt16(buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1;\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & 0xff << 8 * (littleEndian ? i : 1 - i)) >>> (littleEndian ? i : 1 - i) * 8;\n }\n}\nBuffer.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value & 0xff;\n this[offset + 1] = value >>> 8;\n } else {\n objectWriteUInt16(this, value, offset, true);\n }\n return offset + 2;\n};\nBuffer.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value >>> 8;\n this[offset + 1] = value & 0xff;\n } else {\n objectWriteUInt16(this, value, offset, false);\n }\n return offset + 2;\n};\nfunction objectWriteUInt32(buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1;\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = value >>> (littleEndian ? i : 3 - i) * 8 & 0xff;\n }\n}\nBuffer.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = value >>> 24;\n this[offset + 2] = value >>> 16;\n this[offset + 1] = value >>> 8;\n this[offset] = value & 0xff;\n } else {\n objectWriteUInt32(this, value, offset, true);\n }\n return offset + 4;\n};\nBuffer.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value >>> 24;\n this[offset + 1] = value >>> 16;\n this[offset + 2] = value >>> 8;\n this[offset + 3] = value & 0xff;\n } else {\n objectWriteUInt32(this, value, offset, false);\n }\n return offset + 4;\n};\nBuffer.prototype.writeIntLE = function writeIntLE(value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1);\n checkInt(this, value, offset, byteLength, limit - 1, -limit);\n }\n var i = 0;\n var mul = 1;\n var sub = 0;\n this[offset] = value & 0xFF;\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1;\n }\n this[offset + i] = (value / mul >> 0) - sub & 0xFF;\n }\n return offset + byteLength;\n};\nBuffer.prototype.writeIntBE = function writeIntBE(value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1);\n checkInt(this, value, offset, byteLength, limit - 1, -limit);\n }\n var i = byteLength - 1;\n var mul = 1;\n var sub = 0;\n this[offset + i] = value & 0xFF;\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1;\n }\n this[offset + i] = (value / mul >> 0) - sub & 0xFF;\n }\n return offset + byteLength;\n};\nBuffer.prototype.writeInt8 = function writeInt8(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80);\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value);\n if (value < 0) value = 0xff + value + 1;\n this[offset] = value & 0xff;\n return offset + 1;\n};\nBuffer.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value & 0xff;\n this[offset + 1] = value >>> 8;\n } else {\n objectWriteUInt16(this, value, offset, true);\n }\n return offset + 2;\n};\nBuffer.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value >>> 8;\n this[offset + 1] = value & 0xff;\n } else {\n objectWriteUInt16(this, value, offset, false);\n }\n return offset + 2;\n};\nBuffer.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value & 0xff;\n this[offset + 1] = value >>> 8;\n this[offset + 2] = value >>> 16;\n this[offset + 3] = value >>> 24;\n } else {\n objectWriteUInt32(this, value, offset, true);\n }\n return offset + 4;\n};\nBuffer.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);\n if (value < 0) value = 0xffffffff + value + 1;\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value >>> 24;\n this[offset + 1] = value >>> 16;\n this[offset + 2] = value >>> 8;\n this[offset + 3] = value & 0xff;\n } else {\n objectWriteUInt32(this, value, offset, false);\n }\n return offset + 4;\n};\nfunction checkIEEE754(buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range');\n if (offset < 0) throw new RangeError('Index out of range');\n}\nfunction writeFloat(buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38);\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4);\n return offset + 4;\n}\nBuffer.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert);\n};\nBuffer.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert);\n};\nfunction writeDouble(buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308);\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8);\n return offset + 8;\n}\nBuffer.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert);\n};\nBuffer.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert);\n};\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy(target, targetStart, start, end) {\n if (!start) start = 0;\n if (!end && end !== 0) end = this.length;\n if (targetStart >= target.length) targetStart = target.length;\n if (!targetStart) targetStart = 0;\n if (end > 0 && end < start) end = start;\n\n // Copy 0 bytes; we're done\n if (end === start) return 0;\n if (target.length === 0 || this.length === 0) return 0;\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds');\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds');\n if (end < 0) throw new RangeError('sourceEnd out of bounds');\n\n // Are we oob?\n if (end > this.length) end = this.length;\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start;\n }\n var len = end - start;\n var i;\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start];\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start];\n }\n } else {\n Uint8Array.prototype.set.call(target, this.subarray(start, start + len), targetStart);\n }\n return len;\n};\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill(val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start;\n start = 0;\n end = this.length;\n } else if (typeof end === 'string') {\n encoding = end;\n end = this.length;\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0);\n if (code < 256) {\n val = code;\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string');\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding);\n }\n } else if (typeof val === 'number') {\n val = val & 255;\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index');\n }\n if (end <= start) {\n return this;\n }\n start = start >>> 0;\n end = end === undefined ? this.length : end >>> 0;\n if (!val) val = 0;\n var i;\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val;\n }\n } else {\n var bytes = Buffer.isBuffer(val) ? val : utf8ToBytes(new Buffer(val, encoding).toString());\n var len = bytes.length;\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len];\n }\n }\n return this;\n};\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g;\nfunction base64clean(str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '');\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return '';\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '=';\n }\n return str;\n}\nfunction stringtrim(str) {\n if (str.trim) return str.trim();\n return str.replace(/^\\s+|\\s+$/g, '');\n}\nfunction toHex(n) {\n if (n < 16) return '0' + n.toString(16);\n return n.toString(16);\n}\nfunction utf8ToBytes(string, units) {\n units = units || Infinity;\n var codePoint;\n var length = string.length;\n var leadSurrogate = null;\n var bytes = [];\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i);\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n continue;\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n continue;\n }\n\n // valid lead\n leadSurrogate = codePoint;\n continue;\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n leadSurrogate = codePoint;\n continue;\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000;\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n }\n leadSurrogate = null;\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break;\n bytes.push(codePoint);\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break;\n bytes.push(codePoint >> 0x6 | 0xC0, codePoint & 0x3F | 0x80);\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break;\n bytes.push(codePoint >> 0xC | 0xE0, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break;\n bytes.push(codePoint >> 0x12 | 0xF0, codePoint >> 0xC & 0x3F | 0x80, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);\n } else {\n throw new Error('Invalid code point');\n }\n }\n return bytes;\n}\nfunction asciiToBytes(str) {\n var byteArray = [];\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF);\n }\n return byteArray;\n}\nfunction utf16leToBytes(str, units) {\n var c, hi, lo;\n var byteArray = [];\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break;\n c = str.charCodeAt(i);\n hi = c >> 8;\n lo = c % 256;\n byteArray.push(lo);\n byteArray.push(hi);\n }\n return byteArray;\n}\nfunction base64ToBytes(str) {\n return base64.toByteArray(base64clean(str));\n}\nfunction blitBuffer(src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if (i + offset >= dst.length || i >= src.length) break;\n dst[i + offset] = src[i];\n }\n return i;\n}\nfunction isnan(val) {\n return val !== val; // eslint-disable-line no-self-compare\n}","function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nvar conventions = require(\"./conventions\");\nvar find = conventions.find;\nvar NAMESPACE = conventions.NAMESPACE;\n\n/**\n * A prerequisite for `[].filter`, to drop elements that are empty\n * @param {string} input\n * @returns {boolean}\n */\nfunction notEmptyString(input) {\n return input !== '';\n}\n/**\n * @see https://infra.spec.whatwg.org/#split-on-ascii-whitespace\n * @see https://infra.spec.whatwg.org/#ascii-whitespace\n *\n * @param {string} input\n * @returns {string[]} (can be empty)\n */\nfunction splitOnASCIIWhitespace(input) {\n // U+0009 TAB, U+000A LF, U+000C FF, U+000D CR, U+0020 SPACE\n return input ? input.split(/[\\t\\n\\f\\r ]+/).filter(notEmptyString) : [];\n}\n\n/**\n * Adds element as a key to current if it is not already present.\n *\n * @param {Record<string, boolean | undefined>} current\n * @param {string} element\n * @returns {Record<string, boolean | undefined>}\n */\nfunction orderedSetReducer(current, element) {\n if (!current.hasOwnProperty(element)) {\n current[element] = true;\n }\n return current;\n}\n\n/**\n * @see https://infra.spec.whatwg.org/#ordered-set\n * @param {string} input\n * @returns {string[]}\n */\nfunction toOrderedSet(input) {\n if (!input) return [];\n var list = splitOnASCIIWhitespace(input);\n return Object.keys(list.reduce(orderedSetReducer, {}));\n}\n\n/**\n * Uses `list.indexOf` to implement something like `Array.prototype.includes`,\n * which we can not rely on being available.\n *\n * @param {any[]} list\n * @returns {function(any): boolean}\n */\nfunction arrayIncludes(list) {\n return function (element) {\n return list && list.indexOf(element) !== -1;\n };\n}\nfunction copy(src, dest) {\n for (var p in src) {\n if (Object.prototype.hasOwnProperty.call(src, p)) {\n dest[p] = src[p];\n }\n }\n}\n\n/**\n^\\w+\\.prototype\\.([_\\w]+)\\s*=\\s*((?:.*\\{\\s*?[\\r\\n][\\s\\S]*?^})|\\S.*?(?=[;\\r\\n]));?\n^\\w+\\.prototype\\.([_\\w]+)\\s*=\\s*(\\S.*?(?=[;\\r\\n]));?\n */\nfunction _extends(Class, Super) {\n var pt = Class.prototype;\n if (!(pt instanceof Super)) {\n var t = function t() {};\n ;\n t.prototype = Super.prototype;\n t = new t();\n copy(pt, t);\n Class.prototype = pt = t;\n }\n if (pt.constructor != Class) {\n if (typeof Class != 'function') {\n console.error(\"unknown Class:\" + Class);\n }\n pt.constructor = Class;\n }\n}\n\n// Node Types\nvar NodeType = {};\nvar ELEMENT_NODE = NodeType.ELEMENT_NODE = 1;\nvar ATTRIBUTE_NODE = NodeType.ATTRIBUTE_NODE = 2;\nvar TEXT_NODE = NodeType.TEXT_NODE = 3;\nvar CDATA_SECTION_NODE = NodeType.CDATA_SECTION_NODE = 4;\nvar ENTITY_REFERENCE_NODE = NodeType.ENTITY_REFERENCE_NODE = 5;\nvar ENTITY_NODE = NodeType.ENTITY_NODE = 6;\nvar PROCESSING_INSTRUCTION_NODE = NodeType.PROCESSING_INSTRUCTION_NODE = 7;\nvar COMMENT_NODE = NodeType.COMMENT_NODE = 8;\nvar DOCUMENT_NODE = NodeType.DOCUMENT_NODE = 9;\nvar DOCUMENT_TYPE_NODE = NodeType.DOCUMENT_TYPE_NODE = 10;\nvar DOCUMENT_FRAGMENT_NODE = NodeType.DOCUMENT_FRAGMENT_NODE = 11;\nvar NOTATION_NODE = NodeType.NOTATION_NODE = 12;\n\n// ExceptionCode\nvar ExceptionCode = {};\nvar ExceptionMessage = {};\nvar INDEX_SIZE_ERR = ExceptionCode.INDEX_SIZE_ERR = (ExceptionMessage[1] = \"Index size error\", 1);\nvar DOMSTRING_SIZE_ERR = ExceptionCode.DOMSTRING_SIZE_ERR = (ExceptionMessage[2] = \"DOMString size error\", 2);\nvar HIERARCHY_REQUEST_ERR = ExceptionCode.HIERARCHY_REQUEST_ERR = (ExceptionMessage[3] = \"Hierarchy request error\", 3);\nvar WRONG_DOCUMENT_ERR = ExceptionCode.WRONG_DOCUMENT_ERR = (ExceptionMessage[4] = \"Wrong document\", 4);\nvar INVALID_CHARACTER_ERR = ExceptionCode.INVALID_CHARACTER_ERR = (ExceptionMessage[5] = \"Invalid character\", 5);\nvar NO_DATA_ALLOWED_ERR = ExceptionCode.NO_DATA_ALLOWED_ERR = (ExceptionMessage[6] = \"No data allowed\", 6);\nvar NO_MODIFICATION_ALLOWED_ERR = ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = (ExceptionMessage[7] = \"No modification allowed\", 7);\nvar NOT_FOUND_ERR = ExceptionCode.NOT_FOUND_ERR = (ExceptionMessage[8] = \"Not found\", 8);\nvar NOT_SUPPORTED_ERR = ExceptionCode.NOT_SUPPORTED_ERR = (ExceptionMessage[9] = \"Not supported\", 9);\nvar INUSE_ATTRIBUTE_ERR = ExceptionCode.INUSE_ATTRIBUTE_ERR = (ExceptionMessage[10] = \"Attribute in use\", 10);\n//level2\nvar INVALID_STATE_ERR = ExceptionCode.INVALID_STATE_ERR = (ExceptionMessage[11] = \"Invalid state\", 11);\nvar SYNTAX_ERR = ExceptionCode.SYNTAX_ERR = (ExceptionMessage[12] = \"Syntax error\", 12);\nvar INVALID_MODIFICATION_ERR = ExceptionCode.INVALID_MODIFICATION_ERR = (ExceptionMessage[13] = \"Invalid modification\", 13);\nvar NAMESPACE_ERR = ExceptionCode.NAMESPACE_ERR = (ExceptionMessage[14] = \"Invalid namespace\", 14);\nvar INVALID_ACCESS_ERR = ExceptionCode.INVALID_ACCESS_ERR = (ExceptionMessage[15] = \"Invalid access\", 15);\n\n/**\n * DOM Level 2\n * Object DOMException\n * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/ecma-script-binding.html\n * @see http://www.w3.org/TR/REC-DOM-Level-1/ecma-script-language-binding.html\n */\nfunction DOMException(code, message) {\n if (message instanceof Error) {\n var error = message;\n } else {\n error = this;\n Error.call(this, ExceptionMessage[code]);\n this.message = ExceptionMessage[code];\n if (Error.captureStackTrace) Error.captureStackTrace(this, DOMException);\n }\n error.code = code;\n if (message) this.message = this.message + \": \" + message;\n return error;\n}\n;\nDOMException.prototype = Error.prototype;\ncopy(ExceptionCode, DOMException);\n\n/**\n * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-536297177\n * The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented. NodeList objects in the DOM are live.\n * The items in the NodeList are accessible via an integral index, starting from 0.\n */\nfunction NodeList() {}\n;\nNodeList.prototype = {\n /**\n * The number of nodes in the list. The range of valid child node indices is 0 to length-1 inclusive.\n * @standard level1\n */\n length: 0,\n /**\n * Returns the indexth item in the collection. If index is greater than or equal to the number of nodes in the list, this returns null.\n * @standard level1\n * @param index unsigned long\n * Index into the collection.\n * @return Node\n * \tThe node at the indexth position in the NodeList, or null if that is not a valid index.\n */\n item: function item(index) {\n return index >= 0 && index < this.length ? this[index] : null;\n },\n toString: function toString(isHTML, nodeFilter) {\n for (var buf = [], i = 0; i < this.length; i++) {\n serializeToString(this[i], buf, isHTML, nodeFilter);\n }\n return buf.join('');\n },\n /**\n * @private\n * @param {function (Node):boolean} predicate\n * @returns {Node[]}\n */\n filter: function filter(predicate) {\n return Array.prototype.filter.call(this, predicate);\n },\n /**\n * @private\n * @param {Node} item\n * @returns {number}\n */\n indexOf: function indexOf(item) {\n return Array.prototype.indexOf.call(this, item);\n }\n};\nfunction LiveNodeList(node, refresh) {\n this._node = node;\n this._refresh = refresh;\n _updateLiveList(this);\n}\nfunction _updateLiveList(list) {\n var inc = list._node._inc || list._node.ownerDocument._inc;\n if (list._inc !== inc) {\n var ls = list._refresh(list._node);\n __set__(list, 'length', ls.length);\n if (!list.$$length || ls.length < list.$$length) {\n for (var i = ls.length; (i in list); i++) {\n if (Object.prototype.hasOwnProperty.call(list, i)) {\n delete list[i];\n }\n }\n }\n copy(ls, list);\n list._inc = inc;\n }\n}\nLiveNodeList.prototype.item = function (i) {\n _updateLiveList(this);\n return this[i] || null;\n};\n_extends(LiveNodeList, NodeList);\n\n/**\n * Objects implementing the NamedNodeMap interface are used\n * to represent collections of nodes that can be accessed by name.\n * Note that NamedNodeMap does not inherit from NodeList;\n * NamedNodeMaps are not maintained in any particular order.\n * Objects contained in an object implementing NamedNodeMap may also be accessed by an ordinal index,\n * but this is simply to allow convenient enumeration of the contents of a NamedNodeMap,\n * and does not imply that the DOM specifies an order to these Nodes.\n * NamedNodeMap objects in the DOM are live.\n * used for attributes or DocumentType entities\n */\nfunction NamedNodeMap() {}\n;\nfunction _findNodeIndex(list, node) {\n var i = list.length;\n while (i--) {\n if (list[i] === node) {\n return i;\n }\n }\n}\nfunction _addNamedNode(el, list, newAttr, oldAttr) {\n if (oldAttr) {\n list[_findNodeIndex(list, oldAttr)] = newAttr;\n } else {\n list[list.length++] = newAttr;\n }\n if (el) {\n newAttr.ownerElement = el;\n var doc = el.ownerDocument;\n if (doc) {\n oldAttr && _onRemoveAttribute(doc, el, oldAttr);\n _onAddAttribute(doc, el, newAttr);\n }\n }\n}\nfunction _removeNamedNode(el, list, attr) {\n //console.log('remove attr:'+attr)\n var i = _findNodeIndex(list, attr);\n if (i >= 0) {\n var lastIndex = list.length - 1;\n while (i < lastIndex) {\n list[i] = list[++i];\n }\n list.length = lastIndex;\n if (el) {\n var doc = el.ownerDocument;\n if (doc) {\n _onRemoveAttribute(doc, el, attr);\n attr.ownerElement = null;\n }\n }\n } else {\n throw new DOMException(NOT_FOUND_ERR, new Error(el.tagName + '@' + attr));\n }\n}\nNamedNodeMap.prototype = {\n length: 0,\n item: NodeList.prototype.item,\n getNamedItem: function getNamedItem(key) {\n //\t\tif(key.indexOf(':')>0 || key == 'xmlns'){\n //\t\t\treturn null;\n //\t\t}\n //console.log()\n var i = this.length;\n while (i--) {\n var attr = this[i];\n //console.log(attr.nodeName,key)\n if (attr.nodeName == key) {\n return attr;\n }\n }\n },\n setNamedItem: function setNamedItem(attr) {\n var el = attr.ownerElement;\n if (el && el != this._ownerElement) {\n throw new DOMException(INUSE_ATTRIBUTE_ERR);\n }\n var oldAttr = this.getNamedItem(attr.nodeName);\n _addNamedNode(this._ownerElement, this, attr, oldAttr);\n return oldAttr;\n },\n /* returns Node */\n setNamedItemNS: function setNamedItemNS(attr) {\n // raises: WRONG_DOCUMENT_ERR,NO_MODIFICATION_ALLOWED_ERR,INUSE_ATTRIBUTE_ERR\n var el = attr.ownerElement,\n oldAttr;\n if (el && el != this._ownerElement) {\n throw new DOMException(INUSE_ATTRIBUTE_ERR);\n }\n oldAttr = this.getNamedItemNS(attr.namespaceURI, attr.localName);\n _addNamedNode(this._ownerElement, this, attr, oldAttr);\n return oldAttr;\n },\n /* returns Node */\n removeNamedItem: function removeNamedItem(key) {\n var attr = this.getNamedItem(key);\n _removeNamedNode(this._ownerElement, this, attr);\n return attr;\n },\n // raises: NOT_FOUND_ERR,NO_MODIFICATION_ALLOWED_ERR\n\n //for level2\n removeNamedItemNS: function removeNamedItemNS(namespaceURI, localName) {\n var attr = this.getNamedItemNS(namespaceURI, localName);\n _removeNamedNode(this._ownerElement, this, attr);\n return attr;\n },\n getNamedItemNS: function getNamedItemNS(namespaceURI, localName) {\n var i = this.length;\n while (i--) {\n var node = this[i];\n if (node.localName == localName && node.namespaceURI == namespaceURI) {\n return node;\n }\n }\n return null;\n }\n};\n\n/**\n * The DOMImplementation interface represents an object providing methods\n * which are not dependent on any particular document.\n * Such an object is returned by the `Document.implementation` property.\n *\n * __The individual methods describe the differences compared to the specs.__\n *\n * @constructor\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation MDN\n * @see https://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-102161490 DOM Level 1 Core (Initial)\n * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-102161490 DOM Level 2 Core\n * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-102161490 DOM Level 3 Core\n * @see https://dom.spec.whatwg.org/#domimplementation DOM Living Standard\n */\nfunction DOMImplementation() {}\nDOMImplementation.prototype = {\n /**\n * The DOMImplementation.hasFeature() method returns a Boolean flag indicating if a given feature is supported.\n * The different implementations fairly diverged in what kind of features were reported.\n * The latest version of the spec settled to force this method to always return true, where the functionality was accurate and in use.\n *\n * @deprecated It is deprecated and modern browsers return true in all cases.\n *\n * @param {string} feature\n * @param {string} [version]\n * @returns {boolean} always true\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/hasFeature MDN\n * @see https://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-5CED94D7 DOM Level 1 Core\n * @see https://dom.spec.whatwg.org/#dom-domimplementation-hasfeature DOM Living Standard\n */\n hasFeature: function hasFeature(feature, version) {\n return true;\n },\n /**\n * Creates an XML Document object of the specified type with its document element.\n *\n * __It behaves slightly different from the description in the living standard__:\n * - There is no interface/class `XMLDocument`, it returns a `Document` instance.\n * - `contentType`, `encoding`, `mode`, `origin`, `url` fields are currently not declared.\n * - this implementation is not validating names or qualified names\n * (when parsing XML strings, the SAX parser takes care of that)\n *\n * @param {string|null} namespaceURI\n * @param {string} qualifiedName\n * @param {DocumentType=null} doctype\n * @returns {Document}\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocument MDN\n * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createDocument DOM Level 2 Core (initial)\n * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument DOM Level 2 Core\n *\n * @see https://dom.spec.whatwg.org/#validate-and-extract DOM: Validate and extract\n * @see https://www.w3.org/TR/xml/#NT-NameStartChar XML Spec: Names\n * @see https://www.w3.org/TR/xml-names/#ns-qualnames XML Namespaces: Qualified names\n */\n createDocument: function createDocument(namespaceURI, qualifiedName, doctype) {\n var doc = new Document();\n doc.implementation = this;\n doc.childNodes = new NodeList();\n doc.doctype = doctype || null;\n if (doctype) {\n doc.appendChild(doctype);\n }\n if (qualifiedName) {\n var root = doc.createElementNS(namespaceURI, qualifiedName);\n doc.appendChild(root);\n }\n return doc;\n },\n /**\n * Returns a doctype, with the given `qualifiedName`, `publicId`, and `systemId`.\n *\n * __This behavior is slightly different from the in the specs__:\n * - this implementation is not validating names or qualified names\n * (when parsing XML strings, the SAX parser takes care of that)\n *\n * @param {string} qualifiedName\n * @param {string} [publicId]\n * @param {string} [systemId]\n * @returns {DocumentType} which can either be used with `DOMImplementation.createDocument` upon document creation\n * \t\t\t\t or can be put into the document via methods like `Node.insertBefore()` or `Node.replaceChild()`\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocumentType MDN\n * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createDocType DOM Level 2 Core\n * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocumenttype DOM Living Standard\n *\n * @see https://dom.spec.whatwg.org/#validate-and-extract DOM: Validate and extract\n * @see https://www.w3.org/TR/xml/#NT-NameStartChar XML Spec: Names\n * @see https://www.w3.org/TR/xml-names/#ns-qualnames XML Namespaces: Qualified names\n */\n createDocumentType: function createDocumentType(qualifiedName, publicId, systemId) {\n var node = new DocumentType();\n node.name = qualifiedName;\n node.nodeName = qualifiedName;\n node.publicId = publicId || '';\n node.systemId = systemId || '';\n return node;\n }\n};\n\n/**\n * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247\n */\n\nfunction Node() {}\n;\nNode.prototype = {\n firstChild: null,\n lastChild: null,\n previousSibling: null,\n nextSibling: null,\n attributes: null,\n parentNode: null,\n childNodes: null,\n ownerDocument: null,\n nodeValue: null,\n namespaceURI: null,\n prefix: null,\n localName: null,\n // Modified in DOM Level 2:\n insertBefore: function insertBefore(newChild, refChild) {\n //raises\n return _insertBefore(this, newChild, refChild);\n },\n replaceChild: function replaceChild(newChild, oldChild) {\n //raises\n _insertBefore(this, newChild, oldChild, assertPreReplacementValidityInDocument);\n if (oldChild) {\n this.removeChild(oldChild);\n }\n },\n removeChild: function removeChild(oldChild) {\n return _removeChild(this, oldChild);\n },\n appendChild: function appendChild(newChild) {\n return this.insertBefore(newChild, null);\n },\n hasChildNodes: function hasChildNodes() {\n return this.firstChild != null;\n },\n cloneNode: function cloneNode(deep) {\n return _cloneNode(this.ownerDocument || this, this, deep);\n },\n // Modified in DOM Level 2:\n normalize: function normalize() {\n var child = this.firstChild;\n while (child) {\n var next = child.nextSibling;\n if (next && next.nodeType == TEXT_NODE && child.nodeType == TEXT_NODE) {\n this.removeChild(next);\n child.appendData(next.data);\n } else {\n child.normalize();\n child = next;\n }\n }\n },\n // Introduced in DOM Level 2:\n isSupported: function isSupported(feature, version) {\n return this.ownerDocument.implementation.hasFeature(feature, version);\n },\n // Introduced in DOM Level 2:\n hasAttributes: function hasAttributes() {\n return this.attributes.length > 0;\n },\n /**\n * Look up the prefix associated to the given namespace URI, starting from this node.\n * **The default namespace declarations are ignored by this method.**\n * See Namespace Prefix Lookup for details on the algorithm used by this method.\n *\n * _Note: The implementation seems to be incomplete when compared to the algorithm described in the specs._\n *\n * @param {string | null} namespaceURI\n * @returns {string | null}\n * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-lookupNamespacePrefix\n * @see https://www.w3.org/TR/DOM-Level-3-Core/namespaces-algorithms.html#lookupNamespacePrefixAlgo\n * @see https://dom.spec.whatwg.org/#dom-node-lookupprefix\n * @see https://github.com/xmldom/xmldom/issues/322\n */\n lookupPrefix: function lookupPrefix(namespaceURI) {\n var el = this;\n while (el) {\n var map = el._nsMap;\n //console.dir(map)\n if (map) {\n for (var n in map) {\n if (Object.prototype.hasOwnProperty.call(map, n) && map[n] === namespaceURI) {\n return n;\n }\n }\n }\n el = el.nodeType == ATTRIBUTE_NODE ? el.ownerDocument : el.parentNode;\n }\n return null;\n },\n // Introduced in DOM Level 3:\n lookupNamespaceURI: function lookupNamespaceURI(prefix) {\n var el = this;\n while (el) {\n var map = el._nsMap;\n //console.dir(map)\n if (map) {\n if (Object.prototype.hasOwnProperty.call(map, prefix)) {\n return map[prefix];\n }\n }\n el = el.nodeType == ATTRIBUTE_NODE ? el.ownerDocument : el.parentNode;\n }\n return null;\n },\n // Introduced in DOM Level 3:\n isDefaultNamespace: function isDefaultNamespace(namespaceURI) {\n var prefix = this.lookupPrefix(namespaceURI);\n return prefix == null;\n }\n};\nfunction _xmlEncoder(c) {\n return c == '<' && '<' || c == '>' && '>' || c == '&' && '&' || c == '\"' && '"' || '&#' + c.charCodeAt() + ';';\n}\ncopy(NodeType, Node);\ncopy(NodeType, Node.prototype);\n\n/**\n * @param callback return true for continue,false for break\n * @return boolean true: break visit;\n */\nfunction _visitNode(node, callback) {\n if (callback(node)) {\n return true;\n }\n if (node = node.firstChild) {\n do {\n if (_visitNode(node, callback)) {\n return true;\n }\n } while (node = node.nextSibling);\n }\n}\nfunction Document() {\n this.ownerDocument = this;\n}\nfunction _onAddAttribute(doc, el, newAttr) {\n doc && doc._inc++;\n var ns = newAttr.namespaceURI;\n if (ns === NAMESPACE.XMLNS) {\n //update namespace\n el._nsMap[newAttr.prefix ? newAttr.localName : ''] = newAttr.value;\n }\n}\nfunction _onRemoveAttribute(doc, el, newAttr, remove) {\n doc && doc._inc++;\n var ns = newAttr.namespaceURI;\n if (ns === NAMESPACE.XMLNS) {\n //update namespace\n delete el._nsMap[newAttr.prefix ? newAttr.localName : ''];\n }\n}\n\n/**\n * Updates `el.childNodes`, updating the indexed items and it's `length`.\n * Passing `newChild` means it will be appended.\n * Otherwise it's assumed that an item has been removed,\n * and `el.firstNode` and it's `.nextSibling` are used\n * to walk the current list of child nodes.\n *\n * @param {Document} doc\n * @param {Node} el\n * @param {Node} [newChild]\n * @private\n */\nfunction _onUpdateChild(doc, el, newChild) {\n if (doc && doc._inc) {\n doc._inc++;\n //update childNodes\n var cs = el.childNodes;\n if (newChild) {\n cs[cs.length++] = newChild;\n } else {\n var child = el.firstChild;\n var i = 0;\n while (child) {\n cs[i++] = child;\n child = child.nextSibling;\n }\n cs.length = i;\n delete cs[cs.length];\n }\n }\n}\n\n/**\n * Removes the connections between `parentNode` and `child`\n * and any existing `child.previousSibling` or `child.nextSibling`.\n *\n * @see https://github.com/xmldom/xmldom/issues/135\n * @see https://github.com/xmldom/xmldom/issues/145\n *\n * @param {Node} parentNode\n * @param {Node} child\n * @returns {Node} the child that was removed.\n * @private\n */\nfunction _removeChild(parentNode, child) {\n var previous = child.previousSibling;\n var next = child.nextSibling;\n if (previous) {\n previous.nextSibling = next;\n } else {\n parentNode.firstChild = next;\n }\n if (next) {\n next.previousSibling = previous;\n } else {\n parentNode.lastChild = previous;\n }\n child.parentNode = null;\n child.previousSibling = null;\n child.nextSibling = null;\n _onUpdateChild(parentNode.ownerDocument, parentNode);\n return child;\n}\n\n/**\n * Returns `true` if `node` can be a parent for insertion.\n * @param {Node} node\n * @returns {boolean}\n */\nfunction hasValidParentNodeType(node) {\n return node && (node.nodeType === Node.DOCUMENT_NODE || node.nodeType === Node.DOCUMENT_FRAGMENT_NODE || node.nodeType === Node.ELEMENT_NODE);\n}\n\n/**\n * Returns `true` if `node` can be inserted according to it's `nodeType`.\n * @param {Node} node\n * @returns {boolean}\n */\nfunction hasInsertableNodeType(node) {\n return node && (isElementNode(node) || isTextNode(node) || isDocTypeNode(node) || node.nodeType === Node.DOCUMENT_FRAGMENT_NODE || node.nodeType === Node.COMMENT_NODE || node.nodeType === Node.PROCESSING_INSTRUCTION_NODE);\n}\n\n/**\n * Returns true if `node` is a DOCTYPE node\n * @param {Node} node\n * @returns {boolean}\n */\nfunction isDocTypeNode(node) {\n return node && node.nodeType === Node.DOCUMENT_TYPE_NODE;\n}\n\n/**\n * Returns true if the node is an element\n * @param {Node} node\n * @returns {boolean}\n */\nfunction isElementNode(node) {\n return node && node.nodeType === Node.ELEMENT_NODE;\n}\n/**\n * Returns true if `node` is a text node\n * @param {Node} node\n * @returns {boolean}\n */\nfunction isTextNode(node) {\n return node && node.nodeType === Node.TEXT_NODE;\n}\n\n/**\n * Check if en element node can be inserted before `child`, or at the end if child is falsy,\n * according to the presence and position of a doctype node on the same level.\n *\n * @param {Document} doc The document node\n * @param {Node} child the node that would become the nextSibling if the element would be inserted\n * @returns {boolean} `true` if an element can be inserted before child\n * @private\n * https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n */\nfunction isElementInsertionPossible(doc, child) {\n var parentChildNodes = doc.childNodes || [];\n if (find(parentChildNodes, isElementNode) || isDocTypeNode(child)) {\n return false;\n }\n var docTypeNode = find(parentChildNodes, isDocTypeNode);\n return !(child && docTypeNode && parentChildNodes.indexOf(docTypeNode) > parentChildNodes.indexOf(child));\n}\n\n/**\n * Check if en element node can be inserted before `child`, or at the end if child is falsy,\n * according to the presence and position of a doctype node on the same level.\n *\n * @param {Node} doc The document node\n * @param {Node} child the node that would become the nextSibling if the element would be inserted\n * @returns {boolean} `true` if an element can be inserted before child\n * @private\n * https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n */\nfunction isElementReplacementPossible(doc, child) {\n var parentChildNodes = doc.childNodes || [];\n function hasElementChildThatIsNotChild(node) {\n return isElementNode(node) && node !== child;\n }\n if (find(parentChildNodes, hasElementChildThatIsNotChild)) {\n return false;\n }\n var docTypeNode = find(parentChildNodes, isDocTypeNode);\n return !(child && docTypeNode && parentChildNodes.indexOf(docTypeNode) > parentChildNodes.indexOf(child));\n}\n\n/**\n * @private\n * Steps 1-5 of the checks before inserting and before replacing a child are the same.\n *\n * @param {Node} parent the parent node to insert `node` into\n * @param {Node} node the node to insert\n * @param {Node=} child the node that should become the `nextSibling` of `node`\n * @returns {Node}\n * @throws DOMException for several node combinations that would create a DOM that is not well-formed.\n * @throws DOMException if `child` is provided but is not a child of `parent`.\n * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n * @see https://dom.spec.whatwg.org/#concept-node-replace\n */\nfunction assertPreInsertionValidity1to5(parent, node, child) {\n // 1. If `parent` is not a Document, DocumentFragment, or Element node, then throw a \"HierarchyRequestError\" DOMException.\n if (!hasValidParentNodeType(parent)) {\n throw new DOMException(HIERARCHY_REQUEST_ERR, 'Unexpected parent node type ' + parent.nodeType);\n }\n // 2. If `node` is a host-including inclusive ancestor of `parent`, then throw a \"HierarchyRequestError\" DOMException.\n // not implemented!\n // 3. If `child` is non-null and its parent is not `parent`, then throw a \"NotFoundError\" DOMException.\n if (child && child.parentNode !== parent) {\n throw new DOMException(NOT_FOUND_ERR, 'child not in parent');\n }\n if (\n // 4. If `node` is not a DocumentFragment, DocumentType, Element, or CharacterData node, then throw a \"HierarchyRequestError\" DOMException.\n !hasInsertableNodeType(node) ||\n // 5. If either `node` is a Text node and `parent` is a document,\n // the sax parser currently adds top level text nodes, this will be fixed in 0.9.0\n // || (node.nodeType === Node.TEXT_NODE && parent.nodeType === Node.DOCUMENT_NODE)\n // or `node` is a doctype and `parent` is not a document, then throw a \"HierarchyRequestError\" DOMException.\n isDocTypeNode(node) && parent.nodeType !== Node.DOCUMENT_NODE) {\n throw new DOMException(HIERARCHY_REQUEST_ERR, 'Unexpected node type ' + node.nodeType + ' for parent node type ' + parent.nodeType);\n }\n}\n\n/**\n * @private\n * Step 6 of the checks before inserting and before replacing a child are different.\n *\n * @param {Document} parent the parent node to insert `node` into\n * @param {Node} node the node to insert\n * @param {Node | undefined} child the node that should become the `nextSibling` of `node`\n * @returns {Node}\n * @throws DOMException for several node combinations that would create a DOM that is not well-formed.\n * @throws DOMException if `child` is provided but is not a child of `parent`.\n * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n * @see https://dom.spec.whatwg.org/#concept-node-replace\n */\nfunction assertPreInsertionValidityInDocument(parent, node, child) {\n var parentChildNodes = parent.childNodes || [];\n var nodeChildNodes = node.childNodes || [];\n\n // DocumentFragment\n if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n var nodeChildElements = nodeChildNodes.filter(isElementNode);\n // If node has more than one element child or has a Text node child.\n if (nodeChildElements.length > 1 || find(nodeChildNodes, isTextNode)) {\n throw new DOMException(HIERARCHY_REQUEST_ERR, 'More than one element or text in fragment');\n }\n // Otherwise, if `node` has one element child and either `parent` has an element child,\n // `child` is a doctype, or `child` is non-null and a doctype is following `child`.\n if (nodeChildElements.length === 1 && !isElementInsertionPossible(parent, child)) {\n throw new DOMException(HIERARCHY_REQUEST_ERR, 'Element in fragment can not be inserted before doctype');\n }\n }\n // Element\n if (isElementNode(node)) {\n // `parent` has an element child, `child` is a doctype,\n // or `child` is non-null and a doctype is following `child`.\n if (!isElementInsertionPossible(parent, child)) {\n throw new DOMException(HIERARCHY_REQUEST_ERR, 'Only one element can be added and only after doctype');\n }\n }\n // DocumentType\n if (isDocTypeNode(node)) {\n // `parent` has a doctype child,\n if (find(parentChildNodes, isDocTypeNode)) {\n throw new DOMException(HIERARCHY_REQUEST_ERR, 'Only one doctype is allowed');\n }\n var parentElementChild = find(parentChildNodes, isElementNode);\n // `child` is non-null and an element is preceding `child`,\n if (child && parentChildNodes.indexOf(parentElementChild) < parentChildNodes.indexOf(child)) {\n throw new DOMException(HIERARCHY_REQUEST_ERR, 'Doctype can only be inserted before an element');\n }\n // or `child` is null and `parent` has an element child.\n if (!child && parentElementChild) {\n throw new DOMException(HIERARCHY_REQUEST_ERR, 'Doctype can not be appended since element is present');\n }\n }\n}\n\n/**\n * @private\n * Step 6 of the checks before inserting and before replacing a child are different.\n *\n * @param {Document} parent the parent node to insert `node` into\n * @param {Node} node the node to insert\n * @param {Node | undefined} child the node that should become the `nextSibling` of `node`\n * @returns {Node}\n * @throws DOMException for several node combinations that would create a DOM that is not well-formed.\n * @throws DOMException if `child` is provided but is not a child of `parent`.\n * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n * @see https://dom.spec.whatwg.org/#concept-node-replace\n */\nfunction assertPreReplacementValidityInDocument(parent, node, child) {\n var parentChildNodes = parent.childNodes || [];\n var nodeChildNodes = node.childNodes || [];\n\n // DocumentFragment\n if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n var nodeChildElements = nodeChildNodes.filter(isElementNode);\n // If `node` has more than one element child or has a Text node child.\n if (nodeChildElements.length > 1 || find(nodeChildNodes, isTextNode)) {\n throw new DOMException(HIERARCHY_REQUEST_ERR, 'More than one element or text in fragment');\n }\n // Otherwise, if `node` has one element child and either `parent` has an element child that is not `child` or a doctype is following `child`.\n if (nodeChildElements.length === 1 && !isElementReplacementPossible(parent, child)) {\n throw new DOMException(HIERARCHY_REQUEST_ERR, 'Element in fragment can not be inserted before doctype');\n }\n }\n // Element\n if (isElementNode(node)) {\n // `parent` has an element child that is not `child` or a doctype is following `child`.\n if (!isElementReplacementPossible(parent, child)) {\n throw new DOMException(HIERARCHY_REQUEST_ERR, 'Only one element can be added and only after doctype');\n }\n }\n // DocumentType\n if (isDocTypeNode(node)) {\n var hasDoctypeChildThatIsNotChild = function hasDoctypeChildThatIsNotChild(node) {\n return isDocTypeNode(node) && node !== child;\n }; // `parent` has a doctype child that is not `child`,\n if (find(parentChildNodes, hasDoctypeChildThatIsNotChild)) {\n throw new DOMException(HIERARCHY_REQUEST_ERR, 'Only one doctype is allowed');\n }\n var parentElementChild = find(parentChildNodes, isElementNode);\n // or an element is preceding `child`.\n if (child && parentChildNodes.indexOf(parentElementChild) < parentChildNodes.indexOf(child)) {\n throw new DOMException(HIERARCHY_REQUEST_ERR, 'Doctype can only be inserted before an element');\n }\n }\n}\n\n/**\n * @private\n * @param {Node} parent the parent node to insert `node` into\n * @param {Node} node the node to insert\n * @param {Node=} child the node that should become the `nextSibling` of `node`\n * @returns {Node}\n * @throws DOMException for several node combinations that would create a DOM that is not well-formed.\n * @throws DOMException if `child` is provided but is not a child of `parent`.\n * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n */\nfunction _insertBefore(parent, node, child, _inDocumentAssertion) {\n // To ensure pre-insertion validity of a node into a parent before a child, run these steps:\n assertPreInsertionValidity1to5(parent, node, child);\n\n // If parent is a document, and any of the statements below, switched on the interface node implements,\n // are true, then throw a \"HierarchyRequestError\" DOMException.\n if (parent.nodeType === Node.DOCUMENT_NODE) {\n (_inDocumentAssertion || assertPreInsertionValidityInDocument)(parent, node, child);\n }\n var cp = node.parentNode;\n if (cp) {\n cp.removeChild(node); //remove and update\n }\n if (node.nodeType === DOCUMENT_FRAGMENT_NODE) {\n var newFirst = node.firstChild;\n if (newFirst == null) {\n return node;\n }\n var newLast = node.lastChild;\n } else {\n newFirst = newLast = node;\n }\n var pre = child ? child.previousSibling : parent.lastChild;\n newFirst.previousSibling = pre;\n newLast.nextSibling = child;\n if (pre) {\n pre.nextSibling = newFirst;\n } else {\n parent.firstChild = newFirst;\n }\n if (child == null) {\n parent.lastChild = newLast;\n } else {\n child.previousSibling = newLast;\n }\n do {\n newFirst.parentNode = parent;\n } while (newFirst !== newLast && (newFirst = newFirst.nextSibling));\n _onUpdateChild(parent.ownerDocument || parent, parent);\n //console.log(parent.lastChild.nextSibling == null)\n if (node.nodeType == DOCUMENT_FRAGMENT_NODE) {\n node.firstChild = node.lastChild = null;\n }\n return node;\n}\n\n/**\n * Appends `newChild` to `parentNode`.\n * If `newChild` is already connected to a `parentNode` it is first removed from it.\n *\n * @see https://github.com/xmldom/xmldom/issues/135\n * @see https://github.com/xmldom/xmldom/issues/145\n * @param {Node} parentNode\n * @param {Node} newChild\n * @returns {Node}\n * @private\n */\nfunction _appendSingleChild(parentNode, newChild) {\n if (newChild.parentNode) {\n newChild.parentNode.removeChild(newChild);\n }\n newChild.parentNode = parentNode;\n newChild.previousSibling = parentNode.lastChild;\n newChild.nextSibling = null;\n if (newChild.previousSibling) {\n newChild.previousSibling.nextSibling = newChild;\n } else {\n parentNode.firstChild = newChild;\n }\n parentNode.lastChild = newChild;\n _onUpdateChild(parentNode.ownerDocument, parentNode, newChild);\n return newChild;\n}\nDocument.prototype = {\n //implementation : null,\n nodeName: '#document',\n nodeType: DOCUMENT_NODE,\n /**\n * The DocumentType node of the document.\n *\n * @readonly\n * @type DocumentType\n */\n doctype: null,\n documentElement: null,\n _inc: 1,\n insertBefore: function insertBefore(newChild, refChild) {\n //raises\n if (newChild.nodeType == DOCUMENT_FRAGMENT_NODE) {\n var child = newChild.firstChild;\n while (child) {\n var next = child.nextSibling;\n this.insertBefore(child, refChild);\n child = next;\n }\n return newChild;\n }\n _insertBefore(this, newChild, refChild);\n newChild.ownerDocument = this;\n if (this.documentElement === null && newChild.nodeType === ELEMENT_NODE) {\n this.documentElement = newChild;\n }\n return newChild;\n },\n removeChild: function removeChild(oldChild) {\n if (this.documentElement == oldChild) {\n this.documentElement = null;\n }\n return _removeChild(this, oldChild);\n },\n replaceChild: function replaceChild(newChild, oldChild) {\n //raises\n _insertBefore(this, newChild, oldChild, assertPreReplacementValidityInDocument);\n newChild.ownerDocument = this;\n if (oldChild) {\n this.removeChild(oldChild);\n }\n if (isElementNode(newChild)) {\n this.documentElement = newChild;\n }\n },\n // Introduced in DOM Level 2:\n importNode: function importNode(importedNode, deep) {\n return _importNode(this, importedNode, deep);\n },\n // Introduced in DOM Level 2:\n getElementById: function getElementById(id) {\n var rtv = null;\n _visitNode(this.documentElement, function (node) {\n if (node.nodeType == ELEMENT_NODE) {\n if (node.getAttribute('id') == id) {\n rtv = node;\n return true;\n }\n }\n });\n return rtv;\n },\n /**\n * The `getElementsByClassName` method of `Document` interface returns an array-like object\n * of all child elements which have **all** of the given class name(s).\n *\n * Returns an empty list if `classeNames` is an empty string or only contains HTML white space characters.\n *\n *\n * Warning: This is a live LiveNodeList.\n * Changes in the DOM will reflect in the array as the changes occur.\n * If an element selected by this array no longer qualifies for the selector,\n * it will automatically be removed. Be aware of this for iteration purposes.\n *\n * @param {string} classNames is a string representing the class name(s) to match; multiple class names are separated by (ASCII-)whitespace\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementsByClassName\n * @see https://dom.spec.whatwg.org/#concept-getelementsbyclassname\n */\n getElementsByClassName: function getElementsByClassName(classNames) {\n var classNamesSet = toOrderedSet(classNames);\n return new LiveNodeList(this, function (base) {\n var ls = [];\n if (classNamesSet.length > 0) {\n _visitNode(base.documentElement, function (node) {\n if (node !== base && node.nodeType === ELEMENT_NODE) {\n var nodeClassNames = node.getAttribute('class');\n // can be null if the attribute does not exist\n if (nodeClassNames) {\n // before splitting and iterating just compare them for the most common case\n var matches = classNames === nodeClassNames;\n if (!matches) {\n var nodeClassNamesSet = toOrderedSet(nodeClassNames);\n matches = classNamesSet.every(arrayIncludes(nodeClassNamesSet));\n }\n if (matches) {\n ls.push(node);\n }\n }\n }\n });\n }\n return ls;\n });\n },\n //document factory method:\n createElement: function createElement(tagName) {\n var node = new Element();\n node.ownerDocument = this;\n node.nodeName = tagName;\n node.tagName = tagName;\n node.localName = tagName;\n node.childNodes = new NodeList();\n var attrs = node.attributes = new NamedNodeMap();\n attrs._ownerElement = node;\n return node;\n },\n createDocumentFragment: function createDocumentFragment() {\n var node = new DocumentFragment();\n node.ownerDocument = this;\n node.childNodes = new NodeList();\n return node;\n },\n createTextNode: function createTextNode(data) {\n var node = new Text();\n node.ownerDocument = this;\n node.appendData(data);\n return node;\n },\n createComment: function createComment(data) {\n var node = new Comment();\n node.ownerDocument = this;\n node.appendData(data);\n return node;\n },\n createCDATASection: function createCDATASection(data) {\n var node = new CDATASection();\n node.ownerDocument = this;\n node.appendData(data);\n return node;\n },\n createProcessingInstruction: function createProcessingInstruction(target, data) {\n var node = new ProcessingInstruction();\n node.ownerDocument = this;\n node.tagName = node.nodeName = node.target = target;\n node.nodeValue = node.data = data;\n return node;\n },\n createAttribute: function createAttribute(name) {\n var node = new Attr();\n node.ownerDocument = this;\n node.name = name;\n node.nodeName = name;\n node.localName = name;\n node.specified = true;\n return node;\n },\n createEntityReference: function createEntityReference(name) {\n var node = new EntityReference();\n node.ownerDocument = this;\n node.nodeName = name;\n return node;\n },\n // Introduced in DOM Level 2:\n createElementNS: function createElementNS(namespaceURI, qualifiedName) {\n var node = new Element();\n var pl = qualifiedName.split(':');\n var attrs = node.attributes = new NamedNodeMap();\n node.childNodes = new NodeList();\n node.ownerDocument = this;\n node.nodeName = qualifiedName;\n node.tagName = qualifiedName;\n node.namespaceURI = namespaceURI;\n if (pl.length == 2) {\n node.prefix = pl[0];\n node.localName = pl[1];\n } else {\n //el.prefix = null;\n node.localName = qualifiedName;\n }\n attrs._ownerElement = node;\n return node;\n },\n // Introduced in DOM Level 2:\n createAttributeNS: function createAttributeNS(namespaceURI, qualifiedName) {\n var node = new Attr();\n var pl = qualifiedName.split(':');\n node.ownerDocument = this;\n node.nodeName = qualifiedName;\n node.name = qualifiedName;\n node.namespaceURI = namespaceURI;\n node.specified = true;\n if (pl.length == 2) {\n node.prefix = pl[0];\n node.localName = pl[1];\n } else {\n //el.prefix = null;\n node.localName = qualifiedName;\n }\n return node;\n }\n};\n_extends(Document, Node);\nfunction Element() {\n this._nsMap = {};\n}\n;\nElement.prototype = {\n nodeType: ELEMENT_NODE,\n hasAttribute: function hasAttribute(name) {\n return this.getAttributeNode(name) != null;\n },\n getAttribute: function getAttribute(name) {\n var attr = this.getAttributeNode(name);\n return attr && attr.value || '';\n },\n getAttributeNode: function getAttributeNode(name) {\n return this.attributes.getNamedItem(name);\n },\n setAttribute: function setAttribute(name, value) {\n var attr = this.ownerDocument.createAttribute(name);\n attr.value = attr.nodeValue = \"\" + value;\n this.setAttributeNode(attr);\n },\n removeAttribute: function removeAttribute(name) {\n var attr = this.getAttributeNode(name);\n attr && this.removeAttributeNode(attr);\n },\n //four real opeartion method\n appendChild: function appendChild(newChild) {\n if (newChild.nodeType === DOCUMENT_FRAGMENT_NODE) {\n return this.insertBefore(newChild, null);\n } else {\n return _appendSingleChild(this, newChild);\n }\n },\n setAttributeNode: function setAttributeNode(newAttr) {\n return this.attributes.setNamedItem(newAttr);\n },\n setAttributeNodeNS: function setAttributeNodeNS(newAttr) {\n return this.attributes.setNamedItemNS(newAttr);\n },\n removeAttributeNode: function removeAttributeNode(oldAttr) {\n //console.log(this == oldAttr.ownerElement)\n return this.attributes.removeNamedItem(oldAttr.nodeName);\n },\n //get real attribute name,and remove it by removeAttributeNode\n removeAttributeNS: function removeAttributeNS(namespaceURI, localName) {\n var old = this.getAttributeNodeNS(namespaceURI, localName);\n old && this.removeAttributeNode(old);\n },\n hasAttributeNS: function hasAttributeNS(namespaceURI, localName) {\n return this.getAttributeNodeNS(namespaceURI, localName) != null;\n },\n getAttributeNS: function getAttributeNS(namespaceURI, localName) {\n var attr = this.getAttributeNodeNS(namespaceURI, localName);\n return attr && attr.value || '';\n },\n setAttributeNS: function setAttributeNS(namespaceURI, qualifiedName, value) {\n var attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName);\n attr.value = attr.nodeValue = \"\" + value;\n this.setAttributeNode(attr);\n },\n getAttributeNodeNS: function getAttributeNodeNS(namespaceURI, localName) {\n return this.attributes.getNamedItemNS(namespaceURI, localName);\n },\n getElementsByTagName: function getElementsByTagName(tagName) {\n return new LiveNodeList(this, function (base) {\n var ls = [];\n _visitNode(base, function (node) {\n if (node !== base && node.nodeType == ELEMENT_NODE && (tagName === '*' || node.tagName == tagName)) {\n ls.push(node);\n }\n });\n return ls;\n });\n },\n getElementsByTagNameNS: function getElementsByTagNameNS(namespaceURI, localName) {\n return new LiveNodeList(this, function (base) {\n var ls = [];\n _visitNode(base, function (node) {\n if (node !== base && node.nodeType === ELEMENT_NODE && (namespaceURI === '*' || node.namespaceURI === namespaceURI) && (localName === '*' || node.localName == localName)) {\n ls.push(node);\n }\n });\n return ls;\n });\n }\n};\nDocument.prototype.getElementsByTagName = Element.prototype.getElementsByTagName;\nDocument.prototype.getElementsByTagNameNS = Element.prototype.getElementsByTagNameNS;\n_extends(Element, Node);\nfunction Attr() {}\n;\nAttr.prototype.nodeType = ATTRIBUTE_NODE;\n_extends(Attr, Node);\nfunction CharacterData() {}\n;\nCharacterData.prototype = {\n data: '',\n substringData: function substringData(offset, count) {\n return this.data.substring(offset, offset + count);\n },\n appendData: function appendData(text) {\n text = this.data + text;\n this.nodeValue = this.data = text;\n this.length = text.length;\n },\n insertData: function insertData(offset, text) {\n this.replaceData(offset, 0, text);\n },\n appendChild: function appendChild(newChild) {\n throw new Error(ExceptionMessage[HIERARCHY_REQUEST_ERR]);\n },\n deleteData: function deleteData(offset, count) {\n this.replaceData(offset, count, \"\");\n },\n replaceData: function replaceData(offset, count, text) {\n var start = this.data.substring(0, offset);\n var end = this.data.substring(offset + count);\n text = start + text + end;\n this.nodeValue = this.data = text;\n this.length = text.length;\n }\n};\n_extends(CharacterData, Node);\nfunction Text() {}\n;\nText.prototype = {\n nodeName: \"#text\",\n nodeType: TEXT_NODE,\n splitText: function splitText(offset) {\n var text = this.data;\n var newText = text.substring(offset);\n text = text.substring(0, offset);\n this.data = this.nodeValue = text;\n this.length = text.length;\n var newNode = this.ownerDocument.createTextNode(newText);\n if (this.parentNode) {\n this.parentNode.insertBefore(newNode, this.nextSibling);\n }\n return newNode;\n }\n};\n_extends(Text, CharacterData);\nfunction Comment() {}\n;\nComment.prototype = {\n nodeName: \"#comment\",\n nodeType: COMMENT_NODE\n};\n_extends(Comment, CharacterData);\nfunction CDATASection() {}\n;\nCDATASection.prototype = {\n nodeName: \"#cdata-section\",\n nodeType: CDATA_SECTION_NODE\n};\n_extends(CDATASection, CharacterData);\nfunction DocumentType() {}\n;\nDocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE;\n_extends(DocumentType, Node);\nfunction Notation() {}\n;\nNotation.prototype.nodeType = NOTATION_NODE;\n_extends(Notation, Node);\nfunction Entity() {}\n;\nEntity.prototype.nodeType = ENTITY_NODE;\n_extends(Entity, Node);\nfunction EntityReference() {}\n;\nEntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE;\n_extends(EntityReference, Node);\nfunction DocumentFragment() {}\n;\nDocumentFragment.prototype.nodeName = \"#document-fragment\";\nDocumentFragment.prototype.nodeType = DOCUMENT_FRAGMENT_NODE;\n_extends(DocumentFragment, Node);\nfunction ProcessingInstruction() {}\nProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE;\n_extends(ProcessingInstruction, Node);\nfunction XMLSerializer() {}\nXMLSerializer.prototype.serializeToString = function (node, isHtml, nodeFilter) {\n return nodeSerializeToString.call(node, isHtml, nodeFilter);\n};\nNode.prototype.toString = nodeSerializeToString;\nfunction nodeSerializeToString(isHtml, nodeFilter) {\n var buf = [];\n var refNode = this.nodeType == 9 && this.documentElement || this;\n var prefix = refNode.prefix;\n var uri = refNode.namespaceURI;\n if (uri && prefix == null) {\n //console.log(prefix)\n var prefix = refNode.lookupPrefix(uri);\n if (prefix == null) {\n //isHTML = true;\n var visibleNamespaces = [{\n namespace: uri,\n prefix: null\n }\n //{namespace:uri,prefix:''}\n ];\n }\n }\n serializeToString(this, buf, isHtml, nodeFilter, visibleNamespaces);\n //console.log('###',this.nodeType,uri,prefix,buf.join(''))\n return buf.join('');\n}\nfunction needNamespaceDefine(node, isHTML, visibleNamespaces) {\n var prefix = node.prefix || '';\n var uri = node.namespaceURI;\n // According to [Namespaces in XML 1.0](https://www.w3.org/TR/REC-xml-names/#ns-using) ,\n // and more specifically https://www.w3.org/TR/REC-xml-names/#nsc-NoPrefixUndecl :\n // > In a namespace declaration for a prefix [...], the attribute value MUST NOT be empty.\n // in a similar manner [Namespaces in XML 1.1](https://www.w3.org/TR/xml-names11/#ns-using)\n // and more specifically https://www.w3.org/TR/xml-names11/#nsc-NSDeclared :\n // > [...] Furthermore, the attribute value [...] must not be an empty string.\n // so serializing empty namespace value like xmlns:ds=\"\" would produce an invalid XML document.\n if (!uri) {\n return false;\n }\n if (prefix === \"xml\" && uri === NAMESPACE.XML || uri === NAMESPACE.XMLNS) {\n return false;\n }\n var i = visibleNamespaces.length;\n while (i--) {\n var ns = visibleNamespaces[i];\n // get namespace prefix\n if (ns.prefix === prefix) {\n return ns.namespace !== uri;\n }\n }\n return true;\n}\n/**\n * Well-formed constraint: No < in Attribute Values\n * > The replacement text of any entity referred to directly or indirectly\n * > in an attribute value must not contain a <.\n * @see https://www.w3.org/TR/xml11/#CleanAttrVals\n * @see https://www.w3.org/TR/xml11/#NT-AttValue\n *\n * Literal whitespace other than space that appear in attribute values\n * are serialized as their entity references, so they will be preserved.\n * (In contrast to whitespace literals in the input which are normalized to spaces)\n * @see https://www.w3.org/TR/xml11/#AVNormalize\n * @see https://w3c.github.io/DOM-Parsing/#serializing-an-element-s-attributes\n */\nfunction addSerializedAttribute(buf, qualifiedName, value) {\n buf.push(' ', qualifiedName, '=\"', value.replace(/[<>&\"\\t\\n\\r]/g, _xmlEncoder), '\"');\n}\nfunction serializeToString(node, buf, isHTML, nodeFilter, visibleNamespaces) {\n if (!visibleNamespaces) {\n visibleNamespaces = [];\n }\n if (nodeFilter) {\n node = nodeFilter(node);\n if (node) {\n if (typeof node == 'string') {\n buf.push(node);\n return;\n }\n } else {\n return;\n }\n //buf.sort.apply(attrs, attributeSorter);\n }\n switch (node.nodeType) {\n case ELEMENT_NODE:\n var attrs = node.attributes;\n var len = attrs.length;\n var child = node.firstChild;\n var nodeName = node.tagName;\n isHTML = NAMESPACE.isHTML(node.namespaceURI) || isHTML;\n var prefixedNodeName = nodeName;\n if (!isHTML && !node.prefix && node.namespaceURI) {\n var defaultNS;\n // lookup current default ns from `xmlns` attribute\n for (var ai = 0; ai < attrs.length; ai++) {\n if (attrs.item(ai).name === 'xmlns') {\n defaultNS = attrs.item(ai).value;\n break;\n }\n }\n if (!defaultNS) {\n // lookup current default ns in visibleNamespaces\n for (var nsi = visibleNamespaces.length - 1; nsi >= 0; nsi--) {\n var namespace = visibleNamespaces[nsi];\n if (namespace.prefix === '' && namespace.namespace === node.namespaceURI) {\n defaultNS = namespace.namespace;\n break;\n }\n }\n }\n if (defaultNS !== node.namespaceURI) {\n for (var nsi = visibleNamespaces.length - 1; nsi >= 0; nsi--) {\n var namespace = visibleNamespaces[nsi];\n if (namespace.namespace === node.namespaceURI) {\n if (namespace.prefix) {\n prefixedNodeName = namespace.prefix + ':' + nodeName;\n }\n break;\n }\n }\n }\n }\n buf.push('<', prefixedNodeName);\n for (var i = 0; i < len; i++) {\n // add namespaces for attributes\n var attr = attrs.item(i);\n if (attr.prefix == 'xmlns') {\n visibleNamespaces.push({\n prefix: attr.localName,\n namespace: attr.value\n });\n } else if (attr.nodeName == 'xmlns') {\n visibleNamespaces.push({\n prefix: '',\n namespace: attr.value\n });\n }\n }\n for (var i = 0; i < len; i++) {\n var attr = attrs.item(i);\n if (needNamespaceDefine(attr, isHTML, visibleNamespaces)) {\n var prefix = attr.prefix || '';\n var uri = attr.namespaceURI;\n addSerializedAttribute(buf, prefix ? 'xmlns:' + prefix : \"xmlns\", uri);\n visibleNamespaces.push({\n prefix: prefix,\n namespace: uri\n });\n }\n serializeToString(attr, buf, isHTML, nodeFilter, visibleNamespaces);\n }\n\n // add namespace for current node\n if (nodeName === prefixedNodeName && needNamespaceDefine(node, isHTML, visibleNamespaces)) {\n var prefix = node.prefix || '';\n var uri = node.namespaceURI;\n addSerializedAttribute(buf, prefix ? 'xmlns:' + prefix : \"xmlns\", uri);\n visibleNamespaces.push({\n prefix: prefix,\n namespace: uri\n });\n }\n if (child || isHTML && !/^(?:meta|link|img|br|hr|input)$/i.test(nodeName)) {\n buf.push('>');\n //if is cdata child node\n if (isHTML && /^script$/i.test(nodeName)) {\n while (child) {\n if (child.data) {\n buf.push(child.data);\n } else {\n serializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice());\n }\n child = child.nextSibling;\n }\n } else {\n while (child) {\n serializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice());\n child = child.nextSibling;\n }\n }\n buf.push('</', prefixedNodeName, '>');\n } else {\n buf.push('/>');\n }\n // remove added visible namespaces\n //visibleNamespaces.length = startVisibleNamespaces;\n return;\n case DOCUMENT_NODE:\n case DOCUMENT_FRAGMENT_NODE:\n var child = node.firstChild;\n while (child) {\n serializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice());\n child = child.nextSibling;\n }\n return;\n case ATTRIBUTE_NODE:\n return addSerializedAttribute(buf, node.name, node.value);\n case TEXT_NODE:\n /**\n * The ampersand character (&) and the left angle bracket (<) must not appear in their literal form,\n * except when used as markup delimiters, or within a comment, a processing instruction, or a CDATA section.\n * If they are needed elsewhere, they must be escaped using either numeric character references or the strings\n * `&` and `<` respectively.\n * The right angle bracket (>) may be represented using the string \" > \", and must, for compatibility,\n * be escaped using either `>` or a character reference when it appears in the string `]]>` in content,\n * when that string is not marking the end of a CDATA section.\n *\n * In the content of elements, character data is any string of characters\n * which does not contain the start-delimiter of any markup\n * and does not include the CDATA-section-close delimiter, `]]>`.\n *\n * @see https://www.w3.org/TR/xml/#NT-CharData\n * @see https://w3c.github.io/DOM-Parsing/#xml-serializing-a-text-node\n */\n return buf.push(node.data.replace(/[<&>]/g, _xmlEncoder));\n case CDATA_SECTION_NODE:\n return buf.push('<![CDATA[', node.data, ']]>');\n case COMMENT_NODE:\n return buf.push(\"<!--\", node.data, \"-->\");\n case DOCUMENT_TYPE_NODE:\n var pubid = node.publicId;\n var sysid = node.systemId;\n buf.push('<!DOCTYPE ', node.name);\n if (pubid) {\n buf.push(' PUBLIC ', pubid);\n if (sysid && sysid != '.') {\n buf.push(' ', sysid);\n }\n buf.push('>');\n } else if (sysid && sysid != '.') {\n buf.push(' SYSTEM ', sysid, '>');\n } else {\n var sub = node.internalSubset;\n if (sub) {\n buf.push(\" [\", sub, \"]\");\n }\n buf.push(\">\");\n }\n return;\n case PROCESSING_INSTRUCTION_NODE:\n return buf.push(\"<?\", node.target, \" \", node.data, \"?>\");\n case ENTITY_REFERENCE_NODE:\n return buf.push('&', node.nodeName, ';');\n //case ENTITY_NODE:\n //case NOTATION_NODE:\n default:\n buf.push('??', node.nodeName);\n }\n}\nfunction _importNode(doc, node, deep) {\n var node2;\n switch (node.nodeType) {\n case ELEMENT_NODE:\n node2 = node.cloneNode(false);\n node2.ownerDocument = doc;\n //var attrs = node2.attributes;\n //var len = attrs.length;\n //for(var i=0;i<len;i++){\n //node2.setAttributeNodeNS(importNode(doc,attrs.item(i),deep));\n //}\n case DOCUMENT_FRAGMENT_NODE:\n break;\n case ATTRIBUTE_NODE:\n deep = true;\n break;\n //case ENTITY_REFERENCE_NODE:\n //case PROCESSING_INSTRUCTION_NODE:\n ////case TEXT_NODE:\n //case CDATA_SECTION_NODE:\n //case COMMENT_NODE:\n //\tdeep = false;\n //\tbreak;\n //case DOCUMENT_NODE:\n //case DOCUMENT_TYPE_NODE:\n //cannot be imported.\n //case ENTITY_NODE:\n //case NOTATION_NODE:\n //can not hit in level3\n //default:throw e;\n }\n if (!node2) {\n node2 = node.cloneNode(false); //false\n }\n node2.ownerDocument = doc;\n node2.parentNode = null;\n if (deep) {\n var child = node.firstChild;\n while (child) {\n node2.appendChild(_importNode(doc, child, deep));\n child = child.nextSibling;\n }\n }\n return node2;\n}\n//\n//var _relationMap = {firstChild:1,lastChild:1,previousSibling:1,nextSibling:1,\n//\t\t\t\t\tattributes:1,childNodes:1,parentNode:1,documentElement:1,doctype,};\nfunction _cloneNode(doc, node, deep) {\n var node2 = new node.constructor();\n for (var n in node) {\n if (Object.prototype.hasOwnProperty.call(node, n)) {\n var v = node[n];\n if (_typeof(v) != \"object\") {\n if (v != node2[n]) {\n node2[n] = v;\n }\n }\n }\n }\n if (node.childNodes) {\n node2.childNodes = new NodeList();\n }\n node2.ownerDocument = doc;\n switch (node2.nodeType) {\n case ELEMENT_NODE:\n var attrs = node.attributes;\n var attrs2 = node2.attributes = new NamedNodeMap();\n var len = attrs.length;\n attrs2._ownerElement = node2;\n for (var i = 0; i < len; i++) {\n node2.setAttributeNode(_cloneNode(doc, attrs.item(i), true));\n }\n break;\n ;\n case ATTRIBUTE_NODE:\n deep = true;\n }\n if (deep) {\n var child = node.firstChild;\n while (child) {\n node2.appendChild(_cloneNode(doc, child, deep));\n child = child.nextSibling;\n }\n }\n return node2;\n}\nfunction __set__(object, key, value) {\n object[key] = value;\n}\n//do dynamic\ntry {\n if (Object.defineProperty) {\n var getTextContent = function getTextContent(node) {\n switch (node.nodeType) {\n case ELEMENT_NODE:\n case DOCUMENT_FRAGMENT_NODE:\n var buf = [];\n node = node.firstChild;\n while (node) {\n if (node.nodeType !== 7 && node.nodeType !== 8) {\n buf.push(getTextContent(node));\n }\n node = node.nextSibling;\n }\n return buf.join('');\n default:\n return node.nodeValue;\n }\n };\n Object.defineProperty(LiveNodeList.prototype, 'length', {\n get: function get() {\n _updateLiveList(this);\n return this.$$length;\n }\n });\n Object.defineProperty(Node.prototype, 'textContent', {\n get: function get() {\n return getTextContent(this);\n },\n set: function set(data) {\n switch (this.nodeType) {\n case ELEMENT_NODE:\n case DOCUMENT_FRAGMENT_NODE:\n while (this.firstChild) {\n this.removeChild(this.firstChild);\n }\n if (data || String(data)) {\n this.appendChild(this.ownerDocument.createTextNode(data));\n }\n break;\n default:\n this.data = data;\n this.value = data;\n this.nodeValue = data;\n }\n }\n });\n __set__ = function __set__(object, key, value) {\n //console.log(value)\n object['$$' + key] = value;\n };\n }\n} catch (e) {//ie8\n}\n\n//if(typeof require == 'function'){\nexports.DocumentType = DocumentType;\nexports.DOMException = DOMException;\nexports.DOMImplementation = DOMImplementation;\nexports.Element = Element;\nexports.Node = Node;\nexports.NodeList = NodeList;\nexports.XMLSerializer = XMLSerializer;\n//}","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar buildURL = require('./../helpers/buildURL');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\nvar btoa = typeof window !== 'undefined' && window.btoa && window.btoa.bind(window) || require('./../helpers/btoa');\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n var request = new XMLHttpRequest();\n var loadEvent = 'onreadystatechange';\n var xDomain = false;\n\n // For IE 8/9 CORS support\n // Only supports POST and GET calls and doesn't returns the response headers.\n // DON'T do this for testing b/c XMLHttpRequest is mocked, not XDomainRequest.\n if (process.env.NODE_ENV !== 'test' && typeof window !== 'undefined' && window.XDomainRequest && !('withCredentials' in request) && !isURLSameOrigin(config.url)) {\n request = new window.XDomainRequest();\n loadEvent = 'onload';\n xDomain = true;\n request.onprogress = function handleProgress() {};\n request.ontimeout = function handleTimeout() {};\n }\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password || '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n // Listen for ready state\n request[loadEvent] = function handleLoad() {\n if (!request || request.readyState !== 4 && !xDomain) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;\n var response = {\n data: responseData,\n // IE sends 1223 instead of 204 (https://github.com/mzabriskie/axios/issues/201)\n status: request.status === 1223 ? 204 : request.status,\n statusText: request.status === 1223 ? 'No Content' : request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n settle(resolve, reject, response);\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED', request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n var cookies = require('./../helpers/cookies');\n\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ? cookies.read(config.xsrfCookieName) : undefined;\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (config.withCredentials) {\n request.withCredentials = true;\n }\n\n // Add responseType to request if needed\n if (config.responseType) {\n try {\n request.responseType = config.responseType;\n } catch (e) {\n // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.\n // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.\n if (config.responseType !== 'json') {\n throw e;\n }\n }\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n request.abort();\n reject(cancel);\n // Clean up request\n request = null;\n });\n }\n if (requestData === undefined) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};","'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};","'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\nCancel.prototype.__CANCEL__ = true;\nmodule.exports = Cancel;","/**\n * Copyright (c) 2015-present, Facebook, Inc.\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\n'use strict';\n\nvar ReactDOMComponentFlags = {\n hasCachedChildNodes: 1 << 0\n};\nmodule.exports = ReactDOMComponentFlags;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar ARIADOMPropertyConfig = require('./ARIADOMPropertyConfig');\nvar BeforeInputEventPlugin = require('./BeforeInputEventPlugin');\nvar ChangeEventPlugin = require('./ChangeEventPlugin');\nvar DefaultEventPluginOrder = require('./DefaultEventPluginOrder');\nvar EnterLeaveEventPlugin = require('./EnterLeaveEventPlugin');\nvar HTMLDOMPropertyConfig = require('./HTMLDOMPropertyConfig');\nvar ReactComponentBrowserEnvironment = require('./ReactComponentBrowserEnvironment');\nvar ReactDOMComponent = require('./ReactDOMComponent');\nvar ReactDOMComponentTree = require('./ReactDOMComponentTree');\nvar ReactDOMEmptyComponent = require('./ReactDOMEmptyComponent');\nvar ReactDOMTreeTraversal = require('./ReactDOMTreeTraversal');\nvar ReactDOMTextComponent = require('./ReactDOMTextComponent');\nvar ReactDefaultBatchingStrategy = require('./ReactDefaultBatchingStrategy');\nvar ReactEventListener = require('./ReactEventListener');\nvar ReactInjection = require('./ReactInjection');\nvar ReactReconcileTransaction = require('./ReactReconcileTransaction');\nvar SVGDOMPropertyConfig = require('./SVGDOMPropertyConfig');\nvar SelectEventPlugin = require('./SelectEventPlugin');\nvar SimpleEventPlugin = require('./SimpleEventPlugin');\nvar alreadyInjected = false;\nfunction inject() {\n if (alreadyInjected) {\n // TODO: This is currently true because these injections are shared between\n // the client and the server package. They should be built independently\n // and not share any injection state. Then this problem will be solved.\n return;\n }\n alreadyInjected = true;\n ReactInjection.EventEmitter.injectReactEventListener(ReactEventListener);\n\n /**\n * Inject modules for resolving DOM hierarchy and plugin ordering.\n */\n ReactInjection.EventPluginHub.injectEventPluginOrder(DefaultEventPluginOrder);\n ReactInjection.EventPluginUtils.injectComponentTree(ReactDOMComponentTree);\n ReactInjection.EventPluginUtils.injectTreeTraversal(ReactDOMTreeTraversal);\n\n /**\n * Some important event plugins included by default (without having to require\n * them).\n */\n ReactInjection.EventPluginHub.injectEventPluginsByName({\n SimpleEventPlugin: SimpleEventPlugin,\n EnterLeaveEventPlugin: EnterLeaveEventPlugin,\n ChangeEventPlugin: ChangeEventPlugin,\n SelectEventPlugin: SelectEventPlugin,\n BeforeInputEventPlugin: BeforeInputEventPlugin\n });\n ReactInjection.HostComponent.injectGenericComponentClass(ReactDOMComponent);\n ReactInjection.HostComponent.injectTextComponentClass(ReactDOMTextComponent);\n ReactInjection.DOMProperty.injectDOMPropertyConfig(ARIADOMPropertyConfig);\n ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig);\n ReactInjection.DOMProperty.injectDOMPropertyConfig(SVGDOMPropertyConfig);\n ReactInjection.EmptyComponent.injectEmptyComponentFactory(function (instantiate) {\n return new ReactDOMEmptyComponent(instantiate);\n });\n ReactInjection.Updates.injectReconcileTransaction(ReactReconcileTransaction);\n ReactInjection.Updates.injectBatchingStrategy(ReactDefaultBatchingStrategy);\n ReactInjection.Component.injectEnvironment(ReactComponentBrowserEnvironment);\n}\nmodule.exports = {\n inject: inject\n};","/**\n * Copyright (c) 2014-present, Facebook, Inc.\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 */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\nvar invariant = require('fbjs/lib/invariant');\n\n/**\n * Accumulates items that must not be null or undefined into the first one. This\n * is used to conserve memory by avoiding array allocations, and thus sacrifices\n * API cleanness. Since `current` can be null before being passed in and not\n * null after this function, make sure to assign it back to `current`:\n *\n * `a = accumulateInto(a, b);`\n *\n * This API should be sparingly used. Try `accumulate` for something cleaner.\n *\n * @return {*|array<*>} An accumulation of items.\n */\n\nfunction accumulateInto(current, next) {\n !(next != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'accumulateInto(...): Accumulated items must not be null or undefined.') : _prodInvariant('30') : void 0;\n if (current == null) {\n return next;\n }\n\n // Both are not empty. Warning: Never call x.concat(y) when you are not\n // certain that x is an Array (x could be a string with concat method).\n if (Array.isArray(current)) {\n if (Array.isArray(next)) {\n current.push.apply(current, next);\n return current;\n }\n current.push(next);\n return current;\n }\n if (Array.isArray(next)) {\n // A bit too dangerous to mutate `next`.\n return [current].concat(next);\n }\n return [current, next];\n}\nmodule.exports = accumulateInto;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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 */\n\n'use strict';\n\n/**\n * @param {array} arr an \"accumulation\" of items which is either an Array or\n * a single item. Useful when paired with the `accumulate` module. This is a\n * simple utility that allows us to reason about a collection of items, but\n * handling the case when there is exactly one item (and we do not need to\n * allocate an array).\n */\nfunction forEachAccumulated(arr, cb, scope) {\n if (Array.isArray(arr)) {\n arr.forEach(cb, scope);\n } else if (arr) {\n cb.call(scope, arr);\n }\n}\nmodule.exports = forEachAccumulated;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');\nvar contentKey = null;\n\n/**\n * Gets the key used to access text content on a DOM node.\n *\n * @return {?string} Key used to access text content.\n * @internal\n */\nfunction getTextContentAccessor() {\n if (!contentKey && ExecutionEnvironment.canUseDOM) {\n // Prefer textContent to innerText because many browsers support both but\n // SVG <text> elements don't support innerText even when <div> does.\n contentKey = 'textContent' in document.documentElement ? 'textContent' : 'innerText';\n }\n return contentKey;\n}\nmodule.exports = getTextContentAccessor;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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 */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nvar PooledClass = require('./PooledClass');\nvar invariant = require('fbjs/lib/invariant');\n\n/**\n * A specialized pseudo-event module to help keep track of components waiting to\n * be notified when their DOM representations are available for use.\n *\n * This implements `PooledClass`, so you should never need to instantiate this.\n * Instead, use `CallbackQueue.getPooled()`.\n *\n * @class ReactMountReady\n * @implements PooledClass\n * @internal\n */\n\nvar CallbackQueue = function () {\n function CallbackQueue(arg) {\n _classCallCheck(this, CallbackQueue);\n this._callbacks = null;\n this._contexts = null;\n this._arg = arg;\n }\n\n /**\n * Enqueues a callback to be invoked when `notifyAll` is invoked.\n *\n * @param {function} callback Invoked when `notifyAll` is invoked.\n * @param {?object} context Context to call `callback` with.\n * @internal\n */\n\n CallbackQueue.prototype.enqueue = function enqueue(callback, context) {\n this._callbacks = this._callbacks || [];\n this._callbacks.push(callback);\n this._contexts = this._contexts || [];\n this._contexts.push(context);\n };\n\n /**\n * Invokes all enqueued callbacks and clears the queue. This is invoked after\n * the DOM representation of a component has been created or updated.\n *\n * @internal\n */\n\n CallbackQueue.prototype.notifyAll = function notifyAll() {\n var callbacks = this._callbacks;\n var contexts = this._contexts;\n var arg = this._arg;\n if (callbacks && contexts) {\n !(callbacks.length === contexts.length) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Mismatched list of contexts in callback queue') : _prodInvariant('24') : void 0;\n this._callbacks = null;\n this._contexts = null;\n for (var i = 0; i < callbacks.length; i++) {\n callbacks[i].call(contexts[i], arg);\n }\n callbacks.length = 0;\n contexts.length = 0;\n }\n };\n CallbackQueue.prototype.checkpoint = function checkpoint() {\n return this._callbacks ? this._callbacks.length : 0;\n };\n CallbackQueue.prototype.rollback = function rollback(len) {\n if (this._callbacks && this._contexts) {\n this._callbacks.length = len;\n this._contexts.length = len;\n }\n };\n\n /**\n * Resets the internal queue.\n *\n * @internal\n */\n\n CallbackQueue.prototype.reset = function reset() {\n this._callbacks = null;\n this._contexts = null;\n };\n\n /**\n * `PooledClass` looks for this.\n */\n\n CallbackQueue.prototype.destructor = function destructor() {\n this.reset();\n };\n return CallbackQueue;\n}();\nmodule.exports = PooledClass.addPoolingTo(CallbackQueue);","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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 */\n\n'use strict';\n\nvar ReactFeatureFlags = {\n // When true, call console.time() before and .timeEnd() after each top-level\n // render (both initial renders and updates). Useful when looking at prod-mode\n // timeline profiles in Chrome, for example.\n logTopLevelRenders: false\n};\nmodule.exports = ReactFeatureFlags;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar ReactDOMComponentTree = require('./ReactDOMComponentTree');\nfunction isCheckable(elem) {\n var type = elem.type;\n var nodeName = elem.nodeName;\n return nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio');\n}\nfunction getTracker(inst) {\n return inst._wrapperState.valueTracker;\n}\nfunction attachTracker(inst, tracker) {\n inst._wrapperState.valueTracker = tracker;\n}\nfunction detachTracker(inst) {\n inst._wrapperState.valueTracker = null;\n}\nfunction getValueFromNode(node) {\n var value;\n if (node) {\n value = isCheckable(node) ? '' + node.checked : node.value;\n }\n return value;\n}\nvar inputValueTracking = {\n // exposed for testing\n _getTrackerFromNode: function _getTrackerFromNode(node) {\n return getTracker(ReactDOMComponentTree.getInstanceFromNode(node));\n },\n track: function track(inst) {\n if (getTracker(inst)) {\n return;\n }\n var node = ReactDOMComponentTree.getNodeFromInstance(inst);\n var valueField = isCheckable(node) ? 'checked' : 'value';\n var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField);\n var currentValue = '' + node[valueField];\n\n // if someone has already defined a value or Safari, then bail\n // and don't track value will cause over reporting of changes,\n // but it's better then a hard failure\n // (needed for certain tests that spyOn input values and Safari)\n if (node.hasOwnProperty(valueField) || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') {\n return;\n }\n Object.defineProperty(node, valueField, {\n enumerable: descriptor.enumerable,\n configurable: true,\n get: function get() {\n return descriptor.get.call(this);\n },\n set: function set(value) {\n currentValue = '' + value;\n descriptor.set.call(this, value);\n }\n });\n attachTracker(inst, {\n getValue: function getValue() {\n return currentValue;\n },\n setValue: function setValue(value) {\n currentValue = '' + value;\n },\n stopTracking: function stopTracking() {\n detachTracker(inst);\n delete node[valueField];\n }\n });\n },\n updateValueIfChanged: function updateValueIfChanged(inst) {\n if (!inst) {\n return false;\n }\n var tracker = getTracker(inst);\n if (!tracker) {\n inputValueTracking.track(inst);\n return true;\n }\n var lastValue = tracker.getValue();\n var nextValue = getValueFromNode(ReactDOMComponentTree.getNodeFromInstance(inst));\n if (nextValue !== lastValue) {\n tracker.setValue(nextValue);\n return true;\n }\n return false;\n },\n stopTracking: function stopTracking(inst) {\n var tracker = getTracker(inst);\n if (tracker) {\n tracker.stopTracking();\n }\n }\n};\nmodule.exports = inputValueTracking;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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 */\n\n'use strict';\n\n/**\n * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\n */\nvar supportedInputTypes = {\n color: true,\n date: true,\n datetime: true,\n 'datetime-local': true,\n email: true,\n month: true,\n number: true,\n password: true,\n range: true,\n search: true,\n tel: true,\n text: true,\n time: true,\n url: true,\n week: true\n};\nfunction isTextInputElement(elem) {\n var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();\n if (nodeName === 'input') {\n return !!supportedInputTypes[elem.type];\n }\n if (nodeName === 'textarea') {\n return true;\n }\n return false;\n}\nmodule.exports = isTextInputElement;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar ViewportMetrics = {\n currentScrollLeft: 0,\n currentScrollTop: 0,\n refreshScrollValues: function refreshScrollValues(scrollPosition) {\n ViewportMetrics.currentScrollLeft = scrollPosition.x;\n ViewportMetrics.currentScrollTop = scrollPosition.y;\n }\n};\nmodule.exports = ViewportMetrics;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');\nvar escapeTextContentForBrowser = require('./escapeTextContentForBrowser');\nvar setInnerHTML = require('./setInnerHTML');\n\n/**\n * Set the textContent property of a node, ensuring that whitespace is preserved\n * even in IE8. innerText is a poor substitute for textContent and, among many\n * issues, inserts <br> instead of the literal newline chars. innerHTML behaves\n * as it should.\n *\n * @param {DOMElement} node\n * @param {string} text\n * @internal\n */\nvar setTextContent = function setTextContent(node, text) {\n if (text) {\n var firstChild = node.firstChild;\n if (firstChild && firstChild === node.lastChild && firstChild.nodeType === 3) {\n firstChild.nodeValue = text;\n return;\n }\n }\n node.textContent = text;\n};\nif (ExecutionEnvironment.canUseDOM) {\n if (!('textContent' in document.documentElement)) {\n setTextContent = function setTextContent(node, text) {\n if (node.nodeType === 3) {\n node.nodeValue = text;\n return;\n }\n setInnerHTML(node, escapeTextContentForBrowser(text));\n };\n }\n}\nmodule.exports = setTextContent;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\n/**\n * @param {DOMElement} node input/textarea to focus\n */\nfunction focusNode(node) {\n // IE8 can throw \"Can't move focus to the control because it is invisible,\n // not enabled, or of a type that does not accept the focus.\" for all kinds of\n // reasons that are too expensive and fragile to test.\n try {\n node.focus();\n } catch (e) {}\n}\nmodule.exports = focusNode;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\n/**\n * CSS properties which accept numbers but are not in units of \"px\".\n */\nvar isUnitlessNumber = {\n animationIterationCount: true,\n borderImageOutset: true,\n borderImageSlice: true,\n borderImageWidth: true,\n boxFlex: true,\n boxFlexGroup: true,\n boxOrdinalGroup: true,\n columnCount: true,\n columns: true,\n flex: true,\n flexGrow: true,\n flexPositive: true,\n flexShrink: true,\n flexNegative: true,\n flexOrder: true,\n gridRow: true,\n gridRowEnd: true,\n gridRowSpan: true,\n gridRowStart: true,\n gridColumn: true,\n gridColumnEnd: true,\n gridColumnSpan: true,\n gridColumnStart: true,\n fontWeight: true,\n lineClamp: true,\n lineHeight: true,\n opacity: true,\n order: true,\n orphans: true,\n tabSize: true,\n widows: true,\n zIndex: true,\n zoom: true,\n // SVG-related properties\n fillOpacity: true,\n floodOpacity: true,\n stopOpacity: true,\n strokeDasharray: true,\n strokeDashoffset: true,\n strokeMiterlimit: true,\n strokeOpacity: true,\n strokeWidth: true\n};\n\n/**\n * @param {string} prefix vendor-specific prefix, eg: Webkit\n * @param {string} key style name, eg: transitionDuration\n * @return {string} style name prefixed with `prefix`, properly camelCased, eg:\n * WebkitTransitionDuration\n */\nfunction prefixKey(prefix, key) {\n return prefix + key.charAt(0).toUpperCase() + key.substring(1);\n}\n\n/**\n * Support style names that may come passed in prefixed by adding permutations\n * of vendor prefixes.\n */\nvar prefixes = ['Webkit', 'ms', 'Moz', 'O'];\n\n// Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an\n// infinite loop, because it iterates over the newly added props too.\nObject.keys(isUnitlessNumber).forEach(function (prop) {\n prefixes.forEach(function (prefix) {\n isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];\n });\n});\n\n/**\n * Most style properties can be unset by doing .style[prop] = '' but IE8\n * doesn't like doing that with shorthand properties so for the properties that\n * IE8 breaks on, which are listed here, we instead unset each of the\n * individual properties. See http://bugs.jquery.com/ticket/12385.\n * The 4-value 'clock' properties like margin, padding, border-width seem to\n * behave without any problems. Curiously, list-style works too without any\n * special prodding.\n */\nvar shorthandPropertyExpansions = {\n background: {\n backgroundAttachment: true,\n backgroundColor: true,\n backgroundImage: true,\n backgroundPositionX: true,\n backgroundPositionY: true,\n backgroundRepeat: true\n },\n backgroundPosition: {\n backgroundPositionX: true,\n backgroundPositionY: true\n },\n border: {\n borderWidth: true,\n borderStyle: true,\n borderColor: true\n },\n borderBottom: {\n borderBottomWidth: true,\n borderBottomStyle: true,\n borderBottomColor: true\n },\n borderLeft: {\n borderLeftWidth: true,\n borderLeftStyle: true,\n borderLeftColor: true\n },\n borderRight: {\n borderRightWidth: true,\n borderRightStyle: true,\n borderRightColor: true\n },\n borderTop: {\n borderTopWidth: true,\n borderTopStyle: true,\n borderTopColor: true\n },\n font: {\n fontStyle: true,\n fontVariant: true,\n fontWeight: true,\n fontSize: true,\n lineHeight: true,\n fontFamily: true\n },\n outline: {\n outlineWidth: true,\n outlineStyle: true,\n outlineColor: true\n }\n};\nvar CSSProperty = {\n isUnitlessNumber: isUnitlessNumber,\n shorthandPropertyExpansions: shorthandPropertyExpansions\n};\nmodule.exports = CSSProperty;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar DOMProperty = require('./DOMProperty');\nvar ReactDOMComponentTree = require('./ReactDOMComponentTree');\nvar ReactInstrumentation = require('./ReactInstrumentation');\nvar quoteAttributeValueForBrowser = require('./quoteAttributeValueForBrowser');\nvar warning = require('fbjs/lib/warning');\nvar VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + DOMProperty.ATTRIBUTE_NAME_START_CHAR + '][' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$');\nvar illegalAttributeNameCache = {};\nvar validatedAttributeNameCache = {};\nfunction isAttributeNameSafe(attributeName) {\n if (validatedAttributeNameCache.hasOwnProperty(attributeName)) {\n return true;\n }\n if (illegalAttributeNameCache.hasOwnProperty(attributeName)) {\n return false;\n }\n if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {\n validatedAttributeNameCache[attributeName] = true;\n return true;\n }\n illegalAttributeNameCache[attributeName] = true;\n process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid attribute name: `%s`', attributeName) : void 0;\n return false;\n}\nfunction shouldIgnoreValue(propertyInfo, value) {\n return value == null || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === false;\n}\n\n/**\n * Operations for dealing with DOM properties.\n */\nvar DOMPropertyOperations = {\n /**\n * Creates markup for the ID property.\n *\n * @param {string} id Unescaped ID.\n * @return {string} Markup string.\n */\n createMarkupForID: function createMarkupForID(id) {\n return DOMProperty.ID_ATTRIBUTE_NAME + '=' + quoteAttributeValueForBrowser(id);\n },\n setAttributeForID: function setAttributeForID(node, id) {\n node.setAttribute(DOMProperty.ID_ATTRIBUTE_NAME, id);\n },\n createMarkupForRoot: function createMarkupForRoot() {\n return DOMProperty.ROOT_ATTRIBUTE_NAME + '=\"\"';\n },\n setAttributeForRoot: function setAttributeForRoot(node) {\n node.setAttribute(DOMProperty.ROOT_ATTRIBUTE_NAME, '');\n },\n /**\n * Creates markup for a property.\n *\n * @param {string} name\n * @param {*} value\n * @return {?string} Markup string, or null if the property was invalid.\n */\n createMarkupForProperty: function createMarkupForProperty(name, value) {\n var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;\n if (propertyInfo) {\n if (shouldIgnoreValue(propertyInfo, value)) {\n return '';\n }\n var attributeName = propertyInfo.attributeName;\n if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) {\n return attributeName + '=\"\"';\n }\n return attributeName + '=' + quoteAttributeValueForBrowser(value);\n } else if (DOMProperty.isCustomAttribute(name)) {\n if (value == null) {\n return '';\n }\n return name + '=' + quoteAttributeValueForBrowser(value);\n }\n return null;\n },\n /**\n * Creates markup for a custom property.\n *\n * @param {string} name\n * @param {*} value\n * @return {string} Markup string, or empty string if the property was invalid.\n */\n createMarkupForCustomAttribute: function createMarkupForCustomAttribute(name, value) {\n if (!isAttributeNameSafe(name) || value == null) {\n return '';\n }\n return name + '=' + quoteAttributeValueForBrowser(value);\n },\n /**\n * Sets the value for a property on a node.\n *\n * @param {DOMElement} node\n * @param {string} name\n * @param {*} value\n */\n setValueForProperty: function setValueForProperty(node, name, value) {\n var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod) {\n mutationMethod(node, value);\n } else if (shouldIgnoreValue(propertyInfo, value)) {\n this.deleteValueForProperty(node, name);\n return;\n } else if (propertyInfo.mustUseProperty) {\n // Contrary to `setAttribute`, object properties are properly\n // `toString`ed by IE8/9.\n node[propertyInfo.propertyName] = value;\n } else {\n var attributeName = propertyInfo.attributeName;\n var namespace = propertyInfo.attributeNamespace;\n // `setAttribute` with objects becomes only `[object]` in IE8/9,\n // ('' + value) makes it output the correct toString()-value.\n if (namespace) {\n node.setAttributeNS(namespace, attributeName, '' + value);\n } else if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) {\n node.setAttribute(attributeName, '');\n } else {\n node.setAttribute(attributeName, '' + value);\n }\n }\n } else if (DOMProperty.isCustomAttribute(name)) {\n DOMPropertyOperations.setValueForAttribute(node, name, value);\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n var payload = {};\n payload[name] = value;\n ReactInstrumentation.debugTool.onHostOperation({\n instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,\n type: 'update attribute',\n payload: payload\n });\n }\n },\n setValueForAttribute: function setValueForAttribute(node, name, value) {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (value == null) {\n node.removeAttribute(name);\n } else {\n node.setAttribute(name, '' + value);\n }\n if (process.env.NODE_ENV !== 'production') {\n var payload = {};\n payload[name] = value;\n ReactInstrumentation.debugTool.onHostOperation({\n instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,\n type: 'update attribute',\n payload: payload\n });\n }\n },\n /**\n * Deletes an attributes from a node.\n *\n * @param {DOMElement} node\n * @param {string} name\n */\n deleteValueForAttribute: function deleteValueForAttribute(node, name) {\n node.removeAttribute(name);\n if (process.env.NODE_ENV !== 'production') {\n ReactInstrumentation.debugTool.onHostOperation({\n instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,\n type: 'remove attribute',\n payload: name\n });\n }\n },\n /**\n * Deletes the value for a property on a node.\n *\n * @param {DOMElement} node\n * @param {string} name\n */\n deleteValueForProperty: function deleteValueForProperty(node, name) {\n var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod) {\n mutationMethod(node, undefined);\n } else if (propertyInfo.mustUseProperty) {\n var propName = propertyInfo.propertyName;\n if (propertyInfo.hasBooleanValue) {\n node[propName] = false;\n } else {\n node[propName] = '';\n }\n } else {\n node.removeAttribute(propertyInfo.attributeName);\n }\n } else if (DOMProperty.isCustomAttribute(name)) {\n node.removeAttribute(name);\n }\n if (process.env.NODE_ENV !== 'production') {\n ReactInstrumentation.debugTool.onHostOperation({\n instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,\n type: 'remove attribute',\n payload: name\n });\n }\n }\n};\nmodule.exports = DOMPropertyOperations;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar _assign = require('object-assign');\nvar LinkedValueUtils = require('./LinkedValueUtils');\nvar ReactDOMComponentTree = require('./ReactDOMComponentTree');\nvar ReactUpdates = require('./ReactUpdates');\nvar warning = require('fbjs/lib/warning');\nvar didWarnValueLink = false;\nvar didWarnValueDefaultValue = false;\nfunction updateOptionsIfPendingUpdateAndMounted() {\n if (this._rootNodeID && this._wrapperState.pendingUpdate) {\n this._wrapperState.pendingUpdate = false;\n var props = this._currentElement.props;\n var value = LinkedValueUtils.getValue(props);\n if (value != null) {\n updateOptions(this, Boolean(props.multiple), value);\n }\n }\n}\nfunction getDeclarationErrorAddendum(owner) {\n if (owner) {\n var name = owner.getName();\n if (name) {\n return ' Check the render method of `' + name + '`.';\n }\n }\n return '';\n}\nvar valuePropNames = ['value', 'defaultValue'];\n\n/**\n * Validation function for `value` and `defaultValue`.\n * @private\n */\nfunction checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}\n\n/**\n * @param {ReactDOMComponent} inst\n * @param {boolean} multiple\n * @param {*} propValue A stringable (with `multiple`, a list of stringables).\n * @private\n */\nfunction updateOptions(inst, multiple, propValue) {\n var selectedValue, i;\n var options = ReactDOMComponentTree.getNodeFromInstance(inst).options;\n if (multiple) {\n selectedValue = {};\n for (i = 0; i < propValue.length; i++) {\n selectedValue['' + propValue[i]] = true;\n }\n for (i = 0; i < options.length; i++) {\n var selected = selectedValue.hasOwnProperty(options[i].value);\n if (options[i].selected !== selected) {\n options[i].selected = selected;\n }\n }\n } else {\n // Do not set `select.value` as exact behavior isn't consistent across all\n // browsers for all cases.\n selectedValue = '' + propValue;\n for (i = 0; i < options.length; i++) {\n if (options[i].value === selectedValue) {\n options[i].selected = true;\n return;\n }\n }\n if (options.length) {\n options[0].selected = true;\n }\n }\n}\n\n/**\n * Implements a <select> host component that allows optionally setting the\n * props `value` and `defaultValue`. If `multiple` is false, the prop must be a\n * stringable. If `multiple` is true, the prop must be an array of stringables.\n *\n * If `value` is not supplied (or null/undefined), user actions that change the\n * selected option will trigger updates to the rendered options.\n *\n * If it is supplied (and not null/undefined), the rendered options will not\n * update in response to user actions. Instead, the `value` prop must change in\n * order for the rendered options to update.\n *\n * If `defaultValue` is provided, any options with the supplied values will be\n * selected.\n */\nvar ReactDOMSelect = {\n getHostProps: function getHostProps(inst, props) {\n return _assign({}, props, {\n onChange: inst._wrapperState.onChange,\n value: undefined\n });\n },\n mountWrapper: function mountWrapper(inst, props) {\n if (process.env.NODE_ENV !== 'production') {\n checkSelectPropTypes(inst, props);\n }\n var value = LinkedValueUtils.getValue(props);\n inst._wrapperState = {\n pendingUpdate: false,\n initialValue: value != null ? value : props.defaultValue,\n listeners: null,\n onChange: _handleChange.bind(inst),\n wasMultiple: Boolean(props.multiple)\n };\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components') : void 0;\n didWarnValueDefaultValue = true;\n }\n },\n getSelectValueContext: function getSelectValueContext(inst) {\n // ReactDOMOption looks at this initial value so the initial generated\n // markup has correct `selected` attributes\n return inst._wrapperState.initialValue;\n },\n postUpdateWrapper: function postUpdateWrapper(inst) {\n var props = inst._currentElement.props;\n\n // After the initial mount, we control selected-ness manually so don't pass\n // this value down\n inst._wrapperState.initialValue = undefined;\n var wasMultiple = inst._wrapperState.wasMultiple;\n inst._wrapperState.wasMultiple = Boolean(props.multiple);\n var value = LinkedValueUtils.getValue(props);\n if (value != null) {\n inst._wrapperState.pendingUpdate = false;\n updateOptions(inst, Boolean(props.multiple), value);\n } else if (wasMultiple !== Boolean(props.multiple)) {\n // For simplicity, reapply `defaultValue` if `multiple` is toggled.\n if (props.defaultValue != null) {\n updateOptions(inst, Boolean(props.multiple), props.defaultValue);\n } else {\n // Revert the select back to its default unselected state.\n updateOptions(inst, Boolean(props.multiple), props.multiple ? [] : '');\n }\n }\n }\n};\nfunction _handleChange(event) {\n var props = this._currentElement.props;\n var returnValue = LinkedValueUtils.executeOnChange(props, event);\n if (this._rootNodeID) {\n this._wrapperState.pendingUpdate = true;\n }\n ReactUpdates.asap(updateOptionsIfPendingUpdateAndMounted, this);\n return returnValue;\n}\nmodule.exports = ReactDOMSelect;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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 */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\nvar React = require('react/lib/React');\nvar invariant = require('fbjs/lib/invariant');\nvar ReactNodeTypes = {\n HOST: 0,\n COMPOSITE: 1,\n EMPTY: 2,\n getType: function getType(node) {\n if (node === null || node === false) {\n return ReactNodeTypes.EMPTY;\n } else if (React.isValidElement(node)) {\n if (typeof node.type === 'function') {\n return ReactNodeTypes.COMPOSITE;\n } else {\n return ReactNodeTypes.HOST;\n }\n }\n !false ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Unexpected node: %s', node) : _prodInvariant('26', node) : void 0;\n }\n};\nmodule.exports = ReactNodeTypes;","/**\n * Copyright (c) 2014-present, Facebook, Inc.\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\n'use strict';\n\nvar emptyComponentFactory;\nvar ReactEmptyComponentInjection = {\n injectEmptyComponentFactory: function injectEmptyComponentFactory(factory) {\n emptyComponentFactory = factory;\n }\n};\nvar ReactEmptyComponent = {\n create: function create(instantiate) {\n return emptyComponentFactory(instantiate);\n }\n};\nReactEmptyComponent.injection = ReactEmptyComponentInjection;\nmodule.exports = ReactEmptyComponent;","/**\n * Copyright (c) 2014-present, Facebook, Inc.\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\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\nvar invariant = require('fbjs/lib/invariant');\nvar genericComponentClass = null;\nvar textComponentClass = null;\nvar ReactHostComponentInjection = {\n // This accepts a class that receives the tag string. This is a catch all\n // that can render any kind of tag.\n injectGenericComponentClass: function injectGenericComponentClass(componentClass) {\n genericComponentClass = componentClass;\n },\n // This accepts a text component class that takes the text string to be\n // rendered as props.\n injectTextComponentClass: function injectTextComponentClass(componentClass) {\n textComponentClass = componentClass;\n }\n};\n\n/**\n * Get a host internal component class for a specific tag.\n *\n * @param {ReactElement} element The element to create.\n * @return {function} The internal class constructor function.\n */\nfunction createInternalComponent(element) {\n !genericComponentClass ? process.env.NODE_ENV !== 'production' ? invariant(false, 'There is no registered component for the tag %s', element.type) : _prodInvariant('111', element.type) : void 0;\n return new genericComponentClass(element);\n}\n\n/**\n * @param {ReactText} text\n * @return {ReactComponent}\n */\nfunction createInstanceForText(text) {\n return new textComponentClass(text);\n}\n\n/**\n * @param {ReactComponent} component\n * @return {boolean}\n */\nfunction isTextComponent(component) {\n return component instanceof textComponentClass;\n}\nvar ReactHostComponent = {\n createInternalComponent: createInternalComponent,\n createInstanceForText: createInstanceForText,\n isTextComponent: isTextComponent,\n injection: ReactHostComponentInjection\n};\nmodule.exports = ReactHostComponent;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nvar _prodInvariant = require('./reactProdInvariant');\nvar ReactCurrentOwner = require('react/lib/ReactCurrentOwner');\nvar REACT_ELEMENT_TYPE = require('./ReactElementSymbol');\nvar getIteratorFn = require('./getIteratorFn');\nvar invariant = require('fbjs/lib/invariant');\nvar KeyEscapeUtils = require('./KeyEscapeUtils');\nvar warning = require('fbjs/lib/warning');\nvar SEPARATOR = '.';\nvar SUBSEPARATOR = ':';\n\n/**\n * This is inlined from ReactElement since this file is shared between\n * isomorphic and renderers. We could extract this to a\n *\n */\n\n/**\n * TODO: Test that a single child and an array with one item have the same key\n * pattern.\n */\n\nvar didWarnAboutMaps = false;\n\n/**\n * Generate a key string that identifies a component within a set.\n *\n * @param {*} component A component that could contain a manual key.\n * @param {number} index Index that is used if a manual key is not provided.\n * @return {string}\n */\nfunction getComponentKey(component, index) {\n // Do some typechecking here since we call this blindly. We want to ensure\n // that we don't block potential future ES APIs.\n if (component && _typeof(component) === 'object' && component.key != null) {\n // Explicit key\n return KeyEscapeUtils.escape(component.key);\n }\n // Implicit key determined by the index in the set\n return index.toString(36);\n}\n\n/**\n * @param {?*} children Children tree container.\n * @param {!string} nameSoFar Name of the key path so far.\n * @param {!function} callback Callback to invoke with each child found.\n * @param {?*} traverseContext Used to pass information throughout the traversal\n * process.\n * @return {!number} The number of children in this subtree.\n */\nfunction traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {\n var type = _typeof(children);\n if (type === 'undefined' || type === 'boolean') {\n // All of the above are perceived as null.\n children = null;\n }\n if (children === null || type === 'string' || type === 'number' ||\n // The following is inlined from ReactElement. This means we can optimize\n // some checks. React Fiber also inlines this logic for similar purposes.\n type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) {\n callback(traverseContext, children,\n // If it's the only child, treat the name as if it was wrapped in an array\n // so that it's consistent if the number of children grows.\n nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);\n return 1;\n }\n var child;\n var nextName;\n var subtreeCount = 0; // Count of children found in the current subtree.\n var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;\n if (Array.isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n nextName = nextNamePrefix + getComponentKey(child, i);\n subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);\n }\n } else {\n var iteratorFn = getIteratorFn(children);\n if (iteratorFn) {\n var iterator = iteratorFn.call(children);\n var step;\n if (iteratorFn !== children.entries) {\n var ii = 0;\n while (!(step = iterator.next()).done) {\n child = step.value;\n nextName = nextNamePrefix + getComponentKey(child, ii++);\n subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);\n }\n } else {\n if (process.env.NODE_ENV !== 'production') {\n var mapsAsChildrenAddendum = '';\n if (ReactCurrentOwner.current) {\n var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName();\n if (mapsAsChildrenOwnerName) {\n mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.';\n }\n }\n process.env.NODE_ENV !== 'production' ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.%s', mapsAsChildrenAddendum) : void 0;\n didWarnAboutMaps = true;\n }\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n child = entry[1];\n nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0);\n subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);\n }\n }\n }\n } else if (type === 'object') {\n var addendum = '';\n if (process.env.NODE_ENV !== 'production') {\n addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.';\n if (children._isReactElement) {\n addendum = \" It looks like you're using an element created by a different \" + 'version of React. Make sure to use only one copy of React.';\n }\n if (ReactCurrentOwner.current) {\n var name = ReactCurrentOwner.current.getName();\n if (name) {\n addendum += ' Check the render method of `' + name + '`.';\n }\n }\n }\n var childrenString = String(children);\n !false ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : _prodInvariant('31', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : void 0;\n }\n }\n return subtreeCount;\n}\n\n/**\n * Traverses children that are typically specified as `props.children`, but\n * might also be specified through attributes:\n *\n * - `traverseAllChildren(this.props.children, ...)`\n * - `traverseAllChildren(this.props.leftPanelChildren, ...)`\n *\n * The `traverseContext` is an optional argument that is passed through the\n * entire traversal. It can be used to store accumulations or anything else that\n * the callback might find relevant.\n *\n * @param {?*} children Children tree object.\n * @param {!function} callback To invoke upon traversing each child.\n * @param {?*} traverseContext Context for traversal.\n * @return {!number} The number of children in this subtree.\n */\nfunction traverseAllChildren(children, callback, traverseContext) {\n if (children == null) {\n return 0;\n }\n return traverseAllChildrenImpl(children, '', callback, traverseContext);\n}\nmodule.exports = traverseAllChildren;","/**\n * Copyright (c) 2016-present, Facebook, Inc.\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 */\n\n'use strict';\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nvar _prodInvariant = require('./reactProdInvariant');\nvar ReactCurrentOwner = require('./ReactCurrentOwner');\nvar invariant = require('fbjs/lib/invariant');\nvar warning = require('fbjs/lib/warning');\nfunction isNative(fn) {\n // Based on isNative() from Lodash\n var funcToString = Function.prototype.toString;\n var hasOwnProperty = Object.prototype.hasOwnProperty;\n var reIsNative = RegExp('^' + funcToString\n // Take an example native function source for comparison\n .call(hasOwnProperty\n // Strip regex characters so we can use it for regex\n ).replace(/[\\\\^$.*+?()[\\]{}|]/g, '\\\\$&'\n // Remove hasOwnProperty from the template to make it generic\n ).replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$');\n try {\n var source = funcToString.call(fn);\n return reIsNative.test(source);\n } catch (err) {\n return false;\n }\n}\nvar canUseCollections =\n// Array.from\ntypeof Array.from === 'function' &&\n// Map\ntypeof Map === 'function' && isNative(Map) &&\n// Map.prototype.keys\nMap.prototype != null && typeof Map.prototype.keys === 'function' && isNative(Map.prototype.keys) &&\n// Set\ntypeof Set === 'function' && isNative(Set) &&\n// Set.prototype.keys\nSet.prototype != null && typeof Set.prototype.keys === 'function' && isNative(Set.prototype.keys);\nvar setItem;\nvar getItem;\nvar removeItem;\nvar getItemIDs;\nvar addRoot;\nvar removeRoot;\nvar getRootIDs;\nif (canUseCollections) {\n var itemMap = new Map();\n var rootIDSet = new Set();\n setItem = function setItem(id, item) {\n itemMap.set(id, item);\n };\n getItem = function getItem(id) {\n return itemMap.get(id);\n };\n removeItem = function removeItem(id) {\n itemMap['delete'](id);\n };\n getItemIDs = function getItemIDs() {\n return Array.from(itemMap.keys());\n };\n addRoot = function addRoot(id) {\n rootIDSet.add(id);\n };\n removeRoot = function removeRoot(id) {\n rootIDSet['delete'](id);\n };\n getRootIDs = function getRootIDs() {\n return Array.from(rootIDSet.keys());\n };\n} else {\n var itemByKey = {};\n var rootByKey = {};\n\n // Use non-numeric keys to prevent V8 performance issues:\n // https://github.com/facebook/react/pull/7232\n var getKeyFromID = function getKeyFromID(id) {\n return '.' + id;\n };\n var getIDFromKey = function getIDFromKey(key) {\n return parseInt(key.substr(1), 10);\n };\n setItem = function setItem(id, item) {\n var key = getKeyFromID(id);\n itemByKey[key] = item;\n };\n getItem = function getItem(id) {\n var key = getKeyFromID(id);\n return itemByKey[key];\n };\n removeItem = function removeItem(id) {\n var key = getKeyFromID(id);\n delete itemByKey[key];\n };\n getItemIDs = function getItemIDs() {\n return Object.keys(itemByKey).map(getIDFromKey);\n };\n addRoot = function addRoot(id) {\n var key = getKeyFromID(id);\n rootByKey[key] = true;\n };\n removeRoot = function removeRoot(id) {\n var key = getKeyFromID(id);\n delete rootByKey[key];\n };\n getRootIDs = function getRootIDs() {\n return Object.keys(rootByKey).map(getIDFromKey);\n };\n}\nvar unmountedIDs = [];\nfunction purgeDeep(id) {\n var item = getItem(id);\n if (item) {\n var childIDs = item.childIDs;\n removeItem(id);\n childIDs.forEach(purgeDeep);\n }\n}\nfunction describeComponentFrame(name, source, ownerName) {\n return '\\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');\n}\nfunction _getDisplayName(element) {\n if (element == null) {\n return '#empty';\n } else if (typeof element === 'string' || typeof element === 'number') {\n return '#text';\n } else if (typeof element.type === 'string') {\n return element.type;\n } else {\n return element.type.displayName || element.type.name || 'Unknown';\n }\n}\nfunction describeID(id) {\n var name = ReactComponentTreeHook.getDisplayName(id);\n var element = ReactComponentTreeHook.getElement(id);\n var ownerID = ReactComponentTreeHook.getOwnerID(id);\n var ownerName;\n if (ownerID) {\n ownerName = ReactComponentTreeHook.getDisplayName(ownerID);\n }\n process.env.NODE_ENV !== 'production' ? warning(element, 'ReactComponentTreeHook: Missing React element for debugID %s when ' + 'building stack', id) : void 0;\n return describeComponentFrame(name, element && element._source, ownerName);\n}\nvar ReactComponentTreeHook = {\n onSetChildren: function onSetChildren(id, nextChildIDs) {\n var item = getItem(id);\n !item ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0;\n item.childIDs = nextChildIDs;\n for (var i = 0; i < nextChildIDs.length; i++) {\n var nextChildID = nextChildIDs[i];\n var nextChild = getItem(nextChildID);\n !nextChild ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected hook events to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('140') : void 0;\n !(nextChild.childIDs != null || _typeof(nextChild.element) !== 'object' || nextChild.element == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onSetChildren() to fire for a container child before its parent includes it in onSetChildren().') : _prodInvariant('141') : void 0;\n !nextChild.isMounted ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onMountComponent() to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('71') : void 0;\n if (nextChild.parentID == null) {\n nextChild.parentID = id;\n // TODO: This shouldn't be necessary but mounting a new root during in\n // componentWillMount currently causes not-yet-mounted components to\n // be purged from our tree data so their parent id is missing.\n }\n !(nextChild.parentID === id) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onBeforeMountComponent() parent and onSetChildren() to be consistent (%s has parents %s and %s).', nextChildID, nextChild.parentID, id) : _prodInvariant('142', nextChildID, nextChild.parentID, id) : void 0;\n }\n },\n onBeforeMountComponent: function onBeforeMountComponent(id, element, parentID) {\n var item = {\n element: element,\n parentID: parentID,\n text: null,\n childIDs: [],\n isMounted: false,\n updateCount: 0\n };\n setItem(id, item);\n },\n onBeforeUpdateComponent: function onBeforeUpdateComponent(id, element) {\n var item = getItem(id);\n if (!item || !item.isMounted) {\n // We may end up here as a result of setState() in componentWillUnmount().\n // In this case, ignore the element.\n return;\n }\n item.element = element;\n },\n onMountComponent: function onMountComponent(id) {\n var item = getItem(id);\n !item ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0;\n item.isMounted = true;\n var isRoot = item.parentID === 0;\n if (isRoot) {\n addRoot(id);\n }\n },\n onUpdateComponent: function onUpdateComponent(id) {\n var item = getItem(id);\n if (!item || !item.isMounted) {\n // We may end up here as a result of setState() in componentWillUnmount().\n // In this case, ignore the element.\n return;\n }\n item.updateCount++;\n },\n onUnmountComponent: function onUnmountComponent(id) {\n var item = getItem(id);\n if (item) {\n // We need to check if it exists.\n // `item` might not exist if it is inside an error boundary, and a sibling\n // error boundary child threw while mounting. Then this instance never\n // got a chance to mount, but it still gets an unmounting event during\n // the error boundary cleanup.\n item.isMounted = false;\n var isRoot = item.parentID === 0;\n if (isRoot) {\n removeRoot(id);\n }\n }\n unmountedIDs.push(id);\n },\n purgeUnmountedComponents: function purgeUnmountedComponents() {\n if (ReactComponentTreeHook._preventPurging) {\n // Should only be used for testing.\n return;\n }\n for (var i = 0; i < unmountedIDs.length; i++) {\n var id = unmountedIDs[i];\n purgeDeep(id);\n }\n unmountedIDs.length = 0;\n },\n isMounted: function isMounted(id) {\n var item = getItem(id);\n return item ? item.isMounted : false;\n },\n getCurrentStackAddendum: function getCurrentStackAddendum(topElement) {\n var info = '';\n if (topElement) {\n var name = _getDisplayName(topElement);\n var owner = topElement._owner;\n info += describeComponentFrame(name, topElement._source, owner && owner.getName());\n }\n var currentOwner = ReactCurrentOwner.current;\n var id = currentOwner && currentOwner._debugID;\n info += ReactComponentTreeHook.getStackAddendumByID(id);\n return info;\n },\n getStackAddendumByID: function getStackAddendumByID(id) {\n var info = '';\n while (id) {\n info += describeID(id);\n id = ReactComponentTreeHook.getParentID(id);\n }\n return info;\n },\n getChildIDs: function getChildIDs(id) {\n var item = getItem(id);\n return item ? item.childIDs : [];\n },\n getDisplayName: function getDisplayName(id) {\n var element = ReactComponentTreeHook.getElement(id);\n if (!element) {\n return null;\n }\n return _getDisplayName(element);\n },\n getElement: function getElement(id) {\n var item = getItem(id);\n return item ? item.element : null;\n },\n getOwnerID: function getOwnerID(id) {\n var element = ReactComponentTreeHook.getElement(id);\n if (!element || !element._owner) {\n return null;\n }\n return element._owner._debugID;\n },\n getParentID: function getParentID(id) {\n var item = getItem(id);\n return item ? item.parentID : null;\n },\n getSource: function getSource(id) {\n var item = getItem(id);\n var element = item ? item.element : null;\n var source = element != null ? element._source : null;\n return source;\n },\n getText: function getText(id) {\n var element = ReactComponentTreeHook.getElement(id);\n if (typeof element === 'string') {\n return element;\n } else if (typeof element === 'number') {\n return '' + element;\n } else {\n return null;\n }\n },\n getUpdateCount: function getUpdateCount(id) {\n var item = getItem(id);\n return item ? item.updateCount : 0;\n },\n getRootIDs: getRootIDs,\n getRegisteredIDs: getItemIDs,\n pushNonStandardWarningStack: function pushNonStandardWarningStack(isCreatingElement, currentSource) {\n if (typeof console.reactStack !== 'function') {\n return;\n }\n var stack = [];\n var currentOwner = ReactCurrentOwner.current;\n var id = currentOwner && currentOwner._debugID;\n try {\n if (isCreatingElement) {\n stack.push({\n name: id ? ReactComponentTreeHook.getDisplayName(id) : null,\n fileName: currentSource ? currentSource.fileName : null,\n lineNumber: currentSource ? currentSource.lineNumber : null\n });\n }\n while (id) {\n var element = ReactComponentTreeHook.getElement(id);\n var parentID = ReactComponentTreeHook.getParentID(id);\n var ownerID = ReactComponentTreeHook.getOwnerID(id);\n var ownerName = ownerID ? ReactComponentTreeHook.getDisplayName(ownerID) : null;\n var source = element && element._source;\n stack.push({\n name: ownerName,\n fileName: source ? source.fileName : null,\n lineNumber: source ? source.lineNumber : null\n });\n id = parentID;\n }\n } catch (err) {\n // Internal state is messed up.\n // Stop building the stack (it's just a nice to have).\n }\n console.reactStack(stack);\n },\n popNonStandardWarningStack: function popNonStandardWarningStack() {\n if (typeof console.reactStackEnd !== 'function') {\n return;\n }\n console.reactStackEnd();\n }\n};\nmodule.exports = ReactComponentTreeHook;","/**\n * Copyright (c) 2014-present, Facebook, Inc.\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\n'use strict';\n\nvar _assign = require('object-assign');\nvar PooledClass = require('./PooledClass');\nvar Transaction = require('./Transaction');\nvar ReactInstrumentation = require('./ReactInstrumentation');\nvar ReactServerUpdateQueue = require('./ReactServerUpdateQueue');\n\n/**\n * Executed within the scope of the `Transaction` instance. Consider these as\n * being member methods, but with an implied ordering while being isolated from\n * each other.\n */\nvar TRANSACTION_WRAPPERS = [];\nif (process.env.NODE_ENV !== 'production') {\n TRANSACTION_WRAPPERS.push({\n initialize: ReactInstrumentation.debugTool.onBeginFlush,\n close: ReactInstrumentation.debugTool.onEndFlush\n });\n}\nvar noopCallbackQueue = {\n enqueue: function enqueue() {}\n};\n\n/**\n * @class ReactServerRenderingTransaction\n * @param {boolean} renderToStaticMarkup\n */\nfunction ReactServerRenderingTransaction(renderToStaticMarkup) {\n this.reinitializeTransaction();\n this.renderToStaticMarkup = renderToStaticMarkup;\n this.useCreateElement = false;\n this.updateQueue = new ReactServerUpdateQueue(this);\n}\nvar Mixin = {\n /**\n * @see Transaction\n * @abstract\n * @final\n * @return {array} Empty list of operation wrap procedures.\n */\n getTransactionWrappers: function getTransactionWrappers() {\n return TRANSACTION_WRAPPERS;\n },\n /**\n * @return {object} The queue to collect `onDOMReady` callbacks with.\n */\n getReactMountReady: function getReactMountReady() {\n return noopCallbackQueue;\n },\n /**\n * @return {object} The queue to collect React async events.\n */\n getUpdateQueue: function getUpdateQueue() {\n return this.updateQueue;\n },\n /**\n * `PooledClass` looks for this, and will invoke this before allowing this\n * instance to be reused.\n */\n destructor: function destructor() {},\n checkpoint: function checkpoint() {},\n rollback: function rollback() {}\n};\n_assign(ReactServerRenderingTransaction.prototype, Transaction, Mixin);\nPooledClass.addPoolingTo(ReactServerRenderingTransaction);\nmodule.exports = ReactServerRenderingTransaction;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar _assign = require('object-assign');\nvar ReactUpdates = require('./ReactUpdates');\nvar Transaction = require('./Transaction');\nvar emptyFunction = require('fbjs/lib/emptyFunction');\nvar RESET_BATCHED_UPDATES = {\n initialize: emptyFunction,\n close: function close() {\n ReactDefaultBatchingStrategy.isBatchingUpdates = false;\n }\n};\nvar FLUSH_BATCHED_UPDATES = {\n initialize: emptyFunction,\n close: ReactUpdates.flushBatchedUpdates.bind(ReactUpdates)\n};\nvar TRANSACTION_WRAPPERS = [FLUSH_BATCHED_UPDATES, RESET_BATCHED_UPDATES];\nfunction ReactDefaultBatchingStrategyTransaction() {\n this.reinitializeTransaction();\n}\n_assign(ReactDefaultBatchingStrategyTransaction.prototype, Transaction, {\n getTransactionWrappers: function getTransactionWrappers() {\n return TRANSACTION_WRAPPERS;\n }\n});\nvar transaction = new ReactDefaultBatchingStrategyTransaction();\nvar ReactDefaultBatchingStrategy = {\n isBatchingUpdates: false,\n /**\n * Call the provided function in a context within which calls to `setState`\n * and friends are batched such that components aren't updated unnecessarily.\n */\n batchedUpdates: function batchedUpdates(callback, a, b, c, d, e) {\n var alreadyBatchingUpdates = ReactDefaultBatchingStrategy.isBatchingUpdates;\n ReactDefaultBatchingStrategy.isBatchingUpdates = true;\n\n // The code is written this way to avoid extra allocations\n if (alreadyBatchingUpdates) {\n return callback(a, b, c, d, e);\n } else {\n return transaction.perform(callback, null, a, b, c, d, e);\n }\n }\n};\nmodule.exports = ReactDefaultBatchingStrategy;","'use strict';\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\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 * @typechecks\n */\nvar emptyFunction = require('./emptyFunction');\n\n/**\n * Upstream version of event listener. Does not take into account specific\n * nature of platform.\n */\nvar EventListener = {\n /**\n * Listen to DOM events during the bubble phase.\n *\n * @param {DOMEventTarget} target DOM element to register listener on.\n * @param {string} eventType Event type, e.g. 'click' or 'mouseover'.\n * @param {function} callback Callback function.\n * @return {object} Object with a `remove` method.\n */\n listen: function listen(target, eventType, callback) {\n if (target.addEventListener) {\n target.addEventListener(eventType, callback, false);\n return {\n remove: function remove() {\n target.removeEventListener(eventType, callback, false);\n }\n };\n } else if (target.attachEvent) {\n target.attachEvent('on' + eventType, callback);\n return {\n remove: function remove() {\n target.detachEvent('on' + eventType, callback);\n }\n };\n }\n },\n /**\n * Listen to DOM events during the capture phase.\n *\n * @param {DOMEventTarget} target DOM element to register listener on.\n * @param {string} eventType Event type, e.g. 'click' or 'mouseover'.\n * @param {function} callback Callback function.\n * @return {object} Object with a `remove` method.\n */\n capture: function capture(target, eventType, callback) {\n if (target.addEventListener) {\n target.addEventListener(eventType, callback, true);\n return {\n remove: function remove() {\n target.removeEventListener(eventType, callback, true);\n }\n };\n } else {\n if (process.env.NODE_ENV !== 'production') {\n console.error('Attempted to listen to events during the capture phase on a ' + 'browser that does not support the capture phase. Your application ' + 'will not receive some events.');\n }\n return {\n remove: emptyFunction\n };\n }\n },\n registerDefault: function registerDefault() {}\n};\nmodule.exports = EventListener;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar ReactDOMSelection = require('./ReactDOMSelection');\nvar containsNode = require('fbjs/lib/containsNode');\nvar focusNode = require('fbjs/lib/focusNode');\nvar getActiveElement = require('fbjs/lib/getActiveElement');\nfunction isInDocument(node) {\n return containsNode(document.documentElement, node);\n}\n\n/**\n * @ReactInputSelection: React input selection module. Based on Selection.js,\n * but modified to be suitable for react and has a couple of bug fixes (doesn't\n * assume buttons have range selections allowed).\n * Input selection module for React.\n */\nvar ReactInputSelection = {\n hasSelectionCapabilities: function hasSelectionCapabilities(elem) {\n var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();\n return nodeName && (nodeName === 'input' && elem.type === 'text' || nodeName === 'textarea' || elem.contentEditable === 'true');\n },\n getSelectionInformation: function getSelectionInformation() {\n var focusedElem = getActiveElement();\n return {\n focusedElem: focusedElem,\n selectionRange: ReactInputSelection.hasSelectionCapabilities(focusedElem) ? ReactInputSelection.getSelection(focusedElem) : null\n };\n },\n /**\n * @restoreSelection: If any selection information was potentially lost,\n * restore it. This is useful when performing operations that could remove dom\n * nodes and place them back in, resulting in focus being lost.\n */\n restoreSelection: function restoreSelection(priorSelectionInformation) {\n var curFocusedElem = getActiveElement();\n var priorFocusedElem = priorSelectionInformation.focusedElem;\n var priorSelectionRange = priorSelectionInformation.selectionRange;\n if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {\n if (ReactInputSelection.hasSelectionCapabilities(priorFocusedElem)) {\n ReactInputSelection.setSelection(priorFocusedElem, priorSelectionRange);\n }\n focusNode(priorFocusedElem);\n }\n },\n /**\n * @getSelection: Gets the selection bounds of a focused textarea, input or\n * contentEditable node.\n * -@input: Look up selection bounds of this input\n * -@return {start: selectionStart, end: selectionEnd}\n */\n getSelection: function getSelection(input) {\n var selection;\n if ('selectionStart' in input) {\n // Modern browser with input or textarea.\n selection = {\n start: input.selectionStart,\n end: input.selectionEnd\n };\n } else if (document.selection && input.nodeName && input.nodeName.toLowerCase() === 'input') {\n // IE8 input.\n var range = document.selection.createRange();\n // There can only be one selection per document in IE, so it must\n // be in our element.\n if (range.parentElement() === input) {\n selection = {\n start: -range.moveStart('character', -input.value.length),\n end: -range.moveEnd('character', -input.value.length)\n };\n }\n } else {\n // Content editable or old IE textarea.\n selection = ReactDOMSelection.getOffsets(input);\n }\n return selection || {\n start: 0,\n end: 0\n };\n },\n /**\n * @setSelection: Sets the selection bounds of a textarea or input and focuses\n * the input.\n * -@input Set selection bounds of this input or textarea\n * -@offsets Object of same form that is returned from get*\n */\n setSelection: function setSelection(input, offsets) {\n var start = offsets.start;\n var end = offsets.end;\n if (end === undefined) {\n end = start;\n }\n if ('selectionStart' in input) {\n input.selectionStart = start;\n input.selectionEnd = Math.min(end, input.value.length);\n } else if (document.selection && input.nodeName && input.nodeName.toLowerCase() === 'input') {\n var range = input.createTextRange();\n range.collapse(true);\n range.moveStart('character', start);\n range.moveEnd('character', end - start);\n range.select();\n } else {\n ReactDOMSelection.setOffsets(input, offsets);\n }\n }\n};\nmodule.exports = ReactInputSelection;","'use strict';\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\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 * @typechecks\n */\n\n/* eslint-disable fb-www/typeof-undefined */\n\n/**\n * Same as document.activeElement but wraps in a try-catch block. In IE it is\n * not safe to call document.activeElement if there is nothing focused.\n *\n * The activeElement will be null only if the document or document body is not\n * yet defined.\n *\n * @param {?DOMDocument} doc Defaults to current document.\n * @return {?DOMElement}\n */\nfunction getActiveElement(doc) /*?DOMElement*/{\n doc = doc || (typeof document !== 'undefined' ? document : undefined);\n if (typeof doc === 'undefined') {\n return null;\n }\n try {\n return doc.activeElement || doc.body;\n } catch (e) {\n return doc.body;\n }\n}\nmodule.exports = getActiveElement;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\nvar DOMLazyTree = require('./DOMLazyTree');\nvar DOMProperty = require('./DOMProperty');\nvar React = require('react/lib/React');\nvar ReactBrowserEventEmitter = require('./ReactBrowserEventEmitter');\nvar ReactCurrentOwner = require('react/lib/ReactCurrentOwner');\nvar ReactDOMComponentTree = require('./ReactDOMComponentTree');\nvar ReactDOMContainerInfo = require('./ReactDOMContainerInfo');\nvar ReactDOMFeatureFlags = require('./ReactDOMFeatureFlags');\nvar ReactFeatureFlags = require('./ReactFeatureFlags');\nvar ReactInstanceMap = require('./ReactInstanceMap');\nvar ReactInstrumentation = require('./ReactInstrumentation');\nvar ReactMarkupChecksum = require('./ReactMarkupChecksum');\nvar ReactReconciler = require('./ReactReconciler');\nvar ReactUpdateQueue = require('./ReactUpdateQueue');\nvar ReactUpdates = require('./ReactUpdates');\nvar emptyObject = require('fbjs/lib/emptyObject');\nvar instantiateReactComponent = require('./instantiateReactComponent');\nvar invariant = require('fbjs/lib/invariant');\nvar setInnerHTML = require('./setInnerHTML');\nvar shouldUpdateReactComponent = require('./shouldUpdateReactComponent');\nvar warning = require('fbjs/lib/warning');\nvar ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME;\nvar ROOT_ATTR_NAME = DOMProperty.ROOT_ATTRIBUTE_NAME;\nvar ELEMENT_NODE_TYPE = 1;\nvar DOC_NODE_TYPE = 9;\nvar DOCUMENT_FRAGMENT_NODE_TYPE = 11;\nvar instancesByReactRootID = {};\n\n/**\n * Finds the index of the first character\n * that's not common between the two given strings.\n *\n * @return {number} the index of the character where the strings diverge\n */\nfunction firstDifferenceIndex(string1, string2) {\n var minLen = Math.min(string1.length, string2.length);\n for (var i = 0; i < minLen; i++) {\n if (string1.charAt(i) !== string2.charAt(i)) {\n return i;\n }\n }\n return string1.length === string2.length ? -1 : minLen;\n}\n\n/**\n * @param {DOMElement|DOMDocument} container DOM element that may contain\n * a React component\n * @return {?*} DOM element that may have the reactRoot ID, or null.\n */\nfunction getReactRootElementInContainer(container) {\n if (!container) {\n return null;\n }\n if (container.nodeType === DOC_NODE_TYPE) {\n return container.documentElement;\n } else {\n return container.firstChild;\n }\n}\nfunction internalGetID(node) {\n // If node is something like a window, document, or text node, none of\n // which support attributes or a .getAttribute method, gracefully return\n // the empty string, as if the attribute were missing.\n return node.getAttribute && node.getAttribute(ATTR_NAME) || '';\n}\n\n/**\n * Mounts this component and inserts it into the DOM.\n *\n * @param {ReactComponent} componentInstance The instance to mount.\n * @param {DOMElement} container DOM element to mount into.\n * @param {ReactReconcileTransaction} transaction\n * @param {boolean} shouldReuseMarkup If true, do not insert markup\n */\nfunction mountComponentIntoNode(wrapperInstance, container, transaction, shouldReuseMarkup, context) {\n var markerName;\n if (ReactFeatureFlags.logTopLevelRenders) {\n var wrappedElement = wrapperInstance._currentElement.props.child;\n var type = wrappedElement.type;\n markerName = 'React mount: ' + (typeof type === 'string' ? type : type.displayName || type.name);\n console.time(markerName);\n }\n var markup = ReactReconciler.mountComponent(wrapperInstance, transaction, null, ReactDOMContainerInfo(wrapperInstance, container), context, 0 /* parentDebugID */);\n if (markerName) {\n console.timeEnd(markerName);\n }\n wrapperInstance._renderedComponent._topLevelWrapper = wrapperInstance;\n ReactMount._mountImageIntoNode(markup, container, wrapperInstance, shouldReuseMarkup, transaction);\n}\n\n/**\n * Batched mount.\n *\n * @param {ReactComponent} componentInstance The instance to mount.\n * @param {DOMElement} container DOM element to mount into.\n * @param {boolean} shouldReuseMarkup If true, do not insert markup\n */\nfunction batchedMountComponentIntoNode(componentInstance, container, shouldReuseMarkup, context) {\n var transaction = ReactUpdates.ReactReconcileTransaction.getPooled( /* useCreateElement */\n !shouldReuseMarkup && ReactDOMFeatureFlags.useCreateElement);\n transaction.perform(mountComponentIntoNode, null, componentInstance, container, transaction, shouldReuseMarkup, context);\n ReactUpdates.ReactReconcileTransaction.release(transaction);\n}\n\n/**\n * Unmounts a component and removes it from the DOM.\n *\n * @param {ReactComponent} instance React component instance.\n * @param {DOMElement} container DOM element to unmount from.\n * @final\n * @internal\n * @see {ReactMount.unmountComponentAtNode}\n */\nfunction unmountComponentFromNode(instance, container, safely) {\n if (process.env.NODE_ENV !== 'production') {\n ReactInstrumentation.debugTool.onBeginFlush();\n }\n ReactReconciler.unmountComponent(instance, safely);\n if (process.env.NODE_ENV !== 'production') {\n ReactInstrumentation.debugTool.onEndFlush();\n }\n if (container.nodeType === DOC_NODE_TYPE) {\n container = container.documentElement;\n }\n\n // http://jsperf.com/emptying-a-node\n while (container.lastChild) {\n container.removeChild(container.lastChild);\n }\n}\n\n/**\n * True if the supplied DOM node has a direct React-rendered child that is\n * not a React root element. Useful for warning in `render`,\n * `unmountComponentAtNode`, etc.\n *\n * @param {?DOMElement} node The candidate DOM node.\n * @return {boolean} True if the DOM element contains a direct child that was\n * rendered by React but is not a root element.\n * @internal\n */\nfunction hasNonRootReactChild(container) {\n var rootEl = getReactRootElementInContainer(container);\n if (rootEl) {\n var inst = ReactDOMComponentTree.getInstanceFromNode(rootEl);\n return !!(inst && inst._hostParent);\n }\n}\n\n/**\n * True if the supplied DOM node is a React DOM element and\n * it has been rendered by another copy of React.\n *\n * @param {?DOMElement} node The candidate DOM node.\n * @return {boolean} True if the DOM has been rendered by another copy of React\n * @internal\n */\nfunction nodeIsRenderedByOtherInstance(container) {\n var rootEl = getReactRootElementInContainer(container);\n return !!(rootEl && isReactNode(rootEl) && !ReactDOMComponentTree.getInstanceFromNode(rootEl));\n}\n\n/**\n * True if the supplied DOM node is a valid node element.\n *\n * @param {?DOMElement} node The candidate DOM node.\n * @return {boolean} True if the DOM is a valid DOM node.\n * @internal\n */\nfunction isValidContainer(node) {\n return !!(node && (node.nodeType === ELEMENT_NODE_TYPE || node.nodeType === DOC_NODE_TYPE || node.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE));\n}\n\n/**\n * True if the supplied DOM node is a valid React node element.\n *\n * @param {?DOMElement} node The candidate DOM node.\n * @return {boolean} True if the DOM is a valid React DOM node.\n * @internal\n */\nfunction isReactNode(node) {\n return isValidContainer(node) && (node.hasAttribute(ROOT_ATTR_NAME) || node.hasAttribute(ATTR_NAME));\n}\nfunction getHostRootInstanceInContainer(container) {\n var rootEl = getReactRootElementInContainer(container);\n var prevHostInstance = rootEl && ReactDOMComponentTree.getInstanceFromNode(rootEl);\n return prevHostInstance && !prevHostInstance._hostParent ? prevHostInstance : null;\n}\nfunction getTopLevelWrapperInContainer(container) {\n var root = getHostRootInstanceInContainer(container);\n return root ? root._hostContainerInfo._topLevelWrapper : null;\n}\n\n/**\n * Temporary (?) hack so that we can store all top-level pending updates on\n * composites instead of having to worry about different types of components\n * here.\n */\nvar topLevelRootCounter = 1;\nvar TopLevelWrapper = function TopLevelWrapper() {\n this.rootID = topLevelRootCounter++;\n};\nTopLevelWrapper.prototype.isReactComponent = {};\nif (process.env.NODE_ENV !== 'production') {\n TopLevelWrapper.displayName = 'TopLevelWrapper';\n}\nTopLevelWrapper.prototype.render = function () {\n return this.props.child;\n};\nTopLevelWrapper.isReactTopLevelWrapper = true;\n\n/**\n * Mounting is the process of initializing a React component by creating its\n * representative DOM elements and inserting them into a supplied `container`.\n * Any prior content inside `container` is destroyed in the process.\n *\n * ReactMount.render(\n * component,\n * document.getElementById('container')\n * );\n *\n * <div id=\"container\"> <-- Supplied `container`.\n * <div data-reactid=\".3\"> <-- Rendered reactRoot of React\n * // ... component.\n * </div>\n * </div>\n *\n * Inside of `container`, the first element rendered is the \"reactRoot\".\n */\nvar ReactMount = {\n TopLevelWrapper: TopLevelWrapper,\n /**\n * Used by devtools. The keys are not important.\n */\n _instancesByReactRootID: instancesByReactRootID,\n /**\n * This is a hook provided to support rendering React components while\n * ensuring that the apparent scroll position of its `container` does not\n * change.\n *\n * @param {DOMElement} container The `container` being rendered into.\n * @param {function} renderCallback This must be called once to do the render.\n */\n scrollMonitor: function scrollMonitor(container, renderCallback) {\n renderCallback();\n },\n /**\n * Take a component that's already mounted into the DOM and replace its props\n * @param {ReactComponent} prevComponent component instance already in the DOM\n * @param {ReactElement} nextElement component instance to render\n * @param {DOMElement} container container to render into\n * @param {?function} callback function triggered on completion\n */\n _updateRootComponent: function _updateRootComponent(prevComponent, nextElement, nextContext, container, callback) {\n ReactMount.scrollMonitor(container, function () {\n ReactUpdateQueue.enqueueElementInternal(prevComponent, nextElement, nextContext);\n if (callback) {\n ReactUpdateQueue.enqueueCallbackInternal(prevComponent, callback);\n }\n });\n return prevComponent;\n },\n /**\n * Render a new component into the DOM. Hooked by hooks!\n *\n * @param {ReactElement} nextElement element to render\n * @param {DOMElement} container container to render into\n * @param {boolean} shouldReuseMarkup if we should skip the markup insertion\n * @return {ReactComponent} nextComponent\n */\n _renderNewRootComponent: function _renderNewRootComponent(nextElement, container, shouldReuseMarkup, context) {\n // Various parts of our code (such as ReactCompositeComponent's\n // _renderValidatedComponent) assume that calls to render aren't nested;\n // verify that that's the case.\n process.env.NODE_ENV !== 'production' ? warning(ReactCurrentOwner.current == null, '_renderNewRootComponent(): Render methods should be a pure function ' + 'of props and state; triggering nested component updates from ' + 'render is not allowed. If necessary, trigger nested updates in ' + 'componentDidUpdate. Check the render method of %s.', ReactCurrentOwner.current && ReactCurrentOwner.current.getName() || 'ReactCompositeComponent') : void 0;\n !isValidContainer(container) ? process.env.NODE_ENV !== 'production' ? invariant(false, '_registerComponent(...): Target container is not a DOM element.') : _prodInvariant('37') : void 0;\n ReactBrowserEventEmitter.ensureScrollValueMonitoring();\n var componentInstance = instantiateReactComponent(nextElement, false);\n\n // The initial render is synchronous but any updates that happen during\n // rendering, in componentWillMount or componentDidMount, will be batched\n // according to the current batching strategy.\n\n ReactUpdates.batchedUpdates(batchedMountComponentIntoNode, componentInstance, container, shouldReuseMarkup, context);\n var wrapperID = componentInstance._instance.rootID;\n instancesByReactRootID[wrapperID] = componentInstance;\n return componentInstance;\n },\n /**\n * Renders a React component into the DOM in the supplied `container`.\n *\n * If the React component was previously rendered into `container`, this will\n * perform an update on it and only mutate the DOM as necessary to reflect the\n * latest React component.\n *\n * @param {ReactComponent} parentComponent The conceptual parent of this render tree.\n * @param {ReactElement} nextElement Component element to render.\n * @param {DOMElement} container DOM element to render into.\n * @param {?function} callback function triggered on completion\n * @return {ReactComponent} Component instance rendered in `container`.\n */\n renderSubtreeIntoContainer: function renderSubtreeIntoContainer(parentComponent, nextElement, container, callback) {\n !(parentComponent != null && ReactInstanceMap.has(parentComponent)) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'parentComponent must be a valid React Component') : _prodInvariant('38') : void 0;\n return ReactMount._renderSubtreeIntoContainer(parentComponent, nextElement, container, callback);\n },\n _renderSubtreeIntoContainer: function _renderSubtreeIntoContainer(parentComponent, nextElement, container, callback) {\n ReactUpdateQueue.validateCallback(callback, 'ReactDOM.render');\n !React.isValidElement(nextElement) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactDOM.render(): Invalid component element.%s', typeof nextElement === 'string' ? \" Instead of passing a string like 'div', pass \" + \"React.createElement('div') or <div />.\" : typeof nextElement === 'function' ? ' Instead of passing a class like Foo, pass ' + 'React.createElement(Foo) or <Foo />.' :\n // Check if it quacks like an element\n nextElement != null && nextElement.props !== undefined ? ' This may be caused by unintentionally loading two independent ' + 'copies of React.' : '') : _prodInvariant('39', typeof nextElement === 'string' ? \" Instead of passing a string like 'div', pass \" + \"React.createElement('div') or <div />.\" : typeof nextElement === 'function' ? ' Instead of passing a class like Foo, pass ' + 'React.createElement(Foo) or <Foo />.' : nextElement != null && nextElement.props !== undefined ? ' This may be caused by unintentionally loading two independent ' + 'copies of React.' : '') : void 0;\n process.env.NODE_ENV !== 'production' ? warning(!container || !container.tagName || container.tagName.toUpperCase() !== 'BODY', 'render(): Rendering components directly into document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try rendering into a container element created ' + 'for your app.') : void 0;\n var nextWrappedElement = React.createElement(TopLevelWrapper, {\n child: nextElement\n });\n var nextContext;\n if (parentComponent) {\n var parentInst = ReactInstanceMap.get(parentComponent);\n nextContext = parentInst._processChildContext(parentInst._context);\n } else {\n nextContext = emptyObject;\n }\n var prevComponent = getTopLevelWrapperInContainer(container);\n if (prevComponent) {\n var prevWrappedElement = prevComponent._currentElement;\n var prevElement = prevWrappedElement.props.child;\n if (shouldUpdateReactComponent(prevElement, nextElement)) {\n var publicInst = prevComponent._renderedComponent.getPublicInstance();\n var updatedCallback = callback && function () {\n callback.call(publicInst);\n };\n ReactMount._updateRootComponent(prevComponent, nextWrappedElement, nextContext, container, updatedCallback);\n return publicInst;\n } else {\n ReactMount.unmountComponentAtNode(container);\n }\n }\n var reactRootElement = getReactRootElementInContainer(container);\n var containerHasReactMarkup = reactRootElement && !!internalGetID(reactRootElement);\n var containerHasNonRootReactChild = hasNonRootReactChild(container);\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(!containerHasNonRootReactChild, 'render(...): Replacing React-rendered children with a new root ' + 'component. If you intended to update the children of this node, ' + 'you should instead have the existing children update their state ' + 'and render the new components instead of calling ReactDOM.render.') : void 0;\n if (!containerHasReactMarkup || reactRootElement.nextSibling) {\n var rootElementSibling = reactRootElement;\n while (rootElementSibling) {\n if (internalGetID(rootElementSibling)) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'render(): Target node has markup rendered by React, but there ' + 'are unrelated nodes as well. This is most commonly caused by ' + 'white-space inserted around server-rendered markup.') : void 0;\n break;\n }\n rootElementSibling = rootElementSibling.nextSibling;\n }\n }\n }\n var shouldReuseMarkup = containerHasReactMarkup && !prevComponent && !containerHasNonRootReactChild;\n var component = ReactMount._renderNewRootComponent(nextWrappedElement, container, shouldReuseMarkup, nextContext)._renderedComponent.getPublicInstance();\n if (callback) {\n callback.call(component);\n }\n return component;\n },\n /**\n * Renders a React component into the DOM in the supplied `container`.\n * See https://facebook.github.io/react/docs/top-level-api.html#reactdom.render\n *\n * If the React component was previously rendered into `container`, this will\n * perform an update on it and only mutate the DOM as necessary to reflect the\n * latest React component.\n *\n * @param {ReactElement} nextElement Component element to render.\n * @param {DOMElement} container DOM element to render into.\n * @param {?function} callback function triggered on completion\n * @return {ReactComponent} Component instance rendered in `container`.\n */\n render: function render(nextElement, container, callback) {\n return ReactMount._renderSubtreeIntoContainer(null, nextElement, container, callback);\n },\n /**\n * Unmounts and destroys the React component rendered in the `container`.\n * See https://facebook.github.io/react/docs/top-level-api.html#reactdom.unmountcomponentatnode\n *\n * @param {DOMElement} container DOM element containing a React component.\n * @return {boolean} True if a component was found in and unmounted from\n * `container`\n */\n unmountComponentAtNode: function unmountComponentAtNode(container) {\n // Various parts of our code (such as ReactCompositeComponent's\n // _renderValidatedComponent) assume that calls to render aren't nested;\n // verify that that's the case. (Strictly speaking, unmounting won't cause a\n // render but we still don't expect to be in a render call here.)\n process.env.NODE_ENV !== 'production' ? warning(ReactCurrentOwner.current == null, 'unmountComponentAtNode(): Render methods should be a pure function ' + 'of props and state; triggering nested component updates from render ' + 'is not allowed. If necessary, trigger nested updates in ' + 'componentDidUpdate. Check the render method of %s.', ReactCurrentOwner.current && ReactCurrentOwner.current.getName() || 'ReactCompositeComponent') : void 0;\n !isValidContainer(container) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'unmountComponentAtNode(...): Target container is not a DOM element.') : _prodInvariant('40') : void 0;\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(!nodeIsRenderedByOtherInstance(container), \"unmountComponentAtNode(): The node you're attempting to unmount \" + 'was rendered by another copy of React.') : void 0;\n }\n var prevComponent = getTopLevelWrapperInContainer(container);\n if (!prevComponent) {\n // Check if the node being unmounted was rendered by React, but isn't a\n // root node.\n var containerHasNonRootReactChild = hasNonRootReactChild(container);\n\n // Check if the container itself is a React root node.\n var isContainerReactRoot = container.nodeType === 1 && container.hasAttribute(ROOT_ATTR_NAME);\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(!containerHasNonRootReactChild, \"unmountComponentAtNode(): The node you're attempting to unmount \" + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.') : void 0;\n }\n return false;\n }\n delete instancesByReactRootID[prevComponent._instance.rootID];\n ReactUpdates.batchedUpdates(unmountComponentFromNode, prevComponent, container, false);\n return true;\n },\n _mountImageIntoNode: function _mountImageIntoNode(markup, container, instance, shouldReuseMarkup, transaction) {\n !isValidContainer(container) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'mountComponentIntoNode(...): Target container is not valid.') : _prodInvariant('41') : void 0;\n if (shouldReuseMarkup) {\n var rootElement = getReactRootElementInContainer(container);\n if (ReactMarkupChecksum.canReuseMarkup(markup, rootElement)) {\n ReactDOMComponentTree.precacheNode(instance, rootElement);\n return;\n } else {\n var checksum = rootElement.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);\n rootElement.removeAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);\n var rootMarkup = rootElement.outerHTML;\n rootElement.setAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME, checksum);\n var normalizedMarkup = markup;\n if (process.env.NODE_ENV !== 'production') {\n // because rootMarkup is retrieved from the DOM, various normalizations\n // will have occurred which will not be present in `markup`. Here,\n // insert markup into a <div> or <iframe> depending on the container\n // type to perform the same normalizations before comparing.\n var normalizer;\n if (container.nodeType === ELEMENT_NODE_TYPE) {\n normalizer = document.createElement('div');\n normalizer.innerHTML = markup;\n normalizedMarkup = normalizer.innerHTML;\n } else {\n normalizer = document.createElement('iframe');\n document.body.appendChild(normalizer);\n normalizer.contentDocument.write(markup);\n normalizedMarkup = normalizer.contentDocument.documentElement.outerHTML;\n document.body.removeChild(normalizer);\n }\n }\n var diffIndex = firstDifferenceIndex(normalizedMarkup, rootMarkup);\n var difference = ' (client) ' + normalizedMarkup.substring(diffIndex - 20, diffIndex + 20) + '\\n (server) ' + rootMarkup.substring(diffIndex - 20, diffIndex + 20);\n !(container.nodeType !== DOC_NODE_TYPE) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'You\\'re trying to render a component to the document using server rendering but the checksum was invalid. This usually means you rendered a different component type or props on the client from the one on the server, or your render() methods are impure. React cannot handle this case due to cross-browser quirks by rendering at the document root. You should look for environment dependent code in your components and ensure the props are the same client and server side:\\n%s', difference) : _prodInvariant('42', difference) : void 0;\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(false, 'React attempted to reuse markup in a container but the ' + 'checksum was invalid. This generally means that you are ' + 'using server rendering and the markup generated on the ' + 'server was not what the client was expecting. React injected ' + 'new markup to compensate which works but you have lost many ' + 'of the benefits of server rendering. Instead, figure out ' + 'why the markup being generated is different on the client ' + 'or server:\\n%s', difference) : void 0;\n }\n }\n }\n !(container.nodeType !== DOC_NODE_TYPE) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'You\\'re trying to render a component to the document but you didn\\'t use server rendering. We can\\'t do this without using server rendering due to cross-browser quirks. See ReactDOMServer.renderToString() for server rendering.') : _prodInvariant('43') : void 0;\n if (transaction.useCreateElement) {\n while (container.lastChild) {\n container.removeChild(container.lastChild);\n }\n DOMLazyTree.insertTreeBefore(container, markup, null);\n } else {\n setInnerHTML(container, markup);\n ReactDOMComponentTree.precacheNode(instance, container.firstChild);\n }\n if (process.env.NODE_ENV !== 'production') {\n var hostNode = ReactDOMComponentTree.getInstanceFromNode(container.firstChild);\n if (hostNode._debugID !== 0) {\n ReactInstrumentation.debugTool.onHostOperation({\n instanceID: hostNode._debugID,\n type: 'mount',\n payload: markup.toString()\n });\n }\n }\n }\n};\nmodule.exports = ReactMount;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar validateDOMNesting = require('./validateDOMNesting');\nvar DOC_NODE_TYPE = 9;\nfunction ReactDOMContainerInfo(topLevelWrapper, node) {\n var info = {\n _topLevelWrapper: topLevelWrapper,\n _idCounter: 1,\n _ownerDocument: node ? node.nodeType === DOC_NODE_TYPE ? node : node.ownerDocument : null,\n _node: node,\n _tag: node ? node.nodeName.toLowerCase() : null,\n _namespaceURI: node ? node.namespaceURI : null\n };\n if (process.env.NODE_ENV !== 'production') {\n info._ancestorInfo = node ? validateDOMNesting.updatedAncestorInfo(null, info._tag, null) : null;\n }\n return info;\n}\nmodule.exports = ReactDOMContainerInfo;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar adler32 = require('./adler32');\nvar TAG_END = /\\/?>/;\nvar COMMENT_START = /^<\\!\\-\\-/;\nvar ReactMarkupChecksum = {\n CHECKSUM_ATTR_NAME: 'data-react-checksum',\n /**\n * @param {string} markup Markup string\n * @return {string} Markup string with checksum attribute attached\n */\n addChecksumToMarkup: function addChecksumToMarkup(markup) {\n var checksum = adler32(markup);\n\n // Add checksum (handle both parent tags, comments and self-closing tags)\n if (COMMENT_START.test(markup)) {\n return markup;\n } else {\n return markup.replace(TAG_END, ' ' + ReactMarkupChecksum.CHECKSUM_ATTR_NAME + '=\"' + checksum + '\"$&');\n }\n },\n /**\n * @param {string} markup to use\n * @param {DOMElement} element root React element\n * @returns {boolean} whether or not the markup is the same\n */\n canReuseMarkup: function canReuseMarkup(markup, element) {\n var existingChecksum = element.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);\n existingChecksum = existingChecksum && parseInt(existingChecksum, 10);\n var markupChecksum = adler32(markup);\n return markupChecksum === existingChecksum;\n }\n};\nmodule.exports = ReactMarkupChecksum;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nmodule.exports = '15.6.2';","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar ReactNodeTypes = require('./ReactNodeTypes');\nfunction getHostComponentFromComposite(inst) {\n var type;\n while ((type = inst._renderedNodeType) === ReactNodeTypes.COMPOSITE) {\n inst = inst._renderedComponent;\n }\n if (type === ReactNodeTypes.HOST) {\n return inst._renderedComponent;\n } else if (type === ReactNodeTypes.EMPTY) {\n return null;\n }\n}\nmodule.exports = getHostComponentFromComposite;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = findTabbableDescendants;\n/*!\n * Adapted from jQuery UI core\n *\n * http://jqueryui.com\n *\n * Copyright 2014 jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/category/ui-core/\n */\n\nvar tabbableNode = /input|select|textarea|button|object/;\nfunction hidden(el) {\n return el.offsetWidth <= 0 && el.offsetHeight <= 0 || el.style.display === 'none';\n}\nfunction visible(element) {\n var parentElement = element;\n while (parentElement) {\n if (parentElement === document.body) break;\n if (hidden(parentElement)) return false;\n parentElement = parentElement.parentNode;\n }\n return true;\n}\nfunction focusable(element, isTabIndexNotNaN) {\n var nodeName = element.nodeName.toLowerCase();\n var res = tabbableNode.test(nodeName) && !element.disabled || (nodeName === \"a\" ? element.href || isTabIndexNotNaN : isTabIndexNotNaN);\n return res && visible(element);\n}\nfunction tabbable(element) {\n var tabIndex = element.getAttribute('tabindex');\n if (tabIndex === null) tabIndex = undefined;\n var isTabIndexNaN = isNaN(tabIndex);\n return (isTabIndexNaN || tabIndex >= 0) && focusable(element, !isTabIndexNaN);\n}\nfunction findTabbableDescendants(element) {\n return [].slice.call(element.querySelectorAll('*'), 0).filter(tabbable);\n}\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.assertNodeList = assertNodeList;\nexports.setElement = setElement;\nexports.tryForceFallback = tryForceFallback;\nexports.validateElement = validateElement;\nexports.hide = hide;\nexports.show = show;\nexports.documentNotReadyOrSSRTesting = documentNotReadyOrSSRTesting;\nexports.resetForTesting = resetForTesting;\nvar globalElement = null;\nfunction assertNodeList(nodeList, selector) {\n if (!nodeList || !nodeList.length) {\n throw new Error('react-modal: No elements were found for selector ' + selector + '.');\n }\n}\nfunction setElement(element) {\n var useElement = element;\n if (typeof useElement === 'string') {\n var el = document.querySelectorAll(useElement);\n assertNodeList(el, useElement);\n useElement = 'length' in el ? el[0] : el;\n }\n globalElement = useElement || globalElement;\n return globalElement;\n}\nfunction tryForceFallback() {\n if (document && document.body) {\n // force fallback to document.body\n setElement(document.body);\n return true;\n }\n return false;\n}\nfunction validateElement(appElement) {\n if (!appElement && !globalElement && !tryForceFallback()) {\n throw new Error(['react-modal: Cannot fallback to `document.body`, because it\\'s not ready or available.', 'If you are doing server-side rendering, use this function to defined an element.', '`Modal.setAppElement(el)` to make this accessible']);\n }\n}\nfunction hide(appElement) {\n validateElement(appElement);\n (appElement || globalElement).setAttribute('aria-hidden', 'true');\n}\nfunction show(appElement) {\n validateElement(appElement);\n (appElement || globalElement).removeAttribute('aria-hidden');\n}\nfunction documentNotReadyOrSSRTesting() {\n globalElement = null;\n}\nfunction resetForTesting() {\n globalElement = document.body;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.get = get;\nexports.add = add;\nexports.remove = remove;\nexports.totalCount = totalCount;\nvar classListMap = {};\nfunction get() {\n return classListMap;\n}\nfunction add(bodyClass) {\n // Set variable and default if none\n if (!classListMap[bodyClass]) {\n classListMap[bodyClass] = 0;\n }\n classListMap[bodyClass] += 1;\n return bodyClass;\n}\nfunction remove(bodyClass) {\n if (classListMap[bodyClass]) {\n classListMap[bodyClass] -= 1;\n }\n return bodyClass;\n}\nfunction totalCount() {\n return Object.keys(classListMap).reduce(function (acc, curr) {\n return acc + classListMap[curr];\n }, 0);\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar _exenv = require('exenv');\nvar _exenv2 = _interopRequireDefault(_exenv);\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\nvar EE = _exenv2[\"default\"];\nvar SafeHTMLElement = EE.canUseDOM ? window.HTMLElement : {};\nexports[\"default\"] = SafeHTMLElement;\nmodule.exports = exports['default'];","/* globals __webpack_amd_options__ */\nmodule.exports = __webpack_amd_options__;\n","import React, { Component } from 'react';\nimport axios from 'axios';\nimport Dropzone from 'react-dropzone'\nimport S3Upload from 'react-s3-uploader/s3upload';\n\n// the plan\n// - turn progress into an array of %ages\n// - also have an array of boolean for files complete, indexed by name (?)\n// - when all filesCompleted === true, then we're good to go\n\nvar _rollbarConfig = {\n accessToken: \"3f06ac22acf146e5aa751590f1ec51df\",\n captureUncaught: false,\n payload: {\n environment: process.env.RAILS_ENV,\n }\n};\nvar rollbar = require('../rollbar.umd.min.js');\nvar Rollbar = new rollbar(_rollbarConfig);\n\nclass UploadForm extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n files: [],\n progress: {},\n completed: {},\n showProgressBar: false,\n inOnboarding: this.props.in_onboarding,\n uploadFilename: null,\n // shitty done state. todo: clean this up.\n // really goes from no progress bar -> progress bar for each file -> done\n done: false,\n debug: this.props.debug,\n };\n }\n\n onDrop(files) {\n files = files.slice(0, 10);\n this.setState({ files });\n let options = {\n files: files,\n contentDisposition: 'attachment',\n // this is FUCKED\n uploadRequestHeaders: 'asdf',\n signingUrl: '/s3/sign',\n onFinishS3Put: (result, file) => this.handleFinish(result, file),\n onProgress: (percent, message, file) => this.handleProgress(percent, message, file),\n onError: (error) => this.handleError(error),\n };\n new S3Upload(options);\n\n // set progress bar to zero for every file.\n let emptyProgress = {};\n for (var file of files) { emptyProgress[file.name] = 0; }\n\n this.setState({\n showProgressBar: true,\n progress: emptyProgress,\n });\n }\n\n handleError(error) {\n Rollbar.error(error);\n alert('Error -- please contact help@famgram.com if you keep seeing this error.');\n }\n\n handleProgress(percent, message, file) {\n this.setState((prevState, props) => {\n let progress = prevState.progress;\n progress[file.name] = percent;\n return { progress: progress };\n });\n }\n\n handleFinish(result, file) {\n let url = result.signedUrl.split('?')[0];\n if (this.state.debug) { console.log(url); }\n axios.post(\n '/posts',\n {\n post: {\n group_id: this.props.group_id,\n photo_url: url,\n content_type: file.type,\n },\n multi: this.state.files.length > 1,\n in_onboarding: this.state.inOnboarding,\n }\n ).then((response) => {\n this.setState((prevState, props) => {\n let completed = prevState.completed;\n completed[file.name] = true;\n return { completed: completed };\n }, () => {\n // this is our setState callback\n let completedCount = 0;\n for (var file of this.state.files) {\n if (this.state.completed[file.name]) {\n completedCount++;\n }\n }\n\n if (this.state.debug) {\n console.log(completedCount + ' of ' + this.state.files.length + ' files completed');\n }\n\n if (completedCount === this.state.files.length) {\n window.location.href = response.data.redirect_url;\n this.setState({showProgressBar: false, done: true});\n }\n });\n });\n }\n\n onError(message) {\n alert(message);\n }\n\n componentDidUpdate(prevProps, prevState) {\n }\n\n render() {\n let progressBar = false;\n if (this.state.showProgressBar) {\n progressBar = this.state.files.map((file) => {\n return (<div key={file.name} className=\"mb3\">\n Uploading {file.name} …\n <div className=\"bg-moon-gray br-pill h1 overflow-y-hidden\">\n <div className=\"bg-blue br-pill h1 shadow-1\" style={ { width: this.state.progress[file.name] + '%'} }></div>\n </div>\n </div>);\n });\n } else if (this.state.done) {\n progressBar = (<div className='tc f4'>\n <icon className='icon icon-spinner pr2'></icon>\n Finishing...\n </div>);\n }\n\n return (\n <section>\n <div className=\"dropzone\">\n {!progressBar &&\n (<Dropzone\n onDrop={this.onDrop.bind(this)}\n accept=\"video/*, image/*\"\n className='w-100 bg-blue white ba br2 b--silver pa1 tc pointer'\n multiple={true}\n >\n <div className='mv3'>Click to select up to 10 photos/videos, or drag & drop here</div>\n </Dropzone>) }\n {progressBar ? progressBar : ''}\n </div>\n </section>\n );\n }\n}\n\nexport default UploadForm;\n","module.exports = SafeParseTuple;\nfunction SafeParseTuple(obj, reviver) {\n var json;\n var error = null;\n try {\n json = JSON.parse(obj, reviver);\n } catch (err) {\n error = err;\n }\n return [error, json];\n}","import URLToolkit from 'url-toolkit';\nimport window from 'global/window';\nvar DEFAULT_LOCATION = 'http://example.com';\nvar resolveUrl = function resolveUrl(baseUrl, relativeUrl) {\n // return early if we don't need to resolve\n if (/^[a-z]+:/i.test(relativeUrl)) {\n return relativeUrl;\n } // if baseUrl is a data URI, ignore it and resolve everything relative to window.location\n\n if (/^data:/.test(baseUrl)) {\n baseUrl = window.location && window.location.href || '';\n } // IE11 supports URL but not the URL constructor\n // feature detect the behavior we want\n\n var nativeURL = typeof window.URL === 'function';\n var protocolLess = /^\\/\\//.test(baseUrl); // remove location if window.location isn't available (i.e. we're in node)\n // and if baseUrl isn't an absolute url\n\n var removeLocation = !window.location && !/\\/\\//i.test(baseUrl); // if the base URL is relative then combine with the current location\n\n if (nativeURL) {\n baseUrl = new window.URL(baseUrl, window.location || DEFAULT_LOCATION);\n } else if (!/\\/\\//i.test(baseUrl)) {\n baseUrl = URLToolkit.buildAbsoluteURL(window.location && window.location.href || '', baseUrl);\n }\n if (nativeURL) {\n var newUrl = new URL(relativeUrl, baseUrl); // if we're a protocol-less url, remove the protocol\n // and if we're location-less, remove the location\n // otherwise, return the url unmodified\n\n if (removeLocation) {\n return newUrl.href.slice(DEFAULT_LOCATION.length);\n } else if (protocolLess) {\n return newUrl.href.slice(newUrl.protocol.length);\n }\n return newUrl.href;\n }\n return URLToolkit.buildAbsoluteURL(baseUrl, relativeUrl);\n};\nexport default resolveUrl;","import window from 'global/window';\nvar atob = function atob(s) {\n return window.atob ? window.atob(s) : Buffer.from(s, 'base64').toString('binary');\n};\nexport default function decodeB64ToUint8Array(b64Text) {\n var decodedString = atob(b64Text);\n var array = new Uint8Array(decodedString.length);\n for (var i = 0; i < decodedString.length; i++) {\n array[i] = decodedString.charCodeAt(i);\n }\n return array;\n}","import window from 'global/window';\nvar atob = function atob(s) {\n return window.atob ? window.atob(s) : Buffer.from(s, 'base64').toString('binary');\n};\nexport default function decodeB64ToUint8Array(b64Text) {\n var decodedString = atob(b64Text);\n var array = new Uint8Array(decodedString.length);\n for (var i = 0; i < decodedString.length; i++) {\n array[i] = decodedString.charCodeAt(i);\n }\n return array;\n}","var dom = require('./dom');\nexports.DOMImplementation = dom.DOMImplementation;\nexports.XMLSerializer = dom.XMLSerializer;\nexports.DOMParser = require('./dom-parser').DOMParser;","var getUint64 = require('../utils/numbers.js').getUint64;\nvar parseSidx = function parseSidx(data) {\n var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n result = {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4)),\n references: [],\n referenceId: view.getUint32(4),\n timescale: view.getUint32(8)\n },\n i = 12;\n if (result.version === 0) {\n result.earliestPresentationTime = view.getUint32(i);\n result.firstOffset = view.getUint32(i + 4);\n i += 8;\n } else {\n // read 64 bits\n result.earliestPresentationTime = getUint64(data.subarray(i));\n result.firstOffset = getUint64(data.subarray(i + 8));\n i += 16;\n }\n i += 2; // reserved\n\n var referenceCount = view.getUint16(i);\n i += 2; // start of references\n\n for (; referenceCount > 0; i += 12, referenceCount--) {\n result.references.push({\n referenceType: (data[i] & 0x80) >>> 7,\n referencedSize: view.getUint32(i) & 0x7FFFFFFF,\n subsegmentDuration: view.getUint32(i + 4),\n startsWithSap: !!(data[i + 8] & 0x80),\n sapType: (data[i + 8] & 0x70) >>> 4,\n sapDeltaTime: view.getUint32(i + 8) & 0x0FFFFFFF\n });\n }\n return result;\n};\nmodule.exports = parseSidx;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar _Modal = require('./components/Modal');\nvar _Modal2 = _interopRequireDefault(_Modal);\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\nexports[\"default\"] = _Modal2[\"default\"];\nmodule.exports = exports['default'];","'use strict';\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.YEAR = exports.MONTH = exports.WEEK = exports.DAY = exports.HOUR = exports.MINUTE = undefined;\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n};\nvar _slicedToArray = function () {\n function sliceIterator(arr, i) {\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"]) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n }\n return function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n return sliceIterator(arr, i);\n } else {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n }\n };\n}();\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nvar _react = require('react');\nvar _react2 = _interopRequireDefault(_react);\nvar _defaultFormatter = require('./defaultFormatter');\nvar _defaultFormatter2 = _interopRequireDefault(_defaultFormatter);\nvar _dateParser = require('./dateParser');\nvar _dateParser2 = _interopRequireDefault(_dateParser);\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\nfunction _objectWithoutProperties(obj, keys) {\n var target = {};\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n return target;\n}\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nfunction _possibleConstructorReturn(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return call && (_typeof(call) === \"object\" || typeof call === \"function\") ? call : self;\n}\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + _typeof(superClass));\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n}\nvar MINUTE = exports.MINUTE = 60;\nvar HOUR = exports.HOUR = MINUTE * 60;\nvar DAY = exports.DAY = HOUR * 24;\nvar WEEK = exports.WEEK = DAY * 7;\nvar MONTH = exports.MONTH = DAY * 30;\nvar YEAR = exports.YEAR = DAY * 365;\nvar TimeAgo = function (_Component) {\n _inherits(TimeAgo, _Component);\n function TimeAgo() {\n var _ref;\n var _temp, _this, _ret;\n _classCallCheck(this, TimeAgo);\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = TimeAgo.__proto__ || Object.getPrototypeOf(TimeAgo)).call.apply(_ref, [this].concat(args))), _this), _this.isStillMounted = false, _this.tick = function (refresh) {\n if (!_this.isStillMounted || !_this.props.live) {\n return;\n }\n var then = (0, _dateParser2[\"default\"])(_this.props.date).valueOf();\n if (!then) {\n console.warn('[react-timeago] Invalid Date provided');\n return;\n }\n var now = _this.props.now();\n var seconds = Math.round(Math.abs(now - then) / 1000);\n var unboundPeriod = seconds < MINUTE ? 1000 : seconds < HOUR ? 1000 * MINUTE : seconds < DAY ? 1000 * HOUR : 0;\n var period = Math.min(Math.max(unboundPeriod, _this.props.minPeriod * 1000), _this.props.maxPeriod * 1000);\n if (period) {\n _this.timeoutId = setTimeout(_this.tick, period);\n }\n if (!refresh) {\n _this.forceUpdate();\n }\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n _createClass(TimeAgo, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.isStillMounted = true;\n if (this.props.live) {\n this.tick(true);\n }\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate(lastProps) {\n if (this.props.live !== lastProps.live || this.props.date !== lastProps.date) {\n if (!this.props.live && this.timeoutId) {\n clearTimeout(this.timeoutId);\n }\n this.tick();\n }\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n this.isStillMounted = false;\n if (this.timeoutId) {\n clearTimeout(this.timeoutId);\n this.timeoutId = undefined;\n }\n }\n }, {\n key: 'render',\n value: function render() {\n /* eslint-disable no-unused-vars */\n var _props = this.props,\n date = _props.date,\n formatter = _props.formatter,\n Komponent = _props.component,\n live = _props.live,\n minPeriod = _props.minPeriod,\n maxPeriod = _props.maxPeriod,\n title = _props.title,\n now = _props.now,\n passDownProps = _objectWithoutProperties(_props, ['date', 'formatter', 'component', 'live', 'minPeriod', 'maxPeriod', 'title', 'now']);\n /* eslint-enable no-unused-vars */\n\n var then = (0, _dateParser2[\"default\"])(date).valueOf();\n if (!then) {\n return null;\n }\n var timeNow = now();\n var seconds = Math.round(Math.abs(timeNow - then) / 1000);\n var suffix = then < timeNow ? 'ago' : 'from now';\n var _ref2 = seconds < MINUTE ? [Math.round(seconds), 'second'] : seconds < HOUR ? [Math.round(seconds / MINUTE), 'minute'] : seconds < DAY ? [Math.round(seconds / HOUR), 'hour'] : seconds < WEEK ? [Math.round(seconds / DAY), 'day'] : seconds < MONTH ? [Math.round(seconds / WEEK), 'week'] : seconds < YEAR ? [Math.round(seconds / MONTH), 'month'] : [Math.round(seconds / YEAR), 'year'],\n _ref3 = _slicedToArray(_ref2, 2),\n value = _ref3[0],\n unit = _ref3[1];\n var passDownTitle = typeof title === 'undefined' ? typeof date === 'string' ? date : (0, _dateParser2[\"default\"])(date).toISOString().substr(0, 16).replace('T', ' ') : title;\n if (Komponent === 'time') {\n passDownProps.dateTime = (0, _dateParser2[\"default\"])(date).toISOString();\n }\n var nextFormatter = _defaultFormatter2[\"default\"].bind(null, value, unit, suffix);\n return _react2[\"default\"].createElement(Komponent, _extends({}, passDownProps, {\n title: passDownTitle\n }), this.props.formatter(value, unit, suffix, then, nextFormatter));\n }\n }]);\n return TimeAgo;\n}(_react.Component);\nTimeAgo.displayName = 'TimeAgo';\nTimeAgo.defaultProps = {\n live: true,\n component: 'time',\n minPeriod: 0,\n maxPeriod: Infinity,\n formatter: _defaultFormatter2[\"default\"],\n now: function now() {\n return Date.now();\n }\n};\nexports[\"default\"] = TimeAgo;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\n// English shortened\nvar strings = {\n prefixAgo: null,\n prefixFromNow: null,\n suffixAgo: '',\n suffixFromNow: '',\n seconds: '1m',\n minute: '1m',\n minutes: '%dm',\n hour: '1h',\n hours: '%dh',\n day: '1d',\n days: '%dd',\n month: '1mo',\n months: '%dmo',\n year: '1yr',\n years: '%dyr',\n wordSeparator: ' '\n};\nexports[\"default\"] = strings;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = buildFormatter;\n\n// If the numbers array is present, format numbers with it,\n// otherwise just cast the number to a string and return it\nvar normalizeNumber = function normalizeNumber(numbers, value) {\n return numbers && numbers.length === 10 ? String(value).split('').map(function (digit) {\n return digit.match(/^[0-9]$/) ? numbers[parseInt(digit)] : digit;\n }).join('') : String(value);\n};\n\n// Take a string or a function that takes number of days and returns a string\n// and provide a uniform API to create string parts\nvar normalizeFn = function normalizeFn(value, millisDelta, numbers) {\n return function (stringOrFn) {\n return typeof stringOrFn === 'function' ? stringOrFn(value, millisDelta).replace(/%d/g, normalizeNumber(numbers, value)) : stringOrFn.replace(/%d/g, normalizeNumber(numbers, value));\n };\n};\nfunction buildFormatter(strings) {\n return function formatter(value, unit, suffix, epochMillis) {\n // convert weeks to days if strings don't handle weeks\n var now = Date.now();\n if (unit === 'week' && !strings.week && !strings.weeks) {\n var _days = Math.round(Math.abs(epochMillis - now) / (1000 * 60 * 60 * 24));\n value = _days;\n unit = 'day';\n }\n\n // create a normalize function for given value\n var normalize = normalizeFn(value, now - epochMillis, strings.numbers);\n\n // The eventual return value stored in an array so that the wordSeparator can be used\n var dateString = [];\n\n // handle prefixes\n if (suffix === 'ago' && strings.prefixAgo) {\n dateString.push(normalize(strings.prefixAgo));\n }\n if (suffix === 'from now' && strings.prefixFromNow) {\n dateString.push(normalize(strings.prefixFromNow));\n }\n\n // Handle Main number and unit\n var isPlural = value > 1;\n if (isPlural) {\n var stringFn = strings[unit + 's'] || strings[unit] || '%d ' + unit;\n dateString.push(normalize(stringFn));\n } else {\n var _stringFn = strings[unit] || strings[unit + 's'] || '%d ' + unit;\n dateString.push(normalize(_stringFn));\n }\n\n // Handle Suffixes\n if (suffix === 'ago' && strings.suffixAgo) {\n dateString.push(normalize(strings.suffixAgo));\n }\n if (suffix === 'from now' && strings.suffixFromNow) {\n dateString.push(normalize(strings.suffixFromNow));\n }\n\n // join the array into a string and return it\n var wordSeparator = strings.wordSeparator || ' ';\n return dateString.join(wordSeparator);\n };\n}","function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n(function webpackUniversalModuleDefinition(root, factory) {\n if ((typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && (typeof module === \"undefined\" ? \"undefined\" : _typeof(module)) === 'object') module.exports = factory(require(\"react\"), require(\"prop-types\"));else if (typeof define === 'function' && define.amd) define([\"react\", \"prop-types\"], factory);else if ((typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object') exports[\"Dropzone\"] = factory(require(\"react\"), require(\"prop-types\"));else root[\"Dropzone\"] = factory(root[\"react\"], root[\"prop-types\"]);\n})(this, function (__WEBPACK_EXTERNAL_MODULE_2__, __WEBPACK_EXTERNAL_MODULE_3__) {\n return /******/function (modules) {\n // webpackBootstrap\n /******/ // The module cache\n /******/\n var installedModules = {};\n /******/\n /******/ // The require function\n /******/\n function __webpack_require__(moduleId) {\n /******/\n /******/ // Check if module is in cache\n /******/if (installedModules[moduleId]) /******/return installedModules[moduleId].exports;\n /******/\n /******/ // Create a new module (and put it into the cache)\n /******/\n var module = installedModules[moduleId] = {\n /******/exports: {},\n /******/id: moduleId,\n /******/loaded: false\n /******/\n };\n /******/\n /******/ // Execute the module function\n /******/\n modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n /******/\n /******/ // Flag the module as loaded\n /******/\n module.loaded = true;\n /******/\n /******/ // Return the exports of the module\n /******/\n return module.exports;\n /******/\n }\n /******/\n /******/\n /******/ // expose the modules object (__webpack_modules__)\n /******/\n __webpack_require__.m = modules;\n /******/\n /******/ // expose the module cache\n /******/\n __webpack_require__.c = installedModules;\n /******/\n /******/ // __webpack_public_path__\n /******/\n __webpack_require__.p = \"\";\n /******/\n /******/ // Load entry module and return exports\n /******/\n return __webpack_require__(0);\n /******/\n }\n /************************************************************************/\n /******/([( /* 0 */\n /***/function (module, exports, __webpack_require__) {\n /* WEBPACK VAR INJECTION */(function (process) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n var _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n var _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n }();\n var _react = __webpack_require__(2);\n var _react2 = _interopRequireDefault(_react);\n var _propTypes = __webpack_require__(3);\n var _propTypes2 = _interopRequireDefault(_propTypes);\n var _attrAccept = __webpack_require__(4);\n var _attrAccept2 = _interopRequireDefault(_attrAccept);\n var _getDataTransferItems = __webpack_require__(5);\n var _getDataTransferItems2 = _interopRequireDefault(_getDataTransferItems);\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n }\n function _objectWithoutProperties(obj, keys) {\n var target = {};\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n return target;\n }\n function _toConsumableArray(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n return arr2;\n } else {\n return Array.from(arr);\n }\n }\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n function _possibleConstructorReturn(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return call && (_typeof(call) === \"object\" || typeof call === \"function\") ? call : self;\n }\n function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + _typeof(superClass));\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n } /* eslint prefer-template: 0 */\n\n var supportMultiple = typeof document !== 'undefined' && document && document.createElement ? 'multiple' in document.createElement('input') : true;\n function fileAccepted(file, accept) {\n // Firefox versions prior to 53 return a bogus MIME type for every file drag, so dragovers with\n // that MIME type will always be accepted\n return file.type === 'application/x-moz-file' || (0, _attrAccept2[\"default\"])(file, accept);\n }\n var Dropzone = function (_React$Component) {\n _inherits(Dropzone, _React$Component);\n _createClass(Dropzone, null, [{\n key: 'onDocumentDragOver',\n value: function onDocumentDragOver(evt) {\n // allow the entire document to be a drag target\n evt.preventDefault();\n }\n }]);\n function Dropzone(props, context) {\n _classCallCheck(this, Dropzone);\n var _this = _possibleConstructorReturn(this, (Dropzone.__proto__ || Object.getPrototypeOf(Dropzone)).call(this, props, context));\n _this.renderChildren = function (children, isDragActive, isDragReject) {\n if (typeof children === 'function') {\n return children(_extends({}, _this.state, {\n isDragActive: isDragActive,\n isDragReject: isDragReject\n }));\n }\n return children;\n };\n _this.onClick = _this.onClick.bind(_this);\n _this.onDocumentDrop = _this.onDocumentDrop.bind(_this);\n _this.onDragStart = _this.onDragStart.bind(_this);\n _this.onDragEnter = _this.onDragEnter.bind(_this);\n _this.onDragLeave = _this.onDragLeave.bind(_this);\n _this.onDragOver = _this.onDragOver.bind(_this);\n _this.onDrop = _this.onDrop.bind(_this);\n _this.onFileDialogCancel = _this.onFileDialogCancel.bind(_this);\n _this.setRef = _this.setRef.bind(_this);\n _this.setRefs = _this.setRefs.bind(_this);\n _this.onInputElementClick = _this.onInputElementClick.bind(_this);\n _this.isFileDialogActive = false;\n _this.state = {\n draggedFiles: [],\n acceptedFiles: [],\n rejectedFiles: []\n };\n return _this;\n }\n _createClass(Dropzone, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n var preventDropOnDocument = this.props.preventDropOnDocument;\n this.dragTargets = [];\n if (preventDropOnDocument) {\n document.addEventListener('dragover', Dropzone.onDocumentDragOver, false);\n document.addEventListener('drop', this.onDocumentDrop, false);\n }\n this.fileInputEl.addEventListener('click', this.onInputElementClick, false);\n // Tried implementing addEventListener, but didn't work out\n document.body.onfocus = this.onFileDialogCancel;\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n var preventDropOnDocument = this.props.preventDropOnDocument;\n if (preventDropOnDocument) {\n document.removeEventListener('dragover', Dropzone.onDocumentDragOver);\n document.removeEventListener('drop', this.onDocumentDrop);\n }\n this.fileInputEl.removeEventListener('click', this.onInputElementClick, false);\n // Can be replaced with removeEventListener, if addEventListener works\n document.body.onfocus = null;\n }\n }, {\n key: 'onDocumentDrop',\n value: function onDocumentDrop(evt) {\n if (this.node.contains(evt.target)) {\n // if we intercepted an event for our instance, let it propagate down to the instance's onDrop handler\n return;\n }\n evt.preventDefault();\n this.dragTargets = [];\n }\n }, {\n key: 'onDragStart',\n value: function onDragStart(evt) {\n if (this.props.onDragStart) {\n this.props.onDragStart.call(this, evt);\n }\n }\n }, {\n key: 'onDragEnter',\n value: function onDragEnter(evt) {\n evt.preventDefault();\n\n // Count the dropzone and any children that are entered.\n if (this.dragTargets.indexOf(evt.target) === -1) {\n this.dragTargets.push(evt.target);\n }\n this.setState({\n draggedFiles: (0, _getDataTransferItems2[\"default\"])(evt)\n });\n if (this.props.onDragEnter) {\n this.props.onDragEnter.call(this, evt);\n }\n }\n }, {\n key: 'onDragOver',\n value: function onDragOver(evt) {\n // eslint-disable-line class-methods-use-this\n evt.preventDefault();\n evt.stopPropagation();\n try {\n evt.dataTransfer.dropEffect = 'copy'; // eslint-disable-line no-param-reassign\n } catch (err) {\n // continue regardless of error\n }\n if (this.props.onDragOver) {\n this.props.onDragOver.call(this, evt);\n }\n return false;\n }\n }, {\n key: 'onDragLeave',\n value: function onDragLeave(evt) {\n var _this2 = this;\n evt.preventDefault();\n\n // Only deactivate once the dropzone and all children have been left.\n this.dragTargets = this.dragTargets.filter(function (el) {\n return el !== evt.target && _this2.node.contains(el);\n });\n if (this.dragTargets.length > 0) {\n return;\n }\n\n // Clear dragging files state\n this.setState({\n draggedFiles: []\n });\n if (this.props.onDragLeave) {\n this.props.onDragLeave.call(this, evt);\n }\n }\n }, {\n key: 'onDrop',\n value: function onDrop(evt) {\n var _this3 = this;\n var _props = this.props,\n onDrop = _props.onDrop,\n onDropAccepted = _props.onDropAccepted,\n onDropRejected = _props.onDropRejected,\n multiple = _props.multiple,\n disablePreview = _props.disablePreview,\n accept = _props.accept;\n var fileList = (0, _getDataTransferItems2[\"default\"])(evt);\n var acceptedFiles = [];\n var rejectedFiles = [];\n\n // Stop default browser behavior\n evt.preventDefault();\n\n // Reset the counter along with the drag on a drop.\n this.dragTargets = [];\n this.isFileDialogActive = false;\n fileList.forEach(function (file) {\n if (!disablePreview) {\n try {\n file.preview = window.URL.createObjectURL(file); // eslint-disable-line no-param-reassign\n } catch (err) {\n if (process.env.NODE_ENV !== 'production') {\n console.error('Failed to generate preview for file', file, err); // eslint-disable-line no-console\n }\n }\n }\n if (fileAccepted(file, accept) && _this3.fileMatchSize(file)) {\n acceptedFiles.push(file);\n } else {\n rejectedFiles.push(file);\n }\n });\n if (!multiple) {\n // if not in multi mode add any extra accepted files to rejected.\n // This will allow end users to easily ignore a multi file drop in \"single\" mode.\n rejectedFiles.push.apply(rejectedFiles, _toConsumableArray(acceptedFiles.splice(1)));\n }\n if (onDrop) {\n onDrop.call(this, acceptedFiles, rejectedFiles, evt);\n }\n if (rejectedFiles.length > 0 && onDropRejected) {\n onDropRejected.call(this, rejectedFiles, evt);\n }\n if (acceptedFiles.length > 0 && onDropAccepted) {\n onDropAccepted.call(this, acceptedFiles, evt);\n }\n\n // Clear files value\n this.draggedFiles = null;\n\n // Reset drag state\n this.setState({\n draggedFiles: [],\n acceptedFiles: acceptedFiles,\n rejectedFiles: rejectedFiles\n });\n }\n }, {\n key: 'onClick',\n value: function onClick(evt) {\n var _props2 = this.props,\n onClick = _props2.onClick,\n disableClick = _props2.disableClick;\n if (!disableClick) {\n evt.stopPropagation();\n if (onClick) {\n onClick.call(this, evt);\n }\n\n // in IE11/Edge the file-browser dialog is blocking, ensure this is behind setTimeout\n // this is so react can handle state changes in the onClick prop above above\n // see: https://github.com/okonet/react-dropzone/issues/450\n setTimeout(this.open.bind(this), 0);\n }\n }\n }, {\n key: 'onInputElementClick',\n value: function onInputElementClick(evt) {\n evt.stopPropagation();\n if (this.props.inputProps && this.props.inputProps.onClick) {\n this.props.inputProps.onClick();\n }\n }\n }, {\n key: 'onFileDialogCancel',\n value: function onFileDialogCancel() {\n // timeout will not recognize context of this method\n var onFileDialogCancel = this.props.onFileDialogCancel;\n var fileInputEl = this.fileInputEl;\n var isFileDialogActive = this.isFileDialogActive;\n // execute the timeout only if the onFileDialogCancel is defined and FileDialog\n // is opened in the browser\n\n if (onFileDialogCancel && isFileDialogActive) {\n setTimeout(function () {\n // Returns an object as FileList\n var FileList = fileInputEl.files;\n if (!FileList.length) {\n isFileDialogActive = false;\n onFileDialogCancel();\n }\n }, 300);\n }\n }\n }, {\n key: 'setRef',\n value: function setRef(ref) {\n this.node = ref;\n }\n }, {\n key: 'setRefs',\n value: function setRefs(ref) {\n this.fileInputEl = ref;\n }\n }, {\n key: 'fileMatchSize',\n value: function fileMatchSize(file) {\n return file.size <= this.props.maxSize && file.size >= this.props.minSize;\n }\n }, {\n key: 'allFilesAccepted',\n value: function allFilesAccepted(files) {\n var _this4 = this;\n return files.every(function (file) {\n return fileAccepted(file, _this4.props.accept);\n });\n }\n\n /**\n * Open system file upload dialog.\n *\n * @public\n */\n }, {\n key: 'open',\n value: function open() {\n this.isFileDialogActive = true;\n this.fileInputEl.value = null;\n this.fileInputEl.click();\n }\n }, {\n key: 'render',\n value: function render() {\n var _props3 = this.props,\n accept = _props3.accept,\n activeClassName = _props3.activeClassName,\n inputProps = _props3.inputProps,\n multiple = _props3.multiple,\n name = _props3.name,\n rejectClassName = _props3.rejectClassName,\n children = _props3.children,\n rest = _objectWithoutProperties(_props3, ['accept', 'activeClassName', 'inputProps', 'multiple', 'name', 'rejectClassName', 'children']);\n var activeStyle = rest.activeStyle,\n className = rest.className,\n rejectStyle = rest.rejectStyle,\n style = rest.style,\n props = _objectWithoutProperties(rest, ['activeStyle', 'className', 'rejectStyle', 'style']);\n var draggedFiles = this.state.draggedFiles;\n var filesCount = draggedFiles.length;\n var isMultipleAllowed = multiple || filesCount <= 1;\n var isDragActive = filesCount > 0 && this.allFilesAccepted(draggedFiles);\n var isDragReject = filesCount > 0 && (!isDragActive || !isMultipleAllowed);\n className = className || '';\n if (isDragActive && activeClassName) {\n className += ' ' + activeClassName;\n }\n if (isDragReject && rejectClassName) {\n className += ' ' + rejectClassName;\n }\n if (!className && !style && !activeStyle && !rejectStyle) {\n style = {\n width: 200,\n height: 200,\n borderWidth: 2,\n borderColor: '#666',\n borderStyle: 'dashed',\n borderRadius: 5\n };\n activeStyle = {\n borderStyle: 'solid',\n borderColor: '#6c6',\n backgroundColor: '#eee'\n };\n rejectStyle = {\n borderStyle: 'solid',\n borderColor: '#c66',\n backgroundColor: '#eee'\n };\n }\n var appliedStyle = void 0;\n if (activeStyle && isDragActive) {\n appliedStyle = _extends({}, style, activeStyle);\n } else if (rejectStyle && isDragReject) {\n appliedStyle = _extends({}, style, rejectStyle);\n } else {\n appliedStyle = _extends({}, style);\n }\n var inputAttributes = {\n accept: accept,\n type: 'file',\n style: {\n display: 'none'\n },\n multiple: supportMultiple && multiple,\n ref: this.setRefs,\n onChange: this.onDrop\n };\n if (name && name.length) {\n inputAttributes.name = name;\n }\n\n // Remove custom properties before passing them to the wrapper div element\n var customProps = ['acceptedFiles', 'preventDropOnDocument', 'disablePreview', 'disableClick', 'onDropAccepted', 'onDropRejected', 'onFileDialogCancel', 'maxSize', 'minSize'];\n var divProps = _extends({}, props);\n customProps.forEach(function (prop) {\n return delete divProps[prop];\n });\n return _react2[\"default\"].createElement('div', _extends({\n className: className,\n style: appliedStyle\n }, divProps /* expand user provided props first so event handlers are never overridden */, {\n onClick: this.onClick,\n onDragStart: this.onDragStart,\n onDragEnter: this.onDragEnter,\n onDragOver: this.onDragOver,\n onDragLeave: this.onDragLeave,\n onDrop: this.onDrop,\n ref: this.setRef\n }), this.renderChildren(children, isDragActive, isDragReject), _react2[\"default\"].createElement('input', _extends({}, inputProps /* expand user provided inputProps first so inputAttributes override them */, inputAttributes)));\n }\n }]);\n return Dropzone;\n }(_react2[\"default\"].Component);\n Dropzone.propTypes = {\n /**\n * Allow specific types of files. See https://github.com/okonet/attr-accept for more information.\n * Keep in mind that mime type determination is not reliable accross platforms. CSV files,\n * for example, are reported as text/plain under macOS but as application/vnd.ms-excel under\n * Windows. In some cases there might not be a mime type set at all.\n * See: https://github.com/okonet/react-dropzone/issues/276\n */\n accept: _propTypes2[\"default\"].string,\n /**\n * Contents of the dropzone\n */\n children: _propTypes2[\"default\"].oneOfType([_propTypes2[\"default\"].node, _propTypes2[\"default\"].func]),\n /**\n * Disallow clicking on the dropzone container to open file dialog\n */\n disableClick: _propTypes2[\"default\"].bool,\n /**\n * Enable/disable preview generation\n */\n disablePreview: _propTypes2[\"default\"].bool,\n /**\n * If false, allow dropped items to take over the current browser window\n */\n preventDropOnDocument: _propTypes2[\"default\"].bool,\n /**\n * Pass additional attributes to the `<input type=\"file\"/>` tag\n */\n inputProps: _propTypes2[\"default\"].object,\n /**\n * Allow dropping multiple files\n */\n multiple: _propTypes2[\"default\"].bool,\n /**\n * `name` attribute for the input tag\n */\n name: _propTypes2[\"default\"].string,\n /**\n * Maximum file size\n */\n maxSize: _propTypes2[\"default\"].number,\n /**\n * Minimum file size\n */\n minSize: _propTypes2[\"default\"].number,\n /**\n * className\n */\n className: _propTypes2[\"default\"].string,\n /**\n * className for accepted state\n */\n activeClassName: _propTypes2[\"default\"].string,\n /**\n * className for rejected state\n */\n rejectClassName: _propTypes2[\"default\"].string,\n /**\n * CSS styles to apply\n */\n style: _propTypes2[\"default\"].object,\n /**\n * CSS styles to apply when drop will be accepted\n */\n activeStyle: _propTypes2[\"default\"].object,\n /**\n * CSS styles to apply when drop will be rejected\n */\n rejectStyle: _propTypes2[\"default\"].object,\n /**\n * onClick callback\n * @param {Event} event\n */\n onClick: _propTypes2[\"default\"].func,\n /**\n * onDrop callback\n */\n onDrop: _propTypes2[\"default\"].func,\n /**\n * onDropAccepted callback\n */\n onDropAccepted: _propTypes2[\"default\"].func,\n /**\n * onDropRejected callback\n */\n onDropRejected: _propTypes2[\"default\"].func,\n /**\n * onDragStart callback\n */\n onDragStart: _propTypes2[\"default\"].func,\n /**\n * onDragEnter callback\n */\n onDragEnter: _propTypes2[\"default\"].func,\n /**\n * onDragOver callback\n */\n onDragOver: _propTypes2[\"default\"].func,\n /**\n * onDragLeave callback\n */\n onDragLeave: _propTypes2[\"default\"].func,\n /**\n * Provide a callback on clicking the cancel button of the file dialog\n */\n onFileDialogCancel: _propTypes2[\"default\"].func\n };\n Dropzone.defaultProps = {\n preventDropOnDocument: true,\n disablePreview: false,\n disableClick: false,\n multiple: true,\n maxSize: Infinity,\n minSize: 0\n };\n exports[\"default\"] = Dropzone;\n module.exports = exports['default'];\n /* WEBPACK VAR INJECTION */\n }).call(exports, __webpack_require__(1));\n\n /***/\n }), ( /* 1 */\n /***/function (module, exports) {\n // shim for using process in browser\n var process = module.exports = {};\n\n // cached from whatever global is present so that test runners that stub it\n // don't break things. But we need to wrap it in a try catch in case it is\n // wrapped in strict mode code which doesn't define any globals. It's inside a\n // function because try/catches deoptimize in certain engines.\n\n var cachedSetTimeout;\n var cachedClearTimeout;\n function defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n }\n function defaultClearTimeout() {\n throw new Error('clearTimeout has not been defined');\n }\n (function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n })();\n function runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch (e) {\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch (e) {\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n }\n function runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e) {\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e) {\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n }\n var queue = [];\n var draining = false;\n var currentQueue;\n var queueIndex = -1;\n function cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n }\n function drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n var len = queue.length;\n while (len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n }\n process.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n };\n\n // v8 likes predictible objects\n function Item(fun, array) {\n this.fun = fun;\n this.array = array;\n }\n Item.prototype.run = function () {\n this.fun.apply(null, this.array);\n };\n process.title = 'browser';\n process.browser = true;\n process.env = {};\n process.argv = [];\n process.version = ''; // empty string to avoid regexp issues\n process.versions = {};\n function noop() {}\n process.on = noop;\n process.addListener = noop;\n process.once = noop;\n process.off = noop;\n process.removeListener = noop;\n process.removeAllListeners = noop;\n process.emit = noop;\n process.prependListener = noop;\n process.prependOnceListener = noop;\n process.listeners = function (name) {\n return [];\n };\n process.binding = function (name) {\n throw new Error('process.binding is not supported');\n };\n process.cwd = function () {\n return '/';\n };\n process.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n };\n process.umask = function () {\n return 0;\n };\n\n /***/\n }), ( /* 2 */\n /***/function (module, exports) {\n module.exports = __WEBPACK_EXTERNAL_MODULE_2__;\n\n /***/\n }), ( /* 3 */\n /***/function (module, exports) {\n module.exports = __WEBPACK_EXTERNAL_MODULE_3__;\n\n /***/\n }), ( /* 4 */\n /***/function (module, exports) {\n module.exports = function (t) {\n function n(e) {\n if (r[e]) return r[e].exports;\n var o = r[e] = {\n exports: {},\n id: e,\n loaded: !1\n };\n return t[e].call(o.exports, o, o.exports, n), o.loaded = !0, o.exports;\n }\n var r = {};\n return n.m = t, n.c = r, n.p = \"\", n(0);\n }([function (t, n, r) {\n \"use strict\";\n\n n.__esModule = !0, r(8), r(9), n[\"default\"] = function (t, n) {\n if (t && n) {\n var r = function () {\n var r = Array.isArray(n) ? n : n.split(\",\"),\n e = t.name || \"\",\n o = t.type || \"\",\n i = o.replace(/\\/.*$/, \"\");\n return {\n v: r.some(function (t) {\n var n = t.trim();\n return \".\" === n.charAt(0) ? e.toLowerCase().endsWith(n.toLowerCase()) : /\\/\\*$/.test(n) ? i === n.replace(/\\/.*$/, \"\") : o === n;\n })\n };\n }();\n if (\"object\" == _typeof(r)) return r.v;\n }\n return !0;\n }, t.exports = n[\"default\"];\n }, function (t, n) {\n var r = t.exports = {\n version: \"1.2.2\"\n };\n \"number\" == typeof __e && (__e = r);\n }, function (t, n) {\n var r = t.exports = \"undefined\" != typeof window && window.Math == Math ? window : \"undefined\" != typeof self && self.Math == Math ? self : Function(\"return this\")();\n \"number\" == typeof __g && (__g = r);\n }, function (t, n, r) {\n var e = r(2),\n o = r(1),\n i = r(4),\n u = r(19),\n c = \"prototype\",\n f = function f(t, n) {\n return function () {\n return t.apply(n, arguments);\n };\n },\n s = function s(t, n, r) {\n var a,\n p,\n l,\n y,\n d = t & s.G,\n h = t & s.P,\n v = d ? e : t & s.S ? e[n] || (e[n] = {}) : (e[n] || {})[c],\n x = d ? o : o[n] || (o[n] = {});\n d && (r = n);\n for (a in r) p = !(t & s.F) && v && a in v, l = (p ? v : r)[a], y = t & s.B && p ? f(l, e) : h && \"function\" == typeof l ? f(Function.call, l) : l, v && !p && u(v, a, l), x[a] != l && i(x, a, y), h && ((x[c] || (x[c] = {}))[a] = l);\n };\n e.core = o, s.F = 1, s.G = 2, s.S = 4, s.P = 8, s.B = 16, s.W = 32, t.exports = s;\n }, function (t, n, r) {\n var e = r(5),\n o = r(18);\n t.exports = r(22) ? function (t, n, r) {\n return e.setDesc(t, n, o(1, r));\n } : function (t, n, r) {\n return t[n] = r, t;\n };\n }, function (t, n) {\n var r = Object;\n t.exports = {\n create: r.create,\n getProto: r.getPrototypeOf,\n isEnum: {}.propertyIsEnumerable,\n getDesc: r.getOwnPropertyDescriptor,\n setDesc: r.defineProperty,\n setDescs: r.defineProperties,\n getKeys: r.keys,\n getNames: r.getOwnPropertyNames,\n getSymbols: r.getOwnPropertySymbols,\n each: [].forEach\n };\n }, function (t, n) {\n var r = 0,\n e = Math.random();\n t.exports = function (t) {\n return \"Symbol(\".concat(void 0 === t ? \"\" : t, \")_\", (++r + e).toString(36));\n };\n }, function (t, n, r) {\n var e = r(20)(\"wks\"),\n o = r(2).Symbol;\n t.exports = function (t) {\n return e[t] || (e[t] = o && o[t] || (o || r(6))(\"Symbol.\" + t));\n };\n }, function (t, n, r) {\n r(26), t.exports = r(1).Array.some;\n }, function (t, n, r) {\n r(25), t.exports = r(1).String.endsWith;\n }, function (t, n) {\n t.exports = function (t) {\n if (\"function\" != typeof t) throw TypeError(t + \" is not a function!\");\n return t;\n };\n }, function (t, n) {\n var r = {}.toString;\n t.exports = function (t) {\n return r.call(t).slice(8, -1);\n };\n }, function (t, n, r) {\n var e = r(10);\n t.exports = function (t, n, r) {\n if (e(t), void 0 === n) return t;\n switch (r) {\n case 1:\n return function (r) {\n return t.call(n, r);\n };\n case 2:\n return function (r, e) {\n return t.call(n, r, e);\n };\n case 3:\n return function (r, e, o) {\n return t.call(n, r, e, o);\n };\n }\n return function () {\n return t.apply(n, arguments);\n };\n };\n }, function (t, n) {\n t.exports = function (t) {\n if (void 0 == t) throw TypeError(\"Can't call method on \" + t);\n return t;\n };\n }, function (t, n, r) {\n t.exports = function (t) {\n var n = /./;\n try {\n \"/./\"[t](n);\n } catch (e) {\n try {\n return n[r(7)(\"match\")] = !1, !\"/./\"[t](n);\n } catch (o) {}\n }\n return !0;\n };\n }, function (t, n) {\n t.exports = function (t) {\n try {\n return !!t();\n } catch (n) {\n return !0;\n }\n };\n }, function (t, n) {\n t.exports = function (t) {\n return \"object\" == _typeof(t) ? null !== t : \"function\" == typeof t;\n };\n }, function (t, n, r) {\n var e = r(16),\n o = r(11),\n i = r(7)(\"match\");\n t.exports = function (t) {\n var n;\n return e(t) && (void 0 !== (n = t[i]) ? !!n : \"RegExp\" == o(t));\n };\n }, function (t, n) {\n t.exports = function (t, n) {\n return {\n enumerable: !(1 & t),\n configurable: !(2 & t),\n writable: !(4 & t),\n value: n\n };\n };\n }, function (t, n, r) {\n var e = r(2),\n o = r(4),\n i = r(6)(\"src\"),\n u = \"toString\",\n c = Function[u],\n f = (\"\" + c).split(u);\n r(1).inspectSource = function (t) {\n return c.call(t);\n }, (t.exports = function (t, n, r, u) {\n \"function\" == typeof r && (o(r, i, t[n] ? \"\" + t[n] : f.join(String(n))), \"name\" in r || (r.name = n)), t === e ? t[n] = r : (u || delete t[n], o(t, n, r));\n })(Function.prototype, u, function () {\n return \"function\" == typeof this && this[i] || c.call(this);\n });\n }, function (t, n, r) {\n var e = r(2),\n o = \"__core-js_shared__\",\n i = e[o] || (e[o] = {});\n t.exports = function (t) {\n return i[t] || (i[t] = {});\n };\n }, function (t, n, r) {\n var e = r(17),\n o = r(13);\n t.exports = function (t, n, r) {\n if (e(n)) throw TypeError(\"String#\" + r + \" doesn't accept regex!\");\n return String(o(t));\n };\n }, function (t, n, r) {\n t.exports = !r(15)(function () {\n return 7 != Object.defineProperty({}, \"a\", {\n get: function get() {\n return 7;\n }\n }).a;\n });\n }, function (t, n) {\n var r = Math.ceil,\n e = Math.floor;\n t.exports = function (t) {\n return isNaN(t = +t) ? 0 : (t > 0 ? e : r)(t);\n };\n }, function (t, n, r) {\n var e = r(23),\n o = Math.min;\n t.exports = function (t) {\n return t > 0 ? o(e(t), 9007199254740991) : 0;\n };\n }, function (t, n, r) {\n \"use strict\";\n\n var e = r(3),\n o = r(24),\n i = r(21),\n u = \"endsWith\",\n c = \"\"[u];\n e(e.P + e.F * r(14)(u), \"String\", {\n endsWith: function endsWith(t) {\n var n = i(this, t, u),\n r = arguments,\n e = r.length > 1 ? r[1] : void 0,\n f = o(n.length),\n s = void 0 === e ? f : Math.min(o(e), f),\n a = String(t);\n return c ? c.call(n, a, s) : n.slice(s - a.length, s) === a;\n }\n });\n }, function (t, n, r) {\n var e = r(5),\n o = r(3),\n i = r(1).Array || Array,\n u = {},\n c = function c(t, n) {\n e.each.call(t.split(\",\"), function (t) {\n void 0 == n && t in i ? u[t] = i[t] : t in [] && (u[t] = r(12)(Function.call, [][t], n));\n });\n };\n c(\"pop,reverse,shift,keys,values,entries\", 1), c(\"indexOf,every,some,forEach,map,filter,find,findIndex,includes\", 3), c(\"join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill\"), o(o.S, \"Array\", u);\n }]);\n\n /***/\n }), ( /* 5 */\n /***/function (module, exports) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports[\"default\"] = getDataTransferFiles;\n function getDataTransferFiles(event) {\n var dataTransferItemsList = [];\n if (event.dataTransfer) {\n var dt = event.dataTransfer;\n if (dt.files && dt.files.length) {\n dataTransferItemsList = dt.files;\n } else if (dt.items && dt.items.length) {\n // During the drag even the dataTransfer.files is null\n // but Chrome implements some drag store, which is accesible via dataTransfer.items\n dataTransferItemsList = dt.items;\n }\n } else if (event.target && event.target.files) {\n dataTransferItemsList = event.target.files;\n }\n // Convert from DataTransferItemsList to the native Array\n return Array.prototype.slice.call(dataTransferItemsList);\n }\n module.exports = exports[\"default\"];\n\n /***/\n }\n /******/)]);\n});\n;","/**\n * Taken, CommonJS-ified, and heavily modified from:\n * https://github.com/flyingsparx/NodeDirectUploader\n */\n\nS3Upload.prototype.server = '';\nS3Upload.prototype.signingUrl = '/sign-s3';\nS3Upload.prototype.signingUrlMethod = 'GET';\nS3Upload.prototype.successResponses = [200, 201];\nS3Upload.prototype.fileElement = null;\nS3Upload.prototype.files = null;\nS3Upload.prototype.onFinishS3Put = function (signResult, file) {\n return console.log('base.onFinishS3Put()', signResult.publicUrl);\n};\nS3Upload.prototype.preprocess = function (file, next) {\n console.log('base.preprocess()', file);\n return next(file);\n};\nS3Upload.prototype.onProgress = function (percent, status, file) {\n return console.log('base.onProgress()', percent, status);\n};\nS3Upload.prototype.onError = function (status, file) {\n return console.log('base.onError()', status);\n};\nS3Upload.prototype.onSignedUrl = function (result) {};\nS3Upload.prototype.scrubFilename = function (filename) {\n return filename.replace(/[^\\w\\d_\\-\\.]+/ig, '');\n};\nfunction S3Upload(options) {\n if (options == null) {\n options = {};\n }\n for (var option in options) {\n if (options.hasOwnProperty(option)) {\n this[option] = options[option];\n }\n }\n var files = this.fileElement ? this.fileElement.files : this.files || [];\n this.handleFileSelect(files);\n}\nS3Upload.prototype.handleFileSelect = function (files) {\n var result = [];\n for (var i = 0; i < files.length; i++) {\n var file = files[i];\n this.preprocess(file, function (processedFile) {\n this.onProgress(0, 'Waiting', processedFile);\n result.push(this.uploadFile(processedFile));\n return result;\n }.bind(this));\n }\n};\nS3Upload.prototype.createCORSRequest = function (method, url, opts) {\n var opts = opts || {};\n var xhr = new XMLHttpRequest();\n if (xhr.withCredentials != null) {\n xhr.open(method, url, true);\n if (opts.withCredentials != null) {\n xhr.withCredentials = opts.withCredentials;\n }\n } else if (typeof XDomainRequest !== \"undefined\") {\n xhr = new XDomainRequest();\n xhr.open(method, url);\n } else {\n xhr = null;\n }\n return xhr;\n};\nS3Upload.prototype._getErrorRequestContext = function (xhr) {\n return {\n response: xhr.responseText,\n status: xhr.status,\n statusText: xhr.statusText,\n readyState: xhr.readyState\n };\n};\nS3Upload.prototype.executeOnSignedUrl = function (file, callback) {\n var fileName = this.scrubFilename(file.name);\n var queryString = '?objectName=' + fileName + '&contentType=' + encodeURIComponent(file.type);\n if (this.s3path) {\n queryString += '&path=' + encodeURIComponent(this.s3path);\n }\n if (this.signingUrlQueryParams) {\n var signingUrlQueryParams = typeof this.signingUrlQueryParams === 'function' ? this.signingUrlQueryParams() : this.signingUrlQueryParams;\n Object.keys(signingUrlQueryParams).forEach(function (key) {\n var val = signingUrlQueryParams[key];\n queryString += '&' + key + '=' + val;\n });\n }\n var xhr = this.createCORSRequest(this.signingUrlMethod, this.server + this.signingUrl + queryString, {\n withCredentials: this.signingUrlWithCredentials\n });\n if (this.signingUrlHeaders) {\n var signingUrlHeaders = typeof this.signingUrlHeaders === 'function' ? this.signingUrlHeaders() : this.signingUrlHeaders;\n Object.keys(signingUrlHeaders).forEach(function (key) {\n var val = signingUrlHeaders[key];\n xhr.setRequestHeader(key, val);\n });\n }\n xhr.overrideMimeType && xhr.overrideMimeType('text/plain; charset=x-user-defined');\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 4 && this.successResponses.indexOf(xhr.status) >= 0) {\n var result;\n try {\n result = JSON.parse(xhr.responseText);\n this.onSignedUrl(result);\n } catch (error) {\n this.onError('Invalid response from server', file, this._getErrorRequestContext(xhr));\n return false;\n }\n return callback(result);\n } else if (xhr.readyState === 4 && this.successResponses.indexOf(xhr.status) < 0) {\n return this.onError('Could not contact request signing server. Status = ' + xhr.status, file, this._getErrorRequestContext(xhr));\n }\n }.bind(this);\n return xhr.send();\n};\nS3Upload.prototype.uploadToS3 = function (file, signResult) {\n var xhr = this.createCORSRequest('PUT', signResult.signedUrl);\n if (!xhr) {\n this.onError('CORS not supported', file, {});\n } else {\n xhr.onload = function () {\n if (this.successResponses.indexOf(xhr.status) >= 0) {\n this.onProgress(100, 'Upload completed', file);\n return this.onFinishS3Put(signResult, file);\n } else {\n return this.onError('Upload error: ' + xhr.status, file, this._getErrorRequestContext(xhr));\n }\n }.bind(this);\n xhr.onerror = function () {\n return this.onError('XHR error', file, this._getErrorRequestContext(xhr));\n }.bind(this);\n xhr.upload.onprogress = function (e) {\n var percentLoaded;\n if (e.lengthComputable) {\n percentLoaded = Math.round(e.loaded / e.total * 100);\n return this.onProgress(percentLoaded, percentLoaded === 100 ? 'Finalizing' : 'Uploading', file);\n }\n }.bind(this);\n }\n xhr.setRequestHeader('Content-Type', file.type);\n if (this.contentDisposition) {\n var disposition = this.contentDisposition;\n if (disposition === 'auto') {\n if (file.type.substr(0, 6) === 'image/') {\n disposition = 'inline';\n } else {\n disposition = 'attachment';\n }\n }\n var fileName = this.scrubFilename(file.name);\n xhr.setRequestHeader('Content-Disposition', disposition + '; filename=\"' + fileName + '\"');\n }\n if (signResult.headers) {\n var signResultHeaders = signResult.headers;\n Object.keys(signResultHeaders).forEach(function (key) {\n var val = signResultHeaders[key];\n xhr.setRequestHeader(key, val);\n });\n }\n if (this.uploadRequestHeaders) {\n var uploadRequestHeaders = this.uploadRequestHeaders;\n Object.keys(uploadRequestHeaders).forEach(function (key) {\n var val = uploadRequestHeaders[key];\n xhr.setRequestHeader(key, val);\n });\n } else {\n xhr.setRequestHeader('x-amz-acl', 'public-read');\n }\n this.httprequest = xhr;\n return xhr.send(file);\n};\nS3Upload.prototype.uploadFile = function (file) {\n var uploadToS3Callback = this.uploadToS3.bind(this, file);\n if (this.getSignedUrl) return this.getSignedUrl(file, uploadToS3Callback);\n return this.executeOnSignedUrl(file, uploadToS3Callback);\n};\nS3Upload.prototype.abortUpload = function () {\n this.httprequest && this.httprequest.abort();\n};\nmodule.exports = S3Upload;","/**\n * @file stream.js\n */\n\n/**\n * A lightweight readable stream implemention that handles event dispatching.\n *\n * @class Stream\n */\nvar Stream = /*#__PURE__*/function () {\n function Stream() {\n this.listeners = {};\n }\n /**\n * Add a listener for a specified event type.\n *\n * @param {string} type the event name\n * @param {Function} listener the callback to be invoked when an event of\n * the specified type occurs\n */\n\n var _proto = Stream.prototype;\n _proto.on = function on(type, listener) {\n if (!this.listeners[type]) {\n this.listeners[type] = [];\n }\n this.listeners[type].push(listener);\n }\n /**\n * Remove a listener for a specified event type.\n *\n * @param {string} type the event name\n * @param {Function} listener a function previously registered for this\n * type of event through `on`\n * @return {boolean} if we could turn it off or not\n */;\n _proto.off = function off(type, listener) {\n if (!this.listeners[type]) {\n return false;\n }\n var index = this.listeners[type].indexOf(listener); // TODO: which is better?\n // In Video.js we slice listener functions\n // on trigger so that it does not mess up the order\n // while we loop through.\n //\n // Here we slice on off so that the loop in trigger\n // can continue using it's old reference to loop without\n // messing up the order.\n\n this.listeners[type] = this.listeners[type].slice(0);\n this.listeners[type].splice(index, 1);\n return index > -1;\n }\n /**\n * Trigger an event of the specified type on this stream. Any additional\n * arguments to this function are passed as parameters to event listeners.\n *\n * @param {string} type the event name\n */;\n _proto.trigger = function trigger(type) {\n var callbacks = this.listeners[type];\n if (!callbacks) {\n return;\n } // Slicing the arguments on every invocation of this method\n // can add a significant amount of overhead. Avoid the\n // intermediate object creation for the common case of a\n // single callback argument\n\n if (arguments.length === 2) {\n var length = callbacks.length;\n for (var i = 0; i < length; ++i) {\n callbacks[i].call(this, arguments[1]);\n }\n } else {\n var args = Array.prototype.slice.call(arguments, 1);\n var _length = callbacks.length;\n for (var _i = 0; _i < _length; ++_i) {\n callbacks[_i].apply(this, args);\n }\n }\n }\n /**\n * Destroys the stream and cleans up.\n */;\n _proto.dispose = function dispose() {\n this.listeners = {};\n }\n /**\n * Forwards all `data` events on this stream to the destination stream. The\n * destination stream should provide a method `push` to receive the data\n * events as they arrive.\n *\n * @param {Stream} destination the stream that will receive all `data` events\n * @see http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options\n */;\n _proto.pipe = function pipe(destination) {\n this.on('data', function (data) {\n destination.push(data);\n });\n };\n return Stream;\n}();\nexport { Stream as default };","function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : String(i); }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n/*! @name m3u8-parser @version 6.2.0 @license Apache-2.0 */\nimport Stream from '@videojs/vhs-utils/es/stream.js';\nimport _extends from '@babel/runtime/helpers/extends';\nimport decodeB64ToUint8Array from '@videojs/vhs-utils/es/decode-b64-to-uint8-array.js';\n\n/**\n * @file m3u8/line-stream.js\n */\n/**\n * A stream that buffers string input and generates a `data` event for each\n * line.\n *\n * @class LineStream\n * @extends Stream\n */\nvar LineStream = /*#__PURE__*/function (_Stream) {\n _inherits(LineStream, _Stream);\n var _super = _createSuper(LineStream);\n function LineStream() {\n var _this;\n _classCallCheck(this, LineStream);\n _this = _super.call(this);\n _this.buffer = '';\n return _this;\n }\n /**\n * Add new data to be parsed.\n *\n * @param {string} data the text to process\n */\n _createClass(LineStream, [{\n key: \"push\",\n value: function push(data) {\n var nextNewline;\n this.buffer += data;\n nextNewline = this.buffer.indexOf('\\n');\n for (; nextNewline > -1; nextNewline = this.buffer.indexOf('\\n')) {\n this.trigger('data', this.buffer.substring(0, nextNewline));\n this.buffer = this.buffer.substring(nextNewline + 1);\n }\n }\n }]);\n return LineStream;\n}(Stream);\nvar TAB = String.fromCharCode(0x09);\nvar parseByterange = function parseByterange(byterangeString) {\n // optionally match and capture 0+ digits before `@`\n // optionally match and capture 0+ digits after `@`\n var match = /([0-9.]*)?@?([0-9.]*)?/.exec(byterangeString || '');\n var result = {};\n if (match[1]) {\n result.length = parseInt(match[1], 10);\n }\n if (match[2]) {\n result.offset = parseInt(match[2], 10);\n }\n return result;\n};\n/**\n * \"forgiving\" attribute list psuedo-grammar:\n * attributes -> keyvalue (',' keyvalue)*\n * keyvalue -> key '=' value\n * key -> [^=]*\n * value -> '\"' [^\"]* '\"' | [^,]*\n */\n\nvar attributeSeparator = function attributeSeparator() {\n var key = '[^=]*';\n var value = '\"[^\"]*\"|[^,]*';\n var keyvalue = '(?:' + key + ')=(?:' + value + ')';\n return new RegExp('(?:^|,)(' + keyvalue + ')');\n};\n/**\n * Parse attributes from a line given the separator\n *\n * @param {string} attributes the attribute line to parse\n */\n\nvar parseAttributes = function parseAttributes(attributes) {\n var result = {};\n if (!attributes) {\n return result;\n } // split the string using attributes as the separator\n\n var attrs = attributes.split(attributeSeparator());\n var i = attrs.length;\n var attr;\n while (i--) {\n // filter out unmatched portions of the string\n if (attrs[i] === '') {\n continue;\n } // split the key and value\n\n attr = /([^=]*)=(.*)/.exec(attrs[i]).slice(1); // trim whitespace and remove optional quotes around the value\n\n attr[0] = attr[0].replace(/^\\s+|\\s+$/g, '');\n attr[1] = attr[1].replace(/^\\s+|\\s+$/g, '');\n attr[1] = attr[1].replace(/^['\"](.*)['\"]$/g, '$1');\n result[attr[0]] = attr[1];\n }\n return result;\n};\n/**\n * A line-level M3U8 parser event stream. It expects to receive input one\n * line at a time and performs a context-free parse of its contents. A stream\n * interpretation of a manifest can be useful if the manifest is expected to\n * be too large to fit comfortably into memory or the entirety of the input\n * is not immediately available. Otherwise, it's probably much easier to work\n * with a regular `Parser` object.\n *\n * Produces `data` events with an object that captures the parser's\n * interpretation of the input. That object has a property `tag` that is one\n * of `uri`, `comment`, or `tag`. URIs only have a single additional\n * property, `line`, which captures the entirety of the input without\n * interpretation. Comments similarly have a single additional property\n * `text` which is the input without the leading `#`.\n *\n * Tags always have a property `tagType` which is the lower-cased version of\n * the M3U8 directive without the `#EXT` or `#EXT-X-` prefix. For instance,\n * `#EXT-X-MEDIA-SEQUENCE` becomes `media-sequence` when parsed. Unrecognized\n * tags are given the tag type `unknown` and a single additional property\n * `data` with the remainder of the input.\n *\n * @class ParseStream\n * @extends Stream\n */\nvar ParseStream = /*#__PURE__*/function (_Stream2) {\n _inherits(ParseStream, _Stream2);\n var _super2 = _createSuper(ParseStream);\n function ParseStream() {\n var _this2;\n _classCallCheck(this, ParseStream);\n _this2 = _super2.call(this);\n _this2.customParsers = [];\n _this2.tagMappers = [];\n return _this2;\n }\n /**\n * Parses an additional line of input.\n *\n * @param {string} line a single line of an M3U8 file to parse\n */\n _createClass(ParseStream, [{\n key: \"push\",\n value: function push(line) {\n var _this3 = this;\n var match;\n var event; // strip whitespace\n\n line = line.trim();\n if (line.length === 0) {\n // ignore empty lines\n return;\n } // URIs\n\n if (line[0] !== '#') {\n this.trigger('data', {\n type: 'uri',\n uri: line\n });\n return;\n } // map tags\n\n var newLines = this.tagMappers.reduce(function (acc, mapper) {\n var mappedLine = mapper(line); // skip if unchanged\n\n if (mappedLine === line) {\n return acc;\n }\n return acc.concat([mappedLine]);\n }, [line]);\n newLines.forEach(function (newLine) {\n for (var i = 0; i < _this3.customParsers.length; i++) {\n if (_this3.customParsers[i].call(_this3, newLine)) {\n return;\n }\n } // Comments\n\n if (newLine.indexOf('#EXT') !== 0) {\n _this3.trigger('data', {\n type: 'comment',\n text: newLine.slice(1)\n });\n return;\n } // strip off any carriage returns here so the regex matching\n // doesn't have to account for them.\n\n newLine = newLine.replace('\\r', ''); // Tags\n\n match = /^#EXTM3U/.exec(newLine);\n if (match) {\n _this3.trigger('data', {\n type: 'tag',\n tagType: 'm3u'\n });\n return;\n }\n match = /^#EXTINF:([0-9\\.]*)?,?(.*)?$/.exec(newLine);\n if (match) {\n event = {\n type: 'tag',\n tagType: 'inf'\n };\n if (match[1]) {\n event.duration = parseFloat(match[1]);\n }\n if (match[2]) {\n event.title = match[2];\n }\n _this3.trigger('data', event);\n return;\n }\n match = /^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(newLine);\n if (match) {\n event = {\n type: 'tag',\n tagType: 'targetduration'\n };\n if (match[1]) {\n event.duration = parseInt(match[1], 10);\n }\n _this3.trigger('data', event);\n return;\n }\n match = /^#EXT-X-VERSION:([0-9.]*)?/.exec(newLine);\n if (match) {\n event = {\n type: 'tag',\n tagType: 'version'\n };\n if (match[1]) {\n event.version = parseInt(match[1], 10);\n }\n _this3.trigger('data', event);\n return;\n }\n match = /^#EXT-X-MEDIA-SEQUENCE:(\\-?[0-9.]*)?/.exec(newLine);\n if (match) {\n event = {\n type: 'tag',\n tagType: 'media-sequence'\n };\n if (match[1]) {\n event.number = parseInt(match[1], 10);\n }\n _this3.trigger('data', event);\n return;\n }\n match = /^#EXT-X-DISCONTINUITY-SEQUENCE:(\\-?[0-9.]*)?/.exec(newLine);\n if (match) {\n event = {\n type: 'tag',\n tagType: 'discontinuity-sequence'\n };\n if (match[1]) {\n event.number = parseInt(match[1], 10);\n }\n _this3.trigger('data', event);\n return;\n }\n match = /^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(newLine);\n if (match) {\n event = {\n type: 'tag',\n tagType: 'playlist-type'\n };\n if (match[1]) {\n event.playlistType = match[1];\n }\n _this3.trigger('data', event);\n return;\n }\n match = /^#EXT-X-BYTERANGE:(.*)?$/.exec(newLine);\n if (match) {\n event = _extends(parseByterange(match[1]), {\n type: 'tag',\n tagType: 'byterange'\n });\n _this3.trigger('data', event);\n return;\n }\n match = /^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(newLine);\n if (match) {\n event = {\n type: 'tag',\n tagType: 'allow-cache'\n };\n if (match[1]) {\n event.allowed = !/NO/.test(match[1]);\n }\n _this3.trigger('data', event);\n return;\n }\n match = /^#EXT-X-MAP:(.*)$/.exec(newLine);\n if (match) {\n event = {\n type: 'tag',\n tagType: 'map'\n };\n if (match[1]) {\n var attributes = parseAttributes(match[1]);\n if (attributes.URI) {\n event.uri = attributes.URI;\n }\n if (attributes.BYTERANGE) {\n event.byterange = parseByterange(attributes.BYTERANGE);\n }\n }\n _this3.trigger('data', event);\n return;\n }\n match = /^#EXT-X-STREAM-INF:(.*)$/.exec(newLine);\n if (match) {\n event = {\n type: 'tag',\n tagType: 'stream-inf'\n };\n if (match[1]) {\n event.attributes = parseAttributes(match[1]);\n if (event.attributes.RESOLUTION) {\n var split = event.attributes.RESOLUTION.split('x');\n var resolution = {};\n if (split[0]) {\n resolution.width = parseInt(split[0], 10);\n }\n if (split[1]) {\n resolution.height = parseInt(split[1], 10);\n }\n event.attributes.RESOLUTION = resolution;\n }\n if (event.attributes.BANDWIDTH) {\n event.attributes.BANDWIDTH = parseInt(event.attributes.BANDWIDTH, 10);\n }\n if (event.attributes['FRAME-RATE']) {\n event.attributes['FRAME-RATE'] = parseFloat(event.attributes['FRAME-RATE']);\n }\n if (event.attributes['PROGRAM-ID']) {\n event.attributes['PROGRAM-ID'] = parseInt(event.attributes['PROGRAM-ID'], 10);\n }\n }\n _this3.trigger('data', event);\n return;\n }\n match = /^#EXT-X-MEDIA:(.*)$/.exec(newLine);\n if (match) {\n event = {\n type: 'tag',\n tagType: 'media'\n };\n if (match[1]) {\n event.attributes = parseAttributes(match[1]);\n }\n _this3.trigger('data', event);\n return;\n }\n match = /^#EXT-X-ENDLIST/.exec(newLine);\n if (match) {\n _this3.trigger('data', {\n type: 'tag',\n tagType: 'endlist'\n });\n return;\n }\n match = /^#EXT-X-DISCONTINUITY/.exec(newLine);\n if (match) {\n _this3.trigger('data', {\n type: 'tag',\n tagType: 'discontinuity'\n });\n return;\n }\n match = /^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(newLine);\n if (match) {\n event = {\n type: 'tag',\n tagType: 'program-date-time'\n };\n if (match[1]) {\n event.dateTimeString = match[1];\n event.dateTimeObject = new Date(match[1]);\n }\n _this3.trigger('data', event);\n return;\n }\n match = /^#EXT-X-KEY:(.*)$/.exec(newLine);\n if (match) {\n event = {\n type: 'tag',\n tagType: 'key'\n };\n if (match[1]) {\n event.attributes = parseAttributes(match[1]); // parse the IV string into a Uint32Array\n\n if (event.attributes.IV) {\n if (event.attributes.IV.substring(0, 2).toLowerCase() === '0x') {\n event.attributes.IV = event.attributes.IV.substring(2);\n }\n event.attributes.IV = event.attributes.IV.match(/.{8}/g);\n event.attributes.IV[0] = parseInt(event.attributes.IV[0], 16);\n event.attributes.IV[1] = parseInt(event.attributes.IV[1], 16);\n event.attributes.IV[2] = parseInt(event.attributes.IV[2], 16);\n event.attributes.IV[3] = parseInt(event.attributes.IV[3], 16);\n event.attributes.IV = new Uint32Array(event.attributes.IV);\n }\n }\n _this3.trigger('data', event);\n return;\n }\n match = /^#EXT-X-START:(.*)$/.exec(newLine);\n if (match) {\n event = {\n type: 'tag',\n tagType: 'start'\n };\n if (match[1]) {\n event.attributes = parseAttributes(match[1]);\n event.attributes['TIME-OFFSET'] = parseFloat(event.attributes['TIME-OFFSET']);\n event.attributes.PRECISE = /YES/.test(event.attributes.PRECISE);\n }\n _this3.trigger('data', event);\n return;\n }\n match = /^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(newLine);\n if (match) {\n event = {\n type: 'tag',\n tagType: 'cue-out-cont'\n };\n if (match[1]) {\n event.data = match[1];\n } else {\n event.data = '';\n }\n _this3.trigger('data', event);\n return;\n }\n match = /^#EXT-X-CUE-OUT:(.*)?$/.exec(newLine);\n if (match) {\n event = {\n type: 'tag',\n tagType: 'cue-out'\n };\n if (match[1]) {\n event.data = match[1];\n } else {\n event.data = '';\n }\n _this3.trigger('data', event);\n return;\n }\n match = /^#EXT-X-CUE-IN:(.*)?$/.exec(newLine);\n if (match) {\n event = {\n type: 'tag',\n tagType: 'cue-in'\n };\n if (match[1]) {\n event.data = match[1];\n } else {\n event.data = '';\n }\n _this3.trigger('data', event);\n return;\n }\n match = /^#EXT-X-SKIP:(.*)$/.exec(newLine);\n if (match && match[1]) {\n event = {\n type: 'tag',\n tagType: 'skip'\n };\n event.attributes = parseAttributes(match[1]);\n if (event.attributes.hasOwnProperty('SKIPPED-SEGMENTS')) {\n event.attributes['SKIPPED-SEGMENTS'] = parseInt(event.attributes['SKIPPED-SEGMENTS'], 10);\n }\n if (event.attributes.hasOwnProperty('RECENTLY-REMOVED-DATERANGES')) {\n event.attributes['RECENTLY-REMOVED-DATERANGES'] = event.attributes['RECENTLY-REMOVED-DATERANGES'].split(TAB);\n }\n _this3.trigger('data', event);\n return;\n }\n match = /^#EXT-X-PART:(.*)$/.exec(newLine);\n if (match && match[1]) {\n event = {\n type: 'tag',\n tagType: 'part'\n };\n event.attributes = parseAttributes(match[1]);\n ['DURATION'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = parseFloat(event.attributes[key]);\n }\n });\n ['INDEPENDENT', 'GAP'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = /YES/.test(event.attributes[key]);\n }\n });\n if (event.attributes.hasOwnProperty('BYTERANGE')) {\n event.attributes.byterange = parseByterange(event.attributes.BYTERANGE);\n }\n _this3.trigger('data', event);\n return;\n }\n match = /^#EXT-X-SERVER-CONTROL:(.*)$/.exec(newLine);\n if (match && match[1]) {\n event = {\n type: 'tag',\n tagType: 'server-control'\n };\n event.attributes = parseAttributes(match[1]);\n ['CAN-SKIP-UNTIL', 'PART-HOLD-BACK', 'HOLD-BACK'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = parseFloat(event.attributes[key]);\n }\n });\n ['CAN-SKIP-DATERANGES', 'CAN-BLOCK-RELOAD'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = /YES/.test(event.attributes[key]);\n }\n });\n _this3.trigger('data', event);\n return;\n }\n match = /^#EXT-X-PART-INF:(.*)$/.exec(newLine);\n if (match && match[1]) {\n event = {\n type: 'tag',\n tagType: 'part-inf'\n };\n event.attributes = parseAttributes(match[1]);\n ['PART-TARGET'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = parseFloat(event.attributes[key]);\n }\n });\n _this3.trigger('data', event);\n return;\n }\n match = /^#EXT-X-PRELOAD-HINT:(.*)$/.exec(newLine);\n if (match && match[1]) {\n event = {\n type: 'tag',\n tagType: 'preload-hint'\n };\n event.attributes = parseAttributes(match[1]);\n ['BYTERANGE-START', 'BYTERANGE-LENGTH'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = parseInt(event.attributes[key], 10);\n var subkey = key === 'BYTERANGE-LENGTH' ? 'length' : 'offset';\n event.attributes.byterange = event.attributes.byterange || {};\n event.attributes.byterange[subkey] = event.attributes[key]; // only keep the parsed byterange object.\n\n delete event.attributes[key];\n }\n });\n _this3.trigger('data', event);\n return;\n }\n match = /^#EXT-X-RENDITION-REPORT:(.*)$/.exec(newLine);\n if (match && match[1]) {\n event = {\n type: 'tag',\n tagType: 'rendition-report'\n };\n event.attributes = parseAttributes(match[1]);\n ['LAST-MSN', 'LAST-PART'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = parseInt(event.attributes[key], 10);\n }\n });\n _this3.trigger('data', event);\n return;\n }\n match = /^#EXT-X-DATERANGE:(.*)$/.exec(newLine);\n if (match && match[1]) {\n event = {\n type: 'tag',\n tagType: 'daterange'\n };\n event.attributes = parseAttributes(match[1]);\n ['ID', 'CLASS'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = String(event.attributes[key]);\n }\n });\n ['START-DATE', 'END-DATE'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = new Date(event.attributes[key]);\n }\n });\n ['DURATION', 'PLANNED-DURATION'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = parseFloat(event.attributes[key]);\n }\n });\n ['END-ON-NEXT'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = /YES/i.test(event.attributes[key]);\n }\n });\n ['SCTE35-CMD', ' SCTE35-OUT', 'SCTE35-IN'].forEach(function (key) {\n if (event.attributes.hasOwnProperty(key)) {\n event.attributes[key] = event.attributes[key].toString(16);\n }\n });\n var clientAttributePattern = /^X-([A-Z]+-)+[A-Z]+$/;\n for (var key in event.attributes) {\n if (!clientAttributePattern.test(key)) {\n continue;\n }\n var isHexaDecimal = /[0-9A-Fa-f]{6}/g.test(event.attributes[key]);\n var isDecimalFloating = /^\\d+(\\.\\d+)?$/.test(event.attributes[key]);\n event.attributes[key] = isHexaDecimal ? event.attributes[key].toString(16) : isDecimalFloating ? parseFloat(event.attributes[key]) : String(event.attributes[key]);\n }\n _this3.trigger('data', event);\n return;\n }\n match = /^#EXT-X-INDEPENDENT-SEGMENTS/.exec(newLine);\n if (match) {\n _this3.trigger('data', {\n type: 'tag',\n tagType: 'independent-segments'\n });\n return;\n } // unknown tag type\n\n _this3.trigger('data', {\n type: 'tag',\n data: newLine.slice(4)\n });\n });\n }\n /**\n * Add a parser for custom headers\n *\n * @param {Object} options a map of options for the added parser\n * @param {RegExp} options.expression a regular expression to match the custom header\n * @param {string} options.customType the custom type to register to the output\n * @param {Function} [options.dataParser] function to parse the line into an object\n * @param {boolean} [options.segment] should tag data be attached to the segment object\n */\n }, {\n key: \"addParser\",\n value: function addParser(_ref) {\n var _this4 = this;\n var expression = _ref.expression,\n customType = _ref.customType,\n dataParser = _ref.dataParser,\n segment = _ref.segment;\n if (typeof dataParser !== 'function') {\n dataParser = function dataParser(line) {\n return line;\n };\n }\n this.customParsers.push(function (line) {\n var match = expression.exec(line);\n if (match) {\n _this4.trigger('data', {\n type: 'custom',\n data: dataParser(line),\n customType: customType,\n segment: segment\n });\n return true;\n }\n });\n }\n /**\n * Add a custom header mapper\n *\n * @param {Object} options\n * @param {RegExp} options.expression a regular expression to match the custom header\n * @param {Function} options.map function to translate tag into a different tag\n */\n }, {\n key: \"addTagMapper\",\n value: function addTagMapper(_ref2) {\n var expression = _ref2.expression,\n map = _ref2.map;\n var mapFn = function mapFn(line) {\n if (expression.test(line)) {\n return map(line);\n }\n return line;\n };\n this.tagMappers.push(mapFn);\n }\n }]);\n return ParseStream;\n}(Stream);\nvar camelCase = function camelCase(str) {\n return str.toLowerCase().replace(/-(\\w)/g, function (a) {\n return a[1].toUpperCase();\n });\n};\nvar camelCaseKeys = function camelCaseKeys(attributes) {\n var result = {};\n Object.keys(attributes).forEach(function (key) {\n result[camelCase(key)] = attributes[key];\n });\n return result;\n}; // set SERVER-CONTROL hold back based upon targetDuration and partTargetDuration\n// we need this helper because defaults are based upon targetDuration and\n// partTargetDuration being set, but they may not be if SERVER-CONTROL appears before\n// target durations are set.\n\nvar setHoldBack = function setHoldBack(manifest) {\n var serverControl = manifest.serverControl,\n targetDuration = manifest.targetDuration,\n partTargetDuration = manifest.partTargetDuration;\n if (!serverControl) {\n return;\n }\n var tag = '#EXT-X-SERVER-CONTROL';\n var hb = 'holdBack';\n var phb = 'partHoldBack';\n var minTargetDuration = targetDuration && targetDuration * 3;\n var minPartDuration = partTargetDuration && partTargetDuration * 2;\n if (targetDuration && !serverControl.hasOwnProperty(hb)) {\n serverControl[hb] = minTargetDuration;\n this.trigger('info', {\n message: \"\".concat(tag, \" defaulting HOLD-BACK to targetDuration * 3 (\").concat(minTargetDuration, \").\")\n });\n }\n if (minTargetDuration && serverControl[hb] < minTargetDuration) {\n this.trigger('warn', {\n message: \"\".concat(tag, \" clamping HOLD-BACK (\").concat(serverControl[hb], \") to targetDuration * 3 (\").concat(minTargetDuration, \")\")\n });\n serverControl[hb] = minTargetDuration;\n } // default no part hold back to part target duration * 3\n\n if (partTargetDuration && !serverControl.hasOwnProperty(phb)) {\n serverControl[phb] = partTargetDuration * 3;\n this.trigger('info', {\n message: \"\".concat(tag, \" defaulting PART-HOLD-BACK to partTargetDuration * 3 (\").concat(serverControl[phb], \").\")\n });\n } // if part hold back is too small default it to part target duration * 2\n\n if (partTargetDuration && serverControl[phb] < minPartDuration) {\n this.trigger('warn', {\n message: \"\".concat(tag, \" clamping PART-HOLD-BACK (\").concat(serverControl[phb], \") to partTargetDuration * 2 (\").concat(minPartDuration, \").\")\n });\n serverControl[phb] = minPartDuration;\n }\n};\n/**\n * A parser for M3U8 files. The current interpretation of the input is\n * exposed as a property `manifest` on parser objects. It's just two lines to\n * create and parse a manifest once you have the contents available as a string:\n *\n * ```js\n * var parser = new m3u8.Parser();\n * parser.push(xhr.responseText);\n * ```\n *\n * New input can later be applied to update the manifest object by calling\n * `push` again.\n *\n * The parser attempts to create a usable manifest object even if the\n * underlying input is somewhat nonsensical. It emits `info` and `warning`\n * events during the parse if it encounters input that seems invalid or\n * requires some property of the manifest object to be defaulted.\n *\n * @class Parser\n * @extends Stream\n */\nvar Parser = /*#__PURE__*/function (_Stream3) {\n _inherits(Parser, _Stream3);\n var _super3 = _createSuper(Parser);\n function Parser() {\n var _this5;\n _classCallCheck(this, Parser);\n _this5 = _super3.call(this);\n _this5.lineStream = new LineStream();\n _this5.parseStream = new ParseStream();\n _this5.lineStream.pipe(_this5.parseStream);\n /* eslint-disable consistent-this */\n\n var self = _assertThisInitialized(_this5);\n /* eslint-enable consistent-this */\n\n var uris = [];\n var currentUri = {}; // if specified, the active EXT-X-MAP definition\n\n var currentMap; // if specified, the active decryption key\n\n var _key;\n var hasParts = false;\n var noop = function noop() {};\n var defaultMediaGroups = {\n 'AUDIO': {},\n 'VIDEO': {},\n 'CLOSED-CAPTIONS': {},\n 'SUBTITLES': {}\n }; // This is the Widevine UUID from DASH IF IOP. The same exact string is\n // used in MPDs with Widevine encrypted streams.\n\n var widevineUuid = 'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed'; // group segments into numbered timelines delineated by discontinuities\n\n var currentTimeline = 0; // the manifest is empty until the parse stream begins delivering data\n\n _this5.manifest = {\n allowCache: true,\n discontinuityStarts: [],\n segments: []\n }; // keep track of the last seen segment's byte range end, as segments are not required\n // to provide the offset, in which case it defaults to the next byte after the\n // previous segment\n\n var lastByterangeEnd = 0; // keep track of the last seen part's byte range end.\n\n var lastPartByterangeEnd = 0;\n var daterangeTags = {};\n _this5.on('end', function () {\n // only add preloadSegment if we don't yet have a uri for it.\n // and we actually have parts/preloadHints\n if (currentUri.uri || !currentUri.parts && !currentUri.preloadHints) {\n return;\n }\n if (!currentUri.map && currentMap) {\n currentUri.map = currentMap;\n }\n if (!currentUri.key && _key) {\n currentUri.key = _key;\n }\n if (!currentUri.timeline && typeof currentTimeline === 'number') {\n currentUri.timeline = currentTimeline;\n }\n _this5.manifest.preloadSegment = currentUri;\n }); // update the manifest with the m3u8 entry from the parse stream\n\n _this5.parseStream.on('data', function (entry) {\n var mediaGroup;\n var rendition;\n ({\n tag: function tag() {\n // switch based on the tag type\n (({\n version: function version() {\n if (entry.version) {\n this.manifest.version = entry.version;\n }\n },\n 'allow-cache': function allowCache() {\n this.manifest.allowCache = entry.allowed;\n if (!('allowed' in entry)) {\n this.trigger('info', {\n message: 'defaulting allowCache to YES'\n });\n this.manifest.allowCache = true;\n }\n },\n byterange: function byterange() {\n var byterange = {};\n if ('length' in entry) {\n currentUri.byterange = byterange;\n byterange.length = entry.length;\n if (!('offset' in entry)) {\n /*\n * From the latest spec (as of this writing):\n * https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.2.2\n *\n * Same text since EXT-X-BYTERANGE's introduction in draft 7:\n * https://tools.ietf.org/html/draft-pantos-http-live-streaming-07#section-3.3.1)\n *\n * \"If o [offset] is not present, the sub-range begins at the next byte\n * following the sub-range of the previous media segment.\"\n */\n entry.offset = lastByterangeEnd;\n }\n }\n if ('offset' in entry) {\n currentUri.byterange = byterange;\n byterange.offset = entry.offset;\n }\n lastByterangeEnd = byterange.offset + byterange.length;\n },\n endlist: function endlist() {\n this.manifest.endList = true;\n },\n inf: function inf() {\n if (!('mediaSequence' in this.manifest)) {\n this.manifest.mediaSequence = 0;\n this.trigger('info', {\n message: 'defaulting media sequence to zero'\n });\n }\n if (!('discontinuitySequence' in this.manifest)) {\n this.manifest.discontinuitySequence = 0;\n this.trigger('info', {\n message: 'defaulting discontinuity sequence to zero'\n });\n }\n if (entry.duration > 0) {\n currentUri.duration = entry.duration;\n }\n if (entry.duration === 0) {\n currentUri.duration = 0.01;\n this.trigger('info', {\n message: 'updating zero segment duration to a small value'\n });\n }\n this.manifest.segments = uris;\n },\n key: function key() {\n if (!entry.attributes) {\n this.trigger('warn', {\n message: 'ignoring key declaration without attribute list'\n });\n return;\n } // clear the active encryption key\n\n if (entry.attributes.METHOD === 'NONE') {\n _key = null;\n return;\n }\n if (!entry.attributes.URI) {\n this.trigger('warn', {\n message: 'ignoring key declaration without URI'\n });\n return;\n }\n if (entry.attributes.KEYFORMAT === 'com.apple.streamingkeydelivery') {\n this.manifest.contentProtection = this.manifest.contentProtection || {}; // TODO: add full support for this.\n\n this.manifest.contentProtection['com.apple.fps.1_0'] = {\n attributes: entry.attributes\n };\n return;\n }\n if (entry.attributes.KEYFORMAT === 'com.microsoft.playready') {\n this.manifest.contentProtection = this.manifest.contentProtection || {}; // TODO: add full support for this.\n\n this.manifest.contentProtection['com.microsoft.playready'] = {\n uri: entry.attributes.URI\n };\n return;\n } // check if the content is encrypted for Widevine\n // Widevine/HLS spec: https://storage.googleapis.com/wvdocs/Widevine_DRM_HLS.pdf\n\n if (entry.attributes.KEYFORMAT === widevineUuid) {\n var VALID_METHODS = ['SAMPLE-AES', 'SAMPLE-AES-CTR', 'SAMPLE-AES-CENC'];\n if (VALID_METHODS.indexOf(entry.attributes.METHOD) === -1) {\n this.trigger('warn', {\n message: 'invalid key method provided for Widevine'\n });\n return;\n }\n if (entry.attributes.METHOD === 'SAMPLE-AES-CENC') {\n this.trigger('warn', {\n message: 'SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead'\n });\n }\n if (entry.attributes.URI.substring(0, 23) !== 'data:text/plain;base64,') {\n this.trigger('warn', {\n message: 'invalid key URI provided for Widevine'\n });\n return;\n }\n if (!(entry.attributes.KEYID && entry.attributes.KEYID.substring(0, 2) === '0x')) {\n this.trigger('warn', {\n message: 'invalid key ID provided for Widevine'\n });\n return;\n } // if Widevine key attributes are valid, store them as `contentProtection`\n // on the manifest to emulate Widevine tag structure in a DASH mpd\n\n this.manifest.contentProtection = this.manifest.contentProtection || {};\n this.manifest.contentProtection['com.widevine.alpha'] = {\n attributes: {\n schemeIdUri: entry.attributes.KEYFORMAT,\n // remove '0x' from the key id string\n keyId: entry.attributes.KEYID.substring(2)\n },\n // decode the base64-encoded PSSH box\n pssh: decodeB64ToUint8Array(entry.attributes.URI.split(',')[1])\n };\n return;\n }\n if (!entry.attributes.METHOD) {\n this.trigger('warn', {\n message: 'defaulting key method to AES-128'\n });\n } // setup an encryption key for upcoming segments\n\n _key = {\n method: entry.attributes.METHOD || 'AES-128',\n uri: entry.attributes.URI\n };\n if (typeof entry.attributes.IV !== 'undefined') {\n _key.iv = entry.attributes.IV;\n }\n },\n 'media-sequence': function mediaSequence() {\n if (!isFinite(entry.number)) {\n this.trigger('warn', {\n message: 'ignoring invalid media sequence: ' + entry.number\n });\n return;\n }\n this.manifest.mediaSequence = entry.number;\n },\n 'discontinuity-sequence': function discontinuitySequence() {\n if (!isFinite(entry.number)) {\n this.trigger('warn', {\n message: 'ignoring invalid discontinuity sequence: ' + entry.number\n });\n return;\n }\n this.manifest.discontinuitySequence = entry.number;\n currentTimeline = entry.number;\n },\n 'playlist-type': function playlistType() {\n if (!/VOD|EVENT/.test(entry.playlistType)) {\n this.trigger('warn', {\n message: 'ignoring unknown playlist type: ' + entry.playlist\n });\n return;\n }\n this.manifest.playlistType = entry.playlistType;\n },\n map: function map() {\n currentMap = {};\n if (entry.uri) {\n currentMap.uri = entry.uri;\n }\n if (entry.byterange) {\n currentMap.byterange = entry.byterange;\n }\n if (_key) {\n currentMap.key = _key;\n }\n },\n 'stream-inf': function streamInf() {\n this.manifest.playlists = uris;\n this.manifest.mediaGroups = this.manifest.mediaGroups || defaultMediaGroups;\n if (!entry.attributes) {\n this.trigger('warn', {\n message: 'ignoring empty stream-inf attributes'\n });\n return;\n }\n if (!currentUri.attributes) {\n currentUri.attributes = {};\n }\n _extends(currentUri.attributes, entry.attributes);\n },\n media: function media() {\n this.manifest.mediaGroups = this.manifest.mediaGroups || defaultMediaGroups;\n if (!(entry.attributes && entry.attributes.TYPE && entry.attributes['GROUP-ID'] && entry.attributes.NAME)) {\n this.trigger('warn', {\n message: 'ignoring incomplete or missing media group'\n });\n return;\n } // find the media group, creating defaults as necessary\n\n var mediaGroupType = this.manifest.mediaGroups[entry.attributes.TYPE];\n mediaGroupType[entry.attributes['GROUP-ID']] = mediaGroupType[entry.attributes['GROUP-ID']] || {};\n mediaGroup = mediaGroupType[entry.attributes['GROUP-ID']]; // collect the rendition metadata\n\n rendition = {\n \"default\": /yes/i.test(entry.attributes.DEFAULT)\n };\n if (rendition[\"default\"]) {\n rendition.autoselect = true;\n } else {\n rendition.autoselect = /yes/i.test(entry.attributes.AUTOSELECT);\n }\n if (entry.attributes.LANGUAGE) {\n rendition.language = entry.attributes.LANGUAGE;\n }\n if (entry.attributes.URI) {\n rendition.uri = entry.attributes.URI;\n }\n if (entry.attributes['INSTREAM-ID']) {\n rendition.instreamId = entry.attributes['INSTREAM-ID'];\n }\n if (entry.attributes.CHARACTERISTICS) {\n rendition.characteristics = entry.attributes.CHARACTERISTICS;\n }\n if (entry.attributes.FORCED) {\n rendition.forced = /yes/i.test(entry.attributes.FORCED);\n } // insert the new rendition\n\n mediaGroup[entry.attributes.NAME] = rendition;\n },\n discontinuity: function discontinuity() {\n currentTimeline += 1;\n currentUri.discontinuity = true;\n this.manifest.discontinuityStarts.push(uris.length);\n },\n 'program-date-time': function programDateTime() {\n if (typeof this.manifest.dateTimeString === 'undefined') {\n // PROGRAM-DATE-TIME is a media-segment tag, but for backwards\n // compatibility, we add the first occurence of the PROGRAM-DATE-TIME tag\n // to the manifest object\n // TODO: Consider removing this in future major version\n this.manifest.dateTimeString = entry.dateTimeString;\n this.manifest.dateTimeObject = entry.dateTimeObject;\n }\n currentUri.dateTimeString = entry.dateTimeString;\n currentUri.dateTimeObject = entry.dateTimeObject;\n },\n targetduration: function targetduration() {\n if (!isFinite(entry.duration) || entry.duration < 0) {\n this.trigger('warn', {\n message: 'ignoring invalid target duration: ' + entry.duration\n });\n return;\n }\n this.manifest.targetDuration = entry.duration;\n setHoldBack.call(this, this.manifest);\n },\n start: function start() {\n if (!entry.attributes || isNaN(entry.attributes['TIME-OFFSET'])) {\n this.trigger('warn', {\n message: 'ignoring start declaration without appropriate attribute list'\n });\n return;\n }\n this.manifest.start = {\n timeOffset: entry.attributes['TIME-OFFSET'],\n precise: entry.attributes.PRECISE\n };\n },\n 'cue-out': function cueOut() {\n currentUri.cueOut = entry.data;\n },\n 'cue-out-cont': function cueOutCont() {\n currentUri.cueOutCont = entry.data;\n },\n 'cue-in': function cueIn() {\n currentUri.cueIn = entry.data;\n },\n 'skip': function skip() {\n this.manifest.skip = camelCaseKeys(entry.attributes);\n this.warnOnMissingAttributes_('#EXT-X-SKIP', entry.attributes, ['SKIPPED-SEGMENTS']);\n },\n 'part': function part() {\n var _this6 = this;\n hasParts = true; // parts are always specifed before a segment\n\n var segmentIndex = this.manifest.segments.length;\n var part = camelCaseKeys(entry.attributes);\n currentUri.parts = currentUri.parts || [];\n currentUri.parts.push(part);\n if (part.byterange) {\n if (!part.byterange.hasOwnProperty('offset')) {\n part.byterange.offset = lastPartByterangeEnd;\n }\n lastPartByterangeEnd = part.byterange.offset + part.byterange.length;\n }\n var partIndex = currentUri.parts.length - 1;\n this.warnOnMissingAttributes_(\"#EXT-X-PART #\".concat(partIndex, \" for segment #\").concat(segmentIndex), entry.attributes, ['URI', 'DURATION']);\n if (this.manifest.renditionReports) {\n this.manifest.renditionReports.forEach(function (r, i) {\n if (!r.hasOwnProperty('lastPart')) {\n _this6.trigger('warn', {\n message: \"#EXT-X-RENDITION-REPORT #\".concat(i, \" lacks required attribute(s): LAST-PART\")\n });\n }\n });\n }\n },\n 'server-control': function serverControl() {\n var attrs = this.manifest.serverControl = camelCaseKeys(entry.attributes);\n if (!attrs.hasOwnProperty('canBlockReload')) {\n attrs.canBlockReload = false;\n this.trigger('info', {\n message: '#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false'\n });\n }\n setHoldBack.call(this, this.manifest);\n if (attrs.canSkipDateranges && !attrs.hasOwnProperty('canSkipUntil')) {\n this.trigger('warn', {\n message: '#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set'\n });\n }\n },\n 'preload-hint': function preloadHint() {\n // parts are always specifed before a segment\n var segmentIndex = this.manifest.segments.length;\n var hint = camelCaseKeys(entry.attributes);\n var isPart = hint.type && hint.type === 'PART';\n currentUri.preloadHints = currentUri.preloadHints || [];\n currentUri.preloadHints.push(hint);\n if (hint.byterange) {\n if (!hint.byterange.hasOwnProperty('offset')) {\n // use last part byterange end or zero if not a part.\n hint.byterange.offset = isPart ? lastPartByterangeEnd : 0;\n if (isPart) {\n lastPartByterangeEnd = hint.byterange.offset + hint.byterange.length;\n }\n }\n }\n var index = currentUri.preloadHints.length - 1;\n this.warnOnMissingAttributes_(\"#EXT-X-PRELOAD-HINT #\".concat(index, \" for segment #\").concat(segmentIndex), entry.attributes, ['TYPE', 'URI']);\n if (!hint.type) {\n return;\n } // search through all preload hints except for the current one for\n // a duplicate type.\n\n for (var i = 0; i < currentUri.preloadHints.length - 1; i++) {\n var otherHint = currentUri.preloadHints[i];\n if (!otherHint.type) {\n continue;\n }\n if (otherHint.type === hint.type) {\n this.trigger('warn', {\n message: \"#EXT-X-PRELOAD-HINT #\".concat(index, \" for segment #\").concat(segmentIndex, \" has the same TYPE \").concat(hint.type, \" as preload hint #\").concat(i)\n });\n }\n }\n },\n 'rendition-report': function renditionReport() {\n var report = camelCaseKeys(entry.attributes);\n this.manifest.renditionReports = this.manifest.renditionReports || [];\n this.manifest.renditionReports.push(report);\n var index = this.manifest.renditionReports.length - 1;\n var required = ['LAST-MSN', 'URI'];\n if (hasParts) {\n required.push('LAST-PART');\n }\n this.warnOnMissingAttributes_(\"#EXT-X-RENDITION-REPORT #\".concat(index), entry.attributes, required);\n },\n 'part-inf': function partInf() {\n this.manifest.partInf = camelCaseKeys(entry.attributes);\n this.warnOnMissingAttributes_('#EXT-X-PART-INF', entry.attributes, ['PART-TARGET']);\n if (this.manifest.partInf.partTarget) {\n this.manifest.partTargetDuration = this.manifest.partInf.partTarget;\n }\n setHoldBack.call(this, this.manifest);\n },\n 'daterange': function daterange() {\n this.manifest.daterange = this.manifest.daterange || [];\n this.manifest.daterange.push(camelCaseKeys(entry.attributes));\n var index = this.manifest.daterange.length - 1;\n this.warnOnMissingAttributes_(\"#EXT-X-DATERANGE #\".concat(index), entry.attributes, ['ID', 'START-DATE']);\n var daterange = this.manifest.daterange[index];\n if (daterange.endDate && daterange.startDate && new Date(daterange.endDate) < new Date(daterange.startDate)) {\n this.trigger('warn', {\n message: 'EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE'\n });\n }\n if (daterange.duration && daterange.duration < 0) {\n this.trigger('warn', {\n message: 'EXT-X-DATERANGE DURATION must not be negative'\n });\n }\n if (daterange.plannedDuration && daterange.plannedDuration < 0) {\n this.trigger('warn', {\n message: 'EXT-X-DATERANGE PLANNED-DURATION must not be negative'\n });\n }\n var endOnNextYes = !!daterange.endOnNext;\n if (endOnNextYes && !daterange[\"class\"]) {\n this.trigger('warn', {\n message: 'EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute'\n });\n }\n if (endOnNextYes && (daterange.duration || daterange.endDate)) {\n this.trigger('warn', {\n message: 'EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes'\n });\n }\n if (daterange.duration && daterange.endDate) {\n var startDate = daterange.startDate;\n var newDateInSeconds = startDate.setSeconds(startDate.getSeconds() + daterange.duration);\n this.manifest.daterange[index].endDate = new Date(newDateInSeconds);\n }\n if (daterange && !this.manifest.dateTimeString) {\n this.trigger('warn', {\n message: 'A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag'\n });\n }\n if (!daterangeTags[daterange.id]) {\n daterangeTags[daterange.id] = daterange;\n } else {\n for (var attribute in daterangeTags[daterange.id]) {\n if (daterangeTags[daterange.id][attribute] !== daterange[attribute]) {\n this.trigger('warn', {\n message: 'EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes and same attribute values'\n });\n break;\n }\n }\n }\n },\n 'independent-segments': function independentSegments() {\n this.manifest.independentSegments = true;\n }\n })[entry.tagType] || noop).call(self);\n },\n uri: function uri() {\n currentUri.uri = entry.uri;\n uris.push(currentUri); // if no explicit duration was declared, use the target duration\n\n if (this.manifest.targetDuration && !('duration' in currentUri)) {\n this.trigger('warn', {\n message: 'defaulting segment duration to the target duration'\n });\n currentUri.duration = this.manifest.targetDuration;\n } // annotate with encryption information, if necessary\n\n if (_key) {\n currentUri.key = _key;\n }\n currentUri.timeline = currentTimeline; // annotate with initialization segment information, if necessary\n\n if (currentMap) {\n currentUri.map = currentMap;\n } // reset the last byterange end as it needs to be 0 between parts\n\n lastPartByterangeEnd = 0; // prepare for the next URI\n\n currentUri = {};\n },\n comment: function comment() {// comments are not important for playback\n },\n custom: function custom() {\n // if this is segment-level data attach the output to the segment\n if (entry.segment) {\n currentUri.custom = currentUri.custom || {};\n currentUri.custom[entry.customType] = entry.data; // if this is manifest-level data attach to the top level manifest object\n } else {\n this.manifest.custom = this.manifest.custom || {};\n this.manifest.custom[entry.customType] = entry.data;\n }\n }\n })[entry.type].call(self);\n });\n return _this5;\n }\n _createClass(Parser, [{\n key: \"warnOnMissingAttributes_\",\n value: function warnOnMissingAttributes_(identifier, attributes, required) {\n var missing = [];\n required.forEach(function (key) {\n if (!attributes.hasOwnProperty(key)) {\n missing.push(key);\n }\n });\n if (missing.length) {\n this.trigger('warn', {\n message: \"\".concat(identifier, \" lacks required attribute(s): \").concat(missing.join(', '))\n });\n }\n }\n /**\n * Parse the input string and update the manifest object.\n *\n * @param {string} chunk a potentially incomplete portion of the manifest\n */\n }, {\n key: \"push\",\n value: function push(chunk) {\n this.lineStream.push(chunk);\n }\n /**\n * Flush any remaining input. This can be handy if the last line of an M3U8\n * manifest did not contain a trailing newline but the file has been\n * completely received.\n */\n }, {\n key: \"end\",\n value: function end() {\n // flush any buffered input\n this.lineStream.push('\\n');\n this.trigger('end');\n }\n /**\n * Add an additional parser for non-standard tags\n *\n * @param {Object} options a map of options for the added parser\n * @param {RegExp} options.expression a regular expression to match the custom header\n * @param {string} options.type the type to register to the output\n * @param {Function} [options.dataParser] function to parse the line into an object\n * @param {boolean} [options.segment] should tag data be attached to the segment object\n */\n }, {\n key: \"addParser\",\n value: function addParser(options) {\n this.parseStream.addParser(options);\n }\n /**\n * Add a custom header mapper\n *\n * @param {Object} options\n * @param {RegExp} options.expression a regular expression to match the custom header\n * @param {Function} options.map function to translate tag into a different tag\n */\n }, {\n key: \"addTagMapper\",\n value: function addTagMapper(options) {\n this.parseStream.addTagMapper(options);\n }\n }]);\n return Parser;\n}(Stream);\nexport { LineStream, ParseStream, Parser };","!function(t,e){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define([],e):\"object\"==typeof exports?exports.rollbar=e():t.rollbar=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p=\"\",e(0)}([function(t,e,n){t.exports=n(1)},function(t,e,n){\"use strict\";var r=n(2),o=window&&window._rollbarConfig,i=o&&o.globalAlias||\"Rollbar\",a=window&&window[i]&&\"function\"==typeof window[i].shimId&&void 0!==window[i].shimId();if(window&&!window._rollbarStartTime&&(window._rollbarStartTime=(new Date).getTime()),!a&&o){var s=new r(o);window[i]=s}else window.rollbar=r,window._rollbarDidLoad=!0;t.exports=r},function(t,e,n){\"use strict\";function r(t,e){this.options=c.extend(!0,_,t);var n=new l(this.options,h,d);this.client=e||new u(this.options,n,p,\"browser\"),i(this.client.notifier),a(this.client.queue),(this.options.captureUncaught||this.options.handleUncaughtExceptions)&&(f.captureUncaughtExceptions(window,this),f.wrapGlobals(window,this)),(this.options.captureUnhandledRejections||this.options.handleUnhandledRejections)&&f.captureUnhandledRejections(window,this),this.instrumenter=new b(this.options,this.client.telemeter,this,window,document),this.instrumenter.instrument()}function o(t){var e=\"Rollbar is not initialized\";p.error(e),t&&t(new Error(e))}function i(t){t.addTransform(m.handleItemWithError).addTransform(m.ensureItemHasSomethingToSay).addTransform(m.addBaseInfo).addTransform(m.addRequestInfo(window)).addTransform(m.addClientInfo(window)).addTransform(m.addPluginInfo(window)).addTransform(m.addBody).addTransform(g.addMessageWithError).addTransform(g.addTelemetryData).addTransform(m.scrubPayload).addTransform(m.userTransform).addTransform(g.itemToPayload)}function a(t){t.addPredicate(v.checkIgnore).addPredicate(v.userCheckIgnore).addPredicate(v.urlIsNotBlacklisted).addPredicate(v.urlIsWhitelisted).addPredicate(v.messageIsIgnored)}function s(t){for(var e=0,n=t.length;e<n;++e)if(c.isFunction(t[e]))return t[e]}var u=n(3),c=n(6),l=n(11),p=n(13),f=n(16),h=n(17),d=n(18),m=n(19),g=n(23),v=n(24),y=n(20),b=n(25),w=null;r.init=function(t,e){return w?w.global(t).configure(t):w=new r(t,e)},r.prototype.global=function(t){return this.client.global(t),this},r.global=function(t){return w?w.global(t):void o()},r.prototype.configure=function(t,e){var n=this.options,r={};return e&&(r={payload:e}),this.options=c.extend(!0,{},n,t,r),this.client.configure(t,e),this.instrumenter.configure(t),this},r.configure=function(t,e){return w?w.configure(t,e):void o()},r.prototype.lastError=function(){return this.client.lastError},r.lastError=function(){return w?w.lastError():void o()},r.prototype.log=function(){var t=this._createItem(arguments),e=t.uuid;return this.client.log(t),{uuid:e}},r.log=function(){if(w)return w.log.apply(w,arguments);var t=s(arguments);o(t)},r.prototype.debug=function(){var t=this._createItem(arguments),e=t.uuid;return this.client.debug(t),{uuid:e}},r.debug=function(){if(w)return w.debug.apply(w,arguments);var t=s(arguments);o(t)},r.prototype.info=function(){var t=this._createItem(arguments),e=t.uuid;return this.client.info(t),{uuid:e}},r.info=function(){if(w)return w.info.apply(w,arguments);var t=s(arguments);o(t)},r.prototype.warn=function(){var t=this._createItem(arguments),e=t.uuid;return this.client.warn(t),{uuid:e}},r.warn=function(){if(w)return w.warn.apply(w,arguments);var t=s(arguments);o(t)},r.prototype.warning=function(){var t=this._createItem(arguments),e=t.uuid;return this.client.warning(t),{uuid:e}},r.warning=function(){if(w)return w.warning.apply(w,arguments);var t=s(arguments);o(t)},r.prototype.error=function(){var t=this._createItem(arguments),e=t.uuid;return this.client.error(t),{uuid:e}},r.error=function(){if(w)return w.error.apply(w,arguments);var t=s(arguments);o(t)},r.prototype.critical=function(){var t=this._createItem(arguments),e=t.uuid;return this.client.critical(t),{uuid:e}},r.critical=function(){if(w)return w.critical.apply(w,arguments);var t=s(arguments);o(t)},r.prototype.handleUncaughtException=function(t,e,n,r,o,i){var a,s=c.makeUnhandledStackInfo(t,e,n,r,o,\"onerror\",\"uncaught exception\",y);c.isError(o)?(a=this._createItem([t,o,i]),a._unhandledStackInfo=s):c.isError(e)?(a=this._createItem([t,e,i]),a._unhandledStackInfo=s):(a=this._createItem([t,i]),a.stackInfo=s),a.level=this.options.uncaughtErrorLevel,a._isUncaught=!0,this.client.log(a)},r.prototype.handleUnhandledRejection=function(t,e){var n=\"unhandled rejection was null or undefined!\";n=t?t.message||String(t):n;var r,o=t&&t._rollbarContext||e&&e._rollbarContext;c.isError(t)?r=this._createItem([n,t,o]):(r=this._createItem([n,t,o]),r.stackInfo=c.makeUnhandledStackInfo(n,\"\",0,0,null,\"unhandledrejection\",\"\",y)),r.level=this.options.uncaughtErrorLevel,r._isUncaught=!0,r._originalArgs=r._originalArgs||[],r._originalArgs.push(e),this.client.log(r)},r.prototype.wrap=function(t,e,n){try{var r;if(r=c.isFunction(e)?e:function(){return e||{}},!c.isFunction(t))return t;if(t._isWrap)return t;if(!t._rollbar_wrapped&&(t._rollbar_wrapped=function(){n&&c.isFunction(n)&&n.apply(this,arguments);try{return t.apply(this,arguments)}catch(n){var e=n;throw c.isType(e,\"string\")&&(e=new String(e)),e._rollbarContext=r()||{},e._rollbarContext._wrappedSource=t.toString(),window._rollbarWrappedError=e,e}},t._rollbar_wrapped._isWrap=!0,t.hasOwnProperty))for(var o in t)t.hasOwnProperty(o)&&(t._rollbar_wrapped[o]=t[o]);return t._rollbar_wrapped}catch(e){return t}},r.wrap=function(t,e){return w?w.wrap(t,e):void o()},r.prototype.captureEvent=function(t,e){return this.client.captureEvent(t,e)},r.captureEvent=function(t,e){return w?w.captureEvent(t,e):void o()},r.prototype.captureDomContentLoaded=function(t,e){return e||(e=new Date),this.client.captureDomContentLoaded(e)},r.prototype.captureLoad=function(t,e){return e||(e=new Date),this.client.captureLoad(e)},r.prototype._createItem=function(t){return c.createItem(t,p,this)};var _={version:\"2.2.10\",scrubFields:[\"pw\",\"pass\",\"passwd\",\"password\",\"secret\",\"confirm_password\",\"confirmPassword\",\"password_confirmation\",\"passwordConfirmation\",\"access_token\",\"accessToken\",\"secret_key\",\"secretKey\",\"secretToken\"],logLevel:\"debug\",reportLevel:\"debug\",uncaughtErrorLevel:\"error\",endpoint:\"api.rollbar.com/api/1/\",verbose:!1,enabled:!0};t.exports=r},function(t,e,n){\"use strict\";function r(t,e,n,o){this.options=u.extend(!0,{},t),this.logger=n,r.rateLimiter.configureGlobal(this.options),r.rateLimiter.setPlatformOptions(o,this.options),this.queue=new i(r.rateLimiter,e,n,this.options),this.notifier=new a(this.queue,this.options),this.telemeter=new s(this.options),this.lastError=null}var o=n(4),i=n(5),a=n(9),s=n(10),u=n(6),c={maxItems:0,itemsPerMinute:60};r.rateLimiter=new o(c),r.prototype.global=function(t){return r.rateLimiter.configureGlobal(t),this},r.prototype.configure=function(t,e){this.notifier&&this.notifier.configure(t),this.telemeter&&this.telemeter.configure(t);var n=this.options,r={};return e&&(r={payload:e}),this.options=u.extend(!0,{},n,t,r),this.global(this.options),this},r.prototype.log=function(t){var e=this._defaultLogLevel();return this._log(e,t)},r.prototype.debug=function(t){this._log(\"debug\",t)},r.prototype.info=function(t){this._log(\"info\",t)},r.prototype.warn=function(t){this._log(\"warning\",t)},r.prototype.warning=function(t){this._log(\"warning\",t)},r.prototype.error=function(t){this._log(\"error\",t)},r.prototype.critical=function(t){this._log(\"critical\",t)},r.prototype.wait=function(t){this.queue.wait(t)},r.prototype.captureEvent=function(t,e){return this.telemeter.captureEvent(t,e)},r.prototype.captureDomContentLoaded=function(t){return this.telemeter.captureDomContentLoaded(t)},r.prototype.captureLoad=function(t){return this.telemeter.captureLoad(t)},r.prototype._log=function(t,e){if(!this._sameAsLastError(e))try{var n=null;e.callback&&(n=e.callback,delete e.callback),e.level=e.level||t,e.telemetryEvents=this.telemeter.copyEvents(),this.telemeter._captureRollbarItem(e),this.notifier.log(e,n)}catch(t){this.logger.error(t)}},r.prototype._defaultLogLevel=function(){return this.options.logLevel||\"debug\"},r.prototype._sameAsLastError=function(t){return!(!this.lastError||this.lastError!==t.err)||(this.lastError=t.err,!1)},t.exports=r},function(t,e){\"use strict\";function n(t){this.startTime=(new Date).getTime(),this.counter=0,this.perMinCounter=0,this.platform=null,this.platformOptions={},this.configureGlobal(t)}function r(t,e,n){return!t.ignoreRateLimit&&e>=1&&n>e}function o(t,e,n,r,o){var a=null;return n&&(n=new Error(n)),n||r||(a=i(t,e,o)),{error:n,shouldSend:r,payload:a}}function i(t,e,n){var r=e.environment||e.payload&&e.payload.environment,o={body:{message:{body:\"maxItems has been hit. Ignoring errors until reset.\",extra:{maxItems:n}}},language:\"javascript\",environment:r,notifier:{version:e.notifier&&e.notifier.version||e.version}};return\"browser\"===t?(o.platform=\"browser\",o.framework=\"browser-js\",o.notifier.name=\"rollbar-browser-js\"):\"server\"===t&&(o.framework=e.framework||\"node-js\",o.notifier.name=e.notifier.name),o}n.globalSettings={startTime:(new Date).getTime(),maxItems:void 0,itemsPerMinute:void 0},n.prototype.configureGlobal=function(t){void 0!==t.startTime&&(n.globalSettings.startTime=t.startTime),void 0!==t.maxItems&&(n.globalSettings.maxItems=t.maxItems),void 0!==t.itemsPerMinute&&(n.globalSettings.itemsPerMinute=t.itemsPerMinute)},n.prototype.shouldSend=function(t,e){e=e||(new Date).getTime(),e-this.startTime>=6e4&&(this.startTime=e,this.perMinCounter=0);var i=n.globalSettings.maxItems,a=n.globalSettings.itemsPerMinute;if(r(t,i,this.counter))return o(this.platform,this.platformOptions,i+\" max items reached\",!1);if(r(t,a,this.perMinCounter))return o(this.platform,this.platformOptions,a+\" items per minute reached\",!1);this.counter++,this.perMinCounter++;var s=!r(t,i,this.counter);return o(this.platform,this.platformOptions,null,s,i)},n.prototype.setPlatformOptions=function(t,e){this.platform=t,this.platformOptions=e},t.exports=n},function(t,e,n){\"use strict\";function r(t,e,n,r){this.rateLimiter=t,this.api=e,this.logger=n,this.options=r,this.predicates=[],this.pendingItems=[],this.pendingRequests=[],this.retryQueue=[],this.retryHandle=null,this.waitCallback=null,this.waitIntervalID=null}var o=n(6);r.prototype.configure=function(t){this.api&&this.api.configure(t);var e=this.options;return this.options=o.extend(!0,{},e,t),this},r.prototype.addPredicate=function(t){return o.isFunction(t)&&this.predicates.push(t),this},r.prototype.addPendingItem=function(t){this.pendingItems.push(t)},r.prototype.removePendingItem=function(t){var e=this.pendingItems.indexOf(t);e!==-1&&this.pendingItems.splice(e,1)},r.prototype.addItem=function(t,e,n,r){e&&o.isFunction(e)||(e=function(){});var i=this._applyPredicates(t);if(i.stop)return this.removePendingItem(r),void e(i.err);this._maybeLog(t,n),this.removePendingItem(r),this.pendingRequests.push(t);try{this._makeApiRequest(t,function(n,r){this._dequeuePendingRequest(t),e(n,r)}.bind(this))}catch(n){this._dequeuePendingRequest(t),e(n)}},r.prototype.wait=function(t){o.isFunction(t)&&(this.waitCallback=t,this._maybeCallWait()||(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitIntervalID=setInterval(function(){this._maybeCallWait()}.bind(this),500)))},r.prototype._applyPredicates=function(t){for(var e=null,n=0,r=this.predicates.length;n<r;n++)if(e=this.predicates[n](t,this.options),!e||void 0!==e.err)return{stop:!0,err:e.err};return{stop:!1,err:null}},r.prototype._makeApiRequest=function(t,e){var n=this.rateLimiter.shouldSend(t);n.shouldSend?this.api.postItem(t,function(n,r){n?this._maybeRetry(n,t,e):e(n,r)}.bind(this)):n.error?e(n.error):this.api.postItem(n.payload,e)};var i=[\"ECONNRESET\",\"ENOTFOUND\",\"ESOCKETTIMEDOUT\",\"ETIMEDOUT\",\"ECONNREFUSED\",\"EHOSTUNREACH\",\"EPIPE\",\"EAI_AGAIN\"];r.prototype._maybeRetry=function(t,e,n){var r=!1;if(this.options.retryInterval)for(var o=0,a=i.length;o<a;o++)if(t.code===i[o]){r=!0;break}r?this._retryApiRequest(e,n):n(t)},r.prototype._retryApiRequest=function(t,e){this.retryQueue.push({item:t,callback:e}),this.retryHandle||(this.retryHandle=setInterval(function(){for(;this.retryQueue.length;){var t=this.retryQueue.shift();this._makeApiRequest(t.item,t.callback)}}.bind(this),this.options.retryInterval))},r.prototype._dequeuePendingRequest=function(t){var e=this.pendingRequests.indexOf(t);e!==-1&&(this.pendingRequests.splice(e,1),this._maybeCallWait())},r.prototype._maybeLog=function(t,e){if(this.logger&&this.options.verbose){var n=e;if(n=n||o.get(t,\"body.trace.exception.message\"),n=n||o.get(t,\"body.trace_chain.0.exception.message\"))return void this.logger.error(n);n=o.get(t,\"body.message.body\"),n&&this.logger.log(n)}},r.prototype._maybeCallWait=function(){return!(!o.isFunction(this.waitCallback)||0!==this.pendingItems.length||0!==this.pendingRequests.length)&&(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitCallback(),!0)},t.exports=r},function(t,e,n){\"use strict\";function r(){if(!A&&(A=!0,c(JSON)&&(s(JSON.stringify)&&(j.stringify=JSON.stringify),s(JSON.parse)&&(j.parse=JSON.parse)),!a(j.stringify)||!a(j.parse))){var t=n(8);t(j)}}function o(t,e){return e===i(t)}function i(t){var e=typeof t;return\"object\"!==e?e:t?t instanceof Error?\"error\":{}.toString.call(t).match(/\\s([a-zA-Z]+)/)[1].toLowerCase():\"null\"}function a(t){return o(t,\"function\")}function s(t){var e=/[\\\\^$.*+?()[\\]{}|]/g,n=Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(e,\"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\"),r=RegExp(\"^\"+n+\"$\");return u(t)&&r.test(t)}function u(t){var e=typeof t;return null!=t&&(\"object\"==e||\"function\"==e)}function c(t){return!o(t,\"undefined\")}function l(t){var e=i(t);return\"object\"===e||\"array\"===e}function p(t){return o(t,\"error\")}function f(t,e,n){var r,i,a,s=o(t,\"object\"),u=o(t,\"array\"),c=[];if(s&&n.indexOf(t)!==-1)return t;if(n.push(t),s)for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&c.push(r);else if(u)for(a=0;a<t.length;++a)c.push(a);for(a=0;a<c.length;++a)r=c[a],i=t[r],t[r]=e(r,i,n);return t}function h(){return\"********\"}function d(){var t=N(),e=\"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g,function(e){var n=(t+16*Math.random())%16|0;return t=Math.floor(t/16),(\"x\"===e?n:7&n|8).toString(16)});return e}function m(t){var e=g(t);return\"\"===e.anchor&&(e.source=e.source.replace(\"#\",\"\")),t=e.source.replace(\"?\"+e.query,\"\")}function g(t){if(!o(t,\"string\"))throw new Error(\"received invalid input\");for(var e=D,n=e.parser[e.strictMode?\"strict\":\"loose\"].exec(t),r={},i=e.key.length;i--;)r[e.key[i]]=n[i]||\"\";return r[e.q.name]={},r[e.key[12]].replace(e.q.parser,function(t,n,o){n&&(r[e.q.name][n]=o)}),r}function v(t,e,n){n=n||{},n.access_token=t;var r,o=[];for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&o.push([r,n[r]].join(\"=\"));var i=\"?\"+o.sort().join(\"&\");e=e||{},e.path=e.path||\"\";var a,s=e.path.indexOf(\"?\"),u=e.path.indexOf(\"#\");s!==-1&&(u===-1||u>s)?(a=e.path,e.path=a.substring(0,s)+i+\"&\"+a.substring(s+1)):u!==-1?(a=e.path,e.path=a.substring(0,u)+i+a.substring(u)):e.path=e.path+i}function y(t,e){if(e=e||t.protocol,!e&&t.port&&(80===t.port?e=\"http:\":443===t.port&&(e=\"https:\")),e=e||\"https:\",!t.hostname)return null;var n=e+\"//\"+t.hostname;return t.port&&(n=n+\":\"+t.port),t.path&&(n+=t.path),n}function b(t,e){var n,r;try{n=j.stringify(t)}catch(o){if(e&&a(e))try{n=e(t)}catch(t){r=t}else r=o}return{error:r,value:n}}function w(t){var e,n;try{e=j.parse(t)}catch(t){n=t}return{error:n,value:e}}function _(t,e,n,r,o,i,a,s){var u={url:e||\"\",line:n,column:r};u.func=s.guessFunctionName(u.url,u.line),u.context=s.gatherContext(u.url,u.line);var c=document&&document.location&&document.location.href,l=window&&window.navigator&&window.navigator.userAgent;return{mode:i,message:o?String(o):t||a,url:c,stack:[u],useragent:l}}function x(t,e){return function(n,r){try{e(n,r)}catch(e){t.error(e)}}}function E(t,e,n,r,o){for(var a,s,u,c,l,p,f=[],h=0,m=t.length;h<m;++h){p=t[h];var g=i(p);switch(g){case\"undefined\":break;case\"string\":a?f.push(p):a=p;break;case\"function\":c=x(e,p);break;case\"date\":f.push(p);break;case\"error\":case\"domexception\":s?f.push(p):s=p;break;case\"object\":case\"array\":if(p instanceof Error||\"undefined\"!=typeof DOMException&&p instanceof DOMException){s?f.push(p):s=p;break}if(r&&\"object\"===g&&!l){for(var v=0,y=r.length;v<y;++v)if(void 0!==p[r[v]]){l=p;break}if(l)break}u?f.push(p):u=p;break;default:if(p instanceof Error||\"undefined\"!=typeof DOMException&&p instanceof DOMException){s?f.push(p):s=p;break}f.push(p)}}f.length>0&&(u=C(!0,{},u),u.extraArgs=f);var b={message:a,err:s,custom:u,timestamp:N(),callback:c,uuid:d()};return u&&void 0!==u.level&&(b.level=u.level,delete u.level),r&&l&&(b.request=l),o&&(b.lambdaContext=o),b._originalArgs=t,b}function k(t,e){if(t){var n=e.split(\".\"),r=t;try{for(var o=0,i=n.length;o<i;++o)r=r[n[o]]}catch(t){r=void 0}return r}}function I(t,e,n){if(t){var r=e.split(\".\"),o=r.length;if(!(o<1)){if(1===o)return void(t[r[0]]=n);try{for(var i=t[r[0]]||{},a=i,s=1;s<o-1;s++)i[r[s]]=i[r[s]]||{},i=i[r[s]];i[r[o-1]]=n,t[r[0]]=a}catch(t){return}}}}function T(t,e){function n(t,e,n,r,o,i){return e+h(i)}function r(t){var e;if(o(t,\"string\"))for(e=0;e<u.length;++e)t=t.replace(u[e],n);return t}function i(t,e){var n;for(n=0;n<s.length;++n)if(s[n].test(t)){e=h(e);break}return e}function a(t,e,n){var s=i(t,e);return s===e?o(e,\"object\")||o(e,\"array\")?f(e,a,n):r(s):s}e=e||[];var s=S(e),u=O(e);return f(t,a,[]),t}function S(t){for(var e,n=[],r=0;r<t.length;++r)e=\"\\\\[?(%5[bB])?\"+t[r]+\"\\\\[?(%5[bB])?\\\\]?(%5[dD])?\",n.push(new RegExp(e,\"i\"));return n}function O(t){for(var e,n=[],r=0;r<t.length;++r)e=\"\\\\[?(%5[bB])?\"+t[r]+\"\\\\[?(%5[bB])?\\\\]?(%5[dD])?\",n.push(new RegExp(\"(\"+e+\"=)([^&\\\\n]+)\",\"igm\"));return n}function L(t){var e,n,r,o=[];for(e=0,n=t.length;e<n;e++)r=t[e],\"object\"==typeof r?(r=b(r),r=r.error||r.value,r.length>500&&(r=r.substr(0,500)+\"...\")):\"undefined\"==typeof r&&(r=\"undefined\"),o.push(r);return o.join(\" \")}function N(){return Date.now?+Date.now():+new Date}var C=n(7),j={},A=!1;r();var R={debug:0,info:1,warning:2,error:3,critical:4},D={strictMode:!1,key:[\"source\",\"protocol\",\"authority\",\"userInfo\",\"user\",\"password\",\"host\",\"port\",\"relative\",\"path\",\"directory\",\"file\",\"query\",\"anchor\"],q:{name:\"queryKey\",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/}};t.exports={isType:o,typeName:i,isFunction:a,isNativeFunction:s,isIterable:l,isError:p,extend:C,traverse:f,redact:h,uuid4:d,LEVELS:R,sanitizeUrl:m,addParamsAndAccessTokenToPath:v,formatUrl:y,stringify:b,jsonParse:w,makeUnhandledStackInfo:_,createItem:E,get:k,set:I,scrub:T,formatArgsAsString:L,now:N}},function(t,e){\"use strict\";var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,o=function(t){return\"function\"==typeof Array.isArray?Array.isArray(t):\"[object Array]\"===r.call(t)},i=function(t){if(!t||\"[object Object]\"!==r.call(t))return!1;var e=n.call(t,\"constructor\"),o=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,\"isPrototypeOf\");if(t.constructor&&!e&&!o)return!1;var i;for(i in t);return\"undefined\"==typeof i||n.call(t,i)};t.exports=function t(){var e,n,r,a,s,u,c=arguments[0],l=1,p=arguments.length,f=!1;for(\"boolean\"==typeof c?(f=c,c=arguments[1]||{},l=2):(\"object\"!=typeof c&&\"function\"!=typeof c||null==c)&&(c={});l<p;++l)if(e=arguments[l],null!=e)for(n in e)r=c[n],a=e[n],c!==a&&(f&&a&&(i(a)||(s=o(a)))?(s?(s=!1,u=r&&o(r)?r:[]):u=r&&i(r)?r:{},c[n]=t(f,u,a)):\"undefined\"!=typeof a&&(c[n]=a));return c}},function(t,e){var n=function(t){function e(t){return t<10?\"0\"+t:t}function n(){return this.valueOf()}function r(t){return i.lastIndex=0,i.test(t)?'\"'+t.replace(i,function(t){var e=u[t];return\"string\"==typeof e?e:\"\\\\u\"+(\"0000\"+t.charCodeAt(0).toString(16)).slice(-4)})+'\"':'\"'+t+'\"'}function o(t,e){var n,i,u,l,p,f=a,h=e[t];switch(h&&\"object\"==typeof h&&\"function\"==typeof h.toJSON&&(h=h.toJSON(t)),\"function\"==typeof c&&(h=c.call(e,t,h)),typeof h){case\"string\":return r(h);case\"number\":return isFinite(h)?String(h):\"null\";case\"boolean\":case\"null\":return String(h);case\"object\":if(!h)return\"null\";if(a+=s,p=[],\"[object Array]\"===Object.prototype.toString.apply(h)){for(l=h.length,n=0;n<l;n+=1)p[n]=o(n,h)||\"null\";return u=0===p.length?\"[]\":a?\"[\\n\"+a+p.join(\",\\n\"+a)+\"\\n\"+f+\"]\":\"[\"+p.join(\",\")+\"]\",a=f,u}if(c&&\"object\"==typeof c)for(l=c.length,n=0;n<l;n+=1)\"string\"==typeof c[n]&&(i=c[n],u=o(i,h),u&&p.push(r(i)+(a?\": \":\":\")+u));else for(i in h)Object.prototype.hasOwnProperty.call(h,i)&&(u=o(i,h),u&&p.push(r(i)+(a?\": \":\":\")+u));return u=0===p.length?\"{}\":a?\"{\\n\"+a+p.join(\",\\n\"+a)+\"\\n\"+f+\"}\":\"{\"+p.join(\",\")+\"}\",a=f,u}}var i=/[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\"function\"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+\"-\"+e(this.getUTCMonth()+1)+\"-\"+e(this.getUTCDate())+\"T\"+e(this.getUTCHours())+\":\"+e(this.getUTCMinutes())+\":\"+e(this.getUTCSeconds())+\"Z\":null},Boolean.prototype.toJSON=n,Number.prototype.toJSON=n,String.prototype.toJSON=n);var a,s,u,c;\"function\"!=typeof t.stringify&&(u={\"\\b\":\"\\\\b\",\"\\t\":\"\\\\t\",\"\\n\":\"\\\\n\",\"\\f\":\"\\\\f\",\"\\r\":\"\\\\r\",'\"':'\\\\\"',\"\\\\\":\"\\\\\\\\\"},t.stringify=function(t,e,n){var r;if(a=\"\",s=\"\",\"number\"==typeof n)for(r=0;r<n;r+=1)s+=\" \";else\"string\"==typeof n&&(s=n);if(c=e,e&&\"function\"!=typeof e&&(\"object\"!=typeof e||\"number\"!=typeof e.length))throw new Error(\"JSON.stringify\");return o(\"\",{\"\":t})}),\"function\"!=typeof t.parse&&(t.parse=function(){function t(t){return t.replace(/\\\\(?:u(.{4})|([^u]))/g,function(t,e,n){return e?String.fromCharCode(parseInt(e,16)):a[n]})}var e,n,r,o,i,a={\"\\\\\":\"\\\\\",'\"':'\"',\"/\":\"/\",t:\"\\t\",n:\"\\n\",r:\"\\r\",f:\"\\f\",b:\"\\b\"},s={go:function(){e=\"ok\"},firstokey:function(){o=i,e=\"colon\"},okey:function(){o=i,e=\"colon\"},ovalue:function(){e=\"ocomma\"},firstavalue:function(){e=\"acomma\"},avalue:function(){e=\"acomma\"}},u={go:function(){e=\"ok\"},ovalue:function(){e=\"ocomma\"},firstavalue:function(){e=\"acomma\"},avalue:function(){e=\"acomma\"}},c={\"{\":{go:function(){n.push({state:\"ok\"}),r={},e=\"firstokey\"},ovalue:function(){n.push({container:r,state:\"ocomma\",key:o}),r={},e=\"firstokey\"},firstavalue:function(){n.push({container:r,state:\"acomma\"}),r={},e=\"firstokey\"},avalue:function(){n.push({container:r,state:\"acomma\"}),r={},e=\"firstokey\"}},\"}\":{firstokey:function(){var t=n.pop();i=r,r=t.container,o=t.key,e=t.state},ocomma:function(){var t=n.pop();r[o]=i,i=r,r=t.container,o=t.key,e=t.state}},\"[\":{go:function(){n.push({state:\"ok\"}),r=[],e=\"firstavalue\"},ovalue:function(){n.push({container:r,state:\"ocomma\",key:o}),r=[],e=\"firstavalue\"},firstavalue:function(){n.push({container:r,state:\"acomma\"}),r=[],e=\"firstavalue\"},avalue:function(){n.push({container:r,state:\"acomma\"}),r=[],e=\"firstavalue\"}},\"]\":{firstavalue:function(){var t=n.pop();i=r,r=t.container,o=t.key,e=t.state},acomma:function(){var t=n.pop();r.push(i),i=r,r=t.container,o=t.key,e=t.state}},\":\":{colon:function(){if(Object.hasOwnProperty.call(r,o))throw new SyntaxError(\"Duplicate key '\"+o+'\"');e=\"ovalue\"}},\",\":{ocomma:function(){r[o]=i,e=\"okey\"},acomma:function(){r.push(i),e=\"avalue\"}},true:{go:function(){i=!0,e=\"ok\"},ovalue:function(){i=!0,e=\"ocomma\"},firstavalue:function(){i=!0,e=\"acomma\"},avalue:function(){i=!0,e=\"acomma\"}},false:{go:function(){i=!1,e=\"ok\"},ovalue:function(){i=!1,e=\"ocomma\"},firstavalue:function(){i=!1,e=\"acomma\"},avalue:function(){i=!1,e=\"acomma\"}},null:{go:function(){i=null,e=\"ok\"},ovalue:function(){i=null,e=\"ocomma\"},firstavalue:function(){i=null,e=\"acomma\"},avalue:function(){i=null,e=\"acomma\"}}};return function(r,o){var a,l=/^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;e=\"go\",n=[];try{for(;;){if(a=l.exec(r),!a)break;a[1]?c[a[1]][e]():a[2]?(i=+a[2],u[e]()):(i=t(a[3]),s[e]()),r=r.slice(a[0].length)}}catch(t){e=t}if(\"ok\"!==e||/[^\\u0020\\t\\n\\r]/.test(r))throw e instanceof SyntaxError?e:new SyntaxError(\"JSON\");return\"function\"==typeof o?function t(e,n){var r,a,s=e[n];if(s&&\"object\"==typeof s)for(r in i)Object.prototype.hasOwnProperty.call(s,r)&&(a=t(s,r),void 0!==a?s[r]=a:delete s[r]);return o.call(e,n,s)}({\"\":i},\"\"):i}}())};t.exports=n},function(t,e,n){\"use strict\";function r(t,e){this.queue=t,this.options=e,this.transforms=[]}var o=n(6);r.prototype.configure=function(t){this.queue&&this.queue.configure(t);var e=this.options;return this.options=o.extend(!0,{},e,t),this},r.prototype.addTransform=function(t){return o.isFunction(t)&&this.transforms.push(t),this},r.prototype.log=function(t,e){if(e&&o.isFunction(e)||(e=function(){}),!this.options.enabled)return e(new Error(\"Rollbar is not enabled\"));this.queue.addPendingItem(t);var n=t.err;this._applyTransforms(t,function(r,o){return r?(this.queue.removePendingItem(t),e(r,null)):void this.queue.addItem(o,e,n,t)}.bind(this))},r.prototype._applyTransforms=function(t,e){var n=-1,r=this.transforms.length,o=this.transforms,i=this.options,a=function(t,s){return t?void e(t,null):(n++,n===r?void e(null,s):void o[n](s,i,a))};a(null,t)},t.exports=r},function(t,e,n){\"use strict\";function r(t){this.queue=[],this.options=i.extend(!0,{},t);var e=this.options.maxTelemetryEvents||a;this.maxQueueSize=Math.max(0,Math.min(e,a))}function o(t,e){if(e)return e;var n={error:\"error\",manual:\"info\"};return n[t]||\"info\"}var i=n(6),a=100;r.prototype.configure=function(t){this.options=i.extend(!0,{},t);var e=this.options.maxTelemetryEvents||a,n=Math.max(0,Math.min(e,a)),r=0;this.maxQueueSize>n&&(r=this.maxQueueSize-n),this.maxQueueSize=n,this.queue.splice(0,r)},r.prototype.copyEvents=function(){return Array.prototype.slice.call(this.queue,0)},r.prototype.capture=function(t,e,n,r,a){var s={level:o(t,n),type:t,timestamp_ms:a||i.now(),body:e,source:\"client\"};return r&&(s.uuid=r),this.push(s),s},r.prototype.captureEvent=function(t,e,n){return this.capture(\"manual\",t,e,n)},r.prototype.captureError=function(t,e,n,r){var o={message:t.message||String(t)};return t.stack&&(o.stack=t.stack),this.capture(\"error\",o,e,n,r)},r.prototype.captureLog=function(t,e,n,r){return this.capture(\"log\",{message:t},e,n,r)},r.prototype.captureNetwork=function(t,e,n){e=e||\"xhr\",t.subtype=t.subtype||e;var r=this.levelFromStatus(t.status_code);return this.capture(\"network\",t,r,n)},r.prototype.levelFromStatus=function(t){return t>=200&&t<400?\"info\":0===t||t>=400?\"error\":\"info\"},r.prototype.captureDom=function(t,e,n,r,o){var i={subtype:t,element:e};return void 0!==n&&(i.value=n),void 0!==r&&(i.checked=r),this.capture(\"dom\",i,\"info\",o)},r.prototype.captureNavigation=function(t,e,n){return this.capture(\"navigation\",{from:t,to:e},\"info\",n)},r.prototype.captureDomContentLoaded=function(t){return this.capture(\"navigation\",{subtype:\"DOMContentLoaded\"},\"info\",void 0,t&&t.getTime())},r.prototype.captureLoad=function(t){return this.capture(\"navigation\",{subtype:\"load\"},\"info\",void 0,t&&t.getTime())},r.prototype.captureConnectivityChange=function(t,e){return this.captureNetwork({change:t},\"connectivity\",e)},r.prototype._captureRollbarItem=function(t){return t.err?this.captureError(t.err,t.level,t.uuid,t.timestamp):t.message?this.captureLog(t.message,t.level,t.uuid,t.timestamp):t.custom?this.capture(\"log\",t.custom,t.level,t.uuid,t.timestamp):void 0},r.prototype.push=function(t){this.queue.push(t),this.queue.length>this.maxQueueSize&&this.queue.shift()},t.exports=r},function(t,e,n){\"use strict\";function r(t,e,n,r){this.options=t,this.transport=e,this.url=n,this.jsonBackup=r,this.accessToken=t.accessToken,this.transportOptions=o(t,n)}function o(t,e){return a.getTransportFromOptions(t,s,e)}var i=n(6),a=n(12),s={hostname:\"api.rollbar.com\",path:\"/api/1\",search:null,version:\"1\",protocol:\"https:\",port:443};r.prototype.postItem=function(t,e){var n=a.transportOptions(this.transportOptions,\"/item/\",\"POST\"),r=a.buildPayload(this.accessToken,t,this.jsonBackup);this.transport.post(this.accessToken,n,r,e)},r.prototype.configure=function(t){var e=this.oldOptions;return this.options=i.extend(!0,{},e,t),this.transportOptions=o(this.options,this.url),void 0!==this.options.accessToken&&(this.accessToken=this.options.accessToken),this},t.exports=r},function(t,e,n){\"use strict\";function r(t,e,n){if(s.isType(e.context,\"object\")){var r=s.stringify(e.context,n);r.error?e.context=\"Error: could not serialize 'context'\":e.context=r.value||\"\",e.context.length>255&&(e.context=e.context.substr(0,255))}return{access_token:t,data:e}}function o(t,e,n){var r=e.hostname,o=e.protocol,i=e.port,a=e.path,s=e.search,u=t.proxy;if(t.endpoint){var c=n.parse(t.endpoint);r=c.hostname,o=c.protocol,i=c.port,a=c.pathname,s=c.search}return{hostname:r,protocol:o,port:i,path:a,search:s,proxy:u}}function i(t,e,n){var r=t.protocol||\"https:\",o=t.port||(\"http:\"===r?80:\"https:\"===r?443:void 0),i=t.hostname;return e=a(t.path,e),t.search&&(e+=t.search),t.proxy&&(e=r+\"//\"+i+e,i=t.proxy.host||t.proxy.hostname,o=t.proxy.port,r=t.proxy.protocol||r),{protocol:r,hostname:i,path:e,port:o,method:n}}function a(t,e){var n=/\\/$/.test(t),r=/^\\//.test(e);return n&&r?e=e.substring(1):n||r||(e=\"/\"+e),t+e}var s=n(6);t.exports={buildPayload:r,getTransportFromOptions:o,transportOptions:i,appendPathToPath:a}},function(t,e,n){\"use strict\";function r(){var t=Array.prototype.slice.call(arguments,0);t.unshift(\"Rollbar:\"),a.ieVersion()<=8?console.error(s.formatArgsAsString(t)):console.error.apply(console,t)}function o(){var t=Array.prototype.slice.call(arguments,0);t.unshift(\"Rollbar:\"),a.ieVersion()<=8?console.info(s.formatArgsAsString(t)):console.info.apply(console,t)}function i(){var t=Array.prototype.slice.call(arguments,0);t.unshift(\"Rollbar:\"),a.ieVersion()<=8?console.log(s.formatArgsAsString(t)):console.log.apply(console,t)}n(14);var a=n(15),s=n(6);t.exports={error:r,info:o,log:i}},function(t,e){!function(t){\"use strict\";t.console||(t.console={});for(var e,n,r=t.console,o=function(){},i=[\"memory\"],a=\"assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn\".split(\",\");e=i.pop();)r[e]||(r[e]={});for(;n=a.pop();)r[n]||(r[n]=o)}(\"undefined\"==typeof window?this:window)},function(t,e){\"use strict\";function n(){var t;if(!document)return t;for(var e=3,n=document.createElement(\"div\"),r=n.getElementsByTagName(\"i\");n.innerHTML=\"<!--[if gt IE \"+ ++e+\"]><i></i><![endif]-->\",r[0];);return e>4?e:t}var r={ieVersion:n};t.exports=r},function(t,e){\"use strict\";function n(t,e,n){if(t){var o;\"function\"==typeof e._rollbarOldOnError?o=e._rollbarOldOnError:t.onerror&&!t.onerror.belongsToShim&&(o=t.onerror,e._rollbarOldOnError=o);var i=function(){var n=Array.prototype.slice.call(arguments,0);r(t,e,o,n)};i.belongsToShim=n,t.onerror=i}}function r(t,e,n,r){t._rollbarWrappedError&&(r[4]||(r[4]=t._rollbarWrappedError),r[5]||(r[5]=t._rollbarWrappedError._rollbarContext),t._rollbarWrappedError=null),e.handleUncaughtException.apply(e,r),n&&n.apply(t,r)}function o(t,e,n){if(t){\"function\"==typeof t._rollbarURH&&t._rollbarURH.belongsToShim&&t.removeEventListener(\"unhandledrejection\",t._rollbarURH);var r=function(t){var n=t.reason,r=t.promise,o=t.detail;!n&&o&&(n=o.reason,r=o.promise),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(n,r)};r.belongsToShim=n,t._rollbarURH=r,t.addEventListener(\"unhandledrejection\",r)}}function i(t,e,n){if(t){var r,o,i=\"EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload\".split(\",\");\nfor(r=0;r<i.length;++r)o=i[r],t[o]&&t[o].prototype&&a(e,t[o].prototype,n)}}function a(t,e,n){if(e.hasOwnProperty&&e.hasOwnProperty(\"addEventListener\")){for(var r=e.addEventListener;r._rollbarOldAdd&&r.belongsToShim;)r=r._rollbarOldAdd;var o=function(e,n,o){r.call(this,e,t.wrap(n),o)};o._rollbarOldAdd=r,o.belongsToShim=n,e.addEventListener=o;for(var i=e.removeEventListener;i._rollbarOldRemove&&i.belongsToShim;)i=i._rollbarOldRemove;var a=function(t,e,n){i.call(this,t,e&&e._rollbar_wrapped||e,n)};a._rollbarOldRemove=i,a.belongsToShim=n,e.removeEventListener=a}}t.exports={captureUncaughtExceptions:n,captureUnhandledRejections:o,wrapGlobals:i}},function(t,e,n){\"use strict\";function r(t,e,n,r,o){r&&l.isFunction(r)||(r=function(){}),l.addParamsAndAccessTokenToPath(t,e,n);var a=\"GET\",s=l.formatUrl(e);i(t,s,a,null,r,o)}function o(t,e,n,r,o){if(r&&l.isFunction(r)||(r=function(){}),!n)return r(new Error(\"Cannot send empty request\"));var a=l.stringify(n);if(a.error)return r(a.error);var s=a.value,u=\"POST\",c=l.formatUrl(e);i(t,c,u,s,r,o)}function i(t,e,n,r,o,i){var f;if(f=i?i():a(),!f)return o(new Error(\"No way to send a request\"));try{try{var h=function(){try{if(h&&4===f.readyState){h=void 0;var t=l.jsonParse(f.responseText);if(s(f))return void o(t.error,t.value);if(u(f)){if(403===f.status){var e=t.value&&t.value.message;p.error(e)}o(new Error(String(f.status)))}else{var n=\"XHR response had no status code (likely connection failure)\";o(c(n))}}}catch(t){var r;r=t&&t.stack?t:new Error(t),o(r)}};f.open(n,e,!0),f.setRequestHeader&&(f.setRequestHeader(\"Content-Type\",\"application/json\"),f.setRequestHeader(\"X-Rollbar-Access-Token\",t)),f.onreadystatechange=h,f.send(r)}catch(t){if(\"undefined\"!=typeof XDomainRequest){if(!window||!window.location)return o(new Error(\"No window available during request, unknown environment\"));\"http:\"===window.location.href.substring(0,5)&&\"https\"===e.substring(0,5)&&(e=\"http\"+e.substring(5));var d=new XDomainRequest;d.onprogress=function(){},d.ontimeout=function(){var t=\"Request timed out\",e=\"ETIMEDOUT\";o(c(t,e))},d.onerror=function(){o(new Error(\"Error during request\"))},d.onload=function(){var t=l.jsonParse(d.responseText);o(t.error,t.value)},d.open(n,e,!0),d.send(r)}else o(new Error(\"Cannot find a method to transport a request\"))}}catch(t){o(t)}}function a(){var t,e,n=[function(){return new XMLHttpRequest},function(){return new ActiveXObject(\"Msxml2.XMLHTTP\")},function(){return new ActiveXObject(\"Msxml3.XMLHTTP\")},function(){return new ActiveXObject(\"Microsoft.XMLHTTP\")}],r=n.length;for(e=0;e<r;e++)try{t=n[e]();break}catch(t){}return t}function s(t){return t&&t.status&&200===t.status}function u(t){return t&&l.isType(t.status,\"number\")&&t.status>=400&&t.status<600}function c(t,e){var n=new Error(t);return n.code=e||\"ENOTFOUND\",n}var l=n(6),p=n(13);t.exports={get:r,post:o}},function(t,e){\"use strict\";function n(t){var e,n,r={protocol:null,auth:null,host:null,path:null,hash:null,href:t,hostname:null,port:null,pathname:null,search:null,query:null};if(e=t.indexOf(\"//\"),e!==-1?(r.protocol=t.substring(0,e),n=e+2):n=0,e=t.indexOf(\"@\",n),e!==-1&&(r.auth=t.substring(n,e),n=e+1),e=t.indexOf(\"/\",n),e===-1){if(e=t.indexOf(\"?\",n),e===-1)return e=t.indexOf(\"#\",n),e===-1?r.host=t.substring(n):(r.host=t.substring(n,e),r.hash=t.substring(e)),r.hostname=r.host.split(\":\")[0],r.port=r.host.split(\":\")[1],r.port&&(r.port=parseInt(r.port,10)),r;r.host=t.substring(n,e),r.hostname=r.host.split(\":\")[0],r.port=r.host.split(\":\")[1],r.port&&(r.port=parseInt(r.port,10)),n=e}else r.host=t.substring(n,e),r.hostname=r.host.split(\":\")[0],r.port=r.host.split(\":\")[1],r.port&&(r.port=parseInt(r.port,10)),n=e;if(e=t.indexOf(\"#\",n),e===-1?r.path=t.substring(n):(r.path=t.substring(n,e),r.hash=t.substring(e)),r.path){var o=r.path.split(\"?\");r.pathname=o[0],r.query=o[1],r.search=r.query?\"?\"+r.query:null}return r}t.exports={parse:n}},function(t,e,n){\"use strict\";function r(t,e,n){if(t.data=t.data||{},t.err)try{t.stackInfo=t.err._savedStackTrace||m.parse(t.err)}catch(e){g.error(\"Error while parsing the error object.\",e),t.message=t.err.message||t.err.description||t.message||String(t.err),delete t.err}n(null,t)}function o(t,e,n){t.message||t.stackInfo||t.custom||n(new Error(\"No message, stack info, or custom data\"),null),n(null,t)}function i(t,e,n){var r=e.payload&&e.payload.environment||e.environment;t.data=d.extend(!0,{},t.data,{environment:r,level:t.level,endpoint:e.endpoint,platform:\"browser\",framework:\"browser-js\",language:\"javascript\",server:{},uuid:t.uuid,notifier:{name:\"rollbar-browser-js\",version:e.version}}),n(null,t)}function a(t){return function(e,n,r){return t&&t.location?(d.set(e,\"data.request\",{url:t.location.href,query_string:t.location.search,user_ip:\"$remote_ip\"}),void r(null,e)):r(null,e)}}function s(t){return function(e,n,r){return t?(d.set(e,\"data.client\",{runtime_ms:e.timestamp-t._rollbarStartTime,timestamp:Math.round(e.timestamp/1e3),javascript:{browser:t.navigator.userAgent,language:t.navigator.language,cookie_enabled:t.navigator.cookieEnabled,screen:{width:t.screen.width,height:t.screen.height}}}),void r(null,e)):r(null,e)}}function u(t){return function(e,n,r){if(!t||!t.navigator)return r(null,e);for(var o,i=[],a=t.navigator.plugins||[],s=0,u=a.length;s<u;++s)o=a[s],i.push({name:o.name,description:o.description});d.set(e,\"data.client.javascript.plugins\",i),r(null,e)}}function c(t,e,n){t.stackInfo?p(t,e,n):l(t,e,n)}function l(t,e,n){var r=t.message,o=t.custom;if(!r)if(o){var i=e.scrubFields,a=d.stringify(d.scrub(o,i));r=a.error||a.value||\"\"}else r=\"\";var s={body:r};o&&(s.extra=d.extend(!0,{},o)),d.set(t,\"data.body\",{message:s}),n(null,t)}function p(t,e,n){var r=t.data.description,o=t.stackInfo,i=t.custom,a=m.guessErrorClass(o.message),s=o.name||a[0],u=a[1],c={exception:{class:s,message:u}};r&&(c.exception.description=r);var p=o.stack;if(p&&0===p.length&&t._unhandledStackInfo&&t._unhandledStackInfo.stack&&(p=t._unhandledStackInfo.stack),p){var f,h,g,v,y,b,w,_;for(c.frames=[],w=0;w<p.length;++w)f=p[w],h={filename:f.url?d.sanitizeUrl(f.url):\"(unknown)\",lineno:f.line||null,method:f.func&&\"?\"!==f.func?f.func:\"[anonymous]\",colno:f.column},h.method&&h.method.endsWith&&h.method.endsWith(\"_rollbar_wrapped\")||(g=v=y=null,b=f.context?f.context.length:0,b&&(_=Math.floor(b/2),v=f.context.slice(0,_),g=f.context[_],y=f.context.slice(_)),g&&(h.code=g),(v||y)&&(h.context={},v&&v.length&&(h.context.pre=v),y&&y.length&&(h.context.post=y)),f.args&&(h.args=f.args),c.frames.push(h));c.frames.reverse(),i&&(c.extra=d.extend(!0,{},i)),d.set(t,\"data.body\",{trace:c}),n(null,t)}else t.message=s+\": \"+u,l(t,e,n)}function f(t,e,n){var r=e.scrubFields;d.scrub(t.data,r),n(null,t)}function h(t,e,n){var r=d.extend(!0,{},t);try{d.isFunction(e.transform)&&e.transform(r.data)}catch(r){return e.transform=null,g.error(\"Error while calling custom transform() function. Removing custom transform().\",r),void n(null,t)}n(null,r)}var d=n(6),m=n(20),g=n(13);t.exports={handleItemWithError:r,ensureItemHasSomethingToSay:o,addBaseInfo:i,addRequestInfo:a,addClientInfo:s,addPluginInfo:u,addBody:c,scrubPayload:f,userTransform:h}},function(t,e,n){\"use strict\";function r(){return l}function o(){return null}function i(t){var e={};return e._stackFrame=t,e.url=t.fileName,e.line=t.lineNumber,e.func=t.functionName,e.column=t.columnNumber,e.args=t.args,e.context=o(e.url,e.line),e}function a(t){function e(){var e=[];try{e=c.parse(t)}catch(t){e=[]}for(var n=[],r=0;r<e.length;r++)n.push(new i(e[r]));return n}return{stack:e(),message:t.message,name:t.name}}function s(t){return new a(t)}function u(t){if(!t)return[\"Unknown error. There was no error message to display.\",\"\"];var e=t.match(p),n=\"(unknown)\";return e&&(n=e[e.length-1],t=t.replace((e[e.length-2]||\"\")+n+\":\",\"\"),t=t.replace(/(^[\\s]+|[\\s]+$)/g,\"\")),[n,t]}var c=n(21),l=\"?\",p=new RegExp(\"^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): \");t.exports={guessFunctionName:r,guessErrorClass:u,gatherContext:o,parse:s,Stack:a,Frame:i}},function(t,e,n){var r,o,i;!function(a,s){\"use strict\";o=[n(22)],r=s,i=\"function\"==typeof r?r.apply(e,o):r,!(void 0!==i&&(t.exports=i))}(this,function(t){\"use strict\";function e(t,e,n){if(\"function\"==typeof Array.prototype.map)return t.map(e,n);for(var r=new Array(t.length),o=0;o<t.length;o++)r[o]=e.call(n,t[o]);return r}function n(t,e,n){if(\"function\"==typeof Array.prototype.filter)return t.filter(e,n);for(var r=[],o=0;o<t.length;o++)e.call(n,t[o])&&r.push(t[o]);return r}var r=/(^|@)\\S+\\:\\d+/,o=/^\\s*at .*(\\S+\\:\\d+|\\(native\\))/m,i=/^(eval@)?(\\[native code\\])?$/;return{parse:function(t){if(\"undefined\"!=typeof t.stacktrace||\"undefined\"!=typeof t[\"opera#sourceloc\"])return this.parseOpera(t);if(t.stack&&t.stack.match(o))return this.parseV8OrIE(t);if(t.stack)return this.parseFFOrSafari(t);throw new Error(\"Cannot parse given Error object\")},extractLocation:function(t){if(t.indexOf(\":\")===-1)return[t];var e=t.replace(/[\\(\\)\\s]/g,\"\").split(\":\"),n=e.pop(),r=e[e.length-1];if(!isNaN(parseFloat(r))&&isFinite(r)){var o=e.pop();return[e.join(\":\"),o,n]}return[e.join(\":\"),n,void 0]},parseV8OrIE:function(r){var i=n(r.stack.split(\"\\n\"),function(t){return!!t.match(o)},this);return e(i,function(e){e.indexOf(\"(eval \")>-1&&(e=e.replace(/eval code/g,\"eval\").replace(/(\\(eval at [^\\()]*)|(\\)\\,.*$)/g,\"\"));var n=e.replace(/^\\s+/,\"\").replace(/\\(eval code/g,\"(\").split(/\\s+/).slice(1),r=this.extractLocation(n.pop()),o=n.join(\" \")||void 0,i=\"eval\"===r[0]?void 0:r[0];return new t(o,void 0,i,r[1],r[2],e)},this)},parseFFOrSafari:function(r){var o=n(r.stack.split(\"\\n\"),function(t){return!t.match(i)},this);return e(o,function(e){if(e.indexOf(\" > eval\")>-1&&(e=e.replace(/ line (\\d+)(?: > eval line \\d+)* > eval\\:\\d+\\:\\d+/g,\":$1\")),e.indexOf(\"@\")===-1&&e.indexOf(\":\")===-1)return new t(e);var n=e.split(\"@\"),r=this.extractLocation(n.pop()),o=n.shift()||void 0;return new t(o,void 0,r[0],r[1],r[2],e)},this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf(\"\\n\")>-1&&t.message.split(\"\\n\").length>t.stacktrace.split(\"\\n\").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(e){for(var n=/Line (\\d+).*script (?:in )?(\\S+)/i,r=e.message.split(\"\\n\"),o=[],i=2,a=r.length;i<a;i+=2){var s=n.exec(r[i]);s&&o.push(new t(void 0,void 0,s[2],s[1],void 0,r[i]))}return o},parseOpera10:function(e){for(var n=/Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i,r=e.stacktrace.split(\"\\n\"),o=[],i=0,a=r.length;i<a;i+=2){var s=n.exec(r[i]);s&&o.push(new t(s[3]||void 0,void 0,s[2],s[1],void 0,r[i]))}return o},parseOpera11:function(o){var i=n(o.stack.split(\"\\n\"),function(t){return!!t.match(r)&&!t.match(/^Error created at/)},this);return e(i,function(e){var n,r=e.split(\"@\"),o=this.extractLocation(r.pop()),i=r.shift()||\"\",a=i.replace(/<anonymous function(: (\\w+))?>/,\"$2\").replace(/\\([^\\)]*\\)/g,\"\")||void 0;i.match(/\\(([^\\)]*)\\)/)&&(n=i.replace(/^[^\\(]+\\(([^\\)]*)\\)$/,\"$1\"));var s=void 0===n||\"[arguments not available]\"===n?void 0:n.split(\",\");return new t(a,s,o[0],o[1],o[2],e)},this)}}})},function(t,e,n){var r,o,i;!function(n,a){\"use strict\";o=[],r=a,i=\"function\"==typeof r?r.apply(e,o):r,!(void 0!==i&&(t.exports=i))}(this,function(){\"use strict\";function t(t){return!isNaN(parseFloat(t))&&isFinite(t)}function e(t,e,n,r,o,i){void 0!==t&&this.setFunctionName(t),void 0!==e&&this.setArgs(e),void 0!==n&&this.setFileName(n),void 0!==r&&this.setLineNumber(r),void 0!==o&&this.setColumnNumber(o),void 0!==i&&this.setSource(i)}return e.prototype={getFunctionName:function(){return this.functionName},setFunctionName:function(t){this.functionName=String(t)},getArgs:function(){return this.args},setArgs:function(t){if(\"[object Array]\"!==Object.prototype.toString.call(t))throw new TypeError(\"Args must be an Array\");this.args=t},getFileName:function(){return this.fileName},setFileName:function(t){this.fileName=String(t)},getLineNumber:function(){return this.lineNumber},setLineNumber:function(e){if(!t(e))throw new TypeError(\"Line Number must be a Number\");this.lineNumber=Number(e)},getColumnNumber:function(){return this.columnNumber},setColumnNumber:function(e){if(!t(e))throw new TypeError(\"Column Number must be a Number\");this.columnNumber=Number(e)},getSource:function(){return this.source},setSource:function(t){this.source=String(t)},toString:function(){var e=this.getFunctionName()||\"{anonymous}\",n=\"(\"+(this.getArgs()||[]).join(\",\")+\")\",r=this.getFileName()?\"@\"+this.getFileName():\"\",o=t(this.getLineNumber())?\":\"+this.getLineNumber():\"\",i=t(this.getColumnNumber())?\":\"+this.getColumnNumber():\"\";return e+n+r+o+i}},e})},function(t,e,n){\"use strict\";function r(t,e,n){var r=e.payload||{};r.body&&delete r.body;var o=a.extend(!0,{},t.data,r);t._isUncaught&&(o._isUncaught=!0),t._originalArgs&&(o._originalArgs=t._originalArgs),n(null,o)}function o(t,e,n){t.telemetryEvents&&a.set(t,\"data.body.telemetry\",t.telemetryEvents),n(null,t)}function i(t,e,n){if(!t.message)return void n(null,t);var r=\"data.body.trace_chain.0\",o=a.get(t,r);if(o||(r=\"data.body.trace\",o=a.get(t,r)),o){if(!o.exception||!o.exception.description)return a.set(t,r+\".exception.description\",t.message),void n(null,t);var i=a.get(t,r+\".extra\")||{},s=a.extend(!0,{},i,{message:t.message});a.set(t,r+\".extra\",s)}n(null,t)}var a=n(6);t.exports={itemToPayload:r,addTelemetryData:o,addMessageWithError:i}},function(t,e,n){\"use strict\";function r(t,e){var n=t.level,r=c.LEVELS[n]||0,o=c.LEVELS[e.reportLevel]||0;return!(r<o)&&(!c.get(e,\"plugins.jquery.ignoreAjaxErrors\")||!c.get(t,\"body.message.extra.isAjax\"))}function o(t,e){var n=!!t._isUncaught;delete t._isUncaught;var r=t._originalArgs;delete t._originalArgs;try{if(c.isFunction(e.checkIgnore)&&e.checkIgnore(n,r,t))return!1}catch(t){e.checkIgnore=null,l.error(\"Error while calling custom checkIgnore(), removing\",t)}return!0}function i(t,e){return!s(t,e,\"blacklist\")}function a(t,e){return s(t,e,\"whitelist\")}function s(t,e,n){var r=!1;\"blacklist\"===n&&(r=!0);var o,i,a,s,u,p,f,h,d,m;try{if(o=r?e.hostBlackList:e.hostWhiteList,f=o&&o.length,i=c.get(t,\"body.trace\"),!o||0===f)return!r;if(!i||!i.frames)return!r;for(u=i.frames.length,d=0;d<u;d++){if(a=i.frames[d],s=a.filename,!c.isType(s,\"string\"))return!r;for(m=0;m<f;m++)if(p=o[m],h=new RegExp(p),h.test(s))return!0}}catch(t){r?e.hostBlackList=null:e.hostWhiteList=null;var g=r?\"hostBlackList\":\"hostWhiteList\";return l.error(\"Error while reading your configuration's \"+g+\" option. Removing custom \"+g+\".\",t),!r}return!1}function u(t,e){var n,r,o,i,a,s,u,p,f;try{if(a=!1,o=e.ignoredMessages,!o||0===o.length)return!0;if(u=t.body,p=c.get(u,\"trace.exception.message\"),f=c.get(u,\"message.body\"),n=p||f,!n)return!0;for(i=o.length,r=0;r<i&&(s=new RegExp(o[r],\"gi\"),!(a=s.test(n)));r++);}catch(t){e.ignoredMessages=null,l.error(\"Error while reading your configuration's ignoredMessages option. Removing custom ignoredMessages.\")}return!a}var c=n(6),l=n(13);t.exports={checkIgnore:r,userCheckIgnore:o,urlIsNotBlacklisted:i,urlIsWhitelisted:a,messageIsIgnored:u}},function(t,e,n){\"use strict\";function r(t,e,n,r,o){var i=t[e];t[e]=n(i),r&&r[o].push([t,e,i])}function o(t,e){for(var n;t[e].length;)n=t[e].shift(),n[0][n[1]]=n[2]}function i(t,e,n,r,o){var i=t.autoInstrument;t.enabled===!1||i===!1?this.autoInstrument={}:(a.isType(i,\"object\")||(i=c),this.autoInstrument=a.extend(!0,{},c,i)),this.scrubTelemetryInputs=!!t.scrubTelemetryInputs,this.telemetryScrubber=t.telemetryScrubber,this.telemeter=e,this.rollbar=n,this._window=r||{},this._document=o||{},this.replacements={network:[],log:[],navigation:[],connectivity:[]},this.eventRemovers={dom:[],connectivity:[]},this._location=this._window.location,this._lastHref=this._location&&this._location.href}var a=n(6),s=n(18),u=n(26),c={network:!0,log:!0,dom:!0,navigation:!0,connectivity:!0};i.prototype.configure=function(t){var e=t.autoInstrument,n=a.extend(!0,{},this.autoInstrument);t.enabled===!1||e===!1?this.autoInstrument={}:(a.isType(e,\"object\")||(e=c),this.autoInstrument=a.extend(!0,{},c,e)),this.instrument(n)},i.prototype.instrument=function(t){!this.autoInstrument.network||t&&t.network?!this.autoInstrument.network&&t&&t.network&&this.deinstrumentNetwork():this.instrumentNetwork(),!this.autoInstrument.log||t&&t.log?!this.autoInstrument.log&&t&&t.log&&this.deinstrumentConsole():this.instrumentConsole(),!this.autoInstrument.dom||t&&t.dom?!this.autoInstrument.dom&&t&&t.dom&&this.deinstrumentDom():this.instrumentDom(),!this.autoInstrument.navigation||t&&t.navigation?!this.autoInstrument.navigation&&t&&t.navigation&&this.deinstrumentNavigation():this.instrumentNavigation(),!this.autoInstrument.connectivity||t&&t.connectivity?!this.autoInstrument.connectivity&&t&&t.connectivity&&this.deinstrumentConnectivity():this.instrumentConnectivity()},i.prototype.deinstrumentNetwork=function(){o(this.replacements,\"network\")},i.prototype.instrumentNetwork=function(){function t(t,n){t in n&&a.isFunction(n[t])&&r(n,t,function(t){return e.rollbar.wrap(t)})}var e=this;if(\"XMLHttpRequest\"in this._window){var n=this._window.XMLHttpRequest.prototype;r(n,\"open\",function(t){return function(e,n){return a.isType(n,\"string\")&&(this.__rollbar_xhr={method:e,url:n,status_code:null,start_time_ms:a.now(),end_time_ms:null}),t.apply(this,arguments)}},this.replacements,\"network\"),r(n,\"send\",function(n){return function(o){function i(){if(s.__rollbar_xhr&&(1===s.readyState||4===s.readyState)){null===s.__rollbar_xhr.status_code&&(s.__rollbar_xhr.status_code=0,s.__rollbar_event=e.telemeter.captureNetwork(s.__rollbar_xhr,\"xhr\")),1===s.readyState?s.__rollbar_xhr.start_time_ms=a.now():s.__rollbar_xhr.end_time_ms=a.now();try{var t=s.status;t=1223===t?204:t,s.__rollbar_xhr.status_code=t,s.__rollbar_event.level=e.telemeter.levelFromStatus(t)}catch(t){}}}var s=this;return t(\"onload\",s),t(\"onerror\",s),t(\"onprogress\",s),\"onreadystatechange\"in s&&a.isFunction(s.onreadystatechange)?r(s,\"onreadystatechange\",function(t){return e.rollbar.wrap(t,void 0,i)}):s.onreadystatechange=i,n.apply(this,arguments)}},this.replacements,\"network\")}\"fetch\"in this._window&&r(this._window,\"fetch\",function(t){return function(n,r){for(var o=new Array(arguments.length),i=0,s=o.length;i<s;i++)o[i]=arguments[i];var u,c=o[0],l=\"GET\";a.isType(c,\"string\")?u=c:(u=c.url,c.method&&(l=c.method)),o[1]&&o[1].method&&(l=o[1].method);var p={method:l,url:u,status_code:null,start_time_ms:a.now(),end_time_ms:null};return e.telemeter.captureNetwork(p,\"fetch\"),t.apply(this,o).then(function(t){return p.end_time_ms=a.now(),p.status_code=t.status,t})}},this.replacements,\"network\")},i.prototype.deinstrumentConsole=function(){if(\"console\"in this._window&&this._window.console.log)for(var t;this.replacements.log.length;)t=this.replacements.log.shift(),this._window.console[t[0]]=t[1]},i.prototype.instrumentConsole=function(){function t(t){var r=n[t],o=n,i=\"warn\"===t?\"warning\":t;n[t]=function(){var t=Array.prototype.slice.call(arguments),n=a.formatArgsAsString(t);e.telemeter.captureLog(n,i),r&&Function.prototype.apply.call(r,o,t)},e.replacements.log.push([t,r])}if(\"console\"in this._window&&this._window.console.log)for(var e=this,n=this._window.console,r=[\"debug\",\"info\",\"warn\",\"error\",\"log\"],o=0,i=r.length;o<i;o++)t(r[o])},i.prototype.deinstrumentDom=function(){(\"addEventListener\"in this._window||\"attachEvent\"in this._window)&&this.removeListeners(\"dom\")},i.prototype.instrumentDom=function(){if(\"addEventListener\"in this._window||\"attachEvent\"in this._window){var t=this.handleClick.bind(this),e=this.handleBlur.bind(this);this.addListener(\"dom\",this._window,\"click\",\"onclick\",t,!0),this.addListener(\"dom\",this._window,\"blur\",\"onfocusout\",e,!0)}},i.prototype.handleClick=function(t){try{var e=u.getElementFromEvent(t,this._document),n=e&&e.tagName,r=u.isDescribedElement(e,\"a\")||u.isDescribedElement(e,\"button\");n&&(r||u.isDescribedElement(e,\"input\",[\"button\",\"submit\"]))?this.captureDomEvent(\"click\",e):u.isDescribedElement(e,\"input\",[\"checkbox\",\"radio\"])&&this.captureDomEvent(\"input\",e,e.value,e.checked)}catch(t){}},i.prototype.handleBlur=function(t){try{var e=u.getElementFromEvent(t,this._document);e&&e.tagName&&(u.isDescribedElement(e,\"textarea\")?this.captureDomEvent(\"input\",e,e.value):u.isDescribedElement(e,\"select\")&&e.options&&e.options.length?this.handleSelectInputChanged(e):u.isDescribedElement(e,\"input\")&&!u.isDescribedElement(e,\"input\",[\"button\",\"submit\",\"hidden\",\"checkbox\",\"radio\"])&&this.captureDomEvent(\"input\",e,e.value))}catch(t){}},i.prototype.handleSelectInputChanged=function(t){if(t.multiple)for(var e=0;e<t.options.length;e++)t.options[e].selected&&this.captureDomEvent(\"input\",t,t.options[e].value);else t.selectedIndex>=0&&t.options[t.selectedIndex]&&this.captureDomEvent(\"input\",t,t.options[t.selectedIndex].value)},i.prototype.captureDomEvent=function(t,e,n,r){if(void 0!==n)if(this.scrubTelemetryInputs||\"password\"===u.getElementType(e))n=\"[scrubbed]\";else if(this.telemetryScrubber){var o=u.describeElement(e);this.telemetryScrubber(o)&&(n=\"[scrubbed]\")}var i=u.elementArrayToString(u.treeToArray(e));this.telemeter.captureDom(t,i,n,r)},i.prototype.deinstrumentNavigation=function(){var t=this._window.chrome,e=t&&t.app&&t.app.runtime,n=!e&&this._window.history&&this._window.history.pushState;n&&o(this.replacements,\"navigation\")},i.prototype.instrumentNavigation=function(){var t=this._window.chrome,e=t&&t.app&&t.app.runtime,n=!e&&this._window.history&&this._window.history.pushState;if(n){var o=this;r(this._window,\"onpopstate\",function(t){return function(){var e=o._location.href;o.handleUrlChange(o._lastHref,e),t&&t.apply(this,arguments)}},this.replacements,\"navigation\"),r(this._window.history,\"pushState\",function(t){return function(){var e=arguments.length>2?arguments[2]:void 0;return e&&o.handleUrlChange(o._lastHref,e+\"\"),t.apply(this,arguments)}},this.replacements,\"navigation\")}},i.prototype.handleUrlChange=function(t,e){var n=s.parse(this._location.href),r=s.parse(e),o=s.parse(t);this._lastHref=e,n.protocol===r.protocol&&n.host===r.host&&(e=r.path+(r.hash||\"\")),n.protocol===o.protocol&&n.host===o.host&&(t=o.path+(o.hash||\"\")),this.telemeter.captureNavigation(t,e)},i.prototype.deinstrumentConnectivity=function(){(\"addEventListener\"in this._window||\"body\"in this._document)&&(this._window.addEventListener?this.removeListeners(\"connectivity\"):o(this.replacements,\"connectivity\"))},i.prototype.instrumentConnectivity=function(){if(\"addEventListener\"in this._window||\"body\"in this._document)if(this._window.addEventListener)this.addListener(\"connectivity\",this._window,\"online\",void 0,function(){this.telemeter.captureConnectivityChange(\"online\")}.bind(this),!0),this.addListener(\"connectivity\",this._window,\"offline\",void 0,function(){this.telemeter.captureConnectivityChange(\"offline\")}.bind(this),!0);else{var t=this;r(this._document.body,\"ononline\",function(e){return function(){t.telemeter.captureConnectivityChange(\"online\"),e&&e.apply(this,arguments)}},this.replacements,\"connectivity\"),r(this._document.body,\"onoffline\",function(e){return function(){t.telemeter.captureConnectivityChange(\"offline\"),e&&e.apply(this,arguments)}},this.replacements,\"connectivity\")}},i.prototype.addListener=function(t,e,n,r,o,i){e.addEventListener?(e.addEventListener(n,o,i),this.eventRemovers[t].push(function(){e.removeEventListener(n,o,i)})):r&&(e.attachEvent(r,o),this.eventRemovers[t].push(function(){e.detachEvent(r,o)}))},i.prototype.removeListeners=function(t){for(var e;this.eventRemovers[t].length;)(e=this.eventRemovers[t].shift())()},t.exports=i},function(t,e){\"use strict\";function n(t){return(t.getAttribute(\"type\")||\"\").toLowerCase()}function r(t,e,r){if(t.tagName.toLowerCase()!==e.toLowerCase())return!1;if(!r)return!0;t=n(t);for(var o=0;o<r.length;o++)if(r[o]===t)return!0;return!1}function o(t,e){return t.target?t.target:e&&e.elementFromPoint?e.elementFromPoint(t.clientX,t.clientY):void 0}function i(t){for(var e,n=5,r=[],o=0;t&&o<n&&(e=u(t),\"html\"!==e.tagName);o++)r.unshift(e),t=t.parentNode;return r}function a(t){for(var e,n,r=80,o=\" > \",i=o.length,a=[],u=0,c=t.length-1;c>=0;c--){if(e=s(t[c]),n=u+a.length*i+e.length,c<t.length-1&&n>=r+3){a.unshift(\"...\");break}a.unshift(e),u+=e.length}return a.join(o)}function s(t){if(!t||!t.tagName)return\"\";var e=[t.tagName];t.id&&e.push(\"#\"+t.id),t.classes&&e.push(\".\"+t.classes.join(\".\"));for(var n=0;n<t.attributes.length;n++)e.push(\"[\"+t.attributes[n].key+'=\"'+t.attributes[n].value+'\"]');return e.join(\"\")}function u(t){if(!t||!t.tagName)return null;var e,n,r,o,i={};i.tagName=t.tagName.toLowerCase(),t.id&&(i.id=t.id),e=t.className,e&&\"string\"==typeof e&&(i.classes=e.split(/\\s+/));var a=[\"type\",\"name\",\"title\",\"alt\"];for(i.attributes=[],o=0;o<a.length;o++)n=a[o],r=t.getAttribute(n),r&&i.attributes.push({key:n,value:r});return i}t.exports={describeElement:u,descriptionToString:s,elementArrayToString:a,treeToArray:i,getElementFromEvent:o,isDescribedElement:r,getElementType:n}}])});","var map = {\n\t\"./Post\": 73,\n\t\"./Post.jsx\": 73,\n\t\"./UploadForm\": 123,\n\t\"./UploadForm.jsx\": 123\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 138;","/**\n * Copyright (c) 2014-present, Facebook, Inc.\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\n'use strict';\n\n/**\n * Forked from fbjs/warning:\n * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js\n *\n * Only change is we use console.warn instead of console.error,\n * and do nothing when 'console' is not supported.\n * This really simplifies the code.\n * ---\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\nvar lowPriorityWarning = function lowPriorityWarning() {};\nif (process.env.NODE_ENV !== 'production') {\n var printWarning = function printWarning(format) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.warn(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n lowPriorityWarning = function lowPriorityWarning(condition, format) {\n if (format === undefined) {\n throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n if (!condition) {\n for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n args[_key2 - 2] = arguments[_key2];\n }\n printWarning.apply(undefined, [format].concat(args));\n }\n };\n}\nmodule.exports = lowPriorityWarning;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar PooledClass = require('./PooledClass');\nvar ReactElement = require('./ReactElement');\nvar emptyFunction = require('fbjs/lib/emptyFunction');\nvar traverseAllChildren = require('./traverseAllChildren');\nvar twoArgumentPooler = PooledClass.twoArgumentPooler;\nvar fourArgumentPooler = PooledClass.fourArgumentPooler;\nvar userProvidedKeyEscapeRegex = /\\/+/g;\nfunction escapeUserProvidedKey(text) {\n return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');\n}\n\n/**\n * PooledClass representing the bookkeeping associated with performing a child\n * traversal. Allows avoiding binding callbacks.\n *\n * @constructor ForEachBookKeeping\n * @param {!function} forEachFunction Function to perform traversal with.\n * @param {?*} forEachContext Context to perform context with.\n */\nfunction ForEachBookKeeping(forEachFunction, forEachContext) {\n this.func = forEachFunction;\n this.context = forEachContext;\n this.count = 0;\n}\nForEachBookKeeping.prototype.destructor = function () {\n this.func = null;\n this.context = null;\n this.count = 0;\n};\nPooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler);\nfunction forEachSingleChild(bookKeeping, child, name) {\n var func = bookKeeping.func,\n context = bookKeeping.context;\n func.call(context, child, bookKeeping.count++);\n}\n\n/**\n * Iterates through children that are typically specified as `props.children`.\n *\n * See https://facebook.github.io/react/docs/top-level-api.html#react.children.foreach\n *\n * The provided forEachFunc(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} forEachFunc\n * @param {*} forEachContext Context for forEachContext.\n */\nfunction forEachChildren(children, forEachFunc, forEachContext) {\n if (children == null) {\n return children;\n }\n var traverseContext = ForEachBookKeeping.getPooled(forEachFunc, forEachContext);\n traverseAllChildren(children, forEachSingleChild, traverseContext);\n ForEachBookKeeping.release(traverseContext);\n}\n\n/**\n * PooledClass representing the bookkeeping associated with performing a child\n * mapping. Allows avoiding binding callbacks.\n *\n * @constructor MapBookKeeping\n * @param {!*} mapResult Object containing the ordered map of results.\n * @param {!function} mapFunction Function to perform mapping with.\n * @param {?*} mapContext Context to perform mapping with.\n */\nfunction MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) {\n this.result = mapResult;\n this.keyPrefix = keyPrefix;\n this.func = mapFunction;\n this.context = mapContext;\n this.count = 0;\n}\nMapBookKeeping.prototype.destructor = function () {\n this.result = null;\n this.keyPrefix = null;\n this.func = null;\n this.context = null;\n this.count = 0;\n};\nPooledClass.addPoolingTo(MapBookKeeping, fourArgumentPooler);\nfunction mapSingleChildIntoContext(bookKeeping, child, childKey) {\n var result = bookKeeping.result,\n keyPrefix = bookKeeping.keyPrefix,\n func = bookKeeping.func,\n context = bookKeeping.context;\n var mappedChild = func.call(context, child, bookKeeping.count++);\n if (Array.isArray(mappedChild)) {\n mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction.thatReturnsArgument);\n } else if (mappedChild != null) {\n if (ReactElement.isValidElement(mappedChild)) {\n mappedChild = ReactElement.cloneAndReplaceKey(mappedChild,\n // Keep both the (mapped) and old keys if they differ, just as\n // traverseAllChildren used to do for objects as children\n keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);\n }\n result.push(mappedChild);\n }\n}\nfunction mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {\n var escapedPrefix = '';\n if (prefix != null) {\n escapedPrefix = escapeUserProvidedKey(prefix) + '/';\n }\n var traverseContext = MapBookKeeping.getPooled(array, escapedPrefix, func, context);\n traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);\n MapBookKeeping.release(traverseContext);\n}\n\n/**\n * Maps children that are typically specified as `props.children`.\n *\n * See https://facebook.github.io/react/docs/top-level-api.html#react.children.map\n *\n * The provided mapFunction(child, key, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} func The map function.\n * @param {*} context Context for mapFunction.\n * @return {object} Object containing the ordered map of results.\n */\nfunction mapChildren(children, func, context) {\n if (children == null) {\n return children;\n }\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, func, context);\n return result;\n}\nfunction forEachSingleChildDummy(traverseContext, child, name) {\n return null;\n}\n\n/**\n * Count the number of children that are typically specified as\n * `props.children`.\n *\n * See https://facebook.github.io/react/docs/top-level-api.html#react.children.count\n *\n * @param {?*} children Children tree container.\n * @return {number} The number of children.\n */\nfunction countChildren(children, context) {\n return traverseAllChildren(children, forEachSingleChildDummy, null);\n}\n\n/**\n * Flatten a children object (typically specified as `props.children`) and\n * return an array with appropriately re-keyed children.\n *\n * See https://facebook.github.io/react/docs/top-level-api.html#react.children.toarray\n */\nfunction toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}\nvar ReactChildren = {\n forEach: forEachChildren,\n map: mapChildren,\n mapIntoWithKeyPrefixInternal: mapIntoWithKeyPrefixInternal,\n count: countChildren,\n toArray: toArray\n};\nmodule.exports = ReactChildren;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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 */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\nvar invariant = require('fbjs/lib/invariant');\n\n/**\n * Static poolers. Several custom versions for each potential number of\n * arguments. A completely generic pooler is easy to implement, but would\n * require accessing the `arguments` object. In each of these, `this` refers to\n * the Class itself, not an instance. If any others are needed, simply add them\n * here, or in their own files.\n */\nvar oneArgumentPooler = function oneArgumentPooler(copyFieldsFrom) {\n var Klass = this;\n if (Klass.instancePool.length) {\n var instance = Klass.instancePool.pop();\n Klass.call(instance, copyFieldsFrom);\n return instance;\n } else {\n return new Klass(copyFieldsFrom);\n }\n};\nvar twoArgumentPooler = function twoArgumentPooler(a1, a2) {\n var Klass = this;\n if (Klass.instancePool.length) {\n var instance = Klass.instancePool.pop();\n Klass.call(instance, a1, a2);\n return instance;\n } else {\n return new Klass(a1, a2);\n }\n};\nvar threeArgumentPooler = function threeArgumentPooler(a1, a2, a3) {\n var Klass = this;\n if (Klass.instancePool.length) {\n var instance = Klass.instancePool.pop();\n Klass.call(instance, a1, a2, a3);\n return instance;\n } else {\n return new Klass(a1, a2, a3);\n }\n};\nvar fourArgumentPooler = function fourArgumentPooler(a1, a2, a3, a4) {\n var Klass = this;\n if (Klass.instancePool.length) {\n var instance = Klass.instancePool.pop();\n Klass.call(instance, a1, a2, a3, a4);\n return instance;\n } else {\n return new Klass(a1, a2, a3, a4);\n }\n};\nvar standardReleaser = function standardReleaser(instance) {\n var Klass = this;\n !(instance instanceof Klass) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0;\n instance.destructor();\n if (Klass.instancePool.length < Klass.poolSize) {\n Klass.instancePool.push(instance);\n }\n};\nvar DEFAULT_POOL_SIZE = 10;\nvar DEFAULT_POOLER = oneArgumentPooler;\n\n/**\n * Augments `CopyConstructor` to be a poolable class, augmenting only the class\n * itself (statically) not adding any prototypical fields. Any CopyConstructor\n * you give this may have a `poolSize` property, and will look for a\n * prototypical `destructor` on instances.\n *\n * @param {Function} CopyConstructor Constructor that can be used to reset.\n * @param {Function} pooler Customizable pooler.\n */\nvar addPoolingTo = function addPoolingTo(CopyConstructor, pooler) {\n // Casting as any so that flow ignores the actual implementation and trusts\n // it to match the type we declared\n var NewKlass = CopyConstructor;\n NewKlass.instancePool = [];\n NewKlass.getPooled = pooler || DEFAULT_POOLER;\n if (!NewKlass.poolSize) {\n NewKlass.poolSize = DEFAULT_POOL_SIZE;\n }\n NewKlass.release = standardReleaser;\n return NewKlass;\n};\nvar PooledClass = {\n addPoolingTo: addPoolingTo,\n oneArgumentPooler: oneArgumentPooler,\n twoArgumentPooler: twoArgumentPooler,\n threeArgumentPooler: threeArgumentPooler,\n fourArgumentPooler: fourArgumentPooler\n};\nmodule.exports = PooledClass;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nvar _prodInvariant = require('./reactProdInvariant');\nvar ReactCurrentOwner = require('./ReactCurrentOwner');\nvar REACT_ELEMENT_TYPE = require('./ReactElementSymbol');\nvar getIteratorFn = require('./getIteratorFn');\nvar invariant = require('fbjs/lib/invariant');\nvar KeyEscapeUtils = require('./KeyEscapeUtils');\nvar warning = require('fbjs/lib/warning');\nvar SEPARATOR = '.';\nvar SUBSEPARATOR = ':';\n\n/**\n * This is inlined from ReactElement since this file is shared between\n * isomorphic and renderers. We could extract this to a\n *\n */\n\n/**\n * TODO: Test that a single child and an array with one item have the same key\n * pattern.\n */\n\nvar didWarnAboutMaps = false;\n\n/**\n * Generate a key string that identifies a component within a set.\n *\n * @param {*} component A component that could contain a manual key.\n * @param {number} index Index that is used if a manual key is not provided.\n * @return {string}\n */\nfunction getComponentKey(component, index) {\n // Do some typechecking here since we call this blindly. We want to ensure\n // that we don't block potential future ES APIs.\n if (component && _typeof(component) === 'object' && component.key != null) {\n // Explicit key\n return KeyEscapeUtils.escape(component.key);\n }\n // Implicit key determined by the index in the set\n return index.toString(36);\n}\n\n/**\n * @param {?*} children Children tree container.\n * @param {!string} nameSoFar Name of the key path so far.\n * @param {!function} callback Callback to invoke with each child found.\n * @param {?*} traverseContext Used to pass information throughout the traversal\n * process.\n * @return {!number} The number of children in this subtree.\n */\nfunction traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {\n var type = _typeof(children);\n if (type === 'undefined' || type === 'boolean') {\n // All of the above are perceived as null.\n children = null;\n }\n if (children === null || type === 'string' || type === 'number' ||\n // The following is inlined from ReactElement. This means we can optimize\n // some checks. React Fiber also inlines this logic for similar purposes.\n type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) {\n callback(traverseContext, children,\n // If it's the only child, treat the name as if it was wrapped in an array\n // so that it's consistent if the number of children grows.\n nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);\n return 1;\n }\n var child;\n var nextName;\n var subtreeCount = 0; // Count of children found in the current subtree.\n var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;\n if (Array.isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n nextName = nextNamePrefix + getComponentKey(child, i);\n subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);\n }\n } else {\n var iteratorFn = getIteratorFn(children);\n if (iteratorFn) {\n var iterator = iteratorFn.call(children);\n var step;\n if (iteratorFn !== children.entries) {\n var ii = 0;\n while (!(step = iterator.next()).done) {\n child = step.value;\n nextName = nextNamePrefix + getComponentKey(child, ii++);\n subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);\n }\n } else {\n if (process.env.NODE_ENV !== 'production') {\n var mapsAsChildrenAddendum = '';\n if (ReactCurrentOwner.current) {\n var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName();\n if (mapsAsChildrenOwnerName) {\n mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.';\n }\n }\n process.env.NODE_ENV !== 'production' ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.%s', mapsAsChildrenAddendum) : void 0;\n didWarnAboutMaps = true;\n }\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n child = entry[1];\n nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0);\n subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);\n }\n }\n }\n } else if (type === 'object') {\n var addendum = '';\n if (process.env.NODE_ENV !== 'production') {\n addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.';\n if (children._isReactElement) {\n addendum = \" It looks like you're using an element created by a different \" + 'version of React. Make sure to use only one copy of React.';\n }\n if (ReactCurrentOwner.current) {\n var name = ReactCurrentOwner.current.getName();\n if (name) {\n addendum += ' Check the render method of `' + name + '`.';\n }\n }\n }\n var childrenString = String(children);\n !false ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : _prodInvariant('31', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : void 0;\n }\n }\n return subtreeCount;\n}\n\n/**\n * Traverses children that are typically specified as `props.children`, but\n * might also be specified through attributes:\n *\n * - `traverseAllChildren(this.props.children, ...)`\n * - `traverseAllChildren(this.props.leftPanelChildren, ...)`\n *\n * The `traverseContext` is an optional argument that is passed through the\n * entire traversal. It can be used to store accumulations or anything else that\n * the callback might find relevant.\n *\n * @param {?*} children Children tree object.\n * @param {!function} callback To invoke upon traversing each child.\n * @param {?*} traverseContext Context for traversal.\n * @return {!number} The number of children in this subtree.\n */\nfunction traverseAllChildren(children, callback, traverseContext) {\n if (children == null) {\n return 0;\n }\n return traverseAllChildrenImpl(children, '', callback, traverseContext);\n}\nmodule.exports = traverseAllChildren;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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 */\n\n'use strict';\n\n/* global Symbol */\nvar ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n/**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\nfunction getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n}\nmodule.exports = getIteratorFn;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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 */\n\n'use strict';\n\n/**\n * Escape and wrap key so it is safe to use as a reactid\n *\n * @param {string} key to be escaped.\n * @return {string} the escaped key.\n */\nfunction escape(key) {\n var escapeRegex = /[=:]/g;\n var escaperLookup = {\n '=': '=0',\n ':': '=2'\n };\n var escapedString = ('' + key).replace(escapeRegex, function (match) {\n return escaperLookup[match];\n });\n return '$' + escapedString;\n}\n\n/**\n * Unescape and unwrap key for human-readable display\n *\n * @param {string} key to unescape.\n * @return {string} the unescaped key.\n */\nfunction unescape(key) {\n var unescapeRegex = /(=0|=2)/g;\n var unescaperLookup = {\n '=0': '=',\n '=2': ':'\n };\n var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1);\n return ('' + keySubstring).replace(unescapeRegex, function (match) {\n return unescaperLookup[match];\n });\n}\nvar KeyEscapeUtils = {\n escape: escape,\n unescape: unescape\n};\nmodule.exports = KeyEscapeUtils;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar ReactElement = require('./ReactElement');\n\n/**\n * Create a factory that creates HTML tag elements.\n *\n * @private\n */\nvar createDOMFactory = ReactElement.createFactory;\nif (process.env.NODE_ENV !== 'production') {\n var ReactElementValidator = require('./ReactElementValidator');\n createDOMFactory = ReactElementValidator.createFactory;\n}\n\n/**\n * Creates a mapping from supported HTML tags to `ReactDOMComponent` classes.\n *\n * @public\n */\nvar ReactDOMFactories = {\n a: createDOMFactory('a'),\n abbr: createDOMFactory('abbr'),\n address: createDOMFactory('address'),\n area: createDOMFactory('area'),\n article: createDOMFactory('article'),\n aside: createDOMFactory('aside'),\n audio: createDOMFactory('audio'),\n b: createDOMFactory('b'),\n base: createDOMFactory('base'),\n bdi: createDOMFactory('bdi'),\n bdo: createDOMFactory('bdo'),\n big: createDOMFactory('big'),\n blockquote: createDOMFactory('blockquote'),\n body: createDOMFactory('body'),\n br: createDOMFactory('br'),\n button: createDOMFactory('button'),\n canvas: createDOMFactory('canvas'),\n caption: createDOMFactory('caption'),\n cite: createDOMFactory('cite'),\n code: createDOMFactory('code'),\n col: createDOMFactory('col'),\n colgroup: createDOMFactory('colgroup'),\n data: createDOMFactory('data'),\n datalist: createDOMFactory('datalist'),\n dd: createDOMFactory('dd'),\n del: createDOMFactory('del'),\n details: createDOMFactory('details'),\n dfn: createDOMFactory('dfn'),\n dialog: createDOMFactory('dialog'),\n div: createDOMFactory('div'),\n dl: createDOMFactory('dl'),\n dt: createDOMFactory('dt'),\n em: createDOMFactory('em'),\n embed: createDOMFactory('embed'),\n fieldset: createDOMFactory('fieldset'),\n figcaption: createDOMFactory('figcaption'),\n figure: createDOMFactory('figure'),\n footer: createDOMFactory('footer'),\n form: createDOMFactory('form'),\n h1: createDOMFactory('h1'),\n h2: createDOMFactory('h2'),\n h3: createDOMFactory('h3'),\n h4: createDOMFactory('h4'),\n h5: createDOMFactory('h5'),\n h6: createDOMFactory('h6'),\n head: createDOMFactory('head'),\n header: createDOMFactory('header'),\n hgroup: createDOMFactory('hgroup'),\n hr: createDOMFactory('hr'),\n html: createDOMFactory('html'),\n i: createDOMFactory('i'),\n iframe: createDOMFactory('iframe'),\n img: createDOMFactory('img'),\n input: createDOMFactory('input'),\n ins: createDOMFactory('ins'),\n kbd: createDOMFactory('kbd'),\n keygen: createDOMFactory('keygen'),\n label: createDOMFactory('label'),\n legend: createDOMFactory('legend'),\n li: createDOMFactory('li'),\n link: createDOMFactory('link'),\n main: createDOMFactory('main'),\n map: createDOMFactory('map'),\n mark: createDOMFactory('mark'),\n menu: createDOMFactory('menu'),\n menuitem: createDOMFactory('menuitem'),\n meta: createDOMFactory('meta'),\n meter: createDOMFactory('meter'),\n nav: createDOMFactory('nav'),\n noscript: createDOMFactory('noscript'),\n object: createDOMFactory('object'),\n ol: createDOMFactory('ol'),\n optgroup: createDOMFactory('optgroup'),\n option: createDOMFactory('option'),\n output: createDOMFactory('output'),\n p: createDOMFactory('p'),\n param: createDOMFactory('param'),\n picture: createDOMFactory('picture'),\n pre: createDOMFactory('pre'),\n progress: createDOMFactory('progress'),\n q: createDOMFactory('q'),\n rp: createDOMFactory('rp'),\n rt: createDOMFactory('rt'),\n ruby: createDOMFactory('ruby'),\n s: createDOMFactory('s'),\n samp: createDOMFactory('samp'),\n script: createDOMFactory('script'),\n section: createDOMFactory('section'),\n select: createDOMFactory('select'),\n small: createDOMFactory('small'),\n source: createDOMFactory('source'),\n span: createDOMFactory('span'),\n strong: createDOMFactory('strong'),\n style: createDOMFactory('style'),\n sub: createDOMFactory('sub'),\n summary: createDOMFactory('summary'),\n sup: createDOMFactory('sup'),\n table: createDOMFactory('table'),\n tbody: createDOMFactory('tbody'),\n td: createDOMFactory('td'),\n textarea: createDOMFactory('textarea'),\n tfoot: createDOMFactory('tfoot'),\n th: createDOMFactory('th'),\n thead: createDOMFactory('thead'),\n time: createDOMFactory('time'),\n title: createDOMFactory('title'),\n tr: createDOMFactory('tr'),\n track: createDOMFactory('track'),\n u: createDOMFactory('u'),\n ul: createDOMFactory('ul'),\n 'var': createDOMFactory('var'),\n video: createDOMFactory('video'),\n wbr: createDOMFactory('wbr'),\n // SVG\n circle: createDOMFactory('circle'),\n clipPath: createDOMFactory('clipPath'),\n defs: createDOMFactory('defs'),\n ellipse: createDOMFactory('ellipse'),\n g: createDOMFactory('g'),\n image: createDOMFactory('image'),\n line: createDOMFactory('line'),\n linearGradient: createDOMFactory('linearGradient'),\n mask: createDOMFactory('mask'),\n path: createDOMFactory('path'),\n pattern: createDOMFactory('pattern'),\n polygon: createDOMFactory('polygon'),\n polyline: createDOMFactory('polyline'),\n radialGradient: createDOMFactory('radialGradient'),\n rect: createDOMFactory('rect'),\n stop: createDOMFactory('stop'),\n svg: createDOMFactory('svg'),\n text: createDOMFactory('text'),\n tspan: createDOMFactory('tspan')\n};\nmodule.exports = ReactDOMFactories;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar _require = require('./ReactElement'),\n isValidElement = _require.isValidElement;\nvar factory = require('prop-types/factory');\nmodule.exports = factory(isValidElement);","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nvar ReactIs = require('react-is');\nvar assign = require('object-assign');\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar has = require('./lib/has');\nvar checkPropTypes = require('./checkPropTypes');\nvar printWarning = function printWarning() {};\nif (process.env.NODE_ENV !== 'production') {\n printWarning = function printWarning(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\nfunction emptyFunctionThatReturnsNull() {\n return null;\n}\nmodule.exports = function (isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<<anonymous>>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bigint: createPrimitiveTypeChecker('bigint'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n elementType: createElementTypeTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message, data) {\n this.message = message;\n this.data = data && _typeof(data) === 'object' ? data : {};\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n function createChainableTypeChecker(validate) {\n if (process.env.NODE_ENV !== 'production') {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use `PropTypes.checkPropTypes()` to call them. ' + 'Read more at http://fb.me/use-check-prop-types');\n err.name = 'Invariant Violation';\n throw err;\n } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (!manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3) {\n printWarning('You are manually calling a React.PropTypes validation ' + 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' + 'and will throw in the standalone `prop-types` package. ' + 'You may be seeing this warning due to a third-party PropTypes ' + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.');\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n return chainedCheckType;\n }\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'), {\n expectedType: expectedType\n });\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n }\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n function createElementTypeTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!ReactIs.isValidElementType(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n if (process.env.NODE_ENV !== 'production') {\n if (arguments.length > 1) {\n printWarning('Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' + 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).');\n } else {\n printWarning('Invalid argument supplied to oneOf, expected an array.');\n }\n }\n return emptyFunctionThatReturnsNull;\n }\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {\n var type = getPreciseType(value);\n if (type === 'symbol') {\n return String(value);\n }\n return value;\n });\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (has(propValue, key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunctionThatReturnsNull;\n }\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n printWarning('Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.');\n return emptyFunctionThatReturnsNull;\n }\n }\n function validate(props, propName, componentName, location, propFullName) {\n var expectedTypes = [];\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);\n if (checkerResult == null) {\n return null;\n }\n if (checkerResult.data && has(checkerResult.data, 'expectedType')) {\n expectedTypes.push(checkerResult.data.expectedType);\n }\n }\n var expectedTypesMessage = expectedTypes.length > 0 ? ', expected one of type [' + expectedTypes.join(', ') + ']' : '';\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n function invalidValidatorError(componentName, location, propFullName, key, type) {\n return new PropTypeError((componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.');\n }\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (has(shapeTypes, key) && typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n if (!checker) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' + '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') + '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' '));\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n function isNode(propValue) {\n switch (_typeof(propValue)) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n return true;\n default:\n return false;\n }\n }\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // falsy value can't be a Symbol\n if (!propValue) {\n return false;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = _typeof(propValue);\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;\n ReactPropTypes.PropTypes = ReactPropTypes;\n return ReactPropTypes;\n};","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}","/** @license React v16.13.1\n * react-is.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\n'use strict';\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nvar b = \"function\" === typeof Symbol && Symbol[\"for\"],\n c = b ? Symbol[\"for\"](\"react.element\") : 60103,\n d = b ? Symbol[\"for\"](\"react.portal\") : 60106,\n e = b ? Symbol[\"for\"](\"react.fragment\") : 60107,\n f = b ? Symbol[\"for\"](\"react.strict_mode\") : 60108,\n g = b ? Symbol[\"for\"](\"react.profiler\") : 60114,\n h = b ? Symbol[\"for\"](\"react.provider\") : 60109,\n k = b ? Symbol[\"for\"](\"react.context\") : 60110,\n l = b ? Symbol[\"for\"](\"react.async_mode\") : 60111,\n m = b ? Symbol[\"for\"](\"react.concurrent_mode\") : 60111,\n n = b ? Symbol[\"for\"](\"react.forward_ref\") : 60112,\n p = b ? Symbol[\"for\"](\"react.suspense\") : 60113,\n q = b ? Symbol[\"for\"](\"react.suspense_list\") : 60120,\n r = b ? Symbol[\"for\"](\"react.memo\") : 60115,\n t = b ? Symbol[\"for\"](\"react.lazy\") : 60116,\n v = b ? Symbol[\"for\"](\"react.block\") : 60121,\n w = b ? Symbol[\"for\"](\"react.fundamental\") : 60117,\n x = b ? Symbol[\"for\"](\"react.responder\") : 60118,\n y = b ? Symbol[\"for\"](\"react.scope\") : 60119;\nfunction z(a) {\n if (\"object\" === _typeof(a) && null !== a) {\n var u = a.$$typeof;\n switch (u) {\n case c:\n switch (a = a.type, a) {\n case l:\n case m:\n case e:\n case g:\n case f:\n case p:\n return a;\n default:\n switch (a = a && a.$$typeof, a) {\n case k:\n case n:\n case t:\n case r:\n case h:\n return a;\n default:\n return u;\n }\n }\n case d:\n return u;\n }\n }\n}\nfunction A(a) {\n return z(a) === m;\n}\nexports.AsyncMode = l;\nexports.ConcurrentMode = m;\nexports.ContextConsumer = k;\nexports.ContextProvider = h;\nexports.Element = c;\nexports.ForwardRef = n;\nexports.Fragment = e;\nexports.Lazy = t;\nexports.Memo = r;\nexports.Portal = d;\nexports.Profiler = g;\nexports.StrictMode = f;\nexports.Suspense = p;\nexports.isAsyncMode = function (a) {\n return A(a) || z(a) === l;\n};\nexports.isConcurrentMode = A;\nexports.isContextConsumer = function (a) {\n return z(a) === k;\n};\nexports.isContextProvider = function (a) {\n return z(a) === h;\n};\nexports.isElement = function (a) {\n return \"object\" === _typeof(a) && null !== a && a.$$typeof === c;\n};\nexports.isForwardRef = function (a) {\n return z(a) === n;\n};\nexports.isFragment = function (a) {\n return z(a) === e;\n};\nexports.isLazy = function (a) {\n return z(a) === t;\n};\nexports.isMemo = function (a) {\n return z(a) === r;\n};\nexports.isPortal = function (a) {\n return z(a) === d;\n};\nexports.isProfiler = function (a) {\n return z(a) === g;\n};\nexports.isStrictMode = function (a) {\n return z(a) === f;\n};\nexports.isSuspense = function (a) {\n return z(a) === p;\n};\nexports.isValidElementType = function (a) {\n return \"string\" === typeof a || \"function\" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || \"object\" === _typeof(a) && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);\n};\nexports.typeOf = z;","module.exports = Function.call.bind(Object.prototype.hasOwnProperty);","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nvar printWarning = function printWarning() {};\nif (process.env.NODE_ENV !== 'production') {\n var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n var loggedTypeFailures = {};\n var has = require('./lib/has');\n printWarning = function printWarning(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {/**/}\n };\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (process.env.NODE_ENV !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error;\n // 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 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 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 error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n if (error && !(error instanceof Error)) {\n printWarning((componentName || 'React class') + ': type specification of ' + location + ' `' + typeSpecName + '` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a ' + _typeof(error) + '. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).');\n }\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n var stack = getStack ? getStack() : '';\n printWarning('Failed ' + location + ' type: ' + error.message + (stack != null ? stack : ''));\n }\n }\n }\n }\n}\n\n/**\n * Resets warning cache when testing.\n *\n * @private\n */\ncheckPropTypes.resetWarningCache = function () {\n if (process.env.NODE_ENV !== 'production') {\n loggedTypeFailures = {};\n }\n};\nmodule.exports = checkPropTypes;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nmodule.exports = '15.7.0';","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar _require = require('./ReactBaseClasses'),\n Component = _require.Component;\nvar _require2 = require('./ReactElement'),\n isValidElement = _require2.isValidElement;\nvar ReactNoopUpdateQueue = require('./ReactNoopUpdateQueue');\nvar factory = require('create-react-class/factory');\nmodule.exports = factory(Component, isValidElement, ReactNoopUpdateQueue);","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nvar _assign = require('object-assign');\n\n// -- Inlined from fbjs --\n\nvar emptyObject = {};\nif (process.env.NODE_ENV !== 'production') {\n Object.freeze(emptyObject);\n}\nvar validateFormat = function validateFormat(format) {};\nif (process.env.NODE_ENV !== 'production') {\n validateFormat = function validateFormat(format) {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n };\n}\nfunction _invariant(condition, format, a, b, c, d, e, f) {\n validateFormat(format);\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(format.replace(/%s/g, function () {\n return args[argIndex++];\n }));\n error.name = 'Invariant Violation';\n }\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n}\nvar warning = function warning() {};\nif (process.env.NODE_ENV !== 'production') {\n var printWarning = function printWarning(format) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n warning = function warning(condition, format) {\n if (format === undefined) {\n throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n if (format.indexOf('Failed Composite propType: ') === 0) {\n return; // Ignore CompositeComponent proptype check.\n }\n if (!condition) {\n for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n args[_key2 - 2] = arguments[_key2];\n }\n printWarning.apply(undefined, [format].concat(args));\n }\n };\n}\n\n// /-- Inlined from fbjs --\n\nvar MIXINS_KEY = 'mixins';\n\n// Helper function to allow the creation of anonymous functions which do not\n// have .name set to the name of the variable being assigned to.\nfunction identity(fn) {\n return fn;\n}\nvar ReactPropTypeLocationNames;\nif (process.env.NODE_ENV !== 'production') {\n ReactPropTypeLocationNames = {\n prop: 'prop',\n context: 'context',\n childContext: 'child context'\n };\n} else {\n ReactPropTypeLocationNames = {};\n}\nfunction factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) {\n /**\n * Policies that describe methods in `ReactClassInterface`.\n */\n\n var injectedMixins = [];\n\n /**\n * Composite components are higher-level components that compose other composite\n * or host components.\n *\n * To create a new type of `ReactClass`, pass a specification of\n * your new class to `React.createClass`. The only requirement of your class\n * specification is that you implement a `render` method.\n *\n * var MyComponent = React.createClass({\n * render: function() {\n * return <div>Hello World</div>;\n * }\n * });\n *\n * The class specification supports a specific protocol of methods that have\n * special meaning (e.g. `render`). See `ReactClassInterface` for\n * more the comprehensive protocol. Any other properties and methods in the\n * class specification will be available on the prototype.\n *\n * @interface ReactClassInterface\n * @internal\n */\n var ReactClassInterface = {\n /**\n * An array of Mixin objects to include when defining your component.\n *\n * @type {array}\n * @optional\n */\n mixins: 'DEFINE_MANY',\n /**\n * An object containing properties and methods that should be defined on\n * the component's constructor instead of its prototype (static methods).\n *\n * @type {object}\n * @optional\n */\n statics: 'DEFINE_MANY',\n /**\n * Definition of prop types for this component.\n *\n * @type {object}\n * @optional\n */\n propTypes: 'DEFINE_MANY',\n /**\n * Definition of context types for this component.\n *\n * @type {object}\n * @optional\n */\n contextTypes: 'DEFINE_MANY',\n /**\n * Definition of context types this component sets for its children.\n *\n * @type {object}\n * @optional\n */\n childContextTypes: 'DEFINE_MANY',\n // ==== Definition methods ====\n\n /**\n * Invoked when the component is mounted. Values in the mapping will be set on\n * `this.props` if that prop is not specified (i.e. using an `in` check).\n *\n * This method is invoked before `getInitialState` and therefore cannot rely\n * on `this.state` or use `this.setState`.\n *\n * @return {object}\n * @optional\n */\n getDefaultProps: 'DEFINE_MANY_MERGED',\n /**\n * Invoked once before the component is mounted. The return value will be used\n * as the initial value of `this.state`.\n *\n * getInitialState: function() {\n * return {\n * isOn: false,\n * fooBaz: new BazFoo()\n * }\n * }\n *\n * @return {object}\n * @optional\n */\n getInitialState: 'DEFINE_MANY_MERGED',\n /**\n * @return {object}\n * @optional\n */\n getChildContext: 'DEFINE_MANY_MERGED',\n /**\n * Uses props from `this.props` and state from `this.state` to render the\n * structure of the component.\n *\n * No guarantees are made about when or how often this method is invoked, so\n * it must not have side effects.\n *\n * render: function() {\n * var name = this.props.name;\n * return <div>Hello, {name}!</div>;\n * }\n *\n * @return {ReactComponent}\n * @required\n */\n render: 'DEFINE_ONCE',\n // ==== Delegate methods ====\n\n /**\n * Invoked when the component is initially created and about to be mounted.\n * This may have side effects, but any external subscriptions or data created\n * by this method must be cleaned up in `componentWillUnmount`.\n *\n * @optional\n */\n componentWillMount: 'DEFINE_MANY',\n /**\n * Invoked when the component has been mounted and has a DOM representation.\n * However, there is no guarantee that the DOM node is in the document.\n *\n * Use this as an opportunity to operate on the DOM when the component has\n * been mounted (initialized and rendered) for the first time.\n *\n * @param {DOMElement} rootNode DOM element representing the component.\n * @optional\n */\n componentDidMount: 'DEFINE_MANY',\n /**\n * Invoked before the component receives new props.\n *\n * Use this as an opportunity to react to a prop transition by updating the\n * state using `this.setState`. Current props are accessed via `this.props`.\n *\n * componentWillReceiveProps: function(nextProps, nextContext) {\n * this.setState({\n * likesIncreasing: nextProps.likeCount > this.props.likeCount\n * });\n * }\n *\n * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop\n * transition may cause a state change, but the opposite is not true. If you\n * need it, you are probably looking for `componentWillUpdate`.\n *\n * @param {object} nextProps\n * @optional\n */\n componentWillReceiveProps: 'DEFINE_MANY',\n /**\n * Invoked while deciding if the component should be updated as a result of\n * receiving new props, state and/or context.\n *\n * Use this as an opportunity to `return false` when you're certain that the\n * transition to the new props/state/context will not require a component\n * update.\n *\n * shouldComponentUpdate: function(nextProps, nextState, nextContext) {\n * return !equal(nextProps, this.props) ||\n * !equal(nextState, this.state) ||\n * !equal(nextContext, this.context);\n * }\n *\n * @param {object} nextProps\n * @param {?object} nextState\n * @param {?object} nextContext\n * @return {boolean} True if the component should update.\n * @optional\n */\n shouldComponentUpdate: 'DEFINE_ONCE',\n /**\n * Invoked when the component is about to update due to a transition from\n * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState`\n * and `nextContext`.\n *\n * Use this as an opportunity to perform preparation before an update occurs.\n *\n * NOTE: You **cannot** use `this.setState()` in this method.\n *\n * @param {object} nextProps\n * @param {?object} nextState\n * @param {?object} nextContext\n * @param {ReactReconcileTransaction} transaction\n * @optional\n */\n componentWillUpdate: 'DEFINE_MANY',\n /**\n * Invoked when the component's DOM representation has been updated.\n *\n * Use this as an opportunity to operate on the DOM when the component has\n * been updated.\n *\n * @param {object} prevProps\n * @param {?object} prevState\n * @param {?object} prevContext\n * @param {DOMElement} rootNode DOM element representing the component.\n * @optional\n */\n componentDidUpdate: 'DEFINE_MANY',\n /**\n * Invoked when the component is about to be removed from its parent and have\n * its DOM representation destroyed.\n *\n * Use this as an opportunity to deallocate any external resources.\n *\n * NOTE: There is no `componentDidUnmount` since your component will have been\n * destroyed by that point.\n *\n * @optional\n */\n componentWillUnmount: 'DEFINE_MANY',\n /**\n * Replacement for (deprecated) `componentWillMount`.\n *\n * @optional\n */\n UNSAFE_componentWillMount: 'DEFINE_MANY',\n /**\n * Replacement for (deprecated) `componentWillReceiveProps`.\n *\n * @optional\n */\n UNSAFE_componentWillReceiveProps: 'DEFINE_MANY',\n /**\n * Replacement for (deprecated) `componentWillUpdate`.\n *\n * @optional\n */\n UNSAFE_componentWillUpdate: 'DEFINE_MANY',\n // ==== Advanced methods ====\n\n /**\n * Updates the component's currently mounted DOM representation.\n *\n * By default, this implements React's rendering and reconciliation algorithm.\n * Sophisticated clients may wish to override this.\n *\n * @param {ReactReconcileTransaction} transaction\n * @internal\n * @overridable\n */\n updateComponent: 'OVERRIDE_BASE'\n };\n\n /**\n * Similar to ReactClassInterface but for static methods.\n */\n var ReactClassStaticInterface = {\n /**\n * This method is invoked after a component is instantiated and when it\n * receives new props. Return an object to update state in response to\n * prop changes. Return null to indicate no change to state.\n *\n * If an object is returned, its keys will be merged into the existing state.\n *\n * @return {object || null}\n * @optional\n */\n getDerivedStateFromProps: 'DEFINE_MANY_MERGED'\n };\n\n /**\n * Mapping from class specification keys to special processing functions.\n *\n * Although these are declared like instance properties in the specification\n * when defining classes using `React.createClass`, they are actually static\n * and are accessible on the constructor instead of the prototype. Despite\n * being static, they must be defined outside of the \"statics\" key under\n * which all other static methods are defined.\n */\n var RESERVED_SPEC_KEYS = {\n displayName: function displayName(Constructor, _displayName) {\n Constructor.displayName = _displayName;\n },\n mixins: function mixins(Constructor, _mixins) {\n if (_mixins) {\n for (var i = 0; i < _mixins.length; i++) {\n mixSpecIntoComponent(Constructor, _mixins[i]);\n }\n }\n },\n childContextTypes: function childContextTypes(Constructor, _childContextTypes) {\n if (process.env.NODE_ENV !== 'production') {\n validateTypeDef(Constructor, _childContextTypes, 'childContext');\n }\n Constructor.childContextTypes = _assign({}, Constructor.childContextTypes, _childContextTypes);\n },\n contextTypes: function contextTypes(Constructor, _contextTypes) {\n if (process.env.NODE_ENV !== 'production') {\n validateTypeDef(Constructor, _contextTypes, 'context');\n }\n Constructor.contextTypes = _assign({}, Constructor.contextTypes, _contextTypes);\n },\n /**\n * Special case getDefaultProps which should move into statics but requires\n * automatic merging.\n */\n getDefaultProps: function getDefaultProps(Constructor, _getDefaultProps) {\n if (Constructor.getDefaultProps) {\n Constructor.getDefaultProps = createMergedResultFunction(Constructor.getDefaultProps, _getDefaultProps);\n } else {\n Constructor.getDefaultProps = _getDefaultProps;\n }\n },\n propTypes: function propTypes(Constructor, _propTypes) {\n if (process.env.NODE_ENV !== 'production') {\n validateTypeDef(Constructor, _propTypes, 'prop');\n }\n Constructor.propTypes = _assign({}, Constructor.propTypes, _propTypes);\n },\n statics: function statics(Constructor, _statics) {\n mixStaticSpecIntoComponent(Constructor, _statics);\n },\n autobind: function autobind() {}\n };\n function validateTypeDef(Constructor, typeDef, location) {\n for (var propName in typeDef) {\n if (typeDef.hasOwnProperty(propName)) {\n // use a warning instead of an _invariant so components\n // don't show up in prod but only in __DEV__\n if (process.env.NODE_ENV !== 'production') {\n warning(typeof typeDef[propName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', Constructor.displayName || 'ReactClass', ReactPropTypeLocationNames[location], propName);\n }\n }\n }\n }\n function validateMethodOverride(isAlreadyDefined, name) {\n var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null;\n\n // Disallow overriding of base class methods unless explicitly allowed.\n if (ReactClassMixin.hasOwnProperty(name)) {\n _invariant(specPolicy === 'OVERRIDE_BASE', 'ReactClassInterface: You are attempting to override ' + '`%s` from your class specification. Ensure that your method names ' + 'do not overlap with React methods.', name);\n }\n\n // Disallow defining methods more than once unless explicitly allowed.\n if (isAlreadyDefined) {\n _invariant(specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED', 'ReactClassInterface: You are attempting to define ' + '`%s` on your component more than once. This conflict may be due ' + 'to a mixin.', name);\n }\n }\n\n /**\n * Mixin helper which handles policy validation and reserved\n * specification keys when building React classes.\n */\n function mixSpecIntoComponent(Constructor, spec) {\n if (!spec) {\n if (process.env.NODE_ENV !== 'production') {\n var typeofSpec = _typeof(spec);\n var isMixinValid = typeofSpec === 'object' && spec !== null;\n if (process.env.NODE_ENV !== 'production') {\n warning(isMixinValid, \"%s: You're attempting to include a mixin that is either null \" + 'or not an object. Check the mixins included by the component, ' + 'as well as any mixins they include themselves. ' + 'Expected object but got %s.', Constructor.displayName || 'ReactClass', spec === null ? null : typeofSpec);\n }\n }\n return;\n }\n _invariant(typeof spec !== 'function', \"ReactClass: You're attempting to \" + 'use a component class or function as a mixin. Instead, just use a ' + 'regular object.');\n _invariant(!isValidElement(spec), \"ReactClass: You're attempting to \" + 'use a component as a mixin. Instead, just use a regular object.');\n var proto = Constructor.prototype;\n var autoBindPairs = proto.__reactAutoBindPairs;\n\n // By handling mixins before any other properties, we ensure the same\n // chaining order is applied to methods with DEFINE_MANY policy, whether\n // mixins are listed before or after these methods in the spec.\n if (spec.hasOwnProperty(MIXINS_KEY)) {\n RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);\n }\n for (var name in spec) {\n if (!spec.hasOwnProperty(name)) {\n continue;\n }\n if (name === MIXINS_KEY) {\n // We have already handled mixins in a special case above.\n continue;\n }\n var property = spec[name];\n var isAlreadyDefined = proto.hasOwnProperty(name);\n validateMethodOverride(isAlreadyDefined, name);\n if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {\n RESERVED_SPEC_KEYS[name](Constructor, property);\n } else {\n // Setup methods on prototype:\n // The following member methods should not be automatically bound:\n // 1. Expected ReactClass methods (in the \"interface\").\n // 2. Overridden methods (that were mixed in).\n var isReactClassMethod = ReactClassInterface.hasOwnProperty(name);\n var isFunction = typeof property === 'function';\n var shouldAutoBind = isFunction && !isReactClassMethod && !isAlreadyDefined && spec.autobind !== false;\n if (shouldAutoBind) {\n autoBindPairs.push(name, property);\n proto[name] = property;\n } else {\n if (isAlreadyDefined) {\n var specPolicy = ReactClassInterface[name];\n\n // These cases should already be caught by validateMethodOverride.\n _invariant(isReactClassMethod && (specPolicy === 'DEFINE_MANY_MERGED' || specPolicy === 'DEFINE_MANY'), 'ReactClass: Unexpected spec policy %s for key %s ' + 'when mixing in component specs.', specPolicy, name);\n\n // For methods which are defined more than once, call the existing\n // methods before calling the new property, merging if appropriate.\n if (specPolicy === 'DEFINE_MANY_MERGED') {\n proto[name] = createMergedResultFunction(proto[name], property);\n } else if (specPolicy === 'DEFINE_MANY') {\n proto[name] = createChainedFunction(proto[name], property);\n }\n } else {\n proto[name] = property;\n if (process.env.NODE_ENV !== 'production') {\n // Add verbose displayName to the function, which helps when looking\n // at profiling tools.\n if (typeof property === 'function' && spec.displayName) {\n proto[name].displayName = spec.displayName + '_' + name;\n }\n }\n }\n }\n }\n }\n }\n function mixStaticSpecIntoComponent(Constructor, statics) {\n if (!statics) {\n return;\n }\n for (var name in statics) {\n var property = statics[name];\n if (!statics.hasOwnProperty(name)) {\n continue;\n }\n var isReserved = (name in RESERVED_SPEC_KEYS);\n _invariant(!isReserved, 'ReactClass: You are attempting to define a reserved ' + 'property, `%s`, that shouldn\\'t be on the \"statics\" key. Define it ' + 'as an instance property instead; it will still be accessible on the ' + 'constructor.', name);\n var isAlreadyDefined = (name in Constructor);\n if (isAlreadyDefined) {\n var specPolicy = ReactClassStaticInterface.hasOwnProperty(name) ? ReactClassStaticInterface[name] : null;\n _invariant(specPolicy === 'DEFINE_MANY_MERGED', 'ReactClass: You are attempting to define ' + '`%s` on your component more than once. This conflict may be ' + 'due to a mixin.', name);\n Constructor[name] = createMergedResultFunction(Constructor[name], property);\n return;\n }\n Constructor[name] = property;\n }\n }\n\n /**\n * Merge two objects, but throw if both contain the same key.\n *\n * @param {object} one The first object, which is mutated.\n * @param {object} two The second object\n * @return {object} one after it has been mutated to contain everything in two.\n */\n function mergeIntoWithNoDuplicateKeys(one, two) {\n _invariant(one && two && _typeof(one) === 'object' && _typeof(two) === 'object', 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.');\n for (var key in two) {\n if (two.hasOwnProperty(key)) {\n _invariant(one[key] === undefined, 'mergeIntoWithNoDuplicateKeys(): ' + 'Tried to merge two objects with the same key: `%s`. This conflict ' + 'may be due to a mixin; in particular, this may be caused by two ' + 'getInitialState() or getDefaultProps() methods returning objects ' + 'with clashing keys.', key);\n one[key] = two[key];\n }\n }\n return one;\n }\n\n /**\n * Creates a function that invokes two functions and merges their return values.\n *\n * @param {function} one Function to invoke first.\n * @param {function} two Function to invoke second.\n * @return {function} Function that invokes the two argument functions.\n * @private\n */\n function createMergedResultFunction(one, two) {\n return function mergedResult() {\n var a = one.apply(this, arguments);\n var b = two.apply(this, arguments);\n if (a == null) {\n return b;\n } else if (b == null) {\n return a;\n }\n var c = {};\n mergeIntoWithNoDuplicateKeys(c, a);\n mergeIntoWithNoDuplicateKeys(c, b);\n return c;\n };\n }\n\n /**\n * Creates a function that invokes two functions and ignores their return vales.\n *\n * @param {function} one Function to invoke first.\n * @param {function} two Function to invoke second.\n * @return {function} Function that invokes the two argument functions.\n * @private\n */\n function createChainedFunction(one, two) {\n return function chainedFunction() {\n one.apply(this, arguments);\n two.apply(this, arguments);\n };\n }\n\n /**\n * Binds a method to the component.\n *\n * @param {object} component Component whose method is going to be bound.\n * @param {function} method Method to be bound.\n * @return {function} The bound method.\n */\n function bindAutoBindMethod(component, method) {\n var boundMethod = method.bind(component);\n if (process.env.NODE_ENV !== 'production') {\n boundMethod.__reactBoundContext = component;\n boundMethod.__reactBoundMethod = method;\n boundMethod.__reactBoundArguments = null;\n var componentName = component.constructor.displayName;\n var _bind = boundMethod.bind;\n boundMethod.bind = function (newThis) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n // User is trying to bind() an autobound method; we effectively will\n // ignore the value of \"this\" that the user is trying to use, so\n // let's warn.\n if (newThis !== component && newThis !== null) {\n if (process.env.NODE_ENV !== 'production') {\n warning(false, 'bind(): React component methods may only be bound to the ' + 'component instance. See %s', componentName);\n }\n } else if (!args.length) {\n if (process.env.NODE_ENV !== 'production') {\n warning(false, 'bind(): You are binding a component method to the component. ' + 'React does this for you automatically in a high-performance ' + 'way, so you can safely remove this call. See %s', componentName);\n }\n return boundMethod;\n }\n var reboundMethod = _bind.apply(boundMethod, arguments);\n reboundMethod.__reactBoundContext = component;\n reboundMethod.__reactBoundMethod = method;\n reboundMethod.__reactBoundArguments = args;\n return reboundMethod;\n };\n }\n return boundMethod;\n }\n\n /**\n * Binds all auto-bound methods in a component.\n *\n * @param {object} component Component whose method is going to be bound.\n */\n function bindAutoBindMethods(component) {\n var pairs = component.__reactAutoBindPairs;\n for (var i = 0; i < pairs.length; i += 2) {\n var autoBindKey = pairs[i];\n var method = pairs[i + 1];\n component[autoBindKey] = bindAutoBindMethod(component, method);\n }\n }\n var IsMountedPreMixin = {\n componentDidMount: function componentDidMount() {\n this.__isMounted = true;\n }\n };\n var IsMountedPostMixin = {\n componentWillUnmount: function componentWillUnmount() {\n this.__isMounted = false;\n }\n };\n\n /**\n * Add more to the ReactClass base class. These are all legacy features and\n * therefore not already part of the modern ReactComponent.\n */\n var ReactClassMixin = {\n /**\n * TODO: This will be deprecated because state should always keep a consistent\n * type signature and the only use case for this, is to avoid that.\n */\n replaceState: function replaceState(newState, callback) {\n this.updater.enqueueReplaceState(this, newState, callback);\n },\n /**\n * Checks whether or not this composite component is mounted.\n * @return {boolean} True if mounted, false otherwise.\n * @protected\n * @final\n */\n isMounted: function isMounted() {\n if (process.env.NODE_ENV !== 'production') {\n warning(this.__didWarnIsMounted, '%s: isMounted is deprecated. Instead, make sure to clean up ' + 'subscriptions and pending requests in componentWillUnmount to ' + 'prevent memory leaks.', this.constructor && this.constructor.displayName || this.name || 'Component');\n this.__didWarnIsMounted = true;\n }\n return !!this.__isMounted;\n }\n };\n var ReactClassComponent = function ReactClassComponent() {};\n _assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin);\n\n /**\n * Creates a composite component class given a class specification.\n * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass\n *\n * @param {object} spec Class specification (which must define `render`).\n * @return {function} Component constructor function.\n * @public\n */\n function createClass(spec) {\n // To keep our warnings more understandable, we'll use a little hack here to\n // ensure that Constructor.name !== 'Constructor'. This makes sure we don't\n // unnecessarily identify a class without displayName as 'Constructor'.\n var Constructor = identity(function (props, context, updater) {\n // This constructor gets overridden by mocks. The argument is used\n // by mocks to assert on what gets mounted.\n\n if (process.env.NODE_ENV !== 'production') {\n warning(this instanceof Constructor, 'Something is calling a React component directly. Use a factory or ' + 'JSX instead. See: https://fb.me/react-legacyfactory');\n }\n\n // Wire up auto-binding\n if (this.__reactAutoBindPairs.length) {\n bindAutoBindMethods(this);\n }\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n this.state = null;\n\n // ReactClasses doesn't have constructors. Instead, they use the\n // getInitialState and componentWillMount methods for initialization.\n\n var initialState = this.getInitialState ? this.getInitialState() : null;\n if (process.env.NODE_ENV !== 'production') {\n // We allow auto-mocks to proceed as if they're returning null.\n if (initialState === undefined && this.getInitialState._isMockFunction) {\n // This is probably bad practice. Consider warning here and\n // deprecating this convenience.\n initialState = null;\n }\n }\n _invariant(_typeof(initialState) === 'object' && !Array.isArray(initialState), '%s.getInitialState(): must return an object or null', Constructor.displayName || 'ReactCompositeComponent');\n this.state = initialState;\n });\n Constructor.prototype = new ReactClassComponent();\n Constructor.prototype.constructor = Constructor;\n Constructor.prototype.__reactAutoBindPairs = [];\n injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor));\n mixSpecIntoComponent(Constructor, IsMountedPreMixin);\n mixSpecIntoComponent(Constructor, spec);\n mixSpecIntoComponent(Constructor, IsMountedPostMixin);\n\n // Initialize the defaultProps property after all mixins have been merged.\n if (Constructor.getDefaultProps) {\n Constructor.defaultProps = Constructor.getDefaultProps();\n }\n if (process.env.NODE_ENV !== 'production') {\n // This is a tag to indicate that the use of these method names is ok,\n // since it's used with createClass. If it's not, then it's likely a\n // mistake so we'll warn you to use the static property, property\n // initializer or constructor respectively.\n if (Constructor.getDefaultProps) {\n Constructor.getDefaultProps.isReactClassApproved = {};\n }\n if (Constructor.prototype.getInitialState) {\n Constructor.prototype.getInitialState.isReactClassApproved = {};\n }\n }\n _invariant(Constructor.prototype.render, 'createClass(...): Class specification must implement a `render` method.');\n if (process.env.NODE_ENV !== 'production') {\n warning(!Constructor.prototype.componentShouldUpdate, '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', spec.displayName || 'A component');\n warning(!Constructor.prototype.componentWillRecieveProps, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', spec.displayName || 'A component');\n warning(!Constructor.prototype.UNSAFE_componentWillRecieveProps, '%s has a method called UNSAFE_componentWillRecieveProps(). ' + 'Did you mean UNSAFE_componentWillReceiveProps()?', spec.displayName || 'A component');\n }\n\n // Reduce time spent doing lookups by setting these on the prototype.\n for (var methodName in ReactClassInterface) {\n if (!Constructor.prototype[methodName]) {\n Constructor.prototype[methodName] = null;\n }\n }\n return Constructor;\n }\n return createClass;\n}\nmodule.exports = factory;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\nvar _prodInvariant = require('./reactProdInvariant');\nvar ReactElement = require('./ReactElement');\nvar invariant = require('fbjs/lib/invariant');\n\n/**\n * Returns the first child in a collection of children and verifies that there\n * is only one child in the collection.\n *\n * See https://facebook.github.io/react/docs/top-level-api.html#react.children.only\n *\n * The current implementation of this function assumes that a single child gets\n * passed without a wrapper, but the purpose of this helper function is to\n * abstract away the particular structure of children.\n *\n * @param {?object} children Child collection structure.\n * @return {ReactElement} The first and only `ReactElement` contained in the\n * structure.\n */\nfunction onlyChild(children) {\n !ReactElement.isValidElement(children) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'React.Children.only expected to receive a single React element child.') : _prodInvariant('143') : void 0;\n return children;\n}\nmodule.exports = onlyChild;","module.exports = isFunction;\nvar toString = Object.prototype.toString;\nfunction isFunction(fn) {\n if (!fn) {\n return false;\n }\n var string = toString.call(fn);\n return string === '[object Function]' || typeof fn === 'function' && string !== '[object RegExp]' || typeof window !== 'undefined' && (\n // IE8 and below\n fn === window.setTimeout || fn === window.alert || fn === window.confirm || fn === window.prompt);\n}\n;","\"use strict\";\n\nvar window = require('global/window');\nvar httpResponseHandler = function httpResponseHandler(callback, decodeResponseBody) {\n if (decodeResponseBody === void 0) {\n decodeResponseBody = false;\n }\n return function (err, response, responseBody) {\n // if the XHR failed, return that error\n if (err) {\n callback(err);\n return;\n } // if the HTTP status code is 4xx or 5xx, the request also failed\n\n if (response.statusCode >= 400 && response.statusCode <= 599) {\n var cause = responseBody;\n if (decodeResponseBody) {\n if (window.TextDecoder) {\n var charset = getCharset(response.headers && response.headers['content-type']);\n try {\n cause = new TextDecoder(charset).decode(responseBody);\n } catch (e) {}\n } else {\n cause = String.fromCharCode.apply(null, new Uint8Array(responseBody));\n }\n }\n callback({\n cause: cause\n });\n return;\n } // otherwise, request succeeded\n\n callback(null, responseBody);\n };\n};\nfunction getCharset(contentTypeHeader) {\n if (contentTypeHeader === void 0) {\n contentTypeHeader = '';\n }\n return contentTypeHeader.toLowerCase().split(';').reduce(function (charset, contentType) {\n var _contentType$split = contentType.split('='),\n type = _contentType$split[0],\n value = _contentType$split[1];\n if (type.trim() === 'charset') {\n return value.trim();\n }\n return charset;\n }, 'utf-8');\n}\nmodule.exports = httpResponseHandler;","/**\n * Copyright 2013 vtt.js Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */\n/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */\nvar document = require('global/document');\nvar _objCreate = Object.create || function () {\n function F() {}\n return function (o) {\n if (arguments.length !== 1) {\n throw new Error('Object.create shim only accepts one parameter.');\n }\n F.prototype = o;\n return new F();\n };\n}();\n\n// Creates a new ParserError object from an errorData object. The errorData\n// object should have default code and message properties. The default message\n// property can be overriden by passing in a message parameter.\n// See ParsingError.Errors below for acceptable errors.\nfunction ParsingError(errorData, message) {\n this.name = \"ParsingError\";\n this.code = errorData.code;\n this.message = message || errorData.message;\n}\nParsingError.prototype = _objCreate(Error.prototype);\nParsingError.prototype.constructor = ParsingError;\n\n// ParsingError metadata for acceptable ParsingErrors.\nParsingError.Errors = {\n BadSignature: {\n code: 0,\n message: \"Malformed WebVTT signature.\"\n },\n BadTimeStamp: {\n code: 1,\n message: \"Malformed time stamp.\"\n }\n};\n\n// Try to parse input as a time stamp.\nfunction parseTimeStamp(input) {\n function computeSeconds(h, m, s, f) {\n return (h | 0) * 3600 + (m | 0) * 60 + (s | 0) + (f | 0) / 1000;\n }\n var m = input.match(/^(\\d+):(\\d{1,2})(:\\d{1,2})?\\.(\\d{3})/);\n if (!m) {\n return null;\n }\n if (m[3]) {\n // Timestamp takes the form of [hours]:[minutes]:[seconds].[milliseconds]\n return computeSeconds(m[1], m[2], m[3].replace(\":\", \"\"), m[4]);\n } else if (m[1] > 59) {\n // Timestamp takes the form of [hours]:[minutes].[milliseconds]\n // First position is hours as it's over 59.\n return computeSeconds(m[1], m[2], 0, m[4]);\n } else {\n // Timestamp takes the form of [minutes]:[seconds].[milliseconds]\n return computeSeconds(0, m[1], m[2], m[4]);\n }\n}\n\n// A settings object holds key/value pairs and will ignore anything but the first\n// assignment to a specific key.\nfunction Settings() {\n this.values = _objCreate(null);\n}\nSettings.prototype = {\n // Only accept the first assignment to any key.\n set: function set(k, v) {\n if (!this.get(k) && v !== \"\") {\n this.values[k] = v;\n }\n },\n // Return the value for a key, or a default value.\n // If 'defaultKey' is passed then 'dflt' is assumed to be an object with\n // a number of possible default values as properties where 'defaultKey' is\n // the key of the property that will be chosen; otherwise it's assumed to be\n // a single value.\n get: function get(k, dflt, defaultKey) {\n if (defaultKey) {\n return this.has(k) ? this.values[k] : dflt[defaultKey];\n }\n return this.has(k) ? this.values[k] : dflt;\n },\n // Check whether we have a value for a key.\n has: function has(k) {\n return k in this.values;\n },\n // Accept a setting if its one of the given alternatives.\n alt: function alt(k, v, a) {\n for (var n = 0; n < a.length; ++n) {\n if (v === a[n]) {\n this.set(k, v);\n break;\n }\n }\n },\n // Accept a setting if its a valid (signed) integer.\n integer: function integer(k, v) {\n if (/^-?\\d+$/.test(v)) {\n // integer\n this.set(k, parseInt(v, 10));\n }\n },\n // Accept a setting if its a valid percentage.\n percent: function percent(k, v) {\n var m;\n if (m = v.match(/^([\\d]{1,3})(\\.[\\d]*)?%$/)) {\n v = parseFloat(v);\n if (v >= 0 && v <= 100) {\n this.set(k, v);\n return true;\n }\n }\n return false;\n }\n};\n\n// Helper function to parse input into groups separated by 'groupDelim', and\n// interprete each group as a key/value pair separated by 'keyValueDelim'.\nfunction parseOptions(input, callback, keyValueDelim, groupDelim) {\n var groups = groupDelim ? input.split(groupDelim) : [input];\n for (var i in groups) {\n if (typeof groups[i] !== \"string\") {\n continue;\n }\n var kv = groups[i].split(keyValueDelim);\n if (kv.length !== 2) {\n continue;\n }\n var k = kv[0].trim();\n var v = kv[1].trim();\n callback(k, v);\n }\n}\nfunction parseCue(input, cue, regionList) {\n // Remember the original input if we need to throw an error.\n var oInput = input;\n // 4.1 WebVTT timestamp\n function consumeTimeStamp() {\n var ts = parseTimeStamp(input);\n if (ts === null) {\n throw new ParsingError(ParsingError.Errors.BadTimeStamp, \"Malformed timestamp: \" + oInput);\n }\n // Remove time stamp from input.\n input = input.replace(/^[^\\sa-zA-Z-]+/, \"\");\n return ts;\n }\n\n // 4.4.2 WebVTT cue settings\n function consumeCueSettings(input, cue) {\n var settings = new Settings();\n parseOptions(input, function (k, v) {\n switch (k) {\n case \"region\":\n // Find the last region we parsed with the same region id.\n for (var i = regionList.length - 1; i >= 0; i--) {\n if (regionList[i].id === v) {\n settings.set(k, regionList[i].region);\n break;\n }\n }\n break;\n case \"vertical\":\n settings.alt(k, v, [\"rl\", \"lr\"]);\n break;\n case \"line\":\n var vals = v.split(\",\"),\n vals0 = vals[0];\n settings.integer(k, vals0);\n settings.percent(k, vals0) ? settings.set(\"snapToLines\", false) : null;\n settings.alt(k, vals0, [\"auto\"]);\n if (vals.length === 2) {\n settings.alt(\"lineAlign\", vals[1], [\"start\", \"center\", \"end\"]);\n }\n break;\n case \"position\":\n vals = v.split(\",\");\n settings.percent(k, vals[0]);\n if (vals.length === 2) {\n settings.alt(\"positionAlign\", vals[1], [\"start\", \"center\", \"end\"]);\n }\n break;\n case \"size\":\n settings.percent(k, v);\n break;\n case \"align\":\n settings.alt(k, v, [\"start\", \"center\", \"end\", \"left\", \"right\"]);\n break;\n }\n }, /:/, /\\s/);\n\n // Apply default values for any missing fields.\n cue.region = settings.get(\"region\", null);\n cue.vertical = settings.get(\"vertical\", \"\");\n try {\n cue.line = settings.get(\"line\", \"auto\");\n } catch (e) {}\n cue.lineAlign = settings.get(\"lineAlign\", \"start\");\n cue.snapToLines = settings.get(\"snapToLines\", true);\n cue.size = settings.get(\"size\", 100);\n // Safari still uses the old middle value and won't accept center\n try {\n cue.align = settings.get(\"align\", \"center\");\n } catch (e) {\n cue.align = settings.get(\"align\", \"middle\");\n }\n try {\n cue.position = settings.get(\"position\", \"auto\");\n } catch (e) {\n cue.position = settings.get(\"position\", {\n start: 0,\n left: 0,\n center: 50,\n middle: 50,\n end: 100,\n right: 100\n }, cue.align);\n }\n cue.positionAlign = settings.get(\"positionAlign\", {\n start: \"start\",\n left: \"start\",\n center: \"center\",\n middle: \"center\",\n end: \"end\",\n right: \"end\"\n }, cue.align);\n }\n function skipWhitespace() {\n input = input.replace(/^\\s+/, \"\");\n }\n\n // 4.1 WebVTT cue timings.\n skipWhitespace();\n cue.startTime = consumeTimeStamp(); // (1) collect cue start time\n skipWhitespace();\n if (input.substr(0, 3) !== \"-->\") {\n // (3) next characters must match \"-->\"\n throw new ParsingError(ParsingError.Errors.BadTimeStamp, \"Malformed time stamp (time stamps must be separated by '-->'): \" + oInput);\n }\n input = input.substr(3);\n skipWhitespace();\n cue.endTime = consumeTimeStamp(); // (5) collect cue end time\n\n // 4.1 WebVTT cue settings list.\n skipWhitespace();\n consumeCueSettings(input, cue);\n}\n\n// When evaluating this file as part of a Webpack bundle for server\n// side rendering, `document` is an empty object.\nvar TEXTAREA_ELEMENT = document.createElement && document.createElement(\"textarea\");\nvar TAG_NAME = {\n c: \"span\",\n i: \"i\",\n b: \"b\",\n u: \"u\",\n ruby: \"ruby\",\n rt: \"rt\",\n v: \"span\",\n lang: \"span\"\n};\n\n// 5.1 default text color\n// 5.2 default text background color is equivalent to text color with bg_ prefix\nvar DEFAULT_COLOR_CLASS = {\n white: 'rgba(255,255,255,1)',\n lime: 'rgba(0,255,0,1)',\n cyan: 'rgba(0,255,255,1)',\n red: 'rgba(255,0,0,1)',\n yellow: 'rgba(255,255,0,1)',\n magenta: 'rgba(255,0,255,1)',\n blue: 'rgba(0,0,255,1)',\n black: 'rgba(0,0,0,1)'\n};\nvar TAG_ANNOTATION = {\n v: \"title\",\n lang: \"lang\"\n};\nvar NEEDS_PARENT = {\n rt: \"ruby\"\n};\n\n// Parse content into a document fragment.\nfunction parseContent(window, input) {\n function nextToken() {\n // Check for end-of-string.\n if (!input) {\n return null;\n }\n\n // Consume 'n' characters from the input.\n function consume(result) {\n input = input.substr(result.length);\n return result;\n }\n var m = input.match(/^([^<]*)(<[^>]*>?)?/);\n // If there is some text before the next tag, return it, otherwise return\n // the tag.\n return consume(m[1] ? m[1] : m[2]);\n }\n function unescape(s) {\n TEXTAREA_ELEMENT.innerHTML = s;\n s = TEXTAREA_ELEMENT.textContent;\n TEXTAREA_ELEMENT.textContent = \"\";\n return s;\n }\n function shouldAdd(current, element) {\n return !NEEDS_PARENT[element.localName] || NEEDS_PARENT[element.localName] === current.localName;\n }\n\n // Create an element for this tag.\n function createElement(type, annotation) {\n var tagName = TAG_NAME[type];\n if (!tagName) {\n return null;\n }\n var element = window.document.createElement(tagName);\n var name = TAG_ANNOTATION[type];\n if (name && annotation) {\n element[name] = annotation.trim();\n }\n return element;\n }\n var rootDiv = window.document.createElement(\"div\"),\n current = rootDiv,\n t,\n tagStack = [];\n while ((t = nextToken()) !== null) {\n if (t[0] === '<') {\n if (t[1] === \"/\") {\n // If the closing tag matches, move back up to the parent node.\n if (tagStack.length && tagStack[tagStack.length - 1] === t.substr(2).replace(\">\", \"\")) {\n tagStack.pop();\n current = current.parentNode;\n }\n // Otherwise just ignore the end tag.\n continue;\n }\n var ts = parseTimeStamp(t.substr(1, t.length - 2));\n var node;\n if (ts) {\n // Timestamps are lead nodes as well.\n node = window.document.createProcessingInstruction(\"timestamp\", ts);\n current.appendChild(node);\n continue;\n }\n var m = t.match(/^<([^.\\s/0-9>]+)(\\.[^\\s\\\\>]+)?([^>\\\\]+)?(\\\\?)>?$/);\n // If we can't parse the tag, skip to the next tag.\n if (!m) {\n continue;\n }\n // Try to construct an element, and ignore the tag if we couldn't.\n node = createElement(m[1], m[3]);\n if (!node) {\n continue;\n }\n // Determine if the tag should be added based on the context of where it\n // is placed in the cuetext.\n if (!shouldAdd(current, node)) {\n continue;\n }\n // Set the class list (as a list of classes, separated by space).\n if (m[2]) {\n var classes = m[2].split('.');\n classes.forEach(function (cl) {\n var bgColor = /^bg_/.test(cl);\n // slice out `bg_` if it's a background color\n var colorName = bgColor ? cl.slice(3) : cl;\n if (DEFAULT_COLOR_CLASS.hasOwnProperty(colorName)) {\n var propName = bgColor ? 'background-color' : 'color';\n var propValue = DEFAULT_COLOR_CLASS[colorName];\n node.style[propName] = propValue;\n }\n });\n node.className = classes.join(' ');\n }\n // Append the node to the current node, and enter the scope of the new\n // node.\n tagStack.push(m[1]);\n current.appendChild(node);\n current = node;\n continue;\n }\n\n // Text nodes are leaf nodes.\n current.appendChild(window.document.createTextNode(unescape(t)));\n }\n return rootDiv;\n}\n\n// This is a list of all the Unicode characters that have a strong\n// right-to-left category. What this means is that these characters are\n// written right-to-left for sure. It was generated by pulling all the strong\n// right-to-left characters out of the Unicode data table. That table can\n// found at: http://www.unicode.org/Public/UNIDATA/UnicodeData.txt\nvar strongRTLRanges = [[0x5be, 0x5be], [0x5c0, 0x5c0], [0x5c3, 0x5c3], [0x5c6, 0x5c6], [0x5d0, 0x5ea], [0x5f0, 0x5f4], [0x608, 0x608], [0x60b, 0x60b], [0x60d, 0x60d], [0x61b, 0x61b], [0x61e, 0x64a], [0x66d, 0x66f], [0x671, 0x6d5], [0x6e5, 0x6e6], [0x6ee, 0x6ef], [0x6fa, 0x70d], [0x70f, 0x710], [0x712, 0x72f], [0x74d, 0x7a5], [0x7b1, 0x7b1], [0x7c0, 0x7ea], [0x7f4, 0x7f5], [0x7fa, 0x7fa], [0x800, 0x815], [0x81a, 0x81a], [0x824, 0x824], [0x828, 0x828], [0x830, 0x83e], [0x840, 0x858], [0x85e, 0x85e], [0x8a0, 0x8a0], [0x8a2, 0x8ac], [0x200f, 0x200f], [0xfb1d, 0xfb1d], [0xfb1f, 0xfb28], [0xfb2a, 0xfb36], [0xfb38, 0xfb3c], [0xfb3e, 0xfb3e], [0xfb40, 0xfb41], [0xfb43, 0xfb44], [0xfb46, 0xfbc1], [0xfbd3, 0xfd3d], [0xfd50, 0xfd8f], [0xfd92, 0xfdc7], [0xfdf0, 0xfdfc], [0xfe70, 0xfe74], [0xfe76, 0xfefc], [0x10800, 0x10805], [0x10808, 0x10808], [0x1080a, 0x10835], [0x10837, 0x10838], [0x1083c, 0x1083c], [0x1083f, 0x10855], [0x10857, 0x1085f], [0x10900, 0x1091b], [0x10920, 0x10939], [0x1093f, 0x1093f], [0x10980, 0x109b7], [0x109be, 0x109bf], [0x10a00, 0x10a00], [0x10a10, 0x10a13], [0x10a15, 0x10a17], [0x10a19, 0x10a33], [0x10a40, 0x10a47], [0x10a50, 0x10a58], [0x10a60, 0x10a7f], [0x10b00, 0x10b35], [0x10b40, 0x10b55], [0x10b58, 0x10b72], [0x10b78, 0x10b7f], [0x10c00, 0x10c48], [0x1ee00, 0x1ee03], [0x1ee05, 0x1ee1f], [0x1ee21, 0x1ee22], [0x1ee24, 0x1ee24], [0x1ee27, 0x1ee27], [0x1ee29, 0x1ee32], [0x1ee34, 0x1ee37], [0x1ee39, 0x1ee39], [0x1ee3b, 0x1ee3b], [0x1ee42, 0x1ee42], [0x1ee47, 0x1ee47], [0x1ee49, 0x1ee49], [0x1ee4b, 0x1ee4b], [0x1ee4d, 0x1ee4f], [0x1ee51, 0x1ee52], [0x1ee54, 0x1ee54], [0x1ee57, 0x1ee57], [0x1ee59, 0x1ee59], [0x1ee5b, 0x1ee5b], [0x1ee5d, 0x1ee5d], [0x1ee5f, 0x1ee5f], [0x1ee61, 0x1ee62], [0x1ee64, 0x1ee64], [0x1ee67, 0x1ee6a], [0x1ee6c, 0x1ee72], [0x1ee74, 0x1ee77], [0x1ee79, 0x1ee7c], [0x1ee7e, 0x1ee7e], [0x1ee80, 0x1ee89], [0x1ee8b, 0x1ee9b], [0x1eea1, 0x1eea3], [0x1eea5, 0x1eea9], [0x1eeab, 0x1eebb], [0x10fffd, 0x10fffd]];\nfunction isStrongRTLChar(charCode) {\n for (var i = 0; i < strongRTLRanges.length; i++) {\n var currentRange = strongRTLRanges[i];\n if (charCode >= currentRange[0] && charCode <= currentRange[1]) {\n return true;\n }\n }\n return false;\n}\nfunction determineBidi(cueDiv) {\n var nodeStack = [],\n text = \"\",\n charCode;\n if (!cueDiv || !cueDiv.childNodes) {\n return \"ltr\";\n }\n function pushNodes(nodeStack, node) {\n for (var i = node.childNodes.length - 1; i >= 0; i--) {\n nodeStack.push(node.childNodes[i]);\n }\n }\n function nextTextNode(nodeStack) {\n if (!nodeStack || !nodeStack.length) {\n return null;\n }\n var node = nodeStack.pop(),\n text = node.textContent || node.innerText;\n if (text) {\n // TODO: This should match all unicode type B characters (paragraph\n // separator characters). See issue #115.\n var m = text.match(/^.*(\\n|\\r)/);\n if (m) {\n nodeStack.length = 0;\n return m[0];\n }\n return text;\n }\n if (node.tagName === \"ruby\") {\n return nextTextNode(nodeStack);\n }\n if (node.childNodes) {\n pushNodes(nodeStack, node);\n return nextTextNode(nodeStack);\n }\n }\n pushNodes(nodeStack, cueDiv);\n while (text = nextTextNode(nodeStack)) {\n for (var i = 0; i < text.length; i++) {\n charCode = text.charCodeAt(i);\n if (isStrongRTLChar(charCode)) {\n return \"rtl\";\n }\n }\n }\n return \"ltr\";\n}\nfunction computeLinePos(cue) {\n if (typeof cue.line === \"number\" && (cue.snapToLines || cue.line >= 0 && cue.line <= 100)) {\n return cue.line;\n }\n if (!cue.track || !cue.track.textTrackList || !cue.track.textTrackList.mediaElement) {\n return -1;\n }\n var track = cue.track,\n trackList = track.textTrackList,\n count = 0;\n for (var i = 0; i < trackList.length && trackList[i] !== track; i++) {\n if (trackList[i].mode === \"showing\") {\n count++;\n }\n }\n return ++count * -1;\n}\nfunction StyleBox() {}\n\n// Apply styles to a div. If there is no div passed then it defaults to the\n// div on 'this'.\nStyleBox.prototype.applyStyles = function (styles, div) {\n div = div || this.div;\n for (var prop in styles) {\n if (styles.hasOwnProperty(prop)) {\n div.style[prop] = styles[prop];\n }\n }\n};\nStyleBox.prototype.formatStyle = function (val, unit) {\n return val === 0 ? 0 : val + unit;\n};\n\n// Constructs the computed display state of the cue (a div). Places the div\n// into the overlay which should be a block level element (usually a div).\nfunction CueStyleBox(window, cue, styleOptions) {\n StyleBox.call(this);\n this.cue = cue;\n\n // Parse our cue's text into a DOM tree rooted at 'cueDiv'. This div will\n // have inline positioning and will function as the cue background box.\n this.cueDiv = parseContent(window, cue.text);\n var styles = {\n color: \"rgba(255, 255, 255, 1)\",\n backgroundColor: \"rgba(0, 0, 0, 0.8)\",\n position: \"relative\",\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n display: \"inline\",\n writingMode: cue.vertical === \"\" ? \"horizontal-tb\" : cue.vertical === \"lr\" ? \"vertical-lr\" : \"vertical-rl\",\n unicodeBidi: \"plaintext\"\n };\n this.applyStyles(styles, this.cueDiv);\n\n // Create an absolutely positioned div that will be used to position the cue\n // div. Note, all WebVTT cue-setting alignments are equivalent to the CSS\n // mirrors of them except middle instead of center on Safari.\n this.div = window.document.createElement(\"div\");\n styles = {\n direction: determineBidi(this.cueDiv),\n writingMode: cue.vertical === \"\" ? \"horizontal-tb\" : cue.vertical === \"lr\" ? \"vertical-lr\" : \"vertical-rl\",\n unicodeBidi: \"plaintext\",\n textAlign: cue.align === \"middle\" ? \"center\" : cue.align,\n font: styleOptions.font,\n whiteSpace: \"pre-line\",\n position: \"absolute\"\n };\n this.applyStyles(styles);\n this.div.appendChild(this.cueDiv);\n\n // Calculate the distance from the reference edge of the viewport to the text\n // position of the cue box. The reference edge will be resolved later when\n // the box orientation styles are applied.\n var textPos = 0;\n switch (cue.positionAlign) {\n case \"start\":\n case \"line-left\":\n textPos = cue.position;\n break;\n case \"center\":\n textPos = cue.position - cue.size / 2;\n break;\n case \"end\":\n case \"line-right\":\n textPos = cue.position - cue.size;\n break;\n }\n\n // Horizontal box orientation; textPos is the distance from the left edge of the\n // area to the left edge of the box and cue.size is the distance extending to\n // the right from there.\n if (cue.vertical === \"\") {\n this.applyStyles({\n left: this.formatStyle(textPos, \"%\"),\n width: this.formatStyle(cue.size, \"%\")\n });\n // Vertical box orientation; textPos is the distance from the top edge of the\n // area to the top edge of the box and cue.size is the height extending\n // downwards from there.\n } else {\n this.applyStyles({\n top: this.formatStyle(textPos, \"%\"),\n height: this.formatStyle(cue.size, \"%\")\n });\n }\n this.move = function (box) {\n this.applyStyles({\n top: this.formatStyle(box.top, \"px\"),\n bottom: this.formatStyle(box.bottom, \"px\"),\n left: this.formatStyle(box.left, \"px\"),\n right: this.formatStyle(box.right, \"px\"),\n height: this.formatStyle(box.height, \"px\"),\n width: this.formatStyle(box.width, \"px\")\n });\n };\n}\nCueStyleBox.prototype = _objCreate(StyleBox.prototype);\nCueStyleBox.prototype.constructor = CueStyleBox;\n\n// Represents the co-ordinates of an Element in a way that we can easily\n// compute things with such as if it overlaps or intersects with another Element.\n// Can initialize it with either a StyleBox or another BoxPosition.\nfunction BoxPosition(obj) {\n // Either a BoxPosition was passed in and we need to copy it, or a StyleBox\n // was passed in and we need to copy the results of 'getBoundingClientRect'\n // as the object returned is readonly. All co-ordinate values are in reference\n // to the viewport origin (top left).\n var lh, height, width, top;\n if (obj.div) {\n height = obj.div.offsetHeight;\n width = obj.div.offsetWidth;\n top = obj.div.offsetTop;\n var rects = (rects = obj.div.childNodes) && (rects = rects[0]) && rects.getClientRects && rects.getClientRects();\n obj = obj.div.getBoundingClientRect();\n // In certain cases the outter div will be slightly larger then the sum of\n // the inner div's lines. This could be due to bold text, etc, on some platforms.\n // In this case we should get the average line height and use that. This will\n // result in the desired behaviour.\n lh = rects ? Math.max(rects[0] && rects[0].height || 0, obj.height / rects.length) : 0;\n }\n this.left = obj.left;\n this.right = obj.right;\n this.top = obj.top || top;\n this.height = obj.height || height;\n this.bottom = obj.bottom || top + (obj.height || height);\n this.width = obj.width || width;\n this.lineHeight = lh !== undefined ? lh : obj.lineHeight;\n}\n\n// Move the box along a particular axis. Optionally pass in an amount to move\n// the box. If no amount is passed then the default is the line height of the\n// box.\nBoxPosition.prototype.move = function (axis, toMove) {\n toMove = toMove !== undefined ? toMove : this.lineHeight;\n switch (axis) {\n case \"+x\":\n this.left += toMove;\n this.right += toMove;\n break;\n case \"-x\":\n this.left -= toMove;\n this.right -= toMove;\n break;\n case \"+y\":\n this.top += toMove;\n this.bottom += toMove;\n break;\n case \"-y\":\n this.top -= toMove;\n this.bottom -= toMove;\n break;\n }\n};\n\n// Check if this box overlaps another box, b2.\nBoxPosition.prototype.overlaps = function (b2) {\n return this.left < b2.right && this.right > b2.left && this.top < b2.bottom && this.bottom > b2.top;\n};\n\n// Check if this box overlaps any other boxes in boxes.\nBoxPosition.prototype.overlapsAny = function (boxes) {\n for (var i = 0; i < boxes.length; i++) {\n if (this.overlaps(boxes[i])) {\n return true;\n }\n }\n return false;\n};\n\n// Check if this box is within another box.\nBoxPosition.prototype.within = function (container) {\n return this.top >= container.top && this.bottom <= container.bottom && this.left >= container.left && this.right <= container.right;\n};\n\n// Check if this box is entirely within the container or it is overlapping\n// on the edge opposite of the axis direction passed. For example, if \"+x\" is\n// passed and the box is overlapping on the left edge of the container, then\n// return true.\nBoxPosition.prototype.overlapsOppositeAxis = function (container, axis) {\n switch (axis) {\n case \"+x\":\n return this.left < container.left;\n case \"-x\":\n return this.right > container.right;\n case \"+y\":\n return this.top < container.top;\n case \"-y\":\n return this.bottom > container.bottom;\n }\n};\n\n// Find the percentage of the area that this box is overlapping with another\n// box.\nBoxPosition.prototype.intersectPercentage = function (b2) {\n var x = Math.max(0, Math.min(this.right, b2.right) - Math.max(this.left, b2.left)),\n y = Math.max(0, Math.min(this.bottom, b2.bottom) - Math.max(this.top, b2.top)),\n intersectArea = x * y;\n return intersectArea / (this.height * this.width);\n};\n\n// Convert the positions from this box to CSS compatible positions using\n// the reference container's positions. This has to be done because this\n// box's positions are in reference to the viewport origin, whereas, CSS\n// values are in referecne to their respective edges.\nBoxPosition.prototype.toCSSCompatValues = function (reference) {\n return {\n top: this.top - reference.top,\n bottom: reference.bottom - this.bottom,\n left: this.left - reference.left,\n right: reference.right - this.right,\n height: this.height,\n width: this.width\n };\n};\n\n// Get an object that represents the box's position without anything extra.\n// Can pass a StyleBox, HTMLElement, or another BoxPositon.\nBoxPosition.getSimpleBoxPosition = function (obj) {\n var height = obj.div ? obj.div.offsetHeight : obj.tagName ? obj.offsetHeight : 0;\n var width = obj.div ? obj.div.offsetWidth : obj.tagName ? obj.offsetWidth : 0;\n var top = obj.div ? obj.div.offsetTop : obj.tagName ? obj.offsetTop : 0;\n obj = obj.div ? obj.div.getBoundingClientRect() : obj.tagName ? obj.getBoundingClientRect() : obj;\n var ret = {\n left: obj.left,\n right: obj.right,\n top: obj.top || top,\n height: obj.height || height,\n bottom: obj.bottom || top + (obj.height || height),\n width: obj.width || width\n };\n return ret;\n};\n\n// Move a StyleBox to its specified, or next best, position. The containerBox\n// is the box that contains the StyleBox, such as a div. boxPositions are\n// a list of other boxes that the styleBox can't overlap with.\nfunction moveBoxToLinePosition(window, styleBox, containerBox, boxPositions) {\n // Find the best position for a cue box, b, on the video. The axis parameter\n // is a list of axis, the order of which, it will move the box along. For example:\n // Passing [\"+x\", \"-x\"] will move the box first along the x axis in the positive\n // direction. If it doesn't find a good position for it there it will then move\n // it along the x axis in the negative direction.\n function findBestPosition(b, axis) {\n var bestPosition,\n specifiedPosition = new BoxPosition(b),\n percentage = 1; // Highest possible so the first thing we get is better.\n\n for (var i = 0; i < axis.length; i++) {\n while (b.overlapsOppositeAxis(containerBox, axis[i]) || b.within(containerBox) && b.overlapsAny(boxPositions)) {\n b.move(axis[i]);\n }\n // We found a spot where we aren't overlapping anything. This is our\n // best position.\n if (b.within(containerBox)) {\n return b;\n }\n var p = b.intersectPercentage(containerBox);\n // If we're outside the container box less then we were on our last try\n // then remember this position as the best position.\n if (percentage > p) {\n bestPosition = new BoxPosition(b);\n percentage = p;\n }\n // Reset the box position to the specified position.\n b = new BoxPosition(specifiedPosition);\n }\n return bestPosition || specifiedPosition;\n }\n var boxPosition = new BoxPosition(styleBox),\n cue = styleBox.cue,\n linePos = computeLinePos(cue),\n axis = [];\n\n // If we have a line number to align the cue to.\n if (cue.snapToLines) {\n var size;\n switch (cue.vertical) {\n case \"\":\n axis = [\"+y\", \"-y\"];\n size = \"height\";\n break;\n case \"rl\":\n axis = [\"+x\", \"-x\"];\n size = \"width\";\n break;\n case \"lr\":\n axis = [\"-x\", \"+x\"];\n size = \"width\";\n break;\n }\n var step = boxPosition.lineHeight,\n position = step * Math.round(linePos),\n maxPosition = containerBox[size] + step,\n initialAxis = axis[0];\n\n // If the specified intial position is greater then the max position then\n // clamp the box to the amount of steps it would take for the box to\n // reach the max position.\n if (Math.abs(position) > maxPosition) {\n position = position < 0 ? -1 : 1;\n position *= Math.ceil(maxPosition / step) * step;\n }\n\n // If computed line position returns negative then line numbers are\n // relative to the bottom of the video instead of the top. Therefore, we\n // need to increase our initial position by the length or width of the\n // video, depending on the writing direction, and reverse our axis directions.\n if (linePos < 0) {\n position += cue.vertical === \"\" ? containerBox.height : containerBox.width;\n axis = axis.reverse();\n }\n\n // Move the box to the specified position. This may not be its best\n // position.\n boxPosition.move(initialAxis, position);\n } else {\n // If we have a percentage line value for the cue.\n var calculatedPercentage = boxPosition.lineHeight / containerBox.height * 100;\n switch (cue.lineAlign) {\n case \"center\":\n linePos -= calculatedPercentage / 2;\n break;\n case \"end\":\n linePos -= calculatedPercentage;\n break;\n }\n\n // Apply initial line position to the cue box.\n switch (cue.vertical) {\n case \"\":\n styleBox.applyStyles({\n top: styleBox.formatStyle(linePos, \"%\")\n });\n break;\n case \"rl\":\n styleBox.applyStyles({\n left: styleBox.formatStyle(linePos, \"%\")\n });\n break;\n case \"lr\":\n styleBox.applyStyles({\n right: styleBox.formatStyle(linePos, \"%\")\n });\n break;\n }\n axis = [\"+y\", \"-x\", \"+x\", \"-y\"];\n\n // Get the box position again after we've applied the specified positioning\n // to it.\n boxPosition = new BoxPosition(styleBox);\n }\n var bestPosition = findBestPosition(boxPosition, axis);\n styleBox.move(bestPosition.toCSSCompatValues(containerBox));\n}\nfunction WebVTT() {\n // Nothing\n}\n\n// Helper to allow strings to be decoded instead of the default binary utf8 data.\nWebVTT.StringDecoder = function () {\n return {\n decode: function decode(data) {\n if (!data) {\n return \"\";\n }\n if (typeof data !== \"string\") {\n throw new Error(\"Error - expected string data.\");\n }\n return decodeURIComponent(encodeURIComponent(data));\n }\n };\n};\nWebVTT.convertCueToDOMTree = function (window, cuetext) {\n if (!window || !cuetext) {\n return null;\n }\n return parseContent(window, cuetext);\n};\nvar FONT_SIZE_PERCENT = 0.05;\nvar FONT_STYLE = \"sans-serif\";\nvar CUE_BACKGROUND_PADDING = \"1.5%\";\n\n// Runs the processing model over the cues and regions passed to it.\n// @param overlay A block level element (usually a div) that the computed cues\n// and regions will be placed into.\nWebVTT.processCues = function (window, cues, overlay) {\n if (!window || !cues || !overlay) {\n return null;\n }\n\n // Remove all previous children.\n while (overlay.firstChild) {\n overlay.removeChild(overlay.firstChild);\n }\n var paddedOverlay = window.document.createElement(\"div\");\n paddedOverlay.style.position = \"absolute\";\n paddedOverlay.style.left = \"0\";\n paddedOverlay.style.right = \"0\";\n paddedOverlay.style.top = \"0\";\n paddedOverlay.style.bottom = \"0\";\n paddedOverlay.style.margin = CUE_BACKGROUND_PADDING;\n overlay.appendChild(paddedOverlay);\n\n // Determine if we need to compute the display states of the cues. This could\n // be the case if a cue's state has been changed since the last computation or\n // if it has not been computed yet.\n function shouldCompute(cues) {\n for (var i = 0; i < cues.length; i++) {\n if (cues[i].hasBeenReset || !cues[i].displayState) {\n return true;\n }\n }\n return false;\n }\n\n // We don't need to recompute the cues' display states. Just reuse them.\n if (!shouldCompute(cues)) {\n for (var i = 0; i < cues.length; i++) {\n paddedOverlay.appendChild(cues[i].displayState);\n }\n return;\n }\n var boxPositions = [],\n containerBox = BoxPosition.getSimpleBoxPosition(paddedOverlay),\n fontSize = Math.round(containerBox.height * FONT_SIZE_PERCENT * 100) / 100;\n var styleOptions = {\n font: fontSize + \"px \" + FONT_STYLE\n };\n (function () {\n var styleBox, cue;\n for (var i = 0; i < cues.length; i++) {\n cue = cues[i];\n\n // Compute the intial position and styles of the cue div.\n styleBox = new CueStyleBox(window, cue, styleOptions);\n paddedOverlay.appendChild(styleBox.div);\n\n // Move the cue div to it's correct line position.\n moveBoxToLinePosition(window, styleBox, containerBox, boxPositions);\n\n // Remember the computed div so that we don't have to recompute it later\n // if we don't have too.\n cue.displayState = styleBox.div;\n boxPositions.push(BoxPosition.getSimpleBoxPosition(styleBox));\n }\n })();\n};\nWebVTT.Parser = function (window, vttjs, decoder) {\n if (!decoder) {\n decoder = vttjs;\n vttjs = {};\n }\n if (!vttjs) {\n vttjs = {};\n }\n this.window = window;\n this.vttjs = vttjs;\n this.state = \"INITIAL\";\n this.buffer = \"\";\n this.decoder = decoder || new TextDecoder(\"utf8\");\n this.regionList = [];\n};\nWebVTT.Parser.prototype = {\n // If the error is a ParsingError then report it to the consumer if\n // possible. If it's not a ParsingError then throw it like normal.\n reportOrThrowError: function reportOrThrowError(e) {\n if (e instanceof ParsingError) {\n this.onparsingerror && this.onparsingerror(e);\n } else {\n throw e;\n }\n },\n parse: function parse(data) {\n var self = this;\n\n // If there is no data then we won't decode it, but will just try to parse\n // whatever is in buffer already. This may occur in circumstances, for\n // example when flush() is called.\n if (data) {\n // Try to decode the data that we received.\n self.buffer += self.decoder.decode(data, {\n stream: true\n });\n }\n function collectNextLine() {\n var buffer = self.buffer;\n var pos = 0;\n while (pos < buffer.length && buffer[pos] !== '\\r' && buffer[pos] !== '\\n') {\n ++pos;\n }\n var line = buffer.substr(0, pos);\n // Advance the buffer early in case we fail below.\n if (buffer[pos] === '\\r') {\n ++pos;\n }\n if (buffer[pos] === '\\n') {\n ++pos;\n }\n self.buffer = buffer.substr(pos);\n return line;\n }\n\n // 3.4 WebVTT region and WebVTT region settings syntax\n function parseRegion(input) {\n var settings = new Settings();\n parseOptions(input, function (k, v) {\n switch (k) {\n case \"id\":\n settings.set(k, v);\n break;\n case \"width\":\n settings.percent(k, v);\n break;\n case \"lines\":\n settings.integer(k, v);\n break;\n case \"regionanchor\":\n case \"viewportanchor\":\n var xy = v.split(',');\n if (xy.length !== 2) {\n break;\n }\n // We have to make sure both x and y parse, so use a temporary\n // settings object here.\n var anchor = new Settings();\n anchor.percent(\"x\", xy[0]);\n anchor.percent(\"y\", xy[1]);\n if (!anchor.has(\"x\") || !anchor.has(\"y\")) {\n break;\n }\n settings.set(k + \"X\", anchor.get(\"x\"));\n settings.set(k + \"Y\", anchor.get(\"y\"));\n break;\n case \"scroll\":\n settings.alt(k, v, [\"up\"]);\n break;\n }\n }, /=/, /\\s/);\n\n // Create the region, using default values for any values that were not\n // specified.\n if (settings.has(\"id\")) {\n var region = new (self.vttjs.VTTRegion || self.window.VTTRegion)();\n region.width = settings.get(\"width\", 100);\n region.lines = settings.get(\"lines\", 3);\n region.regionAnchorX = settings.get(\"regionanchorX\", 0);\n region.regionAnchorY = settings.get(\"regionanchorY\", 100);\n region.viewportAnchorX = settings.get(\"viewportanchorX\", 0);\n region.viewportAnchorY = settings.get(\"viewportanchorY\", 100);\n region.scroll = settings.get(\"scroll\", \"\");\n // Register the region.\n self.onregion && self.onregion(region);\n // Remember the VTTRegion for later in case we parse any VTTCues that\n // reference it.\n self.regionList.push({\n id: settings.get(\"id\"),\n region: region\n });\n }\n }\n\n // draft-pantos-http-live-streaming-20\n // https://tools.ietf.org/html/draft-pantos-http-live-streaming-20#section-3.5\n // 3.5 WebVTT\n function parseTimestampMap(input) {\n var settings = new Settings();\n parseOptions(input, function (k, v) {\n switch (k) {\n case \"MPEGT\":\n settings.integer(k + 'S', v);\n break;\n case \"LOCA\":\n settings.set(k + 'L', parseTimeStamp(v));\n break;\n }\n }, /[^\\d]:/, /,/);\n self.ontimestampmap && self.ontimestampmap({\n \"MPEGTS\": settings.get(\"MPEGTS\"),\n \"LOCAL\": settings.get(\"LOCAL\")\n });\n }\n\n // 3.2 WebVTT metadata header syntax\n function parseHeader(input) {\n if (input.match(/X-TIMESTAMP-MAP/)) {\n // This line contains HLS X-TIMESTAMP-MAP metadata\n parseOptions(input, function (k, v) {\n switch (k) {\n case \"X-TIMESTAMP-MAP\":\n parseTimestampMap(v);\n break;\n }\n }, /=/);\n } else {\n parseOptions(input, function (k, v) {\n switch (k) {\n case \"Region\":\n // 3.3 WebVTT region metadata header syntax\n parseRegion(v);\n break;\n }\n }, /:/);\n }\n }\n\n // 5.1 WebVTT file parsing.\n try {\n var line;\n if (self.state === \"INITIAL\") {\n // We can't start parsing until we have the first line.\n if (!/\\r\\n|\\n/.test(self.buffer)) {\n return this;\n }\n line = collectNextLine();\n var m = line.match(/^WEBVTT([ \\t].*)?$/);\n if (!m || !m[0]) {\n throw new ParsingError(ParsingError.Errors.BadSignature);\n }\n self.state = \"HEADER\";\n }\n var alreadyCollectedLine = false;\n while (self.buffer) {\n // We can't parse a line until we have the full line.\n if (!/\\r\\n|\\n/.test(self.buffer)) {\n return this;\n }\n if (!alreadyCollectedLine) {\n line = collectNextLine();\n } else {\n alreadyCollectedLine = false;\n }\n switch (self.state) {\n case \"HEADER\":\n // 13-18 - Allow a header (metadata) under the WEBVTT line.\n if (/:/.test(line)) {\n parseHeader(line);\n } else if (!line) {\n // An empty line terminates the header and starts the body (cues).\n self.state = \"ID\";\n }\n continue;\n case \"NOTE\":\n // Ignore NOTE blocks.\n if (!line) {\n self.state = \"ID\";\n }\n continue;\n case \"ID\":\n // Check for the start of NOTE blocks.\n if (/^NOTE($|[ \\t])/.test(line)) {\n self.state = \"NOTE\";\n break;\n }\n // 19-29 - Allow any number of line terminators, then initialize new cue values.\n if (!line) {\n continue;\n }\n self.cue = new (self.vttjs.VTTCue || self.window.VTTCue)(0, 0, \"\");\n // Safari still uses the old middle value and won't accept center\n try {\n self.cue.align = \"center\";\n } catch (e) {\n self.cue.align = \"middle\";\n }\n self.state = \"CUE\";\n // 30-39 - Check if self line contains an optional identifier or timing data.\n if (line.indexOf(\"-->\") === -1) {\n self.cue.id = line;\n continue;\n }\n // Process line as start of a cue.\n /*falls through*/\n case \"CUE\":\n // 40 - Collect cue timings and settings.\n try {\n parseCue(line, self.cue, self.regionList);\n } catch (e) {\n self.reportOrThrowError(e);\n // In case of an error ignore rest of the cue.\n self.cue = null;\n self.state = \"BADCUE\";\n continue;\n }\n self.state = \"CUETEXT\";\n continue;\n case \"CUETEXT\":\n var hasSubstring = line.indexOf(\"-->\") !== -1;\n // 34 - If we have an empty line then report the cue.\n // 35 - If we have the special substring '-->' then report the cue,\n // but do not collect the line as we need to process the current\n // one as a new cue.\n if (!line || hasSubstring && (alreadyCollectedLine = true)) {\n // We are done parsing self cue.\n self.oncue && self.oncue(self.cue);\n self.cue = null;\n self.state = \"ID\";\n continue;\n }\n if (self.cue.text) {\n self.cue.text += \"\\n\";\n }\n self.cue.text += line.replace(/\\u2028/g, '\\n').replace(/u2029/g, '\\n');\n continue;\n case \"BADCUE\":\n // BADCUE\n // 54-62 - Collect and discard the remaining cue.\n if (!line) {\n self.state = \"ID\";\n }\n continue;\n }\n }\n } catch (e) {\n self.reportOrThrowError(e);\n\n // If we are currently parsing a cue, report what we have.\n if (self.state === \"CUETEXT\" && self.cue && self.oncue) {\n self.oncue(self.cue);\n }\n self.cue = null;\n // Enter BADWEBVTT state if header was not parsed correctly otherwise\n // another exception occurred so enter BADCUE state.\n self.state = self.state === \"INITIAL\" ? \"BADWEBVTT\" : \"BADCUE\";\n }\n return this;\n },\n flush: function flush() {\n var self = this;\n try {\n // Finish decoding the stream.\n self.buffer += self.decoder.decode();\n // Synthesize the end of the current cue or region.\n if (self.cue || self.state === \"HEADER\") {\n self.buffer += \"\\n\\n\";\n self.parse();\n }\n // If we've flushed, parsed, and we're still on the INITIAL state then\n // that means we don't have enough of the stream to parse the first\n // line.\n if (self.state === \"INITIAL\") {\n throw new ParsingError(ParsingError.Errors.BadSignature);\n }\n } catch (e) {\n self.reportOrThrowError(e);\n }\n self.onflush && self.onflush();\n return this;\n }\n};\nmodule.exports = WebVTT;","/**\n * Copyright 2013 vtt.js Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar autoKeyword = \"auto\";\nvar directionSetting = {\n \"\": 1,\n \"lr\": 1,\n \"rl\": 1\n};\nvar alignSetting = {\n \"start\": 1,\n \"center\": 1,\n \"end\": 1,\n \"left\": 1,\n \"right\": 1,\n \"auto\": 1,\n \"line-left\": 1,\n \"line-right\": 1\n};\nfunction findDirectionSetting(value) {\n if (typeof value !== \"string\") {\n return false;\n }\n var dir = directionSetting[value.toLowerCase()];\n return dir ? value.toLowerCase() : false;\n}\nfunction findAlignSetting(value) {\n if (typeof value !== \"string\") {\n return false;\n }\n var align = alignSetting[value.toLowerCase()];\n return align ? value.toLowerCase() : false;\n}\nfunction VTTCue(startTime, endTime, text) {\n /**\n * Shim implementation specific properties. These properties are not in\n * the spec.\n */\n\n // Lets us know when the VTTCue's data has changed in such a way that we need\n // to recompute its display state. This lets us compute its display state\n // lazily.\n this.hasBeenReset = false;\n\n /**\n * VTTCue and TextTrackCue properties\n * http://dev.w3.org/html5/webvtt/#vttcue-interface\n */\n\n var _id = \"\";\n var _pauseOnExit = false;\n var _startTime = startTime;\n var _endTime = endTime;\n var _text = text;\n var _region = null;\n var _vertical = \"\";\n var _snapToLines = true;\n var _line = \"auto\";\n var _lineAlign = \"start\";\n var _position = \"auto\";\n var _positionAlign = \"auto\";\n var _size = 100;\n var _align = \"center\";\n Object.defineProperties(this, {\n \"id\": {\n enumerable: true,\n get: function get() {\n return _id;\n },\n set: function set(value) {\n _id = \"\" + value;\n }\n },\n \"pauseOnExit\": {\n enumerable: true,\n get: function get() {\n return _pauseOnExit;\n },\n set: function set(value) {\n _pauseOnExit = !!value;\n }\n },\n \"startTime\": {\n enumerable: true,\n get: function get() {\n return _startTime;\n },\n set: function set(value) {\n if (typeof value !== \"number\") {\n throw new TypeError(\"Start time must be set to a number.\");\n }\n _startTime = value;\n this.hasBeenReset = true;\n }\n },\n \"endTime\": {\n enumerable: true,\n get: function get() {\n return _endTime;\n },\n set: function set(value) {\n if (typeof value !== \"number\") {\n throw new TypeError(\"End time must be set to a number.\");\n }\n _endTime = value;\n this.hasBeenReset = true;\n }\n },\n \"text\": {\n enumerable: true,\n get: function get() {\n return _text;\n },\n set: function set(value) {\n _text = \"\" + value;\n this.hasBeenReset = true;\n }\n },\n \"region\": {\n enumerable: true,\n get: function get() {\n return _region;\n },\n set: function set(value) {\n _region = value;\n this.hasBeenReset = true;\n }\n },\n \"vertical\": {\n enumerable: true,\n get: function get() {\n return _vertical;\n },\n set: function set(value) {\n var setting = findDirectionSetting(value);\n // Have to check for false because the setting an be an empty string.\n if (setting === false) {\n throw new SyntaxError(\"Vertical: an invalid or illegal direction string was specified.\");\n }\n _vertical = setting;\n this.hasBeenReset = true;\n }\n },\n \"snapToLines\": {\n enumerable: true,\n get: function get() {\n return _snapToLines;\n },\n set: function set(value) {\n _snapToLines = !!value;\n this.hasBeenReset = true;\n }\n },\n \"line\": {\n enumerable: true,\n get: function get() {\n return _line;\n },\n set: function set(value) {\n if (typeof value !== \"number\" && value !== autoKeyword) {\n throw new SyntaxError(\"Line: an invalid number or illegal string was specified.\");\n }\n _line = value;\n this.hasBeenReset = true;\n }\n },\n \"lineAlign\": {\n enumerable: true,\n get: function get() {\n return _lineAlign;\n },\n set: function set(value) {\n var setting = findAlignSetting(value);\n if (!setting) {\n console.warn(\"lineAlign: an invalid or illegal string was specified.\");\n } else {\n _lineAlign = setting;\n this.hasBeenReset = true;\n }\n }\n },\n \"position\": {\n enumerable: true,\n get: function get() {\n return _position;\n },\n set: function set(value) {\n if (value < 0 || value > 100) {\n throw new Error(\"Position must be between 0 and 100.\");\n }\n _position = value;\n this.hasBeenReset = true;\n }\n },\n \"positionAlign\": {\n enumerable: true,\n get: function get() {\n return _positionAlign;\n },\n set: function set(value) {\n var setting = findAlignSetting(value);\n if (!setting) {\n console.warn(\"positionAlign: an invalid or illegal string was specified.\");\n } else {\n _positionAlign = setting;\n this.hasBeenReset = true;\n }\n }\n },\n \"size\": {\n enumerable: true,\n get: function get() {\n return _size;\n },\n set: function set(value) {\n if (value < 0 || value > 100) {\n throw new Error(\"Size must be between 0 and 100.\");\n }\n _size = value;\n this.hasBeenReset = true;\n }\n },\n \"align\": {\n enumerable: true,\n get: function get() {\n return _align;\n },\n set: function set(value) {\n var setting = findAlignSetting(value);\n if (!setting) {\n throw new SyntaxError(\"align: an invalid or illegal alignment string was specified.\");\n }\n _align = setting;\n this.hasBeenReset = true;\n }\n }\n });\n\n /**\n * Other <track> spec defined properties\n */\n\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#text-track-cue-display-state\n this.displayState = undefined;\n}\n\n/**\n * VTTCue methods\n */\n\nVTTCue.prototype.getCueAsHTML = function () {\n // Assume WebVTT.convertCueToDOMTree is on the global.\n return WebVTT.convertCueToDOMTree(window, this.text);\n};\nmodule.exports = VTTCue;","/**\n * Copyright 2013 vtt.js Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar scrollSetting = {\n \"\": true,\n \"up\": true\n};\nfunction findScrollSetting(value) {\n if (typeof value !== \"string\") {\n return false;\n }\n var scroll = scrollSetting[value.toLowerCase()];\n return scroll ? value.toLowerCase() : false;\n}\nfunction isValidPercentValue(value) {\n return typeof value === \"number\" && value >= 0 && value <= 100;\n}\n\n// VTTRegion shim http://dev.w3.org/html5/webvtt/#vttregion-interface\nfunction VTTRegion() {\n var _width = 100;\n var _lines = 3;\n var _regionAnchorX = 0;\n var _regionAnchorY = 100;\n var _viewportAnchorX = 0;\n var _viewportAnchorY = 100;\n var _scroll = \"\";\n Object.defineProperties(this, {\n \"width\": {\n enumerable: true,\n get: function get() {\n return _width;\n },\n set: function set(value) {\n if (!isValidPercentValue(value)) {\n throw new Error(\"Width must be between 0 and 100.\");\n }\n _width = value;\n }\n },\n \"lines\": {\n enumerable: true,\n get: function get() {\n return _lines;\n },\n set: function set(value) {\n if (typeof value !== \"number\") {\n throw new TypeError(\"Lines must be set to a number.\");\n }\n _lines = value;\n }\n },\n \"regionAnchorY\": {\n enumerable: true,\n get: function get() {\n return _regionAnchorY;\n },\n set: function set(value) {\n if (!isValidPercentValue(value)) {\n throw new Error(\"RegionAnchorX must be between 0 and 100.\");\n }\n _regionAnchorY = value;\n }\n },\n \"regionAnchorX\": {\n enumerable: true,\n get: function get() {\n return _regionAnchorX;\n },\n set: function set(value) {\n if (!isValidPercentValue(value)) {\n throw new Error(\"RegionAnchorY must be between 0 and 100.\");\n }\n _regionAnchorX = value;\n }\n },\n \"viewportAnchorY\": {\n enumerable: true,\n get: function get() {\n return _viewportAnchorY;\n },\n set: function set(value) {\n if (!isValidPercentValue(value)) {\n throw new Error(\"ViewportAnchorY must be between 0 and 100.\");\n }\n _viewportAnchorY = value;\n }\n },\n \"viewportAnchorX\": {\n enumerable: true,\n get: function get() {\n return _viewportAnchorX;\n },\n set: function set(value) {\n if (!isValidPercentValue(value)) {\n throw new Error(\"ViewportAnchorX must be between 0 and 100.\");\n }\n _viewportAnchorX = value;\n }\n },\n \"scroll\": {\n enumerable: true,\n get: function get() {\n return _scroll;\n },\n set: function set(value) {\n var setting = findScrollSetting(value);\n // Have to check for false as an empty string is a legal value.\n if (setting === false) {\n console.warn(\"Scroll: an invalid or illegal string was specified.\");\n } else {\n _scroll = setting;\n }\n }\n }\n });\n}\nmodule.exports = VTTRegion;","'use strict';\n\nexports.byteLength = byteLength;\nexports.toByteArray = toByteArray;\nexports.fromByteArray = fromByteArray;\nvar lookup = [];\nvar revLookup = [];\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i];\n revLookup[code.charCodeAt(i)] = i;\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62;\nrevLookup['_'.charCodeAt(0)] = 63;\nfunction getLens(b64) {\n var len = b64.length;\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4');\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=');\n if (validLen === -1) validLen = len;\n var placeHoldersLen = validLen === len ? 0 : 4 - validLen % 4;\n return [validLen, placeHoldersLen];\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength(b64) {\n var lens = getLens(b64);\n var validLen = lens[0];\n var placeHoldersLen = lens[1];\n return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;\n}\nfunction _byteLength(b64, validLen, placeHoldersLen) {\n return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;\n}\nfunction toByteArray(b64) {\n var tmp;\n var lens = getLens(b64);\n var validLen = lens[0];\n var placeHoldersLen = lens[1];\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));\n var curByte = 0;\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0 ? validLen - 4 : validLen;\n var i;\n for (i = 0; i < len; i += 4) {\n tmp = revLookup[b64.charCodeAt(i)] << 18 | revLookup[b64.charCodeAt(i + 1)] << 12 | revLookup[b64.charCodeAt(i + 2)] << 6 | revLookup[b64.charCodeAt(i + 3)];\n arr[curByte++] = tmp >> 16 & 0xFF;\n arr[curByte++] = tmp >> 8 & 0xFF;\n arr[curByte++] = tmp & 0xFF;\n }\n if (placeHoldersLen === 2) {\n tmp = revLookup[b64.charCodeAt(i)] << 2 | revLookup[b64.charCodeAt(i + 1)] >> 4;\n arr[curByte++] = tmp & 0xFF;\n }\n if (placeHoldersLen === 1) {\n tmp = revLookup[b64.charCodeAt(i)] << 10 | revLookup[b64.charCodeAt(i + 1)] << 4 | revLookup[b64.charCodeAt(i + 2)] >> 2;\n arr[curByte++] = tmp >> 8 & 0xFF;\n arr[curByte++] = tmp & 0xFF;\n }\n return arr;\n}\nfunction tripletToBase64(num) {\n return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F];\n}\nfunction encodeChunk(uint8, start, end) {\n var tmp;\n var output = [];\n for (var i = start; i < end; i += 3) {\n tmp = (uint8[i] << 16 & 0xFF0000) + (uint8[i + 1] << 8 & 0xFF00) + (uint8[i + 2] & 0xFF);\n output.push(tripletToBase64(tmp));\n }\n return output.join('');\n}\nfunction fromByteArray(uint8) {\n var tmp;\n var len = uint8.length;\n var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes\n var parts = [];\n var maxChunkLength = 16383; // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, i + maxChunkLength > len2 ? len2 : i + maxChunkLength));\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1];\n parts.push(lookup[tmp >> 2] + lookup[tmp << 4 & 0x3F] + '==');\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1];\n parts.push(lookup[tmp >> 10] + lookup[tmp >> 4 & 0x3F] + lookup[tmp << 2 & 0x3F] + '=');\n }\n return parts.join('');\n}","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m;\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var nBits = -7;\n var i = isLE ? nBytes - 1 : 0;\n var d = isLE ? -1 : 1;\n var s = buffer[offset + i];\n i += d;\n e = s & (1 << -nBits) - 1;\n s >>= -nBits;\n nBits += eLen;\n for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n m = e & (1 << -nBits) - 1;\n e >>= -nBits;\n nBits += mLen;\n for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n if (e === 0) {\n e = 1 - eBias;\n } else if (e === eMax) {\n return m ? NaN : (s ? -1 : 1) * Infinity;\n } else {\n m = m + Math.pow(2, mLen);\n e = e - eBias;\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen);\n};\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c;\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;\n var i = isLE ? 0 : nBytes - 1;\n var d = isLE ? 1 : -1;\n var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;\n value = Math.abs(value);\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0;\n e = eMax;\n } else {\n e = Math.floor(Math.log(value) / Math.LN2);\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--;\n c *= 2;\n }\n if (e + eBias >= 1) {\n value += rt / c;\n } else {\n value += rt * Math.pow(2, 1 - eBias);\n }\n if (value * c >= 2) {\n e++;\n c /= 2;\n }\n if (e + eBias >= eMax) {\n m = 0;\n e = eMax;\n } else if (e + eBias >= 1) {\n m = (value * c - 1) * Math.pow(2, mLen);\n e = e + eBias;\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);\n e = 0;\n }\n }\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n e = e << mLen | m;\n eLen += mLen;\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n buffer[offset + i - d] |= s * 128;\n};","var toString = {}.toString;\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};","var conventions = require(\"./conventions\");\nvar dom = require('./dom');\nvar entities = require('./entities');\nvar sax = require('./sax');\nvar DOMImplementation = dom.DOMImplementation;\nvar NAMESPACE = conventions.NAMESPACE;\nvar ParseError = sax.ParseError;\nvar XMLReader = sax.XMLReader;\n\n/**\n * Normalizes line ending according to https://www.w3.org/TR/xml11/#sec-line-ends:\n *\n * > XML parsed entities are often stored in computer files which,\n * > for editing convenience, are organized into lines.\n * > These lines are typically separated by some combination\n * > of the characters CARRIAGE RETURN (#xD) and LINE FEED (#xA).\n * >\n * > To simplify the tasks of applications, the XML processor must behave\n * > as if it normalized all line breaks in external parsed entities (including the document entity)\n * > on input, before parsing, by translating all of the following to a single #xA character:\n * >\n * > 1. the two-character sequence #xD #xA\n * > 2. the two-character sequence #xD #x85\n * > 3. the single character #x85\n * > 4. the single character #x2028\n * > 5. any #xD character that is not immediately followed by #xA or #x85.\n *\n * @param {string} input\n * @returns {string}\n */\nfunction normalizeLineEndings(input) {\n return input.replace(/\\r[\\n\\u0085]/g, '\\n').replace(/[\\r\\u0085\\u2028]/g, '\\n');\n}\n\n/**\n * @typedef Locator\n * @property {number} [columnNumber]\n * @property {number} [lineNumber]\n */\n\n/**\n * @typedef DOMParserOptions\n * @property {DOMHandler} [domBuilder]\n * @property {Function} [errorHandler]\n * @property {(string) => string} [normalizeLineEndings] used to replace line endings before parsing\n * \t\t\t\t\t\tdefaults to `normalizeLineEndings`\n * @property {Locator} [locator]\n * @property {Record<string, string>} [xmlns]\n *\n * @see normalizeLineEndings\n */\n\n/**\n * The DOMParser interface provides the ability to parse XML or HTML source code\n * from a string into a DOM `Document`.\n *\n * _xmldom is different from the spec in that it allows an `options` parameter,\n * to override the default behavior._\n *\n * @param {DOMParserOptions} [options]\n * @constructor\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser\n * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-parsing-and-serialization\n */\nfunction DOMParser(options) {\n this.options = options || {\n locator: {}\n };\n}\nDOMParser.prototype.parseFromString = function (source, mimeType) {\n var options = this.options;\n var sax = new XMLReader();\n var domBuilder = options.domBuilder || new DOMHandler(); //contentHandler and LexicalHandler\n var errorHandler = options.errorHandler;\n var locator = options.locator;\n var defaultNSMap = options.xmlns || {};\n var isHTML = /\\/x?html?$/.test(mimeType); //mimeType.toLowerCase().indexOf('html') > -1;\n var entityMap = isHTML ? entities.HTML_ENTITIES : entities.XML_ENTITIES;\n if (locator) {\n domBuilder.setDocumentLocator(locator);\n }\n sax.errorHandler = buildErrorHandler(errorHandler, domBuilder, locator);\n sax.domBuilder = options.domBuilder || domBuilder;\n if (isHTML) {\n defaultNSMap[''] = NAMESPACE.HTML;\n }\n defaultNSMap.xml = defaultNSMap.xml || NAMESPACE.XML;\n var normalize = options.normalizeLineEndings || normalizeLineEndings;\n if (source && typeof source === 'string') {\n sax.parse(normalize(source), defaultNSMap, entityMap);\n } else {\n sax.errorHandler.error('invalid doc source');\n }\n return domBuilder.doc;\n};\nfunction buildErrorHandler(errorImpl, domBuilder, locator) {\n if (!errorImpl) {\n if (domBuilder instanceof DOMHandler) {\n return domBuilder;\n }\n errorImpl = domBuilder;\n }\n var errorHandler = {};\n var isCallback = errorImpl instanceof Function;\n locator = locator || {};\n function build(key) {\n var fn = errorImpl[key];\n if (!fn && isCallback) {\n fn = errorImpl.length == 2 ? function (msg) {\n errorImpl(key, msg);\n } : errorImpl;\n }\n errorHandler[key] = fn && function (msg) {\n fn('[xmldom ' + key + ']\\t' + msg + _locator(locator));\n } || function () {};\n }\n build('warning');\n build('error');\n build('fatalError');\n return errorHandler;\n}\n\n//console.log('#\\n\\n\\n\\n\\n\\n\\n####')\n/**\n * +ContentHandler+ErrorHandler\n * +LexicalHandler+EntityResolver2\n * -DeclHandler-DTDHandler\n *\n * DefaultHandler:EntityResolver, DTDHandler, ContentHandler, ErrorHandler\n * DefaultHandler2:DefaultHandler,LexicalHandler, DeclHandler, EntityResolver2\n * @link http://www.saxproject.org/apidoc/org/xml/sax/helpers/DefaultHandler.html\n */\nfunction DOMHandler() {\n this.cdata = false;\n}\nfunction position(locator, node) {\n node.lineNumber = locator.lineNumber;\n node.columnNumber = locator.columnNumber;\n}\n/**\n * @see org.xml.sax.ContentHandler#startDocument\n * @link http://www.saxproject.org/apidoc/org/xml/sax/ContentHandler.html\n */\nDOMHandler.prototype = {\n startDocument: function startDocument() {\n this.doc = new DOMImplementation().createDocument(null, null, null);\n if (this.locator) {\n this.doc.documentURI = this.locator.systemId;\n }\n },\n startElement: function startElement(namespaceURI, localName, qName, attrs) {\n var doc = this.doc;\n var el = doc.createElementNS(namespaceURI, qName || localName);\n var len = attrs.length;\n appendElement(this, el);\n this.currentElement = el;\n this.locator && position(this.locator, el);\n for (var i = 0; i < len; i++) {\n var namespaceURI = attrs.getURI(i);\n var value = attrs.getValue(i);\n var qName = attrs.getQName(i);\n var attr = doc.createAttributeNS(namespaceURI, qName);\n this.locator && position(attrs.getLocator(i), attr);\n attr.value = attr.nodeValue = value;\n el.setAttributeNode(attr);\n }\n },\n endElement: function endElement(namespaceURI, localName, qName) {\n var current = this.currentElement;\n var tagName = current.tagName;\n this.currentElement = current.parentNode;\n },\n startPrefixMapping: function startPrefixMapping(prefix, uri) {},\n endPrefixMapping: function endPrefixMapping(prefix) {},\n processingInstruction: function processingInstruction(target, data) {\n var ins = this.doc.createProcessingInstruction(target, data);\n this.locator && position(this.locator, ins);\n appendElement(this, ins);\n },\n ignorableWhitespace: function ignorableWhitespace(ch, start, length) {},\n characters: function characters(chars, start, length) {\n chars = _toString.apply(this, arguments);\n //console.log(chars)\n if (chars) {\n if (this.cdata) {\n var charNode = this.doc.createCDATASection(chars);\n } else {\n var charNode = this.doc.createTextNode(chars);\n }\n if (this.currentElement) {\n this.currentElement.appendChild(charNode);\n } else if (/^\\s*$/.test(chars)) {\n this.doc.appendChild(charNode);\n //process xml\n }\n this.locator && position(this.locator, charNode);\n }\n },\n skippedEntity: function skippedEntity(name) {},\n endDocument: function endDocument() {\n this.doc.normalize();\n },\n setDocumentLocator: function setDocumentLocator(locator) {\n if (this.locator = locator) {\n // && !('lineNumber' in locator)){\n locator.lineNumber = 0;\n }\n },\n //LexicalHandler\n comment: function comment(chars, start, length) {\n chars = _toString.apply(this, arguments);\n var comm = this.doc.createComment(chars);\n this.locator && position(this.locator, comm);\n appendElement(this, comm);\n },\n startCDATA: function startCDATA() {\n //used in characters() methods\n this.cdata = true;\n },\n endCDATA: function endCDATA() {\n this.cdata = false;\n },\n startDTD: function startDTD(name, publicId, systemId) {\n var impl = this.doc.implementation;\n if (impl && impl.createDocumentType) {\n var dt = impl.createDocumentType(name, publicId, systemId);\n this.locator && position(this.locator, dt);\n appendElement(this, dt);\n this.doc.doctype = dt;\n }\n },\n /**\n * @see org.xml.sax.ErrorHandler\n * @link http://www.saxproject.org/apidoc/org/xml/sax/ErrorHandler.html\n */\n warning: function warning(error) {\n console.warn('[xmldom warning]\\t' + error, _locator(this.locator));\n },\n error: function error(_error) {\n console.error('[xmldom error]\\t' + _error, _locator(this.locator));\n },\n fatalError: function fatalError(error) {\n throw new ParseError(error, this.locator);\n }\n};\nfunction _locator(l) {\n if (l) {\n return '\\n@' + (l.systemId || '') + '#[line:' + l.lineNumber + ',col:' + l.columnNumber + ']';\n }\n}\nfunction _toString(chars, start, length) {\n if (typeof chars == 'string') {\n return chars.substr(start, length);\n } else {\n //java sax connect width xmldom on rhino(what about: \"? && !(chars instanceof String)\")\n if (chars.length >= start + length || start) {\n return new java.lang.String(chars, start, length) + '';\n }\n return chars;\n }\n}\n\n/*\n * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/LexicalHandler.html\n * used method of org.xml.sax.ext.LexicalHandler:\n * #comment(chars, start, length)\n * #startCDATA()\n * #endCDATA()\n * #startDTD(name, publicId, systemId)\n *\n *\n * IGNORED method of org.xml.sax.ext.LexicalHandler:\n * #endDTD()\n * #startEntity(name)\n * #endEntity(name)\n *\n *\n * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/DeclHandler.html\n * IGNORED method of org.xml.sax.ext.DeclHandler\n * \t#attributeDecl(eName, aName, type, mode, value)\n * #elementDecl(name, model)\n * #externalEntityDecl(name, publicId, systemId)\n * #internalEntityDecl(name, value)\n * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/EntityResolver2.html\n * IGNORED method of org.xml.sax.EntityResolver2\n * #resolveEntity(String name,String publicId,String baseURI,String systemId)\n * #resolveEntity(publicId, systemId)\n * #getExternalSubset(name, baseURI)\n * @link http://www.saxproject.org/apidoc/org/xml/sax/DTDHandler.html\n * IGNORED method of org.xml.sax.DTDHandler\n * #notationDecl(name, publicId, systemId) {};\n * #unparsedEntityDecl(name, publicId, systemId, notationName) {};\n */\n\"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl\".replace(/\\w+/g, function (key) {\n DOMHandler.prototype[key] = function () {\n return null;\n };\n});\n\n/* Private static helpers treated below as private instance methods, so don't need to add these to the public API; we might use a Relator to also get rid of non-standard public properties */\nfunction appendElement(hander, node) {\n if (!hander.currentElement) {\n hander.doc.appendChild(node);\n } else {\n hander.currentElement.appendChild(node);\n }\n} //appendChild and setAttributeNS are preformance key\n\nexports.__DOMHandler = DOMHandler;\nexports.normalizeLineEndings = normalizeLineEndings;\nexports.DOMParser = DOMParser;","'use strict';\n\nvar freeze = require('./conventions').freeze;\n\n/**\n * The entities that are predefined in every XML document.\n *\n * @see https://www.w3.org/TR/2006/REC-xml11-20060816/#sec-predefined-ent W3C XML 1.1\n * @see https://www.w3.org/TR/2008/REC-xml-20081126/#sec-predefined-ent W3C XML 1.0\n * @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Predefined_entities_in_XML Wikipedia\n */\nexports.XML_ENTITIES = freeze({\n amp: '&',\n apos: \"'\",\n gt: '>',\n lt: '<',\n quot: '\"'\n});\n\n/**\n * A map of all entities that are detected in an HTML document.\n * They contain all entries from `XML_ENTITIES`.\n *\n * @see XML_ENTITIES\n * @see DOMParser.parseFromString\n * @see DOMImplementation.prototype.createHTMLDocument\n * @see https://html.spec.whatwg.org/#named-character-references WHATWG HTML(5) Spec\n * @see https://html.spec.whatwg.org/entities.json JSON\n * @see https://www.w3.org/TR/xml-entity-names/ W3C XML Entity Names\n * @see https://www.w3.org/TR/html4/sgml/entities.html W3C HTML4/SGML\n * @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Character_entity_references_in_HTML Wikipedia (HTML)\n * @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Entities_representing_special_characters_in_XHTML Wikpedia (XHTML)\n */\nexports.HTML_ENTITIES = freeze({\n Aacute: \"\\xC1\",\n aacute: \"\\xE1\",\n Abreve: \"\\u0102\",\n abreve: \"\\u0103\",\n ac: \"\\u223E\",\n acd: \"\\u223F\",\n acE: \"\\u223E\\u0333\",\n Acirc: \"\\xC2\",\n acirc: \"\\xE2\",\n acute: \"\\xB4\",\n Acy: \"\\u0410\",\n acy: \"\\u0430\",\n AElig: \"\\xC6\",\n aelig: \"\\xE6\",\n af: \"\\u2061\",\n Afr: \"\\uD835\\uDD04\",\n afr: \"\\uD835\\uDD1E\",\n Agrave: \"\\xC0\",\n agrave: \"\\xE0\",\n alefsym: \"\\u2135\",\n aleph: \"\\u2135\",\n Alpha: \"\\u0391\",\n alpha: \"\\u03B1\",\n Amacr: \"\\u0100\",\n amacr: \"\\u0101\",\n amalg: \"\\u2A3F\",\n AMP: \"&\",\n amp: \"&\",\n And: \"\\u2A53\",\n and: \"\\u2227\",\n andand: \"\\u2A55\",\n andd: \"\\u2A5C\",\n andslope: \"\\u2A58\",\n andv: \"\\u2A5A\",\n ang: \"\\u2220\",\n ange: \"\\u29A4\",\n angle: \"\\u2220\",\n angmsd: \"\\u2221\",\n angmsdaa: \"\\u29A8\",\n angmsdab: \"\\u29A9\",\n angmsdac: \"\\u29AA\",\n angmsdad: \"\\u29AB\",\n angmsdae: \"\\u29AC\",\n angmsdaf: \"\\u29AD\",\n angmsdag: \"\\u29AE\",\n angmsdah: \"\\u29AF\",\n angrt: \"\\u221F\",\n angrtvb: \"\\u22BE\",\n angrtvbd: \"\\u299D\",\n angsph: \"\\u2222\",\n angst: \"\\xC5\",\n angzarr: \"\\u237C\",\n Aogon: \"\\u0104\",\n aogon: \"\\u0105\",\n Aopf: \"\\uD835\\uDD38\",\n aopf: \"\\uD835\\uDD52\",\n ap: \"\\u2248\",\n apacir: \"\\u2A6F\",\n apE: \"\\u2A70\",\n ape: \"\\u224A\",\n apid: \"\\u224B\",\n apos: \"'\",\n ApplyFunction: \"\\u2061\",\n approx: \"\\u2248\",\n approxeq: \"\\u224A\",\n Aring: \"\\xC5\",\n aring: \"\\xE5\",\n Ascr: \"\\uD835\\uDC9C\",\n ascr: \"\\uD835\\uDCB6\",\n Assign: \"\\u2254\",\n ast: \"*\",\n asymp: \"\\u2248\",\n asympeq: \"\\u224D\",\n Atilde: \"\\xC3\",\n atilde: \"\\xE3\",\n Auml: \"\\xC4\",\n auml: \"\\xE4\",\n awconint: \"\\u2233\",\n awint: \"\\u2A11\",\n backcong: \"\\u224C\",\n backepsilon: \"\\u03F6\",\n backprime: \"\\u2035\",\n backsim: \"\\u223D\",\n backsimeq: \"\\u22CD\",\n Backslash: \"\\u2216\",\n Barv: \"\\u2AE7\",\n barvee: \"\\u22BD\",\n Barwed: \"\\u2306\",\n barwed: \"\\u2305\",\n barwedge: \"\\u2305\",\n bbrk: \"\\u23B5\",\n bbrktbrk: \"\\u23B6\",\n bcong: \"\\u224C\",\n Bcy: \"\\u0411\",\n bcy: \"\\u0431\",\n bdquo: \"\\u201E\",\n becaus: \"\\u2235\",\n Because: \"\\u2235\",\n because: \"\\u2235\",\n bemptyv: \"\\u29B0\",\n bepsi: \"\\u03F6\",\n bernou: \"\\u212C\",\n Bernoullis: \"\\u212C\",\n Beta: \"\\u0392\",\n beta: \"\\u03B2\",\n beth: \"\\u2136\",\n between: \"\\u226C\",\n Bfr: \"\\uD835\\uDD05\",\n bfr: \"\\uD835\\uDD1F\",\n bigcap: \"\\u22C2\",\n bigcirc: \"\\u25EF\",\n bigcup: \"\\u22C3\",\n bigodot: \"\\u2A00\",\n bigoplus: \"\\u2A01\",\n bigotimes: \"\\u2A02\",\n bigsqcup: \"\\u2A06\",\n bigstar: \"\\u2605\",\n bigtriangledown: \"\\u25BD\",\n bigtriangleup: \"\\u25B3\",\n biguplus: \"\\u2A04\",\n bigvee: \"\\u22C1\",\n bigwedge: \"\\u22C0\",\n bkarow: \"\\u290D\",\n blacklozenge: \"\\u29EB\",\n blacksquare: \"\\u25AA\",\n blacktriangle: \"\\u25B4\",\n blacktriangledown: \"\\u25BE\",\n blacktriangleleft: \"\\u25C2\",\n blacktriangleright: \"\\u25B8\",\n blank: \"\\u2423\",\n blk12: \"\\u2592\",\n blk14: \"\\u2591\",\n blk34: \"\\u2593\",\n block: \"\\u2588\",\n bne: \"=\\u20E5\",\n bnequiv: \"\\u2261\\u20E5\",\n bNot: \"\\u2AED\",\n bnot: \"\\u2310\",\n Bopf: \"\\uD835\\uDD39\",\n bopf: \"\\uD835\\uDD53\",\n bot: \"\\u22A5\",\n bottom: \"\\u22A5\",\n bowtie: \"\\u22C8\",\n boxbox: \"\\u29C9\",\n boxDL: \"\\u2557\",\n boxDl: \"\\u2556\",\n boxdL: \"\\u2555\",\n boxdl: \"\\u2510\",\n boxDR: \"\\u2554\",\n boxDr: \"\\u2553\",\n boxdR: \"\\u2552\",\n boxdr: \"\\u250C\",\n boxH: \"\\u2550\",\n boxh: \"\\u2500\",\n boxHD: \"\\u2566\",\n boxHd: \"\\u2564\",\n boxhD: \"\\u2565\",\n boxhd: \"\\u252C\",\n boxHU: \"\\u2569\",\n boxHu: \"\\u2567\",\n boxhU: \"\\u2568\",\n boxhu: \"\\u2534\",\n boxminus: \"\\u229F\",\n boxplus: \"\\u229E\",\n boxtimes: \"\\u22A0\",\n boxUL: \"\\u255D\",\n boxUl: \"\\u255C\",\n boxuL: \"\\u255B\",\n boxul: \"\\u2518\",\n boxUR: \"\\u255A\",\n boxUr: \"\\u2559\",\n boxuR: \"\\u2558\",\n boxur: \"\\u2514\",\n boxV: \"\\u2551\",\n boxv: \"\\u2502\",\n boxVH: \"\\u256C\",\n boxVh: \"\\u256B\",\n boxvH: \"\\u256A\",\n boxvh: \"\\u253C\",\n boxVL: \"\\u2563\",\n boxVl: \"\\u2562\",\n boxvL: \"\\u2561\",\n boxvl: \"\\u2524\",\n boxVR: \"\\u2560\",\n boxVr: \"\\u255F\",\n boxvR: \"\\u255E\",\n boxvr: \"\\u251C\",\n bprime: \"\\u2035\",\n Breve: \"\\u02D8\",\n breve: \"\\u02D8\",\n brvbar: \"\\xA6\",\n Bscr: \"\\u212C\",\n bscr: \"\\uD835\\uDCB7\",\n bsemi: \"\\u204F\",\n bsim: \"\\u223D\",\n bsime: \"\\u22CD\",\n bsol: \"\\\\\",\n bsolb: \"\\u29C5\",\n bsolhsub: \"\\u27C8\",\n bull: \"\\u2022\",\n bullet: \"\\u2022\",\n bump: \"\\u224E\",\n bumpE: \"\\u2AAE\",\n bumpe: \"\\u224F\",\n Bumpeq: \"\\u224E\",\n bumpeq: \"\\u224F\",\n Cacute: \"\\u0106\",\n cacute: \"\\u0107\",\n Cap: \"\\u22D2\",\n cap: \"\\u2229\",\n capand: \"\\u2A44\",\n capbrcup: \"\\u2A49\",\n capcap: \"\\u2A4B\",\n capcup: \"\\u2A47\",\n capdot: \"\\u2A40\",\n CapitalDifferentialD: \"\\u2145\",\n caps: \"\\u2229\\uFE00\",\n caret: \"\\u2041\",\n caron: \"\\u02C7\",\n Cayleys: \"\\u212D\",\n ccaps: \"\\u2A4D\",\n Ccaron: \"\\u010C\",\n ccaron: \"\\u010D\",\n Ccedil: \"\\xC7\",\n ccedil: \"\\xE7\",\n Ccirc: \"\\u0108\",\n ccirc: \"\\u0109\",\n Cconint: \"\\u2230\",\n ccups: \"\\u2A4C\",\n ccupssm: \"\\u2A50\",\n Cdot: \"\\u010A\",\n cdot: \"\\u010B\",\n cedil: \"\\xB8\",\n Cedilla: \"\\xB8\",\n cemptyv: \"\\u29B2\",\n cent: \"\\xA2\",\n CenterDot: \"\\xB7\",\n centerdot: \"\\xB7\",\n Cfr: \"\\u212D\",\n cfr: \"\\uD835\\uDD20\",\n CHcy: \"\\u0427\",\n chcy: \"\\u0447\",\n check: \"\\u2713\",\n checkmark: \"\\u2713\",\n Chi: \"\\u03A7\",\n chi: \"\\u03C7\",\n cir: \"\\u25CB\",\n circ: \"\\u02C6\",\n circeq: \"\\u2257\",\n circlearrowleft: \"\\u21BA\",\n circlearrowright: \"\\u21BB\",\n circledast: \"\\u229B\",\n circledcirc: \"\\u229A\",\n circleddash: \"\\u229D\",\n CircleDot: \"\\u2299\",\n circledR: \"\\xAE\",\n circledS: \"\\u24C8\",\n CircleMinus: \"\\u2296\",\n CirclePlus: \"\\u2295\",\n CircleTimes: \"\\u2297\",\n cirE: \"\\u29C3\",\n cire: \"\\u2257\",\n cirfnint: \"\\u2A10\",\n cirmid: \"\\u2AEF\",\n cirscir: \"\\u29C2\",\n ClockwiseContourIntegral: \"\\u2232\",\n CloseCurlyDoubleQuote: \"\\u201D\",\n CloseCurlyQuote: \"\\u2019\",\n clubs: \"\\u2663\",\n clubsuit: \"\\u2663\",\n Colon: \"\\u2237\",\n colon: \":\",\n Colone: \"\\u2A74\",\n colone: \"\\u2254\",\n coloneq: \"\\u2254\",\n comma: \",\",\n commat: \"@\",\n comp: \"\\u2201\",\n compfn: \"\\u2218\",\n complement: \"\\u2201\",\n complexes: \"\\u2102\",\n cong: \"\\u2245\",\n congdot: \"\\u2A6D\",\n Congruent: \"\\u2261\",\n Conint: \"\\u222F\",\n conint: \"\\u222E\",\n ContourIntegral: \"\\u222E\",\n Copf: \"\\u2102\",\n copf: \"\\uD835\\uDD54\",\n coprod: \"\\u2210\",\n Coproduct: \"\\u2210\",\n COPY: \"\\xA9\",\n copy: \"\\xA9\",\n copysr: \"\\u2117\",\n CounterClockwiseContourIntegral: \"\\u2233\",\n crarr: \"\\u21B5\",\n Cross: \"\\u2A2F\",\n cross: \"\\u2717\",\n Cscr: \"\\uD835\\uDC9E\",\n cscr: \"\\uD835\\uDCB8\",\n csub: \"\\u2ACF\",\n csube: \"\\u2AD1\",\n csup: \"\\u2AD0\",\n csupe: \"\\u2AD2\",\n ctdot: \"\\u22EF\",\n cudarrl: \"\\u2938\",\n cudarrr: \"\\u2935\",\n cuepr: \"\\u22DE\",\n cuesc: \"\\u22DF\",\n cularr: \"\\u21B6\",\n cularrp: \"\\u293D\",\n Cup: \"\\u22D3\",\n cup: \"\\u222A\",\n cupbrcap: \"\\u2A48\",\n CupCap: \"\\u224D\",\n cupcap: \"\\u2A46\",\n cupcup: \"\\u2A4A\",\n cupdot: \"\\u228D\",\n cupor: \"\\u2A45\",\n cups: \"\\u222A\\uFE00\",\n curarr: \"\\u21B7\",\n curarrm: \"\\u293C\",\n curlyeqprec: \"\\u22DE\",\n curlyeqsucc: \"\\u22DF\",\n curlyvee: \"\\u22CE\",\n curlywedge: \"\\u22CF\",\n curren: \"\\xA4\",\n curvearrowleft: \"\\u21B6\",\n curvearrowright: \"\\u21B7\",\n cuvee: \"\\u22CE\",\n cuwed: \"\\u22CF\",\n cwconint: \"\\u2232\",\n cwint: \"\\u2231\",\n cylcty: \"\\u232D\",\n Dagger: \"\\u2021\",\n dagger: \"\\u2020\",\n daleth: \"\\u2138\",\n Darr: \"\\u21A1\",\n dArr: \"\\u21D3\",\n darr: \"\\u2193\",\n dash: \"\\u2010\",\n Dashv: \"\\u2AE4\",\n dashv: \"\\u22A3\",\n dbkarow: \"\\u290F\",\n dblac: \"\\u02DD\",\n Dcaron: \"\\u010E\",\n dcaron: \"\\u010F\",\n Dcy: \"\\u0414\",\n dcy: \"\\u0434\",\n DD: \"\\u2145\",\n dd: \"\\u2146\",\n ddagger: \"\\u2021\",\n ddarr: \"\\u21CA\",\n DDotrahd: \"\\u2911\",\n ddotseq: \"\\u2A77\",\n deg: \"\\xB0\",\n Del: \"\\u2207\",\n Delta: \"\\u0394\",\n delta: \"\\u03B4\",\n demptyv: \"\\u29B1\",\n dfisht: \"\\u297F\",\n Dfr: \"\\uD835\\uDD07\",\n dfr: \"\\uD835\\uDD21\",\n dHar: \"\\u2965\",\n dharl: \"\\u21C3\",\n dharr: \"\\u21C2\",\n DiacriticalAcute: \"\\xB4\",\n DiacriticalDot: \"\\u02D9\",\n DiacriticalDoubleAcute: \"\\u02DD\",\n DiacriticalGrave: \"`\",\n DiacriticalTilde: \"\\u02DC\",\n diam: \"\\u22C4\",\n Diamond: \"\\u22C4\",\n diamond: \"\\u22C4\",\n diamondsuit: \"\\u2666\",\n diams: \"\\u2666\",\n die: \"\\xA8\",\n DifferentialD: \"\\u2146\",\n digamma: \"\\u03DD\",\n disin: \"\\u22F2\",\n div: \"\\xF7\",\n divide: \"\\xF7\",\n divideontimes: \"\\u22C7\",\n divonx: \"\\u22C7\",\n DJcy: \"\\u0402\",\n djcy: \"\\u0452\",\n dlcorn: \"\\u231E\",\n dlcrop: \"\\u230D\",\n dollar: \"$\",\n Dopf: \"\\uD835\\uDD3B\",\n dopf: \"\\uD835\\uDD55\",\n Dot: \"\\xA8\",\n dot: \"\\u02D9\",\n DotDot: \"\\u20DC\",\n doteq: \"\\u2250\",\n doteqdot: \"\\u2251\",\n DotEqual: \"\\u2250\",\n dotminus: \"\\u2238\",\n dotplus: \"\\u2214\",\n dotsquare: \"\\u22A1\",\n doublebarwedge: \"\\u2306\",\n DoubleContourIntegral: \"\\u222F\",\n DoubleDot: \"\\xA8\",\n DoubleDownArrow: \"\\u21D3\",\n DoubleLeftArrow: \"\\u21D0\",\n DoubleLeftRightArrow: \"\\u21D4\",\n DoubleLeftTee: \"\\u2AE4\",\n DoubleLongLeftArrow: \"\\u27F8\",\n DoubleLongLeftRightArrow: \"\\u27FA\",\n DoubleLongRightArrow: \"\\u27F9\",\n DoubleRightArrow: \"\\u21D2\",\n DoubleRightTee: \"\\u22A8\",\n DoubleUpArrow: \"\\u21D1\",\n DoubleUpDownArrow: \"\\u21D5\",\n DoubleVerticalBar: \"\\u2225\",\n DownArrow: \"\\u2193\",\n Downarrow: \"\\u21D3\",\n downarrow: \"\\u2193\",\n DownArrowBar: \"\\u2913\",\n DownArrowUpArrow: \"\\u21F5\",\n DownBreve: \"\\u0311\",\n downdownarrows: \"\\u21CA\",\n downharpoonleft: \"\\u21C3\",\n downharpoonright: \"\\u21C2\",\n DownLeftRightVector: \"\\u2950\",\n DownLeftTeeVector: \"\\u295E\",\n DownLeftVector: \"\\u21BD\",\n DownLeftVectorBar: \"\\u2956\",\n DownRightTeeVector: \"\\u295F\",\n DownRightVector: \"\\u21C1\",\n DownRightVectorBar: \"\\u2957\",\n DownTee: \"\\u22A4\",\n DownTeeArrow: \"\\u21A7\",\n drbkarow: \"\\u2910\",\n drcorn: \"\\u231F\",\n drcrop: \"\\u230C\",\n Dscr: \"\\uD835\\uDC9F\",\n dscr: \"\\uD835\\uDCB9\",\n DScy: \"\\u0405\",\n dscy: \"\\u0455\",\n dsol: \"\\u29F6\",\n Dstrok: \"\\u0110\",\n dstrok: \"\\u0111\",\n dtdot: \"\\u22F1\",\n dtri: \"\\u25BF\",\n dtrif: \"\\u25BE\",\n duarr: \"\\u21F5\",\n duhar: \"\\u296F\",\n dwangle: \"\\u29A6\",\n DZcy: \"\\u040F\",\n dzcy: \"\\u045F\",\n dzigrarr: \"\\u27FF\",\n Eacute: \"\\xC9\",\n eacute: \"\\xE9\",\n easter: \"\\u2A6E\",\n Ecaron: \"\\u011A\",\n ecaron: \"\\u011B\",\n ecir: \"\\u2256\",\n Ecirc: \"\\xCA\",\n ecirc: \"\\xEA\",\n ecolon: \"\\u2255\",\n Ecy: \"\\u042D\",\n ecy: \"\\u044D\",\n eDDot: \"\\u2A77\",\n Edot: \"\\u0116\",\n eDot: \"\\u2251\",\n edot: \"\\u0117\",\n ee: \"\\u2147\",\n efDot: \"\\u2252\",\n Efr: \"\\uD835\\uDD08\",\n efr: \"\\uD835\\uDD22\",\n eg: \"\\u2A9A\",\n Egrave: \"\\xC8\",\n egrave: \"\\xE8\",\n egs: \"\\u2A96\",\n egsdot: \"\\u2A98\",\n el: \"\\u2A99\",\n Element: \"\\u2208\",\n elinters: \"\\u23E7\",\n ell: \"\\u2113\",\n els: \"\\u2A95\",\n elsdot: \"\\u2A97\",\n Emacr: \"\\u0112\",\n emacr: \"\\u0113\",\n empty: \"\\u2205\",\n emptyset: \"\\u2205\",\n EmptySmallSquare: \"\\u25FB\",\n emptyv: \"\\u2205\",\n EmptyVerySmallSquare: \"\\u25AB\",\n emsp: \"\\u2003\",\n emsp13: \"\\u2004\",\n emsp14: \"\\u2005\",\n ENG: \"\\u014A\",\n eng: \"\\u014B\",\n ensp: \"\\u2002\",\n Eogon: \"\\u0118\",\n eogon: \"\\u0119\",\n Eopf: \"\\uD835\\uDD3C\",\n eopf: \"\\uD835\\uDD56\",\n epar: \"\\u22D5\",\n eparsl: \"\\u29E3\",\n eplus: \"\\u2A71\",\n epsi: \"\\u03B5\",\n Epsilon: \"\\u0395\",\n epsilon: \"\\u03B5\",\n epsiv: \"\\u03F5\",\n eqcirc: \"\\u2256\",\n eqcolon: \"\\u2255\",\n eqsim: \"\\u2242\",\n eqslantgtr: \"\\u2A96\",\n eqslantless: \"\\u2A95\",\n Equal: \"\\u2A75\",\n equals: \"=\",\n EqualTilde: \"\\u2242\",\n equest: \"\\u225F\",\n Equilibrium: \"\\u21CC\",\n equiv: \"\\u2261\",\n equivDD: \"\\u2A78\",\n eqvparsl: \"\\u29E5\",\n erarr: \"\\u2971\",\n erDot: \"\\u2253\",\n Escr: \"\\u2130\",\n escr: \"\\u212F\",\n esdot: \"\\u2250\",\n Esim: \"\\u2A73\",\n esim: \"\\u2242\",\n Eta: \"\\u0397\",\n eta: \"\\u03B7\",\n ETH: \"\\xD0\",\n eth: \"\\xF0\",\n Euml: \"\\xCB\",\n euml: \"\\xEB\",\n euro: \"\\u20AC\",\n excl: \"!\",\n exist: \"\\u2203\",\n Exists: \"\\u2203\",\n expectation: \"\\u2130\",\n ExponentialE: \"\\u2147\",\n exponentiale: \"\\u2147\",\n fallingdotseq: \"\\u2252\",\n Fcy: \"\\u0424\",\n fcy: \"\\u0444\",\n female: \"\\u2640\",\n ffilig: \"\\uFB03\",\n fflig: \"\\uFB00\",\n ffllig: \"\\uFB04\",\n Ffr: \"\\uD835\\uDD09\",\n ffr: \"\\uD835\\uDD23\",\n filig: \"\\uFB01\",\n FilledSmallSquare: \"\\u25FC\",\n FilledVerySmallSquare: \"\\u25AA\",\n fjlig: \"fj\",\n flat: \"\\u266D\",\n fllig: \"\\uFB02\",\n fltns: \"\\u25B1\",\n fnof: \"\\u0192\",\n Fopf: \"\\uD835\\uDD3D\",\n fopf: \"\\uD835\\uDD57\",\n ForAll: \"\\u2200\",\n forall: \"\\u2200\",\n fork: \"\\u22D4\",\n forkv: \"\\u2AD9\",\n Fouriertrf: \"\\u2131\",\n fpartint: \"\\u2A0D\",\n frac12: \"\\xBD\",\n frac13: \"\\u2153\",\n frac14: \"\\xBC\",\n frac15: \"\\u2155\",\n frac16: \"\\u2159\",\n frac18: \"\\u215B\",\n frac23: \"\\u2154\",\n frac25: \"\\u2156\",\n frac34: \"\\xBE\",\n frac35: \"\\u2157\",\n frac38: \"\\u215C\",\n frac45: \"\\u2158\",\n frac56: \"\\u215A\",\n frac58: \"\\u215D\",\n frac78: \"\\u215E\",\n frasl: \"\\u2044\",\n frown: \"\\u2322\",\n Fscr: \"\\u2131\",\n fscr: \"\\uD835\\uDCBB\",\n gacute: \"\\u01F5\",\n Gamma: \"\\u0393\",\n gamma: \"\\u03B3\",\n Gammad: \"\\u03DC\",\n gammad: \"\\u03DD\",\n gap: \"\\u2A86\",\n Gbreve: \"\\u011E\",\n gbreve: \"\\u011F\",\n Gcedil: \"\\u0122\",\n Gcirc: \"\\u011C\",\n gcirc: \"\\u011D\",\n Gcy: \"\\u0413\",\n gcy: \"\\u0433\",\n Gdot: \"\\u0120\",\n gdot: \"\\u0121\",\n gE: \"\\u2267\",\n ge: \"\\u2265\",\n gEl: \"\\u2A8C\",\n gel: \"\\u22DB\",\n geq: \"\\u2265\",\n geqq: \"\\u2267\",\n geqslant: \"\\u2A7E\",\n ges: \"\\u2A7E\",\n gescc: \"\\u2AA9\",\n gesdot: \"\\u2A80\",\n gesdoto: \"\\u2A82\",\n gesdotol: \"\\u2A84\",\n gesl: \"\\u22DB\\uFE00\",\n gesles: \"\\u2A94\",\n Gfr: \"\\uD835\\uDD0A\",\n gfr: \"\\uD835\\uDD24\",\n Gg: \"\\u22D9\",\n gg: \"\\u226B\",\n ggg: \"\\u22D9\",\n gimel: \"\\u2137\",\n GJcy: \"\\u0403\",\n gjcy: \"\\u0453\",\n gl: \"\\u2277\",\n gla: \"\\u2AA5\",\n glE: \"\\u2A92\",\n glj: \"\\u2AA4\",\n gnap: \"\\u2A8A\",\n gnapprox: \"\\u2A8A\",\n gnE: \"\\u2269\",\n gne: \"\\u2A88\",\n gneq: \"\\u2A88\",\n gneqq: \"\\u2269\",\n gnsim: \"\\u22E7\",\n Gopf: \"\\uD835\\uDD3E\",\n gopf: \"\\uD835\\uDD58\",\n grave: \"`\",\n GreaterEqual: \"\\u2265\",\n GreaterEqualLess: \"\\u22DB\",\n GreaterFullEqual: \"\\u2267\",\n GreaterGreater: \"\\u2AA2\",\n GreaterLess: \"\\u2277\",\n GreaterSlantEqual: \"\\u2A7E\",\n GreaterTilde: \"\\u2273\",\n Gscr: \"\\uD835\\uDCA2\",\n gscr: \"\\u210A\",\n gsim: \"\\u2273\",\n gsime: \"\\u2A8E\",\n gsiml: \"\\u2A90\",\n Gt: \"\\u226B\",\n GT: \">\",\n gt: \">\",\n gtcc: \"\\u2AA7\",\n gtcir: \"\\u2A7A\",\n gtdot: \"\\u22D7\",\n gtlPar: \"\\u2995\",\n gtquest: \"\\u2A7C\",\n gtrapprox: \"\\u2A86\",\n gtrarr: \"\\u2978\",\n gtrdot: \"\\u22D7\",\n gtreqless: \"\\u22DB\",\n gtreqqless: \"\\u2A8C\",\n gtrless: \"\\u2277\",\n gtrsim: \"\\u2273\",\n gvertneqq: \"\\u2269\\uFE00\",\n gvnE: \"\\u2269\\uFE00\",\n Hacek: \"\\u02C7\",\n hairsp: \"\\u200A\",\n half: \"\\xBD\",\n hamilt: \"\\u210B\",\n HARDcy: \"\\u042A\",\n hardcy: \"\\u044A\",\n hArr: \"\\u21D4\",\n harr: \"\\u2194\",\n harrcir: \"\\u2948\",\n harrw: \"\\u21AD\",\n Hat: \"^\",\n hbar: \"\\u210F\",\n Hcirc: \"\\u0124\",\n hcirc: \"\\u0125\",\n hearts: \"\\u2665\",\n heartsuit: \"\\u2665\",\n hellip: \"\\u2026\",\n hercon: \"\\u22B9\",\n Hfr: \"\\u210C\",\n hfr: \"\\uD835\\uDD25\",\n HilbertSpace: \"\\u210B\",\n hksearow: \"\\u2925\",\n hkswarow: \"\\u2926\",\n hoarr: \"\\u21FF\",\n homtht: \"\\u223B\",\n hookleftarrow: \"\\u21A9\",\n hookrightarrow: \"\\u21AA\",\n Hopf: \"\\u210D\",\n hopf: \"\\uD835\\uDD59\",\n horbar: \"\\u2015\",\n HorizontalLine: \"\\u2500\",\n Hscr: \"\\u210B\",\n hscr: \"\\uD835\\uDCBD\",\n hslash: \"\\u210F\",\n Hstrok: \"\\u0126\",\n hstrok: \"\\u0127\",\n HumpDownHump: \"\\u224E\",\n HumpEqual: \"\\u224F\",\n hybull: \"\\u2043\",\n hyphen: \"\\u2010\",\n Iacute: \"\\xCD\",\n iacute: \"\\xED\",\n ic: \"\\u2063\",\n Icirc: \"\\xCE\",\n icirc: \"\\xEE\",\n Icy: \"\\u0418\",\n icy: \"\\u0438\",\n Idot: \"\\u0130\",\n IEcy: \"\\u0415\",\n iecy: \"\\u0435\",\n iexcl: \"\\xA1\",\n iff: \"\\u21D4\",\n Ifr: \"\\u2111\",\n ifr: \"\\uD835\\uDD26\",\n Igrave: \"\\xCC\",\n igrave: \"\\xEC\",\n ii: \"\\u2148\",\n iiiint: \"\\u2A0C\",\n iiint: \"\\u222D\",\n iinfin: \"\\u29DC\",\n iiota: \"\\u2129\",\n IJlig: \"\\u0132\",\n ijlig: \"\\u0133\",\n Im: \"\\u2111\",\n Imacr: \"\\u012A\",\n imacr: \"\\u012B\",\n image: \"\\u2111\",\n ImaginaryI: \"\\u2148\",\n imagline: \"\\u2110\",\n imagpart: \"\\u2111\",\n imath: \"\\u0131\",\n imof: \"\\u22B7\",\n imped: \"\\u01B5\",\n Implies: \"\\u21D2\",\n \"in\": \"\\u2208\",\n incare: \"\\u2105\",\n infin: \"\\u221E\",\n infintie: \"\\u29DD\",\n inodot: \"\\u0131\",\n Int: \"\\u222C\",\n \"int\": \"\\u222B\",\n intcal: \"\\u22BA\",\n integers: \"\\u2124\",\n Integral: \"\\u222B\",\n intercal: \"\\u22BA\",\n Intersection: \"\\u22C2\",\n intlarhk: \"\\u2A17\",\n intprod: \"\\u2A3C\",\n InvisibleComma: \"\\u2063\",\n InvisibleTimes: \"\\u2062\",\n IOcy: \"\\u0401\",\n iocy: \"\\u0451\",\n Iogon: \"\\u012E\",\n iogon: \"\\u012F\",\n Iopf: \"\\uD835\\uDD40\",\n iopf: \"\\uD835\\uDD5A\",\n Iota: \"\\u0399\",\n iota: \"\\u03B9\",\n iprod: \"\\u2A3C\",\n iquest: \"\\xBF\",\n Iscr: \"\\u2110\",\n iscr: \"\\uD835\\uDCBE\",\n isin: \"\\u2208\",\n isindot: \"\\u22F5\",\n isinE: \"\\u22F9\",\n isins: \"\\u22F4\",\n isinsv: \"\\u22F3\",\n isinv: \"\\u2208\",\n it: \"\\u2062\",\n Itilde: \"\\u0128\",\n itilde: \"\\u0129\",\n Iukcy: \"\\u0406\",\n iukcy: \"\\u0456\",\n Iuml: \"\\xCF\",\n iuml: \"\\xEF\",\n Jcirc: \"\\u0134\",\n jcirc: \"\\u0135\",\n Jcy: \"\\u0419\",\n jcy: \"\\u0439\",\n Jfr: \"\\uD835\\uDD0D\",\n jfr: \"\\uD835\\uDD27\",\n jmath: \"\\u0237\",\n Jopf: \"\\uD835\\uDD41\",\n jopf: \"\\uD835\\uDD5B\",\n Jscr: \"\\uD835\\uDCA5\",\n jscr: \"\\uD835\\uDCBF\",\n Jsercy: \"\\u0408\",\n jsercy: \"\\u0458\",\n Jukcy: \"\\u0404\",\n jukcy: \"\\u0454\",\n Kappa: \"\\u039A\",\n kappa: \"\\u03BA\",\n kappav: \"\\u03F0\",\n Kcedil: \"\\u0136\",\n kcedil: \"\\u0137\",\n Kcy: \"\\u041A\",\n kcy: \"\\u043A\",\n Kfr: \"\\uD835\\uDD0E\",\n kfr: \"\\uD835\\uDD28\",\n kgreen: \"\\u0138\",\n KHcy: \"\\u0425\",\n khcy: \"\\u0445\",\n KJcy: \"\\u040C\",\n kjcy: \"\\u045C\",\n Kopf: \"\\uD835\\uDD42\",\n kopf: \"\\uD835\\uDD5C\",\n Kscr: \"\\uD835\\uDCA6\",\n kscr: \"\\uD835\\uDCC0\",\n lAarr: \"\\u21DA\",\n Lacute: \"\\u0139\",\n lacute: \"\\u013A\",\n laemptyv: \"\\u29B4\",\n lagran: \"\\u2112\",\n Lambda: \"\\u039B\",\n lambda: \"\\u03BB\",\n Lang: \"\\u27EA\",\n lang: \"\\u27E8\",\n langd: \"\\u2991\",\n langle: \"\\u27E8\",\n lap: \"\\u2A85\",\n Laplacetrf: \"\\u2112\",\n laquo: \"\\xAB\",\n Larr: \"\\u219E\",\n lArr: \"\\u21D0\",\n larr: \"\\u2190\",\n larrb: \"\\u21E4\",\n larrbfs: \"\\u291F\",\n larrfs: \"\\u291D\",\n larrhk: \"\\u21A9\",\n larrlp: \"\\u21AB\",\n larrpl: \"\\u2939\",\n larrsim: \"\\u2973\",\n larrtl: \"\\u21A2\",\n lat: \"\\u2AAB\",\n lAtail: \"\\u291B\",\n latail: \"\\u2919\",\n late: \"\\u2AAD\",\n lates: \"\\u2AAD\\uFE00\",\n lBarr: \"\\u290E\",\n lbarr: \"\\u290C\",\n lbbrk: \"\\u2772\",\n lbrace: \"{\",\n lbrack: \"[\",\n lbrke: \"\\u298B\",\n lbrksld: \"\\u298F\",\n lbrkslu: \"\\u298D\",\n Lcaron: \"\\u013D\",\n lcaron: \"\\u013E\",\n Lcedil: \"\\u013B\",\n lcedil: \"\\u013C\",\n lceil: \"\\u2308\",\n lcub: \"{\",\n Lcy: \"\\u041B\",\n lcy: \"\\u043B\",\n ldca: \"\\u2936\",\n ldquo: \"\\u201C\",\n ldquor: \"\\u201E\",\n ldrdhar: \"\\u2967\",\n ldrushar: \"\\u294B\",\n ldsh: \"\\u21B2\",\n lE: \"\\u2266\",\n le: \"\\u2264\",\n LeftAngleBracket: \"\\u27E8\",\n LeftArrow: \"\\u2190\",\n Leftarrow: \"\\u21D0\",\n leftarrow: \"\\u2190\",\n LeftArrowBar: \"\\u21E4\",\n LeftArrowRightArrow: \"\\u21C6\",\n leftarrowtail: \"\\u21A2\",\n LeftCeiling: \"\\u2308\",\n LeftDoubleBracket: \"\\u27E6\",\n LeftDownTeeVector: \"\\u2961\",\n LeftDownVector: \"\\u21C3\",\n LeftDownVectorBar: \"\\u2959\",\n LeftFloor: \"\\u230A\",\n leftharpoondown: \"\\u21BD\",\n leftharpoonup: \"\\u21BC\",\n leftleftarrows: \"\\u21C7\",\n LeftRightArrow: \"\\u2194\",\n Leftrightarrow: \"\\u21D4\",\n leftrightarrow: \"\\u2194\",\n leftrightarrows: \"\\u21C6\",\n leftrightharpoons: \"\\u21CB\",\n leftrightsquigarrow: \"\\u21AD\",\n LeftRightVector: \"\\u294E\",\n LeftTee: \"\\u22A3\",\n LeftTeeArrow: \"\\u21A4\",\n LeftTeeVector: \"\\u295A\",\n leftthreetimes: \"\\u22CB\",\n LeftTriangle: \"\\u22B2\",\n LeftTriangleBar: \"\\u29CF\",\n LeftTriangleEqual: \"\\u22B4\",\n LeftUpDownVector: \"\\u2951\",\n LeftUpTeeVector: \"\\u2960\",\n LeftUpVector: \"\\u21BF\",\n LeftUpVectorBar: \"\\u2958\",\n LeftVector: \"\\u21BC\",\n LeftVectorBar: \"\\u2952\",\n lEg: \"\\u2A8B\",\n leg: \"\\u22DA\",\n leq: \"\\u2264\",\n leqq: \"\\u2266\",\n leqslant: \"\\u2A7D\",\n les: \"\\u2A7D\",\n lescc: \"\\u2AA8\",\n lesdot: \"\\u2A7F\",\n lesdoto: \"\\u2A81\",\n lesdotor: \"\\u2A83\",\n lesg: \"\\u22DA\\uFE00\",\n lesges: \"\\u2A93\",\n lessapprox: \"\\u2A85\",\n lessdot: \"\\u22D6\",\n lesseqgtr: \"\\u22DA\",\n lesseqqgtr: \"\\u2A8B\",\n LessEqualGreater: \"\\u22DA\",\n LessFullEqual: \"\\u2266\",\n LessGreater: \"\\u2276\",\n lessgtr: \"\\u2276\",\n LessLess: \"\\u2AA1\",\n lesssim: \"\\u2272\",\n LessSlantEqual: \"\\u2A7D\",\n LessTilde: \"\\u2272\",\n lfisht: \"\\u297C\",\n lfloor: \"\\u230A\",\n Lfr: \"\\uD835\\uDD0F\",\n lfr: \"\\uD835\\uDD29\",\n lg: \"\\u2276\",\n lgE: \"\\u2A91\",\n lHar: \"\\u2962\",\n lhard: \"\\u21BD\",\n lharu: \"\\u21BC\",\n lharul: \"\\u296A\",\n lhblk: \"\\u2584\",\n LJcy: \"\\u0409\",\n ljcy: \"\\u0459\",\n Ll: \"\\u22D8\",\n ll: \"\\u226A\",\n llarr: \"\\u21C7\",\n llcorner: \"\\u231E\",\n Lleftarrow: \"\\u21DA\",\n llhard: \"\\u296B\",\n lltri: \"\\u25FA\",\n Lmidot: \"\\u013F\",\n lmidot: \"\\u0140\",\n lmoust: \"\\u23B0\",\n lmoustache: \"\\u23B0\",\n lnap: \"\\u2A89\",\n lnapprox: \"\\u2A89\",\n lnE: \"\\u2268\",\n lne: \"\\u2A87\",\n lneq: \"\\u2A87\",\n lneqq: \"\\u2268\",\n lnsim: \"\\u22E6\",\n loang: \"\\u27EC\",\n loarr: \"\\u21FD\",\n lobrk: \"\\u27E6\",\n LongLeftArrow: \"\\u27F5\",\n Longleftarrow: \"\\u27F8\",\n longleftarrow: \"\\u27F5\",\n LongLeftRightArrow: \"\\u27F7\",\n Longleftrightarrow: \"\\u27FA\",\n longleftrightarrow: \"\\u27F7\",\n longmapsto: \"\\u27FC\",\n LongRightArrow: \"\\u27F6\",\n Longrightarrow: \"\\u27F9\",\n longrightarrow: \"\\u27F6\",\n looparrowleft: \"\\u21AB\",\n looparrowright: \"\\u21AC\",\n lopar: \"\\u2985\",\n Lopf: \"\\uD835\\uDD43\",\n lopf: \"\\uD835\\uDD5D\",\n loplus: \"\\u2A2D\",\n lotimes: \"\\u2A34\",\n lowast: \"\\u2217\",\n lowbar: \"_\",\n LowerLeftArrow: \"\\u2199\",\n LowerRightArrow: \"\\u2198\",\n loz: \"\\u25CA\",\n lozenge: \"\\u25CA\",\n lozf: \"\\u29EB\",\n lpar: \"(\",\n lparlt: \"\\u2993\",\n lrarr: \"\\u21C6\",\n lrcorner: \"\\u231F\",\n lrhar: \"\\u21CB\",\n lrhard: \"\\u296D\",\n lrm: \"\\u200E\",\n lrtri: \"\\u22BF\",\n lsaquo: \"\\u2039\",\n Lscr: \"\\u2112\",\n lscr: \"\\uD835\\uDCC1\",\n Lsh: \"\\u21B0\",\n lsh: \"\\u21B0\",\n lsim: \"\\u2272\",\n lsime: \"\\u2A8D\",\n lsimg: \"\\u2A8F\",\n lsqb: \"[\",\n lsquo: \"\\u2018\",\n lsquor: \"\\u201A\",\n Lstrok: \"\\u0141\",\n lstrok: \"\\u0142\",\n Lt: \"\\u226A\",\n LT: \"<\",\n lt: \"<\",\n ltcc: \"\\u2AA6\",\n ltcir: \"\\u2A79\",\n ltdot: \"\\u22D6\",\n lthree: \"\\u22CB\",\n ltimes: \"\\u22C9\",\n ltlarr: \"\\u2976\",\n ltquest: \"\\u2A7B\",\n ltri: \"\\u25C3\",\n ltrie: \"\\u22B4\",\n ltrif: \"\\u25C2\",\n ltrPar: \"\\u2996\",\n lurdshar: \"\\u294A\",\n luruhar: \"\\u2966\",\n lvertneqq: \"\\u2268\\uFE00\",\n lvnE: \"\\u2268\\uFE00\",\n macr: \"\\xAF\",\n male: \"\\u2642\",\n malt: \"\\u2720\",\n maltese: \"\\u2720\",\n Map: \"\\u2905\",\n map: \"\\u21A6\",\n mapsto: \"\\u21A6\",\n mapstodown: \"\\u21A7\",\n mapstoleft: \"\\u21A4\",\n mapstoup: \"\\u21A5\",\n marker: \"\\u25AE\",\n mcomma: \"\\u2A29\",\n Mcy: \"\\u041C\",\n mcy: \"\\u043C\",\n mdash: \"\\u2014\",\n mDDot: \"\\u223A\",\n measuredangle: \"\\u2221\",\n MediumSpace: \"\\u205F\",\n Mellintrf: \"\\u2133\",\n Mfr: \"\\uD835\\uDD10\",\n mfr: \"\\uD835\\uDD2A\",\n mho: \"\\u2127\",\n micro: \"\\xB5\",\n mid: \"\\u2223\",\n midast: \"*\",\n midcir: \"\\u2AF0\",\n middot: \"\\xB7\",\n minus: \"\\u2212\",\n minusb: \"\\u229F\",\n minusd: \"\\u2238\",\n minusdu: \"\\u2A2A\",\n MinusPlus: \"\\u2213\",\n mlcp: \"\\u2ADB\",\n mldr: \"\\u2026\",\n mnplus: \"\\u2213\",\n models: \"\\u22A7\",\n Mopf: \"\\uD835\\uDD44\",\n mopf: \"\\uD835\\uDD5E\",\n mp: \"\\u2213\",\n Mscr: \"\\u2133\",\n mscr: \"\\uD835\\uDCC2\",\n mstpos: \"\\u223E\",\n Mu: \"\\u039C\",\n mu: \"\\u03BC\",\n multimap: \"\\u22B8\",\n mumap: \"\\u22B8\",\n nabla: \"\\u2207\",\n Nacute: \"\\u0143\",\n nacute: \"\\u0144\",\n nang: \"\\u2220\\u20D2\",\n nap: \"\\u2249\",\n napE: \"\\u2A70\\u0338\",\n napid: \"\\u224B\\u0338\",\n napos: \"\\u0149\",\n napprox: \"\\u2249\",\n natur: \"\\u266E\",\n natural: \"\\u266E\",\n naturals: \"\\u2115\",\n nbsp: \"\\xA0\",\n nbump: \"\\u224E\\u0338\",\n nbumpe: \"\\u224F\\u0338\",\n ncap: \"\\u2A43\",\n Ncaron: \"\\u0147\",\n ncaron: \"\\u0148\",\n Ncedil: \"\\u0145\",\n ncedil: \"\\u0146\",\n ncong: \"\\u2247\",\n ncongdot: \"\\u2A6D\\u0338\",\n ncup: \"\\u2A42\",\n Ncy: \"\\u041D\",\n ncy: \"\\u043D\",\n ndash: \"\\u2013\",\n ne: \"\\u2260\",\n nearhk: \"\\u2924\",\n neArr: \"\\u21D7\",\n nearr: \"\\u2197\",\n nearrow: \"\\u2197\",\n nedot: \"\\u2250\\u0338\",\n NegativeMediumSpace: \"\\u200B\",\n NegativeThickSpace: \"\\u200B\",\n NegativeThinSpace: \"\\u200B\",\n NegativeVeryThinSpace: \"\\u200B\",\n nequiv: \"\\u2262\",\n nesear: \"\\u2928\",\n nesim: \"\\u2242\\u0338\",\n NestedGreaterGreater: \"\\u226B\",\n NestedLessLess: \"\\u226A\",\n NewLine: \"\\n\",\n nexist: \"\\u2204\",\n nexists: \"\\u2204\",\n Nfr: \"\\uD835\\uDD11\",\n nfr: \"\\uD835\\uDD2B\",\n ngE: \"\\u2267\\u0338\",\n nge: \"\\u2271\",\n ngeq: \"\\u2271\",\n ngeqq: \"\\u2267\\u0338\",\n ngeqslant: \"\\u2A7E\\u0338\",\n nges: \"\\u2A7E\\u0338\",\n nGg: \"\\u22D9\\u0338\",\n ngsim: \"\\u2275\",\n nGt: \"\\u226B\\u20D2\",\n ngt: \"\\u226F\",\n ngtr: \"\\u226F\",\n nGtv: \"\\u226B\\u0338\",\n nhArr: \"\\u21CE\",\n nharr: \"\\u21AE\",\n nhpar: \"\\u2AF2\",\n ni: \"\\u220B\",\n nis: \"\\u22FC\",\n nisd: \"\\u22FA\",\n niv: \"\\u220B\",\n NJcy: \"\\u040A\",\n njcy: \"\\u045A\",\n nlArr: \"\\u21CD\",\n nlarr: \"\\u219A\",\n nldr: \"\\u2025\",\n nlE: \"\\u2266\\u0338\",\n nle: \"\\u2270\",\n nLeftarrow: \"\\u21CD\",\n nleftarrow: \"\\u219A\",\n nLeftrightarrow: \"\\u21CE\",\n nleftrightarrow: \"\\u21AE\",\n nleq: \"\\u2270\",\n nleqq: \"\\u2266\\u0338\",\n nleqslant: \"\\u2A7D\\u0338\",\n nles: \"\\u2A7D\\u0338\",\n nless: \"\\u226E\",\n nLl: \"\\u22D8\\u0338\",\n nlsim: \"\\u2274\",\n nLt: \"\\u226A\\u20D2\",\n nlt: \"\\u226E\",\n nltri: \"\\u22EA\",\n nltrie: \"\\u22EC\",\n nLtv: \"\\u226A\\u0338\",\n nmid: \"\\u2224\",\n NoBreak: \"\\u2060\",\n NonBreakingSpace: \"\\xA0\",\n Nopf: \"\\u2115\",\n nopf: \"\\uD835\\uDD5F\",\n Not: \"\\u2AEC\",\n not: \"\\xAC\",\n NotCongruent: \"\\u2262\",\n NotCupCap: \"\\u226D\",\n NotDoubleVerticalBar: \"\\u2226\",\n NotElement: \"\\u2209\",\n NotEqual: \"\\u2260\",\n NotEqualTilde: \"\\u2242\\u0338\",\n NotExists: \"\\u2204\",\n NotGreater: \"\\u226F\",\n NotGreaterEqual: \"\\u2271\",\n NotGreaterFullEqual: \"\\u2267\\u0338\",\n NotGreaterGreater: \"\\u226B\\u0338\",\n NotGreaterLess: \"\\u2279\",\n NotGreaterSlantEqual: \"\\u2A7E\\u0338\",\n NotGreaterTilde: \"\\u2275\",\n NotHumpDownHump: \"\\u224E\\u0338\",\n NotHumpEqual: \"\\u224F\\u0338\",\n notin: \"\\u2209\",\n notindot: \"\\u22F5\\u0338\",\n notinE: \"\\u22F9\\u0338\",\n notinva: \"\\u2209\",\n notinvb: \"\\u22F7\",\n notinvc: \"\\u22F6\",\n NotLeftTriangle: \"\\u22EA\",\n NotLeftTriangleBar: \"\\u29CF\\u0338\",\n NotLeftTriangleEqual: \"\\u22EC\",\n NotLess: \"\\u226E\",\n NotLessEqual: \"\\u2270\",\n NotLessGreater: \"\\u2278\",\n NotLessLess: \"\\u226A\\u0338\",\n NotLessSlantEqual: \"\\u2A7D\\u0338\",\n NotLessTilde: \"\\u2274\",\n NotNestedGreaterGreater: \"\\u2AA2\\u0338\",\n NotNestedLessLess: \"\\u2AA1\\u0338\",\n notni: \"\\u220C\",\n notniva: \"\\u220C\",\n notnivb: \"\\u22FE\",\n notnivc: \"\\u22FD\",\n NotPrecedes: \"\\u2280\",\n NotPrecedesEqual: \"\\u2AAF\\u0338\",\n NotPrecedesSlantEqual: \"\\u22E0\",\n NotReverseElement: \"\\u220C\",\n NotRightTriangle: \"\\u22EB\",\n NotRightTriangleBar: \"\\u29D0\\u0338\",\n NotRightTriangleEqual: \"\\u22ED\",\n NotSquareSubset: \"\\u228F\\u0338\",\n NotSquareSubsetEqual: \"\\u22E2\",\n NotSquareSuperset: \"\\u2290\\u0338\",\n NotSquareSupersetEqual: \"\\u22E3\",\n NotSubset: \"\\u2282\\u20D2\",\n NotSubsetEqual: \"\\u2288\",\n NotSucceeds: \"\\u2281\",\n NotSucceedsEqual: \"\\u2AB0\\u0338\",\n NotSucceedsSlantEqual: \"\\u22E1\",\n NotSucceedsTilde: \"\\u227F\\u0338\",\n NotSuperset: \"\\u2283\\u20D2\",\n NotSupersetEqual: \"\\u2289\",\n NotTilde: \"\\u2241\",\n NotTildeEqual: \"\\u2244\",\n NotTildeFullEqual: \"\\u2247\",\n NotTildeTilde: \"\\u2249\",\n NotVerticalBar: \"\\u2224\",\n npar: \"\\u2226\",\n nparallel: \"\\u2226\",\n nparsl: \"\\u2AFD\\u20E5\",\n npart: \"\\u2202\\u0338\",\n npolint: \"\\u2A14\",\n npr: \"\\u2280\",\n nprcue: \"\\u22E0\",\n npre: \"\\u2AAF\\u0338\",\n nprec: \"\\u2280\",\n npreceq: \"\\u2AAF\\u0338\",\n nrArr: \"\\u21CF\",\n nrarr: \"\\u219B\",\n nrarrc: \"\\u2933\\u0338\",\n nrarrw: \"\\u219D\\u0338\",\n nRightarrow: \"\\u21CF\",\n nrightarrow: \"\\u219B\",\n nrtri: \"\\u22EB\",\n nrtrie: \"\\u22ED\",\n nsc: \"\\u2281\",\n nsccue: \"\\u22E1\",\n nsce: \"\\u2AB0\\u0338\",\n Nscr: \"\\uD835\\uDCA9\",\n nscr: \"\\uD835\\uDCC3\",\n nshortmid: \"\\u2224\",\n nshortparallel: \"\\u2226\",\n nsim: \"\\u2241\",\n nsime: \"\\u2244\",\n nsimeq: \"\\u2244\",\n nsmid: \"\\u2224\",\n nspar: \"\\u2226\",\n nsqsube: \"\\u22E2\",\n nsqsupe: \"\\u22E3\",\n nsub: \"\\u2284\",\n nsubE: \"\\u2AC5\\u0338\",\n nsube: \"\\u2288\",\n nsubset: \"\\u2282\\u20D2\",\n nsubseteq: \"\\u2288\",\n nsubseteqq: \"\\u2AC5\\u0338\",\n nsucc: \"\\u2281\",\n nsucceq: \"\\u2AB0\\u0338\",\n nsup: \"\\u2285\",\n nsupE: \"\\u2AC6\\u0338\",\n nsupe: \"\\u2289\",\n nsupset: \"\\u2283\\u20D2\",\n nsupseteq: \"\\u2289\",\n nsupseteqq: \"\\u2AC6\\u0338\",\n ntgl: \"\\u2279\",\n Ntilde: \"\\xD1\",\n ntilde: \"\\xF1\",\n ntlg: \"\\u2278\",\n ntriangleleft: \"\\u22EA\",\n ntrianglelefteq: \"\\u22EC\",\n ntriangleright: \"\\u22EB\",\n ntrianglerighteq: \"\\u22ED\",\n Nu: \"\\u039D\",\n nu: \"\\u03BD\",\n num: \"#\",\n numero: \"\\u2116\",\n numsp: \"\\u2007\",\n nvap: \"\\u224D\\u20D2\",\n nVDash: \"\\u22AF\",\n nVdash: \"\\u22AE\",\n nvDash: \"\\u22AD\",\n nvdash: \"\\u22AC\",\n nvge: \"\\u2265\\u20D2\",\n nvgt: \">\\u20D2\",\n nvHarr: \"\\u2904\",\n nvinfin: \"\\u29DE\",\n nvlArr: \"\\u2902\",\n nvle: \"\\u2264\\u20D2\",\n nvlt: \"<\\u20D2\",\n nvltrie: \"\\u22B4\\u20D2\",\n nvrArr: \"\\u2903\",\n nvrtrie: \"\\u22B5\\u20D2\",\n nvsim: \"\\u223C\\u20D2\",\n nwarhk: \"\\u2923\",\n nwArr: \"\\u21D6\",\n nwarr: \"\\u2196\",\n nwarrow: \"\\u2196\",\n nwnear: \"\\u2927\",\n Oacute: \"\\xD3\",\n oacute: \"\\xF3\",\n oast: \"\\u229B\",\n ocir: \"\\u229A\",\n Ocirc: \"\\xD4\",\n ocirc: \"\\xF4\",\n Ocy: \"\\u041E\",\n ocy: \"\\u043E\",\n odash: \"\\u229D\",\n Odblac: \"\\u0150\",\n odblac: \"\\u0151\",\n odiv: \"\\u2A38\",\n odot: \"\\u2299\",\n odsold: \"\\u29BC\",\n OElig: \"\\u0152\",\n oelig: \"\\u0153\",\n ofcir: \"\\u29BF\",\n Ofr: \"\\uD835\\uDD12\",\n ofr: \"\\uD835\\uDD2C\",\n ogon: \"\\u02DB\",\n Ograve: \"\\xD2\",\n ograve: \"\\xF2\",\n ogt: \"\\u29C1\",\n ohbar: \"\\u29B5\",\n ohm: \"\\u03A9\",\n oint: \"\\u222E\",\n olarr: \"\\u21BA\",\n olcir: \"\\u29BE\",\n olcross: \"\\u29BB\",\n oline: \"\\u203E\",\n olt: \"\\u29C0\",\n Omacr: \"\\u014C\",\n omacr: \"\\u014D\",\n Omega: \"\\u03A9\",\n omega: \"\\u03C9\",\n Omicron: \"\\u039F\",\n omicron: \"\\u03BF\",\n omid: \"\\u29B6\",\n ominus: \"\\u2296\",\n Oopf: \"\\uD835\\uDD46\",\n oopf: \"\\uD835\\uDD60\",\n opar: \"\\u29B7\",\n OpenCurlyDoubleQuote: \"\\u201C\",\n OpenCurlyQuote: \"\\u2018\",\n operp: \"\\u29B9\",\n oplus: \"\\u2295\",\n Or: \"\\u2A54\",\n or: \"\\u2228\",\n orarr: \"\\u21BB\",\n ord: \"\\u2A5D\",\n order: \"\\u2134\",\n orderof: \"\\u2134\",\n ordf: \"\\xAA\",\n ordm: \"\\xBA\",\n origof: \"\\u22B6\",\n oror: \"\\u2A56\",\n orslope: \"\\u2A57\",\n orv: \"\\u2A5B\",\n oS: \"\\u24C8\",\n Oscr: \"\\uD835\\uDCAA\",\n oscr: \"\\u2134\",\n Oslash: \"\\xD8\",\n oslash: \"\\xF8\",\n osol: \"\\u2298\",\n Otilde: \"\\xD5\",\n otilde: \"\\xF5\",\n Otimes: \"\\u2A37\",\n otimes: \"\\u2297\",\n otimesas: \"\\u2A36\",\n Ouml: \"\\xD6\",\n ouml: \"\\xF6\",\n ovbar: \"\\u233D\",\n OverBar: \"\\u203E\",\n OverBrace: \"\\u23DE\",\n OverBracket: \"\\u23B4\",\n OverParenthesis: \"\\u23DC\",\n par: \"\\u2225\",\n para: \"\\xB6\",\n parallel: \"\\u2225\",\n parsim: \"\\u2AF3\",\n parsl: \"\\u2AFD\",\n part: \"\\u2202\",\n PartialD: \"\\u2202\",\n Pcy: \"\\u041F\",\n pcy: \"\\u043F\",\n percnt: \"%\",\n period: \".\",\n permil: \"\\u2030\",\n perp: \"\\u22A5\",\n pertenk: \"\\u2031\",\n Pfr: \"\\uD835\\uDD13\",\n pfr: \"\\uD835\\uDD2D\",\n Phi: \"\\u03A6\",\n phi: \"\\u03C6\",\n phiv: \"\\u03D5\",\n phmmat: \"\\u2133\",\n phone: \"\\u260E\",\n Pi: \"\\u03A0\",\n pi: \"\\u03C0\",\n pitchfork: \"\\u22D4\",\n piv: \"\\u03D6\",\n planck: \"\\u210F\",\n planckh: \"\\u210E\",\n plankv: \"\\u210F\",\n plus: \"+\",\n plusacir: \"\\u2A23\",\n plusb: \"\\u229E\",\n pluscir: \"\\u2A22\",\n plusdo: \"\\u2214\",\n plusdu: \"\\u2A25\",\n pluse: \"\\u2A72\",\n PlusMinus: \"\\xB1\",\n plusmn: \"\\xB1\",\n plussim: \"\\u2A26\",\n plustwo: \"\\u2A27\",\n pm: \"\\xB1\",\n Poincareplane: \"\\u210C\",\n pointint: \"\\u2A15\",\n Popf: \"\\u2119\",\n popf: \"\\uD835\\uDD61\",\n pound: \"\\xA3\",\n Pr: \"\\u2ABB\",\n pr: \"\\u227A\",\n prap: \"\\u2AB7\",\n prcue: \"\\u227C\",\n prE: \"\\u2AB3\",\n pre: \"\\u2AAF\",\n prec: \"\\u227A\",\n precapprox: \"\\u2AB7\",\n preccurlyeq: \"\\u227C\",\n Precedes: \"\\u227A\",\n PrecedesEqual: \"\\u2AAF\",\n PrecedesSlantEqual: \"\\u227C\",\n PrecedesTilde: \"\\u227E\",\n preceq: \"\\u2AAF\",\n precnapprox: \"\\u2AB9\",\n precneqq: \"\\u2AB5\",\n precnsim: \"\\u22E8\",\n precsim: \"\\u227E\",\n Prime: \"\\u2033\",\n prime: \"\\u2032\",\n primes: \"\\u2119\",\n prnap: \"\\u2AB9\",\n prnE: \"\\u2AB5\",\n prnsim: \"\\u22E8\",\n prod: \"\\u220F\",\n Product: \"\\u220F\",\n profalar: \"\\u232E\",\n profline: \"\\u2312\",\n profsurf: \"\\u2313\",\n prop: \"\\u221D\",\n Proportion: \"\\u2237\",\n Proportional: \"\\u221D\",\n propto: \"\\u221D\",\n prsim: \"\\u227E\",\n prurel: \"\\u22B0\",\n Pscr: \"\\uD835\\uDCAB\",\n pscr: \"\\uD835\\uDCC5\",\n Psi: \"\\u03A8\",\n psi: \"\\u03C8\",\n puncsp: \"\\u2008\",\n Qfr: \"\\uD835\\uDD14\",\n qfr: \"\\uD835\\uDD2E\",\n qint: \"\\u2A0C\",\n Qopf: \"\\u211A\",\n qopf: \"\\uD835\\uDD62\",\n qprime: \"\\u2057\",\n Qscr: \"\\uD835\\uDCAC\",\n qscr: \"\\uD835\\uDCC6\",\n quaternions: \"\\u210D\",\n quatint: \"\\u2A16\",\n quest: \"?\",\n questeq: \"\\u225F\",\n QUOT: \"\\\"\",\n quot: \"\\\"\",\n rAarr: \"\\u21DB\",\n race: \"\\u223D\\u0331\",\n Racute: \"\\u0154\",\n racute: \"\\u0155\",\n radic: \"\\u221A\",\n raemptyv: \"\\u29B3\",\n Rang: \"\\u27EB\",\n rang: \"\\u27E9\",\n rangd: \"\\u2992\",\n range: \"\\u29A5\",\n rangle: \"\\u27E9\",\n raquo: \"\\xBB\",\n Rarr: \"\\u21A0\",\n rArr: \"\\u21D2\",\n rarr: \"\\u2192\",\n rarrap: \"\\u2975\",\n rarrb: \"\\u21E5\",\n rarrbfs: \"\\u2920\",\n rarrc: \"\\u2933\",\n rarrfs: \"\\u291E\",\n rarrhk: \"\\u21AA\",\n rarrlp: \"\\u21AC\",\n rarrpl: \"\\u2945\",\n rarrsim: \"\\u2974\",\n Rarrtl: \"\\u2916\",\n rarrtl: \"\\u21A3\",\n rarrw: \"\\u219D\",\n rAtail: \"\\u291C\",\n ratail: \"\\u291A\",\n ratio: \"\\u2236\",\n rationals: \"\\u211A\",\n RBarr: \"\\u2910\",\n rBarr: \"\\u290F\",\n rbarr: \"\\u290D\",\n rbbrk: \"\\u2773\",\n rbrace: \"}\",\n rbrack: \"]\",\n rbrke: \"\\u298C\",\n rbrksld: \"\\u298E\",\n rbrkslu: \"\\u2990\",\n Rcaron: \"\\u0158\",\n rcaron: \"\\u0159\",\n Rcedil: \"\\u0156\",\n rcedil: \"\\u0157\",\n rceil: \"\\u2309\",\n rcub: \"}\",\n Rcy: \"\\u0420\",\n rcy: \"\\u0440\",\n rdca: \"\\u2937\",\n rdldhar: \"\\u2969\",\n rdquo: \"\\u201D\",\n rdquor: \"\\u201D\",\n rdsh: \"\\u21B3\",\n Re: \"\\u211C\",\n real: \"\\u211C\",\n realine: \"\\u211B\",\n realpart: \"\\u211C\",\n reals: \"\\u211D\",\n rect: \"\\u25AD\",\n REG: \"\\xAE\",\n reg: \"\\xAE\",\n ReverseElement: \"\\u220B\",\n ReverseEquilibrium: \"\\u21CB\",\n ReverseUpEquilibrium: \"\\u296F\",\n rfisht: \"\\u297D\",\n rfloor: \"\\u230B\",\n Rfr: \"\\u211C\",\n rfr: \"\\uD835\\uDD2F\",\n rHar: \"\\u2964\",\n rhard: \"\\u21C1\",\n rharu: \"\\u21C0\",\n rharul: \"\\u296C\",\n Rho: \"\\u03A1\",\n rho: \"\\u03C1\",\n rhov: \"\\u03F1\",\n RightAngleBracket: \"\\u27E9\",\n RightArrow: \"\\u2192\",\n Rightarrow: \"\\u21D2\",\n rightarrow: \"\\u2192\",\n RightArrowBar: \"\\u21E5\",\n RightArrowLeftArrow: \"\\u21C4\",\n rightarrowtail: \"\\u21A3\",\n RightCeiling: \"\\u2309\",\n RightDoubleBracket: \"\\u27E7\",\n RightDownTeeVector: \"\\u295D\",\n RightDownVector: \"\\u21C2\",\n RightDownVectorBar: \"\\u2955\",\n RightFloor: \"\\u230B\",\n rightharpoondown: \"\\u21C1\",\n rightharpoonup: \"\\u21C0\",\n rightleftarrows: \"\\u21C4\",\n rightleftharpoons: \"\\u21CC\",\n rightrightarrows: \"\\u21C9\",\n rightsquigarrow: \"\\u219D\",\n RightTee: \"\\u22A2\",\n RightTeeArrow: \"\\u21A6\",\n RightTeeVector: \"\\u295B\",\n rightthreetimes: \"\\u22CC\",\n RightTriangle: \"\\u22B3\",\n RightTriangleBar: \"\\u29D0\",\n RightTriangleEqual: \"\\u22B5\",\n RightUpDownVector: \"\\u294F\",\n RightUpTeeVector: \"\\u295C\",\n RightUpVector: \"\\u21BE\",\n RightUpVectorBar: \"\\u2954\",\n RightVector: \"\\u21C0\",\n RightVectorBar: \"\\u2953\",\n ring: \"\\u02DA\",\n risingdotseq: \"\\u2253\",\n rlarr: \"\\u21C4\",\n rlhar: \"\\u21CC\",\n rlm: \"\\u200F\",\n rmoust: \"\\u23B1\",\n rmoustache: \"\\u23B1\",\n rnmid: \"\\u2AEE\",\n roang: \"\\u27ED\",\n roarr: \"\\u21FE\",\n robrk: \"\\u27E7\",\n ropar: \"\\u2986\",\n Ropf: \"\\u211D\",\n ropf: \"\\uD835\\uDD63\",\n roplus: \"\\u2A2E\",\n rotimes: \"\\u2A35\",\n RoundImplies: \"\\u2970\",\n rpar: \")\",\n rpargt: \"\\u2994\",\n rppolint: \"\\u2A12\",\n rrarr: \"\\u21C9\",\n Rrightarrow: \"\\u21DB\",\n rsaquo: \"\\u203A\",\n Rscr: \"\\u211B\",\n rscr: \"\\uD835\\uDCC7\",\n Rsh: \"\\u21B1\",\n rsh: \"\\u21B1\",\n rsqb: \"]\",\n rsquo: \"\\u2019\",\n rsquor: \"\\u2019\",\n rthree: \"\\u22CC\",\n rtimes: \"\\u22CA\",\n rtri: \"\\u25B9\",\n rtrie: \"\\u22B5\",\n rtrif: \"\\u25B8\",\n rtriltri: \"\\u29CE\",\n RuleDelayed: \"\\u29F4\",\n ruluhar: \"\\u2968\",\n rx: \"\\u211E\",\n Sacute: \"\\u015A\",\n sacute: \"\\u015B\",\n sbquo: \"\\u201A\",\n Sc: \"\\u2ABC\",\n sc: \"\\u227B\",\n scap: \"\\u2AB8\",\n Scaron: \"\\u0160\",\n scaron: \"\\u0161\",\n sccue: \"\\u227D\",\n scE: \"\\u2AB4\",\n sce: \"\\u2AB0\",\n Scedil: \"\\u015E\",\n scedil: \"\\u015F\",\n Scirc: \"\\u015C\",\n scirc: \"\\u015D\",\n scnap: \"\\u2ABA\",\n scnE: \"\\u2AB6\",\n scnsim: \"\\u22E9\",\n scpolint: \"\\u2A13\",\n scsim: \"\\u227F\",\n Scy: \"\\u0421\",\n scy: \"\\u0441\",\n sdot: \"\\u22C5\",\n sdotb: \"\\u22A1\",\n sdote: \"\\u2A66\",\n searhk: \"\\u2925\",\n seArr: \"\\u21D8\",\n searr: \"\\u2198\",\n searrow: \"\\u2198\",\n sect: \"\\xA7\",\n semi: \";\",\n seswar: \"\\u2929\",\n setminus: \"\\u2216\",\n setmn: \"\\u2216\",\n sext: \"\\u2736\",\n Sfr: \"\\uD835\\uDD16\",\n sfr: \"\\uD835\\uDD30\",\n sfrown: \"\\u2322\",\n sharp: \"\\u266F\",\n SHCHcy: \"\\u0429\",\n shchcy: \"\\u0449\",\n SHcy: \"\\u0428\",\n shcy: \"\\u0448\",\n ShortDownArrow: \"\\u2193\",\n ShortLeftArrow: \"\\u2190\",\n shortmid: \"\\u2223\",\n shortparallel: \"\\u2225\",\n ShortRightArrow: \"\\u2192\",\n ShortUpArrow: \"\\u2191\",\n shy: \"\\xAD\",\n Sigma: \"\\u03A3\",\n sigma: \"\\u03C3\",\n sigmaf: \"\\u03C2\",\n sigmav: \"\\u03C2\",\n sim: \"\\u223C\",\n simdot: \"\\u2A6A\",\n sime: \"\\u2243\",\n simeq: \"\\u2243\",\n simg: \"\\u2A9E\",\n simgE: \"\\u2AA0\",\n siml: \"\\u2A9D\",\n simlE: \"\\u2A9F\",\n simne: \"\\u2246\",\n simplus: \"\\u2A24\",\n simrarr: \"\\u2972\",\n slarr: \"\\u2190\",\n SmallCircle: \"\\u2218\",\n smallsetminus: \"\\u2216\",\n smashp: \"\\u2A33\",\n smeparsl: \"\\u29E4\",\n smid: \"\\u2223\",\n smile: \"\\u2323\",\n smt: \"\\u2AAA\",\n smte: \"\\u2AAC\",\n smtes: \"\\u2AAC\\uFE00\",\n SOFTcy: \"\\u042C\",\n softcy: \"\\u044C\",\n sol: \"/\",\n solb: \"\\u29C4\",\n solbar: \"\\u233F\",\n Sopf: \"\\uD835\\uDD4A\",\n sopf: \"\\uD835\\uDD64\",\n spades: \"\\u2660\",\n spadesuit: \"\\u2660\",\n spar: \"\\u2225\",\n sqcap: \"\\u2293\",\n sqcaps: \"\\u2293\\uFE00\",\n sqcup: \"\\u2294\",\n sqcups: \"\\u2294\\uFE00\",\n Sqrt: \"\\u221A\",\n sqsub: \"\\u228F\",\n sqsube: \"\\u2291\",\n sqsubset: \"\\u228F\",\n sqsubseteq: \"\\u2291\",\n sqsup: \"\\u2290\",\n sqsupe: \"\\u2292\",\n sqsupset: \"\\u2290\",\n sqsupseteq: \"\\u2292\",\n squ: \"\\u25A1\",\n Square: \"\\u25A1\",\n square: \"\\u25A1\",\n SquareIntersection: \"\\u2293\",\n SquareSubset: \"\\u228F\",\n SquareSubsetEqual: \"\\u2291\",\n SquareSuperset: \"\\u2290\",\n SquareSupersetEqual: \"\\u2292\",\n SquareUnion: \"\\u2294\",\n squarf: \"\\u25AA\",\n squf: \"\\u25AA\",\n srarr: \"\\u2192\",\n Sscr: \"\\uD835\\uDCAE\",\n sscr: \"\\uD835\\uDCC8\",\n ssetmn: \"\\u2216\",\n ssmile: \"\\u2323\",\n sstarf: \"\\u22C6\",\n Star: \"\\u22C6\",\n star: \"\\u2606\",\n starf: \"\\u2605\",\n straightepsilon: \"\\u03F5\",\n straightphi: \"\\u03D5\",\n strns: \"\\xAF\",\n Sub: \"\\u22D0\",\n sub: \"\\u2282\",\n subdot: \"\\u2ABD\",\n subE: \"\\u2AC5\",\n sube: \"\\u2286\",\n subedot: \"\\u2AC3\",\n submult: \"\\u2AC1\",\n subnE: \"\\u2ACB\",\n subne: \"\\u228A\",\n subplus: \"\\u2ABF\",\n subrarr: \"\\u2979\",\n Subset: \"\\u22D0\",\n subset: \"\\u2282\",\n subseteq: \"\\u2286\",\n subseteqq: \"\\u2AC5\",\n SubsetEqual: \"\\u2286\",\n subsetneq: \"\\u228A\",\n subsetneqq: \"\\u2ACB\",\n subsim: \"\\u2AC7\",\n subsub: \"\\u2AD5\",\n subsup: \"\\u2AD3\",\n succ: \"\\u227B\",\n succapprox: \"\\u2AB8\",\n succcurlyeq: \"\\u227D\",\n Succeeds: \"\\u227B\",\n SucceedsEqual: \"\\u2AB0\",\n SucceedsSlantEqual: \"\\u227D\",\n SucceedsTilde: \"\\u227F\",\n succeq: \"\\u2AB0\",\n succnapprox: \"\\u2ABA\",\n succneqq: \"\\u2AB6\",\n succnsim: \"\\u22E9\",\n succsim: \"\\u227F\",\n SuchThat: \"\\u220B\",\n Sum: \"\\u2211\",\n sum: \"\\u2211\",\n sung: \"\\u266A\",\n Sup: \"\\u22D1\",\n sup: \"\\u2283\",\n sup1: \"\\xB9\",\n sup2: \"\\xB2\",\n sup3: \"\\xB3\",\n supdot: \"\\u2ABE\",\n supdsub: \"\\u2AD8\",\n supE: \"\\u2AC6\",\n supe: \"\\u2287\",\n supedot: \"\\u2AC4\",\n Superset: \"\\u2283\",\n SupersetEqual: \"\\u2287\",\n suphsol: \"\\u27C9\",\n suphsub: \"\\u2AD7\",\n suplarr: \"\\u297B\",\n supmult: \"\\u2AC2\",\n supnE: \"\\u2ACC\",\n supne: \"\\u228B\",\n supplus: \"\\u2AC0\",\n Supset: \"\\u22D1\",\n supset: \"\\u2283\",\n supseteq: \"\\u2287\",\n supseteqq: \"\\u2AC6\",\n supsetneq: \"\\u228B\",\n supsetneqq: \"\\u2ACC\",\n supsim: \"\\u2AC8\",\n supsub: \"\\u2AD4\",\n supsup: \"\\u2AD6\",\n swarhk: \"\\u2926\",\n swArr: \"\\u21D9\",\n swarr: \"\\u2199\",\n swarrow: \"\\u2199\",\n swnwar: \"\\u292A\",\n szlig: \"\\xDF\",\n Tab: \"\\t\",\n target: \"\\u2316\",\n Tau: \"\\u03A4\",\n tau: \"\\u03C4\",\n tbrk: \"\\u23B4\",\n Tcaron: \"\\u0164\",\n tcaron: \"\\u0165\",\n Tcedil: \"\\u0162\",\n tcedil: \"\\u0163\",\n Tcy: \"\\u0422\",\n tcy: \"\\u0442\",\n tdot: \"\\u20DB\",\n telrec: \"\\u2315\",\n Tfr: \"\\uD835\\uDD17\",\n tfr: \"\\uD835\\uDD31\",\n there4: \"\\u2234\",\n Therefore: \"\\u2234\",\n therefore: \"\\u2234\",\n Theta: \"\\u0398\",\n theta: \"\\u03B8\",\n thetasym: \"\\u03D1\",\n thetav: \"\\u03D1\",\n thickapprox: \"\\u2248\",\n thicksim: \"\\u223C\",\n ThickSpace: \"\\u205F\\u200A\",\n thinsp: \"\\u2009\",\n ThinSpace: \"\\u2009\",\n thkap: \"\\u2248\",\n thksim: \"\\u223C\",\n THORN: \"\\xDE\",\n thorn: \"\\xFE\",\n Tilde: \"\\u223C\",\n tilde: \"\\u02DC\",\n TildeEqual: \"\\u2243\",\n TildeFullEqual: \"\\u2245\",\n TildeTilde: \"\\u2248\",\n times: \"\\xD7\",\n timesb: \"\\u22A0\",\n timesbar: \"\\u2A31\",\n timesd: \"\\u2A30\",\n tint: \"\\u222D\",\n toea: \"\\u2928\",\n top: \"\\u22A4\",\n topbot: \"\\u2336\",\n topcir: \"\\u2AF1\",\n Topf: \"\\uD835\\uDD4B\",\n topf: \"\\uD835\\uDD65\",\n topfork: \"\\u2ADA\",\n tosa: \"\\u2929\",\n tprime: \"\\u2034\",\n TRADE: \"\\u2122\",\n trade: \"\\u2122\",\n triangle: \"\\u25B5\",\n triangledown: \"\\u25BF\",\n triangleleft: \"\\u25C3\",\n trianglelefteq: \"\\u22B4\",\n triangleq: \"\\u225C\",\n triangleright: \"\\u25B9\",\n trianglerighteq: \"\\u22B5\",\n tridot: \"\\u25EC\",\n trie: \"\\u225C\",\n triminus: \"\\u2A3A\",\n TripleDot: \"\\u20DB\",\n triplus: \"\\u2A39\",\n trisb: \"\\u29CD\",\n tritime: \"\\u2A3B\",\n trpezium: \"\\u23E2\",\n Tscr: \"\\uD835\\uDCAF\",\n tscr: \"\\uD835\\uDCC9\",\n TScy: \"\\u0426\",\n tscy: \"\\u0446\",\n TSHcy: \"\\u040B\",\n tshcy: \"\\u045B\",\n Tstrok: \"\\u0166\",\n tstrok: \"\\u0167\",\n twixt: \"\\u226C\",\n twoheadleftarrow: \"\\u219E\",\n twoheadrightarrow: \"\\u21A0\",\n Uacute: \"\\xDA\",\n uacute: \"\\xFA\",\n Uarr: \"\\u219F\",\n uArr: \"\\u21D1\",\n uarr: \"\\u2191\",\n Uarrocir: \"\\u2949\",\n Ubrcy: \"\\u040E\",\n ubrcy: \"\\u045E\",\n Ubreve: \"\\u016C\",\n ubreve: \"\\u016D\",\n Ucirc: \"\\xDB\",\n ucirc: \"\\xFB\",\n Ucy: \"\\u0423\",\n ucy: \"\\u0443\",\n udarr: \"\\u21C5\",\n Udblac: \"\\u0170\",\n udblac: \"\\u0171\",\n udhar: \"\\u296E\",\n ufisht: \"\\u297E\",\n Ufr: \"\\uD835\\uDD18\",\n ufr: \"\\uD835\\uDD32\",\n Ugrave: \"\\xD9\",\n ugrave: \"\\xF9\",\n uHar: \"\\u2963\",\n uharl: \"\\u21BF\",\n uharr: \"\\u21BE\",\n uhblk: \"\\u2580\",\n ulcorn: \"\\u231C\",\n ulcorner: \"\\u231C\",\n ulcrop: \"\\u230F\",\n ultri: \"\\u25F8\",\n Umacr: \"\\u016A\",\n umacr: \"\\u016B\",\n uml: \"\\xA8\",\n UnderBar: \"_\",\n UnderBrace: \"\\u23DF\",\n UnderBracket: \"\\u23B5\",\n UnderParenthesis: \"\\u23DD\",\n Union: \"\\u22C3\",\n UnionPlus: \"\\u228E\",\n Uogon: \"\\u0172\",\n uogon: \"\\u0173\",\n Uopf: \"\\uD835\\uDD4C\",\n uopf: \"\\uD835\\uDD66\",\n UpArrow: \"\\u2191\",\n Uparrow: \"\\u21D1\",\n uparrow: \"\\u2191\",\n UpArrowBar: \"\\u2912\",\n UpArrowDownArrow: \"\\u21C5\",\n UpDownArrow: \"\\u2195\",\n Updownarrow: \"\\u21D5\",\n updownarrow: \"\\u2195\",\n UpEquilibrium: \"\\u296E\",\n upharpoonleft: \"\\u21BF\",\n upharpoonright: \"\\u21BE\",\n uplus: \"\\u228E\",\n UpperLeftArrow: \"\\u2196\",\n UpperRightArrow: \"\\u2197\",\n Upsi: \"\\u03D2\",\n upsi: \"\\u03C5\",\n upsih: \"\\u03D2\",\n Upsilon: \"\\u03A5\",\n upsilon: \"\\u03C5\",\n UpTee: \"\\u22A5\",\n UpTeeArrow: \"\\u21A5\",\n upuparrows: \"\\u21C8\",\n urcorn: \"\\u231D\",\n urcorner: \"\\u231D\",\n urcrop: \"\\u230E\",\n Uring: \"\\u016E\",\n uring: \"\\u016F\",\n urtri: \"\\u25F9\",\n Uscr: \"\\uD835\\uDCB0\",\n uscr: \"\\uD835\\uDCCA\",\n utdot: \"\\u22F0\",\n Utilde: \"\\u0168\",\n utilde: \"\\u0169\",\n utri: \"\\u25B5\",\n utrif: \"\\u25B4\",\n uuarr: \"\\u21C8\",\n Uuml: \"\\xDC\",\n uuml: \"\\xFC\",\n uwangle: \"\\u29A7\",\n vangrt: \"\\u299C\",\n varepsilon: \"\\u03F5\",\n varkappa: \"\\u03F0\",\n varnothing: \"\\u2205\",\n varphi: \"\\u03D5\",\n varpi: \"\\u03D6\",\n varpropto: \"\\u221D\",\n vArr: \"\\u21D5\",\n varr: \"\\u2195\",\n varrho: \"\\u03F1\",\n varsigma: \"\\u03C2\",\n varsubsetneq: \"\\u228A\\uFE00\",\n varsubsetneqq: \"\\u2ACB\\uFE00\",\n varsupsetneq: \"\\u228B\\uFE00\",\n varsupsetneqq: \"\\u2ACC\\uFE00\",\n vartheta: \"\\u03D1\",\n vartriangleleft: \"\\u22B2\",\n vartriangleright: \"\\u22B3\",\n Vbar: \"\\u2AEB\",\n vBar: \"\\u2AE8\",\n vBarv: \"\\u2AE9\",\n Vcy: \"\\u0412\",\n vcy: \"\\u0432\",\n VDash: \"\\u22AB\",\n Vdash: \"\\u22A9\",\n vDash: \"\\u22A8\",\n vdash: \"\\u22A2\",\n Vdashl: \"\\u2AE6\",\n Vee: \"\\u22C1\",\n vee: \"\\u2228\",\n veebar: \"\\u22BB\",\n veeeq: \"\\u225A\",\n vellip: \"\\u22EE\",\n Verbar: \"\\u2016\",\n verbar: \"|\",\n Vert: \"\\u2016\",\n vert: \"|\",\n VerticalBar: \"\\u2223\",\n VerticalLine: \"|\",\n VerticalSeparator: \"\\u2758\",\n VerticalTilde: \"\\u2240\",\n VeryThinSpace: \"\\u200A\",\n Vfr: \"\\uD835\\uDD19\",\n vfr: \"\\uD835\\uDD33\",\n vltri: \"\\u22B2\",\n vnsub: \"\\u2282\\u20D2\",\n vnsup: \"\\u2283\\u20D2\",\n Vopf: \"\\uD835\\uDD4D\",\n vopf: \"\\uD835\\uDD67\",\n vprop: \"\\u221D\",\n vrtri: \"\\u22B3\",\n Vscr: \"\\uD835\\uDCB1\",\n vscr: \"\\uD835\\uDCCB\",\n vsubnE: \"\\u2ACB\\uFE00\",\n vsubne: \"\\u228A\\uFE00\",\n vsupnE: \"\\u2ACC\\uFE00\",\n vsupne: \"\\u228B\\uFE00\",\n Vvdash: \"\\u22AA\",\n vzigzag: \"\\u299A\",\n Wcirc: \"\\u0174\",\n wcirc: \"\\u0175\",\n wedbar: \"\\u2A5F\",\n Wedge: \"\\u22C0\",\n wedge: \"\\u2227\",\n wedgeq: \"\\u2259\",\n weierp: \"\\u2118\",\n Wfr: \"\\uD835\\uDD1A\",\n wfr: \"\\uD835\\uDD34\",\n Wopf: \"\\uD835\\uDD4E\",\n wopf: \"\\uD835\\uDD68\",\n wp: \"\\u2118\",\n wr: \"\\u2240\",\n wreath: \"\\u2240\",\n Wscr: \"\\uD835\\uDCB2\",\n wscr: \"\\uD835\\uDCCC\",\n xcap: \"\\u22C2\",\n xcirc: \"\\u25EF\",\n xcup: \"\\u22C3\",\n xdtri: \"\\u25BD\",\n Xfr: \"\\uD835\\uDD1B\",\n xfr: \"\\uD835\\uDD35\",\n xhArr: \"\\u27FA\",\n xharr: \"\\u27F7\",\n Xi: \"\\u039E\",\n xi: \"\\u03BE\",\n xlArr: \"\\u27F8\",\n xlarr: \"\\u27F5\",\n xmap: \"\\u27FC\",\n xnis: \"\\u22FB\",\n xodot: \"\\u2A00\",\n Xopf: \"\\uD835\\uDD4F\",\n xopf: \"\\uD835\\uDD69\",\n xoplus: \"\\u2A01\",\n xotime: \"\\u2A02\",\n xrArr: \"\\u27F9\",\n xrarr: \"\\u27F6\",\n Xscr: \"\\uD835\\uDCB3\",\n xscr: \"\\uD835\\uDCCD\",\n xsqcup: \"\\u2A06\",\n xuplus: \"\\u2A04\",\n xutri: \"\\u25B3\",\n xvee: \"\\u22C1\",\n xwedge: \"\\u22C0\",\n Yacute: \"\\xDD\",\n yacute: \"\\xFD\",\n YAcy: \"\\u042F\",\n yacy: \"\\u044F\",\n Ycirc: \"\\u0176\",\n ycirc: \"\\u0177\",\n Ycy: \"\\u042B\",\n ycy: \"\\u044B\",\n yen: \"\\xA5\",\n Yfr: \"\\uD835\\uDD1C\",\n yfr: \"\\uD835\\uDD36\",\n YIcy: \"\\u0407\",\n yicy: \"\\u0457\",\n Yopf: \"\\uD835\\uDD50\",\n yopf: \"\\uD835\\uDD6A\",\n Yscr: \"\\uD835\\uDCB4\",\n yscr: \"\\uD835\\uDCCE\",\n YUcy: \"\\u042E\",\n yucy: \"\\u044E\",\n Yuml: \"\\u0178\",\n yuml: \"\\xFF\",\n Zacute: \"\\u0179\",\n zacute: \"\\u017A\",\n Zcaron: \"\\u017D\",\n zcaron: \"\\u017E\",\n Zcy: \"\\u0417\",\n zcy: \"\\u0437\",\n Zdot: \"\\u017B\",\n zdot: \"\\u017C\",\n zeetrf: \"\\u2128\",\n ZeroWidthSpace: \"\\u200B\",\n Zeta: \"\\u0396\",\n zeta: \"\\u03B6\",\n Zfr: \"\\u2128\",\n zfr: \"\\uD835\\uDD37\",\n ZHcy: \"\\u0416\",\n zhcy: \"\\u0436\",\n zigrarr: \"\\u21DD\",\n Zopf: \"\\u2124\",\n zopf: \"\\uD835\\uDD6B\",\n Zscr: \"\\uD835\\uDCB5\",\n zscr: \"\\uD835\\uDCCF\",\n zwj: \"\\u200D\",\n zwnj: \"\\u200C\"\n});\n\n/**\n * @deprecated use `HTML_ENTITIES` instead\n * @see HTML_ENTITIES\n */\nexports.entityMap = exports.HTML_ENTITIES;","var NAMESPACE = require(\"./conventions\").NAMESPACE;\n\n//[4] \tNameStartChar\t ::= \t\":\" | [A-Z] | \"_\" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]\n//[4a] \tNameChar\t ::= \tNameStartChar | \"-\" | \".\" | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]\n//[5] \tName\t ::= \tNameStartChar (NameChar)*\nvar nameStartChar = /[A-Z_a-z\\xC0-\\xD6\\xD8-\\xF6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]/; //\\u10000-\\uEFFFF\nvar nameChar = new RegExp(\"[\\\\-\\\\.0-9\" + nameStartChar.source.slice(1, -1) + \"\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]\");\nvar tagNamePattern = new RegExp('^' + nameStartChar.source + nameChar.source + '*(?:\\:' + nameStartChar.source + nameChar.source + '*)?$');\n//var tagNamePattern = /^[a-zA-Z_][\\w\\-\\.]*(?:\\:[a-zA-Z_][\\w\\-\\.]*)?$/\n//var handlers = 'resolveEntity,getExternalSubset,characters,endDocument,endElement,endPrefixMapping,ignorableWhitespace,processingInstruction,setDocumentLocator,skippedEntity,startDocument,startElement,startPrefixMapping,notationDecl,unparsedEntityDecl,error,fatalError,warning,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,comment,endCDATA,endDTD,endEntity,startCDATA,startDTD,startEntity'.split(',')\n\n//S_TAG,\tS_ATTR,\tS_EQ,\tS_ATTR_NOQUOT_VALUE\n//S_ATTR_SPACE,\tS_ATTR_END,\tS_TAG_SPACE, S_TAG_CLOSE\nvar S_TAG = 0; //tag name offerring\nvar S_ATTR = 1; //attr name offerring\nvar S_ATTR_SPACE = 2; //attr name end and space offer\nvar S_EQ = 3; //=space?\nvar S_ATTR_NOQUOT_VALUE = 4; //attr value(no quot value only)\nvar S_ATTR_END = 5; //attr value end and no space(quot end)\nvar S_TAG_SPACE = 6; //(attr value end || tag end ) && (space offer)\nvar S_TAG_CLOSE = 7; //closed el<el />\n\n/**\n * Creates an error that will not be caught by XMLReader aka the SAX parser.\n *\n * @param {string} message\n * @param {any?} locator Optional, can provide details about the location in the source\n * @constructor\n */\nfunction ParseError(message, locator) {\n this.message = message;\n this.locator = locator;\n if (Error.captureStackTrace) Error.captureStackTrace(this, ParseError);\n}\nParseError.prototype = new Error();\nParseError.prototype.name = ParseError.name;\nfunction XMLReader() {}\nXMLReader.prototype = {\n parse: function parse(source, defaultNSMap, entityMap) {\n var domBuilder = this.domBuilder;\n domBuilder.startDocument();\n _copy(defaultNSMap, defaultNSMap = {});\n _parse(source, defaultNSMap, entityMap, domBuilder, this.errorHandler);\n domBuilder.endDocument();\n }\n};\nfunction _parse(source, defaultNSMapCopy, entityMap, domBuilder, errorHandler) {\n function fixedFromCharCode(code) {\n // String.prototype.fromCharCode does not supports\n // > 2 bytes unicode chars directly\n if (code > 0xffff) {\n code -= 0x10000;\n var surrogate1 = 0xd800 + (code >> 10),\n surrogate2 = 0xdc00 + (code & 0x3ff);\n return String.fromCharCode(surrogate1, surrogate2);\n } else {\n return String.fromCharCode(code);\n }\n }\n function entityReplacer(a) {\n var k = a.slice(1, -1);\n if (Object.hasOwnProperty.call(entityMap, k)) {\n return entityMap[k];\n } else if (k.charAt(0) === '#') {\n return fixedFromCharCode(parseInt(k.substr(1).replace('x', '0x')));\n } else {\n errorHandler.error('entity not found:' + a);\n return a;\n }\n }\n function appendText(end) {\n //has some bugs\n if (end > start) {\n var xt = source.substring(start, end).replace(/&#?\\w+;/g, entityReplacer);\n locator && position(start);\n domBuilder.characters(xt, 0, end - start);\n start = end;\n }\n }\n function position(p, m) {\n while (p >= lineEnd && (m = linePattern.exec(source))) {\n lineStart = m.index;\n lineEnd = lineStart + m[0].length;\n locator.lineNumber++;\n //console.log('line++:',locator,startPos,endPos)\n }\n locator.columnNumber = p - lineStart + 1;\n }\n var lineStart = 0;\n var lineEnd = 0;\n var linePattern = /.*(?:\\r\\n?|\\n)|.*$/g;\n var locator = domBuilder.locator;\n var parseStack = [{\n currentNSMap: defaultNSMapCopy\n }];\n var closeMap = {};\n var start = 0;\n while (true) {\n try {\n var tagStart = source.indexOf('<', start);\n if (tagStart < 0) {\n if (!source.substr(start).match(/^\\s*$/)) {\n var doc = domBuilder.doc;\n var text = doc.createTextNode(source.substr(start));\n doc.appendChild(text);\n domBuilder.currentElement = text;\n }\n return;\n }\n if (tagStart > start) {\n appendText(tagStart);\n }\n switch (source.charAt(tagStart + 1)) {\n case '/':\n var end = source.indexOf('>', tagStart + 3);\n var tagName = source.substring(tagStart + 2, end).replace(/[ \\t\\n\\r]+$/g, '');\n var config = parseStack.pop();\n if (end < 0) {\n tagName = source.substring(tagStart + 2).replace(/[\\s<].*/, '');\n errorHandler.error(\"end tag name: \" + tagName + ' is not complete:' + config.tagName);\n end = tagStart + 1 + tagName.length;\n } else if (tagName.match(/\\s</)) {\n tagName = tagName.replace(/[\\s<].*/, '');\n errorHandler.error(\"end tag name: \" + tagName + ' maybe not complete');\n end = tagStart + 1 + tagName.length;\n }\n var localNSMap = config.localNSMap;\n var endMatch = config.tagName == tagName;\n var endIgnoreCaseMach = endMatch || config.tagName && config.tagName.toLowerCase() == tagName.toLowerCase();\n if (endIgnoreCaseMach) {\n domBuilder.endElement(config.uri, config.localName, tagName);\n if (localNSMap) {\n for (var prefix in localNSMap) {\n if (Object.prototype.hasOwnProperty.call(localNSMap, prefix)) {\n domBuilder.endPrefixMapping(prefix);\n }\n }\n }\n if (!endMatch) {\n errorHandler.fatalError(\"end tag name: \" + tagName + ' is not match the current start tagName:' + config.tagName); // No known test case\n }\n } else {\n parseStack.push(config);\n }\n end++;\n break;\n // end elment\n case '?':\n // <?...?>\n locator && position(tagStart);\n end = parseInstruction(source, tagStart, domBuilder);\n break;\n case '!':\n // <!doctype,<![CDATA,<!--\n locator && position(tagStart);\n end = parseDCC(source, tagStart, domBuilder, errorHandler);\n break;\n default:\n locator && position(tagStart);\n var el = new ElementAttributes();\n var currentNSMap = parseStack[parseStack.length - 1].currentNSMap;\n //elStartEnd\n var end = parseElementStartPart(source, tagStart, el, currentNSMap, entityReplacer, errorHandler);\n var len = el.length;\n if (!el.closed && fixSelfClosed(source, end, el.tagName, closeMap)) {\n el.closed = true;\n if (!entityMap.nbsp) {\n errorHandler.warning('unclosed xml attribute');\n }\n }\n if (locator && len) {\n var locator2 = copyLocator(locator, {});\n //try{//attribute position fixed\n for (var i = 0; i < len; i++) {\n var a = el[i];\n position(a.offset);\n a.locator = copyLocator(locator, {});\n }\n domBuilder.locator = locator2;\n if (appendElement(el, domBuilder, currentNSMap)) {\n parseStack.push(el);\n }\n domBuilder.locator = locator;\n } else {\n if (appendElement(el, domBuilder, currentNSMap)) {\n parseStack.push(el);\n }\n }\n if (NAMESPACE.isHTML(el.uri) && !el.closed) {\n end = parseHtmlSpecialContent(source, end, el.tagName, entityReplacer, domBuilder);\n } else {\n end++;\n }\n }\n } catch (e) {\n if (e instanceof ParseError) {\n throw e;\n }\n errorHandler.error('element parse error: ' + e);\n end = -1;\n }\n if (end > start) {\n start = end;\n } else {\n //TODO: 这里有可能sax回退,有位置错误风险\n appendText(Math.max(tagStart, start) + 1);\n }\n }\n}\nfunction copyLocator(f, t) {\n t.lineNumber = f.lineNumber;\n t.columnNumber = f.columnNumber;\n return t;\n}\n\n/**\n * @see #appendElement(source,elStartEnd,el,selfClosed,entityReplacer,domBuilder,parseStack);\n * @return end of the elementStartPart(end of elementEndPart for selfClosed el)\n */\nfunction parseElementStartPart(source, start, el, currentNSMap, entityReplacer, errorHandler) {\n /**\n * @param {string} qname\n * @param {string} value\n * @param {number} startIndex\n */\n function addAttribute(qname, value, startIndex) {\n if (el.attributeNames.hasOwnProperty(qname)) {\n errorHandler.fatalError('Attribute ' + qname + ' redefined');\n }\n el.addValue(qname,\n // @see https://www.w3.org/TR/xml/#AVNormalize\n // since the xmldom sax parser does not \"interpret\" DTD the following is not implemented:\n // - recursive replacement of (DTD) entity references\n // - trimming and collapsing multiple spaces into a single one for attributes that are not of type CDATA\n value.replace(/[\\t\\n\\r]/g, ' ').replace(/&#?\\w+;/g, entityReplacer), startIndex);\n }\n var attrName;\n var value;\n var p = ++start;\n var s = S_TAG; //status\n while (true) {\n var c = source.charAt(p);\n switch (c) {\n case '=':\n if (s === S_ATTR) {\n //attrName\n attrName = source.slice(start, p);\n s = S_EQ;\n } else if (s === S_ATTR_SPACE) {\n s = S_EQ;\n } else {\n //fatalError: equal must after attrName or space after attrName\n throw new Error('attribute equal must after attrName'); // No known test case\n }\n break;\n case '\\'':\n case '\"':\n if (s === S_EQ || s === S_ATTR //|| s == S_ATTR_SPACE\n ) {\n //equal\n if (s === S_ATTR) {\n errorHandler.warning('attribute value must after \"=\"');\n attrName = source.slice(start, p);\n }\n start = p + 1;\n p = source.indexOf(c, start);\n if (p > 0) {\n value = source.slice(start, p);\n addAttribute(attrName, value, start - 1);\n s = S_ATTR_END;\n } else {\n //fatalError: no end quot match\n throw new Error('attribute value no end \\'' + c + '\\' match');\n }\n } else if (s == S_ATTR_NOQUOT_VALUE) {\n value = source.slice(start, p);\n addAttribute(attrName, value, start);\n errorHandler.warning('attribute \"' + attrName + '\" missed start quot(' + c + ')!!');\n start = p + 1;\n s = S_ATTR_END;\n } else {\n //fatalError: no equal before\n throw new Error('attribute value must after \"=\"'); // No known test case\n }\n break;\n case '/':\n switch (s) {\n case S_TAG:\n el.setTagName(source.slice(start, p));\n case S_ATTR_END:\n case S_TAG_SPACE:\n case S_TAG_CLOSE:\n s = S_TAG_CLOSE;\n el.closed = true;\n case S_ATTR_NOQUOT_VALUE:\n case S_ATTR:\n break;\n case S_ATTR_SPACE:\n el.closed = true;\n break;\n //case S_EQ:\n default:\n throw new Error(\"attribute invalid close char('/')\");\n // No known test case\n }\n break;\n case '':\n //end document\n errorHandler.error('unexpected end of input');\n if (s == S_TAG) {\n el.setTagName(source.slice(start, p));\n }\n return p;\n case '>':\n switch (s) {\n case S_TAG:\n el.setTagName(source.slice(start, p));\n case S_ATTR_END:\n case S_TAG_SPACE:\n case S_TAG_CLOSE:\n break;\n //normal\n case S_ATTR_NOQUOT_VALUE: //Compatible state\n case S_ATTR:\n value = source.slice(start, p);\n if (value.slice(-1) === '/') {\n el.closed = true;\n value = value.slice(0, -1);\n }\n case S_ATTR_SPACE:\n if (s === S_ATTR_SPACE) {\n value = attrName;\n }\n if (s == S_ATTR_NOQUOT_VALUE) {\n errorHandler.warning('attribute \"' + value + '\" missed quot(\")!');\n addAttribute(attrName, value, start);\n } else {\n if (!NAMESPACE.isHTML(currentNSMap['']) || !value.match(/^(?:disabled|checked|selected)$/i)) {\n errorHandler.warning('attribute \"' + value + '\" missed value!! \"' + value + '\" instead!!');\n }\n addAttribute(value, value, start);\n }\n break;\n case S_EQ:\n throw new Error('attribute value missed!!');\n }\n //\t\t\tconsole.log(tagName,tagNamePattern,tagNamePattern.test(tagName))\n return p;\n /*xml space '\\x20' | #x9 | #xD | #xA; */\n case \"\\x80\":\n c = ' ';\n default:\n if (c <= ' ') {\n //space\n switch (s) {\n case S_TAG:\n el.setTagName(source.slice(start, p)); //tagName\n s = S_TAG_SPACE;\n break;\n case S_ATTR:\n attrName = source.slice(start, p);\n s = S_ATTR_SPACE;\n break;\n case S_ATTR_NOQUOT_VALUE:\n var value = source.slice(start, p);\n errorHandler.warning('attribute \"' + value + '\" missed quot(\")!!');\n addAttribute(attrName, value, start);\n case S_ATTR_END:\n s = S_TAG_SPACE;\n break;\n //case S_TAG_SPACE:\n //case S_EQ:\n //case S_ATTR_SPACE:\n //\tvoid();break;\n //case S_TAG_CLOSE:\n //ignore warning\n }\n } else {\n //not space\n //S_TAG,\tS_ATTR,\tS_EQ,\tS_ATTR_NOQUOT_VALUE\n //S_ATTR_SPACE,\tS_ATTR_END,\tS_TAG_SPACE, S_TAG_CLOSE\n switch (s) {\n //case S_TAG:void();break;\n //case S_ATTR:void();break;\n //case S_ATTR_NOQUOT_VALUE:void();break;\n case S_ATTR_SPACE:\n var tagName = el.tagName;\n if (!NAMESPACE.isHTML(currentNSMap['']) || !attrName.match(/^(?:disabled|checked|selected)$/i)) {\n errorHandler.warning('attribute \"' + attrName + '\" missed value!! \"' + attrName + '\" instead2!!');\n }\n addAttribute(attrName, attrName, start);\n start = p;\n s = S_ATTR;\n break;\n case S_ATTR_END:\n errorHandler.warning('attribute space is required\"' + attrName + '\"!!');\n case S_TAG_SPACE:\n s = S_ATTR;\n start = p;\n break;\n case S_EQ:\n s = S_ATTR_NOQUOT_VALUE;\n start = p;\n break;\n case S_TAG_CLOSE:\n throw new Error(\"elements closed character '/' and '>' must be connected to\");\n }\n }\n } //end outer switch\n //console.log('p++',p)\n p++;\n }\n}\n/**\n * @return true if has new namespace define\n */\nfunction appendElement(el, domBuilder, currentNSMap) {\n var tagName = el.tagName;\n var localNSMap = null;\n //var currentNSMap = parseStack[parseStack.length-1].currentNSMap;\n var i = el.length;\n while (i--) {\n var a = el[i];\n var qName = a.qName;\n var value = a.value;\n var nsp = qName.indexOf(':');\n if (nsp > 0) {\n var prefix = a.prefix = qName.slice(0, nsp);\n var localName = qName.slice(nsp + 1);\n var nsPrefix = prefix === 'xmlns' && localName;\n } else {\n localName = qName;\n prefix = null;\n nsPrefix = qName === 'xmlns' && '';\n }\n //can not set prefix,because prefix !== ''\n a.localName = localName;\n //prefix == null for no ns prefix attribute\n if (nsPrefix !== false) {\n //hack!!\n if (localNSMap == null) {\n localNSMap = {};\n //console.log(currentNSMap,0)\n _copy(currentNSMap, currentNSMap = {});\n //console.log(currentNSMap,1)\n }\n currentNSMap[nsPrefix] = localNSMap[nsPrefix] = value;\n a.uri = NAMESPACE.XMLNS;\n domBuilder.startPrefixMapping(nsPrefix, value);\n }\n }\n var i = el.length;\n while (i--) {\n a = el[i];\n var prefix = a.prefix;\n if (prefix) {\n //no prefix attribute has no namespace\n if (prefix === 'xml') {\n a.uri = NAMESPACE.XML;\n }\n if (prefix !== 'xmlns') {\n a.uri = currentNSMap[prefix || ''];\n\n //{console.log('###'+a.qName,domBuilder.locator.systemId+'',currentNSMap,a.uri)}\n }\n }\n }\n var nsp = tagName.indexOf(':');\n if (nsp > 0) {\n prefix = el.prefix = tagName.slice(0, nsp);\n localName = el.localName = tagName.slice(nsp + 1);\n } else {\n prefix = null; //important!!\n localName = el.localName = tagName;\n }\n //no prefix element has default namespace\n var ns = el.uri = currentNSMap[prefix || ''];\n domBuilder.startElement(ns, localName, tagName, el);\n //endPrefixMapping and startPrefixMapping have not any help for dom builder\n //localNSMap = null\n if (el.closed) {\n domBuilder.endElement(ns, localName, tagName);\n if (localNSMap) {\n for (prefix in localNSMap) {\n if (Object.prototype.hasOwnProperty.call(localNSMap, prefix)) {\n domBuilder.endPrefixMapping(prefix);\n }\n }\n }\n } else {\n el.currentNSMap = currentNSMap;\n el.localNSMap = localNSMap;\n //parseStack.push(el);\n return true;\n }\n}\nfunction parseHtmlSpecialContent(source, elStartEnd, tagName, entityReplacer, domBuilder) {\n if (/^(?:script|textarea)$/i.test(tagName)) {\n var elEndStart = source.indexOf('</' + tagName + '>', elStartEnd);\n var text = source.substring(elStartEnd + 1, elEndStart);\n if (/[&<]/.test(text)) {\n if (/^script$/i.test(tagName)) {\n //if(!/\\]\\]>/.test(text)){\n //lexHandler.startCDATA();\n domBuilder.characters(text, 0, text.length);\n //lexHandler.endCDATA();\n return elEndStart;\n //}\n } //}else{//text area\n text = text.replace(/&#?\\w+;/g, entityReplacer);\n domBuilder.characters(text, 0, text.length);\n return elEndStart;\n //}\n }\n }\n return elStartEnd + 1;\n}\nfunction fixSelfClosed(source, elStartEnd, tagName, closeMap) {\n //if(tagName in closeMap){\n var pos = closeMap[tagName];\n if (pos == null) {\n //console.log(tagName)\n pos = source.lastIndexOf('</' + tagName + '>');\n if (pos < elStartEnd) {\n //忘记闭合\n pos = source.lastIndexOf('</' + tagName);\n }\n closeMap[tagName] = pos;\n }\n return pos < elStartEnd;\n //}\n}\nfunction _copy(source, target) {\n for (var n in source) {\n if (Object.prototype.hasOwnProperty.call(source, n)) {\n target[n] = source[n];\n }\n }\n}\nfunction parseDCC(source, start, domBuilder, errorHandler) {\n //sure start with '<!'\n var next = source.charAt(start + 2);\n switch (next) {\n case '-':\n if (source.charAt(start + 3) === '-') {\n var end = source.indexOf('-->', start + 4);\n //append comment source.substring(4,end)//<!--\n if (end > start) {\n domBuilder.comment(source, start + 4, end - start - 4);\n return end + 3;\n } else {\n errorHandler.error(\"Unclosed comment\");\n return -1;\n }\n } else {\n //error\n return -1;\n }\n default:\n if (source.substr(start + 3, 6) == 'CDATA[') {\n var end = source.indexOf(']]>', start + 9);\n domBuilder.startCDATA();\n domBuilder.characters(source, start + 9, end - start - 9);\n domBuilder.endCDATA();\n return end + 3;\n }\n //<!DOCTYPE\n //startDTD(java.lang.String name, java.lang.String publicId, java.lang.String systemId)\n var matchs = split(source, start);\n var len = matchs.length;\n if (len > 1 && /!doctype/i.test(matchs[0][0])) {\n var name = matchs[1][0];\n var pubid = false;\n var sysid = false;\n if (len > 3) {\n if (/^public$/i.test(matchs[2][0])) {\n pubid = matchs[3][0];\n sysid = len > 4 && matchs[4][0];\n } else if (/^system$/i.test(matchs[2][0])) {\n sysid = matchs[3][0];\n }\n }\n var lastMatch = matchs[len - 1];\n domBuilder.startDTD(name, pubid, sysid);\n domBuilder.endDTD();\n return lastMatch.index + lastMatch[0].length;\n }\n }\n return -1;\n}\nfunction parseInstruction(source, start, domBuilder) {\n var end = source.indexOf('?>', start);\n if (end) {\n var match = source.substring(start, end).match(/^<\\?(\\S*)\\s*([\\s\\S]*?)\\s*$/);\n if (match) {\n var len = match[0].length;\n domBuilder.processingInstruction(match[1], match[2]);\n return end + 2;\n } else {\n //error\n return -1;\n }\n }\n return -1;\n}\nfunction ElementAttributes() {\n this.attributeNames = {};\n}\nElementAttributes.prototype = {\n setTagName: function setTagName(tagName) {\n if (!tagNamePattern.test(tagName)) {\n throw new Error('invalid tagName:' + tagName);\n }\n this.tagName = tagName;\n },\n addValue: function addValue(qName, value, offset) {\n if (!tagNamePattern.test(qName)) {\n throw new Error('invalid attribute:' + qName);\n }\n this.attributeNames[qName] = this.length;\n this[this.length++] = {\n qName: qName,\n value: value,\n offset: offset\n };\n },\n length: 0,\n getLocalName: function getLocalName(i) {\n return this[i].localName;\n },\n getLocator: function getLocator(i) {\n return this[i].locator;\n },\n getQName: function getQName(i) {\n return this[i].qName;\n },\n getURI: function getURI(i) {\n return this[i].uri;\n },\n getValue: function getValue(i) {\n return this[i].value;\n }\n //\t,getIndex:function(uri, localName)){\n //\t\tif(localName){\n //\n //\t\t}else{\n //\t\t\tvar qName = uri\n //\t\t}\n //\t},\n //\tgetValue:function(){return this.getValue(this.getIndex.apply(this,arguments))},\n //\tgetType:function(uri,localName){}\n //\tgetType:function(i){},\n};\nfunction split(source, start) {\n var match;\n var buf = [];\n var reg = /'[^']+'|\"[^\"]+\"|[^\\s<>\\/=]+=?|(\\/?\\s*>|<)/g;\n reg.lastIndex = start;\n reg.exec(source); //skip <\n while (match = reg.exec(source)) {\n buf.push(match);\n if (match[1]) return buf;\n }\n}\nexports.XMLReader = XMLReader;\nexports.ParseError = ParseError;","var MAX_UINT32 = Math.pow(2, 32);\nvar getUint64 = function getUint64(uint8) {\n var dv = new DataView(uint8.buffer, uint8.byteOffset, uint8.byteLength);\n var value;\n if (dv.getBigUint64) {\n value = dv.getBigUint64(0);\n if (value < Number.MAX_SAFE_INTEGER) {\n return Number(value);\n }\n return value;\n }\n return dv.getUint32(0) * MAX_UINT32 + dv.getUint32(4);\n};\nmodule.exports = {\n getUint64: getUint64,\n MAX_UINT32: MAX_UINT32\n};","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n return createInstance(utils.merge(defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports[\"default\"] = axios;","/*!\n * Determine if an object is a Buffer\n *\n * @author Feross Aboukhadijeh <https://feross.org>\n * @license MIT\n */\n\n// The _isBuffer check is for Safari 5-7 support, because it's missing\n// Object.prototype.constructor. Remove this eventually\nmodule.exports = function (obj) {\n return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer);\n};\nfunction isBuffer(obj) {\n return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj);\n}\n\n// For Node v0.10 support. Remove this eventually.\nfunction isSlowBuffer(obj) {\n return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0));\n}","'use strict';\n\nvar defaults = require('./../defaults');\nvar utils = require('./../utils');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\nvar isAbsoluteURL = require('./../helpers/isAbsoluteURL');\nvar combineURLs = require('./../helpers/combineURLs');\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = utils.merge({\n url: arguments[0]\n }, arguments[1]);\n }\n config = utils.merge(defaults, this.defaults, {\n method: 'get'\n }, config);\n config.method = config.method.toLowerCase();\n\n // Support baseURL config\n if (config.baseURL && !isAbsoluteURL(config.url)) {\n config.url = combineURLs(config.baseURL, config.url);\n }\n\n // Hook up interceptors middleware\n var chain = [dispatchRequest, undefined];\n var promise = Promise.resolve(config);\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n chain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n chain.push(interceptor.fulfilled, interceptor.rejected);\n });\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n return promise;\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function (url, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url\n }));\n };\n});\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function (url, data, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\nmodule.exports = Axios;","'use strict';\n\nvar utils = require('../utils');\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n // Note: status is not exposed by XDomainRequest\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError('Request failed with status code ' + response.status, response.config, null, response.request, response));\n }\n};","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n error.request = request;\n error.response = response;\n return error;\n};","'use strict';\n\nvar utils = require('./../utils');\nfunction encode(val) {\n return encodeURIComponent(val).replace(/%40/gi, '@').replace(/%3A/gi, ':').replace(/%24/g, '$').replace(/%2C/gi, ',').replace(/%20/g, '+').replace(/%5B/gi, '[').replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n if (utils.isArray(val)) {\n key = key + '[]';\n }\n if (!utils.isArray(val)) {\n val = [val];\n }\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n serializedParams = parts.join('&');\n }\n if (serializedParams) {\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n return url;\n};","'use strict';\n\nvar utils = require('./../utils');\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n if (!headers) {\n return parsed;\n }\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n if (key) {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n return parsed;\n};","'use strict';\n\nvar utils = require('./../utils');\nmodule.exports = utils.isStandardBrowserEnv() ?\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\nfunction standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: urlParsingNode.pathname.charAt(0) === '/' ? urlParsingNode.pathname : '/' + urlParsingNode.pathname\n };\n }\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = utils.isString(requestURL) ? resolveURL(requestURL) : requestURL;\n return parsed.protocol === originURL.protocol && parsed.host === originURL.host;\n };\n}() :\n// Non standard browser envs (web workers, react-native) lack needed support.\nfunction nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n}();","'use strict';\n\n// btoa polyfill for IE<10 courtesy https://github.com/davidchambers/Base64.js\nvar chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\nfunction E() {\n this.message = 'String contains an invalid character';\n}\nE.prototype = new Error();\nE.prototype.code = 5;\nE.prototype.name = 'InvalidCharacterError';\nfunction btoa(input) {\n var str = String(input);\n var output = '';\n for (\n // initialize result and counter\n var block, charCode, idx = 0, map = chars;\n // if the next str index does not exist:\n // change the mapping table to \"=\"\n // check if d has no fractional digits\n str.charAt(idx | 0) || (map = '=', idx % 1);\n // \"8 - idx % 1 * 8\" generates the sequence 2, 4, 6, 8\n output += map.charAt(63 & block >> 8 - idx % 1 * 8)) {\n charCode = str.charCodeAt(idx += 3 / 4);\n if (charCode > 0xFF) {\n throw new E();\n }\n block = block << 8 | charCode;\n }\n return output;\n}\nmodule.exports = btoa;","'use strict';\n\nvar utils = require('./../utils');\nmodule.exports = utils.isStandardBrowserEnv() ?\n// Standard browser envs support document.cookie\nfunction standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n if (secure === true) {\n cookie.push('secure');\n }\n document.cookie = cookie.join('; ');\n },\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return match ? decodeURIComponent(match[3]) : null;\n },\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n}() :\n// Non standard browser env (web workers, react-native) lack needed support.\nfunction nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() {\n return null;\n },\n remove: function remove() {}\n };\n}();","'use strict';\n\nvar utils = require('./../utils');\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\nmodule.exports = InterceptorManager;","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData(config.data, config.headers, config.transformRequest);\n\n // Flatten headers\n config.headers = utils.merge(config.headers.common || {}, config.headers[config.method] || {}, config.headers || {});\n utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], function cleanHeaderConfig(method) {\n delete config.headers[method];\n });\n var adapter = config.adapter || defaults.adapter;\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData(response.data, response.headers, config.transformResponse);\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData(reason.response.data, reason.response.headers, config.transformResponse);\n }\n }\n return Promise.reject(reason);\n });\n};","'use strict';\n\nvar utils = require('./../utils');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn(data, headers);\n });\n return data;\n};","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"<scheme>://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '') : baseURL;\n};","'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\nmodule.exports = CancelToken;","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};","'use strict';\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.bodyOpenClassName = exports.portalClassName = undefined;\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n};\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nvar _react = require('react');\nvar _react2 = _interopRequireDefault(_react);\nvar _reactDom = require('react-dom');\nvar _reactDom2 = _interopRequireDefault(_reactDom);\nvar _propTypes = require('prop-types');\nvar _propTypes2 = _interopRequireDefault(_propTypes);\nvar _ModalPortal = require('./ModalPortal');\nvar _ModalPortal2 = _interopRequireDefault(_ModalPortal);\nvar _ariaAppHider = require('../helpers/ariaAppHider');\nvar ariaAppHider = _interopRequireWildcard(_ariaAppHider);\nvar _safeHTMLElement = require('../helpers/safeHTMLElement');\nvar _safeHTMLElement2 = _interopRequireDefault(_safeHTMLElement);\nfunction _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];\n }\n }\n newObj[\"default\"] = obj;\n return newObj;\n }\n}\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nfunction _possibleConstructorReturn(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return call && (_typeof(call) === \"object\" || typeof call === \"function\") ? call : self;\n}\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + _typeof(superClass));\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n}\nvar portalClassName = exports.portalClassName = 'ReactModalPortal';\nvar bodyOpenClassName = exports.bodyOpenClassName = 'ReactModal__Body--open';\nvar renderSubtreeIntoContainer = _reactDom2[\"default\"].unstable_renderSubtreeIntoContainer;\nfunction getParentElement(parentSelector) {\n return parentSelector();\n}\nvar Modal = function (_Component) {\n _inherits(Modal, _Component);\n function Modal() {\n var _ref;\n var _temp, _this, _ret;\n _classCallCheck(this, Modal);\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Modal.__proto__ || Object.getPrototypeOf(Modal)).call.apply(_ref, [this].concat(args))), _this), _this.removePortal = function () {\n _reactDom2[\"default\"].unmountComponentAtNode(_this.node);\n var parent = getParentElement(_this.props.parentSelector);\n parent.removeChild(_this.node);\n }, _this.renderPortal = function (props) {\n _this.portal = renderSubtreeIntoContainer(_this, _react2[\"default\"].createElement(_ModalPortal2[\"default\"], _extends({\n defaultStyles: Modal.defaultStyles\n }, props)), _this.node);\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n _createClass(Modal, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.node = document.createElement('div');\n this.node.className = this.props.portalClassName;\n var parent = getParentElement(this.props.parentSelector);\n parent.appendChild(this.node);\n this.renderPortal(this.props);\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(newProps) {\n var isOpen = newProps.isOpen;\n // Stop unnecessary renders if modal is remaining closed\n\n if (!this.props.isOpen && !isOpen) return;\n var currentParent = getParentElement(this.props.parentSelector);\n var newParent = getParentElement(newProps.parentSelector);\n if (newParent !== currentParent) {\n currentParent.removeChild(this.node);\n newParent.appendChild(this.node);\n }\n this.renderPortal(newProps);\n }\n }, {\n key: 'componentWillUpdate',\n value: function componentWillUpdate(newProps) {\n if (newProps.portalClassName !== this.props.portalClassName) {\n this.node.className = newProps.portalClassName;\n }\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n if (!this.node || !this.portal) return;\n var state = this.portal.state;\n var now = Date.now();\n var closesAt = state.isOpen && this.props.closeTimeoutMS && (state.closesAt || now + this.props.closeTimeoutMS);\n if (closesAt) {\n if (!state.beforeClose) {\n this.portal.closeWithTimeout();\n }\n setTimeout(this.removePortal, closesAt - now);\n } else {\n this.removePortal();\n }\n }\n }, {\n key: 'render',\n value: function render() {\n return null;\n }\n }], [{\n key: 'setAppElement',\n value: function setAppElement(element) {\n ariaAppHider.setElement(element);\n }\n\n /* eslint-disable no-console */\n }, {\n key: 'injectCSS',\n value: function injectCSS() {\n process.env.NODE_ENV !== \"production\" && console.warn('React-Modal: injectCSS has been deprecated ' + 'and no longer has any effect. It will be removed in a later version');\n }\n /* eslint-enable no-console */\n\n /* eslint-disable react/no-unused-prop-types */\n\n /* eslint-enable react/no-unused-prop-types */\n }]);\n return Modal;\n}(_react.Component);\nModal.propTypes = {\n isOpen: _propTypes2[\"default\"].bool.isRequired,\n style: _propTypes2[\"default\"].shape({\n content: _propTypes2[\"default\"].object,\n overlay: _propTypes2[\"default\"].object\n }),\n portalClassName: _propTypes2[\"default\"].string,\n bodyOpenClassName: _propTypes2[\"default\"].string,\n className: _propTypes2[\"default\"].oneOfType([_propTypes2[\"default\"].string, _propTypes2[\"default\"].object]),\n overlayClassName: _propTypes2[\"default\"].oneOfType([_propTypes2[\"default\"].string, _propTypes2[\"default\"].object]),\n appElement: _propTypes2[\"default\"].instanceOf(_safeHTMLElement2[\"default\"]),\n onAfterOpen: _propTypes2[\"default\"].func,\n onRequestClose: _propTypes2[\"default\"].func,\n closeTimeoutMS: _propTypes2[\"default\"].number,\n ariaHideApp: _propTypes2[\"default\"].bool,\n shouldFocusAfter: _propTypes2[\"default\"].bool,\n shouldCloseOnOverlayClick: _propTypes2[\"default\"].bool,\n parentSelector: _propTypes2[\"default\"].func,\n aria: _propTypes2[\"default\"].object,\n role: _propTypes2[\"default\"].string,\n contentLabel: _propTypes2[\"default\"].string\n};\nModal.defaultProps = {\n isOpen: false,\n portalClassName: portalClassName,\n bodyOpenClassName: bodyOpenClassName,\n ariaHideApp: true,\n closeTimeoutMS: 0,\n shouldFocusAfterRender: true,\n shouldCloseOnOverlayClick: true,\n parentSelector: function parentSelector() {\n return document.body;\n }\n};\nModal.defaultStyles = {\n overlay: {\n position: 'fixed',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n backgroundColor: 'rgba(255, 255, 255, 0.75)'\n },\n content: {\n position: 'absolute',\n top: '40px',\n left: '40px',\n right: '40px',\n bottom: '40px',\n border: '1px solid #ccc',\n background: '#fff',\n overflow: 'auto',\n WebkitOverflowScrolling: 'touch',\n borderRadius: '4px',\n outline: 'none',\n padding: '20px'\n }\n};\nexports[\"default\"] = Modal;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n/* globals __REACT_DEVTOOLS_GLOBAL_HOOK__*/\n\n'use strict';\n\nvar ReactDOMComponentTree = require('./ReactDOMComponentTree');\nvar ReactDefaultInjection = require('./ReactDefaultInjection');\nvar ReactMount = require('./ReactMount');\nvar ReactReconciler = require('./ReactReconciler');\nvar ReactUpdates = require('./ReactUpdates');\nvar ReactVersion = require('./ReactVersion');\nvar findDOMNode = require('./findDOMNode');\nvar getHostComponentFromComposite = require('./getHostComponentFromComposite');\nvar renderSubtreeIntoContainer = require('./renderSubtreeIntoContainer');\nvar warning = require('fbjs/lib/warning');\nReactDefaultInjection.inject();\nvar ReactDOM = {\n findDOMNode: findDOMNode,\n render: ReactMount.render,\n unmountComponentAtNode: ReactMount.unmountComponentAtNode,\n version: ReactVersion,\n /* eslint-disable camelcase */\n unstable_batchedUpdates: ReactUpdates.batchedUpdates,\n unstable_renderSubtreeIntoContainer: renderSubtreeIntoContainer\n /* eslint-enable camelcase */\n};\n\n// Inject the runtime into a devtools global hook regardless of browser.\n// Allows for debugging when the hook is injected on the page.\nif (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject === 'function') {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.inject({\n ComponentTree: {\n getClosestInstanceFromNode: ReactDOMComponentTree.getClosestInstanceFromNode,\n getNodeFromInstance: function getNodeFromInstance(inst) {\n // inst is an internal instance (but could be a composite)\n if (inst._renderedComponent) {\n inst = getHostComponentFromComposite(inst);\n }\n if (inst) {\n return ReactDOMComponentTree.getNodeFromInstance(inst);\n } else {\n return null;\n }\n }\n },\n Mount: ReactMount,\n Reconciler: ReactReconciler\n });\n}\nif (process.env.NODE_ENV !== 'production') {\n var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');\n if (ExecutionEnvironment.canUseDOM && window.top === window.self) {\n // First check if devtools is not installed\n if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {\n // If we're in Chrome or Firefox, provide a download link if not installed.\n if (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1 || navigator.userAgent.indexOf('Firefox') > -1) {\n // Firefox does not have the issue with devtools loaded over file://\n var showFileUrlMessage = window.location.protocol.indexOf('http') === -1 && navigator.userAgent.indexOf('Firefox') === -1;\n console.debug('Download the React DevTools ' + (showFileUrlMessage ? 'and use an HTTP server (instead of a file: URL) ' : '') + 'for a better development experience: ' + 'https://fb.me/react-devtools');\n }\n }\n var testFunc = function testFn() {};\n process.env.NODE_ENV !== 'production' ? warning((testFunc.name || testFunc.toString()).indexOf('testFn') !== -1, \"It looks like you're using a minified copy of the development build \" + 'of React. When deploying React apps to production, make sure to use ' + 'the production build which skips development warnings and is faster. ' + 'See https://fb.me/react-minification for more details.') : void 0;\n\n // If we're in IE8, check to see if we are in compatibility mode and provide\n // information on preventing compatibility mode\n var ieCompatibilityMode = document.documentMode && document.documentMode < 8;\n process.env.NODE_ENV !== 'production' ? warning(!ieCompatibilityMode, 'Internet Explorer is running in compatibility mode; please add the ' + 'following tag to your HTML to prevent this from happening: ' + '<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\" />') : void 0;\n var expectedFeatures = [\n // shims\n Array.isArray, Array.prototype.every, Array.prototype.forEach, Array.prototype.indexOf, Array.prototype.map, Date.now, Function.prototype.bind, Object.keys, String.prototype.trim];\n for (var i = 0; i < expectedFeatures.length; i++) {\n if (!expectedFeatures[i]) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'One or more ES5 shims expected by React are not available: ' + 'https://fb.me/react-warning-polyfills') : void 0;\n break;\n }\n }\n }\n}\nif (process.env.NODE_ENV !== 'production') {\n var ReactInstrumentation = require('./ReactInstrumentation');\n var ReactDOMUnknownPropertyHook = require('./ReactDOMUnknownPropertyHook');\n var ReactDOMNullInputValuePropHook = require('./ReactDOMNullInputValuePropHook');\n var ReactDOMInvalidARIAHook = require('./ReactDOMInvalidARIAHook');\n ReactInstrumentation.debugTool.addHook(ReactDOMUnknownPropertyHook);\n ReactInstrumentation.debugTool.addHook(ReactDOMNullInputValuePropHook);\n ReactInstrumentation.debugTool.addHook(ReactDOMInvalidARIAHook);\n}\nmodule.exports = ReactDOM;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar ARIADOMPropertyConfig = {\n Properties: {\n // Global States and Properties\n 'aria-current': 0,\n // state\n 'aria-details': 0,\n 'aria-disabled': 0,\n // state\n 'aria-hidden': 0,\n // state\n 'aria-invalid': 0,\n // state\n 'aria-keyshortcuts': 0,\n 'aria-label': 0,\n 'aria-roledescription': 0,\n // Widget Attributes\n 'aria-autocomplete': 0,\n 'aria-checked': 0,\n 'aria-expanded': 0,\n 'aria-haspopup': 0,\n 'aria-level': 0,\n 'aria-modal': 0,\n 'aria-multiline': 0,\n 'aria-multiselectable': 0,\n 'aria-orientation': 0,\n 'aria-placeholder': 0,\n 'aria-pressed': 0,\n 'aria-readonly': 0,\n 'aria-required': 0,\n 'aria-selected': 0,\n 'aria-sort': 0,\n 'aria-valuemax': 0,\n 'aria-valuemin': 0,\n 'aria-valuenow': 0,\n 'aria-valuetext': 0,\n // Live Region Attributes\n 'aria-atomic': 0,\n 'aria-busy': 0,\n 'aria-live': 0,\n 'aria-relevant': 0,\n // Drag-and-Drop Attributes\n 'aria-dropeffect': 0,\n 'aria-grabbed': 0,\n // Relationship Attributes\n 'aria-activedescendant': 0,\n 'aria-colcount': 0,\n 'aria-colindex': 0,\n 'aria-colspan': 0,\n 'aria-controls': 0,\n 'aria-describedby': 0,\n 'aria-errormessage': 0,\n 'aria-flowto': 0,\n 'aria-labelledby': 0,\n 'aria-owns': 0,\n 'aria-posinset': 0,\n 'aria-rowcount': 0,\n 'aria-rowindex': 0,\n 'aria-rowspan': 0,\n 'aria-setsize': 0\n },\n DOMAttributeNames: {},\n DOMPropertyNames: {}\n};\nmodule.exports = ARIADOMPropertyConfig;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nvar EventPropagators = require('./EventPropagators');\nvar ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');\nvar FallbackCompositionState = require('./FallbackCompositionState');\nvar SyntheticCompositionEvent = require('./SyntheticCompositionEvent');\nvar SyntheticInputEvent = require('./SyntheticInputEvent');\nvar END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space\nvar START_KEYCODE = 229;\nvar canUseCompositionEvent = ExecutionEnvironment.canUseDOM && 'CompositionEvent' in window;\nvar documentMode = null;\nif (ExecutionEnvironment.canUseDOM && 'documentMode' in document) {\n documentMode = document.documentMode;\n}\n\n// Webkit offers a very useful `textInput` event that can be used to\n// directly represent `beforeInput`. The IE `textinput` event is not as\n// useful, so we don't use it.\nvar canUseTextInputEvent = ExecutionEnvironment.canUseDOM && 'TextEvent' in window && !documentMode && !isPresto();\n\n// In IE9+, we have access to composition events, but the data supplied\n// by the native compositionend event may be incorrect. Japanese ideographic\n// spaces, for instance (\\u3000) are not recorded correctly.\nvar useFallbackCompositionData = ExecutionEnvironment.canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);\n\n/**\n * Opera <= 12 includes TextEvent in window, but does not fire\n * text input events. Rely on keypress instead.\n */\nfunction isPresto() {\n var opera = window.opera;\n return _typeof(opera) === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}\nvar SPACEBAR_CODE = 32;\nvar SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);\n\n// Events and their corresponding property names.\nvar eventTypes = {\n beforeInput: {\n phasedRegistrationNames: {\n bubbled: 'onBeforeInput',\n captured: 'onBeforeInputCapture'\n },\n dependencies: ['topCompositionEnd', 'topKeyPress', 'topTextInput', 'topPaste']\n },\n compositionEnd: {\n phasedRegistrationNames: {\n bubbled: 'onCompositionEnd',\n captured: 'onCompositionEndCapture'\n },\n dependencies: ['topBlur', 'topCompositionEnd', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']\n },\n compositionStart: {\n phasedRegistrationNames: {\n bubbled: 'onCompositionStart',\n captured: 'onCompositionStartCapture'\n },\n dependencies: ['topBlur', 'topCompositionStart', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']\n },\n compositionUpdate: {\n phasedRegistrationNames: {\n bubbled: 'onCompositionUpdate',\n captured: 'onCompositionUpdateCapture'\n },\n dependencies: ['topBlur', 'topCompositionUpdate', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']\n }\n};\n\n// Track whether we've ever handled a keypress on the space key.\nvar hasSpaceKeypress = false;\n\n/**\n * Return whether a native keypress event is assumed to be a command.\n * This is required because Firefox fires `keypress` events for key commands\n * (cut, copy, select-all, etc.) even though no character is inserted.\n */\nfunction isKeypressCommand(nativeEvent) {\n return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey);\n}\n\n/**\n * Translate native top level events into event types.\n *\n * @param {string} topLevelType\n * @return {object}\n */\nfunction getCompositionEventType(topLevelType) {\n switch (topLevelType) {\n case 'topCompositionStart':\n return eventTypes.compositionStart;\n case 'topCompositionEnd':\n return eventTypes.compositionEnd;\n case 'topCompositionUpdate':\n return eventTypes.compositionUpdate;\n }\n}\n\n/**\n * Does our fallback best-guess model think this event signifies that\n * composition has begun?\n *\n * @param {string} topLevelType\n * @param {object} nativeEvent\n * @return {boolean}\n */\nfunction isFallbackCompositionStart(topLevelType, nativeEvent) {\n return topLevelType === 'topKeyDown' && nativeEvent.keyCode === START_KEYCODE;\n}\n\n/**\n * Does our fallback mode think that this event is the end of composition?\n *\n * @param {string} topLevelType\n * @param {object} nativeEvent\n * @return {boolean}\n */\nfunction isFallbackCompositionEnd(topLevelType, nativeEvent) {\n switch (topLevelType) {\n case 'topKeyUp':\n // Command keys insert or clear IME input.\n return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;\n case 'topKeyDown':\n // Expect IME keyCode on each keydown. If we get any other\n // code we must have exited earlier.\n return nativeEvent.keyCode !== START_KEYCODE;\n case 'topKeyPress':\n case 'topMouseDown':\n case 'topBlur':\n // Events are not possible without cancelling IME.\n return true;\n default:\n return false;\n }\n}\n\n/**\n * Google Input Tools provides composition data via a CustomEvent,\n * with the `data` property populated in the `detail` object. If this\n * is available on the event object, use it. If not, this is a plain\n * composition event and we have nothing special to extract.\n *\n * @param {object} nativeEvent\n * @return {?string}\n */\nfunction getDataFromCustomEvent(nativeEvent) {\n var detail = nativeEvent.detail;\n if (_typeof(detail) === 'object' && 'data' in detail) {\n return detail.data;\n }\n return null;\n}\n\n// Track the current IME composition fallback object, if any.\nvar currentComposition = null;\n\n/**\n * @return {?object} A SyntheticCompositionEvent.\n */\nfunction extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n var eventType;\n var fallbackData;\n if (canUseCompositionEvent) {\n eventType = getCompositionEventType(topLevelType);\n } else if (!currentComposition) {\n if (isFallbackCompositionStart(topLevelType, nativeEvent)) {\n eventType = eventTypes.compositionStart;\n }\n } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) {\n eventType = eventTypes.compositionEnd;\n }\n if (!eventType) {\n return null;\n }\n if (useFallbackCompositionData) {\n // The current composition is stored statically and must not be\n // overwritten while composition continues.\n if (!currentComposition && eventType === eventTypes.compositionStart) {\n currentComposition = FallbackCompositionState.getPooled(nativeEventTarget);\n } else if (eventType === eventTypes.compositionEnd) {\n if (currentComposition) {\n fallbackData = currentComposition.getData();\n }\n }\n }\n var event = SyntheticCompositionEvent.getPooled(eventType, targetInst, nativeEvent, nativeEventTarget);\n if (fallbackData) {\n // Inject data generated from fallback path into the synthetic event.\n // This matches the property of native CompositionEventInterface.\n event.data = fallbackData;\n } else {\n var customData = getDataFromCustomEvent(nativeEvent);\n if (customData !== null) {\n event.data = customData;\n }\n }\n EventPropagators.accumulateTwoPhaseDispatches(event);\n return event;\n}\n\n/**\n * @param {string} topLevelType Record from `EventConstants`.\n * @param {object} nativeEvent Native browser event.\n * @return {?string} The string corresponding to this `beforeInput` event.\n */\nfunction getNativeBeforeInputChars(topLevelType, nativeEvent) {\n switch (topLevelType) {\n case 'topCompositionEnd':\n return getDataFromCustomEvent(nativeEvent);\n case 'topKeyPress':\n /**\n * If native `textInput` events are available, our goal is to make\n * use of them. However, there is a special case: the spacebar key.\n * In Webkit, preventing default on a spacebar `textInput` event\n * cancels character insertion, but it *also* causes the browser\n * to fall back to its default spacebar behavior of scrolling the\n * page.\n *\n * Tracking at:\n * https://code.google.com/p/chromium/issues/detail?id=355103\n *\n * To avoid this issue, use the keypress event as if no `textInput`\n * event is available.\n */\n var which = nativeEvent.which;\n if (which !== SPACEBAR_CODE) {\n return null;\n }\n hasSpaceKeypress = true;\n return SPACEBAR_CHAR;\n case 'topTextInput':\n // Record the characters to be added to the DOM.\n var chars = nativeEvent.data;\n\n // If it's a spacebar character, assume that we have already handled\n // it at the keypress level and bail immediately. Android Chrome\n // doesn't give us keycodes, so we need to blacklist it.\n if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {\n return null;\n }\n return chars;\n default:\n // For other native event types, do nothing.\n return null;\n }\n}\n\n/**\n * For browsers that do not provide the `textInput` event, extract the\n * appropriate string to use for SyntheticInputEvent.\n *\n * @param {string} topLevelType Record from `EventConstants`.\n * @param {object} nativeEvent Native browser event.\n * @return {?string} The fallback string for this `beforeInput` event.\n */\nfunction getFallbackBeforeInputChars(topLevelType, nativeEvent) {\n // If we are currently composing (IME) and using a fallback to do so,\n // try to extract the composed characters from the fallback object.\n // If composition event is available, we extract a string only at\n // compositionevent, otherwise extract it at fallback events.\n if (currentComposition) {\n if (topLevelType === 'topCompositionEnd' || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) {\n var chars = currentComposition.getData();\n FallbackCompositionState.release(currentComposition);\n currentComposition = null;\n return chars;\n }\n return null;\n }\n switch (topLevelType) {\n case 'topPaste':\n // If a paste event occurs after a keypress, throw out the input\n // chars. Paste events should not lead to BeforeInput events.\n return null;\n case 'topKeyPress':\n /**\n * As of v27, Firefox may fire keypress events even when no character\n * will be inserted. A few possibilities:\n *\n * - `which` is `0`. Arrow keys, Esc key, etc.\n *\n * - `which` is the pressed key code, but no char is available.\n * Ex: 'AltGr + d` in Polish. There is no modified character for\n * this key combination and no character is inserted into the\n * document, but FF fires the keypress for char code `100` anyway.\n * No `input` event will occur.\n *\n * - `which` is the pressed key code, but a command combination is\n * being used. Ex: `Cmd+C`. No character is inserted, and no\n * `input` event will occur.\n */\n if (nativeEvent.which && !isKeypressCommand(nativeEvent)) {\n return String.fromCharCode(nativeEvent.which);\n }\n return null;\n case 'topCompositionEnd':\n return useFallbackCompositionData ? null : nativeEvent.data;\n default:\n return null;\n }\n}\n\n/**\n * Extract a SyntheticInputEvent for `beforeInput`, based on either native\n * `textInput` or fallback behavior.\n *\n * @return {?object} A SyntheticInputEvent.\n */\nfunction extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n var chars;\n if (canUseTextInputEvent) {\n chars = getNativeBeforeInputChars(topLevelType, nativeEvent);\n } else {\n chars = getFallbackBeforeInputChars(topLevelType, nativeEvent);\n }\n\n // If no characters are being inserted, no BeforeInput event should\n // be fired.\n if (!chars) {\n return null;\n }\n var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, targetInst, nativeEvent, nativeEventTarget);\n event.data = chars;\n EventPropagators.accumulateTwoPhaseDispatches(event);\n return event;\n}\n\n/**\n * Create an `onBeforeInput` event to match\n * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.\n *\n * This event plugin is based on the native `textInput` event\n * available in Chrome, Safari, Opera, and IE. This event fires after\n * `onKeyPress` and `onCompositionEnd`, but before `onInput`.\n *\n * `beforeInput` is spec'd but not implemented in any browsers, and\n * the `input` event does not provide any useful information about what has\n * actually been added, contrary to the spec. Thus, `textInput` is the best\n * available event to identify the characters that have actually been inserted\n * into the target node.\n *\n * This plugin is also responsible for emitting `composition` events, thus\n * allowing us to share composition fallback code for both `beforeInput` and\n * `composition` event types.\n */\nvar BeforeInputEventPlugin = {\n eventTypes: eventTypes,\n extractEvents: function extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n return [extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget), extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget)];\n }\n};\nmodule.exports = BeforeInputEventPlugin;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar _assign = require('object-assign');\nvar PooledClass = require('./PooledClass');\nvar getTextContentAccessor = require('./getTextContentAccessor');\n\n/**\n * This helper class stores information about text content of a target node,\n * allowing comparison of content before and after a given event.\n *\n * Identify the node where selection currently begins, then observe\n * both its text content and its current position in the DOM. Since the\n * browser may natively replace the target node during composition, we can\n * use its position to find its replacement.\n *\n * @param {DOMEventTarget} root\n */\nfunction FallbackCompositionState(root) {\n this._root = root;\n this._startText = this.getText();\n this._fallbackText = null;\n}\n_assign(FallbackCompositionState.prototype, {\n destructor: function destructor() {\n this._root = null;\n this._startText = null;\n this._fallbackText = null;\n },\n /**\n * Get current text of input.\n *\n * @return {string}\n */\n getText: function getText() {\n if ('value' in this._root) {\n return this._root.value;\n }\n return this._root[getTextContentAccessor()];\n },\n /**\n * Determine the differing substring between the initially stored\n * text content and the current content.\n *\n * @return {string}\n */\n getData: function getData() {\n if (this._fallbackText) {\n return this._fallbackText;\n }\n var start;\n var startValue = this._startText;\n var startLength = startValue.length;\n var end;\n var endValue = this.getText();\n var endLength = endValue.length;\n for (start = 0; start < startLength; start++) {\n if (startValue[start] !== endValue[start]) {\n break;\n }\n }\n var minEnd = startLength - start;\n for (end = 1; end <= minEnd; end++) {\n if (startValue[startLength - end] !== endValue[endLength - end]) {\n break;\n }\n }\n var sliceTail = end > 1 ? 1 - end : undefined;\n this._fallbackText = endValue.slice(start, sliceTail);\n return this._fallbackText;\n }\n});\nPooledClass.addPoolingTo(FallbackCompositionState);\nmodule.exports = FallbackCompositionState;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar SyntheticEvent = require('./SyntheticEvent');\n\n/**\n * @interface Event\n * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents\n */\nvar CompositionEventInterface = {\n data: null\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticUIEvent}\n */\nfunction SyntheticCompositionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\nSyntheticEvent.augmentClass(SyntheticCompositionEvent, CompositionEventInterface);\nmodule.exports = SyntheticCompositionEvent;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar SyntheticEvent = require('./SyntheticEvent');\n\n/**\n * @interface Event\n * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105\n * /#events-inputevents\n */\nvar InputEventInterface = {\n data: null\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticUIEvent}\n */\nfunction SyntheticInputEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\nSyntheticEvent.augmentClass(SyntheticInputEvent, InputEventInterface);\nmodule.exports = SyntheticInputEvent;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar EventPluginHub = require('./EventPluginHub');\nvar EventPropagators = require('./EventPropagators');\nvar ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');\nvar ReactDOMComponentTree = require('./ReactDOMComponentTree');\nvar ReactUpdates = require('./ReactUpdates');\nvar SyntheticEvent = require('./SyntheticEvent');\nvar inputValueTracking = require('./inputValueTracking');\nvar getEventTarget = require('./getEventTarget');\nvar isEventSupported = require('./isEventSupported');\nvar isTextInputElement = require('./isTextInputElement');\nvar eventTypes = {\n change: {\n phasedRegistrationNames: {\n bubbled: 'onChange',\n captured: 'onChangeCapture'\n },\n dependencies: ['topBlur', 'topChange', 'topClick', 'topFocus', 'topInput', 'topKeyDown', 'topKeyUp', 'topSelectionChange']\n }\n};\nfunction createAndAccumulateChangeEvent(inst, nativeEvent, target) {\n var event = SyntheticEvent.getPooled(eventTypes.change, inst, nativeEvent, target);\n event.type = 'change';\n EventPropagators.accumulateTwoPhaseDispatches(event);\n return event;\n}\n/**\n * For IE shims\n */\nvar activeElement = null;\nvar activeElementInst = null;\n\n/**\n * SECTION: handle `change` event\n */\nfunction shouldUseChangeEvent(elem) {\n var nodeName = elem.nodeName && elem.nodeName.toLowerCase();\n return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';\n}\nvar doesChangeEventBubble = false;\nif (ExecutionEnvironment.canUseDOM) {\n // See `handleChange` comment below\n doesChangeEventBubble = isEventSupported('change') && (!document.documentMode || document.documentMode > 8);\n}\nfunction manualDispatchChangeEvent(nativeEvent) {\n var event = createAndAccumulateChangeEvent(activeElementInst, nativeEvent, getEventTarget(nativeEvent));\n\n // If change and propertychange bubbled, we'd just bind to it like all the\n // other events and have it go through ReactBrowserEventEmitter. Since it\n // doesn't, we manually listen for the events and so we have to enqueue and\n // process the abstract event manually.\n //\n // Batching is necessary here in order to ensure that all event handlers run\n // before the next rerender (including event handlers attached to ancestor\n // elements instead of directly on the input). Without this, controlled\n // components don't work properly in conjunction with event bubbling because\n // the component is rerendered and the value reverted before all the event\n // handlers can run. See https://github.com/facebook/react/issues/708.\n ReactUpdates.batchedUpdates(runEventInBatch, event);\n}\nfunction runEventInBatch(event) {\n EventPluginHub.enqueueEvents(event);\n EventPluginHub.processEventQueue(false);\n}\nfunction startWatchingForChangeEventIE8(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onchange', manualDispatchChangeEvent);\n}\nfunction stopWatchingForChangeEventIE8() {\n if (!activeElement) {\n return;\n }\n activeElement.detachEvent('onchange', manualDispatchChangeEvent);\n activeElement = null;\n activeElementInst = null;\n}\nfunction getInstIfValueChanged(targetInst, nativeEvent) {\n var updated = inputValueTracking.updateValueIfChanged(targetInst);\n var simulated = nativeEvent.simulated === true && ChangeEventPlugin._allowSimulatedPassThrough;\n if (updated || simulated) {\n return targetInst;\n }\n}\nfunction getTargetInstForChangeEvent(topLevelType, targetInst) {\n if (topLevelType === 'topChange') {\n return targetInst;\n }\n}\nfunction handleEventsForChangeEventIE8(topLevelType, target, targetInst) {\n if (topLevelType === 'topFocus') {\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForChangeEventIE8();\n startWatchingForChangeEventIE8(target, targetInst);\n } else if (topLevelType === 'topBlur') {\n stopWatchingForChangeEventIE8();\n }\n}\n\n/**\n * SECTION: handle `input` event\n */\nvar isInputEventSupported = false;\nif (ExecutionEnvironment.canUseDOM) {\n // IE9 claims to support the input event but fails to trigger it when\n // deleting text, so we ignore its input events.\n\n isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 9);\n}\n\n/**\n * (For IE <=9) Starts tracking propertychange events on the passed-in element\n * and override the value property so that we can distinguish user events from\n * value changes in JS.\n */\nfunction startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}\n\n/**\n * (For IE <=9) Removes the event listeners from the currently-tracked element,\n * if any exists.\n */\nfunction stopWatchingForValueChange() {\n if (!activeElement) {\n return;\n }\n activeElement.detachEvent('onpropertychange', handlePropertyChange);\n activeElement = null;\n activeElementInst = null;\n}\n\n/**\n * (For IE <=9) Handles a propertychange event, sending a `change` event if\n * the value of the active element has changed.\n */\nfunction handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst, nativeEvent)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}\nfunction handleEventsForInputEventPolyfill(topLevelType, target, targetInst) {\n if (topLevelType === 'topFocus') {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(target, targetInst);\n } else if (topLevelType === 'topBlur') {\n stopWatchingForValueChange();\n }\n}\n\n// For IE8 and IE9.\nfunction getTargetInstForInputEventPolyfill(topLevelType, targetInst, nativeEvent) {\n if (topLevelType === 'topSelectionChange' || topLevelType === 'topKeyUp' || topLevelType === 'topKeyDown') {\n // On the selectionchange event, the target is just document which isn't\n // helpful for us so just check activeElement instead.\n //\n // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire\n // propertychange on the first input event after setting `value` from a\n // script and fires only keydown, keypress, keyup. Catching keyup usually\n // gets it and catching keydown lets us fire an event for the first\n // keystroke if user does a key repeat (it'll be a little delayed: right\n // before the second keystroke). Other input methods (e.g., paste) seem to\n // fire selectionchange normally.\n return getInstIfValueChanged(activeElementInst, nativeEvent);\n }\n}\n\n/**\n * SECTION: handle `click` event\n */\nfunction shouldUseClickEvent(elem) {\n // Use the `click` event to detect changes to checkbox and radio inputs.\n // This approach works across all browsers, whereas `change` does not fire\n // until `blur` in IE8.\n var nodeName = elem.nodeName;\n return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');\n}\nfunction getTargetInstForClickEvent(topLevelType, targetInst, nativeEvent) {\n if (topLevelType === 'topClick') {\n return getInstIfValueChanged(targetInst, nativeEvent);\n }\n}\nfunction getTargetInstForInputOrChangeEvent(topLevelType, targetInst, nativeEvent) {\n if (topLevelType === 'topInput' || topLevelType === 'topChange') {\n return getInstIfValueChanged(targetInst, nativeEvent);\n }\n}\nfunction handleControlledInputBlur(inst, node) {\n // TODO: In IE, inst is occasionally null. Why?\n if (inst == null) {\n return;\n }\n\n // Fiber and ReactDOM keep wrapper state in separate places\n var state = inst._wrapperState || node._wrapperState;\n if (!state || !state.controlled || node.type !== 'number') {\n return;\n }\n\n // If controlled, assign the value attribute to the current value on blur\n var value = '' + node.value;\n if (node.getAttribute('value') !== value) {\n node.setAttribute('value', value);\n }\n}\n\n/**\n * This plugin creates an `onChange` event that normalizes change events\n * across form elements. This event fires at a time when it's possible to\n * change the element's value without seeing a flicker.\n *\n * Supported elements are:\n * - input (see `isTextInputElement`)\n * - textarea\n * - select\n */\nvar ChangeEventPlugin = {\n eventTypes: eventTypes,\n _allowSimulatedPassThrough: true,\n _isInputEventSupported: isInputEventSupported,\n extractEvents: function extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window;\n var getTargetInstFunc, handleEventFunc;\n if (shouldUseChangeEvent(targetNode)) {\n if (doesChangeEventBubble) {\n getTargetInstFunc = getTargetInstForChangeEvent;\n } else {\n handleEventFunc = handleEventsForChangeEventIE8;\n }\n } else if (isTextInputElement(targetNode)) {\n if (isInputEventSupported) {\n getTargetInstFunc = getTargetInstForInputOrChangeEvent;\n } else {\n getTargetInstFunc = getTargetInstForInputEventPolyfill;\n handleEventFunc = handleEventsForInputEventPolyfill;\n }\n } else if (shouldUseClickEvent(targetNode)) {\n getTargetInstFunc = getTargetInstForClickEvent;\n }\n if (getTargetInstFunc) {\n var inst = getTargetInstFunc(topLevelType, targetInst, nativeEvent);\n if (inst) {\n var event = createAndAccumulateChangeEvent(inst, nativeEvent, nativeEventTarget);\n return event;\n }\n }\n if (handleEventFunc) {\n handleEventFunc(topLevelType, targetNode, targetInst);\n }\n\n // When blurring, set the value attribute for number inputs\n if (topLevelType === 'topBlur') {\n handleControlledInputBlur(targetInst, targetNode);\n }\n }\n};\nmodule.exports = ChangeEventPlugin;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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 */\n\n'use strict';\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nvar ReactOwner = require('./ReactOwner');\nvar ReactRef = {};\nfunction attachRef(ref, component, owner) {\n if (typeof ref === 'function') {\n ref(component.getPublicInstance());\n } else {\n // Legacy ref\n ReactOwner.addComponentAsRefTo(component, ref, owner);\n }\n}\nfunction detachRef(ref, component, owner) {\n if (typeof ref === 'function') {\n ref(null);\n } else {\n // Legacy ref\n ReactOwner.removeComponentAsRefFrom(component, ref, owner);\n }\n}\nReactRef.attachRefs = function (instance, element) {\n if (element === null || _typeof(element) !== 'object') {\n return;\n }\n var ref = element.ref;\n if (ref != null) {\n attachRef(ref, instance, element._owner);\n }\n};\nReactRef.shouldUpdateRefs = function (prevElement, nextElement) {\n // If either the owner or a `ref` has changed, make sure the newest owner\n // has stored a reference to `this`, and the previous owner (if different)\n // has forgotten the reference to `this`. We use the element instead\n // of the public this.props because the post processing cannot determine\n // a ref. The ref conceptually lives on the element.\n\n // TODO: Should this even be possible? The owner cannot change because\n // it's forbidden by shouldUpdateReactComponent. The ref can change\n // if you swap the keys of but not the refs. Reconsider where this check\n // is made. It probably belongs where the key checking and\n // instantiateReactComponent is done.\n\n var prevRef = null;\n var prevOwner = null;\n if (prevElement !== null && _typeof(prevElement) === 'object') {\n prevRef = prevElement.ref;\n prevOwner = prevElement._owner;\n }\n var nextRef = null;\n var nextOwner = null;\n if (nextElement !== null && _typeof(nextElement) === 'object') {\n nextRef = nextElement.ref;\n nextOwner = nextElement._owner;\n }\n return prevRef !== nextRef ||\n // If owner changes but we have an unchanged function ref, don't update refs\n typeof nextRef === 'string' && nextOwner !== prevOwner;\n};\nReactRef.detachRefs = function (instance, element) {\n if (element === null || _typeof(element) !== 'object') {\n return;\n }\n var ref = element.ref;\n if (ref != null) {\n detachRef(ref, instance, element._owner);\n }\n};\nmodule.exports = ReactRef;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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 */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\nvar invariant = require('fbjs/lib/invariant');\n\n/**\n * @param {?object} object\n * @return {boolean} True if `object` is a valid owner.\n * @final\n */\nfunction isValidOwner(object) {\n return !!(object && typeof object.attachRef === 'function' && typeof object.detachRef === 'function');\n}\n\n/**\n * ReactOwners are capable of storing references to owned components.\n *\n * All components are capable of //being// referenced by owner components, but\n * only ReactOwner components are capable of //referencing// owned components.\n * The named reference is known as a \"ref\".\n *\n * Refs are available when mounted and updated during reconciliation.\n *\n * var MyComponent = React.createClass({\n * render: function() {\n * return (\n * <div onClick={this.handleClick}>\n * <CustomComponent ref=\"custom\" />\n * </div>\n * );\n * },\n * handleClick: function() {\n * this.refs.custom.handleClick();\n * },\n * componentDidMount: function() {\n * this.refs.custom.initialize();\n * }\n * });\n *\n * Refs should rarely be used. When refs are used, they should only be done to\n * control data that is not handled by React's data flow.\n *\n * @class ReactOwner\n */\nvar ReactOwner = {\n /**\n * Adds a component by ref to an owner component.\n *\n * @param {ReactComponent} component Component to reference.\n * @param {string} ref Name by which to refer to the component.\n * @param {ReactOwner} owner Component on which to record the ref.\n * @final\n * @internal\n */\n addComponentAsRefTo: function addComponentAsRefTo(component, ref, owner) {\n !isValidOwner(owner) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component\\'s `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).') : _prodInvariant('119') : void 0;\n owner.attachRef(ref, component);\n },\n /**\n * Removes a component by ref from an owner component.\n *\n * @param {ReactComponent} component Component to dereference.\n * @param {string} ref Name of the ref to remove.\n * @param {ReactOwner} owner Component on which the ref is recorded.\n * @final\n * @internal\n */\n removeComponentAsRefFrom: function removeComponentAsRefFrom(component, ref, owner) {\n !isValidOwner(owner) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'removeComponentAsRefFrom(...): Only a ReactOwner can have refs. You might be removing a ref to a component that was not created inside a component\\'s `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).') : _prodInvariant('120') : void 0;\n var ownerPublicInstance = owner.getPublicInstance();\n // Check that `component`'s owner is still alive and that `component` is still the current ref\n // because we do not want to detach the ref if another component stole it.\n if (ownerPublicInstance && ownerPublicInstance.refs[ref] === component.getPublicInstance()) {\n owner.detachRef(ref);\n }\n }\n};\nmodule.exports = ReactOwner;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\n/**\n * Module that is injectable into `EventPluginHub`, that specifies a\n * deterministic ordering of `EventPlugin`s. A convenient way to reason about\n * plugins, without having to package every one of them. This is better than\n * having plugins be ordered in the same order that they are injected because\n * that ordering would be influenced by the packaging order.\n * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that\n * preventing default on events is convenient in `SimpleEventPlugin` handlers.\n */\nvar DefaultEventPluginOrder = ['ResponderEventPlugin', 'SimpleEventPlugin', 'TapEventPlugin', 'EnterLeaveEventPlugin', 'ChangeEventPlugin', 'SelectEventPlugin', 'BeforeInputEventPlugin'];\nmodule.exports = DefaultEventPluginOrder;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar EventPropagators = require('./EventPropagators');\nvar ReactDOMComponentTree = require('./ReactDOMComponentTree');\nvar SyntheticMouseEvent = require('./SyntheticMouseEvent');\nvar eventTypes = {\n mouseEnter: {\n registrationName: 'onMouseEnter',\n dependencies: ['topMouseOut', 'topMouseOver']\n },\n mouseLeave: {\n registrationName: 'onMouseLeave',\n dependencies: ['topMouseOut', 'topMouseOver']\n }\n};\nvar EnterLeaveEventPlugin = {\n eventTypes: eventTypes,\n /**\n * For almost every interaction we care about, there will be both a top-level\n * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that\n * we do not extract duplicate events. However, moving the mouse into the\n * browser from outside will not fire a `mouseout` event. In this case, we use\n * the `mouseover` top-level event.\n */\n extractEvents: function extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n if (topLevelType === 'topMouseOver' && (nativeEvent.relatedTarget || nativeEvent.fromElement)) {\n return null;\n }\n if (topLevelType !== 'topMouseOut' && topLevelType !== 'topMouseOver') {\n // Must not be a mouse in or mouse out - ignoring.\n return null;\n }\n var win;\n if (nativeEventTarget.window === nativeEventTarget) {\n // `nativeEventTarget` is probably a window object.\n win = nativeEventTarget;\n } else {\n // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.\n var doc = nativeEventTarget.ownerDocument;\n if (doc) {\n win = doc.defaultView || doc.parentWindow;\n } else {\n win = window;\n }\n }\n var from;\n var to;\n if (topLevelType === 'topMouseOut') {\n from = targetInst;\n var related = nativeEvent.relatedTarget || nativeEvent.toElement;\n to = related ? ReactDOMComponentTree.getClosestInstanceFromNode(related) : null;\n } else {\n // Moving to a node from outside the window.\n from = null;\n to = targetInst;\n }\n if (from === to) {\n // Nothing pertains to our managed components.\n return null;\n }\n var fromNode = from == null ? win : ReactDOMComponentTree.getNodeFromInstance(from);\n var toNode = to == null ? win : ReactDOMComponentTree.getNodeFromInstance(to);\n var leave = SyntheticMouseEvent.getPooled(eventTypes.mouseLeave, from, nativeEvent, nativeEventTarget);\n leave.type = 'mouseleave';\n leave.target = fromNode;\n leave.relatedTarget = toNode;\n var enter = SyntheticMouseEvent.getPooled(eventTypes.mouseEnter, to, nativeEvent, nativeEventTarget);\n enter.type = 'mouseenter';\n enter.target = toNode;\n enter.relatedTarget = fromNode;\n EventPropagators.accumulateEnterLeaveDispatches(leave, enter, from, to);\n return [leave, enter];\n }\n};\nmodule.exports = EnterLeaveEventPlugin;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar DOMProperty = require('./DOMProperty');\nvar MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY;\nvar HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE;\nvar HAS_NUMERIC_VALUE = DOMProperty.injection.HAS_NUMERIC_VALUE;\nvar HAS_POSITIVE_NUMERIC_VALUE = DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE;\nvar HAS_OVERLOADED_BOOLEAN_VALUE = DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE;\nvar HTMLDOMPropertyConfig = {\n isCustomAttribute: RegExp.prototype.test.bind(new RegExp('^(data|aria)-[' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$')),\n Properties: {\n /**\n * Standard Properties\n */\n accept: 0,\n acceptCharset: 0,\n accessKey: 0,\n action: 0,\n allowFullScreen: HAS_BOOLEAN_VALUE,\n allowTransparency: 0,\n alt: 0,\n // specifies target context for links with `preload` type\n as: 0,\n async: HAS_BOOLEAN_VALUE,\n autoComplete: 0,\n // autoFocus is polyfilled/normalized by AutoFocusUtils\n // autoFocus: HAS_BOOLEAN_VALUE,\n autoPlay: HAS_BOOLEAN_VALUE,\n capture: HAS_BOOLEAN_VALUE,\n cellPadding: 0,\n cellSpacing: 0,\n charSet: 0,\n challenge: 0,\n checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,\n cite: 0,\n classID: 0,\n className: 0,\n cols: HAS_POSITIVE_NUMERIC_VALUE,\n colSpan: 0,\n content: 0,\n contentEditable: 0,\n contextMenu: 0,\n controls: HAS_BOOLEAN_VALUE,\n controlsList: 0,\n coords: 0,\n crossOrigin: 0,\n data: 0,\n // For `<object />` acts as `src`.\n dateTime: 0,\n 'default': HAS_BOOLEAN_VALUE,\n defer: HAS_BOOLEAN_VALUE,\n dir: 0,\n disabled: HAS_BOOLEAN_VALUE,\n download: HAS_OVERLOADED_BOOLEAN_VALUE,\n draggable: 0,\n encType: 0,\n form: 0,\n formAction: 0,\n formEncType: 0,\n formMethod: 0,\n formNoValidate: HAS_BOOLEAN_VALUE,\n formTarget: 0,\n frameBorder: 0,\n headers: 0,\n height: 0,\n hidden: HAS_BOOLEAN_VALUE,\n high: 0,\n href: 0,\n hrefLang: 0,\n htmlFor: 0,\n httpEquiv: 0,\n icon: 0,\n id: 0,\n inputMode: 0,\n integrity: 0,\n is: 0,\n keyParams: 0,\n keyType: 0,\n kind: 0,\n label: 0,\n lang: 0,\n list: 0,\n loop: HAS_BOOLEAN_VALUE,\n low: 0,\n manifest: 0,\n marginHeight: 0,\n marginWidth: 0,\n max: 0,\n maxLength: 0,\n media: 0,\n mediaGroup: 0,\n method: 0,\n min: 0,\n minLength: 0,\n // Caution; `option.selected` is not updated if `select.multiple` is\n // disabled with `removeAttribute`.\n multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,\n muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,\n name: 0,\n nonce: 0,\n noValidate: HAS_BOOLEAN_VALUE,\n open: HAS_BOOLEAN_VALUE,\n optimum: 0,\n pattern: 0,\n placeholder: 0,\n playsInline: HAS_BOOLEAN_VALUE,\n poster: 0,\n preload: 0,\n profile: 0,\n radioGroup: 0,\n readOnly: HAS_BOOLEAN_VALUE,\n referrerPolicy: 0,\n rel: 0,\n required: HAS_BOOLEAN_VALUE,\n reversed: HAS_BOOLEAN_VALUE,\n role: 0,\n rows: HAS_POSITIVE_NUMERIC_VALUE,\n rowSpan: HAS_NUMERIC_VALUE,\n sandbox: 0,\n scope: 0,\n scoped: HAS_BOOLEAN_VALUE,\n scrolling: 0,\n seamless: HAS_BOOLEAN_VALUE,\n selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,\n shape: 0,\n size: HAS_POSITIVE_NUMERIC_VALUE,\n sizes: 0,\n span: HAS_POSITIVE_NUMERIC_VALUE,\n spellCheck: 0,\n src: 0,\n srcDoc: 0,\n srcLang: 0,\n srcSet: 0,\n start: HAS_NUMERIC_VALUE,\n step: 0,\n style: 0,\n summary: 0,\n tabIndex: 0,\n target: 0,\n title: 0,\n // Setting .type throws on non-<input> tags\n type: 0,\n useMap: 0,\n value: 0,\n width: 0,\n wmode: 0,\n wrap: 0,\n /**\n * RDFa Properties\n */\n about: 0,\n datatype: 0,\n inlist: 0,\n prefix: 0,\n // property is also supported for OpenGraph in meta tags.\n property: 0,\n resource: 0,\n 'typeof': 0,\n vocab: 0,\n /**\n * Non-standard Properties\n */\n // autoCapitalize and autoCorrect are supported in Mobile Safari for\n // keyboard hints.\n autoCapitalize: 0,\n autoCorrect: 0,\n // autoSave allows WebKit/Blink to persist values of input fields on page reloads\n autoSave: 0,\n // color is for Safari mask-icon link\n color: 0,\n // itemProp, itemScope, itemType are for\n // Microdata support. See http://schema.org/docs/gs.html\n itemProp: 0,\n itemScope: HAS_BOOLEAN_VALUE,\n itemType: 0,\n // itemID and itemRef are for Microdata support as well but\n // only specified in the WHATWG spec document. See\n // https://html.spec.whatwg.org/multipage/microdata.html#microdata-dom-api\n itemID: 0,\n itemRef: 0,\n // results show looking glass icon and recent searches on input\n // search fields in WebKit/Blink\n results: 0,\n // IE-only attribute that specifies security restrictions on an iframe\n // as an alternative to the sandbox attribute on IE<10\n security: 0,\n // IE-only attribute that controls focus behavior\n unselectable: 0\n },\n DOMAttributeNames: {\n acceptCharset: 'accept-charset',\n className: 'class',\n htmlFor: 'for',\n httpEquiv: 'http-equiv'\n },\n DOMPropertyNames: {},\n DOMMutationMethods: {\n value: function value(node, _value) {\n if (_value == null) {\n return node.removeAttribute('value');\n }\n\n // Number inputs get special treatment due to some edge cases in\n // Chrome. Let everything else assign the value attribute as normal.\n // https://github.com/facebook/react/issues/7253#issuecomment-236074326\n if (node.type !== 'number' || node.hasAttribute('value') === false) {\n node.setAttribute('value', '' + _value);\n } else if (node.validity && !node.validity.badInput && node.ownerDocument.activeElement !== node) {\n // Don't assign an attribute if validation reports bad\n // input. Chrome will clear the value. Additionally, don't\n // operate on inputs that have focus, otherwise Chrome might\n // strip off trailing decimal places and cause the user's\n // cursor position to jump to the beginning of the input.\n //\n // In ReactDOMInput, we have an onBlur event that will trigger\n // this function again when focus is lost.\n node.setAttribute('value', '' + _value);\n }\n }\n }\n};\nmodule.exports = HTMLDOMPropertyConfig;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar DOMChildrenOperations = require('./DOMChildrenOperations');\nvar ReactDOMIDOperations = require('./ReactDOMIDOperations');\n\n/**\n * Abstracts away all functionality of the reconciler that requires knowledge of\n * the browser context. TODO: These callers should be refactored to avoid the\n * need for this injection.\n */\nvar ReactComponentBrowserEnvironment = {\n processChildrenUpdates: ReactDOMIDOperations.dangerouslyProcessChildrenUpdates,\n replaceNodeWithMarkup: DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup\n};\nmodule.exports = ReactComponentBrowserEnvironment;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\nvar DOMLazyTree = require('./DOMLazyTree');\nvar ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');\nvar createNodesFromMarkup = require('fbjs/lib/createNodesFromMarkup');\nvar emptyFunction = require('fbjs/lib/emptyFunction');\nvar invariant = require('fbjs/lib/invariant');\nvar Danger = {\n /**\n * Replaces a node with a string of markup at its current position within its\n * parent. The markup must render into a single root node.\n *\n * @param {DOMElement} oldChild Child node to replace.\n * @param {string} markup Markup to render in place of the child node.\n * @internal\n */\n dangerouslyReplaceNodeWithMarkup: function dangerouslyReplaceNodeWithMarkup(oldChild, markup) {\n !ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a worker thread. Make sure `window` and `document` are available globally before requiring React when unit testing or use ReactDOMServer.renderToString() for server rendering.') : _prodInvariant('56') : void 0;\n !markup ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Missing markup.') : _prodInvariant('57') : void 0;\n !(oldChild.nodeName !== 'HTML') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot replace markup of the <html> node. This is because browser quirks make this unreliable and/or slow. If you want to render to the root you must use server rendering. See ReactDOMServer.renderToString().') : _prodInvariant('58') : void 0;\n if (typeof markup === 'string') {\n var newChild = createNodesFromMarkup(markup, emptyFunction)[0];\n oldChild.parentNode.replaceChild(newChild, oldChild);\n } else {\n DOMLazyTree.replaceChildWithTree(oldChild, markup);\n }\n }\n};\nmodule.exports = Danger;","'use strict';\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\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 * @typechecks\n */\n\n/*eslint-disable fb-www/unsafe-html*/\nvar ExecutionEnvironment = require('./ExecutionEnvironment');\nvar createArrayFromMixed = require('./createArrayFromMixed');\nvar getMarkupWrap = require('./getMarkupWrap');\nvar invariant = require('./invariant');\n\n/**\n * Dummy container used to render all markup.\n */\nvar dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null;\n\n/**\n * Pattern used by `getNodeName`.\n */\nvar nodeNamePattern = /^\\s*<(\\w+)/;\n\n/**\n * Extracts the `nodeName` of the first element in a string of markup.\n *\n * @param {string} markup String of markup.\n * @return {?string} Node name of the supplied markup.\n */\nfunction getNodeName(markup) {\n var nodeNameMatch = markup.match(nodeNamePattern);\n return nodeNameMatch && nodeNameMatch[1].toLowerCase();\n}\n\n/**\n * Creates an array containing the nodes rendered from the supplied markup. The\n * optionally supplied `handleScript` function will be invoked once for each\n * <script> element that is rendered. If no `handleScript` function is supplied,\n * an exception is thrown if any <script> elements are rendered.\n *\n * @param {string} markup A string of valid HTML markup.\n * @param {?function} handleScript Invoked once for each rendered <script>.\n * @return {array<DOMElement|DOMTextNode>} An array of rendered nodes.\n */\nfunction createNodesFromMarkup(markup, handleScript) {\n var node = dummyNode;\n !!!dummyNode ? process.env.NODE_ENV !== 'production' ? invariant(false, 'createNodesFromMarkup dummy not initialized') : invariant(false) : void 0;\n var nodeName = getNodeName(markup);\n var wrap = nodeName && getMarkupWrap(nodeName);\n if (wrap) {\n node.innerHTML = wrap[1] + markup + wrap[2];\n var wrapDepth = wrap[0];\n while (wrapDepth--) {\n node = node.lastChild;\n }\n } else {\n node.innerHTML = markup;\n }\n var scripts = node.getElementsByTagName('script');\n if (scripts.length) {\n !handleScript ? process.env.NODE_ENV !== 'production' ? invariant(false, 'createNodesFromMarkup(...): Unexpected <script> element rendered.') : invariant(false) : void 0;\n createArrayFromMixed(scripts).forEach(handleScript);\n }\n var nodes = Array.from(node.childNodes);\n while (node.lastChild) {\n node.removeChild(node.lastChild);\n }\n return nodes;\n}\nmodule.exports = createNodesFromMarkup;","'use strict';\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\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 * @typechecks\n */\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nvar invariant = require('./invariant');\n\n/**\n * Convert array-like objects to arrays.\n *\n * This API assumes the caller knows the contents of the data type. For less\n * well defined inputs use createArrayFromMixed.\n *\n * @param {object|function|filelist} obj\n * @return {array}\n */\nfunction toArray(obj) {\n var length = obj.length;\n\n // Some browsers builtin objects can report typeof 'function' (e.g. NodeList\n // in old versions of Safari).\n !(!Array.isArray(obj) && (_typeof(obj) === 'object' || typeof obj === 'function')) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Array-like object expected') : invariant(false) : void 0;\n !(typeof length === 'number') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object needs a length property') : invariant(false) : void 0;\n !(length === 0 || length - 1 in obj) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object should have keys for indices') : invariant(false) : void 0;\n !(typeof obj.callee !== 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object can\\'t be `arguments`. Use rest params ' + '(function(...args) {}) or Array.from() instead.') : invariant(false) : void 0;\n\n // Old IE doesn't give collections access to hasOwnProperty. Assume inputs\n // without method will throw during the slice call and skip straight to the\n // fallback.\n if (obj.hasOwnProperty) {\n try {\n return Array.prototype.slice.call(obj);\n } catch (e) {\n // IE < 9 does not support Array#slice on collections objects\n }\n }\n\n // Fall back to copying key by key. This assumes all keys have a value,\n // so will not preserve sparsely populated inputs.\n var ret = Array(length);\n for (var ii = 0; ii < length; ii++) {\n ret[ii] = obj[ii];\n }\n return ret;\n}\n\n/**\n * Perform a heuristic test to determine if an object is \"array-like\".\n *\n * A monk asked Joshu, a Zen master, \"Has a dog Buddha nature?\"\n * Joshu replied: \"Mu.\"\n *\n * This function determines if its argument has \"array nature\": it returns\n * true if the argument is an actual array, an `arguments' object, or an\n * HTMLCollection (e.g. node.childNodes or node.getElementsByTagName()).\n *\n * It will return false for other array-like objects like Filelist.\n *\n * @param {*} obj\n * @return {boolean}\n */\nfunction hasArrayNature(obj) {\n return (\n // not null/false\n !!obj && (\n // arrays are objects, NodeLists are functions in Safari\n _typeof(obj) == 'object' || typeof obj == 'function') &&\n // quacks like an array\n 'length' in obj &&\n // not window\n !('setInterval' in obj) &&\n // no DOM node should be considered an array-like\n // a 'select' element has 'length' and 'item' properties on IE8\n typeof obj.nodeType != 'number' && (\n // a real array\n Array.isArray(obj) ||\n // arguments\n 'callee' in obj ||\n // HTMLCollection/NodeList\n 'item' in obj)\n );\n}\n\n/**\n * Ensure that the argument is an array by wrapping it in an array if it is not.\n * Creates a copy of the argument if it is already an array.\n *\n * This is mostly useful idiomatically:\n *\n * var createArrayFromMixed = require('createArrayFromMixed');\n *\n * function takesOneOrMoreThings(things) {\n * things = createArrayFromMixed(things);\n * ...\n * }\n *\n * This allows you to treat `things' as an array, but accept scalars in the API.\n *\n * If you need to convert an array-like object, like `arguments`, into an array\n * use toArray instead.\n *\n * @param {*} obj\n * @return {array}\n */\nfunction createArrayFromMixed(obj) {\n if (!hasArrayNature(obj)) {\n return [obj];\n } else if (Array.isArray(obj)) {\n return obj.slice();\n } else {\n return toArray(obj);\n }\n}\nmodule.exports = createArrayFromMixed;","'use strict';\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n/*eslint-disable fb-www/unsafe-html */\nvar ExecutionEnvironment = require('./ExecutionEnvironment');\nvar invariant = require('./invariant');\n\n/**\n * Dummy container used to detect which wraps are necessary.\n */\nvar dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null;\n\n/**\n * Some browsers cannot use `innerHTML` to render certain elements standalone,\n * so we wrap them, render the wrapped nodes, then extract the desired node.\n *\n * In IE8, certain elements cannot render alone, so wrap all elements ('*').\n */\n\nvar shouldWrap = {};\nvar selectWrap = [1, '<select multiple=\"true\">', '</select>'];\nvar tableWrap = [1, '<table>', '</table>'];\nvar trWrap = [3, '<table><tbody><tr>', '</tr></tbody></table>'];\nvar svgWrap = [1, '<svg xmlns=\"http://www.w3.org/2000/svg\">', '</svg>'];\nvar markupWrap = {\n '*': [1, '?<div>', '</div>'],\n 'area': [1, '<map>', '</map>'],\n 'col': [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'],\n 'legend': [1, '<fieldset>', '</fieldset>'],\n 'param': [1, '<object>', '</object>'],\n 'tr': [2, '<table><tbody>', '</tbody></table>'],\n 'optgroup': selectWrap,\n 'option': selectWrap,\n 'caption': tableWrap,\n 'colgroup': tableWrap,\n 'tbody': tableWrap,\n 'tfoot': tableWrap,\n 'thead': tableWrap,\n 'td': trWrap,\n 'th': trWrap\n};\n\n// Initialize the SVG elements since we know they'll always need to be wrapped\n// consistently. If they are created inside a <div> they will be initialized in\n// the wrong namespace (and will not display).\nvar svgElements = ['circle', 'clipPath', 'defs', 'ellipse', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'text', 'tspan'];\nsvgElements.forEach(function (nodeName) {\n markupWrap[nodeName] = svgWrap;\n shouldWrap[nodeName] = true;\n});\n\n/**\n * Gets the markup wrap configuration for the supplied `nodeName`.\n *\n * NOTE: This lazily detects which wraps are necessary for the current browser.\n *\n * @param {string} nodeName Lowercase `nodeName`.\n * @return {?array} Markup wrap configuration, if applicable.\n */\nfunction getMarkupWrap(nodeName) {\n !!!dummyNode ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Markup wrapping node not initialized') : invariant(false) : void 0;\n if (!markupWrap.hasOwnProperty(nodeName)) {\n nodeName = '*';\n }\n if (!shouldWrap.hasOwnProperty(nodeName)) {\n if (nodeName === '*') {\n dummyNode.innerHTML = '<link />';\n } else {\n dummyNode.innerHTML = '<' + nodeName + '></' + nodeName + '>';\n }\n shouldWrap[nodeName] = !dummyNode.firstChild;\n }\n return shouldWrap[nodeName] ? markupWrap[nodeName] : null;\n}\nmodule.exports = getMarkupWrap;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar DOMChildrenOperations = require('./DOMChildrenOperations');\nvar ReactDOMComponentTree = require('./ReactDOMComponentTree');\n\n/**\n * Operations used to process updates to DOM nodes.\n */\nvar ReactDOMIDOperations = {\n /**\n * Updates a component's children by processing a series of updates.\n *\n * @param {array<object>} updates List of update configurations.\n * @internal\n */\n dangerouslyProcessChildrenUpdates: function dangerouslyProcessChildrenUpdates(parentInst, updates) {\n var node = ReactDOMComponentTree.getNodeFromInstance(parentInst);\n DOMChildrenOperations.processUpdates(node, updates);\n }\n};\nmodule.exports = ReactDOMIDOperations;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n/* global hasOwnProperty:true */\n\n'use strict';\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nvar _prodInvariant = require('./reactProdInvariant'),\n _assign = require('object-assign');\nvar AutoFocusUtils = require('./AutoFocusUtils');\nvar CSSPropertyOperations = require('./CSSPropertyOperations');\nvar DOMLazyTree = require('./DOMLazyTree');\nvar DOMNamespaces = require('./DOMNamespaces');\nvar DOMProperty = require('./DOMProperty');\nvar DOMPropertyOperations = require('./DOMPropertyOperations');\nvar EventPluginHub = require('./EventPluginHub');\nvar EventPluginRegistry = require('./EventPluginRegistry');\nvar ReactBrowserEventEmitter = require('./ReactBrowserEventEmitter');\nvar ReactDOMComponentFlags = require('./ReactDOMComponentFlags');\nvar ReactDOMComponentTree = require('./ReactDOMComponentTree');\nvar ReactDOMInput = require('./ReactDOMInput');\nvar ReactDOMOption = require('./ReactDOMOption');\nvar ReactDOMSelect = require('./ReactDOMSelect');\nvar ReactDOMTextarea = require('./ReactDOMTextarea');\nvar ReactInstrumentation = require('./ReactInstrumentation');\nvar ReactMultiChild = require('./ReactMultiChild');\nvar ReactServerRenderingTransaction = require('./ReactServerRenderingTransaction');\nvar emptyFunction = require('fbjs/lib/emptyFunction');\nvar escapeTextContentForBrowser = require('./escapeTextContentForBrowser');\nvar invariant = require('fbjs/lib/invariant');\nvar isEventSupported = require('./isEventSupported');\nvar shallowEqual = require('fbjs/lib/shallowEqual');\nvar inputValueTracking = require('./inputValueTracking');\nvar validateDOMNesting = require('./validateDOMNesting');\nvar warning = require('fbjs/lib/warning');\nvar Flags = ReactDOMComponentFlags;\nvar deleteListener = EventPluginHub.deleteListener;\nvar getNode = ReactDOMComponentTree.getNodeFromInstance;\nvar listenTo = ReactBrowserEventEmitter.listenTo;\nvar registrationNameModules = EventPluginRegistry.registrationNameModules;\n\n// For quickly matching children type, to test if can be treated as content.\nvar CONTENT_TYPES = {\n string: true,\n number: true\n};\nvar STYLE = 'style';\nvar HTML = '__html';\nvar RESERVED_PROPS = {\n children: null,\n dangerouslySetInnerHTML: null,\n suppressContentEditableWarning: null\n};\n\n// Node type for document fragments (Node.DOCUMENT_FRAGMENT_NODE).\nvar DOC_FRAGMENT_TYPE = 11;\nfunction getDeclarationErrorAddendum(internalInstance) {\n if (internalInstance) {\n var owner = internalInstance._currentElement._owner || null;\n if (owner) {\n var name = owner.getName();\n if (name) {\n return ' This DOM node was rendered by `' + name + '`.';\n }\n }\n }\n return '';\n}\nfunction friendlyStringify(obj) {\n if (_typeof(obj) === 'object') {\n if (Array.isArray(obj)) {\n return '[' + obj.map(friendlyStringify).join(', ') + ']';\n } else {\n var pairs = [];\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n var keyEscaped = /^[a-z$_][\\w$_]*$/i.test(key) ? key : JSON.stringify(key);\n pairs.push(keyEscaped + ': ' + friendlyStringify(obj[key]));\n }\n }\n return '{' + pairs.join(', ') + '}';\n }\n } else if (typeof obj === 'string') {\n return JSON.stringify(obj);\n } else if (typeof obj === 'function') {\n return '[function object]';\n }\n // Differs from JSON.stringify in that undefined because undefined and that\n // inf and nan don't become null\n return String(obj);\n}\nvar styleMutationWarning = {};\nfunction checkAndWarnForMutatedStyle(style1, style2, component) {\n if (style1 == null || style2 == null) {\n return;\n }\n if (shallowEqual(style1, style2)) {\n return;\n }\n var componentName = component._tag;\n var owner = component._currentElement._owner;\n var ownerName;\n if (owner) {\n ownerName = owner.getName();\n }\n var hash = ownerName + '|' + componentName;\n if (styleMutationWarning.hasOwnProperty(hash)) {\n return;\n }\n styleMutationWarning[hash] = true;\n process.env.NODE_ENV !== 'production' ? warning(false, '`%s` was passed a style object that has previously been mutated. ' + 'Mutating `style` is deprecated. Consider cloning it beforehand. Check ' + 'the `render` %s. Previous style: %s. Mutated style: %s.', componentName, owner ? 'of `' + ownerName + '`' : 'using <' + componentName + '>', friendlyStringify(style1), friendlyStringify(style2)) : void 0;\n}\n\n/**\n * @param {object} component\n * @param {?object} props\n */\nfunction assertValidProps(component, props) {\n if (!props) {\n return;\n }\n // Note the use of `==` which checks for null or undefined.\n if (voidElementTags[component._tag]) {\n !(props.children == null && props.dangerouslySetInnerHTML == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.%s', component._tag, component._currentElement._owner ? ' Check the render method of ' + component._currentElement._owner.getName() + '.' : '') : _prodInvariant('137', component._tag, component._currentElement._owner ? ' Check the render method of ' + component._currentElement._owner.getName() + '.' : '') : void 0;\n }\n if (props.dangerouslySetInnerHTML != null) {\n !(props.children == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.') : _prodInvariant('60') : void 0;\n !(_typeof(props.dangerouslySetInnerHTML) === 'object' && HTML in props.dangerouslySetInnerHTML) ? process.env.NODE_ENV !== 'production' ? invariant(false, '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.') : _prodInvariant('61') : void 0;\n }\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(props.innerHTML == null, 'Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.') : void 0;\n process.env.NODE_ENV !== 'production' ? warning(props.suppressContentEditableWarning || !props.contentEditable || props.children == null, 'A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.') : void 0;\n process.env.NODE_ENV !== 'production' ? warning(props.onFocusIn == null && props.onFocusOut == null, 'React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.') : void 0;\n }\n !(props.style == null || _typeof(props.style) === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + \\'em\\'}} when using JSX.%s', getDeclarationErrorAddendum(component)) : _prodInvariant('62', getDeclarationErrorAddendum(component)) : void 0;\n}\nfunction enqueuePutListener(inst, registrationName, listener, transaction) {\n if (transaction instanceof ReactServerRenderingTransaction) {\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n // IE8 has no API for event capturing and the `onScroll` event doesn't\n // bubble.\n process.env.NODE_ENV !== 'production' ? warning(registrationName !== 'onScroll' || isEventSupported('scroll', true), \"This browser doesn't support the `onScroll` event\") : void 0;\n }\n var containerInfo = inst._hostContainerInfo;\n var isDocumentFragment = containerInfo._node && containerInfo._node.nodeType === DOC_FRAGMENT_TYPE;\n var doc = isDocumentFragment ? containerInfo._node : containerInfo._ownerDocument;\n listenTo(registrationName, doc);\n transaction.getReactMountReady().enqueue(putListener, {\n inst: inst,\n registrationName: registrationName,\n listener: listener\n });\n}\nfunction putListener() {\n var listenerToPut = this;\n EventPluginHub.putListener(listenerToPut.inst, listenerToPut.registrationName, listenerToPut.listener);\n}\nfunction inputPostMount() {\n var inst = this;\n ReactDOMInput.postMountWrapper(inst);\n}\nfunction textareaPostMount() {\n var inst = this;\n ReactDOMTextarea.postMountWrapper(inst);\n}\nfunction optionPostMount() {\n var inst = this;\n ReactDOMOption.postMountWrapper(inst);\n}\nvar setAndValidateContentChildDev = emptyFunction;\nif (process.env.NODE_ENV !== 'production') {\n setAndValidateContentChildDev = function setAndValidateContentChildDev(content) {\n var hasExistingContent = this._contentDebugID != null;\n var debugID = this._debugID;\n // This ID represents the inlined child that has no backing instance:\n var contentDebugID = -debugID;\n if (content == null) {\n if (hasExistingContent) {\n ReactInstrumentation.debugTool.onUnmountComponent(this._contentDebugID);\n }\n this._contentDebugID = null;\n return;\n }\n validateDOMNesting(null, String(content), this, this._ancestorInfo);\n this._contentDebugID = contentDebugID;\n if (hasExistingContent) {\n ReactInstrumentation.debugTool.onBeforeUpdateComponent(contentDebugID, content);\n ReactInstrumentation.debugTool.onUpdateComponent(contentDebugID);\n } else {\n ReactInstrumentation.debugTool.onBeforeMountComponent(contentDebugID, content, debugID);\n ReactInstrumentation.debugTool.onMountComponent(contentDebugID);\n ReactInstrumentation.debugTool.onSetChildren(debugID, [contentDebugID]);\n }\n };\n}\n\n// There are so many media events, it makes sense to just\n// maintain a list rather than create a `trapBubbledEvent` for each\nvar mediaEvents = {\n topAbort: 'abort',\n topCanPlay: 'canplay',\n topCanPlayThrough: 'canplaythrough',\n topDurationChange: 'durationchange',\n topEmptied: 'emptied',\n topEncrypted: 'encrypted',\n topEnded: 'ended',\n topError: 'error',\n topLoadedData: 'loadeddata',\n topLoadedMetadata: 'loadedmetadata',\n topLoadStart: 'loadstart',\n topPause: 'pause',\n topPlay: 'play',\n topPlaying: 'playing',\n topProgress: 'progress',\n topRateChange: 'ratechange',\n topSeeked: 'seeked',\n topSeeking: 'seeking',\n topStalled: 'stalled',\n topSuspend: 'suspend',\n topTimeUpdate: 'timeupdate',\n topVolumeChange: 'volumechange',\n topWaiting: 'waiting'\n};\nfunction trackInputValue() {\n inputValueTracking.track(this);\n}\nfunction trapBubbledEventsLocal() {\n var inst = this;\n // If a component renders to null or if another component fatals and causes\n // the state of the tree to be corrupted, `node` here can be null.\n !inst._rootNodeID ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Must be mounted to trap events') : _prodInvariant('63') : void 0;\n var node = getNode(inst);\n !node ? process.env.NODE_ENV !== 'production' ? invariant(false, 'trapBubbledEvent(...): Requires node to be rendered.') : _prodInvariant('64') : void 0;\n switch (inst._tag) {\n case 'iframe':\n case 'object':\n inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topLoad', 'load', node)];\n break;\n case 'video':\n case 'audio':\n inst._wrapperState.listeners = [];\n // Create listener for each media event\n for (var event in mediaEvents) {\n if (mediaEvents.hasOwnProperty(event)) {\n inst._wrapperState.listeners.push(ReactBrowserEventEmitter.trapBubbledEvent(event, mediaEvents[event], node));\n }\n }\n break;\n case 'source':\n inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topError', 'error', node)];\n break;\n case 'img':\n inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topError', 'error', node), ReactBrowserEventEmitter.trapBubbledEvent('topLoad', 'load', node)];\n break;\n case 'form':\n inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topReset', 'reset', node), ReactBrowserEventEmitter.trapBubbledEvent('topSubmit', 'submit', node)];\n break;\n case 'input':\n case 'select':\n case 'textarea':\n inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topInvalid', 'invalid', node)];\n break;\n }\n}\nfunction postUpdateSelectWrapper() {\n ReactDOMSelect.postUpdateWrapper(this);\n}\n\n// For HTML, certain tags should omit their close tag. We keep a whitelist for\n// those special-case tags.\n\nvar omittedCloseTags = {\n area: true,\n base: true,\n br: true,\n col: true,\n embed: true,\n hr: true,\n img: true,\n input: true,\n keygen: true,\n link: true,\n meta: true,\n param: true,\n source: true,\n track: true,\n wbr: true\n // NOTE: menuitem's close tag should be omitted, but that causes problems.\n};\nvar newlineEatingTags = {\n listing: true,\n pre: true,\n textarea: true\n};\n\n// For HTML, certain tags cannot have children. This has the same purpose as\n// `omittedCloseTags` except that `menuitem` should still have its closing tag.\n\nvar voidElementTags = _assign({\n menuitem: true\n}, omittedCloseTags);\n\n// We accept any tag to be rendered but since this gets injected into arbitrary\n// HTML, we want to make sure that it's a safe tag.\n// http://www.w3.org/TR/REC-xml/#NT-Name\n\nvar VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\\.\\-\\d]*$/; // Simplified subset\nvar validatedTagCache = {};\nvar hasOwnProperty = {}.hasOwnProperty;\nfunction validateDangerousTag(tag) {\n if (!hasOwnProperty.call(validatedTagCache, tag)) {\n !VALID_TAG_REGEX.test(tag) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Invalid tag: %s', tag) : _prodInvariant('65', tag) : void 0;\n validatedTagCache[tag] = true;\n }\n}\nfunction isCustomComponent(tagName, props) {\n return tagName.indexOf('-') >= 0 || props.is != null;\n}\nvar globalIdCounter = 1;\n\n/**\n * Creates a new React class that is idempotent and capable of containing other\n * React components. It accepts event listeners and DOM properties that are\n * valid according to `DOMProperty`.\n *\n * - Event listeners: `onClick`, `onMouseDown`, etc.\n * - DOM properties: `className`, `name`, `title`, etc.\n *\n * The `style` property functions differently from the DOM API. It accepts an\n * object mapping of style properties to values.\n *\n * @constructor ReactDOMComponent\n * @extends ReactMultiChild\n */\nfunction ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}\nReactDOMComponent.displayName = 'ReactDOMComponent';\nReactDOMComponent.Mixin = {\n /**\n * Generates root tag markup then recurses. This method has side effects and\n * is not idempotent.\n *\n * @internal\n * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction\n * @param {?ReactDOMComponent} the parent component instance\n * @param {?object} info about the host container\n * @param {object} context\n * @return {string} The computed markup.\n */\n mountComponent: function mountComponent(transaction, hostParent, hostContainerInfo, context) {\n this._rootNodeID = globalIdCounter++;\n this._domID = hostContainerInfo._idCounter++;\n this._hostParent = hostParent;\n this._hostContainerInfo = hostContainerInfo;\n var props = this._currentElement.props;\n switch (this._tag) {\n case 'audio':\n case 'form':\n case 'iframe':\n case 'img':\n case 'link':\n case 'object':\n case 'source':\n case 'video':\n this._wrapperState = {\n listeners: null\n };\n transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);\n break;\n case 'input':\n ReactDOMInput.mountWrapper(this, props, hostParent);\n props = ReactDOMInput.getHostProps(this, props);\n transaction.getReactMountReady().enqueue(trackInputValue, this);\n transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);\n break;\n case 'option':\n ReactDOMOption.mountWrapper(this, props, hostParent);\n props = ReactDOMOption.getHostProps(this, props);\n break;\n case 'select':\n ReactDOMSelect.mountWrapper(this, props, hostParent);\n props = ReactDOMSelect.getHostProps(this, props);\n transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);\n break;\n case 'textarea':\n ReactDOMTextarea.mountWrapper(this, props, hostParent);\n props = ReactDOMTextarea.getHostProps(this, props);\n transaction.getReactMountReady().enqueue(trackInputValue, this);\n transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);\n break;\n }\n assertValidProps(this, props);\n\n // We create tags in the namespace of their parent container, except HTML\n // tags get no namespace.\n var namespaceURI;\n var parentTag;\n if (hostParent != null) {\n namespaceURI = hostParent._namespaceURI;\n parentTag = hostParent._tag;\n } else if (hostContainerInfo._tag) {\n namespaceURI = hostContainerInfo._namespaceURI;\n parentTag = hostContainerInfo._tag;\n }\n if (namespaceURI == null || namespaceURI === DOMNamespaces.svg && parentTag === 'foreignobject') {\n namespaceURI = DOMNamespaces.html;\n }\n if (namespaceURI === DOMNamespaces.html) {\n if (this._tag === 'svg') {\n namespaceURI = DOMNamespaces.svg;\n } else if (this._tag === 'math') {\n namespaceURI = DOMNamespaces.mathml;\n }\n }\n this._namespaceURI = namespaceURI;\n if (process.env.NODE_ENV !== 'production') {\n var parentInfo;\n if (hostParent != null) {\n parentInfo = hostParent._ancestorInfo;\n } else if (hostContainerInfo._tag) {\n parentInfo = hostContainerInfo._ancestorInfo;\n }\n if (parentInfo) {\n // parentInfo should always be present except for the top-level\n // component when server rendering\n validateDOMNesting(this._tag, null, this, parentInfo);\n }\n this._ancestorInfo = validateDOMNesting.updatedAncestorInfo(parentInfo, this._tag, this);\n }\n var mountImage;\n if (transaction.useCreateElement) {\n var ownerDocument = hostContainerInfo._ownerDocument;\n var el;\n if (namespaceURI === DOMNamespaces.html) {\n if (this._tag === 'script') {\n // Create the script via .innerHTML so its \"parser-inserted\" flag is\n // set to true and it does not execute\n var div = ownerDocument.createElement('div');\n var type = this._currentElement.type;\n div.innerHTML = '<' + type + '></' + type + '>';\n el = div.removeChild(div.firstChild);\n } else if (props.is) {\n el = ownerDocument.createElement(this._currentElement.type, props.is);\n } else {\n // Separate else branch instead of using `props.is || undefined` above becuase of a Firefox bug.\n // See discussion in https://github.com/facebook/react/pull/6896\n // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240\n el = ownerDocument.createElement(this._currentElement.type);\n }\n } else {\n el = ownerDocument.createElementNS(namespaceURI, this._currentElement.type);\n }\n ReactDOMComponentTree.precacheNode(this, el);\n this._flags |= Flags.hasCachedChildNodes;\n if (!this._hostParent) {\n DOMPropertyOperations.setAttributeForRoot(el);\n }\n this._updateDOMProperties(null, props, transaction);\n var lazyTree = DOMLazyTree(el);\n this._createInitialChildren(transaction, props, context, lazyTree);\n mountImage = lazyTree;\n } else {\n var tagOpen = this._createOpenTagMarkupAndPutListeners(transaction, props);\n var tagContent = this._createContentMarkup(transaction, props, context);\n if (!tagContent && omittedCloseTags[this._tag]) {\n mountImage = tagOpen + '/>';\n } else {\n mountImage = tagOpen + '>' + tagContent + '</' + this._currentElement.type + '>';\n }\n }\n switch (this._tag) {\n case 'input':\n transaction.getReactMountReady().enqueue(inputPostMount, this);\n if (props.autoFocus) {\n transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);\n }\n break;\n case 'textarea':\n transaction.getReactMountReady().enqueue(textareaPostMount, this);\n if (props.autoFocus) {\n transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);\n }\n break;\n case 'select':\n if (props.autoFocus) {\n transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);\n }\n break;\n case 'button':\n if (props.autoFocus) {\n transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);\n }\n break;\n case 'option':\n transaction.getReactMountReady().enqueue(optionPostMount, this);\n break;\n }\n return mountImage;\n },\n /**\n * Creates markup for the open tag and all attributes.\n *\n * This method has side effects because events get registered.\n *\n * Iterating over object properties is faster than iterating over arrays.\n * @see http://jsperf.com/obj-vs-arr-iteration\n *\n * @private\n * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction\n * @param {object} props\n * @return {string} Markup of opening tag.\n */\n _createOpenTagMarkupAndPutListeners: function _createOpenTagMarkupAndPutListeners(transaction, props) {\n var ret = '<' + this._currentElement.type;\n for (var propKey in props) {\n if (!props.hasOwnProperty(propKey)) {\n continue;\n }\n var propValue = props[propKey];\n if (propValue == null) {\n continue;\n }\n if (registrationNameModules.hasOwnProperty(propKey)) {\n if (propValue) {\n enqueuePutListener(this, propKey, propValue, transaction);\n }\n } else {\n if (propKey === STYLE) {\n if (propValue) {\n if (process.env.NODE_ENV !== 'production') {\n // See `_updateDOMProperties`. style block\n this._previousStyle = propValue;\n }\n propValue = this._previousStyleCopy = _assign({}, props.style);\n }\n propValue = CSSPropertyOperations.createMarkupForStyles(propValue, this);\n }\n var markup = null;\n if (this._tag != null && isCustomComponent(this._tag, props)) {\n if (!RESERVED_PROPS.hasOwnProperty(propKey)) {\n markup = DOMPropertyOperations.createMarkupForCustomAttribute(propKey, propValue);\n }\n } else {\n markup = DOMPropertyOperations.createMarkupForProperty(propKey, propValue);\n }\n if (markup) {\n ret += ' ' + markup;\n }\n }\n }\n\n // For static pages, no need to put React ID and checksum. Saves lots of\n // bytes.\n if (transaction.renderToStaticMarkup) {\n return ret;\n }\n if (!this._hostParent) {\n ret += ' ' + DOMPropertyOperations.createMarkupForRoot();\n }\n ret += ' ' + DOMPropertyOperations.createMarkupForID(this._domID);\n return ret;\n },\n /**\n * Creates markup for the content between the tags.\n *\n * @private\n * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction\n * @param {object} props\n * @param {object} context\n * @return {string} Content markup.\n */\n _createContentMarkup: function _createContentMarkup(transaction, props, context) {\n var ret = '';\n\n // Intentional use of != to avoid catching zero/false.\n var innerHTML = props.dangerouslySetInnerHTML;\n if (innerHTML != null) {\n if (innerHTML.__html != null) {\n ret = innerHTML.__html;\n }\n } else {\n var contentToUse = CONTENT_TYPES[_typeof(props.children)] ? props.children : null;\n var childrenToUse = contentToUse != null ? null : props.children;\n if (contentToUse != null) {\n // TODO: Validate that text is allowed as a child of this node\n ret = escapeTextContentForBrowser(contentToUse);\n if (process.env.NODE_ENV !== 'production') {\n setAndValidateContentChildDev.call(this, contentToUse);\n }\n } else if (childrenToUse != null) {\n var mountImages = this.mountChildren(childrenToUse, transaction, context);\n ret = mountImages.join('');\n }\n }\n if (newlineEatingTags[this._tag] && ret.charAt(0) === '\\n') {\n // text/html ignores the first character in these tags if it's a newline\n // Prefer to break application/xml over text/html (for now) by adding\n // a newline specifically to get eaten by the parser. (Alternately for\n // textareas, replacing \"^\\n\" with \"\\r\\n\" doesn't get eaten, and the first\n // \\r is normalized out by HTMLTextAreaElement#value.)\n // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre>\n // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions>\n // See: <http://www.w3.org/TR/html5/syntax.html#newlines>\n // See: Parsing of \"textarea\" \"listing\" and \"pre\" elements\n // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody>\n return '\\n' + ret;\n } else {\n return ret;\n }\n },\n _createInitialChildren: function _createInitialChildren(transaction, props, context, lazyTree) {\n // Intentional use of != to avoid catching zero/false.\n var innerHTML = props.dangerouslySetInnerHTML;\n if (innerHTML != null) {\n if (innerHTML.__html != null) {\n DOMLazyTree.queueHTML(lazyTree, innerHTML.__html);\n }\n } else {\n var contentToUse = CONTENT_TYPES[_typeof(props.children)] ? props.children : null;\n var childrenToUse = contentToUse != null ? null : props.children;\n // TODO: Validate that text is allowed as a child of this node\n if (contentToUse != null) {\n // Avoid setting textContent when the text is empty. In IE11 setting\n // textContent on a text area will cause the placeholder to not\n // show within the textarea until it has been focused and blurred again.\n // https://github.com/facebook/react/issues/6731#issuecomment-254874553\n if (contentToUse !== '') {\n if (process.env.NODE_ENV !== 'production') {\n setAndValidateContentChildDev.call(this, contentToUse);\n }\n DOMLazyTree.queueText(lazyTree, contentToUse);\n }\n } else if (childrenToUse != null) {\n var mountImages = this.mountChildren(childrenToUse, transaction, context);\n for (var i = 0; i < mountImages.length; i++) {\n DOMLazyTree.queueChild(lazyTree, mountImages[i]);\n }\n }\n }\n },\n /**\n * Receives a next element and updates the component.\n *\n * @internal\n * @param {ReactElement} nextElement\n * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction\n * @param {object} context\n */\n receiveComponent: function receiveComponent(nextElement, transaction, context) {\n var prevElement = this._currentElement;\n this._currentElement = nextElement;\n this.updateComponent(transaction, prevElement, nextElement, context);\n },\n /**\n * Updates a DOM component after it has already been allocated and\n * attached to the DOM. Reconciles the root DOM node, then recurses.\n *\n * @param {ReactReconcileTransaction} transaction\n * @param {ReactElement} prevElement\n * @param {ReactElement} nextElement\n * @internal\n * @overridable\n */\n updateComponent: function updateComponent(transaction, prevElement, nextElement, context) {\n var lastProps = prevElement.props;\n var nextProps = this._currentElement.props;\n switch (this._tag) {\n case 'input':\n lastProps = ReactDOMInput.getHostProps(this, lastProps);\n nextProps = ReactDOMInput.getHostProps(this, nextProps);\n break;\n case 'option':\n lastProps = ReactDOMOption.getHostProps(this, lastProps);\n nextProps = ReactDOMOption.getHostProps(this, nextProps);\n break;\n case 'select':\n lastProps = ReactDOMSelect.getHostProps(this, lastProps);\n nextProps = ReactDOMSelect.getHostProps(this, nextProps);\n break;\n case 'textarea':\n lastProps = ReactDOMTextarea.getHostProps(this, lastProps);\n nextProps = ReactDOMTextarea.getHostProps(this, nextProps);\n break;\n }\n assertValidProps(this, nextProps);\n this._updateDOMProperties(lastProps, nextProps, transaction);\n this._updateDOMChildren(lastProps, nextProps, transaction, context);\n switch (this._tag) {\n case 'input':\n // Update the wrapper around inputs *after* updating props. This has to\n // happen after `_updateDOMProperties`. Otherwise HTML5 input validations\n // raise warnings and prevent the new value from being assigned.\n ReactDOMInput.updateWrapper(this);\n\n // We also check that we haven't missed a value update, such as a\n // Radio group shifting the checked value to another named radio input.\n inputValueTracking.updateValueIfChanged(this);\n break;\n case 'textarea':\n ReactDOMTextarea.updateWrapper(this);\n break;\n case 'select':\n // <select> value update needs to occur after <option> children\n // reconciliation\n transaction.getReactMountReady().enqueue(postUpdateSelectWrapper, this);\n break;\n }\n },\n /**\n * Reconciles the properties by detecting differences in property values and\n * updating the DOM as necessary. This function is probably the single most\n * critical path for performance optimization.\n *\n * TODO: Benchmark whether checking for changed values in memory actually\n * improves performance (especially statically positioned elements).\n * TODO: Benchmark the effects of putting this at the top since 99% of props\n * do not change for a given reconciliation.\n * TODO: Benchmark areas that can be improved with caching.\n *\n * @private\n * @param {object} lastProps\n * @param {object} nextProps\n * @param {?DOMElement} node\n */\n _updateDOMProperties: function _updateDOMProperties(lastProps, nextProps, transaction) {\n var propKey;\n var styleName;\n var styleUpdates;\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n continue;\n }\n if (propKey === STYLE) {\n var lastStyle = this._previousStyleCopy;\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n styleUpdates = styleUpdates || {};\n styleUpdates[styleName] = '';\n }\n }\n this._previousStyleCopy = null;\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (lastProps[propKey]) {\n // Only call deleteListener if there was a listener previously or\n // else willDeleteListener gets called when there wasn't actually a\n // listener (e.g., onClick={null})\n deleteListener(this, propKey);\n }\n } else if (isCustomComponent(this._tag, lastProps)) {\n if (!RESERVED_PROPS.hasOwnProperty(propKey)) {\n DOMPropertyOperations.deleteValueForAttribute(getNode(this), propKey);\n }\n } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) {\n DOMPropertyOperations.deleteValueForProperty(getNode(this), propKey);\n }\n }\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = propKey === STYLE ? this._previousStyleCopy : lastProps != null ? lastProps[propKey] : undefined;\n if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n continue;\n }\n if (propKey === STYLE) {\n if (nextProp) {\n if (process.env.NODE_ENV !== 'production') {\n checkAndWarnForMutatedStyle(this._previousStyleCopy, this._previousStyle, this);\n this._previousStyle = nextProp;\n }\n nextProp = this._previousStyleCopy = _assign({}, nextProp);\n } else {\n this._previousStyleCopy = null;\n }\n if (lastProp) {\n // Unset styles on `lastProp` but not on `nextProp`.\n for (styleName in lastProp) {\n if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n styleUpdates = styleUpdates || {};\n styleUpdates[styleName] = '';\n }\n }\n // Update styles that changed since `lastProp`.\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n styleUpdates = styleUpdates || {};\n styleUpdates[styleName] = nextProp[styleName];\n }\n }\n } else {\n // Relies on `updateStylesByID` not mutating `styleUpdates`.\n styleUpdates = nextProp;\n }\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (nextProp) {\n enqueuePutListener(this, propKey, nextProp, transaction);\n } else if (lastProp) {\n deleteListener(this, propKey);\n }\n } else if (isCustomComponent(this._tag, nextProps)) {\n if (!RESERVED_PROPS.hasOwnProperty(propKey)) {\n DOMPropertyOperations.setValueForAttribute(getNode(this), propKey, nextProp);\n }\n } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) {\n var node = getNode(this);\n // If we're updating to null or undefined, we should remove the property\n // from the DOM node instead of inadvertently setting to a string. This\n // brings us in line with the same behavior we have on initial render.\n if (nextProp != null) {\n DOMPropertyOperations.setValueForProperty(node, propKey, nextProp);\n } else {\n DOMPropertyOperations.deleteValueForProperty(node, propKey);\n }\n }\n }\n if (styleUpdates) {\n CSSPropertyOperations.setValueForStyles(getNode(this), styleUpdates, this);\n }\n },\n /**\n * Reconciles the children with the various properties that affect the\n * children content.\n *\n * @param {object} lastProps\n * @param {object} nextProps\n * @param {ReactReconcileTransaction} transaction\n * @param {object} context\n */\n _updateDOMChildren: function _updateDOMChildren(lastProps, nextProps, transaction, context) {\n var lastContent = CONTENT_TYPES[_typeof(lastProps.children)] ? lastProps.children : null;\n var nextContent = CONTENT_TYPES[_typeof(nextProps.children)] ? nextProps.children : null;\n var lastHtml = lastProps.dangerouslySetInnerHTML && lastProps.dangerouslySetInnerHTML.__html;\n var nextHtml = nextProps.dangerouslySetInnerHTML && nextProps.dangerouslySetInnerHTML.__html;\n\n // Note the use of `!=` which checks for null or undefined.\n var lastChildren = lastContent != null ? null : lastProps.children;\n var nextChildren = nextContent != null ? null : nextProps.children;\n\n // If we're switching from children to content/html or vice versa, remove\n // the old content\n var lastHasContentOrHtml = lastContent != null || lastHtml != null;\n var nextHasContentOrHtml = nextContent != null || nextHtml != null;\n if (lastChildren != null && nextChildren == null) {\n this.updateChildren(null, transaction, context);\n } else if (lastHasContentOrHtml && !nextHasContentOrHtml) {\n this.updateTextContent('');\n if (process.env.NODE_ENV !== 'production') {\n ReactInstrumentation.debugTool.onSetChildren(this._debugID, []);\n }\n }\n if (nextContent != null) {\n if (lastContent !== nextContent) {\n this.updateTextContent('' + nextContent);\n if (process.env.NODE_ENV !== 'production') {\n setAndValidateContentChildDev.call(this, nextContent);\n }\n }\n } else if (nextHtml != null) {\n if (lastHtml !== nextHtml) {\n this.updateMarkup('' + nextHtml);\n }\n if (process.env.NODE_ENV !== 'production') {\n ReactInstrumentation.debugTool.onSetChildren(this._debugID, []);\n }\n } else if (nextChildren != null) {\n if (process.env.NODE_ENV !== 'production') {\n setAndValidateContentChildDev.call(this, null);\n }\n this.updateChildren(nextChildren, transaction, context);\n }\n },\n getHostNode: function getHostNode() {\n return getNode(this);\n },\n /**\n * Destroys all event registrations for this instance. Does not remove from\n * the DOM. That must be done by the parent.\n *\n * @internal\n */\n unmountComponent: function unmountComponent(safely) {\n switch (this._tag) {\n case 'audio':\n case 'form':\n case 'iframe':\n case 'img':\n case 'link':\n case 'object':\n case 'source':\n case 'video':\n var listeners = this._wrapperState.listeners;\n if (listeners) {\n for (var i = 0; i < listeners.length; i++) {\n listeners[i].remove();\n }\n }\n break;\n case 'input':\n case 'textarea':\n inputValueTracking.stopTracking(this);\n break;\n case 'html':\n case 'head':\n case 'body':\n /**\n * Components like <html> <head> and <body> can't be removed or added\n * easily in a cross-browser way, however it's valuable to be able to\n * take advantage of React's reconciliation for styling and <title>\n * management. So we just document it and throw in dangerous cases.\n */\n !false ? process.env.NODE_ENV !== 'production' ? invariant(false, '<%s> tried to unmount. Because of cross-browser quirks it is impossible to unmount some top-level components (eg <html>, <head>, and <body>) reliably and efficiently. To fix this, have a single top-level component that never unmounts render these elements.', this._tag) : _prodInvariant('66', this._tag) : void 0;\n break;\n }\n this.unmountChildren(safely);\n ReactDOMComponentTree.uncacheNode(this);\n EventPluginHub.deleteAllListeners(this);\n this._rootNodeID = 0;\n this._domID = 0;\n this._wrapperState = null;\n if (process.env.NODE_ENV !== 'production') {\n setAndValidateContentChildDev.call(this, null);\n }\n },\n getPublicInstance: function getPublicInstance() {\n return getNode(this);\n }\n};\n_assign(ReactDOMComponent.prototype, ReactDOMComponent.Mixin, ReactMultiChild.Mixin);\nmodule.exports = ReactDOMComponent;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar ReactDOMComponentTree = require('./ReactDOMComponentTree');\nvar focusNode = require('fbjs/lib/focusNode');\nvar AutoFocusUtils = {\n focusDOMComponent: function focusDOMComponent() {\n focusNode(ReactDOMComponentTree.getNodeFromInstance(this));\n }\n};\nmodule.exports = AutoFocusUtils;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar CSSProperty = require('./CSSProperty');\nvar ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');\nvar ReactInstrumentation = require('./ReactInstrumentation');\nvar camelizeStyleName = require('fbjs/lib/camelizeStyleName');\nvar dangerousStyleValue = require('./dangerousStyleValue');\nvar hyphenateStyleName = require('fbjs/lib/hyphenateStyleName');\nvar memoizeStringOnly = require('fbjs/lib/memoizeStringOnly');\nvar warning = require('fbjs/lib/warning');\nvar processStyleName = memoizeStringOnly(function (styleName) {\n return hyphenateStyleName(styleName);\n});\nvar hasShorthandPropertyBug = false;\nvar styleFloatAccessor = 'cssFloat';\nif (ExecutionEnvironment.canUseDOM) {\n var tempStyle = document.createElement('div').style;\n try {\n // IE8 throws \"Invalid argument.\" if resetting shorthand style properties.\n tempStyle.font = '';\n } catch (e) {\n hasShorthandPropertyBug = true;\n }\n // IE8 only supports accessing cssFloat (standard) as styleFloat\n if (document.documentElement.style.cssFloat === undefined) {\n styleFloatAccessor = 'styleFloat';\n }\n}\nif (process.env.NODE_ENV !== 'production') {\n // 'msTransform' is correct, but the other prefixes should be capitalized\n var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;\n\n // style values shouldn't contain a semicolon\n var badStyleValueWithSemicolonPattern = /;\\s*$/;\n var warnedStyleNames = {};\n var warnedStyleValues = {};\n var warnedForNaNValue = false;\n var warnHyphenatedStyleName = function warnHyphenatedStyleName(name, owner) {\n if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {\n return;\n }\n warnedStyleNames[name] = true;\n process.env.NODE_ENV !== 'production' ? warning(false, 'Unsupported style property %s. Did you mean %s?%s', name, camelizeStyleName(name), checkRenderMessage(owner)) : void 0;\n };\n var warnBadVendoredStyleName = function warnBadVendoredStyleName(name, owner) {\n if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {\n return;\n }\n warnedStyleNames[name] = true;\n process.env.NODE_ENV !== 'production' ? warning(false, 'Unsupported vendor-prefixed style property %s. Did you mean %s?%s', name, name.charAt(0).toUpperCase() + name.slice(1), checkRenderMessage(owner)) : void 0;\n };\n var warnStyleValueWithSemicolon = function warnStyleValueWithSemicolon(name, value, owner) {\n if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {\n return;\n }\n warnedStyleValues[value] = true;\n process.env.NODE_ENV !== 'production' ? warning(false, \"Style property values shouldn't contain a semicolon.%s \" + 'Try \"%s: %s\" instead.', checkRenderMessage(owner), name, value.replace(badStyleValueWithSemicolonPattern, '')) : void 0;\n };\n var warnStyleValueIsNaN = function warnStyleValueIsNaN(name, value, owner) {\n if (warnedForNaNValue) {\n return;\n }\n warnedForNaNValue = true;\n process.env.NODE_ENV !== 'production' ? warning(false, '`NaN` is an invalid value for the `%s` css style property.%s', name, checkRenderMessage(owner)) : void 0;\n };\n var checkRenderMessage = function checkRenderMessage(owner) {\n if (owner) {\n var name = owner.getName();\n if (name) {\n return ' Check the render method of `' + name + '`.';\n }\n }\n return '';\n };\n\n /**\n * @param {string} name\n * @param {*} value\n * @param {ReactDOMComponent} component\n */\n var warnValidStyle = function warnValidStyle(name, value, component) {\n var owner;\n if (component) {\n owner = component._currentElement._owner;\n }\n if (name.indexOf('-') > -1) {\n warnHyphenatedStyleName(name, owner);\n } else if (badVendoredStyleNamePattern.test(name)) {\n warnBadVendoredStyleName(name, owner);\n } else if (badStyleValueWithSemicolonPattern.test(value)) {\n warnStyleValueWithSemicolon(name, value, owner);\n }\n if (typeof value === 'number' && isNaN(value)) {\n warnStyleValueIsNaN(name, value, owner);\n }\n };\n}\n\n/**\n * Operations for dealing with CSS properties.\n */\nvar CSSPropertyOperations = {\n /**\n * Serializes a mapping of style properties for use as inline styles:\n *\n * > createMarkupForStyles({width: '200px', height: 0})\n * \"width:200px;height:0;\"\n *\n * Undefined values are ignored so that declarative programming is easier.\n * The result should be HTML-escaped before insertion into the DOM.\n *\n * @param {object} styles\n * @param {ReactDOMComponent} component\n * @return {?string}\n */\n createMarkupForStyles: function createMarkupForStyles(styles, component) {\n var serialized = '';\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n var isCustomProperty = styleName.indexOf('--') === 0;\n var styleValue = styles[styleName];\n if (process.env.NODE_ENV !== 'production') {\n if (!isCustomProperty) {\n warnValidStyle(styleName, styleValue, component);\n }\n }\n if (styleValue != null) {\n serialized += processStyleName(styleName) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, component, isCustomProperty) + ';';\n }\n }\n return serialized || null;\n },\n /**\n * Sets the value for multiple styles on a node. If a value is specified as\n * '' (empty string), the corresponding style property will be unset.\n *\n * @param {DOMElement} node\n * @param {object} styles\n * @param {ReactDOMComponent} component\n */\n setValueForStyles: function setValueForStyles(node, styles, component) {\n if (process.env.NODE_ENV !== 'production') {\n ReactInstrumentation.debugTool.onHostOperation({\n instanceID: component._debugID,\n type: 'update styles',\n payload: styles\n });\n }\n var style = node.style;\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n var isCustomProperty = styleName.indexOf('--') === 0;\n if (process.env.NODE_ENV !== 'production') {\n if (!isCustomProperty) {\n warnValidStyle(styleName, styles[styleName], component);\n }\n }\n var styleValue = dangerousStyleValue(styleName, styles[styleName], component, isCustomProperty);\n if (styleName === 'float' || styleName === 'cssFloat') {\n styleName = styleFloatAccessor;\n }\n if (isCustomProperty) {\n style.setProperty(styleName, styleValue);\n } else if (styleValue) {\n style[styleName] = styleValue;\n } else {\n var expansion = hasShorthandPropertyBug && CSSProperty.shorthandPropertyExpansions[styleName];\n if (expansion) {\n // Shorthand property that IE8 won't like unsetting, so unset each\n // component to placate it\n for (var individualStyleName in expansion) {\n style[individualStyleName] = '';\n }\n } else {\n style[styleName] = '';\n }\n }\n }\n }\n};\nmodule.exports = CSSPropertyOperations;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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 * @typechecks\n */\n\n'use strict';\n\nvar camelize = require('./camelize');\nvar msPattern = /^-ms-/;\n\n/**\n * Camelcases a hyphenated CSS property name, for example:\n *\n * > camelizeStyleName('background-color')\n * < \"backgroundColor\"\n * > camelizeStyleName('-moz-transition')\n * < \"MozTransition\"\n * > camelizeStyleName('-ms-transition')\n * < \"msTransition\"\n *\n * As Andi Smith suggests\n * (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix\n * is converted to lowercase `ms`.\n *\n * @param {string} string\n * @return {string}\n */\nfunction camelizeStyleName(string) {\n return camelize(string.replace(msPattern, 'ms-'));\n}\nmodule.exports = camelizeStyleName;","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\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 * @typechecks\n */\nvar _hyphenPattern = /-(.)/g;\n\n/**\n * Camelcases a hyphenated string, for example:\n *\n * > camelize('background-color')\n * < \"backgroundColor\"\n *\n * @param {string} string\n * @return {string}\n */\nfunction camelize(string) {\n return string.replace(_hyphenPattern, function (_, character) {\n return character.toUpperCase();\n });\n}\nmodule.exports = camelize;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar CSSProperty = require('./CSSProperty');\nvar warning = require('fbjs/lib/warning');\nvar isUnitlessNumber = CSSProperty.isUnitlessNumber;\nvar styleWarnings = {};\n\n/**\n * Convert a value into the proper css writable value. The style name `name`\n * should be logical (no hyphens), as specified\n * in `CSSProperty.isUnitlessNumber`.\n *\n * @param {string} name CSS property name such as `topMargin`.\n * @param {*} value CSS property value such as `10px`.\n * @param {ReactDOMComponent} component\n * @return {string} Normalized style value with dimensions applied.\n */\nfunction dangerousStyleValue(name, value, component, isCustomProperty) {\n // Note that we've removed escapeTextForBrowser() calls here since the\n // whole string will be escaped when the attribute is injected into\n // the markup. If you provide unsafe user data here they can inject\n // arbitrary CSS which may be problematic (I couldn't repro this):\n // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet\n // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/\n // This is not an XSS hole but instead a potential CSS injection issue\n // which has lead to a greater discussion about how we're going to\n // trust URLs moving forward. See #2115901\n\n var isEmpty = value == null || typeof value === 'boolean' || value === '';\n if (isEmpty) {\n return '';\n }\n var isNonNumeric = isNaN(value);\n if (isCustomProperty || isNonNumeric || value === 0 || isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) {\n return '' + value; // cast to string\n }\n if (typeof value === 'string') {\n if (process.env.NODE_ENV !== 'production') {\n // Allow '0' to pass through without warning. 0 is already special and\n // doesn't require units, so we don't need to warn about it.\n if (component && value !== '0') {\n var owner = component._currentElement._owner;\n var ownerName = owner ? owner.getName() : null;\n if (ownerName && !styleWarnings[ownerName]) {\n styleWarnings[ownerName] = {};\n }\n var warned = false;\n if (ownerName) {\n var warnings = styleWarnings[ownerName];\n warned = warnings[name];\n if (!warned) {\n warnings[name] = true;\n }\n }\n if (!warned) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'a `%s` tag (owner: `%s`) was passed a numeric string value ' + 'for CSS property `%s` (value: `%s`) which will be treated ' + 'as a unitless number in a future version of React.', component._currentElement.type, ownerName || 'unknown', name, value) : void 0;\n }\n }\n }\n value = value.trim();\n }\n return value + 'px';\n}\nmodule.exports = dangerousStyleValue;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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 * @typechecks\n */\n\n'use strict';\n\nvar hyphenate = require('./hyphenate');\nvar msPattern = /^ms-/;\n\n/**\n * Hyphenates a camelcased CSS property name, for example:\n *\n * > hyphenateStyleName('backgroundColor')\n * < \"background-color\"\n * > hyphenateStyleName('MozTransition')\n * < \"-moz-transition\"\n * > hyphenateStyleName('msTransition')\n * < \"-ms-transition\"\n *\n * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix\n * is converted to `-ms-`.\n *\n * @param {string} string\n * @return {string}\n */\nfunction hyphenateStyleName(string) {\n return hyphenate(string).replace(msPattern, '-ms-');\n}\nmodule.exports = hyphenateStyleName;","'use strict';\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\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 * @typechecks\n */\nvar _uppercasePattern = /([A-Z])/g;\n\n/**\n * Hyphenates a camelcased string, for example:\n *\n * > hyphenate('backgroundColor')\n * < \"background-color\"\n *\n * For CSS style names, use `hyphenateStyleName` instead which works properly\n * with all vendor prefixes, including `ms`.\n *\n * @param {string} string\n * @return {string}\n */\nfunction hyphenate(string) {\n return string.replace(_uppercasePattern, '-$1').toLowerCase();\n}\nmodule.exports = hyphenate;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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 * @typechecks static-only\n */\n\n'use strict';\n\n/**\n * Memoizes the return value of a function that accepts one string argument.\n */\nfunction memoizeStringOnly(callback) {\n var cache = {};\n return function (string) {\n if (!cache.hasOwnProperty(string)) {\n cache[string] = callback.call(this, string);\n }\n return cache[string];\n };\n}\nmodule.exports = memoizeStringOnly;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar escapeTextContentForBrowser = require('./escapeTextContentForBrowser');\n\n/**\n * Escapes attribute value to prevent scripting attacks.\n *\n * @param {*} value Value to escape.\n * @return {string} An escaped string.\n */\nfunction quoteAttributeValueForBrowser(value) {\n return '\"' + escapeTextContentForBrowser(value) + '\"';\n}\nmodule.exports = quoteAttributeValueForBrowser;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar EventPluginHub = require('./EventPluginHub');\nfunction runEventQueueInBatch(events) {\n EventPluginHub.enqueueEvents(events);\n EventPluginHub.processEventQueue(false);\n}\nvar ReactEventEmitterMixin = {\n /**\n * Streams a fired top-level event to `EventPluginHub` where plugins have the\n * opportunity to create `ReactEvent`s to be dispatched.\n */\n handleTopLevel: function handleTopLevel(topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n var events = EventPluginHub.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);\n runEventQueueInBatch(events);\n }\n};\nmodule.exports = ReactEventEmitterMixin;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');\n\n/**\n * Generate a mapping of standard vendor prefixes using the defined style property and event name.\n *\n * @param {string} styleProp\n * @param {string} eventName\n * @returns {object}\n */\nfunction makePrefixMap(styleProp, eventName) {\n var prefixes = {};\n prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();\n prefixes['Webkit' + styleProp] = 'webkit' + eventName;\n prefixes['Moz' + styleProp] = 'moz' + eventName;\n prefixes['ms' + styleProp] = 'MS' + eventName;\n prefixes['O' + styleProp] = 'o' + eventName.toLowerCase();\n return prefixes;\n}\n\n/**\n * A list of event names to a configurable list of vendor prefixes.\n */\nvar vendorPrefixes = {\n animationend: makePrefixMap('Animation', 'AnimationEnd'),\n animationiteration: makePrefixMap('Animation', 'AnimationIteration'),\n animationstart: makePrefixMap('Animation', 'AnimationStart'),\n transitionend: makePrefixMap('Transition', 'TransitionEnd')\n};\n\n/**\n * Event names that have already been detected and prefixed (if applicable).\n */\nvar prefixedEventNames = {};\n\n/**\n * Element to check for prefixes on.\n */\nvar style = {};\n\n/**\n * Bootstrap if a DOM exists.\n */\nif (ExecutionEnvironment.canUseDOM) {\n style = document.createElement('div').style;\n\n // On some platforms, in particular some releases of Android 4.x,\n // the un-prefixed \"animation\" and \"transition\" properties are defined on the\n // style object but the events that fire will still be prefixed, so we need\n // to check if the un-prefixed events are usable, and if not remove them from the map.\n if (!('AnimationEvent' in window)) {\n delete vendorPrefixes.animationend.animation;\n delete vendorPrefixes.animationiteration.animation;\n delete vendorPrefixes.animationstart.animation;\n }\n\n // Same as above\n if (!('TransitionEvent' in window)) {\n delete vendorPrefixes.transitionend.transition;\n }\n}\n\n/**\n * Attempts to determine the correct vendor prefixed event name.\n *\n * @param {string} eventName\n * @returns {string}\n */\nfunction getVendorPrefixedEventName(eventName) {\n if (prefixedEventNames[eventName]) {\n return prefixedEventNames[eventName];\n } else if (!vendorPrefixes[eventName]) {\n return eventName;\n }\n var prefixMap = vendorPrefixes[eventName];\n for (var styleProp in prefixMap) {\n if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {\n return prefixedEventNames[eventName] = prefixMap[styleProp];\n }\n }\n return '';\n}\nmodule.exports = getVendorPrefixedEventName;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant'),\n _assign = require('object-assign');\nvar DOMPropertyOperations = require('./DOMPropertyOperations');\nvar LinkedValueUtils = require('./LinkedValueUtils');\nvar ReactDOMComponentTree = require('./ReactDOMComponentTree');\nvar ReactUpdates = require('./ReactUpdates');\nvar invariant = require('fbjs/lib/invariant');\nvar warning = require('fbjs/lib/warning');\nvar didWarnValueLink = false;\nvar didWarnCheckedLink = false;\nvar didWarnValueDefaultValue = false;\nvar didWarnCheckedDefaultChecked = false;\nvar didWarnControlledToUncontrolled = false;\nvar didWarnUncontrolledToControlled = false;\nfunction forceUpdateIfMounted() {\n if (this._rootNodeID) {\n // DOM component is still mounted; update\n ReactDOMInput.updateWrapper(this);\n }\n}\nfunction isControlled(props) {\n var usesChecked = props.type === 'checkbox' || props.type === 'radio';\n return usesChecked ? props.checked != null : props.value != null;\n}\n\n/**\n * Implements an <input> host component that allows setting these optional\n * props: `checked`, `value`, `defaultChecked`, and `defaultValue`.\n *\n * If `checked` or `value` are not supplied (or null/undefined), user actions\n * that affect the checked state or value will trigger updates to the element.\n *\n * If they are supplied (and not null/undefined), the rendered element will not\n * trigger updates to the element. Instead, the props must change in order for\n * the rendered element to be updated.\n *\n * The rendered element will be initialized as unchecked (or `defaultChecked`)\n * with an empty value (or `defaultValue`).\n *\n * @see http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html\n */\nvar ReactDOMInput = {\n getHostProps: function getHostProps(inst, props) {\n var value = LinkedValueUtils.getValue(props);\n var checked = LinkedValueUtils.getChecked(props);\n var hostProps = _assign({\n // Make sure we set .type before any other properties (setting .value\n // before .type means .value is lost in IE11 and below)\n type: undefined,\n // Make sure we set .step before .value (setting .value before .step\n // means .value is rounded on mount, based upon step precision)\n step: undefined,\n // Make sure we set .min & .max before .value (to ensure proper order\n // in corner cases such as min or max deriving from value, e.g. Issue #7170)\n min: undefined,\n max: undefined\n }, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: value != null ? value : inst._wrapperState.initialValue,\n checked: checked != null ? checked : inst._wrapperState.initialChecked,\n onChange: inst._wrapperState.onChange\n });\n return hostProps;\n },\n mountWrapper: function mountWrapper(inst, props) {\n if (process.env.NODE_ENV !== 'production') {\n LinkedValueUtils.checkPropTypes('input', props, inst._currentElement._owner);\n var owner = inst._currentElement._owner;\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `input` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n if (props.checkedLink !== undefined && !didWarnCheckedLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`checkedLink` prop on `input` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnCheckedLink = true;\n }\n if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {\n process.env.NODE_ENV !== 'production' ? warning(false, '%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0;\n didWarnCheckedDefaultChecked = true;\n }\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {\n process.env.NODE_ENV !== 'production' ? warning(false, '%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0;\n didWarnValueDefaultValue = true;\n }\n }\n var defaultValue = props.defaultValue;\n inst._wrapperState = {\n initialChecked: props.checked != null ? props.checked : props.defaultChecked,\n initialValue: props.value != null ? props.value : defaultValue,\n listeners: null,\n onChange: _handleChange.bind(inst),\n controlled: isControlled(props)\n };\n },\n updateWrapper: function updateWrapper(inst) {\n var props = inst._currentElement.props;\n if (process.env.NODE_ENV !== 'production') {\n var controlled = isControlled(props);\n var owner = inst._currentElement._owner;\n if (!inst._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) {\n process.env.NODE_ENV !== 'production' ? warning(false, '%s is changing an uncontrolled input of type %s to be controlled. ' + 'Input elements should not switch from uncontrolled to controlled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0;\n didWarnUncontrolledToControlled = true;\n }\n if (inst._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) {\n process.env.NODE_ENV !== 'production' ? warning(false, '%s is changing a controlled input of type %s to be uncontrolled. ' + 'Input elements should not switch from controlled to uncontrolled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0;\n didWarnControlledToUncontrolled = true;\n }\n }\n\n // TODO: Shouldn't this be getChecked(props)?\n var checked = props.checked;\n if (checked != null) {\n DOMPropertyOperations.setValueForProperty(ReactDOMComponentTree.getNodeFromInstance(inst), 'checked', checked || false);\n }\n var node = ReactDOMComponentTree.getNodeFromInstance(inst);\n var value = LinkedValueUtils.getValue(props);\n if (value != null) {\n if (value === 0 && node.value === '') {\n node.value = '0';\n // Note: IE9 reports a number inputs as 'text', so check props instead.\n } else if (props.type === 'number') {\n // Simulate `input.valueAsNumber`. IE9 does not support it\n var valueAsNumber = parseFloat(node.value, 10) || 0;\n if (\n // eslint-disable-next-line\n value != valueAsNumber ||\n // eslint-disable-next-line\n value == valueAsNumber && node.value != value) {\n // Cast `value` to a string to ensure the value is set correctly. While\n // browsers typically do this as necessary, jsdom doesn't.\n node.value = '' + value;\n }\n } else if (node.value !== '' + value) {\n // Cast `value` to a string to ensure the value is set correctly. While\n // browsers typically do this as necessary, jsdom doesn't.\n node.value = '' + value;\n }\n } else {\n if (props.value == null && props.defaultValue != null) {\n // In Chrome, assigning defaultValue to certain input types triggers input validation.\n // For number inputs, the display value loses trailing decimal points. For email inputs,\n // Chrome raises \"The specified value <x> is not a valid email address\".\n //\n // Here we check to see if the defaultValue has actually changed, avoiding these problems\n // when the user is inputting text\n //\n // https://github.com/facebook/react/issues/7253\n if (node.defaultValue !== '' + props.defaultValue) {\n node.defaultValue = '' + props.defaultValue;\n }\n }\n if (props.checked == null && props.defaultChecked != null) {\n node.defaultChecked = !!props.defaultChecked;\n }\n }\n },\n postMountWrapper: function postMountWrapper(inst) {\n var props = inst._currentElement.props;\n\n // This is in postMount because we need access to the DOM node, which is not\n // available until after the component has mounted.\n var node = ReactDOMComponentTree.getNodeFromInstance(inst);\n\n // Detach value from defaultValue. We won't do anything if we're working on\n // submit or reset inputs as those values & defaultValues are linked. They\n // are not resetable nodes so this operation doesn't matter and actually\n // removes browser-default values (eg \"Submit Query\") when no value is\n // provided.\n\n switch (props.type) {\n case 'submit':\n case 'reset':\n break;\n case 'color':\n case 'date':\n case 'datetime':\n case 'datetime-local':\n case 'month':\n case 'time':\n case 'week':\n // This fixes the no-show issue on iOS Safari and Android Chrome:\n // https://github.com/facebook/react/issues/7233\n node.value = '';\n node.value = node.defaultValue;\n break;\n default:\n node.value = node.value;\n break;\n }\n\n // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug\n // this is needed to work around a chrome bug where setting defaultChecked\n // will sometimes influence the value of checked (even after detachment).\n // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416\n // We need to temporarily unset name to avoid disrupting radio button groups.\n var name = node.name;\n if (name !== '') {\n node.name = '';\n }\n node.defaultChecked = !node.defaultChecked;\n node.defaultChecked = !node.defaultChecked;\n if (name !== '') {\n node.name = name;\n }\n }\n};\nfunction _handleChange(event) {\n var props = this._currentElement.props;\n var returnValue = LinkedValueUtils.executeOnChange(props, event);\n\n // Here we use asap to wait until all updates have propagated, which\n // is important when using controlled components within layers:\n // https://github.com/facebook/react/issues/1698\n ReactUpdates.asap(forceUpdateIfMounted, this);\n var name = props.name;\n if (props.type === 'radio' && name != null) {\n var rootNode = ReactDOMComponentTree.getNodeFromInstance(this);\n var queryRoot = rootNode;\n while (queryRoot.parentNode) {\n queryRoot = queryRoot.parentNode;\n }\n\n // If `rootNode.form` was non-null, then we could try `form.elements`,\n // but that sometimes behaves strangely in IE8. We could also try using\n // `form.getElementsByName`, but that will only return direct children\n // and won't include inputs that use the HTML5 `form=` attribute. Since\n // the input might not even be in a form, let's just use the global\n // `querySelectorAll` to ensure we don't miss anything.\n var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type=\"radio\"]');\n for (var i = 0; i < group.length; i++) {\n var otherNode = group[i];\n if (otherNode === rootNode || otherNode.form !== rootNode.form) {\n continue;\n }\n // This will throw if radio buttons rendered by different copies of React\n // and the same name are rendered into the same form (same as #1939).\n // That's probably okay; we don't support it just as we don't support\n // mixing React radio buttons with non-React ones.\n var otherInstance = ReactDOMComponentTree.getInstanceFromNode(otherNode);\n !otherInstance ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.') : _prodInvariant('90') : void 0;\n // If this is a controlled radio button group, forcing the input that\n // was previously checked to update will cause it to be come re-checked\n // as appropriate.\n ReactUpdates.asap(forceUpdateIfMounted, otherInstance);\n }\n }\n return returnValue;\n}\nmodule.exports = ReactDOMInput;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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 */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\nmodule.exports = ReactPropTypesSecret;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar _assign = require('object-assign');\nvar React = require('react/lib/React');\nvar ReactDOMComponentTree = require('./ReactDOMComponentTree');\nvar ReactDOMSelect = require('./ReactDOMSelect');\nvar warning = require('fbjs/lib/warning');\nvar didWarnInvalidOptionChildren = false;\nfunction flattenChildren(children) {\n var content = '';\n\n // Flatten children and warn if they aren't strings or numbers;\n // invalid types are ignored.\n React.Children.forEach(children, function (child) {\n if (child == null) {\n return;\n }\n if (typeof child === 'string' || typeof child === 'number') {\n content += child;\n } else if (!didWarnInvalidOptionChildren) {\n didWarnInvalidOptionChildren = true;\n process.env.NODE_ENV !== 'production' ? warning(false, 'Only strings and numbers are supported as <option> children.') : void 0;\n }\n });\n return content;\n}\n\n/**\n * Implements an <option> host component that warns when `selected` is set.\n */\nvar ReactDOMOption = {\n mountWrapper: function mountWrapper(inst, props, hostParent) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(props.selected == null, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.') : void 0;\n }\n\n // Look up whether this option is 'selected'\n var selectValue = null;\n if (hostParent != null) {\n var selectParent = hostParent;\n if (selectParent._tag === 'optgroup') {\n selectParent = selectParent._hostParent;\n }\n if (selectParent != null && selectParent._tag === 'select') {\n selectValue = ReactDOMSelect.getSelectValueContext(selectParent);\n }\n }\n\n // If the value is null (e.g., no specified value or after initial mount)\n // or missing (e.g., for <datalist>), we don't change props.selected\n var selected = null;\n if (selectValue != null) {\n var value;\n if (props.value != null) {\n value = props.value + '';\n } else {\n value = flattenChildren(props.children);\n }\n selected = false;\n if (Array.isArray(selectValue)) {\n // multiple\n for (var i = 0; i < selectValue.length; i++) {\n if ('' + selectValue[i] === value) {\n selected = true;\n break;\n }\n }\n } else {\n selected = '' + selectValue === value;\n }\n }\n inst._wrapperState = {\n selected: selected\n };\n },\n postMountWrapper: function postMountWrapper(inst) {\n // value=\"\" should make a value attribute (#6219)\n var props = inst._currentElement.props;\n if (props.value != null) {\n var node = ReactDOMComponentTree.getNodeFromInstance(inst);\n node.setAttribute('value', props.value);\n }\n },\n getHostProps: function getHostProps(inst, props) {\n var hostProps = _assign({\n selected: undefined,\n children: undefined\n }, props);\n\n // Read state only from initial mount because <select> updates value\n // manually; we need the initial state only for server rendering\n if (inst._wrapperState.selected != null) {\n hostProps.selected = inst._wrapperState.selected;\n }\n var content = flattenChildren(props.children);\n if (content) {\n hostProps.children = content;\n }\n return hostProps;\n }\n};\nmodule.exports = ReactDOMOption;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant'),\n _assign = require('object-assign');\nvar LinkedValueUtils = require('./LinkedValueUtils');\nvar ReactDOMComponentTree = require('./ReactDOMComponentTree');\nvar ReactUpdates = require('./ReactUpdates');\nvar invariant = require('fbjs/lib/invariant');\nvar warning = require('fbjs/lib/warning');\nvar didWarnValueLink = false;\nvar didWarnValDefaultVal = false;\nfunction forceUpdateIfMounted() {\n if (this._rootNodeID) {\n // DOM component is still mounted; update\n ReactDOMTextarea.updateWrapper(this);\n }\n}\n\n/**\n * Implements a <textarea> host component that allows setting `value`, and\n * `defaultValue`. This differs from the traditional DOM API because value is\n * usually set as PCDATA children.\n *\n * If `value` is not supplied (or null/undefined), user actions that affect the\n * value will trigger updates to the element.\n *\n * If `value` is supplied (and not null/undefined), the rendered element will\n * not trigger updates to the element. Instead, the `value` prop must change in\n * order for the rendered element to be updated.\n *\n * The rendered element will be initialized with an empty value, the prop\n * `defaultValue` if specified, or the children content (deprecated).\n */\nvar ReactDOMTextarea = {\n getHostProps: function getHostProps(inst, props) {\n !(props.dangerouslySetInnerHTML == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, '`dangerouslySetInnerHTML` does not make sense on <textarea>.') : _prodInvariant('91') : void 0;\n\n // Always set children to the same thing. In IE9, the selection range will\n // get reset if `textContent` is mutated. We could add a check in setTextContent\n // to only set the value if/when the value differs from the node value (which would\n // completely solve this IE9 bug), but Sebastian+Ben seemed to like this solution.\n // The value can be a boolean or object so that's why it's forced to be a string.\n var hostProps = _assign({}, props, {\n value: undefined,\n defaultValue: undefined,\n children: '' + inst._wrapperState.initialValue,\n onChange: inst._wrapperState.onChange\n });\n return hostProps;\n },\n mountWrapper: function mountWrapper(inst, props) {\n if (process.env.NODE_ENV !== 'production') {\n LinkedValueUtils.checkPropTypes('textarea', props, inst._currentElement._owner);\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `textarea` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components') : void 0;\n didWarnValDefaultVal = true;\n }\n }\n var value = LinkedValueUtils.getValue(props);\n var initialValue = value;\n\n // Only bother fetching default value if we're going to use it\n if (value == null) {\n var defaultValue = props.defaultValue;\n // TODO (yungsters): Remove support for children content in <textarea>.\n var children = props.children;\n if (children != null) {\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.') : void 0;\n }\n !(defaultValue == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'If you supply `defaultValue` on a <textarea>, do not pass children.') : _prodInvariant('92') : void 0;\n if (Array.isArray(children)) {\n !(children.length <= 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, '<textarea> can only have at most one child.') : _prodInvariant('93') : void 0;\n children = children[0];\n }\n defaultValue = '' + children;\n }\n if (defaultValue == null) {\n defaultValue = '';\n }\n initialValue = defaultValue;\n }\n inst._wrapperState = {\n initialValue: '' + initialValue,\n listeners: null,\n onChange: _handleChange.bind(inst)\n };\n },\n updateWrapper: function updateWrapper(inst) {\n var props = inst._currentElement.props;\n var node = ReactDOMComponentTree.getNodeFromInstance(inst);\n var value = LinkedValueUtils.getValue(props);\n if (value != null) {\n // Cast `value` to a string to ensure the value is set correctly. While\n // browsers typically do this as necessary, jsdom doesn't.\n var newValue = '' + value;\n\n // To avoid side effects (such as losing text selection), only set value if changed\n if (newValue !== node.value) {\n node.value = newValue;\n }\n if (props.defaultValue == null) {\n node.defaultValue = newValue;\n }\n }\n if (props.defaultValue != null) {\n node.defaultValue = props.defaultValue;\n }\n },\n postMountWrapper: function postMountWrapper(inst) {\n // This is in postMount because we need access to the DOM node, which is not\n // available until after the component has mounted.\n var node = ReactDOMComponentTree.getNodeFromInstance(inst);\n var textContent = node.textContent;\n\n // Only set node.value if textContent is equal to the expected\n // initial value. In IE10/IE11 there is a bug where the placeholder attribute\n // will populate textContent as well.\n // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/\n if (textContent === inst._wrapperState.initialValue) {\n node.value = textContent;\n }\n }\n};\nfunction _handleChange(event) {\n var props = this._currentElement.props;\n var returnValue = LinkedValueUtils.executeOnChange(props, event);\n ReactUpdates.asap(forceUpdateIfMounted, this);\n return returnValue;\n}\nmodule.exports = ReactDOMTextarea;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\nvar ReactComponentEnvironment = require('./ReactComponentEnvironment');\nvar ReactInstanceMap = require('./ReactInstanceMap');\nvar ReactInstrumentation = require('./ReactInstrumentation');\nvar ReactCurrentOwner = require('react/lib/ReactCurrentOwner');\nvar ReactReconciler = require('./ReactReconciler');\nvar ReactChildReconciler = require('./ReactChildReconciler');\nvar emptyFunction = require('fbjs/lib/emptyFunction');\nvar flattenChildren = require('./flattenChildren');\nvar invariant = require('fbjs/lib/invariant');\n\n/**\n * Make an update for markup to be rendered and inserted at a supplied index.\n *\n * @param {string} markup Markup that renders into an element.\n * @param {number} toIndex Destination index.\n * @private\n */\nfunction makeInsertMarkup(markup, afterNode, toIndex) {\n // NOTE: Null values reduce hidden classes.\n return {\n type: 'INSERT_MARKUP',\n content: markup,\n fromIndex: null,\n fromNode: null,\n toIndex: toIndex,\n afterNode: afterNode\n };\n}\n\n/**\n * Make an update for moving an existing element to another index.\n *\n * @param {number} fromIndex Source index of the existing element.\n * @param {number} toIndex Destination index of the element.\n * @private\n */\nfunction makeMove(child, afterNode, toIndex) {\n // NOTE: Null values reduce hidden classes.\n return {\n type: 'MOVE_EXISTING',\n content: null,\n fromIndex: child._mountIndex,\n fromNode: ReactReconciler.getHostNode(child),\n toIndex: toIndex,\n afterNode: afterNode\n };\n}\n\n/**\n * Make an update for removing an element at an index.\n *\n * @param {number} fromIndex Index of the element to remove.\n * @private\n */\nfunction makeRemove(child, node) {\n // NOTE: Null values reduce hidden classes.\n return {\n type: 'REMOVE_NODE',\n content: null,\n fromIndex: child._mountIndex,\n fromNode: node,\n toIndex: null,\n afterNode: null\n };\n}\n\n/**\n * Make an update for setting the markup of a node.\n *\n * @param {string} markup Markup that renders into an element.\n * @private\n */\nfunction makeSetMarkup(markup) {\n // NOTE: Null values reduce hidden classes.\n return {\n type: 'SET_MARKUP',\n content: markup,\n fromIndex: null,\n fromNode: null,\n toIndex: null,\n afterNode: null\n };\n}\n\n/**\n * Make an update for setting the text content.\n *\n * @param {string} textContent Text content to set.\n * @private\n */\nfunction makeTextContent(textContent) {\n // NOTE: Null values reduce hidden classes.\n return {\n type: 'TEXT_CONTENT',\n content: textContent,\n fromIndex: null,\n fromNode: null,\n toIndex: null,\n afterNode: null\n };\n}\n\n/**\n * Push an update, if any, onto the queue. Creates a new queue if none is\n * passed and always returns the queue. Mutative.\n */\nfunction enqueue(queue, update) {\n if (update) {\n queue = queue || [];\n queue.push(update);\n }\n return queue;\n}\n\n/**\n * Processes any enqueued updates.\n *\n * @private\n */\nfunction processQueue(inst, updateQueue) {\n ReactComponentEnvironment.processChildrenUpdates(inst, updateQueue);\n}\nvar setChildrenForInstrumentation = emptyFunction;\nif (process.env.NODE_ENV !== 'production') {\n var getDebugID = function getDebugID(inst) {\n if (!inst._debugID) {\n // Check for ART-like instances. TODO: This is silly/gross.\n var internal;\n if (internal = ReactInstanceMap.get(inst)) {\n inst = internal;\n }\n }\n return inst._debugID;\n };\n setChildrenForInstrumentation = function setChildrenForInstrumentation(children) {\n var debugID = getDebugID(this);\n // TODO: React Native empty components are also multichild.\n // This means they still get into this method but don't have _debugID.\n if (debugID !== 0) {\n ReactInstrumentation.debugTool.onSetChildren(debugID, children ? Object.keys(children).map(function (key) {\n return children[key]._debugID;\n }) : []);\n }\n };\n}\n\n/**\n * ReactMultiChild are capable of reconciling multiple children.\n *\n * @class ReactMultiChild\n * @internal\n */\nvar ReactMultiChild = {\n /**\n * Provides common functionality for components that must reconcile multiple\n * children. This is used by `ReactDOMComponent` to mount, update, and\n * unmount child components.\n *\n * @lends {ReactMultiChild.prototype}\n */\n Mixin: {\n _reconcilerInstantiateChildren: function _reconcilerInstantiateChildren(nestedChildren, transaction, context) {\n if (process.env.NODE_ENV !== 'production') {\n var selfDebugID = getDebugID(this);\n if (this._currentElement) {\n try {\n ReactCurrentOwner.current = this._currentElement._owner;\n return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context, selfDebugID);\n } finally {\n ReactCurrentOwner.current = null;\n }\n }\n }\n return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context);\n },\n _reconcilerUpdateChildren: function _reconcilerUpdateChildren(prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context) {\n var nextChildren;\n var selfDebugID = 0;\n if (process.env.NODE_ENV !== 'production') {\n selfDebugID = getDebugID(this);\n if (this._currentElement) {\n try {\n ReactCurrentOwner.current = this._currentElement._owner;\n nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID);\n } finally {\n ReactCurrentOwner.current = null;\n }\n ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID);\n return nextChildren;\n }\n }\n nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID);\n ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID);\n return nextChildren;\n },\n /**\n * Generates a \"mount image\" for each of the supplied children. In the case\n * of `ReactDOMComponent`, a mount image is a string of markup.\n *\n * @param {?object} nestedChildren Nested child maps.\n * @return {array} An array of mounted representations.\n * @internal\n */\n mountChildren: function mountChildren(nestedChildren, transaction, context) {\n var children = this._reconcilerInstantiateChildren(nestedChildren, transaction, context);\n this._renderedChildren = children;\n var mountImages = [];\n var index = 0;\n for (var name in children) {\n if (children.hasOwnProperty(name)) {\n var child = children[name];\n var selfDebugID = 0;\n if (process.env.NODE_ENV !== 'production') {\n selfDebugID = getDebugID(this);\n }\n var mountImage = ReactReconciler.mountComponent(child, transaction, this, this._hostContainerInfo, context, selfDebugID);\n child._mountIndex = index++;\n mountImages.push(mountImage);\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n setChildrenForInstrumentation.call(this, children);\n }\n return mountImages;\n },\n /**\n * Replaces any rendered children with a text content string.\n *\n * @param {string} nextContent String of content.\n * @internal\n */\n updateTextContent: function updateTextContent(nextContent) {\n var prevChildren = this._renderedChildren;\n // Remove any rendered children.\n ReactChildReconciler.unmountChildren(prevChildren, false);\n for (var name in prevChildren) {\n if (prevChildren.hasOwnProperty(name)) {\n !false ? process.env.NODE_ENV !== 'production' ? invariant(false, 'updateTextContent called on non-empty component.') : _prodInvariant('118') : void 0;\n }\n }\n // Set new text content.\n var updates = [makeTextContent(nextContent)];\n processQueue(this, updates);\n },\n /**\n * Replaces any rendered children with a markup string.\n *\n * @param {string} nextMarkup String of markup.\n * @internal\n */\n updateMarkup: function updateMarkup(nextMarkup) {\n var prevChildren = this._renderedChildren;\n // Remove any rendered children.\n ReactChildReconciler.unmountChildren(prevChildren, false);\n for (var name in prevChildren) {\n if (prevChildren.hasOwnProperty(name)) {\n !false ? process.env.NODE_ENV !== 'production' ? invariant(false, 'updateTextContent called on non-empty component.') : _prodInvariant('118') : void 0;\n }\n }\n var updates = [makeSetMarkup(nextMarkup)];\n processQueue(this, updates);\n },\n /**\n * Updates the rendered children with new children.\n *\n * @param {?object} nextNestedChildrenElements Nested child element maps.\n * @param {ReactReconcileTransaction} transaction\n * @internal\n */\n updateChildren: function updateChildren(nextNestedChildrenElements, transaction, context) {\n // Hook used by React ART\n this._updateChildren(nextNestedChildrenElements, transaction, context);\n },\n /**\n * @param {?object} nextNestedChildrenElements Nested child element maps.\n * @param {ReactReconcileTransaction} transaction\n * @final\n * @protected\n */\n _updateChildren: function _updateChildren(nextNestedChildrenElements, transaction, context) {\n var prevChildren = this._renderedChildren;\n var removedNodes = {};\n var mountImages = [];\n var nextChildren = this._reconcilerUpdateChildren(prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context);\n if (!nextChildren && !prevChildren) {\n return;\n }\n var updates = null;\n var name;\n // `nextIndex` will increment for each child in `nextChildren`, but\n // `lastIndex` will be the last index visited in `prevChildren`.\n var nextIndex = 0;\n var lastIndex = 0;\n // `nextMountIndex` will increment for each newly mounted child.\n var nextMountIndex = 0;\n var lastPlacedNode = null;\n for (name in nextChildren) {\n if (!nextChildren.hasOwnProperty(name)) {\n continue;\n }\n var prevChild = prevChildren && prevChildren[name];\n var nextChild = nextChildren[name];\n if (prevChild === nextChild) {\n updates = enqueue(updates, this.moveChild(prevChild, lastPlacedNode, nextIndex, lastIndex));\n lastIndex = Math.max(prevChild._mountIndex, lastIndex);\n prevChild._mountIndex = nextIndex;\n } else {\n if (prevChild) {\n // Update `lastIndex` before `_mountIndex` gets unset by unmounting.\n lastIndex = Math.max(prevChild._mountIndex, lastIndex);\n // The `removedNodes` loop below will actually remove the child.\n }\n // The child must be instantiated before it's mounted.\n updates = enqueue(updates, this._mountChildAtIndex(nextChild, mountImages[nextMountIndex], lastPlacedNode, nextIndex, transaction, context));\n nextMountIndex++;\n }\n nextIndex++;\n lastPlacedNode = ReactReconciler.getHostNode(nextChild);\n }\n // Remove children that are no longer present.\n for (name in removedNodes) {\n if (removedNodes.hasOwnProperty(name)) {\n updates = enqueue(updates, this._unmountChild(prevChildren[name], removedNodes[name]));\n }\n }\n if (updates) {\n processQueue(this, updates);\n }\n this._renderedChildren = nextChildren;\n if (process.env.NODE_ENV !== 'production') {\n setChildrenForInstrumentation.call(this, nextChildren);\n }\n },\n /**\n * Unmounts all rendered children. This should be used to clean up children\n * when this component is unmounted. It does not actually perform any\n * backend operations.\n *\n * @internal\n */\n unmountChildren: function unmountChildren(safely) {\n var renderedChildren = this._renderedChildren;\n ReactChildReconciler.unmountChildren(renderedChildren, safely);\n this._renderedChildren = null;\n },\n /**\n * Moves a child component to the supplied index.\n *\n * @param {ReactComponent} child Component to move.\n * @param {number} toIndex Destination index of the element.\n * @param {number} lastIndex Last index visited of the siblings of `child`.\n * @protected\n */\n moveChild: function moveChild(child, afterNode, toIndex, lastIndex) {\n // If the index of `child` is less than `lastIndex`, then it needs to\n // be moved. Otherwise, we do not need to move it because a child will be\n // inserted or moved before `child`.\n if (child._mountIndex < lastIndex) {\n return makeMove(child, afterNode, toIndex);\n }\n },\n /**\n * Creates a child component.\n *\n * @param {ReactComponent} child Component to create.\n * @param {string} mountImage Markup to insert.\n * @protected\n */\n createChild: function createChild(child, afterNode, mountImage) {\n return makeInsertMarkup(mountImage, afterNode, child._mountIndex);\n },\n /**\n * Removes a child component.\n *\n * @param {ReactComponent} child Child to remove.\n * @protected\n */\n removeChild: function removeChild(child, node) {\n return makeRemove(child, node);\n },\n /**\n * Mounts a child with the supplied name.\n *\n * NOTE: This is part of `updateChildren` and is here for readability.\n *\n * @param {ReactComponent} child Component to mount.\n * @param {string} name Name of the child.\n * @param {number} index Index at which to insert the child.\n * @param {ReactReconcileTransaction} transaction\n * @private\n */\n _mountChildAtIndex: function _mountChildAtIndex(child, mountImage, afterNode, index, transaction, context) {\n child._mountIndex = index;\n return this.createChild(child, afterNode, mountImage);\n },\n /**\n * Unmounts a rendered child.\n *\n * NOTE: This is part of `updateChildren` and is here for readability.\n *\n * @param {ReactComponent} child Component to unmount.\n * @private\n */\n _unmountChild: function _unmountChild(child, node) {\n var update = this.removeChild(child, node);\n child._mountIndex = null;\n return update;\n }\n }\n};\nmodule.exports = ReactMultiChild;","/**\n * Copyright (c) 2014-present, Facebook, Inc.\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\n'use strict';\n\nvar ReactReconciler = require('./ReactReconciler');\nvar instantiateReactComponent = require('./instantiateReactComponent');\nvar KeyEscapeUtils = require('./KeyEscapeUtils');\nvar shouldUpdateReactComponent = require('./shouldUpdateReactComponent');\nvar traverseAllChildren = require('./traverseAllChildren');\nvar warning = require('fbjs/lib/warning');\nvar ReactComponentTreeHook;\nif (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') {\n // Temporary hack.\n // Inline requires don't work well with Jest:\n // https://github.com/facebook/react/issues/7240\n // Remove the inline requires when we don't need them anymore:\n // https://github.com/facebook/react/pull/7178\n ReactComponentTreeHook = require('react/lib/ReactComponentTreeHook');\n}\nfunction instantiateChild(childInstances, child, name, selfDebugID) {\n // We found a component instance.\n var keyUnique = childInstances[name] === undefined;\n if (process.env.NODE_ENV !== 'production') {\n if (!ReactComponentTreeHook) {\n ReactComponentTreeHook = require('react/lib/ReactComponentTreeHook');\n }\n if (!keyUnique) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeHook.getStackAddendumByID(selfDebugID)) : void 0;\n }\n }\n if (child != null && keyUnique) {\n childInstances[name] = instantiateReactComponent(child, true);\n }\n}\n\n/**\n * ReactChildReconciler provides helpers for initializing or updating a set of\n * children. Its output is suitable for passing it onto ReactMultiChild which\n * does diffed reordering and insertion.\n */\nvar ReactChildReconciler = {\n /**\n * Generates a \"mount image\" for each of the supplied children. In the case\n * of `ReactDOMComponent`, a mount image is a string of markup.\n *\n * @param {?object} nestedChildNodes Nested child maps.\n * @return {?object} A set of child instances.\n * @internal\n */\n instantiateChildren: function instantiateChildren(nestedChildNodes, transaction, context, selfDebugID)\n // 0 in production and for roots\n {\n if (nestedChildNodes == null) {\n return null;\n }\n var childInstances = {};\n if (process.env.NODE_ENV !== 'production') {\n traverseAllChildren(nestedChildNodes, function (childInsts, child, name) {\n return instantiateChild(childInsts, child, name, selfDebugID);\n }, childInstances);\n } else {\n traverseAllChildren(nestedChildNodes, instantiateChild, childInstances);\n }\n return childInstances;\n },\n /**\n * Updates the rendered children and returns a new set of children.\n *\n * @param {?object} prevChildren Previously initialized set of children.\n * @param {?object} nextChildren Flat child element maps.\n * @param {ReactReconcileTransaction} transaction\n * @param {object} context\n * @return {?object} A new set of child instances.\n * @internal\n */\n updateChildren: function updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, hostParent, hostContainerInfo, context, selfDebugID)\n // 0 in production and for roots\n {\n // We currently don't have a way to track moves here but if we use iterators\n // instead of for..in we can zip the iterators and check if an item has\n // moved.\n // TODO: If nothing has changed, return the prevChildren object so that we\n // can quickly bailout if nothing has changed.\n if (!nextChildren && !prevChildren) {\n return;\n }\n var name;\n var prevChild;\n for (name in nextChildren) {\n if (!nextChildren.hasOwnProperty(name)) {\n continue;\n }\n prevChild = prevChildren && prevChildren[name];\n var prevElement = prevChild && prevChild._currentElement;\n var nextElement = nextChildren[name];\n if (prevChild != null && shouldUpdateReactComponent(prevElement, nextElement)) {\n ReactReconciler.receiveComponent(prevChild, nextElement, transaction, context);\n nextChildren[name] = prevChild;\n } else {\n if (prevChild) {\n removedNodes[name] = ReactReconciler.getHostNode(prevChild);\n ReactReconciler.unmountComponent(prevChild, false);\n }\n // The child must be instantiated before it's mounted.\n var nextChildInstance = instantiateReactComponent(nextElement, true);\n nextChildren[name] = nextChildInstance;\n // Creating mount image now ensures refs are resolved in right order\n // (see https://github.com/facebook/react/pull/7101 for explanation).\n var nextChildMountImage = ReactReconciler.mountComponent(nextChildInstance, transaction, hostParent, hostContainerInfo, context, selfDebugID);\n mountImages.push(nextChildMountImage);\n }\n }\n // Unmount children that are no longer present.\n for (name in prevChildren) {\n if (prevChildren.hasOwnProperty(name) && !(nextChildren && nextChildren.hasOwnProperty(name))) {\n prevChild = prevChildren[name];\n removedNodes[name] = ReactReconciler.getHostNode(prevChild);\n ReactReconciler.unmountComponent(prevChild, false);\n }\n }\n },\n /**\n * Unmounts all rendered children. This should be used to clean up children\n * when this component is unmounted.\n *\n * @param {?object} renderedChildren Previously initialized set of children.\n * @internal\n */\n unmountChildren: function unmountChildren(renderedChildren, safely) {\n for (var name in renderedChildren) {\n if (renderedChildren.hasOwnProperty(name)) {\n var renderedChild = renderedChildren[name];\n ReactReconciler.unmountComponent(renderedChild, safely);\n }\n }\n }\n};\nmodule.exports = ReactChildReconciler;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nvar _prodInvariant = require('./reactProdInvariant'),\n _assign = require('object-assign');\nvar React = require('react/lib/React');\nvar ReactComponentEnvironment = require('./ReactComponentEnvironment');\nvar ReactCurrentOwner = require('react/lib/ReactCurrentOwner');\nvar ReactErrorUtils = require('./ReactErrorUtils');\nvar ReactInstanceMap = require('./ReactInstanceMap');\nvar ReactInstrumentation = require('./ReactInstrumentation');\nvar ReactNodeTypes = require('./ReactNodeTypes');\nvar ReactReconciler = require('./ReactReconciler');\nif (process.env.NODE_ENV !== 'production') {\n var checkReactTypeSpec = require('./checkReactTypeSpec');\n}\nvar emptyObject = require('fbjs/lib/emptyObject');\nvar invariant = require('fbjs/lib/invariant');\nvar shallowEqual = require('fbjs/lib/shallowEqual');\nvar shouldUpdateReactComponent = require('./shouldUpdateReactComponent');\nvar warning = require('fbjs/lib/warning');\nvar CompositeTypes = {\n ImpureClass: 0,\n PureClass: 1,\n StatelessFunctional: 2\n};\nfunction StatelessComponent(Component) {}\nStatelessComponent.prototype.render = function () {\n var Component = ReactInstanceMap.get(this)._currentElement.type;\n var element = Component(this.props, this.context, this.updater);\n warnIfInvalidElement(Component, element);\n return element;\n};\nfunction warnIfInvalidElement(Component, element) {\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(element === null || element === false || React.isValidElement(element), '%s(...): A valid React element (or null) must be returned. You may have ' + 'returned undefined, an array or some other invalid object.', Component.displayName || Component.name || 'Component') : void 0;\n process.env.NODE_ENV !== 'production' ? warning(!Component.childContextTypes, '%s(...): childContextTypes cannot be defined on a functional component.', Component.displayName || Component.name || 'Component') : void 0;\n }\n}\nfunction shouldConstruct(Component) {\n return !!(Component.prototype && Component.prototype.isReactComponent);\n}\nfunction isPureComponent(Component) {\n return !!(Component.prototype && Component.prototype.isPureReactComponent);\n}\n\n// Separated into a function to contain deoptimizations caused by try/finally.\nfunction measureLifeCyclePerf(fn, debugID, timerType) {\n if (debugID === 0) {\n // Top-level wrappers (see ReactMount) and empty components (see\n // ReactDOMEmptyComponent) are invisible to hooks and devtools.\n // Both are implementation details that should go away in the future.\n return fn();\n }\n ReactInstrumentation.debugTool.onBeginLifeCycleTimer(debugID, timerType);\n try {\n return fn();\n } finally {\n ReactInstrumentation.debugTool.onEndLifeCycleTimer(debugID, timerType);\n }\n}\n\n/**\n * ------------------ The Life-Cycle of a Composite Component ------------------\n *\n * - constructor: Initialization of state. The instance is now retained.\n * - componentWillMount\n * - render\n * - [children's constructors]\n * - [children's componentWillMount and render]\n * - [children's componentDidMount]\n * - componentDidMount\n *\n * Update Phases:\n * - componentWillReceiveProps (only called if parent updated)\n * - shouldComponentUpdate\n * - componentWillUpdate\n * - render\n * - [children's constructors or receive props phases]\n * - componentDidUpdate\n *\n * - componentWillUnmount\n * - [children's componentWillUnmount]\n * - [children destroyed]\n * - (destroyed): The instance is now blank, released by React and ready for GC.\n *\n * -----------------------------------------------------------------------------\n */\n\n/**\n * An incrementing ID assigned to each component when it is mounted. This is\n * used to enforce the order in which `ReactUpdates` updates dirty components.\n *\n * @private\n */\nvar nextMountID = 1;\n\n/**\n * @lends {ReactCompositeComponent.prototype}\n */\nvar ReactCompositeComponent = {\n /**\n * Base constructor for all composite component.\n *\n * @param {ReactElement} element\n * @final\n * @internal\n */\n construct: function construct(element) {\n this._currentElement = element;\n this._rootNodeID = 0;\n this._compositeType = null;\n this._instance = null;\n this._hostParent = null;\n this._hostContainerInfo = null;\n\n // See ReactUpdateQueue\n this._updateBatchNumber = null;\n this._pendingElement = null;\n this._pendingStateQueue = null;\n this._pendingReplaceState = false;\n this._pendingForceUpdate = false;\n this._renderedNodeType = null;\n this._renderedComponent = null;\n this._context = null;\n this._mountOrder = 0;\n this._topLevelWrapper = null;\n\n // See ReactUpdates and ReactUpdateQueue.\n this._pendingCallbacks = null;\n\n // ComponentWillUnmount shall only be called once\n this._calledComponentWillUnmount = false;\n if (process.env.NODE_ENV !== 'production') {\n this._warnedAboutRefsInRender = false;\n }\n },\n /**\n * Initializes the component, renders markup, and registers event listeners.\n *\n * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction\n * @param {?object} hostParent\n * @param {?object} hostContainerInfo\n * @param {?object} context\n * @return {?string} Rendered markup to be inserted into the DOM.\n * @final\n * @internal\n */\n mountComponent: function mountComponent(transaction, hostParent, hostContainerInfo, context) {\n var _this = this;\n this._context = context;\n this._mountOrder = nextMountID++;\n this._hostParent = hostParent;\n this._hostContainerInfo = hostContainerInfo;\n var publicProps = this._currentElement.props;\n var publicContext = this._processContext(context);\n var Component = this._currentElement.type;\n var updateQueue = transaction.getUpdateQueue();\n\n // Initialize the public class\n var doConstruct = shouldConstruct(Component);\n var inst = this._constructComponent(doConstruct, publicProps, publicContext, updateQueue);\n var renderedElement;\n\n // Support functional components\n if (!doConstruct && (inst == null || inst.render == null)) {\n renderedElement = inst;\n warnIfInvalidElement(Component, renderedElement);\n !(inst === null || inst === false || React.isValidElement(inst)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s(...): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.', Component.displayName || Component.name || 'Component') : _prodInvariant('105', Component.displayName || Component.name || 'Component') : void 0;\n inst = new StatelessComponent(Component);\n this._compositeType = CompositeTypes.StatelessFunctional;\n } else {\n if (isPureComponent(Component)) {\n this._compositeType = CompositeTypes.PureClass;\n } else {\n this._compositeType = CompositeTypes.ImpureClass;\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n // This will throw later in _renderValidatedComponent, but add an early\n // warning now to help debugging\n if (inst.render == null) {\n process.env.NODE_ENV !== 'production' ? warning(false, '%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', Component.displayName || Component.name || 'Component') : void 0;\n }\n var propsMutated = inst.props !== publicProps;\n var componentName = Component.displayName || Component.name || 'Component';\n process.env.NODE_ENV !== 'production' ? warning(inst.props === undefined || !propsMutated, '%s(...): When calling super() in `%s`, make sure to pass ' + \"up the same props that your component's constructor was passed.\", componentName, componentName) : void 0;\n }\n\n // These should be set up in the constructor, but as a convenience for\n // simpler class abstractions, we set them up after the fact.\n inst.props = publicProps;\n inst.context = publicContext;\n inst.refs = emptyObject;\n inst.updater = updateQueue;\n this._instance = inst;\n\n // Store a reference from the instance back to the internal representation\n ReactInstanceMap.set(inst, this);\n if (process.env.NODE_ENV !== 'production') {\n // Since plain JS classes are defined without any special initialization\n // logic, we can not catch common errors early. Therefore, we have to\n // catch them here, at initialization time, instead.\n process.env.NODE_ENV !== 'production' ? warning(!inst.getInitialState || inst.getInitialState.isReactClassApproved || inst.state, 'getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', this.getName() || 'a component') : void 0;\n process.env.NODE_ENV !== 'production' ? warning(!inst.getDefaultProps || inst.getDefaultProps.isReactClassApproved, 'getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', this.getName() || 'a component') : void 0;\n process.env.NODE_ENV !== 'production' ? warning(!inst.propTypes, 'propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', this.getName() || 'a component') : void 0;\n process.env.NODE_ENV !== 'production' ? warning(!inst.contextTypes, 'contextTypes was defined as an instance property on %s. Use a ' + 'static property to define contextTypes instead.', this.getName() || 'a component') : void 0;\n process.env.NODE_ENV !== 'production' ? warning(typeof inst.componentShouldUpdate !== 'function', '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', this.getName() || 'A component') : void 0;\n process.env.NODE_ENV !== 'production' ? warning(typeof inst.componentDidUnmount !== 'function', '%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', this.getName() || 'A component') : void 0;\n process.env.NODE_ENV !== 'production' ? warning(typeof inst.componentWillRecieveProps !== 'function', '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', this.getName() || 'A component') : void 0;\n }\n var initialState = inst.state;\n if (initialState === undefined) {\n inst.state = initialState = null;\n }\n !(_typeof(initialState) === 'object' && !Array.isArray(initialState)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.state: must be set to an object or null', this.getName() || 'ReactCompositeComponent') : _prodInvariant('106', this.getName() || 'ReactCompositeComponent') : void 0;\n this._pendingStateQueue = null;\n this._pendingReplaceState = false;\n this._pendingForceUpdate = false;\n var markup;\n if (inst.unstable_handleError) {\n markup = this.performInitialMountWithErrorHandling(renderedElement, hostParent, hostContainerInfo, transaction, context);\n } else {\n markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);\n }\n if (inst.componentDidMount) {\n if (process.env.NODE_ENV !== 'production') {\n transaction.getReactMountReady().enqueue(function () {\n measureLifeCyclePerf(function () {\n return inst.componentDidMount();\n }, _this._debugID, 'componentDidMount');\n });\n } else {\n transaction.getReactMountReady().enqueue(inst.componentDidMount, inst);\n }\n }\n return markup;\n },\n _constructComponent: function _constructComponent(doConstruct, publicProps, publicContext, updateQueue) {\n if (process.env.NODE_ENV !== 'production' && !doConstruct) {\n ReactCurrentOwner.current = this;\n try {\n return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue);\n } finally {\n ReactCurrentOwner.current = null;\n }\n } else {\n return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue);\n }\n },\n _constructComponentWithoutOwner: function _constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue) {\n var Component = this._currentElement.type;\n if (doConstruct) {\n if (process.env.NODE_ENV !== 'production') {\n return measureLifeCyclePerf(function () {\n return new Component(publicProps, publicContext, updateQueue);\n }, this._debugID, 'ctor');\n } else {\n return new Component(publicProps, publicContext, updateQueue);\n }\n }\n\n // This can still be an instance in case of factory components\n // but we'll count this as time spent rendering as the more common case.\n if (process.env.NODE_ENV !== 'production') {\n return measureLifeCyclePerf(function () {\n return Component(publicProps, publicContext, updateQueue);\n }, this._debugID, 'render');\n } else {\n return Component(publicProps, publicContext, updateQueue);\n }\n },\n performInitialMountWithErrorHandling: function performInitialMountWithErrorHandling(renderedElement, hostParent, hostContainerInfo, transaction, context) {\n var markup;\n var checkpoint = transaction.checkpoint();\n try {\n markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);\n } catch (e) {\n // Roll back to checkpoint, handle error (which may add items to the transaction), and take a new checkpoint\n transaction.rollback(checkpoint);\n this._instance.unstable_handleError(e);\n if (this._pendingStateQueue) {\n this._instance.state = this._processPendingState(this._instance.props, this._instance.context);\n }\n checkpoint = transaction.checkpoint();\n this._renderedComponent.unmountComponent(true);\n transaction.rollback(checkpoint);\n\n // Try again - we've informed the component about the error, so they can render an error message this time.\n // If this throws again, the error will bubble up (and can be caught by a higher error boundary).\n markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);\n }\n return markup;\n },\n performInitialMount: function performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context) {\n var inst = this._instance;\n var debugID = 0;\n if (process.env.NODE_ENV !== 'production') {\n debugID = this._debugID;\n }\n if (inst.componentWillMount) {\n if (process.env.NODE_ENV !== 'production') {\n measureLifeCyclePerf(function () {\n return inst.componentWillMount();\n }, debugID, 'componentWillMount');\n } else {\n inst.componentWillMount();\n }\n // When mounting, calls to `setState` by `componentWillMount` will set\n // `this._pendingStateQueue` without triggering a re-render.\n if (this._pendingStateQueue) {\n inst.state = this._processPendingState(inst.props, inst.context);\n }\n }\n\n // If not a stateless component, we now render\n if (renderedElement === undefined) {\n renderedElement = this._renderValidatedComponent();\n }\n var nodeType = ReactNodeTypes.getType(renderedElement);\n this._renderedNodeType = nodeType;\n var child = this._instantiateReactComponent(renderedElement, nodeType !== ReactNodeTypes.EMPTY /* shouldHaveDebugID */);\n this._renderedComponent = child;\n var markup = ReactReconciler.mountComponent(child, transaction, hostParent, hostContainerInfo, this._processChildContext(context), debugID);\n if (process.env.NODE_ENV !== 'production') {\n if (debugID !== 0) {\n var childDebugIDs = child._debugID !== 0 ? [child._debugID] : [];\n ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs);\n }\n }\n return markup;\n },\n getHostNode: function getHostNode() {\n return ReactReconciler.getHostNode(this._renderedComponent);\n },\n /**\n * Releases any resources allocated by `mountComponent`.\n *\n * @final\n * @internal\n */\n unmountComponent: function unmountComponent(safely) {\n if (!this._renderedComponent) {\n return;\n }\n var inst = this._instance;\n if (inst.componentWillUnmount && !inst._calledComponentWillUnmount) {\n inst._calledComponentWillUnmount = true;\n if (safely) {\n var name = this.getName() + '.componentWillUnmount()';\n ReactErrorUtils.invokeGuardedCallback(name, inst.componentWillUnmount.bind(inst));\n } else {\n if (process.env.NODE_ENV !== 'production') {\n measureLifeCyclePerf(function () {\n return inst.componentWillUnmount();\n }, this._debugID, 'componentWillUnmount');\n } else {\n inst.componentWillUnmount();\n }\n }\n }\n if (this._renderedComponent) {\n ReactReconciler.unmountComponent(this._renderedComponent, safely);\n this._renderedNodeType = null;\n this._renderedComponent = null;\n this._instance = null;\n }\n\n // Reset pending fields\n // Even if this component is scheduled for another update in ReactUpdates,\n // it would still be ignored because these fields are reset.\n this._pendingStateQueue = null;\n this._pendingReplaceState = false;\n this._pendingForceUpdate = false;\n this._pendingCallbacks = null;\n this._pendingElement = null;\n\n // These fields do not really need to be reset since this object is no\n // longer accessible.\n this._context = null;\n this._rootNodeID = 0;\n this._topLevelWrapper = null;\n\n // Delete the reference from the instance to this internal representation\n // which allow the internals to be properly cleaned up even if the user\n // leaks a reference to the public instance.\n ReactInstanceMap.remove(inst);\n\n // Some existing components rely on inst.props even after they've been\n // destroyed (in event handlers).\n // TODO: inst.props = null;\n // TODO: inst.state = null;\n // TODO: inst.context = null;\n },\n /**\n * Filters the context object to only contain keys specified in\n * `contextTypes`\n *\n * @param {object} context\n * @return {?object}\n * @private\n */\n _maskContext: function _maskContext(context) {\n var Component = this._currentElement.type;\n var contextTypes = Component.contextTypes;\n if (!contextTypes) {\n return emptyObject;\n }\n var maskedContext = {};\n for (var contextName in contextTypes) {\n maskedContext[contextName] = context[contextName];\n }\n return maskedContext;\n },\n /**\n * Filters the context object to only contain keys specified in\n * `contextTypes`, and asserts that they are valid.\n *\n * @param {object} context\n * @return {?object}\n * @private\n */\n _processContext: function _processContext(context) {\n var maskedContext = this._maskContext(context);\n if (process.env.NODE_ENV !== 'production') {\n var Component = this._currentElement.type;\n if (Component.contextTypes) {\n this._checkContextTypes(Component.contextTypes, maskedContext, 'context');\n }\n }\n return maskedContext;\n },\n /**\n * @param {object} currentContext\n * @return {object}\n * @private\n */\n _processChildContext: function _processChildContext(currentContext) {\n var Component = this._currentElement.type;\n var inst = this._instance;\n var childContext;\n if (inst.getChildContext) {\n if (process.env.NODE_ENV !== 'production') {\n ReactInstrumentation.debugTool.onBeginProcessingChildContext();\n try {\n childContext = inst.getChildContext();\n } finally {\n ReactInstrumentation.debugTool.onEndProcessingChildContext();\n }\n } else {\n childContext = inst.getChildContext();\n }\n }\n if (childContext) {\n !(_typeof(Component.childContextTypes) === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().', this.getName() || 'ReactCompositeComponent') : _prodInvariant('107', this.getName() || 'ReactCompositeComponent') : void 0;\n if (process.env.NODE_ENV !== 'production') {\n this._checkContextTypes(Component.childContextTypes, childContext, 'child context');\n }\n for (var name in childContext) {\n !(name in Component.childContextTypes) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.getChildContext(): key \"%s\" is not defined in childContextTypes.', this.getName() || 'ReactCompositeComponent', name) : _prodInvariant('108', this.getName() || 'ReactCompositeComponent', name) : void 0;\n }\n return _assign({}, currentContext, childContext);\n }\n return currentContext;\n },\n /**\n * Assert that the context types are valid\n *\n * @param {object} typeSpecs Map of context field to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @private\n */\n _checkContextTypes: function _checkContextTypes(typeSpecs, values, location) {\n if (process.env.NODE_ENV !== 'production') {\n checkReactTypeSpec(typeSpecs, values, location, this.getName(), null, this._debugID);\n }\n },\n receiveComponent: function receiveComponent(nextElement, transaction, nextContext) {\n var prevElement = this._currentElement;\n var prevContext = this._context;\n this._pendingElement = null;\n this.updateComponent(transaction, prevElement, nextElement, prevContext, nextContext);\n },\n /**\n * If any of `_pendingElement`, `_pendingStateQueue`, or `_pendingForceUpdate`\n * is set, update the component.\n *\n * @param {ReactReconcileTransaction} transaction\n * @internal\n */\n performUpdateIfNecessary: function performUpdateIfNecessary(transaction) {\n if (this._pendingElement != null) {\n ReactReconciler.receiveComponent(this, this._pendingElement, transaction, this._context);\n } else if (this._pendingStateQueue !== null || this._pendingForceUpdate) {\n this.updateComponent(transaction, this._currentElement, this._currentElement, this._context, this._context);\n } else {\n this._updateBatchNumber = null;\n }\n },\n /**\n * Perform an update to a mounted component. The componentWillReceiveProps and\n * shouldComponentUpdate methods are called, then (assuming the update isn't\n * skipped) the remaining update lifecycle methods are called and the DOM\n * representation is updated.\n *\n * By default, this implements React's rendering and reconciliation algorithm.\n * Sophisticated clients may wish to override this.\n *\n * @param {ReactReconcileTransaction} transaction\n * @param {ReactElement} prevParentElement\n * @param {ReactElement} nextParentElement\n * @internal\n * @overridable\n */\n updateComponent: function updateComponent(transaction, prevParentElement, nextParentElement, prevUnmaskedContext, nextUnmaskedContext) {\n var inst = this._instance;\n !(inst != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Attempted to update component `%s` that has already been unmounted (or failed to mount).', this.getName() || 'ReactCompositeComponent') : _prodInvariant('136', this.getName() || 'ReactCompositeComponent') : void 0;\n var willReceive = false;\n var nextContext;\n\n // Determine if the context has changed or not\n if (this._context === nextUnmaskedContext) {\n nextContext = inst.context;\n } else {\n nextContext = this._processContext(nextUnmaskedContext);\n willReceive = true;\n }\n var prevProps = prevParentElement.props;\n var nextProps = nextParentElement.props;\n\n // Not a simple state update but a props update\n if (prevParentElement !== nextParentElement) {\n willReceive = true;\n }\n\n // An update here will schedule an update but immediately set\n // _pendingStateQueue which will ensure that any state updates gets\n // immediately reconciled instead of waiting for the next batch.\n if (willReceive && inst.componentWillReceiveProps) {\n if (process.env.NODE_ENV !== 'production') {\n measureLifeCyclePerf(function () {\n return inst.componentWillReceiveProps(nextProps, nextContext);\n }, this._debugID, 'componentWillReceiveProps');\n } else {\n inst.componentWillReceiveProps(nextProps, nextContext);\n }\n }\n var nextState = this._processPendingState(nextProps, nextContext);\n var shouldUpdate = true;\n if (!this._pendingForceUpdate) {\n if (inst.shouldComponentUpdate) {\n if (process.env.NODE_ENV !== 'production') {\n shouldUpdate = measureLifeCyclePerf(function () {\n return inst.shouldComponentUpdate(nextProps, nextState, nextContext);\n }, this._debugID, 'shouldComponentUpdate');\n } else {\n shouldUpdate = inst.shouldComponentUpdate(nextProps, nextState, nextContext);\n }\n } else {\n if (this._compositeType === CompositeTypes.PureClass) {\n shouldUpdate = !shallowEqual(prevProps, nextProps) || !shallowEqual(inst.state, nextState);\n }\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(shouldUpdate !== undefined, '%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', this.getName() || 'ReactCompositeComponent') : void 0;\n }\n this._updateBatchNumber = null;\n if (shouldUpdate) {\n this._pendingForceUpdate = false;\n // Will set `this.props`, `this.state` and `this.context`.\n this._performComponentUpdate(nextParentElement, nextProps, nextState, nextContext, transaction, nextUnmaskedContext);\n } else {\n // If it's determined that a component should not update, we still want\n // to set props and state but we shortcut the rest of the update.\n this._currentElement = nextParentElement;\n this._context = nextUnmaskedContext;\n inst.props = nextProps;\n inst.state = nextState;\n inst.context = nextContext;\n }\n },\n _processPendingState: function _processPendingState(props, context) {\n var inst = this._instance;\n var queue = this._pendingStateQueue;\n var replace = this._pendingReplaceState;\n this._pendingReplaceState = false;\n this._pendingStateQueue = null;\n if (!queue) {\n return inst.state;\n }\n if (replace && queue.length === 1) {\n return queue[0];\n }\n var nextState = _assign({}, replace ? queue[0] : inst.state);\n for (var i = replace ? 1 : 0; i < queue.length; i++) {\n var partial = queue[i];\n _assign(nextState, typeof partial === 'function' ? partial.call(inst, nextState, props, context) : partial);\n }\n return nextState;\n },\n /**\n * Merges new props and state, notifies delegate methods of update and\n * performs update.\n *\n * @param {ReactElement} nextElement Next element\n * @param {object} nextProps Next public object to set as properties.\n * @param {?object} nextState Next object to set as state.\n * @param {?object} nextContext Next public object to set as context.\n * @param {ReactReconcileTransaction} transaction\n * @param {?object} unmaskedContext\n * @private\n */\n _performComponentUpdate: function _performComponentUpdate(nextElement, nextProps, nextState, nextContext, transaction, unmaskedContext) {\n var _this2 = this;\n var inst = this._instance;\n var hasComponentDidUpdate = Boolean(inst.componentDidUpdate);\n var prevProps;\n var prevState;\n var prevContext;\n if (hasComponentDidUpdate) {\n prevProps = inst.props;\n prevState = inst.state;\n prevContext = inst.context;\n }\n if (inst.componentWillUpdate) {\n if (process.env.NODE_ENV !== 'production') {\n measureLifeCyclePerf(function () {\n return inst.componentWillUpdate(nextProps, nextState, nextContext);\n }, this._debugID, 'componentWillUpdate');\n } else {\n inst.componentWillUpdate(nextProps, nextState, nextContext);\n }\n }\n this._currentElement = nextElement;\n this._context = unmaskedContext;\n inst.props = nextProps;\n inst.state = nextState;\n inst.context = nextContext;\n this._updateRenderedComponent(transaction, unmaskedContext);\n if (hasComponentDidUpdate) {\n if (process.env.NODE_ENV !== 'production') {\n transaction.getReactMountReady().enqueue(function () {\n measureLifeCyclePerf(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), _this2._debugID, 'componentDidUpdate');\n });\n } else {\n transaction.getReactMountReady().enqueue(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), inst);\n }\n }\n },\n /**\n * Call the component's `render` method and update the DOM accordingly.\n *\n * @param {ReactReconcileTransaction} transaction\n * @internal\n */\n _updateRenderedComponent: function _updateRenderedComponent(transaction, context) {\n var prevComponentInstance = this._renderedComponent;\n var prevRenderedElement = prevComponentInstance._currentElement;\n var nextRenderedElement = this._renderValidatedComponent();\n var debugID = 0;\n if (process.env.NODE_ENV !== 'production') {\n debugID = this._debugID;\n }\n if (shouldUpdateReactComponent(prevRenderedElement, nextRenderedElement)) {\n ReactReconciler.receiveComponent(prevComponentInstance, nextRenderedElement, transaction, this._processChildContext(context));\n } else {\n var oldHostNode = ReactReconciler.getHostNode(prevComponentInstance);\n ReactReconciler.unmountComponent(prevComponentInstance, false);\n var nodeType = ReactNodeTypes.getType(nextRenderedElement);\n this._renderedNodeType = nodeType;\n var child = this._instantiateReactComponent(nextRenderedElement, nodeType !== ReactNodeTypes.EMPTY /* shouldHaveDebugID */);\n this._renderedComponent = child;\n var nextMarkup = ReactReconciler.mountComponent(child, transaction, this._hostParent, this._hostContainerInfo, this._processChildContext(context), debugID);\n if (process.env.NODE_ENV !== 'production') {\n if (debugID !== 0) {\n var childDebugIDs = child._debugID !== 0 ? [child._debugID] : [];\n ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs);\n }\n }\n this._replaceNodeWithMarkup(oldHostNode, nextMarkup, prevComponentInstance);\n }\n },\n /**\n * Overridden in shallow rendering.\n *\n * @protected\n */\n _replaceNodeWithMarkup: function _replaceNodeWithMarkup(oldHostNode, nextMarkup, prevInstance) {\n ReactComponentEnvironment.replaceNodeWithMarkup(oldHostNode, nextMarkup, prevInstance);\n },\n /**\n * @protected\n */\n _renderValidatedComponentWithoutOwnerOrContext: function _renderValidatedComponentWithoutOwnerOrContext() {\n var inst = this._instance;\n var renderedElement;\n if (process.env.NODE_ENV !== 'production') {\n renderedElement = measureLifeCyclePerf(function () {\n return inst.render();\n }, this._debugID, 'render');\n } else {\n renderedElement = inst.render();\n }\n if (process.env.NODE_ENV !== 'production') {\n // We allow auto-mocks to proceed as if they're returning null.\n if (renderedElement === undefined && inst.render._isMockFunction) {\n // This is probably bad practice. Consider warning here and\n // deprecating this convenience.\n renderedElement = null;\n }\n }\n return renderedElement;\n },\n /**\n * @private\n */\n _renderValidatedComponent: function _renderValidatedComponent() {\n var renderedElement;\n if (process.env.NODE_ENV !== 'production' || this._compositeType !== CompositeTypes.StatelessFunctional) {\n ReactCurrentOwner.current = this;\n try {\n renderedElement = this._renderValidatedComponentWithoutOwnerOrContext();\n } finally {\n ReactCurrentOwner.current = null;\n }\n } else {\n renderedElement = this._renderValidatedComponentWithoutOwnerOrContext();\n }\n !(\n // TODO: An `isValidNode` function would probably be more appropriate\n renderedElement === null || renderedElement === false || React.isValidElement(renderedElement)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.render(): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.', this.getName() || 'ReactCompositeComponent') : _prodInvariant('109', this.getName() || 'ReactCompositeComponent') : void 0;\n return renderedElement;\n },\n /**\n * Lazily allocates the refs object and stores `component` as `ref`.\n *\n * @param {string} ref Reference name.\n * @param {component} component Component to store as `ref`.\n * @final\n * @private\n */\n attachRef: function attachRef(ref, component) {\n var inst = this.getPublicInstance();\n !(inst != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Stateless function components cannot have refs.') : _prodInvariant('110') : void 0;\n var publicComponentInstance = component.getPublicInstance();\n if (process.env.NODE_ENV !== 'production') {\n var componentName = component && component.getName ? component.getName() : 'a component';\n process.env.NODE_ENV !== 'production' ? warning(publicComponentInstance != null || component._compositeType !== CompositeTypes.StatelessFunctional, 'Stateless function components cannot be given refs ' + '(See ref \"%s\" in %s created by %s). ' + 'Attempts to access this ref will fail.', ref, componentName, this.getName()) : void 0;\n }\n var refs = inst.refs === emptyObject ? inst.refs = {} : inst.refs;\n refs[ref] = publicComponentInstance;\n },\n /**\n * Detaches a reference name.\n *\n * @param {string} ref Name to dereference.\n * @final\n * @private\n */\n detachRef: function detachRef(ref) {\n var refs = this.getPublicInstance().refs;\n delete refs[ref];\n },\n /**\n * Get a text description of the component that can be used to identify it\n * in error messages.\n * @return {string} The name or null.\n * @internal\n */\n getName: function getName() {\n var type = this._currentElement.type;\n var constructor = this._instance && this._instance.constructor;\n return type.displayName || constructor && constructor.displayName || type.name || constructor && constructor.name || null;\n },\n /**\n * Get the publicly accessible representation of this component - i.e. what\n * is exposed by refs and returned by render. Can be null for stateless\n * components.\n *\n * @return {ReactComponent} the public component instance.\n * @internal\n */\n getPublicInstance: function getPublicInstance() {\n var inst = this._instance;\n if (this._compositeType === CompositeTypes.StatelessFunctional) {\n return null;\n }\n return inst;\n },\n // Stub\n _instantiateReactComponent: null\n};\nmodule.exports = ReactCompositeComponent;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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 */\n\n'use strict';\n\nvar nextDebugID = 1;\nfunction getNextDebugID() {\n return nextDebugID++;\n}\nmodule.exports = getNextDebugID;","/**\n * Copyright (c) 2014-present, Facebook, Inc.\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 */\n\n'use strict';\n\n// The Symbol used to tag the ReactElement type. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;\nmodule.exports = REACT_ELEMENT_TYPE;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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 */\n\n'use strict';\n\n/* global Symbol */\nvar ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n/**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\nfunction getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n}\nmodule.exports = getIteratorFn;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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 */\n\n'use strict';\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nvar KeyEscapeUtils = require('./KeyEscapeUtils');\nvar traverseAllChildren = require('./traverseAllChildren');\nvar warning = require('fbjs/lib/warning');\nvar ReactComponentTreeHook;\nif (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') {\n // Temporary hack.\n // Inline requires don't work well with Jest:\n // https://github.com/facebook/react/issues/7240\n // Remove the inline requires when we don't need them anymore:\n // https://github.com/facebook/react/pull/7178\n ReactComponentTreeHook = require('react/lib/ReactComponentTreeHook');\n}\n\n/**\n * @param {function} traverseContext Context passed through traversal.\n * @param {?ReactComponent} child React child component.\n * @param {!string} name String name of key path to child.\n * @param {number=} selfDebugID Optional debugID of the current internal instance.\n */\nfunction flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID) {\n // We found a component instance.\n if (traverseContext && _typeof(traverseContext) === 'object') {\n var result = traverseContext;\n var keyUnique = result[name] === undefined;\n if (process.env.NODE_ENV !== 'production') {\n if (!ReactComponentTreeHook) {\n ReactComponentTreeHook = require('react/lib/ReactComponentTreeHook');\n }\n if (!keyUnique) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeHook.getStackAddendumByID(selfDebugID)) : void 0;\n }\n }\n if (keyUnique && child != null) {\n result[name] = child;\n }\n }\n}\n\n/**\n * Flattens children that are typically specified as `props.children`. Any null\n * children will not be included in the resulting object.\n * @return {!object} flattened children keyed by name.\n */\nfunction flattenChildren(children, selfDebugID) {\n if (children == null) {\n return children;\n }\n var result = {};\n if (process.env.NODE_ENV !== 'production') {\n traverseAllChildren(children, function (traverseContext, child, name) {\n return flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID);\n }, result);\n } else {\n traverseAllChildren(children, flattenSingleChildIntoContext, result);\n }\n return result;\n}\nmodule.exports = flattenChildren;","/**\n * Copyright (c) 2015-present, Facebook, Inc.\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 */\n\n'use strict';\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nvar ReactUpdateQueue = require('./ReactUpdateQueue');\nvar warning = require('fbjs/lib/warning');\nfunction warnNoop(publicInstance, callerName) {\n if (process.env.NODE_ENV !== 'production') {\n var constructor = publicInstance.constructor;\n process.env.NODE_ENV !== 'production' ? warning(false, '%s(...): Can only update a mounting component. ' + 'This usually means you called %s() outside componentWillMount() on the server. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, constructor && (constructor.displayName || constructor.name) || 'ReactClass') : void 0;\n }\n}\n\n/**\n * This is the update queue used for server rendering.\n * It delegates to ReactUpdateQueue while server rendering is in progress and\n * switches to ReactNoopUpdateQueue after the transaction has completed.\n * @class ReactServerUpdateQueue\n * @param {Transaction} transaction\n */\n\nvar ReactServerUpdateQueue = function () {\n function ReactServerUpdateQueue(transaction) {\n _classCallCheck(this, ReactServerUpdateQueue);\n this.transaction = transaction;\n }\n\n /**\n * Checks whether or not this composite component is mounted.\n * @param {ReactClass} publicInstance The instance we want to test.\n * @return {boolean} True if mounted, false otherwise.\n * @protected\n * @final\n */\n\n ReactServerUpdateQueue.prototype.isMounted = function isMounted(publicInstance) {\n return false;\n };\n\n /**\n * Enqueue a callback that will be executed after all the pending updates\n * have processed.\n *\n * @param {ReactClass} publicInstance The instance to use as `this` context.\n * @param {?function} callback Called after state is updated.\n * @internal\n */\n\n ReactServerUpdateQueue.prototype.enqueueCallback = function enqueueCallback(publicInstance, callback, callerName) {\n if (this.transaction.isInTransaction()) {\n ReactUpdateQueue.enqueueCallback(publicInstance, callback, callerName);\n }\n };\n\n /**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @internal\n */\n\n ReactServerUpdateQueue.prototype.enqueueForceUpdate = function enqueueForceUpdate(publicInstance) {\n if (this.transaction.isInTransaction()) {\n ReactUpdateQueue.enqueueForceUpdate(publicInstance);\n } else {\n warnNoop(publicInstance, 'forceUpdate');\n }\n };\n\n /**\n * Replaces all of the state. Always use this or `setState` to mutate state.\n * You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object|function} completeState Next state.\n * @internal\n */\n\n ReactServerUpdateQueue.prototype.enqueueReplaceState = function enqueueReplaceState(publicInstance, completeState) {\n if (this.transaction.isInTransaction()) {\n ReactUpdateQueue.enqueueReplaceState(publicInstance, completeState);\n } else {\n warnNoop(publicInstance, 'replaceState');\n }\n };\n\n /**\n * Sets a subset of the state. This only exists because _pendingState is\n * internal. This provides a merging strategy that is not available to deep\n * properties which is confusing. TODO: Expose pendingState or don't use it\n * during the merge.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object|function} partialState Next partial state to be merged with state.\n * @internal\n */\n\n ReactServerUpdateQueue.prototype.enqueueSetState = function enqueueSetState(publicInstance, partialState) {\n if (this.transaction.isInTransaction()) {\n ReactUpdateQueue.enqueueSetState(publicInstance, partialState);\n } else {\n warnNoop(publicInstance, 'setState');\n }\n };\n return ReactServerUpdateQueue;\n}();\nmodule.exports = ReactServerUpdateQueue;","/**\n * Copyright (c) 2014-present, Facebook, Inc.\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\n'use strict';\n\nvar _assign = require('object-assign');\nvar DOMLazyTree = require('./DOMLazyTree');\nvar ReactDOMComponentTree = require('./ReactDOMComponentTree');\nvar ReactDOMEmptyComponent = function ReactDOMEmptyComponent(instantiate) {\n // ReactCompositeComponent uses this:\n this._currentElement = null;\n // ReactDOMComponentTree uses these:\n this._hostNode = null;\n this._hostParent = null;\n this._hostContainerInfo = null;\n this._domID = 0;\n};\n_assign(ReactDOMEmptyComponent.prototype, {\n mountComponent: function mountComponent(transaction, hostParent, hostContainerInfo, context) {\n var domID = hostContainerInfo._idCounter++;\n this._domID = domID;\n this._hostParent = hostParent;\n this._hostContainerInfo = hostContainerInfo;\n var nodeValue = ' react-empty: ' + this._domID + ' ';\n if (transaction.useCreateElement) {\n var ownerDocument = hostContainerInfo._ownerDocument;\n var node = ownerDocument.createComment(nodeValue);\n ReactDOMComponentTree.precacheNode(this, node);\n return DOMLazyTree(node);\n } else {\n if (transaction.renderToStaticMarkup) {\n // Normally we'd insert a comment node, but since this is a situation\n // where React won't take over (static pages), we can simply return\n // nothing.\n return '';\n }\n return '<!--' + nodeValue + '-->';\n }\n },\n receiveComponent: function receiveComponent() {},\n getHostNode: function getHostNode() {\n return ReactDOMComponentTree.getNodeFromInstance(this);\n },\n unmountComponent: function unmountComponent() {\n ReactDOMComponentTree.uncacheNode(this);\n }\n});\nmodule.exports = ReactDOMEmptyComponent;","/**\n * Copyright (c) 2015-present, Facebook, Inc.\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\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\nvar invariant = require('fbjs/lib/invariant');\n\n/**\n * Return the lowest common ancestor of A and B, or null if they are in\n * different trees.\n */\nfunction getLowestCommonAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0;\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = tempA._hostParent) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = tempB._hostParent) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = instA._hostParent;\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = instB._hostParent;\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB) {\n return instA;\n }\n instA = instA._hostParent;\n instB = instB._hostParent;\n }\n return null;\n}\n\n/**\n * Return if A is an ancestor of B.\n */\nfunction isAncestor(instA, instB) {\n !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}\n\n/**\n * Return the parent instance of the passed-in instance.\n */\nfunction getParentInstance(inst) {\n !('_hostNode' in inst) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getParentInstance: Invalid argument.') : _prodInvariant('36') : void 0;\n return inst._hostParent;\n}\n\n/**\n * Simulates the traversal of a two-phase, capture/bubble event dispatch.\n */\nfunction traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = inst._hostParent;\n }\n var i;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}\n\n/**\n * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that\n * should would receive a `mouseEnter` or `mouseLeave` event.\n *\n * Does not invoke the callback on the nearest common ancestor because nothing\n * \"entered\" or \"left\" that element.\n */\nfunction traverseEnterLeave(from, to, fn, argFrom, argTo) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n var pathFrom = [];\n while (from && from !== common) {\n pathFrom.push(from);\n from = from._hostParent;\n }\n var pathTo = [];\n while (to && to !== common) {\n pathTo.push(to);\n to = to._hostParent;\n }\n var i;\n for (i = 0; i < pathFrom.length; i++) {\n fn(pathFrom[i], 'bubbled', argFrom);\n }\n for (i = pathTo.length; i-- > 0;) {\n fn(pathTo[i], 'captured', argTo);\n }\n}\nmodule.exports = {\n isAncestor: isAncestor,\n getLowestCommonAncestor: getLowestCommonAncestor,\n getParentInstance: getParentInstance,\n traverseTwoPhase: traverseTwoPhase,\n traverseEnterLeave: traverseEnterLeave\n};","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant'),\n _assign = require('object-assign');\nvar DOMChildrenOperations = require('./DOMChildrenOperations');\nvar DOMLazyTree = require('./DOMLazyTree');\nvar ReactDOMComponentTree = require('./ReactDOMComponentTree');\nvar escapeTextContentForBrowser = require('./escapeTextContentForBrowser');\nvar invariant = require('fbjs/lib/invariant');\nvar validateDOMNesting = require('./validateDOMNesting');\n\n/**\n * Text nodes violate a couple assumptions that React makes about components:\n *\n * - When mounting text into the DOM, adjacent text nodes are merged.\n * - Text nodes cannot be assigned a React root ID.\n *\n * This component is used to wrap strings between comment nodes so that they\n * can undergo the same reconciliation that is applied to elements.\n *\n * TODO: Investigate representing React components in the DOM with text nodes.\n *\n * @class ReactDOMTextComponent\n * @extends ReactComponent\n * @internal\n */\nvar ReactDOMTextComponent = function ReactDOMTextComponent(text) {\n // TODO: This is really a ReactText (ReactNode), not a ReactElement\n this._currentElement = text;\n this._stringText = '' + text;\n // ReactDOMComponentTree uses these:\n this._hostNode = null;\n this._hostParent = null;\n\n // Properties\n this._domID = 0;\n this._mountIndex = 0;\n this._closingComment = null;\n this._commentNodes = null;\n};\n_assign(ReactDOMTextComponent.prototype, {\n /**\n * Creates the markup for this text node. This node is not intended to have\n * any features besides containing text content.\n *\n * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction\n * @return {string} Markup for this text node.\n * @internal\n */\n mountComponent: function mountComponent(transaction, hostParent, hostContainerInfo, context) {\n if (process.env.NODE_ENV !== 'production') {\n var parentInfo;\n if (hostParent != null) {\n parentInfo = hostParent._ancestorInfo;\n } else if (hostContainerInfo != null) {\n parentInfo = hostContainerInfo._ancestorInfo;\n }\n if (parentInfo) {\n // parentInfo should always be present except for the top-level\n // component when server rendering\n validateDOMNesting(null, this._stringText, this, parentInfo);\n }\n }\n var domID = hostContainerInfo._idCounter++;\n var openingValue = ' react-text: ' + domID + ' ';\n var closingValue = ' /react-text ';\n this._domID = domID;\n this._hostParent = hostParent;\n if (transaction.useCreateElement) {\n var ownerDocument = hostContainerInfo._ownerDocument;\n var openingComment = ownerDocument.createComment(openingValue);\n var closingComment = ownerDocument.createComment(closingValue);\n var lazyTree = DOMLazyTree(ownerDocument.createDocumentFragment());\n DOMLazyTree.queueChild(lazyTree, DOMLazyTree(openingComment));\n if (this._stringText) {\n DOMLazyTree.queueChild(lazyTree, DOMLazyTree(ownerDocument.createTextNode(this._stringText)));\n }\n DOMLazyTree.queueChild(lazyTree, DOMLazyTree(closingComment));\n ReactDOMComponentTree.precacheNode(this, openingComment);\n this._closingComment = closingComment;\n return lazyTree;\n } else {\n var escapedText = escapeTextContentForBrowser(this._stringText);\n if (transaction.renderToStaticMarkup) {\n // Normally we'd wrap this between comment nodes for the reasons stated\n // above, but since this is a situation where React won't take over\n // (static pages), we can simply return the text as it is.\n return escapedText;\n }\n return '<!--' + openingValue + '-->' + escapedText + '<!--' + closingValue + '-->';\n }\n },\n /**\n * Updates this component by updating the text content.\n *\n * @param {ReactText} nextText The next text content\n * @param {ReactReconcileTransaction} transaction\n * @internal\n */\n receiveComponent: function receiveComponent(nextText, transaction) {\n if (nextText !== this._currentElement) {\n this._currentElement = nextText;\n var nextStringText = '' + nextText;\n if (nextStringText !== this._stringText) {\n // TODO: Save this as pending props and use performUpdateIfNecessary\n // and/or updateComponent to do the actual update for consistency with\n // other component types?\n this._stringText = nextStringText;\n var commentNodes = this.getHostNode();\n DOMChildrenOperations.replaceDelimitedText(commentNodes[0], commentNodes[1], nextStringText);\n }\n }\n },\n getHostNode: function getHostNode() {\n var hostNode = this._commentNodes;\n if (hostNode) {\n return hostNode;\n }\n if (!this._closingComment) {\n var openingComment = ReactDOMComponentTree.getNodeFromInstance(this);\n var node = openingComment.nextSibling;\n while (true) {\n !(node != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Missing closing comment for text component %s', this._domID) : _prodInvariant('67', this._domID) : void 0;\n if (node.nodeType === 8 && node.nodeValue === ' /react-text ') {\n this._closingComment = node;\n break;\n }\n node = node.nextSibling;\n }\n }\n hostNode = [this._hostNode, this._closingComment];\n this._commentNodes = hostNode;\n return hostNode;\n },\n unmountComponent: function unmountComponent() {\n this._closingComment = null;\n this._commentNodes = null;\n ReactDOMComponentTree.uncacheNode(this);\n }\n});\nmodule.exports = ReactDOMTextComponent;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar _assign = require('object-assign');\nvar EventListener = require('fbjs/lib/EventListener');\nvar ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');\nvar PooledClass = require('./PooledClass');\nvar ReactDOMComponentTree = require('./ReactDOMComponentTree');\nvar ReactUpdates = require('./ReactUpdates');\nvar getEventTarget = require('./getEventTarget');\nvar getUnboundedScrollPosition = require('fbjs/lib/getUnboundedScrollPosition');\n\n/**\n * Find the deepest React component completely containing the root of the\n * passed-in instance (for use when entire React trees are nested within each\n * other). If React trees are not nested, returns null.\n */\nfunction findParent(inst) {\n // TODO: It may be a good idea to cache this to prevent unnecessary DOM\n // traversal, but caching is difficult to do correctly without using a\n // mutation observer to listen for all DOM changes.\n while (inst._hostParent) {\n inst = inst._hostParent;\n }\n var rootNode = ReactDOMComponentTree.getNodeFromInstance(inst);\n var container = rootNode.parentNode;\n return ReactDOMComponentTree.getClosestInstanceFromNode(container);\n}\n\n// Used to store ancestor hierarchy in top level callback\nfunction TopLevelCallbackBookKeeping(topLevelType, nativeEvent) {\n this.topLevelType = topLevelType;\n this.nativeEvent = nativeEvent;\n this.ancestors = [];\n}\n_assign(TopLevelCallbackBookKeeping.prototype, {\n destructor: function destructor() {\n this.topLevelType = null;\n this.nativeEvent = null;\n this.ancestors.length = 0;\n }\n});\nPooledClass.addPoolingTo(TopLevelCallbackBookKeeping, PooledClass.twoArgumentPooler);\nfunction handleTopLevelImpl(bookKeeping) {\n var nativeEventTarget = getEventTarget(bookKeeping.nativeEvent);\n var targetInst = ReactDOMComponentTree.getClosestInstanceFromNode(nativeEventTarget);\n\n // Loop through the hierarchy, in case there's any nested components.\n // It's important that we build the array of ancestors before calling any\n // event handlers, because event handlers can modify the DOM, leading to\n // inconsistencies with ReactMount's node cache. See #1105.\n var ancestor = targetInst;\n do {\n bookKeeping.ancestors.push(ancestor);\n ancestor = ancestor && findParent(ancestor);\n } while (ancestor);\n for (var i = 0; i < bookKeeping.ancestors.length; i++) {\n targetInst = bookKeeping.ancestors[i];\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, targetInst, bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n }\n}\nfunction scrollValueMonitor(cb) {\n var scrollPosition = getUnboundedScrollPosition(window);\n cb(scrollPosition);\n}\nvar ReactEventListener = {\n _enabled: true,\n _handleTopLevel: null,\n WINDOW_HANDLE: ExecutionEnvironment.canUseDOM ? window : null,\n setHandleTopLevel: function setHandleTopLevel(handleTopLevel) {\n ReactEventListener._handleTopLevel = handleTopLevel;\n },\n setEnabled: function setEnabled(enabled) {\n ReactEventListener._enabled = !!enabled;\n },\n isEnabled: function isEnabled() {\n return ReactEventListener._enabled;\n },\n /**\n * Traps top-level events by using event bubbling.\n *\n * @param {string} topLevelType Record from `EventConstants`.\n * @param {string} handlerBaseName Event name (e.g. \"click\").\n * @param {object} element Element on which to attach listener.\n * @return {?object} An object with a remove function which will forcefully\n * remove the listener.\n * @internal\n */\n trapBubbledEvent: function trapBubbledEvent(topLevelType, handlerBaseName, element) {\n if (!element) {\n return null;\n }\n return EventListener.listen(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType));\n },\n /**\n * Traps a top-level event by using event capturing.\n *\n * @param {string} topLevelType Record from `EventConstants`.\n * @param {string} handlerBaseName Event name (e.g. \"click\").\n * @param {object} element Element on which to attach listener.\n * @return {?object} An object with a remove function which will forcefully\n * remove the listener.\n * @internal\n */\n trapCapturedEvent: function trapCapturedEvent(topLevelType, handlerBaseName, element) {\n if (!element) {\n return null;\n }\n return EventListener.capture(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType));\n },\n monitorScrollValue: function monitorScrollValue(refresh) {\n var callback = scrollValueMonitor.bind(null, refresh);\n EventListener.listen(window, 'scroll', callback);\n },\n dispatchEvent: function dispatchEvent(topLevelType, nativeEvent) {\n if (!ReactEventListener._enabled) {\n return;\n }\n var bookKeeping = TopLevelCallbackBookKeeping.getPooled(topLevelType, nativeEvent);\n try {\n // Event queue being processed in the same cycle allows\n // `preventDefault`.\n ReactUpdates.batchedUpdates(handleTopLevelImpl, bookKeeping);\n } finally {\n TopLevelCallbackBookKeeping.release(bookKeeping);\n }\n }\n};\nmodule.exports = ReactEventListener;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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 * @typechecks\n */\n\n'use strict';\n\n/**\n * Gets the scroll position of the supplied element or window.\n *\n * The return values are unbounded, unlike `getScrollPosition`. This means they\n * may be negative or exceed the element boundaries (which is possible using\n * inertial scrolling).\n *\n * @param {DOMWindow|DOMElement} scrollable\n * @return {object} Map with `x` and `y` keys.\n */\nfunction getUnboundedScrollPosition(scrollable) {\n if (scrollable.Window && scrollable instanceof scrollable.Window) {\n return {\n x: scrollable.pageXOffset || scrollable.document.documentElement.scrollLeft,\n y: scrollable.pageYOffset || scrollable.document.documentElement.scrollTop\n };\n }\n return {\n x: scrollable.scrollLeft,\n y: scrollable.scrollTop\n };\n}\nmodule.exports = getUnboundedScrollPosition;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar DOMProperty = require('./DOMProperty');\nvar EventPluginHub = require('./EventPluginHub');\nvar EventPluginUtils = require('./EventPluginUtils');\nvar ReactComponentEnvironment = require('./ReactComponentEnvironment');\nvar ReactEmptyComponent = require('./ReactEmptyComponent');\nvar ReactBrowserEventEmitter = require('./ReactBrowserEventEmitter');\nvar ReactHostComponent = require('./ReactHostComponent');\nvar ReactUpdates = require('./ReactUpdates');\nvar ReactInjection = {\n Component: ReactComponentEnvironment.injection,\n DOMProperty: DOMProperty.injection,\n EmptyComponent: ReactEmptyComponent.injection,\n EventPluginHub: EventPluginHub.injection,\n EventPluginUtils: EventPluginUtils.injection,\n EventEmitter: ReactBrowserEventEmitter.injection,\n HostComponent: ReactHostComponent.injection,\n Updates: ReactUpdates.injection\n};\nmodule.exports = ReactInjection;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar _assign = require('object-assign');\nvar CallbackQueue = require('./CallbackQueue');\nvar PooledClass = require('./PooledClass');\nvar ReactBrowserEventEmitter = require('./ReactBrowserEventEmitter');\nvar ReactInputSelection = require('./ReactInputSelection');\nvar ReactInstrumentation = require('./ReactInstrumentation');\nvar Transaction = require('./Transaction');\nvar ReactUpdateQueue = require('./ReactUpdateQueue');\n\n/**\n * Ensures that, when possible, the selection range (currently selected text\n * input) is not disturbed by performing the transaction.\n */\nvar SELECTION_RESTORATION = {\n /**\n * @return {Selection} Selection information.\n */\n initialize: ReactInputSelection.getSelectionInformation,\n /**\n * @param {Selection} sel Selection information returned from `initialize`.\n */\n close: ReactInputSelection.restoreSelection\n};\n\n/**\n * Suppresses events (blur/focus) that could be inadvertently dispatched due to\n * high level DOM manipulations (like temporarily removing a text input from the\n * DOM).\n */\nvar EVENT_SUPPRESSION = {\n /**\n * @return {boolean} The enabled status of `ReactBrowserEventEmitter` before\n * the reconciliation.\n */\n initialize: function initialize() {\n var currentlyEnabled = ReactBrowserEventEmitter.isEnabled();\n ReactBrowserEventEmitter.setEnabled(false);\n return currentlyEnabled;\n },\n /**\n * @param {boolean} previouslyEnabled Enabled status of\n * `ReactBrowserEventEmitter` before the reconciliation occurred. `close`\n * restores the previous value.\n */\n close: function close(previouslyEnabled) {\n ReactBrowserEventEmitter.setEnabled(previouslyEnabled);\n }\n};\n\n/**\n * Provides a queue for collecting `componentDidMount` and\n * `componentDidUpdate` callbacks during the transaction.\n */\nvar ON_DOM_READY_QUEUEING = {\n /**\n * Initializes the internal `onDOMReady` queue.\n */\n initialize: function initialize() {\n this.reactMountReady.reset();\n },\n /**\n * After DOM is flushed, invoke all registered `onDOMReady` callbacks.\n */\n close: function close() {\n this.reactMountReady.notifyAll();\n }\n};\n\n/**\n * Executed within the scope of the `Transaction` instance. Consider these as\n * being member methods, but with an implied ordering while being isolated from\n * each other.\n */\nvar TRANSACTION_WRAPPERS = [SELECTION_RESTORATION, EVENT_SUPPRESSION, ON_DOM_READY_QUEUEING];\nif (process.env.NODE_ENV !== 'production') {\n TRANSACTION_WRAPPERS.push({\n initialize: ReactInstrumentation.debugTool.onBeginFlush,\n close: ReactInstrumentation.debugTool.onEndFlush\n });\n}\n\n/**\n * Currently:\n * - The order that these are listed in the transaction is critical:\n * - Suppresses events.\n * - Restores selection range.\n *\n * Future:\n * - Restore document/overflow scroll positions that were unintentionally\n * modified via DOM insertions above the top viewport boundary.\n * - Implement/integrate with customized constraint based layout system and keep\n * track of which dimensions must be remeasured.\n *\n * @class ReactReconcileTransaction\n */\nfunction ReactReconcileTransaction(useCreateElement) {\n this.reinitializeTransaction();\n // Only server-side rendering really needs this option (see\n // `ReactServerRendering`), but server-side uses\n // `ReactServerRenderingTransaction` instead. This option is here so that it's\n // accessible and defaults to false when `ReactDOMComponent` and\n // `ReactDOMTextComponent` checks it in `mountComponent`.`\n this.renderToStaticMarkup = false;\n this.reactMountReady = CallbackQueue.getPooled(null);\n this.useCreateElement = useCreateElement;\n}\nvar Mixin = {\n /**\n * @see Transaction\n * @abstract\n * @final\n * @return {array<object>} List of operation wrap procedures.\n * TODO: convert to array<TransactionWrapper>\n */\n getTransactionWrappers: function getTransactionWrappers() {\n return TRANSACTION_WRAPPERS;\n },\n /**\n * @return {object} The queue to collect `onDOMReady` callbacks with.\n */\n getReactMountReady: function getReactMountReady() {\n return this.reactMountReady;\n },\n /**\n * @return {object} The queue to collect React async events.\n */\n getUpdateQueue: function getUpdateQueue() {\n return ReactUpdateQueue;\n },\n /**\n * Save current transaction state -- if the return value from this method is\n * passed to `rollback`, the transaction will be reset to that state.\n */\n checkpoint: function checkpoint() {\n // reactMountReady is the our only stateful wrapper\n return this.reactMountReady.checkpoint();\n },\n rollback: function rollback(checkpoint) {\n this.reactMountReady.rollback(checkpoint);\n },\n /**\n * `PooledClass` looks for this, and will invoke this before allowing this\n * instance to be reused.\n */\n destructor: function destructor() {\n CallbackQueue.release(this.reactMountReady);\n this.reactMountReady = null;\n }\n};\n_assign(ReactReconcileTransaction.prototype, Transaction, Mixin);\nPooledClass.addPoolingTo(ReactReconcileTransaction);\nmodule.exports = ReactReconcileTransaction;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');\nvar getNodeForCharacterOffset = require('./getNodeForCharacterOffset');\nvar getTextContentAccessor = require('./getTextContentAccessor');\n\n/**\n * While `isCollapsed` is available on the Selection object and `collapsed`\n * is available on the Range object, IE11 sometimes gets them wrong.\n * If the anchor/focus nodes and offsets are the same, the range is collapsed.\n */\nfunction isCollapsed(anchorNode, anchorOffset, focusNode, focusOffset) {\n return anchorNode === focusNode && anchorOffset === focusOffset;\n}\n\n/**\n * Get the appropriate anchor and focus node/offset pairs for IE.\n *\n * The catch here is that IE's selection API doesn't provide information\n * about whether the selection is forward or backward, so we have to\n * behave as though it's always forward.\n *\n * IE text differs from modern selection in that it behaves as though\n * block elements end with a new line. This means character offsets will\n * differ between the two APIs.\n *\n * @param {DOMElement} node\n * @return {object}\n */\nfunction getIEOffsets(node) {\n var selection = document.selection;\n var selectedRange = selection.createRange();\n var selectedLength = selectedRange.text.length;\n\n // Duplicate selection so we can move range without breaking user selection.\n var fromStart = selectedRange.duplicate();\n fromStart.moveToElementText(node);\n fromStart.setEndPoint('EndToStart', selectedRange);\n var startOffset = fromStart.text.length;\n var endOffset = startOffset + selectedLength;\n return {\n start: startOffset,\n end: endOffset\n };\n}\n\n/**\n * @param {DOMElement} node\n * @return {?object}\n */\nfunction getModernOffsets(node) {\n var selection = window.getSelection && window.getSelection();\n if (!selection || selection.rangeCount === 0) {\n return null;\n }\n var anchorNode = selection.anchorNode;\n var anchorOffset = selection.anchorOffset;\n var focusNode = selection.focusNode;\n var focusOffset = selection.focusOffset;\n var currentRange = selection.getRangeAt(0);\n\n // In Firefox, range.startContainer and range.endContainer can be \"anonymous\n // divs\", e.g. the up/down buttons on an <input type=\"number\">. Anonymous\n // divs do not seem to expose properties, triggering a \"Permission denied\n // error\" if any of its properties are accessed. The only seemingly possible\n // way to avoid erroring is to access a property that typically works for\n // non-anonymous divs and catch any error that may otherwise arise. See\n // https://bugzilla.mozilla.org/show_bug.cgi?id=208427\n try {\n /* eslint-disable no-unused-expressions */\n currentRange.startContainer.nodeType;\n currentRange.endContainer.nodeType;\n /* eslint-enable no-unused-expressions */\n } catch (e) {\n return null;\n }\n\n // If the node and offset values are the same, the selection is collapsed.\n // `Selection.isCollapsed` is available natively, but IE sometimes gets\n // this value wrong.\n var isSelectionCollapsed = isCollapsed(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);\n var rangeLength = isSelectionCollapsed ? 0 : currentRange.toString().length;\n var tempRange = currentRange.cloneRange();\n tempRange.selectNodeContents(node);\n tempRange.setEnd(currentRange.startContainer, currentRange.startOffset);\n var isTempRangeCollapsed = isCollapsed(tempRange.startContainer, tempRange.startOffset, tempRange.endContainer, tempRange.endOffset);\n var start = isTempRangeCollapsed ? 0 : tempRange.toString().length;\n var end = start + rangeLength;\n\n // Detect whether the selection is backward.\n var detectionRange = document.createRange();\n detectionRange.setStart(anchorNode, anchorOffset);\n detectionRange.setEnd(focusNode, focusOffset);\n var isBackward = detectionRange.collapsed;\n return {\n start: isBackward ? end : start,\n end: isBackward ? start : end\n };\n}\n\n/**\n * @param {DOMElement|DOMTextNode} node\n * @param {object} offsets\n */\nfunction setIEOffsets(node, offsets) {\n var range = document.selection.createRange().duplicate();\n var start, end;\n if (offsets.end === undefined) {\n start = offsets.start;\n end = start;\n } else if (offsets.start > offsets.end) {\n start = offsets.end;\n end = offsets.start;\n } else {\n start = offsets.start;\n end = offsets.end;\n }\n range.moveToElementText(node);\n range.moveStart('character', start);\n range.setEndPoint('EndToStart', range);\n range.moveEnd('character', end - start);\n range.select();\n}\n\n/**\n * In modern non-IE browsers, we can support both forward and backward\n * selections.\n *\n * Note: IE10+ supports the Selection object, but it does not support\n * the `extend` method, which means that even in modern IE, it's not possible\n * to programmatically create a backward selection. Thus, for all IE\n * versions, we use the old IE API to create our selections.\n *\n * @param {DOMElement|DOMTextNode} node\n * @param {object} offsets\n */\nfunction setModernOffsets(node, offsets) {\n if (!window.getSelection) {\n return;\n }\n var selection = window.getSelection();\n var length = node[getTextContentAccessor()].length;\n var start = Math.min(offsets.start, length);\n var end = offsets.end === undefined ? start : Math.min(offsets.end, length);\n\n // IE 11 uses modern selection, but doesn't support the extend method.\n // Flip backward selections, so we can set with a single range.\n if (!selection.extend && start > end) {\n var temp = end;\n end = start;\n start = temp;\n }\n var startMarker = getNodeForCharacterOffset(node, start);\n var endMarker = getNodeForCharacterOffset(node, end);\n if (startMarker && endMarker) {\n var range = document.createRange();\n range.setStart(startMarker.node, startMarker.offset);\n selection.removeAllRanges();\n if (start > end) {\n selection.addRange(range);\n selection.extend(endMarker.node, endMarker.offset);\n } else {\n range.setEnd(endMarker.node, endMarker.offset);\n selection.addRange(range);\n }\n }\n}\nvar useIEOffsets = ExecutionEnvironment.canUseDOM && 'selection' in document && !('getSelection' in window);\nvar ReactDOMSelection = {\n /**\n * @param {DOMElement} node\n */\n getOffsets: useIEOffsets ? getIEOffsets : getModernOffsets,\n /**\n * @param {DOMElement|DOMTextNode} node\n * @param {object} offsets\n */\n setOffsets: useIEOffsets ? setIEOffsets : setModernOffsets\n};\nmodule.exports = ReactDOMSelection;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\n/**\n * Given any node return the first leaf node without children.\n *\n * @param {DOMElement|DOMTextNode} node\n * @return {DOMElement|DOMTextNode}\n */\nfunction getLeafNode(node) {\n while (node && node.firstChild) {\n node = node.firstChild;\n }\n return node;\n}\n\n/**\n * Get the next sibling within a container. This will walk up the\n * DOM if a node's siblings have been exhausted.\n *\n * @param {DOMElement|DOMTextNode} node\n * @return {?DOMElement|DOMTextNode}\n */\nfunction getSiblingNode(node) {\n while (node) {\n if (node.nextSibling) {\n return node.nextSibling;\n }\n node = node.parentNode;\n }\n}\n\n/**\n * Get object describing the nodes which contain characters at offset.\n *\n * @param {DOMElement|DOMTextNode} root\n * @param {number} offset\n * @return {?object}\n */\nfunction getNodeForCharacterOffset(root, offset) {\n var node = getLeafNode(root);\n var nodeStart = 0;\n var nodeEnd = 0;\n while (node) {\n if (node.nodeType === 3) {\n nodeEnd = nodeStart + node.textContent.length;\n if (nodeStart <= offset && nodeEnd >= offset) {\n return {\n node: node,\n offset: offset - nodeStart\n };\n }\n nodeStart = nodeEnd;\n }\n node = getLeafNode(getSiblingNode(node));\n }\n}\nmodule.exports = getNodeForCharacterOffset;","'use strict';\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\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 */\nvar isTextNode = require('./isTextNode');\n\n/*eslint-disable no-bitwise */\n\n/**\n * Checks if a given DOM node contains or is another DOM node.\n */\nfunction containsNode(outerNode, innerNode) {\n if (!outerNode || !innerNode) {\n return false;\n } else if (outerNode === innerNode) {\n return true;\n } else if (isTextNode(outerNode)) {\n return false;\n } else if (isTextNode(innerNode)) {\n return containsNode(outerNode, innerNode.parentNode);\n } else if ('contains' in outerNode) {\n return outerNode.contains(innerNode);\n } else if (outerNode.compareDocumentPosition) {\n return !!(outerNode.compareDocumentPosition(innerNode) & 16);\n } else {\n return false;\n }\n}\nmodule.exports = containsNode;","'use strict';\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\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 * @typechecks\n */\nvar isNode = require('./isNode');\n\n/**\n * @param {*} object The object to check.\n * @return {boolean} Whether or not the object is a DOM text node.\n */\nfunction isTextNode(object) {\n return isNode(object) && object.nodeType == 3;\n}\nmodule.exports = isTextNode;","'use strict';\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\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 * @typechecks\n */\n\n/**\n * @param {*} object The object to check.\n * @return {boolean} Whether or not the object is a DOM node.\n */\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction isNode(object) {\n var doc = object ? object.ownerDocument || object : document;\n var defaultView = doc.defaultView || window;\n return !!(object && (typeof defaultView.Node === 'function' ? object instanceof defaultView.Node : _typeof(object) === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string'));\n}\nmodule.exports = isNode;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar NS = {\n xlink: 'http://www.w3.org/1999/xlink',\n xml: 'http://www.w3.org/XML/1998/namespace'\n};\n\n// We use attributes for everything SVG so let's avoid some duplication and run\n// code instead.\n// The following are all specified in the HTML config already so we exclude here.\n// - class (as className)\n// - color\n// - height\n// - id\n// - lang\n// - max\n// - media\n// - method\n// - min\n// - name\n// - style\n// - target\n// - type\n// - width\nvar ATTRS = {\n accentHeight: 'accent-height',\n accumulate: 0,\n additive: 0,\n alignmentBaseline: 'alignment-baseline',\n allowReorder: 'allowReorder',\n alphabetic: 0,\n amplitude: 0,\n arabicForm: 'arabic-form',\n ascent: 0,\n attributeName: 'attributeName',\n attributeType: 'attributeType',\n autoReverse: 'autoReverse',\n azimuth: 0,\n baseFrequency: 'baseFrequency',\n baseProfile: 'baseProfile',\n baselineShift: 'baseline-shift',\n bbox: 0,\n begin: 0,\n bias: 0,\n by: 0,\n calcMode: 'calcMode',\n capHeight: 'cap-height',\n clip: 0,\n clipPath: 'clip-path',\n clipRule: 'clip-rule',\n clipPathUnits: 'clipPathUnits',\n colorInterpolation: 'color-interpolation',\n colorInterpolationFilters: 'color-interpolation-filters',\n colorProfile: 'color-profile',\n colorRendering: 'color-rendering',\n contentScriptType: 'contentScriptType',\n contentStyleType: 'contentStyleType',\n cursor: 0,\n cx: 0,\n cy: 0,\n d: 0,\n decelerate: 0,\n descent: 0,\n diffuseConstant: 'diffuseConstant',\n direction: 0,\n display: 0,\n divisor: 0,\n dominantBaseline: 'dominant-baseline',\n dur: 0,\n dx: 0,\n dy: 0,\n edgeMode: 'edgeMode',\n elevation: 0,\n enableBackground: 'enable-background',\n end: 0,\n exponent: 0,\n externalResourcesRequired: 'externalResourcesRequired',\n fill: 0,\n fillOpacity: 'fill-opacity',\n fillRule: 'fill-rule',\n filter: 0,\n filterRes: 'filterRes',\n filterUnits: 'filterUnits',\n floodColor: 'flood-color',\n floodOpacity: 'flood-opacity',\n focusable: 0,\n fontFamily: 'font-family',\n fontSize: 'font-size',\n fontSizeAdjust: 'font-size-adjust',\n fontStretch: 'font-stretch',\n fontStyle: 'font-style',\n fontVariant: 'font-variant',\n fontWeight: 'font-weight',\n format: 0,\n from: 0,\n fx: 0,\n fy: 0,\n g1: 0,\n g2: 0,\n glyphName: 'glyph-name',\n glyphOrientationHorizontal: 'glyph-orientation-horizontal',\n glyphOrientationVertical: 'glyph-orientation-vertical',\n glyphRef: 'glyphRef',\n gradientTransform: 'gradientTransform',\n gradientUnits: 'gradientUnits',\n hanging: 0,\n horizAdvX: 'horiz-adv-x',\n horizOriginX: 'horiz-origin-x',\n ideographic: 0,\n imageRendering: 'image-rendering',\n 'in': 0,\n in2: 0,\n intercept: 0,\n k: 0,\n k1: 0,\n k2: 0,\n k3: 0,\n k4: 0,\n kernelMatrix: 'kernelMatrix',\n kernelUnitLength: 'kernelUnitLength',\n kerning: 0,\n keyPoints: 'keyPoints',\n keySplines: 'keySplines',\n keyTimes: 'keyTimes',\n lengthAdjust: 'lengthAdjust',\n letterSpacing: 'letter-spacing',\n lightingColor: 'lighting-color',\n limitingConeAngle: 'limitingConeAngle',\n local: 0,\n markerEnd: 'marker-end',\n markerMid: 'marker-mid',\n markerStart: 'marker-start',\n markerHeight: 'markerHeight',\n markerUnits: 'markerUnits',\n markerWidth: 'markerWidth',\n mask: 0,\n maskContentUnits: 'maskContentUnits',\n maskUnits: 'maskUnits',\n mathematical: 0,\n mode: 0,\n numOctaves: 'numOctaves',\n offset: 0,\n opacity: 0,\n operator: 0,\n order: 0,\n orient: 0,\n orientation: 0,\n origin: 0,\n overflow: 0,\n overlinePosition: 'overline-position',\n overlineThickness: 'overline-thickness',\n paintOrder: 'paint-order',\n panose1: 'panose-1',\n pathLength: 'pathLength',\n patternContentUnits: 'patternContentUnits',\n patternTransform: 'patternTransform',\n patternUnits: 'patternUnits',\n pointerEvents: 'pointer-events',\n points: 0,\n pointsAtX: 'pointsAtX',\n pointsAtY: 'pointsAtY',\n pointsAtZ: 'pointsAtZ',\n preserveAlpha: 'preserveAlpha',\n preserveAspectRatio: 'preserveAspectRatio',\n primitiveUnits: 'primitiveUnits',\n r: 0,\n radius: 0,\n refX: 'refX',\n refY: 'refY',\n renderingIntent: 'rendering-intent',\n repeatCount: 'repeatCount',\n repeatDur: 'repeatDur',\n requiredExtensions: 'requiredExtensions',\n requiredFeatures: 'requiredFeatures',\n restart: 0,\n result: 0,\n rotate: 0,\n rx: 0,\n ry: 0,\n scale: 0,\n seed: 0,\n shapeRendering: 'shape-rendering',\n slope: 0,\n spacing: 0,\n specularConstant: 'specularConstant',\n specularExponent: 'specularExponent',\n speed: 0,\n spreadMethod: 'spreadMethod',\n startOffset: 'startOffset',\n stdDeviation: 'stdDeviation',\n stemh: 0,\n stemv: 0,\n stitchTiles: 'stitchTiles',\n stopColor: 'stop-color',\n stopOpacity: 'stop-opacity',\n strikethroughPosition: 'strikethrough-position',\n strikethroughThickness: 'strikethrough-thickness',\n string: 0,\n stroke: 0,\n strokeDasharray: 'stroke-dasharray',\n strokeDashoffset: 'stroke-dashoffset',\n strokeLinecap: 'stroke-linecap',\n strokeLinejoin: 'stroke-linejoin',\n strokeMiterlimit: 'stroke-miterlimit',\n strokeOpacity: 'stroke-opacity',\n strokeWidth: 'stroke-width',\n surfaceScale: 'surfaceScale',\n systemLanguage: 'systemLanguage',\n tableValues: 'tableValues',\n targetX: 'targetX',\n targetY: 'targetY',\n textAnchor: 'text-anchor',\n textDecoration: 'text-decoration',\n textRendering: 'text-rendering',\n textLength: 'textLength',\n to: 0,\n transform: 0,\n u1: 0,\n u2: 0,\n underlinePosition: 'underline-position',\n underlineThickness: 'underline-thickness',\n unicode: 0,\n unicodeBidi: 'unicode-bidi',\n unicodeRange: 'unicode-range',\n unitsPerEm: 'units-per-em',\n vAlphabetic: 'v-alphabetic',\n vHanging: 'v-hanging',\n vIdeographic: 'v-ideographic',\n vMathematical: 'v-mathematical',\n values: 0,\n vectorEffect: 'vector-effect',\n version: 0,\n vertAdvY: 'vert-adv-y',\n vertOriginX: 'vert-origin-x',\n vertOriginY: 'vert-origin-y',\n viewBox: 'viewBox',\n viewTarget: 'viewTarget',\n visibility: 0,\n widths: 0,\n wordSpacing: 'word-spacing',\n writingMode: 'writing-mode',\n x: 0,\n xHeight: 'x-height',\n x1: 0,\n x2: 0,\n xChannelSelector: 'xChannelSelector',\n xlinkActuate: 'xlink:actuate',\n xlinkArcrole: 'xlink:arcrole',\n xlinkHref: 'xlink:href',\n xlinkRole: 'xlink:role',\n xlinkShow: 'xlink:show',\n xlinkTitle: 'xlink:title',\n xlinkType: 'xlink:type',\n xmlBase: 'xml:base',\n xmlns: 0,\n xmlnsXlink: 'xmlns:xlink',\n xmlLang: 'xml:lang',\n xmlSpace: 'xml:space',\n y: 0,\n y1: 0,\n y2: 0,\n yChannelSelector: 'yChannelSelector',\n z: 0,\n zoomAndPan: 'zoomAndPan'\n};\nvar SVGDOMPropertyConfig = {\n Properties: {},\n DOMAttributeNamespaces: {\n xlinkActuate: NS.xlink,\n xlinkArcrole: NS.xlink,\n xlinkHref: NS.xlink,\n xlinkRole: NS.xlink,\n xlinkShow: NS.xlink,\n xlinkTitle: NS.xlink,\n xlinkType: NS.xlink,\n xmlBase: NS.xml,\n xmlLang: NS.xml,\n xmlSpace: NS.xml\n },\n DOMAttributeNames: {}\n};\nObject.keys(ATTRS).forEach(function (key) {\n SVGDOMPropertyConfig.Properties[key] = 0;\n if (ATTRS[key]) {\n SVGDOMPropertyConfig.DOMAttributeNames[key] = ATTRS[key];\n }\n});\nmodule.exports = SVGDOMPropertyConfig;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar EventPropagators = require('./EventPropagators');\nvar ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');\nvar ReactDOMComponentTree = require('./ReactDOMComponentTree');\nvar ReactInputSelection = require('./ReactInputSelection');\nvar SyntheticEvent = require('./SyntheticEvent');\nvar getActiveElement = require('fbjs/lib/getActiveElement');\nvar isTextInputElement = require('./isTextInputElement');\nvar shallowEqual = require('fbjs/lib/shallowEqual');\nvar skipSelectionChangeEvent = ExecutionEnvironment.canUseDOM && 'documentMode' in document && document.documentMode <= 11;\nvar eventTypes = {\n select: {\n phasedRegistrationNames: {\n bubbled: 'onSelect',\n captured: 'onSelectCapture'\n },\n dependencies: ['topBlur', 'topContextMenu', 'topFocus', 'topKeyDown', 'topKeyUp', 'topMouseDown', 'topMouseUp', 'topSelectionChange']\n }\n};\nvar activeElement = null;\nvar activeElementInst = null;\nvar lastSelection = null;\nvar mouseDown = false;\n\n// Track whether a listener exists for this plugin. If none exist, we do\n// not extract events. See #3639.\nvar hasListener = false;\n\n/**\n * Get an object which is a unique representation of the current selection.\n *\n * The return value will not be consistent across nodes or browsers, but\n * two identical selections on the same node will return identical objects.\n *\n * @param {DOMElement} node\n * @return {object}\n */\nfunction getSelection(node) {\n if ('selectionStart' in node && ReactInputSelection.hasSelectionCapabilities(node)) {\n return {\n start: node.selectionStart,\n end: node.selectionEnd\n };\n } else if (window.getSelection) {\n var selection = window.getSelection();\n return {\n anchorNode: selection.anchorNode,\n anchorOffset: selection.anchorOffset,\n focusNode: selection.focusNode,\n focusOffset: selection.focusOffset\n };\n } else if (document.selection) {\n var range = document.selection.createRange();\n return {\n parentElement: range.parentElement(),\n text: range.text,\n top: range.boundingTop,\n left: range.boundingLeft\n };\n }\n}\n\n/**\n * Poll selection to see whether it's changed.\n *\n * @param {object} nativeEvent\n * @return {?SyntheticEvent}\n */\nfunction constructSelectEvent(nativeEvent, nativeEventTarget) {\n // Ensure we have the right element, and that the user is not dragging a\n // selection (this matches native `select` event behavior). In HTML5, select\n // fires only on input and textarea thus if there's no focused element we\n // won't dispatch.\n if (mouseDown || activeElement == null || activeElement !== getActiveElement()) {\n return null;\n }\n\n // Only fire when selection has actually changed.\n var currentSelection = getSelection(activeElement);\n if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {\n lastSelection = currentSelection;\n var syntheticEvent = SyntheticEvent.getPooled(eventTypes.select, activeElementInst, nativeEvent, nativeEventTarget);\n syntheticEvent.type = 'select';\n syntheticEvent.target = activeElement;\n EventPropagators.accumulateTwoPhaseDispatches(syntheticEvent);\n return syntheticEvent;\n }\n return null;\n}\n\n/**\n * This plugin creates an `onSelect` event that normalizes select events\n * across form elements.\n *\n * Supported elements are:\n * - input (see `isTextInputElement`)\n * - textarea\n * - contentEditable\n *\n * This differs from native browser implementations in the following ways:\n * - Fires on contentEditable fields as well as inputs.\n * - Fires for collapsed selection.\n * - Fires after user input.\n */\nvar SelectEventPlugin = {\n eventTypes: eventTypes,\n extractEvents: function extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n if (!hasListener) {\n return null;\n }\n var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window;\n switch (topLevelType) {\n // Track the input node that has focus.\n case 'topFocus':\n if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') {\n activeElement = targetNode;\n activeElementInst = targetInst;\n lastSelection = null;\n }\n break;\n case 'topBlur':\n activeElement = null;\n activeElementInst = null;\n lastSelection = null;\n break;\n // Don't fire the event while the user is dragging. This matches the\n // semantics of the native select event.\n case 'topMouseDown':\n mouseDown = true;\n break;\n case 'topContextMenu':\n case 'topMouseUp':\n mouseDown = false;\n return constructSelectEvent(nativeEvent, nativeEventTarget);\n // Chrome and IE fire non-standard event when selection is changed (and\n // sometimes when it hasn't). IE's event fires out of order with respect\n // to key and input events on deletion, so we discard it.\n //\n // Firefox doesn't support selectionchange, so check selection status\n // after each key entry. The selection changes after keydown and before\n // keyup, but we check on keydown as well in the case of holding down a\n // key, when multiple keydown events are fired but only one keyup is.\n // This is also our approach for IE handling, for the reason above.\n case 'topSelectionChange':\n if (skipSelectionChangeEvent) {\n break;\n }\n // falls through\n case 'topKeyDown':\n case 'topKeyUp':\n return constructSelectEvent(nativeEvent, nativeEventTarget);\n }\n return null;\n },\n didPutListener: function didPutListener(inst, registrationName, listener) {\n if (registrationName === 'onSelect') {\n hasListener = true;\n }\n }\n};\nmodule.exports = SelectEventPlugin;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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 */\n\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\nvar EventListener = require('fbjs/lib/EventListener');\nvar EventPropagators = require('./EventPropagators');\nvar ReactDOMComponentTree = require('./ReactDOMComponentTree');\nvar SyntheticAnimationEvent = require('./SyntheticAnimationEvent');\nvar SyntheticClipboardEvent = require('./SyntheticClipboardEvent');\nvar SyntheticEvent = require('./SyntheticEvent');\nvar SyntheticFocusEvent = require('./SyntheticFocusEvent');\nvar SyntheticKeyboardEvent = require('./SyntheticKeyboardEvent');\nvar SyntheticMouseEvent = require('./SyntheticMouseEvent');\nvar SyntheticDragEvent = require('./SyntheticDragEvent');\nvar SyntheticTouchEvent = require('./SyntheticTouchEvent');\nvar SyntheticTransitionEvent = require('./SyntheticTransitionEvent');\nvar SyntheticUIEvent = require('./SyntheticUIEvent');\nvar SyntheticWheelEvent = require('./SyntheticWheelEvent');\nvar emptyFunction = require('fbjs/lib/emptyFunction');\nvar getEventCharCode = require('./getEventCharCode');\nvar invariant = require('fbjs/lib/invariant');\n\n/**\n * Turns\n * ['abort', ...]\n * into\n * eventTypes = {\n * 'abort': {\n * phasedRegistrationNames: {\n * bubbled: 'onAbort',\n * captured: 'onAbortCapture',\n * },\n * dependencies: ['topAbort'],\n * },\n * ...\n * };\n * topLevelEventsToDispatchConfig = {\n * 'topAbort': { sameConfig }\n * };\n */\nvar eventTypes = {};\nvar topLevelEventsToDispatchConfig = {};\n['abort', 'animationEnd', 'animationIteration', 'animationStart', 'blur', 'canPlay', 'canPlayThrough', 'click', 'contextMenu', 'copy', 'cut', 'doubleClick', 'drag', 'dragEnd', 'dragEnter', 'dragExit', 'dragLeave', 'dragOver', 'dragStart', 'drop', 'durationChange', 'emptied', 'encrypted', 'ended', 'error', 'focus', 'input', 'invalid', 'keyDown', 'keyPress', 'keyUp', 'load', 'loadedData', 'loadedMetadata', 'loadStart', 'mouseDown', 'mouseMove', 'mouseOut', 'mouseOver', 'mouseUp', 'paste', 'pause', 'play', 'playing', 'progress', 'rateChange', 'reset', 'scroll', 'seeked', 'seeking', 'stalled', 'submit', 'suspend', 'timeUpdate', 'touchCancel', 'touchEnd', 'touchMove', 'touchStart', 'transitionEnd', 'volumeChange', 'waiting', 'wheel'].forEach(function (event) {\n var capitalizedEvent = event[0].toUpperCase() + event.slice(1);\n var onEvent = 'on' + capitalizedEvent;\n var topEvent = 'top' + capitalizedEvent;\n var type = {\n phasedRegistrationNames: {\n bubbled: onEvent,\n captured: onEvent + 'Capture'\n },\n dependencies: [topEvent]\n };\n eventTypes[event] = type;\n topLevelEventsToDispatchConfig[topEvent] = type;\n});\nvar onClickListeners = {};\nfunction getDictionaryKey(inst) {\n // Prevents V8 performance issue:\n // https://github.com/facebook/react/pull/7232\n return '.' + inst._rootNodeID;\n}\nfunction isInteractive(tag) {\n return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';\n}\nvar SimpleEventPlugin = {\n eventTypes: eventTypes,\n extractEvents: function extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n var dispatchConfig = topLevelEventsToDispatchConfig[topLevelType];\n if (!dispatchConfig) {\n return null;\n }\n var EventConstructor;\n switch (topLevelType) {\n case 'topAbort':\n case 'topCanPlay':\n case 'topCanPlayThrough':\n case 'topDurationChange':\n case 'topEmptied':\n case 'topEncrypted':\n case 'topEnded':\n case 'topError':\n case 'topInput':\n case 'topInvalid':\n case 'topLoad':\n case 'topLoadedData':\n case 'topLoadedMetadata':\n case 'topLoadStart':\n case 'topPause':\n case 'topPlay':\n case 'topPlaying':\n case 'topProgress':\n case 'topRateChange':\n case 'topReset':\n case 'topSeeked':\n case 'topSeeking':\n case 'topStalled':\n case 'topSubmit':\n case 'topSuspend':\n case 'topTimeUpdate':\n case 'topVolumeChange':\n case 'topWaiting':\n // HTML Events\n // @see http://www.w3.org/TR/html5/index.html#events-0\n EventConstructor = SyntheticEvent;\n break;\n case 'topKeyPress':\n // Firefox creates a keypress event for function keys too. This removes\n // the unwanted keypress events. Enter is however both printable and\n // non-printable. One would expect Tab to be as well (but it isn't).\n if (getEventCharCode(nativeEvent) === 0) {\n return null;\n }\n /* falls through */\n case 'topKeyDown':\n case 'topKeyUp':\n EventConstructor = SyntheticKeyboardEvent;\n break;\n case 'topBlur':\n case 'topFocus':\n EventConstructor = SyntheticFocusEvent;\n break;\n case 'topClick':\n // Firefox creates a click event on right mouse clicks. This removes the\n // unwanted click events.\n if (nativeEvent.button === 2) {\n return null;\n }\n /* falls through */\n case 'topDoubleClick':\n case 'topMouseDown':\n case 'topMouseMove':\n case 'topMouseUp':\n // TODO: Disabled elements should not respond to mouse events\n /* falls through */\n case 'topMouseOut':\n case 'topMouseOver':\n case 'topContextMenu':\n EventConstructor = SyntheticMouseEvent;\n break;\n case 'topDrag':\n case 'topDragEnd':\n case 'topDragEnter':\n case 'topDragExit':\n case 'topDragLeave':\n case 'topDragOver':\n case 'topDragStart':\n case 'topDrop':\n EventConstructor = SyntheticDragEvent;\n break;\n case 'topTouchCancel':\n case 'topTouchEnd':\n case 'topTouchMove':\n case 'topTouchStart':\n EventConstructor = SyntheticTouchEvent;\n break;\n case 'topAnimationEnd':\n case 'topAnimationIteration':\n case 'topAnimationStart':\n EventConstructor = SyntheticAnimationEvent;\n break;\n case 'topTransitionEnd':\n EventConstructor = SyntheticTransitionEvent;\n break;\n case 'topScroll':\n EventConstructor = SyntheticUIEvent;\n break;\n case 'topWheel':\n EventConstructor = SyntheticWheelEvent;\n break;\n case 'topCopy':\n case 'topCut':\n case 'topPaste':\n EventConstructor = SyntheticClipboardEvent;\n break;\n }\n !EventConstructor ? process.env.NODE_ENV !== 'production' ? invariant(false, 'SimpleEventPlugin: Unhandled event type, `%s`.', topLevelType) : _prodInvariant('86', topLevelType) : void 0;\n var event = EventConstructor.getPooled(dispatchConfig, targetInst, nativeEvent, nativeEventTarget);\n EventPropagators.accumulateTwoPhaseDispatches(event);\n return event;\n },\n didPutListener: function didPutListener(inst, registrationName, listener) {\n // Mobile Safari does not fire properly bubble click events on\n // non-interactive elements, which means delegated click listeners do not\n // fire. The workaround for this bug involves attaching an empty click\n // listener on the target node.\n // http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html\n if (registrationName === 'onClick' && !isInteractive(inst._tag)) {\n var key = getDictionaryKey(inst);\n var node = ReactDOMComponentTree.getNodeFromInstance(inst);\n if (!onClickListeners[key]) {\n onClickListeners[key] = EventListener.listen(node, 'click', emptyFunction);\n }\n }\n },\n willDeleteListener: function willDeleteListener(inst, registrationName) {\n if (registrationName === 'onClick' && !isInteractive(inst._tag)) {\n var key = getDictionaryKey(inst);\n onClickListeners[key].remove();\n delete onClickListeners[key];\n }\n }\n};\nmodule.exports = SimpleEventPlugin;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar SyntheticEvent = require('./SyntheticEvent');\n\n/**\n * @interface Event\n * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface\n * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent\n */\nvar AnimationEventInterface = {\n animationName: null,\n elapsedTime: null,\n pseudoElement: null\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticEvent}\n */\nfunction SyntheticAnimationEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\nSyntheticEvent.augmentClass(SyntheticAnimationEvent, AnimationEventInterface);\nmodule.exports = SyntheticAnimationEvent;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar SyntheticEvent = require('./SyntheticEvent');\n\n/**\n * @interface Event\n * @see http://www.w3.org/TR/clipboard-apis/\n */\nvar ClipboardEventInterface = {\n clipboardData: function clipboardData(event) {\n return 'clipboardData' in event ? event.clipboardData : window.clipboardData;\n }\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticUIEvent}\n */\nfunction SyntheticClipboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\nSyntheticEvent.augmentClass(SyntheticClipboardEvent, ClipboardEventInterface);\nmodule.exports = SyntheticClipboardEvent;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar SyntheticUIEvent = require('./SyntheticUIEvent');\n\n/**\n * @interface FocusEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\nvar FocusEventInterface = {\n relatedTarget: null\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticUIEvent}\n */\nfunction SyntheticFocusEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\nSyntheticUIEvent.augmentClass(SyntheticFocusEvent, FocusEventInterface);\nmodule.exports = SyntheticFocusEvent;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar SyntheticUIEvent = require('./SyntheticUIEvent');\nvar getEventCharCode = require('./getEventCharCode');\nvar getEventKey = require('./getEventKey');\nvar getEventModifierState = require('./getEventModifierState');\n\n/**\n * @interface KeyboardEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\nvar KeyboardEventInterface = {\n key: getEventKey,\n location: null,\n ctrlKey: null,\n shiftKey: null,\n altKey: null,\n metaKey: null,\n repeat: null,\n locale: null,\n getModifierState: getEventModifierState,\n // Legacy Interface\n charCode: function charCode(event) {\n // `charCode` is the result of a KeyPress event and represents the value of\n // the actual printable character.\n\n // KeyPress is deprecated, but its replacement is not yet final and not\n // implemented in any major browser. Only KeyPress has charCode.\n if (event.type === 'keypress') {\n return getEventCharCode(event);\n }\n return 0;\n },\n keyCode: function keyCode(event) {\n // `keyCode` is the result of a KeyDown/Up event and represents the value of\n // physical keyboard key.\n\n // The actual meaning of the value depends on the users' keyboard layout\n // which cannot be detected. Assuming that it is a US keyboard layout\n // provides a surprisingly accurate mapping for US and European users.\n // Due to this, it is left to the user to implement at this time.\n if (event.type === 'keydown' || event.type === 'keyup') {\n return event.keyCode;\n }\n return 0;\n },\n which: function which(event) {\n // `which` is an alias for either `keyCode` or `charCode` depending on the\n // type of the event.\n if (event.type === 'keypress') {\n return getEventCharCode(event);\n }\n if (event.type === 'keydown' || event.type === 'keyup') {\n return event.keyCode;\n }\n return 0;\n }\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticUIEvent}\n */\nfunction SyntheticKeyboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\nSyntheticUIEvent.augmentClass(SyntheticKeyboardEvent, KeyboardEventInterface);\nmodule.exports = SyntheticKeyboardEvent;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar getEventCharCode = require('./getEventCharCode');\n\n/**\n * Normalization of deprecated HTML5 `key` values\n * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names\n */\nvar normalizeKey = {\n Esc: 'Escape',\n Spacebar: ' ',\n Left: 'ArrowLeft',\n Up: 'ArrowUp',\n Right: 'ArrowRight',\n Down: 'ArrowDown',\n Del: 'Delete',\n Win: 'OS',\n Menu: 'ContextMenu',\n Apps: 'ContextMenu',\n Scroll: 'ScrollLock',\n MozPrintableKey: 'Unidentified'\n};\n\n/**\n * Translation from legacy `keyCode` to HTML5 `key`\n * Only special keys supported, all others depend on keyboard layout or browser\n * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names\n */\nvar translateToKey = {\n 8: 'Backspace',\n 9: 'Tab',\n 12: 'Clear',\n 13: 'Enter',\n 16: 'Shift',\n 17: 'Control',\n 18: 'Alt',\n 19: 'Pause',\n 20: 'CapsLock',\n 27: 'Escape',\n 32: ' ',\n 33: 'PageUp',\n 34: 'PageDown',\n 35: 'End',\n 36: 'Home',\n 37: 'ArrowLeft',\n 38: 'ArrowUp',\n 39: 'ArrowRight',\n 40: 'ArrowDown',\n 45: 'Insert',\n 46: 'Delete',\n 112: 'F1',\n 113: 'F2',\n 114: 'F3',\n 115: 'F4',\n 116: 'F5',\n 117: 'F6',\n 118: 'F7',\n 119: 'F8',\n 120: 'F9',\n 121: 'F10',\n 122: 'F11',\n 123: 'F12',\n 144: 'NumLock',\n 145: 'ScrollLock',\n 224: 'Meta'\n};\n\n/**\n * @param {object} nativeEvent Native browser event.\n * @return {string} Normalized `key` property.\n */\nfunction getEventKey(nativeEvent) {\n if (nativeEvent.key) {\n // Normalize inconsistent values reported by browsers due to\n // implementations of a working draft specification.\n\n // FireFox implements `key` but returns `MozPrintableKey` for all\n // printable characters (normalized to `Unidentified`), ignore it.\n var key = normalizeKey[nativeEvent.key] || nativeEvent.key;\n if (key !== 'Unidentified') {\n return key;\n }\n }\n\n // Browser does not implement `key`, polyfill as much of it as we can.\n if (nativeEvent.type === 'keypress') {\n var charCode = getEventCharCode(nativeEvent);\n\n // The enter-key is technically both printable and non-printable and can\n // thus be captured by `keypress`, no other non-printable key should.\n return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);\n }\n if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {\n // While user keyboard layout determines the actual meaning of each\n // `keyCode` value, almost all function keys have a universal value.\n return translateToKey[nativeEvent.keyCode] || 'Unidentified';\n }\n return '';\n}\nmodule.exports = getEventKey;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar SyntheticMouseEvent = require('./SyntheticMouseEvent');\n\n/**\n * @interface DragEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\nvar DragEventInterface = {\n dataTransfer: null\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticUIEvent}\n */\nfunction SyntheticDragEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\nSyntheticMouseEvent.augmentClass(SyntheticDragEvent, DragEventInterface);\nmodule.exports = SyntheticDragEvent;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar SyntheticUIEvent = require('./SyntheticUIEvent');\nvar getEventModifierState = require('./getEventModifierState');\n\n/**\n * @interface TouchEvent\n * @see http://www.w3.org/TR/touch-events/\n */\nvar TouchEventInterface = {\n touches: null,\n targetTouches: null,\n changedTouches: null,\n altKey: null,\n metaKey: null,\n ctrlKey: null,\n shiftKey: null,\n getModifierState: getEventModifierState\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticUIEvent}\n */\nfunction SyntheticTouchEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\nSyntheticUIEvent.augmentClass(SyntheticTouchEvent, TouchEventInterface);\nmodule.exports = SyntheticTouchEvent;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar SyntheticEvent = require('./SyntheticEvent');\n\n/**\n * @interface Event\n * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-\n * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent\n */\nvar TransitionEventInterface = {\n propertyName: null,\n elapsedTime: null,\n pseudoElement: null\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticEvent}\n */\nfunction SyntheticTransitionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\nSyntheticEvent.augmentClass(SyntheticTransitionEvent, TransitionEventInterface);\nmodule.exports = SyntheticTransitionEvent;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar SyntheticMouseEvent = require('./SyntheticMouseEvent');\n\n/**\n * @interface WheelEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\nvar WheelEventInterface = {\n deltaX: function deltaX(event) {\n return 'deltaX' in event ? event.deltaX :\n // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).\n 'wheelDeltaX' in event ? -event.wheelDeltaX : 0;\n },\n deltaY: function deltaY(event) {\n return 'deltaY' in event ? event.deltaY :\n // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).\n 'wheelDeltaY' in event ? -event.wheelDeltaY :\n // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).\n 'wheelDelta' in event ? -event.wheelDelta : 0;\n },\n deltaZ: null,\n // Browsers without \"deltaMode\" is reporting in raw wheel delta where one\n // notch on the scroll is always +/- 120, roughly equivalent to pixels.\n // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or\n // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.\n deltaMode: null\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticMouseEvent}\n */\nfunction SyntheticWheelEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\nSyntheticMouseEvent.augmentClass(SyntheticWheelEvent, WheelEventInterface);\nmodule.exports = SyntheticWheelEvent;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar ReactDOMFeatureFlags = {\n useCreateElement: true,\n useFiber: false\n};\nmodule.exports = ReactDOMFeatureFlags;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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 */\n\n'use strict';\n\nvar MOD = 65521;\n\n// adler32 is not cryptographically strong, and is only used to sanity check that\n// markup generated on the server matches the markup generated on the client.\n// This implementation (a modified version of the SheetJS version) has been optimized\n// for our use case, at the expense of conforming to the adler32 specification\n// for non-ascii inputs.\nfunction adler32(data) {\n var a = 1;\n var b = 0;\n var i = 0;\n var l = data.length;\n var m = l & ~0x3;\n while (i < m) {\n var n = Math.min(i + 4096, m);\n for (; i < n; i += 4) {\n b += (a += data.charCodeAt(i)) + (a += data.charCodeAt(i + 1)) + (a += data.charCodeAt(i + 2)) + (a += data.charCodeAt(i + 3));\n }\n a %= MOD;\n b %= MOD;\n }\n for (; i < l; i++) {\n b += a += data.charCodeAt(i);\n }\n a %= MOD;\n b %= MOD;\n return a | b << 16;\n}\nmodule.exports = adler32;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\nvar ReactCurrentOwner = require('react/lib/ReactCurrentOwner');\nvar ReactDOMComponentTree = require('./ReactDOMComponentTree');\nvar ReactInstanceMap = require('./ReactInstanceMap');\nvar getHostComponentFromComposite = require('./getHostComponentFromComposite');\nvar invariant = require('fbjs/lib/invariant');\nvar warning = require('fbjs/lib/warning');\n\n/**\n * Returns the DOM node rendered by this element.\n *\n * See https://facebook.github.io/react/docs/top-level-api.html#reactdom.finddomnode\n *\n * @param {ReactComponent|DOMElement} componentOrElement\n * @return {?DOMElement} The root node of this element.\n */\nfunction findDOMNode(componentOrElement) {\n if (process.env.NODE_ENV !== 'production') {\n var owner = ReactCurrentOwner.current;\n if (owner !== null) {\n process.env.NODE_ENV !== 'production' ? warning(owner._warnedAboutRefsInRender, '%s is accessing findDOMNode inside its render(). ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', owner.getName() || 'A component') : void 0;\n owner._warnedAboutRefsInRender = true;\n }\n }\n if (componentOrElement == null) {\n return null;\n }\n if (componentOrElement.nodeType === 1) {\n return componentOrElement;\n }\n var inst = ReactInstanceMap.get(componentOrElement);\n if (inst) {\n inst = getHostComponentFromComposite(inst);\n return inst ? ReactDOMComponentTree.getNodeFromInstance(inst) : null;\n }\n if (typeof componentOrElement.render === 'function') {\n !false ? process.env.NODE_ENV !== 'production' ? invariant(false, 'findDOMNode was called on an unmounted component.') : _prodInvariant('44') : void 0;\n } else {\n !false ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Element appears to be neither ReactComponent nor DOMNode (keys: %s)', Object.keys(componentOrElement)) : _prodInvariant('45', Object.keys(componentOrElement)) : void 0;\n }\n}\nmodule.exports = findDOMNode;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar ReactMount = require('./ReactMount');\nmodule.exports = ReactMount.renderSubtreeIntoContainer;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\nmodule.exports = function () {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types');\n err.name = 'Invariant Violation';\n throw err;\n }\n ;\n shim.isRequired = shim;\n function getShim() {\n return shim;\n }\n ;\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n ReactPropTypes.PropTypes = ReactPropTypes;\n return ReactPropTypes;\n};","'use strict';\n\nfunction _typeof2(o) { \"@babel/helpers - typeof\"; return _typeof2 = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof2(o); }\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n};\nvar _typeof = typeof Symbol === \"function\" && _typeof2(Symbol.iterator) === \"symbol\" ? function (obj) {\n return _typeof2(obj);\n} : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : _typeof2(obj);\n};\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nvar _react = require('react');\nvar _react2 = _interopRequireDefault(_react);\nvar _propTypes = require('prop-types');\nvar _focusManager = require('../helpers/focusManager');\nvar focusManager = _interopRequireWildcard(_focusManager);\nvar _scopeTab = require('../helpers/scopeTab');\nvar _scopeTab2 = _interopRequireDefault(_scopeTab);\nvar _ariaAppHider = require('../helpers/ariaAppHider');\nvar ariaAppHider = _interopRequireWildcard(_ariaAppHider);\nvar _refCount = require('../helpers/refCount');\nvar refCount = _interopRequireWildcard(_refCount);\nvar _bodyClassList = require('../helpers/bodyClassList');\nvar bodyClassList = _interopRequireWildcard(_bodyClassList);\nvar _safeHTMLElement = require('../helpers/safeHTMLElement');\nvar _safeHTMLElement2 = _interopRequireDefault(_safeHTMLElement);\nfunction _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];\n }\n }\n newObj[\"default\"] = obj;\n return newObj;\n }\n}\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nfunction _possibleConstructorReturn(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return call && (_typeof2(call) === \"object\" || typeof call === \"function\") ? call : self;\n}\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + _typeof2(superClass));\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n}\n\n// so that our CSS is statically analyzable\nvar CLASS_NAMES = {\n overlay: 'ReactModal__Overlay',\n content: 'ReactModal__Content'\n};\nvar TAB_KEY = 9;\nvar ESC_KEY = 27;\nvar ModalPortal = function (_Component) {\n _inherits(ModalPortal, _Component);\n function ModalPortal(props) {\n _classCallCheck(this, ModalPortal);\n var _this = _possibleConstructorReturn(this, (ModalPortal.__proto__ || Object.getPrototypeOf(ModalPortal)).call(this, props));\n _this.setFocusAfterRender = function (focus) {\n _this.focusAfterRender = _this.props.shouldFocusAfterRender && focus;\n };\n _this.setOverlayRef = function (overlay) {\n _this.overlay = overlay;\n };\n _this.setContentRef = function (content) {\n _this.content = content;\n };\n _this.afterClose = function () {\n focusManager.returnFocus();\n focusManager.teardownScopedFocus();\n };\n _this.open = function () {\n _this.beforeOpen();\n if (_this.state.afterOpen && _this.state.beforeClose) {\n clearTimeout(_this.closeTimer);\n _this.setState({\n beforeClose: false\n });\n } else {\n focusManager.setupScopedFocus(_this.node);\n focusManager.markForFocusLater();\n _this.setState({\n isOpen: true\n }, function () {\n _this.setState({\n afterOpen: true\n });\n if (_this.props.isOpen && _this.props.onAfterOpen) {\n _this.props.onAfterOpen();\n }\n });\n }\n };\n _this.close = function () {\n _this.beforeClose();\n if (_this.props.closeTimeoutMS > 0) {\n _this.closeWithTimeout();\n } else {\n _this.closeWithoutTimeout();\n }\n };\n _this.focusContent = function () {\n return _this.content && !_this.contentHasFocus() && _this.content.focus();\n };\n _this.closeWithTimeout = function () {\n var closesAt = Date.now() + _this.props.closeTimeoutMS;\n _this.setState({\n beforeClose: true,\n closesAt: closesAt\n }, function () {\n _this.closeTimer = setTimeout(_this.closeWithoutTimeout, _this.state.closesAt - Date.now());\n });\n };\n _this.closeWithoutTimeout = function () {\n _this.setState({\n beforeClose: false,\n isOpen: false,\n afterOpen: false,\n closesAt: null\n }, _this.afterClose);\n };\n _this.handleKeyDown = function (event) {\n if (event.keyCode === TAB_KEY) {\n (0, _scopeTab2[\"default\"])(_this.content, event);\n }\n if (event.keyCode === ESC_KEY) {\n event.preventDefault();\n _this.requestClose(event);\n }\n };\n _this.handleOverlayOnClick = function (event) {\n if (_this.shouldClose === null) {\n _this.shouldClose = true;\n }\n if (_this.shouldClose && _this.props.shouldCloseOnOverlayClick) {\n if (_this.ownerHandlesClose()) {\n _this.requestClose(event);\n } else {\n _this.focusContent();\n }\n }\n _this.shouldClose = null;\n _this.moveFromContentToOverlay = null;\n };\n _this.handleOverlayOnMouseUp = function () {\n if (_this.moveFromContentToOverlay === null) {\n _this.shouldClose = false;\n }\n };\n _this.handleContentOnMouseUp = function () {\n _this.shouldClose = false;\n };\n _this.handleOverlayOnMouseDown = function () {\n _this.moveFromContentToOverlay = false;\n };\n _this.handleContentOnClick = function () {\n _this.shouldClose = false;\n };\n _this.handleContentOnMouseDown = function () {\n _this.shouldClose = false;\n _this.moveFromContentToOverlay = false;\n };\n _this.requestClose = function (event) {\n return _this.ownerHandlesClose() && _this.props.onRequestClose(event);\n };\n _this.ownerHandlesClose = function () {\n return _this.props.onRequestClose;\n };\n _this.shouldBeClosed = function () {\n return !_this.state.isOpen && !_this.state.beforeClose;\n };\n _this.contentHasFocus = function () {\n return document.activeElement === _this.content || _this.content.contains(document.activeElement);\n };\n _this.buildClassName = function (which, additional) {\n var classNames = (typeof additional === 'undefined' ? 'undefined' : _typeof(additional)) === 'object' ? additional : {\n base: CLASS_NAMES[which],\n afterOpen: CLASS_NAMES[which] + '--after-open',\n beforeClose: CLASS_NAMES[which] + '--before-close'\n };\n var className = classNames.base;\n if (_this.state.afterOpen) {\n className = className + ' ' + classNames.afterOpen;\n }\n if (_this.state.beforeClose) {\n className = className + ' ' + classNames.beforeClose;\n }\n return typeof additional === 'string' && additional ? className + ' ' + additional : className;\n };\n _this.ariaAttributes = function (items) {\n return Object.keys(items).reduce(function (acc, name) {\n acc['aria-' + name] = items[name];\n return acc;\n }, {});\n };\n _this.state = {\n afterOpen: false,\n beforeClose: false\n };\n _this.shouldClose = null;\n _this.moveFromContentToOverlay = null;\n return _this;\n }\n _createClass(ModalPortal, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n // Focus needs to be set when mounting and already open\n if (this.props.isOpen) {\n this.setFocusAfterRender(true);\n this.open();\n }\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(newProps) {\n if (process.env.NODE_ENV !== \"production\") {\n if (newProps.bodyOpenClassName !== this.props.bodyOpenClassName) {\n // eslint-disable-next-line no-console\n console.warn('React-Modal: \"bodyOpenClassName\" prop has been modified. ' + 'This may cause unexpected behavior when multiple modals are open.');\n }\n }\n // Focus only needs to be set once when the modal is being opened\n if (!this.props.isOpen && newProps.isOpen) {\n this.setFocusAfterRender(true);\n this.open();\n } else if (this.props.isOpen && !newProps.isOpen) {\n this.close();\n }\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate() {\n if (this.focusAfterRender) {\n this.focusContent();\n this.setFocusAfterRender(false);\n }\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n this.beforeClose();\n clearTimeout(this.closeTimer);\n }\n }, {\n key: 'beforeOpen',\n value: function beforeOpen() {\n var _props = this.props,\n appElement = _props.appElement,\n ariaHideApp = _props.ariaHideApp,\n bodyOpenClassName = _props.bodyOpenClassName;\n // Add body class\n\n bodyClassList.add(bodyOpenClassName);\n // Add aria-hidden to appElement\n if (ariaHideApp) {\n ariaAppHider.hide(appElement);\n }\n }\n }, {\n key: 'beforeClose',\n value: function beforeClose() {\n var _props2 = this.props,\n appElement = _props2.appElement,\n ariaHideApp = _props2.ariaHideApp,\n bodyOpenClassName = _props2.bodyOpenClassName;\n // Remove class if no more modals are open\n\n bodyClassList.remove(bodyOpenClassName);\n // Reset aria-hidden attribute if all modals have been removed\n if (ariaHideApp && refCount.totalCount() < 1) {\n ariaAppHider.show(appElement);\n }\n }\n\n // Don't steal focus from inner elements\n }, {\n key: 'render',\n value: function render() {\n var _props3 = this.props,\n className = _props3.className,\n overlayClassName = _props3.overlayClassName,\n defaultStyles = _props3.defaultStyles;\n var contentStyles = className ? {} : defaultStyles.content;\n var overlayStyles = overlayClassName ? {} : defaultStyles.overlay;\n return this.shouldBeClosed() ? null : _react2[\"default\"].createElement('div', {\n ref: this.setOverlayRef,\n className: this.buildClassName('overlay', overlayClassName),\n style: _extends({}, overlayStyles, this.props.style.overlay),\n onClick: this.handleOverlayOnClick,\n onMouseDown: this.handleOverlayOnMouseDown,\n onMouseUp: this.handleOverlayOnMouseUp\n }, _react2[\"default\"].createElement('div', _extends({\n ref: this.setContentRef,\n style: _extends({}, contentStyles, this.props.style.content),\n className: this.buildClassName('content', className),\n tabIndex: '-1',\n onKeyDown: this.handleKeyDown,\n onMouseDown: this.handleContentOnMouseDown,\n onMouseUp: this.handleContentOnMouseUp,\n onClick: this.handleContentOnClick,\n role: this.props.role,\n 'aria-label': this.props.contentLabel\n }, this.ariaAttributes(this.props.aria || {})), this.props.children));\n }\n }]);\n return ModalPortal;\n}(_react.Component);\nModalPortal.defaultProps = {\n style: {\n overlay: {},\n content: {}\n }\n};\nModalPortal.propTypes = {\n isOpen: _propTypes.PropTypes.bool.isRequired,\n defaultStyles: _propTypes.PropTypes.shape({\n content: _propTypes.PropTypes.object,\n overlay: _propTypes.PropTypes.object\n }),\n style: _propTypes.PropTypes.shape({\n content: _propTypes.PropTypes.object,\n overlay: _propTypes.PropTypes.object\n }),\n className: _propTypes.PropTypes.oneOfType([_propTypes.PropTypes.string, _propTypes.PropTypes.object]),\n overlayClassName: _propTypes.PropTypes.oneOfType([_propTypes.PropTypes.string, _propTypes.PropTypes.object]),\n bodyOpenClassName: _propTypes.PropTypes.string,\n ariaHideApp: _propTypes.PropTypes.bool,\n appElement: _propTypes.PropTypes.instanceOf(_safeHTMLElement2[\"default\"]),\n onAfterOpen: _propTypes.PropTypes.func,\n onRequestClose: _propTypes.PropTypes.func,\n closeTimeoutMS: _propTypes.PropTypes.number,\n shouldFocusAfterRender: _propTypes.PropTypes.bool,\n shouldCloseOnOverlayClick: _propTypes.PropTypes.bool,\n role: _propTypes.PropTypes.string,\n contentLabel: _propTypes.PropTypes.string,\n aria: _propTypes.PropTypes.object,\n children: _propTypes.PropTypes.node\n};\nexports[\"default\"] = ModalPortal;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.handleBlur = handleBlur;\nexports.handleFocus = handleFocus;\nexports.markForFocusLater = markForFocusLater;\nexports.returnFocus = returnFocus;\nexports.setupScopedFocus = setupScopedFocus;\nexports.teardownScopedFocus = teardownScopedFocus;\nvar _tabbable = require('../helpers/tabbable');\nvar _tabbable2 = _interopRequireDefault(_tabbable);\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\nvar focusLaterElements = [];\nvar modalElement = null;\nvar needToFocus = false;\nfunction handleBlur() {\n needToFocus = true;\n}\nfunction handleFocus() {\n if (needToFocus) {\n needToFocus = false;\n if (!modalElement) {\n return;\n }\n // need to see how jQuery shims document.on('focusin') so we don't need the\n // setTimeout, firefox doesn't support focusin, if it did, we could focus\n // the element outside of a setTimeout. Side-effect of this implementation\n // is that the document.body gets focus, and then we focus our element right\n // after, seems fine.\n setTimeout(function () {\n if (modalElement.contains(document.activeElement)) {\n return;\n }\n var el = (0, _tabbable2[\"default\"])(modalElement)[0] || modalElement;\n el.focus();\n }, 0);\n }\n}\nfunction markForFocusLater() {\n focusLaterElements.push(document.activeElement);\n}\n\n/* eslint-disable no-console */\nfunction returnFocus() {\n var toFocus = null;\n try {\n toFocus = focusLaterElements.pop();\n toFocus.focus();\n return;\n } catch (e) {\n console.warn(['You tried to return focus to', toFocus, 'but it is not in the DOM anymore'].join(\" \"));\n }\n}\n/* eslint-enable no-console */\n\nfunction setupScopedFocus(element) {\n modalElement = element;\n if (window.addEventListener) {\n window.addEventListener('blur', handleBlur, false);\n document.addEventListener('focus', handleFocus, true);\n } else {\n window.attachEvent('onBlur', handleBlur);\n document.attachEvent('onFocus', handleFocus);\n }\n}\nfunction teardownScopedFocus() {\n modalElement = null;\n if (window.addEventListener) {\n window.removeEventListener('blur', handleBlur);\n document.removeEventListener('focus', handleFocus);\n } else {\n window.detachEvent('onBlur', handleBlur);\n document.detachEvent('onFocus', handleFocus);\n }\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = scopeTab;\nvar _tabbable = require('./tabbable');\nvar _tabbable2 = _interopRequireDefault(_tabbable);\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\nfunction scopeTab(node, event) {\n var tabbable = (0, _tabbable2[\"default\"])(node);\n if (!tabbable.length) {\n event.preventDefault();\n return;\n }\n var finalTabbable = tabbable[event.shiftKey ? 0 : tabbable.length - 1];\n var leavingFinalTabbable = finalTabbable === document.activeElement ||\n // handle immediate shift+tab after opening with mouse\n node === document.activeElement;\n if (!leavingFinalTabbable) return;\n event.preventDefault();\n var target = tabbable[event.shiftKey ? tabbable.length - 1 : 0];\n target.focus();\n}\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.add = add;\nexports.remove = remove;\nvar _refCount = require('./refCount');\nvar refCount = _interopRequireWildcard(_refCount);\nfunction _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];\n }\n }\n newObj[\"default\"] = obj;\n return newObj;\n }\n}\nfunction add(bodyClass) {\n // Increment class(es) on refCount tracker and add class(es) to body\n bodyClass.split(' ').map(refCount.add).forEach(function (className) {\n return document.body.classList.add(className);\n });\n}\nfunction remove(bodyClass) {\n var classListMap = refCount.get();\n // Decrement class(es) from the refCount tracker\n // and remove unused class(es) from body\n bodyClass.split(' ').map(refCount.remove).filter(function (className) {\n return classListMap[className] === 0;\n }).forEach(function (className) {\n return document.body.classList.remove(className);\n });\n}","function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n/*!\n Copyright (c) 2015 Jed Watson.\n Based on code that is Copyright 2013-2015, Facebook, Inc.\n All rights reserved.\n*/\n/* global define */\n\n(function () {\n 'use strict';\n\n var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n var ExecutionEnvironment = {\n canUseDOM: canUseDOM,\n canUseWorkers: typeof Worker !== 'undefined',\n canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent),\n canUseViewport: canUseDOM && !!window.screen\n };\n if (typeof define === 'function' && _typeof(define.amd) === 'object' && define.amd) {\n define(function () {\n return ExecutionEnvironment;\n });\n } else if (typeof module !== 'undefined' && module.exports) {\n module.exports = ExecutionEnvironment;\n } else {\n window.ExecutionEnvironment = ExecutionEnvironment;\n }\n})();","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = defaultFormatter;\nfunction defaultFormatter(value, unit, suffix) {\n if (value !== 1) {\n unit += 's';\n }\n return value + ' ' + unit + ' ' + suffix;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = dateParser;\nfunction _toConsumableArray(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n return arr2;\n } else {\n return Array.from(arr);\n }\n}\nfunction _toArray(arr) {\n return Array.isArray(arr) ? arr : Array.from(arr);\n}\nfunction dateParser(date) {\n var parsed = new Date(date);\n if (!Number.isNaN(parsed.valueOf())) {\n return parsed;\n }\n var parts = String(date).match(/\\d+/g);\n if (parts == null || parts.length <= 2) {\n return parsed;\n } else {\n var _parts$map = parts.map(function (x) {\n return parseInt(x);\n }),\n _parts$map2 = _toArray(_parts$map),\n firstP = _parts$map2[0],\n secondP = _parts$map2[1],\n restPs = _parts$map2.slice(2);\n var correctedParts = [firstP, secondP - 1].concat(_toConsumableArray(restPs));\n var isoDate = new Date(Date.UTC.apply(Date, _toConsumableArray(correctedParts)));\n return isoDate;\n }\n}","function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nvar React = require(\"react\");\nvar ReactDOM = require(\"react-dom\");\nvar ReactDOMServer = require(\"react-dom/server\");\nvar _detectEvents = require(\"./src/events/detect\");\nvar constructorFromGlobal = require(\"./src/getConstructor/fromGlobal\");\nvar constructorFromRequireContext = require(\"./src/getConstructor/fromRequireContext\");\nvar constructorFromRequireContextWithGlobalFallback = require(\"./src/getConstructor/fromRequireContextWithGlobalFallback\");\nvar constructorFromRequireContextsWithGlobalFallback = require(\"./src/getConstructor/fromRequireContextsWithGlobalFallback\");\nvar _require = require(\"./src/renderHelpers\"),\n supportsHydration = _require.supportsHydration,\n reactHydrate = _require.reactHydrate,\n createReactRootLike = _require.createReactRootLike;\nvar ReactRailsUJS = {\n // This attribute holds the name of component which should be mounted\n // example: `data-react-class=\"MyApp.Items.EditForm\"`\n CLASS_NAME_ATTR: 'data-react-class',\n // This attribute holds JSON stringified props for initializing the component\n // example: `data-react-props=\"{\\\"item\\\": { \\\"id\\\": 1, \\\"name\\\": \\\"My Item\\\"} }\"`\n PROPS_ATTR: 'data-react-props',\n // This attribute holds which method to use between: ReactDOM.hydrate, ReactDOM.render\n RENDER_ATTR: 'data-hydrate',\n // A unique identifier to identify a node\n CACHE_ID_ATTR: \"data-react-cache-id\",\n TURBOLINKS_PERMANENT_ATTR: \"data-turbolinks-permanent\",\n // If jQuery is detected, save a reference to it for event handlers\n jQuery: typeof window !== 'undefined' && typeof window.jQuery !== 'undefined' && window.jQuery,\n components: {},\n // helper method for the mount and unmount methods to find the\n // `data-react-class` DOM elements\n findDOMNodes: function findDOMNodes(searchSelector) {\n var classNameAttr = ReactRailsUJS.CLASS_NAME_ATTR;\n // we will use fully qualified paths as we do not bind the callbacks\n var selector, parent;\n switch (_typeof(searchSelector)) {\n case 'undefined':\n selector = '[' + classNameAttr + ']';\n parent = document;\n break;\n case 'object':\n selector = '[' + classNameAttr + ']';\n parent = searchSelector;\n break;\n case 'string':\n selector = searchSelector + '[' + classNameAttr + '], ' + searchSelector + ' [' + classNameAttr + ']';\n parent = document;\n break;\n default:\n break;\n }\n if (ReactRailsUJS.jQuery) {\n return ReactRailsUJS.jQuery(selector, parent);\n } else {\n return parent.querySelectorAll(selector);\n }\n },\n // Get the constructor for a className (returns a React class)\n // Override this function to lookup classes in a custom way,\n // the default is ReactRailsUJS.ComponentGlobal\n getConstructor: constructorFromGlobal,\n // Available for customizing `getConstructor`\n constructorFromGlobal: constructorFromGlobal,\n constructorFromRequireContext: constructorFromRequireContext,\n constructorFromRequireContextWithGlobalFallback: constructorFromRequireContextWithGlobalFallback,\n // Given a Webpack `require.context`,\n // try finding components with `require`,\n // then falling back to global lookup.\n useContext: function useContext(requireContext) {\n this.getConstructor = constructorFromRequireContextWithGlobalFallback(requireContext);\n },\n // Given an array of Webpack `require.context`,\n // try finding components with `require`,\n // then falling back to global lookup.\n useContexts: function useContexts(requireContexts) {\n this.getConstructor = constructorFromRequireContextsWithGlobalFallback(requireContexts);\n },\n // Render `componentName` with `props` to a string,\n // using the specified `renderFunction` from `react-dom/server`.\n serverRender: function serverRender(renderFunction, componentName, props) {\n var componentClass = this.getConstructor(componentName);\n var element = React.createElement(componentClass, props);\n return ReactDOMServer[renderFunction](element);\n },\n // Within `searchSelector`, find nodes which should have React components\n // inside them, and mount them with their props.\n mountComponents: function mountComponents(searchSelector) {\n var ujs = ReactRailsUJS;\n var nodes = ujs.findDOMNodes(searchSelector);\n for (var i = 0; i < nodes.length; ++i) {\n var node = nodes[i];\n var className = node.getAttribute(ujs.CLASS_NAME_ATTR);\n var constructor = ujs.getConstructor(className);\n var propsJson = node.getAttribute(ujs.PROPS_ATTR);\n var props = propsJson && JSON.parse(propsJson);\n var hydrate = node.getAttribute(ujs.RENDER_ATTR);\n var cacheId = node.getAttribute(ujs.CACHE_ID_ATTR);\n var turbolinksPermanent = node.hasAttribute(ujs.TURBOLINKS_PERMANENT_ATTR);\n if (!constructor) {\n var message = \"Cannot find component: '\" + className + \"'\";\n if (console && console.log) {\n console.log(\"%c[react-rails] %c\" + message + \" for element\", \"font-weight: bold\", \"\", node);\n }\n throw new Error(message + \". Make sure your component is available to render.\");\n } else {\n var component = this.components[cacheId];\n if (component === undefined) {\n component = React.createElement(constructor, props);\n if (turbolinksPermanent) {\n this.components[cacheId] = component;\n }\n }\n if (hydrate && supportsHydration()) {\n component = reactHydrate(node, component);\n } else {\n var root = createReactRootLike(node);\n component = root.render(component);\n }\n }\n }\n },\n // Within `searchSelector`, find nodes which have React components\n // inside them, and unmount those components.\n unmountComponents: function unmountComponents(searchSelector) {\n var nodes = ReactRailsUJS.findDOMNodes(searchSelector);\n for (var i = 0; i < nodes.length; ++i) {\n var node = nodes[i];\n ReactDOM.unmountComponentAtNode(node);\n }\n },\n // Check the global context for installed libraries\n // and figure out which library to hook up to (pjax, Turbolinks, jQuery)\n // This is called on load, but you can call it again if needed\n // (It will unmount itself)\n detectEvents: function detectEvents() {\n _detectEvents(this);\n }\n};\n\n// These stable references are so that handlers can be added and removed:\nReactRailsUJS.handleMount = function (e) {\n var target = undefined;\n if (e && e.target) {\n target = e.target;\n }\n ReactRailsUJS.mountComponents(target);\n};\nReactRailsUJS.handleUnmount = function (e) {\n var target = undefined;\n if (e && e.target) {\n target = e.target;\n }\n ReactRailsUJS.unmountComponents(target);\n};\nif (typeof window !== \"undefined\") {\n // Only setup events for browser (not server-rendering)\n ReactRailsUJS.detectEvents();\n}\n\n// It's a bit of a no-no to populate the global namespace,\n// but we really need it!\n// We need access to this object for server rendering, and\n// we can't do a dynamic `require`, so we'll grab it from here:\nself.ReactRailsUJS = ReactRailsUJS;\nmodule.exports = ReactRailsUJS;","'use strict';\n\nmodule.exports = require('./lib/ReactDOMServer');","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\n'use strict';\n\nvar ReactDefaultInjection = require('./ReactDefaultInjection');\nvar ReactServerRendering = require('./ReactServerRendering');\nvar ReactVersion = require('./ReactVersion');\nReactDefaultInjection.inject();\nvar ReactDOMServer = {\n renderToString: ReactServerRendering.renderToString,\n renderToStaticMarkup: ReactServerRendering.renderToStaticMarkup,\n version: ReactVersion\n};\nmodule.exports = ReactDOMServer;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\nvar _prodInvariant = require('./reactProdInvariant');\nvar React = require('react/lib/React');\nvar ReactDOMContainerInfo = require('./ReactDOMContainerInfo');\nvar ReactDefaultBatchingStrategy = require('./ReactDefaultBatchingStrategy');\nvar ReactInstrumentation = require('./ReactInstrumentation');\nvar ReactMarkupChecksum = require('./ReactMarkupChecksum');\nvar ReactReconciler = require('./ReactReconciler');\nvar ReactServerBatchingStrategy = require('./ReactServerBatchingStrategy');\nvar ReactServerRenderingTransaction = require('./ReactServerRenderingTransaction');\nvar ReactUpdates = require('./ReactUpdates');\nvar emptyObject = require('fbjs/lib/emptyObject');\nvar instantiateReactComponent = require('./instantiateReactComponent');\nvar invariant = require('fbjs/lib/invariant');\nvar pendingTransactions = 0;\n\n/**\n * @param {ReactElement} element\n * @return {string} the HTML markup\n */\nfunction renderToStringImpl(element, makeStaticMarkup) {\n var transaction;\n try {\n ReactUpdates.injection.injectBatchingStrategy(ReactServerBatchingStrategy);\n transaction = ReactServerRenderingTransaction.getPooled(makeStaticMarkup);\n pendingTransactions++;\n return transaction.perform(function () {\n var componentInstance = instantiateReactComponent(element, true);\n var markup = ReactReconciler.mountComponent(componentInstance, transaction, null, ReactDOMContainerInfo(), emptyObject, 0 /* parentDebugID */);\n if (process.env.NODE_ENV !== 'production') {\n ReactInstrumentation.debugTool.onUnmountComponent(componentInstance._debugID);\n }\n if (!makeStaticMarkup) {\n markup = ReactMarkupChecksum.addChecksumToMarkup(markup);\n }\n return markup;\n }, null);\n } finally {\n pendingTransactions--;\n ReactServerRenderingTransaction.release(transaction);\n // Revert to the DOM batching strategy since these two renderers\n // currently share these stateful modules.\n if (!pendingTransactions) {\n ReactUpdates.injection.injectBatchingStrategy(ReactDefaultBatchingStrategy);\n }\n }\n}\n\n/**\n * Render a ReactElement to its initial HTML. This should only be used on the\n * server.\n * See https://facebook.github.io/react/docs/top-level-api.html#reactdomserver.rendertostring\n */\nfunction renderToString(element) {\n !React.isValidElement(element) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'renderToString(): You must pass a valid ReactElement.') : _prodInvariant('46') : void 0;\n return renderToStringImpl(element, false);\n}\n\n/**\n * Similar to renderToString, except this doesn't create extra DOM attributes\n * such as data-react-id that React uses internally.\n * See https://facebook.github.io/react/docs/top-level-api.html#reactdomserver.rendertostaticmarkup\n */\nfunction renderToStaticMarkup(element) {\n !React.isValidElement(element) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'renderToStaticMarkup(): You must pass a valid ReactElement.') : _prodInvariant('47') : void 0;\n return renderToStringImpl(element, true);\n}\nmodule.exports = {\n renderToString: renderToString,\n renderToStaticMarkup: renderToStaticMarkup\n};","/**\n * Copyright (c) 2014-present, Facebook, Inc.\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\n'use strict';\n\nvar ReactServerBatchingStrategy = {\n isBatchingUpdates: false,\n batchedUpdates: function batchedUpdates(callback) {\n // Don't do anything here. During the server rendering we don't want to\n // schedule any updates. We will simply ignore them.\n }\n};\nmodule.exports = ReactServerBatchingStrategy;","var nativeEvents = require(\"./native\");\nvar pjaxEvents = require(\"./pjax\");\nvar turbolinksEvents = require(\"./turbolinks\");\nvar turbolinksClassicDeprecatedEvents = require(\"./turbolinksClassicDeprecated\");\nvar turbolinksClassicEvents = require(\"./turbolinksClassic\");\n\n// see what things are globally available\n// and setup event handlers to those things\nmodule.exports = function (ujs) {\n if (ujs.handleEvent) {\n // We're calling this a second time -- remove previous handlers\n if (typeof Turbolinks !== \"undefined\" && typeof Turbolinks.EVENTS !== \"undefined\") {\n turbolinksClassicEvents.teardown(ujs);\n }\n turbolinksEvents.teardown(ujs);\n turbolinksClassicDeprecatedEvents.teardown(ujs);\n pjaxEvents.teardown(ujs);\n nativeEvents.teardown(ujs);\n }\n if ('addEventListener' in window) {\n ujs.handleEvent = function (eventName, callback) {\n document.addEventListener(eventName, callback);\n };\n ujs.removeEvent = function (eventName, callback) {\n document.removeEventListener(eventName, callback);\n };\n } else {\n ujs.handleEvent = function (eventName, callback) {\n window.attachEvent(eventName, callback);\n };\n ujs.removeEvent = function (eventName, callback) {\n window.detachEvent(eventName, callback);\n };\n }\n\n // Detect which kind of events to set up:\n if (typeof Turbolinks !== 'undefined' && Turbolinks.supported) {\n if (typeof Turbolinks.EVENTS !== 'undefined') {\n // Turbolinks.EVENTS is in classic version 2.4.0+\n turbolinksClassicEvents.setup(ujs);\n } else if (typeof Turbolinks.controller !== \"undefined\") {\n // Turbolinks.controller is in version 5+\n turbolinksEvents.setup(ujs);\n } else {\n turbolinksClassicDeprecatedEvents.setup(ujs);\n }\n } else if (typeof $ !== \"undefined\" && typeof $.pjax === 'function') {\n pjaxEvents.setup(ujs);\n } else {\n nativeEvents.setup(ujs);\n }\n};","module.exports = {\n // Attach handlers to browser events to mount\n // (There are no unmount handlers since the page is destroyed on navigation)\n setup: function setup(ujs) {\n if ('addEventListener' in window) {\n ujs.handleEvent('DOMContentLoaded', ujs.handleMount);\n } else {\n // add support to IE8 without jQuery\n ujs.handleEvent('onload', ujs.handleMount);\n }\n },\n teardown: function teardown(ujs) {\n ujs.removeEvent('DOMContentLoaded', ujs.handleMount);\n ujs.removeEvent('onload', ujs.handleMount);\n }\n};","module.exports = {\n // pjax support\n setup: function setup(ujs) {\n ujs.handleEvent('ready', ujs.handleMount);\n ujs.handleEvent('pjax:end', ujs.handleMount);\n ujs.handleEvent('pjax:beforeReplace', ujs.handleUnmount);\n },\n teardown: function teardown(ujs) {\n ujs.removeEvent('ready', ujs.handleMount);\n ujs.removeEvent('pjax:end', ujs.handleMount);\n ujs.removeEvent('pjax:beforeReplace', ujs.handleUnmount);\n }\n};","module.exports = {\n // Turbolinks 5+ got rid of named events (?!)\n setup: function setup(ujs) {\n ujs.handleEvent('turbolinks:load', ujs.handleMount);\n },\n teardown: function teardown(ujs) {\n ujs.removeEvent('turbolinks:load', ujs.handleMount);\n }\n};","module.exports = {\n // Before Turbolinks 2.4.0, Turbolinks didn't\n // have named events and didn't have a before-unload event.\n // Also, it didn't work with the Turbolinks cache, see\n // https://github.com/reactjs/react-rails/issues/87\n setup: function setup(ujs) {\n Turbolinks.pagesCached(0);\n ujs.handleEvent('page:change', ujs.handleMount);\n ujs.handleEvent('page:receive', ujs.handleUnmount);\n },\n teardown: function teardown(ujs) {\n ujs.removeEvent('page:change', ujs.handleMount);\n ujs.removeEvent('page:receive', ujs.handleUnmount);\n }\n};","module.exports = {\n // Attach handlers to Turbolinks-Classic events\n // for mounting and unmounting components\n setup: function setup(ujs) {\n ujs.handleEvent(Turbolinks.EVENTS.CHANGE, ujs.handleMount);\n ujs.handleEvent(Turbolinks.EVENTS.BEFORE_UNLOAD, ujs.handleUnmount);\n },\n teardown: function teardown(ujs) {\n ujs.removeEvent(Turbolinks.EVENTS.CHANGE, ujs.handleMount);\n ujs.removeEvent(Turbolinks.EVENTS.BEFORE_UNLOAD, ujs.handleUnmount);\n }\n};","// Make a function which:\n// - First tries to require the name\n// - Then falls back to global lookup\nvar fromGlobal = require(\"./fromGlobal\");\nvar fromRequireContext = require(\"./fromRequireContext\");\nmodule.exports = function (reqctx) {\n var fromCtx = fromRequireContext(reqctx);\n return function (className) {\n var component;\n try {\n // `require` will raise an error if this className isn't found:\n component = fromCtx(className);\n } catch (firstErr) {\n // fallback to global:\n try {\n component = fromGlobal(className);\n } catch (secondErr) {\n console.error(firstErr);\n console.error(secondErr);\n }\n }\n return component;\n };\n};","// Make a function which:\n// - First tries to require the name\n// - Then falls back to global lookup\nvar fromGlobal = require(\"./fromGlobal\");\nvar fromRequireContext = require(\"./fromRequireContext\");\nmodule.exports = function (reqctxs) {\n var fromCtxs = reqctxs.map(function (reqctx) {\n return fromRequireContext(reqctx);\n });\n return function (className) {\n var component;\n try {\n var index = 0,\n fromCtx,\n firstErr;\n do {\n fromCtx = fromCtxs[index];\n try {\n // `require` will raise an error if this className isn't found:\n component = fromCtx(className);\n } catch (fromCtxErr) {\n if (!firstErr) {\n firstErr = fromCtxErr;\n }\n }\n index += 1;\n } while (index < fromCtxs.length);\n if (!component) throw firstErr;\n } catch (firstErr) {\n // fallback to global:\n try {\n component = fromGlobal(className);\n } catch (secondErr) {\n console.error(firstErr);\n console.error(secondErr);\n }\n }\n return component;\n };\n};","module.exports = __webpack_public_path__ + \"media/images/create-album-ac4d58eab8ec3dd22ba2ccd9661a67ca.png\";","module.exports = __webpack_public_path__ + \"media/images/devices-icon-357c6ae91d93826610ca9e1b934ce5b3.png\";","module.exports = __webpack_public_path__ + \"media/images/done-fc18931885026e379f2ef8ff6fe46a34.png\";","module.exports = __webpack_public_path__ + \"media/images/family-photo-icon-2015c3b27ce3ab0533d5460ecfa353a3.png\";","module.exports = __webpack_public_path__ + \"media/images/homepage-hero-950-a8521c47fda8ba45c769bd59b01f6d27.png\";","module.exports = __webpack_public_path__ + \"media/images/invite-partner-607d98578bf35969d8418f227c425dac.png\";","module.exports = __webpack_public_path__ + \"media/images/our-family-292bbcd263f8c5a48a547a6c71a823ef.jpg\";","module.exports = __webpack_public_path__ + \"media/images/privacy-icon-967b8c76ea490902f4775387d4218392.png\";","module.exports = __webpack_public_path__ + \"media/images/receive-photo-email-f4cc0a950479127d338c0bb1218fd97d.png\";","module.exports = __webpack_public_path__ + \"media/images/upload-photos-2e3ef8710ecfca1c83b021626d1cd244.png\";","import ReactDOM from \"react-dom\";\nvar reactDomClient = ReactDOM;\nif (typeof ReactDOM != \"undefined\") {\n var reactMajorVersion = ReactDOM.version.split('.')[0] || 16;\n\n // TODO: once we require React 18, we can remove this and inline everything guarded by it.\n var supportsRootApi = reactMajorVersion >= 18;\n if (supportsRootApi) {\n // This will never throw an exception, but it's the way to tell Webpack the dependency is optional\n // https://github.com/webpack/webpack/issues/339#issuecomment-47739112\n // Unfortunately, it only converts the error to a warning.\n try {\n // eslint-disable-next-line global-require,import/no-unresolved\n reactDomClient = require('react-dom/client');\n } catch (e) {\n // We should never get here, but if we do, we'll just use the default ReactDOM\n // and live with the warning.\n reactDomClient = ReactDOM;\n }\n }\n}\nexport default reactDomClient;","import ReactDOM from \"./reactDomClient\";\nexport function supportsHydration() {\n return typeof ReactDOM.hydrate === \"function\" || typeof ReactDOM.hydrateRoot === \"function\";\n}\nexport function reactHydrate(node, component) {\n if (typeof ReactDOM.hydrateRoot === \"function\") {\n return ReactDOM.hydrateRoot(node, component);\n } else {\n return ReactDOM.hydrate(component, node);\n }\n}\nexport function createReactRootLike(node) {\n return ReactDOM.createRoot ? ReactDOM.createRoot(node) : legacyReactRootLike(node);\n}\nfunction legacyReactRootLike(node) {\n var root = {\n render: function render(component) {\n return ReactDOM.render(component, node);\n }\n };\n return root;\n}","/* eslint no-console:0 */\n// This file is automatically compiled by Webpack, along with any other files\n// present in this directory. You're encouraged to place your actual application logic in\n// a relevant structure within app/javascript and only use these pack files to reference\n// that code so it'll be compiled.\n//\n// To reference this file, add <%= javascript_pack_tag 'application' %> to the appropriate\n// layout file, like app/views/layouts/application.html.erb\n\n// from react-rails gem\n// Support component names relative to this directory:\nvar componentRequireContext = require.context(\"../components\", true);\nvar ReactRailsUJS = require(\"react_ujs\");\nReactRailsUJS.useContext(componentRequireContext);\nwindow.componentRequireContext = componentRequireContext;\n\n// console.log('Hello World from Webpacker')\nimport '../app-styles'\nimport 'video.js'\n//import RailsUJS from '@rails/ujs'\n//import Rails from '@rails/ujs'\n\n// Not sure why this isn't running automatically, but.\nimport axios from 'axios';\nimport domready from 'domready';\n\n// TODO: move this into a separate pack?\nrequire.context('../images', true)\n\nimport '../images/homepage-hero-950.png'\nimport '../images/family-photo-icon.png'\nimport '../images/devices-icon.png'\nimport '../images/privacy-icon.png'\nimport '../images/our-family.jpg'\nimport '../images/create-album.png'\nimport '../images/receive-photo-email.png'\nimport '../images/upload-photos.png'\nimport '../images/invite-partner.png'\nimport '../images/done.png'\n\n// rollbar action\nvar _rollbarConfig = {\n accessToken: \"3f06ac22acf146e5aa751590f1ec51df\",\n captureUncaught: true,\n payload: {\n environment: process.env.RAILS_ENV,\n }\n};\nvar rollbar = require('../rollbar.umd.min.js');\nvar Rollbar = new rollbar(_rollbarConfig);\n\n// see https://github.com/rails/rails/tree/master/actionview/app/assets/javascripts\n// Rails.start();\n\ndomready(() => {\n //ReactRailsUJS.mountComponents();\n let token = document.querySelector('meta[name=\"csrf-token\"]').content;\n axios.defaults.headers.common = {\n 'X-CSRF-Token': token,\n 'X-Requested-With': 'XMLHttpRequest',\n };\n});\n","var map = {\n\t\"./create-album\": 279,\n\t\"./create-album.png\": 279,\n\t\"./devices-icon\": 280,\n\t\"./devices-icon.png\": 280,\n\t\"./done\": 281,\n\t\"./done.png\": 281,\n\t\"./family-photo-icon\": 282,\n\t\"./family-photo-icon.png\": 282,\n\t\"./homepage-hero-950\": 283,\n\t\"./homepage-hero-950.png\": 283,\n\t\"./invite-partner\": 284,\n\t\"./invite-partner.png\": 284,\n\t\"./our-family\": 285,\n\t\"./our-family.jpg\": 285,\n\t\"./privacy-icon\": 286,\n\t\"./privacy-icon.png\": 286,\n\t\"./receive-photo-email\": 287,\n\t\"./receive-photo-email.png\": 287,\n\t\"./upload-photos\": 288,\n\t\"./upload-photos.png\": 288\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 293;"],"sourceRoot":""}