{
  "version": 3,
  "sources": ["../../../node_modules/flowbite/dist/webpack:/webpack/universalModuleDefinition", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/enums.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/getNodeName.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/getWindow.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/instanceOf.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/modifiers/applyStyles.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/utils/getBasePlacement.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/utils/math.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/utils/userAgent.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/contains.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/isTableElement.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/getParentNode.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/utils/within.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/utils/getFreshSideObject.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/utils/mergePaddingObject.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/utils/expandToHashMap.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/modifiers/arrow.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/utils/getVariation.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/modifiers/computeStyles.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/modifiers/eventListeners.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/utils/getOppositePlacement.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/utils/rectToClientRect.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/utils/computeOffsets.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/utils/detectOverflow.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/modifiers/flip.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/modifiers/hide.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/modifiers/offset.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/modifiers/popperOffsets.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/utils/getAltAxis.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/modifiers/preventOverflow.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/modifiers/index.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/utils/orderModifiers.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/utils/debounce.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/utils/mergeByName.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/createPopper.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/popper.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/popper-lite.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/index.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/flowbite-datepicker/dist/main.cjs.js", "../../../node_modules/flowbite/dist/webpack:/src/components/accordion/index.ts", "../../../node_modules/flowbite/dist/webpack:/src/components/carousel/index.ts", "../../../node_modules/flowbite/dist/webpack:/src/components/clipboard/index.ts", "../../../node_modules/flowbite/dist/webpack:/src/components/collapse/index.ts", "../../../node_modules/flowbite/dist/webpack:/src/components/datepicker/index.ts", "../../../node_modules/flowbite/dist/webpack:/src/components/dial/index.ts", "../../../node_modules/flowbite/dist/webpack:/src/components/dismiss/index.ts", "../../../node_modules/flowbite/dist/webpack:/src/components/drawer/index.ts", "../../../node_modules/flowbite/dist/webpack:/src/components/dropdown/index.ts", "../../../node_modules/flowbite/dist/webpack:/src/components/index.ts", "../../../node_modules/flowbite/dist/webpack:/src/components/input-counter/index.ts", "../../../node_modules/flowbite/dist/webpack:/src/components/modal/index.ts", "../../../node_modules/flowbite/dist/webpack:/src/components/popover/index.ts", "../../../node_modules/flowbite/dist/webpack:/src/components/tabs/index.ts", "../../../node_modules/flowbite/dist/webpack:/src/components/tooltip/index.ts", "../../../node_modules/flowbite/dist/webpack:/src/dom/events.ts", "../../../node_modules/flowbite/dist/webpack:/src/dom/instances.ts", "../../../node_modules/flowbite/dist/webpack:/webpack/bootstrap", "../../../node_modules/flowbite/dist/webpack:/webpack/runtime/define property getters", "../../../node_modules/flowbite/dist/webpack:/webpack/runtime/hasOwnProperty shorthand", "../../../node_modules/flowbite/dist/webpack:/webpack/runtime/make namespace object", "../../../node_modules/flowbite/dist/webpack:/src/index.turbo.ts", "../../../node_modules/lodash/isFunction.js", "../../../node_modules/lodash/_coreJsData.js", "../../../node_modules/lodash/_isMasked.js", "../../../node_modules/lodash/_toSource.js", "../../../node_modules/lodash/_baseIsNative.js", "../../../node_modules/lodash/_getValue.js", "../../../node_modules/lodash/_getNative.js", "../../../node_modules/lodash/_nativeCreate.js", "../../../node_modules/lodash/_hashClear.js", "../../../node_modules/lodash/_hashDelete.js", "../../../node_modules/lodash/_hashGet.js", "../../../node_modules/lodash/_hashHas.js", "../../../node_modules/lodash/_hashSet.js", "../../../node_modules/lodash/_Hash.js", "../../../node_modules/lodash/_listCacheClear.js", "../../../node_modules/lodash/eq.js", "../../../node_modules/lodash/_assocIndexOf.js", "../../../node_modules/lodash/_listCacheDelete.js", "../../../node_modules/lodash/_listCacheGet.js", "../../../node_modules/lodash/_listCacheHas.js", "../../../node_modules/lodash/_listCacheSet.js", "../../../node_modules/lodash/_ListCache.js", "../../../node_modules/lodash/_Map.js", "../../../node_modules/lodash/_mapCacheClear.js", "../../../node_modules/lodash/_isKeyable.js", "../../../node_modules/lodash/_getMapData.js", "../../../node_modules/lodash/_mapCacheDelete.js", "../../../node_modules/lodash/_mapCacheGet.js", "../../../node_modules/lodash/_mapCacheHas.js", "../../../node_modules/lodash/_mapCacheSet.js", "../../../node_modules/lodash/_MapCache.js", "../../../node_modules/lodash/_setCacheAdd.js", "../../../node_modules/lodash/_setCacheHas.js", "../../../node_modules/lodash/_SetCache.js", "../../../node_modules/lodash/_baseFindIndex.js", "../../../node_modules/lodash/_baseIsNaN.js", "../../../node_modules/lodash/_strictIndexOf.js", "../../../node_modules/lodash/_baseIndexOf.js", "../../../node_modules/lodash/_arrayIncludes.js", "../../../node_modules/lodash/_arrayIncludesWith.js", "../../../node_modules/lodash/_cacheHas.js", "../../../node_modules/lodash/_Set.js", "../../../node_modules/lodash/noop.js", "../../../node_modules/lodash/_setToArray.js", "../../../node_modules/lodash/_createSet.js", "../../../node_modules/lodash/_baseUniq.js", "../../../node_modules/lodash/uniq.js", "../../../node_modules/lodash/throttle.js", "../../../node_modules/lodash/_arrayMap.js", "../../../node_modules/lodash/isArray.js", "../../../node_modules/lodash/_baseToString.js", "../../../node_modules/lodash/toString.js", "../../../node_modules/lodash/_baseSlice.js", "../../../node_modules/lodash/_castSlice.js", "../../../node_modules/lodash/_hasUnicode.js", "../../../node_modules/lodash/_asciiToArray.js", "../../../node_modules/lodash/_unicodeToArray.js", "../../../node_modules/lodash/_stringToArray.js", "../../../node_modules/lodash/_createCaseFirst.js", "../../../node_modules/lodash/upperFirst.js", "../../../node_modules/lodash/capitalize.js", "../../../node_modules/lodash/_arrayReduce.js", "../../../node_modules/lodash/_basePropertyOf.js", "../../../node_modules/lodash/_deburrLetter.js", "../../../node_modules/lodash/deburr.js", "../../../node_modules/lodash/_asciiWords.js", "../../../node_modules/lodash/_hasUnicodeWord.js", "../../../node_modules/lodash/_unicodeWords.js", "../../../node_modules/lodash/words.js", "../../../node_modules/lodash/_createCompounder.js", "../../../node_modules/lodash/camelCase.js", "../../../node_modules/flatpickr/dist/l10n/sk.js", "../../../node_modules/flatpickr/dist/l10n/cs.js", "../../../node_modules/moment/moment.js", "../../../node_modules/glightbox/dist/js/glightbox.min.js", "../../../node_modules/headroom.js/dist/headroom.js", "../../../node_modules/money/money.js", "../../../node_modules/@uppy/utils/lib/hasProperty.js", "../../../node_modules/@uppy/utils/lib/Translator.js", "../../../node_modules/namespace-emitter/index.js", "../../../node_modules/nanoid/non-secure/index.cjs", "../../../node_modules/lodash.throttle/index.js", "../../../node_modules/@transloadit/prettier-bytes/prettierBytes.js", "../../../node_modules/wildcard/index.js", "../../../node_modules/mime-match/index.js", "../../../node_modules/@uppy/store-default/lib/index.js", "../../../node_modules/@uppy/utils/lib/getFileNameAndExtension.js", "../../../node_modules/@uppy/utils/lib/mimeTypes.js", "../../../node_modules/@uppy/utils/lib/getFileType.js", "../../../node_modules/@uppy/utils/lib/generateFileID.js", "../../../node_modules/@uppy/core/lib/supportsUploadProgress.js", "../../../node_modules/@uppy/core/lib/getFileName.js", "../../../node_modules/@uppy/utils/lib/getTimeStamp.js", "../../../node_modules/@uppy/core/lib/loggers.js", "../../../node_modules/@uppy/core/lib/locale.js", "../../../node_modules/@uppy/core/lib/Uppy.js", "../../../node_modules/preact/src/constants.js", "../../../node_modules/preact/src/util.js", "../../../node_modules/preact/src/options.js", "../../../node_modules/preact/src/create-element.js", "../../../node_modules/preact/src/component.js", "../../../node_modules/preact/src/create-context.js", "../../../node_modules/preact/src/diff/children.js", "../../../node_modules/preact/src/diff/props.js", "../../../node_modules/preact/src/diff/index.js", "../../../node_modules/preact/src/render.js", "../../../node_modules/preact/src/clone-element.js", "../../../node_modules/preact/src/diff/catch-error.js", "../../../node_modules/@uppy/utils/lib/isDOMElement.js", "../../../node_modules/@uppy/utils/lib/findDOMElement.js", "../../../node_modules/@uppy/core/lib/BasePlugin.js", "../../../node_modules/@uppy/core/lib/UIPlugin.js", "../../../node_modules/@uppy/core/lib/index.js", "../../../node_modules/@uppy/utils/lib/getSpeed.js", "../../../node_modules/@uppy/utils/lib/getBytesRemaining.js", "../../../node_modules/@uppy/utils/lib/getTextDirection.js", "../../../node_modules/@uppy/dashboard/node_modules/@uppy/status-bar/lib/StatusBarStates.js", "../../../node_modules/classnames/index.js", "../../../node_modules/@uppy/dashboard/node_modules/@uppy/status-bar/lib/calculateProcessingProgress.js", "../../../node_modules/@uppy/utils/lib/secondsToTime.js", "../../../node_modules/@uppy/utils/lib/prettyETA.js", "../../../node_modules/@uppy/dashboard/node_modules/@uppy/status-bar/lib/Components.js", "../../../node_modules/@uppy/dashboard/node_modules/@uppy/status-bar/lib/StatusBar.js", "../../../node_modules/@uppy/dashboard/node_modules/@uppy/status-bar/lib/locale.js", "../../../node_modules/@uppy/dashboard/node_modules/@uppy/status-bar/lib/index.js", "../../../node_modules/@uppy/informer/lib/FadeIn.js", "../../../node_modules/@uppy/informer/lib/TransitionGroup.js", "../../../node_modules/@uppy/informer/lib/index.js", "../../../node_modules/@uppy/utils/lib/dataURItoBlob.js", "../../../node_modules/@uppy/utils/lib/isObjectURL.js", "../../../node_modules/@uppy/utils/lib/isPreviewSupported.js", "../../../node_modules/exifr/dist/mini.legacy.umd.js", "../../../node_modules/@uppy/thumbnail-generator/lib/locale.js", "../../../node_modules/@uppy/thumbnail-generator/lib/index.js", "../../../node_modules/@uppy/utils/lib/findAllDOMElements.js", "../../../node_modules/@uppy/utils/lib/toArray.js", "../../../node_modules/@uppy/utils/lib/getDroppedFiles/utils/webkitGetAsEntryApi/getRelativePath.js", "../../../node_modules/@uppy/utils/lib/getDroppedFiles/utils/webkitGetAsEntryApi/getFilesAndDirectoriesFromDirectory.js", "../../../node_modules/@uppy/utils/lib/getDroppedFiles/utils/webkitGetAsEntryApi/index.js", "../../../node_modules/@uppy/utils/lib/getDroppedFiles/utils/fallbackApi.js", "../../../node_modules/@uppy/utils/lib/getDroppedFiles/index.js", "../../../node_modules/@uppy/utils/lib/FOCUSABLE_ELEMENTS.js", "../../../node_modules/@uppy/dashboard/lib/utils/getActiveOverlayEl.js", "../../../node_modules/@uppy/dashboard/lib/utils/trapFocus.js", "../../../node_modules/lodash.debounce/index.js", "../../../node_modules/@uppy/dashboard/lib/utils/createSuperFocus.js", "../../../node_modules/memoize-one/dist/memoize-one.cjs.js", "../../../node_modules/@uppy/utils/lib/isDragDropSupported.js", "../../../node_modules/is-shallow-equal/index.js", "../../../node_modules/@uppy/dashboard/lib/utils/getFileTypeIcon.js", "../../../node_modules/@uppy/dashboard/lib/components/FilePreview.js", "../../../node_modules/@uppy/dashboard/lib/components/FileItem/MetaErrorMessage.js", "../../../node_modules/@uppy/dashboard/lib/components/FileItem/FilePreviewAndLink/index.js", "../../../node_modules/@uppy/dashboard/lib/components/FileItem/FileProgress/index.js", "../../../node_modules/@uppy/utils/lib/truncateString.js", "../../../node_modules/@uppy/dashboard/lib/components/FileItem/FileInfo/index.js", "../../../node_modules/@uppy/dashboard/lib/utils/copyToClipboard.js", "../../../node_modules/@uppy/dashboard/lib/components/FileItem/Buttons/index.js", "../../../node_modules/@uppy/dashboard/lib/components/FileItem/index.js", "../../../node_modules/@uppy/dashboard/lib/components/VirtualList.js", "../../../node_modules/@uppy/dashboard/lib/components/FileList.js", "../../../node_modules/@uppy/dashboard/lib/components/AddFiles.js", "../../../node_modules/@uppy/dashboard/lib/components/AddFilesPanel.js", "../../../node_modules/@uppy/dashboard/lib/utils/ignoreEvent.js", "../../../node_modules/@uppy/dashboard/lib/components/PickerPanelContent.js", "../../../node_modules/@uppy/dashboard/lib/components/EditorPanel.js", "../../../node_modules/@uppy/dashboard/lib/components/PickerPanelTopBar.js", "../../../node_modules/@uppy/dashboard/lib/components/FileCard/index.js", "../../../node_modules/@uppy/dashboard/lib/components/Slide.js", "../../../node_modules/@uppy/dashboard/lib/components/Dashboard.js", "../../../node_modules/@uppy/dashboard/lib/locale.js", "../../../node_modules/@uppy/dashboard/lib/index.js", "../../../node_modules/js-base64/base64.js", "../../../node_modules/requires-port/index.js", "../../../node_modules/querystringify/index.js", "../../../node_modules/url-parse/index.js", "../../../node_modules/tus-js-client/lib.es5/error.js", "../../../node_modules/tus-js-client/lib.es5/logger.js", "../../../node_modules/tus-js-client/lib.es5/uuid.js", "../../../node_modules/tus-js-client/lib.es5/upload.js", "../../../node_modules/tus-js-client/lib.es5/noopUrlStorage.js", "../../../node_modules/tus-js-client/lib.es5/browser/urlStorage.js", "../../../node_modules/tus-js-client/lib.es5/browser/httpStack.js", "../../../node_modules/tus-js-client/lib.es5/browser/isReactNative.js", "../../../node_modules/tus-js-client/lib.es5/browser/uriToBlob.js", "../../../node_modules/tus-js-client/lib.es5/browser/isCordova.js", "../../../node_modules/tus-js-client/lib.es5/browser/readAsByteArray.js", "../../../node_modules/tus-js-client/lib.es5/browser/fileReader.js", "../../../node_modules/tus-js-client/lib.es5/browser/fingerprint.js", "../../../node_modules/tus-js-client/lib.es5/browser/index.js", "../../../node_modules/@uppy/utils/lib/NetworkError.js", "../../../node_modules/@uppy/utils/lib/fetchWithNetworkError.js", "../../../node_modules/@uppy/companion-client/lib/AuthError.js", "../../../node_modules/@uppy/companion-client/lib/RequestClient.js", "../../../node_modules/@uppy/companion-client/lib/tokenStorage.js", "../../../node_modules/@uppy/companion-client/lib/Provider.js", "../../../node_modules/@uppy/companion-client/lib/SearchProvider.js", "../../../node_modules/@uppy/companion-client/lib/Socket.js", "../../../node_modules/@uppy/companion-client/lib/index.js", "../../../node_modules/@uppy/utils/lib/emitSocketProgress.js", "../../../node_modules/@uppy/utils/lib/getSocketHost.js", "../../../node_modules/@uppy/utils/lib/settle.js", "../../../node_modules/@uppy/utils/lib/EventTracker.js", "../../../node_modules/@uppy/utils/lib/isNetworkError.js", "../../../node_modules/@uppy/utils/lib/RateLimitedQueue.js", "../../../node_modules/@uppy/tus/lib/getFingerprint.js", "../../../node_modules/@uppy/tus/lib/index.js", "../../../node_modules/@uppy/golden-retriever/lib/ServiceWorkerStore.js", "../../../node_modules/@uppy/golden-retriever/lib/IndexedDBStore.js", "../../../node_modules/@uppy/golden-retriever/lib/MetaDataStore.js", "../../../node_modules/@uppy/golden-retriever/lib/index.js", "../../../node_modules/@uppy/locales/lib/cs_CZ.js", "../../../node_modules/@uppy/locales/lib/sk_SK.js", "../../../node_modules/global/window.js", "../../../node_modules/min-document/index.js", "../../../node_modules/global/document.js", "../../../node_modules/@babel/runtime/helpers/extends.js", "../../../node_modules/is-function/index.js", "../../../node_modules/video.js/node_modules/@videojs/xhr/lib/interceptors.js", "../../../node_modules/video.js/node_modules/@videojs/xhr/lib/retry.js", "../../../node_modules/video.js/node_modules/@videojs/xhr/lib/http-handler.js", "../../../node_modules/video.js/node_modules/@videojs/xhr/lib/index.js", "../../../node_modules/videojs-vtt.js/lib/vtt.js", "../../../node_modules/videojs-vtt.js/lib/vttcue.js", "../../../node_modules/videojs-vtt.js/lib/vttregion.js", "../../../node_modules/videojs-vtt.js/lib/browser-index.js", "../../../node_modules/url-toolkit/src/url-toolkit.js", "../../../node_modules/@xmldom/xmldom/lib/conventions.js", "../../../node_modules/@xmldom/xmldom/lib/dom.js", "../../../node_modules/@xmldom/xmldom/lib/entities.js", "../../../node_modules/@xmldom/xmldom/lib/sax.js", "../../../node_modules/@xmldom/xmldom/lib/dom-parser.js", "../../../node_modules/@xmldom/xmldom/lib/index.js", "../../../node_modules/mux.js/lib/utils/numbers.js", "../../../node_modules/mux.js/lib/tools/parse-sidx.js", "../../../node_modules/mux.js/lib/utils/clock.js", "../../../node_modules/m3u8-parser/node_modules/@videojs/vhs-utils/cjs/stream.js", "../../../node_modules/@babel/runtime/helpers/interopRequireDefault.js", "../../../node_modules/m3u8-parser/node_modules/@videojs/vhs-utils/cjs/decode-b64-to-uint8-array.js", "../../../node_modules/m3u8-parser/dist/m3u8-parser.cjs.js", "../../../node_modules/@videojs/http-streaming/node_modules/mux.js/lib/utils/numbers.js", "../../../node_modules/@videojs/http-streaming/node_modules/mux.js/lib/tools/parse-sidx.js", "../../../node_modules/@videojs/http-streaming/node_modules/mux.js/lib/utils/clock.js", "../../../node_modules/keycode/index.js", "../../../node_modules/safe-json-parse/tuple.js", "../../../node_modules/@videojs/xhr/lib/http-handler.js", "../../../node_modules/@videojs/xhr/lib/index.js", "../../../node_modules/@videojs/vhs-utils/cjs/resolve-url.js", "../../../node_modules/@videojs/vhs-utils/cjs/codecs.js", "../../../node_modules/@videojs/vhs-utils/cjs/media-types.js", "../../../node_modules/@videojs/vhs-utils/cjs/byte-helpers.js", "../../../node_modules/@videojs/vhs-utils/cjs/media-groups.js", "../../../node_modules/@videojs/vhs-utils/cjs/decode-b64-to-uint8-array.js", "../../../node_modules/jb-videojs-hls-quality-selector/node_modules/mpd-parser/dist/mpd-parser.cjs.js", "../../../node_modules/@videojs/vhs-utils/cjs/id3-helpers.js", "../../../node_modules/@videojs/vhs-utils/cjs/codec-helpers.js", "../../../node_modules/@videojs/vhs-utils/cjs/opus-helpers.js", "../../../node_modules/@videojs/vhs-utils/cjs/mp4-helpers.js", "../../../node_modules/@videojs/vhs-utils/cjs/ebml-helpers.js", "../../../node_modules/@videojs/vhs-utils/cjs/nal-helpers.js", "../../../node_modules/@videojs/vhs-utils/cjs/containers.js", "../../../node_modules/jb-videojs-hls-quality-selector/node_modules/video.js/dist/video.cjs.js", "../../../node_modules/jb-videojs-hls-quality-selector/dist/jb-videojs-hls-quality-selector.js", "../../../node_modules/@rails/actiontext/app/assets/javascripts/actiontext.js", "../../../node_modules/@rails/activestorage/app/assets/javascripts/activestorage.esm.js", "../../javascript/application.js", "../../../node_modules/@hotwired/turbo/dist/turbo.es2017-esm.js", "../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/cable.js", "../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/snakeize.js", "../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/cable_stream_source_element.js", "../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/fetch_requests.js", "../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/index.js", "../../../node_modules/@hotwired/stimulus/dist/stimulus.js", "../../../node_modules/stimulus-autocomplete/src/autocomplete.js", "../../../node_modules/@stimulus-components/dialog/dist/stimulus-dialog.mjs", "../../../node_modules/stimulus-textarea-autogrow/dist/stimulus-textarea-autogrow.mjs", "../../javascript/controllers/application.js", "../../javascript/controllers/admin/filter_controller.js", "../../javascript/controllers/admin/localized_attributes_controller.js", "../../javascript/controllers/analytics_controller.js", "../../javascript/controllers/autoplay_form_controller.js", "../../../node_modules/@rails/request.js/src/fetch_response.js", "../../../node_modules/@rails/request.js/src/request_interceptor.js", "../../../node_modules/@rails/request.js/src/lib/utils.js", "../../../node_modules/@rails/request.js/src/fetch_request.js", "../../../node_modules/@rails/request.js/src/verbs.js", "../../javascript/controllers/autoplay_toggler_controller.js", "../../javascript/controllers/b2b/enrollments_wizard_controller.js", "../../javascript/controllers/b2b/invitation_form_controller.js", "../../javascript/controllers/b2b/widgets_controller.js", "../../javascript/controllers/banner_controller.js", "../../javascript/controllers/carousel_controller.js", "../../javascript/controllers/chapter_controller.js", "../../javascript/controllers/chapters_search_controller.js", "../../javascript/controllers/chart_controller.js", "../../javascript/controllers/checkbox_select_all_controller.js", "../../javascript/controllers/checkout/payment_form_controller.js", "../../javascript/controllers/checkout/purchase_as_gift_controller.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/enums.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getNodeName.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getWindow.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/instanceOf.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/modifiers/applyStyles.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/getBasePlacement.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/math.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/userAgent.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/contains.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/isTableElement.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getParentNode.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/within.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/getFreshSideObject.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/mergePaddingObject.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/expandToHashMap.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/modifiers/arrow.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/getVariation.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/modifiers/computeStyles.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/modifiers/eventListeners.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/getOppositePlacement.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/rectToClientRect.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/computeOffsets.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/detectOverflow.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/modifiers/flip.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/modifiers/hide.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/modifiers/offset.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/modifiers/popperOffsets.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/getAltAxis.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/modifiers/preventOverflow.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/orderModifiers.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/debounce.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/format.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/validateModifiers.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/uniqueBy.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/mergeByName.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/createPopper.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/popper.js", "../../../node_modules/tippy.js/src/constants.ts", "../../../node_modules/tippy.js/src/utils.ts", "../../../node_modules/tippy.js/src/dom-utils.ts", "../../../node_modules/tippy.js/src/bindGlobalEventListeners.ts", "../../../node_modules/tippy.js/src/browser.ts", "../../../node_modules/tippy.js/src/validation.ts", "../../../node_modules/tippy.js/src/props.ts", "../../../node_modules/tippy.js/src/template.ts", "../../../node_modules/tippy.js/src/createTippy.ts", "../../../node_modules/tippy.js/src/index.ts", "../../../node_modules/tippy.js/src/addons/createSingleton.ts", "../../../node_modules/tippy.js/src/addons/delegate.ts", "../../../node_modules/tippy.js/src/plugins/animateFill.ts", "../../../node_modules/tippy.js/src/plugins/followCursor.ts", "../../../node_modules/tippy.js/src/plugins/inlinePositioning.ts", "../../../node_modules/tippy.js/src/plugins/sticky.ts", "../../../node_modules/tippy.js/build/base.js", "../../javascript/controllers/clipboard_controller.js", "../../javascript/controllers/cloak_controller.js", "../../javascript/controllers/collapse_controller.js", "../../javascript/controllers/combo_box_controller.js", "../../javascript/controllers/company/available_seats_form_controller.js", "../../javascript/controllers/countdown_redirect_controller.js", "../../javascript/controllers/countdown_timer_controller.js", "../../javascript/controllers/counter_controller.js", "../../javascript/controllers/courses/filter_controller.js", "../../javascript/controllers/dialog_controller.js", "../../../node_modules/flatpickr/dist/esm/types/options.js", "../../../node_modules/flatpickr/dist/esm/l10n/default.js", "../../../node_modules/flatpickr/dist/esm/utils/index.js", "../../../node_modules/flatpickr/dist/esm/utils/dom.js", "../../../node_modules/flatpickr/dist/esm/utils/formatting.js", "../../../node_modules/flatpickr/dist/esm/utils/dates.js", "../../../node_modules/flatpickr/dist/esm/utils/polyfills.js", "../../../node_modules/flatpickr/dist/esm/index.js", "../../javascript/controllers/flatpickr_controller.js", "../../javascript/plugins/flatpickr-predefined-ranges.js", "../../javascript/controllers/form_submission_controller.js", "../../javascript/controllers/glightbox_controller.js", "../../javascript/controllers/global_search_controller.js", "../../javascript/controllers/gopay_controller.js", "../../javascript/controllers/headroom_controller.js", "../../javascript/controllers/image_attachments_controller.js", "../../javascript/controllers/index_table_controller.js", "../../javascript/controllers/invite_users_controller.js", "../../javascript/controllers/items_filter_controller.js", "../../javascript/controllers/nested_field_controller.js", "../../javascript/controllers/nested_fields_controller.js", "../../javascript/controllers/notifications_controller.js", "../../javascript/controllers/other_field_controller.js", "../../javascript/controllers/parallax_controller.js", "../../../node_modules/gsap/gsap-core.js", "../../../node_modules/gsap/CSSPlugin.js", "../../../node_modules/gsap/index.js", "../../javascript/controllers/price_field_controller.js", "../../javascript/controllers/product_row_controller.js", "../../javascript/controllers/range_input_controller.js", "../../../node_modules/@stimulus-components/read-more/dist/stimulus-read-more.mjs", "../../javascript/controllers/read_more_controller.js", "../../javascript/controllers/scroll_into_view_controller.js", "../../javascript/controllers/scroll_to_bottom_controller.js", "../../javascript/controllers/search_in_controller.js", "../../javascript/controllers/service_worker_controller.js", "../../javascript/controllers/services/finstat_controller.js", "../../javascript/controllers/show_more_controller.js", "../../../node_modules/sortablejs/modular/sortable.esm.js", "../../javascript/controllers/sortable_controller.js", "../../javascript/controllers/stop_enter_controller.js", "../../javascript/controllers/student/chapter_navigation_controller.js", "../../javascript/controllers/student/chapters_filter_controller.js", "../../javascript/controllers/tab_section_controller.js", "../../javascript/controllers/teacher/course_prices_controller.js", "../../javascript/controllers/teacher/courses_controller.js", "../../javascript/controllers/teacher_channel/course_attachment_controller.js", "../../javascript/controllers/timeout_redirect_controller.js", "../../javascript/controllers/tippy_controller.js", "../../javascript/controllers/turbo_modal_controller.js", "../../javascript/controllers/turbo_stream_controller.js", "../../javascript/controllers/video_uploads_controller.js", "../../javascript/plugins/uppy-vimeo-plugin.js", "../../../node_modules/video.js/dist/video.es.js", "../../../node_modules/@babel/runtime/helpers/esm/extends.js", "../../../node_modules/video.js/node_modules/@videojs/vhs-utils/es/resolve-url.js", "../../../node_modules/video.js/node_modules/@videojs/vhs-utils/es/stream.js", "../../../node_modules/video.js/node_modules/@videojs/vhs-utils/es/decode-b64-to-uint8-array.js", "../../../node_modules/video.js/node_modules/m3u8-parser/dist/m3u8-parser.es.js", "../../../node_modules/video.js/node_modules/@videojs/vhs-utils/es/codecs.js", "../../../node_modules/video.js/node_modules/@videojs/vhs-utils/es/media-types.js", "../../../node_modules/video.js/node_modules/@videojs/vhs-utils/es/byte-helpers.js", "../../../node_modules/video.js/node_modules/mpd-parser/node_modules/@videojs/vhs-utils/es/resolve-url.js", "../../../node_modules/video.js/node_modules/mpd-parser/dist/mpd-parser.es.js", "../../../node_modules/video.js/node_modules/mpd-parser/node_modules/@videojs/vhs-utils/es/media-groups.js", "../../../node_modules/video.js/node_modules/mpd-parser/node_modules/@videojs/vhs-utils/es/decode-b64-to-uint8-array.js", "../../../node_modules/video.js/node_modules/@videojs/vhs-utils/es/id3-helpers.js", "../../../node_modules/video.js/node_modules/@videojs/vhs-utils/es/opus-helpers.js", "../../../node_modules/video.js/node_modules/@videojs/vhs-utils/es/mp4-helpers.js", "../../../node_modules/video.js/node_modules/@videojs/vhs-utils/es/ebml-helpers.js", "../../../node_modules/video.js/node_modules/@videojs/vhs-utils/es/nal-helpers.js", "../../../node_modules/video.js/node_modules/@videojs/vhs-utils/es/containers.js", "../../../node_modules/@videojs/http-streaming/dist/videojs-http-streaming.es.js", "../../../node_modules/@videojs/vhs-utils/es/resolve-url.js", "../../../node_modules/@videojs/vhs-utils/es/codecs.js", "../../../node_modules/@videojs/vhs-utils/es/media-types.js", "../../../node_modules/@videojs/vhs-utils/es/byte-helpers.js", "../../../node_modules/@videojs/http-streaming/node_modules/mpd-parser/dist/mpd-parser.es.js", "../../../node_modules/@videojs/vhs-utils/es/media-groups.js", "../../../node_modules/@videojs/vhs-utils/es/decode-b64-to-uint8-array.js", "../../../node_modules/@videojs/vhs-utils/es/id3-helpers.js", "../../../node_modules/@videojs/vhs-utils/es/opus-helpers.js", "../../../node_modules/@videojs/vhs-utils/es/mp4-helpers.js", "../../../node_modules/@videojs/vhs-utils/es/ebml-helpers.js", "../../../node_modules/@videojs/vhs-utils/es/nal-helpers.js", "../../../node_modules/@videojs/vhs-utils/es/containers.js", "../../javascript/controllers/videojs_player_controller.js", "../../../node_modules/@vimeo/player/dist/player.es.js", "../../javascript/controllers/vimeo_player_controller.js", "../../javascript/controllers/vimeo_upload_controller.js", "../../javascript/controllers/index.js", "../../../node_modules/animejs/lib/anime.es.js", "../../../node_modules/alpinejs/dist/module.esm.js", "../../../node_modules/@alpinejs/intersect/dist/module.esm.js", "../../../node_modules/@alpinejs/persist/dist/module.esm.js", "../../../node_modules/@alpinejs/focus/dist/module.esm.js", "../../../node_modules/@alpinejs/collapse/dist/module.esm.js", "../../../node_modules/@ryangjchandler/alpine-clipboard/src/index.js", "../../../node_modules/trix/src/trix/config/attachments.js", "../../../node_modules/trix/src/trix/config/block_attributes.js", "../../../node_modules/trix/src/trix/config/browser.js", "../../../node_modules/trix/src/trix/config/lang.js", "../../../node_modules/trix/src/trix/config/file_size_formatting.js", "../../../node_modules/trix/src/trix/constants.js", "../../../node_modules/trix/src/trix/core/helpers/extend.js", "../../../node_modules/trix/src/trix/core/helpers/dom.js", "../../../node_modules/trix/src/trix/config/input.js", "../../../node_modules/trix/src/trix/config/key_names.js", "../../../node_modules/trix/src/trix/config/parser.js", "../../../node_modules/trix/src/trix/config/text_attributes.js", "../../../node_modules/trix/src/trix/config/toolbar.js", "../../../node_modules/trix/src/trix/config/undo.js", "../../../node_modules/trix/src/trix/config/css.js", "../../../node_modules/trix/src/trix/core/basic_object.js", "../../../node_modules/trix/src/trix/core/utilities/utf16_string.js", "../../../node_modules/trix/src/trix/core/object.js", "../../../node_modules/trix/src/trix/core/helpers/arrays.js", "../../../node_modules/trix/src/trix/core/helpers/bidi.js", "../../../node_modules/trix/src/trix/core/helpers/config.js", "../../../node_modules/trix/src/trix/core/helpers/custom_elements.js", "../../../node_modules/trix/src/trix/core/helpers/events.js", "../../../node_modules/trix/src/trix/core/helpers/functions.js", "../../../node_modules/trix/src/trix/core/helpers/objects.js", "../../../node_modules/trix/src/trix/core/helpers/ranges.js", "../../../node_modules/trix/src/trix/observers/selection_change_observer.js", "../../../node_modules/trix/src/trix/core/helpers/strings.js", "../../../node_modules/trix/src/trix/core/collections/hash.js", "../../../node_modules/trix/src/trix/core/collections/object_group.js", "../../../node_modules/trix/src/trix/core/collections/object_map.js", "../../../node_modules/trix/src/trix/core/collections/element_store.js", "../../../node_modules/trix/src/trix/core/utilities/operation.js", "../../../node_modules/trix/src/trix/views/object_view.js", "../../../node_modules/trix/src/trix/models/html_sanitizer.js", "../../../node_modules/trix/src/trix/views/attachment_view.js", "../../../node_modules/trix/src/trix/views/previewable_attachment_view.js", "../../../node_modules/trix/src/trix/views/piece_view.js", "../../../node_modules/trix/src/trix/views/text_view.js", "../../../node_modules/trix/src/trix/views/block_view.js", "../../../node_modules/trix/src/trix/views/document_view.js", "../../../node_modules/trix/src/trix/models/piece.js", "../../../node_modules/trix/src/trix/operations/image_preload_operation.js", "../../../node_modules/trix/src/trix/models/attachment.js", "../../../node_modules/trix/src/trix/models/attachment_piece.js", "../../../node_modules/trix/src/trix/models/string_piece.js", "../../../node_modules/trix/src/trix/models/splittable_list.js", "../../../node_modules/trix/src/trix/models/text.js", "../../../node_modules/trix/src/trix/models/block.js", "../../../node_modules/trix/src/trix/models/document.js", "../../../node_modules/trix/src/trix/models/html_parser.js", "../../../node_modules/trix/src/trix/core/serialization.js", "../../../node_modules/trix/src/trix/models/managed_attachment.js", "../../../node_modules/trix/src/trix/models/attachment_manager.js", "../../../node_modules/trix/src/trix/models/line_break_insertion.js", "../../../node_modules/trix/src/trix/models/composition.js", "../../../node_modules/trix/src/trix/models/undo_manager.js", "../../../node_modules/trix/src/trix/filters/filter.js", "../../../node_modules/trix/src/trix/filters/attachment_gallery_filter.js", "../../../node_modules/trix/src/trix/models/editor.js", "../../../node_modules/trix/src/trix/models/location_mapper.js", "../../../node_modules/trix/src/trix/models/point_mapper.js", "../../../node_modules/trix/src/trix/models/selection_manager.js", "../../../node_modules/trix/src/trix/controllers/attachment_editor_controller.js", "../../../node_modules/trix/src/trix/controllers/composition_controller.js", "../../../node_modules/trix/src/trix/controllers/controller.js", "../../../node_modules/trix/src/trix/observers/mutation_observer.js", "../../../node_modules/trix/src/trix/operations/file_verification_operation.js", "../../../node_modules/trix/src/trix/models/flaky_android_keyboard_detector.js", "../../../node_modules/trix/src/trix/controllers/input_controller.js", "../../../node_modules/trix/src/trix/controllers/level_0_input_controller.js", "../../../node_modules/trix/src/trix/controllers/level_2_input_controller.js", "../../../node_modules/trix/src/trix/controllers/toolbar_controller.js", "../../../node_modules/trix/src/trix/controllers/editor_controller.js", "../../../node_modules/trix/src/trix/elements/trix_toolbar_element.js", "../../../node_modules/trix/src/trix/elements/trix_editor_element.js", "../../../node_modules/trix/src/trix/trix.js"],
  "sourcesContent": ["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"Flowbite\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Flowbite\"] = factory();\n\telse\n\t\troot[\"Flowbite\"] = factory();\n})(self, function() {\nreturn ", "export var top = 'top';\nexport var bottom = 'bottom';\nexport var right = 'right';\nexport var left = 'left';\nexport var auto = 'auto';\nexport var basePlacements = [top, bottom, right, left];\nexport var start = 'start';\nexport var end = 'end';\nexport var clippingParents = 'clippingParents';\nexport var viewport = 'viewport';\nexport var popper = 'popper';\nexport var reference = 'reference';\nexport var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n  return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nexport var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n  return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []); // modifiers that need to read the DOM\n\nexport var beforeRead = 'beforeRead';\nexport var read = 'read';\nexport var afterRead = 'afterRead'; // pure-logic modifiers\n\nexport var beforeMain = 'beforeMain';\nexport var main = 'main';\nexport var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\nexport var beforeWrite = 'beforeWrite';\nexport var write = 'write';\nexport var afterWrite = 'afterWrite';\nexport var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];", "export default function getNodeName(element) {\n  return element ? (element.nodeName || '').toLowerCase() : null;\n}", "export default function getWindow(node) {\n  if (node == null) {\n    return window;\n  }\n\n  if (node.toString() !== '[object Window]') {\n    var ownerDocument = node.ownerDocument;\n    return ownerDocument ? ownerDocument.defaultView || window : window;\n  }\n\n  return node;\n}", "import getWindow from \"./getWindow.js\";\n\nfunction isElement(node) {\n  var OwnElement = getWindow(node).Element;\n  return node instanceof OwnElement || node instanceof Element;\n}\n\nfunction isHTMLElement(node) {\n  var OwnElement = getWindow(node).HTMLElement;\n  return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nfunction isShadowRoot(node) {\n  // IE 11 has no ShadowRoot\n  if (typeof ShadowRoot === 'undefined') {\n    return false;\n  }\n\n  var OwnElement = getWindow(node).ShadowRoot;\n  return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };", "import getNodeName from \"../dom-utils/getNodeName.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // This modifier takes the styles prepared by the `computeStyles` modifier\n// and applies them to the HTMLElements such as popper and arrow\n\nfunction applyStyles(_ref) {\n  var state = _ref.state;\n  Object.keys(state.elements).forEach(function (name) {\n    var style = state.styles[name] || {};\n    var attributes = state.attributes[name] || {};\n    var element = state.elements[name]; // arrow is optional + virtual elements\n\n    if (!isHTMLElement(element) || !getNodeName(element)) {\n      return;\n    } // Flow doesn't support to extend this property, but it's the most\n    // effective way to apply styles to an HTMLElement\n    // $FlowFixMe[cannot-write]\n\n\n    Object.assign(element.style, style);\n    Object.keys(attributes).forEach(function (name) {\n      var value = attributes[name];\n\n      if (value === false) {\n        element.removeAttribute(name);\n      } else {\n        element.setAttribute(name, value === true ? '' : value);\n      }\n    });\n  });\n}\n\nfunction effect(_ref2) {\n  var state = _ref2.state;\n  var initialStyles = {\n    popper: {\n      position: state.options.strategy,\n      left: '0',\n      top: '0',\n      margin: '0'\n    },\n    arrow: {\n      position: 'absolute'\n    },\n    reference: {}\n  };\n  Object.assign(state.elements.popper.style, initialStyles.popper);\n  state.styles = initialStyles;\n\n  if (state.elements.arrow) {\n    Object.assign(state.elements.arrow.style, initialStyles.arrow);\n  }\n\n  return function () {\n    Object.keys(state.elements).forEach(function (name) {\n      var element = state.elements[name];\n      var attributes = state.attributes[name] || {};\n      var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n      var style = styleProperties.reduce(function (style, property) {\n        style[property] = '';\n        return style;\n      }, {}); // arrow is optional + virtual elements\n\n      if (!isHTMLElement(element) || !getNodeName(element)) {\n        return;\n      }\n\n      Object.assign(element.style, style);\n      Object.keys(attributes).forEach(function (attribute) {\n        element.removeAttribute(attribute);\n      });\n    });\n  };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'applyStyles',\n  enabled: true,\n  phase: 'write',\n  fn: applyStyles,\n  effect: effect,\n  requires: ['computeStyles']\n};", "import { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n  return placement.split('-')[0];\n}", "export var max = Math.max;\nexport var min = Math.min;\nexport var round = Math.round;", "export default function getUAString() {\n  var uaData = navigator.userAgentData;\n\n  if (uaData != null && uaData.brands) {\n    return uaData.brands.map(function (item) {\n      return item.brand + \"/\" + item.version;\n    }).join(' ');\n  }\n\n  return navigator.userAgent;\n}", "import getUAString from \"../utils/userAgent.js\";\nexport default function isLayoutViewport() {\n  return !/^((?!chrome|android).)*safari/i.test(getUAString());\n}", "import { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport { round } from \"../utils/math.js\";\nimport getWindow from \"./getWindow.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getBoundingClientRect(element, includeScale, isFixedStrategy) {\n  if (includeScale === void 0) {\n    includeScale = false;\n  }\n\n  if (isFixedStrategy === void 0) {\n    isFixedStrategy = false;\n  }\n\n  var clientRect = element.getBoundingClientRect();\n  var scaleX = 1;\n  var scaleY = 1;\n\n  if (includeScale && isHTMLElement(element)) {\n    scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;\n    scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;\n  }\n\n  var _ref = isElement(element) ? getWindow(element) : window,\n      visualViewport = _ref.visualViewport;\n\n  var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;\n  var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;\n  var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;\n  var width = clientRect.width / scaleX;\n  var height = clientRect.height / scaleY;\n  return {\n    width: width,\n    height: height,\n    top: y,\n    right: x + width,\n    bottom: y + height,\n    left: x,\n    x: x,\n    y: y\n  };\n}", "import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n  var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n  // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n  var width = element.offsetWidth;\n  var height = element.offsetHeight;\n\n  if (Math.abs(clientRect.width - width) <= 1) {\n    width = clientRect.width;\n  }\n\n  if (Math.abs(clientRect.height - height) <= 1) {\n    height = clientRect.height;\n  }\n\n  return {\n    x: element.offsetLeft,\n    y: element.offsetTop,\n    width: width,\n    height: height\n  };\n}", "import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n  var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n  if (parent.contains(child)) {\n    return true;\n  } // then fallback to custom implementation with Shadow DOM support\n  else if (rootNode && isShadowRoot(rootNode)) {\n      var next = child;\n\n      do {\n        if (next && parent.isSameNode(next)) {\n          return true;\n        } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n        next = next.parentNode || next.host;\n      } while (next);\n    } // Give up, the result is false\n\n\n  return false;\n}", "import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n  return getWindow(element).getComputedStyle(element);\n}", "import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n  return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}", "import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n  // $FlowFixMe[incompatible-return]: assume body is always available\n  return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n  element.document) || window.document).documentElement;\n}", "import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n  if (getNodeName(element) === 'html') {\n    return element;\n  }\n\n  return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n    // $FlowFixMe[incompatible-return]\n    // $FlowFixMe[prop-missing]\n    element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n    element.parentNode || ( // DOM Element detected\n    isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n    // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n    getDocumentElement(element) // fallback\n\n  );\n}", "import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement, isShadowRoot } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getUAString from \"../utils/userAgent.js\";\n\nfunction getTrueOffsetParent(element) {\n  if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n  getComputedStyle(element).position === 'fixed') {\n    return null;\n  }\n\n  return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n  var isFirefox = /firefox/i.test(getUAString());\n  var isIE = /Trident/i.test(getUAString());\n\n  if (isIE && isHTMLElement(element)) {\n    // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n    var elementCss = getComputedStyle(element);\n\n    if (elementCss.position === 'fixed') {\n      return null;\n    }\n  }\n\n  var currentNode = getParentNode(element);\n\n  if (isShadowRoot(currentNode)) {\n    currentNode = currentNode.host;\n  }\n\n  while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n    var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n    // create a containing block.\n    // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n    if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n      return currentNode;\n    } else {\n      currentNode = currentNode.parentNode;\n    }\n  }\n\n  return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n  var window = getWindow(element);\n  var offsetParent = getTrueOffsetParent(element);\n\n  while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n    offsetParent = getTrueOffsetParent(offsetParent);\n  }\n\n  if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n    return window;\n  }\n\n  return offsetParent || getContainingBlock(element) || window;\n}", "export default function getMainAxisFromPlacement(placement) {\n  return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}", "import { max as mathMax, min as mathMin } from \"./math.js\";\nexport function within(min, value, max) {\n  return mathMax(min, mathMin(value, max));\n}\nexport function withinMaxClamp(min, value, max) {\n  var v = within(min, value, max);\n  return v > max ? max : v;\n}", "export default function getFreshSideObject() {\n  return {\n    top: 0,\n    right: 0,\n    bottom: 0,\n    left: 0\n  };\n}", "import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n  return Object.assign({}, getFreshSideObject(), paddingObject);\n}", "export default function expandToHashMap(value, keys) {\n  return keys.reduce(function (hashMap, key) {\n    hashMap[key] = value;\n    return hashMap;\n  }, {});\n}", "import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport { within } from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n  padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n    placement: state.placement\n  })) : padding;\n  return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n  var _state$modifiersData$;\n\n  var state = _ref.state,\n      name = _ref.name,\n      options = _ref.options;\n  var arrowElement = state.elements.arrow;\n  var popperOffsets = state.modifiersData.popperOffsets;\n  var basePlacement = getBasePlacement(state.placement);\n  var axis = getMainAxisFromPlacement(basePlacement);\n  var isVertical = [left, right].indexOf(basePlacement) >= 0;\n  var len = isVertical ? 'height' : 'width';\n\n  if (!arrowElement || !popperOffsets) {\n    return;\n  }\n\n  var paddingObject = toPaddingObject(options.padding, state);\n  var arrowRect = getLayoutRect(arrowElement);\n  var minProp = axis === 'y' ? top : left;\n  var maxProp = axis === 'y' ? bottom : right;\n  var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n  var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n  var arrowOffsetParent = getOffsetParent(arrowElement);\n  var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n  var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n  // outside of the popper bounds\n\n  var min = paddingObject[minProp];\n  var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n  var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n  var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n  var axisProp = axis;\n  state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n  var state = _ref2.state,\n      options = _ref2.options;\n  var _options$element = options.element,\n      arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n  if (arrowElement == null) {\n    return;\n  } // CSS selector\n\n\n  if (typeof arrowElement === 'string') {\n    arrowElement = state.elements.popper.querySelector(arrowElement);\n\n    if (!arrowElement) {\n      return;\n    }\n  }\n\n  if (process.env.NODE_ENV !== \"production\") {\n    if (!isHTMLElement(arrowElement)) {\n      console.error(['Popper: \"arrow\" element must be an HTMLElement (not an SVGElement).', 'To use an SVG arrow, wrap it in an HTMLElement that will be used as', 'the arrow.'].join(' '));\n    }\n  }\n\n  if (!contains(state.elements.popper, arrowElement)) {\n    if (process.env.NODE_ENV !== \"production\") {\n      console.error(['Popper: \"arrow\" modifier\\'s `element` must be a child of the popper', 'element.'].join(' '));\n    }\n\n    return;\n  }\n\n  state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'arrow',\n  enabled: true,\n  phase: 'main',\n  fn: arrow,\n  effect: effect,\n  requires: ['popperOffsets'],\n  requiresIfExists: ['preventOverflow']\n};", "export default function getVariation(placement) {\n  return placement.split('-')[1];\n}", "import { top, left, right, bottom, end } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n  top: 'auto',\n  right: 'auto',\n  bottom: 'auto',\n  left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref) {\n  var x = _ref.x,\n      y = _ref.y;\n  var win = window;\n  var dpr = win.devicePixelRatio || 1;\n  return {\n    x: round(x * dpr) / dpr || 0,\n    y: round(y * dpr) / dpr || 0\n  };\n}\n\nexport function mapToStyles(_ref2) {\n  var _Object$assign2;\n\n  var popper = _ref2.popper,\n      popperRect = _ref2.popperRect,\n      placement = _ref2.placement,\n      variation = _ref2.variation,\n      offsets = _ref2.offsets,\n      position = _ref2.position,\n      gpuAcceleration = _ref2.gpuAcceleration,\n      adaptive = _ref2.adaptive,\n      roundOffsets = _ref2.roundOffsets,\n      isFixed = _ref2.isFixed;\n  var _offsets$x = offsets.x,\n      x = _offsets$x === void 0 ? 0 : _offsets$x,\n      _offsets$y = offsets.y,\n      y = _offsets$y === void 0 ? 0 : _offsets$y;\n\n  var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({\n    x: x,\n    y: y\n  }) : {\n    x: x,\n    y: y\n  };\n\n  x = _ref3.x;\n  y = _ref3.y;\n  var hasX = offsets.hasOwnProperty('x');\n  var hasY = offsets.hasOwnProperty('y');\n  var sideX = left;\n  var sideY = top;\n  var win = window;\n\n  if (adaptive) {\n    var offsetParent = getOffsetParent(popper);\n    var heightProp = 'clientHeight';\n    var widthProp = 'clientWidth';\n\n    if (offsetParent === getWindow(popper)) {\n      offsetParent = getDocumentElement(popper);\n\n      if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {\n        heightProp = 'scrollHeight';\n        widthProp = 'scrollWidth';\n      }\n    } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n    offsetParent = offsetParent;\n\n    if (placement === top || (placement === left || placement === right) && variation === end) {\n      sideY = bottom;\n      var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n      offsetParent[heightProp];\n      y -= offsetY - popperRect.height;\n      y *= gpuAcceleration ? 1 : -1;\n    }\n\n    if (placement === left || (placement === top || placement === bottom) && variation === end) {\n      sideX = right;\n      var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n      offsetParent[widthProp];\n      x -= offsetX - popperRect.width;\n      x *= gpuAcceleration ? 1 : -1;\n    }\n  }\n\n  var commonStyles = Object.assign({\n    position: position\n  }, adaptive && unsetSides);\n\n  var _ref4 = roundOffsets === true ? roundOffsetsByDPR({\n    x: x,\n    y: y\n  }) : {\n    x: x,\n    y: y\n  };\n\n  x = _ref4.x;\n  y = _ref4.y;\n\n  if (gpuAcceleration) {\n    var _Object$assign;\n\n    return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n  }\n\n  return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref5) {\n  var state = _ref5.state,\n      options = _ref5.options;\n  var _options$gpuAccelerat = options.gpuAcceleration,\n      gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n      _options$adaptive = options.adaptive,\n      adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n      _options$roundOffsets = options.roundOffsets,\n      roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n\n  if (process.env.NODE_ENV !== \"production\") {\n    var transitionProperty = getComputedStyle(state.elements.popper).transitionProperty || '';\n\n    if (adaptive && ['transform', 'top', 'right', 'bottom', 'left'].some(function (property) {\n      return transitionProperty.indexOf(property) >= 0;\n    })) {\n      console.warn(['Popper: Detected CSS transitions on at least one of the following', 'CSS properties: \"transform\", \"top\", \"right\", \"bottom\", \"left\".', '\\n\\n', 'Disable the \"computeStyles\" modifier\\'s `adaptive` option to allow', 'for smooth transitions, or remove these properties from the CSS', 'transition declaration on the popper element if only transitioning', 'opacity or background-color for example.', '\\n\\n', 'We recommend using the popper element as a wrapper around an inner', 'element that can have any CSS property transitioned for animations.'].join(' '));\n    }\n  }\n\n  var commonStyles = {\n    placement: getBasePlacement(state.placement),\n    variation: getVariation(state.placement),\n    popper: state.elements.popper,\n    popperRect: state.rects.popper,\n    gpuAcceleration: gpuAcceleration,\n    isFixed: state.options.strategy === 'fixed'\n  };\n\n  if (state.modifiersData.popperOffsets != null) {\n    state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n      offsets: state.modifiersData.popperOffsets,\n      position: state.options.strategy,\n      adaptive: adaptive,\n      roundOffsets: roundOffsets\n    })));\n  }\n\n  if (state.modifiersData.arrow != null) {\n    state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n      offsets: state.modifiersData.arrow,\n      position: 'absolute',\n      adaptive: false,\n      roundOffsets: roundOffsets\n    })));\n  }\n\n  state.attributes.popper = Object.assign({}, state.attributes.popper, {\n    'data-popper-placement': state.placement\n  });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'computeStyles',\n  enabled: true,\n  phase: 'beforeWrite',\n  fn: computeStyles,\n  data: {}\n};", "import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n  passive: true\n};\n\nfunction effect(_ref) {\n  var state = _ref.state,\n      instance = _ref.instance,\n      options = _ref.options;\n  var _options$scroll = options.scroll,\n      scroll = _options$scroll === void 0 ? true : _options$scroll,\n      _options$resize = options.resize,\n      resize = _options$resize === void 0 ? true : _options$resize;\n  var window = getWindow(state.elements.popper);\n  var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n  if (scroll) {\n    scrollParents.forEach(function (scrollParent) {\n      scrollParent.addEventListener('scroll', instance.update, passive);\n    });\n  }\n\n  if (resize) {\n    window.addEventListener('resize', instance.update, passive);\n  }\n\n  return function () {\n    if (scroll) {\n      scrollParents.forEach(function (scrollParent) {\n        scrollParent.removeEventListener('scroll', instance.update, passive);\n      });\n    }\n\n    if (resize) {\n      window.removeEventListener('resize', instance.update, passive);\n    }\n  };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'eventListeners',\n  enabled: true,\n  phase: 'write',\n  fn: function fn() {},\n  effect: effect,\n  data: {}\n};", "var hash = {\n  left: 'right',\n  right: 'left',\n  bottom: 'top',\n  top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n  return placement.replace(/left|right|bottom|top/g, function (matched) {\n    return hash[matched];\n  });\n}", "var hash = {\n  start: 'end',\n  end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n  return placement.replace(/start|end/g, function (matched) {\n    return hash[matched];\n  });\n}", "import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n  var win = getWindow(node);\n  var scrollLeft = win.pageXOffset;\n  var scrollTop = win.pageYOffset;\n  return {\n    scrollLeft: scrollLeft,\n    scrollTop: scrollTop\n  };\n}", "import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n  // If <html> has a CSS width greater than the viewport, then this will be\n  // incorrect for RTL.\n  // Popper 1 is broken in this case and never had a bug report so let's assume\n  // it's not an issue. I don't think anyone ever specifies width on <html>\n  // anyway.\n  // Browsers where the left scrollbar doesn't cause an issue report `0` for\n  // this (e.g. Edge 2019, IE11, Safari)\n  return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}", "import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getViewportRect(element, strategy) {\n  var win = getWindow(element);\n  var html = getDocumentElement(element);\n  var visualViewport = win.visualViewport;\n  var width = html.clientWidth;\n  var height = html.clientHeight;\n  var x = 0;\n  var y = 0;\n\n  if (visualViewport) {\n    width = visualViewport.width;\n    height = visualViewport.height;\n    var layoutViewport = isLayoutViewport();\n\n    if (layoutViewport || !layoutViewport && strategy === 'fixed') {\n      x = visualViewport.offsetLeft;\n      y = visualViewport.offsetTop;\n    }\n  }\n\n  return {\n    width: width,\n    height: height,\n    x: x + getWindowScrollBarX(element),\n    y: y\n  };\n}", "import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n  var _element$ownerDocumen;\n\n  var html = getDocumentElement(element);\n  var winScroll = getWindowScroll(element);\n  var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n  var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n  var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n  var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n  var y = -winScroll.scrollTop;\n\n  if (getComputedStyle(body || html).direction === 'rtl') {\n    x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n  }\n\n  return {\n    width: width,\n    height: height,\n    x: x,\n    y: y\n  };\n}", "import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n  // Firefox wants us to check `-x` and `-y` variations as well\n  var _getComputedStyle = getComputedStyle(element),\n      overflow = _getComputedStyle.overflow,\n      overflowX = _getComputedStyle.overflowX,\n      overflowY = _getComputedStyle.overflowY;\n\n  return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}", "import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n  if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n    // $FlowFixMe[incompatible-return]: assume body is always available\n    return node.ownerDocument.body;\n  }\n\n  if (isHTMLElement(node) && isScrollParent(node)) {\n    return node;\n  }\n\n  return getScrollParent(getParentNode(node));\n}", "import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n  var _element$ownerDocumen;\n\n  if (list === void 0) {\n    list = [];\n  }\n\n  var scrollParent = getScrollParent(element);\n  var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n  var win = getWindow(scrollParent);\n  var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n  var updatedList = list.concat(target);\n  return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n  updatedList.concat(listScrollParents(getParentNode(target)));\n}", "export default function rectToClientRect(rect) {\n  return Object.assign({}, rect, {\n    left: rect.x,\n    top: rect.y,\n    right: rect.x + rect.width,\n    bottom: rect.y + rect.height\n  });\n}", "import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element, strategy) {\n  var rect = getBoundingClientRect(element, false, strategy === 'fixed');\n  rect.top = rect.top + element.clientTop;\n  rect.left = rect.left + element.clientLeft;\n  rect.bottom = rect.top + element.clientHeight;\n  rect.right = rect.left + element.clientWidth;\n  rect.width = element.clientWidth;\n  rect.height = element.clientHeight;\n  rect.x = rect.left;\n  rect.y = rect.top;\n  return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent, strategy) {\n  return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n  var clippingParents = listScrollParents(getParentNode(element));\n  var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n  var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n  if (!isElement(clipperElement)) {\n    return [];\n  } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n  return clippingParents.filter(function (clippingParent) {\n    return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n  });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary, strategy) {\n  var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n  var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n  var firstClippingParent = clippingParents[0];\n  var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n    var rect = getClientRectFromMixedType(element, clippingParent, strategy);\n    accRect.top = max(rect.top, accRect.top);\n    accRect.right = min(rect.right, accRect.right);\n    accRect.bottom = min(rect.bottom, accRect.bottom);\n    accRect.left = max(rect.left, accRect.left);\n    return accRect;\n  }, getClientRectFromMixedType(element, firstClippingParent, strategy));\n  clippingRect.width = clippingRect.right - clippingRect.left;\n  clippingRect.height = clippingRect.bottom - clippingRect.top;\n  clippingRect.x = clippingRect.left;\n  clippingRect.y = clippingRect.top;\n  return clippingRect;\n}", "import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n  var reference = _ref.reference,\n      element = _ref.element,\n      placement = _ref.placement;\n  var basePlacement = placement ? getBasePlacement(placement) : null;\n  var variation = placement ? getVariation(placement) : null;\n  var commonX = reference.x + reference.width / 2 - element.width / 2;\n  var commonY = reference.y + reference.height / 2 - element.height / 2;\n  var offsets;\n\n  switch (basePlacement) {\n    case top:\n      offsets = {\n        x: commonX,\n        y: reference.y - element.height\n      };\n      break;\n\n    case bottom:\n      offsets = {\n        x: commonX,\n        y: reference.y + reference.height\n      };\n      break;\n\n    case right:\n      offsets = {\n        x: reference.x + reference.width,\n        y: commonY\n      };\n      break;\n\n    case left:\n      offsets = {\n        x: reference.x - element.width,\n        y: commonY\n      };\n      break;\n\n    default:\n      offsets = {\n        x: reference.x,\n        y: reference.y\n      };\n  }\n\n  var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n  if (mainAxis != null) {\n    var len = mainAxis === 'y' ? 'height' : 'width';\n\n    switch (variation) {\n      case start:\n        offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n        break;\n\n      case end:\n        offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n        break;\n\n      default:\n    }\n  }\n\n  return offsets;\n}", "import getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n  if (options === void 0) {\n    options = {};\n  }\n\n  var _options = options,\n      _options$placement = _options.placement,\n      placement = _options$placement === void 0 ? state.placement : _options$placement,\n      _options$strategy = _options.strategy,\n      strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,\n      _options$boundary = _options.boundary,\n      boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n      _options$rootBoundary = _options.rootBoundary,\n      rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n      _options$elementConte = _options.elementContext,\n      elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n      _options$altBoundary = _options.altBoundary,\n      altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n      _options$padding = _options.padding,\n      padding = _options$padding === void 0 ? 0 : _options$padding;\n  var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n  var altContext = elementContext === popper ? reference : popper;\n  var popperRect = state.rects.popper;\n  var element = state.elements[altBoundary ? altContext : elementContext];\n  var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);\n  var referenceClientRect = getBoundingClientRect(state.elements.reference);\n  var popperOffsets = computeOffsets({\n    reference: referenceClientRect,\n    element: popperRect,\n    strategy: 'absolute',\n    placement: placement\n  });\n  var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n  var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n  // 0 or negative = within the clipping rect\n\n  var overflowOffsets = {\n    top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n    bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n    left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n    right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n  };\n  var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n  if (elementContext === popper && offsetData) {\n    var offset = offsetData[placement];\n    Object.keys(overflowOffsets).forEach(function (key) {\n      var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n      var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n      overflowOffsets[key] += offset[axis] * multiply;\n    });\n  }\n\n  return overflowOffsets;\n}", "import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n  if (options === void 0) {\n    options = {};\n  }\n\n  var _options = options,\n      placement = _options.placement,\n      boundary = _options.boundary,\n      rootBoundary = _options.rootBoundary,\n      padding = _options.padding,\n      flipVariations = _options.flipVariations,\n      _options$allowedAutoP = _options.allowedAutoPlacements,\n      allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n  var variation = getVariation(placement);\n  var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n    return getVariation(placement) === variation;\n  }) : basePlacements;\n  var allowedPlacements = placements.filter(function (placement) {\n    return allowedAutoPlacements.indexOf(placement) >= 0;\n  });\n\n  if (allowedPlacements.length === 0) {\n    allowedPlacements = placements;\n\n    if (process.env.NODE_ENV !== \"production\") {\n      console.error(['Popper: The `allowedAutoPlacements` option did not allow any', 'placements. Ensure the `placement` option matches the variation', 'of the allowed placements.', 'For example, \"auto\" cannot be used to allow \"bottom-start\".', 'Use \"auto-start\" instead.'].join(' '));\n    }\n  } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n  var overflows = allowedPlacements.reduce(function (acc, placement) {\n    acc[placement] = detectOverflow(state, {\n      placement: placement,\n      boundary: boundary,\n      rootBoundary: rootBoundary,\n      padding: padding\n    })[getBasePlacement(placement)];\n    return acc;\n  }, {});\n  return Object.keys(overflows).sort(function (a, b) {\n    return overflows[a] - overflows[b];\n  });\n}", "import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n  if (getBasePlacement(placement) === auto) {\n    return [];\n  }\n\n  var oppositePlacement = getOppositePlacement(placement);\n  return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n  var state = _ref.state,\n      options = _ref.options,\n      name = _ref.name;\n\n  if (state.modifiersData[name]._skip) {\n    return;\n  }\n\n  var _options$mainAxis = options.mainAxis,\n      checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n      _options$altAxis = options.altAxis,\n      checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n      specifiedFallbackPlacements = options.fallbackPlacements,\n      padding = options.padding,\n      boundary = options.boundary,\n      rootBoundary = options.rootBoundary,\n      altBoundary = options.altBoundary,\n      _options$flipVariatio = options.flipVariations,\n      flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n      allowedAutoPlacements = options.allowedAutoPlacements;\n  var preferredPlacement = state.options.placement;\n  var basePlacement = getBasePlacement(preferredPlacement);\n  var isBasePlacement = basePlacement === preferredPlacement;\n  var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n  var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n    return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n      placement: placement,\n      boundary: boundary,\n      rootBoundary: rootBoundary,\n      padding: padding,\n      flipVariations: flipVariations,\n      allowedAutoPlacements: allowedAutoPlacements\n    }) : placement);\n  }, []);\n  var referenceRect = state.rects.reference;\n  var popperRect = state.rects.popper;\n  var checksMap = new Map();\n  var makeFallbackChecks = true;\n  var firstFittingPlacement = placements[0];\n\n  for (var i = 0; i < placements.length; i++) {\n    var placement = placements[i];\n\n    var _basePlacement = getBasePlacement(placement);\n\n    var isStartVariation = getVariation(placement) === start;\n    var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n    var len = isVertical ? 'width' : 'height';\n    var overflow = detectOverflow(state, {\n      placement: placement,\n      boundary: boundary,\n      rootBoundary: rootBoundary,\n      altBoundary: altBoundary,\n      padding: padding\n    });\n    var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n    if (referenceRect[len] > popperRect[len]) {\n      mainVariationSide = getOppositePlacement(mainVariationSide);\n    }\n\n    var altVariationSide = getOppositePlacement(mainVariationSide);\n    var checks = [];\n\n    if (checkMainAxis) {\n      checks.push(overflow[_basePlacement] <= 0);\n    }\n\n    if (checkAltAxis) {\n      checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n    }\n\n    if (checks.every(function (check) {\n      return check;\n    })) {\n      firstFittingPlacement = placement;\n      makeFallbackChecks = false;\n      break;\n    }\n\n    checksMap.set(placement, checks);\n  }\n\n  if (makeFallbackChecks) {\n    // `2` may be desired in some cases \u2013 research later\n    var numberOfChecks = flipVariations ? 3 : 1;\n\n    var _loop = function _loop(_i) {\n      var fittingPlacement = placements.find(function (placement) {\n        var checks = checksMap.get(placement);\n\n        if (checks) {\n          return checks.slice(0, _i).every(function (check) {\n            return check;\n          });\n        }\n      });\n\n      if (fittingPlacement) {\n        firstFittingPlacement = fittingPlacement;\n        return \"break\";\n      }\n    };\n\n    for (var _i = numberOfChecks; _i > 0; _i--) {\n      var _ret = _loop(_i);\n\n      if (_ret === \"break\") break;\n    }\n  }\n\n  if (state.placement !== firstFittingPlacement) {\n    state.modifiersData[name]._skip = true;\n    state.placement = firstFittingPlacement;\n    state.reset = true;\n  }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'flip',\n  enabled: true,\n  phase: 'main',\n  fn: flip,\n  requiresIfExists: ['offset'],\n  data: {\n    _skip: false\n  }\n};", "import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n  if (preventedOffsets === void 0) {\n    preventedOffsets = {\n      x: 0,\n      y: 0\n    };\n  }\n\n  return {\n    top: overflow.top - rect.height - preventedOffsets.y,\n    right: overflow.right - rect.width + preventedOffsets.x,\n    bottom: overflow.bottom - rect.height + preventedOffsets.y,\n    left: overflow.left - rect.width - preventedOffsets.x\n  };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n  return [top, right, bottom, left].some(function (side) {\n    return overflow[side] >= 0;\n  });\n}\n\nfunction hide(_ref) {\n  var state = _ref.state,\n      name = _ref.name;\n  var referenceRect = state.rects.reference;\n  var popperRect = state.rects.popper;\n  var preventedOffsets = state.modifiersData.preventOverflow;\n  var referenceOverflow = detectOverflow(state, {\n    elementContext: 'reference'\n  });\n  var popperAltOverflow = detectOverflow(state, {\n    altBoundary: true\n  });\n  var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n  var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n  var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n  var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n  state.modifiersData[name] = {\n    referenceClippingOffsets: referenceClippingOffsets,\n    popperEscapeOffsets: popperEscapeOffsets,\n    isReferenceHidden: isReferenceHidden,\n    hasPopperEscaped: hasPopperEscaped\n  };\n  state.attributes.popper = Object.assign({}, state.attributes.popper, {\n    'data-popper-reference-hidden': isReferenceHidden,\n    'data-popper-escaped': hasPopperEscaped\n  });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'hide',\n  enabled: true,\n  phase: 'main',\n  requiresIfExists: ['preventOverflow'],\n  fn: hide\n};", "import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n  var basePlacement = getBasePlacement(placement);\n  var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n  var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n    placement: placement\n  })) : offset,\n      skidding = _ref[0],\n      distance = _ref[1];\n\n  skidding = skidding || 0;\n  distance = (distance || 0) * invertDistance;\n  return [left, right].indexOf(basePlacement) >= 0 ? {\n    x: distance,\n    y: skidding\n  } : {\n    x: skidding,\n    y: distance\n  };\n}\n\nfunction offset(_ref2) {\n  var state = _ref2.state,\n      options = _ref2.options,\n      name = _ref2.name;\n  var _options$offset = options.offset,\n      offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n  var data = placements.reduce(function (acc, placement) {\n    acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n    return acc;\n  }, {});\n  var _data$state$placement = data[state.placement],\n      x = _data$state$placement.x,\n      y = _data$state$placement.y;\n\n  if (state.modifiersData.popperOffsets != null) {\n    state.modifiersData.popperOffsets.x += x;\n    state.modifiersData.popperOffsets.y += y;\n  }\n\n  state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'offset',\n  enabled: true,\n  phase: 'main',\n  requires: ['popperOffsets'],\n  fn: offset\n};", "import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n  var state = _ref.state,\n      name = _ref.name;\n  // Offsets are the actual position the popper needs to have to be\n  // properly positioned near its reference element\n  // This is the most basic placement, and will be adjusted by\n  // the modifiers in the next step\n  state.modifiersData[name] = computeOffsets({\n    reference: state.rects.reference,\n    element: state.rects.popper,\n    strategy: 'absolute',\n    placement: state.placement\n  });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'popperOffsets',\n  enabled: true,\n  phase: 'read',\n  fn: popperOffsets,\n  data: {}\n};", "export default function getAltAxis(axis) {\n  return axis === 'x' ? 'y' : 'x';\n}", "import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport { within, withinMaxClamp } from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { min as mathMin, max as mathMax } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n  var state = _ref.state,\n      options = _ref.options,\n      name = _ref.name;\n  var _options$mainAxis = options.mainAxis,\n      checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n      _options$altAxis = options.altAxis,\n      checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n      boundary = options.boundary,\n      rootBoundary = options.rootBoundary,\n      altBoundary = options.altBoundary,\n      padding = options.padding,\n      _options$tether = options.tether,\n      tether = _options$tether === void 0 ? true : _options$tether,\n      _options$tetherOffset = options.tetherOffset,\n      tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n  var overflow = detectOverflow(state, {\n    boundary: boundary,\n    rootBoundary: rootBoundary,\n    padding: padding,\n    altBoundary: altBoundary\n  });\n  var basePlacement = getBasePlacement(state.placement);\n  var variation = getVariation(state.placement);\n  var isBasePlacement = !variation;\n  var mainAxis = getMainAxisFromPlacement(basePlacement);\n  var altAxis = getAltAxis(mainAxis);\n  var popperOffsets = state.modifiersData.popperOffsets;\n  var referenceRect = state.rects.reference;\n  var popperRect = state.rects.popper;\n  var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n    placement: state.placement\n  })) : tetherOffset;\n  var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n    mainAxis: tetherOffsetValue,\n    altAxis: tetherOffsetValue\n  } : Object.assign({\n    mainAxis: 0,\n    altAxis: 0\n  }, tetherOffsetValue);\n  var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n  var data = {\n    x: 0,\n    y: 0\n  };\n\n  if (!popperOffsets) {\n    return;\n  }\n\n  if (checkMainAxis) {\n    var _offsetModifierState$;\n\n    var mainSide = mainAxis === 'y' ? top : left;\n    var altSide = mainAxis === 'y' ? bottom : right;\n    var len = mainAxis === 'y' ? 'height' : 'width';\n    var offset = popperOffsets[mainAxis];\n    var min = offset + overflow[mainSide];\n    var max = offset - overflow[altSide];\n    var additive = tether ? -popperRect[len] / 2 : 0;\n    var minLen = variation === start ? referenceRect[len] : popperRect[len];\n    var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n    // outside the reference bounds\n\n    var arrowElement = state.elements.arrow;\n    var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n      width: 0,\n      height: 0\n    };\n    var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n    var arrowPaddingMin = arrowPaddingObject[mainSide];\n    var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n    // to include its full size in the calculation. If the reference is small\n    // and near the edge of a boundary, the popper can overflow even if the\n    // reference is not overflowing as well (e.g. virtual elements with no\n    // width or height)\n\n    var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n    var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n    var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n    var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n    var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n    var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n    var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n    var tetherMax = offset + maxOffset - offsetModifierValue;\n    var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n    popperOffsets[mainAxis] = preventedOffset;\n    data[mainAxis] = preventedOffset - offset;\n  }\n\n  if (checkAltAxis) {\n    var _offsetModifierState$2;\n\n    var _mainSide = mainAxis === 'x' ? top : left;\n\n    var _altSide = mainAxis === 'x' ? bottom : right;\n\n    var _offset = popperOffsets[altAxis];\n\n    var _len = altAxis === 'y' ? 'height' : 'width';\n\n    var _min = _offset + overflow[_mainSide];\n\n    var _max = _offset - overflow[_altSide];\n\n    var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n    var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n    var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n    var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n    var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n    popperOffsets[altAxis] = _preventedOffset;\n    data[altAxis] = _preventedOffset - _offset;\n  }\n\n  state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'preventOverflow',\n  enabled: true,\n  phase: 'main',\n  fn: preventOverflow,\n  requiresIfExists: ['offset']\n};", "export { default as applyStyles } from \"./applyStyles.js\";\nexport { default as arrow } from \"./arrow.js\";\nexport { default as computeStyles } from \"./computeStyles.js\";\nexport { default as eventListeners } from \"./eventListeners.js\";\nexport { default as flip } from \"./flip.js\";\nexport { default as hide } from \"./hide.js\";\nexport { default as offset } from \"./offset.js\";\nexport { default as popperOffsets } from \"./popperOffsets.js\";\nexport { default as preventOverflow } from \"./preventOverflow.js\";", "export default function getHTMLElementScroll(element) {\n  return {\n    scrollLeft: element.scrollLeft,\n    scrollTop: element.scrollTop\n  };\n}", "import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n  if (node === getWindow(node) || !isHTMLElement(node)) {\n    return getWindowScroll(node);\n  } else {\n    return getHTMLElementScroll(node);\n  }\n}", "import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport { round } from \"../utils/math.js\";\n\nfunction isElementScaled(element) {\n  var rect = element.getBoundingClientRect();\n  var scaleX = round(rect.width) / element.offsetWidth || 1;\n  var scaleY = round(rect.height) / element.offsetHeight || 1;\n  return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n  if (isFixed === void 0) {\n    isFixed = false;\n  }\n\n  var isOffsetParentAnElement = isHTMLElement(offsetParent);\n  var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n  var documentElement = getDocumentElement(offsetParent);\n  var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n  var scroll = {\n    scrollLeft: 0,\n    scrollTop: 0\n  };\n  var offsets = {\n    x: 0,\n    y: 0\n  };\n\n  if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n    if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n    isScrollParent(documentElement)) {\n      scroll = getNodeScroll(offsetParent);\n    }\n\n    if (isHTMLElement(offsetParent)) {\n      offsets = getBoundingClientRect(offsetParent, true);\n      offsets.x += offsetParent.clientLeft;\n      offsets.y += offsetParent.clientTop;\n    } else if (documentElement) {\n      offsets.x = getWindowScrollBarX(documentElement);\n    }\n  }\n\n  return {\n    x: rect.left + scroll.scrollLeft - offsets.x,\n    y: rect.top + scroll.scrollTop - offsets.y,\n    width: rect.width,\n    height: rect.height\n  };\n}", "import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n  var map = new Map();\n  var visited = new Set();\n  var result = [];\n  modifiers.forEach(function (modifier) {\n    map.set(modifier.name, modifier);\n  }); // On visiting object, check for its dependencies and visit them recursively\n\n  function sort(modifier) {\n    visited.add(modifier.name);\n    var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n    requires.forEach(function (dep) {\n      if (!visited.has(dep)) {\n        var depModifier = map.get(dep);\n\n        if (depModifier) {\n          sort(depModifier);\n        }\n      }\n    });\n    result.push(modifier);\n  }\n\n  modifiers.forEach(function (modifier) {\n    if (!visited.has(modifier.name)) {\n      // check for visited object\n      sort(modifier);\n    }\n  });\n  return result;\n}\n\nexport default function orderModifiers(modifiers) {\n  // order based on dependencies\n  var orderedModifiers = order(modifiers); // order based on phase\n\n  return modifierPhases.reduce(function (acc, phase) {\n    return acc.concat(orderedModifiers.filter(function (modifier) {\n      return modifier.phase === phase;\n    }));\n  }, []);\n}", "export default function debounce(fn) {\n  var pending;\n  return function () {\n    if (!pending) {\n      pending = new Promise(function (resolve) {\n        Promise.resolve().then(function () {\n          pending = undefined;\n          resolve(fn());\n        });\n      });\n    }\n\n    return pending;\n  };\n}", "export default function mergeByName(modifiers) {\n  var merged = modifiers.reduce(function (merged, current) {\n    var existing = merged[current.name];\n    merged[current.name] = existing ? Object.assign({}, existing, current, {\n      options: Object.assign({}, existing.options, current.options),\n      data: Object.assign({}, existing.data, current.data)\n    }) : current;\n    return merged;\n  }, {}); // IE11 does not support Object.values\n\n  return Object.keys(merged).map(function (key) {\n    return merged[key];\n  });\n}", "import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport getComputedStyle from \"./dom-utils/getComputedStyle.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport validateModifiers from \"./utils/validateModifiers.js\";\nimport uniqueBy from \"./utils/uniqueBy.js\";\nimport getBasePlacement from \"./utils/getBasePlacement.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nimport { auto } from \"./enums.js\";\nvar INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.';\nvar INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.';\nvar DEFAULT_OPTIONS = {\n  placement: 'bottom',\n  modifiers: [],\n  strategy: 'absolute'\n};\n\nfunction areValidElements() {\n  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n    args[_key] = arguments[_key];\n  }\n\n  return !args.some(function (element) {\n    return !(element && typeof element.getBoundingClientRect === 'function');\n  });\n}\n\nexport function popperGenerator(generatorOptions) {\n  if (generatorOptions === void 0) {\n    generatorOptions = {};\n  }\n\n  var _generatorOptions = generatorOptions,\n      _generatorOptions$def = _generatorOptions.defaultModifiers,\n      defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n      _generatorOptions$def2 = _generatorOptions.defaultOptions,\n      defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n  return function createPopper(reference, popper, options) {\n    if (options === void 0) {\n      options = defaultOptions;\n    }\n\n    var state = {\n      placement: 'bottom',\n      orderedModifiers: [],\n      options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n      modifiersData: {},\n      elements: {\n        reference: reference,\n        popper: popper\n      },\n      attributes: {},\n      styles: {}\n    };\n    var effectCleanupFns = [];\n    var isDestroyed = false;\n    var instance = {\n      state: state,\n      setOptions: function setOptions(setOptionsAction) {\n        var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n        cleanupModifierEffects();\n        state.options = Object.assign({}, defaultOptions, state.options, options);\n        state.scrollParents = {\n          reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n          popper: listScrollParents(popper)\n        }; // Orders the modifiers based on their dependencies and `phase`\n        // properties\n\n        var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n        state.orderedModifiers = orderedModifiers.filter(function (m) {\n          return m.enabled;\n        }); // Validate the provided modifiers so that the consumer will get warned\n        // if one of the modifiers is invalid for any reason\n\n        if (process.env.NODE_ENV !== \"production\") {\n          var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function (_ref) {\n            var name = _ref.name;\n            return name;\n          });\n          validateModifiers(modifiers);\n\n          if (getBasePlacement(state.options.placement) === auto) {\n            var flipModifier = state.orderedModifiers.find(function (_ref2) {\n              var name = _ref2.name;\n              return name === 'flip';\n            });\n\n            if (!flipModifier) {\n              console.error(['Popper: \"auto\" placements require the \"flip\" modifier be', 'present and enabled to work.'].join(' '));\n            }\n          }\n\n          var _getComputedStyle = getComputedStyle(popper),\n              marginTop = _getComputedStyle.marginTop,\n              marginRight = _getComputedStyle.marginRight,\n              marginBottom = _getComputedStyle.marginBottom,\n              marginLeft = _getComputedStyle.marginLeft; // We no longer take into account `margins` on the popper, and it can\n          // cause bugs with positioning, so we'll warn the consumer\n\n\n          if ([marginTop, marginRight, marginBottom, marginLeft].some(function (margin) {\n            return parseFloat(margin);\n          })) {\n            console.warn(['Popper: CSS \"margin\" styles cannot be used to apply padding', 'between the popper and its reference element or boundary.', 'To replicate margin, use the `offset` modifier, as well as', 'the `padding` option in the `preventOverflow` and `flip`', 'modifiers.'].join(' '));\n          }\n        }\n\n        runModifierEffects();\n        return instance.update();\n      },\n      // Sync update \u2013 it will always be executed, even if not necessary. This\n      // is useful for low frequency updates where sync behavior simplifies the\n      // logic.\n      // For high frequency updates (e.g. `resize` and `scroll` events), always\n      // prefer the async Popper#update method\n      forceUpdate: function forceUpdate() {\n        if (isDestroyed) {\n          return;\n        }\n\n        var _state$elements = state.elements,\n            reference = _state$elements.reference,\n            popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n        // anymore\n\n        if (!areValidElements(reference, popper)) {\n          if (process.env.NODE_ENV !== \"production\") {\n            console.error(INVALID_ELEMENT_ERROR);\n          }\n\n          return;\n        } // Store the reference and popper rects to be read by modifiers\n\n\n        state.rects = {\n          reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n          popper: getLayoutRect(popper)\n        }; // Modifiers have the ability to reset the current update cycle. The\n        // most common use case for this is the `flip` modifier changing the\n        // placement, which then needs to re-run all the modifiers, because the\n        // logic was previously ran for the previous placement and is therefore\n        // stale/incorrect\n\n        state.reset = false;\n        state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n        // is filled with the initial data specified by the modifier. This means\n        // it doesn't persist and is fresh on each update.\n        // To ensure persistent data, use `${name}#persistent`\n\n        state.orderedModifiers.forEach(function (modifier) {\n          return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n        });\n        var __debug_loops__ = 0;\n\n        for (var index = 0; index < state.orderedModifiers.length; index++) {\n          if (process.env.NODE_ENV !== \"production\") {\n            __debug_loops__ += 1;\n\n            if (__debug_loops__ > 100) {\n              console.error(INFINITE_LOOP_ERROR);\n              break;\n            }\n          }\n\n          if (state.reset === true) {\n            state.reset = false;\n            index = -1;\n            continue;\n          }\n\n          var _state$orderedModifie = state.orderedModifiers[index],\n              fn = _state$orderedModifie.fn,\n              _state$orderedModifie2 = _state$orderedModifie.options,\n              _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n              name = _state$orderedModifie.name;\n\n          if (typeof fn === 'function') {\n            state = fn({\n              state: state,\n              options: _options,\n              name: name,\n              instance: instance\n            }) || state;\n          }\n        }\n      },\n      // Async and optimistically optimized update \u2013 it will not be executed if\n      // not necessary (debounced to run at most once-per-tick)\n      update: debounce(function () {\n        return new Promise(function (resolve) {\n          instance.forceUpdate();\n          resolve(state);\n        });\n      }),\n      destroy: function destroy() {\n        cleanupModifierEffects();\n        isDestroyed = true;\n      }\n    };\n\n    if (!areValidElements(reference, popper)) {\n      if (process.env.NODE_ENV !== \"production\") {\n        console.error(INVALID_ELEMENT_ERROR);\n      }\n\n      return instance;\n    }\n\n    instance.setOptions(options).then(function (state) {\n      if (!isDestroyed && options.onFirstUpdate) {\n        options.onFirstUpdate(state);\n      }\n    }); // Modifiers have the ability to execute arbitrary code before the first\n    // update cycle runs. They will be executed in the same order as the update\n    // cycle. This is useful when a modifier adds some persistent data that\n    // other modifiers need to use, but the modifier is run after the dependent\n    // one.\n\n    function runModifierEffects() {\n      state.orderedModifiers.forEach(function (_ref3) {\n        var name = _ref3.name,\n            _ref3$options = _ref3.options,\n            options = _ref3$options === void 0 ? {} : _ref3$options,\n            effect = _ref3.effect;\n\n        if (typeof effect === 'function') {\n          var cleanupFn = effect({\n            state: state,\n            name: name,\n            instance: instance,\n            options: options\n          });\n\n          var noopFn = function noopFn() {};\n\n          effectCleanupFns.push(cleanupFn || noopFn);\n        }\n      });\n    }\n\n    function cleanupModifierEffects() {\n      effectCleanupFns.forEach(function (fn) {\n        return fn();\n      });\n      effectCleanupFns = [];\n    }\n\n    return instance;\n  };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };", "import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n  defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";", "import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles];\nvar createPopper = /*#__PURE__*/popperGenerator({\n  defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow };", "export * from \"./enums.js\";\nexport * from \"./modifiers/index.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport { popperGenerator, detectOverflow, createPopper as createPopperBase } from \"./createPopper.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper } from \"./popper.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\";", "'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nfunction _arrayLikeToArray(r, a) {\n  (null == a || a > r.length) && (a = r.length);\n  for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n  return n;\n}\nfunction _arrayWithHoles(r) {\n  if (Array.isArray(r)) return r;\n}\nfunction _arrayWithoutHoles(r) {\n  if (Array.isArray(r)) return _arrayLikeToArray(r);\n}\nfunction _assertThisInitialized(e) {\n  if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  return e;\n}\nfunction _callSuper(t, o, e) {\n  return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));\n}\nfunction _classCallCheck(a, n) {\n  if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\");\n}\nfunction _defineProperties(e, r) {\n  for (var t = 0; t < r.length; t++) {\n    var o = r[t];\n    o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);\n  }\n}\nfunction _createClass(e, r, t) {\n  return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", {\n    writable: !1\n  }), e;\n}\nfunction _get() {\n  return _get = \"undefined\" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) {\n    var p = _superPropBase(e, t);\n    if (p) {\n      var n = Object.getOwnPropertyDescriptor(p, t);\n      return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value;\n    }\n  }, _get.apply(null, arguments);\n}\nfunction _getPrototypeOf(t) {\n  return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {\n    return t.__proto__ || Object.getPrototypeOf(t);\n  }, _getPrototypeOf(t);\n}\nfunction _inherits(t, e) {\n  if (\"function\" != typeof e && null !== e) throw new TypeError(\"Super expression must either be null or a function\");\n  t.prototype = Object.create(e && e.prototype, {\n    constructor: {\n      value: t,\n      writable: !0,\n      configurable: !0\n    }\n  }), Object.defineProperty(t, \"prototype\", {\n    writable: !1\n  }), e && _setPrototypeOf(t, e);\n}\nfunction _isNativeReflectConstruct() {\n  try {\n    var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n  } catch (t) {}\n  return (_isNativeReflectConstruct = function () {\n    return !!t;\n  })();\n}\nfunction _iterableToArray(r) {\n  if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r);\n}\nfunction _iterableToArrayLimit(r, l) {\n  var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n  if (null != t) {\n    var e,\n      n,\n      i,\n      u,\n      a = [],\n      f = !0,\n      o = !1;\n    try {\n      if (i = (t = t.call(r)).next, 0 === l) {\n        if (Object(t) !== t) return;\n        f = !1;\n      } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n    } catch (r) {\n      o = !0, n = r;\n    } finally {\n      try {\n        if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;\n      } finally {\n        if (o) throw n;\n      }\n    }\n    return a;\n  }\n}\nfunction _nonIterableRest() {\n  throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _nonIterableSpread() {\n  throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _possibleConstructorReturn(t, e) {\n  if (e && (\"object\" == typeof e || \"function\" == typeof e)) return e;\n  if (void 0 !== e) throw new TypeError(\"Derived constructors may only return object or undefined\");\n  return _assertThisInitialized(t);\n}\nfunction _setPrototypeOf(t, e) {\n  return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n    return t.__proto__ = e, t;\n  }, _setPrototypeOf(t, e);\n}\nfunction _slicedToArray(r, e) {\n  return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();\n}\nfunction _superPropBase(t, o) {\n  for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t)););\n  return t;\n}\nfunction _toConsumableArray(r) {\n  return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();\n}\nfunction _toPrimitive(t, r) {\n  if (\"object\" != typeof t || !t) return t;\n  var e = t[Symbol.toPrimitive];\n  if (void 0 !== e) {\n    var i = e.call(t, r || \"default\");\n    if (\"object\" != typeof i) return i;\n    throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n  }\n  return (\"string\" === r ? String : Number)(t);\n}\nfunction _toPropertyKey(t) {\n  var i = _toPrimitive(t, \"string\");\n  return \"symbol\" == typeof i ? i : i + \"\";\n}\nfunction _typeof(o) {\n  \"@babel/helpers - typeof\";\n\n  return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n    return typeof o;\n  } : function (o) {\n    return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n  }, _typeof(o);\n}\nfunction _unsupportedIterableToArray(r, a) {\n  if (r) {\n    if (\"string\" == typeof r) return _arrayLikeToArray(r, a);\n    var t = {}.toString.call(r).slice(8, -1);\n    return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;\n  }\n}\n\nfunction hasProperty(obj, prop) {\n  return Object.prototype.hasOwnProperty.call(obj, prop);\n}\nfunction lastItemOf(arr) {\n  return arr[arr.length - 1];\n}\n\n// push only the items not included in the array\nfunction pushUnique(arr) {\n  for (var _len = arguments.length, items = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n    items[_key - 1] = arguments[_key];\n  }\n  items.forEach(function (item) {\n    if (arr.includes(item)) {\n      return;\n    }\n    arr.push(item);\n  });\n  return arr;\n}\nfunction stringToArray(str, separator) {\n  // convert empty string to an empty array\n  return str ? str.split(separator) : [];\n}\nfunction isInRange(testVal, min, max) {\n  var minOK = min === undefined || testVal >= min;\n  var maxOK = max === undefined || testVal <= max;\n  return minOK && maxOK;\n}\nfunction limitToRange(val, min, max) {\n  if (val < min) {\n    return min;\n  }\n  if (val > max) {\n    return max;\n  }\n  return val;\n}\nfunction createTagRepeat(tagName, repeat) {\n  var attributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n  var html = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : '';\n  var openTagSrc = Object.keys(attributes).reduce(function (src, attr) {\n    var val = attributes[attr];\n    if (typeof val === 'function') {\n      val = val(index);\n    }\n    return \"\".concat(src, \" \").concat(attr, \"=\\\"\").concat(val, \"\\\"\");\n  }, tagName);\n  html += \"<\".concat(openTagSrc, \"></\").concat(tagName, \">\");\n  var next = index + 1;\n  return next < repeat ? createTagRepeat(tagName, repeat, attributes, next, html) : html;\n}\n\n// Remove the spacing surrounding tags for HTML parser not to create text nodes\n// before/after elements\nfunction optimizeTemplateHTML(html) {\n  return html.replace(/>\\s+/g, '>').replace(/\\s+</, '<');\n}\n\nfunction stripTime(timeValue) {\n  return new Date(timeValue).setHours(0, 0, 0, 0);\n}\nfunction today() {\n  return new Date().setHours(0, 0, 0, 0);\n}\n\n// Get the time value of the start of given date or year, month and day\nfunction dateValue() {\n  switch (arguments.length) {\n    case 0:\n      return today();\n    case 1:\n      return stripTime(arguments.length <= 0 ? undefined : arguments[0]);\n  }\n\n  // use setFullYear() to keep 2-digit year from being mapped to 1900-1999\n  var newDate = new Date(0);\n  newDate.setFullYear.apply(newDate, arguments);\n  return newDate.setHours(0, 0, 0, 0);\n}\nfunction addDays(date, amount) {\n  var newDate = new Date(date);\n  return newDate.setDate(newDate.getDate() + amount);\n}\nfunction addWeeks(date, amount) {\n  return addDays(date, amount * 7);\n}\nfunction addMonths(date, amount) {\n  // If the day of the date is not in the new month, the last day of the new\n  // month will be returned. e.g. Jan 31 + 1 month \u2192 Feb 28 (not Mar 03)\n  var newDate = new Date(date);\n  var monthsToSet = newDate.getMonth() + amount;\n  var expectedMonth = monthsToSet % 12;\n  if (expectedMonth < 0) {\n    expectedMonth += 12;\n  }\n  var time = newDate.setMonth(monthsToSet);\n  return newDate.getMonth() !== expectedMonth ? newDate.setDate(0) : time;\n}\nfunction addYears(date, amount) {\n  // If the date is Feb 29 and the new year is not a leap year, Feb 28 of the\n  // new year will be returned.\n  var newDate = new Date(date);\n  var expectedMonth = newDate.getMonth();\n  var time = newDate.setFullYear(newDate.getFullYear() + amount);\n  return expectedMonth === 1 && newDate.getMonth() === 2 ? newDate.setDate(0) : time;\n}\n\n// Calculate the distance bettwen 2 days of the week\nfunction dayDiff(day, from) {\n  return (day - from + 7) % 7;\n}\n\n// Get the date of the specified day of the week of given base date\nfunction dayOfTheWeekOf(baseDate, dayOfWeek) {\n  var weekStart = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n  var baseDay = new Date(baseDate).getDay();\n  return addDays(baseDate, dayDiff(dayOfWeek, weekStart) - dayDiff(baseDay, weekStart));\n}\n\n// Get the ISO week of a date\nfunction getWeek(date) {\n  // start of ISO week is Monday\n  var thuOfTheWeek = dayOfTheWeekOf(date, 4, 1);\n  // 1st week == the week where the 4th of January is in\n  var firstThu = dayOfTheWeekOf(new Date(thuOfTheWeek).setMonth(0, 4), 4, 1);\n  return Math.round((thuOfTheWeek - firstThu) / 604800000) + 1;\n}\n\n// Get the start year of the period of years that includes given date\n// years: length of the year period\nfunction startOfYearPeriod(date, years) {\n  /* @see https://en.wikipedia.org/wiki/Year_zero#ISO_8601 */\n  var year = new Date(date).getFullYear();\n  return Math.floor(year / years) * years;\n}\n\n// pattern for format parts\nvar reFormatTokens = /dd?|DD?|mm?|MM?|yy?(?:yy)?/;\n// pattern for non date parts\nvar reNonDateParts = /[\\s!-/:-@[-`{-~\u5E74\u6708\u65E5]+/;\n// cache for persed formats\nvar knownFormats = {};\n// parse funtions for date parts\nvar parseFns = {\n  y: function y(date, year) {\n    return new Date(date).setFullYear(parseInt(year, 10));\n  },\n  m: function m(date, month, locale) {\n    var newDate = new Date(date);\n    var monthIndex = parseInt(month, 10) - 1;\n    if (isNaN(monthIndex)) {\n      if (!month) {\n        return NaN;\n      }\n      var monthName = month.toLowerCase();\n      var compareNames = function compareNames(name) {\n        return name.toLowerCase().startsWith(monthName);\n      };\n      // compare with both short and full names because some locales have periods\n      // in the short names (not equal to the first X letters of the full names)\n      monthIndex = locale.monthsShort.findIndex(compareNames);\n      if (monthIndex < 0) {\n        monthIndex = locale.months.findIndex(compareNames);\n      }\n      if (monthIndex < 0) {\n        return NaN;\n      }\n    }\n    newDate.setMonth(monthIndex);\n    return newDate.getMonth() !== normalizeMonth(monthIndex) ? newDate.setDate(0) : newDate.getTime();\n  },\n  d: function d(date, day) {\n    return new Date(date).setDate(parseInt(day, 10));\n  }\n};\n// format functions for date parts\nvar formatFns = {\n  d: function d(date) {\n    return date.getDate();\n  },\n  dd: function dd(date) {\n    return padZero(date.getDate(), 2);\n  },\n  D: function D(date, locale) {\n    return locale.daysShort[date.getDay()];\n  },\n  DD: function DD(date, locale) {\n    return locale.days[date.getDay()];\n  },\n  m: function m(date) {\n    return date.getMonth() + 1;\n  },\n  mm: function mm(date) {\n    return padZero(date.getMonth() + 1, 2);\n  },\n  M: function M(date, locale) {\n    return locale.monthsShort[date.getMonth()];\n  },\n  MM: function MM(date, locale) {\n    return locale.months[date.getMonth()];\n  },\n  y: function y(date) {\n    return date.getFullYear();\n  },\n  yy: function yy(date) {\n    return padZero(date.getFullYear(), 2).slice(-2);\n  },\n  yyyy: function yyyy(date) {\n    return padZero(date.getFullYear(), 4);\n  }\n};\n\n// get month index in normal range (0 - 11) from any number\nfunction normalizeMonth(monthIndex) {\n  return monthIndex > -1 ? monthIndex % 12 : normalizeMonth(monthIndex + 12);\n}\nfunction padZero(num, length) {\n  return num.toString().padStart(length, '0');\n}\nfunction parseFormatString(format) {\n  if (typeof format !== 'string') {\n    throw new Error(\"Invalid date format.\");\n  }\n  if (format in knownFormats) {\n    return knownFormats[format];\n  }\n\n  // sprit the format string into parts and seprators\n  var separators = format.split(reFormatTokens);\n  var parts = format.match(new RegExp(reFormatTokens, 'g'));\n  if (separators.length === 0 || !parts) {\n    throw new Error(\"Invalid date format.\");\n  }\n\n  // collect format functions used in the format\n  var partFormatters = parts.map(function (token) {\n    return formatFns[token];\n  });\n\n  // collect parse function keys used in the format\n  // iterate over parseFns' keys in order to keep the order of the keys.\n  var partParserKeys = Object.keys(parseFns).reduce(function (keys, key) {\n    var token = parts.find(function (part) {\n      return part[0] !== 'D' && part[0].toLowerCase() === key;\n    });\n    if (token) {\n      keys.push(key);\n    }\n    return keys;\n  }, []);\n  return knownFormats[format] = {\n    parser: function parser(dateStr, locale) {\n      var dateParts = dateStr.split(reNonDateParts).reduce(function (dtParts, part, index) {\n        if (part.length > 0 && parts[index]) {\n          var token = parts[index][0];\n          if (token === 'M') {\n            dtParts.m = part;\n          } else if (token !== 'D') {\n            dtParts[token] = part;\n          }\n        }\n        return dtParts;\n      }, {});\n\n      // iterate over partParserkeys so that the parsing is made in the oder\n      // of year, month and day to prevent the day parser from correcting last\n      // day of month wrongly\n      return partParserKeys.reduce(function (origDate, key) {\n        var newDate = parseFns[key](origDate, dateParts[key], locale);\n        // ingnore the part failed to parse\n        return isNaN(newDate) ? origDate : newDate;\n      }, today());\n    },\n    formatter: function formatter(date, locale) {\n      var dateStr = partFormatters.reduce(function (str, fn, index) {\n        return str += \"\".concat(separators[index]).concat(fn(date, locale));\n      }, '');\n      // separators' length is always parts' length + 1,\n      return dateStr += lastItemOf(separators);\n    }\n  };\n}\nfunction parseDate(dateStr, format, locale) {\n  if (dateStr instanceof Date || typeof dateStr === 'number') {\n    var date = stripTime(dateStr);\n    return isNaN(date) ? undefined : date;\n  }\n  if (!dateStr) {\n    return undefined;\n  }\n  if (dateStr === 'today') {\n    return today();\n  }\n  if (format && format.toValue) {\n    var _date = format.toValue(dateStr, format, locale);\n    return isNaN(_date) ? undefined : stripTime(_date);\n  }\n  return parseFormatString(format).parser(dateStr, locale);\n}\nfunction formatDate(date, format, locale) {\n  if (isNaN(date) || !date && date !== 0) {\n    return '';\n  }\n  var dateObj = typeof date === 'number' ? new Date(date) : date;\n  if (format.toDisplay) {\n    return format.toDisplay(dateObj, format, locale);\n  }\n  return parseFormatString(format).formatter(dateObj, locale);\n}\n\nvar listenerRegistry = new WeakMap();\nvar _EventTarget$prototyp = EventTarget.prototype,\n  addEventListener = _EventTarget$prototyp.addEventListener,\n  removeEventListener = _EventTarget$prototyp.removeEventListener;\n\n// Register event listeners to a key object\n// listeners: array of listener definitions;\n//   - each definition must be a flat array of event target and the arguments\n//     used to call addEventListener() on the target\nfunction registerListeners(keyObj, listeners) {\n  var registered = listenerRegistry.get(keyObj);\n  if (!registered) {\n    registered = [];\n    listenerRegistry.set(keyObj, registered);\n  }\n  listeners.forEach(function (listener) {\n    addEventListener.call.apply(addEventListener, _toConsumableArray(listener));\n    registered.push(listener);\n  });\n}\nfunction unregisterListeners(keyObj) {\n  var listeners = listenerRegistry.get(keyObj);\n  if (!listeners) {\n    return;\n  }\n  listeners.forEach(function (listener) {\n    removeEventListener.call.apply(removeEventListener, _toConsumableArray(listener));\n  });\n  listenerRegistry[\"delete\"](keyObj);\n}\n\n// Event.composedPath() polyfill for Edge\n// based on https://gist.github.com/kleinfreund/e9787d73776c0e3750dcfcdc89f100ec\nif (!Event.prototype.composedPath) {\n  var getComposedPath = function getComposedPath(node) {\n    var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n    path.push(node);\n    var parent;\n    if (node.parentNode) {\n      parent = node.parentNode;\n    } else if (node.host) {\n      // ShadowRoot\n      parent = node.host;\n    } else if (node.defaultView) {\n      // Document\n      parent = node.defaultView;\n    }\n    return parent ? getComposedPath(parent, path) : path;\n  };\n  Event.prototype.composedPath = function () {\n    return getComposedPath(this.target);\n  };\n}\nfunction findFromPath(path, criteria, currentTarget) {\n  var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n  var el = path[index];\n  if (criteria(el)) {\n    return el;\n  } else if (el === currentTarget || !el.parentElement) {\n    // stop when reaching currentTarget or <html>\n    return;\n  }\n  return findFromPath(path, criteria, currentTarget, index + 1);\n}\n\n// Search for the actual target of a delegated event\nfunction findElementInEventPath(ev, selector) {\n  var criteria = typeof selector === 'function' ? selector : function (el) {\n    return el.matches(selector);\n  };\n  return findFromPath(ev.composedPath(), criteria, ev.currentTarget);\n}\n\n// default locales\nvar locales = {\n  en: {\n    days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n    daysShort: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n    daysMin: [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"],\n    months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n    monthsShort: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\n    today: \"Today\",\n    clear: \"Clear\",\n    titleFormat: \"MM y\"\n  }\n};\n\n// config options updatable by setOptions() and their default values\nvar defaultOptions = {\n  autohide: false,\n  beforeShowDay: null,\n  beforeShowDecade: null,\n  beforeShowMonth: null,\n  beforeShowYear: null,\n  calendarWeeks: false,\n  clearBtn: false,\n  dateDelimiter: ',',\n  datesDisabled: [],\n  daysOfWeekDisabled: [],\n  daysOfWeekHighlighted: [],\n  defaultViewDate: undefined,\n  // placeholder, defaults to today() by the program\n  disableTouchKeyboard: false,\n  format: 'mm/dd/yyyy',\n  language: 'en',\n  maxDate: null,\n  maxNumberOfDates: 1,\n  maxView: 3,\n  minDate: null,\n  nextArrow: '<svg class=\"w-4 h-4 rtl:rotate-180 text-gray-800 dark:text-white\" aria-hidden=\"true\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 14 10\"><path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M1 5h12m0 0L9 1m4 4L9 9\"/></svg>',\n  orientation: 'auto',\n  pickLevel: 0,\n  prevArrow: '<svg class=\"w-4 h-4 rtl:rotate-180 text-gray-800 dark:text-white\" aria-hidden=\"true\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 14 10\"><path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M13 5H1m0 0 4 4M1 5l4-4\"/></svg>',\n  showDaysOfWeek: true,\n  showOnClick: true,\n  showOnFocus: true,\n  startView: 0,\n  title: '',\n  todayBtn: false,\n  todayBtnMode: 0,\n  todayHighlight: false,\n  updateOnBlur: true,\n  weekStart: 0\n};\n\nvar range = null;\nfunction parseHTML(html) {\n  if (range == null) {\n    range = document.createRange();\n  }\n  return range.createContextualFragment(html);\n}\nfunction hideElement(el) {\n  if (el.style.display === 'none') {\n    return;\n  }\n  // back up the existing display setting in data-style-display\n  if (el.style.display) {\n    el.dataset.styleDisplay = el.style.display;\n  }\n  el.style.display = 'none';\n}\nfunction showElement(el) {\n  if (el.style.display !== 'none') {\n    return;\n  }\n  if (el.dataset.styleDisplay) {\n    // restore backed-up dispay property\n    el.style.display = el.dataset.styleDisplay;\n    delete el.dataset.styleDisplay;\n  } else {\n    el.style.display = '';\n  }\n}\nfunction emptyChildNodes(el) {\n  if (el.firstChild) {\n    el.removeChild(el.firstChild);\n    emptyChildNodes(el);\n  }\n}\nfunction replaceChildNodes(el, newChildNodes) {\n  emptyChildNodes(el);\n  if (newChildNodes instanceof DocumentFragment) {\n    el.appendChild(newChildNodes);\n  } else if (typeof newChildNodes === 'string') {\n    el.appendChild(parseHTML(newChildNodes));\n  } else if (typeof newChildNodes.forEach === 'function') {\n    newChildNodes.forEach(function (node) {\n      el.appendChild(node);\n    });\n  }\n}\n\nvar defaultLang = defaultOptions.language,\n  defaultFormat = defaultOptions.format,\n  defaultWeekStart = defaultOptions.weekStart;\n\n// Reducer function to filter out invalid day-of-week from the input\nfunction sanitizeDOW(dow, day) {\n  return dow.length < 6 && day >= 0 && day < 7 ? pushUnique(dow, day) : dow;\n}\nfunction calcEndOfWeek(startOfWeek) {\n  return (startOfWeek + 6) % 7;\n}\n\n// validate input date. if invalid, fallback to the original value\nfunction validateDate(value, format, locale, origValue) {\n  var date = parseDate(value, format, locale);\n  return date !== undefined ? date : origValue;\n}\n\n// Validate viewId. if invalid, fallback to the original value\nfunction validateViewId(value, origValue) {\n  var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3;\n  var viewId = parseInt(value, 10);\n  return viewId >= 0 && viewId <= max ? viewId : origValue;\n}\n\n// Create Datepicker configuration to set\nfunction processOptions(options, datepicker) {\n  var inOpts = Object.assign({}, options);\n  var config = {};\n  var locales = datepicker.constructor.locales;\n  var _ref = datepicker.config || {},\n    format = _ref.format,\n    language = _ref.language,\n    locale = _ref.locale,\n    maxDate = _ref.maxDate,\n    maxView = _ref.maxView,\n    minDate = _ref.minDate,\n    pickLevel = _ref.pickLevel,\n    startView = _ref.startView,\n    weekStart = _ref.weekStart;\n  if (inOpts.language) {\n    var lang;\n    if (inOpts.language !== language) {\n      if (locales[inOpts.language]) {\n        lang = inOpts.language;\n      } else {\n        // Check if langauge + region tag can fallback to the one without\n        // region (e.g. fr-CA \u2192 fr)\n        lang = inOpts.language.split('-')[0];\n        if (locales[lang] === undefined) {\n          lang = false;\n        }\n      }\n    }\n    delete inOpts.language;\n    if (lang) {\n      language = config.language = lang;\n\n      // update locale as well when updating language\n      var origLocale = locale || locales[defaultLang];\n      // use default language's properties for the fallback\n      locale = Object.assign({\n        format: defaultFormat,\n        weekStart: defaultWeekStart\n      }, locales[defaultLang]);\n      if (language !== defaultLang) {\n        Object.assign(locale, locales[language]);\n      }\n      config.locale = locale;\n      // if format and/or weekStart are the same as old locale's defaults,\n      // update them to new locale's defaults\n      if (format === origLocale.format) {\n        format = config.format = locale.format;\n      }\n      if (weekStart === origLocale.weekStart) {\n        weekStart = config.weekStart = locale.weekStart;\n        config.weekEnd = calcEndOfWeek(locale.weekStart);\n      }\n    }\n  }\n  if (inOpts.format) {\n    var hasToDisplay = typeof inOpts.format.toDisplay === 'function';\n    var hasToValue = typeof inOpts.format.toValue === 'function';\n    var validFormatString = reFormatTokens.test(inOpts.format);\n    if (hasToDisplay && hasToValue || validFormatString) {\n      format = config.format = inOpts.format;\n    }\n    delete inOpts.format;\n  }\n\n  //*** dates ***//\n  // while min and maxDate for \"no limit\" in the options are better to be null\n  // (especially when updating), the ones in the config have to be undefined\n  // because null is treated as 0 (= unix epoch) when comparing with time value\n  var minDt = minDate;\n  var maxDt = maxDate;\n  if (inOpts.minDate !== undefined) {\n    minDt = inOpts.minDate === null ? dateValue(0, 0, 1) // set 0000-01-01 to prevent negative values for year\n    : validateDate(inOpts.minDate, format, locale, minDt);\n    delete inOpts.minDate;\n  }\n  if (inOpts.maxDate !== undefined) {\n    maxDt = inOpts.maxDate === null ? undefined : validateDate(inOpts.maxDate, format, locale, maxDt);\n    delete inOpts.maxDate;\n  }\n  if (maxDt < minDt) {\n    minDate = config.minDate = maxDt;\n    maxDate = config.maxDate = minDt;\n  } else {\n    if (minDate !== minDt) {\n      minDate = config.minDate = minDt;\n    }\n    if (maxDate !== maxDt) {\n      maxDate = config.maxDate = maxDt;\n    }\n  }\n  if (inOpts.datesDisabled) {\n    config.datesDisabled = inOpts.datesDisabled.reduce(function (dates, dt) {\n      var date = parseDate(dt, format, locale);\n      return date !== undefined ? pushUnique(dates, date) : dates;\n    }, []);\n    delete inOpts.datesDisabled;\n  }\n  if (inOpts.defaultViewDate !== undefined) {\n    var viewDate = parseDate(inOpts.defaultViewDate, format, locale);\n    if (viewDate !== undefined) {\n      config.defaultViewDate = viewDate;\n    }\n    delete inOpts.defaultViewDate;\n  }\n\n  //*** days of week ***//\n  if (inOpts.weekStart !== undefined) {\n    var wkStart = Number(inOpts.weekStart) % 7;\n    if (!isNaN(wkStart)) {\n      weekStart = config.weekStart = wkStart;\n      config.weekEnd = calcEndOfWeek(wkStart);\n    }\n    delete inOpts.weekStart;\n  }\n  if (inOpts.daysOfWeekDisabled) {\n    config.daysOfWeekDisabled = inOpts.daysOfWeekDisabled.reduce(sanitizeDOW, []);\n    delete inOpts.daysOfWeekDisabled;\n  }\n  if (inOpts.daysOfWeekHighlighted) {\n    config.daysOfWeekHighlighted = inOpts.daysOfWeekHighlighted.reduce(sanitizeDOW, []);\n    delete inOpts.daysOfWeekHighlighted;\n  }\n\n  //*** multi date ***//\n  if (inOpts.maxNumberOfDates !== undefined) {\n    var maxNumberOfDates = parseInt(inOpts.maxNumberOfDates, 10);\n    if (maxNumberOfDates >= 0) {\n      config.maxNumberOfDates = maxNumberOfDates;\n      config.multidate = maxNumberOfDates !== 1;\n    }\n    delete inOpts.maxNumberOfDates;\n  }\n  if (inOpts.dateDelimiter) {\n    config.dateDelimiter = String(inOpts.dateDelimiter);\n    delete inOpts.dateDelimiter;\n  }\n\n  //*** pick level & view ***//\n  var newPickLevel = pickLevel;\n  if (inOpts.pickLevel !== undefined) {\n    newPickLevel = validateViewId(inOpts.pickLevel, 2);\n    delete inOpts.pickLevel;\n  }\n  if (newPickLevel !== pickLevel) {\n    pickLevel = config.pickLevel = newPickLevel;\n  }\n  var newMaxView = maxView;\n  if (inOpts.maxView !== undefined) {\n    newMaxView = validateViewId(inOpts.maxView, maxView);\n    delete inOpts.maxView;\n  }\n  // ensure max view >= pick level\n  newMaxView = pickLevel > newMaxView ? pickLevel : newMaxView;\n  if (newMaxView !== maxView) {\n    maxView = config.maxView = newMaxView;\n  }\n  var newStartView = startView;\n  if (inOpts.startView !== undefined) {\n    newStartView = validateViewId(inOpts.startView, newStartView);\n    delete inOpts.startView;\n  }\n  // ensure pick level <= start view <= max view\n  if (newStartView < pickLevel) {\n    newStartView = pickLevel;\n  } else if (newStartView > maxView) {\n    newStartView = maxView;\n  }\n  if (newStartView !== startView) {\n    config.startView = newStartView;\n  }\n\n  //*** template ***//\n  if (inOpts.prevArrow) {\n    var prevArrow = parseHTML(inOpts.prevArrow);\n    if (prevArrow.childNodes.length > 0) {\n      config.prevArrow = prevArrow.childNodes;\n    }\n    delete inOpts.prevArrow;\n  }\n  if (inOpts.nextArrow) {\n    var nextArrow = parseHTML(inOpts.nextArrow);\n    if (nextArrow.childNodes.length > 0) {\n      config.nextArrow = nextArrow.childNodes;\n    }\n    delete inOpts.nextArrow;\n  }\n\n  //*** misc ***//\n  if (inOpts.disableTouchKeyboard !== undefined) {\n    config.disableTouchKeyboard = 'ontouchstart' in document && !!inOpts.disableTouchKeyboard;\n    delete inOpts.disableTouchKeyboard;\n  }\n  if (inOpts.orientation) {\n    var orientation = inOpts.orientation.toLowerCase().split(/\\s+/g);\n    config.orientation = {\n      x: orientation.find(function (x) {\n        return x === 'left' || x === 'right';\n      }) || 'auto',\n      y: orientation.find(function (y) {\n        return y === 'top' || y === 'bottom';\n      }) || 'auto'\n    };\n    delete inOpts.orientation;\n  }\n  if (inOpts.todayBtnMode !== undefined) {\n    switch (inOpts.todayBtnMode) {\n      case 0:\n      case 1:\n        config.todayBtnMode = inOpts.todayBtnMode;\n    }\n    delete inOpts.todayBtnMode;\n  }\n\n  //*** copy the rest ***//\n  Object.keys(inOpts).forEach(function (key) {\n    if (inOpts[key] !== undefined && hasProperty(defaultOptions, key)) {\n      config[key] = inOpts[key];\n    }\n  });\n  return config;\n}\n\nvar pickerTemplate = optimizeTemplateHTML(\"<div class=\\\"datepicker hidden\\\">\\n  <div class=\\\"datepicker-picker inline-block rounded-lg bg-white dark:bg-gray-700 shadow-lg p-4\\\">\\n    <div class=\\\"datepicker-header\\\">\\n      <div class=\\\"datepicker-title bg-white dark:bg-gray-700 dark:text-white px-2 py-3 text-center font-semibold\\\"></div>\\n      <div class=\\\"datepicker-controls flex justify-between mb-2\\\">\\n        <button type=\\\"button\\\" class=\\\"bg-white dark:bg-gray-700 rounded-lg text-gray-500 dark:text-white hover:bg-gray-100 dark:hover:bg-gray-600 hover:text-gray-900 dark:hover:text-white text-lg p-2.5 focus:outline-none focus:ring-2 focus:ring-gray-200 prev-btn\\\"></button>\\n        <button type=\\\"button\\\" class=\\\"text-sm rounded-lg text-gray-900 dark:text-white bg-white dark:bg-gray-700 font-semibold py-2.5 px-5 hover:bg-gray-100 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-gray-200 view-switch\\\"></button>\\n        <button type=\\\"button\\\" class=\\\"bg-white dark:bg-gray-700 rounded-lg text-gray-500 dark:text-white hover:bg-gray-100 dark:hover:bg-gray-600 hover:text-gray-900 dark:hover:text-white text-lg p-2.5 focus:outline-none focus:ring-2 focus:ring-gray-200 next-btn\\\"></button>\\n      </div>\\n    </div>\\n    <div class=\\\"datepicker-main p-1\\\"></div>\\n    <div class=\\\"datepicker-footer\\\">\\n      <div class=\\\"datepicker-controls flex space-x-2 rtl:space-x-reverse mt-2\\\">\\n        <button type=\\\"button\\\" class=\\\"%buttonClass% today-btn text-white bg-blue-700 !bg-primary-700 dark:bg-blue-600 dark:!bg-primary-600 hover:bg-blue-800 hover:!bg-primary-800 dark:hover:bg-blue-700 dark:hover:!bg-primary-700 focus:ring-4 focus:ring-blue-300 focus:!ring-primary-300 font-medium rounded-lg text-sm px-5 py-2 text-center w-1/2\\\"></button>\\n        <button type=\\\"button\\\" class=\\\"%buttonClass% clear-btn text-gray-900 dark:text-white bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 hover:bg-gray-100 dark:hover:bg-gray-600 focus:ring-4 focus:ring-blue-300 focus:!ring-primary-300 font-medium rounded-lg text-sm px-5 py-2 text-center w-1/2\\\"></button>\\n      </div>\\n    </div>\\n  </div>\\n</div>\");\n\nvar daysTemplate = optimizeTemplateHTML(\"<div class=\\\"days\\\">\\n  <div class=\\\"days-of-week grid grid-cols-7 mb-1\\\">\".concat(createTagRepeat('span', 7, {\n  \"class\": 'dow block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm'\n}), \"</div>\\n  <div class=\\\"datepicker-grid w-64 grid grid-cols-7\\\">\").concat(createTagRepeat('span', 42, {\n  \"class\": 'block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400'\n}), \"</div>\\n</div>\"));\n\nvar calendarWeeksTemplate = optimizeTemplateHTML(\"<div class=\\\"calendar-weeks\\\">\\n  <div class=\\\"days-of-week flex\\\"><span class=\\\"dow h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400\\\"></span></div>\\n  <div class=\\\"weeks\\\">\".concat(createTagRepeat('span', 6, {\n  \"class\": 'week block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm'\n}), \"</div>\\n</div>\"));\n\n// Base class of the view classes\nvar View = /*#__PURE__*/function () {\n  function View(picker, config) {\n    _classCallCheck(this, View);\n    Object.assign(this, config, {\n      picker: picker,\n      element: parseHTML(\"<div class=\\\"datepicker-view flex\\\"></div>\").firstChild,\n      selected: []\n    });\n    this.init(this.picker.datepicker.config);\n  }\n  return _createClass(View, [{\n    key: \"init\",\n    value: function init(options) {\n      if (options.pickLevel !== undefined) {\n        this.isMinView = this.id === options.pickLevel;\n      }\n      this.setOptions(options);\n      this.updateFocus();\n      this.updateSelection();\n    }\n\n    // Execute beforeShow() callback and apply the result to the element\n    // args:\n    // - current - current value on the iteration on view rendering\n    // - timeValue - time value of the date to pass to beforeShow()\n  }, {\n    key: \"performBeforeHook\",\n    value: function performBeforeHook(el, current, timeValue) {\n      var result = this.beforeShow(new Date(timeValue));\n      switch (_typeof(result)) {\n        case 'boolean':\n          result = {\n            enabled: result\n          };\n          break;\n        case 'string':\n          result = {\n            classes: result\n          };\n      }\n      if (result) {\n        if (result.enabled === false) {\n          el.classList.add('disabled');\n          pushUnique(this.disabled, current);\n        }\n        if (result.classes) {\n          var _el$classList;\n          var extraClasses = result.classes.split(/\\s+/);\n          (_el$classList = el.classList).add.apply(_el$classList, _toConsumableArray(extraClasses));\n          if (extraClasses.includes('disabled')) {\n            pushUnique(this.disabled, current);\n          }\n        }\n        if (result.content) {\n          replaceChildNodes(el, result.content);\n        }\n      }\n    }\n  }]);\n}();\n\nvar DaysView = /*#__PURE__*/function (_View) {\n  function DaysView(picker) {\n    _classCallCheck(this, DaysView);\n    return _callSuper(this, DaysView, [picker, {\n      id: 0,\n      name: 'days',\n      cellClass: 'day'\n    }]);\n  }\n  _inherits(DaysView, _View);\n  return _createClass(DaysView, [{\n    key: \"init\",\n    value: function init(options) {\n      var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n      if (onConstruction) {\n        var inner = parseHTML(daysTemplate).firstChild;\n        this.dow = inner.firstChild;\n        this.grid = inner.lastChild;\n        this.element.appendChild(inner);\n      }\n      _get(_getPrototypeOf(DaysView.prototype), \"init\", this).call(this, options);\n    }\n  }, {\n    key: \"setOptions\",\n    value: function setOptions(options) {\n      var _this = this;\n      var updateDOW;\n      if (hasProperty(options, 'minDate')) {\n        this.minDate = options.minDate;\n      }\n      if (hasProperty(options, 'maxDate')) {\n        this.maxDate = options.maxDate;\n      }\n      if (options.datesDisabled) {\n        this.datesDisabled = options.datesDisabled;\n      }\n      if (options.daysOfWeekDisabled) {\n        this.daysOfWeekDisabled = options.daysOfWeekDisabled;\n        updateDOW = true;\n      }\n      if (options.daysOfWeekHighlighted) {\n        this.daysOfWeekHighlighted = options.daysOfWeekHighlighted;\n      }\n      if (options.todayHighlight !== undefined) {\n        this.todayHighlight = options.todayHighlight;\n      }\n      if (options.weekStart !== undefined) {\n        this.weekStart = options.weekStart;\n        this.weekEnd = options.weekEnd;\n        updateDOW = true;\n      }\n      if (options.locale) {\n        var locale = this.locale = options.locale;\n        this.dayNames = locale.daysMin;\n        this.switchLabelFormat = locale.titleFormat;\n        updateDOW = true;\n      }\n      if (options.beforeShowDay !== undefined) {\n        this.beforeShow = typeof options.beforeShowDay === 'function' ? options.beforeShowDay : undefined;\n      }\n      if (options.calendarWeeks !== undefined) {\n        if (options.calendarWeeks && !this.calendarWeeks) {\n          var weeksElem = parseHTML(calendarWeeksTemplate).firstChild;\n          this.calendarWeeks = {\n            element: weeksElem,\n            dow: weeksElem.firstChild,\n            weeks: weeksElem.lastChild\n          };\n          this.element.insertBefore(weeksElem, this.element.firstChild);\n        } else if (this.calendarWeeks && !options.calendarWeeks) {\n          this.element.removeChild(this.calendarWeeks.element);\n          this.calendarWeeks = null;\n        }\n      }\n      if (options.showDaysOfWeek !== undefined) {\n        if (options.showDaysOfWeek) {\n          showElement(this.dow);\n          if (this.calendarWeeks) {\n            showElement(this.calendarWeeks.dow);\n          }\n        } else {\n          hideElement(this.dow);\n          if (this.calendarWeeks) {\n            hideElement(this.calendarWeeks.dow);\n          }\n        }\n      }\n\n      // update days-of-week when locale, daysOfweekDisabled or weekStart is changed\n      if (updateDOW) {\n        Array.from(this.dow.children).forEach(function (el, index) {\n          var dow = (_this.weekStart + index) % 7;\n          el.textContent = _this.dayNames[dow];\n          el.className = _this.daysOfWeekDisabled.includes(dow) ? 'dow disabled text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400 cursor-not-allowed' : 'dow text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400';\n        });\n      }\n    }\n\n    // Apply update on the focused date to view's settings\n  }, {\n    key: \"updateFocus\",\n    value: function updateFocus() {\n      var viewDate = new Date(this.picker.viewDate);\n      var viewYear = viewDate.getFullYear();\n      var viewMonth = viewDate.getMonth();\n      var firstOfMonth = dateValue(viewYear, viewMonth, 1);\n      var start = dayOfTheWeekOf(firstOfMonth, this.weekStart, this.weekStart);\n      this.first = firstOfMonth;\n      this.last = dateValue(viewYear, viewMonth + 1, 0);\n      this.start = start;\n      this.focused = this.picker.viewDate;\n    }\n\n    // Apply update on the selected dates to view's settings\n  }, {\n    key: \"updateSelection\",\n    value: function updateSelection() {\n      var _this$picker$datepick = this.picker.datepicker,\n        dates = _this$picker$datepick.dates,\n        rangepicker = _this$picker$datepick.rangepicker;\n      this.selected = dates;\n      if (rangepicker) {\n        this.range = rangepicker.dates;\n      }\n    }\n\n    // Update the entire view UI\n  }, {\n    key: \"render\",\n    value: function render() {\n      var _this2 = this;\n      // update today marker on ever render\n      this.today = this.todayHighlight ? today() : undefined;\n      // refresh disabled dates on every render in order to clear the ones added\n      // by beforeShow hook at previous render\n      this.disabled = _toConsumableArray(this.datesDisabled);\n      var switchLabel = formatDate(this.focused, this.switchLabelFormat, this.locale);\n      this.picker.setViewSwitchLabel(switchLabel);\n      this.picker.setPrevBtnDisabled(this.first <= this.minDate);\n      this.picker.setNextBtnDisabled(this.last >= this.maxDate);\n      if (this.calendarWeeks) {\n        // start of the UTC week (Monday) of the 1st of the month\n        var startOfWeek = dayOfTheWeekOf(this.first, 1, 1);\n        Array.from(this.calendarWeeks.weeks.children).forEach(function (el, index) {\n          el.textContent = getWeek(addWeeks(startOfWeek, index));\n        });\n      }\n      Array.from(this.grid.children).forEach(function (el, index) {\n        var classList = el.classList;\n        var current = addDays(_this2.start, index);\n        var date = new Date(current);\n        var day = date.getDay();\n        el.className = \"datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm \".concat(_this2.cellClass);\n        el.dataset.date = current;\n        el.textContent = date.getDate();\n        if (current < _this2.first) {\n          classList.add('prev', 'text-gray-500', 'dark:text-white');\n        } else if (current > _this2.last) {\n          classList.add('next', 'text-gray-500', 'dark:text-white');\n        }\n        if (_this2.today === current) {\n          classList.add('today', 'bg-gray-100', 'dark:bg-gray-600');\n        }\n        if (current < _this2.minDate || current > _this2.maxDate || _this2.disabled.includes(current)) {\n          classList.add('disabled', 'cursor-not-allowed', 'text-gray-400', 'dark:text-gray-500');\n          classList.remove('hover:bg-gray-100', 'dark:hover:bg-gray-600', 'text-gray-900', 'dark:text-white', 'cursor-pointer');\n        }\n        if (_this2.daysOfWeekDisabled.includes(day)) {\n          classList.add('disabled', 'cursor-not-allowed', 'text-gray-400', 'dark:text-gray-500');\n          classList.remove('hover:bg-gray-100', 'dark:hover:bg-gray-600', 'text-gray-900', 'dark:text-white', 'cursor-pointer');\n          pushUnique(_this2.disabled, current);\n        }\n        if (_this2.daysOfWeekHighlighted.includes(day)) {\n          classList.add('highlighted');\n        }\n        if (_this2.range) {\n          var _this2$range = _slicedToArray(_this2.range, 2),\n            rangeStart = _this2$range[0],\n            rangeEnd = _this2$range[1];\n          if (current > rangeStart && current < rangeEnd) {\n            classList.add('range', 'bg-gray-200', 'dark:bg-gray-600');\n            classList.remove('rounded-lg', 'rounded-l-lg', 'rounded-r-lg');\n          }\n          if (current === rangeStart) {\n            classList.add('range-start', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-l-lg');\n            classList.remove('rounded-lg', 'rounded-r-lg');\n          }\n          if (current === rangeEnd) {\n            classList.add('range-end', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-r-lg');\n            classList.remove('rounded-lg', 'rounded-l-lg');\n          }\n        }\n        if (_this2.selected.includes(current)) {\n          classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n          classList.remove('text-gray-900', 'text-gray-500', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'dark:bg-gray-600', 'bg-gray-100', 'bg-gray-200');\n        }\n        if (current === _this2.focused) {\n          classList.add('focused');\n        }\n        if (_this2.beforeShow) {\n          _this2.performBeforeHook(el, current, current);\n        }\n      });\n    }\n\n    // Update the view UI by applying the changes of selected and focused items\n  }, {\n    key: \"refresh\",\n    value: function refresh() {\n      var _this3 = this;\n      var _ref = this.range || [],\n        _ref2 = _slicedToArray(_ref, 2),\n        rangeStart = _ref2[0],\n        rangeEnd = _ref2[1];\n      this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) {\n        el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white', 'focused');\n        el.classList.add('text-gray-900', 'rounded-lg', 'dark:text-white');\n      });\n      Array.from(this.grid.children).forEach(function (el) {\n        var current = Number(el.dataset.date);\n        var classList = el.classList;\n        classList.remove('bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg', 'rounded-r-lg');\n        if (current > rangeStart && current < rangeEnd) {\n          classList.add('range', 'bg-gray-200', 'dark:bg-gray-600');\n          classList.remove('rounded-lg');\n        }\n        if (current === rangeStart) {\n          classList.add('range-start', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg');\n          classList.remove('rounded-lg');\n        }\n        if (current === rangeEnd) {\n          classList.add('range-end', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-r-lg');\n          classList.remove('rounded-lg');\n        }\n        if (_this3.selected.includes(current)) {\n          classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n          classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'bg-gray-100', 'bg-gray-200', 'dark:bg-gray-600');\n        }\n        if (current === _this3.focused) {\n          classList.add('focused');\n        }\n      });\n    }\n\n    // Update the view UI by applying the change of focused item\n  }, {\n    key: \"refreshFocus\",\n    value: function refreshFocus() {\n      var index = Math.round((this.focused - this.start) / 86400000);\n      this.grid.querySelectorAll('.focused').forEach(function (el) {\n        el.classList.remove('focused');\n      });\n      this.grid.children[index].classList.add('focused');\n    }\n  }]);\n}(View);\n\nfunction computeMonthRange(range, thisYear) {\n  if (!range || !range[0] || !range[1]) {\n    return;\n  }\n  var _range = _slicedToArray(range, 2),\n    _range$ = _slicedToArray(_range[0], 2),\n    startY = _range$[0],\n    startM = _range$[1],\n    _range$2 = _slicedToArray(_range[1], 2),\n    endY = _range$2[0],\n    endM = _range$2[1];\n  if (startY > thisYear || endY < thisYear) {\n    return;\n  }\n  return [startY === thisYear ? startM : -1, endY === thisYear ? endM : 12];\n}\nvar MonthsView = /*#__PURE__*/function (_View) {\n  function MonthsView(picker) {\n    _classCallCheck(this, MonthsView);\n    return _callSuper(this, MonthsView, [picker, {\n      id: 1,\n      name: 'months',\n      cellClass: 'month'\n    }]);\n  }\n  _inherits(MonthsView, _View);\n  return _createClass(MonthsView, [{\n    key: \"init\",\n    value: function init(options) {\n      var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n      if (onConstruction) {\n        this.grid = this.element;\n        this.element.classList.add('months', 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4');\n        this.grid.appendChild(parseHTML(createTagRepeat('span', 12, {\n          'data-month': function dataMonth(ix) {\n            return ix;\n          }\n        })));\n      }\n      _get(_getPrototypeOf(MonthsView.prototype), \"init\", this).call(this, options);\n    }\n  }, {\n    key: \"setOptions\",\n    value: function setOptions(options) {\n      if (options.locale) {\n        this.monthNames = options.locale.monthsShort;\n      }\n      if (hasProperty(options, 'minDate')) {\n        if (options.minDate === undefined) {\n          this.minYear = this.minMonth = this.minDate = undefined;\n        } else {\n          var minDateObj = new Date(options.minDate);\n          this.minYear = minDateObj.getFullYear();\n          this.minMonth = minDateObj.getMonth();\n          this.minDate = minDateObj.setDate(1);\n        }\n      }\n      if (hasProperty(options, 'maxDate')) {\n        if (options.maxDate === undefined) {\n          this.maxYear = this.maxMonth = this.maxDate = undefined;\n        } else {\n          var maxDateObj = new Date(options.maxDate);\n          this.maxYear = maxDateObj.getFullYear();\n          this.maxMonth = maxDateObj.getMonth();\n          this.maxDate = dateValue(this.maxYear, this.maxMonth + 1, 0);\n        }\n      }\n      if (options.beforeShowMonth !== undefined) {\n        this.beforeShow = typeof options.beforeShowMonth === 'function' ? options.beforeShowMonth : undefined;\n      }\n    }\n\n    // Update view's settings to reflect the viewDate set on the picker\n  }, {\n    key: \"updateFocus\",\n    value: function updateFocus() {\n      var viewDate = new Date(this.picker.viewDate);\n      this.year = viewDate.getFullYear();\n      this.focused = viewDate.getMonth();\n    }\n\n    // Update view's settings to reflect the selected dates\n  }, {\n    key: \"updateSelection\",\n    value: function updateSelection() {\n      var _this$picker$datepick = this.picker.datepicker,\n        dates = _this$picker$datepick.dates,\n        rangepicker = _this$picker$datepick.rangepicker;\n      this.selected = dates.reduce(function (selected, timeValue) {\n        var date = new Date(timeValue);\n        var year = date.getFullYear();\n        var month = date.getMonth();\n        if (selected[year] === undefined) {\n          selected[year] = [month];\n        } else {\n          pushUnique(selected[year], month);\n        }\n        return selected;\n      }, {});\n      if (rangepicker && rangepicker.dates) {\n        this.range = rangepicker.dates.map(function (timeValue) {\n          var date = new Date(timeValue);\n          return isNaN(date) ? undefined : [date.getFullYear(), date.getMonth()];\n        });\n      }\n    }\n\n    // Update the entire view UI\n  }, {\n    key: \"render\",\n    value: function render() {\n      var _this = this;\n      // refresh disabled months on every render in order to clear the ones added\n      // by beforeShow hook at previous render\n      this.disabled = [];\n      this.picker.setViewSwitchLabel(this.year);\n      this.picker.setPrevBtnDisabled(this.year <= this.minYear);\n      this.picker.setNextBtnDisabled(this.year >= this.maxYear);\n      var selected = this.selected[this.year] || [];\n      var yrOutOfRange = this.year < this.minYear || this.year > this.maxYear;\n      var isMinYear = this.year === this.minYear;\n      var isMaxYear = this.year === this.maxYear;\n      var range = computeMonthRange(this.range, this.year);\n      Array.from(this.grid.children).forEach(function (el, index) {\n        var classList = el.classList;\n        var date = dateValue(_this.year, index, 1);\n        el.className = \"datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm \".concat(_this.cellClass);\n        if (_this.isMinView) {\n          el.dataset.date = date;\n        }\n        // reset text on every render to clear the custom content set\n        // by beforeShow hook at previous render\n        el.textContent = _this.monthNames[index];\n        if (yrOutOfRange || isMinYear && index < _this.minMonth || isMaxYear && index > _this.maxMonth) {\n          classList.add('disabled');\n        }\n        if (range) {\n          var _range2 = _slicedToArray(range, 2),\n            rangeStart = _range2[0],\n            rangeEnd = _range2[1];\n          if (index > rangeStart && index < rangeEnd) {\n            classList.add('range');\n          }\n          if (index === rangeStart) {\n            classList.add('range-start');\n          }\n          if (index === rangeEnd) {\n            classList.add('range-end');\n          }\n        }\n        if (selected.includes(index)) {\n          classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n          classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n        }\n        if (index === _this.focused) {\n          classList.add('focused');\n        }\n        if (_this.beforeShow) {\n          _this.performBeforeHook(el, index, date);\n        }\n      });\n    }\n\n    // Update the view UI by applying the changes of selected and focused items\n  }, {\n    key: \"refresh\",\n    value: function refresh() {\n      var _this2 = this;\n      var selected = this.selected[this.year] || [];\n      var _ref = computeMonthRange(this.range, this.year) || [],\n        _ref2 = _slicedToArray(_ref, 2),\n        rangeStart = _ref2[0],\n        rangeEnd = _ref2[1];\n      this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) {\n        el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'dark:bg-blue-600', 'dark:!bg-primary-700', 'dark:text-white', 'text-white', 'focused');\n        el.classList.add('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n      });\n      Array.from(this.grid.children).forEach(function (el, index) {\n        var classList = el.classList;\n        if (index > rangeStart && index < rangeEnd) {\n          classList.add('range');\n        }\n        if (index === rangeStart) {\n          classList.add('range-start');\n        }\n        if (index === rangeEnd) {\n          classList.add('range-end');\n        }\n        if (selected.includes(index)) {\n          classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n          classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n        }\n        if (index === _this2.focused) {\n          classList.add('focused');\n        }\n      });\n    }\n\n    // Update the view UI by applying the change of focused item\n  }, {\n    key: \"refreshFocus\",\n    value: function refreshFocus() {\n      this.grid.querySelectorAll('.focused').forEach(function (el) {\n        el.classList.remove('focused');\n      });\n      this.grid.children[this.focused].classList.add('focused');\n    }\n  }]);\n}(View);\n\nfunction toTitleCase(word) {\n  return _toConsumableArray(word).reduce(function (str, ch, ix) {\n    return str += ix ? ch : ch.toUpperCase();\n  }, '');\n}\n\n// Class representing the years and decades view elements\nvar YearsView = /*#__PURE__*/function (_View) {\n  function YearsView(picker, config) {\n    _classCallCheck(this, YearsView);\n    return _callSuper(this, YearsView, [picker, config]);\n  }\n  _inherits(YearsView, _View);\n  return _createClass(YearsView, [{\n    key: \"init\",\n    value: function init(options) {\n      var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n      if (onConstruction) {\n        this.navStep = this.step * 10;\n        this.beforeShowOption = \"beforeShow\".concat(toTitleCase(this.cellClass));\n        this.grid = this.element;\n        this.element.classList.add(this.name, 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4');\n        this.grid.appendChild(parseHTML(createTagRepeat('span', 12)));\n      }\n      _get(_getPrototypeOf(YearsView.prototype), \"init\", this).call(this, options);\n    }\n  }, {\n    key: \"setOptions\",\n    value: function setOptions(options) {\n      if (hasProperty(options, 'minDate')) {\n        if (options.minDate === undefined) {\n          this.minYear = this.minDate = undefined;\n        } else {\n          this.minYear = startOfYearPeriod(options.minDate, this.step);\n          this.minDate = dateValue(this.minYear, 0, 1);\n        }\n      }\n      if (hasProperty(options, 'maxDate')) {\n        if (options.maxDate === undefined) {\n          this.maxYear = this.maxDate = undefined;\n        } else {\n          this.maxYear = startOfYearPeriod(options.maxDate, this.step);\n          this.maxDate = dateValue(this.maxYear, 11, 31);\n        }\n      }\n      if (options[this.beforeShowOption] !== undefined) {\n        var beforeShow = options[this.beforeShowOption];\n        this.beforeShow = typeof beforeShow === 'function' ? beforeShow : undefined;\n      }\n    }\n\n    // Update view's settings to reflect the viewDate set on the picker\n  }, {\n    key: \"updateFocus\",\n    value: function updateFocus() {\n      var viewDate = new Date(this.picker.viewDate);\n      var first = startOfYearPeriod(viewDate, this.navStep);\n      var last = first + 9 * this.step;\n      this.first = first;\n      this.last = last;\n      this.start = first - this.step;\n      this.focused = startOfYearPeriod(viewDate, this.step);\n    }\n\n    // Update view's settings to reflect the selected dates\n  }, {\n    key: \"updateSelection\",\n    value: function updateSelection() {\n      var _this = this;\n      var _this$picker$datepick = this.picker.datepicker,\n        dates = _this$picker$datepick.dates,\n        rangepicker = _this$picker$datepick.rangepicker;\n      this.selected = dates.reduce(function (years, timeValue) {\n        return pushUnique(years, startOfYearPeriod(timeValue, _this.step));\n      }, []);\n      if (rangepicker && rangepicker.dates) {\n        this.range = rangepicker.dates.map(function (timeValue) {\n          if (timeValue !== undefined) {\n            return startOfYearPeriod(timeValue, _this.step);\n          }\n        });\n      }\n    }\n\n    // Update the entire view UI\n  }, {\n    key: \"render\",\n    value: function render() {\n      var _this2 = this;\n      // refresh disabled years on every render in order to clear the ones added\n      // by beforeShow hook at previous render\n      this.disabled = [];\n      this.picker.setViewSwitchLabel(\"\".concat(this.first, \"-\").concat(this.last));\n      this.picker.setPrevBtnDisabled(this.first <= this.minYear);\n      this.picker.setNextBtnDisabled(this.last >= this.maxYear);\n      Array.from(this.grid.children).forEach(function (el, index) {\n        var classList = el.classList;\n        var current = _this2.start + index * _this2.step;\n        var date = dateValue(current, 0, 1);\n        el.className = \"datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm \".concat(_this2.cellClass);\n        if (_this2.isMinView) {\n          el.dataset.date = date;\n        }\n        el.textContent = el.dataset.year = current;\n        if (index === 0) {\n          classList.add('prev');\n        } else if (index === 11) {\n          classList.add('next');\n        }\n        if (current < _this2.minYear || current > _this2.maxYear) {\n          classList.add('disabled');\n        }\n        if (_this2.range) {\n          var _this2$range = _slicedToArray(_this2.range, 2),\n            rangeStart = _this2$range[0],\n            rangeEnd = _this2$range[1];\n          if (current > rangeStart && current < rangeEnd) {\n            classList.add('range');\n          }\n          if (current === rangeStart) {\n            classList.add('range-start');\n          }\n          if (current === rangeEnd) {\n            classList.add('range-end');\n          }\n        }\n        if (_this2.selected.includes(current)) {\n          classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n          classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n        }\n        if (current === _this2.focused) {\n          classList.add('focused');\n        }\n        if (_this2.beforeShow) {\n          _this2.performBeforeHook(el, current, date);\n        }\n      });\n    }\n\n    // Update the view UI by applying the changes of selected and focused items\n  }, {\n    key: \"refresh\",\n    value: function refresh() {\n      var _this3 = this;\n      var _ref = this.range || [],\n        _ref2 = _slicedToArray(_ref, 2),\n        rangeStart = _ref2[0],\n        rangeEnd = _ref2[1];\n      this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) {\n        el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark!bg-primary-600', 'dark:text-white', 'focused');\n      });\n      Array.from(this.grid.children).forEach(function (el) {\n        var current = Number(el.textContent);\n        var classList = el.classList;\n        if (current > rangeStart && current < rangeEnd) {\n          classList.add('range');\n        }\n        if (current === rangeStart) {\n          classList.add('range-start');\n        }\n        if (current === rangeEnd) {\n          classList.add('range-end');\n        }\n        if (_this3.selected.includes(current)) {\n          classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n          classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n        }\n        if (current === _this3.focused) {\n          classList.add('focused');\n        }\n      });\n    }\n\n    // Update the view UI by applying the change of focused item\n  }, {\n    key: \"refreshFocus\",\n    value: function refreshFocus() {\n      var index = Math.round((this.focused - this.start) / this.step);\n      this.grid.querySelectorAll('.focused').forEach(function (el) {\n        el.classList.remove('focused');\n      });\n      this.grid.children[index].classList.add('focused');\n    }\n  }]);\n}(View);\n\nfunction triggerDatepickerEvent(datepicker, type) {\n  var detail = {\n    date: datepicker.getDate(),\n    viewDate: new Date(datepicker.picker.viewDate),\n    viewId: datepicker.picker.currentView.id,\n    datepicker: datepicker\n  };\n  datepicker.element.dispatchEvent(new CustomEvent(type, {\n    detail: detail\n  }));\n}\n\n// direction: -1 (to previous), 1 (to next)\nfunction goToPrevOrNext(datepicker, direction) {\n  var _datepicker$config = datepicker.config,\n    minDate = _datepicker$config.minDate,\n    maxDate = _datepicker$config.maxDate;\n  var _datepicker$picker = datepicker.picker,\n    currentView = _datepicker$picker.currentView,\n    viewDate = _datepicker$picker.viewDate;\n  var newViewDate;\n  switch (currentView.id) {\n    case 0:\n      newViewDate = addMonths(viewDate, direction);\n      break;\n    case 1:\n      newViewDate = addYears(viewDate, direction);\n      break;\n    default:\n      newViewDate = addYears(viewDate, direction * currentView.navStep);\n  }\n  newViewDate = limitToRange(newViewDate, minDate, maxDate);\n  datepicker.picker.changeFocus(newViewDate).render();\n}\nfunction switchView(datepicker) {\n  var viewId = datepicker.picker.currentView.id;\n  if (viewId === datepicker.config.maxView) {\n    return;\n  }\n  datepicker.picker.changeView(viewId + 1).render();\n}\nfunction unfocus(datepicker) {\n  if (datepicker.config.updateOnBlur) {\n    datepicker.update({\n      autohide: true\n    });\n  } else {\n    datepicker.refresh('input');\n    datepicker.hide();\n  }\n}\n\nfunction goToSelectedMonthOrYear(datepicker, selection) {\n  var picker = datepicker.picker;\n  var viewDate = new Date(picker.viewDate);\n  var viewId = picker.currentView.id;\n  var newDate = viewId === 1 ? addMonths(viewDate, selection - viewDate.getMonth()) : addYears(viewDate, selection - viewDate.getFullYear());\n  picker.changeFocus(newDate).changeView(viewId - 1).render();\n}\nfunction onClickTodayBtn(datepicker) {\n  var picker = datepicker.picker;\n  var currentDate = today();\n  if (datepicker.config.todayBtnMode === 1) {\n    if (datepicker.config.autohide) {\n      datepicker.setDate(currentDate);\n      return;\n    }\n    datepicker.setDate(currentDate, {\n      render: false\n    });\n    picker.update();\n  }\n  if (picker.viewDate !== currentDate) {\n    picker.changeFocus(currentDate);\n  }\n  picker.changeView(0).render();\n}\nfunction onClickClearBtn(datepicker) {\n  datepicker.setDate({\n    clear: true\n  });\n}\nfunction onClickViewSwitch(datepicker) {\n  switchView(datepicker);\n}\nfunction onClickPrevBtn(datepicker) {\n  goToPrevOrNext(datepicker, -1);\n}\nfunction onClickNextBtn(datepicker) {\n  goToPrevOrNext(datepicker, 1);\n}\n\n// For the picker's main block to delegete the events from `datepicker-cell`s\nfunction onClickView(datepicker, ev) {\n  var target = findElementInEventPath(ev, '.datepicker-cell');\n  if (!target || target.classList.contains('disabled')) {\n    return;\n  }\n  var _datepicker$picker$cu = datepicker.picker.currentView,\n    id = _datepicker$picker$cu.id,\n    isMinView = _datepicker$picker$cu.isMinView;\n  if (isMinView) {\n    datepicker.setDate(Number(target.dataset.date));\n  } else if (id === 1) {\n    goToSelectedMonthOrYear(datepicker, Number(target.dataset.month));\n  } else {\n    goToSelectedMonthOrYear(datepicker, Number(target.dataset.year));\n  }\n}\nfunction onClickPicker(datepicker) {\n  if (!datepicker.inline && !datepicker.config.disableTouchKeyboard) {\n    datepicker.inputField.focus();\n  }\n}\n\nfunction processPickerOptions(picker, options) {\n  if (options.title !== undefined) {\n    if (options.title) {\n      picker.controls.title.textContent = options.title;\n      showElement(picker.controls.title);\n    } else {\n      picker.controls.title.textContent = '';\n      hideElement(picker.controls.title);\n    }\n  }\n  if (options.prevArrow) {\n    var prevBtn = picker.controls.prevBtn;\n    emptyChildNodes(prevBtn);\n    options.prevArrow.forEach(function (node) {\n      prevBtn.appendChild(node.cloneNode(true));\n    });\n  }\n  if (options.nextArrow) {\n    var nextBtn = picker.controls.nextBtn;\n    emptyChildNodes(nextBtn);\n    options.nextArrow.forEach(function (node) {\n      nextBtn.appendChild(node.cloneNode(true));\n    });\n  }\n  if (options.locale) {\n    picker.controls.todayBtn.textContent = options.locale.today;\n    picker.controls.clearBtn.textContent = options.locale.clear;\n  }\n  if (options.todayBtn !== undefined) {\n    if (options.todayBtn) {\n      showElement(picker.controls.todayBtn);\n    } else {\n      hideElement(picker.controls.todayBtn);\n    }\n  }\n  if (hasProperty(options, 'minDate') || hasProperty(options, 'maxDate')) {\n    var _picker$datepicker$co = picker.datepicker.config,\n      minDate = _picker$datepicker$co.minDate,\n      maxDate = _picker$datepicker$co.maxDate;\n    picker.controls.todayBtn.disabled = !isInRange(today(), minDate, maxDate);\n  }\n  if (options.clearBtn !== undefined) {\n    if (options.clearBtn) {\n      showElement(picker.controls.clearBtn);\n    } else {\n      hideElement(picker.controls.clearBtn);\n    }\n  }\n}\n\n// Compute view date to reset, which will be...\n// - the last item of the selected dates or defaultViewDate if no selection\n// - limitted to minDate or maxDate if it exceeds the range\nfunction computeResetViewDate(datepicker) {\n  var dates = datepicker.dates,\n    config = datepicker.config;\n  var viewDate = dates.length > 0 ? lastItemOf(dates) : config.defaultViewDate;\n  return limitToRange(viewDate, config.minDate, config.maxDate);\n}\n\n// Change current view's view date\nfunction setViewDate(picker, newDate) {\n  var oldViewDate = new Date(picker.viewDate);\n  var newViewDate = new Date(newDate);\n  var _picker$currentView = picker.currentView,\n    id = _picker$currentView.id,\n    year = _picker$currentView.year,\n    first = _picker$currentView.first,\n    last = _picker$currentView.last;\n  var viewYear = newViewDate.getFullYear();\n  picker.viewDate = newDate;\n  if (viewYear !== oldViewDate.getFullYear()) {\n    triggerDatepickerEvent(picker.datepicker, 'changeYear');\n  }\n  if (newViewDate.getMonth() !== oldViewDate.getMonth()) {\n    triggerDatepickerEvent(picker.datepicker, 'changeMonth');\n  }\n\n  // return whether the new date is in different period on time from the one\n  // displayed in the current view\n  // when true, the view needs to be re-rendered on the next UI refresh.\n  switch (id) {\n    case 0:\n      return newDate < first || newDate > last;\n    case 1:\n      return viewYear !== year;\n    default:\n      return viewYear < first || viewYear > last;\n  }\n}\nfunction getTextDirection(el) {\n  return window.getComputedStyle(el).direction;\n}\n\n// Class representing the picker UI\nvar Picker = /*#__PURE__*/function () {\n  function Picker(datepicker) {\n    _classCallCheck(this, Picker);\n    this.datepicker = datepicker;\n    var template = pickerTemplate.replace(/%buttonClass%/g, datepicker.config.buttonClass);\n    var element = this.element = parseHTML(template).firstChild;\n    var _element$firstChild$c = _slicedToArray(element.firstChild.children, 3),\n      header = _element$firstChild$c[0],\n      main = _element$firstChild$c[1],\n      footer = _element$firstChild$c[2];\n    var title = header.firstElementChild;\n    var _header$lastElementCh = _slicedToArray(header.lastElementChild.children, 3),\n      prevBtn = _header$lastElementCh[0],\n      viewSwitch = _header$lastElementCh[1],\n      nextBtn = _header$lastElementCh[2];\n    var _footer$firstChild$ch = _slicedToArray(footer.firstChild.children, 2),\n      todayBtn = _footer$firstChild$ch[0],\n      clearBtn = _footer$firstChild$ch[1];\n    var controls = {\n      title: title,\n      prevBtn: prevBtn,\n      viewSwitch: viewSwitch,\n      nextBtn: nextBtn,\n      todayBtn: todayBtn,\n      clearBtn: clearBtn\n    };\n    this.main = main;\n    this.controls = controls;\n    var elementClass = datepicker.inline ? 'inline' : 'dropdown';\n    element.classList.add(\"datepicker-\".concat(elementClass));\n    elementClass === 'dropdown' ? element.classList.add('dropdown', 'absolute', 'top-0', 'left-0', 'z-50', 'pt-2') : null;\n    processPickerOptions(this, datepicker.config);\n    this.viewDate = computeResetViewDate(datepicker);\n\n    // set up event listeners\n    registerListeners(datepicker, [[element, 'click', onClickPicker.bind(null, datepicker), {\n      capture: true\n    }], [main, 'click', onClickView.bind(null, datepicker)], [controls.viewSwitch, 'click', onClickViewSwitch.bind(null, datepicker)], [controls.prevBtn, 'click', onClickPrevBtn.bind(null, datepicker)], [controls.nextBtn, 'click', onClickNextBtn.bind(null, datepicker)], [controls.todayBtn, 'click', onClickTodayBtn.bind(null, datepicker)], [controls.clearBtn, 'click', onClickClearBtn.bind(null, datepicker)]]);\n\n    // set up views\n    this.views = [new DaysView(this), new MonthsView(this), new YearsView(this, {\n      id: 2,\n      name: 'years',\n      cellClass: 'year',\n      step: 1\n    }), new YearsView(this, {\n      id: 3,\n      name: 'decades',\n      cellClass: 'decade',\n      step: 10\n    })];\n    this.currentView = this.views[datepicker.config.startView];\n    this.currentView.render();\n    this.main.appendChild(this.currentView.element);\n    datepicker.config.container.appendChild(this.element);\n  }\n  return _createClass(Picker, [{\n    key: \"setOptions\",\n    value: function setOptions(options) {\n      processPickerOptions(this, options);\n      this.views.forEach(function (view) {\n        view.init(options, false);\n      });\n      this.currentView.render();\n    }\n  }, {\n    key: \"detach\",\n    value: function detach() {\n      this.datepicker.config.container.removeChild(this.element);\n    }\n  }, {\n    key: \"show\",\n    value: function show() {\n      if (this.active) {\n        return;\n      }\n      this.element.classList.add('active', 'block');\n      this.element.classList.remove('hidden');\n      this.active = true;\n      var datepicker = this.datepicker;\n      if (!datepicker.inline) {\n        // ensure picker's direction matches input's\n        var inputDirection = getTextDirection(datepicker.inputField);\n        if (inputDirection !== getTextDirection(datepicker.config.container)) {\n          this.element.dir = inputDirection;\n        } else if (this.element.dir) {\n          this.element.removeAttribute('dir');\n        }\n        this.place();\n        if (datepicker.config.disableTouchKeyboard) {\n          datepicker.inputField.blur();\n        }\n      }\n      triggerDatepickerEvent(datepicker, 'show');\n    }\n  }, {\n    key: \"hide\",\n    value: function hide() {\n      if (!this.active) {\n        return;\n      }\n      this.datepicker.exitEditMode();\n      this.element.classList.remove('active', 'block');\n      this.element.classList.add('active', 'block', 'hidden');\n      this.active = false;\n      triggerDatepickerEvent(this.datepicker, 'hide');\n    }\n  }, {\n    key: \"place\",\n    value: function place() {\n      var _this$element = this.element,\n        classList = _this$element.classList,\n        style = _this$element.style;\n      var _this$datepicker = this.datepicker,\n        config = _this$datepicker.config,\n        inputField = _this$datepicker.inputField;\n      var container = config.container;\n      var _this$element$getBoun = this.element.getBoundingClientRect(),\n        calendarWidth = _this$element$getBoun.width,\n        calendarHeight = _this$element$getBoun.height;\n      var _container$getBoundin = container.getBoundingClientRect(),\n        containerLeft = _container$getBoundin.left,\n        containerTop = _container$getBoundin.top,\n        containerWidth = _container$getBoundin.width;\n      var _inputField$getBoundi = inputField.getBoundingClientRect(),\n        inputLeft = _inputField$getBoundi.left,\n        inputTop = _inputField$getBoundi.top,\n        inputWidth = _inputField$getBoundi.width,\n        inputHeight = _inputField$getBoundi.height;\n      var _config$orientation = config.orientation,\n        orientX = _config$orientation.x,\n        orientY = _config$orientation.y;\n      var scrollTop;\n      var left;\n      var top;\n      if (container === document.body) {\n        scrollTop = window.scrollY;\n        left = inputLeft + window.scrollX;\n        top = inputTop + scrollTop;\n      } else {\n        scrollTop = container.scrollTop;\n        left = inputLeft - containerLeft;\n        top = inputTop - containerTop + scrollTop;\n      }\n      if (orientX === 'auto') {\n        if (left < 0) {\n          // align to the left and move into visible area if input's left edge < window's\n          orientX = 'left';\n          left = 10;\n        } else if (left + calendarWidth > containerWidth) {\n          // align to the right if canlendar's right edge > container's\n          orientX = 'right';\n        } else {\n          orientX = getTextDirection(inputField) === 'rtl' ? 'right' : 'left';\n        }\n      }\n      if (orientX === 'right') {\n        left -= calendarWidth - inputWidth;\n      }\n      if (orientY === 'auto') {\n        orientY = top - calendarHeight < scrollTop ? 'bottom' : 'top';\n      }\n      if (orientY === 'top') {\n        top -= calendarHeight;\n      } else {\n        top += inputHeight;\n      }\n      classList.remove('datepicker-orient-top', 'datepicker-orient-bottom', 'datepicker-orient-right', 'datepicker-orient-left');\n      classList.add(\"datepicker-orient-\".concat(orientY), \"datepicker-orient-\".concat(orientX));\n      style.top = top ? \"\".concat(top, \"px\") : top;\n      style.left = left ? \"\".concat(left, \"px\") : left;\n    }\n  }, {\n    key: \"setViewSwitchLabel\",\n    value: function setViewSwitchLabel(labelText) {\n      this.controls.viewSwitch.textContent = labelText;\n    }\n  }, {\n    key: \"setPrevBtnDisabled\",\n    value: function setPrevBtnDisabled(disabled) {\n      this.controls.prevBtn.disabled = disabled;\n    }\n  }, {\n    key: \"setNextBtnDisabled\",\n    value: function setNextBtnDisabled(disabled) {\n      this.controls.nextBtn.disabled = disabled;\n    }\n  }, {\n    key: \"changeView\",\n    value: function changeView(viewId) {\n      var oldView = this.currentView;\n      var newView = this.views[viewId];\n      if (newView.id !== oldView.id) {\n        this.currentView = newView;\n        this._renderMethod = 'render';\n        triggerDatepickerEvent(this.datepicker, 'changeView');\n        this.main.replaceChild(newView.element, oldView.element);\n      }\n      return this;\n    }\n\n    // Change the focused date (view date)\n  }, {\n    key: \"changeFocus\",\n    value: function changeFocus(newViewDate) {\n      this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refreshFocus';\n      this.views.forEach(function (view) {\n        view.updateFocus();\n      });\n      return this;\n    }\n\n    // Apply the change of the selected dates\n  }, {\n    key: \"update\",\n    value: function update() {\n      var newViewDate = computeResetViewDate(this.datepicker);\n      this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refresh';\n      this.views.forEach(function (view) {\n        view.updateFocus();\n        view.updateSelection();\n      });\n      return this;\n    }\n\n    // Refresh the picker UI\n  }, {\n    key: \"render\",\n    value: function render() {\n      var quickRender = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n      var renderMethod = quickRender && this._renderMethod || 'render';\n      delete this._renderMethod;\n      this.currentView[renderMethod]();\n    }\n  }]);\n}();\n\n// Find the closest date that doesn't meet the condition for unavailable date\n// Returns undefined if no available date is found\n// addFn: function to calculate the next date\n//   - args: time value, amount\n// increase: amount to pass to addFn\n// testFn: function to test the unavailablity of the date\n//   - args: time value; retun: true if unavailable\nfunction findNextAvailableOne(date, addFn, increase, testFn, min, max) {\n  if (!isInRange(date, min, max)) {\n    return;\n  }\n  if (testFn(date)) {\n    var newDate = addFn(date, increase);\n    return findNextAvailableOne(newDate, addFn, increase, testFn, min, max);\n  }\n  return date;\n}\n\n// direction: -1 (left/up), 1 (right/down)\n// vertical: true for up/down, false for left/right\nfunction moveByArrowKey(datepicker, ev, direction, vertical) {\n  var picker = datepicker.picker;\n  var currentView = picker.currentView;\n  var step = currentView.step || 1;\n  var viewDate = picker.viewDate;\n  var addFn;\n  var testFn;\n  switch (currentView.id) {\n    case 0:\n      if (vertical) {\n        viewDate = addDays(viewDate, direction * 7);\n      } else if (ev.ctrlKey || ev.metaKey) {\n        viewDate = addYears(viewDate, direction);\n      } else {\n        viewDate = addDays(viewDate, direction);\n      }\n      addFn = addDays;\n      testFn = function testFn(date) {\n        return currentView.disabled.includes(date);\n      };\n      break;\n    case 1:\n      viewDate = addMonths(viewDate, vertical ? direction * 4 : direction);\n      addFn = addMonths;\n      testFn = function testFn(date) {\n        var dt = new Date(date);\n        var year = currentView.year,\n          disabled = currentView.disabled;\n        return dt.getFullYear() === year && disabled.includes(dt.getMonth());\n      };\n      break;\n    default:\n      viewDate = addYears(viewDate, direction * (vertical ? 4 : 1) * step);\n      addFn = addYears;\n      testFn = function testFn(date) {\n        return currentView.disabled.includes(startOfYearPeriod(date, step));\n      };\n  }\n  viewDate = findNextAvailableOne(viewDate, addFn, direction < 0 ? -step : step, testFn, currentView.minDate, currentView.maxDate);\n  if (viewDate !== undefined) {\n    picker.changeFocus(viewDate).render();\n  }\n}\nfunction onKeydown(datepicker, ev) {\n  if (ev.key === 'Tab') {\n    unfocus(datepicker);\n    return;\n  }\n  var picker = datepicker.picker;\n  var _picker$currentView = picker.currentView,\n    id = _picker$currentView.id,\n    isMinView = _picker$currentView.isMinView;\n  if (!picker.active) {\n    switch (ev.key) {\n      case 'ArrowDown':\n      case 'Escape':\n        picker.show();\n        break;\n      case 'Enter':\n        datepicker.update();\n        break;\n      default:\n        return;\n    }\n  } else if (datepicker.editMode) {\n    switch (ev.key) {\n      case 'Escape':\n        picker.hide();\n        break;\n      case 'Enter':\n        datepicker.exitEditMode({\n          update: true,\n          autohide: datepicker.config.autohide\n        });\n        break;\n      default:\n        return;\n    }\n  } else {\n    switch (ev.key) {\n      case 'Escape':\n        picker.hide();\n        break;\n      case 'ArrowLeft':\n        if (ev.ctrlKey || ev.metaKey) {\n          goToPrevOrNext(datepicker, -1);\n        } else if (ev.shiftKey) {\n          datepicker.enterEditMode();\n          return;\n        } else {\n          moveByArrowKey(datepicker, ev, -1, false);\n        }\n        break;\n      case 'ArrowRight':\n        if (ev.ctrlKey || ev.metaKey) {\n          goToPrevOrNext(datepicker, 1);\n        } else if (ev.shiftKey) {\n          datepicker.enterEditMode();\n          return;\n        } else {\n          moveByArrowKey(datepicker, ev, 1, false);\n        }\n        break;\n      case 'ArrowUp':\n        if (ev.ctrlKey || ev.metaKey) {\n          switchView(datepicker);\n        } else if (ev.shiftKey) {\n          datepicker.enterEditMode();\n          return;\n        } else {\n          moveByArrowKey(datepicker, ev, -1, true);\n        }\n        break;\n      case 'ArrowDown':\n        if (ev.shiftKey && !ev.ctrlKey && !ev.metaKey) {\n          datepicker.enterEditMode();\n          return;\n        }\n        moveByArrowKey(datepicker, ev, 1, true);\n        break;\n      case 'Enter':\n        if (isMinView) {\n          datepicker.setDate(picker.viewDate);\n        } else {\n          picker.changeView(id - 1).render();\n        }\n        break;\n      case 'Backspace':\n      case 'Delete':\n        datepicker.enterEditMode();\n        return;\n      default:\n        if (ev.key.length === 1 && !ev.ctrlKey && !ev.metaKey) {\n          datepicker.enterEditMode();\n        }\n        return;\n    }\n  }\n  ev.preventDefault();\n  ev.stopPropagation();\n}\nfunction onFocus(datepicker) {\n  if (datepicker.config.showOnFocus && !datepicker._showing) {\n    datepicker.show();\n  }\n}\n\n// for the prevention for entering edit mode while getting focus on click\nfunction onMousedown(datepicker, ev) {\n  var el = ev.target;\n  if (datepicker.picker.active || datepicker.config.showOnClick) {\n    el._active = el === document.activeElement;\n    el._clicking = setTimeout(function () {\n      delete el._active;\n      delete el._clicking;\n    }, 2000);\n  }\n}\nfunction onClickInput(datepicker, ev) {\n  var el = ev.target;\n  if (!el._clicking) {\n    return;\n  }\n  clearTimeout(el._clicking);\n  delete el._clicking;\n  if (el._active) {\n    datepicker.enterEditMode();\n  }\n  delete el._active;\n  if (datepicker.config.showOnClick) {\n    datepicker.show();\n  }\n}\nfunction onPaste(datepicker, ev) {\n  if (ev.clipboardData.types.includes('text/plain')) {\n    datepicker.enterEditMode();\n  }\n}\n\n// for the `document` to delegate the events from outside the picker/input field\nfunction onClickOutside(datepicker, ev) {\n  var element = datepicker.element;\n  if (element !== document.activeElement) {\n    return;\n  }\n  var pickerElem = datepicker.picker.element;\n  if (findElementInEventPath(ev, function (el) {\n    return el === element || el === pickerElem;\n  })) {\n    return;\n  }\n  unfocus(datepicker);\n}\n\nfunction stringifyDates(dates, config) {\n  return dates.map(function (dt) {\n    return formatDate(dt, config.format, config.locale);\n  }).join(config.dateDelimiter);\n}\n\n// parse input dates and create an array of time values for selection\n// returns undefined if there are no valid dates in inputDates\n// when origDates (current selection) is passed, the function works to mix\n// the input dates into the current selection\nfunction processInputDates(datepicker, inputDates) {\n  var clear = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n  var config = datepicker.config,\n    origDates = datepicker.dates,\n    rangepicker = datepicker.rangepicker;\n  if (inputDates.length === 0) {\n    // empty input is considered valid unless origiDates is passed\n    return clear ? [] : undefined;\n  }\n  var rangeEnd = rangepicker && datepicker === rangepicker.datepickers[1];\n  var newDates = inputDates.reduce(function (dates, dt) {\n    var date = parseDate(dt, config.format, config.locale);\n    if (date === undefined) {\n      return dates;\n    }\n    if (config.pickLevel > 0) {\n      // adjust to 1st of the month/Jan 1st of the year\n      // or to the last day of the monh/Dec 31st of the year if the datepicker\n      // is the range-end picker of a rangepicker\n      var _dt = new Date(date);\n      if (config.pickLevel === 1) {\n        date = rangeEnd ? _dt.setMonth(_dt.getMonth() + 1, 0) : _dt.setDate(1);\n      } else {\n        date = rangeEnd ? _dt.setFullYear(_dt.getFullYear() + 1, 0, 0) : _dt.setMonth(0, 1);\n      }\n    }\n    if (isInRange(date, config.minDate, config.maxDate) && !dates.includes(date) && !config.datesDisabled.includes(date) && !config.daysOfWeekDisabled.includes(new Date(date).getDay())) {\n      dates.push(date);\n    }\n    return dates;\n  }, []);\n  if (newDates.length === 0) {\n    return;\n  }\n  if (config.multidate && !clear) {\n    // get the synmetric difference between origDates and newDates\n    newDates = newDates.reduce(function (dates, date) {\n      if (!origDates.includes(date)) {\n        dates.push(date);\n      }\n      return dates;\n    }, origDates.filter(function (date) {\n      return !newDates.includes(date);\n    }));\n  }\n  // do length check always because user can input multiple dates regardless of the mode\n  return config.maxNumberOfDates && newDates.length > config.maxNumberOfDates ? newDates.slice(config.maxNumberOfDates * -1) : newDates;\n}\n\n// refresh the UI elements\n// modes: 1: input only, 2, picker only, 3 both\nfunction refreshUI(datepicker) {\n  var mode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3;\n  var quickRender = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n  var config = datepicker.config,\n    picker = datepicker.picker,\n    inputField = datepicker.inputField;\n  if (mode & 2) {\n    var newView = picker.active ? config.pickLevel : config.startView;\n    picker.update().changeView(newView).render(quickRender);\n  }\n  if (mode & 1 && inputField) {\n    inputField.value = stringifyDates(datepicker.dates, config);\n  }\n}\nfunction _setDate(datepicker, inputDates, options) {\n  var clear = options.clear,\n    render = options.render,\n    autohide = options.autohide;\n  if (render === undefined) {\n    render = true;\n  }\n  if (!render) {\n    autohide = false;\n  } else if (autohide === undefined) {\n    autohide = datepicker.config.autohide;\n  }\n  var newDates = processInputDates(datepicker, inputDates, clear);\n  if (!newDates) {\n    return;\n  }\n  if (newDates.toString() !== datepicker.dates.toString()) {\n    datepicker.dates = newDates;\n    refreshUI(datepicker, render ? 3 : 1);\n    triggerDatepickerEvent(datepicker, 'changeDate');\n  } else {\n    refreshUI(datepicker, 1);\n  }\n  if (autohide) {\n    datepicker.hide();\n  }\n}\n\n/**\r\n * Class representing a date picker\r\n */\nvar Datepicker = /*#__PURE__*/function () {\n  /**\r\n   * Create a date picker\r\n   * @param  {Element} element - element to bind a date picker\r\n   * @param  {Object} [options] - config options\r\n   * @param  {DateRangePicker} [rangepicker] - DateRangePicker instance the\r\n   * date picker belongs to. Use this only when creating date picker as a part\r\n   * of date range picker\r\n   */\n  function Datepicker(element) {\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    var rangepicker = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;\n    _classCallCheck(this, Datepicker);\n    element.datepicker = this;\n    this.element = element;\n\n    // set up config\n    var config = this.config = Object.assign({\n      buttonClass: options.buttonClass && String(options.buttonClass) || 'button',\n      container: document.body,\n      defaultViewDate: today(),\n      maxDate: undefined,\n      minDate: undefined\n    }, processOptions(defaultOptions, this));\n    this._options = options;\n    Object.assign(config, processOptions(options, this));\n\n    // configure by type\n    var inline = this.inline = element.tagName !== 'INPUT';\n    var inputField;\n    var initialDates;\n    if (inline) {\n      config.container = element;\n      initialDates = stringToArray(element.dataset.date, config.dateDelimiter);\n      delete element.dataset.date;\n    } else {\n      var container = options.container ? document.querySelector(options.container) : null;\n      if (container) {\n        config.container = container;\n      }\n      inputField = this.inputField = element;\n      inputField.classList.add('datepicker-input');\n      initialDates = stringToArray(inputField.value, config.dateDelimiter);\n    }\n    if (rangepicker) {\n      // check validiry\n      var index = rangepicker.inputs.indexOf(inputField);\n      var datepickers = rangepicker.datepickers;\n      if (index < 0 || index > 1 || !Array.isArray(datepickers)) {\n        throw Error('Invalid rangepicker object.');\n      }\n      // attach itaelf to the rangepicker here so that processInputDates() can\n      // determine if this is the range-end picker of the rangepicker while\n      // setting inital values when pickLevel > 0\n      datepickers[index] = this;\n      // add getter for rangepicker\n      Object.defineProperty(this, 'rangepicker', {\n        get: function get() {\n          return rangepicker;\n        }\n      });\n    }\n\n    // set initial dates\n    this.dates = [];\n    // process initial value\n    var inputDateValues = processInputDates(this, initialDates);\n    if (inputDateValues && inputDateValues.length > 0) {\n      this.dates = inputDateValues;\n    }\n    if (inputField) {\n      inputField.value = stringifyDates(this.dates, config);\n    }\n    var picker = this.picker = new Picker(this);\n    if (inline) {\n      this.show();\n    } else {\n      // set up event listeners in other modes\n      var onMousedownDocument = onClickOutside.bind(null, this);\n      var listeners = [[inputField, 'keydown', onKeydown.bind(null, this)], [inputField, 'focus', onFocus.bind(null, this)], [inputField, 'mousedown', onMousedown.bind(null, this)], [inputField, 'click', onClickInput.bind(null, this)], [inputField, 'paste', onPaste.bind(null, this)], [document, 'mousedown', onMousedownDocument], [document, 'touchstart', onMousedownDocument], [window, 'resize', picker.place.bind(picker)]];\n      registerListeners(this, listeners);\n    }\n  }\n\n  /**\r\n   * Format Date object or time value in given format and language\r\n   * @param  {Date|Number} date - date or time value to format\r\n   * @param  {String|Object} format - format string or object that contains\r\n   * toDisplay() custom formatter, whose signature is\r\n   * - args:\r\n   *   - date: {Date} - Date instance of the date passed to the method\r\n   *   - format: {Object} - the format object passed to the method\r\n   *   - locale: {Object} - locale for the language specified by `lang`\r\n   * - return:\r\n   *     {String} formatted date\r\n   * @param  {String} [lang=en] - language code for the locale to use\r\n   * @return {String} formatted date\r\n   */\n  return _createClass(Datepicker, [{\n    key: \"active\",\n    get:\n    /**\r\n     * @type {Boolean} - Whether the picker element is shown. `true` whne shown\r\n     */\n    function get() {\n      return !!(this.picker && this.picker.active);\n    }\n\n    /**\r\n     * @type {HTMLDivElement} - DOM object of picker element\r\n     */\n  }, {\n    key: \"pickerElement\",\n    get: function get() {\n      return this.picker ? this.picker.element : undefined;\n    }\n\n    /**\r\n     * Set new values to the config options\r\n     * @param {Object} options - config options to update\r\n     */\n  }, {\n    key: \"setOptions\",\n    value: function setOptions(options) {\n      var picker = this.picker;\n      var newOptions = processOptions(options, this);\n      Object.assign(this._options, options);\n      Object.assign(this.config, newOptions);\n      picker.setOptions(newOptions);\n      refreshUI(this, 3);\n    }\n\n    /**\r\n     * Show the picker element\r\n     */\n  }, {\n    key: \"show\",\n    value: function show() {\n      if (this.inputField) {\n        if (this.inputField.disabled) {\n          return;\n        }\n        if (this.inputField !== document.activeElement) {\n          this._showing = true;\n          this.inputField.focus();\n          delete this._showing;\n        }\n      }\n      this.picker.show();\n    }\n\n    /**\r\n     * Hide the picker element\r\n     * Not available on inline picker\r\n     */\n  }, {\n    key: \"hide\",\n    value: function hide() {\n      if (this.inline) {\n        return;\n      }\n      this.picker.hide();\n      this.picker.update().changeView(this.config.startView).render();\n    }\n\n    /**\r\n     * Destroy the Datepicker instance\r\n     * @return {Detepicker} - the instance destroyed\r\n     */\n  }, {\n    key: \"destroy\",\n    value: function destroy() {\n      this.hide();\n      unregisterListeners(this);\n      this.picker.detach();\n      if (!this.inline) {\n        this.inputField.classList.remove('datepicker-input');\n      }\n      delete this.element.datepicker;\n      return this;\n    }\n\n    /**\r\n     * Get the selected date(s)\r\n     *\r\n     * The method returns a Date object of selected date by default, and returns\r\n     * an array of selected dates in multidate mode. If format string is passed,\r\n     * it returns date string(s) formatted in given format.\r\n     *\r\n     * @param  {String} [format] - Format string to stringify the date(s)\r\n     * @return {Date|String|Date[]|String[]} - selected date(s), or if none is\r\n     * selected, empty array in multidate mode and untitled in sigledate mode\r\n     */\n  }, {\n    key: \"getDate\",\n    value: function getDate() {\n      var _this = this;\n      var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n      var callback = format ? function (date) {\n        return formatDate(date, format, _this.config.locale);\n      } : function (date) {\n        return new Date(date);\n      };\n      if (this.config.multidate) {\n        return this.dates.map(callback);\n      }\n      if (this.dates.length > 0) {\n        return callback(this.dates[0]);\n      }\n    }\n\n    /**\r\n     * Set selected date(s)\r\n     *\r\n     * In multidate mode, you can pass multiple dates as a series of arguments\r\n     * or an array. (Since each date is parsed individually, the type of the\r\n     * dates doesn't have to be the same.)\r\n     * The given dates are used to toggle the select status of each date. The\r\n     * number of selected dates is kept from exceeding the length set to\r\n     * maxNumberOfDates.\r\n     *\r\n     * With clear: true option, the method can be used to clear the selection\r\n     * and to replace the selection instead of toggling in multidate mode.\r\n     * If the option is passed with no date arguments or an empty dates array,\r\n     * it works as \"clear\" (clear the selection then set nothing), and if the\r\n     * option is passed with new dates to select, it works as \"replace\" (clear\r\n     * the selection then set the given dates)\r\n     *\r\n     * When render: false option is used, the method omits re-rendering the\r\n     * picker element. In this case, you need to call refresh() method later in\r\n     * order for the picker element to reflect the changes. The input field is\r\n     * refreshed always regardless of this option.\r\n     *\r\n     * When invalid (unparsable, repeated, disabled or out-of-range) dates are\r\n     * passed, the method ignores them and applies only valid ones. In the case\r\n     * that all the given dates are invalid, which is distinguished from passing\r\n     * no dates, the method considers it as an error and leaves the selection\r\n     * untouched.\r\n     *\r\n     * @param {...(Date|Number|String)|Array} [dates] - Date strings, Date\r\n     * objects, time values or mix of those for new selection\r\n     * @param {Object} [options] - function options\r\n     * - clear: {boolean} - Whether to clear the existing selection\r\n     *     defualt: false\r\n     * - render: {boolean} - Whether to re-render the picker element\r\n     *     default: true\r\n     * - autohide: {boolean} - Whether to hide the picker element after re-render\r\n     *     Ignored when used with render: false\r\n     *     default: config.autohide\r\n     */\n  }, {\n    key: \"setDate\",\n    value: function setDate() {\n      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n        args[_key] = arguments[_key];\n      }\n      var dates = [].concat(args);\n      var opts = {};\n      var lastArg = lastItemOf(args);\n      if (_typeof(lastArg) === 'object' && !Array.isArray(lastArg) && !(lastArg instanceof Date) && lastArg) {\n        Object.assign(opts, dates.pop());\n      }\n      var inputDates = Array.isArray(dates[0]) ? dates[0] : dates;\n      _setDate(this, inputDates, opts);\n    }\n\n    /**\r\n     * Update the selected date(s) with input field's value\r\n     * Not available on inline picker\r\n     *\r\n     * The input field will be refreshed with properly formatted date string.\r\n     *\r\n     * @param  {Object} [options] - function options\r\n     * - autohide: {boolean} - whether to hide the picker element after refresh\r\n     *     default: false\r\n     */\n  }, {\n    key: \"update\",\n    value: function update() {\n      var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n      if (this.inline) {\n        return;\n      }\n      var opts = {\n        clear: true,\n        autohide: !!(options && options.autohide)\n      };\n      var inputDates = stringToArray(this.inputField.value, this.config.dateDelimiter);\n      _setDate(this, inputDates, opts);\n    }\n\n    /**\r\n     * Refresh the picker element and the associated input field\r\n     * @param {String} [target] - target item when refreshing one item only\r\n     * 'picker' or 'input'\r\n     * @param {Boolean} [forceRender] - whether to re-render the picker element\r\n     * regardless of its state instead of optimized refresh\r\n     */\n  }, {\n    key: \"refresh\",\n    value: function refresh() {\n      var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n      var forceRender = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n      if (target && typeof target !== 'string') {\n        forceRender = target;\n        target = undefined;\n      }\n      var mode;\n      if (target === 'picker') {\n        mode = 2;\n      } else if (target === 'input') {\n        mode = 1;\n      } else {\n        mode = 3;\n      }\n      refreshUI(this, mode, !forceRender);\n    }\n\n    /**\r\n     * Enter edit mode\r\n     * Not available on inline picker or when the picker element is hidden\r\n     */\n  }, {\n    key: \"enterEditMode\",\n    value: function enterEditMode() {\n      if (this.inline || !this.picker.active || this.editMode) {\n        return;\n      }\n      this.editMode = true;\n      this.inputField.classList.add('in-edit', 'border-blue-700', '!border-primary-700');\n    }\n\n    /**\r\n     * Exit from edit mode\r\n     * Not available on inline picker\r\n     * @param  {Object} [options] - function options\r\n     * - update: {boolean} - whether to call update() after exiting\r\n     *     If false, input field is revert to the existing selection\r\n     *     default: false\r\n     */\n  }, {\n    key: \"exitEditMode\",\n    value: function exitEditMode() {\n      var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n      if (this.inline || !this.editMode) {\n        return;\n      }\n      var opts = Object.assign({\n        update: false\n      }, options);\n      delete this.editMode;\n      this.inputField.classList.remove('in-edit', 'border-blue-700', '!border-primary-700');\n      if (opts.update) {\n        this.update(opts);\n      }\n    }\n  }], [{\n    key: \"formatDate\",\n    value: function formatDate$1(date, format, lang) {\n      return formatDate(date, format, lang && locales[lang] || locales.en);\n    }\n\n    /**\r\n     * Parse date string\r\n     * @param  {String|Date|Number} dateStr - date string, Date object or time\r\n     * value to parse\r\n     * @param  {String|Object} format - format string or object that contains\r\n     * toValue() custom parser, whose signature is\r\n     * - args:\r\n     *   - dateStr: {String|Date|Number} - the dateStr passed to the method\r\n     *   - format: {Object} - the format object passed to the method\r\n     *   - locale: {Object} - locale for the language specified by `lang`\r\n     * - return:\r\n     *     {Date|Number} parsed date or its time value\r\n     * @param  {String} [lang=en] - language code for the locale to use\r\n     * @return {Number} time value of parsed date\r\n     */\n  }, {\n    key: \"parseDate\",\n    value: function parseDate$1(dateStr, format, lang) {\n      return parseDate(dateStr, format, lang && locales[lang] || locales.en);\n    }\n\n    /**\r\n     * @type {Object} - Installed locales in `[languageCode]: localeObject` format\r\n     * en`:_English (US)_ is pre-installed.\r\n     */\n  }, {\n    key: \"locales\",\n    get: function get() {\n      return locales;\n    }\n  }]);\n}();\n\n// filter out the config options inapproprite to pass to Datepicker\nfunction filterOptions(options) {\n  var newOpts = Object.assign({}, options);\n  delete newOpts.inputs;\n  delete newOpts.allowOneSidedRange;\n  delete newOpts.maxNumberOfDates; // to ensure each datepicker handles a single date\n\n  return newOpts;\n}\nfunction setupDatepicker(rangepicker, changeDateListener, el, options) {\n  registerListeners(rangepicker, [[el, 'changeDate', changeDateListener]]);\n  new Datepicker(el, options, rangepicker);\n}\nfunction onChangeDate(rangepicker, ev) {\n  // to prevent both datepickers trigger the other side's update each other\n  if (rangepicker._updating) {\n    return;\n  }\n  rangepicker._updating = true;\n  var target = ev.target;\n  if (target.datepicker === undefined) {\n    return;\n  }\n  var datepickers = rangepicker.datepickers;\n  var setDateOptions = {\n    render: false\n  };\n  var changedSide = rangepicker.inputs.indexOf(target);\n  var otherSide = changedSide === 0 ? 1 : 0;\n  var changedDate = datepickers[changedSide].dates[0];\n  var otherDate = datepickers[otherSide].dates[0];\n  if (changedDate !== undefined && otherDate !== undefined) {\n    // if the start of the range > the end, swap them\n    if (changedSide === 0 && changedDate > otherDate) {\n      datepickers[0].setDate(otherDate, setDateOptions);\n      datepickers[1].setDate(changedDate, setDateOptions);\n    } else if (changedSide === 1 && changedDate < otherDate) {\n      datepickers[0].setDate(changedDate, setDateOptions);\n      datepickers[1].setDate(otherDate, setDateOptions);\n    }\n  } else if (!rangepicker.allowOneSidedRange) {\n    // to prevent the range from becoming one-sided, copy changed side's\n    // selection (no matter if it's empty) to the other side\n    if (changedDate !== undefined || otherDate !== undefined) {\n      setDateOptions.clear = true;\n      datepickers[otherSide].setDate(datepickers[changedSide].dates, setDateOptions);\n    }\n  }\n  datepickers[0].picker.update().render();\n  datepickers[1].picker.update().render();\n  delete rangepicker._updating;\n}\n\n/**\r\n * Class representing a date range picker\r\n */\nvar DateRangePicker = /*#__PURE__*/function () {\n  /**\r\n   * Create a date range picker\r\n   * @param  {Element} element - element to bind a date range picker\r\n   * @param  {Object} [options] - config options\r\n   */\n  function DateRangePicker(element) {\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    _classCallCheck(this, DateRangePicker);\n    var inputs = Array.isArray(options.inputs) ? options.inputs : Array.from(element.querySelectorAll('input'));\n    if (inputs.length < 2) {\n      return;\n    }\n    element.rangepicker = this;\n    this.element = element;\n    this.inputs = inputs.slice(0, 2);\n    this.allowOneSidedRange = !!options.allowOneSidedRange;\n    var changeDateListener = onChangeDate.bind(null, this);\n    var cleanOptions = filterOptions(options);\n    // in order for initial date setup to work right when pcicLvel > 0,\n    // let Datepicker constructor add the instance to the rangepicker\n    var datepickers = [];\n    Object.defineProperty(this, 'datepickers', {\n      get: function get() {\n        return datepickers;\n      }\n    });\n    setupDatepicker(this, changeDateListener, this.inputs[0], cleanOptions);\n    setupDatepicker(this, changeDateListener, this.inputs[1], cleanOptions);\n    Object.freeze(datepickers);\n    // normalize the range if inital dates are given\n    if (datepickers[0].dates.length > 0) {\n      onChangeDate(this, {\n        target: this.inputs[0]\n      });\n    } else if (datepickers[1].dates.length > 0) {\n      onChangeDate(this, {\n        target: this.inputs[1]\n      });\n    }\n  }\n\n  /**\r\n   * @type {Array} - selected date of the linked date pickers\r\n   */\n  return _createClass(DateRangePicker, [{\n    key: \"dates\",\n    get: function get() {\n      return this.datepickers.length === 2 ? [this.datepickers[0].dates[0], this.datepickers[1].dates[0]] : undefined;\n    }\n\n    /**\r\n     * Set new values to the config options\r\n     * @param {Object} options - config options to update\r\n     */\n  }, {\n    key: \"setOptions\",\n    value: function setOptions(options) {\n      this.allowOneSidedRange = !!options.allowOneSidedRange;\n      var cleanOptions = filterOptions(options);\n      this.datepickers[0].setOptions(cleanOptions);\n      this.datepickers[1].setOptions(cleanOptions);\n    }\n\n    /**\r\n     * Destroy the DateRangePicker instance\r\n     * @return {DateRangePicker} - the instance destroyed\r\n     */\n  }, {\n    key: \"destroy\",\n    value: function destroy() {\n      this.datepickers[0].destroy();\n      this.datepickers[1].destroy();\n      unregisterListeners(this);\n      delete this.element.rangepicker;\n    }\n\n    /**\r\n     * Get the start and end dates of the date range\r\n     *\r\n     * The method returns Date objects by default. If format string is passed,\r\n     * it returns date strings formatted in given format.\r\n     * The result array always contains 2 items (start date/end date) and\r\n     * undefined is used for unselected side. (e.g. If none is selected,\r\n     * the result will be [undefined, undefined]. If only the end date is set\r\n     * when allowOneSidedRange config option is true, [undefined, endDate] will\r\n     * be returned.)\r\n     *\r\n     * @param  {String} [format] - Format string to stringify the dates\r\n     * @return {Array} - Start and end dates\r\n     */\n  }, {\n    key: \"getDates\",\n    value: function getDates() {\n      var _this = this;\n      var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n      var callback = format ? function (date) {\n        return formatDate(date, format, _this.datepickers[0].config.locale);\n      } : function (date) {\n        return new Date(date);\n      };\n      return this.dates.map(function (date) {\n        return date === undefined ? date : callback(date);\n      });\n    }\n\n    /**\r\n     * Set the start and end dates of the date range\r\n     *\r\n     * The method calls datepicker.setDate() internally using each of the\r\n     * arguments in start\u2192end order.\r\n     *\r\n     * When a clear: true option object is passed instead of a date, the method\r\n     * clears the date.\r\n     *\r\n     * If an invalid date, the same date as the current one or an option object\r\n     * without clear: true is passed, the method considers that argument as an\r\n     * \"ineffective\" argument because calling datepicker.setDate() with those\r\n     * values makes no changes to the date selection.\r\n     *\r\n     * When the allowOneSidedRange config option is false, passing {clear: true}\r\n     * to clear the range works only when it is done to the last effective\r\n     * argument (in other words, passed to rangeEnd or to rangeStart along with\r\n     * ineffective rangeEnd). This is because when the date range is changed,\r\n     * it gets normalized based on the last change at the end of the changing\r\n     * process.\r\n     *\r\n     * @param {Date|Number|String|Object} rangeStart - Start date of the range\r\n     * or {clear: true} to clear the date\r\n     * @param {Date|Number|String|Object} rangeEnd - End date of the range\r\n     * or {clear: true} to clear the date\r\n     */\n  }, {\n    key: \"setDates\",\n    value: function setDates(rangeStart, rangeEnd) {\n      var _this$datepickers = _slicedToArray(this.datepickers, 2),\n        datepicker0 = _this$datepickers[0],\n        datepicker1 = _this$datepickers[1];\n      var origDates = this.dates;\n\n      // If range normalization runs on every change, we can't set a new range\n      // that starts after the end of the current range correctly because the\n      // normalization process swaps start\u2194\uFE0Eend right after setting the new start\n      // date. To prevent this, the normalization process needs to run once after\n      // both of the new dates are set.\n      this._updating = true;\n      datepicker0.setDate(rangeStart);\n      datepicker1.setDate(rangeEnd);\n      delete this._updating;\n      if (datepicker1.dates[0] !== origDates[1]) {\n        onChangeDate(this, {\n          target: this.inputs[1]\n        });\n      } else if (datepicker0.dates[0] !== origDates[0]) {\n        onChangeDate(this, {\n          target: this.inputs[0]\n        });\n      }\n    }\n  }]);\n}();\n\nexports.DateRangePicker = DateRangePicker;\nexports.Datepicker = Datepicker;\n", "/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { AccordionItem, AccordionOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { AccordionInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: AccordionOptions = {\n    alwaysOpen: false,\n    activeClasses: 'bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white',\n    inactiveClasses: 'text-gray-500 dark:text-gray-400',\n    onOpen: () => {},\n    onClose: () => {},\n    onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n    id: null,\n    override: true,\n};\n\nclass Accordion implements AccordionInterface {\n    _instanceId: string;\n    _accordionEl: HTMLElement;\n    _items: AccordionItem[];\n    _options: AccordionOptions;\n    _clickHandler: EventListenerOrEventListenerObject;\n    _initialized: boolean;\n\n    constructor(\n        accordionEl: HTMLElement | null = null,\n        items: AccordionItem[] = [],\n        options: AccordionOptions = Default,\n        instanceOptions: InstanceOptions = DefaultInstanceOptions\n    ) {\n        this._instanceId = instanceOptions.id\n            ? instanceOptions.id\n            : accordionEl.id;\n        this._accordionEl = accordionEl;\n        this._items = items;\n        this._options = { ...Default, ...options };\n        this._initialized = false;\n        this.init();\n        instances.addInstance(\n            'Accordion',\n            this,\n            this._instanceId,\n            instanceOptions.override\n        );\n    }\n\n    init() {\n        if (this._items.length && !this._initialized) {\n            // show accordion item based on click\n            this._items.forEach((item) => {\n                if (item.active) {\n                    this.open(item.id);\n                }\n\n                const clickHandler = () => {\n                    this.toggle(item.id);\n                };\n\n                item.triggerEl.addEventListener('click', clickHandler);\n\n                // Store the clickHandler in a property of the item for removal later\n                item.clickHandler = clickHandler;\n            });\n            this._initialized = true;\n        }\n    }\n\n    destroy() {\n        if (this._items.length && this._initialized) {\n            this._items.forEach((item) => {\n                item.triggerEl.removeEventListener('click', item.clickHandler);\n\n                // Clean up by deleting the clickHandler property from the item\n                delete item.clickHandler;\n            });\n            this._initialized = false;\n        }\n    }\n\n    removeInstance() {\n        instances.removeInstance('Accordion', this._instanceId);\n    }\n\n    destroyAndRemoveInstance() {\n        this.destroy();\n        this.removeInstance();\n    }\n\n    getItem(id: string) {\n        return this._items.filter((item) => item.id === id)[0];\n    }\n\n    open(id: string) {\n        const item = this.getItem(id);\n\n        // don't hide other accordions if always open\n        if (!this._options.alwaysOpen) {\n            this._items.map((i) => {\n                if (i !== item) {\n                    i.triggerEl.classList.remove(\n                        ...this._options.activeClasses.split(' ')\n                    );\n                    i.triggerEl.classList.add(\n                        ...this._options.inactiveClasses.split(' ')\n                    );\n                    i.targetEl.classList.add('hidden');\n                    i.triggerEl.setAttribute('aria-expanded', 'false');\n                    i.active = false;\n\n                    // rotate icon if set\n                    if (i.iconEl) {\n                        i.iconEl.classList.add('rotate-180');\n                    }\n                }\n            });\n        }\n\n        // show active item\n        item.triggerEl.classList.add(...this._options.activeClasses.split(' '));\n        item.triggerEl.classList.remove(\n            ...this._options.inactiveClasses.split(' ')\n        );\n        item.triggerEl.setAttribute('aria-expanded', 'true');\n        item.targetEl.classList.remove('hidden');\n        item.active = true;\n\n        // rotate icon if set\n        if (item.iconEl) {\n            item.iconEl.classList.remove('rotate-180');\n        }\n\n        // callback function\n        this._options.onOpen(this, item);\n    }\n\n    toggle(id: string) {\n        const item = this.getItem(id);\n\n        if (item.active) {\n            this.close(id);\n        } else {\n            this.open(id);\n        }\n\n        // callback function\n        this._options.onToggle(this, item);\n    }\n\n    close(id: string) {\n        const item = this.getItem(id);\n\n        item.triggerEl.classList.remove(\n            ...this._options.activeClasses.split(' ')\n        );\n        item.triggerEl.classList.add(\n            ...this._options.inactiveClasses.split(' ')\n        );\n        item.targetEl.classList.add('hidden');\n        item.triggerEl.setAttribute('aria-expanded', 'false');\n        item.active = false;\n\n        // rotate icon if set\n        if (item.iconEl) {\n            item.iconEl.classList.add('rotate-180');\n        }\n\n        // callback function\n        this._options.onClose(this, item);\n    }\n\n    updateOnOpen(callback: () => void) {\n        this._options.onOpen = callback;\n    }\n\n    updateOnClose(callback: () => void) {\n        this._options.onClose = callback;\n    }\n\n    updateOnToggle(callback: () => void) {\n        this._options.onToggle = callback;\n    }\n}\n\nexport function initAccordions() {\n    document.querySelectorAll('[data-accordion]').forEach(($accordionEl) => {\n        const alwaysOpen = $accordionEl.getAttribute('data-accordion');\n        const activeClasses = $accordionEl.getAttribute('data-active-classes');\n        const inactiveClasses = $accordionEl.getAttribute(\n            'data-inactive-classes'\n        );\n\n        const items = [] as AccordionItem[];\n        $accordionEl\n            .querySelectorAll('[data-accordion-target]')\n            .forEach(($triggerEl) => {\n                // Consider only items that directly belong to $accordionEl\n                // (to make nested accordions work).\n                if ($triggerEl.closest('[data-accordion]') === $accordionEl) {\n                    const item = {\n                        id: $triggerEl.getAttribute('data-accordion-target'),\n                        triggerEl: $triggerEl,\n                        targetEl: document.querySelector(\n                            $triggerEl.getAttribute('data-accordion-target')\n                        ),\n                        iconEl: $triggerEl.querySelector(\n                            '[data-accordion-icon]'\n                        ),\n                        active:\n                            $triggerEl.getAttribute('aria-expanded') === 'true'\n                                ? true\n                                : false,\n                    } as AccordionItem;\n                    items.push(item);\n                }\n            });\n\n        new Accordion($accordionEl as HTMLElement, items, {\n            alwaysOpen: alwaysOpen === 'open' ? true : false,\n            activeClasses: activeClasses\n                ? activeClasses\n                : Default.activeClasses,\n            inactiveClasses: inactiveClasses\n                ? inactiveClasses\n                : Default.inactiveClasses,\n        } as AccordionOptions);\n    });\n}\n\nif (typeof window !== 'undefined') {\n    window.Accordion = Accordion;\n    window.initAccordions = initAccordions;\n}\n\nexport default Accordion;\n", "/* eslint-disable @typescript-eslint/no-empty-function */\nimport type {\n    CarouselOptions,\n    CarouselItem,\n    IndicatorItem,\n    RotationItems,\n} from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { CarouselInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: CarouselOptions = {\n    defaultPosition: 0,\n    indicators: {\n        items: [],\n        activeClasses: 'bg-white dark:bg-gray-800',\n        inactiveClasses:\n            'bg-white/50 dark:bg-gray-800/50 hover:bg-white dark:hover:bg-gray-800',\n    },\n    interval: 3000,\n    onNext: () => {},\n    onPrev: () => {},\n    onChange: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n    id: null,\n    override: true,\n};\n\nclass Carousel implements CarouselInterface {\n    _instanceId: string;\n    _carouselEl: HTMLElement;\n    _items: CarouselItem[];\n    _indicators: IndicatorItem[];\n    _activeItem: CarouselItem;\n    _intervalDuration: number;\n    _intervalInstance: number;\n    _options: CarouselOptions;\n    _initialized: boolean;\n\n    constructor(\n        carouselEl: HTMLElement | null = null,\n        items: CarouselItem[] = [],\n        options: CarouselOptions = Default,\n        instanceOptions: InstanceOptions = DefaultInstanceOptions\n    ) {\n        this._instanceId = instanceOptions.id\n            ? instanceOptions.id\n            : carouselEl.id;\n        this._carouselEl = carouselEl;\n        this._items = items;\n        this._options = {\n            ...Default,\n            ...options,\n            indicators: { ...Default.indicators, ...options.indicators },\n        };\n        this._activeItem = this.getItem(this._options.defaultPosition);\n        this._indicators = this._options.indicators.items;\n        this._intervalDuration = this._options.interval;\n        this._intervalInstance = null;\n        this._initialized = false;\n        this.init();\n        instances.addInstance(\n            'Carousel',\n            this,\n            this._instanceId,\n            instanceOptions.override\n        );\n    }\n\n    /**\n     * initialize carousel and items based on active one\n     */\n    init() {\n        if (this._items.length && !this._initialized) {\n            this._items.map((item: CarouselItem) => {\n                item.el.classList.add(\n                    'absolute',\n                    'inset-0',\n                    'transition-transform',\n                    'transform'\n                );\n            });\n\n            // if no active item is set then first position is default\n            if (this.getActiveItem()) {\n                this.slideTo(this.getActiveItem().position);\n            } else {\n                this.slideTo(0);\n            }\n\n            this._indicators.map((indicator, position) => {\n                indicator.el.addEventListener('click', () => {\n                    this.slideTo(position);\n                });\n            });\n\n            this._initialized = true;\n        }\n    }\n\n    destroy() {\n        if (this._initialized) {\n            this._initialized = false;\n        }\n    }\n\n    removeInstance() {\n        instances.removeInstance('Carousel', this._instanceId);\n    }\n\n    destroyAndRemoveInstance() {\n        this.destroy();\n        this.removeInstance();\n    }\n\n    getItem(position: number) {\n        return this._items[position];\n    }\n\n    /**\n     * Slide to the element based on id\n     * @param {*} position\n     */\n    slideTo(position: number) {\n        const nextItem: CarouselItem = this._items[position];\n        const rotationItems: RotationItems = {\n            left:\n                nextItem.position === 0\n                    ? this._items[this._items.length - 1]\n                    : this._items[nextItem.position - 1],\n            middle: nextItem,\n            right:\n                nextItem.position === this._items.length - 1\n                    ? this._items[0]\n                    : this._items[nextItem.position + 1],\n        };\n        this._rotate(rotationItems);\n        this._setActiveItem(nextItem);\n        if (this._intervalInstance) {\n            this.pause();\n            this.cycle();\n        }\n\n        this._options.onChange(this);\n    }\n\n    /**\n     * Based on the currently active item it will go to the next position\n     */\n    next() {\n        const activeItem = this.getActiveItem();\n        let nextItem = null;\n\n        // check if last item\n        if (activeItem.position === this._items.length - 1) {\n            nextItem = this._items[0];\n        } else {\n            nextItem = this._items[activeItem.position + 1];\n        }\n\n        this.slideTo(nextItem.position);\n\n        // callback function\n        this._options.onNext(this);\n    }\n\n    /**\n     * Based on the currently active item it will go to the previous position\n     */\n    prev() {\n        const activeItem = this.getActiveItem();\n        let prevItem = null;\n\n        // check if first item\n        if (activeItem.position === 0) {\n            prevItem = this._items[this._items.length - 1];\n        } else {\n            prevItem = this._items[activeItem.position - 1];\n        }\n\n        this.slideTo(prevItem.position);\n\n        // callback function\n        this._options.onPrev(this);\n    }\n\n    /**\n     * This method applies the transform classes based on the left, middle, and right rotation carousel items\n     * @param {*} rotationItems\n     */\n    _rotate(rotationItems: RotationItems) {\n        // reset\n        this._items.map((item: CarouselItem) => {\n            item.el.classList.add('hidden');\n        });\n\n        // Handling the case when there is only one item\n        if (this._items.length === 1) {\n            rotationItems.middle.el.classList.remove(\n                '-translate-x-full',\n                'translate-x-full',\n                'translate-x-0',\n                'hidden',\n                'z-10'\n            );\n            rotationItems.middle.el.classList.add('translate-x-0', 'z-20');\n            return;\n        }\n\n        // left item (previously active)\n        rotationItems.left.el.classList.remove(\n            '-translate-x-full',\n            'translate-x-full',\n            'translate-x-0',\n            'hidden',\n            'z-20'\n        );\n\n        rotationItems.left.el.classList.add('-translate-x-full', 'z-10');\n\n        // currently active item\n        rotationItems.middle.el.classList.remove(\n            '-translate-x-full',\n            'translate-x-full',\n            'translate-x-0',\n            'hidden',\n            'z-10'\n        );\n        rotationItems.middle.el.classList.add('translate-x-0', 'z-30');\n\n        // right item (upcoming active)\n        rotationItems.right.el.classList.remove(\n            '-translate-x-full',\n            'translate-x-full',\n            'translate-x-0',\n            'hidden',\n            'z-30'\n        );\n        rotationItems.right.el.classList.add('translate-x-full', 'z-20');\n    }\n\n    /**\n     * Set an interval to cycle through the carousel items\n     */\n    cycle() {\n        if (typeof window !== 'undefined') {\n            this._intervalInstance = window.setInterval(() => {\n                this.next();\n            }, this._intervalDuration);\n        }\n    }\n\n    /**\n     * Clears the cycling interval\n     */\n    pause() {\n        clearInterval(this._intervalInstance);\n    }\n\n    /**\n     * Get the currently active item\n     */\n    getActiveItem() {\n        return this._activeItem;\n    }\n\n    /**\n     * Set the currently active item and data attribute\n     * @param {*} position\n     */\n    _setActiveItem(item: CarouselItem) {\n        this._activeItem = item;\n        const position = item.position;\n\n        // update the indicators if available\n        if (this._indicators.length) {\n            this._indicators.map((indicator) => {\n                indicator.el.setAttribute('aria-current', 'false');\n                indicator.el.classList.remove(\n                    ...this._options.indicators.activeClasses.split(' ')\n                );\n                indicator.el.classList.add(\n                    ...this._options.indicators.inactiveClasses.split(' ')\n                );\n            });\n            this._indicators[position].el.classList.add(\n                ...this._options.indicators.activeClasses.split(' ')\n            );\n            this._indicators[position].el.classList.remove(\n                ...this._options.indicators.inactiveClasses.split(' ')\n            );\n            this._indicators[position].el.setAttribute('aria-current', 'true');\n        }\n    }\n\n    updateOnNext(callback: () => void) {\n        this._options.onNext = callback;\n    }\n\n    updateOnPrev(callback: () => void) {\n        this._options.onPrev = callback;\n    }\n\n    updateOnChange(callback: () => void) {\n        this._options.onChange = callback;\n    }\n}\n\nexport function initCarousels() {\n    document.querySelectorAll('[data-carousel]').forEach(($carouselEl) => {\n        const interval = $carouselEl.getAttribute('data-carousel-interval');\n        const slide =\n            $carouselEl.getAttribute('data-carousel') === 'slide'\n                ? true\n                : false;\n\n        const items: CarouselItem[] = [];\n        let defaultPosition = 0;\n        if ($carouselEl.querySelectorAll('[data-carousel-item]').length) {\n            Array.from(\n                $carouselEl.querySelectorAll('[data-carousel-item]')\n            ).map(($carouselItemEl: HTMLElement, position: number) => {\n                items.push({\n                    position: position,\n                    el: $carouselItemEl,\n                });\n\n                if (\n                    $carouselItemEl.getAttribute('data-carousel-item') ===\n                    'active'\n                ) {\n                    defaultPosition = position;\n                }\n            });\n        }\n\n        const indicators: IndicatorItem[] = [];\n        if ($carouselEl.querySelectorAll('[data-carousel-slide-to]').length) {\n            Array.from(\n                $carouselEl.querySelectorAll('[data-carousel-slide-to]')\n            ).map(($indicatorEl: HTMLElement) => {\n                indicators.push({\n                    position: parseInt(\n                        $indicatorEl.getAttribute('data-carousel-slide-to')\n                    ),\n                    el: $indicatorEl,\n                });\n            });\n        }\n\n        const carousel = new Carousel($carouselEl as HTMLElement, items, {\n            defaultPosition: defaultPosition,\n            indicators: {\n                items: indicators,\n            },\n            interval: interval ? interval : Default.interval,\n        } as CarouselOptions);\n\n        if (slide) {\n            carousel.cycle();\n        }\n\n        // check for controls\n        const carouselNextEl = $carouselEl.querySelector(\n            '[data-carousel-next]'\n        );\n        const carouselPrevEl = $carouselEl.querySelector(\n            '[data-carousel-prev]'\n        );\n\n        if (carouselNextEl) {\n            carouselNextEl.addEventListener('click', () => {\n                carousel.next();\n            });\n        }\n\n        if (carouselPrevEl) {\n            carouselPrevEl.addEventListener('click', () => {\n                carousel.prev();\n            });\n        }\n    });\n}\n\nif (typeof window !== 'undefined') {\n    window.Carousel = Carousel;\n    window.initCarousels = initCarousels;\n}\n\nexport default Carousel;\n", "/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { CopyClipboardOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { CopyClipboardInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: CopyClipboardOptions = {\n    htmlEntities: false,\n    contentType: 'input',\n    onCopy: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n    id: null,\n    override: true,\n};\n\nclass CopyClipboard implements CopyClipboardInterface {\n    _instanceId: string;\n    _triggerEl: HTMLElement | null;\n    _targetEl: HTMLInputElement | null;\n    _options: CopyClipboardOptions;\n    _initialized: boolean;\n    _triggerElClickHandler: EventListenerOrEventListenerObject;\n    _inputHandler: EventListenerOrEventListenerObject;\n\n    constructor(\n        triggerEl: HTMLElement | null = null,\n        targetEl: HTMLInputElement | null = null,\n        options: CopyClipboardOptions = Default,\n        instanceOptions: InstanceOptions = DefaultInstanceOptions\n    ) {\n        this._instanceId = instanceOptions.id\n            ? instanceOptions.id\n            : targetEl.id;\n\n        this._triggerEl = triggerEl;\n        this._targetEl = targetEl;\n        this._options = { ...Default, ...options };\n        this._initialized = false;\n\n        this.init();\n        instances.addInstance(\n            'CopyClipboard',\n            this,\n            this._instanceId,\n            instanceOptions.override\n        );\n    }\n\n    init() {\n        if (this._targetEl && this._triggerEl && !this._initialized) {\n            this._triggerElClickHandler = () => {\n                this.copy();\n            };\n\n            // clicking on the trigger element should copy the value of the target element\n            if (this._triggerEl) {\n                this._triggerEl.addEventListener(\n                    'click',\n                    this._triggerElClickHandler\n                );\n            }\n\n            this._initialized = true;\n        }\n    }\n\n    destroy() {\n        if (this._triggerEl && this._targetEl && this._initialized) {\n            if (this._triggerEl) {\n                this._triggerEl.removeEventListener(\n                    'click',\n                    this._triggerElClickHandler\n                );\n            }\n            this._initialized = false;\n        }\n    }\n\n    removeInstance() {\n        instances.removeInstance('CopyClipboard', this._instanceId);\n    }\n\n    destroyAndRemoveInstance() {\n        this.destroy();\n        this.removeInstance();\n    }\n\n    getTargetValue() {\n        if (this._options.contentType === 'input') {\n            return this._targetEl.value;\n        }\n\n        if (this._options.contentType === 'innerHTML') {\n            return this._targetEl.innerHTML;\n        }\n\n        if (this._options.contentType === 'textContent') {\n            return this._targetEl.textContent.replace(/\\s+/g, ' ').trim();\n        }\n    }\n\n    copy() {\n        let textToCopy = this.getTargetValue();\n\n        // Check if HTMLEntities option is enabled\n        if (this._options.htmlEntities) {\n            // Encode the text using HTML entities\n            textToCopy = this.decodeHTML(textToCopy);\n        }\n\n        // Create a temporary textarea element\n        const tempTextArea = document.createElement('textarea');\n        tempTextArea.value = textToCopy;\n        document.body.appendChild(tempTextArea);\n\n        // Select the text inside the textarea and copy it to the clipboard\n        tempTextArea.select();\n        document.execCommand('copy');\n\n        // Remove the temporary textarea\n        document.body.removeChild(tempTextArea);\n\n        // Callback function\n        this._options.onCopy(this);\n\n        return textToCopy;\n    }\n\n    // Function to encode text into HTML entities\n    decodeHTML(html: string) {\n        const textarea = document.createElement('textarea');\n        textarea.innerHTML = html;\n        return textarea.textContent;\n    }\n\n    updateOnCopyCallback(callback: () => void) {\n        this._options.onCopy = callback;\n    }\n}\n\nexport function initCopyClipboards() {\n    document\n        .querySelectorAll('[data-copy-to-clipboard-target]')\n        .forEach(($triggerEl) => {\n            const targetId = $triggerEl.getAttribute(\n                'data-copy-to-clipboard-target'\n            );\n            const $targetEl = document.getElementById(targetId);\n            const contentType = $triggerEl.getAttribute(\n                'data-copy-to-clipboard-content-type'\n            );\n            const htmlEntities = $triggerEl.getAttribute(\n                'data-copy-to-clipboard-html-entities'\n            );\n\n            // check if the target element exists\n            if ($targetEl) {\n                if (\n                    !instances.instanceExists(\n                        'CopyClipboard',\n                        $targetEl.getAttribute('id')\n                    )\n                ) {\n                    new CopyClipboard(\n                        $triggerEl as HTMLElement,\n                        $targetEl as HTMLInputElement,\n                        {\n                            htmlEntities:\n                                htmlEntities && htmlEntities === 'true'\n                                    ? true\n                                    : Default.htmlEntities,\n                            contentType: contentType\n                                ? contentType\n                                : Default.contentType,\n                        } as CopyClipboardOptions\n                    );\n                }\n            } else {\n                console.error(\n                    `The target element with id \"${targetId}\" does not exist. Please check the data-copy-to-clipboard-target attribute.`\n                );\n            }\n        });\n}\n\nif (typeof window !== 'undefined') {\n    window.CopyClipboard = CopyClipboard;\n    window.initClipboards = initCopyClipboards;\n}\n\nexport default CopyClipboard;\n", "/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { CollapseOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { CollapseInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: CollapseOptions = {\n    onCollapse: () => {},\n    onExpand: () => {},\n    onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n    id: null,\n    override: true,\n};\n\nclass Collapse implements CollapseInterface {\n    _instanceId: string;\n    _targetEl: HTMLElement | null;\n    _triggerEl: HTMLElement | null;\n    _options: CollapseOptions;\n    _visible: boolean;\n    _initialized: boolean;\n    _clickHandler: EventListenerOrEventListenerObject;\n\n    constructor(\n        targetEl: HTMLElement | null = null,\n        triggerEl: HTMLElement | null = null,\n        options: CollapseOptions = Default,\n        instanceOptions: InstanceOptions = DefaultInstanceOptions\n    ) {\n        this._instanceId = instanceOptions.id\n            ? instanceOptions.id\n            : targetEl.id;\n        this._targetEl = targetEl;\n        this._triggerEl = triggerEl;\n        this._options = { ...Default, ...options };\n        this._visible = false;\n        this._initialized = false;\n        this.init();\n        instances.addInstance(\n            'Collapse',\n            this,\n            this._instanceId,\n            instanceOptions.override\n        );\n    }\n\n    init() {\n        if (this._triggerEl && this._targetEl && !this._initialized) {\n            if (this._triggerEl.hasAttribute('aria-expanded')) {\n                this._visible =\n                    this._triggerEl.getAttribute('aria-expanded') === 'true';\n            } else {\n                // fix until v2 not to break previous single collapses which became dismiss\n                this._visible = !this._targetEl.classList.contains('hidden');\n            }\n\n            this._clickHandler = () => {\n                this.toggle();\n            };\n\n            this._triggerEl.addEventListener('click', this._clickHandler);\n            this._initialized = true;\n        }\n    }\n\n    destroy() {\n        if (this._triggerEl && this._initialized) {\n            this._triggerEl.removeEventListener('click', this._clickHandler);\n            this._initialized = false;\n        }\n    }\n\n    removeInstance() {\n        instances.removeInstance('Collapse', this._instanceId);\n    }\n\n    destroyAndRemoveInstance() {\n        this.destroy();\n        this.removeInstance();\n    }\n\n    collapse() {\n        this._targetEl.classList.add('hidden');\n        if (this._triggerEl) {\n            this._triggerEl.setAttribute('aria-expanded', 'false');\n        }\n        this._visible = false;\n\n        // callback function\n        this._options.onCollapse(this);\n    }\n\n    expand() {\n        this._targetEl.classList.remove('hidden');\n        if (this._triggerEl) {\n            this._triggerEl.setAttribute('aria-expanded', 'true');\n        }\n        this._visible = true;\n\n        // callback function\n        this._options.onExpand(this);\n    }\n\n    toggle() {\n        if (this._visible) {\n            this.collapse();\n        } else {\n            this.expand();\n        }\n        // callback function\n        this._options.onToggle(this);\n    }\n\n    updateOnCollapse(callback: () => void) {\n        this._options.onCollapse = callback;\n    }\n\n    updateOnExpand(callback: () => void) {\n        this._options.onExpand = callback;\n    }\n\n    updateOnToggle(callback: () => void) {\n        this._options.onToggle = callback;\n    }\n}\n\nexport function initCollapses() {\n    document\n        .querySelectorAll('[data-collapse-toggle]')\n        .forEach(($triggerEl) => {\n            const targetId = $triggerEl.getAttribute('data-collapse-toggle');\n            const $targetEl = document.getElementById(targetId);\n\n            // check if the target element exists\n            if ($targetEl) {\n                if (\n                    !instances.instanceExists(\n                        'Collapse',\n                        $targetEl.getAttribute('id')\n                    )\n                ) {\n                    new Collapse(\n                        $targetEl as HTMLElement,\n                        $triggerEl as HTMLElement\n                    );\n                } else {\n                    // if instance exists already for the same target element then create a new one with a different trigger element\n                    new Collapse(\n                        $targetEl as HTMLElement,\n                        $triggerEl as HTMLElement,\n                        {},\n                        {\n                            id:\n                                $targetEl.getAttribute('id') +\n                                '_' +\n                                instances._generateRandomId(),\n                        }\n                    );\n                }\n            } else {\n                console.error(\n                    `The target element with id \"${targetId}\" does not exist. Please check the data-collapse-toggle attribute.`\n                );\n            }\n        });\n}\n\nif (typeof window !== 'undefined') {\n    window.Collapse = Collapse;\n    window.initCollapses = initCollapses;\n}\n\nexport default Collapse;\n", "/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DatepickerOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { DatepickerInterface } from './interface';\nimport instances from '../../dom/instances';\n\nimport {\n    Datepicker as FlowbiteDatepicker,\n    DateRangePicker as FlowbiteDateRangePicker,\n} from 'flowbite-datepicker';\n\nconst Default: DatepickerOptions = {\n    defaultDatepickerId: null,\n    autohide: false,\n    format: 'mm/dd/yyyy',\n    maxDate: null,\n    minDate: null,\n    orientation: 'bottom',\n    buttons: false,\n    autoSelectToday: 0,\n    title: null,\n    language: 'en',\n    rangePicker: false,\n    onShow: () => {},\n    onHide: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n    id: null,\n    override: true,\n};\n\nclass Datepicker implements DatepickerInterface {\n    _instanceId: string;\n    _datepickerEl: HTMLElement;\n    _datepickerInstance: FlowbiteDatepicker | FlowbiteDateRangePicker | null;\n    _options: DatepickerOptions;\n    _initialized: boolean;\n\n    constructor(\n        datepickerEl: HTMLElement | null = null,\n        options: DatepickerOptions = Default,\n        instanceOptions: InstanceOptions = DefaultInstanceOptions\n    ) {\n        this._instanceId = instanceOptions.id\n            ? instanceOptions.id\n            : datepickerEl.id;\n        this._datepickerEl = datepickerEl;\n        this._datepickerInstance = null;\n        this._options = { ...Default, ...options };\n        this._initialized = false;\n        this.init();\n        instances.addInstance(\n            'Datepicker',\n            this,\n            this._instanceId,\n            instanceOptions.override\n        );\n    }\n\n    init() {\n        if (this._datepickerEl && !this._initialized) {\n            if (this._options.rangePicker) {\n                this._datepickerInstance = new FlowbiteDateRangePicker(\n                    this._datepickerEl,\n                    this._getDatepickerOptions(this._options)\n                );\n            } else {\n                this._datepickerInstance = new FlowbiteDatepicker(\n                    this._datepickerEl,\n                    this._getDatepickerOptions(this._options)\n                );\n            }\n\n            this._initialized = true;\n        }\n    }\n\n    destroy() {\n        if (this._initialized) {\n            this._initialized = false;\n            this._datepickerInstance.destroy();\n        }\n    }\n\n    removeInstance() {\n        this.destroy();\n        instances.removeInstance('Datepicker', this._instanceId);\n    }\n\n    destroyAndRemoveInstance() {\n        this.destroy();\n        this.removeInstance();\n    }\n\n    getDatepickerInstance() {\n        return this._datepickerInstance;\n    }\n\n    getDate() {\n        if (\n            this._options.rangePicker &&\n            this._datepickerInstance instanceof FlowbiteDateRangePicker\n        ) {\n            return this._datepickerInstance.getDates();\n        }\n\n        if (\n            !this._options.rangePicker &&\n            this._datepickerInstance instanceof FlowbiteDatepicker\n        ) {\n            return this._datepickerInstance.getDate();\n        }\n    }\n\n    setDate(date: any) {\n        if (\n            this._options.rangePicker &&\n            this._datepickerInstance instanceof FlowbiteDateRangePicker\n        ) {\n            return this._datepickerInstance.setDates(date);\n        }\n\n        if (\n            !this._options.rangePicker &&\n            this._datepickerInstance instanceof FlowbiteDatepicker\n        ) {\n            return this._datepickerInstance.setDate(date);\n        }\n    }\n\n    show() {\n        this._datepickerInstance.show();\n        this._options.onShow(this);\n    }\n\n    hide() {\n        this._datepickerInstance.hide();\n        this._options.onHide(this);\n    }\n\n    _getDatepickerOptions(options: DatepickerOptions) {\n        const datepickerOptions = {} as any;\n\n        if (options.buttons) {\n            datepickerOptions.todayBtn = true;\n            datepickerOptions.clearBtn = true;\n\n            if (options.autoSelectToday) {\n                datepickerOptions.todayBtnMode = 1;\n            }\n        }\n\n        if (options.autohide) {\n            datepickerOptions.autohide = true;\n        }\n\n        if (options.format) {\n            datepickerOptions.format = options.format;\n        }\n\n        if (options.maxDate) {\n            datepickerOptions.maxDate = options.maxDate;\n        }\n\n        if (options.minDate) {\n            datepickerOptions.minDate = options.minDate;\n        }\n\n        if (options.orientation) {\n            datepickerOptions.orientation = options.orientation;\n        }\n\n        if (options.title) {\n            datepickerOptions.title = options.title;\n        }\n\n        if (options.language) {\n            datepickerOptions.language = options.language;\n        }\n\n        return datepickerOptions;\n    }\n\n    updateOnShow(callback: () => void) {\n        this._options.onShow = callback;\n    }\n\n    updateOnHide(callback: () => void) {\n        this._options.onHide = callback;\n    }\n}\n\nexport function initDatepickers() {\n    document\n        .querySelectorAll(\n            '[datepicker], [inline-datepicker], [date-rangepicker]'\n        )\n        .forEach(($datepickerEl) => {\n            if ($datepickerEl) {\n                const buttons =\n                    $datepickerEl.hasAttribute('datepicker-buttons');\n                const autoselectToday = $datepickerEl.hasAttribute(\n                    'datepicker-autoselect-today'\n                );\n                const autohide = $datepickerEl.hasAttribute(\n                    'datepicker-autohide'\n                );\n                const format = $datepickerEl.getAttribute('datepicker-format');\n                const maxDate = $datepickerEl.getAttribute(\n                    'datepicker-max-date'\n                );\n                const minDate = $datepickerEl.getAttribute(\n                    'datepicker-min-date'\n                );\n                const orientation = $datepickerEl.getAttribute(\n                    'datepicker-orientation'\n                );\n                const title = $datepickerEl.getAttribute('datepicker-title');\n                const language = $datepickerEl.getAttribute(\n                    'datepicker-language'\n                );\n                const rangePicker =\n                    $datepickerEl.hasAttribute('date-rangepicker');\n                new Datepicker(\n                    $datepickerEl as HTMLElement,\n                    {\n                        buttons: buttons ? buttons : Default.buttons,\n                        autoSelectToday: autoselectToday\n                            ? autoselectToday\n                            : Default.autoSelectToday,\n                        autohide: autohide ? autohide : Default.autohide,\n                        format: format ? format : Default.format,\n                        maxDate: maxDate ? maxDate : Default.maxDate,\n                        minDate: minDate ? minDate : Default.minDate,\n                        orientation: orientation\n                            ? orientation\n                            : Default.orientation,\n                        title: title ? title : Default.title,\n                        language: language ? language : Default.language,\n                        rangePicker: rangePicker\n                            ? rangePicker\n                            : Default.rangePicker,\n                    } as DatepickerOptions\n                );\n            } else {\n                console.error(\n                    `The datepicker element does not exist. Please check the datepicker attribute.`\n                );\n            }\n        });\n}\n\nif (typeof window !== 'undefined') {\n    window.Datepicker = Datepicker;\n    window.initDatepickers = initDatepickers;\n}\n\nexport default Datepicker;\n", "/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DialOptions, DialTriggerType } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { DialInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: DialOptions = {\n    triggerType: 'hover',\n    onShow: () => {},\n    onHide: () => {},\n    onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n    id: null,\n    override: true,\n};\n\nclass Dial implements DialInterface {\n    _instanceId: string;\n    _parentEl: HTMLElement;\n    _triggerEl: HTMLElement;\n    _targetEl: HTMLElement;\n    _options: DialOptions;\n    _visible: boolean;\n    _initialized: boolean;\n    _showEventHandler: EventListenerOrEventListenerObject;\n    _hideEventHandler: EventListenerOrEventListenerObject;\n\n    constructor(\n        parentEl: HTMLElement | null = null,\n        triggerEl: HTMLElement | null = null,\n        targetEl: HTMLElement | null = null,\n        options: DialOptions = Default,\n        instanceOptions: InstanceOptions = DefaultInstanceOptions\n    ) {\n        this._instanceId = instanceOptions.id\n            ? instanceOptions.id\n            : targetEl.id;\n        this._parentEl = parentEl;\n        this._triggerEl = triggerEl;\n        this._targetEl = targetEl;\n        this._options = { ...Default, ...options };\n        this._visible = false;\n        this._initialized = false;\n        this.init();\n        instances.addInstance(\n            'Dial',\n            this,\n            this._instanceId,\n            instanceOptions.override\n        );\n    }\n\n    init() {\n        if (this._triggerEl && this._targetEl && !this._initialized) {\n            const triggerEventTypes = this._getTriggerEventTypes(\n                this._options.triggerType\n            );\n\n            this._showEventHandler = () => {\n                this.show();\n            };\n\n            triggerEventTypes.showEvents.forEach((ev: string) => {\n                this._triggerEl.addEventListener(ev, this._showEventHandler);\n                this._targetEl.addEventListener(ev, this._showEventHandler);\n            });\n\n            this._hideEventHandler = () => {\n                if (!this._parentEl.matches(':hover')) {\n                    this.hide();\n                }\n            };\n\n            triggerEventTypes.hideEvents.forEach((ev: string) => {\n                this._parentEl.addEventListener(ev, this._hideEventHandler);\n            });\n            this._initialized = true;\n        }\n    }\n\n    destroy() {\n        if (this._initialized) {\n            const triggerEventTypes = this._getTriggerEventTypes(\n                this._options.triggerType\n            );\n\n            triggerEventTypes.showEvents.forEach((ev: string) => {\n                this._triggerEl.removeEventListener(ev, this._showEventHandler);\n                this._targetEl.removeEventListener(ev, this._showEventHandler);\n            });\n\n            triggerEventTypes.hideEvents.forEach((ev: string) => {\n                this._parentEl.removeEventListener(ev, this._hideEventHandler);\n            });\n\n            this._initialized = false;\n        }\n    }\n\n    removeInstance() {\n        instances.removeInstance('Dial', this._instanceId);\n    }\n\n    destroyAndRemoveInstance() {\n        this.destroy();\n        this.removeInstance();\n    }\n\n    hide() {\n        this._targetEl.classList.add('hidden');\n        if (this._triggerEl) {\n            this._triggerEl.setAttribute('aria-expanded', 'false');\n        }\n        this._visible = false;\n\n        // callback function\n        this._options.onHide(this);\n    }\n\n    show() {\n        this._targetEl.classList.remove('hidden');\n        if (this._triggerEl) {\n            this._triggerEl.setAttribute('aria-expanded', 'true');\n        }\n        this._visible = true;\n\n        // callback function\n        this._options.onShow(this);\n    }\n\n    toggle() {\n        if (this._visible) {\n            this.hide();\n        } else {\n            this.show();\n        }\n    }\n\n    isHidden() {\n        return !this._visible;\n    }\n\n    isVisible() {\n        return this._visible;\n    }\n\n    _getTriggerEventTypes(triggerType: DialTriggerType) {\n        switch (triggerType) {\n            case 'hover':\n                return {\n                    showEvents: ['mouseenter', 'focus'],\n                    hideEvents: ['mouseleave', 'blur'],\n                };\n            case 'click':\n                return {\n                    showEvents: ['click', 'focus'],\n                    hideEvents: ['focusout', 'blur'],\n                };\n            case 'none':\n                return {\n                    showEvents: [],\n                    hideEvents: [],\n                };\n            default:\n                return {\n                    showEvents: ['mouseenter', 'focus'],\n                    hideEvents: ['mouseleave', 'blur'],\n                };\n        }\n    }\n\n    updateOnShow(callback: () => void) {\n        this._options.onShow = callback;\n    }\n\n    updateOnHide(callback: () => void) {\n        this._options.onHide = callback;\n    }\n\n    updateOnToggle(callback: () => void) {\n        this._options.onToggle = callback;\n    }\n}\n\nexport function initDials() {\n    document.querySelectorAll('[data-dial-init]').forEach(($parentEl) => {\n        const $triggerEl = $parentEl.querySelector('[data-dial-toggle]');\n\n        if ($triggerEl) {\n            const dialId = $triggerEl.getAttribute('data-dial-toggle');\n            const $dialEl = document.getElementById(dialId);\n\n            if ($dialEl) {\n                const triggerType =\n                    $triggerEl.getAttribute('data-dial-trigger');\n                new Dial(\n                    $parentEl as HTMLElement,\n                    $triggerEl as HTMLElement,\n                    $dialEl as HTMLElement,\n                    {\n                        triggerType: triggerType\n                            ? triggerType\n                            : Default.triggerType,\n                    } as DialOptions\n                );\n            } else {\n                console.error(\n                    `Dial with id ${dialId} does not exist. Are you sure that the data-dial-toggle attribute points to the correct modal id?`\n                );\n            }\n        } else {\n            console.error(\n                `Dial with id ${$parentEl.id} does not have a trigger element. Are you sure that the data-dial-toggle attribute exists?`\n            );\n        }\n    });\n}\n\nif (typeof window !== 'undefined') {\n    window.Dial = Dial;\n    window.initDials = initDials;\n}\n\nexport default Dial;\n", "/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DismissOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { DismissInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: DismissOptions = {\n    transition: 'transition-opacity',\n    duration: 300,\n    timing: 'ease-out',\n    onHide: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n    id: null,\n    override: true,\n};\n\nclass Dismiss implements DismissInterface {\n    _instanceId: string;\n    _targetEl: HTMLElement | null;\n    _triggerEl: HTMLElement | null;\n    _options: DismissOptions;\n    _initialized: boolean;\n    _clickHandler: EventListenerOrEventListenerObject;\n\n    constructor(\n        targetEl: HTMLElement | null = null,\n        triggerEl: HTMLElement | null = null,\n        options: DismissOptions = Default,\n        instanceOptions: InstanceOptions = DefaultInstanceOptions\n    ) {\n        this._instanceId = instanceOptions.id\n            ? instanceOptions.id\n            : targetEl.id;\n        this._targetEl = targetEl;\n        this._triggerEl = triggerEl;\n        this._options = { ...Default, ...options };\n        this._initialized = false;\n        this.init();\n        instances.addInstance(\n            'Dismiss',\n            this,\n            this._instanceId,\n            instanceOptions.override\n        );\n    }\n\n    init() {\n        if (this._triggerEl && this._targetEl && !this._initialized) {\n            this._clickHandler = () => {\n                this.hide();\n            };\n            this._triggerEl.addEventListener('click', this._clickHandler);\n            this._initialized = true;\n        }\n    }\n\n    destroy() {\n        if (this._triggerEl && this._initialized) {\n            this._triggerEl.removeEventListener('click', this._clickHandler);\n            this._initialized = false;\n        }\n    }\n\n    removeInstance() {\n        instances.removeInstance('Dismiss', this._instanceId);\n    }\n\n    destroyAndRemoveInstance() {\n        this.destroy();\n        this.removeInstance();\n    }\n\n    hide() {\n        this._targetEl.classList.add(\n            this._options.transition,\n            `duration-${this._options.duration}`,\n            this._options.timing,\n            'opacity-0'\n        );\n        setTimeout(() => {\n            this._targetEl.classList.add('hidden');\n        }, this._options.duration);\n\n        // callback function\n        this._options.onHide(this, this._targetEl);\n    }\n\n    updateOnHide(callback: () => void) {\n        this._options.onHide = callback;\n    }\n}\n\nexport function initDismisses() {\n    document.querySelectorAll('[data-dismiss-target]').forEach(($triggerEl) => {\n        const targetId = $triggerEl.getAttribute('data-dismiss-target');\n        const $dismissEl = document.querySelector(targetId);\n\n        if ($dismissEl) {\n            new Dismiss($dismissEl as HTMLElement, $triggerEl as HTMLElement);\n        } else {\n            console.error(\n                `The dismiss element with id \"${targetId}\" does not exist. Please check the data-dismiss-target attribute.`\n            );\n        }\n    });\n}\n\nif (typeof window !== 'undefined') {\n    window.Dismiss = Dismiss;\n    window.initDismisses = initDismisses;\n}\n\nexport default Dismiss;\n", "/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DrawerOptions, PlacementClasses } from './types';\nimport type { InstanceOptions, EventListenerInstance } from '../../dom/types';\nimport { DrawerInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: DrawerOptions = {\n    placement: 'left',\n    bodyScrolling: false,\n    backdrop: true,\n    edge: false,\n    edgeOffset: 'bottom-[60px]',\n    backdropClasses: 'bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-30',\n    onShow: () => {},\n    onHide: () => {},\n    onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n    id: null,\n    override: true,\n};\n\nclass Drawer implements DrawerInterface {\n    _instanceId: string;\n    _targetEl: HTMLElement;\n    _triggerEl: HTMLElement;\n    _options: DrawerOptions;\n    _visible: boolean;\n    _eventListenerInstances: EventListenerInstance[] = [];\n    _handleEscapeKey: EventListenerOrEventListenerObject;\n    _initialized: boolean;\n\n    constructor(\n        targetEl: HTMLElement | null = null,\n        options: DrawerOptions = Default,\n        instanceOptions: InstanceOptions = DefaultInstanceOptions\n    ) {\n        this._instanceId = instanceOptions.id\n            ? instanceOptions.id\n            : targetEl.id;\n        this._targetEl = targetEl;\n        this._options = { ...Default, ...options };\n        this._visible = false;\n        this._initialized = false;\n        this.init();\n        instances.addInstance(\n            'Drawer',\n            this,\n            this._instanceId,\n            instanceOptions.override\n        );\n    }\n\n    init() {\n        // set initial accessibility attributes\n        if (this._targetEl && !this._initialized) {\n            this._targetEl.setAttribute('aria-hidden', 'true');\n            this._targetEl.classList.add('transition-transform');\n\n            // set base placement classes\n            this._getPlacementClasses(this._options.placement).base.map((c) => {\n                this._targetEl.classList.add(c);\n            });\n\n            this._handleEscapeKey = (event: KeyboardEvent) => {\n                if (event.key === 'Escape') {\n                    // if 'Escape' key is pressed\n                    if (this.isVisible()) {\n                        // if the Drawer is visible\n                        this.hide(); // hide the Drawer\n                    }\n                }\n            };\n\n            // add keyboard event listener to document\n            document.addEventListener('keydown', this._handleEscapeKey);\n\n            this._initialized = true;\n        }\n    }\n\n    destroy() {\n        if (this._initialized) {\n            this.removeAllEventListenerInstances();\n            this._destroyBackdropEl();\n\n            // Remove the keyboard event listener\n            document.removeEventListener('keydown', this._handleEscapeKey);\n\n            this._initialized = false;\n        }\n    }\n\n    removeInstance() {\n        instances.removeInstance('Drawer', this._instanceId);\n    }\n\n    destroyAndRemoveInstance() {\n        this.destroy();\n        this.removeInstance();\n    }\n\n    hide() {\n        // based on the edge option show placement classes\n        if (this._options.edge) {\n            this._getPlacementClasses(\n                this._options.placement + '-edge'\n            ).active.map((c) => {\n                this._targetEl.classList.remove(c);\n            });\n            this._getPlacementClasses(\n                this._options.placement + '-edge'\n            ).inactive.map((c) => {\n                this._targetEl.classList.add(c);\n            });\n        } else {\n            this._getPlacementClasses(this._options.placement).active.map(\n                (c) => {\n                    this._targetEl.classList.remove(c);\n                }\n            );\n            this._getPlacementClasses(this._options.placement).inactive.map(\n                (c) => {\n                    this._targetEl.classList.add(c);\n                }\n            );\n        }\n\n        // set accessibility attributes\n        this._targetEl.setAttribute('aria-hidden', 'true');\n        this._targetEl.removeAttribute('aria-modal');\n        this._targetEl.removeAttribute('role');\n\n        // enable body scroll\n        if (!this._options.bodyScrolling) {\n            document.body.classList.remove('overflow-hidden');\n        }\n\n        // destroy backdrop\n        if (this._options.backdrop) {\n            this._destroyBackdropEl();\n        }\n\n        this._visible = false;\n\n        // callback function\n        this._options.onHide(this);\n    }\n\n    show() {\n        if (this._options.edge) {\n            this._getPlacementClasses(\n                this._options.placement + '-edge'\n            ).active.map((c) => {\n                this._targetEl.classList.add(c);\n            });\n            this._getPlacementClasses(\n                this._options.placement + '-edge'\n            ).inactive.map((c) => {\n                this._targetEl.classList.remove(c);\n            });\n        } else {\n            this._getPlacementClasses(this._options.placement).active.map(\n                (c) => {\n                    this._targetEl.classList.add(c);\n                }\n            );\n            this._getPlacementClasses(this._options.placement).inactive.map(\n                (c) => {\n                    this._targetEl.classList.remove(c);\n                }\n            );\n        }\n\n        // set accessibility attributes\n        this._targetEl.setAttribute('aria-modal', 'true');\n        this._targetEl.setAttribute('role', 'dialog');\n        this._targetEl.removeAttribute('aria-hidden');\n\n        // disable body scroll\n        if (!this._options.bodyScrolling) {\n            document.body.classList.add('overflow-hidden');\n        }\n\n        // show backdrop\n        if (this._options.backdrop) {\n            this._createBackdrop();\n        }\n\n        this._visible = true;\n\n        // callback function\n        this._options.onShow(this);\n    }\n\n    toggle() {\n        if (this.isVisible()) {\n            this.hide();\n        } else {\n            this.show();\n        }\n    }\n\n    _createBackdrop() {\n        if (!this._visible) {\n            const backdropEl = document.createElement('div');\n            backdropEl.setAttribute('drawer-backdrop', '');\n            backdropEl.classList.add(\n                ...this._options.backdropClasses.split(' ')\n            );\n            document.querySelector('body').append(backdropEl);\n            backdropEl.addEventListener('click', () => {\n                this.hide();\n            });\n        }\n    }\n\n    _destroyBackdropEl() {\n        if (\n            this._visible &&\n            document.querySelector('[drawer-backdrop]') !== null\n        ) {\n            document.querySelector('[drawer-backdrop]').remove();\n        }\n    }\n\n    _getPlacementClasses(placement: string): PlacementClasses {\n        switch (placement) {\n            case 'top':\n                return {\n                    base: ['top-0', 'left-0', 'right-0'],\n                    active: ['transform-none'],\n                    inactive: ['-translate-y-full'],\n                };\n            case 'right':\n                return {\n                    base: ['right-0', 'top-0'],\n                    active: ['transform-none'],\n                    inactive: ['translate-x-full'],\n                };\n            case 'bottom':\n                return {\n                    base: ['bottom-0', 'left-0', 'right-0'],\n                    active: ['transform-none'],\n                    inactive: ['translate-y-full'],\n                };\n            case 'left':\n                return {\n                    base: ['left-0', 'top-0'],\n                    active: ['transform-none'],\n                    inactive: ['-translate-x-full'],\n                };\n            case 'bottom-edge':\n                return {\n                    base: ['left-0', 'top-0'],\n                    active: ['transform-none'],\n                    inactive: ['translate-y-full', this._options.edgeOffset],\n                };\n            default:\n                return {\n                    base: ['left-0', 'top-0'],\n                    active: ['transform-none'],\n                    inactive: ['-translate-x-full'],\n                };\n        }\n    }\n\n    isHidden() {\n        return !this._visible;\n    }\n\n    isVisible() {\n        return this._visible;\n    }\n\n    addEventListenerInstance(\n        element: HTMLElement,\n        type: string,\n        handler: EventListenerOrEventListenerObject\n    ) {\n        this._eventListenerInstances.push({\n            element: element,\n            type: type,\n            handler: handler,\n        });\n    }\n\n    removeAllEventListenerInstances() {\n        this._eventListenerInstances.map((eventListenerInstance) => {\n            eventListenerInstance.element.removeEventListener(\n                eventListenerInstance.type,\n                eventListenerInstance.handler\n            );\n        });\n        this._eventListenerInstances = [];\n    }\n\n    getAllEventListenerInstances() {\n        return this._eventListenerInstances;\n    }\n\n    updateOnShow(callback: () => void) {\n        this._options.onShow = callback;\n    }\n\n    updateOnHide(callback: () => void) {\n        this._options.onHide = callback;\n    }\n\n    updateOnToggle(callback: () => void) {\n        this._options.onToggle = callback;\n    }\n}\n\nexport function initDrawers() {\n    document.querySelectorAll('[data-drawer-target]').forEach(($triggerEl) => {\n        // mandatory\n        const drawerId = $triggerEl.getAttribute('data-drawer-target');\n        const $drawerEl = document.getElementById(drawerId);\n\n        if ($drawerEl) {\n            const placement = $triggerEl.getAttribute('data-drawer-placement');\n            const bodyScrolling = $triggerEl.getAttribute(\n                'data-drawer-body-scrolling'\n            );\n            const backdrop = $triggerEl.getAttribute('data-drawer-backdrop');\n            const edge = $triggerEl.getAttribute('data-drawer-edge');\n            const edgeOffset = $triggerEl.getAttribute(\n                'data-drawer-edge-offset'\n            );\n\n            new Drawer($drawerEl, {\n                placement: placement ? placement : Default.placement,\n                bodyScrolling: bodyScrolling\n                    ? bodyScrolling === 'true'\n                        ? true\n                        : false\n                    : Default.bodyScrolling,\n                backdrop: backdrop\n                    ? backdrop === 'true'\n                        ? true\n                        : false\n                    : Default.backdrop,\n                edge: edge ? (edge === 'true' ? true : false) : Default.edge,\n                edgeOffset: edgeOffset ? edgeOffset : Default.edgeOffset,\n            } as DrawerOptions);\n        } else {\n            console.error(\n                `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?`\n            );\n        }\n    });\n\n    document.querySelectorAll('[data-drawer-toggle]').forEach(($triggerEl) => {\n        const drawerId = $triggerEl.getAttribute('data-drawer-toggle');\n        const $drawerEl = document.getElementById(drawerId);\n\n        if ($drawerEl) {\n            const drawer: DrawerInterface = instances.getInstance(\n                'Drawer',\n                drawerId\n            );\n\n            if (drawer) {\n                const toggleDrawer = () => {\n                    drawer.toggle();\n                };\n                $triggerEl.addEventListener('click', toggleDrawer);\n                drawer.addEventListenerInstance(\n                    $triggerEl as HTMLElement,\n                    'click',\n                    toggleDrawer\n                );\n            } else {\n                console.error(\n                    `Drawer with id ${drawerId} has not been initialized. Please initialize it using the data-drawer-target attribute.`\n                );\n            }\n        } else {\n            console.error(\n                `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?`\n            );\n        }\n    });\n\n    document\n        .querySelectorAll('[data-drawer-dismiss], [data-drawer-hide]')\n        .forEach(($triggerEl) => {\n            const drawerId = $triggerEl.getAttribute('data-drawer-dismiss')\n                ? $triggerEl.getAttribute('data-drawer-dismiss')\n                : $triggerEl.getAttribute('data-drawer-hide');\n            const $drawerEl = document.getElementById(drawerId);\n\n            if ($drawerEl) {\n                const drawer: DrawerInterface = instances.getInstance(\n                    'Drawer',\n                    drawerId\n                );\n\n                if (drawer) {\n                    const hideDrawer = () => {\n                        drawer.hide();\n                    };\n                    $triggerEl.addEventListener('click', hideDrawer);\n                    drawer.addEventListenerInstance(\n                        $triggerEl as HTMLElement,\n                        'click',\n                        hideDrawer\n                    );\n                } else {\n                    console.error(\n                        `Drawer with id ${drawerId} has not been initialized. Please initialize it using the data-drawer-target attribute.`\n                    );\n                }\n            } else {\n                console.error(\n                    `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id`\n                );\n            }\n        });\n\n    document.querySelectorAll('[data-drawer-show]').forEach(($triggerEl) => {\n        const drawerId = $triggerEl.getAttribute('data-drawer-show');\n        const $drawerEl = document.getElementById(drawerId);\n\n        if ($drawerEl) {\n            const drawer: DrawerInterface = instances.getInstance(\n                'Drawer',\n                drawerId\n            );\n\n            if (drawer) {\n                const showDrawer = () => {\n                    drawer.show();\n                };\n                $triggerEl.addEventListener('click', showDrawer);\n                drawer.addEventListenerInstance(\n                    $triggerEl as HTMLElement,\n                    'click',\n                    showDrawer\n                );\n            } else {\n                console.error(\n                    `Drawer with id ${drawerId} has not been initialized. Please initialize it using the data-drawer-target attribute.`\n                );\n            }\n        } else {\n            console.error(\n                `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?`\n            );\n        }\n    });\n}\n\nif (typeof window !== 'undefined') {\n    window.Drawer = Drawer;\n    window.initDrawers = initDrawers;\n}\n\nexport default Drawer;\n", "/* eslint-disable @typescript-eslint/no-empty-function */\nimport { createPopper } from '@popperjs/core';\nimport type {\n    Options as PopperOptions,\n    Instance as PopperInstance,\n} from '@popperjs/core';\nimport type { DropdownOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { DropdownInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: DropdownOptions = {\n    placement: 'bottom',\n    triggerType: 'click',\n    offsetSkidding: 0,\n    offsetDistance: 10,\n    delay: 300,\n    ignoreClickOutsideClass: false,\n    onShow: () => {},\n    onHide: () => {},\n    onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n    id: null,\n    override: true,\n};\n\nclass Dropdown implements DropdownInterface {\n    _instanceId: string;\n    _targetEl: HTMLElement;\n    _triggerEl: HTMLElement;\n    _options: DropdownOptions;\n    _visible: boolean;\n    _popperInstance: PopperInstance;\n    _initialized: boolean;\n    _clickOutsideEventListener: EventListenerOrEventListenerObject;\n    _hoverShowTriggerElHandler: EventListenerOrEventListenerObject;\n    _hoverShowTargetElHandler: EventListenerOrEventListenerObject;\n    _hoverHideHandler: EventListenerOrEventListenerObject;\n    _clickHandler: EventListenerOrEventListenerObject;\n\n    constructor(\n        targetElement: HTMLElement | null = null,\n        triggerElement: HTMLElement | null = null,\n        options: DropdownOptions = Default,\n        instanceOptions: InstanceOptions = DefaultInstanceOptions\n    ) {\n        this._instanceId = instanceOptions.id\n            ? instanceOptions.id\n            : targetElement.id;\n        this._targetEl = targetElement;\n        this._triggerEl = triggerElement;\n        this._options = { ...Default, ...options };\n        this._popperInstance = null;\n        this._visible = false;\n        this._initialized = false;\n        this.init();\n        instances.addInstance(\n            'Dropdown',\n            this,\n            this._instanceId,\n            instanceOptions.override\n        );\n    }\n\n    init() {\n        if (this._triggerEl && this._targetEl && !this._initialized) {\n            this._popperInstance = this._createPopperInstance();\n            this._setupEventListeners();\n            this._initialized = true;\n        }\n    }\n\n    destroy() {\n        const triggerEvents = this._getTriggerEvents();\n\n        // Remove click event listeners for trigger element\n        if (this._options.triggerType === 'click') {\n            triggerEvents.showEvents.forEach((ev) => {\n                this._triggerEl.removeEventListener(ev, this._clickHandler);\n            });\n        }\n\n        // Remove hover event listeners for trigger and target elements\n        if (this._options.triggerType === 'hover') {\n            triggerEvents.showEvents.forEach((ev) => {\n                this._triggerEl.removeEventListener(\n                    ev,\n                    this._hoverShowTriggerElHandler\n                );\n                this._targetEl.removeEventListener(\n                    ev,\n                    this._hoverShowTargetElHandler\n                );\n            });\n\n            triggerEvents.hideEvents.forEach((ev) => {\n                this._triggerEl.removeEventListener(ev, this._hoverHideHandler);\n                this._targetEl.removeEventListener(ev, this._hoverHideHandler);\n            });\n        }\n\n        this._popperInstance.destroy();\n        this._initialized = false;\n    }\n\n    removeInstance() {\n        instances.removeInstance('Dropdown', this._instanceId);\n    }\n\n    destroyAndRemoveInstance() {\n        this.destroy();\n        this.removeInstance();\n    }\n\n    _setupEventListeners() {\n        const triggerEvents = this._getTriggerEvents();\n\n        this._clickHandler = () => {\n            this.toggle();\n        };\n\n        // click event handling for trigger element\n        if (this._options.triggerType === 'click') {\n            triggerEvents.showEvents.forEach((ev) => {\n                this._triggerEl.addEventListener(ev, this._clickHandler);\n            });\n        }\n\n        this._hoverShowTriggerElHandler = (ev) => {\n            if (ev.type === 'click') {\n                this.toggle();\n            } else {\n                setTimeout(() => {\n                    this.show();\n                }, this._options.delay);\n            }\n        };\n        this._hoverShowTargetElHandler = () => {\n            this.show();\n        };\n\n        this._hoverHideHandler = () => {\n            setTimeout(() => {\n                if (!this._targetEl.matches(':hover')) {\n                    this.hide();\n                }\n            }, this._options.delay);\n        };\n\n        // hover event handling for trigger element\n        if (this._options.triggerType === 'hover') {\n            triggerEvents.showEvents.forEach((ev) => {\n                this._triggerEl.addEventListener(\n                    ev,\n                    this._hoverShowTriggerElHandler\n                );\n                this._targetEl.addEventListener(\n                    ev,\n                    this._hoverShowTargetElHandler\n                );\n            });\n\n            triggerEvents.hideEvents.forEach((ev) => {\n                this._triggerEl.addEventListener(ev, this._hoverHideHandler);\n                this._targetEl.addEventListener(ev, this._hoverHideHandler);\n            });\n        }\n    }\n\n    _createPopperInstance() {\n        return createPopper(this._triggerEl, this._targetEl, {\n            placement: this._options.placement,\n            modifiers: [\n                {\n                    name: 'offset',\n                    options: {\n                        offset: [\n                            this._options.offsetSkidding,\n                            this._options.offsetDistance,\n                        ],\n                    },\n                },\n            ],\n        });\n    }\n\n    _setupClickOutsideListener() {\n        this._clickOutsideEventListener = (ev: MouseEvent) => {\n            this._handleClickOutside(ev, this._targetEl);\n        };\n        document.body.addEventListener(\n            'click',\n            this._clickOutsideEventListener,\n            true\n        );\n    }\n\n    _removeClickOutsideListener() {\n        document.body.removeEventListener(\n            'click',\n            this._clickOutsideEventListener,\n            true\n        );\n    }\n\n    _handleClickOutside(ev: Event, targetEl: HTMLElement) {\n        const clickedEl = ev.target as Node;\n\n        // Ignore clicks on the trigger element (ie. a datepicker input)\n        const ignoreClickOutsideClass = this._options.ignoreClickOutsideClass;\n\n        let isIgnored = false;\n        if (ignoreClickOutsideClass) {\n            const ignoredClickOutsideEls = document.querySelectorAll(\n                `.${ignoreClickOutsideClass}`\n            );\n            ignoredClickOutsideEls.forEach((el) => {\n                if (el.contains(clickedEl)) {\n                    isIgnored = true;\n                    return;\n                }\n            });\n        }\n\n        // Ignore clicks on the target element (ie. dropdown itself)\n        if (\n            clickedEl !== targetEl &&\n            !targetEl.contains(clickedEl) &&\n            !this._triggerEl.contains(clickedEl) &&\n            !isIgnored &&\n            this.isVisible()\n        ) {\n            this.hide();\n        }\n    }\n\n    _getTriggerEvents() {\n        switch (this._options.triggerType) {\n            case 'hover':\n                return {\n                    showEvents: ['mouseenter', 'click'],\n                    hideEvents: ['mouseleave'],\n                };\n            case 'click':\n                return {\n                    showEvents: ['click'],\n                    hideEvents: [],\n                };\n            case 'none':\n                return {\n                    showEvents: [],\n                    hideEvents: [],\n                };\n            default:\n                return {\n                    showEvents: ['click'],\n                    hideEvents: [],\n                };\n        }\n    }\n\n    toggle() {\n        if (this.isVisible()) {\n            this.hide();\n        } else {\n            this.show();\n        }\n        this._options.onToggle(this);\n    }\n\n    isVisible() {\n        return this._visible;\n    }\n\n    show() {\n        this._targetEl.classList.remove('hidden');\n        this._targetEl.classList.add('block');\n        this._targetEl.removeAttribute('aria-hidden');\n\n        // Enable the event listeners\n        this._popperInstance.setOptions((options: PopperOptions) => ({\n            ...options,\n            modifiers: [\n                ...options.modifiers,\n                { name: 'eventListeners', enabled: true },\n            ],\n        }));\n\n        this._setupClickOutsideListener();\n\n        // Update its position\n        this._popperInstance.update();\n        this._visible = true;\n\n        // callback function\n        this._options.onShow(this);\n    }\n\n    hide() {\n        this._targetEl.classList.remove('block');\n        this._targetEl.classList.add('hidden');\n        this._targetEl.setAttribute('aria-hidden', 'true');\n\n        // Disable the event listeners\n        this._popperInstance.setOptions((options: PopperOptions) => ({\n            ...options,\n            modifiers: [\n                ...options.modifiers,\n                { name: 'eventListeners', enabled: false },\n            ],\n        }));\n\n        this._visible = false;\n\n        this._removeClickOutsideListener();\n\n        // callback function\n        this._options.onHide(this);\n    }\n\n    updateOnShow(callback: () => void) {\n        this._options.onShow = callback;\n    }\n\n    updateOnHide(callback: () => void) {\n        this._options.onHide = callback;\n    }\n\n    updateOnToggle(callback: () => void) {\n        this._options.onToggle = callback;\n    }\n}\n\nexport function initDropdowns() {\n    document\n        .querySelectorAll('[data-dropdown-toggle]')\n        .forEach(($triggerEl) => {\n            const dropdownId = $triggerEl.getAttribute('data-dropdown-toggle');\n            const $dropdownEl = document.getElementById(dropdownId);\n\n            if ($dropdownEl) {\n                const placement = $triggerEl.getAttribute(\n                    'data-dropdown-placement'\n                );\n                const offsetSkidding = $triggerEl.getAttribute(\n                    'data-dropdown-offset-skidding'\n                );\n                const offsetDistance = $triggerEl.getAttribute(\n                    'data-dropdown-offset-distance'\n                );\n                const triggerType = $triggerEl.getAttribute(\n                    'data-dropdown-trigger'\n                );\n                const delay = $triggerEl.getAttribute('data-dropdown-delay');\n                const ignoreClickOutsideClass = $triggerEl.getAttribute(\n                    'data-dropdown-ignore-click-outside-class'\n                );\n\n                new Dropdown(\n                    $dropdownEl as HTMLElement,\n                    $triggerEl as HTMLElement,\n                    {\n                        placement: placement ? placement : Default.placement,\n                        triggerType: triggerType\n                            ? triggerType\n                            : Default.triggerType,\n                        offsetSkidding: offsetSkidding\n                            ? parseInt(offsetSkidding)\n                            : Default.offsetSkidding,\n                        offsetDistance: offsetDistance\n                            ? parseInt(offsetDistance)\n                            : Default.offsetDistance,\n                        delay: delay ? parseInt(delay) : Default.delay,\n                        ignoreClickOutsideClass: ignoreClickOutsideClass\n                            ? ignoreClickOutsideClass\n                            : Default.ignoreClickOutsideClass,\n                    } as DropdownOptions\n                );\n            } else {\n                console.error(\n                    `The dropdown element with id \"${dropdownId}\" does not exist. Please check the data-dropdown-toggle attribute.`\n                );\n            }\n        });\n}\n\nif (typeof window !== 'undefined') {\n    window.Dropdown = Dropdown;\n    window.initDropdowns = initDropdowns;\n}\n\nexport default Dropdown;\n", "import { initAccordions } from './accordion';\nimport { initCarousels } from './carousel';\nimport { initCopyClipboards } from './clipboard';\nimport { initCollapses } from './collapse';\nimport { initDials } from './dial';\nimport { initDismisses } from './dismiss';\nimport { initDrawers } from './drawer';\nimport { initDropdowns } from './dropdown';\nimport { initInputCounters } from './input-counter';\nimport { initModals } from './modal';\nimport { initPopovers } from './popover';\nimport { initTabs } from './tabs';\nimport { initTooltips } from './tooltip';\nimport { initDatepickers } from './datepicker';\n\nexport function initFlowbite() {\n    initAccordions();\n    initCollapses();\n    initCarousels();\n    initDismisses();\n    initDropdowns();\n    initModals();\n    initDrawers();\n    initTabs();\n    initTooltips();\n    initPopovers();\n    initDials();\n    initInputCounters();\n    initCopyClipboards();\n    initDatepickers();\n}\n\nif (typeof window !== 'undefined') {\n    window.initFlowbite = initFlowbite;\n}\n", "/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { InputCounterOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { InputCounterInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: InputCounterOptions = {\n    minValue: null,\n    maxValue: null,\n    onIncrement: () => {},\n    onDecrement: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n    id: null,\n    override: true,\n};\n\nclass InputCounter implements InputCounterInterface {\n    _instanceId: string;\n    _targetEl: HTMLInputElement | null;\n    _incrementEl: HTMLElement | null;\n    _decrementEl: HTMLElement | null;\n    _options: InputCounterOptions;\n    _initialized: boolean;\n    _incrementClickHandler: EventListenerOrEventListenerObject;\n    _decrementClickHandler: EventListenerOrEventListenerObject;\n    _inputHandler: EventListenerOrEventListenerObject;\n\n    constructor(\n        targetEl: HTMLInputElement | null = null,\n        incrementEl: HTMLElement | null = null,\n        decrementEl: HTMLElement | null = null,\n        options: InputCounterOptions = Default,\n        instanceOptions: InstanceOptions = DefaultInstanceOptions\n    ) {\n        this._instanceId = instanceOptions.id\n            ? instanceOptions.id\n            : targetEl.id;\n\n        this._targetEl = targetEl;\n        this._incrementEl = incrementEl;\n        this._decrementEl = decrementEl;\n        this._options = { ...Default, ...options };\n        this._initialized = false;\n\n        this.init();\n        instances.addInstance(\n            'InputCounter',\n            this,\n            this._instanceId,\n            instanceOptions.override\n        );\n    }\n\n    init() {\n        if (this._targetEl && !this._initialized) {\n            this._inputHandler = (event) => {\n                {\n                    const target = event.target as HTMLInputElement;\n\n                    // check if the value is numeric\n                    if (!/^\\d*$/.test(target.value)) {\n                        // Regex to check if the value is numeric\n                        target.value = target.value.replace(/[^\\d]/g, ''); // Remove non-numeric characters\n                    }\n\n                    // check for max value\n                    if (\n                        this._options.maxValue !== null &&\n                        parseInt(target.value) > this._options.maxValue\n                    ) {\n                        target.value = this._options.maxValue.toString();\n                    }\n\n                    // check for min value\n                    if (\n                        this._options.minValue !== null &&\n                        parseInt(target.value) < this._options.minValue\n                    ) {\n                        target.value = this._options.minValue.toString();\n                    }\n                }\n            };\n\n            this._incrementClickHandler = () => {\n                this.increment();\n            };\n\n            this._decrementClickHandler = () => {\n                this.decrement();\n            };\n\n            // Add event listener to restrict input to numeric values only\n            this._targetEl.addEventListener('input', this._inputHandler);\n\n            if (this._incrementEl) {\n                this._incrementEl.addEventListener(\n                    'click',\n                    this._incrementClickHandler\n                );\n            }\n\n            if (this._decrementEl) {\n                this._decrementEl.addEventListener(\n                    'click',\n                    this._decrementClickHandler\n                );\n            }\n\n            this._initialized = true;\n        }\n    }\n\n    destroy() {\n        if (this._targetEl && this._initialized) {\n            this._targetEl.removeEventListener('input', this._inputHandler);\n\n            if (this._incrementEl) {\n                this._incrementEl.removeEventListener(\n                    'click',\n                    this._incrementClickHandler\n                );\n            }\n            if (this._decrementEl) {\n                this._decrementEl.removeEventListener(\n                    'click',\n                    this._decrementClickHandler\n                );\n            }\n            this._initialized = false;\n        }\n    }\n\n    removeInstance() {\n        instances.removeInstance('InputCounter', this._instanceId);\n    }\n\n    destroyAndRemoveInstance() {\n        this.destroy();\n        this.removeInstance();\n    }\n\n    getCurrentValue() {\n        return parseInt(this._targetEl.value) || 0;\n    }\n\n    increment() {\n        // don't increment if the value is already at the maximum value\n        if (\n            this._options.maxValue !== null &&\n            this.getCurrentValue() >= this._options.maxValue\n        ) {\n            return;\n        }\n\n        this._targetEl.value = (this.getCurrentValue() + 1).toString();\n        this._options.onIncrement(this);\n    }\n\n    decrement() {\n        // don't decrement if the value is already at the minimum value\n        if (\n            this._options.minValue !== null &&\n            this.getCurrentValue() <= this._options.minValue\n        ) {\n            return;\n        }\n\n        this._targetEl.value = (this.getCurrentValue() - 1).toString();\n        this._options.onDecrement(this);\n    }\n\n    updateOnIncrement(callback: () => void) {\n        this._options.onIncrement = callback;\n    }\n\n    updateOnDecrement(callback: () => void) {\n        this._options.onDecrement = callback;\n    }\n}\n\nexport function initInputCounters() {\n    document.querySelectorAll('[data-input-counter]').forEach(($targetEl) => {\n        const targetId = $targetEl.id;\n\n        const $incrementEl = document.querySelector(\n            '[data-input-counter-increment=\"' + targetId + '\"]'\n        );\n\n        const $decrementEl = document.querySelector(\n            '[data-input-counter-decrement=\"' + targetId + '\"]'\n        );\n\n        const minValue = $targetEl.getAttribute('data-input-counter-min');\n        const maxValue = $targetEl.getAttribute('data-input-counter-max');\n\n        // check if the target element exists\n        if ($targetEl) {\n            if (\n                !instances.instanceExists(\n                    'InputCounter',\n                    $targetEl.getAttribute('id')\n                )\n            ) {\n                new InputCounter(\n                    $targetEl as HTMLInputElement,\n                    $incrementEl ? ($incrementEl as HTMLElement) : null,\n                    $decrementEl ? ($decrementEl as HTMLElement) : null,\n                    {\n                        minValue: minValue ? parseInt(minValue) : null,\n                        maxValue: maxValue ? parseInt(maxValue) : null,\n                    } as InputCounterOptions\n                );\n            }\n        } else {\n            console.error(\n                `The target element with id \"${targetId}\" does not exist. Please check the data-input-counter attribute.`\n            );\n        }\n    });\n}\n\nif (typeof window !== 'undefined') {\n    window.InputCounter = InputCounter;\n    window.initInputCounters = initInputCounters;\n}\n\nexport default InputCounter;\n", "/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { ModalOptions } from './types';\nimport type { InstanceOptions, EventListenerInstance } from '../../dom/types';\nimport { ModalInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: ModalOptions = {\n    placement: 'center',\n    backdropClasses: 'bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-40',\n    backdrop: 'dynamic',\n    closable: true,\n    onHide: () => {},\n    onShow: () => {},\n    onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n    id: null,\n    override: true,\n};\n\nclass Modal implements ModalInterface {\n    _instanceId: string;\n    _targetEl: HTMLElement | null;\n    _options: ModalOptions;\n    _isHidden: boolean;\n    _backdropEl: HTMLElement | null;\n    _clickOutsideEventListener: EventListenerOrEventListenerObject;\n    _keydownEventListener: EventListenerOrEventListenerObject;\n    _eventListenerInstances: EventListenerInstance[] = [];\n    _initialized: boolean;\n\n    constructor(\n        targetEl: HTMLElement | null = null,\n        options: ModalOptions = Default,\n        instanceOptions: InstanceOptions = DefaultInstanceOptions\n    ) {\n        this._instanceId = instanceOptions.id\n            ? instanceOptions.id\n            : targetEl.id;\n        this._targetEl = targetEl;\n        this._options = { ...Default, ...options };\n        this._isHidden = true;\n        this._backdropEl = null;\n        this._initialized = false;\n        this.init();\n        instances.addInstance(\n            'Modal',\n            this,\n            this._instanceId,\n            instanceOptions.override\n        );\n    }\n\n    init() {\n        if (this._targetEl && !this._initialized) {\n            this._getPlacementClasses().map((c) => {\n                this._targetEl.classList.add(c);\n            });\n            this._initialized = true;\n        }\n    }\n\n    destroy() {\n        if (this._initialized) {\n            this.removeAllEventListenerInstances();\n            this._destroyBackdropEl();\n            this._initialized = false;\n        }\n    }\n\n    removeInstance() {\n        instances.removeInstance('Modal', this._instanceId);\n    }\n\n    destroyAndRemoveInstance() {\n        this.destroy();\n        this.removeInstance();\n    }\n\n    _createBackdrop() {\n        if (this._isHidden) {\n            const backdropEl = document.createElement('div');\n            backdropEl.classList.add(\n                ...this._options.backdropClasses.split(' ')\n            );\n            document.querySelector('body').append(backdropEl);\n            this._backdropEl = backdropEl;\n        }\n    }\n\n    _destroyBackdropEl() {\n        if (!this._isHidden && this._backdropEl) {\n            this._backdropEl.remove();\n            this._backdropEl = null;\n        }\n    }\n\n    _setupModalCloseEventListeners() {\n        if (this._options.backdrop === 'dynamic') {\n            this._clickOutsideEventListener = (ev: MouseEvent) => {\n                this._handleOutsideClick(ev.target);\n            };\n            this._targetEl.addEventListener(\n                'click',\n                this._clickOutsideEventListener,\n                true\n            );\n        }\n\n        this._keydownEventListener = (ev: KeyboardEvent) => {\n            if (ev.key === 'Escape') {\n                this.hide();\n            }\n        };\n        document.body.addEventListener(\n            'keydown',\n            this._keydownEventListener,\n            true\n        );\n    }\n\n    _removeModalCloseEventListeners() {\n        if (this._options.backdrop === 'dynamic') {\n            this._targetEl.removeEventListener(\n                'click',\n                this._clickOutsideEventListener,\n                true\n            );\n        }\n        document.body.removeEventListener(\n            'keydown',\n            this._keydownEventListener,\n            true\n        );\n    }\n\n    _handleOutsideClick(target: EventTarget) {\n        if (\n            target === this._targetEl ||\n            (target === this._backdropEl && this.isVisible())\n        ) {\n            this.hide();\n        }\n    }\n\n    _getPlacementClasses() {\n        switch (this._options.placement) {\n            // top\n            case 'top-left':\n                return ['justify-start', 'items-start'];\n            case 'top-center':\n                return ['justify-center', 'items-start'];\n            case 'top-right':\n                return ['justify-end', 'items-start'];\n\n            // center\n            case 'center-left':\n                return ['justify-start', 'items-center'];\n            case 'center':\n                return ['justify-center', 'items-center'];\n            case 'center-right':\n                return ['justify-end', 'items-center'];\n\n            // bottom\n            case 'bottom-left':\n                return ['justify-start', 'items-end'];\n            case 'bottom-center':\n                return ['justify-center', 'items-end'];\n            case 'bottom-right':\n                return ['justify-end', 'items-end'];\n\n            default:\n                return ['justify-center', 'items-center'];\n        }\n    }\n\n    toggle() {\n        if (this._isHidden) {\n            this.show();\n        } else {\n            this.hide();\n        }\n\n        // callback function\n        this._options.onToggle(this);\n    }\n\n    show() {\n        if (this.isHidden) {\n            this._targetEl.classList.add('flex');\n            this._targetEl.classList.remove('hidden');\n            this._targetEl.setAttribute('aria-modal', 'true');\n            this._targetEl.setAttribute('role', 'dialog');\n            this._targetEl.removeAttribute('aria-hidden');\n            this._createBackdrop();\n            this._isHidden = false;\n\n            // Add keyboard event listener to the document\n            if (this._options.closable) {\n                this._setupModalCloseEventListeners();\n            }\n\n            // prevent body scroll\n            document.body.classList.add('overflow-hidden');\n\n            // callback function\n            this._options.onShow(this);\n        }\n    }\n\n    hide() {\n        if (this.isVisible) {\n            this._targetEl.classList.add('hidden');\n            this._targetEl.classList.remove('flex');\n            this._targetEl.setAttribute('aria-hidden', 'true');\n            this._targetEl.removeAttribute('aria-modal');\n            this._targetEl.removeAttribute('role');\n            this._destroyBackdropEl();\n            this._isHidden = true;\n\n            // re-apply body scroll\n            document.body.classList.remove('overflow-hidden');\n\n            if (this._options.closable) {\n                this._removeModalCloseEventListeners();\n            }\n\n            // callback function\n            this._options.onHide(this);\n        }\n    }\n\n    isVisible() {\n        return !this._isHidden;\n    }\n\n    isHidden() {\n        return this._isHidden;\n    }\n\n    addEventListenerInstance(\n        element: HTMLElement,\n        type: string,\n        handler: EventListenerOrEventListenerObject\n    ) {\n        this._eventListenerInstances.push({\n            element: element,\n            type: type,\n            handler: handler,\n        });\n    }\n\n    removeAllEventListenerInstances() {\n        this._eventListenerInstances.map((eventListenerInstance) => {\n            eventListenerInstance.element.removeEventListener(\n                eventListenerInstance.type,\n                eventListenerInstance.handler\n            );\n        });\n        this._eventListenerInstances = [];\n    }\n\n    getAllEventListenerInstances() {\n        return this._eventListenerInstances;\n    }\n\n    updateOnShow(callback: () => void) {\n        this._options.onShow = callback;\n    }\n\n    updateOnHide(callback: () => void) {\n        this._options.onHide = callback;\n    }\n\n    updateOnToggle(callback: () => void) {\n        this._options.onToggle = callback;\n    }\n}\n\nexport function initModals() {\n    // initiate modal based on data-modal-target\n    document.querySelectorAll('[data-modal-target]').forEach(($triggerEl) => {\n        const modalId = $triggerEl.getAttribute('data-modal-target');\n        const $modalEl = document.getElementById(modalId);\n\n        if ($modalEl) {\n            const placement = $modalEl.getAttribute('data-modal-placement');\n            const backdrop = $modalEl.getAttribute('data-modal-backdrop');\n            new Modal(\n                $modalEl as HTMLElement,\n                {\n                    placement: placement ? placement : Default.placement,\n                    backdrop: backdrop ? backdrop : Default.backdrop,\n                } as ModalOptions\n            );\n        } else {\n            console.error(\n                `Modal with id ${modalId} does not exist. Are you sure that the data-modal-target attribute points to the correct modal id?.`\n            );\n        }\n    });\n\n    // toggle modal visibility\n    document.querySelectorAll('[data-modal-toggle]').forEach(($triggerEl) => {\n        const modalId = $triggerEl.getAttribute('data-modal-toggle');\n        const $modalEl = document.getElementById(modalId);\n\n        if ($modalEl) {\n            const modal: ModalInterface = instances.getInstance(\n                'Modal',\n                modalId\n            );\n\n            if (modal) {\n                const toggleModal = () => {\n                    modal.toggle();\n                };\n                $triggerEl.addEventListener('click', toggleModal);\n                modal.addEventListenerInstance(\n                    $triggerEl as HTMLElement,\n                    'click',\n                    toggleModal\n                );\n            } else {\n                console.error(\n                    `Modal with id ${modalId} has not been initialized. Please initialize it using the data-modal-target attribute.`\n                );\n            }\n        } else {\n            console.error(\n                `Modal with id ${modalId} does not exist. Are you sure that the data-modal-toggle attribute points to the correct modal id?`\n            );\n        }\n    });\n\n    // show modal on click if exists based on id\n    document.querySelectorAll('[data-modal-show]').forEach(($triggerEl) => {\n        const modalId = $triggerEl.getAttribute('data-modal-show');\n        const $modalEl = document.getElementById(modalId);\n\n        if ($modalEl) {\n            const modal: ModalInterface = instances.getInstance(\n                'Modal',\n                modalId\n            );\n\n            if (modal) {\n                const showModal = () => {\n                    modal.show();\n                };\n                $triggerEl.addEventListener('click', showModal);\n                modal.addEventListenerInstance(\n                    $triggerEl as HTMLElement,\n                    'click',\n                    showModal\n                );\n            } else {\n                console.error(\n                    `Modal with id ${modalId} has not been initialized. Please initialize it using the data-modal-target attribute.`\n                );\n            }\n        } else {\n            console.error(\n                `Modal with id ${modalId} does not exist. Are you sure that the data-modal-show attribute points to the correct modal id?`\n            );\n        }\n    });\n\n    // hide modal on click if exists based on id\n    document.querySelectorAll('[data-modal-hide]').forEach(($triggerEl) => {\n        const modalId = $triggerEl.getAttribute('data-modal-hide');\n        const $modalEl = document.getElementById(modalId);\n\n        if ($modalEl) {\n            const modal: ModalInterface = instances.getInstance(\n                'Modal',\n                modalId\n            );\n\n            if (modal) {\n                const hideModal = () => {\n                    modal.hide();\n                };\n                $triggerEl.addEventListener('click', hideModal);\n                modal.addEventListenerInstance(\n                    $triggerEl as HTMLElement,\n                    'click',\n                    hideModal\n                );\n            } else {\n                console.error(\n                    `Modal with id ${modalId} has not been initialized. Please initialize it using the data-modal-target attribute.`\n                );\n            }\n        } else {\n            console.error(\n                `Modal with id ${modalId} does not exist. Are you sure that the data-modal-hide attribute points to the correct modal id?`\n            );\n        }\n    });\n}\n\nif (typeof window !== 'undefined') {\n    window.Modal = Modal;\n    window.initModals = initModals;\n}\n\nexport default Modal;\n", "/* eslint-disable @typescript-eslint/no-empty-function */\nimport { createPopper } from '@popperjs/core';\nimport type {\n    Options as PopperOptions,\n    Instance as PopperInstance,\n} from '@popperjs/core';\nimport type { PopoverOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { PopoverInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: PopoverOptions = {\n    placement: 'top',\n    offset: 10,\n    triggerType: 'hover',\n    onShow: () => {},\n    onHide: () => {},\n    onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n    id: null,\n    override: true,\n};\n\nclass Popover implements PopoverInterface {\n    _instanceId: string;\n    _targetEl: HTMLElement;\n    _triggerEl: HTMLElement;\n    _options: PopoverOptions;\n    _popperInstance: PopperInstance;\n    _clickOutsideEventListener: EventListenerOrEventListenerObject;\n    _keydownEventListener: EventListenerOrEventListenerObject;\n    _visible: boolean;\n    _initialized: boolean;\n    _showHandler: EventListenerOrEventListenerObject;\n    _hideHandler: EventListenerOrEventListenerObject;\n\n    constructor(\n        targetEl: HTMLElement | null = null,\n        triggerEl: HTMLElement | null = null,\n        options: PopoverOptions = Default,\n        instanceOptions: InstanceOptions = DefaultInstanceOptions\n    ) {\n        this._instanceId = instanceOptions.id\n            ? instanceOptions.id\n            : targetEl.id;\n        this._targetEl = targetEl;\n        this._triggerEl = triggerEl;\n        this._options = { ...Default, ...options };\n        this._popperInstance = null;\n        this._visible = false;\n        this._initialized = false;\n        this.init();\n        instances.addInstance(\n            'Popover',\n            this,\n            instanceOptions.id ? instanceOptions.id : this._targetEl.id,\n            instanceOptions.override\n        );\n    }\n\n    init() {\n        if (this._triggerEl && this._targetEl && !this._initialized) {\n            this._setupEventListeners();\n            this._popperInstance = this._createPopperInstance();\n            this._initialized = true;\n        }\n    }\n\n    destroy() {\n        if (this._initialized) {\n            // remove event listeners associated with the trigger element and target element\n            const triggerEvents = this._getTriggerEvents();\n\n            triggerEvents.showEvents.forEach((ev) => {\n                this._triggerEl.removeEventListener(ev, this._showHandler);\n                this._targetEl.removeEventListener(ev, this._showHandler);\n            });\n\n            triggerEvents.hideEvents.forEach((ev) => {\n                this._triggerEl.removeEventListener(ev, this._hideHandler);\n                this._targetEl.removeEventListener(ev, this._hideHandler);\n            });\n\n            // remove event listeners for keydown\n            this._removeKeydownListener();\n\n            // remove event listeners for click outside\n            this._removeClickOutsideListener();\n\n            // destroy the Popper instance if you have one (assuming this._popperInstance is the Popper instance)\n            if (this._popperInstance) {\n                this._popperInstance.destroy();\n            }\n\n            this._initialized = false;\n        }\n    }\n\n    removeInstance() {\n        instances.removeInstance('Popover', this._instanceId);\n    }\n\n    destroyAndRemoveInstance() {\n        this.destroy();\n        this.removeInstance();\n    }\n\n    _setupEventListeners() {\n        const triggerEvents = this._getTriggerEvents();\n\n        this._showHandler = () => {\n            this.show();\n        };\n\n        this._hideHandler = () => {\n            setTimeout(() => {\n                if (!this._targetEl.matches(':hover')) {\n                    this.hide();\n                }\n            }, 100);\n        };\n\n        triggerEvents.showEvents.forEach((ev) => {\n            this._triggerEl.addEventListener(ev, this._showHandler);\n            this._targetEl.addEventListener(ev, this._showHandler);\n        });\n\n        triggerEvents.hideEvents.forEach((ev) => {\n            this._triggerEl.addEventListener(ev, this._hideHandler);\n            this._targetEl.addEventListener(ev, this._hideHandler);\n        });\n    }\n\n    _createPopperInstance() {\n        return createPopper(this._triggerEl, this._targetEl, {\n            placement: this._options.placement,\n            modifiers: [\n                {\n                    name: 'offset',\n                    options: {\n                        offset: [0, this._options.offset],\n                    },\n                },\n            ],\n        });\n    }\n\n    _getTriggerEvents() {\n        switch (this._options.triggerType) {\n            case 'hover':\n                return {\n                    showEvents: ['mouseenter', 'focus'],\n                    hideEvents: ['mouseleave', 'blur'],\n                };\n            case 'click':\n                return {\n                    showEvents: ['click', 'focus'],\n                    hideEvents: ['focusout', 'blur'],\n                };\n            case 'none':\n                return {\n                    showEvents: [],\n                    hideEvents: [],\n                };\n            default:\n                return {\n                    showEvents: ['mouseenter', 'focus'],\n                    hideEvents: ['mouseleave', 'blur'],\n                };\n        }\n    }\n\n    _setupKeydownListener() {\n        this._keydownEventListener = (ev: KeyboardEvent) => {\n            if (ev.key === 'Escape') {\n                this.hide();\n            }\n        };\n        document.body.addEventListener(\n            'keydown',\n            this._keydownEventListener,\n            true\n        );\n    }\n\n    _removeKeydownListener() {\n        document.body.removeEventListener(\n            'keydown',\n            this._keydownEventListener,\n            true\n        );\n    }\n\n    _setupClickOutsideListener() {\n        this._clickOutsideEventListener = (ev: MouseEvent) => {\n            this._handleClickOutside(ev, this._targetEl);\n        };\n        document.body.addEventListener(\n            'click',\n            this._clickOutsideEventListener,\n            true\n        );\n    }\n\n    _removeClickOutsideListener() {\n        document.body.removeEventListener(\n            'click',\n            this._clickOutsideEventListener,\n            true\n        );\n    }\n\n    _handleClickOutside(ev: Event, targetEl: HTMLElement) {\n        const clickedEl = ev.target as Node;\n        if (\n            clickedEl !== targetEl &&\n            !targetEl.contains(clickedEl) &&\n            !this._triggerEl.contains(clickedEl) &&\n            this.isVisible()\n        ) {\n            this.hide();\n        }\n    }\n\n    isVisible() {\n        return this._visible;\n    }\n\n    toggle() {\n        if (this.isVisible()) {\n            this.hide();\n        } else {\n            this.show();\n        }\n        this._options.onToggle(this);\n    }\n\n    show() {\n        this._targetEl.classList.remove('opacity-0', 'invisible');\n        this._targetEl.classList.add('opacity-100', 'visible');\n\n        // Enable the event listeners\n        this._popperInstance.setOptions((options: PopperOptions) => ({\n            ...options,\n            modifiers: [\n                ...options.modifiers,\n                { name: 'eventListeners', enabled: true },\n            ],\n        }));\n\n        // handle click outside\n        this._setupClickOutsideListener();\n\n        // handle esc keydown\n        this._setupKeydownListener();\n\n        // Update its position\n        this._popperInstance.update();\n\n        // set visibility to true\n        this._visible = true;\n\n        // callback function\n        this._options.onShow(this);\n    }\n\n    hide() {\n        this._targetEl.classList.remove('opacity-100', 'visible');\n        this._targetEl.classList.add('opacity-0', 'invisible');\n\n        // Disable the event listeners\n        this._popperInstance.setOptions((options: PopperOptions) => ({\n            ...options,\n            modifiers: [\n                ...options.modifiers,\n                { name: 'eventListeners', enabled: false },\n            ],\n        }));\n\n        // handle click outside\n        this._removeClickOutsideListener();\n\n        // handle esc keydown\n        this._removeKeydownListener();\n\n        // set visibility to false\n        this._visible = false;\n\n        // callback function\n        this._options.onHide(this);\n    }\n\n    updateOnShow(callback: () => void) {\n        this._options.onShow = callback;\n    }\n\n    updateOnHide(callback: () => void) {\n        this._options.onHide = callback;\n    }\n\n    updateOnToggle(callback: () => void) {\n        this._options.onToggle = callback;\n    }\n}\n\nexport function initPopovers() {\n    document.querySelectorAll('[data-popover-target]').forEach(($triggerEl) => {\n        const popoverID = $triggerEl.getAttribute('data-popover-target');\n        const $popoverEl = document.getElementById(popoverID);\n\n        if ($popoverEl) {\n            const triggerType = $triggerEl.getAttribute('data-popover-trigger');\n            const placement = $triggerEl.getAttribute('data-popover-placement');\n            const offset = $triggerEl.getAttribute('data-popover-offset');\n\n            new Popover(\n                $popoverEl as HTMLElement,\n                $triggerEl as HTMLElement,\n                {\n                    placement: placement ? placement : Default.placement,\n                    offset: offset ? parseInt(offset) : Default.offset,\n                    triggerType: triggerType\n                        ? triggerType\n                        : Default.triggerType,\n                } as PopoverOptions\n            );\n        } else {\n            console.error(\n                `The popover element with id \"${popoverID}\" does not exist. Please check the data-popover-target attribute.`\n            );\n        }\n    });\n}\n\nif (typeof window !== 'undefined') {\n    window.Popover = Popover;\n    window.initPopovers = initPopovers;\n}\n\nexport default Popover;\n", "/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { TabItem, TabsOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { TabsInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: TabsOptions = {\n    defaultTabId: null,\n    activeClasses:\n        'text-blue-600 hover:text-blue-600 dark:text-blue-500 dark:hover:text-blue-500 border-blue-600 dark:border-blue-500',\n    inactiveClasses:\n        'dark:border-transparent text-gray-500 hover:text-gray-600 dark:text-gray-400 border-gray-100 hover:border-gray-300 dark:border-gray-700 dark:hover:text-gray-300',\n    onShow: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n    id: null,\n    override: true,\n};\n\nclass Tabs implements TabsInterface {\n    _instanceId: string;\n    _tabsEl: HTMLElement;\n    _items: TabItem[];\n    _activeTab: TabItem;\n    _options: TabsOptions;\n    _initialized: boolean;\n\n    constructor(\n        tabsEl: HTMLElement | null = null,\n        items: TabItem[] = [],\n        options: TabsOptions = Default,\n        instanceOptions: InstanceOptions = DefaultInstanceOptions\n    ) {\n        this._instanceId = instanceOptions.id ? instanceOptions.id : tabsEl.id;\n        this._tabsEl = tabsEl;\n        this._items = items;\n        this._activeTab = options ? this.getTab(options.defaultTabId) : null;\n        this._options = { ...Default, ...options };\n        this._initialized = false;\n        this.init();\n        instances.addInstance(\n            'Tabs',\n            this,\n            this._instanceId,\n            instanceOptions.override\n        );\n    }\n\n    init() {\n        if (this._items.length && !this._initialized) {\n            // set the first tab as active if not set by explicitly\n            if (!this._activeTab) {\n                this.setActiveTab(this._items[0]);\n            }\n\n            // force show the first default tab\n            this.show(this._activeTab.id, true);\n\n            // show tab content based on click\n            this._items.map((tab) => {\n                tab.triggerEl.addEventListener('click', (event) => {\n                    event.preventDefault();\n                    this.show(tab.id);\n                });\n            });\n        }\n    }\n\n    destroy() {\n        if (this._initialized) {\n            this._initialized = false;\n        }\n    }\n\n    removeInstance() {\n        this.destroy();\n        instances.removeInstance('Tabs', this._instanceId);\n    }\n\n    destroyAndRemoveInstance() {\n        this.destroy();\n        this.removeInstance();\n    }\n\n    getActiveTab() {\n        return this._activeTab;\n    }\n\n    setActiveTab(tab: TabItem) {\n        this._activeTab = tab;\n    }\n\n    getTab(id: string) {\n        return this._items.filter((t) => t.id === id)[0];\n    }\n\n    show(id: string, forceShow = false) {\n        const tab = this.getTab(id);\n\n        // don't do anything if already active\n        if (tab === this._activeTab && !forceShow) {\n            return;\n        }\n\n        // hide other tabs\n        this._items.map((t: TabItem) => {\n            if (t !== tab) {\n                t.triggerEl.classList.remove(\n                    ...this._options.activeClasses.split(' ')\n                );\n                t.triggerEl.classList.add(\n                    ...this._options.inactiveClasses.split(' ')\n                );\n                t.targetEl.classList.add('hidden');\n                t.triggerEl.setAttribute('aria-selected', 'false');\n            }\n        });\n\n        // show active tab\n        tab.triggerEl.classList.add(...this._options.activeClasses.split(' '));\n        tab.triggerEl.classList.remove(\n            ...this._options.inactiveClasses.split(' ')\n        );\n        tab.triggerEl.setAttribute('aria-selected', 'true');\n        tab.targetEl.classList.remove('hidden');\n\n        this.setActiveTab(tab);\n\n        // callback function\n        this._options.onShow(this, tab);\n    }\n\n    updateOnShow(callback: () => void) {\n        this._options.onShow = callback;\n    }\n}\n\nexport function initTabs() {\n    document.querySelectorAll('[data-tabs-toggle]').forEach(($parentEl) => {\n        const tabItems: TabItem[] = [];\n        const activeClasses = $parentEl.getAttribute(\n            'data-tabs-active-classes'\n        );\n        const inactiveClasses = $parentEl.getAttribute(\n            'data-tabs-inactive-classes'\n        );\n        let defaultTabId = null;\n        $parentEl\n            .querySelectorAll('[role=\"tab\"]')\n            .forEach(($triggerEl: HTMLElement) => {\n                const isActive =\n                    $triggerEl.getAttribute('aria-selected') === 'true';\n                const tab: TabItem = {\n                    id: $triggerEl.getAttribute('data-tabs-target'),\n                    triggerEl: $triggerEl,\n                    targetEl: document.querySelector(\n                        $triggerEl.getAttribute('data-tabs-target')\n                    ),\n                };\n                tabItems.push(tab);\n\n                if (isActive) {\n                    defaultTabId = tab.id;\n                }\n            });\n\n        new Tabs($parentEl as HTMLElement, tabItems, {\n            defaultTabId: defaultTabId,\n            activeClasses: activeClasses\n                ? activeClasses\n                : Default.activeClasses,\n            inactiveClasses: inactiveClasses\n                ? inactiveClasses\n                : Default.inactiveClasses,\n        } as TabsOptions);\n    });\n}\n\nif (typeof window !== 'undefined') {\n    window.Tabs = Tabs;\n    window.initTabs = initTabs;\n}\n\nexport default Tabs;\n", "/* eslint-disable @typescript-eslint/no-empty-function */\nimport { createPopper } from '@popperjs/core';\nimport type {\n    Options as PopperOptions,\n    Instance as PopperInstance,\n} from '@popperjs/core';\nimport type { TooltipOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { TooltipInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: TooltipOptions = {\n    placement: 'top',\n    triggerType: 'hover',\n    onShow: () => {},\n    onHide: () => {},\n    onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n    id: null,\n    override: true,\n};\n\nclass Tooltip implements TooltipInterface {\n    _instanceId: string;\n    _targetEl: HTMLElement | null;\n    _triggerEl: HTMLElement | null;\n    _options: TooltipOptions;\n    _popperInstance: PopperInstance;\n    _clickOutsideEventListener: EventListenerOrEventListenerObject;\n    _keydownEventListener: EventListenerOrEventListenerObject;\n    _visible: boolean;\n    _initialized: boolean;\n    _showHandler: EventListenerOrEventListenerObject;\n    _hideHandler: EventListenerOrEventListenerObject;\n\n    constructor(\n        targetEl: HTMLElement | null = null,\n        triggerEl: HTMLElement | null = null,\n        options: TooltipOptions = Default,\n        instanceOptions: InstanceOptions = DefaultInstanceOptions\n    ) {\n        this._instanceId = instanceOptions.id\n            ? instanceOptions.id\n            : targetEl.id;\n        this._targetEl = targetEl;\n        this._triggerEl = triggerEl;\n        this._options = { ...Default, ...options };\n        this._popperInstance = null;\n        this._visible = false;\n        this._initialized = false;\n        this.init();\n        instances.addInstance(\n            'Tooltip',\n            this,\n            this._instanceId,\n            instanceOptions.override\n        );\n    }\n\n    init() {\n        if (this._triggerEl && this._targetEl && !this._initialized) {\n            this._setupEventListeners();\n            this._popperInstance = this._createPopperInstance();\n            this._initialized = true;\n        }\n    }\n\n    destroy() {\n        if (this._initialized) {\n            // remove event listeners associated with the trigger element\n            const triggerEvents = this._getTriggerEvents();\n\n            triggerEvents.showEvents.forEach((ev) => {\n                this._triggerEl.removeEventListener(ev, this._showHandler);\n            });\n\n            triggerEvents.hideEvents.forEach((ev) => {\n                this._triggerEl.removeEventListener(ev, this._hideHandler);\n            });\n\n            // remove event listeners for keydown\n            this._removeKeydownListener();\n\n            // remove event listeners for click outside\n            this._removeClickOutsideListener();\n\n            // destroy the Popper instance if you have one (assuming this._popperInstance is the Popper instance)\n            if (this._popperInstance) {\n                this._popperInstance.destroy();\n            }\n            this._initialized = false;\n        }\n    }\n\n    removeInstance() {\n        instances.removeInstance('Tooltip', this._instanceId);\n    }\n\n    destroyAndRemoveInstance() {\n        this.destroy();\n        this.removeInstance();\n    }\n\n    _setupEventListeners() {\n        const triggerEvents = this._getTriggerEvents();\n\n        this._showHandler = () => {\n            this.show();\n        };\n\n        this._hideHandler = () => {\n            this.hide();\n        };\n\n        triggerEvents.showEvents.forEach((ev) => {\n            this._triggerEl.addEventListener(ev, this._showHandler);\n        });\n\n        triggerEvents.hideEvents.forEach((ev) => {\n            this._triggerEl.addEventListener(ev, this._hideHandler);\n        });\n    }\n\n    _createPopperInstance() {\n        return createPopper(this._triggerEl, this._targetEl, {\n            placement: this._options.placement,\n            modifiers: [\n                {\n                    name: 'offset',\n                    options: {\n                        offset: [0, 8],\n                    },\n                },\n            ],\n        });\n    }\n\n    _getTriggerEvents() {\n        switch (this._options.triggerType) {\n            case 'hover':\n                return {\n                    showEvents: ['mouseenter', 'focus'],\n                    hideEvents: ['mouseleave', 'blur'],\n                };\n            case 'click':\n                return {\n                    showEvents: ['click', 'focus'],\n                    hideEvents: ['focusout', 'blur'],\n                };\n            case 'none':\n                return {\n                    showEvents: [],\n                    hideEvents: [],\n                };\n            default:\n                return {\n                    showEvents: ['mouseenter', 'focus'],\n                    hideEvents: ['mouseleave', 'blur'],\n                };\n        }\n    }\n\n    _setupKeydownListener() {\n        this._keydownEventListener = (ev: KeyboardEvent) => {\n            if (ev.key === 'Escape') {\n                this.hide();\n            }\n        };\n        document.body.addEventListener(\n            'keydown',\n            this._keydownEventListener,\n            true\n        );\n    }\n\n    _removeKeydownListener() {\n        document.body.removeEventListener(\n            'keydown',\n            this._keydownEventListener,\n            true\n        );\n    }\n\n    _setupClickOutsideListener() {\n        this._clickOutsideEventListener = (ev: MouseEvent) => {\n            this._handleClickOutside(ev, this._targetEl);\n        };\n        document.body.addEventListener(\n            'click',\n            this._clickOutsideEventListener,\n            true\n        );\n    }\n\n    _removeClickOutsideListener() {\n        document.body.removeEventListener(\n            'click',\n            this._clickOutsideEventListener,\n            true\n        );\n    }\n\n    _handleClickOutside(ev: Event, targetEl: HTMLElement) {\n        const clickedEl = ev.target as Node;\n        if (\n            clickedEl !== targetEl &&\n            !targetEl.contains(clickedEl) &&\n            !this._triggerEl.contains(clickedEl) &&\n            this.isVisible()\n        ) {\n            this.hide();\n        }\n    }\n\n    isVisible() {\n        return this._visible;\n    }\n\n    toggle() {\n        if (this.isVisible()) {\n            this.hide();\n        } else {\n            this.show();\n        }\n    }\n\n    show() {\n        this._targetEl.classList.remove('opacity-0', 'invisible');\n        this._targetEl.classList.add('opacity-100', 'visible');\n\n        // Enable the event listeners\n        this._popperInstance.setOptions((options: PopperOptions) => ({\n            ...options,\n            modifiers: [\n                ...options.modifiers,\n                { name: 'eventListeners', enabled: true },\n            ],\n        }));\n\n        // handle click outside\n        this._setupClickOutsideListener();\n\n        // handle esc keydown\n        this._setupKeydownListener();\n\n        // Update its position\n        this._popperInstance.update();\n\n        // set visibility\n        this._visible = true;\n\n        // callback function\n        this._options.onShow(this);\n    }\n\n    hide() {\n        this._targetEl.classList.remove('opacity-100', 'visible');\n        this._targetEl.classList.add('opacity-0', 'invisible');\n\n        // Disable the event listeners\n        this._popperInstance.setOptions((options: PopperOptions) => ({\n            ...options,\n            modifiers: [\n                ...options.modifiers,\n                { name: 'eventListeners', enabled: false },\n            ],\n        }));\n\n        // handle click outside\n        this._removeClickOutsideListener();\n\n        // handle esc keydown\n        this._removeKeydownListener();\n\n        // set visibility\n        this._visible = false;\n\n        // callback function\n        this._options.onHide(this);\n    }\n\n    updateOnShow(callback: () => void) {\n        this._options.onShow = callback;\n    }\n\n    updateOnHide(callback: () => void) {\n        this._options.onHide = callback;\n    }\n\n    updateOnToggle(callback: () => void) {\n        this._options.onToggle = callback;\n    }\n}\n\nexport function initTooltips() {\n    document.querySelectorAll('[data-tooltip-target]').forEach(($triggerEl) => {\n        const tooltipId = $triggerEl.getAttribute('data-tooltip-target');\n        const $tooltipEl = document.getElementById(tooltipId);\n\n        if ($tooltipEl) {\n            const triggerType = $triggerEl.getAttribute('data-tooltip-trigger');\n            const placement = $triggerEl.getAttribute('data-tooltip-placement');\n\n            new Tooltip(\n                $tooltipEl as HTMLElement,\n                $triggerEl as HTMLElement,\n                {\n                    placement: placement ? placement : Default.placement,\n                    triggerType: triggerType\n                        ? triggerType\n                        : Default.triggerType,\n                } as TooltipOptions\n            );\n        } else {\n            console.error(\n                `The tooltip element with id \"${tooltipId}\" does not exist. Please check the data-tooltip-target attribute.`\n            );\n        }\n    });\n}\n\nif (typeof window !== 'undefined') {\n    window.Tooltip = Tooltip;\n    window.initTooltips = initTooltips;\n}\n\nexport default Tooltip;\n", "class Events {\n    private _eventType: string;\n    private _eventFunctions: EventListener[];\n\n    constructor(eventType: string, eventFunctions: EventListener[] = []) {\n        this._eventType = eventType;\n        this._eventFunctions = eventFunctions;\n    }\n\n    init() {\n        this._eventFunctions.forEach((eventFunction) => {\n            if (typeof window !== 'undefined') {\n                window.addEventListener(this._eventType, eventFunction);\n            }\n        });\n    }\n}\n\nexport default Events;\n", "import { AccordionInterface } from '../components/accordion/interface';\nimport { CarouselInterface } from '../components/carousel/interface';\nimport { CollapseInterface } from '../components/collapse/interface';\nimport { DialInterface } from '../components/dial/interface';\nimport { DismissInterface } from '../components/dismiss/interface';\nimport { DrawerInterface } from '../components/drawer/interface';\nimport { DropdownInterface } from '../components/dropdown/interface';\nimport { ModalInterface } from '../components/modal/interface';\nimport { PopoverInterface } from '../components/popover/interface';\nimport { TabsInterface } from '../components/tabs/interface';\nimport { TooltipInterface } from '../components/tooltip/interface';\nimport { InputCounterInterface } from '../components/input-counter/interface';\nimport { CopyClipboardInterface } from '../components/clipboard/interface';\nimport { DatepickerInterface } from '../components/datepicker/interface';\n\nclass Instances {\n    private _instances: {\n        Accordion: { [id: string]: AccordionInterface };\n        Carousel: { [id: string]: CarouselInterface };\n        Collapse: { [id: string]: CollapseInterface };\n        Dial: { [id: string]: DialInterface };\n        Dismiss: { [id: string]: DismissInterface };\n        Drawer: { [id: string]: DrawerInterface };\n        Dropdown: { [id: string]: DropdownInterface };\n        Modal: { [id: string]: ModalInterface };\n        Popover: { [id: string]: PopoverInterface };\n        Tabs: { [id: string]: TabsInterface };\n        Tooltip: { [id: string]: TooltipInterface };\n        InputCounter: { [id: string]: InputCounterInterface };\n        CopyClipboard: { [id: string]: CopyClipboardInterface };\n        Datepicker: { [id: string]: DatepickerInterface };\n    };\n\n    constructor() {\n        this._instances = {\n            Accordion: {},\n            Carousel: {},\n            Collapse: {},\n            Dial: {},\n            Dismiss: {},\n            Drawer: {},\n            Dropdown: {},\n            Modal: {},\n            Popover: {},\n            Tabs: {},\n            Tooltip: {},\n            InputCounter: {},\n            CopyClipboard: {},\n            Datepicker: {},\n        };\n    }\n\n    addInstance(\n        component: keyof Instances['_instances'],\n        instance: any,\n        id?: string,\n        override = false\n    ) {\n        if (!this._instances[component]) {\n            console.warn(`Flowbite: Component ${component} does not exist.`);\n            return false;\n        }\n\n        if (this._instances[component][id] && !override) {\n            console.warn(`Flowbite: Instance with ID ${id} already exists.`);\n            return;\n        }\n\n        if (override && this._instances[component][id]) {\n            this._instances[component][id].destroyAndRemoveInstance();\n        }\n\n        this._instances[component][id ? id : this._generateRandomId()] =\n            instance;\n    }\n\n    getAllInstances() {\n        return this._instances;\n    }\n\n    getInstances(component: keyof Instances['_instances']) {\n        if (!this._instances[component]) {\n            console.warn(`Flowbite: Component ${component} does not exist.`);\n            return false;\n        }\n        return this._instances[component];\n    }\n\n    getInstance(component: keyof Instances['_instances'], id: string) {\n        if (!this._componentAndInstanceCheck(component, id)) {\n            return;\n        }\n\n        if (!this._instances[component][id]) {\n            console.warn(`Flowbite: Instance with ID ${id} does not exist.`);\n            return;\n        }\n        return this._instances[component][id] as any;\n    }\n\n    destroyAndRemoveInstance(\n        component: keyof Instances['_instances'],\n        id: string\n    ) {\n        if (!this._componentAndInstanceCheck(component, id)) {\n            return;\n        }\n        this.destroyInstanceObject(component, id);\n        this.removeInstance(component, id);\n    }\n\n    removeInstance(component: keyof Instances['_instances'], id: string) {\n        if (!this._componentAndInstanceCheck(component, id)) {\n            return;\n        }\n        delete this._instances[component][id];\n    }\n\n    destroyInstanceObject(\n        component: keyof Instances['_instances'],\n        id: string\n    ) {\n        if (!this._componentAndInstanceCheck(component, id)) {\n            return;\n        }\n        this._instances[component][id].destroy();\n    }\n\n    instanceExists(component: keyof Instances['_instances'], id: string) {\n        if (!this._instances[component]) {\n            return false;\n        }\n\n        if (!this._instances[component][id]) {\n            return false;\n        }\n\n        return true;\n    }\n\n    _generateRandomId() {\n        return Math.random().toString(36).substr(2, 9);\n    }\n\n    private _componentAndInstanceCheck(\n        component: keyof Instances['_instances'],\n        id: string\n    ) {\n        if (!this._instances[component]) {\n            console.warn(`Flowbite: Component ${component} does not exist.`);\n            return false;\n        }\n\n        if (!this._instances[component][id]) {\n            console.warn(`Flowbite: Instance with ID ${id} does not exist.`);\n            return false;\n        }\n\n        return true;\n    }\n}\n\nconst instances = new Instances();\n\nexport default instances;\n\nif (typeof window !== 'undefined') {\n    window.FlowbiteInstances = instances;\n}\n", "// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n", "// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};", "__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }", "// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};", "// core components\nimport Accordion from './components/accordion';\nimport Carousel from './components/carousel';\nimport Collapse from './components/collapse';\nimport Dial from './components/dial';\nimport Dismiss from './components/dismiss';\nimport Drawer from './components/drawer';\nimport Dropdown from './components/dropdown';\nimport Modal from './components/modal';\nimport Popover from './components/popover';\nimport Tabs from './components/tabs';\nimport Tooltip from './components/tooltip';\nimport InputCounter from './components/input-counter';\nimport CopyClipboard from './components/clipboard';\nimport Datepicker from './components/datepicker';\nimport { initFlowbite } from './components/index';\nimport Events from './dom/events';\n\n// Since turbo maintainers refuse to add this event, we'll add it ourselves\n// https://discuss.hotwired.dev/t/event-to-know-a-turbo-stream-has-been-rendered/1554/10\nconst afterRenderEvent = new Event('turbo:after-stream-render');\naddEventListener('turbo:before-stream-render', (event: CustomEvent) => {\n    const originalRender = event.detail.render;\n\n    event.detail.render = function (streamElement: Element) {\n        originalRender(streamElement);\n        window.dispatchEvent(afterRenderEvent);\n    };\n});\n\nconst turboLoadEvents = new Events('turbo:load', [initFlowbite]);\nturboLoadEvents.init();\n\nconst turboFrameLoadEvents = new Events('turbo:frame-load', [initFlowbite]);\nturboFrameLoadEvents.init();\n\nconst turboStreamLoadEvents = new Events('turbo:after-stream-render', [\n    initFlowbite,\n]);\nturboStreamLoadEvents.init();\n\nexport default {\n    Accordion,\n    Carousel,\n    Collapse,\n    Dial,\n    Drawer,\n    Dismiss,\n    Dropdown,\n    Modal,\n    Popover,\n    Tabs,\n    Tooltip,\n    InputCounter,\n    CopyClipboard,\n    Datepicker,\n    Events,\n};\n", "var baseGetTag = require('./_baseGetTag'),\n    isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n    funcTag = '[object Function]',\n    genTag = '[object GeneratorFunction]',\n    proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n  if (!isObject(value)) {\n    return false;\n  }\n  // The use of `Object#toString` avoids issues with the `typeof` operator\n  // in Safari 9 which returns 'object' for typed arrays and other constructors.\n  var tag = baseGetTag(value);\n  return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n", "var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n", "var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n  var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n  return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n  return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n", "/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n  if (func != null) {\n    try {\n      return funcToString.call(func);\n    } catch (e) {}\n    try {\n      return (func + '');\n    } catch (e) {}\n  }\n  return '';\n}\n\nmodule.exports = toSource;\n", "var isFunction = require('./isFunction'),\n    isMasked = require('./_isMasked'),\n    isObject = require('./isObject'),\n    toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n    objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n  funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n  .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n *  else `false`.\n */\nfunction baseIsNative(value) {\n  if (!isObject(value) || isMasked(value)) {\n    return false;\n  }\n  var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n  return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n", "/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n  return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n", "var baseIsNative = require('./_baseIsNative'),\n    getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n  var value = getValue(object, key);\n  return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n", "var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n", "var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n  this.__data__ = nativeCreate ? nativeCreate(null) : {};\n  this.size = 0;\n}\n\nmodule.exports = hashClear;\n", "/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n  var result = this.has(key) && delete this.__data__[key];\n  this.size -= result ? 1 : 0;\n  return result;\n}\n\nmodule.exports = hashDelete;\n", "var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n  var data = this.__data__;\n  if (nativeCreate) {\n    var result = data[key];\n    return result === HASH_UNDEFINED ? undefined : result;\n  }\n  return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n", "var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n  var data = this.__data__;\n  return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n", "var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n  var data = this.__data__;\n  this.size += this.has(key) ? 0 : 1;\n  data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n  return this;\n}\n\nmodule.exports = hashSet;\n", "var hashClear = require('./_hashClear'),\n    hashDelete = require('./_hashDelete'),\n    hashGet = require('./_hashGet'),\n    hashHas = require('./_hashHas'),\n    hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n  var index = -1,\n      length = entries == null ? 0 : entries.length;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n", "/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n  this.__data__ = [];\n  this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n", "/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n  return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n", "var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n  var length = array.length;\n  while (length--) {\n    if (eq(array[length][0], key)) {\n      return length;\n    }\n  }\n  return -1;\n}\n\nmodule.exports = assocIndexOf;\n", "var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    return false;\n  }\n  var lastIndex = data.length - 1;\n  if (index == lastIndex) {\n    data.pop();\n  } else {\n    splice.call(data, index, 1);\n  }\n  --this.size;\n  return true;\n}\n\nmodule.exports = listCacheDelete;\n", "var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n", "var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n  return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n", "var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    ++this.size;\n    data.push([key, value]);\n  } else {\n    data[index][1] = value;\n  }\n  return this;\n}\n\nmodule.exports = listCacheSet;\n", "var listCacheClear = require('./_listCacheClear'),\n    listCacheDelete = require('./_listCacheDelete'),\n    listCacheGet = require('./_listCacheGet'),\n    listCacheHas = require('./_listCacheHas'),\n    listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n  var index = -1,\n      length = entries == null ? 0 : entries.length;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n", "var getNative = require('./_getNative'),\n    root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n", "var Hash = require('./_Hash'),\n    ListCache = require('./_ListCache'),\n    Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n  this.size = 0;\n  this.__data__ = {\n    'hash': new Hash,\n    'map': new (Map || ListCache),\n    'string': new Hash\n  };\n}\n\nmodule.exports = mapCacheClear;\n", "/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n  var type = typeof value;\n  return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n    ? (value !== '__proto__')\n    : (value === null);\n}\n\nmodule.exports = isKeyable;\n", "var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n  var data = map.__data__;\n  return isKeyable(key)\n    ? data[typeof key == 'string' ? 'string' : 'hash']\n    : data.map;\n}\n\nmodule.exports = getMapData;\n", "var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n  var result = getMapData(this, key)['delete'](key);\n  this.size -= result ? 1 : 0;\n  return result;\n}\n\nmodule.exports = mapCacheDelete;\n", "var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n  return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n", "var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n  return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n", "var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n  var data = getMapData(this, key),\n      size = data.size;\n\n  data.set(key, value);\n  this.size += data.size == size ? 0 : 1;\n  return this;\n}\n\nmodule.exports = mapCacheSet;\n", "var mapCacheClear = require('./_mapCacheClear'),\n    mapCacheDelete = require('./_mapCacheDelete'),\n    mapCacheGet = require('./_mapCacheGet'),\n    mapCacheHas = require('./_mapCacheHas'),\n    mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n  var index = -1,\n      length = entries == null ? 0 : entries.length;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n", "/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n  this.__data__.set(value, HASH_UNDEFINED);\n  return this;\n}\n\nmodule.exports = setCacheAdd;\n", "/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n  return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n", "var MapCache = require('./_MapCache'),\n    setCacheAdd = require('./_setCacheAdd'),\n    setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n  var index = -1,\n      length = values == null ? 0 : values.length;\n\n  this.__data__ = new MapCache;\n  while (++index < length) {\n    this.add(values[index]);\n  }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n", "/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n  var length = array.length,\n      index = fromIndex + (fromRight ? 1 : -1);\n\n  while ((fromRight ? index-- : ++index < length)) {\n    if (predicate(array[index], index, array)) {\n      return index;\n    }\n  }\n  return -1;\n}\n\nmodule.exports = baseFindIndex;\n", "/**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\nfunction baseIsNaN(value) {\n  return value !== value;\n}\n\nmodule.exports = baseIsNaN;\n", "/**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction strictIndexOf(array, value, fromIndex) {\n  var index = fromIndex - 1,\n      length = array.length;\n\n  while (++index < length) {\n    if (array[index] === value) {\n      return index;\n    }\n  }\n  return -1;\n}\n\nmodule.exports = strictIndexOf;\n", "var baseFindIndex = require('./_baseFindIndex'),\n    baseIsNaN = require('./_baseIsNaN'),\n    strictIndexOf = require('./_strictIndexOf');\n\n/**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOf(array, value, fromIndex) {\n  return value === value\n    ? strictIndexOf(array, value, fromIndex)\n    : baseFindIndex(array, baseIsNaN, fromIndex);\n}\n\nmodule.exports = baseIndexOf;\n", "var baseIndexOf = require('./_baseIndexOf');\n\n/**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludes(array, value) {\n  var length = array == null ? 0 : array.length;\n  return !!length && baseIndexOf(array, value, 0) > -1;\n}\n\nmodule.exports = arrayIncludes;\n", "/**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludesWith(array, value, comparator) {\n  var index = -1,\n      length = array == null ? 0 : array.length;\n\n  while (++index < length) {\n    if (comparator(value, array[index])) {\n      return true;\n    }\n  }\n  return false;\n}\n\nmodule.exports = arrayIncludesWith;\n", "/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n  return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n", "var getNative = require('./_getNative'),\n    root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n", "/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n  // No operation performed.\n}\n\nmodule.exports = noop;\n", "/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n  var index = -1,\n      result = Array(set.size);\n\n  set.forEach(function(value) {\n    result[++index] = value;\n  });\n  return result;\n}\n\nmodule.exports = setToArray;\n", "var Set = require('./_Set'),\n    noop = require('./noop'),\n    setToArray = require('./_setToArray');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\nvar createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n  return new Set(values);\n};\n\nmodule.exports = createSet;\n", "var SetCache = require('./_SetCache'),\n    arrayIncludes = require('./_arrayIncludes'),\n    arrayIncludesWith = require('./_arrayIncludesWith'),\n    cacheHas = require('./_cacheHas'),\n    createSet = require('./_createSet'),\n    setToArray = require('./_setToArray');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\nfunction baseUniq(array, iteratee, comparator) {\n  var index = -1,\n      includes = arrayIncludes,\n      length = array.length,\n      isCommon = true,\n      result = [],\n      seen = result;\n\n  if (comparator) {\n    isCommon = false;\n    includes = arrayIncludesWith;\n  }\n  else if (length >= LARGE_ARRAY_SIZE) {\n    var set = iteratee ? null : createSet(array);\n    if (set) {\n      return setToArray(set);\n    }\n    isCommon = false;\n    includes = cacheHas;\n    seen = new SetCache;\n  }\n  else {\n    seen = iteratee ? [] : result;\n  }\n  outer:\n  while (++index < length) {\n    var value = array[index],\n        computed = iteratee ? iteratee(value) : value;\n\n    value = (comparator || value !== 0) ? value : 0;\n    if (isCommon && computed === computed) {\n      var seenIndex = seen.length;\n      while (seenIndex--) {\n        if (seen[seenIndex] === computed) {\n          continue outer;\n        }\n      }\n      if (iteratee) {\n        seen.push(computed);\n      }\n      result.push(value);\n    }\n    else if (!includes(seen, computed, comparator)) {\n      if (seen !== result) {\n        seen.push(computed);\n      }\n      result.push(value);\n    }\n  }\n  return result;\n}\n\nmodule.exports = baseUniq;\n", "var baseUniq = require('./_baseUniq');\n\n/**\n * Creates a duplicate-free version of an array, using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons, in which only the first occurrence of each element\n * is kept. The order of result values is determined by the order they occur\n * in the array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniq([2, 1, 2]);\n * // => [2, 1]\n */\nfunction uniq(array) {\n  return (array && array.length) ? baseUniq(array) : [];\n}\n\nmodule.exports = uniq;\n", "var debounce = require('./debounce'),\n    isObject = require('./isObject');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n *  Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n *  Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n  var leading = true,\n      trailing = true;\n\n  if (typeof func != 'function') {\n    throw new TypeError(FUNC_ERROR_TEXT);\n  }\n  if (isObject(options)) {\n    leading = 'leading' in options ? !!options.leading : leading;\n    trailing = 'trailing' in options ? !!options.trailing : trailing;\n  }\n  return debounce(func, wait, {\n    'leading': leading,\n    'maxWait': wait,\n    'trailing': trailing\n  });\n}\n\nmodule.exports = throttle;\n", "/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n  var index = -1,\n      length = array == null ? 0 : array.length,\n      result = Array(length);\n\n  while (++index < length) {\n    result[index] = iteratee(array[index], index, array);\n  }\n  return result;\n}\n\nmodule.exports = arrayMap;\n", "/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n", "var Symbol = require('./_Symbol'),\n    arrayMap = require('./_arrayMap'),\n    isArray = require('./isArray'),\n    isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n    symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n  // Exit early for strings to avoid a performance hit in some environments.\n  if (typeof value == 'string') {\n    return value;\n  }\n  if (isArray(value)) {\n    // Recursively convert values (susceptible to call stack limits).\n    return arrayMap(value, baseToString) + '';\n  }\n  if (isSymbol(value)) {\n    return symbolToString ? symbolToString.call(value) : '';\n  }\n  var result = (value + '');\n  return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = baseToString;\n", "var baseToString = require('./_baseToString');\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n  return value == null ? '' : baseToString(value);\n}\n\nmodule.exports = toString;\n", "/**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\nfunction baseSlice(array, start, end) {\n  var index = -1,\n      length = array.length;\n\n  if (start < 0) {\n    start = -start > length ? 0 : (length + start);\n  }\n  end = end > length ? length : end;\n  if (end < 0) {\n    end += length;\n  }\n  length = start > end ? 0 : ((end - start) >>> 0);\n  start >>>= 0;\n\n  var result = Array(length);\n  while (++index < length) {\n    result[index] = array[index + start];\n  }\n  return result;\n}\n\nmodule.exports = baseSlice;\n", "var baseSlice = require('./_baseSlice');\n\n/**\n * Casts `array` to a slice if it's needed.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {number} start The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the cast slice.\n */\nfunction castSlice(array, start, end) {\n  var length = array.length;\n  end = end === undefined ? length : end;\n  return (!start && end >= length) ? array : baseSlice(array, start, end);\n}\n\nmodule.exports = castSlice;\n", "/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n    rsComboMarksRange = '\\\\u0300-\\\\u036f',\n    reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n    rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n    rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n    rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsZWJ = '\\\\u200d';\n\n/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\nvar reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange  + rsComboRange + rsVarRange + ']');\n\n/**\n * Checks if `string` contains Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n */\nfunction hasUnicode(string) {\n  return reHasUnicode.test(string);\n}\n\nmodule.exports = hasUnicode;\n", "/**\n * Converts an ASCII `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction asciiToArray(string) {\n  return string.split('');\n}\n\nmodule.exports = asciiToArray;\n", "/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n    rsComboMarksRange = '\\\\u0300-\\\\u036f',\n    reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n    rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n    rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n    rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsAstral = '[' + rsAstralRange + ']',\n    rsCombo = '[' + rsComboRange + ']',\n    rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n    rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n    rsNonAstral = '[^' + rsAstralRange + ']',\n    rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n    rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n    rsZWJ = '\\\\u200d';\n\n/** Used to compose unicode regexes. */\nvar reOptMod = rsModifier + '?',\n    rsOptVar = '[' + rsVarRange + ']?',\n    rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n    rsSeq = rsOptVar + reOptMod + rsOptJoin,\n    rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\nvar reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n/**\n * Converts a Unicode `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction unicodeToArray(string) {\n  return string.match(reUnicode) || [];\n}\n\nmodule.exports = unicodeToArray;\n", "var asciiToArray = require('./_asciiToArray'),\n    hasUnicode = require('./_hasUnicode'),\n    unicodeToArray = require('./_unicodeToArray');\n\n/**\n * Converts `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction stringToArray(string) {\n  return hasUnicode(string)\n    ? unicodeToArray(string)\n    : asciiToArray(string);\n}\n\nmodule.exports = stringToArray;\n", "var castSlice = require('./_castSlice'),\n    hasUnicode = require('./_hasUnicode'),\n    stringToArray = require('./_stringToArray'),\n    toString = require('./toString');\n\n/**\n * Creates a function like `_.lowerFirst`.\n *\n * @private\n * @param {string} methodName The name of the `String` case method to use.\n * @returns {Function} Returns the new case function.\n */\nfunction createCaseFirst(methodName) {\n  return function(string) {\n    string = toString(string);\n\n    var strSymbols = hasUnicode(string)\n      ? stringToArray(string)\n      : undefined;\n\n    var chr = strSymbols\n      ? strSymbols[0]\n      : string.charAt(0);\n\n    var trailing = strSymbols\n      ? castSlice(strSymbols, 1).join('')\n      : string.slice(1);\n\n    return chr[methodName]() + trailing;\n  };\n}\n\nmodule.exports = createCaseFirst;\n", "var createCaseFirst = require('./_createCaseFirst');\n\n/**\n * Converts the first character of `string` to upper case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.upperFirst('fred');\n * // => 'Fred'\n *\n * _.upperFirst('FRED');\n * // => 'FRED'\n */\nvar upperFirst = createCaseFirst('toUpperCase');\n\nmodule.exports = upperFirst;\n", "var toString = require('./toString'),\n    upperFirst = require('./upperFirst');\n\n/**\n * Converts the first character of `string` to upper case and the remaining\n * to lower case.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to capitalize.\n * @returns {string} Returns the capitalized string.\n * @example\n *\n * _.capitalize('FRED');\n * // => 'Fred'\n */\nfunction capitalize(string) {\n  return upperFirst(toString(string).toLowerCase());\n}\n\nmodule.exports = capitalize;\n", "/**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n *  the initial value.\n * @returns {*} Returns the accumulated value.\n */\nfunction arrayReduce(array, iteratee, accumulator, initAccum) {\n  var index = -1,\n      length = array == null ? 0 : array.length;\n\n  if (initAccum && length) {\n    accumulator = array[++index];\n  }\n  while (++index < length) {\n    accumulator = iteratee(accumulator, array[index], index, array);\n  }\n  return accumulator;\n}\n\nmodule.exports = arrayReduce;\n", "/**\n * The base implementation of `_.propertyOf` without support for deep paths.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyOf(object) {\n  return function(key) {\n    return object == null ? undefined : object[key];\n  };\n}\n\nmodule.exports = basePropertyOf;\n", "var basePropertyOf = require('./_basePropertyOf');\n\n/** Used to map Latin Unicode letters to basic Latin letters. */\nvar deburredLetters = {\n  // Latin-1 Supplement block.\n  '\\xc0': 'A',  '\\xc1': 'A', '\\xc2': 'A', '\\xc3': 'A', '\\xc4': 'A', '\\xc5': 'A',\n  '\\xe0': 'a',  '\\xe1': 'a', '\\xe2': 'a', '\\xe3': 'a', '\\xe4': 'a', '\\xe5': 'a',\n  '\\xc7': 'C',  '\\xe7': 'c',\n  '\\xd0': 'D',  '\\xf0': 'd',\n  '\\xc8': 'E',  '\\xc9': 'E', '\\xca': 'E', '\\xcb': 'E',\n  '\\xe8': 'e',  '\\xe9': 'e', '\\xea': 'e', '\\xeb': 'e',\n  '\\xcc': 'I',  '\\xcd': 'I', '\\xce': 'I', '\\xcf': 'I',\n  '\\xec': 'i',  '\\xed': 'i', '\\xee': 'i', '\\xef': 'i',\n  '\\xd1': 'N',  '\\xf1': 'n',\n  '\\xd2': 'O',  '\\xd3': 'O', '\\xd4': 'O', '\\xd5': 'O', '\\xd6': 'O', '\\xd8': 'O',\n  '\\xf2': 'o',  '\\xf3': 'o', '\\xf4': 'o', '\\xf5': 'o', '\\xf6': 'o', '\\xf8': 'o',\n  '\\xd9': 'U',  '\\xda': 'U', '\\xdb': 'U', '\\xdc': 'U',\n  '\\xf9': 'u',  '\\xfa': 'u', '\\xfb': 'u', '\\xfc': 'u',\n  '\\xdd': 'Y',  '\\xfd': 'y', '\\xff': 'y',\n  '\\xc6': 'Ae', '\\xe6': 'ae',\n  '\\xde': 'Th', '\\xfe': 'th',\n  '\\xdf': 'ss',\n  // Latin Extended-A block.\n  '\\u0100': 'A',  '\\u0102': 'A', '\\u0104': 'A',\n  '\\u0101': 'a',  '\\u0103': 'a', '\\u0105': 'a',\n  '\\u0106': 'C',  '\\u0108': 'C', '\\u010a': 'C', '\\u010c': 'C',\n  '\\u0107': 'c',  '\\u0109': 'c', '\\u010b': 'c', '\\u010d': 'c',\n  '\\u010e': 'D',  '\\u0110': 'D', '\\u010f': 'd', '\\u0111': 'd',\n  '\\u0112': 'E',  '\\u0114': 'E', '\\u0116': 'E', '\\u0118': 'E', '\\u011a': 'E',\n  '\\u0113': 'e',  '\\u0115': 'e', '\\u0117': 'e', '\\u0119': 'e', '\\u011b': 'e',\n  '\\u011c': 'G',  '\\u011e': 'G', '\\u0120': 'G', '\\u0122': 'G',\n  '\\u011d': 'g',  '\\u011f': 'g', '\\u0121': 'g', '\\u0123': 'g',\n  '\\u0124': 'H',  '\\u0126': 'H', '\\u0125': 'h', '\\u0127': 'h',\n  '\\u0128': 'I',  '\\u012a': 'I', '\\u012c': 'I', '\\u012e': 'I', '\\u0130': 'I',\n  '\\u0129': 'i',  '\\u012b': 'i', '\\u012d': 'i', '\\u012f': 'i', '\\u0131': 'i',\n  '\\u0134': 'J',  '\\u0135': 'j',\n  '\\u0136': 'K',  '\\u0137': 'k', '\\u0138': 'k',\n  '\\u0139': 'L',  '\\u013b': 'L', '\\u013d': 'L', '\\u013f': 'L', '\\u0141': 'L',\n  '\\u013a': 'l',  '\\u013c': 'l', '\\u013e': 'l', '\\u0140': 'l', '\\u0142': 'l',\n  '\\u0143': 'N',  '\\u0145': 'N', '\\u0147': 'N', '\\u014a': 'N',\n  '\\u0144': 'n',  '\\u0146': 'n', '\\u0148': 'n', '\\u014b': 'n',\n  '\\u014c': 'O',  '\\u014e': 'O', '\\u0150': 'O',\n  '\\u014d': 'o',  '\\u014f': 'o', '\\u0151': 'o',\n  '\\u0154': 'R',  '\\u0156': 'R', '\\u0158': 'R',\n  '\\u0155': 'r',  '\\u0157': 'r', '\\u0159': 'r',\n  '\\u015a': 'S',  '\\u015c': 'S', '\\u015e': 'S', '\\u0160': 'S',\n  '\\u015b': 's',  '\\u015d': 's', '\\u015f': 's', '\\u0161': 's',\n  '\\u0162': 'T',  '\\u0164': 'T', '\\u0166': 'T',\n  '\\u0163': 't',  '\\u0165': 't', '\\u0167': 't',\n  '\\u0168': 'U',  '\\u016a': 'U', '\\u016c': 'U', '\\u016e': 'U', '\\u0170': 'U', '\\u0172': 'U',\n  '\\u0169': 'u',  '\\u016b': 'u', '\\u016d': 'u', '\\u016f': 'u', '\\u0171': 'u', '\\u0173': 'u',\n  '\\u0174': 'W',  '\\u0175': 'w',\n  '\\u0176': 'Y',  '\\u0177': 'y', '\\u0178': 'Y',\n  '\\u0179': 'Z',  '\\u017b': 'Z', '\\u017d': 'Z',\n  '\\u017a': 'z',  '\\u017c': 'z', '\\u017e': 'z',\n  '\\u0132': 'IJ', '\\u0133': 'ij',\n  '\\u0152': 'Oe', '\\u0153': 'oe',\n  '\\u0149': \"'n\", '\\u017f': 's'\n};\n\n/**\n * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A\n * letters to basic Latin letters.\n *\n * @private\n * @param {string} letter The matched letter to deburr.\n * @returns {string} Returns the deburred letter.\n */\nvar deburrLetter = basePropertyOf(deburredLetters);\n\nmodule.exports = deburrLetter;\n", "var deburrLetter = require('./_deburrLetter'),\n    toString = require('./toString');\n\n/** Used to match Latin Unicode letters (excluding mathematical operators). */\nvar reLatin = /[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g;\n\n/** Used to compose unicode character classes. */\nvar rsComboMarksRange = '\\\\u0300-\\\\u036f',\n    reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n    rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n    rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange;\n\n/** Used to compose unicode capture groups. */\nvar rsCombo = '[' + rsComboRange + ']';\n\n/**\n * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and\n * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).\n */\nvar reComboMark = RegExp(rsCombo, 'g');\n\n/**\n * Deburrs `string` by converting\n * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\n * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)\n * letters to basic Latin letters and removing\n * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to deburr.\n * @returns {string} Returns the deburred string.\n * @example\n *\n * _.deburr('d\u00E9j\u00E0 vu');\n * // => 'deja vu'\n */\nfunction deburr(string) {\n  string = toString(string);\n  return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');\n}\n\nmodule.exports = deburr;\n", "/** Used to match words composed of alphanumeric characters. */\nvar reAsciiWord = /[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;\n\n/**\n * Splits an ASCII `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\nfunction asciiWords(string) {\n  return string.match(reAsciiWord) || [];\n}\n\nmodule.exports = asciiWords;\n", "/** Used to detect strings that need a more robust regexp to match words. */\nvar reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;\n\n/**\n * Checks if `string` contains a word composed of Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a word is found, else `false`.\n */\nfunction hasUnicodeWord(string) {\n  return reHasUnicodeWord.test(string);\n}\n\nmodule.exports = hasUnicodeWord;\n", "/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n    rsComboMarksRange = '\\\\u0300-\\\\u036f',\n    reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n    rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n    rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n    rsDingbatRange = '\\\\u2700-\\\\u27bf',\n    rsLowerRange = 'a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff',\n    rsMathOpRange = '\\\\xac\\\\xb1\\\\xd7\\\\xf7',\n    rsNonCharRange = '\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf',\n    rsPunctuationRange = '\\\\u2000-\\\\u206f',\n    rsSpaceRange = ' \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000',\n    rsUpperRange = 'A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde',\n    rsVarRange = '\\\\ufe0e\\\\ufe0f',\n    rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;\n\n/** Used to compose unicode capture groups. */\nvar rsApos = \"['\\u2019]\",\n    rsBreak = '[' + rsBreakRange + ']',\n    rsCombo = '[' + rsComboRange + ']',\n    rsDigits = '\\\\d+',\n    rsDingbat = '[' + rsDingbatRange + ']',\n    rsLower = '[' + rsLowerRange + ']',\n    rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',\n    rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n    rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n    rsNonAstral = '[^' + rsAstralRange + ']',\n    rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n    rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n    rsUpper = '[' + rsUpperRange + ']',\n    rsZWJ = '\\\\u200d';\n\n/** Used to compose unicode regexes. */\nvar rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',\n    rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',\n    rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',\n    rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',\n    reOptMod = rsModifier + '?',\n    rsOptVar = '[' + rsVarRange + ']?',\n    rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n    rsOrdLower = '\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])',\n    rsOrdUpper = '\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])',\n    rsSeq = rsOptVar + reOptMod + rsOptJoin,\n    rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq;\n\n/** Used to match complex or compound words. */\nvar reUnicodeWord = RegExp([\n  rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',\n  rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',\n  rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,\n  rsUpper + '+' + rsOptContrUpper,\n  rsOrdUpper,\n  rsOrdLower,\n  rsDigits,\n  rsEmoji\n].join('|'), 'g');\n\n/**\n * Splits a Unicode `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\nfunction unicodeWords(string) {\n  return string.match(reUnicodeWord) || [];\n}\n\nmodule.exports = unicodeWords;\n", "var asciiWords = require('./_asciiWords'),\n    hasUnicodeWord = require('./_hasUnicodeWord'),\n    toString = require('./toString'),\n    unicodeWords = require('./_unicodeWords');\n\n/**\n * Splits `string` into an array of its words.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {RegExp|string} [pattern] The pattern to match words.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the words of `string`.\n * @example\n *\n * _.words('fred, barney, & pebbles');\n * // => ['fred', 'barney', 'pebbles']\n *\n * _.words('fred, barney, & pebbles', /[^, ]+/g);\n * // => ['fred', 'barney', '&', 'pebbles']\n */\nfunction words(string, pattern, guard) {\n  string = toString(string);\n  pattern = guard ? undefined : pattern;\n\n  if (pattern === undefined) {\n    return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);\n  }\n  return string.match(pattern) || [];\n}\n\nmodule.exports = words;\n", "var arrayReduce = require('./_arrayReduce'),\n    deburr = require('./deburr'),\n    words = require('./words');\n\n/** Used to compose unicode capture groups. */\nvar rsApos = \"['\\u2019]\";\n\n/** Used to match apostrophes. */\nvar reApos = RegExp(rsApos, 'g');\n\n/**\n * Creates a function like `_.camelCase`.\n *\n * @private\n * @param {Function} callback The function to combine each word.\n * @returns {Function} Returns the new compounder function.\n */\nfunction createCompounder(callback) {\n  return function(string) {\n    return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');\n  };\n}\n\nmodule.exports = createCompounder;\n", "var capitalize = require('./capitalize'),\n    createCompounder = require('./_createCompounder');\n\n/**\n * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the camel cased string.\n * @example\n *\n * _.camelCase('Foo Bar');\n * // => 'fooBar'\n *\n * _.camelCase('--foo-bar--');\n * // => 'fooBar'\n *\n * _.camelCase('__FOO_BAR__');\n * // => 'fooBar'\n */\nvar camelCase = createCompounder(function(result, word, index) {\n  word = word.toLowerCase();\n  return result + (index ? capitalize(word) : word);\n});\n\nmodule.exports = camelCase;\n", "(function (global, factory) {\n  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n  typeof define === 'function' && define.amd ? define(['exports'], factory) :\n  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.sk = {}));\n}(this, (function (exports) { 'use strict';\n\n  var fp = typeof window !== \"undefined\" && window.flatpickr !== undefined\n      ? window.flatpickr\n      : {\n          l10ns: {},\n      };\n  var Slovak = {\n      weekdays: {\n          shorthand: [\"Ned\", \"Pon\", \"Ut\", \"Str\", \"\u0160tv\", \"Pia\", \"Sob\"],\n          longhand: [\n              \"Nede\u013Ea\",\n              \"Pondelok\",\n              \"Utorok\",\n              \"Streda\",\n              \"\u0160tvrtok\",\n              \"Piatok\",\n              \"Sobota\",\n          ],\n      },\n      months: {\n          shorthand: [\n              \"Jan\",\n              \"Feb\",\n              \"Mar\",\n              \"Apr\",\n              \"M\u00E1j\",\n              \"J\u00FAn\",\n              \"J\u00FAl\",\n              \"Aug\",\n              \"Sep\",\n              \"Okt\",\n              \"Nov\",\n              \"Dec\",\n          ],\n          longhand: [\n              \"Janu\u00E1r\",\n              \"Febru\u00E1r\",\n              \"Marec\",\n              \"Apr\u00EDl\",\n              \"M\u00E1j\",\n              \"J\u00FAn\",\n              \"J\u00FAl\",\n              \"August\",\n              \"September\",\n              \"Okt\u00F3ber\",\n              \"November\",\n              \"December\",\n          ],\n      },\n      firstDayOfWeek: 1,\n      rangeSeparator: \" do \",\n      time_24hr: true,\n      ordinal: function () {\n          return \".\";\n      },\n  };\n  fp.l10ns.sk = Slovak;\n  var sk = fp.l10ns;\n\n  exports.Slovak = Slovak;\n  exports.default = sk;\n\n  Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n", "(function (global, factory) {\n  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n  typeof define === 'function' && define.amd ? define(['exports'], factory) :\n  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.cs = {}));\n}(this, (function (exports) { 'use strict';\n\n  var fp = typeof window !== \"undefined\" && window.flatpickr !== undefined\n      ? window.flatpickr\n      : {\n          l10ns: {},\n      };\n  var Czech = {\n      weekdays: {\n          shorthand: [\"Ne\", \"Po\", \"\u00DAt\", \"St\", \"\u010Ct\", \"P\u00E1\", \"So\"],\n          longhand: [\n              \"Ned\u011Ble\",\n              \"Pond\u011Bl\u00ED\",\n              \"\u00DAter\u00FD\",\n              \"St\u0159eda\",\n              \"\u010Ctvrtek\",\n              \"P\u00E1tek\",\n              \"Sobota\",\n          ],\n      },\n      months: {\n          shorthand: [\n              \"Led\",\n              \"\u00DAn\",\n              \"B\u0159e\",\n              \"Dub\",\n              \"Kv\u011B\",\n              \"\u010Cer\",\n              \"\u010Cvc\",\n              \"Srp\",\n              \"Z\u00E1\u0159\",\n              \"\u0158\u00EDj\",\n              \"Lis\",\n              \"Pro\",\n          ],\n          longhand: [\n              \"Leden\",\n              \"\u00DAnor\",\n              \"B\u0159ezen\",\n              \"Duben\",\n              \"Kv\u011Bten\",\n              \"\u010Cerven\",\n              \"\u010Cervenec\",\n              \"Srpen\",\n              \"Z\u00E1\u0159\u00ED\",\n              \"\u0158\u00EDjen\",\n              \"Listopad\",\n              \"Prosinec\",\n          ],\n      },\n      firstDayOfWeek: 1,\n      ordinal: function () {\n          return \".\";\n      },\n      rangeSeparator: \" do \",\n      weekAbbreviation: \"T\u00FDd.\",\n      scrollTitle: \"Rolujte pro zm\u011Bnu\",\n      toggleTitle: \"P\u0159epnout dopoledne/odpoledne\",\n      amPM: [\"dop.\", \"odp.\"],\n      yearAriaLabel: \"Rok\",\n      time_24hr: true,\n  };\n  fp.l10ns.cs = Czech;\n  var cs = fp.l10ns;\n\n  exports.Czech = Czech;\n  exports.default = cs;\n\n  Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n", "//! moment.js\n//! version : 2.30.1\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\n;(function (global, factory) {\n    typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n    typeof define === 'function' && define.amd ? define(factory) :\n    global.moment = factory()\n}(this, (function () { 'use strict';\n\n    var hookCallback;\n\n    function hooks() {\n        return hookCallback.apply(null, arguments);\n    }\n\n    // This is done to register the method called with moment()\n    // without creating circular dependencies.\n    function setHookCallback(callback) {\n        hookCallback = callback;\n    }\n\n    function isArray(input) {\n        return (\n            input instanceof Array ||\n            Object.prototype.toString.call(input) === '[object Array]'\n        );\n    }\n\n    function isObject(input) {\n        // IE8 will treat undefined and null as object if it wasn't for\n        // input != null\n        return (\n            input != null &&\n            Object.prototype.toString.call(input) === '[object Object]'\n        );\n    }\n\n    function hasOwnProp(a, b) {\n        return Object.prototype.hasOwnProperty.call(a, b);\n    }\n\n    function isObjectEmpty(obj) {\n        if (Object.getOwnPropertyNames) {\n            return Object.getOwnPropertyNames(obj).length === 0;\n        } else {\n            var k;\n            for (k in obj) {\n                if (hasOwnProp(obj, k)) {\n                    return false;\n                }\n            }\n            return true;\n        }\n    }\n\n    function isUndefined(input) {\n        return input === void 0;\n    }\n\n    function isNumber(input) {\n        return (\n            typeof input === 'number' ||\n            Object.prototype.toString.call(input) === '[object Number]'\n        );\n    }\n\n    function isDate(input) {\n        return (\n            input instanceof Date ||\n            Object.prototype.toString.call(input) === '[object Date]'\n        );\n    }\n\n    function map(arr, fn) {\n        var res = [],\n            i,\n            arrLen = arr.length;\n        for (i = 0; i < arrLen; ++i) {\n            res.push(fn(arr[i], i));\n        }\n        return res;\n    }\n\n    function extend(a, b) {\n        for (var i in b) {\n            if (hasOwnProp(b, i)) {\n                a[i] = b[i];\n            }\n        }\n\n        if (hasOwnProp(b, 'toString')) {\n            a.toString = b.toString;\n        }\n\n        if (hasOwnProp(b, 'valueOf')) {\n            a.valueOf = b.valueOf;\n        }\n\n        return a;\n    }\n\n    function createUTC(input, format, locale, strict) {\n        return createLocalOrUTC(input, format, locale, strict, true).utc();\n    }\n\n    function defaultParsingFlags() {\n        // We need to deep clone this object.\n        return {\n            empty: false,\n            unusedTokens: [],\n            unusedInput: [],\n            overflow: -2,\n            charsLeftOver: 0,\n            nullInput: false,\n            invalidEra: null,\n            invalidMonth: null,\n            invalidFormat: false,\n            userInvalidated: false,\n            iso: false,\n            parsedDateParts: [],\n            era: null,\n            meridiem: null,\n            rfc2822: false,\n            weekdayMismatch: false,\n        };\n    }\n\n    function getParsingFlags(m) {\n        if (m._pf == null) {\n            m._pf = defaultParsingFlags();\n        }\n        return m._pf;\n    }\n\n    var some;\n    if (Array.prototype.some) {\n        some = Array.prototype.some;\n    } else {\n        some = function (fun) {\n            var t = Object(this),\n                len = t.length >>> 0,\n                i;\n\n            for (i = 0; i < len; i++) {\n                if (i in t && fun.call(this, t[i], i, t)) {\n                    return true;\n                }\n            }\n\n            return false;\n        };\n    }\n\n    function isValid(m) {\n        var flags = null,\n            parsedParts = false,\n            isNowValid = m._d && !isNaN(m._d.getTime());\n        if (isNowValid) {\n            flags = getParsingFlags(m);\n            parsedParts = some.call(flags.parsedDateParts, function (i) {\n                return i != null;\n            });\n            isNowValid =\n                flags.overflow < 0 &&\n                !flags.empty &&\n                !flags.invalidEra &&\n                !flags.invalidMonth &&\n                !flags.invalidWeekday &&\n                !flags.weekdayMismatch &&\n                !flags.nullInput &&\n                !flags.invalidFormat &&\n                !flags.userInvalidated &&\n                (!flags.meridiem || (flags.meridiem && parsedParts));\n            if (m._strict) {\n                isNowValid =\n                    isNowValid &&\n                    flags.charsLeftOver === 0 &&\n                    flags.unusedTokens.length === 0 &&\n                    flags.bigHour === undefined;\n            }\n        }\n        if (Object.isFrozen == null || !Object.isFrozen(m)) {\n            m._isValid = isNowValid;\n        } else {\n            return isNowValid;\n        }\n        return m._isValid;\n    }\n\n    function createInvalid(flags) {\n        var m = createUTC(NaN);\n        if (flags != null) {\n            extend(getParsingFlags(m), flags);\n        } else {\n            getParsingFlags(m).userInvalidated = true;\n        }\n\n        return m;\n    }\n\n    // Plugins that add properties should also add the key here (null value),\n    // so we can properly clone ourselves.\n    var momentProperties = (hooks.momentProperties = []),\n        updateInProgress = false;\n\n    function copyConfig(to, from) {\n        var i,\n            prop,\n            val,\n            momentPropertiesLen = momentProperties.length;\n\n        if (!isUndefined(from._isAMomentObject)) {\n            to._isAMomentObject = from._isAMomentObject;\n        }\n        if (!isUndefined(from._i)) {\n            to._i = from._i;\n        }\n        if (!isUndefined(from._f)) {\n            to._f = from._f;\n        }\n        if (!isUndefined(from._l)) {\n            to._l = from._l;\n        }\n        if (!isUndefined(from._strict)) {\n            to._strict = from._strict;\n        }\n        if (!isUndefined(from._tzm)) {\n            to._tzm = from._tzm;\n        }\n        if (!isUndefined(from._isUTC)) {\n            to._isUTC = from._isUTC;\n        }\n        if (!isUndefined(from._offset)) {\n            to._offset = from._offset;\n        }\n        if (!isUndefined(from._pf)) {\n            to._pf = getParsingFlags(from);\n        }\n        if (!isUndefined(from._locale)) {\n            to._locale = from._locale;\n        }\n\n        if (momentPropertiesLen > 0) {\n            for (i = 0; i < momentPropertiesLen; i++) {\n                prop = momentProperties[i];\n                val = from[prop];\n                if (!isUndefined(val)) {\n                    to[prop] = val;\n                }\n            }\n        }\n\n        return to;\n    }\n\n    // Moment prototype object\n    function Moment(config) {\n        copyConfig(this, config);\n        this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n        if (!this.isValid()) {\n            this._d = new Date(NaN);\n        }\n        // Prevent infinite loop in case updateOffset creates new moment\n        // objects.\n        if (updateInProgress === false) {\n            updateInProgress = true;\n            hooks.updateOffset(this);\n            updateInProgress = false;\n        }\n    }\n\n    function isMoment(obj) {\n        return (\n            obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n        );\n    }\n\n    function warn(msg) {\n        if (\n            hooks.suppressDeprecationWarnings === false &&\n            typeof console !== 'undefined' &&\n            console.warn\n        ) {\n            console.warn('Deprecation warning: ' + msg);\n        }\n    }\n\n    function deprecate(msg, fn) {\n        var firstTime = true;\n\n        return extend(function () {\n            if (hooks.deprecationHandler != null) {\n                hooks.deprecationHandler(null, msg);\n            }\n            if (firstTime) {\n                var args = [],\n                    arg,\n                    i,\n                    key,\n                    argLen = arguments.length;\n                for (i = 0; i < argLen; i++) {\n                    arg = '';\n                    if (typeof arguments[i] === 'object') {\n                        arg += '\\n[' + i + '] ';\n                        for (key in arguments[0]) {\n                            if (hasOwnProp(arguments[0], key)) {\n                                arg += key + ': ' + arguments[0][key] + ', ';\n                            }\n                        }\n                        arg = arg.slice(0, -2); // Remove trailing comma and space\n                    } else {\n                        arg = arguments[i];\n                    }\n                    args.push(arg);\n                }\n                warn(\n                    msg +\n                        '\\nArguments: ' +\n                        Array.prototype.slice.call(args).join('') +\n                        '\\n' +\n                        new Error().stack\n                );\n                firstTime = false;\n            }\n            return fn.apply(this, arguments);\n        }, fn);\n    }\n\n    var deprecations = {};\n\n    function deprecateSimple(name, msg) {\n        if (hooks.deprecationHandler != null) {\n            hooks.deprecationHandler(name, msg);\n        }\n        if (!deprecations[name]) {\n            warn(msg);\n            deprecations[name] = true;\n        }\n    }\n\n    hooks.suppressDeprecationWarnings = false;\n    hooks.deprecationHandler = null;\n\n    function isFunction(input) {\n        return (\n            (typeof Function !== 'undefined' && input instanceof Function) ||\n            Object.prototype.toString.call(input) === '[object Function]'\n        );\n    }\n\n    function set(config) {\n        var prop, i;\n        for (i in config) {\n            if (hasOwnProp(config, i)) {\n                prop = config[i];\n                if (isFunction(prop)) {\n                    this[i] = prop;\n                } else {\n                    this['_' + i] = prop;\n                }\n            }\n        }\n        this._config = config;\n        // Lenient ordinal parsing accepts just a number in addition to\n        // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n        // TODO: Remove \"ordinalParse\" fallback in next major release.\n        this._dayOfMonthOrdinalParseLenient = new RegExp(\n            (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n                '|' +\n                /\\d{1,2}/.source\n        );\n    }\n\n    function mergeConfigs(parentConfig, childConfig) {\n        var res = extend({}, parentConfig),\n            prop;\n        for (prop in childConfig) {\n            if (hasOwnProp(childConfig, prop)) {\n                if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n                    res[prop] = {};\n                    extend(res[prop], parentConfig[prop]);\n                    extend(res[prop], childConfig[prop]);\n                } else if (childConfig[prop] != null) {\n                    res[prop] = childConfig[prop];\n                } else {\n                    delete res[prop];\n                }\n            }\n        }\n        for (prop in parentConfig) {\n            if (\n                hasOwnProp(parentConfig, prop) &&\n                !hasOwnProp(childConfig, prop) &&\n                isObject(parentConfig[prop])\n            ) {\n                // make sure changes to properties don't modify parent config\n                res[prop] = extend({}, res[prop]);\n            }\n        }\n        return res;\n    }\n\n    function Locale(config) {\n        if (config != null) {\n            this.set(config);\n        }\n    }\n\n    var keys;\n\n    if (Object.keys) {\n        keys = Object.keys;\n    } else {\n        keys = function (obj) {\n            var i,\n                res = [];\n            for (i in obj) {\n                if (hasOwnProp(obj, i)) {\n                    res.push(i);\n                }\n            }\n            return res;\n        };\n    }\n\n    var defaultCalendar = {\n        sameDay: '[Today at] LT',\n        nextDay: '[Tomorrow at] LT',\n        nextWeek: 'dddd [at] LT',\n        lastDay: '[Yesterday at] LT',\n        lastWeek: '[Last] dddd [at] LT',\n        sameElse: 'L',\n    };\n\n    function calendar(key, mom, now) {\n        var output = this._calendar[key] || this._calendar['sameElse'];\n        return isFunction(output) ? output.call(mom, now) : output;\n    }\n\n    function zeroFill(number, targetLength, forceSign) {\n        var absNumber = '' + Math.abs(number),\n            zerosToFill = targetLength - absNumber.length,\n            sign = number >= 0;\n        return (\n            (sign ? (forceSign ? '+' : '') : '-') +\n            Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n            absNumber\n        );\n    }\n\n    var formattingTokens =\n            /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n        localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n        formatFunctions = {},\n        formatTokenFunctions = {};\n\n    // token:    'M'\n    // padded:   ['MM', 2]\n    // ordinal:  'Mo'\n    // callback: function () { this.month() + 1 }\n    function addFormatToken(token, padded, ordinal, callback) {\n        var func = callback;\n        if (typeof callback === 'string') {\n            func = function () {\n                return this[callback]();\n            };\n        }\n        if (token) {\n            formatTokenFunctions[token] = func;\n        }\n        if (padded) {\n            formatTokenFunctions[padded[0]] = function () {\n                return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n            };\n        }\n        if (ordinal) {\n            formatTokenFunctions[ordinal] = function () {\n                return this.localeData().ordinal(\n                    func.apply(this, arguments),\n                    token\n                );\n            };\n        }\n    }\n\n    function removeFormattingTokens(input) {\n        if (input.match(/\\[[\\s\\S]/)) {\n            return input.replace(/^\\[|\\]$/g, '');\n        }\n        return input.replace(/\\\\/g, '');\n    }\n\n    function makeFormatFunction(format) {\n        var array = format.match(formattingTokens),\n            i,\n            length;\n\n        for (i = 0, length = array.length; i < length; i++) {\n            if (formatTokenFunctions[array[i]]) {\n                array[i] = formatTokenFunctions[array[i]];\n            } else {\n                array[i] = removeFormattingTokens(array[i]);\n            }\n        }\n\n        return function (mom) {\n            var output = '',\n                i;\n            for (i = 0; i < length; i++) {\n                output += isFunction(array[i])\n                    ? array[i].call(mom, format)\n                    : array[i];\n            }\n            return output;\n        };\n    }\n\n    // format date using native date object\n    function formatMoment(m, format) {\n        if (!m.isValid()) {\n            return m.localeData().invalidDate();\n        }\n\n        format = expandFormat(format, m.localeData());\n        formatFunctions[format] =\n            formatFunctions[format] || makeFormatFunction(format);\n\n        return formatFunctions[format](m);\n    }\n\n    function expandFormat(format, locale) {\n        var i = 5;\n\n        function replaceLongDateFormatTokens(input) {\n            return locale.longDateFormat(input) || input;\n        }\n\n        localFormattingTokens.lastIndex = 0;\n        while (i >= 0 && localFormattingTokens.test(format)) {\n            format = format.replace(\n                localFormattingTokens,\n                replaceLongDateFormatTokens\n            );\n            localFormattingTokens.lastIndex = 0;\n            i -= 1;\n        }\n\n        return format;\n    }\n\n    var defaultLongDateFormat = {\n        LTS: 'h:mm:ss A',\n        LT: 'h:mm A',\n        L: 'MM/DD/YYYY',\n        LL: 'MMMM D, YYYY',\n        LLL: 'MMMM D, YYYY h:mm A',\n        LLLL: 'dddd, MMMM D, YYYY h:mm A',\n    };\n\n    function longDateFormat(key) {\n        var format = this._longDateFormat[key],\n            formatUpper = this._longDateFormat[key.toUpperCase()];\n\n        if (format || !formatUpper) {\n            return format;\n        }\n\n        this._longDateFormat[key] = formatUpper\n            .match(formattingTokens)\n            .map(function (tok) {\n                if (\n                    tok === 'MMMM' ||\n                    tok === 'MM' ||\n                    tok === 'DD' ||\n                    tok === 'dddd'\n                ) {\n                    return tok.slice(1);\n                }\n                return tok;\n            })\n            .join('');\n\n        return this._longDateFormat[key];\n    }\n\n    var defaultInvalidDate = 'Invalid date';\n\n    function invalidDate() {\n        return this._invalidDate;\n    }\n\n    var defaultOrdinal = '%d',\n        defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\n    function ordinal(number) {\n        return this._ordinal.replace('%d', number);\n    }\n\n    var defaultRelativeTime = {\n        future: 'in %s',\n        past: '%s ago',\n        s: 'a few seconds',\n        ss: '%d seconds',\n        m: 'a minute',\n        mm: '%d minutes',\n        h: 'an hour',\n        hh: '%d hours',\n        d: 'a day',\n        dd: '%d days',\n        w: 'a week',\n        ww: '%d weeks',\n        M: 'a month',\n        MM: '%d months',\n        y: 'a year',\n        yy: '%d years',\n    };\n\n    function relativeTime(number, withoutSuffix, string, isFuture) {\n        var output = this._relativeTime[string];\n        return isFunction(output)\n            ? output(number, withoutSuffix, string, isFuture)\n            : output.replace(/%d/i, number);\n    }\n\n    function pastFuture(diff, output) {\n        var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n        return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n    }\n\n    var aliases = {\n        D: 'date',\n        dates: 'date',\n        date: 'date',\n        d: 'day',\n        days: 'day',\n        day: 'day',\n        e: 'weekday',\n        weekdays: 'weekday',\n        weekday: 'weekday',\n        E: 'isoWeekday',\n        isoweekdays: 'isoWeekday',\n        isoweekday: 'isoWeekday',\n        DDD: 'dayOfYear',\n        dayofyears: 'dayOfYear',\n        dayofyear: 'dayOfYear',\n        h: 'hour',\n        hours: 'hour',\n        hour: 'hour',\n        ms: 'millisecond',\n        milliseconds: 'millisecond',\n        millisecond: 'millisecond',\n        m: 'minute',\n        minutes: 'minute',\n        minute: 'minute',\n        M: 'month',\n        months: 'month',\n        month: 'month',\n        Q: 'quarter',\n        quarters: 'quarter',\n        quarter: 'quarter',\n        s: 'second',\n        seconds: 'second',\n        second: 'second',\n        gg: 'weekYear',\n        weekyears: 'weekYear',\n        weekyear: 'weekYear',\n        GG: 'isoWeekYear',\n        isoweekyears: 'isoWeekYear',\n        isoweekyear: 'isoWeekYear',\n        w: 'week',\n        weeks: 'week',\n        week: 'week',\n        W: 'isoWeek',\n        isoweeks: 'isoWeek',\n        isoweek: 'isoWeek',\n        y: 'year',\n        years: 'year',\n        year: 'year',\n    };\n\n    function normalizeUnits(units) {\n        return typeof units === 'string'\n            ? aliases[units] || aliases[units.toLowerCase()]\n            : undefined;\n    }\n\n    function normalizeObjectUnits(inputObject) {\n        var normalizedInput = {},\n            normalizedProp,\n            prop;\n\n        for (prop in inputObject) {\n            if (hasOwnProp(inputObject, prop)) {\n                normalizedProp = normalizeUnits(prop);\n                if (normalizedProp) {\n                    normalizedInput[normalizedProp] = inputObject[prop];\n                }\n            }\n        }\n\n        return normalizedInput;\n    }\n\n    var priorities = {\n        date: 9,\n        day: 11,\n        weekday: 11,\n        isoWeekday: 11,\n        dayOfYear: 4,\n        hour: 13,\n        millisecond: 16,\n        minute: 14,\n        month: 8,\n        quarter: 7,\n        second: 15,\n        weekYear: 1,\n        isoWeekYear: 1,\n        week: 5,\n        isoWeek: 5,\n        year: 1,\n    };\n\n    function getPrioritizedUnits(unitsObj) {\n        var units = [],\n            u;\n        for (u in unitsObj) {\n            if (hasOwnProp(unitsObj, u)) {\n                units.push({ unit: u, priority: priorities[u] });\n            }\n        }\n        units.sort(function (a, b) {\n            return a.priority - b.priority;\n        });\n        return units;\n    }\n\n    var match1 = /\\d/, //       0 - 9\n        match2 = /\\d\\d/, //      00 - 99\n        match3 = /\\d{3}/, //     000 - 999\n        match4 = /\\d{4}/, //    0000 - 9999\n        match6 = /[+-]?\\d{6}/, // -999999 - 999999\n        match1to2 = /\\d\\d?/, //       0 - 99\n        match3to4 = /\\d\\d\\d\\d?/, //     999 - 9999\n        match5to6 = /\\d\\d\\d\\d\\d\\d?/, //   99999 - 999999\n        match1to3 = /\\d{1,3}/, //       0 - 999\n        match1to4 = /\\d{1,4}/, //       0 - 9999\n        match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n        matchUnsigned = /\\d+/, //       0 - inf\n        matchSigned = /[+-]?\\d+/, //    -inf - inf\n        matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n        matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n        matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n        // any word (or two) characters or numbers including two/three word month in arabic.\n        // includes scottish gaelic two word and hyphenated months\n        matchWord =\n            /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n        match1to2NoLeadingZero = /^[1-9]\\d?/, //         1-99\n        match1to2HasZero = /^([1-9]\\d|\\d)/, //           0-99\n        regexes;\n\n    regexes = {};\n\n    function addRegexToken(token, regex, strictRegex) {\n        regexes[token] = isFunction(regex)\n            ? regex\n            : function (isStrict, localeData) {\n                  return isStrict && strictRegex ? strictRegex : regex;\n              };\n    }\n\n    function getParseRegexForToken(token, config) {\n        if (!hasOwnProp(regexes, token)) {\n            return new RegExp(unescapeFormat(token));\n        }\n\n        return regexes[token](config._strict, config._locale);\n    }\n\n    // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\n    function unescapeFormat(s) {\n        return regexEscape(\n            s\n                .replace('\\\\', '')\n                .replace(\n                    /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n                    function (matched, p1, p2, p3, p4) {\n                        return p1 || p2 || p3 || p4;\n                    }\n                )\n        );\n    }\n\n    function regexEscape(s) {\n        return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n    }\n\n    function absFloor(number) {\n        if (number < 0) {\n            // -0 -> 0\n            return Math.ceil(number) || 0;\n        } else {\n            return Math.floor(number);\n        }\n    }\n\n    function toInt(argumentForCoercion) {\n        var coercedNumber = +argumentForCoercion,\n            value = 0;\n\n        if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n            value = absFloor(coercedNumber);\n        }\n\n        return value;\n    }\n\n    var tokens = {};\n\n    function addParseToken(token, callback) {\n        var i,\n            func = callback,\n            tokenLen;\n        if (typeof token === 'string') {\n            token = [token];\n        }\n        if (isNumber(callback)) {\n            func = function (input, array) {\n                array[callback] = toInt(input);\n            };\n        }\n        tokenLen = token.length;\n        for (i = 0; i < tokenLen; i++) {\n            tokens[token[i]] = func;\n        }\n    }\n\n    function addWeekParseToken(token, callback) {\n        addParseToken(token, function (input, array, config, token) {\n            config._w = config._w || {};\n            callback(input, config._w, config, token);\n        });\n    }\n\n    function addTimeToArrayFromToken(token, input, config) {\n        if (input != null && hasOwnProp(tokens, token)) {\n            tokens[token](input, config._a, config, token);\n        }\n    }\n\n    function isLeapYear(year) {\n        return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n    }\n\n    var YEAR = 0,\n        MONTH = 1,\n        DATE = 2,\n        HOUR = 3,\n        MINUTE = 4,\n        SECOND = 5,\n        MILLISECOND = 6,\n        WEEK = 7,\n        WEEKDAY = 8;\n\n    // FORMATTING\n\n    addFormatToken('Y', 0, 0, function () {\n        var y = this.year();\n        return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n    });\n\n    addFormatToken(0, ['YY', 2], 0, function () {\n        return this.year() % 100;\n    });\n\n    addFormatToken(0, ['YYYY', 4], 0, 'year');\n    addFormatToken(0, ['YYYYY', 5], 0, 'year');\n    addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n    // PARSING\n\n    addRegexToken('Y', matchSigned);\n    addRegexToken('YY', match1to2, match2);\n    addRegexToken('YYYY', match1to4, match4);\n    addRegexToken('YYYYY', match1to6, match6);\n    addRegexToken('YYYYYY', match1to6, match6);\n\n    addParseToken(['YYYYY', 'YYYYYY'], YEAR);\n    addParseToken('YYYY', function (input, array) {\n        array[YEAR] =\n            input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n    });\n    addParseToken('YY', function (input, array) {\n        array[YEAR] = hooks.parseTwoDigitYear(input);\n    });\n    addParseToken('Y', function (input, array) {\n        array[YEAR] = parseInt(input, 10);\n    });\n\n    // HELPERS\n\n    function daysInYear(year) {\n        return isLeapYear(year) ? 366 : 365;\n    }\n\n    // HOOKS\n\n    hooks.parseTwoDigitYear = function (input) {\n        return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n    };\n\n    // MOMENTS\n\n    var getSetYear = makeGetSet('FullYear', true);\n\n    function getIsLeapYear() {\n        return isLeapYear(this.year());\n    }\n\n    function makeGetSet(unit, keepTime) {\n        return function (value) {\n            if (value != null) {\n                set$1(this, unit, value);\n                hooks.updateOffset(this, keepTime);\n                return this;\n            } else {\n                return get(this, unit);\n            }\n        };\n    }\n\n    function get(mom, unit) {\n        if (!mom.isValid()) {\n            return NaN;\n        }\n\n        var d = mom._d,\n            isUTC = mom._isUTC;\n\n        switch (unit) {\n            case 'Milliseconds':\n                return isUTC ? d.getUTCMilliseconds() : d.getMilliseconds();\n            case 'Seconds':\n                return isUTC ? d.getUTCSeconds() : d.getSeconds();\n            case 'Minutes':\n                return isUTC ? d.getUTCMinutes() : d.getMinutes();\n            case 'Hours':\n                return isUTC ? d.getUTCHours() : d.getHours();\n            case 'Date':\n                return isUTC ? d.getUTCDate() : d.getDate();\n            case 'Day':\n                return isUTC ? d.getUTCDay() : d.getDay();\n            case 'Month':\n                return isUTC ? d.getUTCMonth() : d.getMonth();\n            case 'FullYear':\n                return isUTC ? d.getUTCFullYear() : d.getFullYear();\n            default:\n                return NaN; // Just in case\n        }\n    }\n\n    function set$1(mom, unit, value) {\n        var d, isUTC, year, month, date;\n\n        if (!mom.isValid() || isNaN(value)) {\n            return;\n        }\n\n        d = mom._d;\n        isUTC = mom._isUTC;\n\n        switch (unit) {\n            case 'Milliseconds':\n                return void (isUTC\n                    ? d.setUTCMilliseconds(value)\n                    : d.setMilliseconds(value));\n            case 'Seconds':\n                return void (isUTC ? d.setUTCSeconds(value) : d.setSeconds(value));\n            case 'Minutes':\n                return void (isUTC ? d.setUTCMinutes(value) : d.setMinutes(value));\n            case 'Hours':\n                return void (isUTC ? d.setUTCHours(value) : d.setHours(value));\n            case 'Date':\n                return void (isUTC ? d.setUTCDate(value) : d.setDate(value));\n            // case 'Day': // Not real\n            //    return void (isUTC ? d.setUTCDay(value) : d.setDay(value));\n            // case 'Month': // Not used because we need to pass two variables\n            //     return void (isUTC ? d.setUTCMonth(value) : d.setMonth(value));\n            case 'FullYear':\n                break; // See below ...\n            default:\n                return; // Just in case\n        }\n\n        year = value;\n        month = mom.month();\n        date = mom.date();\n        date = date === 29 && month === 1 && !isLeapYear(year) ? 28 : date;\n        void (isUTC\n            ? d.setUTCFullYear(year, month, date)\n            : d.setFullYear(year, month, date));\n    }\n\n    // MOMENTS\n\n    function stringGet(units) {\n        units = normalizeUnits(units);\n        if (isFunction(this[units])) {\n            return this[units]();\n        }\n        return this;\n    }\n\n    function stringSet(units, value) {\n        if (typeof units === 'object') {\n            units = normalizeObjectUnits(units);\n            var prioritized = getPrioritizedUnits(units),\n                i,\n                prioritizedLen = prioritized.length;\n            for (i = 0; i < prioritizedLen; i++) {\n                this[prioritized[i].unit](units[prioritized[i].unit]);\n            }\n        } else {\n            units = normalizeUnits(units);\n            if (isFunction(this[units])) {\n                return this[units](value);\n            }\n        }\n        return this;\n    }\n\n    function mod(n, x) {\n        return ((n % x) + x) % x;\n    }\n\n    var indexOf;\n\n    if (Array.prototype.indexOf) {\n        indexOf = Array.prototype.indexOf;\n    } else {\n        indexOf = function (o) {\n            // I know\n            var i;\n            for (i = 0; i < this.length; ++i) {\n                if (this[i] === o) {\n                    return i;\n                }\n            }\n            return -1;\n        };\n    }\n\n    function daysInMonth(year, month) {\n        if (isNaN(year) || isNaN(month)) {\n            return NaN;\n        }\n        var modMonth = mod(month, 12);\n        year += (month - modMonth) / 12;\n        return modMonth === 1\n            ? isLeapYear(year)\n                ? 29\n                : 28\n            : 31 - ((modMonth % 7) % 2);\n    }\n\n    // FORMATTING\n\n    addFormatToken('M', ['MM', 2], 'Mo', function () {\n        return this.month() + 1;\n    });\n\n    addFormatToken('MMM', 0, 0, function (format) {\n        return this.localeData().monthsShort(this, format);\n    });\n\n    addFormatToken('MMMM', 0, 0, function (format) {\n        return this.localeData().months(this, format);\n    });\n\n    // PARSING\n\n    addRegexToken('M', match1to2, match1to2NoLeadingZero);\n    addRegexToken('MM', match1to2, match2);\n    addRegexToken('MMM', function (isStrict, locale) {\n        return locale.monthsShortRegex(isStrict);\n    });\n    addRegexToken('MMMM', function (isStrict, locale) {\n        return locale.monthsRegex(isStrict);\n    });\n\n    addParseToken(['M', 'MM'], function (input, array) {\n        array[MONTH] = toInt(input) - 1;\n    });\n\n    addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n        var month = config._locale.monthsParse(input, token, config._strict);\n        // if we didn't find a month name, mark the date as invalid.\n        if (month != null) {\n            array[MONTH] = month;\n        } else {\n            getParsingFlags(config).invalidMonth = input;\n        }\n    });\n\n    // LOCALES\n\n    var defaultLocaleMonths =\n            'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n                '_'\n            ),\n        defaultLocaleMonthsShort =\n            'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n        MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n        defaultMonthsShortRegex = matchWord,\n        defaultMonthsRegex = matchWord;\n\n    function localeMonths(m, format) {\n        if (!m) {\n            return isArray(this._months)\n                ? this._months\n                : this._months['standalone'];\n        }\n        return isArray(this._months)\n            ? this._months[m.month()]\n            : this._months[\n                  (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n                      ? 'format'\n                      : 'standalone'\n              ][m.month()];\n    }\n\n    function localeMonthsShort(m, format) {\n        if (!m) {\n            return isArray(this._monthsShort)\n                ? this._monthsShort\n                : this._monthsShort['standalone'];\n        }\n        return isArray(this._monthsShort)\n            ? this._monthsShort[m.month()]\n            : this._monthsShort[\n                  MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n              ][m.month()];\n    }\n\n    function handleStrictParse(monthName, format, strict) {\n        var i,\n            ii,\n            mom,\n            llc = monthName.toLocaleLowerCase();\n        if (!this._monthsParse) {\n            // this is not used\n            this._monthsParse = [];\n            this._longMonthsParse = [];\n            this._shortMonthsParse = [];\n            for (i = 0; i < 12; ++i) {\n                mom = createUTC([2000, i]);\n                this._shortMonthsParse[i] = this.monthsShort(\n                    mom,\n                    ''\n                ).toLocaleLowerCase();\n                this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n            }\n        }\n\n        if (strict) {\n            if (format === 'MMM') {\n                ii = indexOf.call(this._shortMonthsParse, llc);\n                return ii !== -1 ? ii : null;\n            } else {\n                ii = indexOf.call(this._longMonthsParse, llc);\n                return ii !== -1 ? ii : null;\n            }\n        } else {\n            if (format === 'MMM') {\n                ii = indexOf.call(this._shortMonthsParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._longMonthsParse, llc);\n                return ii !== -1 ? ii : null;\n            } else {\n                ii = indexOf.call(this._longMonthsParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._shortMonthsParse, llc);\n                return ii !== -1 ? ii : null;\n            }\n        }\n    }\n\n    function localeMonthsParse(monthName, format, strict) {\n        var i, mom, regex;\n\n        if (this._monthsParseExact) {\n            return handleStrictParse.call(this, monthName, format, strict);\n        }\n\n        if (!this._monthsParse) {\n            this._monthsParse = [];\n            this._longMonthsParse = [];\n            this._shortMonthsParse = [];\n        }\n\n        // TODO: add sorting\n        // Sorting makes sure if one month (or abbr) is a prefix of another\n        // see sorting in computeMonthsParse\n        for (i = 0; i < 12; i++) {\n            // make the regex if we don't have it already\n            mom = createUTC([2000, i]);\n            if (strict && !this._longMonthsParse[i]) {\n                this._longMonthsParse[i] = new RegExp(\n                    '^' + this.months(mom, '').replace('.', '') + '$',\n                    'i'\n                );\n                this._shortMonthsParse[i] = new RegExp(\n                    '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n                    'i'\n                );\n            }\n            if (!strict && !this._monthsParse[i]) {\n                regex =\n                    '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n                this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n            }\n            // test the regex\n            if (\n                strict &&\n                format === 'MMMM' &&\n                this._longMonthsParse[i].test(monthName)\n            ) {\n                return i;\n            } else if (\n                strict &&\n                format === 'MMM' &&\n                this._shortMonthsParse[i].test(monthName)\n            ) {\n                return i;\n            } else if (!strict && this._monthsParse[i].test(monthName)) {\n                return i;\n            }\n        }\n    }\n\n    // MOMENTS\n\n    function setMonth(mom, value) {\n        if (!mom.isValid()) {\n            // No op\n            return mom;\n        }\n\n        if (typeof value === 'string') {\n            if (/^\\d+$/.test(value)) {\n                value = toInt(value);\n            } else {\n                value = mom.localeData().monthsParse(value);\n                // TODO: Another silent failure?\n                if (!isNumber(value)) {\n                    return mom;\n                }\n            }\n        }\n\n        var month = value,\n            date = mom.date();\n\n        date = date < 29 ? date : Math.min(date, daysInMonth(mom.year(), month));\n        void (mom._isUTC\n            ? mom._d.setUTCMonth(month, date)\n            : mom._d.setMonth(month, date));\n        return mom;\n    }\n\n    function getSetMonth(value) {\n        if (value != null) {\n            setMonth(this, value);\n            hooks.updateOffset(this, true);\n            return this;\n        } else {\n            return get(this, 'Month');\n        }\n    }\n\n    function getDaysInMonth() {\n        return daysInMonth(this.year(), this.month());\n    }\n\n    function monthsShortRegex(isStrict) {\n        if (this._monthsParseExact) {\n            if (!hasOwnProp(this, '_monthsRegex')) {\n                computeMonthsParse.call(this);\n            }\n            if (isStrict) {\n                return this._monthsShortStrictRegex;\n            } else {\n                return this._monthsShortRegex;\n            }\n        } else {\n            if (!hasOwnProp(this, '_monthsShortRegex')) {\n                this._monthsShortRegex = defaultMonthsShortRegex;\n            }\n            return this._monthsShortStrictRegex && isStrict\n                ? this._monthsShortStrictRegex\n                : this._monthsShortRegex;\n        }\n    }\n\n    function monthsRegex(isStrict) {\n        if (this._monthsParseExact) {\n            if (!hasOwnProp(this, '_monthsRegex')) {\n                computeMonthsParse.call(this);\n            }\n            if (isStrict) {\n                return this._monthsStrictRegex;\n            } else {\n                return this._monthsRegex;\n            }\n        } else {\n            if (!hasOwnProp(this, '_monthsRegex')) {\n                this._monthsRegex = defaultMonthsRegex;\n            }\n            return this._monthsStrictRegex && isStrict\n                ? this._monthsStrictRegex\n                : this._monthsRegex;\n        }\n    }\n\n    function computeMonthsParse() {\n        function cmpLenRev(a, b) {\n            return b.length - a.length;\n        }\n\n        var shortPieces = [],\n            longPieces = [],\n            mixedPieces = [],\n            i,\n            mom,\n            shortP,\n            longP;\n        for (i = 0; i < 12; i++) {\n            // make the regex if we don't have it already\n            mom = createUTC([2000, i]);\n            shortP = regexEscape(this.monthsShort(mom, ''));\n            longP = regexEscape(this.months(mom, ''));\n            shortPieces.push(shortP);\n            longPieces.push(longP);\n            mixedPieces.push(longP);\n            mixedPieces.push(shortP);\n        }\n        // Sorting makes sure if one month (or abbr) is a prefix of another it\n        // will match the longer piece.\n        shortPieces.sort(cmpLenRev);\n        longPieces.sort(cmpLenRev);\n        mixedPieces.sort(cmpLenRev);\n\n        this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n        this._monthsShortRegex = this._monthsRegex;\n        this._monthsStrictRegex = new RegExp(\n            '^(' + longPieces.join('|') + ')',\n            'i'\n        );\n        this._monthsShortStrictRegex = new RegExp(\n            '^(' + shortPieces.join('|') + ')',\n            'i'\n        );\n    }\n\n    function createDate(y, m, d, h, M, s, ms) {\n        // can't just apply() to create a date:\n        // https://stackoverflow.com/q/181348\n        var date;\n        // the date constructor remaps years 0-99 to 1900-1999\n        if (y < 100 && y >= 0) {\n            // preserve leap years using a full 400 year cycle, then reset\n            date = new Date(y + 400, m, d, h, M, s, ms);\n            if (isFinite(date.getFullYear())) {\n                date.setFullYear(y);\n            }\n        } else {\n            date = new Date(y, m, d, h, M, s, ms);\n        }\n\n        return date;\n    }\n\n    function createUTCDate(y) {\n        var date, args;\n        // the Date.UTC function remaps years 0-99 to 1900-1999\n        if (y < 100 && y >= 0) {\n            args = Array.prototype.slice.call(arguments);\n            // preserve leap years using a full 400 year cycle, then reset\n            args[0] = y + 400;\n            date = new Date(Date.UTC.apply(null, args));\n            if (isFinite(date.getUTCFullYear())) {\n                date.setUTCFullYear(y);\n            }\n        } else {\n            date = new Date(Date.UTC.apply(null, arguments));\n        }\n\n        return date;\n    }\n\n    // start-of-first-week - start-of-year\n    function firstWeekOffset(year, dow, doy) {\n        var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n            fwd = 7 + dow - doy,\n            // first-week day local weekday -- which local weekday is fwd\n            fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n        return -fwdlw + fwd - 1;\n    }\n\n    // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\n    function dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n        var localWeekday = (7 + weekday - dow) % 7,\n            weekOffset = firstWeekOffset(year, dow, doy),\n            dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n            resYear,\n            resDayOfYear;\n\n        if (dayOfYear <= 0) {\n            resYear = year - 1;\n            resDayOfYear = daysInYear(resYear) + dayOfYear;\n        } else if (dayOfYear > daysInYear(year)) {\n            resYear = year + 1;\n            resDayOfYear = dayOfYear - daysInYear(year);\n        } else {\n            resYear = year;\n            resDayOfYear = dayOfYear;\n        }\n\n        return {\n            year: resYear,\n            dayOfYear: resDayOfYear,\n        };\n    }\n\n    function weekOfYear(mom, dow, doy) {\n        var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n            week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n            resWeek,\n            resYear;\n\n        if (week < 1) {\n            resYear = mom.year() - 1;\n            resWeek = week + weeksInYear(resYear, dow, doy);\n        } else if (week > weeksInYear(mom.year(), dow, doy)) {\n            resWeek = week - weeksInYear(mom.year(), dow, doy);\n            resYear = mom.year() + 1;\n        } else {\n            resYear = mom.year();\n            resWeek = week;\n        }\n\n        return {\n            week: resWeek,\n            year: resYear,\n        };\n    }\n\n    function weeksInYear(year, dow, doy) {\n        var weekOffset = firstWeekOffset(year, dow, doy),\n            weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n        return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n    }\n\n    // FORMATTING\n\n    addFormatToken('w', ['ww', 2], 'wo', 'week');\n    addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n    // PARSING\n\n    addRegexToken('w', match1to2, match1to2NoLeadingZero);\n    addRegexToken('ww', match1to2, match2);\n    addRegexToken('W', match1to2, match1to2NoLeadingZero);\n    addRegexToken('WW', match1to2, match2);\n\n    addWeekParseToken(\n        ['w', 'ww', 'W', 'WW'],\n        function (input, week, config, token) {\n            week[token.substr(0, 1)] = toInt(input);\n        }\n    );\n\n    // HELPERS\n\n    // LOCALES\n\n    function localeWeek(mom) {\n        return weekOfYear(mom, this._week.dow, this._week.doy).week;\n    }\n\n    var defaultLocaleWeek = {\n        dow: 0, // Sunday is the first day of the week.\n        doy: 6, // The week that contains Jan 6th is the first week of the year.\n    };\n\n    function localeFirstDayOfWeek() {\n        return this._week.dow;\n    }\n\n    function localeFirstDayOfYear() {\n        return this._week.doy;\n    }\n\n    // MOMENTS\n\n    function getSetWeek(input) {\n        var week = this.localeData().week(this);\n        return input == null ? week : this.add((input - week) * 7, 'd');\n    }\n\n    function getSetISOWeek(input) {\n        var week = weekOfYear(this, 1, 4).week;\n        return input == null ? week : this.add((input - week) * 7, 'd');\n    }\n\n    // FORMATTING\n\n    addFormatToken('d', 0, 'do', 'day');\n\n    addFormatToken('dd', 0, 0, function (format) {\n        return this.localeData().weekdaysMin(this, format);\n    });\n\n    addFormatToken('ddd', 0, 0, function (format) {\n        return this.localeData().weekdaysShort(this, format);\n    });\n\n    addFormatToken('dddd', 0, 0, function (format) {\n        return this.localeData().weekdays(this, format);\n    });\n\n    addFormatToken('e', 0, 0, 'weekday');\n    addFormatToken('E', 0, 0, 'isoWeekday');\n\n    // PARSING\n\n    addRegexToken('d', match1to2);\n    addRegexToken('e', match1to2);\n    addRegexToken('E', match1to2);\n    addRegexToken('dd', function (isStrict, locale) {\n        return locale.weekdaysMinRegex(isStrict);\n    });\n    addRegexToken('ddd', function (isStrict, locale) {\n        return locale.weekdaysShortRegex(isStrict);\n    });\n    addRegexToken('dddd', function (isStrict, locale) {\n        return locale.weekdaysRegex(isStrict);\n    });\n\n    addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n        var weekday = config._locale.weekdaysParse(input, token, config._strict);\n        // if we didn't get a weekday name, mark the date as invalid\n        if (weekday != null) {\n            week.d = weekday;\n        } else {\n            getParsingFlags(config).invalidWeekday = input;\n        }\n    });\n\n    addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n        week[token] = toInt(input);\n    });\n\n    // HELPERS\n\n    function parseWeekday(input, locale) {\n        if (typeof input !== 'string') {\n            return input;\n        }\n\n        if (!isNaN(input)) {\n            return parseInt(input, 10);\n        }\n\n        input = locale.weekdaysParse(input);\n        if (typeof input === 'number') {\n            return input;\n        }\n\n        return null;\n    }\n\n    function parseIsoWeekday(input, locale) {\n        if (typeof input === 'string') {\n            return locale.weekdaysParse(input) % 7 || 7;\n        }\n        return isNaN(input) ? null : input;\n    }\n\n    // LOCALES\n    function shiftWeekdays(ws, n) {\n        return ws.slice(n, 7).concat(ws.slice(0, n));\n    }\n\n    var defaultLocaleWeekdays =\n            'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n        defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n        defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n        defaultWeekdaysRegex = matchWord,\n        defaultWeekdaysShortRegex = matchWord,\n        defaultWeekdaysMinRegex = matchWord;\n\n    function localeWeekdays(m, format) {\n        var weekdays = isArray(this._weekdays)\n            ? this._weekdays\n            : this._weekdays[\n                  m && m !== true && this._weekdays.isFormat.test(format)\n                      ? 'format'\n                      : 'standalone'\n              ];\n        return m === true\n            ? shiftWeekdays(weekdays, this._week.dow)\n            : m\n              ? weekdays[m.day()]\n              : weekdays;\n    }\n\n    function localeWeekdaysShort(m) {\n        return m === true\n            ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n            : m\n              ? this._weekdaysShort[m.day()]\n              : this._weekdaysShort;\n    }\n\n    function localeWeekdaysMin(m) {\n        return m === true\n            ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n            : m\n              ? this._weekdaysMin[m.day()]\n              : this._weekdaysMin;\n    }\n\n    function handleStrictParse$1(weekdayName, format, strict) {\n        var i,\n            ii,\n            mom,\n            llc = weekdayName.toLocaleLowerCase();\n        if (!this._weekdaysParse) {\n            this._weekdaysParse = [];\n            this._shortWeekdaysParse = [];\n            this._minWeekdaysParse = [];\n\n            for (i = 0; i < 7; ++i) {\n                mom = createUTC([2000, 1]).day(i);\n                this._minWeekdaysParse[i] = this.weekdaysMin(\n                    mom,\n                    ''\n                ).toLocaleLowerCase();\n                this._shortWeekdaysParse[i] = this.weekdaysShort(\n                    mom,\n                    ''\n                ).toLocaleLowerCase();\n                this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n            }\n        }\n\n        if (strict) {\n            if (format === 'dddd') {\n                ii = indexOf.call(this._weekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            } else if (format === 'ddd') {\n                ii = indexOf.call(this._shortWeekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            } else {\n                ii = indexOf.call(this._minWeekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            }\n        } else {\n            if (format === 'dddd') {\n                ii = indexOf.call(this._weekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._shortWeekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._minWeekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            } else if (format === 'ddd') {\n                ii = indexOf.call(this._shortWeekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._weekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._minWeekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            } else {\n                ii = indexOf.call(this._minWeekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._weekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._shortWeekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            }\n        }\n    }\n\n    function localeWeekdaysParse(weekdayName, format, strict) {\n        var i, mom, regex;\n\n        if (this._weekdaysParseExact) {\n            return handleStrictParse$1.call(this, weekdayName, format, strict);\n        }\n\n        if (!this._weekdaysParse) {\n            this._weekdaysParse = [];\n            this._minWeekdaysParse = [];\n            this._shortWeekdaysParse = [];\n            this._fullWeekdaysParse = [];\n        }\n\n        for (i = 0; i < 7; i++) {\n            // make the regex if we don't have it already\n\n            mom = createUTC([2000, 1]).day(i);\n            if (strict && !this._fullWeekdaysParse[i]) {\n                this._fullWeekdaysParse[i] = new RegExp(\n                    '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n                    'i'\n                );\n                this._shortWeekdaysParse[i] = new RegExp(\n                    '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n                    'i'\n                );\n                this._minWeekdaysParse[i] = new RegExp(\n                    '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n                    'i'\n                );\n            }\n            if (!this._weekdaysParse[i]) {\n                regex =\n                    '^' +\n                    this.weekdays(mom, '') +\n                    '|^' +\n                    this.weekdaysShort(mom, '') +\n                    '|^' +\n                    this.weekdaysMin(mom, '');\n                this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n            }\n            // test the regex\n            if (\n                strict &&\n                format === 'dddd' &&\n                this._fullWeekdaysParse[i].test(weekdayName)\n            ) {\n                return i;\n            } else if (\n                strict &&\n                format === 'ddd' &&\n                this._shortWeekdaysParse[i].test(weekdayName)\n            ) {\n                return i;\n            } else if (\n                strict &&\n                format === 'dd' &&\n                this._minWeekdaysParse[i].test(weekdayName)\n            ) {\n                return i;\n            } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n                return i;\n            }\n        }\n    }\n\n    // MOMENTS\n\n    function getSetDayOfWeek(input) {\n        if (!this.isValid()) {\n            return input != null ? this : NaN;\n        }\n\n        var day = get(this, 'Day');\n        if (input != null) {\n            input = parseWeekday(input, this.localeData());\n            return this.add(input - day, 'd');\n        } else {\n            return day;\n        }\n    }\n\n    function getSetLocaleDayOfWeek(input) {\n        if (!this.isValid()) {\n            return input != null ? this : NaN;\n        }\n        var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n        return input == null ? weekday : this.add(input - weekday, 'd');\n    }\n\n    function getSetISODayOfWeek(input) {\n        if (!this.isValid()) {\n            return input != null ? this : NaN;\n        }\n\n        // behaves the same as moment#day except\n        // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n        // as a setter, sunday should belong to the previous week.\n\n        if (input != null) {\n            var weekday = parseIsoWeekday(input, this.localeData());\n            return this.day(this.day() % 7 ? weekday : weekday - 7);\n        } else {\n            return this.day() || 7;\n        }\n    }\n\n    function weekdaysRegex(isStrict) {\n        if (this._weekdaysParseExact) {\n            if (!hasOwnProp(this, '_weekdaysRegex')) {\n                computeWeekdaysParse.call(this);\n            }\n            if (isStrict) {\n                return this._weekdaysStrictRegex;\n            } else {\n                return this._weekdaysRegex;\n            }\n        } else {\n            if (!hasOwnProp(this, '_weekdaysRegex')) {\n                this._weekdaysRegex = defaultWeekdaysRegex;\n            }\n            return this._weekdaysStrictRegex && isStrict\n                ? this._weekdaysStrictRegex\n                : this._weekdaysRegex;\n        }\n    }\n\n    function weekdaysShortRegex(isStrict) {\n        if (this._weekdaysParseExact) {\n            if (!hasOwnProp(this, '_weekdaysRegex')) {\n                computeWeekdaysParse.call(this);\n            }\n            if (isStrict) {\n                return this._weekdaysShortStrictRegex;\n            } else {\n                return this._weekdaysShortRegex;\n            }\n        } else {\n            if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n                this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n            }\n            return this._weekdaysShortStrictRegex && isStrict\n                ? this._weekdaysShortStrictRegex\n                : this._weekdaysShortRegex;\n        }\n    }\n\n    function weekdaysMinRegex(isStrict) {\n        if (this._weekdaysParseExact) {\n            if (!hasOwnProp(this, '_weekdaysRegex')) {\n                computeWeekdaysParse.call(this);\n            }\n            if (isStrict) {\n                return this._weekdaysMinStrictRegex;\n            } else {\n                return this._weekdaysMinRegex;\n            }\n        } else {\n            if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n                this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n            }\n            return this._weekdaysMinStrictRegex && isStrict\n                ? this._weekdaysMinStrictRegex\n                : this._weekdaysMinRegex;\n        }\n    }\n\n    function computeWeekdaysParse() {\n        function cmpLenRev(a, b) {\n            return b.length - a.length;\n        }\n\n        var minPieces = [],\n            shortPieces = [],\n            longPieces = [],\n            mixedPieces = [],\n            i,\n            mom,\n            minp,\n            shortp,\n            longp;\n        for (i = 0; i < 7; i++) {\n            // make the regex if we don't have it already\n            mom = createUTC([2000, 1]).day(i);\n            minp = regexEscape(this.weekdaysMin(mom, ''));\n            shortp = regexEscape(this.weekdaysShort(mom, ''));\n            longp = regexEscape(this.weekdays(mom, ''));\n            minPieces.push(minp);\n            shortPieces.push(shortp);\n            longPieces.push(longp);\n            mixedPieces.push(minp);\n            mixedPieces.push(shortp);\n            mixedPieces.push(longp);\n        }\n        // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n        // will match the longer piece.\n        minPieces.sort(cmpLenRev);\n        shortPieces.sort(cmpLenRev);\n        longPieces.sort(cmpLenRev);\n        mixedPieces.sort(cmpLenRev);\n\n        this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n        this._weekdaysShortRegex = this._weekdaysRegex;\n        this._weekdaysMinRegex = this._weekdaysRegex;\n\n        this._weekdaysStrictRegex = new RegExp(\n            '^(' + longPieces.join('|') + ')',\n            'i'\n        );\n        this._weekdaysShortStrictRegex = new RegExp(\n            '^(' + shortPieces.join('|') + ')',\n            'i'\n        );\n        this._weekdaysMinStrictRegex = new RegExp(\n            '^(' + minPieces.join('|') + ')',\n            'i'\n        );\n    }\n\n    // FORMATTING\n\n    function hFormat() {\n        return this.hours() % 12 || 12;\n    }\n\n    function kFormat() {\n        return this.hours() || 24;\n    }\n\n    addFormatToken('H', ['HH', 2], 0, 'hour');\n    addFormatToken('h', ['hh', 2], 0, hFormat);\n    addFormatToken('k', ['kk', 2], 0, kFormat);\n\n    addFormatToken('hmm', 0, 0, function () {\n        return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n    });\n\n    addFormatToken('hmmss', 0, 0, function () {\n        return (\n            '' +\n            hFormat.apply(this) +\n            zeroFill(this.minutes(), 2) +\n            zeroFill(this.seconds(), 2)\n        );\n    });\n\n    addFormatToken('Hmm', 0, 0, function () {\n        return '' + this.hours() + zeroFill(this.minutes(), 2);\n    });\n\n    addFormatToken('Hmmss', 0, 0, function () {\n        return (\n            '' +\n            this.hours() +\n            zeroFill(this.minutes(), 2) +\n            zeroFill(this.seconds(), 2)\n        );\n    });\n\n    function meridiem(token, lowercase) {\n        addFormatToken(token, 0, 0, function () {\n            return this.localeData().meridiem(\n                this.hours(),\n                this.minutes(),\n                lowercase\n            );\n        });\n    }\n\n    meridiem('a', true);\n    meridiem('A', false);\n\n    // PARSING\n\n    function matchMeridiem(isStrict, locale) {\n        return locale._meridiemParse;\n    }\n\n    addRegexToken('a', matchMeridiem);\n    addRegexToken('A', matchMeridiem);\n    addRegexToken('H', match1to2, match1to2HasZero);\n    addRegexToken('h', match1to2, match1to2NoLeadingZero);\n    addRegexToken('k', match1to2, match1to2NoLeadingZero);\n    addRegexToken('HH', match1to2, match2);\n    addRegexToken('hh', match1to2, match2);\n    addRegexToken('kk', match1to2, match2);\n\n    addRegexToken('hmm', match3to4);\n    addRegexToken('hmmss', match5to6);\n    addRegexToken('Hmm', match3to4);\n    addRegexToken('Hmmss', match5to6);\n\n    addParseToken(['H', 'HH'], HOUR);\n    addParseToken(['k', 'kk'], function (input, array, config) {\n        var kInput = toInt(input);\n        array[HOUR] = kInput === 24 ? 0 : kInput;\n    });\n    addParseToken(['a', 'A'], function (input, array, config) {\n        config._isPm = config._locale.isPM(input);\n        config._meridiem = input;\n    });\n    addParseToken(['h', 'hh'], function (input, array, config) {\n        array[HOUR] = toInt(input);\n        getParsingFlags(config).bigHour = true;\n    });\n    addParseToken('hmm', function (input, array, config) {\n        var pos = input.length - 2;\n        array[HOUR] = toInt(input.substr(0, pos));\n        array[MINUTE] = toInt(input.substr(pos));\n        getParsingFlags(config).bigHour = true;\n    });\n    addParseToken('hmmss', function (input, array, config) {\n        var pos1 = input.length - 4,\n            pos2 = input.length - 2;\n        array[HOUR] = toInt(input.substr(0, pos1));\n        array[MINUTE] = toInt(input.substr(pos1, 2));\n        array[SECOND] = toInt(input.substr(pos2));\n        getParsingFlags(config).bigHour = true;\n    });\n    addParseToken('Hmm', function (input, array, config) {\n        var pos = input.length - 2;\n        array[HOUR] = toInt(input.substr(0, pos));\n        array[MINUTE] = toInt(input.substr(pos));\n    });\n    addParseToken('Hmmss', function (input, array, config) {\n        var pos1 = input.length - 4,\n            pos2 = input.length - 2;\n        array[HOUR] = toInt(input.substr(0, pos1));\n        array[MINUTE] = toInt(input.substr(pos1, 2));\n        array[SECOND] = toInt(input.substr(pos2));\n    });\n\n    // LOCALES\n\n    function localeIsPM(input) {\n        // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n        // Using charAt should be more compatible.\n        return (input + '').toLowerCase().charAt(0) === 'p';\n    }\n\n    var defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n        // Setting the hour should keep the time, because the user explicitly\n        // specified which hour they want. So trying to maintain the same hour (in\n        // a new timezone) makes sense. Adding/subtracting hours does not follow\n        // this rule.\n        getSetHour = makeGetSet('Hours', true);\n\n    function localeMeridiem(hours, minutes, isLower) {\n        if (hours > 11) {\n            return isLower ? 'pm' : 'PM';\n        } else {\n            return isLower ? 'am' : 'AM';\n        }\n    }\n\n    var baseConfig = {\n        calendar: defaultCalendar,\n        longDateFormat: defaultLongDateFormat,\n        invalidDate: defaultInvalidDate,\n        ordinal: defaultOrdinal,\n        dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n        relativeTime: defaultRelativeTime,\n\n        months: defaultLocaleMonths,\n        monthsShort: defaultLocaleMonthsShort,\n\n        week: defaultLocaleWeek,\n\n        weekdays: defaultLocaleWeekdays,\n        weekdaysMin: defaultLocaleWeekdaysMin,\n        weekdaysShort: defaultLocaleWeekdaysShort,\n\n        meridiemParse: defaultLocaleMeridiemParse,\n    };\n\n    // internal storage for locale config files\n    var locales = {},\n        localeFamilies = {},\n        globalLocale;\n\n    function commonPrefix(arr1, arr2) {\n        var i,\n            minl = Math.min(arr1.length, arr2.length);\n        for (i = 0; i < minl; i += 1) {\n            if (arr1[i] !== arr2[i]) {\n                return i;\n            }\n        }\n        return minl;\n    }\n\n    function normalizeLocale(key) {\n        return key ? key.toLowerCase().replace('_', '-') : key;\n    }\n\n    // pick the locale from the array\n    // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n    // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\n    function chooseLocale(names) {\n        var i = 0,\n            j,\n            next,\n            locale,\n            split;\n\n        while (i < names.length) {\n            split = normalizeLocale(names[i]).split('-');\n            j = split.length;\n            next = normalizeLocale(names[i + 1]);\n            next = next ? next.split('-') : null;\n            while (j > 0) {\n                locale = loadLocale(split.slice(0, j).join('-'));\n                if (locale) {\n                    return locale;\n                }\n                if (\n                    next &&\n                    next.length >= j &&\n                    commonPrefix(split, next) >= j - 1\n                ) {\n                    //the next array item is better than a shallower substring of this one\n                    break;\n                }\n                j--;\n            }\n            i++;\n        }\n        return globalLocale;\n    }\n\n    function isLocaleNameSane(name) {\n        // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n        // Ensure name is available and function returns boolean\n        return !!(name && name.match('^[^/\\\\\\\\]*$'));\n    }\n\n    function loadLocale(name) {\n        var oldLocale = null,\n            aliasedRequire;\n        // TODO: Find a better way to register and load all the locales in Node\n        if (\n            locales[name] === undefined &&\n            typeof module !== 'undefined' &&\n            module &&\n            module.exports &&\n            isLocaleNameSane(name)\n        ) {\n            try {\n                oldLocale = globalLocale._abbr;\n                aliasedRequire = require;\n                aliasedRequire('./locale/' + name);\n                getSetGlobalLocale(oldLocale);\n            } catch (e) {\n                // mark as not found to avoid repeating expensive file require call causing high CPU\n                // when trying to find en-US, en_US, en-us for every format call\n                locales[name] = null; // null means not found\n            }\n        }\n        return locales[name];\n    }\n\n    // This function will load locale and then set the global locale.  If\n    // no arguments are passed in, it will simply return the current global\n    // locale key.\n    function getSetGlobalLocale(key, values) {\n        var data;\n        if (key) {\n            if (isUndefined(values)) {\n                data = getLocale(key);\n            } else {\n                data = defineLocale(key, values);\n            }\n\n            if (data) {\n                // moment.duration._locale = moment._locale = data;\n                globalLocale = data;\n            } else {\n                if (typeof console !== 'undefined' && console.warn) {\n                    //warn user if arguments are passed but the locale could not be set\n                    console.warn(\n                        'Locale ' + key + ' not found. Did you forget to load it?'\n                    );\n                }\n            }\n        }\n\n        return globalLocale._abbr;\n    }\n\n    function defineLocale(name, config) {\n        if (config !== null) {\n            var locale,\n                parentConfig = baseConfig;\n            config.abbr = name;\n            if (locales[name] != null) {\n                deprecateSimple(\n                    'defineLocaleOverride',\n                    'use moment.updateLocale(localeName, config) to change ' +\n                        'an existing locale. moment.defineLocale(localeName, ' +\n                        'config) should only be used for creating a new locale ' +\n                        'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n                );\n                parentConfig = locales[name]._config;\n            } else if (config.parentLocale != null) {\n                if (locales[config.parentLocale] != null) {\n                    parentConfig = locales[config.parentLocale]._config;\n                } else {\n                    locale = loadLocale(config.parentLocale);\n                    if (locale != null) {\n                        parentConfig = locale._config;\n                    } else {\n                        if (!localeFamilies[config.parentLocale]) {\n                            localeFamilies[config.parentLocale] = [];\n                        }\n                        localeFamilies[config.parentLocale].push({\n                            name: name,\n                            config: config,\n                        });\n                        return null;\n                    }\n                }\n            }\n            locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n            if (localeFamilies[name]) {\n                localeFamilies[name].forEach(function (x) {\n                    defineLocale(x.name, x.config);\n                });\n            }\n\n            // backwards compat for now: also set the locale\n            // make sure we set the locale AFTER all child locales have been\n            // created, so we won't end up with the child locale set.\n            getSetGlobalLocale(name);\n\n            return locales[name];\n        } else {\n            // useful for testing\n            delete locales[name];\n            return null;\n        }\n    }\n\n    function updateLocale(name, config) {\n        if (config != null) {\n            var locale,\n                tmpLocale,\n                parentConfig = baseConfig;\n\n            if (locales[name] != null && locales[name].parentLocale != null) {\n                // Update existing child locale in-place to avoid memory-leaks\n                locales[name].set(mergeConfigs(locales[name]._config, config));\n            } else {\n                // MERGE\n                tmpLocale = loadLocale(name);\n                if (tmpLocale != null) {\n                    parentConfig = tmpLocale._config;\n                }\n                config = mergeConfigs(parentConfig, config);\n                if (tmpLocale == null) {\n                    // updateLocale is called for creating a new locale\n                    // Set abbr so it will have a name (getters return\n                    // undefined otherwise).\n                    config.abbr = name;\n                }\n                locale = new Locale(config);\n                locale.parentLocale = locales[name];\n                locales[name] = locale;\n            }\n\n            // backwards compat for now: also set the locale\n            getSetGlobalLocale(name);\n        } else {\n            // pass null for config to unupdate, useful for tests\n            if (locales[name] != null) {\n                if (locales[name].parentLocale != null) {\n                    locales[name] = locales[name].parentLocale;\n                    if (name === getSetGlobalLocale()) {\n                        getSetGlobalLocale(name);\n                    }\n                } else if (locales[name] != null) {\n                    delete locales[name];\n                }\n            }\n        }\n        return locales[name];\n    }\n\n    // returns locale data\n    function getLocale(key) {\n        var locale;\n\n        if (key && key._locale && key._locale._abbr) {\n            key = key._locale._abbr;\n        }\n\n        if (!key) {\n            return globalLocale;\n        }\n\n        if (!isArray(key)) {\n            //short-circuit everything else\n            locale = loadLocale(key);\n            if (locale) {\n                return locale;\n            }\n            key = [key];\n        }\n\n        return chooseLocale(key);\n    }\n\n    function listLocales() {\n        return keys(locales);\n    }\n\n    function checkOverflow(m) {\n        var overflow,\n            a = m._a;\n\n        if (a && getParsingFlags(m).overflow === -2) {\n            overflow =\n                a[MONTH] < 0 || a[MONTH] > 11\n                    ? MONTH\n                    : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n                      ? DATE\n                      : a[HOUR] < 0 ||\n                          a[HOUR] > 24 ||\n                          (a[HOUR] === 24 &&\n                              (a[MINUTE] !== 0 ||\n                                  a[SECOND] !== 0 ||\n                                  a[MILLISECOND] !== 0))\n                        ? HOUR\n                        : a[MINUTE] < 0 || a[MINUTE] > 59\n                          ? MINUTE\n                          : a[SECOND] < 0 || a[SECOND] > 59\n                            ? SECOND\n                            : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n                              ? MILLISECOND\n                              : -1;\n\n            if (\n                getParsingFlags(m)._overflowDayOfYear &&\n                (overflow < YEAR || overflow > DATE)\n            ) {\n                overflow = DATE;\n            }\n            if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n                overflow = WEEK;\n            }\n            if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n                overflow = WEEKDAY;\n            }\n\n            getParsingFlags(m).overflow = overflow;\n        }\n\n        return m;\n    }\n\n    // iso 8601 regex\n    // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\n    var extendedIsoRegex =\n            /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n        basicIsoRegex =\n            /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n        tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n        isoDates = [\n            ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n            ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n            ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n            ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n            ['YYYY-DDD', /\\d{4}-\\d{3}/],\n            ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n            ['YYYYYYMMDD', /[+-]\\d{10}/],\n            ['YYYYMMDD', /\\d{8}/],\n            ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n            ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n            ['YYYYDDD', /\\d{7}/],\n            ['YYYYMM', /\\d{6}/, false],\n            ['YYYY', /\\d{4}/, false],\n        ],\n        // iso time formats and regexes\n        isoTimes = [\n            ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n            ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n            ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n            ['HH:mm', /\\d\\d:\\d\\d/],\n            ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n            ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n            ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n            ['HHmm', /\\d\\d\\d\\d/],\n            ['HH', /\\d\\d/],\n        ],\n        aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n        // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n        rfc2822 =\n            /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n        obsOffsets = {\n            UT: 0,\n            GMT: 0,\n            EDT: -4 * 60,\n            EST: -5 * 60,\n            CDT: -5 * 60,\n            CST: -6 * 60,\n            MDT: -6 * 60,\n            MST: -7 * 60,\n            PDT: -7 * 60,\n            PST: -8 * 60,\n        };\n\n    // date from iso format\n    function configFromISO(config) {\n        var i,\n            l,\n            string = config._i,\n            match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n            allowTime,\n            dateFormat,\n            timeFormat,\n            tzFormat,\n            isoDatesLen = isoDates.length,\n            isoTimesLen = isoTimes.length;\n\n        if (match) {\n            getParsingFlags(config).iso = true;\n            for (i = 0, l = isoDatesLen; i < l; i++) {\n                if (isoDates[i][1].exec(match[1])) {\n                    dateFormat = isoDates[i][0];\n                    allowTime = isoDates[i][2] !== false;\n                    break;\n                }\n            }\n            if (dateFormat == null) {\n                config._isValid = false;\n                return;\n            }\n            if (match[3]) {\n                for (i = 0, l = isoTimesLen; i < l; i++) {\n                    if (isoTimes[i][1].exec(match[3])) {\n                        // match[2] should be 'T' or space\n                        timeFormat = (match[2] || ' ') + isoTimes[i][0];\n                        break;\n                    }\n                }\n                if (timeFormat == null) {\n                    config._isValid = false;\n                    return;\n                }\n            }\n            if (!allowTime && timeFormat != null) {\n                config._isValid = false;\n                return;\n            }\n            if (match[4]) {\n                if (tzRegex.exec(match[4])) {\n                    tzFormat = 'Z';\n                } else {\n                    config._isValid = false;\n                    return;\n                }\n            }\n            config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n            configFromStringAndFormat(config);\n        } else {\n            config._isValid = false;\n        }\n    }\n\n    function extractFromRFC2822Strings(\n        yearStr,\n        monthStr,\n        dayStr,\n        hourStr,\n        minuteStr,\n        secondStr\n    ) {\n        var result = [\n            untruncateYear(yearStr),\n            defaultLocaleMonthsShort.indexOf(monthStr),\n            parseInt(dayStr, 10),\n            parseInt(hourStr, 10),\n            parseInt(minuteStr, 10),\n        ];\n\n        if (secondStr) {\n            result.push(parseInt(secondStr, 10));\n        }\n\n        return result;\n    }\n\n    function untruncateYear(yearStr) {\n        var year = parseInt(yearStr, 10);\n        if (year <= 49) {\n            return 2000 + year;\n        } else if (year <= 999) {\n            return 1900 + year;\n        }\n        return year;\n    }\n\n    function preprocessRFC2822(s) {\n        // Remove comments and folding whitespace and replace multiple-spaces with a single space\n        return s\n            .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n            .replace(/(\\s\\s+)/g, ' ')\n            .replace(/^\\s\\s*/, '')\n            .replace(/\\s\\s*$/, '');\n    }\n\n    function checkWeekday(weekdayStr, parsedInput, config) {\n        if (weekdayStr) {\n            // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n            var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n                weekdayActual = new Date(\n                    parsedInput[0],\n                    parsedInput[1],\n                    parsedInput[2]\n                ).getDay();\n            if (weekdayProvided !== weekdayActual) {\n                getParsingFlags(config).weekdayMismatch = true;\n                config._isValid = false;\n                return false;\n            }\n        }\n        return true;\n    }\n\n    function calculateOffset(obsOffset, militaryOffset, numOffset) {\n        if (obsOffset) {\n            return obsOffsets[obsOffset];\n        } else if (militaryOffset) {\n            // the only allowed military tz is Z\n            return 0;\n        } else {\n            var hm = parseInt(numOffset, 10),\n                m = hm % 100,\n                h = (hm - m) / 100;\n            return h * 60 + m;\n        }\n    }\n\n    // date and time from ref 2822 format\n    function configFromRFC2822(config) {\n        var match = rfc2822.exec(preprocessRFC2822(config._i)),\n            parsedArray;\n        if (match) {\n            parsedArray = extractFromRFC2822Strings(\n                match[4],\n                match[3],\n                match[2],\n                match[5],\n                match[6],\n                match[7]\n            );\n            if (!checkWeekday(match[1], parsedArray, config)) {\n                return;\n            }\n\n            config._a = parsedArray;\n            config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n            config._d = createUTCDate.apply(null, config._a);\n            config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n            getParsingFlags(config).rfc2822 = true;\n        } else {\n            config._isValid = false;\n        }\n    }\n\n    // date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\n    function configFromString(config) {\n        var matched = aspNetJsonRegex.exec(config._i);\n        if (matched !== null) {\n            config._d = new Date(+matched[1]);\n            return;\n        }\n\n        configFromISO(config);\n        if (config._isValid === false) {\n            delete config._isValid;\n        } else {\n            return;\n        }\n\n        configFromRFC2822(config);\n        if (config._isValid === false) {\n            delete config._isValid;\n        } else {\n            return;\n        }\n\n        if (config._strict) {\n            config._isValid = false;\n        } else {\n            // Final attempt, use Input Fallback\n            hooks.createFromInputFallback(config);\n        }\n    }\n\n    hooks.createFromInputFallback = deprecate(\n        'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n            'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n            'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n        function (config) {\n            config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n        }\n    );\n\n    // Pick the first defined of two or three arguments.\n    function defaults(a, b, c) {\n        if (a != null) {\n            return a;\n        }\n        if (b != null) {\n            return b;\n        }\n        return c;\n    }\n\n    function currentDateArray(config) {\n        // hooks is actually the exported moment object\n        var nowValue = new Date(hooks.now());\n        if (config._useUTC) {\n            return [\n                nowValue.getUTCFullYear(),\n                nowValue.getUTCMonth(),\n                nowValue.getUTCDate(),\n            ];\n        }\n        return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n    }\n\n    // convert an array to a date.\n    // the array should mirror the parameters below\n    // note: all values past the year are optional and will default to the lowest possible value.\n    // [year, month, day , hour, minute, second, millisecond]\n    function configFromArray(config) {\n        var i,\n            date,\n            input = [],\n            currentDate,\n            expectedWeekday,\n            yearToUse;\n\n        if (config._d) {\n            return;\n        }\n\n        currentDate = currentDateArray(config);\n\n        //compute day of the year from weeks and weekdays\n        if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n            dayOfYearFromWeekInfo(config);\n        }\n\n        //if the day of the year is set, figure out what it is\n        if (config._dayOfYear != null) {\n            yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n            if (\n                config._dayOfYear > daysInYear(yearToUse) ||\n                config._dayOfYear === 0\n            ) {\n                getParsingFlags(config)._overflowDayOfYear = true;\n            }\n\n            date = createUTCDate(yearToUse, 0, config._dayOfYear);\n            config._a[MONTH] = date.getUTCMonth();\n            config._a[DATE] = date.getUTCDate();\n        }\n\n        // Default to current date.\n        // * if no year, month, day of month are given, default to today\n        // * if day of month is given, default month and year\n        // * if month is given, default only year\n        // * if year is given, don't default anything\n        for (i = 0; i < 3 && config._a[i] == null; ++i) {\n            config._a[i] = input[i] = currentDate[i];\n        }\n\n        // Zero out whatever was not defaulted, including time\n        for (; i < 7; i++) {\n            config._a[i] = input[i] =\n                config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n        }\n\n        // Check for 24:00:00.000\n        if (\n            config._a[HOUR] === 24 &&\n            config._a[MINUTE] === 0 &&\n            config._a[SECOND] === 0 &&\n            config._a[MILLISECOND] === 0\n        ) {\n            config._nextDay = true;\n            config._a[HOUR] = 0;\n        }\n\n        config._d = (config._useUTC ? createUTCDate : createDate).apply(\n            null,\n            input\n        );\n        expectedWeekday = config._useUTC\n            ? config._d.getUTCDay()\n            : config._d.getDay();\n\n        // Apply timezone offset from input. The actual utcOffset can be changed\n        // with parseZone.\n        if (config._tzm != null) {\n            config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n        }\n\n        if (config._nextDay) {\n            config._a[HOUR] = 24;\n        }\n\n        // check for mismatching day of week\n        if (\n            config._w &&\n            typeof config._w.d !== 'undefined' &&\n            config._w.d !== expectedWeekday\n        ) {\n            getParsingFlags(config).weekdayMismatch = true;\n        }\n    }\n\n    function dayOfYearFromWeekInfo(config) {\n        var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n        w = config._w;\n        if (w.GG != null || w.W != null || w.E != null) {\n            dow = 1;\n            doy = 4;\n\n            // TODO: We need to take the current isoWeekYear, but that depends on\n            // how we interpret now (local, utc, fixed offset). So create\n            // a now version of current config (take local/utc/offset flags, and\n            // create now).\n            weekYear = defaults(\n                w.GG,\n                config._a[YEAR],\n                weekOfYear(createLocal(), 1, 4).year\n            );\n            week = defaults(w.W, 1);\n            weekday = defaults(w.E, 1);\n            if (weekday < 1 || weekday > 7) {\n                weekdayOverflow = true;\n            }\n        } else {\n            dow = config._locale._week.dow;\n            doy = config._locale._week.doy;\n\n            curWeek = weekOfYear(createLocal(), dow, doy);\n\n            weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n            // Default to current week.\n            week = defaults(w.w, curWeek.week);\n\n            if (w.d != null) {\n                // weekday -- low day numbers are considered next week\n                weekday = w.d;\n                if (weekday < 0 || weekday > 6) {\n                    weekdayOverflow = true;\n                }\n            } else if (w.e != null) {\n                // local weekday -- counting starts from beginning of week\n                weekday = w.e + dow;\n                if (w.e < 0 || w.e > 6) {\n                    weekdayOverflow = true;\n                }\n            } else {\n                // default to beginning of week\n                weekday = dow;\n            }\n        }\n        if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n            getParsingFlags(config)._overflowWeeks = true;\n        } else if (weekdayOverflow != null) {\n            getParsingFlags(config)._overflowWeekday = true;\n        } else {\n            temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n            config._a[YEAR] = temp.year;\n            config._dayOfYear = temp.dayOfYear;\n        }\n    }\n\n    // constant that refers to the ISO standard\n    hooks.ISO_8601 = function () {};\n\n    // constant that refers to the RFC 2822 form\n    hooks.RFC_2822 = function () {};\n\n    // date from string and format string\n    function configFromStringAndFormat(config) {\n        // TODO: Move this to another part of the creation flow to prevent circular deps\n        if (config._f === hooks.ISO_8601) {\n            configFromISO(config);\n            return;\n        }\n        if (config._f === hooks.RFC_2822) {\n            configFromRFC2822(config);\n            return;\n        }\n        config._a = [];\n        getParsingFlags(config).empty = true;\n\n        // This array is used to make a Date, either with `new Date` or `Date.UTC`\n        var string = '' + config._i,\n            i,\n            parsedInput,\n            tokens,\n            token,\n            skipped,\n            stringLength = string.length,\n            totalParsedInputLength = 0,\n            era,\n            tokenLen;\n\n        tokens =\n            expandFormat(config._f, config._locale).match(formattingTokens) || [];\n        tokenLen = tokens.length;\n        for (i = 0; i < tokenLen; i++) {\n            token = tokens[i];\n            parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n                [])[0];\n            if (parsedInput) {\n                skipped = string.substr(0, string.indexOf(parsedInput));\n                if (skipped.length > 0) {\n                    getParsingFlags(config).unusedInput.push(skipped);\n                }\n                string = string.slice(\n                    string.indexOf(parsedInput) + parsedInput.length\n                );\n                totalParsedInputLength += parsedInput.length;\n            }\n            // don't parse if it's not a known token\n            if (formatTokenFunctions[token]) {\n                if (parsedInput) {\n                    getParsingFlags(config).empty = false;\n                } else {\n                    getParsingFlags(config).unusedTokens.push(token);\n                }\n                addTimeToArrayFromToken(token, parsedInput, config);\n            } else if (config._strict && !parsedInput) {\n                getParsingFlags(config).unusedTokens.push(token);\n            }\n        }\n\n        // add remaining unparsed input length to the string\n        getParsingFlags(config).charsLeftOver =\n            stringLength - totalParsedInputLength;\n        if (string.length > 0) {\n            getParsingFlags(config).unusedInput.push(string);\n        }\n\n        // clear _12h flag if hour is <= 12\n        if (\n            config._a[HOUR] <= 12 &&\n            getParsingFlags(config).bigHour === true &&\n            config._a[HOUR] > 0\n        ) {\n            getParsingFlags(config).bigHour = undefined;\n        }\n\n        getParsingFlags(config).parsedDateParts = config._a.slice(0);\n        getParsingFlags(config).meridiem = config._meridiem;\n        // handle meridiem\n        config._a[HOUR] = meridiemFixWrap(\n            config._locale,\n            config._a[HOUR],\n            config._meridiem\n        );\n\n        // handle era\n        era = getParsingFlags(config).era;\n        if (era !== null) {\n            config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n        }\n\n        configFromArray(config);\n        checkOverflow(config);\n    }\n\n    function meridiemFixWrap(locale, hour, meridiem) {\n        var isPm;\n\n        if (meridiem == null) {\n            // nothing to do\n            return hour;\n        }\n        if (locale.meridiemHour != null) {\n            return locale.meridiemHour(hour, meridiem);\n        } else if (locale.isPM != null) {\n            // Fallback\n            isPm = locale.isPM(meridiem);\n            if (isPm && hour < 12) {\n                hour += 12;\n            }\n            if (!isPm && hour === 12) {\n                hour = 0;\n            }\n            return hour;\n        } else {\n            // this is not supposed to happen\n            return hour;\n        }\n    }\n\n    // date from string and array of format strings\n    function configFromStringAndArray(config) {\n        var tempConfig,\n            bestMoment,\n            scoreToBeat,\n            i,\n            currentScore,\n            validFormatFound,\n            bestFormatIsValid = false,\n            configfLen = config._f.length;\n\n        if (configfLen === 0) {\n            getParsingFlags(config).invalidFormat = true;\n            config._d = new Date(NaN);\n            return;\n        }\n\n        for (i = 0; i < configfLen; i++) {\n            currentScore = 0;\n            validFormatFound = false;\n            tempConfig = copyConfig({}, config);\n            if (config._useUTC != null) {\n                tempConfig._useUTC = config._useUTC;\n            }\n            tempConfig._f = config._f[i];\n            configFromStringAndFormat(tempConfig);\n\n            if (isValid(tempConfig)) {\n                validFormatFound = true;\n            }\n\n            // if there is any input that was not parsed add a penalty for that format\n            currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n            //or tokens\n            currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n            getParsingFlags(tempConfig).score = currentScore;\n\n            if (!bestFormatIsValid) {\n                if (\n                    scoreToBeat == null ||\n                    currentScore < scoreToBeat ||\n                    validFormatFound\n                ) {\n                    scoreToBeat = currentScore;\n                    bestMoment = tempConfig;\n                    if (validFormatFound) {\n                        bestFormatIsValid = true;\n                    }\n                }\n            } else {\n                if (currentScore < scoreToBeat) {\n                    scoreToBeat = currentScore;\n                    bestMoment = tempConfig;\n                }\n            }\n        }\n\n        extend(config, bestMoment || tempConfig);\n    }\n\n    function configFromObject(config) {\n        if (config._d) {\n            return;\n        }\n\n        var i = normalizeObjectUnits(config._i),\n            dayOrDate = i.day === undefined ? i.date : i.day;\n        config._a = map(\n            [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n            function (obj) {\n                return obj && parseInt(obj, 10);\n            }\n        );\n\n        configFromArray(config);\n    }\n\n    function createFromConfig(config) {\n        var res = new Moment(checkOverflow(prepareConfig(config)));\n        if (res._nextDay) {\n            // Adding is smart enough around DST\n            res.add(1, 'd');\n            res._nextDay = undefined;\n        }\n\n        return res;\n    }\n\n    function prepareConfig(config) {\n        var input = config._i,\n            format = config._f;\n\n        config._locale = config._locale || getLocale(config._l);\n\n        if (input === null || (format === undefined && input === '')) {\n            return createInvalid({ nullInput: true });\n        }\n\n        if (typeof input === 'string') {\n            config._i = input = config._locale.preparse(input);\n        }\n\n        if (isMoment(input)) {\n            return new Moment(checkOverflow(input));\n        } else if (isDate(input)) {\n            config._d = input;\n        } else if (isArray(format)) {\n            configFromStringAndArray(config);\n        } else if (format) {\n            configFromStringAndFormat(config);\n        } else {\n            configFromInput(config);\n        }\n\n        if (!isValid(config)) {\n            config._d = null;\n        }\n\n        return config;\n    }\n\n    function configFromInput(config) {\n        var input = config._i;\n        if (isUndefined(input)) {\n            config._d = new Date(hooks.now());\n        } else if (isDate(input)) {\n            config._d = new Date(input.valueOf());\n        } else if (typeof input === 'string') {\n            configFromString(config);\n        } else if (isArray(input)) {\n            config._a = map(input.slice(0), function (obj) {\n                return parseInt(obj, 10);\n            });\n            configFromArray(config);\n        } else if (isObject(input)) {\n            configFromObject(config);\n        } else if (isNumber(input)) {\n            // from milliseconds\n            config._d = new Date(input);\n        } else {\n            hooks.createFromInputFallback(config);\n        }\n    }\n\n    function createLocalOrUTC(input, format, locale, strict, isUTC) {\n        var c = {};\n\n        if (format === true || format === false) {\n            strict = format;\n            format = undefined;\n        }\n\n        if (locale === true || locale === false) {\n            strict = locale;\n            locale = undefined;\n        }\n\n        if (\n            (isObject(input) && isObjectEmpty(input)) ||\n            (isArray(input) && input.length === 0)\n        ) {\n            input = undefined;\n        }\n        // object construction must be done this way.\n        // https://github.com/moment/moment/issues/1423\n        c._isAMomentObject = true;\n        c._useUTC = c._isUTC = isUTC;\n        c._l = locale;\n        c._i = input;\n        c._f = format;\n        c._strict = strict;\n\n        return createFromConfig(c);\n    }\n\n    function createLocal(input, format, locale, strict) {\n        return createLocalOrUTC(input, format, locale, strict, false);\n    }\n\n    var prototypeMin = deprecate(\n            'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n            function () {\n                var other = createLocal.apply(null, arguments);\n                if (this.isValid() && other.isValid()) {\n                    return other < this ? this : other;\n                } else {\n                    return createInvalid();\n                }\n            }\n        ),\n        prototypeMax = deprecate(\n            'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n            function () {\n                var other = createLocal.apply(null, arguments);\n                if (this.isValid() && other.isValid()) {\n                    return other > this ? this : other;\n                } else {\n                    return createInvalid();\n                }\n            }\n        );\n\n    // Pick a moment m from moments so that m[fn](other) is true for all\n    // other. This relies on the function fn to be transitive.\n    //\n    // moments should either be an array of moment objects or an array, whose\n    // first element is an array of moment objects.\n    function pickBy(fn, moments) {\n        var res, i;\n        if (moments.length === 1 && isArray(moments[0])) {\n            moments = moments[0];\n        }\n        if (!moments.length) {\n            return createLocal();\n        }\n        res = moments[0];\n        for (i = 1; i < moments.length; ++i) {\n            if (!moments[i].isValid() || moments[i][fn](res)) {\n                res = moments[i];\n            }\n        }\n        return res;\n    }\n\n    // TODO: Use [].sort instead?\n    function min() {\n        var args = [].slice.call(arguments, 0);\n\n        return pickBy('isBefore', args);\n    }\n\n    function max() {\n        var args = [].slice.call(arguments, 0);\n\n        return pickBy('isAfter', args);\n    }\n\n    var now = function () {\n        return Date.now ? Date.now() : +new Date();\n    };\n\n    var ordering = [\n        'year',\n        'quarter',\n        'month',\n        'week',\n        'day',\n        'hour',\n        'minute',\n        'second',\n        'millisecond',\n    ];\n\n    function isDurationValid(m) {\n        var key,\n            unitHasDecimal = false,\n            i,\n            orderLen = ordering.length;\n        for (key in m) {\n            if (\n                hasOwnProp(m, key) &&\n                !(\n                    indexOf.call(ordering, key) !== -1 &&\n                    (m[key] == null || !isNaN(m[key]))\n                )\n            ) {\n                return false;\n            }\n        }\n\n        for (i = 0; i < orderLen; ++i) {\n            if (m[ordering[i]]) {\n                if (unitHasDecimal) {\n                    return false; // only allow non-integers for smallest unit\n                }\n                if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n                    unitHasDecimal = true;\n                }\n            }\n        }\n\n        return true;\n    }\n\n    function isValid$1() {\n        return this._isValid;\n    }\n\n    function createInvalid$1() {\n        return createDuration(NaN);\n    }\n\n    function Duration(duration) {\n        var normalizedInput = normalizeObjectUnits(duration),\n            years = normalizedInput.year || 0,\n            quarters = normalizedInput.quarter || 0,\n            months = normalizedInput.month || 0,\n            weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n            days = normalizedInput.day || 0,\n            hours = normalizedInput.hour || 0,\n            minutes = normalizedInput.minute || 0,\n            seconds = normalizedInput.second || 0,\n            milliseconds = normalizedInput.millisecond || 0;\n\n        this._isValid = isDurationValid(normalizedInput);\n\n        // representation for dateAddRemove\n        this._milliseconds =\n            +milliseconds +\n            seconds * 1e3 + // 1000\n            minutes * 6e4 + // 1000 * 60\n            hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n        // Because of dateAddRemove treats 24 hours as different from a\n        // day when working around DST, we need to store them separately\n        this._days = +days + weeks * 7;\n        // It is impossible to translate months into days without knowing\n        // which months you are are talking about, so we have to store\n        // it separately.\n        this._months = +months + quarters * 3 + years * 12;\n\n        this._data = {};\n\n        this._locale = getLocale();\n\n        this._bubble();\n    }\n\n    function isDuration(obj) {\n        return obj instanceof Duration;\n    }\n\n    function absRound(number) {\n        if (number < 0) {\n            return Math.round(-1 * number) * -1;\n        } else {\n            return Math.round(number);\n        }\n    }\n\n    // compare two arrays, return the number of differences\n    function compareArrays(array1, array2, dontConvert) {\n        var len = Math.min(array1.length, array2.length),\n            lengthDiff = Math.abs(array1.length - array2.length),\n            diffs = 0,\n            i;\n        for (i = 0; i < len; i++) {\n            if (\n                (dontConvert && array1[i] !== array2[i]) ||\n                (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n            ) {\n                diffs++;\n            }\n        }\n        return diffs + lengthDiff;\n    }\n\n    // FORMATTING\n\n    function offset(token, separator) {\n        addFormatToken(token, 0, 0, function () {\n            var offset = this.utcOffset(),\n                sign = '+';\n            if (offset < 0) {\n                offset = -offset;\n                sign = '-';\n            }\n            return (\n                sign +\n                zeroFill(~~(offset / 60), 2) +\n                separator +\n                zeroFill(~~offset % 60, 2)\n            );\n        });\n    }\n\n    offset('Z', ':');\n    offset('ZZ', '');\n\n    // PARSING\n\n    addRegexToken('Z', matchShortOffset);\n    addRegexToken('ZZ', matchShortOffset);\n    addParseToken(['Z', 'ZZ'], function (input, array, config) {\n        config._useUTC = true;\n        config._tzm = offsetFromString(matchShortOffset, input);\n    });\n\n    // HELPERS\n\n    // timezone chunker\n    // '+10:00' > ['10',  '00']\n    // '-1530'  > ['-15', '30']\n    var chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\n    function offsetFromString(matcher, string) {\n        var matches = (string || '').match(matcher),\n            chunk,\n            parts,\n            minutes;\n\n        if (matches === null) {\n            return null;\n        }\n\n        chunk = matches[matches.length - 1] || [];\n        parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n        minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n        return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n    }\n\n    // Return a moment from input, that is local/utc/zone equivalent to model.\n    function cloneWithOffset(input, model) {\n        var res, diff;\n        if (model._isUTC) {\n            res = model.clone();\n            diff =\n                (isMoment(input) || isDate(input)\n                    ? input.valueOf()\n                    : createLocal(input).valueOf()) - res.valueOf();\n            // Use low-level api, because this fn is low-level api.\n            res._d.setTime(res._d.valueOf() + diff);\n            hooks.updateOffset(res, false);\n            return res;\n        } else {\n            return createLocal(input).local();\n        }\n    }\n\n    function getDateOffset(m) {\n        // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n        // https://github.com/moment/moment/pull/1871\n        return -Math.round(m._d.getTimezoneOffset());\n    }\n\n    // HOOKS\n\n    // This function will be called whenever a moment is mutated.\n    // It is intended to keep the offset in sync with the timezone.\n    hooks.updateOffset = function () {};\n\n    // MOMENTS\n\n    // keepLocalTime = true means only change the timezone, without\n    // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n    // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n    // +0200, so we adjust the time as needed, to be valid.\n    //\n    // Keeping the time actually adds/subtracts (one hour)\n    // from the actual represented time. That is why we call updateOffset\n    // a second time. In case it wants us to change the offset again\n    // _changeInProgress == true case, then we have to adjust, because\n    // there is no such time in the given timezone.\n    function getSetOffset(input, keepLocalTime, keepMinutes) {\n        var offset = this._offset || 0,\n            localAdjust;\n        if (!this.isValid()) {\n            return input != null ? this : NaN;\n        }\n        if (input != null) {\n            if (typeof input === 'string') {\n                input = offsetFromString(matchShortOffset, input);\n                if (input === null) {\n                    return this;\n                }\n            } else if (Math.abs(input) < 16 && !keepMinutes) {\n                input = input * 60;\n            }\n            if (!this._isUTC && keepLocalTime) {\n                localAdjust = getDateOffset(this);\n            }\n            this._offset = input;\n            this._isUTC = true;\n            if (localAdjust != null) {\n                this.add(localAdjust, 'm');\n            }\n            if (offset !== input) {\n                if (!keepLocalTime || this._changeInProgress) {\n                    addSubtract(\n                        this,\n                        createDuration(input - offset, 'm'),\n                        1,\n                        false\n                    );\n                } else if (!this._changeInProgress) {\n                    this._changeInProgress = true;\n                    hooks.updateOffset(this, true);\n                    this._changeInProgress = null;\n                }\n            }\n            return this;\n        } else {\n            return this._isUTC ? offset : getDateOffset(this);\n        }\n    }\n\n    function getSetZone(input, keepLocalTime) {\n        if (input != null) {\n            if (typeof input !== 'string') {\n                input = -input;\n            }\n\n            this.utcOffset(input, keepLocalTime);\n\n            return this;\n        } else {\n            return -this.utcOffset();\n        }\n    }\n\n    function setOffsetToUTC(keepLocalTime) {\n        return this.utcOffset(0, keepLocalTime);\n    }\n\n    function setOffsetToLocal(keepLocalTime) {\n        if (this._isUTC) {\n            this.utcOffset(0, keepLocalTime);\n            this._isUTC = false;\n\n            if (keepLocalTime) {\n                this.subtract(getDateOffset(this), 'm');\n            }\n        }\n        return this;\n    }\n\n    function setOffsetToParsedOffset() {\n        if (this._tzm != null) {\n            this.utcOffset(this._tzm, false, true);\n        } else if (typeof this._i === 'string') {\n            var tZone = offsetFromString(matchOffset, this._i);\n            if (tZone != null) {\n                this.utcOffset(tZone);\n            } else {\n                this.utcOffset(0, true);\n            }\n        }\n        return this;\n    }\n\n    function hasAlignedHourOffset(input) {\n        if (!this.isValid()) {\n            return false;\n        }\n        input = input ? createLocal(input).utcOffset() : 0;\n\n        return (this.utcOffset() - input) % 60 === 0;\n    }\n\n    function isDaylightSavingTime() {\n        return (\n            this.utcOffset() > this.clone().month(0).utcOffset() ||\n            this.utcOffset() > this.clone().month(5).utcOffset()\n        );\n    }\n\n    function isDaylightSavingTimeShifted() {\n        if (!isUndefined(this._isDSTShifted)) {\n            return this._isDSTShifted;\n        }\n\n        var c = {},\n            other;\n\n        copyConfig(c, this);\n        c = prepareConfig(c);\n\n        if (c._a) {\n            other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n            this._isDSTShifted =\n                this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n        } else {\n            this._isDSTShifted = false;\n        }\n\n        return this._isDSTShifted;\n    }\n\n    function isLocal() {\n        return this.isValid() ? !this._isUTC : false;\n    }\n\n    function isUtcOffset() {\n        return this.isValid() ? this._isUTC : false;\n    }\n\n    function isUtc() {\n        return this.isValid() ? this._isUTC && this._offset === 0 : false;\n    }\n\n    // ASP.NET json date format regex\n    var aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n        // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n        // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n        // and further modified to allow for strings containing both week and day\n        isoRegex =\n            /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\n    function createDuration(input, key) {\n        var duration = input,\n            // matching against regexp is expensive, do it on demand\n            match = null,\n            sign,\n            ret,\n            diffRes;\n\n        if (isDuration(input)) {\n            duration = {\n                ms: input._milliseconds,\n                d: input._days,\n                M: input._months,\n            };\n        } else if (isNumber(input) || !isNaN(+input)) {\n            duration = {};\n            if (key) {\n                duration[key] = +input;\n            } else {\n                duration.milliseconds = +input;\n            }\n        } else if ((match = aspNetRegex.exec(input))) {\n            sign = match[1] === '-' ? -1 : 1;\n            duration = {\n                y: 0,\n                d: toInt(match[DATE]) * sign,\n                h: toInt(match[HOUR]) * sign,\n                m: toInt(match[MINUTE]) * sign,\n                s: toInt(match[SECOND]) * sign,\n                ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n            };\n        } else if ((match = isoRegex.exec(input))) {\n            sign = match[1] === '-' ? -1 : 1;\n            duration = {\n                y: parseIso(match[2], sign),\n                M: parseIso(match[3], sign),\n                w: parseIso(match[4], sign),\n                d: parseIso(match[5], sign),\n                h: parseIso(match[6], sign),\n                m: parseIso(match[7], sign),\n                s: parseIso(match[8], sign),\n            };\n        } else if (duration == null) {\n            // checks for null or undefined\n            duration = {};\n        } else if (\n            typeof duration === 'object' &&\n            ('from' in duration || 'to' in duration)\n        ) {\n            diffRes = momentsDifference(\n                createLocal(duration.from),\n                createLocal(duration.to)\n            );\n\n            duration = {};\n            duration.ms = diffRes.milliseconds;\n            duration.M = diffRes.months;\n        }\n\n        ret = new Duration(duration);\n\n        if (isDuration(input) && hasOwnProp(input, '_locale')) {\n            ret._locale = input._locale;\n        }\n\n        if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n            ret._isValid = input._isValid;\n        }\n\n        return ret;\n    }\n\n    createDuration.fn = Duration.prototype;\n    createDuration.invalid = createInvalid$1;\n\n    function parseIso(inp, sign) {\n        // We'd normally use ~~inp for this, but unfortunately it also\n        // converts floats to ints.\n        // inp may be undefined, so careful calling replace on it.\n        var res = inp && parseFloat(inp.replace(',', '.'));\n        // apply sign while we're at it\n        return (isNaN(res) ? 0 : res) * sign;\n    }\n\n    function positiveMomentsDifference(base, other) {\n        var res = {};\n\n        res.months =\n            other.month() - base.month() + (other.year() - base.year()) * 12;\n        if (base.clone().add(res.months, 'M').isAfter(other)) {\n            --res.months;\n        }\n\n        res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n        return res;\n    }\n\n    function momentsDifference(base, other) {\n        var res;\n        if (!(base.isValid() && other.isValid())) {\n            return { milliseconds: 0, months: 0 };\n        }\n\n        other = cloneWithOffset(other, base);\n        if (base.isBefore(other)) {\n            res = positiveMomentsDifference(base, other);\n        } else {\n            res = positiveMomentsDifference(other, base);\n            res.milliseconds = -res.milliseconds;\n            res.months = -res.months;\n        }\n\n        return res;\n    }\n\n    // TODO: remove 'name' arg after deprecation is removed\n    function createAdder(direction, name) {\n        return function (val, period) {\n            var dur, tmp;\n            //invert the arguments, but complain about it\n            if (period !== null && !isNaN(+period)) {\n                deprecateSimple(\n                    name,\n                    'moment().' +\n                        name +\n                        '(period, number) is deprecated. Please use moment().' +\n                        name +\n                        '(number, period). ' +\n                        'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n                );\n                tmp = val;\n                val = period;\n                period = tmp;\n            }\n\n            dur = createDuration(val, period);\n            addSubtract(this, dur, direction);\n            return this;\n        };\n    }\n\n    function addSubtract(mom, duration, isAdding, updateOffset) {\n        var milliseconds = duration._milliseconds,\n            days = absRound(duration._days),\n            months = absRound(duration._months);\n\n        if (!mom.isValid()) {\n            // No op\n            return;\n        }\n\n        updateOffset = updateOffset == null ? true : updateOffset;\n\n        if (months) {\n            setMonth(mom, get(mom, 'Month') + months * isAdding);\n        }\n        if (days) {\n            set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n        }\n        if (milliseconds) {\n            mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n        }\n        if (updateOffset) {\n            hooks.updateOffset(mom, days || months);\n        }\n    }\n\n    var add = createAdder(1, 'add'),\n        subtract = createAdder(-1, 'subtract');\n\n    function isString(input) {\n        return typeof input === 'string' || input instanceof String;\n    }\n\n    // type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\n    function isMomentInput(input) {\n        return (\n            isMoment(input) ||\n            isDate(input) ||\n            isString(input) ||\n            isNumber(input) ||\n            isNumberOrStringArray(input) ||\n            isMomentInputObject(input) ||\n            input === null ||\n            input === undefined\n        );\n    }\n\n    function isMomentInputObject(input) {\n        var objectTest = isObject(input) && !isObjectEmpty(input),\n            propertyTest = false,\n            properties = [\n                'years',\n                'year',\n                'y',\n                'months',\n                'month',\n                'M',\n                'days',\n                'day',\n                'd',\n                'dates',\n                'date',\n                'D',\n                'hours',\n                'hour',\n                'h',\n                'minutes',\n                'minute',\n                'm',\n                'seconds',\n                'second',\n                's',\n                'milliseconds',\n                'millisecond',\n                'ms',\n            ],\n            i,\n            property,\n            propertyLen = properties.length;\n\n        for (i = 0; i < propertyLen; i += 1) {\n            property = properties[i];\n            propertyTest = propertyTest || hasOwnProp(input, property);\n        }\n\n        return objectTest && propertyTest;\n    }\n\n    function isNumberOrStringArray(input) {\n        var arrayTest = isArray(input),\n            dataTypeTest = false;\n        if (arrayTest) {\n            dataTypeTest =\n                input.filter(function (item) {\n                    return !isNumber(item) && isString(input);\n                }).length === 0;\n        }\n        return arrayTest && dataTypeTest;\n    }\n\n    function isCalendarSpec(input) {\n        var objectTest = isObject(input) && !isObjectEmpty(input),\n            propertyTest = false,\n            properties = [\n                'sameDay',\n                'nextDay',\n                'lastDay',\n                'nextWeek',\n                'lastWeek',\n                'sameElse',\n            ],\n            i,\n            property;\n\n        for (i = 0; i < properties.length; i += 1) {\n            property = properties[i];\n            propertyTest = propertyTest || hasOwnProp(input, property);\n        }\n\n        return objectTest && propertyTest;\n    }\n\n    function getCalendarFormat(myMoment, now) {\n        var diff = myMoment.diff(now, 'days', true);\n        return diff < -6\n            ? 'sameElse'\n            : diff < -1\n              ? 'lastWeek'\n              : diff < 0\n                ? 'lastDay'\n                : diff < 1\n                  ? 'sameDay'\n                  : diff < 2\n                    ? 'nextDay'\n                    : diff < 7\n                      ? 'nextWeek'\n                      : 'sameElse';\n    }\n\n    function calendar$1(time, formats) {\n        // Support for single parameter, formats only overload to the calendar function\n        if (arguments.length === 1) {\n            if (!arguments[0]) {\n                time = undefined;\n                formats = undefined;\n            } else if (isMomentInput(arguments[0])) {\n                time = arguments[0];\n                formats = undefined;\n            } else if (isCalendarSpec(arguments[0])) {\n                formats = arguments[0];\n                time = undefined;\n            }\n        }\n        // We want to compare the start of today, vs this.\n        // Getting start-of-today depends on whether we're local/utc/offset or not.\n        var now = time || createLocal(),\n            sod = cloneWithOffset(now, this).startOf('day'),\n            format = hooks.calendarFormat(this, sod) || 'sameElse',\n            output =\n                formats &&\n                (isFunction(formats[format])\n                    ? formats[format].call(this, now)\n                    : formats[format]);\n\n        return this.format(\n            output || this.localeData().calendar(format, this, createLocal(now))\n        );\n    }\n\n    function clone() {\n        return new Moment(this);\n    }\n\n    function isAfter(input, units) {\n        var localInput = isMoment(input) ? input : createLocal(input);\n        if (!(this.isValid() && localInput.isValid())) {\n            return false;\n        }\n        units = normalizeUnits(units) || 'millisecond';\n        if (units === 'millisecond') {\n            return this.valueOf() > localInput.valueOf();\n        } else {\n            return localInput.valueOf() < this.clone().startOf(units).valueOf();\n        }\n    }\n\n    function isBefore(input, units) {\n        var localInput = isMoment(input) ? input : createLocal(input);\n        if (!(this.isValid() && localInput.isValid())) {\n            return false;\n        }\n        units = normalizeUnits(units) || 'millisecond';\n        if (units === 'millisecond') {\n            return this.valueOf() < localInput.valueOf();\n        } else {\n            return this.clone().endOf(units).valueOf() < localInput.valueOf();\n        }\n    }\n\n    function isBetween(from, to, units, inclusivity) {\n        var localFrom = isMoment(from) ? from : createLocal(from),\n            localTo = isMoment(to) ? to : createLocal(to);\n        if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n            return false;\n        }\n        inclusivity = inclusivity || '()';\n        return (\n            (inclusivity[0] === '('\n                ? this.isAfter(localFrom, units)\n                : !this.isBefore(localFrom, units)) &&\n            (inclusivity[1] === ')'\n                ? this.isBefore(localTo, units)\n                : !this.isAfter(localTo, units))\n        );\n    }\n\n    function isSame(input, units) {\n        var localInput = isMoment(input) ? input : createLocal(input),\n            inputMs;\n        if (!(this.isValid() && localInput.isValid())) {\n            return false;\n        }\n        units = normalizeUnits(units) || 'millisecond';\n        if (units === 'millisecond') {\n            return this.valueOf() === localInput.valueOf();\n        } else {\n            inputMs = localInput.valueOf();\n            return (\n                this.clone().startOf(units).valueOf() <= inputMs &&\n                inputMs <= this.clone().endOf(units).valueOf()\n            );\n        }\n    }\n\n    function isSameOrAfter(input, units) {\n        return this.isSame(input, units) || this.isAfter(input, units);\n    }\n\n    function isSameOrBefore(input, units) {\n        return this.isSame(input, units) || this.isBefore(input, units);\n    }\n\n    function diff(input, units, asFloat) {\n        var that, zoneDelta, output;\n\n        if (!this.isValid()) {\n            return NaN;\n        }\n\n        that = cloneWithOffset(input, this);\n\n        if (!that.isValid()) {\n            return NaN;\n        }\n\n        zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n        units = normalizeUnits(units);\n\n        switch (units) {\n            case 'year':\n                output = monthDiff(this, that) / 12;\n                break;\n            case 'month':\n                output = monthDiff(this, that);\n                break;\n            case 'quarter':\n                output = monthDiff(this, that) / 3;\n                break;\n            case 'second':\n                output = (this - that) / 1e3;\n                break; // 1000\n            case 'minute':\n                output = (this - that) / 6e4;\n                break; // 1000 * 60\n            case 'hour':\n                output = (this - that) / 36e5;\n                break; // 1000 * 60 * 60\n            case 'day':\n                output = (this - that - zoneDelta) / 864e5;\n                break; // 1000 * 60 * 60 * 24, negate dst\n            case 'week':\n                output = (this - that - zoneDelta) / 6048e5;\n                break; // 1000 * 60 * 60 * 24 * 7, negate dst\n            default:\n                output = this - that;\n        }\n\n        return asFloat ? output : absFloor(output);\n    }\n\n    function monthDiff(a, b) {\n        if (a.date() < b.date()) {\n            // end-of-month calculations work correct when the start month has more\n            // days than the end month.\n            return -monthDiff(b, a);\n        }\n        // difference in months\n        var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n            // b is in (anchor - 1 month, anchor + 1 month)\n            anchor = a.clone().add(wholeMonthDiff, 'months'),\n            anchor2,\n            adjust;\n\n        if (b - anchor < 0) {\n            anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n            // linear across the month\n            adjust = (b - anchor) / (anchor - anchor2);\n        } else {\n            anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n            // linear across the month\n            adjust = (b - anchor) / (anchor2 - anchor);\n        }\n\n        //check for negative zero, return zero if negative zero\n        return -(wholeMonthDiff + adjust) || 0;\n    }\n\n    hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\n    hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\n    function toString() {\n        return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n    }\n\n    function toISOString(keepOffset) {\n        if (!this.isValid()) {\n            return null;\n        }\n        var utc = keepOffset !== true,\n            m = utc ? this.clone().utc() : this;\n        if (m.year() < 0 || m.year() > 9999) {\n            return formatMoment(\n                m,\n                utc\n                    ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n                    : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n            );\n        }\n        if (isFunction(Date.prototype.toISOString)) {\n            // native implementation is ~50x faster, use it when we can\n            if (utc) {\n                return this.toDate().toISOString();\n            } else {\n                return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n                    .toISOString()\n                    .replace('Z', formatMoment(m, 'Z'));\n            }\n        }\n        return formatMoment(\n            m,\n            utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n        );\n    }\n\n    /**\n     * Return a human readable representation of a moment that can\n     * also be evaluated to get a new moment which is the same\n     *\n     * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n     */\n    function inspect() {\n        if (!this.isValid()) {\n            return 'moment.invalid(/* ' + this._i + ' */)';\n        }\n        var func = 'moment',\n            zone = '',\n            prefix,\n            year,\n            datetime,\n            suffix;\n        if (!this.isLocal()) {\n            func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n            zone = 'Z';\n        }\n        prefix = '[' + func + '(\"]';\n        year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n        datetime = '-MM-DD[T]HH:mm:ss.SSS';\n        suffix = zone + '[\")]';\n\n        return this.format(prefix + year + datetime + suffix);\n    }\n\n    function format(inputString) {\n        if (!inputString) {\n            inputString = this.isUtc()\n                ? hooks.defaultFormatUtc\n                : hooks.defaultFormat;\n        }\n        var output = formatMoment(this, inputString);\n        return this.localeData().postformat(output);\n    }\n\n    function from(time, withoutSuffix) {\n        if (\n            this.isValid() &&\n            ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n        ) {\n            return createDuration({ to: this, from: time })\n                .locale(this.locale())\n                .humanize(!withoutSuffix);\n        } else {\n            return this.localeData().invalidDate();\n        }\n    }\n\n    function fromNow(withoutSuffix) {\n        return this.from(createLocal(), withoutSuffix);\n    }\n\n    function to(time, withoutSuffix) {\n        if (\n            this.isValid() &&\n            ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n        ) {\n            return createDuration({ from: this, to: time })\n                .locale(this.locale())\n                .humanize(!withoutSuffix);\n        } else {\n            return this.localeData().invalidDate();\n        }\n    }\n\n    function toNow(withoutSuffix) {\n        return this.to(createLocal(), withoutSuffix);\n    }\n\n    // If passed a locale key, it will set the locale for this\n    // instance.  Otherwise, it will return the locale configuration\n    // variables for this instance.\n    function locale(key) {\n        var newLocaleData;\n\n        if (key === undefined) {\n            return this._locale._abbr;\n        } else {\n            newLocaleData = getLocale(key);\n            if (newLocaleData != null) {\n                this._locale = newLocaleData;\n            }\n            return this;\n        }\n    }\n\n    var lang = deprecate(\n        'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n        function (key) {\n            if (key === undefined) {\n                return this.localeData();\n            } else {\n                return this.locale(key);\n            }\n        }\n    );\n\n    function localeData() {\n        return this._locale;\n    }\n\n    var MS_PER_SECOND = 1000,\n        MS_PER_MINUTE = 60 * MS_PER_SECOND,\n        MS_PER_HOUR = 60 * MS_PER_MINUTE,\n        MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n    // actual modulo - handles negative numbers (for dates before 1970):\n    function mod$1(dividend, divisor) {\n        return ((dividend % divisor) + divisor) % divisor;\n    }\n\n    function localStartOfDate(y, m, d) {\n        // the date constructor remaps years 0-99 to 1900-1999\n        if (y < 100 && y >= 0) {\n            // preserve leap years using a full 400 year cycle, then reset\n            return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n        } else {\n            return new Date(y, m, d).valueOf();\n        }\n    }\n\n    function utcStartOfDate(y, m, d) {\n        // Date.UTC remaps years 0-99 to 1900-1999\n        if (y < 100 && y >= 0) {\n            // preserve leap years using a full 400 year cycle, then reset\n            return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n        } else {\n            return Date.UTC(y, m, d);\n        }\n    }\n\n    function startOf(units) {\n        var time, startOfDate;\n        units = normalizeUnits(units);\n        if (units === undefined || units === 'millisecond' || !this.isValid()) {\n            return this;\n        }\n\n        startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n        switch (units) {\n            case 'year':\n                time = startOfDate(this.year(), 0, 1);\n                break;\n            case 'quarter':\n                time = startOfDate(\n                    this.year(),\n                    this.month() - (this.month() % 3),\n                    1\n                );\n                break;\n            case 'month':\n                time = startOfDate(this.year(), this.month(), 1);\n                break;\n            case 'week':\n                time = startOfDate(\n                    this.year(),\n                    this.month(),\n                    this.date() - this.weekday()\n                );\n                break;\n            case 'isoWeek':\n                time = startOfDate(\n                    this.year(),\n                    this.month(),\n                    this.date() - (this.isoWeekday() - 1)\n                );\n                break;\n            case 'day':\n            case 'date':\n                time = startOfDate(this.year(), this.month(), this.date());\n                break;\n            case 'hour':\n                time = this._d.valueOf();\n                time -= mod$1(\n                    time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n                    MS_PER_HOUR\n                );\n                break;\n            case 'minute':\n                time = this._d.valueOf();\n                time -= mod$1(time, MS_PER_MINUTE);\n                break;\n            case 'second':\n                time = this._d.valueOf();\n                time -= mod$1(time, MS_PER_SECOND);\n                break;\n        }\n\n        this._d.setTime(time);\n        hooks.updateOffset(this, true);\n        return this;\n    }\n\n    function endOf(units) {\n        var time, startOfDate;\n        units = normalizeUnits(units);\n        if (units === undefined || units === 'millisecond' || !this.isValid()) {\n            return this;\n        }\n\n        startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n        switch (units) {\n            case 'year':\n                time = startOfDate(this.year() + 1, 0, 1) - 1;\n                break;\n            case 'quarter':\n                time =\n                    startOfDate(\n                        this.year(),\n                        this.month() - (this.month() % 3) + 3,\n                        1\n                    ) - 1;\n                break;\n            case 'month':\n                time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n                break;\n            case 'week':\n                time =\n                    startOfDate(\n                        this.year(),\n                        this.month(),\n                        this.date() - this.weekday() + 7\n                    ) - 1;\n                break;\n            case 'isoWeek':\n                time =\n                    startOfDate(\n                        this.year(),\n                        this.month(),\n                        this.date() - (this.isoWeekday() - 1) + 7\n                    ) - 1;\n                break;\n            case 'day':\n            case 'date':\n                time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n                break;\n            case 'hour':\n                time = this._d.valueOf();\n                time +=\n                    MS_PER_HOUR -\n                    mod$1(\n                        time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n                        MS_PER_HOUR\n                    ) -\n                    1;\n                break;\n            case 'minute':\n                time = this._d.valueOf();\n                time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n                break;\n            case 'second':\n                time = this._d.valueOf();\n                time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n                break;\n        }\n\n        this._d.setTime(time);\n        hooks.updateOffset(this, true);\n        return this;\n    }\n\n    function valueOf() {\n        return this._d.valueOf() - (this._offset || 0) * 60000;\n    }\n\n    function unix() {\n        return Math.floor(this.valueOf() / 1000);\n    }\n\n    function toDate() {\n        return new Date(this.valueOf());\n    }\n\n    function toArray() {\n        var m = this;\n        return [\n            m.year(),\n            m.month(),\n            m.date(),\n            m.hour(),\n            m.minute(),\n            m.second(),\n            m.millisecond(),\n        ];\n    }\n\n    function toObject() {\n        var m = this;\n        return {\n            years: m.year(),\n            months: m.month(),\n            date: m.date(),\n            hours: m.hours(),\n            minutes: m.minutes(),\n            seconds: m.seconds(),\n            milliseconds: m.milliseconds(),\n        };\n    }\n\n    function toJSON() {\n        // new Date(NaN).toJSON() === null\n        return this.isValid() ? this.toISOString() : null;\n    }\n\n    function isValid$2() {\n        return isValid(this);\n    }\n\n    function parsingFlags() {\n        return extend({}, getParsingFlags(this));\n    }\n\n    function invalidAt() {\n        return getParsingFlags(this).overflow;\n    }\n\n    function creationData() {\n        return {\n            input: this._i,\n            format: this._f,\n            locale: this._locale,\n            isUTC: this._isUTC,\n            strict: this._strict,\n        };\n    }\n\n    addFormatToken('N', 0, 0, 'eraAbbr');\n    addFormatToken('NN', 0, 0, 'eraAbbr');\n    addFormatToken('NNN', 0, 0, 'eraAbbr');\n    addFormatToken('NNNN', 0, 0, 'eraName');\n    addFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\n    addFormatToken('y', ['y', 1], 'yo', 'eraYear');\n    addFormatToken('y', ['yy', 2], 0, 'eraYear');\n    addFormatToken('y', ['yyy', 3], 0, 'eraYear');\n    addFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\n    addRegexToken('N', matchEraAbbr);\n    addRegexToken('NN', matchEraAbbr);\n    addRegexToken('NNN', matchEraAbbr);\n    addRegexToken('NNNN', matchEraName);\n    addRegexToken('NNNNN', matchEraNarrow);\n\n    addParseToken(\n        ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n        function (input, array, config, token) {\n            var era = config._locale.erasParse(input, token, config._strict);\n            if (era) {\n                getParsingFlags(config).era = era;\n            } else {\n                getParsingFlags(config).invalidEra = input;\n            }\n        }\n    );\n\n    addRegexToken('y', matchUnsigned);\n    addRegexToken('yy', matchUnsigned);\n    addRegexToken('yyy', matchUnsigned);\n    addRegexToken('yyyy', matchUnsigned);\n    addRegexToken('yo', matchEraYearOrdinal);\n\n    addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\n    addParseToken(['yo'], function (input, array, config, token) {\n        var match;\n        if (config._locale._eraYearOrdinalRegex) {\n            match = input.match(config._locale._eraYearOrdinalRegex);\n        }\n\n        if (config._locale.eraYearOrdinalParse) {\n            array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n        } else {\n            array[YEAR] = parseInt(input, 10);\n        }\n    });\n\n    function localeEras(m, format) {\n        var i,\n            l,\n            date,\n            eras = this._eras || getLocale('en')._eras;\n        for (i = 0, l = eras.length; i < l; ++i) {\n            switch (typeof eras[i].since) {\n                case 'string':\n                    // truncate time\n                    date = hooks(eras[i].since).startOf('day');\n                    eras[i].since = date.valueOf();\n                    break;\n            }\n\n            switch (typeof eras[i].until) {\n                case 'undefined':\n                    eras[i].until = +Infinity;\n                    break;\n                case 'string':\n                    // truncate time\n                    date = hooks(eras[i].until).startOf('day').valueOf();\n                    eras[i].until = date.valueOf();\n                    break;\n            }\n        }\n        return eras;\n    }\n\n    function localeErasParse(eraName, format, strict) {\n        var i,\n            l,\n            eras = this.eras(),\n            name,\n            abbr,\n            narrow;\n        eraName = eraName.toUpperCase();\n\n        for (i = 0, l = eras.length; i < l; ++i) {\n            name = eras[i].name.toUpperCase();\n            abbr = eras[i].abbr.toUpperCase();\n            narrow = eras[i].narrow.toUpperCase();\n\n            if (strict) {\n                switch (format) {\n                    case 'N':\n                    case 'NN':\n                    case 'NNN':\n                        if (abbr === eraName) {\n                            return eras[i];\n                        }\n                        break;\n\n                    case 'NNNN':\n                        if (name === eraName) {\n                            return eras[i];\n                        }\n                        break;\n\n                    case 'NNNNN':\n                        if (narrow === eraName) {\n                            return eras[i];\n                        }\n                        break;\n                }\n            } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n                return eras[i];\n            }\n        }\n    }\n\n    function localeErasConvertYear(era, year) {\n        var dir = era.since <= era.until ? +1 : -1;\n        if (year === undefined) {\n            return hooks(era.since).year();\n        } else {\n            return hooks(era.since).year() + (year - era.offset) * dir;\n        }\n    }\n\n    function getEraName() {\n        var i,\n            l,\n            val,\n            eras = this.localeData().eras();\n        for (i = 0, l = eras.length; i < l; ++i) {\n            // truncate time\n            val = this.clone().startOf('day').valueOf();\n\n            if (eras[i].since <= val && val <= eras[i].until) {\n                return eras[i].name;\n            }\n            if (eras[i].until <= val && val <= eras[i].since) {\n                return eras[i].name;\n            }\n        }\n\n        return '';\n    }\n\n    function getEraNarrow() {\n        var i,\n            l,\n            val,\n            eras = this.localeData().eras();\n        for (i = 0, l = eras.length; i < l; ++i) {\n            // truncate time\n            val = this.clone().startOf('day').valueOf();\n\n            if (eras[i].since <= val && val <= eras[i].until) {\n                return eras[i].narrow;\n            }\n            if (eras[i].until <= val && val <= eras[i].since) {\n                return eras[i].narrow;\n            }\n        }\n\n        return '';\n    }\n\n    function getEraAbbr() {\n        var i,\n            l,\n            val,\n            eras = this.localeData().eras();\n        for (i = 0, l = eras.length; i < l; ++i) {\n            // truncate time\n            val = this.clone().startOf('day').valueOf();\n\n            if (eras[i].since <= val && val <= eras[i].until) {\n                return eras[i].abbr;\n            }\n            if (eras[i].until <= val && val <= eras[i].since) {\n                return eras[i].abbr;\n            }\n        }\n\n        return '';\n    }\n\n    function getEraYear() {\n        var i,\n            l,\n            dir,\n            val,\n            eras = this.localeData().eras();\n        for (i = 0, l = eras.length; i < l; ++i) {\n            dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n            // truncate time\n            val = this.clone().startOf('day').valueOf();\n\n            if (\n                (eras[i].since <= val && val <= eras[i].until) ||\n                (eras[i].until <= val && val <= eras[i].since)\n            ) {\n                return (\n                    (this.year() - hooks(eras[i].since).year()) * dir +\n                    eras[i].offset\n                );\n            }\n        }\n\n        return this.year();\n    }\n\n    function erasNameRegex(isStrict) {\n        if (!hasOwnProp(this, '_erasNameRegex')) {\n            computeErasParse.call(this);\n        }\n        return isStrict ? this._erasNameRegex : this._erasRegex;\n    }\n\n    function erasAbbrRegex(isStrict) {\n        if (!hasOwnProp(this, '_erasAbbrRegex')) {\n            computeErasParse.call(this);\n        }\n        return isStrict ? this._erasAbbrRegex : this._erasRegex;\n    }\n\n    function erasNarrowRegex(isStrict) {\n        if (!hasOwnProp(this, '_erasNarrowRegex')) {\n            computeErasParse.call(this);\n        }\n        return isStrict ? this._erasNarrowRegex : this._erasRegex;\n    }\n\n    function matchEraAbbr(isStrict, locale) {\n        return locale.erasAbbrRegex(isStrict);\n    }\n\n    function matchEraName(isStrict, locale) {\n        return locale.erasNameRegex(isStrict);\n    }\n\n    function matchEraNarrow(isStrict, locale) {\n        return locale.erasNarrowRegex(isStrict);\n    }\n\n    function matchEraYearOrdinal(isStrict, locale) {\n        return locale._eraYearOrdinalRegex || matchUnsigned;\n    }\n\n    function computeErasParse() {\n        var abbrPieces = [],\n            namePieces = [],\n            narrowPieces = [],\n            mixedPieces = [],\n            i,\n            l,\n            erasName,\n            erasAbbr,\n            erasNarrow,\n            eras = this.eras();\n\n        for (i = 0, l = eras.length; i < l; ++i) {\n            erasName = regexEscape(eras[i].name);\n            erasAbbr = regexEscape(eras[i].abbr);\n            erasNarrow = regexEscape(eras[i].narrow);\n\n            namePieces.push(erasName);\n            abbrPieces.push(erasAbbr);\n            narrowPieces.push(erasNarrow);\n            mixedPieces.push(erasName);\n            mixedPieces.push(erasAbbr);\n            mixedPieces.push(erasNarrow);\n        }\n\n        this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n        this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n        this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n        this._erasNarrowRegex = new RegExp(\n            '^(' + narrowPieces.join('|') + ')',\n            'i'\n        );\n    }\n\n    // FORMATTING\n\n    addFormatToken(0, ['gg', 2], 0, function () {\n        return this.weekYear() % 100;\n    });\n\n    addFormatToken(0, ['GG', 2], 0, function () {\n        return this.isoWeekYear() % 100;\n    });\n\n    function addWeekYearFormatToken(token, getter) {\n        addFormatToken(0, [token, token.length], 0, getter);\n    }\n\n    addWeekYearFormatToken('gggg', 'weekYear');\n    addWeekYearFormatToken('ggggg', 'weekYear');\n    addWeekYearFormatToken('GGGG', 'isoWeekYear');\n    addWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n    // ALIASES\n\n    // PARSING\n\n    addRegexToken('G', matchSigned);\n    addRegexToken('g', matchSigned);\n    addRegexToken('GG', match1to2, match2);\n    addRegexToken('gg', match1to2, match2);\n    addRegexToken('GGGG', match1to4, match4);\n    addRegexToken('gggg', match1to4, match4);\n    addRegexToken('GGGGG', match1to6, match6);\n    addRegexToken('ggggg', match1to6, match6);\n\n    addWeekParseToken(\n        ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n        function (input, week, config, token) {\n            week[token.substr(0, 2)] = toInt(input);\n        }\n    );\n\n    addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n        week[token] = hooks.parseTwoDigitYear(input);\n    });\n\n    // MOMENTS\n\n    function getSetWeekYear(input) {\n        return getSetWeekYearHelper.call(\n            this,\n            input,\n            this.week(),\n            this.weekday() + this.localeData()._week.dow,\n            this.localeData()._week.dow,\n            this.localeData()._week.doy\n        );\n    }\n\n    function getSetISOWeekYear(input) {\n        return getSetWeekYearHelper.call(\n            this,\n            input,\n            this.isoWeek(),\n            this.isoWeekday(),\n            1,\n            4\n        );\n    }\n\n    function getISOWeeksInYear() {\n        return weeksInYear(this.year(), 1, 4);\n    }\n\n    function getISOWeeksInISOWeekYear() {\n        return weeksInYear(this.isoWeekYear(), 1, 4);\n    }\n\n    function getWeeksInYear() {\n        var weekInfo = this.localeData()._week;\n        return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n    }\n\n    function getWeeksInWeekYear() {\n        var weekInfo = this.localeData()._week;\n        return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n    }\n\n    function getSetWeekYearHelper(input, week, weekday, dow, doy) {\n        var weeksTarget;\n        if (input == null) {\n            return weekOfYear(this, dow, doy).year;\n        } else {\n            weeksTarget = weeksInYear(input, dow, doy);\n            if (week > weeksTarget) {\n                week = weeksTarget;\n            }\n            return setWeekAll.call(this, input, week, weekday, dow, doy);\n        }\n    }\n\n    function setWeekAll(weekYear, week, weekday, dow, doy) {\n        var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n            date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n        this.year(date.getUTCFullYear());\n        this.month(date.getUTCMonth());\n        this.date(date.getUTCDate());\n        return this;\n    }\n\n    // FORMATTING\n\n    addFormatToken('Q', 0, 'Qo', 'quarter');\n\n    // PARSING\n\n    addRegexToken('Q', match1);\n    addParseToken('Q', function (input, array) {\n        array[MONTH] = (toInt(input) - 1) * 3;\n    });\n\n    // MOMENTS\n\n    function getSetQuarter(input) {\n        return input == null\n            ? Math.ceil((this.month() + 1) / 3)\n            : this.month((input - 1) * 3 + (this.month() % 3));\n    }\n\n    // FORMATTING\n\n    addFormatToken('D', ['DD', 2], 'Do', 'date');\n\n    // PARSING\n\n    addRegexToken('D', match1to2, match1to2NoLeadingZero);\n    addRegexToken('DD', match1to2, match2);\n    addRegexToken('Do', function (isStrict, locale) {\n        // TODO: Remove \"ordinalParse\" fallback in next major release.\n        return isStrict\n            ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n            : locale._dayOfMonthOrdinalParseLenient;\n    });\n\n    addParseToken(['D', 'DD'], DATE);\n    addParseToken('Do', function (input, array) {\n        array[DATE] = toInt(input.match(match1to2)[0]);\n    });\n\n    // MOMENTS\n\n    var getSetDayOfMonth = makeGetSet('Date', true);\n\n    // FORMATTING\n\n    addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n    // PARSING\n\n    addRegexToken('DDD', match1to3);\n    addRegexToken('DDDD', match3);\n    addParseToken(['DDD', 'DDDD'], function (input, array, config) {\n        config._dayOfYear = toInt(input);\n    });\n\n    // HELPERS\n\n    // MOMENTS\n\n    function getSetDayOfYear(input) {\n        var dayOfYear =\n            Math.round(\n                (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n            ) + 1;\n        return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n    }\n\n    // FORMATTING\n\n    addFormatToken('m', ['mm', 2], 0, 'minute');\n\n    // PARSING\n\n    addRegexToken('m', match1to2, match1to2HasZero);\n    addRegexToken('mm', match1to2, match2);\n    addParseToken(['m', 'mm'], MINUTE);\n\n    // MOMENTS\n\n    var getSetMinute = makeGetSet('Minutes', false);\n\n    // FORMATTING\n\n    addFormatToken('s', ['ss', 2], 0, 'second');\n\n    // PARSING\n\n    addRegexToken('s', match1to2, match1to2HasZero);\n    addRegexToken('ss', match1to2, match2);\n    addParseToken(['s', 'ss'], SECOND);\n\n    // MOMENTS\n\n    var getSetSecond = makeGetSet('Seconds', false);\n\n    // FORMATTING\n\n    addFormatToken('S', 0, 0, function () {\n        return ~~(this.millisecond() / 100);\n    });\n\n    addFormatToken(0, ['SS', 2], 0, function () {\n        return ~~(this.millisecond() / 10);\n    });\n\n    addFormatToken(0, ['SSS', 3], 0, 'millisecond');\n    addFormatToken(0, ['SSSS', 4], 0, function () {\n        return this.millisecond() * 10;\n    });\n    addFormatToken(0, ['SSSSS', 5], 0, function () {\n        return this.millisecond() * 100;\n    });\n    addFormatToken(0, ['SSSSSS', 6], 0, function () {\n        return this.millisecond() * 1000;\n    });\n    addFormatToken(0, ['SSSSSSS', 7], 0, function () {\n        return this.millisecond() * 10000;\n    });\n    addFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n        return this.millisecond() * 100000;\n    });\n    addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n        return this.millisecond() * 1000000;\n    });\n\n    // PARSING\n\n    addRegexToken('S', match1to3, match1);\n    addRegexToken('SS', match1to3, match2);\n    addRegexToken('SSS', match1to3, match3);\n\n    var token, getSetMillisecond;\n    for (token = 'SSSS'; token.length <= 9; token += 'S') {\n        addRegexToken(token, matchUnsigned);\n    }\n\n    function parseMs(input, array) {\n        array[MILLISECOND] = toInt(('0.' + input) * 1000);\n    }\n\n    for (token = 'S'; token.length <= 9; token += 'S') {\n        addParseToken(token, parseMs);\n    }\n\n    getSetMillisecond = makeGetSet('Milliseconds', false);\n\n    // FORMATTING\n\n    addFormatToken('z', 0, 0, 'zoneAbbr');\n    addFormatToken('zz', 0, 0, 'zoneName');\n\n    // MOMENTS\n\n    function getZoneAbbr() {\n        return this._isUTC ? 'UTC' : '';\n    }\n\n    function getZoneName() {\n        return this._isUTC ? 'Coordinated Universal Time' : '';\n    }\n\n    var proto = Moment.prototype;\n\n    proto.add = add;\n    proto.calendar = calendar$1;\n    proto.clone = clone;\n    proto.diff = diff;\n    proto.endOf = endOf;\n    proto.format = format;\n    proto.from = from;\n    proto.fromNow = fromNow;\n    proto.to = to;\n    proto.toNow = toNow;\n    proto.get = stringGet;\n    proto.invalidAt = invalidAt;\n    proto.isAfter = isAfter;\n    proto.isBefore = isBefore;\n    proto.isBetween = isBetween;\n    proto.isSame = isSame;\n    proto.isSameOrAfter = isSameOrAfter;\n    proto.isSameOrBefore = isSameOrBefore;\n    proto.isValid = isValid$2;\n    proto.lang = lang;\n    proto.locale = locale;\n    proto.localeData = localeData;\n    proto.max = prototypeMax;\n    proto.min = prototypeMin;\n    proto.parsingFlags = parsingFlags;\n    proto.set = stringSet;\n    proto.startOf = startOf;\n    proto.subtract = subtract;\n    proto.toArray = toArray;\n    proto.toObject = toObject;\n    proto.toDate = toDate;\n    proto.toISOString = toISOString;\n    proto.inspect = inspect;\n    if (typeof Symbol !== 'undefined' && Symbol.for != null) {\n        proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n            return 'Moment<' + this.format() + '>';\n        };\n    }\n    proto.toJSON = toJSON;\n    proto.toString = toString;\n    proto.unix = unix;\n    proto.valueOf = valueOf;\n    proto.creationData = creationData;\n    proto.eraName = getEraName;\n    proto.eraNarrow = getEraNarrow;\n    proto.eraAbbr = getEraAbbr;\n    proto.eraYear = getEraYear;\n    proto.year = getSetYear;\n    proto.isLeapYear = getIsLeapYear;\n    proto.weekYear = getSetWeekYear;\n    proto.isoWeekYear = getSetISOWeekYear;\n    proto.quarter = proto.quarters = getSetQuarter;\n    proto.month = getSetMonth;\n    proto.daysInMonth = getDaysInMonth;\n    proto.week = proto.weeks = getSetWeek;\n    proto.isoWeek = proto.isoWeeks = getSetISOWeek;\n    proto.weeksInYear = getWeeksInYear;\n    proto.weeksInWeekYear = getWeeksInWeekYear;\n    proto.isoWeeksInYear = getISOWeeksInYear;\n    proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\n    proto.date = getSetDayOfMonth;\n    proto.day = proto.days = getSetDayOfWeek;\n    proto.weekday = getSetLocaleDayOfWeek;\n    proto.isoWeekday = getSetISODayOfWeek;\n    proto.dayOfYear = getSetDayOfYear;\n    proto.hour = proto.hours = getSetHour;\n    proto.minute = proto.minutes = getSetMinute;\n    proto.second = proto.seconds = getSetSecond;\n    proto.millisecond = proto.milliseconds = getSetMillisecond;\n    proto.utcOffset = getSetOffset;\n    proto.utc = setOffsetToUTC;\n    proto.local = setOffsetToLocal;\n    proto.parseZone = setOffsetToParsedOffset;\n    proto.hasAlignedHourOffset = hasAlignedHourOffset;\n    proto.isDST = isDaylightSavingTime;\n    proto.isLocal = isLocal;\n    proto.isUtcOffset = isUtcOffset;\n    proto.isUtc = isUtc;\n    proto.isUTC = isUtc;\n    proto.zoneAbbr = getZoneAbbr;\n    proto.zoneName = getZoneName;\n    proto.dates = deprecate(\n        'dates accessor is deprecated. Use date instead.',\n        getSetDayOfMonth\n    );\n    proto.months = deprecate(\n        'months accessor is deprecated. Use month instead',\n        getSetMonth\n    );\n    proto.years = deprecate(\n        'years accessor is deprecated. Use year instead',\n        getSetYear\n    );\n    proto.zone = deprecate(\n        'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n        getSetZone\n    );\n    proto.isDSTShifted = deprecate(\n        'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n        isDaylightSavingTimeShifted\n    );\n\n    function createUnix(input) {\n        return createLocal(input * 1000);\n    }\n\n    function createInZone() {\n        return createLocal.apply(null, arguments).parseZone();\n    }\n\n    function preParsePostFormat(string) {\n        return string;\n    }\n\n    var proto$1 = Locale.prototype;\n\n    proto$1.calendar = calendar;\n    proto$1.longDateFormat = longDateFormat;\n    proto$1.invalidDate = invalidDate;\n    proto$1.ordinal = ordinal;\n    proto$1.preparse = preParsePostFormat;\n    proto$1.postformat = preParsePostFormat;\n    proto$1.relativeTime = relativeTime;\n    proto$1.pastFuture = pastFuture;\n    proto$1.set = set;\n    proto$1.eras = localeEras;\n    proto$1.erasParse = localeErasParse;\n    proto$1.erasConvertYear = localeErasConvertYear;\n    proto$1.erasAbbrRegex = erasAbbrRegex;\n    proto$1.erasNameRegex = erasNameRegex;\n    proto$1.erasNarrowRegex = erasNarrowRegex;\n\n    proto$1.months = localeMonths;\n    proto$1.monthsShort = localeMonthsShort;\n    proto$1.monthsParse = localeMonthsParse;\n    proto$1.monthsRegex = monthsRegex;\n    proto$1.monthsShortRegex = monthsShortRegex;\n    proto$1.week = localeWeek;\n    proto$1.firstDayOfYear = localeFirstDayOfYear;\n    proto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\n    proto$1.weekdays = localeWeekdays;\n    proto$1.weekdaysMin = localeWeekdaysMin;\n    proto$1.weekdaysShort = localeWeekdaysShort;\n    proto$1.weekdaysParse = localeWeekdaysParse;\n\n    proto$1.weekdaysRegex = weekdaysRegex;\n    proto$1.weekdaysShortRegex = weekdaysShortRegex;\n    proto$1.weekdaysMinRegex = weekdaysMinRegex;\n\n    proto$1.isPM = localeIsPM;\n    proto$1.meridiem = localeMeridiem;\n\n    function get$1(format, index, field, setter) {\n        var locale = getLocale(),\n            utc = createUTC().set(setter, index);\n        return locale[field](utc, format);\n    }\n\n    function listMonthsImpl(format, index, field) {\n        if (isNumber(format)) {\n            index = format;\n            format = undefined;\n        }\n\n        format = format || '';\n\n        if (index != null) {\n            return get$1(format, index, field, 'month');\n        }\n\n        var i,\n            out = [];\n        for (i = 0; i < 12; i++) {\n            out[i] = get$1(format, i, field, 'month');\n        }\n        return out;\n    }\n\n    // ()\n    // (5)\n    // (fmt, 5)\n    // (fmt)\n    // (true)\n    // (true, 5)\n    // (true, fmt, 5)\n    // (true, fmt)\n    function listWeekdaysImpl(localeSorted, format, index, field) {\n        if (typeof localeSorted === 'boolean') {\n            if (isNumber(format)) {\n                index = format;\n                format = undefined;\n            }\n\n            format = format || '';\n        } else {\n            format = localeSorted;\n            index = format;\n            localeSorted = false;\n\n            if (isNumber(format)) {\n                index = format;\n                format = undefined;\n            }\n\n            format = format || '';\n        }\n\n        var locale = getLocale(),\n            shift = localeSorted ? locale._week.dow : 0,\n            i,\n            out = [];\n\n        if (index != null) {\n            return get$1(format, (index + shift) % 7, field, 'day');\n        }\n\n        for (i = 0; i < 7; i++) {\n            out[i] = get$1(format, (i + shift) % 7, field, 'day');\n        }\n        return out;\n    }\n\n    function listMonths(format, index) {\n        return listMonthsImpl(format, index, 'months');\n    }\n\n    function listMonthsShort(format, index) {\n        return listMonthsImpl(format, index, 'monthsShort');\n    }\n\n    function listWeekdays(localeSorted, format, index) {\n        return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n    }\n\n    function listWeekdaysShort(localeSorted, format, index) {\n        return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n    }\n\n    function listWeekdaysMin(localeSorted, format, index) {\n        return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n    }\n\n    getSetGlobalLocale('en', {\n        eras: [\n            {\n                since: '0001-01-01',\n                until: +Infinity,\n                offset: 1,\n                name: 'Anno Domini',\n                narrow: 'AD',\n                abbr: 'AD',\n            },\n            {\n                since: '0000-12-31',\n                until: -Infinity,\n                offset: 1,\n                name: 'Before Christ',\n                narrow: 'BC',\n                abbr: 'BC',\n            },\n        ],\n        dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    toInt((number % 100) / 10) === 1\n                        ? 'th'\n                        : b === 1\n                          ? 'st'\n                          : b === 2\n                            ? 'nd'\n                            : b === 3\n                              ? 'rd'\n                              : 'th';\n            return number + output;\n        },\n    });\n\n    // Side effect imports\n\n    hooks.lang = deprecate(\n        'moment.lang is deprecated. Use moment.locale instead.',\n        getSetGlobalLocale\n    );\n    hooks.langData = deprecate(\n        'moment.langData is deprecated. Use moment.localeData instead.',\n        getLocale\n    );\n\n    var mathAbs = Math.abs;\n\n    function abs() {\n        var data = this._data;\n\n        this._milliseconds = mathAbs(this._milliseconds);\n        this._days = mathAbs(this._days);\n        this._months = mathAbs(this._months);\n\n        data.milliseconds = mathAbs(data.milliseconds);\n        data.seconds = mathAbs(data.seconds);\n        data.minutes = mathAbs(data.minutes);\n        data.hours = mathAbs(data.hours);\n        data.months = mathAbs(data.months);\n        data.years = mathAbs(data.years);\n\n        return this;\n    }\n\n    function addSubtract$1(duration, input, value, direction) {\n        var other = createDuration(input, value);\n\n        duration._milliseconds += direction * other._milliseconds;\n        duration._days += direction * other._days;\n        duration._months += direction * other._months;\n\n        return duration._bubble();\n    }\n\n    // supports only 2.0-style add(1, 's') or add(duration)\n    function add$1(input, value) {\n        return addSubtract$1(this, input, value, 1);\n    }\n\n    // supports only 2.0-style subtract(1, 's') or subtract(duration)\n    function subtract$1(input, value) {\n        return addSubtract$1(this, input, value, -1);\n    }\n\n    function absCeil(number) {\n        if (number < 0) {\n            return Math.floor(number);\n        } else {\n            return Math.ceil(number);\n        }\n    }\n\n    function bubble() {\n        var milliseconds = this._milliseconds,\n            days = this._days,\n            months = this._months,\n            data = this._data,\n            seconds,\n            minutes,\n            hours,\n            years,\n            monthsFromDays;\n\n        // if we have a mix of positive and negative values, bubble down first\n        // check: https://github.com/moment/moment/issues/2166\n        if (\n            !(\n                (milliseconds >= 0 && days >= 0 && months >= 0) ||\n                (milliseconds <= 0 && days <= 0 && months <= 0)\n            )\n        ) {\n            milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n            days = 0;\n            months = 0;\n        }\n\n        // The following code bubbles up values, see the tests for\n        // examples of what that means.\n        data.milliseconds = milliseconds % 1000;\n\n        seconds = absFloor(milliseconds / 1000);\n        data.seconds = seconds % 60;\n\n        minutes = absFloor(seconds / 60);\n        data.minutes = minutes % 60;\n\n        hours = absFloor(minutes / 60);\n        data.hours = hours % 24;\n\n        days += absFloor(hours / 24);\n\n        // convert days to months\n        monthsFromDays = absFloor(daysToMonths(days));\n        months += monthsFromDays;\n        days -= absCeil(monthsToDays(monthsFromDays));\n\n        // 12 months -> 1 year\n        years = absFloor(months / 12);\n        months %= 12;\n\n        data.days = days;\n        data.months = months;\n        data.years = years;\n\n        return this;\n    }\n\n    function daysToMonths(days) {\n        // 400 years have 146097 days (taking into account leap year rules)\n        // 400 years have 12 months === 4800\n        return (days * 4800) / 146097;\n    }\n\n    function monthsToDays(months) {\n        // the reverse of daysToMonths\n        return (months * 146097) / 4800;\n    }\n\n    function as(units) {\n        if (!this.isValid()) {\n            return NaN;\n        }\n        var days,\n            months,\n            milliseconds = this._milliseconds;\n\n        units = normalizeUnits(units);\n\n        if (units === 'month' || units === 'quarter' || units === 'year') {\n            days = this._days + milliseconds / 864e5;\n            months = this._months + daysToMonths(days);\n            switch (units) {\n                case 'month':\n                    return months;\n                case 'quarter':\n                    return months / 3;\n                case 'year':\n                    return months / 12;\n            }\n        } else {\n            // handle milliseconds separately because of floating point math errors (issue #1867)\n            days = this._days + Math.round(monthsToDays(this._months));\n            switch (units) {\n                case 'week':\n                    return days / 7 + milliseconds / 6048e5;\n                case 'day':\n                    return days + milliseconds / 864e5;\n                case 'hour':\n                    return days * 24 + milliseconds / 36e5;\n                case 'minute':\n                    return days * 1440 + milliseconds / 6e4;\n                case 'second':\n                    return days * 86400 + milliseconds / 1000;\n                // Math.floor prevents floating point math errors here\n                case 'millisecond':\n                    return Math.floor(days * 864e5) + milliseconds;\n                default:\n                    throw new Error('Unknown unit ' + units);\n            }\n        }\n    }\n\n    function makeAs(alias) {\n        return function () {\n            return this.as(alias);\n        };\n    }\n\n    var asMilliseconds = makeAs('ms'),\n        asSeconds = makeAs('s'),\n        asMinutes = makeAs('m'),\n        asHours = makeAs('h'),\n        asDays = makeAs('d'),\n        asWeeks = makeAs('w'),\n        asMonths = makeAs('M'),\n        asQuarters = makeAs('Q'),\n        asYears = makeAs('y'),\n        valueOf$1 = asMilliseconds;\n\n    function clone$1() {\n        return createDuration(this);\n    }\n\n    function get$2(units) {\n        units = normalizeUnits(units);\n        return this.isValid() ? this[units + 's']() : NaN;\n    }\n\n    function makeGetter(name) {\n        return function () {\n            return this.isValid() ? this._data[name] : NaN;\n        };\n    }\n\n    var milliseconds = makeGetter('milliseconds'),\n        seconds = makeGetter('seconds'),\n        minutes = makeGetter('minutes'),\n        hours = makeGetter('hours'),\n        days = makeGetter('days'),\n        months = makeGetter('months'),\n        years = makeGetter('years');\n\n    function weeks() {\n        return absFloor(this.days() / 7);\n    }\n\n    var round = Math.round,\n        thresholds = {\n            ss: 44, // a few seconds to seconds\n            s: 45, // seconds to minute\n            m: 45, // minutes to hour\n            h: 22, // hours to day\n            d: 26, // days to month/week\n            w: null, // weeks to month\n            M: 11, // months to year\n        };\n\n    // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\n    function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n        return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n    }\n\n    function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n        var duration = createDuration(posNegDuration).abs(),\n            seconds = round(duration.as('s')),\n            minutes = round(duration.as('m')),\n            hours = round(duration.as('h')),\n            days = round(duration.as('d')),\n            months = round(duration.as('M')),\n            weeks = round(duration.as('w')),\n            years = round(duration.as('y')),\n            a =\n                (seconds <= thresholds.ss && ['s', seconds]) ||\n                (seconds < thresholds.s && ['ss', seconds]) ||\n                (minutes <= 1 && ['m']) ||\n                (minutes < thresholds.m && ['mm', minutes]) ||\n                (hours <= 1 && ['h']) ||\n                (hours < thresholds.h && ['hh', hours]) ||\n                (days <= 1 && ['d']) ||\n                (days < thresholds.d && ['dd', days]);\n\n        if (thresholds.w != null) {\n            a =\n                a ||\n                (weeks <= 1 && ['w']) ||\n                (weeks < thresholds.w && ['ww', weeks]);\n        }\n        a = a ||\n            (months <= 1 && ['M']) ||\n            (months < thresholds.M && ['MM', months]) ||\n            (years <= 1 && ['y']) || ['yy', years];\n\n        a[2] = withoutSuffix;\n        a[3] = +posNegDuration > 0;\n        a[4] = locale;\n        return substituteTimeAgo.apply(null, a);\n    }\n\n    // This function allows you to set the rounding function for relative time strings\n    function getSetRelativeTimeRounding(roundingFunction) {\n        if (roundingFunction === undefined) {\n            return round;\n        }\n        if (typeof roundingFunction === 'function') {\n            round = roundingFunction;\n            return true;\n        }\n        return false;\n    }\n\n    // This function allows you to set a threshold for relative time strings\n    function getSetRelativeTimeThreshold(threshold, limit) {\n        if (thresholds[threshold] === undefined) {\n            return false;\n        }\n        if (limit === undefined) {\n            return thresholds[threshold];\n        }\n        thresholds[threshold] = limit;\n        if (threshold === 's') {\n            thresholds.ss = limit - 1;\n        }\n        return true;\n    }\n\n    function humanize(argWithSuffix, argThresholds) {\n        if (!this.isValid()) {\n            return this.localeData().invalidDate();\n        }\n\n        var withSuffix = false,\n            th = thresholds,\n            locale,\n            output;\n\n        if (typeof argWithSuffix === 'object') {\n            argThresholds = argWithSuffix;\n            argWithSuffix = false;\n        }\n        if (typeof argWithSuffix === 'boolean') {\n            withSuffix = argWithSuffix;\n        }\n        if (typeof argThresholds === 'object') {\n            th = Object.assign({}, thresholds, argThresholds);\n            if (argThresholds.s != null && argThresholds.ss == null) {\n                th.ss = argThresholds.s - 1;\n            }\n        }\n\n        locale = this.localeData();\n        output = relativeTime$1(this, !withSuffix, th, locale);\n\n        if (withSuffix) {\n            output = locale.pastFuture(+this, output);\n        }\n\n        return locale.postformat(output);\n    }\n\n    var abs$1 = Math.abs;\n\n    function sign(x) {\n        return (x > 0) - (x < 0) || +x;\n    }\n\n    function toISOString$1() {\n        // for ISO strings we do not use the normal bubbling rules:\n        //  * milliseconds bubble up until they become hours\n        //  * days do not bubble at all\n        //  * months bubble up until they become years\n        // This is because there is no context-free conversion between hours and days\n        // (think of clock changes)\n        // and also not between days and months (28-31 days per month)\n        if (!this.isValid()) {\n            return this.localeData().invalidDate();\n        }\n\n        var seconds = abs$1(this._milliseconds) / 1000,\n            days = abs$1(this._days),\n            months = abs$1(this._months),\n            minutes,\n            hours,\n            years,\n            s,\n            total = this.asSeconds(),\n            totalSign,\n            ymSign,\n            daysSign,\n            hmsSign;\n\n        if (!total) {\n            // this is the same as C#'s (Noda) and python (isodate)...\n            // but not other JS (goog.date)\n            return 'P0D';\n        }\n\n        // 3600 seconds -> 60 minutes -> 1 hour\n        minutes = absFloor(seconds / 60);\n        hours = absFloor(minutes / 60);\n        seconds %= 60;\n        minutes %= 60;\n\n        // 12 months -> 1 year\n        years = absFloor(months / 12);\n        months %= 12;\n\n        // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n        s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n        totalSign = total < 0 ? '-' : '';\n        ymSign = sign(this._months) !== sign(total) ? '-' : '';\n        daysSign = sign(this._days) !== sign(total) ? '-' : '';\n        hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n        return (\n            totalSign +\n            'P' +\n            (years ? ymSign + years + 'Y' : '') +\n            (months ? ymSign + months + 'M' : '') +\n            (days ? daysSign + days + 'D' : '') +\n            (hours || minutes || seconds ? 'T' : '') +\n            (hours ? hmsSign + hours + 'H' : '') +\n            (minutes ? hmsSign + minutes + 'M' : '') +\n            (seconds ? hmsSign + s + 'S' : '')\n        );\n    }\n\n    var proto$2 = Duration.prototype;\n\n    proto$2.isValid = isValid$1;\n    proto$2.abs = abs;\n    proto$2.add = add$1;\n    proto$2.subtract = subtract$1;\n    proto$2.as = as;\n    proto$2.asMilliseconds = asMilliseconds;\n    proto$2.asSeconds = asSeconds;\n    proto$2.asMinutes = asMinutes;\n    proto$2.asHours = asHours;\n    proto$2.asDays = asDays;\n    proto$2.asWeeks = asWeeks;\n    proto$2.asMonths = asMonths;\n    proto$2.asQuarters = asQuarters;\n    proto$2.asYears = asYears;\n    proto$2.valueOf = valueOf$1;\n    proto$2._bubble = bubble;\n    proto$2.clone = clone$1;\n    proto$2.get = get$2;\n    proto$2.milliseconds = milliseconds;\n    proto$2.seconds = seconds;\n    proto$2.minutes = minutes;\n    proto$2.hours = hours;\n    proto$2.days = days;\n    proto$2.weeks = weeks;\n    proto$2.months = months;\n    proto$2.years = years;\n    proto$2.humanize = humanize;\n    proto$2.toISOString = toISOString$1;\n    proto$2.toString = toISOString$1;\n    proto$2.toJSON = toISOString$1;\n    proto$2.locale = locale;\n    proto$2.localeData = localeData;\n\n    proto$2.toIsoString = deprecate(\n        'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n        toISOString$1\n    );\n    proto$2.lang = lang;\n\n    // FORMATTING\n\n    addFormatToken('X', 0, 0, 'unix');\n    addFormatToken('x', 0, 0, 'valueOf');\n\n    // PARSING\n\n    addRegexToken('x', matchSigned);\n    addRegexToken('X', matchTimestamp);\n    addParseToken('X', function (input, array, config) {\n        config._d = new Date(parseFloat(input) * 1000);\n    });\n    addParseToken('x', function (input, array, config) {\n        config._d = new Date(toInt(input));\n    });\n\n    //! moment.js\n\n    hooks.version = '2.30.1';\n\n    setHookCallback(createLocal);\n\n    hooks.fn = proto;\n    hooks.min = min;\n    hooks.max = max;\n    hooks.now = now;\n    hooks.utc = createUTC;\n    hooks.unix = createUnix;\n    hooks.months = listMonths;\n    hooks.isDate = isDate;\n    hooks.locale = getSetGlobalLocale;\n    hooks.invalid = createInvalid;\n    hooks.duration = createDuration;\n    hooks.isMoment = isMoment;\n    hooks.weekdays = listWeekdays;\n    hooks.parseZone = createInZone;\n    hooks.localeData = getLocale;\n    hooks.isDuration = isDuration;\n    hooks.monthsShort = listMonthsShort;\n    hooks.weekdaysMin = listWeekdaysMin;\n    hooks.defineLocale = defineLocale;\n    hooks.updateLocale = updateLocale;\n    hooks.locales = listLocales;\n    hooks.weekdaysShort = listWeekdaysShort;\n    hooks.normalizeUnits = normalizeUnits;\n    hooks.relativeTimeRounding = getSetRelativeTimeRounding;\n    hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\n    hooks.calendarFormat = getCalendarFormat;\n    hooks.prototype = proto;\n\n    // currently HTML5 input type only supports 24-hour formats\n    hooks.HTML5_FMT = {\n        DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // <input type=\"datetime-local\" />\n        DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // <input type=\"datetime-local\" step=\"1\" />\n        DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // <input type=\"datetime-local\" step=\"0.001\" />\n        DATE: 'YYYY-MM-DD', // <input type=\"date\" />\n        TIME: 'HH:mm', // <input type=\"time\" />\n        TIME_SECONDS: 'HH:mm:ss', // <input type=\"time\" step=\"1\" />\n        TIME_MS: 'HH:mm:ss.SSS', // <input type=\"time\" step=\"0.001\" />\n        WEEK: 'GGGG-[W]WW', // <input type=\"week\" />\n        MONTH: 'YYYY-MM', // <input type=\"month\" />\n    };\n\n    return hooks;\n\n})));\n", "!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=e||self).GLightbox=t()}(this,(function(){\"use strict\";function e(e){var t=function(e,t){if(\"object\"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||\"default\");if(\"object\"!=typeof n)return n;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(\"string\"===t?String:Number)(e)}(e,\"string\");return\"symbol\"==typeof t?t:t+\"\"}function t(e){return(t=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function n(t,i){for(var n=0;n<i.length;n++){var s=i[n];s.enumerable=s.enumerable||!1,s.configurable=!0,\"value\"in s&&(s.writable=!0),Object.defineProperty(t,e(s.key),s)}}function s(e,t,i){return t&&n(e.prototype,t),i&&n(e,i),Object.defineProperty(e,\"prototype\",{writable:!1}),e}var l=Date.now();function o(){var e={},t=!0,i=0,n=arguments.length;\"[object Boolean]\"===Object.prototype.toString.call(arguments[0])&&(t=arguments[0],i++);for(var s=function(i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t&&\"[object Object]\"===Object.prototype.toString.call(i[n])?e[n]=o(!0,e[n],i[n]):e[n]=i[n])};i<n;i++){var l=arguments[i];s(l)}return e}function r(e,t){if((E(e)||e===window||e===document)&&(e=[e]),L(e)||I(e)||(e=[e]),0!=M(e))if(L(e)&&!I(e))for(var i=e.length,n=0;n<i&&!1!==t.call(e[n],e[n],n,e);n++);else if(I(e))for(var s in e)if(P(e,s)&&!1===t.call(e[s],e[s],s,e))break}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=e[l]=e[l]||[],s={all:n,evt:null,found:null};return t&&i&&M(n)>0&&r(n,(function(e,n){if(e.eventName==t&&e.fn.toString()==i.toString())return s.found=!0,s.evt=n,!1})),s}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.onElement,n=t.withCallback,s=t.avoidDuplicate,l=void 0===s||s,o=t.once,h=void 0!==o&&o,d=t.useCapture,c=void 0!==d&&d,u=arguments.length>2?arguments[2]:void 0,g=i||[];function v(e){C(n)&&n.call(u,e,this),h&&v.destroy()}return k(g)&&(g=document.querySelectorAll(g)),v.destroy=function(){r(g,(function(t){var i=a(t,e,v);i.found&&i.all.splice(i.evt,1),t.removeEventListener&&t.removeEventListener(e,v,c)}))},r(g,(function(t){var i=a(t,e,v);(t.addEventListener&&l&&!i.found||!l)&&(t.addEventListener(e,v,c),i.all.push({eventName:e,fn:v}))})),v}function d(e,t){r(t.split(\" \"),(function(t){return e.classList.add(t)}))}function c(e,t){r(t.split(\" \"),(function(t){return e.classList.remove(t)}))}function u(e,t){return e.classList.contains(t)}function g(e,t){for(;e!==document.body;){if(!(e=e.parentElement))return!1;if(\"function\"==typeof e.matches?e.matches(t):e.msMatchesSelector(t))return e}}function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:\"\",i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e||\"\"===t)return!1;if(\"none\"===t)return C(i)&&i(),!1;var n=b(),s=t.split(\" \");r(s,(function(t){d(e,\"g\"+t)})),h(n,{onElement:e,avoidDuplicate:!1,once:!0,withCallback:function(e,t){r(s,(function(e){c(t,\"g\"+e)})),C(i)&&i()}})}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:\"\";if(\"\"===t)return e.style.webkitTransform=\"\",e.style.MozTransform=\"\",e.style.msTransform=\"\",e.style.OTransform=\"\",e.style.transform=\"\",!1;e.style.webkitTransform=t,e.style.MozTransform=t,e.style.msTransform=t,e.style.OTransform=t,e.style.transform=t}function p(e){e.style.display=\"block\"}function m(e){e.style.display=\"none\"}function y(e){var t=document.createDocumentFragment(),i=document.createElement(\"div\");for(i.innerHTML=e;i.firstChild;)t.appendChild(i.firstChild);return t}function x(){return{width:window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,height:window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}}function b(){var e,t=document.createElement(\"fakeelement\"),i={animation:\"animationend\",OAnimation:\"oAnimationEnd\",MozAnimation:\"animationend\",WebkitAnimation:\"webkitAnimationEnd\"};for(e in i)if(void 0!==t.style[e])return i[e]}function S(e,t,i,n){if(e())t();else{var s;i||(i=100);var l=setInterval((function(){e()&&(clearInterval(l),s&&clearTimeout(s),t())}),i);n&&(s=setTimeout((function(){clearInterval(l)}),n))}}function w(e,t,i){if(O(e))console.error(\"Inject assets error\");else if(C(t)&&(i=t,t=!1),k(t)&&t in window)C(i)&&i();else{var n;if(-1!==e.indexOf(\".css\")){if((n=document.querySelectorAll('link[href=\"'+e+'\"]'))&&n.length>0)return void(C(i)&&i());var s=document.getElementsByTagName(\"head\")[0],l=s.querySelectorAll('link[rel=\"stylesheet\"]'),o=document.createElement(\"link\");return o.rel=\"stylesheet\",o.type=\"text/css\",o.href=e,o.media=\"all\",l?s.insertBefore(o,l[0]):s.appendChild(o),void(C(i)&&i())}if((n=document.querySelectorAll('script[src=\"'+e+'\"]'))&&n.length>0){if(C(i)){if(k(t))return S((function(){return void 0!==window[t]}),(function(){i()})),!1;i()}}else{var r=document.createElement(\"script\");r.type=\"text/javascript\",r.src=e,r.onload=function(){if(C(i)){if(k(t))return S((function(){return void 0!==window[t]}),(function(){i()})),!1;i()}},document.body.appendChild(r)}}}function T(){return\"navigator\"in window&&window.navigator.userAgent.match(/(iPad)|(iPhone)|(iPod)|(Android)|(PlayBook)|(BB10)|(BlackBerry)|(Opera Mini)|(IEMobile)|(webOS)|(MeeGo)/i)}function C(e){return\"function\"==typeof e}function k(e){return\"string\"==typeof e}function E(e){return!(!e||!e.nodeType||1!=e.nodeType)}function A(e){return Array.isArray(e)}function L(e){return e&&e.length&&isFinite(e.length)}function I(e){return\"object\"===t(e)&&null!=e&&!C(e)&&!A(e)}function O(e){return null==e}function P(e,t){return null!==e&&hasOwnProperty.call(e,t)}function M(e){if(I(e)){if(e.keys)return e.keys().length;var t=0;for(var i in e)P(e,i)&&t++;return t}return e.length}function z(e){return!isNaN(parseFloat(e))&&isFinite(e)}function X(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,t=document.querySelectorAll(\".gbtn[data-taborder]:not(.disabled)\");if(!t.length)return!1;if(1==t.length)return t[0];\"string\"==typeof e&&(e=parseInt(e));var i=[];r(t,(function(e){i.push(e.getAttribute(\"data-taborder\"))}));var n=Math.max.apply(Math,i.map((function(e){return parseInt(e)}))),s=e<0?1:e+1;s>n&&(s=\"1\");var l=i.filter((function(e){return e>=parseInt(s)})),o=l.sort()[0];return document.querySelector('.gbtn[data-taborder=\"'.concat(o,'\"]'))}function Y(e){if(e.events.hasOwnProperty(\"keyboard\"))return!1;e.events.keyboard=h(\"keydown\",{onElement:window,withCallback:function(t,i){var n=(t=t||window.event).keyCode;if(9==n){var s=document.querySelector(\".gbtn.focused\");if(!s){var l=!(!document.activeElement||!document.activeElement.nodeName)&&document.activeElement.nodeName.toLocaleLowerCase();if(\"input\"==l||\"textarea\"==l||\"button\"==l)return}t.preventDefault();var o=document.querySelectorAll(\".gbtn[data-taborder]\");if(!o||o.length<=0)return;if(!s){var r=X();return void(r&&(r.focus(),d(r,\"focused\")))}var a=X(s.getAttribute(\"data-taborder\"));c(s,\"focused\"),a&&(a.focus(),d(a,\"focused\"))}39==n&&e.nextSlide(),37==n&&e.prevSlide(),27==n&&e.close()}})}var q=s((function e(t,n){var s=this,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(i(this,e),this.img=t,this.slide=n,this.onclose=l,this.img.setZoomEvents)return!1;this.active=!1,this.zoomedIn=!1,this.dragging=!1,this.currentX=null,this.currentY=null,this.initialX=null,this.initialY=null,this.xOffset=0,this.yOffset=0,this.img.addEventListener(\"mousedown\",(function(e){return s.dragStart(e)}),!1),this.img.addEventListener(\"mouseup\",(function(e){return s.dragEnd(e)}),!1),this.img.addEventListener(\"mousemove\",(function(e){return s.drag(e)}),!1),this.img.addEventListener(\"click\",(function(e){return s.slide.classList.contains(\"dragging-nav\")?(s.zoomOut(),!1):s.zoomedIn?void(s.zoomedIn&&!s.dragging&&s.zoomOut()):s.zoomIn()}),!1),this.img.setZoomEvents=!0}),[{key:\"zoomIn\",value:function(){var e=this.widowWidth();if(!(this.zoomedIn||e<=768)){var t=this.img;if(t.setAttribute(\"data-style\",t.getAttribute(\"style\")),t.style.maxWidth=t.naturalWidth+\"px\",t.style.maxHeight=t.naturalHeight+\"px\",t.naturalWidth>e){var i=e/2-t.naturalWidth/2;this.setTranslate(this.img.parentNode,i,0)}this.slide.classList.add(\"zoomed\"),this.zoomedIn=!0}}},{key:\"zoomOut\",value:function(){this.img.parentNode.setAttribute(\"style\",\"\"),this.img.setAttribute(\"style\",this.img.getAttribute(\"data-style\")),this.slide.classList.remove(\"zoomed\"),this.zoomedIn=!1,this.currentX=null,this.currentY=null,this.initialX=null,this.initialY=null,this.xOffset=0,this.yOffset=0,this.onclose&&\"function\"==typeof this.onclose&&this.onclose()}},{key:\"dragStart\",value:function(e){e.preventDefault(),this.zoomedIn?(\"touchstart\"===e.type?(this.initialX=e.touches[0].clientX-this.xOffset,this.initialY=e.touches[0].clientY-this.yOffset):(this.initialX=e.clientX-this.xOffset,this.initialY=e.clientY-this.yOffset),e.target===this.img&&(this.active=!0,this.img.classList.add(\"dragging\"))):this.active=!1}},{key:\"dragEnd\",value:function(e){var t=this;e.preventDefault(),this.initialX=this.currentX,this.initialY=this.currentY,this.active=!1,setTimeout((function(){t.dragging=!1,t.img.isDragging=!1,t.img.classList.remove(\"dragging\")}),100)}},{key:\"drag\",value:function(e){this.active&&(e.preventDefault(),\"touchmove\"===e.type?(this.currentX=e.touches[0].clientX-this.initialX,this.currentY=e.touches[0].clientY-this.initialY):(this.currentX=e.clientX-this.initialX,this.currentY=e.clientY-this.initialY),this.xOffset=this.currentX,this.yOffset=this.currentY,this.img.isDragging=!0,this.dragging=!0,this.setTranslate(this.img,this.currentX,this.currentY))}},{key:\"onMove\",value:function(e){if(this.zoomedIn){var t=e.clientX-this.img.naturalWidth/2,i=e.clientY-this.img.naturalHeight/2;this.setTranslate(this.img,t,i)}}},{key:\"setTranslate\",value:function(e,t,i){e.style.transform=\"translate3d(\"+t+\"px, \"+i+\"px, 0)\"}},{key:\"widowWidth\",value:function(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}}]),N=s((function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e);var s=n.dragEl,l=n.toleranceX,o=void 0===l?40:l,r=n.toleranceY,a=void 0===r?65:r,h=n.slide,d=void 0===h?null:h,c=n.instance,u=void 0===c?null:c;this.el=s,this.active=!1,this.dragging=!1,this.currentX=null,this.currentY=null,this.initialX=null,this.initialY=null,this.xOffset=0,this.yOffset=0,this.direction=null,this.lastDirection=null,this.toleranceX=o,this.toleranceY=a,this.toleranceReached=!1,this.dragContainer=this.el,this.slide=d,this.instance=u,this.el.addEventListener(\"mousedown\",(function(e){return t.dragStart(e)}),!1),this.el.addEventListener(\"mouseup\",(function(e){return t.dragEnd(e)}),!1),this.el.addEventListener(\"mousemove\",(function(e){return t.drag(e)}),!1)}),[{key:\"dragStart\",value:function(e){if(this.slide.classList.contains(\"zoomed\"))this.active=!1;else{\"touchstart\"===e.type?(this.initialX=e.touches[0].clientX-this.xOffset,this.initialY=e.touches[0].clientY-this.yOffset):(this.initialX=e.clientX-this.xOffset,this.initialY=e.clientY-this.yOffset);var t=e.target.nodeName.toLowerCase();e.target.classList.contains(\"nodrag\")||g(e.target,\".nodrag\")||-1!==[\"input\",\"select\",\"textarea\",\"button\",\"a\"].indexOf(t)?this.active=!1:(e.preventDefault(),(e.target===this.el||\"img\"!==t&&g(e.target,\".gslide-inline\"))&&(this.active=!0,this.el.classList.add(\"dragging\"),this.dragContainer=g(e.target,\".ginner-container\")))}}},{key:\"dragEnd\",value:function(e){var t=this;e&&e.preventDefault(),this.initialX=0,this.initialY=0,this.currentX=null,this.currentY=null,this.initialX=null,this.initialY=null,this.xOffset=0,this.yOffset=0,this.active=!1,this.doSlideChange&&(this.instance.preventOutsideClick=!0,\"right\"==this.doSlideChange&&this.instance.prevSlide(),\"left\"==this.doSlideChange&&this.instance.nextSlide()),this.doSlideClose&&this.instance.close(),this.toleranceReached||this.setTranslate(this.dragContainer,0,0,!0),setTimeout((function(){t.instance.preventOutsideClick=!1,t.toleranceReached=!1,t.lastDirection=null,t.dragging=!1,t.el.isDragging=!1,t.el.classList.remove(\"dragging\"),t.slide.classList.remove(\"dragging-nav\"),t.dragContainer.style.transform=\"\",t.dragContainer.style.transition=\"\"}),100)}},{key:\"drag\",value:function(e){if(this.active){e.preventDefault(),this.slide.classList.add(\"dragging-nav\"),\"touchmove\"===e.type?(this.currentX=e.touches[0].clientX-this.initialX,this.currentY=e.touches[0].clientY-this.initialY):(this.currentX=e.clientX-this.initialX,this.currentY=e.clientY-this.initialY),this.xOffset=this.currentX,this.yOffset=this.currentY,this.el.isDragging=!0,this.dragging=!0,this.doSlideChange=!1,this.doSlideClose=!1;var t=Math.abs(this.currentX),i=Math.abs(this.currentY);if(t>0&&t>=Math.abs(this.currentY)&&(!this.lastDirection||\"x\"==this.lastDirection)){this.yOffset=0,this.lastDirection=\"x\",this.setTranslate(this.dragContainer,this.currentX,0);var n=this.shouldChange();if(!this.instance.settings.dragAutoSnap&&n&&(this.doSlideChange=n),this.instance.settings.dragAutoSnap&&n)return this.instance.preventOutsideClick=!0,this.toleranceReached=!0,this.active=!1,this.instance.preventOutsideClick=!0,this.dragEnd(null),\"right\"==n&&this.instance.prevSlide(),void(\"left\"==n&&this.instance.nextSlide())}if(this.toleranceY>0&&i>0&&i>=t&&(!this.lastDirection||\"y\"==this.lastDirection)){this.xOffset=0,this.lastDirection=\"y\",this.setTranslate(this.dragContainer,0,this.currentY);var s=this.shouldClose();return!this.instance.settings.dragAutoSnap&&s&&(this.doSlideClose=!0),void(this.instance.settings.dragAutoSnap&&s&&this.instance.close())}}}},{key:\"shouldChange\",value:function(){var e=!1;if(Math.abs(this.currentX)>=this.toleranceX){var t=this.currentX>0?\"right\":\"left\";(\"left\"==t&&this.slide!==this.slide.parentNode.lastChild||\"right\"==t&&this.slide!==this.slide.parentNode.firstChild)&&(e=t)}return e}},{key:\"shouldClose\",value:function(){var e=!1;return Math.abs(this.currentY)>=this.toleranceY&&(e=!0),e}},{key:\"setTranslate\",value:function(e,t,i){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e.style.transition=n?\"all .2s ease\":\"\",e.style.transform=\"translate3d(\".concat(t,\"px, \").concat(i,\"px, 0)\")}}]);function D(e,t,i,n){var s=e.querySelector(\".gslide-media\"),l=new Image,o=\"gSlideTitle_\"+i,r=\"gSlideDesc_\"+i;l.addEventListener(\"load\",(function(){C(n)&&n()}),!1),l.src=t.href,\"\"!=t.sizes&&\"\"!=t.srcset&&(l.sizes=t.sizes,l.srcset=t.srcset),l.alt=\"\",O(t.alt)||\"\"===t.alt||(l.alt=t.alt),\"\"!==t.title&&l.setAttribute(\"aria-labelledby\",o),\"\"!==t.description&&l.setAttribute(\"aria-describedby\",r),t.hasOwnProperty(\"_hasCustomWidth\")&&t._hasCustomWidth&&(l.style.width=t.width),t.hasOwnProperty(\"_hasCustomHeight\")&&t._hasCustomHeight&&(l.style.height=t.height),s.insertBefore(l,s.firstChild)}function _(e,t,i,n){var s=this,l=e.querySelector(\".ginner-container\"),o=\"gvideo\"+i,r=e.querySelector(\".gslide-media\"),a=this.getAllPlayers();d(l,\"gvideo-container\"),r.insertBefore(y('<div class=\"gvideo-wrapper\"></div>'),r.firstChild);var h=e.querySelector(\".gvideo-wrapper\");w(this.settings.plyr.css,\"Plyr\");var c=t.href,u=null==t?void 0:t.videoProvider,g=!1;r.style.maxWidth=t.width,w(this.settings.plyr.js,\"Plyr\",(function(){if(!u&&c.match(/vimeo\\.com\\/([0-9]*)/)&&(u=\"vimeo\"),!u&&(c.match(/(youtube\\.com|youtube-nocookie\\.com)\\/watch\\?v=([a-zA-Z0-9\\-_]+)/)||c.match(/youtu\\.be\\/([a-zA-Z0-9\\-_]+)/)||c.match(/(youtube\\.com|youtube-nocookie\\.com)\\/embed\\/([a-zA-Z0-9\\-_]+)/)||c.match(/(youtube\\.com|youtube-nocookie\\.com)\\/shorts\\/([a-zA-Z0-9\\-_]+)/))&&(u=\"youtube\"),\"local\"===u||!u){u=\"local\";var l='<video id=\"'+o+'\" ';l+='style=\"background:#000; max-width: '.concat(t.width,';\" '),l+='preload=\"metadata\" ',l+='x-webkit-airplay=\"allow\" ',l+=\"playsinline \",l+=\"controls \",l+='class=\"gvideo-local\">',l+='<source src=\"'.concat(c,'\">'),g=y(l+=\"</video>\")}var r=g||y('<div id=\"'.concat(o,'\" data-plyr-provider=\"').concat(u,'\" data-plyr-embed-id=\"').concat(c,'\"></div>'));d(h,\"\".concat(u,\"-video gvideo\")),h.appendChild(r),h.setAttribute(\"data-id\",o),h.setAttribute(\"data-index\",i);var v=P(s.settings.plyr,\"config\")?s.settings.plyr.config:{},f=new Plyr(\"#\"+o,v);f.on(\"ready\",(function(e){a[o]=e.detail.plyr,C(n)&&n()})),S((function(){return e.querySelector(\"iframe\")&&\"true\"==e.querySelector(\"iframe\").dataset.ready}),(function(){s.resize(e)})),f.on(\"enterfullscreen\",W),f.on(\"exitfullscreen\",W)}))}function W(e){var t=g(e.target,\".gslide-media\");\"enterfullscreen\"===e.type&&d(t,\"fullscreen\"),\"exitfullscreen\"===e.type&&c(t,\"fullscreen\")}function B(e,t,i,n){var s,l=this,o=e.querySelector(\".gslide-media\"),r=!(!P(t,\"href\")||!t.href)&&t.href.split(\"#\").pop().trim(),a=!(!P(t,\"content\")||!t.content)&&t.content;if(a&&(k(a)&&(s=y('<div class=\"ginlined-content\">'.concat(a,\"</div>\"))),E(a))){\"none\"==a.style.display&&(a.style.display=\"block\");var c=document.createElement(\"div\");c.className=\"ginlined-content\",c.appendChild(a),s=c}if(r){var u=document.getElementById(r);if(!u)return!1;var g=u.cloneNode(!0);g.style.height=t.height,g.style.maxWidth=t.width,d(g,\"ginlined-content\"),s=g}if(!s)return console.error(\"Unable to append inline slide content\",t),!1;o.style.height=t.height,o.style.width=t.width,o.appendChild(s),this.events[\"inlineclose\"+r]=h(\"click\",{onElement:o.querySelectorAll(\".gtrigger-close\"),withCallback:function(e){e.preventDefault(),l.close()}}),C(n)&&n()}function H(e,t,i,n){var s=e.querySelector(\".gslide-media\"),l=function(e){var t=e.url,i=e.allow,n=e.callback,s=e.appendTo,l=document.createElement(\"iframe\");return l.className=\"vimeo-video gvideo\",l.src=t,l.style.width=\"100%\",l.style.height=\"100%\",i&&l.setAttribute(\"allow\",i),l.onload=function(){l.onload=null,d(l,\"node-ready\"),C(n)&&n()},s&&s.appendChild(l),l}({url:t.href,callback:n});s.parentNode.style.maxWidth=t.width,s.parentNode.style.height=t.height,s.appendChild(l)}var j=s((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e),this.defaults={href:\"\",sizes:\"\",srcset:\"\",title:\"\",type:\"\",videoProvider:\"\",description:\"\",alt:\"\",descPosition:\"bottom\",effect:\"\",width:\"\",height:\"\",content:!1,zoomable:!0,draggable:!0},I(t)&&(this.defaults=o(this.defaults,t))}),[{key:\"sourceType\",value:function(e){var t=e;return null!==(e=e.toLowerCase()).match(/\\.(jpeg|jpg|jpe|gif|png|apn|webp|avif|svg)/)?\"image\":e.match(/(youtube\\.com|youtube-nocookie\\.com)\\/watch\\?v=([a-zA-Z0-9\\-_]+)/)||e.match(/youtu\\.be\\/([a-zA-Z0-9\\-_]+)/)||e.match(/(youtube\\.com|youtube-nocookie\\.com)\\/embed\\/([a-zA-Z0-9\\-_]+)/)||e.match(/(youtube\\.com|youtube-nocookie\\.com)\\/shorts\\/([a-zA-Z0-9\\-_]+)/)||e.match(/vimeo\\.com\\/([0-9]*)/)||null!==e.match(/\\.(mp4|ogg|webm|mov)/)?\"video\":null!==e.match(/\\.(mp3|wav|wma|aac|ogg)/)?\"audio\":e.indexOf(\"#\")>-1&&\"\"!==t.split(\"#\").pop().trim()?\"inline\":e.indexOf(\"goajax=true\")>-1?\"ajax\":\"external\"}},{key:\"parseConfig\",value:function(e,t){var i=this,n=o({descPosition:t.descPosition},this.defaults);if(I(e)&&!E(e)){P(e,\"type\")||(P(e,\"content\")&&e.content?e.type=\"inline\":P(e,\"href\")&&(e.type=this.sourceType(e.href)));var s=o(n,e);return this.setSize(s,t),s}var l=\"\",a=e.getAttribute(\"data-glightbox\"),h=e.nodeName.toLowerCase();if(\"a\"===h&&(l=e.href),\"img\"===h&&(l=e.src,n.alt=e.alt),n.href=l,r(n,(function(s,l){P(t,l)&&\"width\"!==l&&(n[l]=t[l]);var o=e.dataset[l];O(o)||(n[l]=i.sanitizeValue(o))})),n.content&&(n.type=\"inline\"),!n.type&&l&&(n.type=this.sourceType(l)),O(a)){if(!n.title&&\"a\"==h){var d=e.title;O(d)||\"\"===d||(n.title=d)}if(!n.title&&\"img\"==h){var c=e.alt;O(c)||\"\"===c||(n.title=c)}}else{var u=[];r(n,(function(e,t){u.push(\";\\\\s?\"+t)})),u=u.join(\"\\\\s?:|\"),\"\"!==a.trim()&&r(n,(function(e,t){var s=a,l=new RegExp(\"s?\"+t+\"s?:s?(.*?)(\"+u+\"s?:|$)\"),o=s.match(l);if(o&&o.length&&o[1]){var r=o[1].trim().replace(/;\\s*$/,\"\");n[t]=i.sanitizeValue(r)}}))}if(n.description&&\".\"===n.description.substring(0,1)){var g;try{g=document.querySelector(n.description).innerHTML}catch(e){if(!(e instanceof DOMException))throw e}g&&(n.description=g)}if(!n.description){var v=e.querySelector(\".glightbox-desc\");v&&(n.description=v.innerHTML)}return this.setSize(n,t,e),this.slideConfig=n,n}},{key:\"setSize\",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=\"video\"==e.type?this.checkSize(t.videosWidth):this.checkSize(t.width),s=this.checkSize(t.height);return e.width=P(e,\"width\")&&\"\"!==e.width?this.checkSize(e.width):n,e.height=P(e,\"height\")&&\"\"!==e.height?this.checkSize(e.height):s,i&&\"image\"==e.type&&(e._hasCustomWidth=!!i.dataset.width,e._hasCustomHeight=!!i.dataset.height),e}},{key:\"checkSize\",value:function(e){return z(e)?\"\".concat(e,\"px\"):e}},{key:\"sanitizeValue\",value:function(e){return\"true\"!==e&&\"false\"!==e?e:\"true\"===e}}]),V=s((function e(t,n,s){i(this,e),this.element=t,this.instance=n,this.index=s}),[{key:\"setContent\",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(u(t,\"loaded\"))return!1;var n=this.instance.settings,s=this.slideConfig,l=T();C(n.beforeSlideLoad)&&n.beforeSlideLoad({index:this.index,slide:t,player:!1});var o=s.type,r=s.descPosition,a=t.querySelector(\".gslide-media\"),h=t.querySelector(\".gslide-title\"),c=t.querySelector(\".gslide-desc\"),g=t.querySelector(\".gdesc-inner\"),v=i,f=\"gSlideTitle_\"+this.index,p=\"gSlideDesc_\"+this.index;if(C(n.afterSlideLoad)&&(v=function(){C(i)&&i(),n.afterSlideLoad({index:e.index,slide:t,player:e.instance.getSlidePlayerInstance(e.index)})}),\"\"==s.title&&\"\"==s.description?g&&g.parentNode.parentNode.removeChild(g.parentNode):(h&&\"\"!==s.title?(h.id=f,h.innerHTML=s.title):h.parentNode.removeChild(h),c&&\"\"!==s.description?(c.id=p,l&&n.moreLength>0?(s.smallDescription=this.slideShortDesc(s.description,n.moreLength,n.moreText),c.innerHTML=s.smallDescription,this.descriptionEvents(c,s)):c.innerHTML=s.description):c.parentNode.removeChild(c),d(a.parentNode,\"desc-\".concat(r)),d(g.parentNode,\"description-\".concat(r))),d(a,\"gslide-\".concat(o)),d(t,\"loaded\"),\"video\"!==o){if(\"external\"!==o)return\"inline\"===o?(B.apply(this.instance,[t,s,this.index,v]),void(s.draggable&&new N({dragEl:t.querySelector(\".gslide-inline\"),toleranceX:n.dragToleranceX,toleranceY:n.dragToleranceY,slide:t,instance:this.instance}))):void(\"image\"!==o?C(v)&&v():D(t,s,this.index,(function(){var i=t.querySelector(\"img\");s.draggable&&new N({dragEl:i,toleranceX:n.dragToleranceX,toleranceY:n.dragToleranceY,slide:t,instance:e.instance}),s.zoomable&&i.naturalWidth>i.offsetWidth&&(d(i,\"zoomable\"),new q(i,t,(function(){e.instance.resize()}))),C(v)&&v()})));H.apply(this,[t,s,this.index,v])}else _.apply(this.instance,[t,s,this.index,v])}},{key:\"slideShortDesc\",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=document.createElement(\"div\");n.innerHTML=e;var s=n.innerText,l=i;if((e=s.trim()).length<=t)return e;var o=e.substr(0,t-1);return l?(n=null,o+'... <a href=\"#\" class=\"desc-more\">'+i+\"</a>\"):o}},{key:\"descriptionEvents\",value:function(e,t){var i=this,n=e.querySelector(\".desc-more\");if(!n)return!1;h(\"click\",{onElement:n,withCallback:function(e,n){e.preventDefault();var s=document.body,l=g(n,\".gslide-desc\");if(!l)return!1;l.innerHTML=t.description,d(s,\"gdesc-open\");var o=h(\"click\",{onElement:[s,g(l,\".gslide-description\")],withCallback:function(e,n){\"a\"!==e.target.nodeName.toLowerCase()&&(c(s,\"gdesc-open\"),d(s,\"gdesc-closed\"),l.innerHTML=t.smallDescription,i.descriptionEvents(l,t),setTimeout((function(){c(s,\"gdesc-closed\")}),400),o.destroy())}})}})}},{key:\"create\",value:function(){return y(this.instance.settings.slideHTML)}},{key:\"getConfig\",value:function(){E(this.element)||this.element.hasOwnProperty(\"draggable\")||(this.element.draggable=this.instance.settings.draggable);var e=new j(this.instance.settings.slideExtraAttributes);return this.slideConfig=e.parseConfig(this.element,this.instance.settings),this.slideConfig}}]);function F(e){return Math.sqrt(e.x*e.x+e.y*e.y)}function R(e,t){var i=function(e,t){var i=F(e)*F(t);if(0===i)return 0;var n=function(e,t){return e.x*t.x+e.y*t.y}(e,t)/i;return n>1&&(n=1),Math.acos(n)}(e,t);return function(e,t){return e.x*t.y-t.x*e.y}(e,t)>0&&(i*=-1),180*i/Math.PI}var G=s((function e(t){i(this,e),this.handlers=[],this.el=t}),[{key:\"add\",value:function(e){this.handlers.push(e)}},{key:\"del\",value:function(e){e||(this.handlers=[]);for(var t=this.handlers.length;t>=0;t--)this.handlers[t]===e&&this.handlers.splice(t,1)}},{key:\"dispatch\",value:function(){for(var e=0,t=this.handlers.length;e<t;e++){var i=this.handlers[e];\"function\"==typeof i&&i.apply(this.el,arguments)}}}]);function Z(e,t){var i=new G(e);return i.add(t),i}var U=s((function e(t,n){i(this,e),this.element=\"string\"==typeof t?document.querySelector(t):t,this.start=this.start.bind(this),this.move=this.move.bind(this),this.end=this.end.bind(this),this.cancel=this.cancel.bind(this),this.element.addEventListener(\"touchstart\",this.start,!1),this.element.addEventListener(\"touchmove\",this.move,!1),this.element.addEventListener(\"touchend\",this.end,!1),this.element.addEventListener(\"touchcancel\",this.cancel,!1),this.preV={x:null,y:null},this.pinchStartLen=null,this.zoom=1,this.isDoubleTap=!1;var s=function(){};this.rotate=Z(this.element,n.rotate||s),this.touchStart=Z(this.element,n.touchStart||s),this.multipointStart=Z(this.element,n.multipointStart||s),this.multipointEnd=Z(this.element,n.multipointEnd||s),this.pinch=Z(this.element,n.pinch||s),this.swipe=Z(this.element,n.swipe||s),this.tap=Z(this.element,n.tap||s),this.doubleTap=Z(this.element,n.doubleTap||s),this.longTap=Z(this.element,n.longTap||s),this.singleTap=Z(this.element,n.singleTap||s),this.pressMove=Z(this.element,n.pressMove||s),this.twoFingerPressMove=Z(this.element,n.twoFingerPressMove||s),this.touchMove=Z(this.element,n.touchMove||s),this.touchEnd=Z(this.element,n.touchEnd||s),this.touchCancel=Z(this.element,n.touchCancel||s),this.translateContainer=this.element,this._cancelAllHandler=this.cancelAll.bind(this),window.addEventListener(\"scroll\",this._cancelAllHandler),this.delta=null,this.last=null,this.now=null,this.tapTimeout=null,this.singleTapTimeout=null,this.longTapTimeout=null,this.swipeTimeout=null,this.x1=this.x2=this.y1=this.y2=null,this.preTapPosition={x:null,y:null}}),[{key:\"start\",value:function(e){if(e.touches)if(e.target&&e.target.nodeName&&[\"a\",\"button\",\"input\"].indexOf(e.target.nodeName.toLowerCase())>=0)console.log(\"ignore drag for this touched element\",e.target.nodeName.toLowerCase());else{this.now=Date.now(),this.x1=e.touches[0].pageX,this.y1=e.touches[0].pageY,this.delta=this.now-(this.last||this.now),this.touchStart.dispatch(e,this.element),null!==this.preTapPosition.x&&(this.isDoubleTap=this.delta>0&&this.delta<=250&&Math.abs(this.preTapPosition.x-this.x1)<30&&Math.abs(this.preTapPosition.y-this.y1)<30,this.isDoubleTap&&clearTimeout(this.singleTapTimeout)),this.preTapPosition.x=this.x1,this.preTapPosition.y=this.y1,this.last=this.now;var t=this.preV;if(e.touches.length>1){this._cancelLongTap(),this._cancelSingleTap();var i={x:e.touches[1].pageX-this.x1,y:e.touches[1].pageY-this.y1};t.x=i.x,t.y=i.y,this.pinchStartLen=F(t),this.multipointStart.dispatch(e,this.element)}this._preventTap=!1,this.longTapTimeout=setTimeout(function(){this.longTap.dispatch(e,this.element),this._preventTap=!0}.bind(this),750)}}},{key:\"move\",value:function(e){if(e.touches){var t=this.preV,i=e.touches.length,n=e.touches[0].pageX,s=e.touches[0].pageY;if(this.isDoubleTap=!1,i>1){var l=e.touches[1].pageX,o=e.touches[1].pageY,r={x:e.touches[1].pageX-n,y:e.touches[1].pageY-s};null!==t.x&&(this.pinchStartLen>0&&(e.zoom=F(r)/this.pinchStartLen,this.pinch.dispatch(e,this.element)),e.angle=R(r,t),this.rotate.dispatch(e,this.element)),t.x=r.x,t.y=r.y,null!==this.x2&&null!==this.sx2?(e.deltaX=(n-this.x2+l-this.sx2)/2,e.deltaY=(s-this.y2+o-this.sy2)/2):(e.deltaX=0,e.deltaY=0),this.twoFingerPressMove.dispatch(e,this.element),this.sx2=l,this.sy2=o}else{if(null!==this.x2){e.deltaX=n-this.x2,e.deltaY=s-this.y2;var a=Math.abs(this.x1-this.x2),h=Math.abs(this.y1-this.y2);(a>10||h>10)&&(this._preventTap=!0)}else e.deltaX=0,e.deltaY=0;this.pressMove.dispatch(e,this.element)}this.touchMove.dispatch(e,this.element),this._cancelLongTap(),this.x2=n,this.y2=s,i>1&&e.preventDefault()}}},{key:\"end\",value:function(e){if(e.changedTouches){this._cancelLongTap();var t=this;e.touches.length<2&&(this.multipointEnd.dispatch(e,this.element),this.sx2=this.sy2=null),this.x2&&Math.abs(this.x1-this.x2)>30||this.y2&&Math.abs(this.y1-this.y2)>30?(e.direction=this._swipeDirection(this.x1,this.x2,this.y1,this.y2),this.swipeTimeout=setTimeout((function(){t.swipe.dispatch(e,t.element)}),0)):(this.tapTimeout=setTimeout((function(){t._preventTap||t.tap.dispatch(e,t.element),t.isDoubleTap&&(t.doubleTap.dispatch(e,t.element),t.isDoubleTap=!1)}),0),t.isDoubleTap||(t.singleTapTimeout=setTimeout((function(){t.singleTap.dispatch(e,t.element)}),250))),this.touchEnd.dispatch(e,this.element),this.preV.x=0,this.preV.y=0,this.zoom=1,this.pinchStartLen=null,this.x1=this.x2=this.y1=this.y2=null}}},{key:\"cancelAll\",value:function(){this._preventTap=!0,clearTimeout(this.singleTapTimeout),clearTimeout(this.tapTimeout),clearTimeout(this.longTapTimeout),clearTimeout(this.swipeTimeout)}},{key:\"cancel\",value:function(e){this.cancelAll(),this.touchCancel.dispatch(e,this.element)}},{key:\"_cancelLongTap\",value:function(){clearTimeout(this.longTapTimeout)}},{key:\"_cancelSingleTap\",value:function(){clearTimeout(this.singleTapTimeout)}},{key:\"_swipeDirection\",value:function(e,t,i,n){return Math.abs(e-t)>=Math.abs(i-n)?e-t>0?\"Left\":\"Right\":i-n>0?\"Up\":\"Down\"}},{key:\"on\",value:function(e,t){this[e]&&this[e].add(t)}},{key:\"off\",value:function(e,t){this[e]&&this[e].del(t)}},{key:\"destroy\",value:function(){return this.singleTapTimeout&&clearTimeout(this.singleTapTimeout),this.tapTimeout&&clearTimeout(this.tapTimeout),this.longTapTimeout&&clearTimeout(this.longTapTimeout),this.swipeTimeout&&clearTimeout(this.swipeTimeout),this.element.removeEventListener(\"touchstart\",this.start),this.element.removeEventListener(\"touchmove\",this.move),this.element.removeEventListener(\"touchend\",this.end),this.element.removeEventListener(\"touchcancel\",this.cancel),this.rotate.del(),this.touchStart.del(),this.multipointStart.del(),this.multipointEnd.del(),this.pinch.del(),this.swipe.del(),this.tap.del(),this.doubleTap.del(),this.longTap.del(),this.singleTap.del(),this.pressMove.del(),this.twoFingerPressMove.del(),this.touchMove.del(),this.touchEnd.del(),this.touchCancel.del(),this.preV=this.pinchStartLen=this.zoom=this.isDoubleTap=this.delta=this.last=this.now=this.tapTimeout=this.singleTapTimeout=this.longTapTimeout=this.swipeTimeout=this.x1=this.x2=this.y1=this.y2=this.preTapPosition=this.rotate=this.touchStart=this.multipointStart=this.multipointEnd=this.pinch=this.swipe=this.tap=this.doubleTap=this.longTap=this.singleTap=this.pressMove=this.touchMove=this.touchEnd=this.touchCancel=this.twoFingerPressMove=null,window.removeEventListener(\"scroll\",this._cancelAllHandler),null}}]);function $(e){var t=function(){var e,t=document.createElement(\"fakeelement\"),i={transition:\"transitionend\",OTransition:\"oTransitionEnd\",MozTransition:\"transitionend\",WebkitTransition:\"webkitTransitionEnd\"};for(e in i)if(void 0!==t.style[e])return i[e]}(),i=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,n=u(e,\"gslide-media\")?e:e.querySelector(\".gslide-media\"),s=g(n,\".ginner-container\"),l=e.querySelector(\".gslide-description\");i>769&&(n=s),d(n,\"greset\"),f(n,\"translate3d(0, 0, 0)\"),h(t,{onElement:n,once:!0,withCallback:function(e,t){c(n,\"greset\")}}),n.style.opacity=\"\",l&&(l.style.opacity=\"\")}function J(e){if(e.events.hasOwnProperty(\"touch\"))return!1;var t,i,n,s=x(),l=s.width,o=s.height,r=!1,a=null,h=null,v=null,p=!1,m=1,y=1,b=!1,S=!1,w=null,T=null,C=null,k=null,E=0,A=0,L=!1,I=!1,O={},P={},M=0,z=0,X=document.getElementById(\"glightbox-slider\"),Y=document.querySelector(\".goverlay\"),q=new U(X,{touchStart:function(t){if(r=!0,(u(t.targetTouches[0].target,\"ginner-container\")||g(t.targetTouches[0].target,\".gslide-desc\")||\"a\"==t.targetTouches[0].target.nodeName.toLowerCase())&&(r=!1),g(t.targetTouches[0].target,\".gslide-inline\")&&!u(t.targetTouches[0].target.parentNode,\"gslide-inline\")&&(r=!1),r){if(P=t.targetTouches[0],O.pageX=t.targetTouches[0].pageX,O.pageY=t.targetTouches[0].pageY,M=t.targetTouches[0].clientX,z=t.targetTouches[0].clientY,a=e.activeSlide,h=a.querySelector(\".gslide-media\"),n=a.querySelector(\".gslide-inline\"),v=null,u(h,\"gslide-image\")&&(v=h.querySelector(\"img\")),(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)>769&&(h=a.querySelector(\".ginner-container\")),c(Y,\"greset\"),t.pageX>20&&t.pageX<window.innerWidth-20)return;t.preventDefault()}},touchMove:function(s){if(r&&(P=s.targetTouches[0],!b&&!S)){if(n&&n.offsetHeight>o){var a=O.pageX-P.pageX;if(Math.abs(a)<=13)return!1}p=!0;var d,c=s.targetTouches[0].clientX,u=s.targetTouches[0].clientY,g=M-c,m=z-u;if(Math.abs(g)>Math.abs(m)?(L=!1,I=!0):(I=!1,L=!0),t=P.pageX-O.pageX,E=100*t/l,i=P.pageY-O.pageY,A=100*i/o,L&&v&&(d=1-Math.abs(i)/o,Y.style.opacity=d,e.settings.touchFollowAxis&&(E=0)),I&&(d=1-Math.abs(t)/l,h.style.opacity=d,e.settings.touchFollowAxis&&(A=0)),!v)return f(h,\"translate3d(\".concat(E,\"%, 0, 0)\"));f(h,\"translate3d(\".concat(E,\"%, \").concat(A,\"%, 0)\"))}},touchEnd:function(){if(r){if(p=!1,S||b)return C=w,void(k=T);var t=Math.abs(parseInt(A)),i=Math.abs(parseInt(E));if(!(t>29&&v))return t<29&&i<25?(d(Y,\"greset\"),Y.style.opacity=1,$(h)):void 0;e.close()}},multipointEnd:function(){setTimeout((function(){b=!1}),50)},multipointStart:function(){b=!0,m=y||1},pinch:function(e){if(!v||p)return!1;b=!0,v.scaleX=v.scaleY=m*e.zoom;var t=m*e.zoom;if(S=!0,t<=1)return S=!1,t=1,k=null,C=null,w=null,T=null,void v.setAttribute(\"style\",\"\");t>4.5&&(t=4.5),v.style.transform=\"scale3d(\".concat(t,\", \").concat(t,\", 1)\"),y=t},pressMove:function(e){if(S&&!b){var t=P.pageX-O.pageX,i=P.pageY-O.pageY;C&&(t+=C),k&&(i+=k),w=t,T=i;var n=\"translate3d(\".concat(t,\"px, \").concat(i,\"px, 0)\");y&&(n+=\" scale3d(\".concat(y,\", \").concat(y,\", 1)\")),f(v,n)}},swipe:function(t){if(!S)if(b)b=!1;else{if(\"Left\"==t.direction){if(e.index==e.elements.length-1)return $(h);e.nextSlide()}if(\"Right\"==t.direction){if(0==e.index)return $(h);e.prevSlide()}}}});e.events.touch=q}var K=T(),Q=null!==T()||void 0!==document.createTouch||\"ontouchstart\"in window||\"onmsgesturechange\"in window||navigator.msMaxTouchPoints,ee=document.getElementsByTagName(\"html\")[0],te={selector:\".glightbox\",elements:null,skin:\"clean\",theme:\"clean\",closeButton:!0,startAt:null,autoplayVideos:!0,autofocusVideos:!0,descPosition:\"bottom\",width:\"900px\",height:\"506px\",videosWidth:\"960px\",beforeSlideChange:null,afterSlideChange:null,beforeSlideLoad:null,afterSlideLoad:null,slideInserted:null,slideRemoved:null,slideExtraAttributes:null,onOpen:null,onClose:null,loop:!1,zoomable:!0,draggable:!0,dragAutoSnap:!1,dragToleranceX:40,dragToleranceY:65,preload:!0,oneSlidePerOpen:!1,touchNavigation:!0,touchFollowAxis:!0,keyboardNavigation:!0,closeOnOutsideClick:!0,plugins:!1,plyr:{css:\"https://cdn.plyr.io/3.6.12/plyr.css\",js:\"https://cdn.plyr.io/3.6.12/plyr.js\",config:{ratio:\"16:9\",fullscreen:{enabled:!0,iosNative:!0},youtube:{noCookie:!0,rel:0,showinfo:0,iv_load_policy:3},vimeo:{byline:!1,portrait:!1,title:!1,transparent:!1}}},openEffect:\"zoom\",closeEffect:\"zoom\",slideEffect:\"slide\",moreText:\"See more\",moreLength:60,cssEfects:{fade:{in:\"fadeIn\",out:\"fadeOut\"},zoom:{in:\"zoomIn\",out:\"zoomOut\"},slide:{in:\"slideInRight\",out:\"slideOutLeft\"},slideBack:{in:\"slideInLeft\",out:\"slideOutRight\"},none:{in:\"none\",out:\"none\"}},svg:{close:'<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 512 512\" xml:space=\"preserve\"><g><g><path d=\"M505.943,6.058c-8.077-8.077-21.172-8.077-29.249,0L6.058,476.693c-8.077,8.077-8.077,21.172,0,29.249C10.096,509.982,15.39,512,20.683,512c5.293,0,10.586-2.019,14.625-6.059L505.943,35.306C514.019,27.23,514.019,14.135,505.943,6.058z\"/></g></g><g><g><path d=\"M505.942,476.694L35.306,6.059c-8.076-8.077-21.172-8.077-29.248,0c-8.077,8.076-8.077,21.171,0,29.248l470.636,470.636c4.038,4.039,9.332,6.058,14.625,6.058c5.293,0,10.587-2.019,14.624-6.057C514.018,497.866,514.018,484.771,505.942,476.694z\"/></g></g></svg>',next:'<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 477.175 477.175\" xml:space=\"preserve\"> <g><path d=\"M360.731,229.075l-225.1-225.1c-5.3-5.3-13.8-5.3-19.1,0s-5.3,13.8,0,19.1l215.5,215.5l-215.5,215.5c-5.3,5.3-5.3,13.8,0,19.1c2.6,2.6,6.1,4,9.5,4c3.4,0,6.9-1.3,9.5-4l225.1-225.1C365.931,242.875,365.931,234.275,360.731,229.075z\"/></g></svg>',prev:'<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 477.175 477.175\" xml:space=\"preserve\"><g><path d=\"M145.188,238.575l215.5-215.5c5.3-5.3,5.3-13.8,0-19.1s-13.8-5.3-19.1,0l-225.1,225.1c-5.3,5.3-5.3,13.8,0,19.1l225.1,225c2.6,2.6,6.1,4,9.5,4s6.9-1.3,9.5-4c5.3-5.3,5.3-13.8,0-19.1L145.188,238.575z\"/></g></svg>'},slideHTML:'<div class=\"gslide\">\\n    <div class=\"gslide-inner-content\">\\n        <div class=\"ginner-container\">\\n            <div class=\"gslide-media\">\\n            </div>\\n            <div class=\"gslide-description\">\\n                <div class=\"gdesc-inner\">\\n                    <h4 class=\"gslide-title\"></h4>\\n                    <div class=\"gslide-desc\"></div>\\n                </div>\\n            </div>\\n        </div>\\n    </div>\\n</div>',lightboxHTML:'<div id=\"glightbox-body\" class=\"glightbox-container\" tabindex=\"-1\" role=\"dialog\" aria-hidden=\"false\">\\n    <div class=\"gloader visible\"></div>\\n    <div class=\"goverlay\"></div>\\n    <div class=\"gcontainer\">\\n    <div id=\"glightbox-slider\" class=\"gslider\"></div>\\n    <button class=\"gclose gbtn\" aria-label=\"Close\" data-taborder=\"3\">{closeSVG}</button>\\n    <button class=\"gprev gbtn\" aria-label=\"Previous\" data-taborder=\"2\">{prevSVG}</button>\\n    <button class=\"gnext gbtn\" aria-label=\"Next\" data-taborder=\"1\">{nextSVG}</button>\\n</div>\\n</div>'},ie=s((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e),this.customOptions=t,this.settings=o(te,t),this.effectsClasses=this.getAnimationClasses(),this.videoPlayers={},this.apiEvents=[],this.fullElementsList=!1}),[{key:\"init\",value:function(){var e=this,t=this.getSelector();t&&(this.baseEvents=h(\"click\",{onElement:t,withCallback:function(t,i){t.preventDefault(),e.open(i)}})),this.elements=this.getElements()}},{key:\"open\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(0===this.elements.length)return!1;this.activeSlide=null,this.prevActiveSlideIndex=null,this.prevActiveSlide=null;var i=z(t)?t:this.settings.startAt;if(E(e)){var n=e.getAttribute(\"data-gallery\");n&&(this.fullElementsList=this.elements,this.elements=this.getGalleryElements(this.elements,n)),O(i)&&(i=this.getElementIndex(e))<0&&(i=0)}z(i)||(i=0),this.build(),v(this.overlay,\"none\"===this.settings.openEffect?\"none\":this.settings.cssEfects.fade.in);var s=document.body,l=window.innerWidth-document.documentElement.clientWidth;if(l>0){var o=document.createElement(\"style\");o.type=\"text/css\",o.className=\"gcss-styles\",o.innerText=\".gscrollbar-fixer {margin-right: \".concat(l,\"px}\"),document.head.appendChild(o),d(s,\"gscrollbar-fixer\")}d(s,\"glightbox-open\"),d(ee,\"glightbox-open\"),K&&(d(document.body,\"glightbox-mobile\"),this.settings.slideEffect=\"slide\"),this.showSlide(i,!0),1===this.elements.length?(d(this.prevButton,\"glightbox-button-hidden\"),d(this.nextButton,\"glightbox-button-hidden\")):(c(this.prevButton,\"glightbox-button-hidden\"),c(this.nextButton,\"glightbox-button-hidden\")),this.lightboxOpen=!0,this.trigger(\"open\"),C(this.settings.onOpen)&&this.settings.onOpen(),Q&&this.settings.touchNavigation&&J(this),this.settings.keyboardNavigation&&Y(this)}},{key:\"openAt\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.open(null,e)}},{key:\"showSlide\",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];p(this.loader),this.index=parseInt(t);var n=this.slidesContainer.querySelector(\".current\");n&&c(n,\"current\"),this.slideAnimateOut();var s=this.slidesContainer.querySelectorAll(\".gslide\")[t];if(u(s,\"loaded\"))this.slideAnimateIn(s,i),m(this.loader);else{p(this.loader);var l=this.elements[t],o={index:this.index,slide:s,slideNode:s,slideConfig:l.slideConfig,slideIndex:this.index,trigger:l.node,player:null};this.trigger(\"slide_before_load\",o),l.instance.setContent(s,(function(){m(e.loader),e.resize(),e.slideAnimateIn(s,i),e.trigger(\"slide_after_load\",o)}))}this.slideDescription=s.querySelector(\".gslide-description\"),this.slideDescriptionContained=this.slideDescription&&u(this.slideDescription.parentNode,\"gslide-media\"),this.settings.preload&&(this.preloadSlide(t+1),this.preloadSlide(t-1)),this.updateNavigationClasses(),this.activeSlide=s}},{key:\"preloadSlide\",value:function(e){var t=this;if(e<0||e>this.elements.length-1)return!1;if(O(this.elements[e]))return!1;var i=this.slidesContainer.querySelectorAll(\".gslide\")[e];if(u(i,\"loaded\"))return!1;var n=this.elements[e],s=n.type,l={index:e,slide:i,slideNode:i,slideConfig:n.slideConfig,slideIndex:e,trigger:n.node,player:null};this.trigger(\"slide_before_load\",l),\"video\"===s||\"external\"===s?setTimeout((function(){n.instance.setContent(i,(function(){t.trigger(\"slide_after_load\",l)}))}),200):n.instance.setContent(i,(function(){t.trigger(\"slide_after_load\",l)}))}},{key:\"prevSlide\",value:function(){this.goToSlide(this.index-1)}},{key:\"nextSlide\",value:function(){this.goToSlide(this.index+1)}},{key:\"goToSlide\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.prevActiveSlide=this.activeSlide,this.prevActiveSlideIndex=this.index,!this.loop()&&(e<0||e>this.elements.length-1))return!1;e<0?e=this.elements.length-1:e>=this.elements.length&&(e=0),this.showSlide(e)}},{key:\"insertSlide\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;t<0&&(t=this.elements.length);var i=new V(e,this,t),n=i.getConfig(),s=o({},n),l=i.create(),r=this.elements.length-1;s.index=t,s.node=!1,s.instance=i,s.slideConfig=n,this.elements.splice(t,0,s);var a=null,h=null;if(this.slidesContainer){if(t>r)this.slidesContainer.appendChild(l);else{var d=this.slidesContainer.querySelectorAll(\".gslide\")[t];this.slidesContainer.insertBefore(l,d)}(this.settings.preload&&0==this.index&&0==t||this.index-1==t||this.index+1==t)&&this.preloadSlide(t),0===this.index&&0===t&&(this.index=1),this.updateNavigationClasses(),a=this.slidesContainer.querySelectorAll(\".gslide\")[t],h=this.getSlidePlayerInstance(t),s.slideNode=a}this.trigger(\"slide_inserted\",{index:t,slide:a,slideNode:a,slideConfig:n,slideIndex:t,trigger:null,player:h}),C(this.settings.slideInserted)&&this.settings.slideInserted({index:t,slide:a,player:h})}},{key:\"removeSlide\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;if(e<0||e>this.elements.length-1)return!1;var t=this.slidesContainer&&this.slidesContainer.querySelectorAll(\".gslide\")[e];t&&(this.getActiveSlideIndex()==e&&(e==this.elements.length-1?this.prevSlide():this.nextSlide()),t.parentNode.removeChild(t)),this.elements.splice(e,1),this.trigger(\"slide_removed\",e),C(this.settings.slideRemoved)&&this.settings.slideRemoved(e)}},{key:\"slideAnimateIn\",value:function(e,t){var i=this,n=e.querySelector(\".gslide-media\"),s=e.querySelector(\".gslide-description\"),l={index:this.prevActiveSlideIndex,slide:this.prevActiveSlide,slideNode:this.prevActiveSlide,slideIndex:this.prevActiveSlide,slideConfig:O(this.prevActiveSlideIndex)?null:this.elements[this.prevActiveSlideIndex].slideConfig,trigger:O(this.prevActiveSlideIndex)?null:this.elements[this.prevActiveSlideIndex].node,player:this.getSlidePlayerInstance(this.prevActiveSlideIndex)},o={index:this.index,slide:this.activeSlide,slideNode:this.activeSlide,slideConfig:this.elements[this.index].slideConfig,slideIndex:this.index,trigger:this.elements[this.index].node,player:this.getSlidePlayerInstance(this.index)};if(n.offsetWidth>0&&s&&(m(s),s.style.display=\"\"),c(e,this.effectsClasses),t)v(e,this.settings.cssEfects[this.settings.openEffect].in,(function(){i.settings.autoplayVideos&&i.slidePlayerPlay(e),i.trigger(\"slide_changed\",{prev:l,current:o}),C(i.settings.afterSlideChange)&&i.settings.afterSlideChange.apply(i,[l,o])}));else{var r=this.settings.slideEffect,a=\"none\"!==r?this.settings.cssEfects[r].in:r;this.prevActiveSlideIndex>this.index&&\"slide\"==this.settings.slideEffect&&(a=this.settings.cssEfects.slideBack.in),v(e,a,(function(){i.settings.autoplayVideos&&i.slidePlayerPlay(e),i.trigger(\"slide_changed\",{prev:l,current:o}),C(i.settings.afterSlideChange)&&i.settings.afterSlideChange.apply(i,[l,o])}))}setTimeout((function(){i.resize(e)}),100),d(e,\"current\")}},{key:\"slideAnimateOut\",value:function(){if(!this.prevActiveSlide)return!1;var e=this.prevActiveSlide;c(e,this.effectsClasses),d(e,\"prev\");var t=this.settings.slideEffect,i=\"none\"!==t?this.settings.cssEfects[t].out:t;this.slidePlayerPause(e),this.trigger(\"slide_before_change\",{prev:{index:this.prevActiveSlideIndex,slide:this.prevActiveSlide,slideNode:this.prevActiveSlide,slideIndex:this.prevActiveSlideIndex,slideConfig:O(this.prevActiveSlideIndex)?null:this.elements[this.prevActiveSlideIndex].slideConfig,trigger:O(this.prevActiveSlideIndex)?null:this.elements[this.prevActiveSlideIndex].node,player:this.getSlidePlayerInstance(this.prevActiveSlideIndex)},current:{index:this.index,slide:this.activeSlide,slideNode:this.activeSlide,slideIndex:this.index,slideConfig:this.elements[this.index].slideConfig,trigger:this.elements[this.index].node,player:this.getSlidePlayerInstance(this.index)}}),C(this.settings.beforeSlideChange)&&this.settings.beforeSlideChange.apply(this,[{index:this.prevActiveSlideIndex,slide:this.prevActiveSlide,player:this.getSlidePlayerInstance(this.prevActiveSlideIndex)},{index:this.index,slide:this.activeSlide,player:this.getSlidePlayerInstance(this.index)}]),this.prevActiveSlideIndex>this.index&&\"slide\"==this.settings.slideEffect&&(i=this.settings.cssEfects.slideBack.out),v(e,i,(function(){var t=e.querySelector(\".ginner-container\"),i=e.querySelector(\".gslide-media\"),n=e.querySelector(\".gslide-description\");t.style.transform=\"\",i.style.transform=\"\",c(i,\"greset\"),i.style.opacity=\"\",n&&(n.style.opacity=\"\"),c(e,\"prev\")}))}},{key:\"getAllPlayers\",value:function(){return this.videoPlayers}},{key:\"getSlidePlayerInstance\",value:function(e){var t=\"gvideo\"+e,i=this.getAllPlayers();return!(!P(i,t)||!i[t])&&i[t]}},{key:\"stopSlideVideo\",value:function(e){if(E(e)){var t=e.querySelector(\".gvideo-wrapper\");t&&(e=t.getAttribute(\"data-index\"))}console.log(\"stopSlideVideo is deprecated, use slidePlayerPause\");var i=this.getSlidePlayerInstance(e);i&&i.playing&&i.pause()}},{key:\"slidePlayerPause\",value:function(e){if(E(e)){var t=e.querySelector(\".gvideo-wrapper\");t&&(e=t.getAttribute(\"data-index\"))}var i=this.getSlidePlayerInstance(e);i&&i.playing&&i.pause()}},{key:\"playSlideVideo\",value:function(e){if(E(e)){var t=e.querySelector(\".gvideo-wrapper\");t&&(e=t.getAttribute(\"data-index\"))}console.log(\"playSlideVideo is deprecated, use slidePlayerPlay\");var i=this.getSlidePlayerInstance(e);i&&!i.playing&&i.play()}},{key:\"slidePlayerPlay\",value:function(e){var t;if(!K||null!==(t=this.settings.plyr.config)&&void 0!==t&&t.muted){if(E(e)){var i=e.querySelector(\".gvideo-wrapper\");i&&(e=i.getAttribute(\"data-index\"))}var n=this.getSlidePlayerInstance(e);n&&!n.playing&&(n.play(),this.settings.autofocusVideos&&n.elements.container.focus())}}},{key:\"setElements\",value:function(e){var t=this;this.settings.elements=!1;var i=[];e&&e.length&&r(e,(function(e,n){var s=new V(e,t,n),l=s.getConfig(),r=o({},l);r.slideConfig=l,r.instance=s,r.index=n,i.push(r)})),this.elements=i,this.lightboxOpen&&(this.slidesContainer.innerHTML=\"\",this.elements.length&&(r(this.elements,(function(){var e=y(t.settings.slideHTML);t.slidesContainer.appendChild(e)})),this.showSlide(0,!0)))}},{key:\"getElementIndex\",value:function(e){var t=!1;return r(this.elements,(function(i,n){if(P(i,\"node\")&&i.node==e)return t=n,!0})),t}},{key:\"getElements\",value:function(){var e=this,t=[];this.elements=this.elements?this.elements:[],!O(this.settings.elements)&&A(this.settings.elements)&&this.settings.elements.length&&r(this.settings.elements,(function(i,n){var s=new V(i,e,n),l=s.getConfig(),r=o({},l);r.node=!1,r.index=n,r.instance=s,r.slideConfig=l,t.push(r)}));var i=!1;return this.getSelector()&&(i=document.querySelectorAll(this.getSelector())),i?(r(i,(function(i,n){var s=new V(i,e,n),l=s.getConfig(),r=o({},l);r.node=i,r.index=n,r.instance=s,r.slideConfig=l,r.gallery=i.getAttribute(\"data-gallery\"),t.push(r)})),t):t}},{key:\"getGalleryElements\",value:function(e,t){return e.filter((function(e){return e.gallery==t}))}},{key:\"getSelector\",value:function(){return!this.settings.elements&&(this.settings.selector&&\"data-\"==this.settings.selector.substring(0,5)?\"*[\".concat(this.settings.selector,\"]\"):this.settings.selector)}},{key:\"getActiveSlide\",value:function(){return this.slidesContainer.querySelectorAll(\".gslide\")[this.index]}},{key:\"getActiveSlideIndex\",value:function(){return this.index}},{key:\"getAnimationClasses\",value:function(){var e=[];for(var t in this.settings.cssEfects)if(this.settings.cssEfects.hasOwnProperty(t)){var i=this.settings.cssEfects[t];e.push(\"g\".concat(i.in)),e.push(\"g\".concat(i.out))}return e.join(\" \")}},{key:\"build\",value:function(){var e=this;if(this.built)return!1;var t=document.body.childNodes,i=[];r(t,(function(e){e.parentNode==document.body&&\"#\"!==e.nodeName.charAt(0)&&e.hasAttribute&&!e.hasAttribute(\"aria-hidden\")&&(i.push(e),e.setAttribute(\"aria-hidden\",\"true\"))}));var n=P(this.settings.svg,\"next\")?this.settings.svg.next:\"\",s=P(this.settings.svg,\"prev\")?this.settings.svg.prev:\"\",l=P(this.settings.svg,\"close\")?this.settings.svg.close:\"\",o=this.settings.lightboxHTML;o=y(o=(o=(o=o.replace(/{nextSVG}/g,n)).replace(/{prevSVG}/g,s)).replace(/{closeSVG}/g,l)),document.body.appendChild(o);var a=document.getElementById(\"glightbox-body\");this.modal=a;var c=a.querySelector(\".gclose\");this.prevButton=a.querySelector(\".gprev\"),this.nextButton=a.querySelector(\".gnext\"),this.overlay=a.querySelector(\".goverlay\"),this.loader=a.querySelector(\".gloader\"),this.slidesContainer=document.getElementById(\"glightbox-slider\"),this.bodyHiddenChildElms=i,this.events={},d(this.modal,\"glightbox-\"+this.settings.skin),this.settings.closeButton&&c&&(this.events.close=h(\"click\",{onElement:c,withCallback:function(t,i){t.preventDefault(),e.close()}})),c&&!this.settings.closeButton&&c.parentNode.removeChild(c),this.nextButton&&(this.events.next=h(\"click\",{onElement:this.nextButton,withCallback:function(t,i){t.preventDefault(),e.nextSlide()}})),this.prevButton&&(this.events.prev=h(\"click\",{onElement:this.prevButton,withCallback:function(t,i){t.preventDefault(),e.prevSlide()}})),this.settings.closeOnOutsideClick&&(this.events.outClose=h(\"click\",{onElement:a,withCallback:function(t,i){e.preventOutsideClick||u(document.body,\"glightbox-mobile\")||g(t.target,\".ginner-container\")||g(t.target,\".gbtn\")||u(t.target,\"gnext\")||u(t.target,\"gprev\")||e.close()}})),r(this.elements,(function(t,i){e.slidesContainer.appendChild(t.instance.create()),t.slideNode=e.slidesContainer.querySelectorAll(\".gslide\")[i]})),Q&&d(document.body,\"glightbox-touch\"),this.events.resize=h(\"resize\",{onElement:window,withCallback:function(){e.resize()}}),this.built=!0}},{key:\"resize\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if((e=e||this.activeSlide)&&!u(e,\"zoomed\")){var t=x(),i=e.querySelector(\".gvideo-wrapper\"),n=e.querySelector(\".gslide-image\"),s=this.slideDescription,l=t.width,o=t.height;if(l<=768?d(document.body,\"glightbox-mobile\"):c(document.body,\"glightbox-mobile\"),i||n){var r=!1;if(s&&(u(s,\"description-bottom\")||u(s,\"description-top\"))&&!u(s,\"gabsolute\")&&(r=!0),n)if(l<=768)n.querySelector(\"img\");else if(r){var a,h=s.offsetHeight,g=n.querySelector(\"img\"),v=this.elements[this.index].node,f=null!==(a=v.getAttribute(\"data-height\"))&&void 0!==a?a:\"100vh\";g.setAttribute(\"style\",\"max-height: calc(\".concat(f,\" - \").concat(h,\"px)\")),s.setAttribute(\"style\",\"max-width: \".concat(g.offsetWidth,\"px;\"))}if(i){var p=P(this.settings.plyr.config,\"ratio\")?this.settings.plyr.config.ratio:\"\";if(!p){var m=i.clientWidth,y=i.clientHeight,b=m/y;p=\"\".concat(m/b,\":\").concat(y/b)}var S=p.split(\":\"),w=this.settings.videosWidth,T=this.settings.videosWidth,C=(T=z(w)||-1!==w.indexOf(\"px\")?parseInt(w):-1!==w.indexOf(\"vw\")?l*parseInt(w)/100:-1!==w.indexOf(\"vh\")?o*parseInt(w)/100:-1!==w.indexOf(\"%\")?l*parseInt(w)/100:parseInt(i.clientWidth))/(parseInt(S[0])/parseInt(S[1]));if(C=Math.floor(C),r&&(o-=s.offsetHeight),T>l||C>o||o<C&&l>T){var k=i.offsetWidth,E=i.offsetHeight,A=o/E,L={width:k*A,height:E*A};i.parentNode.setAttribute(\"style\",\"max-width: \".concat(L.width,\"px\")),r&&s.setAttribute(\"style\",\"max-width: \".concat(L.width,\"px;\"))}else i.parentNode.style.maxWidth=\"\".concat(w),r&&s.setAttribute(\"style\",\"max-width: \".concat(w,\";\"))}}}}},{key:\"reload\",value:function(){this.init()}},{key:\"updateNavigationClasses\",value:function(){var e=this.loop();c(this.nextButton,\"disabled\"),c(this.prevButton,\"disabled\"),0==this.index&&this.elements.length-1==0?(d(this.prevButton,\"disabled\"),d(this.nextButton,\"disabled\")):0!==this.index||e?this.index!==this.elements.length-1||e||d(this.nextButton,\"disabled\"):d(this.prevButton,\"disabled\")}},{key:\"loop\",value:function(){var e=P(this.settings,\"loopAtEnd\")?this.settings.loopAtEnd:null;return e=P(this.settings,\"loop\")?this.settings.loop:e,e}},{key:\"close\",value:function(){var e=this;if(!this.lightboxOpen){if(this.events){for(var t in this.events)this.events.hasOwnProperty(t)&&this.events[t].destroy();this.events=null}return!1}if(this.closing)return!1;this.closing=!0,this.slidePlayerPause(this.activeSlide),this.fullElementsList&&(this.elements=this.fullElementsList),this.bodyHiddenChildElms.length&&r(this.bodyHiddenChildElms,(function(e){e.removeAttribute(\"aria-hidden\")})),d(this.modal,\"glightbox-closing\"),v(this.overlay,\"none\"==this.settings.openEffect?\"none\":this.settings.cssEfects.fade.out),v(this.activeSlide,this.settings.cssEfects[this.settings.closeEffect].out,(function(){if(e.activeSlide=null,e.prevActiveSlideIndex=null,e.prevActiveSlide=null,e.built=!1,e.events){for(var t in e.events)e.events.hasOwnProperty(t)&&e.events[t].destroy();e.events=null}var i=document.body;c(ee,\"glightbox-open\"),c(i,\"glightbox-open touching gdesc-open glightbox-touch glightbox-mobile gscrollbar-fixer\"),e.modal.parentNode.removeChild(e.modal),e.trigger(\"close\"),C(e.settings.onClose)&&e.settings.onClose();var n=document.querySelector(\".gcss-styles\");n&&n.parentNode.removeChild(n),e.lightboxOpen=!1,e.closing=null}))}},{key:\"destroy\",value:function(){this.close(),this.clearAllEvents(),this.baseEvents&&this.baseEvents.destroy()}},{key:\"on\",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e||!C(t))throw new TypeError(\"Event name and callback must be defined\");this.apiEvents.push({evt:e,once:i,callback:t})}},{key:\"once\",value:function(e,t){this.on(e,t,!0)}},{key:\"trigger\",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=[];r(this.apiEvents,(function(t,s){var l=t.evt,o=t.once,r=t.callback;l==e&&(r(i),o&&n.push(s))})),n.length&&r(n,(function(e){return t.apiEvents.splice(e,1)}))}},{key:\"clearAllEvents\",value:function(){this.apiEvents.splice(0,this.apiEvents.length)}},{key:\"version\",value:function(){return\"3.3.0\"}}]);return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new ie(e);return t.init(),t}}));", "/*!\n * headroom.js v0.12.0 - Give your page some headroom. Hide your header until you need it\n * Copyright (c) 2020 Nick Williams - http://wicky.nillia.ms/headroom.js\n * License: MIT\n */\n\n(function (global, factory) {\n  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n  typeof define === 'function' && define.amd ? define(factory) :\n  (global = global || self, global.Headroom = factory());\n}(this, function () { 'use strict';\n\n  function isBrowser() {\n    return typeof window !== \"undefined\";\n  }\n\n  /**\n   * Used to detect browser support for adding an event listener with options\n   * Credit: https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener\n   */\n  function passiveEventsSupported() {\n    var supported = false;\n\n    try {\n      var options = {\n        // eslint-disable-next-line getter-return\n        get passive() {\n          supported = true;\n        }\n      };\n      window.addEventListener(\"test\", options, options);\n      window.removeEventListener(\"test\", options, options);\n    } catch (err) {\n      supported = false;\n    }\n\n    return supported;\n  }\n\n  function isSupported() {\n    return !!(\n      isBrowser() &&\n      function() {}.bind &&\n      \"classList\" in document.documentElement &&\n      Object.assign &&\n      Object.keys &&\n      requestAnimationFrame\n    );\n  }\n\n  function isDocument(obj) {\n    return obj.nodeType === 9; // Node.DOCUMENT_NODE === 9\n  }\n\n  function isWindow(obj) {\n    // `obj === window` or `obj instanceof Window` is not sufficient,\n    // as the obj may be the window of an iframe.\n    return obj && obj.document && isDocument(obj.document);\n  }\n\n  function windowScroller(win) {\n    var doc = win.document;\n    var body = doc.body;\n    var html = doc.documentElement;\n\n    return {\n      /**\n       * @see http://james.padolsey.com/javascript/get-document-height-cross-browser/\n       * @return {Number} the scroll height of the document in pixels\n       */\n      scrollHeight: function() {\n        return Math.max(\n          body.scrollHeight,\n          html.scrollHeight,\n          body.offsetHeight,\n          html.offsetHeight,\n          body.clientHeight,\n          html.clientHeight\n        );\n      },\n\n      /**\n       * @see http://andylangton.co.uk/blog/development/get-viewport-size-width-and-height-javascript\n       * @return {Number} the height of the viewport in pixels\n       */\n      height: function() {\n        return win.innerHeight || html.clientHeight || body.clientHeight;\n      },\n\n      /**\n       * Gets the Y scroll position\n       * @return {Number} pixels the page has scrolled along the Y-axis\n       */\n      scrollY: function() {\n        if (win.pageYOffset !== undefined) {\n          return win.pageYOffset;\n        }\n\n        return (html || body.parentNode || body).scrollTop;\n      }\n    };\n  }\n\n  function elementScroller(element) {\n    return {\n      /**\n       * @return {Number} the scroll height of the element in pixels\n       */\n      scrollHeight: function() {\n        return Math.max(\n          element.scrollHeight,\n          element.offsetHeight,\n          element.clientHeight\n        );\n      },\n\n      /**\n       * @return {Number} the height of the element in pixels\n       */\n      height: function() {\n        return Math.max(element.offsetHeight, element.clientHeight);\n      },\n\n      /**\n       * Gets the Y scroll position\n       * @return {Number} pixels the element has scrolled along the Y-axis\n       */\n      scrollY: function() {\n        return element.scrollTop;\n      }\n    };\n  }\n\n  function createScroller(element) {\n    return isWindow(element) ? windowScroller(element) : elementScroller(element);\n  }\n\n  /**\n   * @param element EventTarget\n   */\n  function trackScroll(element, options, callback) {\n    var isPassiveSupported = passiveEventsSupported();\n    var rafId;\n    var scrolled = false;\n    var scroller = createScroller(element);\n    var lastScrollY = scroller.scrollY();\n    var details = {};\n\n    function update() {\n      var scrollY = Math.round(scroller.scrollY());\n      var height = scroller.height();\n      var scrollHeight = scroller.scrollHeight();\n\n      // reuse object for less memory churn\n      details.scrollY = scrollY;\n      details.lastScrollY = lastScrollY;\n      details.direction = scrollY > lastScrollY ? \"down\" : \"up\";\n      details.distance = Math.abs(scrollY - lastScrollY);\n      details.isOutOfBounds = scrollY < 0 || scrollY + height > scrollHeight;\n      details.top = scrollY <= options.offset[details.direction];\n      details.bottom = scrollY + height >= scrollHeight;\n      details.toleranceExceeded =\n        details.distance > options.tolerance[details.direction];\n\n      callback(details);\n\n      lastScrollY = scrollY;\n      scrolled = false;\n    }\n\n    function handleScroll() {\n      if (!scrolled) {\n        scrolled = true;\n        rafId = requestAnimationFrame(update);\n      }\n    }\n\n    var eventOptions = isPassiveSupported\n      ? { passive: true, capture: false }\n      : false;\n\n    element.addEventListener(\"scroll\", handleScroll, eventOptions);\n    update();\n\n    return {\n      destroy: function() {\n        cancelAnimationFrame(rafId);\n        element.removeEventListener(\"scroll\", handleScroll, eventOptions);\n      }\n    };\n  }\n\n  function normalizeUpDown(t) {\n    return t === Object(t) ? t : { down: t, up: t };\n  }\n\n  /**\n   * UI enhancement for fixed headers.\n   * Hides header when scrolling down\n   * Shows header when scrolling up\n   * @constructor\n   * @param {DOMElement} elem the header element\n   * @param {Object} options options for the widget\n   */\n  function Headroom(elem, options) {\n    options = options || {};\n    Object.assign(this, Headroom.options, options);\n    this.classes = Object.assign({}, Headroom.options.classes, options.classes);\n\n    this.elem = elem;\n    this.tolerance = normalizeUpDown(this.tolerance);\n    this.offset = normalizeUpDown(this.offset);\n    this.initialised = false;\n    this.frozen = false;\n  }\n  Headroom.prototype = {\n    constructor: Headroom,\n\n    /**\n     * Start listening to scrolling\n     * @public\n     */\n    init: function() {\n      if (Headroom.cutsTheMustard && !this.initialised) {\n        this.addClass(\"initial\");\n        this.initialised = true;\n\n        // defer event registration to handle browser\n        // potentially restoring previous scroll position\n        setTimeout(\n          function(self) {\n            self.scrollTracker = trackScroll(\n              self.scroller,\n              { offset: self.offset, tolerance: self.tolerance },\n              self.update.bind(self)\n            );\n          },\n          100,\n          this\n        );\n      }\n\n      return this;\n    },\n\n    /**\n     * Destroy the widget, clearing up after itself\n     * @public\n     */\n    destroy: function() {\n      this.initialised = false;\n      Object.keys(this.classes).forEach(this.removeClass, this);\n      this.scrollTracker.destroy();\n    },\n\n    /**\n     * Unpin the element\n     * @public\n     */\n    unpin: function() {\n      if (this.hasClass(\"pinned\") || !this.hasClass(\"unpinned\")) {\n        this.addClass(\"unpinned\");\n        this.removeClass(\"pinned\");\n\n        if (this.onUnpin) {\n          this.onUnpin.call(this);\n        }\n      }\n    },\n\n    /**\n     * Pin the element\n     * @public\n     */\n    pin: function() {\n      if (this.hasClass(\"unpinned\")) {\n        this.addClass(\"pinned\");\n        this.removeClass(\"unpinned\");\n\n        if (this.onPin) {\n          this.onPin.call(this);\n        }\n      }\n    },\n\n    /**\n     * Freezes the current state of the widget\n     * @public\n     */\n    freeze: function() {\n      this.frozen = true;\n      this.addClass(\"frozen\");\n    },\n\n    /**\n     * Re-enables the default behaviour of the widget\n     * @public\n     */\n    unfreeze: function() {\n      this.frozen = false;\n      this.removeClass(\"frozen\");\n    },\n\n    top: function() {\n      if (!this.hasClass(\"top\")) {\n        this.addClass(\"top\");\n        this.removeClass(\"notTop\");\n\n        if (this.onTop) {\n          this.onTop.call(this);\n        }\n      }\n    },\n\n    notTop: function() {\n      if (!this.hasClass(\"notTop\")) {\n        this.addClass(\"notTop\");\n        this.removeClass(\"top\");\n\n        if (this.onNotTop) {\n          this.onNotTop.call(this);\n        }\n      }\n    },\n\n    bottom: function() {\n      if (!this.hasClass(\"bottom\")) {\n        this.addClass(\"bottom\");\n        this.removeClass(\"notBottom\");\n\n        if (this.onBottom) {\n          this.onBottom.call(this);\n        }\n      }\n    },\n\n    notBottom: function() {\n      if (!this.hasClass(\"notBottom\")) {\n        this.addClass(\"notBottom\");\n        this.removeClass(\"bottom\");\n\n        if (this.onNotBottom) {\n          this.onNotBottom.call(this);\n        }\n      }\n    },\n\n    shouldUnpin: function(details) {\n      var scrollingDown = details.direction === \"down\";\n\n      return scrollingDown && !details.top && details.toleranceExceeded;\n    },\n\n    shouldPin: function(details) {\n      var scrollingUp = details.direction === \"up\";\n\n      return (scrollingUp && details.toleranceExceeded) || details.top;\n    },\n\n    addClass: function(className) {\n      this.elem.classList.add.apply(\n        this.elem.classList,\n        this.classes[className].split(\" \")\n      );\n    },\n\n    removeClass: function(className) {\n      this.elem.classList.remove.apply(\n        this.elem.classList,\n        this.classes[className].split(\" \")\n      );\n    },\n\n    hasClass: function(className) {\n      return this.classes[className].split(\" \").every(function(cls) {\n        return this.classList.contains(cls);\n      }, this.elem);\n    },\n\n    update: function(details) {\n      if (details.isOutOfBounds) {\n        // Ignore bouncy scrolling in OSX\n        return;\n      }\n\n      if (this.frozen === true) {\n        return;\n      }\n\n      if (details.top) {\n        this.top();\n      } else {\n        this.notTop();\n      }\n\n      if (details.bottom) {\n        this.bottom();\n      } else {\n        this.notBottom();\n      }\n\n      if (this.shouldUnpin(details)) {\n        this.unpin();\n      } else if (this.shouldPin(details)) {\n        this.pin();\n      }\n    }\n  };\n\n  /**\n   * Default options\n   * @type {Object}\n   */\n  Headroom.options = {\n    tolerance: {\n      up: 0,\n      down: 0\n    },\n    offset: 0,\n    scroller: isBrowser() ? window : null,\n    classes: {\n      frozen: \"headroom--frozen\",\n      pinned: \"headroom--pinned\",\n      unpinned: \"headroom--unpinned\",\n      top: \"headroom--top\",\n      notTop: \"headroom--not-top\",\n      bottom: \"headroom--bottom\",\n      notBottom: \"headroom--not-bottom\",\n      initial: \"headroom\"\n    }\n  };\n\n  Headroom.cutsTheMustard = isSupported();\n\n  return Headroom;\n\n}));\n", "/*!\n * money.js / fx() v0.2\n * Copyright 2014 Open Exchange Rates\n *\n * JavaScript library for realtime currency conversion and exchange rate calculation.\n *\n * Freely distributable under the MIT license.\n * Portions of money.js are inspired by or borrowed from underscore.js\n *\n * For details, examples and documentation:\n * http://openexchangerates.github.io/money.js/\n */\n(function(root, undefined) {\n\n\t// Create a safe reference to the money.js object for use below.\n\tvar fx = function(obj) {\n\t\treturn new fxWrapper(obj);\n\t};\n\n\t// Current version.\n\tfx.version = '0.2';\n\n\n\t/* --- Setup --- */\n\n\t// fxSetup can be defined before loading money.js, to set the exchange rates and the base\n\t// (and default from/to) currencies - or the rates can be loaded in later if needed.\n\tvar fxSetup = root.fxSetup || {\n\t\trates : {},\n\t\tbase : \"\"\n\t};\n\n\t// Object containing exchange rates relative to the fx.base currency, eg { \"GBP\" : \"0.64\" }\n\tfx.rates = fxSetup.rates;\n\n\t// Default exchange rate base currency (eg \"USD\"), which all the exchange rates are relative to\n\tfx.base = fxSetup.base;\n\n\t// Default from / to currencies for conversion via fx.convert():\n\tfx.settings = {\n\t\tfrom : fxSetup.from || fx.base,\n\t\tto : fxSetup.to || fx.base\n\t};\n\n\n\t/* --- Conversion --- */\n\n\t// The base function of the library: converts a value from one currency to another\n\tvar convert = fx.convert = function(val, opts) {\n\t\t// Convert arrays recursively\n\t\tif (typeof val === 'object' && val.length) {\n\t\t\tfor (var i = 0; i< val.length; i++ ) {\n\t\t\t\tval[i] = convert(val[i], opts);\n\t\t\t}\n\t\t\treturn val;\n\t\t}\n\n\t\t// Make sure we gots some opts\n\t\topts = opts || {};\n\n\t\t// We need to know the `from` and `to` currencies\n\t\tif( !opts.from ) opts.from = fx.settings.from;\n\t\tif( !opts.to ) opts.to = fx.settings.to;\n\n\t\t// Multiple the value by the exchange rate\n\t\treturn val * getRate( opts.to, opts.from );\n\t};\n\n\t// Returns the exchange rate to `target` currency from `base` currency\n\tvar getRate = function(to, from) {\n\t\t// Save bytes in minified version\n\t\tvar rates = fx.rates;\n\n\t\t// Make sure the base rate is in the rates object:\n\t\trates[fx.base] = 1;\n\n\t\t// Throw an error if either rate isn't in the rates array\n\t\tif ( !rates[to] || !rates[from] ) throw \"fx error\";\n\n\t\t// If `from` currency === fx.base, return the basic exchange rate for the `to` currency\n\t\tif ( from === fx.base ) {\n\t\t\treturn rates[to];\n\t\t}\n\n\t\t// If `to` currency === fx.base, return the basic inverse rate of the `from` currency\n\t\tif ( to === fx.base ) {\n\t\t\treturn 1 / rates[from];\n\t\t}\n\n\t\t// Otherwise, return the `to` rate multipled by the inverse of the `from` rate to get the\n\t\t// relative exchange rate between the two currencies\n\t\treturn rates[to] * (1 / rates[from]);\n\t};\n\n\n\t/* --- OOP wrapper and chaining --- */\n\n\t// If fx(val) is called as a function, it returns a wrapped object that can be used OO-style\n\tvar fxWrapper = function(val) {\n\t\t// Experimental: parse strings to pull out currency code and value:\n\t\tif ( typeof\tval === \"string\" ) {\n\t\t\tthis._v = parseFloat(val.replace(/[^0-9-.]/g, \"\"));\n\t\t\tthis._fx = val.replace(/([^A-Za-z])/g, \"\");\n\t\t} else {\n\t\t\tthis._v = val;\n\t\t}\n\t};\n\n\t// Expose `wrapper.prototype` as `fx.prototype`\n\tvar fxProto = fx.prototype = fxWrapper.prototype;\n\n\t// fx(val).convert(opts) does the same thing as fx.convert(val, opts)\n\tfxProto.convert = function() {\n\t\tvar args = Array.prototype.slice.call(arguments);\n\t\targs.unshift(this._v);\n\t\treturn convert.apply(fx, args);\n\t};\n\n\t// fx(val).from(currency) returns a wrapped `fx` where the value has been converted from\n\t// `currency` to the `fx.base` currency. Should be followed by `.to(otherCurrency)`\n\tfxProto.from = function(currency) {\n\t\tvar wrapped = fx(convert(this._v, {from: currency, to: fx.base}));\n\t\twrapped._fx = fx.base;\n\t\treturn wrapped;\n\t};\n\n\t// fx(val).to(currency) returns the value, converted from `fx.base` to `currency`\n\tfxProto.to = function(currency) {\n\t\treturn convert(this._v, {from: this._fx ? this._fx : fx.settings.from, to: currency});\n\t};\n\n\n\t/* --- Module Definition --- */\n\n\t// Export the fx object for CommonJS. If being loaded as an AMD module, define it as such.\n\t// Otherwise, just add `fx` to the global object\n\tif (typeof exports !== 'undefined') {\n\t\tif (typeof module !== 'undefined' && module.exports) {\n\t\t\texports = module.exports = fx;\n\t\t}\n\t\texports.fx = fx;\n\t} else if (typeof define === 'function' && define.amd) {\n\t\t// Return the library as an AMD module:\n\t\tdefine([], function() {\n\t\t\treturn fx;\n\t\t});\n\t} else {\n\t\t// Use fx.noConflict to restore `fx` back to its original value before money.js loaded.\n\t\t// Returns a reference to the library's `fx` object; e.g. `var money = fx.noConflict();`\n\t\tfx.noConflict = (function(previousFx) {\n\t\t\treturn function() {\n\t\t\t\t// Reset the value of the root's `fx` variable:\n\t\t\t\troot.fx = previousFx;\n\t\t\t\t// Delete the noConflict function:\n\t\t\t\tfx.noConflict = undefined;\n\t\t\t\t// Return reference to the library to re-assign it:\n\t\t\t\treturn fx;\n\t\t\t};\n\t\t})(root.fx);\n\n\t\t// Declare `fx` on the root (global/window) object:\n\t\troot['fx'] = fx;\n\t}\n\n\t// Root will be `window` in browser or `global` on the server:\n}(this));\n", "\"use strict\";\n\nmodule.exports = function has(object, key) {\n  return Object.prototype.hasOwnProperty.call(object, key);\n};", "\"use strict\";\n\nvar _apply;\n\nfunction _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError(\"attempted to use private field on non-instance\"); } return receiver; }\n\nvar id = 0;\n\nfunction _classPrivateFieldLooseKey(name) { return \"__private_\" + id++ + \"_\" + name; }\n\nconst has = require('./hasProperty');\n\nfunction insertReplacement(source, rx, replacement) {\n  const newParts = [];\n  source.forEach(chunk => {\n    // When the source contains multiple placeholders for interpolation,\n    // we should ignore chunks that are not strings, because those\n    // can be JSX objects and will be otherwise incorrectly turned into strings.\n    // Without this condition we\u2019d get this: [object Object] hello [object Object] my <button>\n    if (typeof chunk !== 'string') {\n      return newParts.push(chunk);\n    }\n\n    return rx[Symbol.split](chunk).forEach((raw, i, list) => {\n      if (raw !== '') {\n        newParts.push(raw);\n      } // Interlace with the `replacement` value\n\n\n      if (i < list.length - 1) {\n        newParts.push(replacement);\n      }\n    });\n  });\n  return newParts;\n}\n/**\n * Takes a string with placeholder variables like `%{smart_count} file selected`\n * and replaces it with values from options `{smart_count: 5}`\n *\n * @license https://github.com/airbnb/polyglot.js/blob/master/LICENSE\n * taken from https://github.com/airbnb/polyglot.js/blob/master/lib/polyglot.js#L299\n *\n * @param {string} phrase that needs interpolation, with placeholders\n * @param {object} options with values that will be used to replace placeholders\n * @returns {any[]} interpolated\n */\n\n\nfunction interpolate(phrase, options) {\n  const dollarRegex = /\\$/g;\n  const dollarBillsYall = '$$$$';\n  let interpolated = [phrase];\n  if (options == null) return interpolated;\n\n  for (const arg of Object.keys(options)) {\n    if (arg !== '_') {\n      // Ensure replacement value is escaped to prevent special $-prefixed\n      // regex replace tokens. the \"$$$$\" is needed because each \"$\" needs to\n      // be escaped with \"$\" itself, and we need two in the resulting output.\n      let replacement = options[arg];\n\n      if (typeof replacement === 'string') {\n        replacement = dollarRegex[Symbol.replace](replacement, dollarBillsYall);\n      } // We create a new `RegExp` each time instead of using a more-efficient\n      // string replace so that the same argument can be replaced multiple times\n      // in the same phrase.\n\n\n      interpolated = insertReplacement(interpolated, new RegExp(`%\\\\{${arg}\\\\}`, 'g'), replacement);\n    }\n  }\n\n  return interpolated;\n}\n/**\n * Translates strings with interpolation & pluralization support.\n * Extensible with custom dictionaries and pluralization functions.\n *\n * Borrows heavily from and inspired by Polyglot https://github.com/airbnb/polyglot.js,\n * basically a stripped-down version of it. Differences: pluralization functions are not hardcoded\n * and can be easily added among with dictionaries, nested objects are used for pluralization\n * as opposed to `||||` delimeter\n *\n * Usage example: `translator.translate('files_chosen', {smart_count: 3})`\n */\n\n\nmodule.exports = (_apply = /*#__PURE__*/_classPrivateFieldLooseKey(\"apply\"), class Translator {\n  /**\n   * @param {object|Array<object>} locales - locale or list of locales.\n   */\n  constructor(locales) {\n    Object.defineProperty(this, _apply, {\n      value: _apply2\n    });\n    this.locale = {\n      strings: {},\n\n      pluralize(n) {\n        if (n === 1) {\n          return 0;\n        }\n\n        return 1;\n      }\n\n    };\n\n    if (Array.isArray(locales)) {\n      locales.forEach(_classPrivateFieldLooseBase(this, _apply)[_apply], this);\n    } else {\n      _classPrivateFieldLooseBase(this, _apply)[_apply](locales);\n    }\n  }\n\n  /**\n   * Public translate method\n   *\n   * @param {string} key\n   * @param {object} options with values that will be used later to replace placeholders in string\n   * @returns {string} translated (and interpolated)\n   */\n  translate(key, options) {\n    return this.translateArray(key, options).join('');\n  }\n  /**\n   * Get a translation and return the translated and interpolated parts as an array.\n   *\n   * @param {string} key\n   * @param {object} options with values that will be used to replace placeholders\n   * @returns {Array} The translated and interpolated parts, in order.\n   */\n\n\n  translateArray(key, options) {\n    if (!has(this.locale.strings, key)) {\n      throw new Error(`missing string: ${key}`);\n    }\n\n    const string = this.locale.strings[key];\n    const hasPluralForms = typeof string === 'object';\n\n    if (hasPluralForms) {\n      if (options && typeof options.smart_count !== 'undefined') {\n        const plural = this.locale.pluralize(options.smart_count);\n        return interpolate(string[plural], options);\n      }\n\n      throw new Error('Attempted to use a string with plural forms, but no value was given for %{smart_count}');\n    }\n\n    return interpolate(string, options);\n  }\n\n});\n\nfunction _apply2(locale) {\n  if (!(locale != null && locale.strings)) {\n    return;\n  }\n\n  const prevLocale = this.locale;\n  this.locale = { ...prevLocale,\n    strings: { ...prevLocale.strings,\n      ...locale.strings\n    }\n  };\n  this.locale.pluralize = locale.pluralize || prevLocale.pluralize;\n}", "/**\n* Create an event emitter with namespaces\n* @name createNamespaceEmitter\n* @example\n* var emitter = require('./index')()\n*\n* emitter.on('*', function () {\n*   console.log('all events emitted', this.event)\n* })\n*\n* emitter.on('example', function () {\n*   console.log('example event emitted')\n* })\n*/\nmodule.exports = function createNamespaceEmitter () {\n  var emitter = {}\n  var _fns = emitter._fns = {}\n\n  /**\n  * Emit an event. Optionally namespace the event. Handlers are fired in the order in which they were added with exact matches taking precedence. Separate the namespace and event with a `:`\n  * @name emit\n  * @param {String} event \u2013 the name of the event, with optional namespace\n  * @param {...*} data \u2013 up to 6 arguments that are passed to the event listener\n  * @example\n  * emitter.emit('example')\n  * emitter.emit('demo:test')\n  * emitter.emit('data', { example: true}, 'a string', 1)\n  */\n  emitter.emit = function emit (event, arg1, arg2, arg3, arg4, arg5, arg6) {\n    var toEmit = getListeners(event)\n\n    if (toEmit.length) {\n      emitAll(event, toEmit, [arg1, arg2, arg3, arg4, arg5, arg6])\n    }\n  }\n\n  /**\n  * Create en event listener.\n  * @name on\n  * @param {String} event\n  * @param {Function} fn\n  * @example\n  * emitter.on('example', function () {})\n  * emitter.on('demo', function () {})\n  */\n  emitter.on = function on (event, fn) {\n    if (!_fns[event]) {\n      _fns[event] = []\n    }\n\n    _fns[event].push(fn)\n  }\n\n  /**\n  * Create en event listener that fires once.\n  * @name once\n  * @param {String} event\n  * @param {Function} fn\n  * @example\n  * emitter.once('example', function () {})\n  * emitter.once('demo', function () {})\n  */\n  emitter.once = function once (event, fn) {\n    function one () {\n      fn.apply(this, arguments)\n      emitter.off(event, one)\n    }\n    this.on(event, one)\n  }\n\n  /**\n  * Stop listening to an event. Stop all listeners on an event by only passing the event name. Stop a single listener by passing that event handler as a callback.\n  * You must be explicit about what will be unsubscribed: `emitter.off('demo')` will unsubscribe an `emitter.on('demo')` listener,\n  * `emitter.off('demo:example')` will unsubscribe an `emitter.on('demo:example')` listener\n  * @name off\n  * @param {String} event\n  * @param {Function} [fn] \u2013 the specific handler\n  * @example\n  * emitter.off('example')\n  * emitter.off('demo', function () {})\n  */\n  emitter.off = function off (event, fn) {\n    var keep = []\n\n    if (event && fn) {\n      var fns = this._fns[event]\n      var i = 0\n      var l = fns ? fns.length : 0\n\n      for (i; i < l; i++) {\n        if (fns[i] !== fn) {\n          keep.push(fns[i])\n        }\n      }\n    }\n\n    keep.length ? this._fns[event] = keep : delete this._fns[event]\n  }\n\n  function getListeners (e) {\n    var out = _fns[e] ? _fns[e] : []\n    var idx = e.indexOf(':')\n    var args = (idx === -1) ? [e] : [e.substring(0, idx), e.substring(idx + 1)]\n\n    var keys = Object.keys(_fns)\n    var i = 0\n    var l = keys.length\n\n    for (i; i < l; i++) {\n      var key = keys[i]\n      if (key === '*') {\n        out = out.concat(_fns[key])\n      }\n\n      if (args.length === 2 && args[0] === key) {\n        out = out.concat(_fns[key])\n        break\n      }\n    }\n\n    return out\n  }\n\n  function emitAll (e, fns, args) {\n    var i = 0\n    var l = fns.length\n\n    for (i; i < l; i++) {\n      if (!fns[i]) break\n      fns[i].event = e\n      fns[i].apply(fns[i], args)\n    }\n  }\n\n  return emitter\n}\n", "let urlAlphabet =\n  'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'\nlet customAlphabet = (alphabet, size) => {\n  return () => {\n    let id = ''\n    let i = size\n    while (i--) {\n      id += alphabet[(Math.random() * alphabet.length) | 0]\n    }\n    return id\n  }\n}\nlet nanoid = (size = 21) => {\n  let id = ''\n  let i = size\n  while (i--) {\n    id += urlAlphabet[(Math.random() * 64) | 0]\n  }\n  return id\n}\nmodule.exports = { nanoid, customAlphabet }\n", "/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n    nativeMin = Math.min;\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n *   console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n  return root.Date.now();\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. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n *  Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n *  The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n *  Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n *   'leading': true,\n *   'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n  var lastArgs,\n      lastThis,\n      maxWait,\n      result,\n      timerId,\n      lastCallTime,\n      lastInvokeTime = 0,\n      leading = false,\n      maxing = false,\n      trailing = true;\n\n  if (typeof func != 'function') {\n    throw new TypeError(FUNC_ERROR_TEXT);\n  }\n  wait = toNumber(wait) || 0;\n  if (isObject(options)) {\n    leading = !!options.leading;\n    maxing = 'maxWait' in options;\n    maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n    trailing = 'trailing' in options ? !!options.trailing : trailing;\n  }\n\n  function invokeFunc(time) {\n    var args = lastArgs,\n        thisArg = lastThis;\n\n    lastArgs = lastThis = undefined;\n    lastInvokeTime = time;\n    result = func.apply(thisArg, args);\n    return result;\n  }\n\n  function leadingEdge(time) {\n    // Reset any `maxWait` timer.\n    lastInvokeTime = time;\n    // Start the timer for the trailing edge.\n    timerId = setTimeout(timerExpired, wait);\n    // Invoke the leading edge.\n    return leading ? invokeFunc(time) : result;\n  }\n\n  function remainingWait(time) {\n    var timeSinceLastCall = time - lastCallTime,\n        timeSinceLastInvoke = time - lastInvokeTime,\n        result = wait - timeSinceLastCall;\n\n    return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\n  }\n\n  function shouldInvoke(time) {\n    var timeSinceLastCall = time - lastCallTime,\n        timeSinceLastInvoke = time - lastInvokeTime;\n\n    // Either this is the first call, activity has stopped and we're at the\n    // trailing edge, the system time has gone backwards and we're treating\n    // it as the trailing edge, or we've hit the `maxWait` limit.\n    return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n      (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n  }\n\n  function timerExpired() {\n    var time = now();\n    if (shouldInvoke(time)) {\n      return trailingEdge(time);\n    }\n    // Restart the timer.\n    timerId = setTimeout(timerExpired, remainingWait(time));\n  }\n\n  function trailingEdge(time) {\n    timerId = undefined;\n\n    // Only invoke if we have `lastArgs` which means `func` has been\n    // debounced at least once.\n    if (trailing && lastArgs) {\n      return invokeFunc(time);\n    }\n    lastArgs = lastThis = undefined;\n    return result;\n  }\n\n  function cancel() {\n    if (timerId !== undefined) {\n      clearTimeout(timerId);\n    }\n    lastInvokeTime = 0;\n    lastArgs = lastCallTime = lastThis = timerId = undefined;\n  }\n\n  function flush() {\n    return timerId === undefined ? result : trailingEdge(now());\n  }\n\n  function debounced() {\n    var time = now(),\n        isInvoking = shouldInvoke(time);\n\n    lastArgs = arguments;\n    lastThis = this;\n    lastCallTime = time;\n\n    if (isInvoking) {\n      if (timerId === undefined) {\n        return leadingEdge(lastCallTime);\n      }\n      if (maxing) {\n        // Handle invocations in a tight loop.\n        timerId = setTimeout(timerExpired, wait);\n        return invokeFunc(lastCallTime);\n      }\n    }\n    if (timerId === undefined) {\n      timerId = setTimeout(timerExpired, wait);\n    }\n    return result;\n  }\n  debounced.cancel = cancel;\n  debounced.flush = flush;\n  return debounced;\n}\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n *  Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n *  Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n  var leading = true,\n      trailing = true;\n\n  if (typeof func != 'function') {\n    throw new TypeError(FUNC_ERROR_TEXT);\n  }\n  if (isObject(options)) {\n    leading = 'leading' in options ? !!options.leading : leading;\n    trailing = 'trailing' in options ? !!options.trailing : trailing;\n  }\n  return debounce(func, wait, {\n    'leading': leading,\n    'maxWait': wait,\n    'trailing': trailing\n  });\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n  var type = typeof value;\n  return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n  return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n  return typeof value == 'symbol' ||\n    (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n  if (typeof value == 'number') {\n    return value;\n  }\n  if (isSymbol(value)) {\n    return NAN;\n  }\n  if (isObject(value)) {\n    var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n    value = isObject(other) ? (other + '') : other;\n  }\n  if (typeof value != 'string') {\n    return value === 0 ? value : +value;\n  }\n  value = value.replace(reTrim, '');\n  var isBinary = reIsBinary.test(value);\n  return (isBinary || reIsOctal.test(value))\n    ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n    : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = throttle;\n", "// Adapted from https://github.com/Flet/prettier-bytes/\n// Changing 1000 bytes to 1024, so we can keep uppercase KB vs kB\n// ISC License (c) Dan Flettre https://github.com/Flet/prettier-bytes/blob/master/LICENSE\nmodule.exports = function prettierBytes (num) {\n  if (typeof num !== 'number' || isNaN(num)) {\n    throw new TypeError('Expected a number, got ' + typeof num)\n  }\n\n  var neg = num < 0\n  var units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']\n\n  if (neg) {\n    num = -num\n  }\n\n  if (num < 1) {\n    return (neg ? '-' : '') + num + ' B'\n  }\n\n  var exponent = Math.min(Math.floor(Math.log(num) / Math.log(1024)), units.length - 1)\n  num = Number(num / Math.pow(1024, exponent))\n  var unit = units[exponent]\n\n  if (num >= 10 || num % 1 === 0) {\n    // Do not show decimals when the number is two-digit, or if the number has no\n    // decimal component.\n    return (neg ? '-' : '') + num.toFixed(0) + ' ' + unit\n  } else {\n    return (neg ? '-' : '') + num.toFixed(1) + ' ' + unit\n  }\n}\n", "/* jshint node: true */\n'use strict';\n\n/**\n  # wildcard\n\n  Very simple wildcard matching, which is designed to provide the same\n  functionality that is found in the\n  [eve](https://github.com/adobe-webplatform/eve) eventing library.\n\n  ## Usage\n\n  It works with strings:\n\n  <<< examples/strings.js\n\n  Arrays:\n\n  <<< examples/arrays.js\n\n  Objects (matching against keys):\n\n  <<< examples/objects.js\n\n  While the library works in Node, if you are are looking for file-based\n  wildcard matching then you should have a look at:\n\n  <https://github.com/isaacs/node-glob>\n**/\n\nfunction WildcardMatcher(text, separator) {\n  this.text = text = text || '';\n  this.hasWild = ~text.indexOf('*');\n  this.separator = separator;\n  this.parts = text.split(separator);\n}\n\nWildcardMatcher.prototype.match = function(input) {\n  var matches = true;\n  var parts = this.parts;\n  var ii;\n  var partsCount = parts.length;\n  var testParts;\n\n  if (typeof input == 'string' || input instanceof String) {\n    if (!this.hasWild && this.text != input) {\n      matches = false;\n    } else {\n      testParts = (input || '').split(this.separator);\n      for (ii = 0; matches && ii < partsCount; ii++) {\n        if (parts[ii] === '*')  {\n          continue;\n        } else if (ii < testParts.length) {\n          matches = parts[ii] === testParts[ii];\n        } else {\n          matches = false;\n        }\n      }\n\n      // If matches, then return the component parts\n      matches = matches && testParts;\n    }\n  }\n  else if (typeof input.splice == 'function') {\n    matches = [];\n\n    for (ii = input.length; ii--; ) {\n      if (this.match(input[ii])) {\n        matches[matches.length] = input[ii];\n      }\n    }\n  }\n  else if (typeof input == 'object') {\n    matches = {};\n\n    for (var key in input) {\n      if (this.match(key)) {\n        matches[key] = input[key];\n      }\n    }\n  }\n\n  return matches;\n};\n\nmodule.exports = function(text, test, separator) {\n  var matcher = new WildcardMatcher(text, separator || /[\\/\\.]/);\n  if (typeof test != 'undefined') {\n    return matcher.match(test);\n  }\n\n  return matcher;\n};\n", "var wildcard = require('wildcard');\nvar reMimePartSplit = /[\\/\\+\\.]/;\n\n/**\n  # mime-match\n\n  A simple function to checker whether a target mime type matches a mime-type\n  pattern (e.g. image/jpeg matches image/jpeg OR image/*).\n\n  ## Example Usage\n\n  <<< example.js\n\n**/\nmodule.exports = function(target, pattern) {\n  function test(pattern) {\n    var result = wildcard(pattern, target, reMimePartSplit);\n\n    // ensure that we have a valid mime type (should have two parts)\n    return result && result.length >= 2;\n  }\n\n  return pattern ? test(pattern.split(';')[0]) : test;\n};\n", "\"use strict\";\n\nfunction _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError(\"attempted to use private field on non-instance\"); } return receiver; }\n\nvar id = 0;\n\nfunction _classPrivateFieldLooseKey(name) { return \"__private_\" + id++ + \"_\" + name; }\n\nvar _publish = /*#__PURE__*/_classPrivateFieldLooseKey(\"publish\");\n\n/**\n * Default store that keeps state in a simple object.\n */\nclass DefaultStore {\n  constructor() {\n    Object.defineProperty(this, _publish, {\n      value: _publish2\n    });\n    this.state = {};\n    this.callbacks = [];\n  }\n\n  getState() {\n    return this.state;\n  }\n\n  setState(patch) {\n    const prevState = { ...this.state\n    };\n    const nextState = { ...this.state,\n      ...patch\n    };\n    this.state = nextState;\n\n    _classPrivateFieldLooseBase(this, _publish)[_publish](prevState, nextState, patch);\n  }\n\n  subscribe(listener) {\n    this.callbacks.push(listener);\n    return () => {\n      // Remove the listener.\n      this.callbacks.splice(this.callbacks.indexOf(listener), 1);\n    };\n  }\n\n}\n\nfunction _publish2() {\n  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n    args[_key] = arguments[_key];\n  }\n\n  this.callbacks.forEach(listener => {\n    listener(...args);\n  });\n}\n\nDefaultStore.VERSION = \"2.0.3\";\n\nmodule.exports = function defaultStore() {\n  return new DefaultStore();\n};", "\"use strict\";\n\n/**\n * Takes a full filename string and returns an object {name, extension}\n *\n * @param {string} fullFileName\n * @returns {object} {name, extension}\n */\nmodule.exports = function getFileNameAndExtension(fullFileName) {\n  const lastDot = fullFileName.lastIndexOf('.'); // these count as no extension: \"no-dot\", \"trailing-dot.\"\n\n  if (lastDot === -1 || lastDot === fullFileName.length - 1) {\n    return {\n      name: fullFileName,\n      extension: undefined\n    };\n  }\n\n  return {\n    name: fullFileName.slice(0, lastDot),\n    extension: fullFileName.slice(lastDot + 1)\n  };\n};", "\"use strict\";\n\n// ___Why not add the mime-types package?\n//    It's 19.7kB gzipped, and we only need mime types for well-known extensions (for file previews).\n// ___Where to take new extensions from?\n//    https://github.com/jshttp/mime-db/blob/master/db.json\nmodule.exports = {\n  md: 'text/markdown',\n  markdown: 'text/markdown',\n  mp4: 'video/mp4',\n  mp3: 'audio/mp3',\n  svg: 'image/svg+xml',\n  jpg: 'image/jpeg',\n  png: 'image/png',\n  gif: 'image/gif',\n  heic: 'image/heic',\n  heif: 'image/heif',\n  yaml: 'text/yaml',\n  yml: 'text/yaml',\n  csv: 'text/csv',\n  tsv: 'text/tab-separated-values',\n  tab: 'text/tab-separated-values',\n  avi: 'video/x-msvideo',\n  mks: 'video/x-matroska',\n  mkv: 'video/x-matroska',\n  mov: 'video/quicktime',\n  doc: 'application/msword',\n  docm: 'application/vnd.ms-word.document.macroenabled.12',\n  docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n  dot: 'application/msword',\n  dotm: 'application/vnd.ms-word.template.macroenabled.12',\n  dotx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',\n  xla: 'application/vnd.ms-excel',\n  xlam: 'application/vnd.ms-excel.addin.macroenabled.12',\n  xlc: 'application/vnd.ms-excel',\n  xlf: 'application/x-xliff+xml',\n  xlm: 'application/vnd.ms-excel',\n  xls: 'application/vnd.ms-excel',\n  xlsb: 'application/vnd.ms-excel.sheet.binary.macroenabled.12',\n  xlsm: 'application/vnd.ms-excel.sheet.macroenabled.12',\n  xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n  xlt: 'application/vnd.ms-excel',\n  xltm: 'application/vnd.ms-excel.template.macroenabled.12',\n  xltx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.template',\n  xlw: 'application/vnd.ms-excel',\n  txt: 'text/plain',\n  text: 'text/plain',\n  conf: 'text/plain',\n  log: 'text/plain',\n  pdf: 'application/pdf',\n  zip: 'application/zip',\n  '7z': 'application/x-7z-compressed',\n  rar: 'application/x-rar-compressed',\n  tar: 'application/x-tar',\n  gz: 'application/gzip',\n  dmg: 'application/x-apple-diskimage'\n};", "\"use strict\";\n\nconst getFileNameAndExtension = require('./getFileNameAndExtension');\n\nconst mimeTypes = require('./mimeTypes');\n\nmodule.exports = function getFileType(file) {\n  var _getFileNameAndExtens;\n\n  if (file.type) return file.type;\n  const fileExtension = file.name ? (_getFileNameAndExtens = getFileNameAndExtension(file.name).extension) == null ? void 0 : _getFileNameAndExtens.toLowerCase() : null;\n\n  if (fileExtension && fileExtension in mimeTypes) {\n    // else, see if we can map extension to a mime type\n    return mimeTypes[fileExtension];\n  } // if all fails, fall back to a generic byte stream type\n\n\n  return 'application/octet-stream';\n};", "\"use strict\";\n\nfunction encodeCharacter(character) {\n  return character.charCodeAt(0).toString(32);\n}\n\nfunction encodeFilename(name) {\n  let suffix = '';\n  return name.replace(/[^A-Z0-9]/ig, character => {\n    suffix += `-${encodeCharacter(character)}`;\n    return '/';\n  }) + suffix;\n}\n/**\n * Takes a file object and turns it into fileID, by converting file.name to lowercase,\n * removing extra characters and adding type, size and lastModified\n *\n * @param {object} file\n * @returns {string} the fileID\n */\n\n\nmodule.exports = function generateFileID(file) {\n  // It's tempting to do `[items].filter(Boolean).join('-')` here, but that\n  // is slower! simple string concatenation is fast\n  let id = 'uppy';\n\n  if (typeof file.name === 'string') {\n    id += `-${encodeFilename(file.name.toLowerCase())}`;\n  }\n\n  if (file.type !== undefined) {\n    id += `-${file.type}`;\n  }\n\n  if (file.meta && typeof file.meta.relativePath === 'string') {\n    id += `-${encodeFilename(file.meta.relativePath.toLowerCase())}`;\n  }\n\n  if (file.data.size !== undefined) {\n    id += `-${file.data.size}`;\n  }\n\n  if (file.data.lastModified !== undefined) {\n    id += `-${file.data.lastModified}`;\n  }\n\n  return id;\n};", "\"use strict\";\n\n// Edge 15.x does not fire 'progress' events on uploads.\n// See https://github.com/transloadit/uppy/issues/945\n// And https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/12224510/\nmodule.exports = function supportsUploadProgress(userAgent) {\n  // Allow passing in userAgent for tests\n  if (userAgent == null) {\n    userAgent = typeof navigator !== 'undefined' ? navigator.userAgent : null;\n  } // Assume it works because basically everything supports progress events.\n\n\n  if (!userAgent) return true;\n  const m = /Edge\\/(\\d+\\.\\d+)/.exec(userAgent);\n  if (!m) return true;\n  const edgeVersion = m[1];\n  let [major, minor] = edgeVersion.split('.');\n  major = parseInt(major, 10);\n  minor = parseInt(minor, 10); // Worked before:\n  // Edge 40.15063.0.0\n  // Microsoft EdgeHTML 15.15063\n\n  if (major < 15 || major === 15 && minor < 15063) {\n    return true;\n  } // Fixed in:\n  // Microsoft EdgeHTML 18.18218\n\n\n  if (major > 18 || major === 18 && minor >= 18218) {\n    return true;\n  } // other versions don't work.\n\n\n  return false;\n};", "\"use strict\";\n\nmodule.exports = function getFileName(fileType, fileDescriptor) {\n  if (fileDescriptor.name) {\n    return fileDescriptor.name;\n  }\n\n  if (fileType.split('/')[0] === 'image') {\n    return `${fileType.split('/')[0]}.${fileType.split('/')[1]}`;\n  }\n\n  return 'noname';\n};", "\"use strict\";\n\n/**\n * Adds zero to strings shorter than two characters.\n *\n * @param {number} number\n * @returns {string}\n */\nfunction pad(number) {\n  return number < 10 ? `0${number}` : number.toString();\n}\n/**\n * Returns a timestamp in the format of `hours:minutes:seconds`\n */\n\n\nmodule.exports = function getTimeStamp() {\n  const date = new Date();\n  const hours = pad(date.getHours());\n  const minutes = pad(date.getMinutes());\n  const seconds = pad(date.getSeconds());\n  return `${hours}:${minutes}:${seconds}`;\n};", "\"use strict\";\n\n/* eslint-disable no-console */\nconst getTimeStamp = require('@uppy/utils/lib/getTimeStamp'); // Swallow all logs, except errors.\n// default if logger is not set or debug: false\n\n\nconst justErrorsLogger = {\n  debug: () => {},\n  warn: () => {},\n  error: function () {\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return console.error(`[Uppy] [${getTimeStamp()}]`, ...args);\n  }\n}; // Print logs to console with namespace + timestamp,\n// set by logger: Uppy.debugLogger or debug: true\n\nconst debugLogger = {\n  debug: function () {\n    for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n      args[_key2] = arguments[_key2];\n    }\n\n    return console.debug(`[Uppy] [${getTimeStamp()}]`, ...args);\n  },\n  warn: function () {\n    for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n      args[_key3] = arguments[_key3];\n    }\n\n    return console.warn(`[Uppy] [${getTimeStamp()}]`, ...args);\n  },\n  error: function () {\n    for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n      args[_key4] = arguments[_key4];\n    }\n\n    return console.error(`[Uppy] [${getTimeStamp()}]`, ...args);\n  }\n};\nmodule.exports = {\n  justErrorsLogger,\n  debugLogger\n};", "\"use strict\";\n\nmodule.exports = {\n  strings: {\n    addBulkFilesFailed: {\n      0: 'Failed to add %{smart_count} file due to an internal error',\n      1: 'Failed to add %{smart_count} files due to internal errors'\n    },\n    youCanOnlyUploadX: {\n      0: 'You can only upload %{smart_count} file',\n      1: 'You can only upload %{smart_count} files'\n    },\n    youHaveToAtLeastSelectX: {\n      0: 'You have to select at least %{smart_count} file',\n      1: 'You have to select at least %{smart_count} files'\n    },\n    exceedsSize: '%{file} exceeds maximum allowed size of %{size}',\n    missingRequiredMetaField: 'Missing required meta fields',\n    missingRequiredMetaFieldOnFile: 'Missing required meta fields in %{fileName}',\n    inferiorSize: 'This file is smaller than the allowed size of %{size}',\n    youCanOnlyUploadFileTypes: 'You can only upload: %{types}',\n    noMoreFilesAllowed: 'Cannot add more files',\n    noDuplicates: \"Cannot add the duplicate file '%{fileName}', it already exists\",\n    companionError: 'Connection with Companion failed',\n    authAborted: 'Authentication aborted',\n    companionUnauthorizeHint: 'To unauthorize to your %{provider} account, please go to %{url}',\n    failedToUpload: 'Failed to upload %{file}',\n    noInternetConnection: 'No Internet connection',\n    connectedToInternet: 'Connected to the Internet',\n    // Strings for remote providers\n    noFilesFound: 'You have no files or folders here',\n    selectX: {\n      0: 'Select %{smart_count}',\n      1: 'Select %{smart_count}'\n    },\n    allFilesFromFolderNamed: 'All files from folder %{name}',\n    openFolderNamed: 'Open folder %{name}',\n    cancel: 'Cancel',\n    logOut: 'Log out',\n    filter: 'Filter',\n    resetFilter: 'Reset filter',\n    loading: 'Loading...',\n    authenticateWithTitle: 'Please authenticate with %{pluginName} to select files',\n    authenticateWith: 'Connect to %{pluginName}',\n    signInWithGoogle: 'Sign in with Google',\n    searchImages: 'Search for images',\n    enterTextToSearch: 'Enter text to search for images',\n    backToSearch: 'Back to Search',\n    emptyFolderAdded: 'No files were added from empty folder',\n    folderAlreadyAdded: 'The folder \"%{folder}\" was already added',\n    folderAdded: {\n      0: 'Added %{smart_count} file from %{folder}',\n      1: 'Added %{smart_count} files from %{folder}'\n    }\n  }\n};", "/* global AggregateError */\n'use strict';\n\nlet _Symbol$for, _Symbol$for2;\n\nfunction _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError(\"attempted to use private field on non-instance\"); } return receiver; }\n\nvar id = 0;\n\nfunction _classPrivateFieldLooseKey(name) { return \"__private_\" + id++ + \"_\" + name; }\n\nconst Translator = require('@uppy/utils/lib/Translator');\n\nconst ee = require('namespace-emitter');\n\nconst {\n  nanoid\n} = require('nanoid/non-secure');\n\nconst throttle = require('lodash.throttle');\n\nconst prettierBytes = require('@transloadit/prettier-bytes');\n\nconst match = require('mime-match');\n\nconst DefaultStore = require('@uppy/store-default');\n\nconst getFileType = require('@uppy/utils/lib/getFileType');\n\nconst getFileNameAndExtension = require('@uppy/utils/lib/getFileNameAndExtension');\n\nconst generateFileID = require('@uppy/utils/lib/generateFileID');\n\nconst supportsUploadProgress = require('./supportsUploadProgress');\n\nconst getFileName = require('./getFileName');\n\nconst {\n  justErrorsLogger,\n  debugLogger\n} = require('./loggers');\n\nconst locale = require('./locale'); // Exported from here.\n\n\nclass RestrictionError extends Error {\n  constructor() {\n    super(...arguments);\n    this.isRestriction = true;\n  }\n\n}\n\nif (typeof AggregateError === 'undefined') {\n  // eslint-disable-next-line no-global-assign\n  globalThis.AggregateError = class AggregateError extends Error {\n    constructor(errors, message) {\n      super(message);\n      this.errors = errors;\n    }\n\n  };\n}\n\nclass AggregateRestrictionError extends AggregateError {\n  constructor() {\n    super(...arguments);\n    this.isRestriction = true;\n  }\n\n}\n/**\n * Uppy Core module.\n * Manages plugins, state updates, acts as an event bus,\n * adds/removes files and metadata.\n */\n\n\nvar _plugins = /*#__PURE__*/_classPrivateFieldLooseKey(\"plugins\");\n\nvar _storeUnsubscribe = /*#__PURE__*/_classPrivateFieldLooseKey(\"storeUnsubscribe\");\n\nvar _emitter = /*#__PURE__*/_classPrivateFieldLooseKey(\"emitter\");\n\nvar _preProcessors = /*#__PURE__*/_classPrivateFieldLooseKey(\"preProcessors\");\n\nvar _uploaders = /*#__PURE__*/_classPrivateFieldLooseKey(\"uploaders\");\n\nvar _postProcessors = /*#__PURE__*/_classPrivateFieldLooseKey(\"postProcessors\");\n\nvar _checkRestrictions = /*#__PURE__*/_classPrivateFieldLooseKey(\"checkRestrictions\");\n\nvar _checkMinNumberOfFiles = /*#__PURE__*/_classPrivateFieldLooseKey(\"checkMinNumberOfFiles\");\n\nvar _checkRequiredMetaFieldsOnFile = /*#__PURE__*/_classPrivateFieldLooseKey(\"checkRequiredMetaFieldsOnFile\");\n\nvar _checkRequiredMetaFields = /*#__PURE__*/_classPrivateFieldLooseKey(\"checkRequiredMetaFields\");\n\nvar _showOrLogErrorAndThrow = /*#__PURE__*/_classPrivateFieldLooseKey(\"showOrLogErrorAndThrow\");\n\nvar _assertNewUploadAllowed = /*#__PURE__*/_classPrivateFieldLooseKey(\"assertNewUploadAllowed\");\n\nvar _checkAndCreateFileStateObject = /*#__PURE__*/_classPrivateFieldLooseKey(\"checkAndCreateFileStateObject\");\n\nvar _startIfAutoProceed = /*#__PURE__*/_classPrivateFieldLooseKey(\"startIfAutoProceed\");\n\nvar _addListeners = /*#__PURE__*/_classPrivateFieldLooseKey(\"addListeners\");\n\nvar _updateOnlineStatus = /*#__PURE__*/_classPrivateFieldLooseKey(\"updateOnlineStatus\");\n\nvar _createUpload = /*#__PURE__*/_classPrivateFieldLooseKey(\"createUpload\");\n\nvar _getUpload = /*#__PURE__*/_classPrivateFieldLooseKey(\"getUpload\");\n\nvar _removeUpload = /*#__PURE__*/_classPrivateFieldLooseKey(\"removeUpload\");\n\nvar _runUpload = /*#__PURE__*/_classPrivateFieldLooseKey(\"runUpload\");\n\n_Symbol$for = Symbol.for('uppy test: getPlugins');\n_Symbol$for2 = Symbol.for('uppy test: createUpload');\n\nclass Uppy {\n  // eslint-disable-next-line global-require\n\n  /** @type {Record<string, BasePlugin[]>} */\n\n  /**\n   * Instantiate Uppy\n   *\n   * @param {object} opts \u2014 Uppy options\n   */\n  constructor(_opts) {\n    Object.defineProperty(this, _runUpload, {\n      value: _runUpload2\n    });\n    Object.defineProperty(this, _removeUpload, {\n      value: _removeUpload2\n    });\n    Object.defineProperty(this, _getUpload, {\n      value: _getUpload2\n    });\n    Object.defineProperty(this, _createUpload, {\n      value: _createUpload2\n    });\n    Object.defineProperty(this, _addListeners, {\n      value: _addListeners2\n    });\n    Object.defineProperty(this, _startIfAutoProceed, {\n      value: _startIfAutoProceed2\n    });\n    Object.defineProperty(this, _checkAndCreateFileStateObject, {\n      value: _checkAndCreateFileStateObject2\n    });\n    Object.defineProperty(this, _assertNewUploadAllowed, {\n      value: _assertNewUploadAllowed2\n    });\n    Object.defineProperty(this, _showOrLogErrorAndThrow, {\n      value: _showOrLogErrorAndThrow2\n    });\n    Object.defineProperty(this, _checkRequiredMetaFields, {\n      value: _checkRequiredMetaFields2\n    });\n    Object.defineProperty(this, _checkRequiredMetaFieldsOnFile, {\n      value: _checkRequiredMetaFieldsOnFile2\n    });\n    Object.defineProperty(this, _checkMinNumberOfFiles, {\n      value: _checkMinNumberOfFiles2\n    });\n    Object.defineProperty(this, _checkRestrictions, {\n      value: _checkRestrictions2\n    });\n    Object.defineProperty(this, _plugins, {\n      writable: true,\n      value: Object.create(null)\n    });\n    Object.defineProperty(this, _storeUnsubscribe, {\n      writable: true,\n      value: void 0\n    });\n    Object.defineProperty(this, _emitter, {\n      writable: true,\n      value: ee()\n    });\n    Object.defineProperty(this, _preProcessors, {\n      writable: true,\n      value: new Set()\n    });\n    Object.defineProperty(this, _uploaders, {\n      writable: true,\n      value: new Set()\n    });\n    Object.defineProperty(this, _postProcessors, {\n      writable: true,\n      value: new Set()\n    });\n    Object.defineProperty(this, _updateOnlineStatus, {\n      writable: true,\n      value: this.updateOnlineStatus.bind(this)\n    });\n    this.defaultLocale = locale;\n    const defaultOptions = {\n      id: 'uppy',\n      autoProceed: false,\n\n      /**\n       * @deprecated The method should not be used\n       */\n      allowMultipleUploads: true,\n      allowMultipleUploadBatches: true,\n      debug: false,\n      restrictions: {\n        maxFileSize: null,\n        minFileSize: null,\n        maxTotalFileSize: null,\n        maxNumberOfFiles: null,\n        minNumberOfFiles: null,\n        allowedFileTypes: null,\n        requiredMetaFields: []\n      },\n      meta: {},\n      onBeforeFileAdded: currentFile => currentFile,\n      onBeforeUpload: files => files,\n      store: DefaultStore(),\n      logger: justErrorsLogger,\n      infoTimeout: 5000\n    }; // Merge default options with the ones set by user,\n    // making sure to merge restrictions too\n\n    this.opts = { ...defaultOptions,\n      ..._opts,\n      restrictions: { ...defaultOptions.restrictions,\n        ...(_opts && _opts.restrictions)\n      }\n    }; // Support debug: true for backwards-compatability, unless logger is set in opts\n    // opts instead of this.opts to avoid comparing objects \u2014 we set logger: justErrorsLogger in defaultOptions\n\n    if (_opts && _opts.logger && _opts.debug) {\n      this.log('You are using a custom `logger`, but also set `debug: true`, which uses built-in logger to output logs to console. Ignoring `debug: true` and using your custom `logger`.', 'warning');\n    } else if (_opts && _opts.debug) {\n      this.opts.logger = debugLogger;\n    }\n\n    this.log(`Using Core v${this.constructor.VERSION}`);\n\n    if (this.opts.restrictions.allowedFileTypes && this.opts.restrictions.allowedFileTypes !== null && !Array.isArray(this.opts.restrictions.allowedFileTypes)) {\n      throw new TypeError('`restrictions.allowedFileTypes` must be an array');\n    }\n\n    this.i18nInit(); // ___Why throttle at 500ms?\n    //    - We must throttle at >250ms for superfocus in Dashboard to work well\n    //    (because animation takes 0.25s, and we want to wait for all animations to be over before refocusing).\n    //    [Practical Check]: if thottle is at 100ms, then if you are uploading a file,\n    //    and click 'ADD MORE FILES', - focus won't activate in Firefox.\n    //    - We must throttle at around >500ms to avoid performance lags.\n    //    [Practical Check] Firefox, try to upload a big file for a prolonged period of time. Laptop will start to heat up.\n\n    this.calculateProgress = throttle(this.calculateProgress.bind(this), 500, {\n      leading: true,\n      trailing: true\n    });\n    this.store = this.opts.store;\n    this.setState({\n      plugins: {},\n      files: {},\n      currentUploads: {},\n      allowNewUpload: true,\n      capabilities: {\n        uploadProgress: supportsUploadProgress(),\n        individualCancellation: true,\n        resumableUploads: false\n      },\n      totalProgress: 0,\n      meta: { ...this.opts.meta\n      },\n      info: [],\n      recoveredState: null\n    });\n    _classPrivateFieldLooseBase(this, _storeUnsubscribe)[_storeUnsubscribe] = this.store.subscribe((prevState, nextState, patch) => {\n      this.emit('state-update', prevState, nextState, patch);\n      this.updateAll(nextState);\n    }); // Exposing uppy object on window for debugging and testing\n\n    if (this.opts.debug && typeof window !== 'undefined') {\n      window[this.opts.id] = this;\n    }\n\n    _classPrivateFieldLooseBase(this, _addListeners)[_addListeners]();\n  }\n\n  emit(event) {\n    for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n      args[_key - 1] = arguments[_key];\n    }\n\n    _classPrivateFieldLooseBase(this, _emitter)[_emitter].emit(event, ...args);\n  }\n\n  on(event, callback) {\n    _classPrivateFieldLooseBase(this, _emitter)[_emitter].on(event, callback);\n\n    return this;\n  }\n\n  once(event, callback) {\n    _classPrivateFieldLooseBase(this, _emitter)[_emitter].once(event, callback);\n\n    return this;\n  }\n\n  off(event, callback) {\n    _classPrivateFieldLooseBase(this, _emitter)[_emitter].off(event, callback);\n\n    return this;\n  }\n  /**\n   * Iterate on all plugins and run `update` on them.\n   * Called each time state changes.\n   *\n   */\n\n\n  updateAll(state) {\n    this.iteratePlugins(plugin => {\n      plugin.update(state);\n    });\n  }\n  /**\n   * Updates state with a patch\n   *\n   * @param {object} patch {foo: 'bar'}\n   */\n\n\n  setState(patch) {\n    this.store.setState(patch);\n  }\n  /**\n   * Returns current state.\n   *\n   * @returns {object}\n   */\n\n\n  getState() {\n    return this.store.getState();\n  }\n  /**\n   * Back compat for when uppy.state is used instead of uppy.getState().\n   *\n   * @deprecated\n   */\n\n\n  get state() {\n    // Here, state is a non-enumerable property.\n    return this.getState();\n  }\n  /**\n   * Shorthand to set state for a specific file.\n   */\n\n\n  setFileState(fileID, state) {\n    if (!this.getState().files[fileID]) {\n      throw new Error(`Can\u2019t set state for ${fileID} (the file could have been removed)`);\n    }\n\n    this.setState({\n      files: { ...this.getState().files,\n        [fileID]: { ...this.getState().files[fileID],\n          ...state\n        }\n      }\n    });\n  }\n\n  i18nInit() {\n    const translator = new Translator([this.defaultLocale, this.opts.locale]);\n    this.i18n = translator.translate.bind(translator);\n    this.i18nArray = translator.translateArray.bind(translator);\n    this.locale = translator.locale;\n  }\n\n  setOptions(newOpts) {\n    this.opts = { ...this.opts,\n      ...newOpts,\n      restrictions: { ...this.opts.restrictions,\n        ...(newOpts && newOpts.restrictions)\n      }\n    };\n\n    if (newOpts.meta) {\n      this.setMeta(newOpts.meta);\n    }\n\n    this.i18nInit();\n\n    if (newOpts.locale) {\n      this.iteratePlugins(plugin => {\n        plugin.setOptions();\n      });\n    } // Note: this is not the preact `setState`, it's an internal function that has the same name.\n\n\n    this.setState(); // so that UI re-renders with new options\n  }\n\n  resetProgress() {\n    const defaultProgress = {\n      percentage: 0,\n      bytesUploaded: 0,\n      uploadComplete: false,\n      uploadStarted: null\n    };\n    const files = { ...this.getState().files\n    };\n    const updatedFiles = {};\n    Object.keys(files).forEach(fileID => {\n      const updatedFile = { ...files[fileID]\n      };\n      updatedFile.progress = { ...updatedFile.progress,\n        ...defaultProgress\n      };\n      updatedFiles[fileID] = updatedFile;\n    });\n    this.setState({\n      files: updatedFiles,\n      totalProgress: 0\n    });\n    this.emit('reset-progress');\n  }\n\n  addPreProcessor(fn) {\n    _classPrivateFieldLooseBase(this, _preProcessors)[_preProcessors].add(fn);\n  }\n\n  removePreProcessor(fn) {\n    return _classPrivateFieldLooseBase(this, _preProcessors)[_preProcessors].delete(fn);\n  }\n\n  addPostProcessor(fn) {\n    _classPrivateFieldLooseBase(this, _postProcessors)[_postProcessors].add(fn);\n  }\n\n  removePostProcessor(fn) {\n    return _classPrivateFieldLooseBase(this, _postProcessors)[_postProcessors].delete(fn);\n  }\n\n  addUploader(fn) {\n    _classPrivateFieldLooseBase(this, _uploaders)[_uploaders].add(fn);\n  }\n\n  removeUploader(fn) {\n    return _classPrivateFieldLooseBase(this, _uploaders)[_uploaders].delete(fn);\n  }\n\n  setMeta(data) {\n    const updatedMeta = { ...this.getState().meta,\n      ...data\n    };\n    const updatedFiles = { ...this.getState().files\n    };\n    Object.keys(updatedFiles).forEach(fileID => {\n      updatedFiles[fileID] = { ...updatedFiles[fileID],\n        meta: { ...updatedFiles[fileID].meta,\n          ...data\n        }\n      };\n    });\n    this.log('Adding metadata:');\n    this.log(data);\n    this.setState({\n      meta: updatedMeta,\n      files: updatedFiles\n    });\n  }\n\n  setFileMeta(fileID, data) {\n    const updatedFiles = { ...this.getState().files\n    };\n\n    if (!updatedFiles[fileID]) {\n      this.log('Was trying to set metadata for a file that has been removed: ', fileID);\n      return;\n    }\n\n    const newMeta = { ...updatedFiles[fileID].meta,\n      ...data\n    };\n    updatedFiles[fileID] = { ...updatedFiles[fileID],\n      meta: newMeta\n    };\n    this.setState({\n      files: updatedFiles\n    });\n  }\n  /**\n   * Get a file object.\n   *\n   * @param {string} fileID The ID of the file object to return.\n   */\n\n\n  getFile(fileID) {\n    return this.getState().files[fileID];\n  }\n  /**\n   * Get all files in an array.\n   */\n\n\n  getFiles() {\n    const {\n      files\n    } = this.getState();\n    return Object.values(files);\n  }\n\n  getObjectOfFilesPerState() {\n    const {\n      files: filesObject,\n      totalProgress,\n      error\n    } = this.getState();\n    const files = Object.values(filesObject);\n    const inProgressFiles = files.filter(_ref => {\n      let {\n        progress\n      } = _ref;\n      return !progress.uploadComplete && progress.uploadStarted;\n    });\n    const newFiles = files.filter(file => !file.progress.uploadStarted);\n    const startedFiles = files.filter(file => file.progress.uploadStarted || file.progress.preprocess || file.progress.postprocess);\n    const uploadStartedFiles = files.filter(file => file.progress.uploadStarted);\n    const pausedFiles = files.filter(file => file.isPaused);\n    const completeFiles = files.filter(file => file.progress.uploadComplete);\n    const erroredFiles = files.filter(file => file.error);\n    const inProgressNotPausedFiles = inProgressFiles.filter(file => !file.isPaused);\n    const processingFiles = files.filter(file => file.progress.preprocess || file.progress.postprocess);\n    return {\n      newFiles,\n      startedFiles,\n      uploadStartedFiles,\n      pausedFiles,\n      completeFiles,\n      erroredFiles,\n      inProgressFiles,\n      inProgressNotPausedFiles,\n      processingFiles,\n      isUploadStarted: uploadStartedFiles.length > 0,\n      isAllComplete: totalProgress === 100 && completeFiles.length === files.length && processingFiles.length === 0,\n      isAllErrored: !!error && erroredFiles.length === files.length,\n      isAllPaused: inProgressFiles.length !== 0 && pausedFiles.length === inProgressFiles.length,\n      isUploadInProgress: inProgressFiles.length > 0,\n      isSomeGhost: files.some(file => file.isGhost)\n    };\n  }\n  /**\n   * A public wrapper for _checkRestrictions \u2014 checks if a file passes a set of restrictions.\n   * For use in UI pluigins (like Providers), to disallow selecting files that won\u2019t pass restrictions.\n   *\n   * @param {object} file object to check\n   * @param {Array} [files] array to check maxNumberOfFiles and maxTotalFileSize\n   * @returns {object} { result: true/false, reason: why file didn\u2019t pass restrictions }\n   */\n\n\n  validateRestrictions(file, files) {\n    try {\n      _classPrivateFieldLooseBase(this, _checkRestrictions)[_checkRestrictions](file, files);\n\n      return {\n        result: true\n      };\n    } catch (err) {\n      return {\n        result: false,\n        reason: err.message\n      };\n    }\n  }\n  /**\n   * Check if file passes a set of restrictions set in options: maxFileSize, minFileSize,\n   * maxNumberOfFiles and allowedFileTypes.\n   *\n   * @param {object} file object to check\n   * @param {Array} [files] array to check maxNumberOfFiles and maxTotalFileSize\n   * @private\n   */\n\n\n  checkIfFileAlreadyExists(fileID) {\n    const {\n      files\n    } = this.getState();\n\n    if (files[fileID] && !files[fileID].isGhost) {\n      return true;\n    }\n\n    return false;\n  }\n  /**\n   * Create a file state object based on user-provided `addFile()` options.\n   *\n   * Note this is extremely side-effectful and should only be done when a file state object\n   * will be added to state immediately afterward!\n   *\n   * The `files` value is passed in because it may be updated by the caller without updating the store.\n   */\n\n\n  /**\n   * Add a new file to `state.files`. This will run `onBeforeFileAdded`,\n   * try to guess file type in a clever way, check file against restrictions,\n   * and start an upload if `autoProceed === true`.\n   *\n   * @param {object} file object to add\n   * @returns {string} id for the added file\n   */\n  addFile(file) {\n    _classPrivateFieldLooseBase(this, _assertNewUploadAllowed)[_assertNewUploadAllowed](file);\n\n    const {\n      files\n    } = this.getState();\n\n    let newFile = _classPrivateFieldLooseBase(this, _checkAndCreateFileStateObject)[_checkAndCreateFileStateObject](files, file); // Users are asked to re-select recovered files without data,\n    // and to keep the progress, meta and everthing else, we only replace said data\n\n\n    if (files[newFile.id] && files[newFile.id].isGhost) {\n      newFile = { ...files[newFile.id],\n        data: file.data,\n        isGhost: false\n      };\n      this.log(`Replaced the blob in the restored ghost file: ${newFile.name}, ${newFile.id}`);\n    }\n\n    this.setState({\n      files: { ...files,\n        [newFile.id]: newFile\n      }\n    });\n    this.emit('file-added', newFile);\n    this.emit('files-added', [newFile]);\n    this.log(`Added file: ${newFile.name}, ${newFile.id}, mime type: ${newFile.type}`);\n\n    _classPrivateFieldLooseBase(this, _startIfAutoProceed)[_startIfAutoProceed]();\n\n    return newFile.id;\n  }\n  /**\n   * Add multiple files to `state.files`. See the `addFile()` documentation.\n   *\n   * If an error occurs while adding a file, it is logged and the user is notified.\n   * This is good for UI plugins, but not for programmatic use.\n   * Programmatic users should usually still use `addFile()` on individual files.\n   */\n\n\n  addFiles(fileDescriptors) {\n    _classPrivateFieldLooseBase(this, _assertNewUploadAllowed)[_assertNewUploadAllowed](); // create a copy of the files object only once\n\n\n    const files = { ...this.getState().files\n    };\n    const newFiles = [];\n    const errors = [];\n\n    for (let i = 0; i < fileDescriptors.length; i++) {\n      try {\n        let newFile = _classPrivateFieldLooseBase(this, _checkAndCreateFileStateObject)[_checkAndCreateFileStateObject](files, fileDescriptors[i]); // Users are asked to re-select recovered files without data,\n        // and to keep the progress, meta and everthing else, we only replace said data\n\n\n        if (files[newFile.id] && files[newFile.id].isGhost) {\n          newFile = { ...files[newFile.id],\n            data: fileDescriptors[i].data,\n            isGhost: false\n          };\n          this.log(`Replaced blob in a ghost file: ${newFile.name}, ${newFile.id}`);\n        }\n\n        files[newFile.id] = newFile;\n        newFiles.push(newFile);\n      } catch (err) {\n        if (!err.isRestriction) {\n          errors.push(err);\n        }\n      }\n    }\n\n    this.setState({\n      files\n    });\n    newFiles.forEach(newFile => {\n      this.emit('file-added', newFile);\n    });\n    this.emit('files-added', newFiles);\n\n    if (newFiles.length > 5) {\n      this.log(`Added batch of ${newFiles.length} files`);\n    } else {\n      Object.keys(newFiles).forEach(fileID => {\n        this.log(`Added file: ${newFiles[fileID].name}\\n id: ${newFiles[fileID].id}\\n type: ${newFiles[fileID].type}`);\n      });\n    }\n\n    if (newFiles.length > 0) {\n      _classPrivateFieldLooseBase(this, _startIfAutoProceed)[_startIfAutoProceed]();\n    }\n\n    if (errors.length > 0) {\n      let message = 'Multiple errors occurred while adding files:\\n';\n      errors.forEach(subError => {\n        message += `\\n * ${subError.message}`;\n      });\n      this.info({\n        message: this.i18n('addBulkFilesFailed', {\n          smart_count: errors.length\n        }),\n        details: message\n      }, 'error', this.opts.infoTimeout);\n\n      if (typeof AggregateError === 'function') {\n        throw new AggregateError(errors, message);\n      } else {\n        const err = new Error(message);\n        err.errors = errors;\n        throw err;\n      }\n    }\n  }\n\n  removeFiles(fileIDs, reason) {\n    const {\n      files,\n      currentUploads\n    } = this.getState();\n    const updatedFiles = { ...files\n    };\n    const updatedUploads = { ...currentUploads\n    };\n    const removedFiles = Object.create(null);\n    fileIDs.forEach(fileID => {\n      if (files[fileID]) {\n        removedFiles[fileID] = files[fileID];\n        delete updatedFiles[fileID];\n      }\n    }); // Remove files from the `fileIDs` list in each upload.\n\n    function fileIsNotRemoved(uploadFileID) {\n      return removedFiles[uploadFileID] === undefined;\n    }\n\n    Object.keys(updatedUploads).forEach(uploadID => {\n      const newFileIDs = currentUploads[uploadID].fileIDs.filter(fileIsNotRemoved); // Remove the upload if no files are associated with it anymore.\n\n      if (newFileIDs.length === 0) {\n        delete updatedUploads[uploadID];\n        return;\n      }\n\n      updatedUploads[uploadID] = { ...currentUploads[uploadID],\n        fileIDs: newFileIDs\n      };\n    });\n    const stateUpdate = {\n      currentUploads: updatedUploads,\n      files: updatedFiles\n    }; // If all files were removed - allow new uploads,\n    // and clear recoveredState\n\n    if (Object.keys(updatedFiles).length === 0) {\n      stateUpdate.allowNewUpload = true;\n      stateUpdate.error = null;\n      stateUpdate.recoveredState = null;\n    }\n\n    this.setState(stateUpdate);\n    this.calculateTotalProgress();\n    const removedFileIDs = Object.keys(removedFiles);\n    removedFileIDs.forEach(fileID => {\n      this.emit('file-removed', removedFiles[fileID], reason);\n    });\n\n    if (removedFileIDs.length > 5) {\n      this.log(`Removed ${removedFileIDs.length} files`);\n    } else {\n      this.log(`Removed files: ${removedFileIDs.join(', ')}`);\n    }\n  }\n\n  removeFile(fileID, reason) {\n    if (reason === void 0) {\n      reason = null;\n    }\n\n    this.removeFiles([fileID], reason);\n  }\n\n  pauseResume(fileID) {\n    if (!this.getState().capabilities.resumableUploads || this.getFile(fileID).uploadComplete) {\n      return undefined;\n    }\n\n    const wasPaused = this.getFile(fileID).isPaused || false;\n    const isPaused = !wasPaused;\n    this.setFileState(fileID, {\n      isPaused\n    });\n    this.emit('upload-pause', fileID, isPaused);\n    return isPaused;\n  }\n\n  pauseAll() {\n    const updatedFiles = { ...this.getState().files\n    };\n    const inProgressUpdatedFiles = Object.keys(updatedFiles).filter(file => {\n      return !updatedFiles[file].progress.uploadComplete && updatedFiles[file].progress.uploadStarted;\n    });\n    inProgressUpdatedFiles.forEach(file => {\n      const updatedFile = { ...updatedFiles[file],\n        isPaused: true\n      };\n      updatedFiles[file] = updatedFile;\n    });\n    this.setState({\n      files: updatedFiles\n    });\n    this.emit('pause-all');\n  }\n\n  resumeAll() {\n    const updatedFiles = { ...this.getState().files\n    };\n    const inProgressUpdatedFiles = Object.keys(updatedFiles).filter(file => {\n      return !updatedFiles[file].progress.uploadComplete && updatedFiles[file].progress.uploadStarted;\n    });\n    inProgressUpdatedFiles.forEach(file => {\n      const updatedFile = { ...updatedFiles[file],\n        isPaused: false,\n        error: null\n      };\n      updatedFiles[file] = updatedFile;\n    });\n    this.setState({\n      files: updatedFiles\n    });\n    this.emit('resume-all');\n  }\n\n  retryAll() {\n    const updatedFiles = { ...this.getState().files\n    };\n    const filesToRetry = Object.keys(updatedFiles).filter(file => {\n      return updatedFiles[file].error;\n    });\n    filesToRetry.forEach(file => {\n      const updatedFile = { ...updatedFiles[file],\n        isPaused: false,\n        error: null\n      };\n      updatedFiles[file] = updatedFile;\n    });\n    this.setState({\n      files: updatedFiles,\n      error: null\n    });\n    this.emit('retry-all', filesToRetry);\n\n    if (filesToRetry.length === 0) {\n      return Promise.resolve({\n        successful: [],\n        failed: []\n      });\n    }\n\n    const uploadID = _classPrivateFieldLooseBase(this, _createUpload)[_createUpload](filesToRetry, {\n      forceAllowNewUpload: true // create new upload even if allowNewUpload: false\n\n    });\n\n    return _classPrivateFieldLooseBase(this, _runUpload)[_runUpload](uploadID);\n  }\n\n  cancelAll() {\n    this.emit('cancel-all');\n    const {\n      files\n    } = this.getState();\n    const fileIDs = Object.keys(files);\n\n    if (fileIDs.length) {\n      this.removeFiles(fileIDs, 'cancel-all');\n    }\n\n    this.setState({\n      totalProgress: 0,\n      error: null,\n      recoveredState: null\n    });\n  }\n\n  retryUpload(fileID) {\n    this.setFileState(fileID, {\n      error: null,\n      isPaused: false\n    });\n    this.emit('upload-retry', fileID);\n\n    const uploadID = _classPrivateFieldLooseBase(this, _createUpload)[_createUpload]([fileID], {\n      forceAllowNewUpload: true // create new upload even if allowNewUpload: false\n\n    });\n\n    return _classPrivateFieldLooseBase(this, _runUpload)[_runUpload](uploadID);\n  }\n\n  reset() {\n    this.cancelAll();\n  }\n\n  logout() {\n    this.iteratePlugins(plugin => {\n      if (plugin.provider && plugin.provider.logout) {\n        plugin.provider.logout();\n      }\n    });\n  }\n\n  calculateProgress(file, data) {\n    if (!this.getFile(file.id)) {\n      this.log(`Not setting progress for a file that has been removed: ${file.id}`);\n      return;\n    } // bytesTotal may be null or zero; in that case we can't divide by it\n\n\n    const canHavePercentage = Number.isFinite(data.bytesTotal) && data.bytesTotal > 0;\n    this.setFileState(file.id, {\n      progress: { ...this.getFile(file.id).progress,\n        bytesUploaded: data.bytesUploaded,\n        bytesTotal: data.bytesTotal,\n        percentage: canHavePercentage ? Math.round(data.bytesUploaded / data.bytesTotal * 100) : 0\n      }\n    });\n    this.calculateTotalProgress();\n  }\n\n  calculateTotalProgress() {\n    // calculate total progress, using the number of files currently uploading,\n    // multiplied by 100 and the summ of individual progress of each file\n    const files = this.getFiles();\n    const inProgress = files.filter(file => {\n      return file.progress.uploadStarted || file.progress.preprocess || file.progress.postprocess;\n    });\n\n    if (inProgress.length === 0) {\n      this.emit('progress', 0);\n      this.setState({\n        totalProgress: 0\n      });\n      return;\n    }\n\n    const sizedFiles = inProgress.filter(file => file.progress.bytesTotal != null);\n    const unsizedFiles = inProgress.filter(file => file.progress.bytesTotal == null);\n\n    if (sizedFiles.length === 0) {\n      const progressMax = inProgress.length * 100;\n      const currentProgress = unsizedFiles.reduce((acc, file) => {\n        return acc + file.progress.percentage;\n      }, 0);\n      const totalProgress = Math.round(currentProgress / progressMax * 100);\n      this.setState({\n        totalProgress\n      });\n      return;\n    }\n\n    let totalSize = sizedFiles.reduce((acc, file) => {\n      return acc + file.progress.bytesTotal;\n    }, 0);\n    const averageSize = totalSize / sizedFiles.length;\n    totalSize += averageSize * unsizedFiles.length;\n    let uploadedSize = 0;\n    sizedFiles.forEach(file => {\n      uploadedSize += file.progress.bytesUploaded;\n    });\n    unsizedFiles.forEach(file => {\n      uploadedSize += averageSize * (file.progress.percentage || 0) / 100;\n    });\n    let totalProgress = totalSize === 0 ? 0 : Math.round(uploadedSize / totalSize * 100); // hot fix, because:\n    // uploadedSize ended up larger than totalSize, resulting in 1325% total\n\n    if (totalProgress > 100) {\n      totalProgress = 100;\n    }\n\n    this.setState({\n      totalProgress\n    });\n    this.emit('progress', totalProgress);\n  }\n  /**\n   * Registers listeners for all global actions, like:\n   * `error`, `file-removed`, `upload-progress`\n   */\n\n\n  updateOnlineStatus() {\n    const online = typeof window.navigator.onLine !== 'undefined' ? window.navigator.onLine : true;\n\n    if (!online) {\n      this.emit('is-offline');\n      this.info(this.i18n('noInternetConnection'), 'error', 0);\n      this.wasOffline = true;\n    } else {\n      this.emit('is-online');\n\n      if (this.wasOffline) {\n        this.emit('back-online');\n        this.info(this.i18n('connectedToInternet'), 'success', 3000);\n        this.wasOffline = false;\n      }\n    }\n  }\n\n  getID() {\n    return this.opts.id;\n  }\n  /**\n   * Registers a plugin with Core.\n   *\n   * @param {object} Plugin object\n   * @param {object} [opts] object with options to be passed to Plugin\n   * @returns {object} self for chaining\n   */\n  // eslint-disable-next-line no-shadow\n\n\n  use(Plugin, opts) {\n    if (typeof Plugin !== 'function') {\n      const msg = `Expected a plugin class, but got ${Plugin === null ? 'null' : typeof Plugin}.` + ' Please verify that the plugin was imported and spelled correctly.';\n      throw new TypeError(msg);\n    } // Instantiate\n\n\n    const plugin = new Plugin(this, opts);\n    const pluginId = plugin.id;\n\n    if (!pluginId) {\n      throw new Error('Your plugin must have an id');\n    }\n\n    if (!plugin.type) {\n      throw new Error('Your plugin must have a type');\n    }\n\n    const existsPluginAlready = this.getPlugin(pluginId);\n\n    if (existsPluginAlready) {\n      const msg = `Already found a plugin named '${existsPluginAlready.id}'. ` + `Tried to use: '${pluginId}'.\\n` + 'Uppy plugins must have unique `id` options. See https://uppy.io/docs/plugins/#id.';\n      throw new Error(msg);\n    }\n\n    if (Plugin.VERSION) {\n      this.log(`Using ${pluginId} v${Plugin.VERSION}`);\n    }\n\n    if (plugin.type in _classPrivateFieldLooseBase(this, _plugins)[_plugins]) {\n      _classPrivateFieldLooseBase(this, _plugins)[_plugins][plugin.type].push(plugin);\n    } else {\n      _classPrivateFieldLooseBase(this, _plugins)[_plugins][plugin.type] = [plugin];\n    }\n\n    plugin.install();\n    return this;\n  }\n  /**\n   * Find one Plugin by name.\n   *\n   * @param {string} id plugin id\n   * @returns {BasePlugin|undefined}\n   */\n\n\n  getPlugin(id) {\n    for (const plugins of Object.values(_classPrivateFieldLooseBase(this, _plugins)[_plugins])) {\n      const foundPlugin = plugins.find(plugin => plugin.id === id);\n      if (foundPlugin != null) return foundPlugin;\n    }\n\n    return undefined;\n  }\n\n  [_Symbol$for](type) {\n    return _classPrivateFieldLooseBase(this, _plugins)[_plugins][type];\n  }\n  /**\n   * Iterate through all `use`d plugins.\n   *\n   * @param {Function} method that will be run on each plugin\n   */\n\n\n  iteratePlugins(method) {\n    Object.values(_classPrivateFieldLooseBase(this, _plugins)[_plugins]).flat(1).forEach(method);\n  }\n  /**\n   * Uninstall and remove a plugin.\n   *\n   * @param {object} instance The plugin instance to remove.\n   */\n\n\n  removePlugin(instance) {\n    this.log(`Removing plugin ${instance.id}`);\n    this.emit('plugin-remove', instance);\n\n    if (instance.uninstall) {\n      instance.uninstall();\n    }\n\n    const list = _classPrivateFieldLooseBase(this, _plugins)[_plugins][instance.type]; // list.indexOf failed here, because Vue3 converted the plugin instance\n    // to a Proxy object, which failed the strict comparison test:\n    // obj !== objProxy\n\n\n    const index = list.findIndex(item => item.id === instance.id);\n\n    if (index !== -1) {\n      list.splice(index, 1);\n    }\n\n    const state = this.getState();\n    const updatedState = {\n      plugins: { ...state.plugins,\n        [instance.id]: undefined\n      }\n    };\n    this.setState(updatedState);\n  }\n  /**\n   * Uninstall all plugins and close down this Uppy instance.\n   */\n\n\n  close() {\n    this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`);\n    this.reset();\n\n    _classPrivateFieldLooseBase(this, _storeUnsubscribe)[_storeUnsubscribe]();\n\n    this.iteratePlugins(plugin => {\n      this.removePlugin(plugin);\n    });\n\n    if (typeof window !== 'undefined' && window.removeEventListener) {\n      window.removeEventListener('online', _classPrivateFieldLooseBase(this, _updateOnlineStatus)[_updateOnlineStatus]);\n      window.removeEventListener('offline', _classPrivateFieldLooseBase(this, _updateOnlineStatus)[_updateOnlineStatus]);\n    }\n  }\n\n  hideInfo() {\n    const {\n      info\n    } = this.getState();\n    this.setState({\n      info: info.slice(1)\n    });\n    this.emit('info-hidden');\n  }\n  /**\n   * Set info message in `state.info`, so that UI plugins like `Informer`\n   * can display the message.\n   *\n   * @param {string | object} message Message to be displayed by the informer\n   * @param {string} [type]\n   * @param {number} [duration]\n   */\n\n\n  info(message, type, duration) {\n    if (type === void 0) {\n      type = 'info';\n    }\n\n    if (duration === void 0) {\n      duration = 3000;\n    }\n\n    const isComplexMessage = typeof message === 'object';\n    this.setState({\n      info: [...this.getState().info, {\n        type,\n        message: isComplexMessage ? message.message : message,\n        details: isComplexMessage ? message.details : null\n      }]\n    });\n    setTimeout(() => this.hideInfo(), duration);\n    this.emit('info-visible');\n  }\n  /**\n   * Passes messages to a function, provided in `opts.logger`.\n   * If `opts.logger: Uppy.debugLogger` or `opts.debug: true`, logs to the browser console.\n   *\n   * @param {string|object} message to log\n   * @param {string} [type] optional `error` or `warning`\n   */\n\n\n  log(message, type) {\n    const {\n      logger\n    } = this.opts;\n\n    switch (type) {\n      case 'error':\n        logger.error(message);\n        break;\n\n      case 'warning':\n        logger.warn(message);\n        break;\n\n      default:\n        logger.debug(message);\n        break;\n    }\n  }\n  /**\n   * Restore an upload by its ID.\n   */\n\n\n  restore(uploadID) {\n    this.log(`Core: attempting to restore upload \"${uploadID}\"`);\n\n    if (!this.getState().currentUploads[uploadID]) {\n      _classPrivateFieldLooseBase(this, _removeUpload)[_removeUpload](uploadID);\n\n      return Promise.reject(new Error('Nonexistent upload'));\n    }\n\n    return _classPrivateFieldLooseBase(this, _runUpload)[_runUpload](uploadID);\n  }\n  /**\n   * Create an upload for a bunch of files.\n   *\n   * @param {Array<string>} fileIDs File IDs to include in this upload.\n   * @returns {string} ID of this upload.\n   */\n\n\n  [_Symbol$for2]() {\n    return _classPrivateFieldLooseBase(this, _createUpload)[_createUpload](...arguments);\n  }\n\n  /**\n   * Add data to an upload's result object.\n   *\n   * @param {string} uploadID The ID of the upload.\n   * @param {object} data Data properties to add to the result object.\n   */\n  addResultData(uploadID, data) {\n    if (!_classPrivateFieldLooseBase(this, _getUpload)[_getUpload](uploadID)) {\n      this.log(`Not setting result for an upload that has been removed: ${uploadID}`);\n      return;\n    }\n\n    const {\n      currentUploads\n    } = this.getState();\n    const currentUpload = { ...currentUploads[uploadID],\n      result: { ...currentUploads[uploadID].result,\n        ...data\n      }\n    };\n    this.setState({\n      currentUploads: { ...currentUploads,\n        [uploadID]: currentUpload\n      }\n    });\n  }\n  /**\n   * Remove an upload, eg. if it has been canceled or completed.\n   *\n   * @param {string} uploadID The ID of the upload.\n   */\n\n\n  /**\n   * Start an upload for all the files that are not currently being uploaded.\n   *\n   * @returns {Promise}\n   */\n  upload() {\n    var _classPrivateFieldLoo;\n\n    if (!((_classPrivateFieldLoo = _classPrivateFieldLooseBase(this, _plugins)[_plugins].uploader) != null && _classPrivateFieldLoo.length)) {\n      this.log('No uploader type plugins are used', 'warning');\n    }\n\n    let {\n      files\n    } = this.getState();\n    const onBeforeUploadResult = this.opts.onBeforeUpload(files);\n\n    if (onBeforeUploadResult === false) {\n      return Promise.reject(new Error('Not starting the upload because onBeforeUpload returned false'));\n    }\n\n    if (onBeforeUploadResult && typeof onBeforeUploadResult === 'object') {\n      files = onBeforeUploadResult; // Updating files in state, because uploader plugins receive file IDs,\n      // and then fetch the actual file object from state\n\n      this.setState({\n        files\n      });\n    }\n\n    return Promise.resolve().then(() => {\n      _classPrivateFieldLooseBase(this, _checkMinNumberOfFiles)[_checkMinNumberOfFiles](files);\n\n      _classPrivateFieldLooseBase(this, _checkRequiredMetaFields)[_checkRequiredMetaFields](files);\n    }).catch(err => {\n      _classPrivateFieldLooseBase(this, _showOrLogErrorAndThrow)[_showOrLogErrorAndThrow](err);\n    }).then(() => {\n      const {\n        currentUploads\n      } = this.getState(); // get a list of files that are currently assigned to uploads\n\n      const currentlyUploadingFiles = Object.values(currentUploads).flatMap(curr => curr.fileIDs);\n      const waitingFileIDs = [];\n      Object.keys(files).forEach(fileID => {\n        const file = this.getFile(fileID); // if the file hasn't started uploading and hasn't already been assigned to an upload..\n\n        if (!file.progress.uploadStarted && currentlyUploadingFiles.indexOf(fileID) === -1) {\n          waitingFileIDs.push(file.id);\n        }\n      });\n\n      const uploadID = _classPrivateFieldLooseBase(this, _createUpload)[_createUpload](waitingFileIDs);\n\n      return _classPrivateFieldLooseBase(this, _runUpload)[_runUpload](uploadID);\n    }).catch(err => {\n      _classPrivateFieldLooseBase(this, _showOrLogErrorAndThrow)[_showOrLogErrorAndThrow](err, {\n        showInformer: false\n      });\n    });\n  }\n\n}\n\nfunction _checkRestrictions2(file, files) {\n  if (files === void 0) {\n    files = this.getFiles();\n  }\n\n  const {\n    maxFileSize,\n    minFileSize,\n    maxTotalFileSize,\n    maxNumberOfFiles,\n    allowedFileTypes\n  } = this.opts.restrictions;\n\n  if (maxNumberOfFiles) {\n    if (files.length + 1 > maxNumberOfFiles) {\n      throw new RestrictionError(`${this.i18n('youCanOnlyUploadX', {\n        smart_count: maxNumberOfFiles\n      })}`);\n    }\n  }\n\n  if (allowedFileTypes) {\n    const isCorrectFileType = allowedFileTypes.some(type => {\n      // check if this is a mime-type\n      if (type.indexOf('/') > -1) {\n        if (!file.type) return false;\n        return match(file.type.replace(/;.*?$/, ''), type);\n      } // otherwise this is likely an extension\n\n\n      if (type[0] === '.' && file.extension) {\n        return file.extension.toLowerCase() === type.substr(1).toLowerCase();\n      }\n\n      return false;\n    });\n\n    if (!isCorrectFileType) {\n      const allowedFileTypesString = allowedFileTypes.join(', ');\n      throw new RestrictionError(this.i18n('youCanOnlyUploadFileTypes', {\n        types: allowedFileTypesString\n      }));\n    }\n  } // We can't check maxTotalFileSize if the size is unknown.\n\n\n  if (maxTotalFileSize && file.size != null) {\n    let totalFilesSize = 0;\n    totalFilesSize += file.size;\n    files.forEach(f => {\n      totalFilesSize += f.size;\n    });\n\n    if (totalFilesSize > maxTotalFileSize) {\n      throw new RestrictionError(this.i18n('exceedsSize', {\n        size: prettierBytes(maxTotalFileSize),\n        file: file.name\n      }));\n    }\n  } // We can't check maxFileSize if the size is unknown.\n\n\n  if (maxFileSize && file.size != null) {\n    if (file.size > maxFileSize) {\n      throw new RestrictionError(this.i18n('exceedsSize', {\n        size: prettierBytes(maxFileSize),\n        file: file.name\n      }));\n    }\n  } // We can't check minFileSize if the size is unknown.\n\n\n  if (minFileSize && file.size != null) {\n    if (file.size < minFileSize) {\n      throw new RestrictionError(this.i18n('inferiorSize', {\n        size: prettierBytes(minFileSize)\n      }));\n    }\n  }\n}\n\nfunction _checkMinNumberOfFiles2(files) {\n  const {\n    minNumberOfFiles\n  } = this.opts.restrictions;\n\n  if (Object.keys(files).length < minNumberOfFiles) {\n    throw new RestrictionError(`${this.i18n('youHaveToAtLeastSelectX', {\n      smart_count: minNumberOfFiles\n    })}`);\n  }\n}\n\nfunction _checkRequiredMetaFieldsOnFile2(file) {\n  const {\n    requiredMetaFields\n  } = this.opts.restrictions;\n  const {\n    hasOwnProperty\n  } = Object.prototype;\n  const errors = [];\n  const missingFields = [];\n\n  for (let i = 0; i < requiredMetaFields.length; i++) {\n    if (!hasOwnProperty.call(file.meta, requiredMetaFields[i]) || file.meta[requiredMetaFields[i]] === '') {\n      const err = new RestrictionError(`${this.i18n('missingRequiredMetaFieldOnFile', {\n        fileName: file.name\n      })}`);\n      errors.push(err);\n      missingFields.push(requiredMetaFields[i]);\n\n      _classPrivateFieldLooseBase(this, _showOrLogErrorAndThrow)[_showOrLogErrorAndThrow](err, {\n        file,\n        showInformer: false,\n        throwErr: false\n      });\n    }\n  }\n\n  this.setFileState(file.id, {\n    missingRequiredMetaFields: missingFields\n  });\n  return errors;\n}\n\nfunction _checkRequiredMetaFields2(files) {\n  const errors = Object.keys(files).flatMap(fileID => {\n    const file = this.getFile(fileID);\n    return _classPrivateFieldLooseBase(this, _checkRequiredMetaFieldsOnFile)[_checkRequiredMetaFieldsOnFile](file);\n  });\n\n  if (errors.length) {\n    throw new AggregateRestrictionError(errors, `${this.i18n('missingRequiredMetaField')}`);\n  }\n}\n\nfunction _showOrLogErrorAndThrow2(err, _temp) {\n  let {\n    showInformer = true,\n    file = null,\n    throwErr = true\n  } = _temp === void 0 ? {} : _temp;\n  const message = typeof err === 'object' ? err.message : err;\n  const details = typeof err === 'object' && err.details ? err.details : ''; // Restriction errors should be logged, but not as errors,\n  // as they are expected and shown in the UI.\n\n  let logMessageWithDetails = message;\n\n  if (details) {\n    logMessageWithDetails += ` ${details}`;\n  }\n\n  if (err.isRestriction) {\n    this.log(logMessageWithDetails);\n    this.emit('restriction-failed', file, err);\n  } else {\n    this.log(logMessageWithDetails, 'error');\n  } // Sometimes informer has to be shown manually by the developer,\n  // for example, in `onBeforeFileAdded`.\n\n\n  if (showInformer) {\n    this.info({\n      message,\n      details\n    }, 'error', this.opts.infoTimeout);\n  }\n\n  if (throwErr) {\n    throw typeof err === 'object' ? err : new Error(err);\n  }\n}\n\nfunction _assertNewUploadAllowed2(file) {\n  const {\n    allowNewUpload\n  } = this.getState();\n\n  if (allowNewUpload === false) {\n    _classPrivateFieldLooseBase(this, _showOrLogErrorAndThrow)[_showOrLogErrorAndThrow](new RestrictionError(this.i18n('noMoreFilesAllowed')), {\n      file\n    });\n  }\n}\n\nfunction _checkAndCreateFileStateObject2(files, fileDescriptor) {\n  const fileType = getFileType(fileDescriptor);\n  const fileName = getFileName(fileType, fileDescriptor);\n  const fileExtension = getFileNameAndExtension(fileName).extension;\n  const isRemote = Boolean(fileDescriptor.isRemote);\n  const fileID = generateFileID({ ...fileDescriptor,\n    type: fileType\n  });\n\n  if (this.checkIfFileAlreadyExists(fileID)) {\n    const error = new RestrictionError(this.i18n('noDuplicates', {\n      fileName\n    }));\n\n    _classPrivateFieldLooseBase(this, _showOrLogErrorAndThrow)[_showOrLogErrorAndThrow](error, {\n      file: fileDescriptor\n    });\n  }\n\n  const meta = fileDescriptor.meta || {};\n  meta.name = fileName;\n  meta.type = fileType; // `null` means the size is unknown.\n\n  const size = Number.isFinite(fileDescriptor.data.size) ? fileDescriptor.data.size : null;\n  let newFile = {\n    source: fileDescriptor.source || '',\n    id: fileID,\n    name: fileName,\n    extension: fileExtension || '',\n    meta: { ...this.getState().meta,\n      ...meta\n    },\n    type: fileType,\n    data: fileDescriptor.data,\n    progress: {\n      percentage: 0,\n      bytesUploaded: 0,\n      bytesTotal: size,\n      uploadComplete: false,\n      uploadStarted: null\n    },\n    size,\n    isRemote,\n    remote: fileDescriptor.remote || '',\n    preview: fileDescriptor.preview\n  };\n  const onBeforeFileAddedResult = this.opts.onBeforeFileAdded(newFile, files);\n\n  if (onBeforeFileAddedResult === false) {\n    // Don\u2019t show UI info for this error, as it should be done by the developer\n    _classPrivateFieldLooseBase(this, _showOrLogErrorAndThrow)[_showOrLogErrorAndThrow](new RestrictionError('Cannot add the file because onBeforeFileAdded returned false.'), {\n      showInformer: false,\n      fileDescriptor\n    });\n  } else if (typeof onBeforeFileAddedResult === 'object' && onBeforeFileAddedResult !== null) {\n    newFile = onBeforeFileAddedResult;\n  }\n\n  try {\n    const filesArray = Object.keys(files).map(i => files[i]);\n\n    _classPrivateFieldLooseBase(this, _checkRestrictions)[_checkRestrictions](newFile, filesArray);\n  } catch (err) {\n    _classPrivateFieldLooseBase(this, _showOrLogErrorAndThrow)[_showOrLogErrorAndThrow](err, {\n      file: newFile\n    });\n  }\n\n  return newFile;\n}\n\nfunction _startIfAutoProceed2() {\n  if (this.opts.autoProceed && !this.scheduledAutoProceed) {\n    this.scheduledAutoProceed = setTimeout(() => {\n      this.scheduledAutoProceed = null;\n      this.upload().catch(err => {\n        if (!err.isRestriction) {\n          this.log(err.stack || err.message || err);\n        }\n      });\n    }, 4);\n  }\n}\n\nfunction _addListeners2() {\n  /**\n   * @param {Error} error\n   * @param {object} [file]\n   * @param {object} [response]\n   */\n  const errorHandler = (error, file, response) => {\n    let errorMsg = error.message || 'Unknown error';\n\n    if (error.details) {\n      errorMsg += ` ${error.details}`;\n    }\n\n    this.setState({\n      error: errorMsg\n    });\n\n    if (file != null && file.id in this.getState().files) {\n      this.setFileState(file.id, {\n        error: errorMsg,\n        response\n      });\n    }\n  };\n\n  this.on('error', errorHandler);\n  this.on('upload-error', (file, error, response) => {\n    errorHandler(error, file, response);\n\n    if (typeof error === 'object' && error.message) {\n      const newError = new Error(error.message);\n      newError.details = error.message;\n\n      if (error.details) {\n        newError.details += ` ${error.details}`;\n      }\n\n      newError.message = this.i18n('failedToUpload', {\n        file: file.name\n      });\n\n      _classPrivateFieldLooseBase(this, _showOrLogErrorAndThrow)[_showOrLogErrorAndThrow](newError, {\n        throwErr: false\n      });\n    } else {\n      _classPrivateFieldLooseBase(this, _showOrLogErrorAndThrow)[_showOrLogErrorAndThrow](error, {\n        throwErr: false\n      });\n    }\n  });\n  this.on('upload', () => {\n    this.setState({\n      error: null\n    });\n  });\n  this.on('upload-started', file => {\n    if (!this.getFile(file.id)) {\n      this.log(`Not setting progress for a file that has been removed: ${file.id}`);\n      return;\n    }\n\n    this.setFileState(file.id, {\n      progress: {\n        uploadStarted: Date.now(),\n        uploadComplete: false,\n        percentage: 0,\n        bytesUploaded: 0,\n        bytesTotal: file.size\n      }\n    });\n  });\n  this.on('upload-progress', this.calculateProgress);\n  this.on('upload-success', (file, uploadResp) => {\n    if (!this.getFile(file.id)) {\n      this.log(`Not setting progress for a file that has been removed: ${file.id}`);\n      return;\n    }\n\n    const currentProgress = this.getFile(file.id).progress;\n    this.setFileState(file.id, {\n      progress: { ...currentProgress,\n        postprocess: _classPrivateFieldLooseBase(this, _postProcessors)[_postProcessors].size > 0 ? {\n          mode: 'indeterminate'\n        } : null,\n        uploadComplete: true,\n        percentage: 100,\n        bytesUploaded: currentProgress.bytesTotal\n      },\n      response: uploadResp,\n      uploadURL: uploadResp.uploadURL,\n      isPaused: false\n    }); // Remote providers sometimes don't tell us the file size,\n    // but we can know how many bytes we uploaded once the upload is complete.\n\n    if (file.size == null) {\n      this.setFileState(file.id, {\n        size: uploadResp.bytesUploaded || currentProgress.bytesTotal\n      });\n    }\n\n    this.calculateTotalProgress();\n  });\n  this.on('preprocess-progress', (file, progress) => {\n    if (!this.getFile(file.id)) {\n      this.log(`Not setting progress for a file that has been removed: ${file.id}`);\n      return;\n    }\n\n    this.setFileState(file.id, {\n      progress: { ...this.getFile(file.id).progress,\n        preprocess: progress\n      }\n    });\n  });\n  this.on('preprocess-complete', file => {\n    if (!this.getFile(file.id)) {\n      this.log(`Not setting progress for a file that has been removed: ${file.id}`);\n      return;\n    }\n\n    const files = { ...this.getState().files\n    };\n    files[file.id] = { ...files[file.id],\n      progress: { ...files[file.id].progress\n      }\n    };\n    delete files[file.id].progress.preprocess;\n    this.setState({\n      files\n    });\n  });\n  this.on('postprocess-progress', (file, progress) => {\n    if (!this.getFile(file.id)) {\n      this.log(`Not setting progress for a file that has been removed: ${file.id}`);\n      return;\n    }\n\n    this.setFileState(file.id, {\n      progress: { ...this.getState().files[file.id].progress,\n        postprocess: progress\n      }\n    });\n  });\n  this.on('postprocess-complete', file => {\n    if (!this.getFile(file.id)) {\n      this.log(`Not setting progress for a file that has been removed: ${file.id}`);\n      return;\n    }\n\n    const files = { ...this.getState().files\n    };\n    files[file.id] = { ...files[file.id],\n      progress: { ...files[file.id].progress\n      }\n    };\n    delete files[file.id].progress.postprocess;\n    this.setState({\n      files\n    });\n  });\n  this.on('restored', () => {\n    // Files may have changed--ensure progress is still accurate.\n    this.calculateTotalProgress();\n  });\n  this.on('dashboard:file-edit-complete', file => {\n    if (file) {\n      _classPrivateFieldLooseBase(this, _checkRequiredMetaFieldsOnFile)[_checkRequiredMetaFieldsOnFile](file);\n    }\n  }); // show informer if offline\n\n  if (typeof window !== 'undefined' && window.addEventListener) {\n    window.addEventListener('online', _classPrivateFieldLooseBase(this, _updateOnlineStatus)[_updateOnlineStatus]);\n    window.addEventListener('offline', _classPrivateFieldLooseBase(this, _updateOnlineStatus)[_updateOnlineStatus]);\n    setTimeout(_classPrivateFieldLooseBase(this, _updateOnlineStatus)[_updateOnlineStatus], 3000);\n  }\n}\n\nfunction _createUpload2(fileIDs, opts) {\n  if (opts === void 0) {\n    opts = {};\n  }\n\n  // uppy.retryAll sets this to true \u2014 when retrying we want to ignore `allowNewUpload: false`\n  const {\n    forceAllowNewUpload = false\n  } = opts;\n  const {\n    allowNewUpload,\n    currentUploads\n  } = this.getState();\n\n  if (!allowNewUpload && !forceAllowNewUpload) {\n    throw new Error('Cannot create a new upload: already uploading.');\n  }\n\n  const uploadID = nanoid();\n  this.emit('upload', {\n    id: uploadID,\n    fileIDs\n  });\n  this.setState({\n    allowNewUpload: this.opts.allowMultipleUploadBatches !== false && this.opts.allowMultipleUploads !== false,\n    currentUploads: { ...currentUploads,\n      [uploadID]: {\n        fileIDs,\n        step: 0,\n        result: {}\n      }\n    }\n  });\n  return uploadID;\n}\n\nfunction _getUpload2(uploadID) {\n  const {\n    currentUploads\n  } = this.getState();\n  return currentUploads[uploadID];\n}\n\nfunction _removeUpload2(uploadID) {\n  const currentUploads = { ...this.getState().currentUploads\n  };\n  delete currentUploads[uploadID];\n  this.setState({\n    currentUploads\n  });\n}\n\nasync function _runUpload2(uploadID) {\n  let {\n    currentUploads\n  } = this.getState();\n  let currentUpload = currentUploads[uploadID];\n  const restoreStep = currentUpload.step || 0;\n  const steps = [..._classPrivateFieldLooseBase(this, _preProcessors)[_preProcessors], ..._classPrivateFieldLooseBase(this, _uploaders)[_uploaders], ..._classPrivateFieldLooseBase(this, _postProcessors)[_postProcessors]];\n\n  try {\n    for (let step = restoreStep; step < steps.length; step++) {\n      if (!currentUpload) {\n        break;\n      }\n\n      const fn = steps[step];\n      const updatedUpload = { ...currentUpload,\n        step\n      };\n      this.setState({\n        currentUploads: { ...currentUploads,\n          [uploadID]: updatedUpload\n        }\n      }); // TODO give this the `updatedUpload` object as its only parameter maybe?\n      // Otherwise when more metadata may be added to the upload this would keep getting more parameters\n\n      await fn(updatedUpload.fileIDs, uploadID); // Update currentUpload value in case it was modified asynchronously.\n\n      currentUploads = this.getState().currentUploads;\n      currentUpload = currentUploads[uploadID];\n    }\n  } catch (err) {\n    this.emit('error', err);\n\n    _classPrivateFieldLooseBase(this, _removeUpload)[_removeUpload](uploadID);\n\n    throw err;\n  } // Set result data.\n\n\n  if (currentUpload) {\n    // Mark postprocessing step as complete if necessary; this addresses a case where we might get\n    // stuck in the postprocessing UI while the upload is fully complete.\n    // If the postprocessing steps do not do any work, they may not emit postprocessing events at\n    // all, and never mark the postprocessing as complete. This is fine on its own but we\n    // introduced code in the @uppy/core upload-success handler to prepare postprocessing progress\n    // state if any postprocessors are registered. That is to avoid a \"flash of completed state\"\n    // before the postprocessing plugins can emit events.\n    //\n    // So, just in case an upload with postprocessing plugins *has* completed *without* emitting\n    // postprocessing completion, we do it instead.\n    currentUpload.fileIDs.forEach(fileID => {\n      const file = this.getFile(fileID);\n\n      if (file && file.progress.postprocess) {\n        this.emit('postprocess-complete', file);\n      }\n    });\n    const files = currentUpload.fileIDs.map(fileID => this.getFile(fileID));\n    const successful = files.filter(file => !file.error);\n    const failed = files.filter(file => file.error);\n    await this.addResultData(uploadID, {\n      successful,\n      failed,\n      uploadID\n    }); // Update currentUpload value in case it was modified asynchronously.\n\n    currentUploads = this.getState().currentUploads;\n    currentUpload = currentUploads[uploadID];\n  } // Emit completion events.\n  // This is in a separate function so that the `currentUploads` variable\n  // always refers to the latest state. In the handler right above it refers\n  // to an outdated object without the `.result` property.\n\n\n  let result;\n\n  if (currentUpload) {\n    result = currentUpload.result;\n    this.emit('complete', result);\n\n    _classPrivateFieldLooseBase(this, _removeUpload)[_removeUpload](uploadID);\n  }\n\n  if (result == null) {\n    this.log(`Not setting result for an upload that has been removed: ${uploadID}`);\n  }\n\n  return result;\n}\n\nUppy.VERSION = \"2.1.4\";\nmodule.exports = Uppy;", "export const EMPTY_OBJ = {};\nexport const EMPTY_ARR = [];\nexport const IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;\n", "import { EMPTY_ARR } from \"./constants\";\n\n/**\n * Assign properties from `props` to `obj`\n * @template O, P The obj and props types\n * @param {O} obj The object to copy properties to\n * @param {P} props The object to copy properties from\n * @returns {O & P}\n */\nexport function assign(obj, props) {\n\t// @ts-ignore We change the type of `obj` to be `O & P`\n\tfor (let i in props) obj[i] = props[i];\n\treturn /** @type {O & P} */ (obj);\n}\n\n/**\n * Remove a child node from its parent if attached. This is a workaround for\n * IE11 which doesn't support `Element.prototype.remove()`. Using this function\n * is smaller than including a dedicated polyfill.\n * @param {Node} node The node to remove\n */\nexport function removeNode(node) {\n\tlet parentNode = node.parentNode;\n\tif (parentNode) parentNode.removeChild(node);\n}\n\nexport const slice = EMPTY_ARR.slice;\n", "import { _catchError } from './diff/catch-error';\n\n/**\n * The `option` object can potentially contain callback functions\n * that are called during various stages of our renderer. This is the\n * foundation on which all our addons like `preact/debug`, `preact/compat`,\n * and `preact/hooks` are based on. See the `Options` type in `internal.d.ts`\n * for a full list of available option hooks (most editors/IDEs allow you to\n * ctrl+click or cmd+click on mac the type definition below).\n * @type {import('./internal').Options}\n */\nconst options = {\n\t_catchError\n};\n\nexport default options;\n", "import { slice } from './util';\nimport options from './options';\n\nlet vnodeId = 0;\n\n/**\n * Create an virtual node (used for JSX)\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component\n * constructor for this virtual node\n * @param {object | null | undefined} [props] The properties of the virtual node\n * @param {Array<import('.').ComponentChildren>} [children] The children of the virtual node\n * @returns {import('./internal').VNode}\n */\nexport function createElement(type, props, children) {\n\tlet normalizedProps = {},\n\t\tkey,\n\t\tref,\n\t\ti;\n\tfor (i in props) {\n\t\tif (i == 'key') key = props[i];\n\t\telse if (i == 'ref') ref = props[i];\n\t\telse normalizedProps[i] = props[i];\n\t}\n\n\tif (arguments.length > 2) {\n\t\tnormalizedProps.children =\n\t\t\targuments.length > 3 ? slice.call(arguments, 2) : children;\n\t}\n\n\t// If a Component VNode, check for and apply defaultProps\n\t// Note: type may be undefined in development, must never error here.\n\tif (typeof type == 'function' && type.defaultProps != null) {\n\t\tfor (i in type.defaultProps) {\n\t\t\tif (normalizedProps[i] === undefined) {\n\t\t\t\tnormalizedProps[i] = type.defaultProps[i];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn createVNode(type, normalizedProps, key, ref, null);\n}\n\n/**\n * Create a VNode (used internally by Preact)\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component\n * Constructor for this virtual node\n * @param {object | string | number | null} props The properties of this virtual node.\n * If this virtual node represents a text node, this is the text of the node (string or number).\n * @param {string | number | null} key The key for this virtual node, used when\n * diffing it against its children\n * @param {import('./internal').VNode[\"ref\"]} ref The ref property that will\n * receive a reference to its created child\n * @returns {import('./internal').VNode}\n */\nexport function createVNode(type, props, key, ref, original) {\n\t// V8 seems to be better at detecting type shapes if the object is allocated from the same call site\n\t// Do not inline into createElement and coerceToVNode!\n\tconst vnode = {\n\t\ttype,\n\t\tprops,\n\t\tkey,\n\t\tref,\n\t\t_children: null,\n\t\t_parent: null,\n\t\t_depth: 0,\n\t\t_dom: null,\n\t\t// _nextDom must be initialized to undefined b/c it will eventually\n\t\t// be set to dom.nextSibling which can return `null` and it is important\n\t\t// to be able to distinguish between an uninitialized _nextDom and\n\t\t// a _nextDom that has been set to `null`\n\t\t_nextDom: undefined,\n\t\t_component: null,\n\t\t_hydrating: null,\n\t\tconstructor: undefined,\n\t\t_original: original == null ? ++vnodeId : original\n\t};\n\n\t// Only invoke the vnode hook if this was *not* a direct copy:\n\tif (original == null && options.vnode != null) options.vnode(vnode);\n\n\treturn vnode;\n}\n\nexport function createRef() {\n\treturn { current: null };\n}\n\nexport function Fragment(props) {\n\treturn props.children;\n}\n\n/**\n * Check if a the argument is a valid Preact VNode.\n * @param {*} vnode\n * @returns {vnode is import('./internal').VNode}\n */\nexport const isValidElement = vnode =>\n\tvnode != null && vnode.constructor === undefined;\n", "import { assign } from './util';\nimport { diff, commitRoot } from './diff/index';\nimport options from './options';\nimport { Fragment } from './create-element';\n\n/**\n * Base Component class. Provides `setState()` and `forceUpdate()`, which\n * trigger rendering\n * @param {object} props The initial component props\n * @param {object} context The initial context from parent components'\n * getChildContext\n */\nexport function Component(props, context) {\n\tthis.props = props;\n\tthis.context = context;\n}\n\n/**\n * Update component state and schedule a re-render.\n * @this {import('./internal').Component}\n * @param {object | ((s: object, p: object) => object)} update A hash of state\n * properties to update with new values or a function that given the current\n * state and props returns a new partial state\n * @param {() => void} [callback] A function to be called once component state is\n * updated\n */\nComponent.prototype.setState = function(update, callback) {\n\t// only clone state when copying to nextState the first time.\n\tlet s;\n\tif (this._nextState != null && this._nextState !== this.state) {\n\t\ts = this._nextState;\n\t} else {\n\t\ts = this._nextState = assign({}, this.state);\n\t}\n\n\tif (typeof update == 'function') {\n\t\t// Some libraries like `immer` mark the current state as readonly,\n\t\t// preventing us from mutating it, so we need to clone it. See #2716\n\t\tupdate = update(assign({}, s), this.props);\n\t}\n\n\tif (update) {\n\t\tassign(s, update);\n\t}\n\n\t// Skip update if updater function returned null\n\tif (update == null) return;\n\n\tif (this._vnode) {\n\t\tif (callback) this._renderCallbacks.push(callback);\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Immediately perform a synchronous re-render of the component\n * @this {import('./internal').Component}\n * @param {() => void} [callback] A function to be called after component is\n * re-rendered\n */\nComponent.prototype.forceUpdate = function(callback) {\n\tif (this._vnode) {\n\t\t// Set render mode so that we can differentiate where the render request\n\t\t// is coming from. We need this because forceUpdate should never call\n\t\t// shouldComponentUpdate\n\t\tthis._force = true;\n\t\tif (callback) this._renderCallbacks.push(callback);\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Accepts `props` and `state`, and returns a new Virtual DOM tree to build.\n * Virtual DOM is generally constructed via [JSX](http://jasonformat.com/wtf-is-jsx).\n * @param {object} props Props (eg: JSX attributes) received from parent\n * element/component\n * @param {object} state The component's current state\n * @param {object} context Context object, as returned by the nearest\n * ancestor's `getChildContext()`\n * @returns {import('./index').ComponentChildren | void}\n */\nComponent.prototype.render = Fragment;\n\n/**\n * @param {import('./internal').VNode} vnode\n * @param {number | null} [childIndex]\n */\nexport function getDomSibling(vnode, childIndex) {\n\tif (childIndex == null) {\n\t\t// Use childIndex==null as a signal to resume the search from the vnode's sibling\n\t\treturn vnode._parent\n\t\t\t? getDomSibling(vnode._parent, vnode._parent._children.indexOf(vnode) + 1)\n\t\t\t: null;\n\t}\n\n\tlet sibling;\n\tfor (; childIndex < vnode._children.length; childIndex++) {\n\t\tsibling = vnode._children[childIndex];\n\n\t\tif (sibling != null && sibling._dom != null) {\n\t\t\t// Since updateParentDomPointers keeps _dom pointer correct,\n\t\t\t// we can rely on _dom to tell us if this subtree contains a\n\t\t\t// rendered DOM node, and what the first rendered DOM node is\n\t\t\treturn sibling._dom;\n\t\t}\n\t}\n\n\t// If we get here, we have not found a DOM node in this vnode's children.\n\t// We must resume from this vnode's sibling (in it's parent _children array)\n\t// Only climb up and search the parent if we aren't searching through a DOM\n\t// VNode (meaning we reached the DOM parent of the original vnode that began\n\t// the search)\n\treturn typeof vnode.type == 'function' ? getDomSibling(vnode) : null;\n}\n\n/**\n * Trigger in-place re-rendering of a component.\n * @param {import('./internal').Component} component The component to rerender\n */\nfunction renderComponent(component) {\n\tlet vnode = component._vnode,\n\t\toldDom = vnode._dom,\n\t\tparentDom = component._parentDom;\n\n\tif (parentDom) {\n\t\tlet commitQueue = [];\n\t\tconst oldVNode = assign({}, vnode);\n\t\toldVNode._original = vnode._original + 1;\n\n\t\tdiff(\n\t\t\tparentDom,\n\t\t\tvnode,\n\t\t\toldVNode,\n\t\t\tcomponent._globalContext,\n\t\t\tparentDom.ownerSVGElement !== undefined,\n\t\t\tvnode._hydrating != null ? [oldDom] : null,\n\t\t\tcommitQueue,\n\t\t\toldDom == null ? getDomSibling(vnode) : oldDom,\n\t\t\tvnode._hydrating\n\t\t);\n\t\tcommitRoot(commitQueue, vnode);\n\n\t\tif (vnode._dom != oldDom) {\n\t\t\tupdateParentDomPointers(vnode);\n\t\t}\n\t}\n}\n\n/**\n * @param {import('./internal').VNode} vnode\n */\nfunction updateParentDomPointers(vnode) {\n\tif ((vnode = vnode._parent) != null && vnode._component != null) {\n\t\tvnode._dom = vnode._component.base = null;\n\t\tfor (let i = 0; i < vnode._children.length; i++) {\n\t\t\tlet child = vnode._children[i];\n\t\t\tif (child != null && child._dom != null) {\n\t\t\t\tvnode._dom = vnode._component.base = child._dom;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn updateParentDomPointers(vnode);\n\t}\n}\n\n/**\n * The render queue\n * @type {Array<import('./internal').Component>}\n */\nlet rerenderQueue = [];\n\n/**\n * Asynchronously schedule a callback\n * @type {(cb: () => void) => void}\n */\n/* istanbul ignore next */\n// Note the following line isn't tree-shaken by rollup cuz of rollup/rollup#2566\nconst defer =\n\ttypeof Promise == 'function'\n\t\t? Promise.prototype.then.bind(Promise.resolve())\n\t\t: setTimeout;\n\n/*\n * The value of `Component.debounce` must asynchronously invoke the passed in callback. It is\n * important that contributors to Preact can consistently reason about what calls to `setState`, etc.\n * do, and when their effects will be applied. See the links below for some further reading on designing\n * asynchronous APIs.\n * * [Designing APIs for Asynchrony](https://blog.izs.me/2013/08/designing-apis-for-asynchrony)\n * * [Callbacks synchronous and asynchronous](https://blog.ometer.com/2011/07/24/callbacks-synchronous-and-asynchronous/)\n */\n\nlet prevDebounce;\n\n/**\n * Enqueue a rerender of a component\n * @param {import('./internal').Component} c The component to rerender\n */\nexport function enqueueRender(c) {\n\tif (\n\t\t(!c._dirty &&\n\t\t\t(c._dirty = true) &&\n\t\t\trerenderQueue.push(c) &&\n\t\t\t!process._rerenderCount++) ||\n\t\tprevDebounce !== options.debounceRendering\n\t) {\n\t\tprevDebounce = options.debounceRendering;\n\t\t(prevDebounce || defer)(process);\n\t}\n}\n\n/** Flush the render queue by rerendering all queued components */\nfunction process() {\n\tlet queue;\n\twhile ((process._rerenderCount = rerenderQueue.length)) {\n\t\tqueue = rerenderQueue.sort((a, b) => a._vnode._depth - b._vnode._depth);\n\t\trerenderQueue = [];\n\t\t// Don't update `renderCount` yet. Keep its value non-zero to prevent unnecessary\n\t\t// process() calls from getting scheduled while `queue` is still being consumed.\n\t\tqueue.some(c => {\n\t\t\tif (c._dirty) renderComponent(c);\n\t\t});\n\t}\n}\nprocess._rerenderCount = 0;\n", "import { enqueueRender } from './component';\n\nexport let i = 0;\n\nexport function createContext(defaultValue, contextId) {\n\tcontextId = '__cC' + i++;\n\n\tconst context = {\n\t\t_id: contextId,\n\t\t_defaultValue: defaultValue,\n\t\t/** @type {import('./internal').FunctionComponent} */\n\t\tConsumer(props, contextValue) {\n\t\t\t// return props.children(\n\t\t\t// \tcontext[contextId] ? context[contextId].props.value : defaultValue\n\t\t\t// );\n\t\t\treturn props.children(contextValue);\n\t\t},\n\t\t/** @type {import('./internal').FunctionComponent} */\n\t\tProvider(props) {\n\t\t\tif (!this.getChildContext) {\n\t\t\t\tlet subs = [];\n\t\t\t\tlet ctx = {};\n\t\t\t\tctx[contextId] = this;\n\n\t\t\t\tthis.getChildContext = () => ctx;\n\n\t\t\t\tthis.shouldComponentUpdate = function(_props) {\n\t\t\t\t\tif (this.props.value !== _props.value) {\n\t\t\t\t\t\t// I think the forced value propagation here was only needed when `options.debounceRendering` was being bypassed:\n\t\t\t\t\t\t// https://github.com/preactjs/preact/commit/4d339fb803bea09e9f198abf38ca1bf8ea4b7771#diff-54682ce380935a717e41b8bfc54737f6R358\n\t\t\t\t\t\t// In those cases though, even with the value corrected, we're double-rendering all nodes.\n\t\t\t\t\t\t// It might be better to just tell folks not to use force-sync mode.\n\t\t\t\t\t\t// Currently, using `useContext()` in a class component will overwrite its `this.context` value.\n\t\t\t\t\t\t// subs.some(c => {\n\t\t\t\t\t\t// \tc.context = _props.value;\n\t\t\t\t\t\t// \tenqueueRender(c);\n\t\t\t\t\t\t// });\n\n\t\t\t\t\t\t// subs.some(c => {\n\t\t\t\t\t\t// \tc.context[contextId] = _props.value;\n\t\t\t\t\t\t// \tenqueueRender(c);\n\t\t\t\t\t\t// });\n\t\t\t\t\t\tsubs.some(enqueueRender);\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tthis.sub = c => {\n\t\t\t\t\tsubs.push(c);\n\t\t\t\t\tlet old = c.componentWillUnmount;\n\t\t\t\t\tc.componentWillUnmount = () => {\n\t\t\t\t\t\tsubs.splice(subs.indexOf(c), 1);\n\t\t\t\t\t\tif (old) old.call(c);\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn props.children;\n\t\t}\n\t};\n\n\t// Devtools needs access to the context object when it\n\t// encounters a Provider. This is necessary to support\n\t// setting `displayName` on the context object instead\n\t// of on the component itself. See:\n\t// https://reactjs.org/docs/context.html#contextdisplayname\n\n\treturn (context.Provider._contextRef = context.Consumer.contextType = context);\n}\n", "import { diff, unmount, applyRef } from './index';\nimport { createVNode, Fragment } from '../create-element';\nimport { EMPTY_OBJ, EMPTY_ARR } from '../constants';\nimport { getDomSibling } from '../component';\n\n/**\n * Diff the children of a virtual node\n * @param {import('../internal').PreactElement} parentDom The DOM element whose\n * children are being diffed\n * @param {import('../internal').ComponentChildren[]} renderResult\n * @param {import('../internal').VNode} newParentVNode The new virtual\n * node whose children should be diff'ed against oldParentVNode\n * @param {import('../internal').VNode} oldParentVNode The old virtual\n * node whose children should be diff'ed against newParentVNode\n * @param {object} globalContext The current context object - modified by getChildContext\n * @param {boolean} isSvg Whether or not this DOM node is an SVG node\n * @param {Array<import('../internal').PreactElement>} excessDomChildren\n * @param {Array<import('../internal').Component>} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {import('../internal').PreactElement} oldDom The current attached DOM\n * element any new dom elements should be placed around. Likely `null` on first\n * render (except when hydrating). Can be a sibling DOM element when diffing\n * Fragments that have siblings. In most cases, it starts out as `oldChildren[0]._dom`.\n * @param {boolean} isHydrating Whether or not we are in hydration\n */\nexport function diffChildren(\n\tparentDom,\n\trenderResult,\n\tnewParentVNode,\n\toldParentVNode,\n\tglobalContext,\n\tisSvg,\n\texcessDomChildren,\n\tcommitQueue,\n\toldDom,\n\tisHydrating\n) {\n\tlet i, j, oldVNode, childVNode, newDom, firstChildDom, refs;\n\n\t// This is a compression of oldParentVNode!=null && oldParentVNode != EMPTY_OBJ && oldParentVNode._children || EMPTY_ARR\n\t// as EMPTY_OBJ._children should be `undefined`.\n\tlet oldChildren = (oldParentVNode && oldParentVNode._children) || EMPTY_ARR;\n\n\tlet oldChildrenLength = oldChildren.length;\n\n\tnewParentVNode._children = [];\n\tfor (i = 0; i < renderResult.length; i++) {\n\t\tchildVNode = renderResult[i];\n\n\t\tif (childVNode == null || typeof childVNode == 'boolean') {\n\t\t\tchildVNode = newParentVNode._children[i] = null;\n\t\t}\n\t\t// If this newVNode is being reused (e.g. <div>{reuse}{reuse}</div>) in the same diff,\n\t\t// or we are rendering a component (e.g. setState) copy the oldVNodes so it can have\n\t\t// it's own DOM & etc. pointers\n\t\telse if (\n\t\t\ttypeof childVNode == 'string' ||\n\t\t\ttypeof childVNode == 'number' ||\n\t\t\t// eslint-disable-next-line valid-typeof\n\t\t\ttypeof childVNode == 'bigint'\n\t\t) {\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tnull,\n\t\t\t\tchildVNode,\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\tchildVNode\n\t\t\t);\n\t\t} else if (Array.isArray(childVNode)) {\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tFragment,\n\t\t\t\t{ children: childVNode },\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\tnull\n\t\t\t);\n\t\t} else if (childVNode._depth > 0) {\n\t\t\t// VNode is already in use, clone it. This can happen in the following\n\t\t\t// scenario:\n\t\t\t//   const reuse = <div />\n\t\t\t//   <div>{reuse}<span />{reuse}</div>\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tchildVNode.type,\n\t\t\t\tchildVNode.props,\n\t\t\t\tchildVNode.key,\n\t\t\t\tnull,\n\t\t\t\tchildVNode._original\n\t\t\t);\n\t\t} else {\n\t\t\tchildVNode = newParentVNode._children[i] = childVNode;\n\t\t}\n\n\t\t// Terser removes the `continue` here and wraps the loop body\n\t\t// in a `if (childVNode) { ... } condition\n\t\tif (childVNode == null) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tchildVNode._parent = newParentVNode;\n\t\tchildVNode._depth = newParentVNode._depth + 1;\n\n\t\t// Check if we find a corresponding element in oldChildren.\n\t\t// If found, delete the array item by setting to `undefined`.\n\t\t// We use `undefined`, as `null` is reserved for empty placeholders\n\t\t// (holes).\n\t\toldVNode = oldChildren[i];\n\n\t\tif (\n\t\t\toldVNode === null ||\n\t\t\t(oldVNode &&\n\t\t\t\tchildVNode.key == oldVNode.key &&\n\t\t\t\tchildVNode.type === oldVNode.type)\n\t\t) {\n\t\t\toldChildren[i] = undefined;\n\t\t} else {\n\t\t\t// Either oldVNode === undefined or oldChildrenLength > 0,\n\t\t\t// so after this loop oldVNode == null or oldVNode is a valid value.\n\t\t\tfor (j = 0; j < oldChildrenLength; j++) {\n\t\t\t\toldVNode = oldChildren[j];\n\t\t\t\t// If childVNode is unkeyed, we only match similarly unkeyed nodes, otherwise we match by key.\n\t\t\t\t// We always match by type (in either case).\n\t\t\t\tif (\n\t\t\t\t\toldVNode &&\n\t\t\t\t\tchildVNode.key == oldVNode.key &&\n\t\t\t\t\tchildVNode.type === oldVNode.type\n\t\t\t\t) {\n\t\t\t\t\toldChildren[j] = undefined;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\toldVNode = null;\n\t\t\t}\n\t\t}\n\n\t\toldVNode = oldVNode || EMPTY_OBJ;\n\n\t\t// Morph the old element into the new one, but don't append it to the dom yet\n\t\tdiff(\n\t\t\tparentDom,\n\t\t\tchildVNode,\n\t\t\toldVNode,\n\t\t\tglobalContext,\n\t\t\tisSvg,\n\t\t\texcessDomChildren,\n\t\t\tcommitQueue,\n\t\t\toldDom,\n\t\t\tisHydrating\n\t\t);\n\n\t\tnewDom = childVNode._dom;\n\n\t\tif ((j = childVNode.ref) && oldVNode.ref != j) {\n\t\t\tif (!refs) refs = [];\n\t\t\tif (oldVNode.ref) refs.push(oldVNode.ref, null, childVNode);\n\t\t\trefs.push(j, childVNode._component || newDom, childVNode);\n\t\t}\n\n\t\tif (newDom != null) {\n\t\t\tif (firstChildDom == null) {\n\t\t\t\tfirstChildDom = newDom;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\ttypeof childVNode.type == 'function' &&\n\t\t\t\tchildVNode._children === oldVNode._children\n\t\t\t) {\n\t\t\t\tchildVNode._nextDom = oldDom = reorderChildren(\n\t\t\t\t\tchildVNode,\n\t\t\t\t\toldDom,\n\t\t\t\t\tparentDom\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\toldDom = placeChild(\n\t\t\t\t\tparentDom,\n\t\t\t\t\tchildVNode,\n\t\t\t\t\toldVNode,\n\t\t\t\t\toldChildren,\n\t\t\t\t\tnewDom,\n\t\t\t\t\toldDom\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (typeof newParentVNode.type == 'function') {\n\t\t\t\t// Because the newParentVNode is Fragment-like, we need to set it's\n\t\t\t\t// _nextDom property to the nextSibling of its last child DOM node.\n\t\t\t\t//\n\t\t\t\t// `oldDom` contains the correct value here because if the last child\n\t\t\t\t// is a Fragment-like, then oldDom has already been set to that child's _nextDom.\n\t\t\t\t// If the last child is a DOM VNode, then oldDom will be set to that DOM\n\t\t\t\t// node's nextSibling.\n\t\t\t\tnewParentVNode._nextDom = oldDom;\n\t\t\t}\n\t\t} else if (\n\t\t\toldDom &&\n\t\t\toldVNode._dom == oldDom &&\n\t\t\toldDom.parentNode != parentDom\n\t\t) {\n\t\t\t// The above condition is to handle null placeholders. See test in placeholder.test.js:\n\t\t\t// `efficiently replace null placeholders in parent rerenders`\n\t\t\toldDom = getDomSibling(oldVNode);\n\t\t}\n\t}\n\n\tnewParentVNode._dom = firstChildDom;\n\n\t// Remove remaining oldChildren if there are any.\n\tfor (i = oldChildrenLength; i--; ) {\n\t\tif (oldChildren[i] != null) {\n\t\t\tif (\n\t\t\t\ttypeof newParentVNode.type == 'function' &&\n\t\t\t\toldChildren[i]._dom != null &&\n\t\t\t\toldChildren[i]._dom == newParentVNode._nextDom\n\t\t\t) {\n\t\t\t\t// If the newParentVNode.__nextDom points to a dom node that is about to\n\t\t\t\t// be unmounted, then get the next sibling of that vnode and set\n\t\t\t\t// _nextDom to it\n\t\t\t\tnewParentVNode._nextDom = getDomSibling(oldParentVNode, i + 1);\n\t\t\t}\n\n\t\t\tunmount(oldChildren[i], oldChildren[i]);\n\t\t}\n\t}\n\n\t// Set refs only after unmount\n\tif (refs) {\n\t\tfor (i = 0; i < refs.length; i++) {\n\t\t\tapplyRef(refs[i], refs[++i], refs[++i]);\n\t\t}\n\t}\n}\n\nfunction reorderChildren(childVNode, oldDom, parentDom) {\n\t// Note: VNodes in nested suspended trees may be missing _children.\n\tlet c = childVNode._children;\n\tlet tmp = 0;\n\tfor (; c && tmp < c.length; tmp++) {\n\t\tlet vnode = c[tmp];\n\t\tif (vnode) {\n\t\t\t// We typically enter this code path on sCU bailout, where we copy\n\t\t\t// oldVNode._children to newVNode._children. If that is the case, we need\n\t\t\t// to update the old children's _parent pointer to point to the newVNode\n\t\t\t// (childVNode here).\n\t\t\tvnode._parent = childVNode;\n\n\t\t\tif (typeof vnode.type == 'function') {\n\t\t\t\toldDom = reorderChildren(vnode, oldDom, parentDom);\n\t\t\t} else {\n\t\t\t\toldDom = placeChild(\n\t\t\t\t\tparentDom,\n\t\t\t\t\tvnode,\n\t\t\t\t\tvnode,\n\t\t\t\t\tc,\n\t\t\t\t\tvnode._dom,\n\t\t\t\t\toldDom\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn oldDom;\n}\n\n/**\n * Flatten and loop through the children of a virtual node\n * @param {import('../index').ComponentChildren} children The unflattened\n * children of a virtual node\n * @returns {import('../internal').VNode[]}\n */\nexport function toChildArray(children, out) {\n\tout = out || [];\n\tif (children == null || typeof children == 'boolean') {\n\t} else if (Array.isArray(children)) {\n\t\tchildren.some(child => {\n\t\t\ttoChildArray(child, out);\n\t\t});\n\t} else {\n\t\tout.push(children);\n\t}\n\treturn out;\n}\n\nfunction placeChild(\n\tparentDom,\n\tchildVNode,\n\toldVNode,\n\toldChildren,\n\tnewDom,\n\toldDom\n) {\n\tlet nextDom;\n\tif (childVNode._nextDom !== undefined) {\n\t\t// Only Fragments or components that return Fragment like VNodes will\n\t\t// have a non-undefined _nextDom. Continue the diff from the sibling\n\t\t// of last DOM child of this child VNode\n\t\tnextDom = childVNode._nextDom;\n\n\t\t// Eagerly cleanup _nextDom. We don't need to persist the value because\n\t\t// it is only used by `diffChildren` to determine where to resume the diff after\n\t\t// diffing Components and Fragments. Once we store it the nextDOM local var, we\n\t\t// can clean up the property\n\t\tchildVNode._nextDom = undefined;\n\t} else if (\n\t\toldVNode == null ||\n\t\tnewDom != oldDom ||\n\t\tnewDom.parentNode == null\n\t) {\n\t\touter: if (oldDom == null || oldDom.parentNode !== parentDom) {\n\t\t\tparentDom.appendChild(newDom);\n\t\t\tnextDom = null;\n\t\t} else {\n\t\t\t// `j<oldChildrenLength; j+=2` is an alternative to `j++<oldChildrenLength/2`\n\t\t\tfor (\n\t\t\t\tlet sibDom = oldDom, j = 0;\n\t\t\t\t(sibDom = sibDom.nextSibling) && j < oldChildren.length;\n\t\t\t\tj += 2\n\t\t\t) {\n\t\t\t\tif (sibDom == newDom) {\n\t\t\t\t\tbreak outer;\n\t\t\t\t}\n\t\t\t}\n\t\t\tparentDom.insertBefore(newDom, oldDom);\n\t\t\tnextDom = oldDom;\n\t\t}\n\t}\n\n\t// If we have pre-calculated the nextDOM node, use it. Else calculate it now\n\t// Strictly check for `undefined` here cuz `null` is a valid value of `nextDom`.\n\t// See more detail in create-element.js:createVNode\n\tif (nextDom !== undefined) {\n\t\toldDom = nextDom;\n\t} else {\n\t\toldDom = newDom.nextSibling;\n\t}\n\n\treturn oldDom;\n}\n", "import { IS_NON_DIMENSIONAL } from '../constants';\nimport options from '../options';\n\n/**\n * Diff the old and new properties of a VNode and apply changes to the DOM node\n * @param {import('../internal').PreactElement} dom The DOM node to apply\n * changes to\n * @param {object} newProps The new props\n * @param {object} oldProps The old props\n * @param {boolean} isSvg Whether or not this node is an SVG node\n * @param {boolean} hydrate Whether or not we are in hydration mode\n */\nexport function diffProps(dom, newProps, oldProps, isSvg, hydrate) {\n\tlet i;\n\n\tfor (i in oldProps) {\n\t\tif (i !== 'children' && i !== 'key' && !(i in newProps)) {\n\t\t\tsetProperty(dom, i, null, oldProps[i], isSvg);\n\t\t}\n\t}\n\n\tfor (i in newProps) {\n\t\tif (\n\t\t\t(!hydrate || typeof newProps[i] == 'function') &&\n\t\t\ti !== 'children' &&\n\t\t\ti !== 'key' &&\n\t\t\ti !== 'value' &&\n\t\t\ti !== 'checked' &&\n\t\t\toldProps[i] !== newProps[i]\n\t\t) {\n\t\t\tsetProperty(dom, i, newProps[i], oldProps[i], isSvg);\n\t\t}\n\t}\n}\n\nfunction setStyle(style, key, value) {\n\tif (key[0] === '-') {\n\t\tstyle.setProperty(key, value);\n\t} else if (value == null) {\n\t\tstyle[key] = '';\n\t} else if (typeof value != 'number' || IS_NON_DIMENSIONAL.test(key)) {\n\t\tstyle[key] = value;\n\t} else {\n\t\tstyle[key] = value + 'px';\n\t}\n}\n\n/**\n * Set a property value on a DOM node\n * @param {import('../internal').PreactElement} dom The DOM node to modify\n * @param {string} name The name of the property to set\n * @param {*} value The value to set the property to\n * @param {*} oldValue The old value the property had\n * @param {boolean} isSvg Whether or not this DOM node is an SVG node or not\n */\nexport function setProperty(dom, name, value, oldValue, isSvg) {\n\tlet useCapture;\n\n\to: if (name === 'style') {\n\t\tif (typeof value == 'string') {\n\t\t\tdom.style.cssText = value;\n\t\t} else {\n\t\t\tif (typeof oldValue == 'string') {\n\t\t\t\tdom.style.cssText = oldValue = '';\n\t\t\t}\n\n\t\t\tif (oldValue) {\n\t\t\t\tfor (name in oldValue) {\n\t\t\t\t\tif (!(value && name in value)) {\n\t\t\t\t\t\tsetStyle(dom.style, name, '');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (value) {\n\t\t\t\tfor (name in value) {\n\t\t\t\t\tif (!oldValue || value[name] !== oldValue[name]) {\n\t\t\t\t\t\tsetStyle(dom.style, name, value[name]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t// Benchmark for comparison: https://esbench.com/bench/574c954bdb965b9a00965ac6\n\telse if (name[0] === 'o' && name[1] === 'n') {\n\t\tuseCapture = name !== (name = name.replace(/Capture$/, ''));\n\n\t\t// Infer correct casing for DOM built-in events:\n\t\tif (name.toLowerCase() in dom) name = name.toLowerCase().slice(2);\n\t\telse name = name.slice(2);\n\n\t\tif (!dom._listeners) dom._listeners = {};\n\t\tdom._listeners[name + useCapture] = value;\n\n\t\tif (value) {\n\t\t\tif (!oldValue) {\n\t\t\t\tconst handler = useCapture ? eventProxyCapture : eventProxy;\n\t\t\t\tdom.addEventListener(name, handler, useCapture);\n\t\t\t}\n\t\t} else {\n\t\t\tconst handler = useCapture ? eventProxyCapture : eventProxy;\n\t\t\tdom.removeEventListener(name, handler, useCapture);\n\t\t}\n\t} else if (name !== 'dangerouslySetInnerHTML') {\n\t\tif (isSvg) {\n\t\t\t// Normalize incorrect prop usage for SVG:\n\t\t\t// - xlink:href / xlinkHref --> href (xlink:href was removed from SVG and isn't needed)\n\t\t\t// - className --> class\n\t\t\tname = name.replace(/xlink[H:h]/, 'h').replace(/sName$/, 's');\n\t\t} else if (\n\t\t\tname !== 'href' &&\n\t\t\tname !== 'list' &&\n\t\t\tname !== 'form' &&\n\t\t\t// Default value in browsers is `-1` and an empty string is\n\t\t\t// cast to `0` instead\n\t\t\tname !== 'tabIndex' &&\n\t\t\tname !== 'download' &&\n\t\t\tname in dom\n\t\t) {\n\t\t\ttry {\n\t\t\t\tdom[name] = value == null ? '' : value;\n\t\t\t\t// labelled break is 1b smaller here than a return statement (sorry)\n\t\t\t\tbreak o;\n\t\t\t} catch (e) {}\n\t\t}\n\n\t\t// ARIA-attributes have a different notion of boolean values.\n\t\t// The value `false` is different from the attribute not\n\t\t// existing on the DOM, so we can't remove it. For non-boolean\n\t\t// ARIA-attributes we could treat false as a removal, but the\n\t\t// amount of exceptions would cost us too many bytes. On top of\n\t\t// that other VDOM frameworks also always stringify `false`.\n\n\t\tif (typeof value === 'function') {\n\t\t\t// never serialize functions as attribute values\n\t\t} else if (\n\t\t\tvalue != null &&\n\t\t\t(value !== false || (name[0] === 'a' && name[1] === 'r'))\n\t\t) {\n\t\t\tdom.setAttribute(name, value);\n\t\t} else {\n\t\t\tdom.removeAttribute(name);\n\t\t}\n\t}\n}\n\n/**\n * Proxy an event to hooked event handlers\n * @param {Event} e The event object from the browser\n * @private\n */\nfunction eventProxy(e) {\n\tthis._listeners[e.type + false](options.event ? options.event(e) : e);\n}\n\nfunction eventProxyCapture(e) {\n\tthis._listeners[e.type + true](options.event ? options.event(e) : e);\n}\n", "import { EMPTY_OBJ } from '../constants';\nimport { Component, getDomSibling } from '../component';\nimport { Fragment } from '../create-element';\nimport { diffChildren } from './children';\nimport { diffProps, setProperty } from './props';\nimport { assign, removeNode, slice } from '../util';\nimport options from '../options';\n\n/**\n * Diff two virtual nodes and apply proper changes to the DOM\n * @param {import('../internal').PreactElement} parentDom The parent of the DOM element\n * @param {import('../internal').VNode} newVNode The new virtual node\n * @param {import('../internal').VNode} oldVNode The old virtual node\n * @param {object} globalContext The current context object. Modified by getChildContext\n * @param {boolean} isSvg Whether or not this element is an SVG node\n * @param {Array<import('../internal').PreactElement>} excessDomChildren\n * @param {Array<import('../internal').Component>} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {import('../internal').PreactElement} oldDom The current attached DOM\n * element any new dom elements should be placed around. Likely `null` on first\n * render (except when hydrating). Can be a sibling DOM element when diffing\n * Fragments that have siblings. In most cases, it starts out as `oldChildren[0]._dom`.\n * @param {boolean} [isHydrating] Whether or not we are in hydration\n */\nexport function diff(\n\tparentDom,\n\tnewVNode,\n\toldVNode,\n\tglobalContext,\n\tisSvg,\n\texcessDomChildren,\n\tcommitQueue,\n\toldDom,\n\tisHydrating\n) {\n\tlet tmp,\n\t\tnewType = newVNode.type;\n\n\t// When passing through createElement it assigns the object\n\t// constructor as undefined. This to prevent JSON-injection.\n\tif (newVNode.constructor !== undefined) return null;\n\n\t// If the previous diff bailed out, resume creating/hydrating.\n\tif (oldVNode._hydrating != null) {\n\t\tisHydrating = oldVNode._hydrating;\n\t\toldDom = newVNode._dom = oldVNode._dom;\n\t\t// if we resume, we want the tree to be \"unlocked\"\n\t\tnewVNode._hydrating = null;\n\t\texcessDomChildren = [oldDom];\n\t}\n\n\tif ((tmp = options._diff)) tmp(newVNode);\n\n\ttry {\n\t\touter: if (typeof newType == 'function') {\n\t\t\tlet c, isNew, oldProps, oldState, snapshot, clearProcessingException;\n\t\t\tlet newProps = newVNode.props;\n\n\t\t\t// Necessary for createContext api. Setting this property will pass\n\t\t\t// the context value as `this.context` just for this component.\n\t\t\ttmp = newType.contextType;\n\t\t\tlet provider = tmp && globalContext[tmp._id];\n\t\t\tlet componentContext = tmp\n\t\t\t\t? provider\n\t\t\t\t\t? provider.props.value\n\t\t\t\t\t: tmp._defaultValue\n\t\t\t\t: globalContext;\n\n\t\t\t// Get component and set it to `c`\n\t\t\tif (oldVNode._component) {\n\t\t\t\tc = newVNode._component = oldVNode._component;\n\t\t\t\tclearProcessingException = c._processingException = c._pendingError;\n\t\t\t} else {\n\t\t\t\t// Instantiate the new component\n\t\t\t\tif ('prototype' in newType && newType.prototype.render) {\n\t\t\t\t\t// @ts-ignore The check above verifies that newType is suppose to be constructed\n\t\t\t\t\tnewVNode._component = c = new newType(newProps, componentContext); // eslint-disable-line new-cap\n\t\t\t\t} else {\n\t\t\t\t\t// @ts-ignore Trust me, Component implements the interface we want\n\t\t\t\t\tnewVNode._component = c = new Component(newProps, componentContext);\n\t\t\t\t\tc.constructor = newType;\n\t\t\t\t\tc.render = doRender;\n\t\t\t\t}\n\t\t\t\tif (provider) provider.sub(c);\n\n\t\t\t\tc.props = newProps;\n\t\t\t\tif (!c.state) c.state = {};\n\t\t\t\tc.context = componentContext;\n\t\t\t\tc._globalContext = globalContext;\n\t\t\t\tisNew = c._dirty = true;\n\t\t\t\tc._renderCallbacks = [];\n\t\t\t}\n\n\t\t\t// Invoke getDerivedStateFromProps\n\t\t\tif (c._nextState == null) {\n\t\t\t\tc._nextState = c.state;\n\t\t\t}\n\t\t\tif (newType.getDerivedStateFromProps != null) {\n\t\t\t\tif (c._nextState == c.state) {\n\t\t\t\t\tc._nextState = assign({}, c._nextState);\n\t\t\t\t}\n\n\t\t\t\tassign(\n\t\t\t\t\tc._nextState,\n\t\t\t\t\tnewType.getDerivedStateFromProps(newProps, c._nextState)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\toldProps = c.props;\n\t\t\toldState = c.state;\n\n\t\t\t// Invoke pre-render lifecycle methods\n\t\t\tif (isNew) {\n\t\t\t\tif (\n\t\t\t\t\tnewType.getDerivedStateFromProps == null &&\n\t\t\t\t\tc.componentWillMount != null\n\t\t\t\t) {\n\t\t\t\t\tc.componentWillMount();\n\t\t\t\t}\n\n\t\t\t\tif (c.componentDidMount != null) {\n\t\t\t\t\tc._renderCallbacks.push(c.componentDidMount);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (\n\t\t\t\t\tnewType.getDerivedStateFromProps == null &&\n\t\t\t\t\tnewProps !== oldProps &&\n\t\t\t\t\tc.componentWillReceiveProps != null\n\t\t\t\t) {\n\t\t\t\t\tc.componentWillReceiveProps(newProps, componentContext);\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t(!c._force &&\n\t\t\t\t\t\tc.shouldComponentUpdate != null &&\n\t\t\t\t\t\tc.shouldComponentUpdate(\n\t\t\t\t\t\t\tnewProps,\n\t\t\t\t\t\t\tc._nextState,\n\t\t\t\t\t\t\tcomponentContext\n\t\t\t\t\t\t) === false) ||\n\t\t\t\t\tnewVNode._original === oldVNode._original\n\t\t\t\t) {\n\t\t\t\t\tc.props = newProps;\n\t\t\t\t\tc.state = c._nextState;\n\t\t\t\t\t// More info about this here: https://gist.github.com/JoviDeCroock/bec5f2ce93544d2e6070ef8e0036e4e8\n\t\t\t\t\tif (newVNode._original !== oldVNode._original) c._dirty = false;\n\t\t\t\t\tc._vnode = newVNode;\n\t\t\t\t\tnewVNode._dom = oldVNode._dom;\n\t\t\t\t\tnewVNode._children = oldVNode._children;\n\t\t\t\t\tnewVNode._children.forEach(vnode => {\n\t\t\t\t\t\tif (vnode) vnode._parent = newVNode;\n\t\t\t\t\t});\n\t\t\t\t\tif (c._renderCallbacks.length) {\n\t\t\t\t\t\tcommitQueue.push(c);\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak outer;\n\t\t\t\t}\n\n\t\t\t\tif (c.componentWillUpdate != null) {\n\t\t\t\t\tc.componentWillUpdate(newProps, c._nextState, componentContext);\n\t\t\t\t}\n\n\t\t\t\tif (c.componentDidUpdate != null) {\n\t\t\t\t\tc._renderCallbacks.push(() => {\n\t\t\t\t\t\tc.componentDidUpdate(oldProps, oldState, snapshot);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tc.context = componentContext;\n\t\t\tc.props = newProps;\n\t\t\tc.state = c._nextState;\n\n\t\t\tif ((tmp = options._render)) tmp(newVNode);\n\n\t\t\tc._dirty = false;\n\t\t\tc._vnode = newVNode;\n\t\t\tc._parentDom = parentDom;\n\n\t\t\ttmp = c.render(c.props, c.state, c.context);\n\n\t\t\t// Handle setState called in render, see #2553\n\t\t\tc.state = c._nextState;\n\n\t\t\tif (c.getChildContext != null) {\n\t\t\t\tglobalContext = assign(assign({}, globalContext), c.getChildContext());\n\t\t\t}\n\n\t\t\tif (!isNew && c.getSnapshotBeforeUpdate != null) {\n\t\t\t\tsnapshot = c.getSnapshotBeforeUpdate(oldProps, oldState);\n\t\t\t}\n\n\t\t\tlet isTopLevelFragment =\n\t\t\t\ttmp != null && tmp.type === Fragment && tmp.key == null;\n\t\t\tlet renderResult = isTopLevelFragment ? tmp.props.children : tmp;\n\n\t\t\tdiffChildren(\n\t\t\t\tparentDom,\n\t\t\t\tArray.isArray(renderResult) ? renderResult : [renderResult],\n\t\t\t\tnewVNode,\n\t\t\t\toldVNode,\n\t\t\t\tglobalContext,\n\t\t\t\tisSvg,\n\t\t\t\texcessDomChildren,\n\t\t\t\tcommitQueue,\n\t\t\t\toldDom,\n\t\t\t\tisHydrating\n\t\t\t);\n\n\t\t\tc.base = newVNode._dom;\n\n\t\t\t// We successfully rendered this VNode, unset any stored hydration/bailout state:\n\t\t\tnewVNode._hydrating = null;\n\n\t\t\tif (c._renderCallbacks.length) {\n\t\t\t\tcommitQueue.push(c);\n\t\t\t}\n\n\t\t\tif (clearProcessingException) {\n\t\t\t\tc._pendingError = c._processingException = null;\n\t\t\t}\n\n\t\t\tc._force = false;\n\t\t} else if (\n\t\t\texcessDomChildren == null &&\n\t\t\tnewVNode._original === oldVNode._original\n\t\t) {\n\t\t\tnewVNode._children = oldVNode._children;\n\t\t\tnewVNode._dom = oldVNode._dom;\n\t\t} else {\n\t\t\tnewVNode._dom = diffElementNodes(\n\t\t\t\toldVNode._dom,\n\t\t\t\tnewVNode,\n\t\t\t\toldVNode,\n\t\t\t\tglobalContext,\n\t\t\t\tisSvg,\n\t\t\t\texcessDomChildren,\n\t\t\t\tcommitQueue,\n\t\t\t\tisHydrating\n\t\t\t);\n\t\t}\n\n\t\tif ((tmp = options.diffed)) tmp(newVNode);\n\t} catch (e) {\n\t\tnewVNode._original = null;\n\t\t// if hydrating or creating initial tree, bailout preserves DOM:\n\t\tif (isHydrating || excessDomChildren != null) {\n\t\t\tnewVNode._dom = oldDom;\n\t\t\tnewVNode._hydrating = !!isHydrating;\n\t\t\texcessDomChildren[excessDomChildren.indexOf(oldDom)] = null;\n\t\t\t// ^ could possibly be simplified to:\n\t\t\t// excessDomChildren.length = 0;\n\t\t}\n\t\toptions._catchError(e, newVNode, oldVNode);\n\t}\n}\n\n/**\n * @param {Array<import('../internal').Component>} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {import('../internal').VNode} root\n */\nexport function commitRoot(commitQueue, root) {\n\tif (options._commit) options._commit(root, commitQueue);\n\n\tcommitQueue.some(c => {\n\t\ttry {\n\t\t\t// @ts-ignore Reuse the commitQueue variable here so the type changes\n\t\t\tcommitQueue = c._renderCallbacks;\n\t\t\tc._renderCallbacks = [];\n\t\t\tcommitQueue.some(cb => {\n\t\t\t\t// @ts-ignore See above ts-ignore on commitQueue\n\t\t\t\tcb.call(c);\n\t\t\t});\n\t\t} catch (e) {\n\t\t\toptions._catchError(e, c._vnode);\n\t\t}\n\t});\n}\n\n/**\n * Diff two virtual nodes representing DOM element\n * @param {import('../internal').PreactElement} dom The DOM element representing\n * the virtual nodes being diffed\n * @param {import('../internal').VNode} newVNode The new virtual node\n * @param {import('../internal').VNode} oldVNode The old virtual node\n * @param {object} globalContext The current context object\n * @param {boolean} isSvg Whether or not this DOM node is an SVG node\n * @param {*} excessDomChildren\n * @param {Array<import('../internal').Component>} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {boolean} isHydrating Whether or not we are in hydration\n * @returns {import('../internal').PreactElement}\n */\nfunction diffElementNodes(\n\tdom,\n\tnewVNode,\n\toldVNode,\n\tglobalContext,\n\tisSvg,\n\texcessDomChildren,\n\tcommitQueue,\n\tisHydrating\n) {\n\tlet oldProps = oldVNode.props;\n\tlet newProps = newVNode.props;\n\tlet nodeType = newVNode.type;\n\tlet i = 0;\n\n\t// Tracks entering and exiting SVG namespace when descending through the tree.\n\tif (nodeType === 'svg') isSvg = true;\n\n\tif (excessDomChildren != null) {\n\t\tfor (; i < excessDomChildren.length; i++) {\n\t\t\tconst child = excessDomChildren[i];\n\n\t\t\t// if newVNode matches an element in excessDomChildren or the `dom`\n\t\t\t// argument matches an element in excessDomChildren, remove it from\n\t\t\t// excessDomChildren so it isn't later removed in diffChildren\n\t\t\tif (\n\t\t\t\tchild &&\n\t\t\t\t'setAttribute' in child === !!nodeType &&\n\t\t\t\t(nodeType ? child.localName === nodeType : child.nodeType === 3)\n\t\t\t) {\n\t\t\t\tdom = child;\n\t\t\t\texcessDomChildren[i] = null;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (dom == null) {\n\t\tif (nodeType === null) {\n\t\t\t// @ts-ignore createTextNode returns Text, we expect PreactElement\n\t\t\treturn document.createTextNode(newProps);\n\t\t}\n\n\t\tif (isSvg) {\n\t\t\tdom = document.createElementNS(\n\t\t\t\t'http://www.w3.org/2000/svg',\n\t\t\t\t// @ts-ignore We know `newVNode.type` is a string\n\t\t\t\tnodeType\n\t\t\t);\n\t\t} else {\n\t\t\tdom = document.createElement(\n\t\t\t\t// @ts-ignore We know `newVNode.type` is a string\n\t\t\t\tnodeType,\n\t\t\t\tnewProps.is && newProps\n\t\t\t);\n\t\t}\n\n\t\t// we created a new parent, so none of the previously attached children can be reused:\n\t\texcessDomChildren = null;\n\t\t// we are creating a new node, so we can assume this is a new subtree (in case we are hydrating), this deopts the hydrate\n\t\tisHydrating = false;\n\t}\n\n\tif (nodeType === null) {\n\t\t// During hydration, we still have to split merged text from SSR'd HTML.\n\t\tif (oldProps !== newProps && (!isHydrating || dom.data !== newProps)) {\n\t\t\tdom.data = newProps;\n\t\t}\n\t} else {\n\t\t// If excessDomChildren was not null, repopulate it with the current element's children:\n\t\texcessDomChildren = excessDomChildren && slice.call(dom.childNodes);\n\n\t\toldProps = oldVNode.props || EMPTY_OBJ;\n\n\t\tlet oldHtml = oldProps.dangerouslySetInnerHTML;\n\t\tlet newHtml = newProps.dangerouslySetInnerHTML;\n\n\t\t// During hydration, props are not diffed at all (including dangerouslySetInnerHTML)\n\t\t// @TODO we should warn in debug mode when props don't match here.\n\t\tif (!isHydrating) {\n\t\t\t// But, if we are in a situation where we are using existing DOM (e.g. replaceNode)\n\t\t\t// we should read the existing DOM attributes to diff them\n\t\t\tif (excessDomChildren != null) {\n\t\t\t\toldProps = {};\n\t\t\t\tfor (i = 0; i < dom.attributes.length; i++) {\n\t\t\t\t\toldProps[dom.attributes[i].name] = dom.attributes[i].value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (newHtml || oldHtml) {\n\t\t\t\t// Avoid re-applying the same '__html' if it did not changed between re-render\n\t\t\t\tif (\n\t\t\t\t\t!newHtml ||\n\t\t\t\t\t((!oldHtml || newHtml.__html != oldHtml.__html) &&\n\t\t\t\t\t\tnewHtml.__html !== dom.innerHTML)\n\t\t\t\t) {\n\t\t\t\t\tdom.innerHTML = (newHtml && newHtml.__html) || '';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tdiffProps(dom, newProps, oldProps, isSvg, isHydrating);\n\n\t\t// If the new vnode didn't have dangerouslySetInnerHTML, diff its children\n\t\tif (newHtml) {\n\t\t\tnewVNode._children = [];\n\t\t} else {\n\t\t\ti = newVNode.props.children;\n\t\t\tdiffChildren(\n\t\t\t\tdom,\n\t\t\t\tArray.isArray(i) ? i : [i],\n\t\t\t\tnewVNode,\n\t\t\t\toldVNode,\n\t\t\t\tglobalContext,\n\t\t\t\tisSvg && nodeType !== 'foreignObject',\n\t\t\t\texcessDomChildren,\n\t\t\t\tcommitQueue,\n\t\t\t\texcessDomChildren\n\t\t\t\t\t? excessDomChildren[0]\n\t\t\t\t\t: oldVNode._children && getDomSibling(oldVNode, 0),\n\t\t\t\tisHydrating\n\t\t\t);\n\n\t\t\t// Remove children that are not part of any vnode.\n\t\t\tif (excessDomChildren != null) {\n\t\t\t\tfor (i = excessDomChildren.length; i--; ) {\n\t\t\t\t\tif (excessDomChildren[i] != null) removeNode(excessDomChildren[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// (as above, don't diff props during hydration)\n\t\tif (!isHydrating) {\n\t\t\tif (\n\t\t\t\t'value' in newProps &&\n\t\t\t\t(i = newProps.value) !== undefined &&\n\t\t\t\t// #2756 For the <progress>-element the initial value is 0,\n\t\t\t\t// despite the attribute not being present. When the attribute\n\t\t\t\t// is missing the progress bar is treated as indeterminate.\n\t\t\t\t// To fix that we'll always update it when it is 0 for progress elements\n\t\t\t\t(i !== dom.value ||\n\t\t\t\t\t(nodeType === 'progress' && !i) ||\n\t\t\t\t\t// This is only for IE 11 to fix <select> value not being updated.\n\t\t\t\t\t// To avoid a stale select value we need to set the option.value\n\t\t\t\t\t// again, which triggers IE11 to re-evaluate the select value\n\t\t\t\t\t(nodeType === 'option' && i !== oldProps.value))\n\t\t\t) {\n\t\t\t\tsetProperty(dom, 'value', i, oldProps.value, false);\n\t\t\t}\n\t\t\tif (\n\t\t\t\t'checked' in newProps &&\n\t\t\t\t(i = newProps.checked) !== undefined &&\n\t\t\t\ti !== dom.checked\n\t\t\t) {\n\t\t\t\tsetProperty(dom, 'checked', i, oldProps.checked, false);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn dom;\n}\n\n/**\n * Invoke or update a ref, depending on whether it is a function or object ref.\n * @param {object|function} ref\n * @param {any} value\n * @param {import('../internal').VNode} vnode\n */\nexport function applyRef(ref, value, vnode) {\n\ttry {\n\t\tif (typeof ref == 'function') ref(value);\n\t\telse ref.current = value;\n\t} catch (e) {\n\t\toptions._catchError(e, vnode);\n\t}\n}\n\n/**\n * Unmount a virtual node from the tree and apply DOM changes\n * @param {import('../internal').VNode} vnode The virtual node to unmount\n * @param {import('../internal').VNode} parentVNode The parent of the VNode that\n * initiated the unmount\n * @param {boolean} [skipRemove] Flag that indicates that a parent node of the\n * current element is already detached from the DOM.\n */\nexport function unmount(vnode, parentVNode, skipRemove) {\n\tlet r;\n\tif (options.unmount) options.unmount(vnode);\n\n\tif ((r = vnode.ref)) {\n\t\tif (!r.current || r.current === vnode._dom) applyRef(r, null, parentVNode);\n\t}\n\n\tif ((r = vnode._component) != null) {\n\t\tif (r.componentWillUnmount) {\n\t\t\ttry {\n\t\t\t\tr.componentWillUnmount();\n\t\t\t} catch (e) {\n\t\t\t\toptions._catchError(e, parentVNode);\n\t\t\t}\n\t\t}\n\n\t\tr.base = r._parentDom = null;\n\t}\n\n\tif ((r = vnode._children)) {\n\t\tfor (let i = 0; i < r.length; i++) {\n\t\t\tif (r[i]) {\n\t\t\t\tunmount(r[i], parentVNode, typeof vnode.type != 'function');\n\t\t\t}\n\t\t}\n\t}\n\n\tif (!skipRemove && vnode._dom != null) removeNode(vnode._dom);\n\n\t// Must be set to `undefined` to properly clean up `_nextDom`\n\t// for which `null` is a valid value. See comment in `create-element.js`\n\tvnode._dom = vnode._nextDom = undefined;\n}\n\n/** The `.render()` method for a PFC backing instance. */\nfunction doRender(props, state, context) {\n\treturn this.constructor(props, context);\n}\n", "import { EMPTY_OBJ } from './constants';\nimport { commitRoot, diff } from './diff/index';\nimport { createElement, Fragment } from './create-element';\nimport options from './options';\nimport { slice } from './util';\n\n/**\n * Render a Preact virtual node into a DOM element\n * @param {import('./internal').ComponentChild} vnode The virtual node to render\n * @param {import('./internal').PreactElement} parentDom The DOM element to\n * render into\n * @param {import('./internal').PreactElement | object} [replaceNode] Optional: Attempt to re-use an\n * existing DOM tree rooted at `replaceNode`\n */\nexport function render(vnode, parentDom, replaceNode) {\n\tif (options._root) options._root(vnode, parentDom);\n\n\t// We abuse the `replaceNode` parameter in `hydrate()` to signal if we are in\n\t// hydration mode or not by passing the `hydrate` function instead of a DOM\n\t// element..\n\tlet isHydrating = typeof replaceNode === 'function';\n\n\t// To be able to support calling `render()` multiple times on the same\n\t// DOM node, we need to obtain a reference to the previous tree. We do\n\t// this by assigning a new `_children` property to DOM nodes which points\n\t// to the last rendered tree. By default this property is not present, which\n\t// means that we are mounting a new tree for the first time.\n\tlet oldVNode = isHydrating\n\t\t? null\n\t\t: (replaceNode && replaceNode._children) || parentDom._children;\n\n\tvnode = (\n\t\t(!isHydrating && replaceNode) ||\n\t\tparentDom\n\t)._children = createElement(Fragment, null, [vnode]);\n\n\t// List of effects that need to be called after diffing.\n\tlet commitQueue = [];\n\tdiff(\n\t\tparentDom,\n\t\t// Determine the new vnode tree and store it on the DOM element on\n\t\t// our custom `_children` property.\n\t\tvnode,\n\t\toldVNode || EMPTY_OBJ,\n\t\tEMPTY_OBJ,\n\t\tparentDom.ownerSVGElement !== undefined,\n\t\t!isHydrating && replaceNode\n\t\t\t? [replaceNode]\n\t\t\t: oldVNode\n\t\t\t? null\n\t\t\t: parentDom.firstChild\n\t\t\t? slice.call(parentDom.childNodes)\n\t\t\t: null,\n\t\tcommitQueue,\n\t\t!isHydrating && replaceNode\n\t\t\t? replaceNode\n\t\t\t: oldVNode\n\t\t\t? oldVNode._dom\n\t\t\t: parentDom.firstChild,\n\t\tisHydrating\n\t);\n\n\t// Flush all queued effects\n\tcommitRoot(commitQueue, vnode);\n}\n\n/**\n * Update an existing DOM element with data from a Preact virtual node\n * @param {import('./internal').ComponentChild} vnode The virtual node to render\n * @param {import('./internal').PreactElement} parentDom The DOM element to\n * update\n */\nexport function hydrate(vnode, parentDom) {\n\trender(vnode, parentDom, hydrate);\n}\n", "import { assign, slice } from './util';\nimport { createVNode } from './create-element';\n\n/**\n * Clones the given VNode, optionally adding attributes/props and replacing its children.\n * @param {import('./internal').VNode} vnode The virtual DOM element to clone\n * @param {object} props Attributes/props to add when cloning\n * @param {Array<import('./internal').ComponentChildren>} rest Any additional arguments will be used as replacement children.\n * @returns {import('./internal').VNode}\n */\nexport function cloneElement(vnode, props, children) {\n\tlet normalizedProps = assign({}, vnode.props),\n\t\tkey,\n\t\tref,\n\t\ti;\n\tfor (i in props) {\n\t\tif (i == 'key') key = props[i];\n\t\telse if (i == 'ref') ref = props[i];\n\t\telse normalizedProps[i] = props[i];\n\t}\n\n\tif (arguments.length > 2) {\n\t\tnormalizedProps.children =\n\t\t\targuments.length > 3 ? slice.call(arguments, 2) : children;\n\t}\n\n\treturn createVNode(\n\t\tvnode.type,\n\t\tnormalizedProps,\n\t\tkey || vnode.key,\n\t\tref || vnode.ref,\n\t\tnull\n\t);\n}\n", "/**\n * Find the closest error boundary to a thrown error and call it\n * @param {object} error The thrown value\n * @param {import('../internal').VNode} vnode The vnode that threw\n * the error that was caught (except for unmounting when this parameter\n * is the highest parent that was being unmounted)\n */\nexport function _catchError(error, vnode) {\n\t/** @type {import('../internal').Component} */\n\tlet component, ctor, handled;\n\n\tfor (; (vnode = vnode._parent); ) {\n\t\tif ((component = vnode._component) && !component._processingException) {\n\t\t\ttry {\n\t\t\t\tctor = component.constructor;\n\n\t\t\t\tif (ctor && ctor.getDerivedStateFromError != null) {\n\t\t\t\t\tcomponent.setState(ctor.getDerivedStateFromError(error));\n\t\t\t\t\thandled = component._dirty;\n\t\t\t\t}\n\n\t\t\t\tif (component.componentDidCatch != null) {\n\t\t\t\t\tcomponent.componentDidCatch(error);\n\t\t\t\t\thandled = component._dirty;\n\t\t\t\t}\n\n\t\t\t\t// This is an error boundary. Mark it as having bailed out, and whether it was mid-hydration.\n\t\t\t\tif (handled) {\n\t\t\t\t\treturn (component._pendingError = component);\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\terror = e;\n\t\t\t}\n\t\t}\n\t}\n\n\tthrow error;\n}\n", "\"use strict\";\n\n/**\n * Check if an object is a DOM element. Duck-typing based on `nodeType`.\n *\n * @param {*} obj\n */\nmodule.exports = function isDOMElement(obj) {\n  return (obj == null ? void 0 : obj.nodeType) === Node.ELEMENT_NODE;\n};", "\"use strict\";\n\nconst isDOMElement = require('./isDOMElement');\n/**\n * Find a DOM element.\n *\n * @param {Node|string} element\n * @returns {Node|null}\n */\n\n\nmodule.exports = function findDOMElement(element, context) {\n  if (context === void 0) {\n    context = document;\n  }\n\n  if (typeof element === 'string') {\n    return context.querySelector(element);\n  }\n\n  if (isDOMElement(element)) {\n    return element;\n  }\n\n  return null;\n};", "\"use strict\";\n\n/**\n * Core plugin logic that all plugins share.\n *\n * BasePlugin does not contain DOM rendering so it can be used for plugins\n * without a user interface.\n *\n * See `Plugin` for the extended version with Preact rendering for interfaces.\n */\nconst Translator = require('@uppy/utils/lib/Translator');\n\nmodule.exports = class BasePlugin {\n  constructor(uppy, opts) {\n    if (opts === void 0) {\n      opts = {};\n    }\n\n    this.uppy = uppy;\n    this.opts = opts;\n  }\n\n  getPluginState() {\n    const {\n      plugins\n    } = this.uppy.getState();\n    return plugins[this.id] || {};\n  }\n\n  setPluginState(update) {\n    const {\n      plugins\n    } = this.uppy.getState();\n    this.uppy.setState({\n      plugins: { ...plugins,\n        [this.id]: { ...plugins[this.id],\n          ...update\n        }\n      }\n    });\n  }\n\n  setOptions(newOpts) {\n    this.opts = { ...this.opts,\n      ...newOpts\n    };\n    this.setPluginState(); // so that UI re-renders with new options\n\n    this.i18nInit();\n  }\n\n  i18nInit() {\n    const translator = new Translator([this.defaultLocale, this.uppy.locale, this.opts.locale]);\n    this.i18n = translator.translate.bind(translator);\n    this.i18nArray = translator.translateArray.bind(translator);\n    this.setPluginState(); // so that UI re-renders and we see the updated locale\n  }\n  /**\n   * Extendable methods\n   * ==================\n   * These methods are here to serve as an overview of the extendable methods as well as\n   * making them not conditional in use, such as `if (this.afterUpdate)`.\n   */\n  // eslint-disable-next-line class-methods-use-this\n\n\n  addTarget() {\n    throw new Error('Extend the addTarget method to add your plugin to another plugin\\'s target');\n  } // eslint-disable-next-line class-methods-use-this\n\n\n  install() {} // eslint-disable-next-line class-methods-use-this\n\n\n  uninstall() {}\n  /**\n   * Called when plugin is mounted, whether in DOM or into another plugin.\n   * Needed because sometimes plugins are mounted separately/after `install`,\n   * so this.el and this.parent might not be available in `install`.\n   * This is the case with @uppy/react plugins, for example.\n   */\n\n\n  render() {\n    throw new Error('Extend the render method to add your plugin to a DOM element');\n  } // eslint-disable-next-line class-methods-use-this\n\n\n  update() {} // Called after every state update, after everything's mounted. Debounced.\n  // eslint-disable-next-line class-methods-use-this\n\n\n  afterUpdate() {}\n\n};", "\"use strict\";\n\nfunction _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError(\"attempted to use private field on non-instance\"); } return receiver; }\n\nvar id = 0;\n\nfunction _classPrivateFieldLooseKey(name) { return \"__private_\" + id++ + \"_\" + name; }\n\nconst {\n  render\n} = require('preact');\n\nconst findDOMElement = require('@uppy/utils/lib/findDOMElement');\n\nconst BasePlugin = require('./BasePlugin');\n/**\n * Defer a frequent call to the microtask queue.\n *\n * @param {() => T} fn\n * @returns {Promise<T>}\n */\n\n\nfunction debounce(fn) {\n  let calling = null;\n  let latestArgs = null;\n  return function () {\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    latestArgs = args;\n\n    if (!calling) {\n      calling = Promise.resolve().then(() => {\n        calling = null; // At this point `args` may be different from the most\n        // recent state, if multiple calls happened since this task\n        // was queued. So we use the `latestArgs`, which definitely\n        // is the most recent call.\n\n        return fn(...latestArgs);\n      });\n    }\n\n    return calling;\n  };\n}\n/**\n * UIPlugin is the extended version of BasePlugin to incorporate rendering with Preact.\n * Use this for plugins that need a user interface.\n *\n * For plugins without an user interface, see BasePlugin.\n */\n\n\nvar _updateUI = /*#__PURE__*/_classPrivateFieldLooseKey(\"updateUI\");\n\nclass UIPlugin extends BasePlugin {\n  constructor() {\n    super(...arguments);\n    Object.defineProperty(this, _updateUI, {\n      writable: true,\n      value: void 0\n    });\n  }\n\n  /**\n   * Check if supplied `target` is a DOM element or an `object`.\n   * If it\u2019s an object \u2014 target is a plugin, and we search `plugins`\n   * for a plugin with same name and return its target.\n   */\n  mount(target, plugin) {\n    const callerPluginName = plugin.id;\n    const targetElement = findDOMElement(target);\n\n    if (targetElement) {\n      this.isTargetDOMEl = true; // When target is <body> with a single <div> element,\n      // Preact thinks it\u2019s the Uppy root element in there when doing a diff,\n      // and destroys it. So we are creating a fragment (could be empty div)\n\n      const uppyRootElement = document.createDocumentFragment(); // API for plugins that require a synchronous rerender.\n\n      _classPrivateFieldLooseBase(this, _updateUI)[_updateUI] = debounce(state => {\n        // plugin could be removed, but this.rerender is debounced below,\n        // so it could still be called even after uppy.removePlugin or uppy.close\n        // hence the check\n        if (!this.uppy.getPlugin(this.id)) return;\n        render(this.render(state), uppyRootElement);\n        this.afterUpdate();\n      });\n      this.uppy.log(`Installing ${callerPluginName} to a DOM element '${target}'`);\n\n      if (this.opts.replaceTargetContent) {\n        // Doing render(h(null), targetElement), which should have been\n        // a better way, since because the component might need to do additional cleanup when it is removed,\n        // stopped working \u2014 Preact just adds null into target, not replacing\n        targetElement.innerHTML = '';\n      }\n\n      render(this.render(this.uppy.getState()), uppyRootElement);\n      this.el = uppyRootElement.firstElementChild;\n      targetElement.appendChild(uppyRootElement);\n      this.onMount();\n      return this.el;\n    }\n\n    let targetPlugin;\n\n    if (typeof target === 'object' && target instanceof UIPlugin) {\n      // Targeting a plugin *instance*\n      targetPlugin = target;\n    } else if (typeof target === 'function') {\n      // Targeting a plugin type\n      const Target = target; // Find the target plugin instance.\n\n      this.uppy.iteratePlugins(p => {\n        if (p instanceof Target) {\n          targetPlugin = p;\n          return false;\n        }\n      });\n    }\n\n    if (targetPlugin) {\n      this.uppy.log(`Installing ${callerPluginName} to ${targetPlugin.id}`);\n      this.parent = targetPlugin;\n      this.el = targetPlugin.addTarget(plugin);\n      this.onMount();\n      return this.el;\n    }\n\n    this.uppy.log(`Not installing ${callerPluginName}`);\n    let message = `Invalid target option given to ${callerPluginName}.`;\n\n    if (typeof target === 'function') {\n      message += ' The given target is not a Plugin class. ' + 'Please check that you\\'re not specifying a React Component instead of a plugin. ' + 'If you are using @uppy/* packages directly, make sure you have only 1 version of @uppy/core installed: ' + 'run `npm ls @uppy/core` on the command line and verify that all the versions match and are deduped correctly.';\n    } else {\n      message += 'If you meant to target an HTML element, please make sure that the element exists. ' + 'Check that the <script> tag initializing Uppy is right before the closing </body> tag at the end of the page. ' + '(see https://github.com/transloadit/uppy/issues/1042)\\n\\n' + 'If you meant to target a plugin, please confirm that your `import` statements or `require` calls are correct.';\n    }\n\n    throw new Error(message);\n  }\n\n  update(state) {\n    if (this.el != null) {\n      var _classPrivateFieldLoo, _classPrivateFieldLoo2;\n\n      (_classPrivateFieldLoo = (_classPrivateFieldLoo2 = _classPrivateFieldLooseBase(this, _updateUI))[_updateUI]) == null ? void 0 : _classPrivateFieldLoo.call(_classPrivateFieldLoo2, state);\n    }\n  }\n\n  unmount() {\n    if (this.isTargetDOMEl) {\n      var _this$el;\n\n      (_this$el = this.el) == null ? void 0 : _this$el.remove();\n    }\n\n    this.onUnmount();\n  } // eslint-disable-next-line class-methods-use-this\n\n\n  onMount() {} // eslint-disable-next-line class-methods-use-this\n\n\n  onUnmount() {}\n\n}\n\nmodule.exports = UIPlugin;", "'use strict';\n\nconst Uppy = require('./Uppy');\n\nconst UIPlugin = require('./UIPlugin');\n\nconst BasePlugin = require('./BasePlugin');\n\nconst {\n  debugLogger\n} = require('./loggers');\n\nmodule.exports = Uppy;\nmodule.exports.Uppy = Uppy;\nmodule.exports.UIPlugin = UIPlugin;\nmodule.exports.BasePlugin = BasePlugin;\nmodule.exports.debugLogger = debugLogger;", "\"use strict\";\n\nmodule.exports = function getSpeed(fileProgress) {\n  if (!fileProgress.bytesUploaded) return 0;\n  const timeElapsed = Date.now() - fileProgress.uploadStarted;\n  const uploadSpeed = fileProgress.bytesUploaded / (timeElapsed / 1000);\n  return uploadSpeed;\n};", "\"use strict\";\n\nmodule.exports = function getBytesRemaining(fileProgress) {\n  return fileProgress.bytesTotal - fileProgress.bytesUploaded;\n};", "\"use strict\";\n\n/**\n * Get the declared text direction for an element.\n *\n * @param {Node} element\n * @returns {string|undefined}\n */\nfunction getTextDirection(element) {\n  var _element;\n\n  // There is another way to determine text direction using getComputedStyle(), as done here:\n  // https://github.com/pencil-js/text-direction/blob/2a235ce95089b3185acec3b51313cbba921b3811/text-direction.js\n  //\n  // We do not use that approach because we are interested specifically in the _declared_ text direction.\n  // If no text direction is declared, we have to provide our own explicit text direction so our\n  // bidirectional CSS style sheets work.\n  while (element && !element.dir) {\n    // eslint-disable-next-line no-param-reassign\n    element = element.parentNode;\n  }\n\n  return (_element = element) == null ? void 0 : _element.dir;\n}\n\nmodule.exports = getTextDirection;", "\"use strict\";\n\nmodule.exports = {\n  STATE_ERROR: 'error',\n  STATE_WAITING: 'waiting',\n  STATE_PREPROCESSING: 'preprocessing',\n  STATE_UPLOADING: 'uploading',\n  STATE_POSTPROCESSING: 'postprocessing',\n  STATE_COMPLETE: 'complete'\n};", "/*!\n  Copyright (c) 2018 Jed Watson.\n  Licensed under the MIT License (MIT), see\n  http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames() {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString === Object.prototype.toString) {\n\t\t\t\t\tfor (var key in arg) {\n\t\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n", "\"use strict\";\n\nmodule.exports = function calculateProcessingProgress(files) {\n  const values = [];\n  let mode;\n  let message;\n\n  for (const {\n    progress\n  } of Object.values(files)) {\n    const {\n      preprocess,\n      postprocess\n    } = progress; // In the future we should probably do this differently. For now we'll take the\n    // mode and message from the first file\u2026\n\n    if (message == null && (preprocess || postprocess)) {\n      ({\n        mode,\n        message\n      } = preprocess || postprocess);\n    }\n\n    if ((preprocess == null ? void 0 : preprocess.mode) === 'determinate') values.push(preprocess.value);\n    if ((postprocess == null ? void 0 : postprocess.mode) === 'determinate') values.push(postprocess.value);\n  }\n\n  const value = values.reduce((total, progressValue) => {\n    return total + progressValue / values.length;\n  }, 0);\n  return {\n    mode,\n    message,\n    value\n  };\n};", "\"use strict\";\n\nmodule.exports = function secondsToTime(rawSeconds) {\n  const hours = Math.floor(rawSeconds / 3600) % 24;\n  const minutes = Math.floor(rawSeconds / 60) % 60;\n  const seconds = Math.floor(rawSeconds % 60);\n  return {\n    hours,\n    minutes,\n    seconds\n  };\n};", "\"use strict\";\n\nconst secondsToTime = require('./secondsToTime');\n\nmodule.exports = function prettyETA(seconds) {\n  const time = secondsToTime(seconds); // Only display hours and minutes if they are greater than 0 but always\n  // display minutes if hours is being displayed\n  // Display a leading zero if the there is a preceding unit: 1m 05s, but 5s\n\n  const hoursStr = time.hours === 0 ? '' : `${time.hours}h`;\n  const minutesStr = time.minutes === 0 ? '' : `${time.hours === 0 ? time.minutes : ` ${time.minutes.toString(10).padStart(2, '0')}`}m`;\n  const secondsStr = time.hours !== 0 ? '' : `${time.minutes === 0 ? time.seconds : ` ${time.seconds.toString(10).padStart(2, '0')}`}s`;\n  return `${hoursStr}${minutesStr}${secondsStr}`;\n};", "\"use strict\";\n\nconst classNames = require('classnames');\n\nconst throttle = require('lodash.throttle');\n\nconst prettierBytes = require('@transloadit/prettier-bytes');\n\nconst prettyETA = require('@uppy/utils/lib/prettyETA');\n\nconst {\n  h\n} = require('preact');\n\nconst statusBarStates = require('./StatusBarStates');\n\nconst DOT = `\\u00B7`;\n\nconst renderDot = () => ` ${DOT} `;\n\nfunction UploadBtn(props) {\n  const {\n    newFiles,\n    isUploadStarted,\n    recoveredState,\n    i18n,\n    uploadState,\n    isSomeGhost,\n    startUpload\n  } = props;\n  const uploadBtnClassNames = classNames('uppy-u-reset', 'uppy-c-btn', 'uppy-StatusBar-actionBtn', 'uppy-StatusBar-actionBtn--upload', {\n    'uppy-c-btn-primary': uploadState === statusBarStates.STATE_WAITING\n  }, {\n    'uppy-StatusBar-actionBtn--disabled': isSomeGhost\n  });\n  const uploadBtnText = newFiles && isUploadStarted && !recoveredState ? i18n('uploadXNewFiles', {\n    smart_count: newFiles\n  }) : i18n('uploadXFiles', {\n    smart_count: newFiles\n  });\n  return h(\"button\", {\n    type: \"button\",\n    className: uploadBtnClassNames,\n    \"aria-label\": i18n('uploadXFiles', {\n      smart_count: newFiles\n    }),\n    onClick: startUpload,\n    disabled: isSomeGhost,\n    \"data-uppy-super-focusable\": true\n  }, uploadBtnText);\n}\n\nfunction RetryBtn(props) {\n  const {\n    i18n,\n    uppy\n  } = props;\n  return h(\"button\", {\n    type: \"button\",\n    className: \"uppy-u-reset uppy-c-btn uppy-StatusBar-actionBtn uppy-StatusBar-actionBtn--retry\",\n    \"aria-label\": i18n('retryUpload'),\n    onClick: () => uppy.retryAll(),\n    \"data-uppy-super-focusable\": true\n  }, h(\"svg\", {\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    className: \"uppy-c-icon\",\n    width: \"8\",\n    height: \"10\",\n    viewBox: \"0 0 8 10\"\n  }, h(\"path\", {\n    d: \"M4 2.408a2.75 2.75 0 1 0 2.75 2.75.626.626 0 0 1 1.25.018v.023a4 4 0 1 1-4-4.041V.25a.25.25 0 0 1 .389-.208l2.299 1.533a.25.25 0 0 1 0 .416l-2.3 1.533A.25.25 0 0 1 4 3.316v-.908z\"\n  })), i18n('retry'));\n}\n\nfunction CancelBtn(props) {\n  const {\n    i18n,\n    uppy\n  } = props;\n  return h(\"button\", {\n    type: \"button\",\n    className: \"uppy-u-reset uppy-StatusBar-actionCircleBtn\",\n    title: i18n('cancel'),\n    \"aria-label\": i18n('cancel'),\n    onClick: () => uppy.cancelAll(),\n    \"data-uppy-super-focusable\": true\n  }, h(\"svg\", {\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    className: \"uppy-c-icon\",\n    width: \"16\",\n    height: \"16\",\n    viewBox: \"0 0 16 16\"\n  }, h(\"g\", {\n    fill: \"none\",\n    fillRule: \"evenodd\"\n  }, h(\"circle\", {\n    fill: \"#888\",\n    cx: \"8\",\n    cy: \"8\",\n    r: \"8\"\n  }), h(\"path\", {\n    fill: \"#FFF\",\n    d: \"M9.283 8l2.567 2.567-1.283 1.283L8 9.283 5.433 11.85 4.15 10.567 6.717 8 4.15 5.433 5.433 4.15 8 6.717l2.567-2.567 1.283 1.283z\"\n  }))));\n}\n\nfunction PauseResumeButton(props) {\n  const {\n    isAllPaused,\n    i18n,\n    isAllComplete,\n    resumableUploads,\n    uppy\n  } = props;\n  const title = isAllPaused ? i18n('resume') : i18n('pause');\n\n  function togglePauseResume() {\n    if (isAllComplete) return null;\n\n    if (!resumableUploads) {\n      return uppy.cancelAll();\n    }\n\n    if (isAllPaused) {\n      return uppy.resumeAll();\n    }\n\n    return uppy.pauseAll();\n  }\n\n  return h(\"button\", {\n    title: title,\n    \"aria-label\": title,\n    className: \"uppy-u-reset uppy-StatusBar-actionCircleBtn\",\n    type: \"button\",\n    onClick: togglePauseResume,\n    \"data-uppy-super-focusable\": true\n  }, h(\"svg\", {\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    className: \"uppy-c-icon\",\n    width: \"16\",\n    height: \"16\",\n    viewBox: \"0 0 16 16\"\n  }, h(\"g\", {\n    fill: \"none\",\n    fillRule: \"evenodd\"\n  }, h(\"circle\", {\n    fill: \"#888\",\n    cx: \"8\",\n    cy: \"8\",\n    r: \"8\"\n  }), h(\"path\", {\n    fill: \"#FFF\",\n    d: isAllPaused ? 'M6 4.25L11.5 8 6 11.75z' : 'M5 4.5h2v7H5v-7zm4 0h2v7H9v-7z'\n  }))));\n}\n\nfunction DoneBtn(props) {\n  const {\n    i18n,\n    doneButtonHandler\n  } = props;\n  return h(\"button\", {\n    type: \"button\",\n    className: \"uppy-u-reset uppy-c-btn uppy-StatusBar-actionBtn uppy-StatusBar-actionBtn--done\",\n    onClick: doneButtonHandler,\n    \"data-uppy-super-focusable\": true\n  }, i18n('done'));\n}\n\nfunction LoadingSpinner() {\n  return h(\"svg\", {\n    className: \"uppy-StatusBar-spinner\",\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    width: \"14\",\n    height: \"14\"\n  }, h(\"path\", {\n    d: \"M13.983 6.547c-.12-2.509-1.64-4.893-3.939-5.936-2.48-1.127-5.488-.656-7.556 1.094C.524 3.367-.398 6.048.162 8.562c.556 2.495 2.46 4.52 4.94 5.183 2.932.784 5.61-.602 7.256-3.015-1.493 1.993-3.745 3.309-6.298 2.868-2.514-.434-4.578-2.349-5.153-4.84a6.226 6.226 0 0 1 2.98-6.778C6.34.586 9.74 1.1 11.373 3.493c.407.596.693 1.282.842 1.988.127.598.073 1.197.161 1.794.078.525.543 1.257 1.15.864.525-.341.49-1.05.456-1.592-.007-.15.02.3 0 0\",\n    fillRule: \"evenodd\"\n  }));\n}\n\nfunction ProgressBarProcessing(props) {\n  const {\n    progress\n  } = props;\n  const {\n    value,\n    mode,\n    message\n  } = progress;\n  const roundedValue = Math.round(value * 100);\n  const dot = `\\u00B7`;\n  return h(\"div\", {\n    className: \"uppy-StatusBar-content\"\n  }, h(LoadingSpinner, null), mode === 'determinate' ? `${roundedValue}% ${dot} ` : '', message);\n}\n\nfunction ProgressDetails(props) {\n  const {\n    numUploads,\n    complete,\n    totalUploadedSize,\n    totalSize,\n    totalETA,\n    i18n\n  } = props;\n  const ifShowFilesUploadedOfTotal = numUploads > 1;\n  return h(\"div\", {\n    className: \"uppy-StatusBar-statusSecondary\"\n  }, ifShowFilesUploadedOfTotal && i18n('filesUploadedOfTotal', {\n    complete,\n    smart_count: numUploads\n  }), h(\"span\", {\n    className: \"uppy-StatusBar-additionalInfo\"\n  }, ifShowFilesUploadedOfTotal && renderDot(), i18n('dataUploadedOfTotal', {\n    complete: prettierBytes(totalUploadedSize),\n    total: prettierBytes(totalSize)\n  }), renderDot(), i18n('xTimeLeft', {\n    time: prettyETA(totalETA)\n  })));\n}\n\nfunction FileUploadCount(props) {\n  const {\n    i18n,\n    complete,\n    numUploads\n  } = props;\n  return h(\"div\", {\n    className: \"uppy-StatusBar-statusSecondary\"\n  }, i18n('filesUploadedOfTotal', {\n    complete,\n    smart_count: numUploads\n  }));\n}\n\nfunction UploadNewlyAddedFiles(props) {\n  const {\n    i18n,\n    newFiles,\n    startUpload\n  } = props;\n  const uploadBtnClassNames = classNames('uppy-u-reset', 'uppy-c-btn', 'uppy-StatusBar-actionBtn', 'uppy-StatusBar-actionBtn--uploadNewlyAdded');\n  return h(\"div\", {\n    className: \"uppy-StatusBar-statusSecondary\"\n  }, h(\"div\", {\n    className: \"uppy-StatusBar-statusSecondaryHint\"\n  }, i18n('xMoreFilesAdded', {\n    smart_count: newFiles\n  })), h(\"button\", {\n    type: \"button\",\n    className: uploadBtnClassNames,\n    \"aria-label\": i18n('uploadXFiles', {\n      smart_count: newFiles\n    }),\n    onClick: startUpload\n  }, i18n('upload')));\n}\n\nconst ThrottledProgressDetails = throttle(ProgressDetails, 500, {\n  leading: true,\n  trailing: true\n});\n\nfunction ProgressBarUploading(props) {\n  const {\n    i18n,\n    supportsUploadProgress,\n    totalProgress,\n    showProgressDetails,\n    isUploadStarted,\n    isAllComplete,\n    isAllPaused,\n    newFiles,\n    numUploads,\n    complete,\n    totalUploadedSize,\n    totalSize,\n    totalETA,\n    startUpload\n  } = props;\n  const showUploadNewlyAddedFiles = newFiles && isUploadStarted;\n\n  if (!isUploadStarted || isAllComplete) {\n    return null;\n  }\n\n  const title = isAllPaused ? i18n('paused') : i18n('uploading');\n\n  function renderProgressDetails() {\n    if (!isAllPaused && !showUploadNewlyAddedFiles && showProgressDetails) {\n      if (supportsUploadProgress) {\n        return h(ThrottledProgressDetails, {\n          numUploads: numUploads,\n          complete: complete,\n          totalUploadedSize: totalUploadedSize,\n          totalSize: totalSize,\n          totalETA: totalETA,\n          i18n: i18n\n        });\n      }\n\n      return h(FileUploadCount, {\n        i18n: i18n,\n        complete: complete,\n        numUploads: numUploads\n      });\n    }\n\n    return null;\n  }\n\n  return h(\"div\", {\n    className: \"uppy-StatusBar-content\",\n    \"aria-label\": title,\n    title: title\n  }, !isAllPaused ? h(LoadingSpinner, null) : null, h(\"div\", {\n    className: \"uppy-StatusBar-status\"\n  }, h(\"div\", {\n    className: \"uppy-StatusBar-statusPrimary\"\n  }, supportsUploadProgress ? `${title}: ${totalProgress}%` : title), renderProgressDetails(), showUploadNewlyAddedFiles ? h(UploadNewlyAddedFiles, {\n    i18n: i18n,\n    newFiles: newFiles,\n    startUpload: startUpload\n  }) : null));\n}\n\nfunction ProgressBarComplete(props) {\n  const {\n    i18n\n  } = props;\n  return h(\"div\", {\n    className: \"uppy-StatusBar-content\",\n    role: \"status\",\n    title: i18n('complete')\n  }, h(\"div\", {\n    className: \"uppy-StatusBar-status\"\n  }, h(\"div\", {\n    className: \"uppy-StatusBar-statusPrimary\"\n  }, h(\"svg\", {\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    className: \"uppy-StatusBar-statusIndicator uppy-c-icon\",\n    width: \"15\",\n    height: \"11\",\n    viewBox: \"0 0 15 11\"\n  }, h(\"path\", {\n    d: \"M.414 5.843L1.627 4.63l3.472 3.472L13.202 0l1.212 1.213L5.1 10.528z\"\n  })), i18n('complete'))));\n}\n\nfunction ProgressBarError(props) {\n  const {\n    error,\n    i18n,\n    complete,\n    numUploads\n  } = props;\n\n  function displayErrorAlert() {\n    const errorMessage = `${i18n('uploadFailed')} \\n\\n ${error}`; // eslint-disable-next-line no-alert\n\n    alert(errorMessage); // TODO: move to custom alert implementation\n  }\n\n  return h(\"div\", {\n    className: \"uppy-StatusBar-content\",\n    title: i18n('uploadFailed')\n  }, h(\"svg\", {\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    className: \"uppy-StatusBar-statusIndicator uppy-c-icon\",\n    width: \"11\",\n    height: \"11\",\n    viewBox: \"0 0 11 11\"\n  }, h(\"path\", {\n    d: \"M4.278 5.5L0 1.222 1.222 0 5.5 4.278 9.778 0 11 1.222 6.722 5.5 11 9.778 9.778 11 5.5 6.722 1.222 11 0 9.778z\"\n  })), h(\"div\", {\n    className: \"uppy-StatusBar-status\"\n  }, h(\"div\", {\n    className: \"uppy-StatusBar-statusPrimary\"\n  }, i18n('uploadFailed'), h(\"button\", {\n    className: \"uppy-u-reset uppy-StatusBar-details\",\n    \"aria-label\": i18n('showErrorDetails'),\n    \"data-microtip-position\": \"top-right\",\n    \"data-microtip-size\": \"medium\",\n    onClick: displayErrorAlert,\n    type: \"button\"\n  }, \"?\")), h(FileUploadCount, {\n    i18n: i18n,\n    complete: complete,\n    numUploads: numUploads\n  })));\n}\n\nmodule.exports = {\n  UploadBtn,\n  RetryBtn,\n  CancelBtn,\n  PauseResumeButton,\n  DoneBtn,\n  LoadingSpinner,\n  ProgressDetails,\n  ProgressBarProcessing,\n  ProgressBarError,\n  ProgressBarUploading,\n  ProgressBarComplete\n};", "\"use strict\";\n\nconst {\n  h\n} = require('preact');\n\nconst classNames = require('classnames');\n\nconst statusBarStates = require('./StatusBarStates');\n\nconst calculateProcessingProgress = require('./calculateProcessingProgress');\n\nconst {\n  UploadBtn,\n  RetryBtn,\n  CancelBtn,\n  PauseResumeButton,\n  DoneBtn,\n  ProgressBarProcessing,\n  ProgressBarError,\n  ProgressBarUploading,\n  ProgressBarComplete\n} = require('./Components');\n\nconst {\n  STATE_ERROR,\n  STATE_WAITING,\n  STATE_PREPROCESSING,\n  STATE_UPLOADING,\n  STATE_POSTPROCESSING,\n  STATE_COMPLETE\n} = statusBarStates;\nmodule.exports = StatusBar;\n\nfunction StatusBar(props) {\n  const {\n    newFiles,\n    allowNewUpload,\n    isUploadInProgress,\n    isAllPaused,\n    resumableUploads,\n    error,\n    hideUploadButton,\n    hidePauseResumeButton,\n    hideCancelButton,\n    hideRetryButton,\n    recoveredState,\n    uploadState,\n    totalProgress,\n    files,\n    supportsUploadProgress,\n    hideAfterFinish,\n    isSomeGhost,\n    isTargetDOMEl,\n    doneButtonHandler,\n    isUploadStarted,\n    i18n,\n    startUpload,\n    uppy,\n    isAllComplete,\n    showProgressDetails,\n    numUploads,\n    complete,\n    totalSize,\n    totalETA,\n    totalUploadedSize\n  } = props;\n\n  function getProgressValue() {\n    switch (uploadState) {\n      case STATE_POSTPROCESSING:\n      case STATE_PREPROCESSING:\n        {\n          const progress = calculateProcessingProgress(files);\n\n          if (progress.mode === 'determinate') {\n            return progress.value * 100;\n          }\n\n          return totalProgress;\n        }\n\n      case STATE_ERROR:\n        {\n          return null;\n        }\n\n      case STATE_UPLOADING:\n        {\n          if (!supportsUploadProgress) {\n            return null;\n          }\n\n          return totalProgress;\n        }\n\n      default:\n        return totalProgress;\n    }\n  }\n\n  function getIsIndeterminate() {\n    switch (uploadState) {\n      case STATE_POSTPROCESSING:\n      case STATE_PREPROCESSING:\n        {\n          const {\n            mode\n          } = calculateProcessingProgress(files);\n          return mode === 'indeterminate';\n        }\n\n      case STATE_UPLOADING:\n        {\n          if (!supportsUploadProgress) {\n            return true;\n          }\n\n          return false;\n        }\n\n      default:\n        return false;\n    }\n  }\n\n  function getIsHidden() {\n    if (recoveredState) {\n      return false;\n    }\n\n    switch (uploadState) {\n      case STATE_WAITING:\n        return hideUploadButton || newFiles === 0;\n\n      case STATE_COMPLETE:\n        return hideAfterFinish;\n\n      default:\n        return false;\n    }\n  }\n\n  const progressValue = getProgressValue();\n  const isHidden = getIsHidden();\n  const width = progressValue != null ? progressValue : 100;\n  const showUploadBtn = !error && newFiles && !isUploadInProgress && !isAllPaused && allowNewUpload && !hideUploadButton;\n  const showCancelBtn = !hideCancelButton && uploadState !== STATE_WAITING && uploadState !== STATE_COMPLETE;\n  const showPauseResumeBtn = resumableUploads && !hidePauseResumeButton && uploadState === STATE_UPLOADING;\n  const showRetryBtn = error && !isAllComplete && !hideRetryButton;\n  const showDoneBtn = doneButtonHandler && uploadState === STATE_COMPLETE;\n  const progressClassNames = classNames('uppy-StatusBar-progress', {\n    'is-indeterminate': getIsIndeterminate()\n  });\n  const statusBarClassNames = classNames({\n    'uppy-Root': isTargetDOMEl\n  }, 'uppy-StatusBar', `is-${uploadState}`, {\n    'has-ghosts': isSomeGhost\n  });\n  return h(\"div\", {\n    className: statusBarClassNames,\n    \"aria-hidden\": isHidden\n  }, h(\"div\", {\n    className: progressClassNames,\n    style: {\n      width: `${width}%`\n    },\n    role: \"progressbar\",\n    \"aria-label\": `${width}%`,\n    \"aria-valuetext\": `${width}%`,\n    \"aria-valuemin\": \"0\",\n    \"aria-valuemax\": \"100\",\n    \"aria-valuenow\": progressValue\n  }), (() => {\n    switch (uploadState) {\n      case STATE_PREPROCESSING:\n      case STATE_POSTPROCESSING:\n        return h(ProgressBarProcessing, {\n          progress: calculateProcessingProgress(files)\n        });\n\n      case STATE_COMPLETE:\n        return h(ProgressBarComplete, {\n          i18n: i18n\n        });\n\n      case STATE_ERROR:\n        return h(ProgressBarError, {\n          error: error,\n          i18n: i18n,\n          numUploads: numUploads,\n          complete: complete\n        });\n\n      case STATE_UPLOADING:\n        return h(ProgressBarUploading, {\n          i18n: i18n,\n          supportsUploadProgress: supportsUploadProgress,\n          totalProgress: totalProgress,\n          showProgressDetails: showProgressDetails,\n          isUploadStarted: isUploadStarted,\n          isAllComplete: isAllComplete,\n          isAllPaused: isAllPaused,\n          newFiles: newFiles,\n          numUploads: numUploads,\n          complete: complete,\n          totalUploadedSize: totalUploadedSize,\n          totalSize: totalSize,\n          totalETA: totalETA,\n          startUpload: startUpload\n        });\n\n      default:\n        return null;\n    }\n  })(), h(\"div\", {\n    className: \"uppy-StatusBar-actions\"\n  }, recoveredState || showUploadBtn ? h(UploadBtn, {\n    newFiles: newFiles,\n    isUploadStarted: isUploadStarted,\n    recoveredState: recoveredState,\n    i18n: i18n,\n    isSomeGhost: isSomeGhost,\n    startUpload: startUpload,\n    uploadState: uploadState\n  }) : null, showRetryBtn ? h(RetryBtn, {\n    i18n: i18n,\n    uppy: uppy\n  }) : null, showPauseResumeBtn ? h(PauseResumeButton, {\n    isAllPaused: isAllPaused,\n    i18n: i18n,\n    isAllComplete: isAllComplete,\n    resumableUploads: resumableUploads,\n    uppy: uppy\n  }) : null, showCancelBtn ? h(CancelBtn, {\n    i18n: i18n,\n    uppy: uppy\n  }) : null, showDoneBtn ? h(DoneBtn, {\n    i18n: i18n,\n    doneButtonHandler: doneButtonHandler\n  }) : null));\n}", "\"use strict\";\n\nmodule.exports = {\n  strings: {\n    // Shown in the status bar while files are being uploaded.\n    uploading: 'Uploading',\n    // Shown in the status bar once all files have been uploaded.\n    complete: 'Complete',\n    // Shown in the status bar if an upload failed.\n    uploadFailed: 'Upload failed',\n    // Shown in the status bar while the upload is paused.\n    paused: 'Paused',\n    // Used as the label for the button that retries an upload.\n    retry: 'Retry',\n    // Used as the label for the button that cancels an upload.\n    cancel: 'Cancel',\n    // Used as the label for the button that pauses an upload.\n    pause: 'Pause',\n    // Used as the label for the button that resumes an upload.\n    resume: 'Resume',\n    // Used as the label for the button that resets the upload state after an upload\n    done: 'Done',\n    // When `showProgressDetails` is set, shows the number of files that have been fully uploaded so far.\n    filesUploadedOfTotal: {\n      0: '%{complete} of %{smart_count} file uploaded',\n      1: '%{complete} of %{smart_count} files uploaded'\n    },\n    // When `showProgressDetails` is set, shows the amount of bytes that have been uploaded so far.\n    dataUploadedOfTotal: '%{complete} of %{total}',\n    // When `showProgressDetails` is set, shows an estimation of how long the upload will take to complete.\n    xTimeLeft: '%{time} left',\n    // Used as the label for the button that starts an upload.\n    uploadXFiles: {\n      0: 'Upload %{smart_count} file',\n      1: 'Upload %{smart_count} files'\n    },\n    // Used as the label for the button that starts an upload, if another upload has been started in the past\n    // and new files were added later.\n    uploadXNewFiles: {\n      0: 'Upload +%{smart_count} file',\n      1: 'Upload +%{smart_count} files'\n    },\n    upload: 'Upload',\n    retryUpload: 'Retry upload',\n    xMoreFilesAdded: {\n      0: '%{smart_count} more file added',\n      1: '%{smart_count} more files added'\n    },\n    showErrorDetails: 'Show error details'\n  }\n};", "\"use strict\";\n\nvar _class, _temp;\n\nconst {\n  UIPlugin\n} = require('@uppy/core');\n\nconst getSpeed = require('@uppy/utils/lib/getSpeed');\n\nconst getBytesRemaining = require('@uppy/utils/lib/getBytesRemaining');\n\nconst getTextDirection = require('@uppy/utils/lib/getTextDirection');\n\nconst statusBarStates = require('./StatusBarStates');\n\nconst StatusBarUI = require('./StatusBar');\n\nconst locale = require('./locale.js');\n/**\n * StatusBar: renders a status bar with upload/pause/resume/cancel/retry buttons,\n * progress percentage and time remaining.\n */\n\n\nmodule.exports = (_temp = _class = class StatusBar extends UIPlugin {\n  // eslint-disable-next-line global-require\n  constructor(uppy, opts) {\n    super(uppy, opts);\n\n    this.startUpload = () => {\n      const {\n        recoveredState\n      } = this.uppy.getState();\n\n      if (recoveredState) {\n        this.uppy.emit('restore-confirmed');\n        return undefined;\n      }\n\n      return this.uppy.upload().catch(() => {// Error logged in Core\n      });\n    };\n\n    this.id = this.opts.id || 'StatusBar';\n    this.title = 'StatusBar';\n    this.type = 'progressindicator';\n    this.defaultLocale = locale; // set default options\n\n    const defaultOptions = {\n      target: 'body',\n      hideUploadButton: false,\n      hideRetryButton: false,\n      hidePauseResumeButton: false,\n      hideCancelButton: false,\n      showProgressDetails: false,\n      hideAfterFinish: true,\n      doneButtonHandler: null\n    };\n    this.opts = { ...defaultOptions,\n      ...opts\n    };\n    this.i18nInit();\n    this.render = this.render.bind(this);\n    this.install = this.install.bind(this);\n  }\n\n  render(state) {\n    const {\n      capabilities,\n      files,\n      allowNewUpload,\n      totalProgress,\n      error,\n      recoveredState\n    } = state;\n    const {\n      newFiles,\n      startedFiles,\n      completeFiles,\n      inProgressNotPausedFiles,\n      isUploadStarted,\n      isAllComplete,\n      isAllErrored,\n      isAllPaused,\n      isUploadInProgress,\n      isSomeGhost\n    } = this.uppy.getObjectOfFilesPerState(); // If some state was recovered, we want to show Upload button/counter\n    // for all the files, because in this case it\u2019s not an Upload button,\n    // but \u201CConfirm Restore Button\u201D\n\n    const newFilesOrRecovered = recoveredState ? Object.values(files) : newFiles;\n    const totalETA = getTotalETA(inProgressNotPausedFiles);\n    const resumableUploads = !!capabilities.resumableUploads;\n    const supportsUploadProgress = capabilities.uploadProgress !== false;\n    let totalSize = 0;\n    let totalUploadedSize = 0;\n    startedFiles.forEach(file => {\n      totalSize += file.progress.bytesTotal || 0;\n      totalUploadedSize += file.progress.bytesUploaded || 0;\n    });\n    return StatusBarUI({\n      error,\n      uploadState: getUploadingState(error, isAllComplete, recoveredState, state.files || {}),\n      allowNewUpload,\n      totalProgress,\n      totalSize,\n      totalUploadedSize,\n      isAllComplete: false,\n      isAllPaused,\n      isAllErrored,\n      isUploadStarted,\n      isUploadInProgress,\n      isSomeGhost,\n      recoveredState,\n      complete: completeFiles.length,\n      newFiles: newFilesOrRecovered.length,\n      numUploads: startedFiles.length,\n      totalETA,\n      files,\n      i18n: this.i18n,\n      uppy: this.uppy,\n      startUpload: this.startUpload,\n      doneButtonHandler: this.opts.doneButtonHandler,\n      resumableUploads,\n      supportsUploadProgress,\n      showProgressDetails: this.opts.showProgressDetails,\n      hideUploadButton: this.opts.hideUploadButton,\n      hideRetryButton: this.opts.hideRetryButton,\n      hidePauseResumeButton: this.opts.hidePauseResumeButton,\n      hideCancelButton: this.opts.hideCancelButton,\n      hideAfterFinish: this.opts.hideAfterFinish,\n      isTargetDOMEl: this.isTargetDOMEl\n    });\n  }\n\n  onMount() {\n    // Set the text direction if the page has not defined one.\n    const element = this.el;\n    const direction = getTextDirection(element);\n\n    if (!direction) {\n      element.dir = 'ltr';\n    }\n  }\n\n  install() {\n    const {\n      target\n    } = this.opts;\n\n    if (target) {\n      this.mount(target, this);\n    }\n  }\n\n  uninstall() {\n    this.unmount();\n  }\n\n}, _class.VERSION = \"2.1.2\", _temp);\n\nfunction getTotalSpeed(files) {\n  let totalSpeed = 0;\n  files.forEach(file => {\n    totalSpeed += getSpeed(file.progress);\n  });\n  return totalSpeed;\n}\n\nfunction getTotalETA(files) {\n  const totalSpeed = getTotalSpeed(files);\n\n  if (totalSpeed === 0) {\n    return 0;\n  }\n\n  const totalBytesRemaining = files.reduce((total, file) => {\n    return total + getBytesRemaining(file.progress);\n  }, 0);\n  return Math.round(totalBytesRemaining / totalSpeed * 10) / 10;\n}\n\nfunction getUploadingState(error, isAllComplete, recoveredState, files) {\n  if (error && !isAllComplete) {\n    return statusBarStates.STATE_ERROR;\n  }\n\n  if (isAllComplete) {\n    return statusBarStates.STATE_COMPLETE;\n  }\n\n  if (recoveredState) {\n    return statusBarStates.STATE_WAITING;\n  }\n\n  let state = statusBarStates.STATE_WAITING;\n  const fileIDs = Object.keys(files);\n\n  for (let i = 0; i < fileIDs.length; i++) {\n    const {\n      progress\n    } = files[fileIDs[i]]; // If ANY files are being uploaded right now, show the uploading state.\n\n    if (progress.uploadStarted && !progress.uploadComplete) {\n      return statusBarStates.STATE_UPLOADING;\n    } // If files are being preprocessed AND postprocessed at this time, we show the\n    // preprocess state. If any files are being uploaded we show uploading.\n\n\n    if (progress.preprocess && state !== statusBarStates.STATE_UPLOADING) {\n      state = statusBarStates.STATE_PREPROCESSING;\n    } // If NO files are being preprocessed or uploaded right now, but some files are\n    // being postprocessed, show the postprocess state.\n\n\n    if (progress.postprocess && state !== statusBarStates.STATE_UPLOADING && state !== statusBarStates.STATE_PREPROCESSING) {\n      state = statusBarStates.STATE_POSTPROCESSING;\n    }\n  }\n\n  return state;\n}", "\"use strict\";\n\nconst {\n  h,\n  Component,\n  createRef\n} = require('preact');\n\nconst TRANSITION_MS = 300;\nmodule.exports = class FadeIn extends Component {\n  constructor() {\n    super(...arguments);\n    this.ref = createRef();\n  }\n\n  componentWillEnter(callback) {\n    this.ref.current.style.opacity = '1';\n    this.ref.current.style.transform = 'none';\n    setTimeout(callback, TRANSITION_MS);\n  }\n\n  componentWillLeave(callback) {\n    this.ref.current.style.opacity = '0';\n    this.ref.current.style.transform = 'translateY(350%)';\n    setTimeout(callback, TRANSITION_MS);\n  }\n\n  render() {\n    const {\n      children\n    } = this.props;\n    return h(\"div\", {\n      className: \"uppy-Informer-animated\",\n      ref: this.ref\n    }, children);\n  }\n\n};", "/* eslint-disable */\n\n/**\n * @source https://github.com/developit/preact-transition-group\n */\n'use strict';\n\nconst {\n  Component,\n  cloneElement,\n  h,\n  toChildArray\n} = require('preact');\n\nfunction assign(obj, props) {\n  return Object.assign(obj, props);\n}\n\nfunction getKey(vnode, fallback) {\n  var _vnode$key;\n\n  return (_vnode$key = vnode == null ? void 0 : vnode.key) != null ? _vnode$key : fallback;\n}\n\nfunction linkRef(component, name) {\n  const cache = component._ptgLinkedRefs || (component._ptgLinkedRefs = {});\n  return cache[name] || (cache[name] = c => {\n    component.refs[name] = c;\n  });\n}\n\nfunction getChildMapping(children) {\n  const out = {};\n\n  for (let i = 0; i < children.length; i++) {\n    if (children[i] != null) {\n      const key = getKey(children[i], i.toString(36));\n      out[key] = children[i];\n    }\n  }\n\n  return out;\n}\n\nfunction mergeChildMappings(prev, next) {\n  prev = prev || {};\n  next = next || {};\n\n  const getValueForKey = key => next.hasOwnProperty(key) ? next[key] : prev[key]; // For each key of `next`, the list of keys to insert before that key in\n  // the combined list\n\n\n  const nextKeysPending = {};\n  let pendingKeys = [];\n\n  for (const prevKey in prev) {\n    if (next.hasOwnProperty(prevKey)) {\n      if (pendingKeys.length) {\n        nextKeysPending[prevKey] = pendingKeys;\n        pendingKeys = [];\n      }\n    } else {\n      pendingKeys.push(prevKey);\n    }\n  }\n\n  const childMapping = {};\n\n  for (const nextKey in next) {\n    if (nextKeysPending.hasOwnProperty(nextKey)) {\n      for (let i = 0; i < nextKeysPending[nextKey].length; i++) {\n        const pendingNextKey = nextKeysPending[nextKey][i];\n        childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey);\n      }\n    }\n\n    childMapping[nextKey] = getValueForKey(nextKey);\n  } // Finally, add the keys which didn't appear before any key in `next`\n\n\n  for (let i = 0; i < pendingKeys.length; i++) {\n    childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]);\n  }\n\n  return childMapping;\n}\n\nconst identity = i => i;\n\nclass TransitionGroup extends Component {\n  constructor(props, context) {\n    super(props, context);\n    this.refs = {};\n    this.state = {\n      children: getChildMapping(toChildArray(toChildArray(this.props.children)) || [])\n    };\n    this.performAppear = this.performAppear.bind(this);\n    this.performEnter = this.performEnter.bind(this);\n    this.performLeave = this.performLeave.bind(this);\n  }\n\n  componentWillMount() {\n    this.currentlyTransitioningKeys = {};\n    this.keysToAbortLeave = [];\n    this.keysToEnter = [];\n    this.keysToLeave = [];\n  }\n\n  componentDidMount() {\n    const initialChildMapping = this.state.children;\n\n    for (const key in initialChildMapping) {\n      if (initialChildMapping[key]) {\n        // this.performAppear(getKey(initialChildMapping[key], key));\n        this.performAppear(key);\n      }\n    }\n  }\n\n  componentWillReceiveProps(nextProps) {\n    const nextChildMapping = getChildMapping(toChildArray(nextProps.children) || []);\n    const prevChildMapping = this.state.children;\n    this.setState(prevState => ({\n      children: mergeChildMappings(prevState.children, nextChildMapping)\n    }));\n    let key;\n\n    for (key in nextChildMapping) {\n      if (nextChildMapping.hasOwnProperty(key)) {\n        const hasPrev = prevChildMapping && prevChildMapping.hasOwnProperty(key); // We should re-enter the component and abort its leave function\n\n        if (nextChildMapping[key] && hasPrev && this.currentlyTransitioningKeys[key]) {\n          this.keysToEnter.push(key);\n          this.keysToAbortLeave.push(key);\n        } else if (nextChildMapping[key] && !hasPrev && !this.currentlyTransitioningKeys[key]) {\n          this.keysToEnter.push(key);\n        }\n      }\n    }\n\n    for (key in prevChildMapping) {\n      if (prevChildMapping.hasOwnProperty(key)) {\n        const hasNext = nextChildMapping && nextChildMapping.hasOwnProperty(key);\n\n        if (prevChildMapping[key] && !hasNext && !this.currentlyTransitioningKeys[key]) {\n          this.keysToLeave.push(key);\n        }\n      }\n    }\n  }\n\n  componentDidUpdate() {\n    const {\n      keysToEnter\n    } = this;\n    this.keysToEnter = [];\n    keysToEnter.forEach(this.performEnter);\n    const {\n      keysToLeave\n    } = this;\n    this.keysToLeave = [];\n    keysToLeave.forEach(this.performLeave);\n  }\n\n  _finishAbort(key) {\n    const idx = this.keysToAbortLeave.indexOf(key);\n\n    if (idx !== -1) {\n      this.keysToAbortLeave.splice(idx, 1);\n    }\n  }\n\n  performAppear(key) {\n    this.currentlyTransitioningKeys[key] = true;\n    const component = this.refs[key];\n\n    if (component.componentWillAppear) {\n      component.componentWillAppear(this._handleDoneAppearing.bind(this, key));\n    } else {\n      this._handleDoneAppearing(key);\n    }\n  }\n\n  _handleDoneAppearing(key) {\n    const component = this.refs[key];\n\n    if (component.componentDidAppear) {\n      component.componentDidAppear();\n    }\n\n    delete this.currentlyTransitioningKeys[key];\n\n    this._finishAbort(key);\n\n    const currentChildMapping = getChildMapping(toChildArray(this.props.children) || []);\n\n    if (!currentChildMapping || !currentChildMapping.hasOwnProperty(key)) {\n      // This was removed before it had fully appeared. Remove it.\n      this.performLeave(key);\n    }\n  }\n\n  performEnter(key) {\n    this.currentlyTransitioningKeys[key] = true;\n    const component = this.refs[key];\n\n    if (component.componentWillEnter) {\n      component.componentWillEnter(this._handleDoneEntering.bind(this, key));\n    } else {\n      this._handleDoneEntering(key);\n    }\n  }\n\n  _handleDoneEntering(key) {\n    const component = this.refs[key];\n\n    if (component.componentDidEnter) {\n      component.componentDidEnter();\n    }\n\n    delete this.currentlyTransitioningKeys[key];\n\n    this._finishAbort(key);\n\n    const currentChildMapping = getChildMapping(toChildArray(this.props.children) || []);\n\n    if (!currentChildMapping || !currentChildMapping.hasOwnProperty(key)) {\n      // This was removed before it had fully entered. Remove it.\n      this.performLeave(key);\n    }\n  }\n\n  performLeave(key) {\n    // If we should immediately abort this leave function,\n    // don't run the leave transition at all.\n    const idx = this.keysToAbortLeave.indexOf(key);\n\n    if (idx !== -1) {\n      return;\n    }\n\n    this.currentlyTransitioningKeys[key] = true;\n    const component = this.refs[key];\n\n    if (component.componentWillLeave) {\n      component.componentWillLeave(this._handleDoneLeaving.bind(this, key));\n    } else {\n      // Note that this is somewhat dangerous b/c it calls setState()\n      // again, effectively mutating the component before all the work\n      // is done.\n      this._handleDoneLeaving(key);\n    }\n  }\n\n  _handleDoneLeaving(key) {\n    // If we should immediately abort the leave,\n    // then skip this altogether\n    const idx = this.keysToAbortLeave.indexOf(key);\n\n    if (idx !== -1) {\n      return;\n    }\n\n    const component = this.refs[key];\n\n    if (component.componentDidLeave) {\n      component.componentDidLeave();\n    }\n\n    delete this.currentlyTransitioningKeys[key];\n    const currentChildMapping = getChildMapping(toChildArray(this.props.children) || []);\n\n    if (currentChildMapping && currentChildMapping.hasOwnProperty(key)) {\n      // This entered again before it fully left. Add it again.\n      this.performEnter(key);\n    } else {\n      const children = assign({}, this.state.children);\n      delete children[key];\n      this.setState({\n        children\n      });\n    }\n  }\n\n  render(_ref, _ref2) {\n    let {\n      childFactory,\n      transitionLeave,\n      transitionName,\n      transitionAppear,\n      transitionEnter,\n      transitionLeaveTimeout,\n      transitionEnterTimeout,\n      transitionAppearTimeout,\n      component,\n      ...props\n    } = _ref;\n    let {\n      children\n    } = _ref2;\n    // TODO: we could get rid of the need for the wrapper node\n    // by cloning a single child\n    const childrenToRender = [];\n\n    for (const key in children) {\n      if (children.hasOwnProperty(key)) {\n        const child = children[key];\n\n        if (child) {\n          const ref = linkRef(this, key),\n                el = cloneElement(childFactory(child), {\n            ref,\n            key\n          });\n          childrenToRender.push(el);\n        }\n      }\n    }\n\n    return h(component, props, childrenToRender);\n  }\n\n}\n\nTransitionGroup.defaultProps = {\n  component: 'span',\n  childFactory: identity\n};\nmodule.exports = TransitionGroup;", "\"use strict\";\n\nvar _class, _temp;\n\n/* eslint-disable jsx-a11y/no-noninteractive-element-interactions  */\n\n/* eslint-disable jsx-a11y/click-events-have-key-events */\nconst {\n  h\n} = require('preact');\n\nconst {\n  UIPlugin\n} = require('@uppy/core');\n\nconst FadeIn = require('./FadeIn');\n\nconst TransitionGroup = require('./TransitionGroup');\n/**\n * Informer\n * Shows rad message bubbles\n * used like this: `uppy.info('hello world', 'info', 5000)`\n * or for errors: `uppy.info('Error uploading img.jpg', 'error', 5000)`\n *\n */\n\n\nmodule.exports = (_temp = _class = class Informer extends UIPlugin {\n  // eslint-disable-next-line global-require\n  constructor(uppy, opts) {\n    super(uppy, opts);\n\n    this.render = state => {\n      return h(\"div\", {\n        className: \"uppy uppy-Informer\"\n      }, h(TransitionGroup, null, state.info.map(info => h(FadeIn, {\n        key: info.message\n      }, h(\"p\", {\n        role: \"alert\"\n      }, info.message, ' ', info.details && h(\"span\", {\n        \"aria-label\": info.details,\n        \"data-microtip-position\": \"top-left\",\n        \"data-microtip-size\": \"medium\",\n        role: \"tooltip\" // eslint-disable-next-line no-alert\n        ,\n        onClick: () => alert(`${info.message} \\n\\n ${info.details}`)\n      }, \"?\"))))));\n    };\n\n    this.type = 'progressindicator';\n    this.id = this.opts.id || 'Informer';\n    this.title = 'Informer'; // set default options\n\n    const defaultOptions = {}; // merge default options with the ones set by user\n\n    this.opts = { ...defaultOptions,\n      ...opts\n    };\n  }\n\n  install() {\n    const {\n      target\n    } = this.opts;\n\n    if (target) {\n      this.mount(target, this);\n    }\n  }\n\n}, _class.VERSION = \"2.0.5\", _temp);", "\"use strict\";\n\nconst DATA_URL_PATTERN = /^data:([^/]+\\/[^,;]+(?:[^,]*?))(;base64)?,([\\s\\S]*)$/;\n\nmodule.exports = function dataURItoBlob(dataURI, opts, toFile) {\n  var _ref, _opts$mimeType;\n\n  // get the base64 data\n  const dataURIData = DATA_URL_PATTERN.exec(dataURI); // user may provide mime type, if not get it from data URI\n\n  const mimeType = (_ref = (_opts$mimeType = opts.mimeType) != null ? _opts$mimeType : dataURIData == null ? void 0 : dataURIData[1]) != null ? _ref : 'plain/text';\n  let data;\n\n  if (dataURIData[2] != null) {\n    const binary = atob(decodeURIComponent(dataURIData[3]));\n    const bytes = new Uint8Array(binary.length);\n\n    for (let i = 0; i < binary.length; i++) {\n      bytes[i] = binary.charCodeAt(i);\n    }\n\n    data = [bytes];\n  } else {\n    data = [decodeURIComponent(dataURIData[3])];\n  } // Convert to a File?\n\n\n  if (toFile) {\n    return new File(data, opts.name || '', {\n      type: mimeType\n    });\n  }\n\n  return new Blob(data, {\n    type: mimeType\n  });\n};", "\"use strict\";\n\n/**\n * Check if a URL string is an object URL from `URL.createObjectURL`.\n *\n * @param {string} url\n * @returns {boolean}\n */\nmodule.exports = function isObjectURL(url) {\n  return url.startsWith('blob:');\n};", "\"use strict\";\n\nmodule.exports = function isPreviewSupported(fileType) {\n  if (!fileType) return false; // list of images that browsers can preview\n\n  return /^[^/]+\\/(jpe?g|gif|png|svg|svg\\+xml|bmp|webp|avif)$/.test(fileType);\n};", "!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?t(exports):\"function\"==typeof define&&define.amd?define(\"exifr\",[\"exports\"],t):t((e=\"undefined\"!=typeof globalThis?globalThis:e||self).exifr={})}(this,(function(e){\"use strict\";function t(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function r(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function\");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});var n=[\"prototype\",\"__proto__\",\"caller\",\"arguments\",\"length\",\"name\"];Object.getOwnPropertyNames(t).forEach((function(r){-1===n.indexOf(r)&&e[r]!==t[r]&&(e[r]=t[r])})),t&&u(e,t)}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function f(e,t,n){return(f=o()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&u(i,n.prototype),i}).apply(null,arguments)}function c(e){var t=\"function\"==typeof Map?new Map:void 0;return(c=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf(\"[native code]\")))return e;var n;if(\"function\"!=typeof e)throw new TypeError(\"Super expression must either be null or a function\");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return f(e,arguments,s(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),u(r,e)})(e)}function h(e){if(void 0===e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return e}function l(e,t){return!t||\"object\"!=typeof t&&\"function\"!=typeof t?h(e):t}function d(e){var t=o();return function(){var n,r=s(e);if(t){var i=s(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return l(this,n)}}function v(e,t,n){return(v=\"undefined\"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=s(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}var p=Object.values||function(e){var t=[];for(var n in e)t.push(e[n]);return t},y=Object.entries||function(e){var t=[];for(var n in e)t.push([n,e[n]]);return t},g=Object.assign||function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.forEach((function(t){for(var n in t)e[n]=t[n]})),e},k=Object.fromEntries||function(e){var t={};return m(e).forEach((function(e){var n=e[0],r=e[1];t[n]=r})),t},m=Array.from||function(e){if(e instanceof P){var t=[];return e.forEach((function(e,n){return t.push([n,e])})),t}return Array.prototype.slice.call(e)};function b(e){return-1!==this.indexOf(e)}Array.prototype.includes||(Array.prototype.includes=b),String.prototype.includes||(String.prototype.includes=b),String.prototype.startsWith||(String.prototype.startsWith=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.substring(t,t+e.length)===e}),String.prototype.endsWith||(String.prototype.endsWith=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length;return this.substring(t-e.length,t)===e});var A=\"undefined\"!=typeof self?self:global,w=A.fetch||function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(n,r){var i=new XMLHttpRequest;if(i.open(\"get\",e,!0),i.responseType=\"arraybuffer\",i.onerror=r,t.headers)for(var a in t.headers)i.setRequestHeader(a,t.headers[a]);i.onload=function(){n({ok:i.status>=200&&i.status<300,status:i.status,arrayBuffer:function(){return Promise.resolve(i.response)}})},i.send(null)}))},O=function(e){var t=[];if(Object.defineProperties(t,{size:{get:function(){return this.length}},has:{value:function(e){return-1!==this.indexOf(e)}},add:{value:function(e){this.has(e)||this.push(e)}},delete:{value:function(e){if(this.has(e)){var t=this.indexOf(e);this.splice(t,1)}}}}),Array.isArray(e))for(var n=0;n<e.length;n++)t.add(e[n]);return t},S=function(e){return new P(e)},P=void 0!==A.Map&&void 0!==A.Map.prototype.keys?A.Map:function(){function e(n){if(t(this,e),this.clear(),n)for(var r=0;r<n.length;r++)this.set(n[r][0],n[r][1])}return r(e,[{key:\"clear\",value:function(){this._map={},this._keys=[]}},{key:\"size\",get:function(){return this._keys.length}},{key:\"get\",value:function(e){return this._map[\"map_\"+e]}},{key:\"set\",value:function(e,t){return this._map[\"map_\"+e]=t,this._keys.indexOf(e)<0&&this._keys.push(e),this}},{key:\"has\",value:function(e){return this._keys.indexOf(e)>=0}},{key:\"delete\",value:function(e){var t=this._keys.indexOf(e);return!(t<0)&&(delete this._map[\"map_\"+e],this._keys.splice(t,1),!0)}},{key:\"keys\",value:function(){return this._keys.slice(0)}},{key:\"values\",value:function(){var e=this;return this._keys.map((function(t){return e.get(t)}))}},{key:\"entries\",value:function(){var e=this;return this._keys.map((function(t){return[t,e.get(t)]}))}},{key:\"forEach\",value:function(e,t){for(var n=0;n<this._keys.length;n++)e.call(t,this._map[\"map_\"+this._keys[n]],this._keys[n],this)}}]),e}(),U=\"undefined\"!=typeof self?self:global,x=\"undefined\"!=typeof navigator,C=x&&\"undefined\"==typeof HTMLImageElement,B=!(\"undefined\"==typeof global||\"undefined\"==typeof process||!process.versions||!process.versions.node),j=U.Buffer,_=!!j;var V=function(e){return void 0!==e};function I(e){return void 0===e||(e instanceof P?0===e.size:0===p(e).filter(V).length)}function L(e){var t=new Error(e);throw delete t.stack,t}function T(e){var t=function(e){var t=0;return e.ifd0.enabled&&(t+=1024),e.exif.enabled&&(t+=2048),e.makerNote&&(t+=2048),e.userComment&&(t+=1024),e.gps.enabled&&(t+=512),e.interop.enabled&&(t+=100),e.ifd1.enabled&&(t+=1024),t+2048}(e);return e.jfif.enabled&&(t+=50),e.xmp.enabled&&(t+=2e4),e.iptc.enabled&&(t+=14e3),e.icc.enabled&&(t+=6e3),t}var z=function(e){return String.fromCharCode.apply(null,e)},F=\"undefined\"!=typeof TextDecoder?new TextDecoder(\"utf-8\"):void 0;function E(e){return F?F.decode(e):_?Buffer.from(e).toString(\"utf8\"):decodeURIComponent(escape(z(e)))}var D=function(){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0;if(t(this,e),\"boolean\"==typeof a&&(this.le=a),Array.isArray(n)&&(n=new Uint8Array(n)),0===n)this.byteOffset=0,this.byteLength=0;else if(n instanceof ArrayBuffer){void 0===i&&(i=n.byteLength-r);var s=new DataView(n,r,i);this._swapDataView(s)}else if(n instanceof Uint8Array||n instanceof DataView||n instanceof e){void 0===i&&(i=n.byteLength-r),(r+=n.byteOffset)+i>n.byteOffset+n.byteLength&&L(\"Creating view outside of available memory in ArrayBuffer\");var u=new DataView(n.buffer,r,i);this._swapDataView(u)}else if(\"number\"==typeof n){var o=new DataView(new ArrayBuffer(n));this._swapDataView(o)}else L(\"Invalid input argument for BufferView: \"+n)}return r(e,[{key:\"_swapArrayBuffer\",value:function(e){this._swapDataView(new DataView(e))}},{key:\"_swapBuffer\",value:function(e){this._swapDataView(new DataView(e.buffer,e.byteOffset,e.byteLength))}},{key:\"_swapDataView\",value:function(e){this.dataView=e,this.buffer=e.buffer,this.byteOffset=e.byteOffset,this.byteLength=e.byteLength}},{key:\"_lengthToEnd\",value:function(e){return this.byteLength-e}},{key:\"set\",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;t instanceof DataView||t instanceof e?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t instanceof ArrayBuffer&&(t=new Uint8Array(t)),t instanceof Uint8Array||L(\"BufferView.set(): Invalid data argument.\");var i=this.toUint8();return i.set(t,n),new r(this,n,t.byteLength)}},{key:\"subarray\",value:function(t,n){return new e(this,t,n=n||this._lengthToEnd(t))}},{key:\"toUint8\",value:function(){return new Uint8Array(this.buffer,this.byteOffset,this.byteLength)}},{key:\"getUint8Array\",value:function(e,t){return new Uint8Array(this.buffer,this.byteOffset+e,t)}},{key:\"getString\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.byteLength,n=this.getUint8Array(e,t);return E(n)}},{key:\"getLatin1String\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.byteLength,n=this.getUint8Array(e,t);return z(n)}},{key:\"getUnicodeString\",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.byteLength,n=[],r=0;r<t&&e+r<this.byteLength;r+=2)n.push(this.getUint16(e+r));return z(n)}},{key:\"getInt8\",value:function(e){return this.dataView.getInt8(e)}},{key:\"getUint8\",value:function(e){return this.dataView.getUint8(e)}},{key:\"getInt16\",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.le;return this.dataView.getInt16(e,t)}},{key:\"getInt32\",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.le;return this.dataView.getInt32(e,t)}},{key:\"getUint16\",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.le;return this.dataView.getUint16(e,t)}},{key:\"getUint32\",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.le;return this.dataView.getUint32(e,t)}},{key:\"getFloat32\",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.le;return this.dataView.getFloat32(e,t)}},{key:\"getFloat64\",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.le;return this.dataView.getFloat64(e,t)}},{key:\"getFloat\",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.le;return this.dataView.getFloat32(e,t)}},{key:\"getDouble\",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.le;return this.dataView.getFloat64(e,t)}},{key:\"getUintBytes\",value:function(e,t,n){switch(t){case 1:return this.getUint8(e,n);case 2:return this.getUint16(e,n);case 4:return this.getUint32(e,n);case 8:return this.getUint64&&this.getUint64(e,n)}}},{key:\"getUint\",value:function(e,t,n){switch(t){case 8:return this.getUint8(e,n);case 16:return this.getUint16(e,n);case 32:return this.getUint32(e,n);case 64:return this.getUint64&&this.getUint64(e,n)}}},{key:\"toString\",value:function(e){return this.dataView.toString(e,this.constructor.name)}},{key:\"ensureChunk\",value:function(){}}],[{key:\"from\",value:function(t,n){return t instanceof this&&t.le===n?t:new e(t,void 0,void 0,n)}}]),e}();function R(e,t){L(\"\".concat(e,\" '\").concat(t,\"' was not loaded, try using full build of exifr.\"))}var N=function(e){a(i,e);var n=d(i);function i(e){var r;return t(this,i),(r=n.call(this)).kind=e,r}return r(i,[{key:\"get\",value:function(e,t){return this.has(e)||R(this.kind,e),t&&(e in t||function(e,t){L(\"Unknown \".concat(e,\" '\").concat(t,\"'.\"))}(this.kind,e),t[e].enabled||R(this.kind,e)),v(s(i.prototype),\"get\",this).call(this,e)}},{key:\"keyList\",value:function(){return m(this.keys())}}]),i}(c(P)),M=new N(\"file parser\"),W=new N(\"segment parser\"),K=new N(\"file reader\");function H(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}function X(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}var Y=H((function(e){return new Promise((function(t,n){var r=new FileReader;r.onloadend=function(){return t(r.result||new ArrayBuffer)},r.onerror=n,r.readAsArrayBuffer(e)}))})),G=H((function(e){return w(e).then((function(e){return e.arrayBuffer()}))})),J=H((function(e,t){return X(t(e),(function(e){return new D(e)}))})),q=H((function(e,t,n){var r=new(K.get(n))(e,t);return X(r.read(),(function(){return r}))})),Q=H((function(e,t,n,r){return K.has(n)?q(e,t,n):r?J(e,r):(L(\"Parser \".concat(n,\" is not loaded\")),X())})),Z=\"Invalid input argument\";function $(e,t){return(n=e).startsWith(\"data:\")||n.length>1e4?q(e,t,\"base64\"):x?Q(e,t,\"url\",G):B?q(e,t,\"fs\"):void L(Z);var n}var ee=function(e){a(i,e);var n=d(i);function i(){return t(this,i),n.apply(this,arguments)}return r(i,[{key:\"tagKeys\",get:function(){return this.allKeys||(this.allKeys=m(this.keys())),this.allKeys}},{key:\"tagValues\",get:function(){return this.allValues||(this.allValues=m(this.values())),this.allValues}}]),i}(c(P));function te(e,t,n){var r=new ee,i=n;Array.isArray(i)||(\"function\"==typeof i.entries&&(i=i.entries()),i=m(i));for(var a=0;a<i.length;a++){var s=i[a],u=s[0],o=s[1];r.set(u,o)}if(Array.isArray(t)){var f=t;Array.isArray(f)||(\"function\"==typeof f.entries&&(f=f.entries()),f=m(f));for(var c=0;c<f.length;c++){var h=f[c];e.set(h,r)}}else e.set(t,r);return r}function ne(e,t,n){var r,i=e.get(t),a=n;Array.isArray(a)||(\"function\"==typeof a.entries&&(a=a.entries()),a=m(a));for(var s=0;s<a.length;s++)r=a[s],i.set(r[0],r[1])}var re=S(),ie=S(),ae=S(),se=37500,ue=37510,oe=33723,fe=34675,ce=34665,he=34853,le=40965,de=[\"chunked\",\"firstChunkSize\",\"firstChunkSizeNode\",\"firstChunkSizeBrowser\",\"chunkSize\",\"chunkLimit\"],ve=[\"jfif\",\"xmp\",\"icc\",\"iptc\",\"ihdr\"],pe=[\"tiff\"].concat(ve),ye=[\"ifd0\",\"ifd1\",\"exif\",\"gps\",\"interop\"],ge=[].concat(pe,ye),ke=[\"makerNote\",\"userComment\"],me=[\"translateKeys\",\"translateValues\",\"reviveValues\",\"multiSegment\"],be=[].concat(me,[\"sanitize\",\"mergeOutput\",\"silentErrors\"]),Ae=function(){function e(){t(this,e)}return r(e,[{key:\"translate\",get:function(){return this.translateKeys||this.translateValues||this.reviveValues}}]),e}(),we=function(e){a(s,e);var n=d(s);function s(e,r,a,u){var o;if(t(this,s),i(h(o=n.call(this)),\"enabled\",!1),i(h(o),\"skip\",O()),i(h(o),\"pick\",O()),i(h(o),\"deps\",O()),i(h(o),\"translateKeys\",!1),i(h(o),\"translateValues\",!1),i(h(o),\"reviveValues\",!1),o.key=e,o.enabled=r,o.parse=o.enabled,o.applyInheritables(u),o.canBeFiltered=ye.includes(e),o.canBeFiltered&&(o.dict=re.get(e)),void 0!==a)if(Array.isArray(a))o.parse=o.enabled=!0,o.canBeFiltered&&a.length>0&&o.translateTagSet(a,o.pick);else if(\"object\"==typeof a){if(o.enabled=!0,o.parse=!1!==a.parse,o.canBeFiltered){var f=a.pick,c=a.skip;f&&f.length>0&&o.translateTagSet(f,o.pick),c&&c.length>0&&o.translateTagSet(c,o.skip)}o.applyInheritables(a)}else!0===a||!1===a?o.parse=o.enabled=a:L(\"Invalid options argument: \".concat(a));return o}return r(s,[{key:\"needed\",get:function(){return this.enabled||this.deps.size>0}},{key:\"applyInheritables\",value:function(e){var t,n,r=me;Array.isArray(r)||(\"function\"==typeof r.entries&&(r=r.entries()),r=m(r));for(var i=0;i<r.length;i++)void 0!==(n=e[t=r[i]])&&(this[t]=n)}},{key:\"translateTagSet\",value:function(e,t){if(this.dict){var n,r,i=this.dict,a=i.tagKeys,s=i.tagValues,u=e;Array.isArray(u)||(\"function\"==typeof u.entries&&(u=u.entries()),u=m(u));for(var o=0;o<u.length;o++)\"string\"==typeof(n=u[o])?(-1===(r=s.indexOf(n))&&(r=a.indexOf(Number(n))),-1!==r&&t.add(Number(a[r]))):t.add(n)}else{var f=e;Array.isArray(f)||(\"function\"==typeof f.entries&&(f=f.entries()),f=m(f));for(var c=0;c<f.length;c++){var h=f[c];t.add(h)}}}},{key:\"finalizeFilters\",value:function(){!this.enabled&&this.deps.size>0?(this.enabled=!0,Ce(this.pick,this.deps)):this.enabled&&this.pick.size>0&&Ce(this.pick,this.deps)}}]),s}(Ae),Oe={jfif:!1,tiff:!0,xmp:!1,icc:!1,iptc:!1,ifd0:!0,ifd1:!1,exif:!0,gps:!0,interop:!1,ihdr:void 0,makerNote:!1,userComment:!1,multiSegment:!1,skip:[],pick:[],translateKeys:!0,translateValues:!0,reviveValues:!0,sanitize:!0,mergeOutput:!0,silentErrors:!0,chunked:!0,firstChunkSize:void 0,firstChunkSizeNode:512,firstChunkSizeBrowser:65536,chunkSize:65536,chunkLimit:5},Se=S(),Pe=function(e){a(i,e);var n=d(i);function i(e){var r;return t(this,i),r=n.call(this),!0===e?r.setupFromTrue():void 0===e?r.setupFromUndefined():Array.isArray(e)?r.setupFromArray(e):\"object\"==typeof e?r.setupFromObject(e):L(\"Invalid options argument \".concat(e)),void 0===r.firstChunkSize&&(r.firstChunkSize=x?r.firstChunkSizeBrowser:r.firstChunkSizeNode),r.mergeOutput&&(r.ifd1.enabled=!1),r.filterNestedSegmentTags(),r.traverseTiffDependencyTree(),r.checkLoadedPlugins(),r}return r(i,[{key:\"setupFromUndefined\",value:function(){var e,t=de;Array.isArray(t)||(\"function\"==typeof t.entries&&(t=t.entries()),t=m(t));for(var n=0;n<t.length;n++)this[e=t[n]]=Oe[e];var r=be;Array.isArray(r)||(\"function\"==typeof r.entries&&(r=r.entries()),r=m(r));for(var i=0;i<r.length;i++)this[e=r[i]]=Oe[e];var a=ke;Array.isArray(a)||(\"function\"==typeof a.entries&&(a=a.entries()),a=m(a));for(var s=0;s<a.length;s++)this[e=a[s]]=Oe[e];var u=ge;Array.isArray(u)||(\"function\"==typeof u.entries&&(u=u.entries()),u=m(u));for(var o=0;o<u.length;o++)this[e=u[o]]=new we(e,Oe[e],void 0,this)}},{key:\"setupFromTrue\",value:function(){var e,t=de;Array.isArray(t)||(\"function\"==typeof t.entries&&(t=t.entries()),t=m(t));for(var n=0;n<t.length;n++)this[e=t[n]]=Oe[e];var r=be;Array.isArray(r)||(\"function\"==typeof r.entries&&(r=r.entries()),r=m(r));for(var i=0;i<r.length;i++)this[e=r[i]]=Oe[e];var a=ke;Array.isArray(a)||(\"function\"==typeof a.entries&&(a=a.entries()),a=m(a));for(var s=0;s<a.length;s++)this[e=a[s]]=!0;var u=ge;Array.isArray(u)||(\"function\"==typeof u.entries&&(u=u.entries()),u=m(u));for(var o=0;o<u.length;o++)this[e=u[o]]=new we(e,!0,void 0,this)}},{key:\"setupFromArray\",value:function(e){var t,n=de;Array.isArray(n)||(\"function\"==typeof n.entries&&(n=n.entries()),n=m(n));for(var r=0;r<n.length;r++)this[t=n[r]]=Oe[t];var i=be;Array.isArray(i)||(\"function\"==typeof i.entries&&(i=i.entries()),i=m(i));for(var a=0;a<i.length;a++)this[t=i[a]]=Oe[t];var s=ke;Array.isArray(s)||(\"function\"==typeof s.entries&&(s=s.entries()),s=m(s));for(var u=0;u<s.length;u++)this[t=s[u]]=Oe[t];var o=ge;Array.isArray(o)||(\"function\"==typeof o.entries&&(o=o.entries()),o=m(o));for(var f=0;f<o.length;f++)this[t=o[f]]=new we(t,!1,void 0,this);this.setupGlobalFilters(e,void 0,ye)}},{key:\"setupFromObject\",value:function(e){var t;ye.ifd0=ye.ifd0||ye.image,ye.ifd1=ye.ifd1||ye.thumbnail,g(this,e);var n=de;Array.isArray(n)||(\"function\"==typeof n.entries&&(n=n.entries()),n=m(n));for(var r=0;r<n.length;r++)this[t=n[r]]=xe(e[t],Oe[t]);var i=be;Array.isArray(i)||(\"function\"==typeof i.entries&&(i=i.entries()),i=m(i));for(var a=0;a<i.length;a++)this[t=i[a]]=xe(e[t],Oe[t]);var s=ke;Array.isArray(s)||(\"function\"==typeof s.entries&&(s=s.entries()),s=m(s));for(var u=0;u<s.length;u++)this[t=s[u]]=xe(e[t],Oe[t]);var o=pe;Array.isArray(o)||(\"function\"==typeof o.entries&&(o=o.entries()),o=m(o));for(var f=0;f<o.length;f++)this[t=o[f]]=new we(t,Oe[t],e[t],this);var c=ye;Array.isArray(c)||(\"function\"==typeof c.entries&&(c=c.entries()),c=m(c));for(var h=0;h<c.length;h++)this[t=c[h]]=new we(t,Oe[t],e[t],this.tiff);this.setupGlobalFilters(e.pick,e.skip,ye,ge),!0===e.tiff?this.batchEnableWithBool(ye,!0):!1===e.tiff?this.batchEnableWithUserValue(ye,e):Array.isArray(e.tiff)?this.setupGlobalFilters(e.tiff,void 0,ye):\"object\"==typeof e.tiff&&this.setupGlobalFilters(e.tiff.pick,e.tiff.skip,ye)}},{key:\"batchEnableWithBool\",value:function(e,t){var n=e;Array.isArray(n)||(\"function\"==typeof n.entries&&(n=n.entries()),n=m(n));for(var r=0;r<n.length;r++){this[n[r]].enabled=t}}},{key:\"batchEnableWithUserValue\",value:function(e,t){var n=e;Array.isArray(n)||(\"function\"==typeof n.entries&&(n=n.entries()),n=m(n));for(var r=0;r<n.length;r++){var i=n[r],a=t[i];this[i].enabled=!1!==a&&void 0!==a}}},{key:\"setupGlobalFilters\",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;if(e&&e.length){var i=r;Array.isArray(i)||(\"function\"==typeof i.entries&&(i=i.entries()),i=m(i));for(var a=0;a<i.length;a++){var s=i[a];this[s].enabled=!1}var u=Ue(e,n),o=u;Array.isArray(o)||(\"function\"==typeof o.entries&&(o=o.entries()),o=m(o));for(var f=0;f<o.length;f++){var c=o[f],h=c[0],l=c[1];Ce(this[h].pick,l),this[h].enabled=!0}}else if(t&&t.length){var d=Ue(t,n),v=d;Array.isArray(v)||(\"function\"==typeof v.entries&&(v=v.entries()),v=m(v));for(var p=0;p<v.length;p++){var y=v[p],g=y[0],k=y[1];Ce(this[g].skip,k)}}}},{key:\"filterNestedSegmentTags\",value:function(){var e=this.ifd0,t=this.exif,n=this.xmp,r=this.iptc,i=this.icc;this.makerNote?t.deps.add(se):t.skip.add(se),this.userComment?t.deps.add(ue):t.skip.add(ue),n.enabled||e.skip.add(700),r.enabled||e.skip.add(oe),i.enabled||e.skip.add(fe)}},{key:\"traverseTiffDependencyTree\",value:function(){var e=this,t=this.ifd0,n=this.exif,r=this.gps;this.interop.needed&&(n.deps.add(le),t.deps.add(le)),n.needed&&t.deps.add(ce),r.needed&&t.deps.add(he),this.tiff.enabled=ye.some((function(t){return!0===e[t].enabled}))||this.makerNote||this.userComment;var i=ye;Array.isArray(i)||(\"function\"==typeof i.entries&&(i=i.entries()),i=m(i));for(var a=0;a<i.length;a++){this[i[a]].finalizeFilters()}}},{key:\"onlyTiff\",get:function(){var e=this;return!ve.map((function(t){return e[t].enabled})).some((function(e){return!0===e}))&&this.tiff.enabled}},{key:\"checkLoadedPlugins\",value:function(){var e=pe;Array.isArray(e)||(\"function\"==typeof e.entries&&(e=e.entries()),e=m(e));for(var t=0;t<e.length;t++){var n=e[t];this[n].enabled&&!W.has(n)&&R(\"segment parser\",n)}}}],[{key:\"useCached\",value:function(e){var t=Se.get(e);return void 0!==t||(t=new this(e),Se.set(e,t)),t}}]),i}(Ae);function Ue(e,t){var n,r,i,a=[],s=t;Array.isArray(s)||(\"function\"==typeof s.entries&&(s=s.entries()),s=m(s));for(var u=0;u<s.length;u++){r=s[u],n=[];var o=re.get(r);Array.isArray(o)||(\"function\"==typeof o.entries&&(o=o.entries()),o=m(o));for(var f=0;f<o.length;f++)i=o[f],(e.includes(i[0])||e.includes(i[1]))&&n.push(i[0]);n.length&&a.push([r,n])}return a}function xe(e,t){return void 0!==e?e:void 0!==t?t:void 0}function Ce(e,t){var n=t;Array.isArray(n)||(\"function\"==typeof n.entries&&(n=n.entries()),n=m(n));for(var r=0;r<n.length;r++){var i=n[r];e.add(i)}}function Be(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function je(){}function _e(e,t){if(!t)return e&&e.then?e.then(je):Promise.resolve()}function Ve(e,t){var n=e();return n&&n.then?n.then(t):t(n)}i(Pe,\"default\",Oe);var Ie=function(){function e(n){t(this,e),i(this,\"parsers\",{}),this.options=Pe.useCached(n)}return r(e,[{key:\"setup\",value:function(){if(!this.fileParser){var e=this.file,t=e.getUint16(0),n=M;Array.isArray(n)||(\"function\"==typeof n.entries&&(n=n.entries()),n=m(n));for(var r=0;r<n.length;r++){var i=n[r],a=i[0],s=i[1];if(s.canHandle(e,t))return this.fileParser=new s(this.options,this.file,this.parsers),e[a]=!0}L(\"Unknown file format\")}}},{key:\"read\",value:function(e){try{var t=this;return Be(function(e,t){return\"string\"==typeof e?$(e,t):x&&!C&&e instanceof HTMLImageElement?$(e.src,t):e instanceof Uint8Array||e instanceof ArrayBuffer||e instanceof DataView?new D(e):x&&e instanceof Blob?Q(e,t,\"blob\",Y):void L(Z)}(e,t.options),(function(e){t.file=e}))}catch(e){return Promise.reject(e)}}},{key:\"parse\",value:function(){try{var e=this;e.setup();var t={},n=[];return Ve((function(){return e.options.silentErrors?Be(e.doParse(t,n).catch((function(e){return n.push(e)})),(function(){n.push.apply(n,e.fileParser.errors)})):_e(e.doParse(t,n))}),(function(){return e.file.close&&e.file.close(),e.options.silentErrors&&n.length>0&&(t.errors=n),I(r=t)?void 0:r;var r}))}catch(e){return Promise.reject(e)}}},{key:\"doParse\",value:function(e,t){try{var n=this;return Be(n.fileParser.parse(),(function(){var r,i=p(n.parsers).map((r=function(t){return Be(t.parse(),(function(n){t.assignToOutput(e,n)}))},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(e){return Promise.reject(e)}}));if(n.options.silentErrors){var a=function(e){return t.push(e)};i=i.map((function(e){return e.catch(a)}))}return _e(Promise.all(i))}))}catch(e){return Promise.reject(e)}}},{key:\"extractThumbnail\",value:function(){try{var e=this;e.setup();var t,n=e.options,r=e.file,i=W.get(\"tiff\",n);return Ve((function(){if(!r.tiff)return function(e){var t=e();if(t&&t.then)return t.then(je)}((function(){if(r.jpeg)return Be(e.fileParser.getOrFindSegment(\"tiff\"),(function(e){t=e}))}));t={start:0,type:\"tiff\"}}),(function(){if(void 0!==t)return Be(e.fileParser.ensureSegmentChunk(t),(function(t){return Be((e.parsers.tiff=new i(t,n,r)).extractThumbnail(),(function(e){return r.close&&r.close(),e}))}))}))}catch(e){return Promise.reject(e)}}}]),e}();var Le,Te=(Le=function(e,t){var n,r,i,a=new Ie(t);return n=a.read(e),r=function(){return a.parse()},i?r?r(n):n:(n&&n.then||(n=Promise.resolve(n)),r?n.then(r):n)},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(Le.apply(this,e))}catch(e){return Promise.reject(e)}}),ze=Object.freeze({__proto__:null,parse:Te,Exifr:Ie,fileParsers:M,segmentParsers:W,fileReaders:K,tagKeys:re,tagValues:ie,tagRevivers:ae,createDictionary:te,extendDictionary:ne,fetchUrlAsArrayBuffer:G,readBlobAsArrayBuffer:Y,chunkedProps:de,otherSegments:ve,segments:pe,tiffBlocks:ye,segmentsAndBlocks:ge,tiffExtractables:ke,inheritables:me,allFormatters:be,Options:Pe});function Fe(){}var Ee=function(){function e(n,r,a){var s=this;t(this,e),i(this,\"errors\",[]),i(this,\"ensureSegmentChunk\",function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(e){var t,n,r,i=e.start,a=e.size||65536;return t=function(){if(s.file.chunked)return function(e){var t=e();if(t&&t.then)return t.then(Fe)}((function(){if(!s.file.available(i,a))return function(e){if(e&&e.then)return e.then(Fe)}(function(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}((function(){return t=s.file.readChunk(i,a),n=function(t){e.chunk=t},r?n?n(t):t:(t&&t.then||(t=Promise.resolve(t)),n?t.then(n):t);var t,n,r}),(function(t){L(\"Couldn't read segment: \".concat(JSON.stringify(e),\". \").concat(t.message))})));e.chunk=s.file.subarray(i,a)}));s.file.byteLength>i+a?e.chunk=s.file.subarray(i,a):void 0===e.size?e.chunk=s.file.subarray(i):L(\"Segment unreachable: \"+JSON.stringify(e))},n=function(){return e.chunk},(r=t())&&r.then?r.then(n):n(r)}))),this.extendOptions&&this.extendOptions(n),this.options=n,this.file=r,this.parsers=a}return r(e,[{key:\"injectSegment\",value:function(e,t){this.options[e].enabled&&this.createParser(e,t)}},{key:\"createParser\",value:function(e,t){var n=new(W.get(e))(t,this.options,this.file);return this.parsers[e]=n}},{key:\"createParsers\",value:function(e){var t=e;Array.isArray(t)||(\"function\"==typeof t.entries&&(t=t.entries()),t=m(t));for(var n=0;n<t.length;n++){var r=t[n],i=r.type,a=r.chunk,s=this.options[i];if(s&&s.enabled){var u=this.parsers[i];u&&u.append||u||this.createParser(i,a)}}}},{key:\"readSegments\",value:function(e){try{var t=e.map(this.ensureSegmentChunk);return function(e,t){if(!t)return e&&e.then?e.then(Fe):Promise.resolve()}(Promise.all(t))}catch(e){return Promise.reject(e)}}}]),e}(),De=function(){function e(n){var r=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2?arguments[2]:void 0;t(this,e),i(this,\"errors\",[]),i(this,\"raw\",S()),i(this,\"handleError\",(function(e){if(!r.options.silentErrors)throw e;r.errors.push(e.message)})),this.chunk=this.normalizeInput(n),this.file=s,this.type=this.constructor.type,this.globalOptions=this.options=a,this.localOptions=a[this.type],this.canTranslate=this.localOptions&&this.localOptions.translate}return r(e,[{key:\"normalizeInput\",value:function(e){return e instanceof D?e:new D(e)}},{key:\"translate\",value:function(){this.canTranslate&&(this.translated=this.translateBlock(this.raw,this.type))}},{key:\"output\",get:function(){return this.translated?this.translated:this.raw?k(this.raw):void 0}},{key:\"translateBlock\",value:function(e,t){var n=ae.get(t),r=ie.get(t),i=re.get(t),a=this.options[t],s=a.reviveValues&&!!n,u=a.translateValues&&!!r,o=a.translateKeys&&!!i,f={},c=e;Array.isArray(c)||(\"function\"==typeof c.entries&&(c=c.entries()),c=m(c));for(var h=0;h<c.length;h++){var l=c[h],d=l[0],v=l[1];s&&n.has(d)?v=n.get(d)(v):u&&r.has(d)&&(v=this.translateValue(v,r.get(d))),o&&i.has(d)&&(d=i.get(d)||d),f[d]=v}return f}},{key:\"translateValue\",value:function(e,t){return t[e]||t.DEFAULT||e}},{key:\"assignToOutput\",value:function(e,t){this.assignObjectToOutput(e,this.constructor.type,t)}},{key:\"assignObjectToOutput\",value:function(e,t,n){if(this.globalOptions.mergeOutput)return g(e,n);e[t]?g(e[t],n):e[t]=n}}],[{key:\"findPosition\",value:function(e,t){var n=e.getUint16(t+2)+2,r=\"function\"==typeof this.headerLength?this.headerLength(e,t,n):this.headerLength,i=t+r,a=n-r;return{offset:t,length:n,headerLength:r,start:i,size:a,end:i+a}}},{key:\"parse\",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new Pe(i({},this.type,t)),r=new this(e,n);return r.parse()}}]),e}();function Re(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}i(De,\"headerLength\",4),i(De,\"type\",void 0),i(De,\"multiSegment\",!1),i(De,\"canHandle\",(function(){return!1}));function Ne(){}function Me(e,t){if(!t)return e&&e.then?e.then(Ne):Promise.resolve()}function We(e){var t=e();if(t&&t.then)return t.then(Ne)}function Ke(e,t){var n=e();return n&&n.then?n.then(t):t(n)}function He(e,t,n){if(!e.s){if(n instanceof Xe){if(!n.s)return void(n.o=He.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(He.bind(null,e,t),He.bind(null,e,2));e.s=t,e.v=n;var r=e.o;r&&r(e)}}var Xe=function(){function e(){}return e.prototype.then=function(t,n){var r=new e,i=this.s;if(i){var a=1&i?t:n;if(a){try{He(r,1,a(this.v))}catch(e){He(r,2,e)}return r}return this}return this.o=function(e){try{var i=e.v;1&e.s?He(r,1,t?t(i):i):n?He(r,1,n(i)):He(r,2,i)}catch(e){He(r,2,e)}},r},e}();function Ye(e){return e instanceof Xe&&1&e.s}function Ge(e,t,n){for(var r;;){var i=e();if(Ye(i)&&(i=i.v),!i)return a;if(i.then){r=0;break}var a=n();if(a&&a.then){if(!Ye(a)){r=1;break}a=a.s}if(t){var s=t();if(s&&s.then&&!Ye(s)){r=2;break}}}var u=new Xe,o=He.bind(null,u,2);return(0===r?i.then(c):1===r?a.then(f):s.then(h)).then(void 0,o),u;function f(r){a=r;do{if(t&&(s=t())&&s.then&&!Ye(s))return void s.then(h).then(void 0,o);if(!(i=e())||Ye(i)&&!i.v)return void He(u,1,a);if(i.then)return void i.then(c).then(void 0,o);Ye(a=n())&&(a=a.v)}while(!a||!a.then);a.then(f).then(void 0,o)}function c(e){e?(a=n())&&a.then?a.then(f).then(void 0,o):f(a):He(u,1,a)}function h(){(i=e())?i.then?i.then(c).then(void 0,o):c(i):He(u,1,a)}}function Je(e){return 192===e||194===e||196===e||219===e||221===e||218===e||254===e}function qe(e){return e>=224&&e<=239}function Qe(e,t,n){var r=W;Array.isArray(r)||(\"function\"==typeof r.entries&&(r=r.entries()),r=m(r));for(var i=0;i<r.length;i++){var a=r[i],s=a[0];if(a[1].canHandle(e,t,n))return s}}var Ze=function(e){a(s,e);var n=d(s);function s(){var e;t(this,s);for(var r=arguments.length,a=new Array(r),u=0;u<r;u++)a[u]=arguments[u];return i(h(e=n.call.apply(n,[this].concat(a))),\"appSegments\",[]),i(h(e),\"jpegSegments\",[]),i(h(e),\"unknownSegments\",[]),e}return r(s,[{key:\"parse\",value:function(){try{var e=this;return Re(e.findAppSegments(),(function(){return Re(e.readSegments(e.appSegments),(function(){e.mergeMultiSegments(),e.createParsers(e.mergedAppSegments||e.appSegments)}))}))}catch(e){return Promise.reject(e)}}},{key:\"setupSegmentFinderArgs\",value:function(e){var t=this;!0===e?(this.findAll=!0,this.wanted=O(W.keyList())):(e=void 0===e?W.keyList().filter((function(e){return t.options[e].enabled})):e.filter((function(e){return t.options[e].enabled&&W.has(e)})),this.findAll=!1,this.remaining=O(e),this.wanted=O(e)),this.unfinishedMultiSegment=!1}},{key:\"findAppSegments\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;try{var n=this;n.setupSegmentFinderArgs(t);var r=n.file,i=n.findAll,a=n.wanted,s=n.remaining;return Ke((function(){if(!i&&n.file.chunked)return i=m(a).some((function(e){var t=W.get(e),r=n.options[e];return t.multiSegment&&r.multiSegment})),We((function(){if(i)return Me(n.file.readWhole())}))}),(function(){var t=!1;if(e=n.findAppSegmentsInRange(e,r.byteLength),!n.options.onlyTiff)return function(){if(r.chunked){var i=!1;return Ge((function(){return!t&&s.size>0&&!i&&(!!r.canReadNextChunk||!!n.unfinishedMultiSegment)}),void 0,(function(){var a=r.nextChunkOffset,s=n.appSegments.some((function(e){return!n.file.available(e.offset||e.start,e.length||e.size)}));return Ke((function(){return e>a&&!s?Re(r.readNextChunk(e),(function(e){i=!e})):Re(r.readNextChunk(a),(function(e){i=!e}))}),(function(){void 0===(e=n.findAppSegmentsInRange(e,r.byteLength))&&(t=!0)}))}))}}()}))}catch(e){return Promise.reject(e)}}},{key:\"findAppSegmentsInRange\",value:function(e,t){t-=2;for(var n,r,i,a,s,u,o=this.file,f=this.findAll,c=this.wanted,h=this.remaining,l=this.options;e<t;e++)if(255===o.getUint8(e))if(qe(n=o.getUint8(e+1))){if(r=o.getUint16(e+2),(i=Qe(o,e,r))&&c.has(i)&&(s=(a=W.get(i)).findPosition(o,e),u=l[i],s.type=i,this.appSegments.push(s),!f&&(a.multiSegment&&u.multiSegment?(this.unfinishedMultiSegment=s.chunkNumber<s.chunkCount,this.unfinishedMultiSegment||h.delete(i)):h.delete(i),0===h.size)))break;l.recordUnknownSegments&&((s=De.findPosition(o,e)).marker=n,this.unknownSegments.push(s)),e+=r+1}else if(Je(n)){if(r=o.getUint16(e+2),218===n&&!1!==l.stopAfterSos)return;l.recordJpegSegments&&this.jpegSegments.push({offset:e,length:r,marker:n}),e+=r+1}return e}},{key:\"mergeMultiSegments\",value:function(){var e=this;if(this.appSegments.some((function(e){return e.multiSegment}))){var t=function(e,t){for(var n,r,i,a=S(),s=0;s<e.length;s++)r=(n=e[s])[t],a.has(r)?i=a.get(r):a.set(r,i=[]),i.push(n);return m(a)}(this.appSegments,\"type\");this.mergedAppSegments=t.map((function(t){var n=t[0],r=t[1],i=W.get(n,e.options);return i.handleMultiSegments?{type:n,chunk:i.handleMultiSegments(r)}:r[0]}))}}},{key:\"getSegment\",value:function(e){return this.appSegments.find((function(t){return t.type===e}))}},{key:\"getOrFindSegment\",value:function(e){try{var t=this,n=t.getSegment(e);return Ke((function(){if(void 0===n)return Re(t.findAppSegments(0,[e]),(function(){n=t.getSegment(e)}))}),(function(){return n}))}catch(e){return Promise.reject(e)}}}],[{key:\"canHandle\",value:function(e,t){return 65496===t}}]),s}(Ee);function $e(){}i(Ze,\"type\",\"jpeg\"),M.set(\"jpeg\",Ze);function et(e,t){if(!t)return e&&e.then?e.then($e):Promise.resolve()}function tt(e,t){var n=e();return n&&n.then?n.then(t):t(n)}var nt=[void 0,1,1,2,4,8,1,1,2,4,8,4,8,4];var rt=function(e){a(i,e);var n=d(i);function i(){return t(this,i),n.apply(this,arguments)}return r(i,[{key:\"parse\",value:function(){try{var e=this;e.parseHeader();var t=e.options;return tt((function(){if(t.ifd0.enabled)return et(e.parseIfd0Block())}),(function(){return tt((function(){if(t.exif.enabled)return et(e.safeParse(\"parseExifBlock\"))}),(function(){return tt((function(){if(t.gps.enabled)return et(e.safeParse(\"parseGpsBlock\"))}),(function(){return tt((function(){if(t.interop.enabled)return et(e.safeParse(\"parseInteropBlock\"))}),(function(){return tt((function(){if(t.ifd1.enabled)return et(e.safeParse(\"parseThumbnailBlock\"))}),(function(){return e.createOutput()}))}))}))}))}))}catch(e){return Promise.reject(e)}}},{key:\"safeParse\",value:function(e){var t=this[e]();return void 0!==t.catch&&(t=t.catch(this.handleError)),t}},{key:\"findIfd0Offset\",value:function(){void 0===this.ifd0Offset&&(this.ifd0Offset=this.chunk.getUint32(4))}},{key:\"findIfd1Offset\",value:function(){if(void 0===this.ifd1Offset){this.findIfd0Offset();var e=this.chunk.getUint16(this.ifd0Offset),t=this.ifd0Offset+2+12*e;this.ifd1Offset=this.chunk.getUint32(t)}}},{key:\"parseBlock\",value:function(e,t){var n=S();return this[t]=n,this.parseTags(e,t,n),n}},{key:\"parseIfd0Block\",value:function(){try{var e=this;if(e.ifd0)return;var t=e.file;return e.findIfd0Offset(),e.ifd0Offset<8&&L(\"Malformed EXIF data\"),!t.chunked&&e.ifd0Offset>t.byteLength&&L(\"IFD0 offset points to outside of file.\\nthis.ifd0Offset: \".concat(e.ifd0Offset,\", file.byteLength: \").concat(t.byteLength)),tt((function(){if(t.tiff)return et(t.ensureChunk(e.ifd0Offset,T(e.options)))}),(function(){var t=e.parseBlock(e.ifd0Offset,\"ifd0\");if(0!==t.size)return e.exifOffset=t.get(ce),e.interopOffset=t.get(le),e.gpsOffset=t.get(he),e.xmp=t.get(700),e.iptc=t.get(oe),e.icc=t.get(fe),e.options.sanitize&&(t.delete(ce),t.delete(le),t.delete(he),t.delete(700),t.delete(oe),t.delete(fe)),t}))}catch(e){return Promise.reject(e)}}},{key:\"parseExifBlock\",value:function(){try{var e=this;if(e.exif)return;return tt((function(){if(!e.ifd0)return et(e.parseIfd0Block())}),(function(){if(void 0!==e.exifOffset)return tt((function(){if(e.file.tiff)return et(e.file.ensureChunk(e.exifOffset,T(e.options)))}),(function(){var t=e.parseBlock(e.exifOffset,\"exif\");return e.interopOffset||(e.interopOffset=t.get(le)),e.makerNote=t.get(se),e.userComment=t.get(ue),e.options.sanitize&&(t.delete(le),t.delete(se),t.delete(ue)),e.unpack(t,41728),e.unpack(t,41729),t}))}))}catch(e){return Promise.reject(e)}}},{key:\"unpack\",value:function(e,t){var n=e.get(t);n&&1===n.length&&e.set(t,n[0])}},{key:\"parseGpsBlock\",value:function(){try{var e=this;if(e.gps)return;return tt((function(){if(!e.ifd0)return et(e.parseIfd0Block())}),(function(){if(void 0!==e.gpsOffset){var t=e.parseBlock(e.gpsOffset,\"gps\");return t&&t.has(2)&&t.has(4)&&(t.set(\"latitude\",it.apply(void 0,t.get(2).concat([t.get(1)]))),t.set(\"longitude\",it.apply(void 0,t.get(4).concat([t.get(3)])))),t}}))}catch(e){return Promise.reject(e)}}},{key:\"parseInteropBlock\",value:function(){try{var e=this;if(e.interop)return;return tt((function(){if(!e.ifd0)return et(e.parseIfd0Block())}),(function(){return tt((function(){if(void 0===e.interopOffset&&!e.exif)return et(e.parseExifBlock())}),(function(){if(void 0!==e.interopOffset)return e.parseBlock(e.interopOffset,\"interop\")}))}))}catch(e){return Promise.reject(e)}}},{key:\"parseThumbnailBlock\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];try{var t=this;if(t.ifd1||t.ifd1Parsed)return;if(t.options.mergeOutput&&!e)return;return t.findIfd1Offset(),t.ifd1Offset>0&&(t.parseBlock(t.ifd1Offset,\"ifd1\"),t.ifd1Parsed=!0),t.ifd1}catch(e){return Promise.reject(e)}}},{key:\"extractThumbnail\",value:function(){try{var e=this;return e.headerParsed||e.parseHeader(),tt((function(){if(!e.ifd1Parsed)return et(e.parseThumbnailBlock(!0))}),(function(){if(void 0!==e.ifd1){var t=e.ifd1.get(513),n=e.ifd1.get(514);return e.chunk.getUint8Array(t,n)}}))}catch(e){return Promise.reject(e)}}},{key:\"image\",get:function(){return this.ifd0}},{key:\"thumbnail\",get:function(){return this.ifd1}},{key:\"createOutput\",value:function(){var e,t,n,r={},i=ye;Array.isArray(i)||(\"function\"==typeof i.entries&&(i=i.entries()),i=m(i));for(var a=0;a<i.length;a++)if(!I(e=this[t=i[a]]))if(n=this.canTranslate?this.translateBlock(e,t):k(e),this.options.mergeOutput){if(\"ifd1\"===t)continue;g(r,n)}else r[t]=n;return this.makerNote&&(r.makerNote=this.makerNote),this.userComment&&(r.userComment=this.userComment),r}},{key:\"assignToOutput\",value:function(e,t){if(this.globalOptions.mergeOutput)g(e,t);else{var n=y(t);Array.isArray(n)||(\"function\"==typeof n.entries&&(n=n.entries()),n=m(n));for(var r=0;r<n.length;r++){var i=n[r],a=i[0],s=i[1];this.assignObjectToOutput(e,a,s)}}}}],[{key:\"canHandle\",value:function(e,t){return 225===e.getUint8(t+1)&&1165519206===e.getUint32(t+4)&&0===e.getUint16(t+8)}}]),i}(function(e){a(i,e);var n=d(i);function i(){return t(this,i),n.apply(this,arguments)}return r(i,[{key:\"parseHeader\",value:function(){var e=this.chunk.getUint16();18761===e?this.le=!0:19789===e&&(this.le=!1),this.chunk.le=this.le,this.headerParsed=!0}},{key:\"parseTags\",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:S(),r=this.options[t],i=r.pick,a=r.skip,s=(i=O(i)).size>0,u=0===a.size,o=this.chunk.getUint16(e);e+=2;for(var f=0;f<o;f++){var c=this.chunk.getUint16(e);if(s){if(i.has(c)&&(n.set(c,this.parseTag(e,c,t)),i.delete(c),0===i.size))break}else!u&&a.has(c)||n.set(c,this.parseTag(e,c,t));e+=12}return n}},{key:\"parseTag\",value:function(e,t,n){var r,i=this.chunk,a=i.getUint16(e+2),s=i.getUint32(e+4),u=nt[a];if(u*s<=4?e+=8:e=i.getUint32(e+8),(a<1||a>13)&&L(\"Invalid TIFF value type. block: \".concat(n.toUpperCase(),\", tag: \").concat(t.toString(16),\", type: \").concat(a,\", offset \").concat(e)),e>i.byteLength&&L(\"Invalid TIFF value offset. block: \".concat(n.toUpperCase(),\", tag: \").concat(t.toString(16),\", type: \").concat(a,\", offset \").concat(e,\" is outside of chunk size \").concat(i.byteLength)),1===a)return i.getUint8Array(e,s);if(2===a)return\"\"===(r=function(e){for(;e.endsWith(\"\\0\");)e=e.slice(0,-1);return e}(r=i.getString(e,s)).trim())?void 0:r;if(7===a)return i.getUint8Array(e,s);if(1===s)return this.parseTagValue(a,e);for(var o=new(function(e){switch(e){case 1:return Uint8Array;case 3:return Uint16Array;case 4:return Uint32Array;case 5:return Array;case 6:return Int8Array;case 8:return Int16Array;case 9:return Int32Array;case 10:return Array;case 11:return Float32Array;case 12:return Float64Array;default:return Array}}(a))(s),f=u,c=0;c<s;c++)o[c]=this.parseTagValue(a,e),e+=f;return o}},{key:\"parseTagValue\",value:function(e,t){var n=this.chunk;switch(e){case 1:return n.getUint8(t);case 3:return n.getUint16(t);case 4:return n.getUint32(t);case 5:return n.getUint32(t)/n.getUint32(t+4);case 6:return n.getInt8(t);case 8:return n.getInt16(t);case 9:return n.getInt32(t);case 10:return n.getInt32(t)/n.getInt32(t+4);case 11:return n.getFloat(t);case 12:return n.getDouble(t);case 13:return n.getUint32(t);default:L(\"Invalid tiff type \".concat(e))}}}]),i}(De));function it(e,t,n,r){var i=e+t/60+n/3600;return\"S\"!==r&&\"W\"!==r||(i*=-1),i}i(rt,\"type\",\"tiff\"),i(rt,\"headerLength\",10),W.set(\"tiff\",rt);var at=Object.freeze({__proto__:null,default:ze,Exifr:Ie,fileParsers:M,segmentParsers:W,fileReaders:K,tagKeys:re,tagValues:ie,tagRevivers:ae,createDictionary:te,extendDictionary:ne,fetchUrlAsArrayBuffer:G,readBlobAsArrayBuffer:Y,chunkedProps:de,otherSegments:ve,segments:pe,tiffBlocks:ye,segmentsAndBlocks:ge,tiffExtractables:ke,inheritables:me,allFormatters:be,Options:Pe,parse:Te});function st(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function ut(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}var ot=ut((function(e){var t=new Ie(vt);return st(t.read(e),(function(){return st(t.parse(),(function(e){if(e&&e.ifd0)return e.ifd0[274]}))}))})),ft=ut((function(e){var t=new Ie(dt);return st(t.read(e),(function(){return st(t.parse(),(function(e){if(e&&e.gps){var t=e.gps;return{latitude:t.latitude,longitude:t.longitude}}}))}))})),ct=ut((function(e){return st(this.thumbnail(e),(function(e){if(void 0!==e){var t=new Blob([e]);return URL.createObjectURL(t)}}))})),ht=ut((function(e){var t=new Ie(pt);return st(t.read(e),(function(){return st(t.extractThumbnail(),(function(e){return e&&_?j.from(e):e}))}))})),lt={ifd0:!1,ifd1:!1,exif:!1,gps:!1,interop:!1,sanitize:!1,reviveValues:!0,translateKeys:!1,translateValues:!1,mergeOutput:!1},dt=g({},lt,{firstChunkSize:4e4,gps:[1,2,3,4]}),vt=g({},lt,{firstChunkSize:4e4,ifd0:[274]}),pt=g({},lt,{tiff:!1,ifd1:!0,mergeOutput:!1}),yt=Object.freeze({1:{dimensionSwapped:!1,scaleX:1,scaleY:1,deg:0,rad:0},2:{dimensionSwapped:!1,scaleX:-1,scaleY:1,deg:0,rad:0},3:{dimensionSwapped:!1,scaleX:1,scaleY:1,deg:180,rad:180*Math.PI/180},4:{dimensionSwapped:!1,scaleX:-1,scaleY:1,deg:180,rad:180*Math.PI/180},5:{dimensionSwapped:!0,scaleX:1,scaleY:-1,deg:90,rad:90*Math.PI/180},6:{dimensionSwapped:!0,scaleX:1,scaleY:1,deg:90,rad:90*Math.PI/180},7:{dimensionSwapped:!0,scaleX:1,scaleY:-1,deg:270,rad:270*Math.PI/180},8:{dimensionSwapped:!0,scaleX:1,scaleY:1,deg:270,rad:270*Math.PI/180}});if(e.rotateCanvas=!0,e.rotateCss=!0,\"object\"==typeof navigator){var gt=navigator.userAgent;if(gt.includes(\"iPad\")||gt.includes(\"iPhone\")){var kt=gt.match(/OS (\\d+)_(\\d+)/);if(kt){var mt=kt[1],bt=kt[2],At=Number(mt)+.1*Number(bt);e.rotateCanvas=At<13.4,e.rotateCss=!1}}else if(gt.includes(\"OS X 10\")){var wt=gt.match(/OS X 10[_.](\\d+)/)[1];e.rotateCanvas=e.rotateCss=Number(wt)<15}if(gt.includes(\"Chrome/\")){var Ot=gt.match(/Chrome\\/(\\d+)/)[1];e.rotateCanvas=e.rotateCss=Number(Ot)<81}else if(gt.includes(\"Firefox/\")){var St=gt.match(/Firefox\\/(\\d+)/)[1];e.rotateCanvas=e.rotateCss=Number(St)<77}}function Pt(){}var Ut=function(e){a(u,e);var n=d(u);function u(){var e;t(this,u);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i(h(e=n.call.apply(n,[this].concat(a))),\"ranges\",new xt),0!==e.byteLength&&e.ranges.add(0,e.byteLength),e}return r(u,[{key:\"_tryExtend\",value:function(e,t,n){if(0===e&&0===this.byteLength&&n){var r=new DataView(n.buffer||n,n.byteOffset,n.byteLength);this._swapDataView(r)}else{var i=e+t;if(i>this.byteLength){var a=this._extend(i).dataView;this._swapDataView(a)}}}},{key:\"_extend\",value:function(e){var t;t=_?j.allocUnsafe(e):new Uint8Array(e);var n=new DataView(t.buffer,t.byteOffset,t.byteLength);return t.set(new Uint8Array(this.buffer,this.byteOffset,this.byteLength),0),{uintView:t,dataView:n}}},{key:\"subarray\",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return t=t||this._lengthToEnd(e),n&&this._tryExtend(e,t),this.ranges.add(e,t),v(s(u.prototype),\"subarray\",this).call(this,e,t)}},{key:\"set\",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];n&&this._tryExtend(t,e.byteLength,e);var r=v(s(u.prototype),\"set\",this).call(this,e,t);return this.ranges.add(t,r.byteLength),r}},{key:\"ensureChunk\",value:function(e,t){try{var n=this;if(!n.chunked)return;if(n.ranges.available(e,t))return;return function(e,t){if(!t)return e&&e.then?e.then(Pt):Promise.resolve()}(n.readChunk(e,t))}catch(e){return Promise.reject(e)}}},{key:\"available\",value:function(e,t){return this.ranges.available(e,t)}}]),u}(D),xt=function(){function e(){t(this,e),i(this,\"list\",[])}return r(e,[{key:\"length\",get:function(){return this.list.length}},{key:\"add\",value:function(e,t){var n=e+t,r=this.list.filter((function(t){return Ct(e,t.offset,n)||Ct(e,t.end,n)}));if(r.length>0){e=Math.min.apply(Math,[e].concat(r.map((function(e){return e.offset})))),t=(n=Math.max.apply(Math,[n].concat(r.map((function(e){return e.end})))))-e;var i=r.shift();i.offset=e,i.length=t,i.end=n,this.list=this.list.filter((function(e){return!r.includes(e)}))}else this.list.push({offset:e,length:t,end:n})}},{key:\"available\",value:function(e,t){var n=e+t;return this.list.some((function(t){return t.offset<=e&&n<=t.end}))}}]),e}();function Ct(e,t,n){return e<=t&&t<=n}function Bt(){}function jt(e,t){if(!t)return e&&e.then?e.then(Bt):Promise.resolve()}function _t(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}var Vt=function(e){a(i,e);var n=d(i);function i(){return t(this,i),n.apply(this,arguments)}return r(i,[{key:\"readWhole\",value:function(){try{var e=this;return e.chunked=!1,_t(Y(e.input),(function(t){e._swapArrayBuffer(t)}))}catch(e){return Promise.reject(e)}}},{key:\"readChunked\",value:function(){return this.chunked=!0,this.size=this.input.size,v(s(i.prototype),\"readChunked\",this).call(this)}},{key:\"_readChunk\",value:function(e,t){try{var n=this,r=t?e+t:void 0,i=n.input.slice(e,r);return _t(Y(i),(function(t){return n.set(t,e,!0)}))}catch(e){return Promise.reject(e)}}}]),i}(function(e){a(s,e);var n=d(s);function s(e,r){var a;return t(this,s),i(h(a=n.call(this,0)),\"chunksRead\",0),a.input=e,a.options=r,a}return r(s,[{key:\"readWhole\",value:function(){try{var e=this;return e.chunked=!1,jt(e.readChunk(e.nextChunkOffset))}catch(e){return Promise.reject(e)}}},{key:\"readChunked\",value:function(){try{var e=this;return e.chunked=!0,jt(e.readChunk(0,e.options.firstChunkSize))}catch(e){return Promise.reject(e)}}},{key:\"readNextChunk\",value:function(e){try{var t=this;if(void 0===e&&(e=t.nextChunkOffset),t.fullyRead)return t.chunksRead++,!1;var n=t.options.chunkSize;return r=t.readChunk(e,n),i=function(e){return!!e&&e.byteLength===n},a?i?i(r):r:(r&&r.then||(r=Promise.resolve(r)),i?r.then(i):r)}catch(e){return Promise.reject(e)}var r,i,a}},{key:\"readChunk\",value:function(e,t){try{var n=this;if(n.chunksRead++,0===(t=n.safeWrapAddress(e,t)))return;return n._readChunk(e,t)}catch(e){return Promise.reject(e)}}},{key:\"safeWrapAddress\",value:function(e,t){return void 0!==this.size&&e+t>this.size?Math.max(0,this.size-e):t}},{key:\"nextChunkOffset\",get:function(){if(0!==this.ranges.list.length)return this.ranges.list[0].length}},{key:\"canReadNextChunk\",get:function(){return this.chunksRead<this.options.chunkLimit}},{key:\"fullyRead\",get:function(){return void 0!==this.size&&this.nextChunkOffset===this.size}},{key:\"read\",value:function(){return this.options.chunked?this.readChunked():this.readWhole()}},{key:\"close\",value:function(){}}]),s}(Ut));K.set(\"blob\",Vt),e.Exifr=Ie,e.Options=Pe,e.allFormatters=be,e.chunkedProps=de,e.createDictionary=te,e.default=at,e.disableAllOptions=lt,e.extendDictionary=ne,e.fetchUrlAsArrayBuffer=G,e.fileParsers=M,e.fileReaders=K,e.gps=ft,e.gpsOnlyOptions=dt,e.inheritables=me,e.orientation=ot,e.orientationOnlyOptions=vt,e.otherSegments=ve,e.parse=Te,e.readBlobAsArrayBuffer=Y,e.rotation=function(t){return st(ot(t),(function(t){return g({canvas:e.rotateCanvas,css:e.rotateCss},yt[t])}))},e.rotations=yt,e.segmentParsers=W,e.segments=pe,e.segmentsAndBlocks=ge,e.tagKeys=re,e.tagRevivers=ae,e.tagValues=ie,e.thumbnail=ht,e.thumbnailOnlyOptions=pt,e.thumbnailUrl=ct,e.tiffBlocks=ye,e.tiffExtractables=ke,Object.defineProperty(e,\"__esModule\",{value:!0})}));\n", "\"use strict\";\n\nmodule.exports = {\n  strings: {\n    generatingThumbnails: 'Generating thumbnails...'\n  }\n};", "\"use strict\";\n\nvar _class, _temp;\n\nconst {\n  UIPlugin\n} = require('@uppy/core');\n\nconst dataURItoBlob = require('@uppy/utils/lib/dataURItoBlob');\n\nconst isObjectURL = require('@uppy/utils/lib/isObjectURL');\n\nconst isPreviewSupported = require('@uppy/utils/lib/isPreviewSupported');\n\nconst exifr = require('exifr/dist/mini.legacy.umd.js');\n\nconst locale = require('./locale');\n/**\n * The Thumbnail Generator plugin\n */\n\n\nmodule.exports = (_temp = _class = class ThumbnailGenerator extends UIPlugin {\n  constructor(uppy, opts) {\n    super(uppy, opts);\n\n    this.onFileAdded = file => {\n      if (!file.preview && file.data && isPreviewSupported(file.type) && !file.isRemote) {\n        this.addToQueue(file.id);\n      }\n    };\n\n    this.onCancelRequest = file => {\n      const index = this.queue.indexOf(file.id);\n\n      if (index !== -1) {\n        this.queue.splice(index, 1);\n      }\n    };\n\n    this.onFileRemoved = file => {\n      const index = this.queue.indexOf(file.id);\n\n      if (index !== -1) {\n        this.queue.splice(index, 1);\n      } // Clean up object URLs.\n\n\n      if (file.preview && isObjectURL(file.preview)) {\n        URL.revokeObjectURL(file.preview);\n      }\n    };\n\n    this.onRestored = () => {\n      const restoredFiles = this.uppy.getFiles().filter(file => file.isRestored);\n      restoredFiles.forEach(file => {\n        // Only add blob URLs; they are likely invalid after being restored.\n        if (!file.preview || isObjectURL(file.preview)) {\n          this.addToQueue(file.id);\n        }\n      });\n    };\n\n    this.waitUntilAllProcessed = fileIDs => {\n      fileIDs.forEach(fileID => {\n        const file = this.uppy.getFile(fileID);\n        this.uppy.emit('preprocess-progress', file, {\n          mode: 'indeterminate',\n          message: this.i18n('generatingThumbnails')\n        });\n      });\n\n      const emitPreprocessCompleteForAll = () => {\n        fileIDs.forEach(fileID => {\n          const file = this.uppy.getFile(fileID);\n          this.uppy.emit('preprocess-complete', file);\n        });\n      };\n\n      return new Promise(resolve => {\n        if (this.queueProcessing) {\n          this.uppy.once('thumbnail:all-generated', () => {\n            emitPreprocessCompleteForAll();\n            resolve();\n          });\n        } else {\n          emitPreprocessCompleteForAll();\n          resolve();\n        }\n      });\n    };\n\n    this.type = 'modifier';\n    this.id = this.opts.id || 'ThumbnailGenerator';\n    this.title = 'Thumbnail Generator';\n    this.queue = [];\n    this.queueProcessing = false;\n    this.defaultThumbnailDimension = 200;\n    this.thumbnailType = this.opts.thumbnailType || 'image/jpeg';\n    this.defaultLocale = locale;\n    const defaultOptions = {\n      thumbnailWidth: null,\n      thumbnailHeight: null,\n      waitForThumbnailsBeforeUpload: false,\n      lazy: false\n    };\n    this.opts = { ...defaultOptions,\n      ...opts\n    };\n    this.i18nInit();\n\n    if (this.opts.lazy && this.opts.waitForThumbnailsBeforeUpload) {\n      throw new Error('ThumbnailGenerator: The `lazy` and `waitForThumbnailsBeforeUpload` options are mutually exclusive. Please ensure at most one of them is set to `true`.');\n    }\n  }\n  /**\n   * Create a thumbnail for the given Uppy file object.\n   *\n   * @param {{data: Blob}} file\n   * @param {number} targetWidth\n   * @param {number} targetHeight\n   * @returns {Promise}\n   */\n\n\n  createThumbnail(file, targetWidth, targetHeight) {\n    const originalUrl = URL.createObjectURL(file.data);\n    const onload = new Promise((resolve, reject) => {\n      const image = new Image();\n      image.src = originalUrl;\n      image.addEventListener('load', () => {\n        URL.revokeObjectURL(originalUrl);\n        resolve(image);\n      });\n      image.addEventListener('error', event => {\n        URL.revokeObjectURL(originalUrl);\n        reject(event.error || new Error('Could not create thumbnail'));\n      });\n    });\n    const orientationPromise = exifr.rotation(file.data).catch(() => 1);\n    return Promise.all([onload, orientationPromise]).then(_ref => {\n      let [image, orientation] = _ref;\n      const dimensions = this.getProportionalDimensions(image, targetWidth, targetHeight, orientation.deg);\n      const rotatedImage = this.rotateImage(image, orientation);\n      const resizedImage = this.resizeImage(rotatedImage, dimensions.width, dimensions.height);\n      return this.canvasToBlob(resizedImage, this.thumbnailType, 80);\n    }).then(blob => {\n      return URL.createObjectURL(blob);\n    });\n  }\n  /**\n   * Get the new calculated dimensions for the given image and a target width\n   * or height. If both width and height are given, only width is taken into\n   * account. If neither width nor height are given, the default dimension\n   * is used.\n   */\n\n\n  getProportionalDimensions(img, width, height, rotation) {\n    let aspect = img.width / img.height;\n\n    if (rotation === 90 || rotation === 270) {\n      aspect = img.height / img.width;\n    }\n\n    if (width != null) {\n      return {\n        width,\n        height: Math.round(width / aspect)\n      };\n    }\n\n    if (height != null) {\n      return {\n        width: Math.round(height * aspect),\n        height\n      };\n    }\n\n    return {\n      width: this.defaultThumbnailDimension,\n      height: Math.round(this.defaultThumbnailDimension / aspect)\n    };\n  }\n  /**\n   * Make sure the image doesn\u2019t exceed browser/device canvas limits.\n   * For ios with 256 RAM and ie\n   */\n\n\n  protect(image) {\n    // https://stackoverflow.com/questions/6081483/maximum-size-of-a-canvas-element\n    const ratio = image.width / image.height;\n    const maxSquare = 5000000; // ios max canvas square\n\n    const maxSize = 4096; // ie max canvas dimensions\n\n    let maxW = Math.floor(Math.sqrt(maxSquare * ratio));\n    let maxH = Math.floor(maxSquare / Math.sqrt(maxSquare * ratio));\n\n    if (maxW > maxSize) {\n      maxW = maxSize;\n      maxH = Math.round(maxW / ratio);\n    }\n\n    if (maxH > maxSize) {\n      maxH = maxSize;\n      maxW = Math.round(ratio * maxH);\n    }\n\n    if (image.width > maxW) {\n      const canvas = document.createElement('canvas');\n      canvas.width = maxW;\n      canvas.height = maxH;\n      canvas.getContext('2d').drawImage(image, 0, 0, maxW, maxH);\n      image = canvas;\n    }\n\n    return image;\n  }\n  /**\n   * Resize an image to the target `width` and `height`.\n   *\n   * Returns a Canvas with the resized image on it.\n   */\n\n\n  resizeImage(image, targetWidth, targetHeight) {\n    // Resizing in steps refactored to use a solution from\n    // https://blog.uploadcare.com/image-resize-in-browsers-is-broken-e38eed08df01\n    image = this.protect(image);\n    let steps = Math.ceil(Math.log2(image.width / targetWidth));\n\n    if (steps < 1) {\n      steps = 1;\n    }\n\n    let sW = targetWidth * 2 ** (steps - 1);\n    let sH = targetHeight * 2 ** (steps - 1);\n    const x = 2;\n\n    while (steps--) {\n      const canvas = document.createElement('canvas');\n      canvas.width = sW;\n      canvas.height = sH;\n      canvas.getContext('2d').drawImage(image, 0, 0, sW, sH);\n      image = canvas;\n      sW = Math.round(sW / x);\n      sH = Math.round(sH / x);\n    }\n\n    return image;\n  }\n\n  rotateImage(image, translate) {\n    let w = image.width;\n    let h = image.height;\n\n    if (translate.deg === 90 || translate.deg === 270) {\n      w = image.height;\n      h = image.width;\n    }\n\n    const canvas = document.createElement('canvas');\n    canvas.width = w;\n    canvas.height = h;\n    const context = canvas.getContext('2d');\n    context.translate(w / 2, h / 2);\n\n    if (translate.canvas) {\n      context.rotate(translate.rad);\n      context.scale(translate.scaleX, translate.scaleY);\n    }\n\n    context.drawImage(image, -image.width / 2, -image.height / 2, image.width, image.height);\n    return canvas;\n  }\n  /**\n   * Save a <canvas> element's content to a Blob object.\n   *\n   * @param {HTMLCanvasElement} canvas\n   * @returns {Promise}\n   */\n\n\n  canvasToBlob(canvas, type, quality) {\n    try {\n      canvas.getContext('2d').getImageData(0, 0, 1, 1);\n    } catch (err) {\n      if (err.code === 18) {\n        return Promise.reject(new Error('cannot read image, probably an svg with external resources'));\n      }\n    }\n\n    if (canvas.toBlob) {\n      return new Promise(resolve => {\n        canvas.toBlob(resolve, type, quality);\n      }).then(blob => {\n        if (blob === null) {\n          throw new Error('cannot read image, probably an svg with external resources');\n        }\n\n        return blob;\n      });\n    }\n\n    return Promise.resolve().then(() => {\n      return dataURItoBlob(canvas.toDataURL(type, quality), {});\n    }).then(blob => {\n      if (blob === null) {\n        throw new Error('could not extract blob, probably an old browser');\n      }\n\n      return blob;\n    });\n  }\n  /**\n   * Set the preview URL for a file.\n   */\n\n\n  setPreviewURL(fileID, preview) {\n    this.uppy.setFileState(fileID, {\n      preview\n    });\n  }\n\n  addToQueue(item) {\n    this.queue.push(item);\n\n    if (this.queueProcessing === false) {\n      this.processQueue();\n    }\n  }\n\n  processQueue() {\n    this.queueProcessing = true;\n\n    if (this.queue.length > 0) {\n      const current = this.uppy.getFile(this.queue.shift());\n\n      if (!current) {\n        this.uppy.log('[ThumbnailGenerator] file was removed before a thumbnail could be generated, but not removed from the queue. This is probably a bug', 'error');\n        return;\n      }\n\n      return this.requestThumbnail(current).catch(() => {}) // eslint-disable-line node/handle-callback-err\n      .then(() => this.processQueue());\n    }\n\n    this.queueProcessing = false;\n    this.uppy.log('[ThumbnailGenerator] Emptied thumbnail queue');\n    this.uppy.emit('thumbnail:all-generated');\n  }\n\n  requestThumbnail(file) {\n    if (isPreviewSupported(file.type) && !file.isRemote) {\n      return this.createThumbnail(file, this.opts.thumbnailWidth, this.opts.thumbnailHeight).then(preview => {\n        this.setPreviewURL(file.id, preview);\n        this.uppy.log(`[ThumbnailGenerator] Generated thumbnail for ${file.id}`);\n        this.uppy.emit('thumbnail:generated', this.uppy.getFile(file.id), preview);\n      }).catch(err => {\n        this.uppy.log(`[ThumbnailGenerator] Failed thumbnail for ${file.id}:`, 'warning');\n        this.uppy.log(err, 'warning');\n        this.uppy.emit('thumbnail:error', this.uppy.getFile(file.id), err);\n      });\n    }\n\n    return Promise.resolve();\n  }\n\n  install() {\n    this.uppy.on('file-removed', this.onFileRemoved);\n\n    if (this.opts.lazy) {\n      this.uppy.on('thumbnail:request', this.onFileAdded);\n      this.uppy.on('thumbnail:cancel', this.onCancelRequest);\n    } else {\n      this.uppy.on('file-added', this.onFileAdded);\n      this.uppy.on('restored', this.onRestored);\n    }\n\n    if (this.opts.waitForThumbnailsBeforeUpload) {\n      this.uppy.addPreProcessor(this.waitUntilAllProcessed);\n    }\n  }\n\n  uninstall() {\n    this.uppy.off('file-removed', this.onFileRemoved);\n\n    if (this.opts.lazy) {\n      this.uppy.off('thumbnail:request', this.onFileAdded);\n      this.uppy.off('thumbnail:cancel', this.onCancelRequest);\n    } else {\n      this.uppy.off('file-added', this.onFileAdded);\n      this.uppy.off('restored', this.onRestored);\n    }\n\n    if (this.opts.waitForThumbnailsBeforeUpload) {\n      this.uppy.removePreProcessor(this.waitUntilAllProcessed);\n    }\n  }\n\n}, _class.VERSION = \"2.0.6\", _temp);", "\"use strict\";\n\nconst isDOMElement = require('./isDOMElement');\n/**\n * Find one or more DOM elements.\n *\n * @param {string|Node} element\n * @returns {Node[]|null}\n */\n\n\nmodule.exports = function findAllDOMElements(element) {\n  if (typeof element === 'string') {\n    const elements = document.querySelectorAll(element);\n    return elements.length === 0 ? null : Array.from(elements);\n  }\n\n  if (typeof element === 'object' && isDOMElement(element)) {\n    return [element];\n  }\n\n  return null;\n};", "\"use strict\";\n\n/**\n * Converts list into array\n */\nmodule.exports = Array.from;", "\"use strict\";\n\n/**\n * Get the relative path from the FileEntry#fullPath, because File#webkitRelativePath is always '', at least onDrop.\n *\n * @param {FileEntry} fileEntry\n *\n * @returns {string|null} - if file is not in a folder - return null (this is to\n * be consistent with .relativePath-s of files selected from My Device). If file\n * is in a folder - return its fullPath, e.g. '/simpsons/hi.jpeg'.\n */\nmodule.exports = function getRelativePath(fileEntry) {\n  // fileEntry.fullPath - \"/simpsons/hi.jpeg\" or undefined (for browsers that don't support it)\n  // fileEntry.name - \"hi.jpeg\"\n  if (!fileEntry.fullPath || fileEntry.fullPath === `/${fileEntry.name}`) {\n    return null;\n  }\n\n  return fileEntry.fullPath;\n};", "\"use strict\";\n\n/**\n * Recursive function, calls the original callback() when the directory is entirely parsed.\n *\n * @param {FileSystemDirectoryReader} directoryReader\n * @param {Array} oldEntries\n * @param {Function} logDropError\n * @param {Function} callback - called with ([ all files and directories in that directoryReader ])\n */\nmodule.exports = function getFilesAndDirectoriesFromDirectory(directoryReader, oldEntries, logDropError, _ref) {\n  let {\n    onSuccess\n  } = _ref;\n  directoryReader.readEntries(entries => {\n    const newEntries = [...oldEntries, ...entries]; // According to the FileSystem API spec, getFilesAndDirectoriesFromDirectory()\n    // must be called until it calls the onSuccess with an empty array.\n\n    if (entries.length) {\n      setTimeout(() => {\n        getFilesAndDirectoriesFromDirectory(directoryReader, newEntries, logDropError, {\n          onSuccess\n        });\n      }, 0); // Done iterating this particular directory\n    } else {\n      onSuccess(newEntries);\n    }\n  }, // Make sure we resolve on error anyway, it's fine if only one directory couldn't be parsed!\n  error => {\n    logDropError(error);\n    onSuccess(oldEntries);\n  });\n};", "\"use strict\";\n\nconst toArray = require('../../../toArray');\n\nconst getRelativePath = require('./getRelativePath');\n\nconst getFilesAndDirectoriesFromDirectory = require('./getFilesAndDirectoriesFromDirectory');\n\nmodule.exports = function webkitGetAsEntryApi(dataTransfer, logDropError) {\n  const files = [];\n  const rootPromises = [];\n  /**\n   * Returns a resolved promise, when :files array is enhanced\n   *\n   * @param {(FileSystemFileEntry|FileSystemDirectoryEntry)} entry\n   * @returns {Promise} - empty promise that resolves when :files is enhanced with a file\n   */\n\n  const createPromiseToAddFileOrParseDirectory = entry => new Promise(resolve => {\n    // This is a base call\n    if (entry.isFile) {\n      // Creates a new File object which can be used to read the file.\n      entry.file(file => {\n        // eslint-disable-next-line no-param-reassign\n        file.relativePath = getRelativePath(entry);\n        files.push(file);\n        resolve();\n      }, // Make sure we resolve on error anyway, it's fine if only one file couldn't be read!\n      error => {\n        logDropError(error);\n        resolve();\n      }); // This is a recursive call\n    } else if (entry.isDirectory) {\n      const directoryReader = entry.createReader();\n      getFilesAndDirectoriesFromDirectory(directoryReader, [], logDropError, {\n        onSuccess: entries => resolve(Promise.all(entries.map(createPromiseToAddFileOrParseDirectory)))\n      });\n    }\n  }); // For each dropped item, - make sure it's a file/directory, and start deepening in!\n\n\n  toArray(dataTransfer.items).forEach(item => {\n    const entry = item.webkitGetAsEntry(); // :entry can be null when we drop the url e.g.\n\n    if (entry) {\n      rootPromises.push(createPromiseToAddFileOrParseDirectory(entry));\n    }\n  });\n  return Promise.all(rootPromises).then(() => files);\n};", "\"use strict\";\n\nconst toArray = require('../../toArray'); // .files fallback, should be implemented in any browser\n\n\nmodule.exports = function fallbackApi(dataTransfer) {\n  const files = toArray(dataTransfer.files);\n  return Promise.resolve(files);\n};", "\"use strict\";\n\nconst webkitGetAsEntryApi = require('./utils/webkitGetAsEntryApi/index');\n\nconst fallbackApi = require('./utils/fallbackApi');\n/**\n * Returns a promise that resolves to the array of dropped files (if a folder is\n * dropped, and browser supports folder parsing - promise resolves to the flat\n * array of all files in all directories).\n * Each file has .relativePath prop appended to it (e.g. \"/docs/Prague/ticket_from_prague_to_ufa.pdf\")\n * if browser supports it. Otherwise it's undefined.\n *\n * @param {DataTransfer} dataTransfer\n * @param {Function} logDropError - a function that's called every time some\n * folder or some file error out (e.g. because of the folder name being too long\n * on Windows). Notice that resulting promise will always be resolved anyway.\n *\n * @returns {Promise} - Array<File>\n */\n\n\nmodule.exports = function getDroppedFiles(dataTransfer, _temp) {\n  var _dataTransfer$items;\n\n  let {\n    logDropError = () => {}\n  } = _temp === void 0 ? {} : _temp;\n\n  // Get all files from all subdirs. Works (at least) in Chrome, Mozilla, and Safari\n  if ((_dataTransfer$items = dataTransfer.items) != null && _dataTransfer$items[0] && 'webkitGetAsEntry' in dataTransfer.items[0]) {\n    return webkitGetAsEntryApi(dataTransfer, logDropError); // Otherwise just return all first-order files\n  }\n\n  return fallbackApi(dataTransfer);\n};", "\"use strict\";\n\nmodule.exports = ['a[href]:not([tabindex^=\"-\"]):not([inert]):not([aria-hidden])', 'area[href]:not([tabindex^=\"-\"]):not([inert]):not([aria-hidden])', 'input:not([disabled]):not([inert]):not([aria-hidden])', 'select:not([disabled]):not([inert]):not([aria-hidden])', 'textarea:not([disabled]):not([inert]):not([aria-hidden])', 'button:not([disabled]):not([inert]):not([aria-hidden])', 'iframe:not([tabindex^=\"-\"]):not([inert]):not([aria-hidden])', 'object:not([tabindex^=\"-\"]):not([inert]):not([aria-hidden])', 'embed:not([tabindex^=\"-\"]):not([inert]):not([aria-hidden])', '[contenteditable]:not([tabindex^=\"-\"]):not([inert]):not([aria-hidden])', '[tabindex]:not([tabindex^=\"-\"]):not([inert]):not([aria-hidden])'];", "\"use strict\";\n\n/**\n * @returns {HTMLElement} - either dashboard element, or the overlay that's most on top\n */\nmodule.exports = function getActiveOverlayEl(dashboardEl, activeOverlayType) {\n  if (activeOverlayType) {\n    const overlayEl = dashboardEl.querySelector(`[data-uppy-paneltype=\"${activeOverlayType}\"]`); // if an overlay is already mounted\n\n    if (overlayEl) return overlayEl;\n  }\n\n  return dashboardEl;\n};", "\"use strict\";\n\nconst toArray = require('@uppy/utils/lib/toArray');\n\nconst FOCUSABLE_ELEMENTS = require('@uppy/utils/lib/FOCUSABLE_ELEMENTS');\n\nconst getActiveOverlayEl = require('./getActiveOverlayEl');\n\nfunction focusOnFirstNode(event, nodes) {\n  const node = nodes[0];\n\n  if (node) {\n    node.focus();\n    event.preventDefault();\n  }\n}\n\nfunction focusOnLastNode(event, nodes) {\n  const node = nodes[nodes.length - 1];\n\n  if (node) {\n    node.focus();\n    event.preventDefault();\n  }\n} // ___Why not just use (focusedItemIndex === -1)?\n//    Firefox thinks <ul> is focusable, but we don't have <ul>s in our FOCUSABLE_ELEMENTS. Which means that if we tab into\n//    the <ul>, code will think that we are not in the active overlay, and we should focusOnFirstNode() of the currently\n//    active overlay!\n//    [Practical check] if we use (focusedItemIndex === -1), instagram provider in firefox will never get focus on its pics\n//    in the <ul>.\n\n\nfunction isFocusInOverlay(activeOverlayEl) {\n  return activeOverlayEl.contains(document.activeElement);\n}\n\nfunction trapFocus(event, activeOverlayType, dashboardEl) {\n  const activeOverlayEl = getActiveOverlayEl(dashboardEl, activeOverlayType);\n  const focusableNodes = toArray(activeOverlayEl.querySelectorAll(FOCUSABLE_ELEMENTS));\n  const focusedItemIndex = focusableNodes.indexOf(document.activeElement); // If we pressed tab, and focus is not yet within the current overlay - focus on\n  // the first element within the current overlay.\n  // This is a safety measure (for when user returns from another tab e.g.), most\n  // plugins will try to focus on some important element as it loads.\n\n  if (!isFocusInOverlay(activeOverlayEl)) {\n    focusOnFirstNode(event, focusableNodes); // If we pressed shift + tab, and we're on the first element of a modal\n  } else if (event.shiftKey && focusedItemIndex === 0) {\n    focusOnLastNode(event, focusableNodes); // If we pressed tab, and we're on the last element of the modal\n  } else if (!event.shiftKey && focusedItemIndex === focusableNodes.length - 1) {\n    focusOnFirstNode(event, focusableNodes);\n  }\n}\n\nmodule.exports = {\n  // Traps focus inside of the currently open overlay (e.g. Dashboard, or e.g. Instagram),\n  // never lets focus disappear from the modal.\n  forModal: (event, activeOverlayType, dashboardEl) => {\n    trapFocus(event, activeOverlayType, dashboardEl);\n  },\n  // Traps focus inside of the currently open overlay, unless overlay is null - then let the user tab away.\n  forInline: (event, activeOverlayType, dashboardEl) => {\n    // ___When we're in the bare 'Drop files here, paste, browse or import from' screen\n    if (activeOverlayType === null) {// Do nothing and let the browser handle it, user can tab away from Uppy to other elements on the page\n      // ___When there is some overlay with 'Done' button\n    } else {\n      // Trap the focus inside this overlay!\n      // User can close the overlay (click 'Done') if they want to travel away from Uppy.\n      trapFocus(event, activeOverlayType, dashboardEl);\n    }\n  }\n};", "/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n    nativeMin = Math.min;\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n *   console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n  return root.Date.now();\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. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n *  Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n *  The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n *  Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n *   'leading': true,\n *   'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n  var lastArgs,\n      lastThis,\n      maxWait,\n      result,\n      timerId,\n      lastCallTime,\n      lastInvokeTime = 0,\n      leading = false,\n      maxing = false,\n      trailing = true;\n\n  if (typeof func != 'function') {\n    throw new TypeError(FUNC_ERROR_TEXT);\n  }\n  wait = toNumber(wait) || 0;\n  if (isObject(options)) {\n    leading = !!options.leading;\n    maxing = 'maxWait' in options;\n    maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n    trailing = 'trailing' in options ? !!options.trailing : trailing;\n  }\n\n  function invokeFunc(time) {\n    var args = lastArgs,\n        thisArg = lastThis;\n\n    lastArgs = lastThis = undefined;\n    lastInvokeTime = time;\n    result = func.apply(thisArg, args);\n    return result;\n  }\n\n  function leadingEdge(time) {\n    // Reset any `maxWait` timer.\n    lastInvokeTime = time;\n    // Start the timer for the trailing edge.\n    timerId = setTimeout(timerExpired, wait);\n    // Invoke the leading edge.\n    return leading ? invokeFunc(time) : result;\n  }\n\n  function remainingWait(time) {\n    var timeSinceLastCall = time - lastCallTime,\n        timeSinceLastInvoke = time - lastInvokeTime,\n        result = wait - timeSinceLastCall;\n\n    return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\n  }\n\n  function shouldInvoke(time) {\n    var timeSinceLastCall = time - lastCallTime,\n        timeSinceLastInvoke = time - lastInvokeTime;\n\n    // Either this is the first call, activity has stopped and we're at the\n    // trailing edge, the system time has gone backwards and we're treating\n    // it as the trailing edge, or we've hit the `maxWait` limit.\n    return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n      (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n  }\n\n  function timerExpired() {\n    var time = now();\n    if (shouldInvoke(time)) {\n      return trailingEdge(time);\n    }\n    // Restart the timer.\n    timerId = setTimeout(timerExpired, remainingWait(time));\n  }\n\n  function trailingEdge(time) {\n    timerId = undefined;\n\n    // Only invoke if we have `lastArgs` which means `func` has been\n    // debounced at least once.\n    if (trailing && lastArgs) {\n      return invokeFunc(time);\n    }\n    lastArgs = lastThis = undefined;\n    return result;\n  }\n\n  function cancel() {\n    if (timerId !== undefined) {\n      clearTimeout(timerId);\n    }\n    lastInvokeTime = 0;\n    lastArgs = lastCallTime = lastThis = timerId = undefined;\n  }\n\n  function flush() {\n    return timerId === undefined ? result : trailingEdge(now());\n  }\n\n  function debounced() {\n    var time = now(),\n        isInvoking = shouldInvoke(time);\n\n    lastArgs = arguments;\n    lastThis = this;\n    lastCallTime = time;\n\n    if (isInvoking) {\n      if (timerId === undefined) {\n        return leadingEdge(lastCallTime);\n      }\n      if (maxing) {\n        // Handle invocations in a tight loop.\n        timerId = setTimeout(timerExpired, wait);\n        return invokeFunc(lastCallTime);\n      }\n    }\n    if (timerId === undefined) {\n      timerId = setTimeout(timerExpired, wait);\n    }\n    return result;\n  }\n  debounced.cancel = cancel;\n  debounced.flush = flush;\n  return debounced;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n  var type = typeof value;\n  return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n  return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n  return typeof value == 'symbol' ||\n    (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n  if (typeof value == 'number') {\n    return value;\n  }\n  if (isSymbol(value)) {\n    return NAN;\n  }\n  if (isObject(value)) {\n    var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n    value = isObject(other) ? (other + '') : other;\n  }\n  if (typeof value != 'string') {\n    return value === 0 ? value : +value;\n  }\n  value = value.replace(reTrim, '');\n  var isBinary = reIsBinary.test(value);\n  return (isBinary || reIsOctal.test(value))\n    ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n    : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = debounce;\n", "\"use strict\";\n\nconst debounce = require('lodash.debounce');\n\nconst FOCUSABLE_ELEMENTS = require('@uppy/utils/lib/FOCUSABLE_ELEMENTS');\n\nconst getActiveOverlayEl = require('./getActiveOverlayEl');\n/*\n  Focuses on some element in the currently topmost overlay.\n\n  1. If there are some [data-uppy-super-focusable] elements rendered already - focuses\n     on the first superfocusable element, and leaves focus up to the control of\n     a user (until currently focused element disappears from the screen [which\n     can happen when overlay changes, or, e.g., when we click on a folder in googledrive]).\n  2. If there are no [data-uppy-super-focusable] elements yet (or ever) - focuses\n     on the first focusable element, but switches focus if superfocusable elements appear on next render.\n*/\n\n\nmodule.exports = function createSuperFocus() {\n  let lastFocusWasOnSuperFocusableEl = false;\n\n  const superFocus = (dashboardEl, activeOverlayType) => {\n    const overlayEl = getActiveOverlayEl(dashboardEl, activeOverlayType);\n    const isFocusInOverlay = overlayEl.contains(document.activeElement); // If focus is already in the topmost overlay, AND on last update we focused on the superfocusable\n    // element - then leave focus up to the user.\n    // [Practical check] without this line, typing in the search input in googledrive overlay won't work.\n\n    if (isFocusInOverlay && lastFocusWasOnSuperFocusableEl) return;\n    const superFocusableEl = overlayEl.querySelector('[data-uppy-super-focusable]'); // If we are already in the topmost overlay, AND there are no super focusable elements yet, - leave focus up to the user.\n    // [Practical check] without this line, if you are in an empty folder in google drive, and something's uploading in the\n    // bg, - focus will be jumping to Done all the time.\n\n    if (isFocusInOverlay && !superFocusableEl) return;\n\n    if (superFocusableEl) {\n      superFocusableEl.focus({\n        preventScroll: true\n      });\n      lastFocusWasOnSuperFocusableEl = true;\n    } else {\n      const firstEl = overlayEl.querySelector(FOCUSABLE_ELEMENTS);\n      firstEl == null ? void 0 : firstEl.focus({\n        preventScroll: true\n      });\n      lastFocusWasOnSuperFocusableEl = false;\n    }\n  }; // ___Why do we need to debounce?\n  //    1. To deal with animations: overlay changes via animations, which results in the DOM updating AFTER plugin.update()\n  //       already executed.\n  //    [Practical check] without debounce, if we open the Url overlay, and click 'Done', Dashboard won't get focused again.\n  //    [Practical check] if we delay 250ms instead of 260ms - IE11 won't get focused in same situation.\n  //    2. Performance: there can be many state update()s in a second, and this function is called every time.\n\n\n  return debounce(superFocus, 260);\n};", "'use strict';\n\nvar safeIsNaN = Number.isNaN ||\n    function ponyfill(value) {\n        return typeof value === 'number' && value !== value;\n    };\nfunction isEqual(first, second) {\n    if (first === second) {\n        return true;\n    }\n    if (safeIsNaN(first) && safeIsNaN(second)) {\n        return true;\n    }\n    return false;\n}\nfunction areInputsEqual(newInputs, lastInputs) {\n    if (newInputs.length !== lastInputs.length) {\n        return false;\n    }\n    for (var i = 0; i < newInputs.length; i++) {\n        if (!isEqual(newInputs[i], lastInputs[i])) {\n            return false;\n        }\n    }\n    return true;\n}\n\nfunction memoizeOne(resultFn, isEqual) {\n    if (isEqual === void 0) { isEqual = areInputsEqual; }\n    var lastThis;\n    var lastArgs = [];\n    var lastResult;\n    var calledOnce = false;\n    function memoized() {\n        var newArgs = [];\n        for (var _i = 0; _i < arguments.length; _i++) {\n            newArgs[_i] = arguments[_i];\n        }\n        if (calledOnce && lastThis === this && isEqual(newArgs, lastArgs)) {\n            return lastResult;\n        }\n        lastResult = resultFn.apply(this, newArgs);\n        calledOnce = true;\n        lastThis = this;\n        lastArgs = newArgs;\n        return lastResult;\n    }\n    return memoized;\n}\n\nmodule.exports = memoizeOne;\n", "\"use strict\";\n\n/**\n * Checks if the browser supports Drag & Drop (not supported on mobile devices, for example).\n *\n * @returns {boolean}\n */\nmodule.exports = function isDragDropSupported() {\n  const div = document.body;\n\n  if (!('draggable' in div) || !('ondragstart' in div && 'ondrop' in div)) {\n    return false;\n  }\n\n  if (!('FormData' in window)) {\n    return false;\n  }\n\n  if (!('FileReader' in window)) {\n    return false;\n  }\n\n  return true;\n};", "module.exports = function isShallowEqual (a, b) {\n  if (a === b) return true\n  for (var i in a) if (!(i in b)) return false\n  for (var i in b) if (a[i] !== b[i]) return false\n  return true\n}\n", "\"use strict\";\n\nconst {\n  h\n} = require('preact');\n\nfunction iconImage() {\n  return h(\"svg\", {\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    width: \"25\",\n    height: \"25\",\n    viewBox: \"0 0 25 25\"\n  }, h(\"g\", {\n    fill: \"#686DE0\",\n    fillRule: \"evenodd\"\n  }, h(\"path\", {\n    d: \"M5 7v10h15V7H5zm0-1h15a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1z\",\n    fillRule: \"nonzero\"\n  }), h(\"path\", {\n    d: \"M6.35 17.172l4.994-5.026a.5.5 0 0 1 .707 0l2.16 2.16 3.505-3.505a.5.5 0 0 1 .707 0l2.336 2.31-.707.72-1.983-1.97-3.505 3.505a.5.5 0 0 1-.707 0l-2.16-2.159-3.938 3.939-1.409.026z\",\n    fillRule: \"nonzero\"\n  }), h(\"circle\", {\n    cx: \"7.5\",\n    cy: \"9.5\",\n    r: \"1.5\"\n  })));\n}\n\nfunction iconAudio() {\n  return h(\"svg\", {\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    className: \"uppy-c-icon\",\n    width: \"25\",\n    height: \"25\",\n    viewBox: \"0 0 25 25\"\n  }, h(\"path\", {\n    d: \"M9.5 18.64c0 1.14-1.145 2-2.5 2s-2.5-.86-2.5-2c0-1.14 1.145-2 2.5-2 .557 0 1.079.145 1.5.396V7.25a.5.5 0 0 1 .379-.485l9-2.25A.5.5 0 0 1 18.5 5v11.64c0 1.14-1.145 2-2.5 2s-2.5-.86-2.5-2c0-1.14 1.145-2 2.5-2 .557 0 1.079.145 1.5.396V8.67l-8 2v7.97zm8-11v-2l-8 2v2l8-2zM7 19.64c.855 0 1.5-.484 1.5-1s-.645-1-1.5-1-1.5.484-1.5 1 .645 1 1.5 1zm9-2c.855 0 1.5-.484 1.5-1s-.645-1-1.5-1-1.5.484-1.5 1 .645 1 1.5 1z\",\n    fill: \"#049BCF\",\n    fillRule: \"nonzero\"\n  }));\n}\n\nfunction iconVideo() {\n  return h(\"svg\", {\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    className: \"uppy-c-icon\",\n    width: \"25\",\n    height: \"25\",\n    viewBox: \"0 0 25 25\"\n  }, h(\"path\", {\n    d: \"M16 11.834l4.486-2.691A1 1 0 0 1 22 10v6a1 1 0 0 1-1.514.857L16 14.167V17a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v2.834zM15 9H5v8h10V9zm1 4l5 3v-6l-5 3z\",\n    fill: \"#19AF67\",\n    fillRule: \"nonzero\"\n  }));\n}\n\nfunction iconPDF() {\n  return h(\"svg\", {\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    className: \"uppy-c-icon\",\n    width: \"25\",\n    height: \"25\",\n    viewBox: \"0 0 25 25\"\n  }, h(\"path\", {\n    d: \"M9.766 8.295c-.691-1.843-.539-3.401.747-3.726 1.643-.414 2.505.938 2.39 3.299-.039.79-.194 1.662-.537 3.148.324.49.66.967 1.055 1.51.17.231.382.488.629.757 1.866-.128 3.653.114 4.918.655 1.487.635 2.192 1.685 1.614 2.84-.566 1.133-1.839 1.084-3.416.249-1.141-.604-2.457-1.634-3.51-2.707a13.467 13.467 0 0 0-2.238.426c-1.392 4.051-4.534 6.453-5.707 4.572-.986-1.58 1.38-4.206 4.914-5.375.097-.322.185-.656.264-1.001.08-.353.306-1.31.407-1.737-.678-1.059-1.2-2.031-1.53-2.91zm2.098 4.87c-.033.144-.068.287-.104.427l.033-.01-.012.038a14.065 14.065 0 0 1 1.02-.197l-.032-.033.052-.004a7.902 7.902 0 0 1-.208-.271c-.197-.27-.38-.526-.555-.775l-.006.028-.002-.003c-.076.323-.148.632-.186.8zm5.77 2.978c1.143.605 1.832.632 2.054.187.26-.519-.087-1.034-1.113-1.473-.911-.39-2.175-.608-3.55-.608.845.766 1.787 1.459 2.609 1.894zM6.559 18.789c.14.223.693.16 1.425-.413.827-.648 1.61-1.747 2.208-3.206-2.563 1.064-4.102 2.867-3.633 3.62zm5.345-10.97c.088-1.793-.351-2.48-1.146-2.28-.473.119-.564 1.05-.056 2.405.213.566.52 1.188.908 1.859.18-.858.268-1.453.294-1.984z\",\n    fill: \"#E2514A\",\n    fillRule: \"nonzero\"\n  }));\n}\n\nfunction iconArchive() {\n  return h(\"svg\", {\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    width: \"25\",\n    height: \"25\",\n    viewBox: \"0 0 25 25\"\n  }, h(\"path\", {\n    d: \"M10.45 2.05h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5V2.55a.5.5 0 0 1 .5-.5zm2.05 1.024h1.05a.5.5 0 0 1 .5.5V3.6a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5v-.001zM10.45 0h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5V.5a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.024a.5.5 0 0 1 .5-.5zm-2.05 3.074h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.024a.5.5 0 0 1 .5-.5zm-2.05 1.024h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm-2.05 1.025h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.024a.5.5 0 0 1 .5-.5zm-1.656 3.074l-.82 5.946c.52.302 1.174.458 1.976.458.803 0 1.455-.156 1.975-.458l-.82-5.946h-2.311zm0-1.025h2.312c.512 0 .946.378 1.015.885l.82 5.946c.056.412-.142.817-.501 1.026-.686.398-1.515.597-2.49.597-.974 0-1.804-.199-2.49-.597a1.025 1.025 0 0 1-.5-1.026l.819-5.946c.07-.507.503-.885 1.015-.885zm.545 6.6a.5.5 0 0 1-.397-.561l.143-.999a.5.5 0 0 1 .495-.429h.74a.5.5 0 0 1 .495.43l.143.998a.5.5 0 0 1-.397.561c-.404.08-.819.08-1.222 0z\",\n    fill: \"#00C469\",\n    fillRule: \"nonzero\"\n  }));\n}\n\nfunction iconFile() {\n  return h(\"svg\", {\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    className: \"uppy-c-icon\",\n    width: \"25\",\n    height: \"25\",\n    viewBox: \"0 0 25 25\"\n  }, h(\"g\", {\n    fill: \"#A7AFB7\",\n    fillRule: \"nonzero\"\n  }, h(\"path\", {\n    d: \"M5.5 22a.5.5 0 0 1-.5-.5v-18a.5.5 0 0 1 .5-.5h10.719a.5.5 0 0 1 .367.16l3.281 3.556a.5.5 0 0 1 .133.339V21.5a.5.5 0 0 1-.5.5h-14zm.5-1h13V7.25L16 4H6v17z\"\n  }), h(\"path\", {\n    d: \"M15 4v3a1 1 0 0 0 1 1h3V7h-3V4h-1z\"\n  })));\n}\n\nfunction iconText() {\n  return h(\"svg\", {\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    className: \"uppy-c-icon\",\n    width: \"25\",\n    height: \"25\",\n    viewBox: \"0 0 25 25\"\n  }, h(\"path\", {\n    d: \"M4.5 7h13a.5.5 0 1 1 0 1h-13a.5.5 0 0 1 0-1zm0 3h15a.5.5 0 1 1 0 1h-15a.5.5 0 1 1 0-1zm0 3h15a.5.5 0 1 1 0 1h-15a.5.5 0 1 1 0-1zm0 3h10a.5.5 0 1 1 0 1h-10a.5.5 0 1 1 0-1z\",\n    fill: \"#5A5E69\",\n    fillRule: \"nonzero\"\n  }));\n}\n\nmodule.exports = function getIconByMime(fileType) {\n  const defaultChoice = {\n    color: '#838999',\n    icon: iconFile()\n  };\n  if (!fileType) return defaultChoice;\n  const fileTypeGeneral = fileType.split('/')[0];\n  const fileTypeSpecific = fileType.split('/')[1]; // Text\n\n  if (fileTypeGeneral === 'text') {\n    return {\n      color: '#5a5e69',\n      icon: iconText()\n    };\n  } // Image\n\n\n  if (fileTypeGeneral === 'image') {\n    return {\n      color: '#686de0',\n      icon: iconImage()\n    };\n  } // Audio\n\n\n  if (fileTypeGeneral === 'audio') {\n    return {\n      color: '#068dbb',\n      icon: iconAudio()\n    };\n  } // Video\n\n\n  if (fileTypeGeneral === 'video') {\n    return {\n      color: '#19af67',\n      icon: iconVideo()\n    };\n  } // PDF\n\n\n  if (fileTypeGeneral === 'application' && fileTypeSpecific === 'pdf') {\n    return {\n      color: '#e25149',\n      icon: iconPDF()\n    };\n  } // Archive\n\n\n  const archiveTypes = ['zip', 'x-7z-compressed', 'x-rar-compressed', 'x-tar', 'x-gzip', 'x-apple-diskimage'];\n\n  if (fileTypeGeneral === 'application' && archiveTypes.indexOf(fileTypeSpecific) !== -1) {\n    return {\n      color: '#00C469',\n      icon: iconArchive()\n    };\n  }\n\n  return defaultChoice;\n};", "\"use strict\";\n\nconst {\n  h\n} = require('preact');\n\nconst getFileTypeIcon = require('../utils/getFileTypeIcon');\n\nmodule.exports = function FilePreview(props) {\n  const {\n    file\n  } = props;\n\n  if (file.preview) {\n    return h(\"img\", {\n      className: \"uppy-Dashboard-Item-previewImg\",\n      alt: file.name,\n      src: file.preview\n    });\n  }\n\n  const {\n    color,\n    icon\n  } = getFileTypeIcon(file.type);\n  return h(\"div\", {\n    className: \"uppy-Dashboard-Item-previewIconWrap\"\n  }, h(\"span\", {\n    className: \"uppy-Dashboard-Item-previewIcon\",\n    style: {\n      color\n    }\n  }, icon), h(\"svg\", {\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    className: \"uppy-Dashboard-Item-previewIconBg\",\n    width: \"58\",\n    height: \"76\",\n    viewBox: \"0 0 58 76\"\n  }, h(\"rect\", {\n    fill: \"#FFF\",\n    width: \"58\",\n    height: \"76\",\n    rx: \"3\",\n    fillRule: \"evenodd\"\n  })));\n};", "\"use strict\";\n\nconst {\n  h\n} = require('preact');\n\nconst metaFieldIdToName = (metaFieldId, metaFields) => {\n  const field = metaFields.filter(f => f.id === metaFieldId);\n  return field[0].name;\n};\n\nmodule.exports = function renderMissingMetaFieldsError(props) {\n  const {\n    file,\n    toggleFileCard,\n    i18n,\n    metaFields\n  } = props;\n  const {\n    missingRequiredMetaFields\n  } = file;\n\n  if (!(missingRequiredMetaFields != null && missingRequiredMetaFields.length)) {\n    return null;\n  }\n\n  const metaFieldsString = missingRequiredMetaFields.map(missingMetaField => metaFieldIdToName(missingMetaField, metaFields)).join(', ');\n  return h(\"div\", {\n    className: \"uppy-Dashboard-Item-errorMessage\"\n  }, i18n('missingRequiredMetaFields', {\n    smart_count: missingRequiredMetaFields.length,\n    fields: metaFieldsString\n  }), ' ', h(\"button\", {\n    type: \"button\",\n    class: \"uppy-u-reset uppy-Dashboard-Item-errorMessageBtn\",\n    onClick: () => toggleFileCard(true, file.id)\n  }, i18n('editFile')));\n};", "\"use strict\";\n\nconst {\n  h\n} = require('preact');\n\nconst FilePreview = require('../../FilePreview');\n\nconst MetaErrorMessage = require('../MetaErrorMessage');\n\nconst getFileTypeIcon = require('../../../utils/getFileTypeIcon');\n\nmodule.exports = function FilePreviewAndLink(props) {\n  return h(\"div\", {\n    className: \"uppy-Dashboard-Item-previewInnerWrap\",\n    style: {\n      backgroundColor: getFileTypeIcon(props.file.type).color\n    }\n  }, props.showLinkToFileUploadResult && props.file.uploadURL && h(\"a\", {\n    className: \"uppy-Dashboard-Item-previewLink\",\n    href: props.file.uploadURL,\n    rel: \"noreferrer noopener\",\n    target: \"_blank\",\n    \"aria-label\": props.file.meta.name\n  }, h(\"span\", {\n    hidden: true\n  }, props.file.meta.name)), h(FilePreview, {\n    file: props.file\n  }), h(MetaErrorMessage, {\n    file: props.file,\n    i18n: props.i18n,\n    toggleFileCard: props.toggleFileCard,\n    metaFields: props.metaFields\n  }));\n};", "\"use strict\";\n\nconst {\n  h\n} = require('preact');\n\nfunction onPauseResumeCancelRetry(props) {\n  if (props.isUploaded) return;\n\n  if (props.error && !props.hideRetryButton) {\n    props.uppy.retryUpload(props.file.id);\n    return;\n  }\n\n  if (props.resumableUploads && !props.hidePauseResumeButton) {\n    props.uppy.pauseResume(props.file.id);\n  } else if (props.individualCancellation && !props.hideCancelButton) {\n    props.uppy.removeFile(props.file.id);\n  }\n}\n\nfunction progressIndicatorTitle(props) {\n  if (props.isUploaded) {\n    return props.i18n('uploadComplete');\n  }\n\n  if (props.error) {\n    return props.i18n('retryUpload');\n  }\n\n  if (props.resumableUploads) {\n    if (props.file.isPaused) {\n      return props.i18n('resumeUpload');\n    }\n\n    return props.i18n('pauseUpload');\n  }\n\n  if (props.individualCancellation) {\n    return props.i18n('cancelUpload');\n  }\n\n  return '';\n}\n\nfunction ProgressIndicatorButton(props) {\n  return h(\"div\", {\n    className: \"uppy-Dashboard-Item-progress\"\n  }, h(\"button\", {\n    className: \"uppy-u-reset uppy-Dashboard-Item-progressIndicator\",\n    type: \"button\",\n    \"aria-label\": progressIndicatorTitle(props),\n    title: progressIndicatorTitle(props),\n    onClick: () => onPauseResumeCancelRetry(props)\n  }, props.children));\n}\n\nfunction ProgressCircleContainer(_ref) {\n  let {\n    children\n  } = _ref;\n  return h(\"svg\", {\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    width: \"70\",\n    height: \"70\",\n    viewBox: \"0 0 36 36\",\n    className: \"uppy-c-icon uppy-Dashboard-Item-progressIcon--circle\"\n  }, children);\n}\n\nfunction ProgressCircle(_ref2) {\n  let {\n    progress\n  } = _ref2;\n  // circle length equals 2 * PI * R\n  const circleLength = 2 * Math.PI * 15;\n  return h(\"g\", null, h(\"circle\", {\n    className: \"uppy-Dashboard-Item-progressIcon--bg\",\n    r: \"15\",\n    cx: \"18\",\n    cy: \"18\",\n    \"stroke-width\": \"2\",\n    fill: \"none\"\n  }), h(\"circle\", {\n    className: \"uppy-Dashboard-Item-progressIcon--progress\",\n    r: \"15\",\n    cx: \"18\",\n    cy: \"18\",\n    transform: \"rotate(-90, 18, 18)\",\n    fill: \"none\",\n    \"stroke-width\": \"2\",\n    \"stroke-dasharray\": circleLength,\n    \"stroke-dashoffset\": circleLength - circleLength / 100 * progress\n  }));\n}\n\nmodule.exports = function FileProgress(props) {\n  // Nothing if upload has not started\n  if (!props.file.progress.uploadStarted) {\n    return null;\n  } // Green checkmark when complete\n\n\n  if (props.isUploaded) {\n    return h(\"div\", {\n      className: \"uppy-Dashboard-Item-progress\"\n    }, h(\"div\", {\n      className: \"uppy-Dashboard-Item-progressIndicator\"\n    }, h(ProgressCircleContainer, null, h(\"circle\", {\n      r: \"15\",\n      cx: \"18\",\n      cy: \"18\",\n      fill: \"#1bb240\"\n    }), h(\"polygon\", {\n      className: \"uppy-Dashboard-Item-progressIcon--check\",\n      transform: \"translate(2, 3)\",\n      points: \"14 22.5 7 15.2457065 8.99985857 13.1732815 14 18.3547104 22.9729883 9 25 11.1005634\"\n    }))));\n  }\n\n  if (props.recoveredState) {\n    return;\n  } // Retry button for error\n\n\n  if (props.error && !props.hideRetryButton) {\n    return h(ProgressIndicatorButton, props, h(\"svg\", {\n      \"aria-hidden\": \"true\",\n      focusable: \"false\",\n      className: \"uppy-c-icon uppy-Dashboard-Item-progressIcon--retry\",\n      width: \"28\",\n      height: \"31\",\n      viewBox: \"0 0 16 19\"\n    }, h(\"path\", {\n      d: \"M16 11a8 8 0 1 1-8-8v2a6 6 0 1 0 6 6h2z\"\n    }), h(\"path\", {\n      d: \"M7.9 3H10v2H7.9z\"\n    }), h(\"path\", {\n      d: \"M8.536.5l3.535 3.536-1.414 1.414L7.12 1.914z\"\n    }), h(\"path\", {\n      d: \"M10.657 2.621l1.414 1.415L8.536 7.57 7.12 6.157z\"\n    })));\n  } // Pause/resume button for resumable uploads\n\n\n  if (props.resumableUploads && !props.hidePauseResumeButton) {\n    return h(ProgressIndicatorButton, props, h(ProgressCircleContainer, null, h(ProgressCircle, {\n      progress: props.file.progress.percentage\n    }), props.file.isPaused ? h(\"polygon\", {\n      className: \"uppy-Dashboard-Item-progressIcon--play\",\n      transform: \"translate(3, 3)\",\n      points: \"12 20 12 10 20 15\"\n    }) : h(\"g\", {\n      className: \"uppy-Dashboard-Item-progressIcon--pause\",\n      transform: \"translate(14.5, 13)\"\n    }, h(\"rect\", {\n      x: \"0\",\n      y: \"0\",\n      width: \"2\",\n      height: \"10\",\n      rx: \"0\"\n    }), h(\"rect\", {\n      x: \"5\",\n      y: \"0\",\n      width: \"2\",\n      height: \"10\",\n      rx: \"0\"\n    }))));\n  } // Cancel button for non-resumable uploads if individualCancellation is supported (not bundled)\n\n\n  if (!props.resumableUploads && props.individualCancellation && !props.hideCancelButton) {\n    return h(ProgressIndicatorButton, props, h(ProgressCircleContainer, null, h(ProgressCircle, {\n      progress: props.file.progress.percentage\n    }), h(\"polygon\", {\n      className: \"cancel\",\n      transform: \"translate(2, 2)\",\n      points: \"19.8856516 11.0625 16 14.9481516 12.1019737 11.0625 11.0625 12.1143484 14.9481516 16 11.0625 19.8980263 12.1019737 20.9375 16 17.0518484 19.8856516 20.9375 20.9375 19.8980263 17.0518484 16 20.9375 12\"\n    })));\n  } // Just progress when buttons are disabled\n\n\n  return h(\"div\", {\n    className: \"uppy-Dashboard-Item-progress\"\n  }, h(\"div\", {\n    className: \"uppy-Dashboard-Item-progressIndicator\"\n  }, h(ProgressCircleContainer, null, h(ProgressCircle, {\n    progress: props.file.progress.percentage\n  }))));\n};", "\"use strict\";\n\n/**\n * Truncates a string to the given number of chars (maxLength) by inserting '...' in the middle of that string.\n * Partially taken from https://stackoverflow.com/a/5723274/3192470.\n *\n * @param {string} string - string to be truncated\n * @param {number} maxLength - maximum size of the resulting string\n * @returns {string}\n */\nconst separator = '...';\n\nmodule.exports = function truncateString(string, maxLength) {\n  // Return the empty string if maxLength is zero\n  if (maxLength === 0) return ''; // Return original string if it's already shorter than maxLength\n\n  if (string.length <= maxLength) return string; // Return truncated substring appended of the ellipsis char if string can't be meaningfully truncated\n\n  if (maxLength <= separator.length + 1) return `${string.slice(0, maxLength - 1)}\u2026`;\n  const charsToShow = maxLength - separator.length;\n  const frontChars = Math.ceil(charsToShow / 2);\n  const backChars = Math.floor(charsToShow / 2);\n  return string.slice(0, frontChars) + separator + string.slice(-backChars);\n};", "\"use strict\";\n\nconst {\n  h,\n  Fragment\n} = require('preact');\n\nconst prettierBytes = require('@transloadit/prettier-bytes');\n\nconst truncateString = require('@uppy/utils/lib/truncateString');\n\nconst MetaErrorMessage = require('../MetaErrorMessage');\n\nconst renderFileName = props => {\n  const {\n    author,\n    name\n  } = props.file.meta;\n\n  function getMaxNameLength() {\n    if (props.containerWidth <= 352) {\n      return 35;\n    }\n\n    if (props.containerWidth <= 576) {\n      return 60;\n    } // When `author` is present, we want to make sure\n    // the file name fits on one line so we can place\n    // the author on the second line.\n\n\n    return author ? 20 : 30;\n  }\n\n  return h(\"div\", {\n    className: \"uppy-Dashboard-Item-name\",\n    title: name\n  }, truncateString(name, getMaxNameLength()));\n};\n\nconst renderAuthor = props => {\n  const {\n    author\n  } = props.file.meta;\n  const {\n    providerName\n  } = props.file.remote;\n  const dot = `\\u00B7`;\n\n  if (!author) {\n    return null;\n  }\n\n  return h(\"div\", {\n    className: \"uppy-Dashboard-Item-author\"\n  }, h(\"a\", {\n    href: `${author.url}?utm_source=Companion&utm_medium=referral`,\n    target: \"_blank\",\n    rel: \"noopener noreferrer\"\n  }, truncateString(author.name, 13)), providerName ? h(Fragment, null, ` ${dot} `, providerName) : null);\n};\n\nconst renderFileSize = props => props.file.size && h(\"div\", {\n  className: \"uppy-Dashboard-Item-statusSize\"\n}, prettierBytes(props.file.size));\n\nconst ReSelectButton = props => props.file.isGhost && h(\"span\", null, ' \\u2022 ', h(\"button\", {\n  className: \"uppy-u-reset uppy-c-btn uppy-Dashboard-Item-reSelect\",\n  type: \"button\",\n  onClick: props.toggleAddFilesPanel\n}, props.i18n('reSelect')));\n\nconst ErrorButton = _ref => {\n  let {\n    file,\n    onClick\n  } = _ref;\n\n  if (file.error) {\n    return h(\"button\", {\n      className: \"uppy-u-reset uppy-Dashboard-Item-errorDetails\",\n      \"aria-label\": file.error,\n      \"data-microtip-position\": \"bottom\",\n      \"data-microtip-size\": \"medium\",\n      onClick: onClick,\n      type: \"button\"\n    }, \"?\");\n  }\n\n  return null;\n};\n\nmodule.exports = function FileInfo(props) {\n  const {\n    file\n  } = props;\n  return h(\"div\", {\n    className: \"uppy-Dashboard-Item-fileInfo\",\n    \"data-uppy-file-source\": file.source\n  }, h(\"div\", {\n    className: \"uppy-Dashboard-Item-fileName\"\n  }, renderFileName(props), h(ErrorButton, {\n    file: props.file // eslint-disable-next-line no-alert\n    ,\n    onClick: () => alert(props.file.error) // TODO: move to a custom alert implementation\n\n  })), h(\"div\", {\n    className: \"uppy-Dashboard-Item-status\"\n  }, renderAuthor(props), renderFileSize(props), ReSelectButton(props)), h(MetaErrorMessage, {\n    file: props.file,\n    i18n: props.i18n,\n    toggleFileCard: props.toggleFileCard,\n    metaFields: props.metaFields\n  }));\n};", "\"use strict\";\n\n/**\n * Copies text to clipboard by creating an almost invisible textarea,\n * adding text there, then running execCommand('copy').\n * Falls back to prompt() when the easy way fails (hello, Safari!)\n * From http://stackoverflow.com/a/30810322\n *\n * @param {string} textToCopy\n * @param {string} fallbackString\n * @returns {Promise}\n */\nmodule.exports = function copyToClipboard(textToCopy, fallbackString) {\n  fallbackString = fallbackString || 'Copy the URL below';\n  return new Promise(resolve => {\n    const textArea = document.createElement('textarea');\n    textArea.setAttribute('style', {\n      position: 'fixed',\n      top: 0,\n      left: 0,\n      width: '2em',\n      height: '2em',\n      padding: 0,\n      border: 'none',\n      outline: 'none',\n      boxShadow: 'none',\n      background: 'transparent'\n    });\n    textArea.value = textToCopy;\n    document.body.appendChild(textArea);\n    textArea.select();\n\n    const magicCopyFailed = () => {\n      document.body.removeChild(textArea); // eslint-disable-next-line no-alert\n\n      window.prompt(fallbackString, textToCopy);\n      resolve();\n    };\n\n    try {\n      const successful = document.execCommand('copy');\n\n      if (!successful) {\n        return magicCopyFailed('copy command unavailable');\n      }\n\n      document.body.removeChild(textArea);\n      return resolve();\n    } catch (err) {\n      document.body.removeChild(textArea);\n      return magicCopyFailed(err);\n    }\n  });\n};", "\"use strict\";\n\nconst {\n  h\n} = require('preact');\n\nconst copyToClipboard = require('../../../utils/copyToClipboard');\n\nfunction EditButton(_ref) {\n  let {\n    file,\n    uploadInProgressOrComplete,\n    metaFields,\n    canEditFile,\n    i18n,\n    onClick\n  } = _ref;\n\n  if (!uploadInProgressOrComplete && metaFields && metaFields.length > 0 || !uploadInProgressOrComplete && canEditFile(file)) {\n    return h(\"button\", {\n      className: \"uppy-u-reset uppy-Dashboard-Item-action uppy-Dashboard-Item-action--edit\",\n      type: \"button\",\n      \"aria-label\": i18n('editFileWithFilename', {\n        file: file.meta.name\n      }),\n      title: i18n('editFileWithFilename', {\n        file: file.meta.name\n      }),\n      onClick: () => onClick()\n    }, h(\"svg\", {\n      \"aria-hidden\": \"true\",\n      focusable: \"false\",\n      className: \"uppy-c-icon\",\n      width: \"14\",\n      height: \"14\",\n      viewBox: \"0 0 14 14\"\n    }, h(\"g\", {\n      fillRule: \"evenodd\"\n    }, h(\"path\", {\n      d: \"M1.5 10.793h2.793A1 1 0 0 0 5 10.5L11.5 4a1 1 0 0 0 0-1.414L9.707.793a1 1 0 0 0-1.414 0l-6.5 6.5A1 1 0 0 0 1.5 8v2.793zm1-1V8L9 1.5l1.793 1.793-6.5 6.5H2.5z\",\n      fillRule: \"nonzero\"\n    }), h(\"rect\", {\n      x: \"1\",\n      y: \"12.293\",\n      width: \"11\",\n      height: \"1\",\n      rx: \".5\"\n    }), h(\"path\", {\n      fillRule: \"nonzero\",\n      d: \"M6.793 2.5L9.5 5.207l.707-.707L7.5 1.793z\"\n    }))));\n  }\n\n  return null;\n}\n\nfunction RemoveButton(_ref2) {\n  let {\n    i18n,\n    onClick,\n    file\n  } = _ref2;\n  return h(\"button\", {\n    className: \"uppy-u-reset uppy-Dashboard-Item-action uppy-Dashboard-Item-action--remove\",\n    type: \"button\",\n    \"aria-label\": i18n('removeFile', {\n      file: file.meta.name\n    }),\n    title: i18n('removeFile', {\n      file: file.meta.name\n    }),\n    onClick: () => onClick()\n  }, h(\"svg\", {\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    className: \"uppy-c-icon\",\n    width: \"18\",\n    height: \"18\",\n    viewBox: \"0 0 18 18\"\n  }, h(\"path\", {\n    d: \"M9 0C4.034 0 0 4.034 0 9s4.034 9 9 9 9-4.034 9-9-4.034-9-9-9z\"\n  }), h(\"path\", {\n    fill: \"#FFF\",\n    d: \"M13 12.222l-.778.778L9 9.778 5.778 13 5 12.222 8.222 9 5 5.778 5.778 5 9 8.222 12.222 5l.778.778L9.778 9z\"\n  })));\n}\n\nconst copyLinkToClipboard = (event, props) => {\n  copyToClipboard(props.file.uploadURL, props.i18n('copyLinkToClipboardFallback')).then(() => {\n    props.uppy.log('Link copied to clipboard.');\n    props.uppy.info(props.i18n('copyLinkToClipboardSuccess'), 'info', 3000);\n  }).catch(props.uppy.log) // avoid losing focus\n  .then(() => event.target.focus({\n    preventScroll: true\n  }));\n};\n\nfunction CopyLinkButton(props) {\n  const {\n    i18n\n  } = props;\n  return h(\"button\", {\n    className: \"uppy-u-reset uppy-Dashboard-Item-action uppy-Dashboard-Item-action--copyLink\",\n    type: \"button\",\n    \"aria-label\": i18n('copyLink'),\n    title: i18n('copyLink'),\n    onClick: event => copyLinkToClipboard(event, props)\n  }, h(\"svg\", {\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    className: \"uppy-c-icon\",\n    width: \"14\",\n    height: \"14\",\n    viewBox: \"0 0 14 12\"\n  }, h(\"path\", {\n    d: \"M7.94 7.703a2.613 2.613 0 0 1-.626 2.681l-.852.851a2.597 2.597 0 0 1-1.849.766A2.616 2.616 0 0 1 2.764 7.54l.852-.852a2.596 2.596 0 0 1 2.69-.625L5.267 7.099a1.44 1.44 0 0 0-.833.407l-.852.851a1.458 1.458 0 0 0 1.03 2.486c.39 0 .755-.152 1.03-.426l.852-.852c.231-.231.363-.522.406-.824l1.04-1.038zm4.295-5.937A2.596 2.596 0 0 0 10.387 1c-.698 0-1.355.272-1.849.766l-.852.851a2.614 2.614 0 0 0-.624 2.688l1.036-1.036c.041-.304.173-.6.407-.833l.852-.852c.275-.275.64-.426 1.03-.426a1.458 1.458 0 0 1 1.03 2.486l-.852.851a1.442 1.442 0 0 1-.824.406l-1.04 1.04a2.596 2.596 0 0 0 2.683-.628l.851-.85a2.616 2.616 0 0 0 0-3.697zm-6.88 6.883a.577.577 0 0 0 .82 0l3.474-3.474a.579.579 0 1 0-.819-.82L5.355 7.83a.579.579 0 0 0 0 .819z\"\n  })));\n}\n\nmodule.exports = function Buttons(props) {\n  const {\n    uppy,\n    file,\n    uploadInProgressOrComplete,\n    canEditFile,\n    metaFields,\n    showLinkToFileUploadResult,\n    showRemoveButton,\n    i18n,\n    toggleFileCard,\n    openFileEditor\n  } = props;\n\n  const editAction = () => {\n    if (metaFields && metaFields.length > 0) {\n      toggleFileCard(true, file.id);\n    } else {\n      openFileEditor(file);\n    }\n  };\n\n  return h(\"div\", {\n    className: \"uppy-Dashboard-Item-actionWrapper\"\n  }, h(EditButton, {\n    i18n: i18n,\n    file: file,\n    uploadInProgressOrComplete: uploadInProgressOrComplete,\n    canEditFile: canEditFile,\n    metaFields: metaFields,\n    onClick: editAction\n  }), showLinkToFileUploadResult && file.uploadURL ? h(CopyLinkButton, {\n    file: file,\n    uppy: uppy,\n    i18n: i18n\n  }) : null, showRemoveButton ? h(RemoveButton, {\n    i18n: i18n,\n    file: file,\n    uppy: uppy,\n    onClick: () => props.uppy.removeFile(file.id, 'removed-by-user')\n  }) : null);\n};", "\"use strict\";\n\nconst {\n  h,\n  Component\n} = require('preact');\n\nconst classNames = require('classnames');\n\nconst shallowEqual = require('is-shallow-equal');\n\nconst FilePreviewAndLink = require('./FilePreviewAndLink');\n\nconst FileProgress = require('./FileProgress');\n\nconst FileInfo = require('./FileInfo');\n\nconst Buttons = require('./Buttons');\n\nmodule.exports = class FileItem extends Component {\n  componentDidMount() {\n    const {\n      file\n    } = this.props;\n\n    if (!file.preview) {\n      this.props.handleRequestThumbnail(file);\n    }\n  }\n\n  shouldComponentUpdate(nextProps) {\n    return !shallowEqual(this.props, nextProps);\n  } // VirtualList mounts FileItems again and they emit `thumbnail:request`\n  // Otherwise thumbnails are broken or missing after Golden Retriever restores files\n\n\n  componentDidUpdate() {\n    const {\n      file\n    } = this.props;\n\n    if (!file.preview) {\n      this.props.handleRequestThumbnail(file);\n    }\n  }\n\n  componentWillUnmount() {\n    const {\n      file\n    } = this.props;\n\n    if (!file.preview) {\n      this.props.handleCancelThumbnail(file);\n    }\n  }\n\n  render() {\n    const {\n      file\n    } = this.props;\n    const isProcessing = file.progress.preprocess || file.progress.postprocess;\n    const isUploaded = file.progress.uploadComplete && !isProcessing && !file.error;\n    const uploadInProgressOrComplete = file.progress.uploadStarted || isProcessing;\n    const uploadInProgress = file.progress.uploadStarted && !file.progress.uploadComplete || isProcessing;\n    const error = file.error || false; // File that Golden Retriever was able to partly restore (only meta, not blob),\n    // users still need to re-add it, so it\u2019s a ghost\n\n    const {\n      isGhost\n    } = file;\n    let showRemoveButton = this.props.individualCancellation ? !isUploaded : !uploadInProgress && !isUploaded;\n\n    if (isUploaded && this.props.showRemoveButtonAfterComplete) {\n      showRemoveButton = true;\n    }\n\n    const dashboardItemClass = classNames({\n      'uppy-Dashboard-Item': true,\n      'is-inprogress': uploadInProgress && !this.props.recoveredState,\n      'is-processing': isProcessing,\n      'is-complete': isUploaded,\n      'is-error': !!error,\n      'is-resumable': this.props.resumableUploads,\n      'is-noIndividualCancellation': !this.props.individualCancellation,\n      'is-ghost': isGhost\n    });\n    return h(\"div\", {\n      className: dashboardItemClass,\n      id: `uppy_${file.id}`,\n      role: this.props.role\n    }, h(\"div\", {\n      className: \"uppy-Dashboard-Item-preview\"\n    }, h(FilePreviewAndLink, {\n      file: file,\n      showLinkToFileUploadResult: this.props.showLinkToFileUploadResult,\n      i18n: this.props.i18n,\n      toggleFileCard: this.props.toggleFileCard,\n      metaFields: this.props.metaFields\n    }), h(FileProgress, {\n      uppy: this.props.uppy,\n      file: file,\n      error: error,\n      isUploaded: isUploaded,\n      hideRetryButton: this.props.hideRetryButton,\n      hideCancelButton: this.props.hideCancelButton,\n      hidePauseResumeButton: this.props.hidePauseResumeButton,\n      recoveredState: this.props.recoveredState,\n      showRemoveButtonAfterComplete: this.props.showRemoveButtonAfterComplete,\n      resumableUploads: this.props.resumableUploads,\n      individualCancellation: this.props.individualCancellation,\n      i18n: this.props.i18n\n    })), h(\"div\", {\n      className: \"uppy-Dashboard-Item-fileInfoAndButtons\"\n    }, h(FileInfo, {\n      file: file,\n      id: this.props.id,\n      acquirers: this.props.acquirers,\n      containerWidth: this.props.containerWidth,\n      i18n: this.props.i18n,\n      toggleAddFilesPanel: this.props.toggleAddFilesPanel,\n      toggleFileCard: this.props.toggleFileCard,\n      metaFields: this.props.metaFields\n    }), h(Buttons, {\n      file: file,\n      metaFields: this.props.metaFields,\n      showLinkToFileUploadResult: this.props.showLinkToFileUploadResult,\n      showRemoveButton: showRemoveButton,\n      canEditFile: this.props.canEditFile,\n      uploadInProgressOrComplete: uploadInProgressOrComplete,\n      toggleFileCard: this.props.toggleFileCard,\n      openFileEditor: this.props.openFileEditor,\n      uppy: this.props.uppy,\n      i18n: this.props.i18n\n    })));\n  }\n\n};", "\"use strict\";\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\n/**\n * Adapted from preact-virtual-list: https://github.com/developit/preact-virtual-list\n *\n * \u00A9 2016 Jason Miller\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * Adaptations:\n * - Added role=presentation to helper elements\n * - Tweaked styles for Uppy's Dashboard use case\n */\nconst {\n  h,\n  Component\n} = require('preact');\n\nconst STYLE_INNER = {\n  position: 'relative',\n  // Disabled for our use case: the wrapper elements around FileList already deal with overflow,\n  // and this additional property would hide things that we want to show.\n  //\n  // overflow: 'hidden',\n  width: '100%',\n  minHeight: '100%'\n};\nconst STYLE_CONTENT = {\n  position: 'absolute',\n  top: 0,\n  left: 0,\n  // Because the `top` value gets set to some offset, this `height` being 100% would make the scrollbar\n  // stretch far beyond the content. For our use case, the content div actually can get its height from\n  // the elements inside it, so we don't need to specify a `height` property at all.\n  //\n  // height: '100%',\n  width: '100%',\n  overflow: 'visible'\n};\n\nclass VirtualList extends Component {\n  constructor(props) {\n    super(props); // The currently focused node, used to retain focus when the visible rows change.\n    // To avoid update loops, this should not cause state updates, so it's kept as a plain property.\n\n    this.handleScroll = () => {\n      this.setState({\n        offset: this.base.scrollTop\n      });\n    };\n\n    this.handleResize = () => {\n      this.resize();\n    };\n\n    this.focusElement = null;\n    this.state = {\n      offset: 0,\n      height: 0\n    };\n  }\n\n  componentDidMount() {\n    this.resize();\n    window.addEventListener('resize', this.handleResize);\n  } // TODO: refactor to stable lifecycle method\n  // eslint-disable-next-line\n\n\n  componentWillUpdate() {\n    if (this.base.contains(document.activeElement)) {\n      this.focusElement = document.activeElement;\n    }\n  }\n\n  componentDidUpdate() {\n    // Maintain focus when rows are added and removed.\n    if (this.focusElement && this.focusElement.parentNode && document.activeElement !== this.focusElement) {\n      this.focusElement.focus();\n    }\n\n    this.focusElement = null;\n    this.resize();\n  }\n\n  componentWillUnmount() {\n    window.removeEventListener('resize', this.handleResize);\n  }\n\n  resize() {\n    const {\n      height\n    } = this.state;\n\n    if (height !== this.base.offsetHeight) {\n      this.setState({\n        height: this.base.offsetHeight\n      });\n    }\n  }\n\n  render(_ref) {\n    let {\n      data,\n      rowHeight,\n      renderRow,\n      overscanCount = 10,\n      ...props\n    } = _ref;\n    const {\n      offset,\n      height\n    } = this.state; // first visible row index\n\n    let start = Math.floor(offset / rowHeight); // actual number of visible rows (without overscan)\n\n    let visibleRowCount = Math.floor(height / rowHeight); // Overscan: render blocks of rows modulo an overscan row count\n    // This dramatically reduces DOM writes during scrolling\n\n    if (overscanCount) {\n      start = Math.max(0, start - start % overscanCount);\n      visibleRowCount += overscanCount;\n    } // last visible + overscan row index + padding to allow keyboard focus to travel past the visible area\n\n\n    const end = start + visibleRowCount + 4; // data slice currently in viewport plus overscan items\n\n    const selection = data.slice(start, end);\n    const styleInner = { ...STYLE_INNER,\n      height: data.length * rowHeight\n    };\n    const styleContent = { ...STYLE_CONTENT,\n      top: start * rowHeight\n    }; // The `role=\"presentation\"` attributes ensure that these wrapper elements are not treated as list\n    // items by accessibility and outline tools.\n\n    return h(\"div\", _extends({\n      onScroll: this.handleScroll\n    }, props), h(\"div\", {\n      role: \"presentation\",\n      style: styleInner\n    }, h(\"div\", {\n      role: \"presentation\",\n      style: styleContent\n    }, selection.map(renderRow))));\n  }\n\n}\n\nmodule.exports = VirtualList;", "\"use strict\";\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nconst classNames = require('classnames');\n\nconst {\n  h\n} = require('preact');\n\nconst FileItem = require('./FileItem/index.js');\n\nconst VirtualList = require('./VirtualList');\n\nfunction chunks(list, size) {\n  const chunked = [];\n  let currentChunk = [];\n  list.forEach(item => {\n    if (currentChunk.length < size) {\n      currentChunk.push(item);\n    } else {\n      chunked.push(currentChunk);\n      currentChunk = [item];\n    }\n  });\n  if (currentChunk.length) chunked.push(currentChunk);\n  return chunked;\n}\n\nmodule.exports = props => {\n  const noFiles = props.totalFileCount === 0;\n  const dashboardFilesClass = classNames('uppy-Dashboard-files', {\n    'uppy-Dashboard-files--noFiles': noFiles\n  }); // It's not great that this is hardcoded!\n  // It's ESPECIALLY not great that this is checking against `itemsPerRow`!\n\n  const rowHeight = props.itemsPerRow === 1 // Mobile\n  ? 71 // 190px height + 2 * 5px margin\n  : 200;\n  const fileProps = {\n    // FIXME This is confusing, it's actually the Dashboard's plugin ID\n    id: props.id,\n    error: props.error,\n    // TODO move this to context\n    i18n: props.i18n,\n    uppy: props.uppy,\n    // features\n    acquirers: props.acquirers,\n    resumableUploads: props.resumableUploads,\n    individualCancellation: props.individualCancellation,\n    // visual options\n    hideRetryButton: props.hideRetryButton,\n    hidePauseResumeButton: props.hidePauseResumeButton,\n    hideCancelButton: props.hideCancelButton,\n    showLinkToFileUploadResult: props.showLinkToFileUploadResult,\n    showRemoveButtonAfterComplete: props.showRemoveButtonAfterComplete,\n    isWide: props.isWide,\n    metaFields: props.metaFields,\n    recoveredState: props.recoveredState,\n    // callbacks\n    toggleFileCard: props.toggleFileCard,\n    handleRequestThumbnail: props.handleRequestThumbnail,\n    handleCancelThumbnail: props.handleCancelThumbnail\n  };\n\n  const sortByGhostComesFirst = (file1, file2) => {\n    return props.files[file2].isGhost - props.files[file1].isGhost;\n  }; // Sort files by file.isGhost, ghost files first, only if recoveredState is present\n\n\n  const files = Object.keys(props.files);\n  if (props.recoveredState) files.sort(sortByGhostComesFirst);\n  const rows = chunks(files, props.itemsPerRow);\n\n  const renderRow = row => // The `role=\"presentation` attribute ensures that the list items are properly\n  // associated with the `VirtualList` element.\n  // We use the first file ID as the key\u2014this should not change across scroll rerenders\n  h(\"div\", {\n    role: \"presentation\",\n    key: row[0]\n  }, row.map(fileID => h(FileItem, _extends({\n    key: fileID,\n    uppy: props.uppy\n  }, fileProps, {\n    role: \"listitem\",\n    openFileEditor: props.openFileEditor,\n    canEditFile: props.canEditFile,\n    toggleAddFilesPanel: props.toggleAddFilesPanel,\n    file: props.files[fileID]\n  }))));\n\n  return h(VirtualList, {\n    class: dashboardFilesClass,\n    role: \"list\",\n    data: rows,\n    renderRow: renderRow,\n    rowHeight: rowHeight\n  });\n};", "\"use strict\";\n\nlet _Symbol$for;\n\nconst {\n  h,\n  Component\n} = require('preact');\n\n_Symbol$for = Symbol.for('uppy test: disable unused locale key warning');\n\nclass AddFiles extends Component {\n  constructor() {\n    super(...arguments);\n\n    this.triggerFileInputClick = () => {\n      this.fileInput.click();\n    };\n\n    this.triggerFolderInputClick = () => {\n      this.folderInput.click();\n    };\n\n    this.onFileInputChange = event => {\n      this.props.handleInputChange(event); // We clear the input after a file is selected, because otherwise\n      // change event is not fired in Chrome and Safari when a file\n      // with the same name is selected.\n      // ___Why not use value=\"\" on <input/> instead?\n      //    Because if we use that method of clearing the input,\n      //    Chrome will not trigger change if we drop the same file twice (Issue #768).\n\n      event.target.value = null;\n    };\n\n    this.renderHiddenInput = (isFolder, refCallback) => {\n      return h(\"input\", {\n        className: \"uppy-Dashboard-input\",\n        hidden: true,\n        \"aria-hidden\": \"true\",\n        tabIndex: -1,\n        webkitdirectory: isFolder,\n        type: \"file\",\n        name: \"files[]\",\n        multiple: this.props.maxNumberOfFiles !== 1,\n        onChange: this.onFileInputChange,\n        accept: this.props.allowedFileTypes,\n        ref: refCallback\n      });\n    };\n\n    this.renderMyDeviceAcquirer = () => {\n      return h(\"div\", {\n        className: \"uppy-DashboardTab\",\n        role: \"presentation\",\n        \"data-uppy-acquirer-id\": \"MyDevice\"\n      }, h(\"button\", {\n        type: \"button\",\n        className: \"uppy-u-reset uppy-c-btn uppy-DashboardTab-btn\",\n        role: \"tab\",\n        tabIndex: 0,\n        \"data-uppy-super-focusable\": true,\n        onClick: this.triggerFileInputClick\n      }, h(\"svg\", {\n        \"aria-hidden\": \"true\",\n        focusable: \"false\",\n        width: \"32\",\n        height: \"32\",\n        viewBox: \"0 0 32 32\"\n      }, h(\"g\", {\n        fill: \"none\",\n        fillRule: \"evenodd\"\n      }, h(\"rect\", {\n        className: \"uppy-ProviderIconBg\",\n        width: \"32\",\n        height: \"32\",\n        rx: \"16\",\n        fill: \"#2275D7\"\n      }), h(\"path\", {\n        d: \"M21.973 21.152H9.863l-1.108-5.087h14.464l-1.246 5.087zM9.935 11.37h3.958l.886 1.444a.673.673 0 0 0 .585.316h6.506v1.37H9.935v-3.13zm14.898 3.44a.793.793 0 0 0-.616-.31h-.978v-2.126c0-.379-.275-.613-.653-.613H15.75l-.886-1.445a.673.673 0 0 0-.585-.316H9.232c-.378 0-.667.209-.667.587V14.5h-.782a.793.793 0 0 0-.61.303.795.795 0 0 0-.155.663l1.45 6.633c.078.36.396.618.764.618h13.354c.36 0 .674-.246.76-.595l1.631-6.636a.795.795 0 0 0-.144-.675z\",\n        fill: \"#FFF\"\n      }))), h(\"div\", {\n        className: \"uppy-DashboardTab-name\"\n      }, this.props.i18n('myDevice'))));\n    };\n\n    this.renderBrowseButton = (text, onClickFn) => {\n      const numberOfAcquirers = this.props.acquirers.length;\n      return h(\"button\", {\n        type: \"button\",\n        className: \"uppy-u-reset uppy-Dashboard-browse\",\n        onClick: onClickFn,\n        \"data-uppy-super-focusable\": numberOfAcquirers === 0\n      }, text);\n    };\n\n    this.renderDropPasteBrowseTagline = () => {\n      const numberOfAcquirers = this.props.acquirers.length;\n      const browseFiles = this.renderBrowseButton(this.props.i18n('browseFiles'), this.triggerFileInputClick);\n      const browseFolders = this.renderBrowseButton(this.props.i18n('browseFolders'), this.triggerFolderInputClick); // in order to keep the i18n CamelCase and options lower (as are defaults) we will want to transform a lower\n      // to Camel\n\n      const lowerFMSelectionType = this.props.fileManagerSelectionType;\n      const camelFMSelectionType = lowerFMSelectionType.charAt(0).toUpperCase() + lowerFMSelectionType.slice(1);\n      return h(\"div\", {\n        class: \"uppy-Dashboard-AddFiles-title\"\n      }, // eslint-disable-next-line no-nested-ternary\n      this.props.disableLocalFiles ? this.props.i18n('importFiles') : numberOfAcquirers > 0 ? this.props.i18nArray(`dropPasteImport${camelFMSelectionType}`, {\n        browseFiles,\n        browseFolders,\n        browse: browseFiles\n      }) : this.props.i18nArray(`dropPaste${camelFMSelectionType}`, {\n        browseFiles,\n        browseFolders,\n        browse: browseFiles\n      }));\n    };\n\n    this.renderAcquirer = acquirer => {\n      return h(\"div\", {\n        className: \"uppy-DashboardTab\",\n        role: \"presentation\",\n        \"data-uppy-acquirer-id\": acquirer.id\n      }, h(\"button\", {\n        type: \"button\",\n        className: \"uppy-u-reset uppy-c-btn uppy-DashboardTab-btn\",\n        role: \"tab\",\n        tabIndex: 0,\n        \"aria-controls\": `uppy-DashboardContent-panel--${acquirer.id}`,\n        \"aria-selected\": this.props.activePickerPanel.id === acquirer.id,\n        \"data-uppy-super-focusable\": true,\n        onClick: () => this.props.showPanel(acquirer.id)\n      }, acquirer.icon(), h(\"div\", {\n        className: \"uppy-DashboardTab-name\"\n      }, acquirer.name)));\n    };\n\n    this.renderAcquirers = (acquirers, disableLocalFiles) => {\n      // Group last two buttons, so we don\u2019t end up with\n      // just one button on a new line\n      const acquirersWithoutLastTwo = [...acquirers];\n      const lastTwoAcquirers = acquirersWithoutLastTwo.splice(acquirers.length - 2, acquirers.length);\n      return h(\"div\", {\n        className: \"uppy-Dashboard-AddFiles-list\",\n        role: \"tablist\"\n      }, !disableLocalFiles && this.renderMyDeviceAcquirer(), acquirersWithoutLastTwo.map(acquirer => this.renderAcquirer(acquirer)), h(\"span\", {\n        role: \"presentation\",\n        style: {\n          'white-space': 'nowrap'\n        }\n      }, lastTwoAcquirers.map(acquirer => this.renderAcquirer(acquirer))));\n    };\n  }\n\n  [_Symbol$for]() {\n    // Those are actually used in `renderDropPasteBrowseTagline` method.\n    this.props.i18nArray('dropPasteBoth');\n    this.props.i18nArray('dropPasteFiles');\n    this.props.i18nArray('dropPasteFolders');\n    this.props.i18nArray('dropPasteImportBoth');\n    this.props.i18nArray('dropPasteImportFiles');\n    this.props.i18nArray('dropPasteImportFolders');\n  }\n\n  renderPoweredByUppy() {\n    const {\n      i18nArray\n    } = this.props;\n    const uppyBranding = h(\"span\", null, h(\"svg\", {\n      \"aria-hidden\": \"true\",\n      focusable: \"false\",\n      className: \"uppy-c-icon uppy-Dashboard-poweredByIcon\",\n      width: \"11\",\n      height: \"11\",\n      viewBox: \"0 0 11 11\"\n    }, h(\"path\", {\n      d: \"M7.365 10.5l-.01-4.045h2.612L5.5.806l-4.467 5.65h2.604l.01 4.044h3.718z\",\n      fillRule: \"evenodd\"\n    })), h(\"span\", {\n      className: \"uppy-Dashboard-poweredByUppy\"\n    }, \"Uppy\"));\n    const linkText = i18nArray('poweredBy', {\n      uppy: uppyBranding\n    });\n    return h(\"a\", {\n      tabIndex: \"-1\",\n      href: \"https://uppy.io\",\n      rel: \"noreferrer noopener\",\n      target: \"_blank\",\n      className: \"uppy-Dashboard-poweredBy\"\n    }, linkText);\n  }\n\n  render() {\n    return h(\"div\", {\n      className: \"uppy-Dashboard-AddFiles\"\n    }, this.renderHiddenInput(false, ref => {\n      this.fileInput = ref;\n    }), this.renderHiddenInput(true, ref => {\n      this.folderInput = ref;\n    }), this.renderDropPasteBrowseTagline(), this.props.acquirers.length > 0 && this.renderAcquirers(this.props.acquirers, this.props.disableLocalFiles), h(\"div\", {\n      className: \"uppy-Dashboard-AddFiles-info\"\n    }, this.props.note && h(\"div\", {\n      className: \"uppy-Dashboard-note\"\n    }, this.props.note), this.props.proudlyDisplayPoweredByUppy && this.renderPoweredByUppy(this.props)));\n  }\n\n}\n\nmodule.exports = AddFiles;", "\"use strict\";\n\nconst {\n  h\n} = require('preact');\n\nconst classNames = require('classnames');\n\nconst AddFiles = require('./AddFiles');\n\nconst AddFilesPanel = props => {\n  return h(\"div\", {\n    className: classNames('uppy-Dashboard-AddFilesPanel', props.className),\n    \"data-uppy-panelType\": \"AddFiles\",\n    \"aria-hidden\": props.showAddFilesPanel\n  }, h(\"div\", {\n    className: \"uppy-DashboardContent-bar\"\n  }, h(\"div\", {\n    className: \"uppy-DashboardContent-title\",\n    role: \"heading\",\n    \"aria-level\": \"1\"\n  }, props.i18n('addingMoreFiles')), h(\"button\", {\n    className: \"uppy-DashboardContent-back\",\n    type: \"button\",\n    onClick: () => props.toggleAddFilesPanel(false)\n  }, props.i18n('back'))), h(AddFiles, props));\n};\n\nmodule.exports = AddFilesPanel;", "\"use strict\";\n\n// ignore drop/paste events if they are not in input or textarea \u2014\n// otherwise when Url plugin adds drop/paste listeners to this.el,\n// draging UI elements or pasting anything into any field triggers those events \u2014\n// Url treats them as URLs that need to be imported\nfunction ignoreEvent(ev) {\n  const {\n    tagName\n  } = ev.target;\n\n  if (tagName === 'INPUT' || tagName === 'TEXTAREA') {\n    ev.stopPropagation();\n    return;\n  }\n\n  ev.preventDefault();\n  ev.stopPropagation();\n}\n\nmodule.exports = ignoreEvent;", "\"use strict\";\n\nconst {\n  h\n} = require('preact');\n\nconst classNames = require('classnames');\n\nconst ignoreEvent = require('../utils/ignoreEvent.js');\n\nfunction PickerPanelContent(props) {\n  return h(\"div\", {\n    className: classNames('uppy-DashboardContent-panel', props.className),\n    role: \"tabpanel\",\n    \"data-uppy-panelType\": \"PickerPanel\",\n    id: `uppy-DashboardContent-panel--${props.activePickerPanel.id}`,\n    onDragOver: ignoreEvent,\n    onDragLeave: ignoreEvent,\n    onDrop: ignoreEvent,\n    onPaste: ignoreEvent\n  }, h(\"div\", {\n    className: \"uppy-DashboardContent-bar\"\n  }, h(\"div\", {\n    className: \"uppy-DashboardContent-title\",\n    role: \"heading\",\n    \"aria-level\": \"1\"\n  }, props.i18n('importFrom', {\n    name: props.activePickerPanel.name\n  })), h(\"button\", {\n    className: \"uppy-DashboardContent-back\",\n    type: \"button\",\n    onClick: props.hideAllPanels\n  }, props.i18n('cancel'))), h(\"div\", {\n    className: \"uppy-DashboardContent-panelBody\"\n  }, props.uppy.getPlugin(props.activePickerPanel.id).render(props.state)));\n}\n\nmodule.exports = PickerPanelContent;", "\"use strict\";\n\nconst {\n  h\n} = require('preact');\n\nconst classNames = require('classnames');\n\nfunction EditorPanel(props) {\n  const file = props.files[props.fileCardFor];\n  return h(\"div\", {\n    className: classNames('uppy-DashboardContent-panel', props.className),\n    role: \"tabpanel\",\n    \"data-uppy-panelType\": \"FileEditor\",\n    id: \"uppy-DashboardContent-panel--editor\"\n  }, h(\"div\", {\n    className: \"uppy-DashboardContent-bar\"\n  }, h(\"div\", {\n    className: \"uppy-DashboardContent-title\",\n    role: \"heading\",\n    \"aria-level\": \"1\"\n  }, props.i18nArray('editing', {\n    file: h(\"span\", {\n      className: \"uppy-DashboardContent-titleFile\"\n    }, file.meta ? file.meta.name : file.name)\n  })), h(\"button\", {\n    className: \"uppy-DashboardContent-back\",\n    type: \"button\",\n    onClick: props.hideAllPanels\n  }, props.i18n('cancel')), h(\"button\", {\n    className: \"uppy-DashboardContent-save\",\n    type: \"button\",\n    onClick: props.saveFileEditor\n  }, props.i18n('save'))), h(\"div\", {\n    className: \"uppy-DashboardContent-panelBody\"\n  }, props.editors.map(target => {\n    return props.uppy.getPlugin(target.id).render(props.state);\n  })));\n}\n\nmodule.exports = EditorPanel;", "\"use strict\";\n\nconst {\n  h\n} = require('preact');\n\nconst uploadStates = {\n  STATE_ERROR: 'error',\n  STATE_WAITING: 'waiting',\n  STATE_PREPROCESSING: 'preprocessing',\n  STATE_UPLOADING: 'uploading',\n  STATE_POSTPROCESSING: 'postprocessing',\n  STATE_COMPLETE: 'complete',\n  STATE_PAUSED: 'paused'\n};\n\nfunction getUploadingState(isAllErrored, isAllComplete, isAllPaused, files) {\n  if (files === void 0) {\n    files = {};\n  }\n\n  if (isAllErrored) {\n    return uploadStates.STATE_ERROR;\n  }\n\n  if (isAllComplete) {\n    return uploadStates.STATE_COMPLETE;\n  }\n\n  if (isAllPaused) {\n    return uploadStates.STATE_PAUSED;\n  }\n\n  let state = uploadStates.STATE_WAITING;\n  const fileIDs = Object.keys(files);\n\n  for (let i = 0; i < fileIDs.length; i++) {\n    const {\n      progress\n    } = files[fileIDs[i]]; // If ANY files are being uploaded right now, show the uploading state.\n\n    if (progress.uploadStarted && !progress.uploadComplete) {\n      return uploadStates.STATE_UPLOADING;\n    } // If files are being preprocessed AND postprocessed at this time, we show the\n    // preprocess state. If any files are being uploaded we show uploading.\n\n\n    if (progress.preprocess && state !== uploadStates.STATE_UPLOADING) {\n      state = uploadStates.STATE_PREPROCESSING;\n    } // If NO files are being preprocessed or uploaded right now, but some files are\n    // being postprocessed, show the postprocess state.\n\n\n    if (progress.postprocess && state !== uploadStates.STATE_UPLOADING && state !== uploadStates.STATE_PREPROCESSING) {\n      state = uploadStates.STATE_POSTPROCESSING;\n    }\n  }\n\n  return state;\n}\n\nfunction UploadStatus(props) {\n  const uploadingState = getUploadingState(props.isAllErrored, props.isAllComplete, props.isAllPaused, props.files);\n\n  switch (uploadingState) {\n    case 'uploading':\n      return props.i18n('uploadingXFiles', {\n        smart_count: props.inProgressNotPausedFiles.length\n      });\n\n    case 'preprocessing':\n    case 'postprocessing':\n      return props.i18n('processingXFiles', {\n        smart_count: props.processingFiles.length\n      });\n\n    case 'paused':\n      return props.i18n('uploadPaused');\n\n    case 'waiting':\n      return props.i18n('xFilesSelected', {\n        smart_count: props.newFiles.length\n      });\n\n    case 'complete':\n      return props.i18n('uploadComplete');\n  }\n}\n\nfunction PanelTopBar(props) {\n  let {\n    allowNewUpload\n  } = props; // TODO maybe this should be done in ../index.js, then just pass that down as `allowNewUpload`\n\n  if (allowNewUpload && props.maxNumberOfFiles) {\n    allowNewUpload = props.totalFileCount < props.maxNumberOfFiles;\n  }\n\n  return h(\"div\", {\n    className: \"uppy-DashboardContent-bar\"\n  }, !props.isAllComplete && !props.hideCancelButton ? h(\"button\", {\n    className: \"uppy-DashboardContent-back\",\n    type: \"button\",\n    onClick: () => props.uppy.cancelAll()\n  }, props.i18n('cancel')) : h(\"div\", null), h(\"div\", {\n    className: \"uppy-DashboardContent-title\",\n    role: \"heading\",\n    \"aria-level\": \"1\"\n  }, h(UploadStatus, props)), allowNewUpload ? h(\"button\", {\n    className: \"uppy-DashboardContent-addMore\",\n    type: \"button\",\n    \"aria-label\": props.i18n('addMoreFiles'),\n    title: props.i18n('addMoreFiles'),\n    onClick: () => props.toggleAddFilesPanel(true)\n  }, h(\"svg\", {\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    className: \"uppy-c-icon\",\n    width: \"15\",\n    height: \"15\",\n    viewBox: \"0 0 15 15\"\n  }, h(\"path\", {\n    d: \"M8 6.5h6a.5.5 0 0 1 .5.5v.5a.5.5 0 0 1-.5.5H8v6a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V8h-6a.5.5 0 0 1-.5-.5V7a.5.5 0 0 1 .5-.5h6v-6A.5.5 0 0 1 7 0h.5a.5.5 0 0 1 .5.5v6z\"\n  })), h(\"span\", {\n    className: \"uppy-DashboardContent-addMoreCaption\"\n  }, props.i18n('addMore'))) : h(\"div\", null));\n}\n\nmodule.exports = PanelTopBar;", "\"use strict\";\n\nconst {\n  h,\n  Component\n} = require('preact');\n\nconst classNames = require('classnames');\n\nconst {\n  nanoid\n} = require('nanoid/non-secure');\n\nconst getFileTypeIcon = require('../../utils/getFileTypeIcon');\n\nconst ignoreEvent = require('../../utils/ignoreEvent.js');\n\nconst FilePreview = require('../FilePreview');\n\nclass FileCard extends Component {\n  constructor(props) {\n    super(props);\n    this.form = document.createElement('form');\n\n    this.updateMeta = (newVal, name) => {\n      this.setState(_ref => {\n        let {\n          formState\n        } = _ref;\n        return {\n          formState: { ...formState,\n            [name]: newVal\n          }\n        };\n      });\n    };\n\n    this.handleSave = e => {\n      e.preventDefault();\n      const fileID = this.props.fileCardFor;\n      this.props.saveFileCard(this.state.formState, fileID);\n    };\n\n    this.handleCancel = () => {\n      this.props.toggleFileCard(false);\n    };\n\n    this.saveOnEnter = ev => {\n      if (ev.keyCode === 13) {\n        ev.stopPropagation();\n        ev.preventDefault();\n        const file = this.props.files[this.props.fileCardFor];\n        this.props.saveFileCard(this.state.formState, file.id);\n      }\n    };\n\n    this.renderMetaFields = () => {\n      const metaFields = this.getMetaFields() || [];\n      const fieldCSSClasses = {\n        text: 'uppy-u-reset uppy-c-textInput uppy-Dashboard-FileCard-input'\n      };\n      return metaFields.map(field => {\n        const id = `uppy-Dashboard-FileCard-input-${field.id}`;\n        const required = this.props.requiredMetaFields.includes(field.id);\n        return h(\"fieldset\", {\n          key: field.id,\n          className: \"uppy-Dashboard-FileCard-fieldset\"\n        }, h(\"label\", {\n          className: \"uppy-Dashboard-FileCard-label\",\n          htmlFor: id\n        }, field.name), field.render !== undefined ? field.render({\n          value: this.state.formState[field.id],\n          onChange: newVal => this.updateMeta(newVal, field.id),\n          fieldCSSClasses,\n          required,\n          form: this.form.id\n        }, h) : h(\"input\", {\n          className: fieldCSSClasses.text,\n          id: id,\n          form: this.form.id,\n          type: field.type || 'text',\n          required: required,\n          value: this.state.formState[field.id],\n          placeholder: field.placeholder // If `form` attribute is not supported, we need to capture pressing Enter to avoid bubbling in case Uppy is\n          // embedded inside a <form>.\n          ,\n          onKeyUp: 'form' in HTMLInputElement.prototype ? undefined : this.saveOnEnter,\n          onKeyDown: 'form' in HTMLInputElement.prototype ? undefined : this.saveOnEnter,\n          onKeyPress: 'form' in HTMLInputElement.prototype ? undefined : this.saveOnEnter,\n          onInput: ev => this.updateMeta(ev.target.value, field.id),\n          \"data-uppy-super-focusable\": true\n        }));\n      });\n    };\n\n    const _file = this.props.files[this.props.fileCardFor];\n\n    const _metaFields = this.getMetaFields() || [];\n\n    const storedMetaData = {};\n\n    _metaFields.forEach(field => {\n      storedMetaData[field.id] = _file.meta[field.id] || '';\n    });\n\n    this.state = {\n      formState: storedMetaData\n    };\n    this.form.id = nanoid();\n  } // TODO(aduh95): move this to `UNSAFE_componentWillMount` when updating to Preact X+.\n\n\n  componentWillMount() {\n    // eslint-disable-line react/no-deprecated\n    this.form.addEventListener('submit', this.handleSave);\n    document.body.appendChild(this.form);\n  }\n\n  componentWillUnmount() {\n    this.form.removeEventListener('submit', this.handleSave);\n    document.body.removeChild(this.form);\n  }\n\n  getMetaFields() {\n    return typeof this.props.metaFields === 'function' ? this.props.metaFields(this.props.files[this.props.fileCardFor]) : this.props.metaFields;\n  }\n\n  render() {\n    const file = this.props.files[this.props.fileCardFor];\n    const showEditButton = this.props.canEditFile(file);\n    return h(\"div\", {\n      className: classNames('uppy-Dashboard-FileCard', this.props.className),\n      \"data-uppy-panelType\": \"FileCard\",\n      onDragOver: ignoreEvent,\n      onDragLeave: ignoreEvent,\n      onDrop: ignoreEvent,\n      onPaste: ignoreEvent\n    }, h(\"div\", {\n      className: \"uppy-DashboardContent-bar\"\n    }, h(\"div\", {\n      className: \"uppy-DashboardContent-title\",\n      role: \"heading\",\n      \"aria-level\": \"1\"\n    }, this.props.i18nArray('editing', {\n      file: h(\"span\", {\n        className: \"uppy-DashboardContent-titleFile\"\n      }, file.meta ? file.meta.name : file.name)\n    })), h(\"button\", {\n      className: \"uppy-DashboardContent-back\",\n      type: \"button\",\n      form: this.form.id,\n      title: this.props.i18n('finishEditingFile'),\n      onClick: this.handleCancel\n    }, this.props.i18n('cancel'))), h(\"div\", {\n      className: \"uppy-Dashboard-FileCard-inner\"\n    }, h(\"div\", {\n      className: \"uppy-Dashboard-FileCard-preview\",\n      style: {\n        backgroundColor: getFileTypeIcon(file.type).color\n      }\n    }, h(FilePreview, {\n      file: file\n    }), showEditButton && h(\"button\", {\n      type: \"button\",\n      className: \"uppy-u-reset uppy-c-btn uppy-Dashboard-FileCard-edit\",\n      onClick: event => {\n        // When opening the image editor we want to save any meta fields changes.\n        // Otherwise it's confusing for the user to click save in the editor,\n        // but the changes here are discarded. This bypasses validation,\n        // but we are okay with that.\n        this.handleSave(event);\n        this.props.openFileEditor(file);\n      },\n      form: this.form.id\n    }, this.props.i18n('editFile'))), h(\"div\", {\n      className: \"uppy-Dashboard-FileCard-info\"\n    }, this.renderMetaFields()), h(\"div\", {\n      className: \"uppy-Dashboard-FileCard-actions\"\n    }, h(\"button\", {\n      className: \"uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Dashboard-FileCard-actionsBtn\" // If `form` attribute is supported, we want a submit button to trigger the form validation.\n      // Otherwise, fallback to a classic button with a onClick event handler.\n      ,\n      type: 'form' in HTMLButtonElement.prototype ? 'submit' : 'button',\n      onClick: 'form' in HTMLButtonElement.prototype ? undefined : this.handleSave,\n      form: this.form.id\n    }, this.props.i18n('saveChanges')), h(\"button\", {\n      className: \"uppy-u-reset uppy-c-btn uppy-c-btn-link uppy-Dashboard-FileCard-actionsBtn\",\n      type: \"button\",\n      onClick: this.handleCancel,\n      form: this.form.id\n    }, this.props.i18n('cancel')))));\n  }\n\n}\n\nmodule.exports = FileCard;", "\"use strict\";\n\nconst {\n  cloneElement,\n  Component,\n  toChildArray\n} = require('preact');\n\nconst classNames = require('classnames');\n\nconst transitionName = 'uppy-transition-slideDownUp';\nconst duration = 250;\n/**\n * Vertical slide transition.\n *\n * This can take a _single_ child component, which _must_ accept a `className` prop.\n *\n * Currently this is specific to the `uppy-transition-slideDownUp` transition,\n * but it should be simple to extend this for any type of single-element\n * transition by setting the CSS name and duration as props.\n */\n\nclass Slide extends Component {\n  constructor(props) {\n    super(props);\n    this.state = {\n      cachedChildren: null,\n      className: ''\n    };\n  } // TODO: refactor to stable lifecycle method\n  // eslint-disable-next-line\n\n\n  componentWillUpdate(nextProps) {\n    const {\n      cachedChildren\n    } = this.state;\n    const child = toChildArray(nextProps.children)[0];\n    if (cachedChildren === child) return null;\n    const patch = {\n      cachedChildren: child\n    }; // Enter transition\n\n    if (child && !cachedChildren) {\n      patch.className = `${transitionName}-enter`;\n      cancelAnimationFrame(this.animationFrame);\n      clearTimeout(this.leaveTimeout);\n      this.leaveTimeout = undefined;\n      this.animationFrame = requestAnimationFrame(() => {\n        // Force it to render before we add the active class\n        // this.base.getBoundingClientRect()\n        this.setState({\n          className: `${transitionName}-enter ${transitionName}-enter-active`\n        });\n        this.enterTimeout = setTimeout(() => {\n          this.setState({\n            className: ''\n          });\n        }, duration);\n      });\n    } // Leave transition\n\n\n    if (cachedChildren && !child && this.leaveTimeout === undefined) {\n      patch.cachedChildren = cachedChildren;\n      patch.className = `${transitionName}-leave`;\n      cancelAnimationFrame(this.animationFrame);\n      clearTimeout(this.enterTimeout);\n      this.enterTimeout = undefined;\n      this.animationFrame = requestAnimationFrame(() => {\n        this.setState({\n          className: `${transitionName}-leave ${transitionName}-leave-active`\n        });\n        this.leaveTimeout = setTimeout(() => {\n          this.setState({\n            cachedChildren: null,\n            className: ''\n          });\n        }, duration);\n      });\n    } // eslint-disable-next-line\n\n\n    this.setState(patch);\n  }\n\n  render() {\n    const {\n      cachedChildren,\n      className\n    } = this.state;\n\n    if (!cachedChildren) {\n      return null;\n    }\n\n    return cloneElement(cachedChildren, {\n      className: classNames(className, cachedChildren.props.className)\n    });\n  }\n\n}\n\nmodule.exports = Slide;", "\"use strict\";\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nconst {\n  h\n} = require('preact');\n\nconst classNames = require('classnames');\n\nconst isDragDropSupported = require('@uppy/utils/lib/isDragDropSupported');\n\nconst FileList = require('./FileList');\n\nconst AddFiles = require('./AddFiles');\n\nconst AddFilesPanel = require('./AddFilesPanel');\n\nconst PickerPanelContent = require('./PickerPanelContent');\n\nconst EditorPanel = require('./EditorPanel');\n\nconst PanelTopBar = require('./PickerPanelTopBar');\n\nconst FileCard = require('./FileCard');\n\nconst Slide = require('./Slide'); // http://dev.edenspiekermann.com/2016/02/11/introducing-accessible-modal-dialog\n// https://github.com/ghosh/micromodal\n\n\nconst WIDTH_XL = 900;\nconst WIDTH_LG = 700;\nconst WIDTH_MD = 576;\nconst HEIGHT_MD = 400;\n\nmodule.exports = function Dashboard(props) {\n  const noFiles = props.totalFileCount === 0;\n  const isSizeMD = props.containerWidth > WIDTH_MD;\n  const wrapperClassName = classNames({\n    'uppy-Root': props.isTargetDOMEl\n  });\n  const dashboardClassName = classNames({\n    'uppy-Dashboard': true,\n    'uppy-Dashboard--isDisabled': props.disabled,\n    'uppy-Dashboard--animateOpenClose': props.animateOpenClose,\n    'uppy-Dashboard--isClosing': props.isClosing,\n    'uppy-Dashboard--isDraggingOver': props.isDraggingOver,\n    'uppy-Dashboard--modal': !props.inline,\n    'uppy-size--md': props.containerWidth > WIDTH_MD,\n    'uppy-size--lg': props.containerWidth > WIDTH_LG,\n    'uppy-size--xl': props.containerWidth > WIDTH_XL,\n    'uppy-size--height-md': props.containerHeight > HEIGHT_MD,\n    'uppy-Dashboard--isAddFilesPanelVisible': props.showAddFilesPanel,\n    'uppy-Dashboard--isInnerWrapVisible': props.areInsidesReadyToBeVisible\n  }); // Important: keep these in sync with the percent width values in `src/components/FileItem/index.scss`.\n\n  let itemsPerRow = 1; // mobile\n\n  if (props.containerWidth > WIDTH_XL) {\n    itemsPerRow = 5;\n  } else if (props.containerWidth > WIDTH_LG) {\n    itemsPerRow = 4;\n  } else if (props.containerWidth > WIDTH_MD) {\n    itemsPerRow = 3;\n  }\n\n  const showFileList = props.showSelectedFiles && !noFiles;\n  const numberOfFilesForRecovery = props.recoveredState ? Object.keys(props.recoveredState.files).length : null;\n  const numberOfGhosts = props.files ? Object.keys(props.files).filter(fileID => props.files[fileID].isGhost).length : null;\n\n  const renderRestoredText = () => {\n    if (numberOfGhosts > 0) {\n      return props.i18n('recoveredXFiles', {\n        smart_count: numberOfGhosts\n      });\n    }\n\n    return props.i18n('recoveredAllFiles');\n  };\n\n  const dashboard = h(\"div\", {\n    className: dashboardClassName,\n    \"data-uppy-theme\": props.theme,\n    \"data-uppy-num-acquirers\": props.acquirers.length,\n    \"data-uppy-drag-drop-supported\": !props.disableLocalFiles && isDragDropSupported(),\n    \"aria-hidden\": props.inline ? 'false' : props.isHidden,\n    \"aria-disabled\": props.disabled,\n    \"aria-label\": !props.inline ? props.i18n('dashboardWindowTitle') : props.i18n('dashboardTitle'),\n    onPaste: props.handlePaste,\n    onDragOver: props.handleDragOver,\n    onDragLeave: props.handleDragLeave,\n    onDrop: props.handleDrop\n  }, h(\"div\", {\n    \"aria-hidden\": \"true\",\n    className: \"uppy-Dashboard-overlay\",\n    tabIndex: -1,\n    onClick: props.handleClickOutside\n  }), h(\"div\", {\n    className: \"uppy-Dashboard-inner\",\n    \"aria-modal\": !props.inline && 'true',\n    role: !props.inline && 'dialog',\n    style: {\n      width: props.inline && props.width ? props.width : '',\n      height: props.inline && props.height ? props.height : ''\n    }\n  }, !props.inline ? h(\"button\", {\n    className: \"uppy-u-reset uppy-Dashboard-close\",\n    type: \"button\",\n    \"aria-label\": props.i18n('closeModal'),\n    title: props.i18n('closeModal'),\n    onClick: props.closeModal\n  }, h(\"span\", {\n    \"aria-hidden\": \"true\"\n  }, \"\\xD7\")) : null, h(\"div\", {\n    className: \"uppy-Dashboard-innerWrap\"\n  }, h(\"div\", {\n    className: \"uppy-Dashboard-dropFilesHereHint\"\n  }, props.i18n('dropHint')), showFileList && h(PanelTopBar, props), numberOfFilesForRecovery && h(\"div\", {\n    className: \"uppy-Dashboard-serviceMsg\"\n  }, h(\"svg\", {\n    className: \"uppy-Dashboard-serviceMsg-icon\",\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    width: \"21\",\n    height: \"16\",\n    viewBox: \"0 0 24 19\"\n  }, h(\"g\", {\n    transform: \"translate(0 -1)\",\n    fill: \"none\",\n    fillRule: \"evenodd\"\n  }, h(\"path\", {\n    d: \"M12.857 1.43l10.234 17.056A1 1 0 0122.234 20H1.766a1 1 0 01-.857-1.514L11.143 1.429a1 1 0 011.714 0z\",\n    fill: \"#FFD300\"\n  }), h(\"path\", {\n    fill: \"#000\",\n    d: \"M11 6h2l-.3 8h-1.4z\"\n  }), h(\"circle\", {\n    fill: \"#000\",\n    cx: \"12\",\n    cy: \"17\",\n    r: \"1\"\n  }))), h(\"strong\", {\n    className: \"uppy-Dashboard-serviceMsg-title\"\n  }, props.i18n('sessionRestored')), h(\"div\", {\n    className: \"uppy-Dashboard-serviceMsg-text\"\n  }, renderRestoredText())), showFileList ? h(FileList, _extends({}, props, {\n    itemsPerRow: itemsPerRow\n  })) : h(AddFiles, _extends({}, props, {\n    isSizeMD: isSizeMD\n  })), h(Slide, null, props.showAddFilesPanel ? h(AddFilesPanel, _extends({\n    key: \"AddFiles\"\n  }, props, {\n    isSizeMD: isSizeMD\n  })) : null), h(Slide, null, props.fileCardFor ? h(FileCard, _extends({\n    key: \"FileCard\"\n  }, props)) : null), h(Slide, null, props.activePickerPanel ? h(PickerPanelContent, _extends({\n    key: \"Picker\"\n  }, props)) : null), h(Slide, null, props.showFileEditor ? h(EditorPanel, _extends({\n    key: \"Editor\"\n  }, props)) : null), h(\"div\", {\n    className: \"uppy-Dashboard-progressindicators\"\n  }, props.progressindicators.map(target => {\n    return props.uppy.getPlugin(target.id).render(props.state);\n  })))));\n  return (// Wrap it for RTL language support\n    h(\"div\", {\n      className: wrapperClassName,\n      dir: props.direction\n    }, dashboard)\n  );\n};", "\"use strict\";\n\nmodule.exports = {\n  strings: {\n    // When `inline: false`, used as the screen reader label for the button that closes the modal.\n    closeModal: 'Close Modal',\n    // Used as the screen reader label for the plus (+) button that shows the \u201CAdd more files\u201D screen\n    addMoreFiles: 'Add more files',\n    addingMoreFiles: 'Adding more files',\n    // Used as the header for import panels, e.g., \u201CImport from Google Drive\u201D.\n    importFrom: 'Import from %{name}',\n    // When `inline: false`, used as the screen reader label for the dashboard modal.\n    dashboardWindowTitle: 'Uppy Dashboard Window (Press escape to close)',\n    // When `inline: true`, used as the screen reader label for the dashboard area.\n    dashboardTitle: 'Uppy Dashboard',\n    // Shown in the Informer when a link to a file was copied to the clipboard.\n    copyLinkToClipboardSuccess: 'Link copied to clipboard.',\n    // Used when a link cannot be copied automatically \u2014 the user has to select the text from the\n    // input element below this string.\n    copyLinkToClipboardFallback: 'Copy the URL below',\n    // Used as the hover title and screen reader label for buttons that copy a file link.\n    copyLink: 'Copy link',\n    back: 'Back',\n    // Used as the screen reader label for buttons that remove a file.\n    removeFile: 'Remove file',\n    // Used as the screen reader label for buttons that open the metadata editor panel for a file.\n    editFile: 'Edit file',\n    // Shown in the panel header for the metadata editor. Rendered as \u201CEditing image.png\u201D.\n    editing: 'Editing %{file}',\n    // Used as the screen reader label for the button that saves metadata edits and returns to the\n    // file list view.\n    finishEditingFile: 'Finish editing file',\n    saveChanges: 'Save changes',\n    // Used as the label for the tab button that opens the system file selection dialog.\n    myDevice: 'My Device',\n    dropHint: 'Drop your files here',\n    // Used as the hover text and screen reader label for file progress indicators when\n    // they have been fully uploaded.\n    uploadComplete: 'Upload complete',\n    uploadPaused: 'Upload paused',\n    // Used as the hover text and screen reader label for the buttons to resume paused uploads.\n    resumeUpload: 'Resume upload',\n    // Used as the hover text and screen reader label for the buttons to pause uploads.\n    pauseUpload: 'Pause upload',\n    // Used as the hover text and screen reader label for the buttons to retry failed uploads.\n    retryUpload: 'Retry upload',\n    // Used as the hover text and screen reader label for the buttons to cancel uploads.\n    cancelUpload: 'Cancel upload',\n    // Used in a title, how many files are currently selected\n    xFilesSelected: {\n      0: '%{smart_count} file selected',\n      1: '%{smart_count} files selected'\n    },\n    uploadingXFiles: {\n      0: 'Uploading %{smart_count} file',\n      1: 'Uploading %{smart_count} files'\n    },\n    processingXFiles: {\n      0: 'Processing %{smart_count} file',\n      1: 'Processing %{smart_count} files'\n    },\n    // The \"powered by Uppy\" link at the bottom of the Dashboard.\n    poweredBy: 'Powered by %{uppy}',\n    addMore: 'Add more',\n    editFileWithFilename: 'Edit file %{file}',\n    save: 'Save',\n    cancel: 'Cancel',\n    dropPasteFiles: 'Drop files here or %{browseFiles}',\n    dropPasteFolders: 'Drop files here or %{browseFolders}',\n    dropPasteBoth: 'Drop files here, %{browseFiles} or %{browseFolders}',\n    dropPasteImportFiles: 'Drop files here, %{browseFiles} or import from:',\n    dropPasteImportFolders: 'Drop files here, %{browseFolders} or import from:',\n    dropPasteImportBoth: 'Drop files here, %{browseFiles}, %{browseFolders} or import from:',\n    importFiles: 'Import files from:',\n    browseFiles: 'browse files',\n    browseFolders: 'browse folders',\n    recoveredXFiles: {\n      0: 'We could not fully recover 1 file. Please re-select it and resume the upload.',\n      1: 'We could not fully recover %{smart_count} files. Please re-select them and resume the upload.'\n    },\n    recoveredAllFiles: 'We restored all files. You can now resume the upload.',\n    sessionRestored: 'Session restored',\n    reSelect: 'Re-select',\n    missingRequiredMetaFields: {\n      0: 'Missing required meta field: %{fields}.',\n      1: 'Missing required meta fields: %{fields}.'\n    }\n  }\n};", "\"use strict\";\n\nvar _class, _openFileEditorWhenFilesAdded, _attachRenderFunctionToTarget, _isTargetSupported, _getAcquirers, _getProgressIndicators, _getEditors, _temp;\n\nfunction _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError(\"attempted to use private field on non-instance\"); } return receiver; }\n\nvar id = 0;\n\nfunction _classPrivateFieldLooseKey(name) { return \"__private_\" + id++ + \"_\" + name; }\n\nconst {\n  h\n} = require('preact');\n\nconst {\n  UIPlugin\n} = require('@uppy/core');\n\nconst StatusBar = require('@uppy/status-bar');\n\nconst Informer = require('@uppy/informer');\n\nconst ThumbnailGenerator = require('@uppy/thumbnail-generator');\n\nconst findAllDOMElements = require('@uppy/utils/lib/findAllDOMElements');\n\nconst toArray = require('@uppy/utils/lib/toArray');\n\nconst getDroppedFiles = require('@uppy/utils/lib/getDroppedFiles');\n\nconst getTextDirection = require('@uppy/utils/lib/getTextDirection');\n\nconst {\n  nanoid\n} = require('nanoid/non-secure');\n\nconst trapFocus = require('./utils/trapFocus');\n\nconst createSuperFocus = require('./utils/createSuperFocus');\n\nconst memoize = require('memoize-one').default || require('memoize-one');\n\nconst FOCUSABLE_ELEMENTS = require('@uppy/utils/lib/FOCUSABLE_ELEMENTS');\n\nconst DashboardUI = require('./components/Dashboard');\n\nconst locale = require('./locale');\n\nconst TAB_KEY = 9;\nconst ESC_KEY = 27;\n\nfunction createPromise() {\n  const o = {};\n  o.promise = new Promise((resolve, reject) => {\n    o.resolve = resolve;\n    o.reject = reject;\n  });\n  return o;\n}\n\nfunction defaultPickerIcon() {\n  return h(\"svg\", {\n    \"aria-hidden\": \"true\",\n    focusable: \"false\",\n    width: \"30\",\n    height: \"30\",\n    viewBox: \"0 0 30 30\"\n  }, h(\"path\", {\n    d: \"M15 30c8.284 0 15-6.716 15-15 0-8.284-6.716-15-15-15C6.716 0 0 6.716 0 15c0 8.284 6.716 15 15 15zm4.258-12.676v6.846h-8.426v-6.846H5.204l9.82-12.364 9.82 12.364H19.26z\"\n  }));\n}\n/**\n * Dashboard UI with previews, metadata editing, tabs for various services and more\n */\n\n\nmodule.exports = (_temp = (_openFileEditorWhenFilesAdded = /*#__PURE__*/_classPrivateFieldLooseKey(\"openFileEditorWhenFilesAdded\"), _attachRenderFunctionToTarget = /*#__PURE__*/_classPrivateFieldLooseKey(\"attachRenderFunctionToTarget\"), _isTargetSupported = /*#__PURE__*/_classPrivateFieldLooseKey(\"isTargetSupported\"), _getAcquirers = /*#__PURE__*/_classPrivateFieldLooseKey(\"getAcquirers\"), _getProgressIndicators = /*#__PURE__*/_classPrivateFieldLooseKey(\"getProgressIndicators\"), _getEditors = /*#__PURE__*/_classPrivateFieldLooseKey(\"getEditors\"), _class = class Dashboard extends UIPlugin {\n  constructor(uppy, _opts) {\n    var _this;\n\n    super(uppy, _opts);\n    _this = this;\n\n    this.removeTarget = plugin => {\n      const pluginState = this.getPluginState(); // filter out the one we want to remove\n\n      const newTargets = pluginState.targets.filter(target => target.id !== plugin.id);\n      this.setPluginState({\n        targets: newTargets\n      });\n    };\n\n    this.addTarget = plugin => {\n      const callerPluginId = plugin.id || plugin.constructor.name;\n      const callerPluginName = plugin.title || callerPluginId;\n      const callerPluginType = plugin.type;\n\n      if (callerPluginType !== 'acquirer' && callerPluginType !== 'progressindicator' && callerPluginType !== 'editor') {\n        const msg = 'Dashboard: can only be targeted by plugins of types: acquirer, progressindicator, editor';\n        this.uppy.log(msg, 'error');\n        return;\n      }\n\n      const target = {\n        id: callerPluginId,\n        name: callerPluginName,\n        type: callerPluginType\n      };\n      const state = this.getPluginState();\n      const newTargets = state.targets.slice();\n      newTargets.push(target);\n      this.setPluginState({\n        targets: newTargets\n      });\n      return this.el;\n    };\n\n    this.hideAllPanels = () => {\n      const state = this.getPluginState();\n      const update = {\n        activePickerPanel: false,\n        showAddFilesPanel: false,\n        activeOverlayType: null,\n        fileCardFor: null,\n        showFileEditor: false\n      };\n\n      if (state.activePickerPanel === update.activePickerPanel && state.showAddFilesPanel === update.showAddFilesPanel && state.showFileEditor === update.showFileEditor && state.activeOverlayType === update.activeOverlayType) {\n        // avoid doing a state update if nothing changed\n        return;\n      }\n\n      this.setPluginState(update);\n    };\n\n    this.showPanel = id => {\n      const {\n        targets\n      } = this.getPluginState();\n      const activePickerPanel = targets.filter(target => {\n        return target.type === 'acquirer' && target.id === id;\n      })[0];\n      this.setPluginState({\n        activePickerPanel,\n        activeOverlayType: 'PickerPanel'\n      });\n    };\n\n    this.canEditFile = file => {\n      const {\n        targets\n      } = this.getPluginState();\n\n      const editors = _classPrivateFieldLooseBase(this, _getEditors)[_getEditors](targets);\n\n      return editors.some(target => this.uppy.getPlugin(target.id).canEditFile(file));\n    };\n\n    this.openFileEditor = file => {\n      const {\n        targets\n      } = this.getPluginState();\n\n      const editors = _classPrivateFieldLooseBase(this, _getEditors)[_getEditors](targets);\n\n      this.setPluginState({\n        showFileEditor: true,\n        fileCardFor: file.id || null,\n        activeOverlayType: 'FileEditor'\n      });\n      editors.forEach(editor => {\n        this.uppy.getPlugin(editor.id).selectFile(file);\n      });\n    };\n\n    this.saveFileEditor = () => {\n      const {\n        targets\n      } = this.getPluginState();\n\n      const editors = _classPrivateFieldLooseBase(this, _getEditors)[_getEditors](targets);\n\n      editors.forEach(editor => {\n        this.uppy.getPlugin(editor.id).save();\n      });\n      this.hideAllPanels();\n    };\n\n    this.openModal = () => {\n      const {\n        promise,\n        resolve\n      } = createPromise(); // save scroll position\n\n      this.savedScrollPosition = window.pageYOffset; // save active element, so we can restore focus when modal is closed\n\n      this.savedActiveElement = document.activeElement;\n\n      if (this.opts.disablePageScrollWhenModalOpen) {\n        document.body.classList.add('uppy-Dashboard-isFixed');\n      }\n\n      if (this.opts.animateOpenClose && this.getPluginState().isClosing) {\n        const handler = () => {\n          this.setPluginState({\n            isHidden: false\n          });\n          this.el.removeEventListener('animationend', handler, false);\n          resolve();\n        };\n\n        this.el.addEventListener('animationend', handler, false);\n      } else {\n        this.setPluginState({\n          isHidden: false\n        });\n        resolve();\n      }\n\n      if (this.opts.browserBackButtonClose) {\n        this.updateBrowserHistory();\n      } // handle ESC and TAB keys in modal dialog\n\n\n      document.addEventListener('keydown', this.handleKeyDownInModal);\n      this.uppy.emit('dashboard:modal-open');\n      return promise;\n    };\n\n    this.closeModal = function (opts) {\n      if (opts === void 0) {\n        opts = {};\n      }\n\n      const {\n        // Whether the modal is being closed by the user (`true`) or by other means (e.g. browser back button)\n        manualClose = true\n      } = opts;\n\n      const {\n        isHidden,\n        isClosing\n      } = _this.getPluginState();\n\n      if (isHidden || isClosing) {\n        // short-circuit if animation is ongoing\n        return;\n      }\n\n      const {\n        promise,\n        resolve\n      } = createPromise();\n\n      if (_this.opts.disablePageScrollWhenModalOpen) {\n        document.body.classList.remove('uppy-Dashboard-isFixed');\n      }\n\n      if (_this.opts.animateOpenClose) {\n        _this.setPluginState({\n          isClosing: true\n        });\n\n        const handler = () => {\n          _this.setPluginState({\n            isHidden: true,\n            isClosing: false\n          });\n\n          _this.superFocus.cancel();\n\n          _this.savedActiveElement.focus();\n\n          _this.el.removeEventListener('animationend', handler, false);\n\n          resolve();\n        };\n\n        _this.el.addEventListener('animationend', handler, false);\n      } else {\n        _this.setPluginState({\n          isHidden: true\n        });\n\n        _this.superFocus.cancel();\n\n        _this.savedActiveElement.focus();\n\n        resolve();\n      } // handle ESC and TAB keys in modal dialog\n\n\n      document.removeEventListener('keydown', _this.handleKeyDownInModal);\n\n      if (manualClose) {\n        if (_this.opts.browserBackButtonClose) {\n          var _history$state;\n\n          // Make sure that the latest entry in the history state is our modal name\n          // eslint-disable-next-line no-restricted-globals\n          if ((_history$state = history.state) != null && _history$state[_this.modalName]) {\n            // Go back in history to clear out the entry we created (ultimately closing the modal)\n            // eslint-disable-next-line no-restricted-globals\n            history.back();\n          }\n        }\n      }\n\n      _this.uppy.emit('dashboard:modal-closed');\n\n      return promise;\n    };\n\n    this.isModalOpen = () => {\n      return !this.getPluginState().isHidden || false;\n    };\n\n    this.requestCloseModal = () => {\n      if (this.opts.onRequestCloseModal) {\n        return this.opts.onRequestCloseModal();\n      }\n\n      return this.closeModal();\n    };\n\n    this.setDarkModeCapability = isDarkModeOn => {\n      const {\n        capabilities\n      } = this.uppy.getState();\n      this.uppy.setState({\n        capabilities: { ...capabilities,\n          darkMode: isDarkModeOn\n        }\n      });\n    };\n\n    this.handleSystemDarkModeChange = event => {\n      const isDarkModeOnNow = event.matches;\n      this.uppy.log(`[Dashboard] Dark mode is ${isDarkModeOnNow ? 'on' : 'off'}`);\n      this.setDarkModeCapability(isDarkModeOnNow);\n    };\n\n    this.toggleFileCard = (show, fileID) => {\n      const file = this.uppy.getFile(fileID);\n\n      if (show) {\n        this.uppy.emit('dashboard:file-edit-start', file);\n      } else {\n        this.uppy.emit('dashboard:file-edit-complete', file);\n      }\n\n      this.setPluginState({\n        fileCardFor: show ? fileID : null,\n        activeOverlayType: show ? 'FileCard' : null\n      });\n    };\n\n    this.toggleAddFilesPanel = show => {\n      this.setPluginState({\n        showAddFilesPanel: show,\n        activeOverlayType: show ? 'AddFiles' : null\n      });\n    };\n\n    this.addFiles = files => {\n      const descriptors = files.map(file => ({\n        source: this.id,\n        name: file.name,\n        type: file.type,\n        data: file,\n        meta: {\n          // path of the file relative to the ancestor directory the user selected.\n          // e.g. 'docs/Old Prague/airbnb.pdf'\n          relativePath: file.relativePath || null\n        }\n      }));\n\n      try {\n        this.uppy.addFiles(descriptors);\n      } catch (err) {\n        this.uppy.log(err);\n      }\n    };\n\n    this.startListeningToResize = () => {\n      // Watch for Dashboard container (`.uppy-Dashboard-inner`) resize\n      // and update containerWidth/containerHeight in plugin state accordingly.\n      // Emits first event on initialization.\n      this.resizeObserver = new ResizeObserver(entries => {\n        const uppyDashboardInnerEl = entries[0];\n        const {\n          width,\n          height\n        } = uppyDashboardInnerEl.contentRect;\n        this.uppy.log(`[Dashboard] resized: ${width} / ${height}`, 'debug');\n        this.setPluginState({\n          containerWidth: width,\n          containerHeight: height,\n          areInsidesReadyToBeVisible: true\n        });\n      });\n      this.resizeObserver.observe(this.el.querySelector('.uppy-Dashboard-inner')); // If ResizeObserver fails to emit an event telling us what size to use - default to the mobile view\n\n      this.makeDashboardInsidesVisibleAnywayTimeout = setTimeout(() => {\n        const pluginState = this.getPluginState();\n        const isModalAndClosed = !this.opts.inline && pluginState.isHidden;\n\n        if ( // if ResizeObserver hasn't yet fired,\n        !pluginState.areInsidesReadyToBeVisible // and it's not due to the modal being closed\n        && !isModalAndClosed) {\n          this.uppy.log(\"[Dashboard] resize event didn't fire on time: defaulted to mobile layout\", 'debug');\n          this.setPluginState({\n            areInsidesReadyToBeVisible: true\n          });\n        }\n      }, 1000);\n    };\n\n    this.stopListeningToResize = () => {\n      this.resizeObserver.disconnect();\n      clearTimeout(this.makeDashboardInsidesVisibleAnywayTimeout);\n    };\n\n    this.recordIfFocusedOnUppyRecently = event => {\n      if (this.el.contains(event.target)) {\n        this.ifFocusedOnUppyRecently = true;\n      } else {\n        this.ifFocusedOnUppyRecently = false; // ___Why run this.superFocus.cancel here when it already runs in superFocusOnEachUpdate?\n        //    Because superFocus is debounced, when we move from Uppy to some other element on the page,\n        //    previously run superFocus sometimes hits and moves focus back to Uppy.\n\n        this.superFocus.cancel();\n      }\n    };\n\n    this.disableAllFocusableElements = disable => {\n      const focusableNodes = toArray(this.el.querySelectorAll(FOCUSABLE_ELEMENTS));\n\n      if (disable) {\n        focusableNodes.forEach(node => {\n          // save previous tabindex in a data-attribute, to restore when enabling\n          const currentTabIndex = node.getAttribute('tabindex');\n\n          if (currentTabIndex) {\n            node.dataset.inertTabindex = currentTabIndex;\n          }\n\n          node.setAttribute('tabindex', '-1');\n        });\n      } else {\n        focusableNodes.forEach(node => {\n          if ('inertTabindex' in node.dataset) {\n            node.setAttribute('tabindex', node.dataset.inertTabindex);\n          } else {\n            node.removeAttribute('tabindex');\n          }\n        });\n      }\n\n      this.dashboardIsDisabled = disable;\n    };\n\n    this.updateBrowserHistory = () => {\n      var _history$state2;\n\n      // Ensure history state does not already contain our modal name to avoid double-pushing\n      // eslint-disable-next-line no-restricted-globals\n      if (!((_history$state2 = history.state) != null && _history$state2[this.modalName])) {\n        // Push to history so that the page is not lost on browser back button press\n        // eslint-disable-next-line no-restricted-globals\n        history.pushState({ // eslint-disable-next-line no-restricted-globals\n          ...history.state,\n          [this.modalName]: true\n        }, '');\n      } // Listen for back button presses\n\n\n      window.addEventListener('popstate', this.handlePopState, false);\n    };\n\n    this.handlePopState = event => {\n      var _event$state;\n\n      // Close the modal if the history state no longer contains our modal name\n      if (this.isModalOpen() && (!event.state || !event.state[this.modalName])) {\n        this.closeModal({\n          manualClose: false\n        });\n      } // When the browser back button is pressed and uppy is now the latest entry\n      // in the history but the modal is closed, fix the history by removing the\n      // uppy history entry.\n      // This occurs when another entry is added into the history state while the\n      // modal is open, and then the modal gets manually closed.\n      // Solves PR #575 (https://github.com/transloadit/uppy/pull/575)\n\n\n      if (!this.isModalOpen() && (_event$state = event.state) != null && _event$state[this.modalName]) {\n        // eslint-disable-next-line no-restricted-globals\n        history.back();\n      }\n    };\n\n    this.handleKeyDownInModal = event => {\n      // close modal on esc key press\n      if (event.keyCode === ESC_KEY) this.requestCloseModal(event); // trap focus on tab key press\n\n      if (event.keyCode === TAB_KEY) trapFocus.forModal(event, this.getPluginState().activeOverlayType, this.el);\n    };\n\n    this.handleClickOutside = () => {\n      if (this.opts.closeModalOnClickOutside) this.requestCloseModal();\n    };\n\n    this.handlePaste = event => {\n      // Let any acquirer plugin (Url/Webcam/etc.) handle pastes to the root\n      this.uppy.iteratePlugins(plugin => {\n        if (plugin.type === 'acquirer') {\n          // Every Plugin with .type acquirer can define handleRootPaste(event)\n          plugin.handleRootPaste == null ? void 0 : plugin.handleRootPaste(event);\n        }\n      }); // Add all dropped files\n\n      const files = toArray(event.clipboardData.files);\n\n      if (files.length > 0) {\n        this.uppy.log('[Dashboard] Files pasted');\n        this.addFiles(files);\n      }\n    };\n\n    this.handleInputChange = event => {\n      event.preventDefault();\n      const files = toArray(event.target.files);\n\n      if (files.length > 0) {\n        this.uppy.log('[Dashboard] Files selected through input');\n        this.addFiles(files);\n      }\n    };\n\n    this.handleDragOver = event => {\n      var _this$opts$onDragOver, _this$opts;\n\n      event.preventDefault();\n      event.stopPropagation(); // Check if some plugin can handle the datatransfer without files \u2014\n      // for instance, the Url plugin can import a url\n\n      const canSomePluginHandleRootDrop = () => {\n        let somePluginCanHandleRootDrop = true;\n        this.uppy.iteratePlugins(plugin => {\n          if (plugin.canHandleRootDrop != null && plugin.canHandleRootDrop(event)) {\n            somePluginCanHandleRootDrop = true;\n          }\n        });\n        return somePluginCanHandleRootDrop;\n      }; // Check if the \"type\" of the datatransfer object includes files\n\n\n      const doesEventHaveFiles = () => {\n        const {\n          types\n        } = event.dataTransfer;\n        return types.some(type => type === 'Files');\n      }; // Deny drop, if no plugins can handle datatransfer, there are no files,\n      // or when opts.disabled is set, or new uploads are not allowed\n\n\n      const somePluginCanHandleRootDrop = canSomePluginHandleRootDrop(event);\n      const hasFiles = doesEventHaveFiles(event);\n\n      if (!somePluginCanHandleRootDrop && !hasFiles || this.opts.disabled // opts.disableLocalFiles should only be taken into account if no plugins\n      // can handle the datatransfer\n      || this.opts.disableLocalFiles && (hasFiles || !somePluginCanHandleRootDrop) || !this.uppy.getState().allowNewUpload) {\n        event.dataTransfer.dropEffect = 'none';\n        clearTimeout(this.removeDragOverClassTimeout);\n        return;\n      } // Add a small (+) icon on drop\n      // (and prevent browsers from interpreting this as files being _moved_ into the\n      // browser, https://github.com/transloadit/uppy/issues/1978).\n\n\n      event.dataTransfer.dropEffect = 'copy';\n      clearTimeout(this.removeDragOverClassTimeout);\n      this.setPluginState({\n        isDraggingOver: true\n      });\n      (_this$opts$onDragOver = (_this$opts = this.opts).onDragOver) == null ? void 0 : _this$opts$onDragOver.call(_this$opts, event);\n    };\n\n    this.handleDragLeave = event => {\n      var _this$opts$onDragLeav, _this$opts2;\n\n      event.preventDefault();\n      event.stopPropagation();\n      clearTimeout(this.removeDragOverClassTimeout); // Timeout against flickering, this solution is taken from drag-drop library.\n      // Solution with 'pointer-events: none' didn't work across browsers.\n\n      this.removeDragOverClassTimeout = setTimeout(() => {\n        this.setPluginState({\n          isDraggingOver: false\n        });\n      }, 50);\n      (_this$opts$onDragLeav = (_this$opts2 = this.opts).onDragLeave) == null ? void 0 : _this$opts$onDragLeav.call(_this$opts2, event);\n    };\n\n    this.handleDrop = async event => {\n      var _this$opts$onDrop, _this$opts3;\n\n      event.preventDefault();\n      event.stopPropagation();\n      clearTimeout(this.removeDragOverClassTimeout);\n      this.setPluginState({\n        isDraggingOver: false\n      }); // Let any acquirer plugin (Url/Webcam/etc.) handle drops to the root\n\n      this.uppy.iteratePlugins(plugin => {\n        if (plugin.type === 'acquirer') {\n          // Every Plugin with .type acquirer can define handleRootDrop(event)\n          plugin.handleRootDrop == null ? void 0 : plugin.handleRootDrop(event);\n        }\n      }); // Add all dropped files\n\n      let executedDropErrorOnce = false;\n\n      const logDropError = error => {\n        this.uppy.log(error, 'error'); // In practice all drop errors are most likely the same,\n        // so let's just show one to avoid overwhelming the user\n\n        if (!executedDropErrorOnce) {\n          this.uppy.info(error.message, 'error');\n          executedDropErrorOnce = true;\n        }\n      }; // Add all dropped files\n\n\n      const files = await getDroppedFiles(event.dataTransfer, {\n        logDropError\n      });\n\n      if (files.length > 0) {\n        this.uppy.log('[Dashboard] Files dropped');\n        this.addFiles(files);\n      }\n\n      (_this$opts$onDrop = (_this$opts3 = this.opts).onDrop) == null ? void 0 : _this$opts$onDrop.call(_this$opts3, event);\n    };\n\n    this.handleRequestThumbnail = file => {\n      if (!this.opts.waitForThumbnailsBeforeUpload) {\n        this.uppy.emit('thumbnail:request', file);\n      }\n    };\n\n    this.handleCancelThumbnail = file => {\n      if (!this.opts.waitForThumbnailsBeforeUpload) {\n        this.uppy.emit('thumbnail:cancel', file);\n      }\n    };\n\n    this.handleKeyDownInInline = event => {\n      // Trap focus on tab key press.\n      if (event.keyCode === TAB_KEY) trapFocus.forInline(event, this.getPluginState().activeOverlayType, this.el);\n    };\n\n    this.handlePasteOnBody = event => {\n      const isFocusInOverlay = this.el.contains(document.activeElement);\n\n      if (isFocusInOverlay) {\n        this.handlePaste(event);\n      }\n    };\n\n    this.handleComplete = _ref => {\n      let {\n        failed\n      } = _ref;\n\n      if (this.opts.closeAfterFinish && failed.length === 0) {\n        // All uploads are done\n        this.requestCloseModal();\n      }\n    };\n\n    this.handleCancelRestore = () => {\n      this.uppy.emit('restore-canceled');\n    };\n\n    Object.defineProperty(this, _openFileEditorWhenFilesAdded, {\n      writable: true,\n      value: files => {\n        const firstFile = files[0];\n\n        if (this.canEditFile(firstFile)) {\n          this.openFileEditor(firstFile);\n        }\n      }\n    });\n\n    this.initEvents = () => {\n      // Modal open button\n      if (this.opts.trigger && !this.opts.inline) {\n        const showModalTrigger = findAllDOMElements(this.opts.trigger);\n\n        if (showModalTrigger) {\n          showModalTrigger.forEach(trigger => trigger.addEventListener('click', this.openModal));\n        } else {\n          this.uppy.log('Dashboard modal trigger not found. Make sure `trigger` is set in Dashboard options, unless you are planning to call `dashboard.openModal()` method yourself', 'warning');\n        }\n      }\n\n      this.startListeningToResize();\n      document.addEventListener('paste', this.handlePasteOnBody);\n      this.uppy.on('plugin-remove', this.removeTarget);\n      this.uppy.on('file-added', this.hideAllPanels);\n      this.uppy.on('dashboard:modal-closed', this.hideAllPanels);\n      this.uppy.on('file-editor:complete', this.hideAllPanels);\n      this.uppy.on('complete', this.handleComplete); // ___Why fire on capture?\n      //    Because this.ifFocusedOnUppyRecently needs to change before onUpdate() fires.\n\n      document.addEventListener('focus', this.recordIfFocusedOnUppyRecently, true);\n      document.addEventListener('click', this.recordIfFocusedOnUppyRecently, true);\n\n      if (this.opts.inline) {\n        this.el.addEventListener('keydown', this.handleKeyDownInInline);\n      }\n\n      if (this.opts.autoOpenFileEditor) {\n        this.uppy.on('files-added', _classPrivateFieldLooseBase(this, _openFileEditorWhenFilesAdded)[_openFileEditorWhenFilesAdded]);\n      }\n    };\n\n    this.removeEvents = () => {\n      const showModalTrigger = findAllDOMElements(this.opts.trigger);\n\n      if (!this.opts.inline && showModalTrigger) {\n        showModalTrigger.forEach(trigger => trigger.removeEventListener('click', this.openModal));\n      }\n\n      this.stopListeningToResize();\n      document.removeEventListener('paste', this.handlePasteOnBody);\n      window.removeEventListener('popstate', this.handlePopState, false);\n      this.uppy.off('plugin-remove', this.removeTarget);\n      this.uppy.off('file-added', this.hideAllPanels);\n      this.uppy.off('dashboard:modal-closed', this.hideAllPanels);\n      this.uppy.off('file-editor:complete', this.hideAllPanels);\n      this.uppy.off('complete', this.handleComplete);\n      document.removeEventListener('focus', this.recordIfFocusedOnUppyRecently);\n      document.removeEventListener('click', this.recordIfFocusedOnUppyRecently);\n\n      if (this.opts.inline) {\n        this.el.removeEventListener('keydown', this.handleKeyDownInInline);\n      }\n\n      if (this.opts.autoOpenFileEditor) {\n        this.uppy.off('files-added', _classPrivateFieldLooseBase(this, _openFileEditorWhenFilesAdded)[_openFileEditorWhenFilesAdded]);\n      }\n    };\n\n    this.superFocusOnEachUpdate = () => {\n      const isFocusInUppy = this.el.contains(document.activeElement); // When focus is lost on the page (== focus is on body for most browsers, or focus is null for IE11)\n\n      const isFocusNowhere = document.activeElement === document.body || document.activeElement === null;\n      const isInformerHidden = this.uppy.getState().info.isHidden;\n      const isModal = !this.opts.inline;\n\n      if ( // If update is connected to showing the Informer - let the screen reader calmly read it.\n      isInformerHidden && ( // If we are in a modal - always superfocus without concern for other elements\n      // on the page (user is unlikely to want to interact with the rest of the page)\n      isModal // If we are already inside of Uppy, or\n      || isFocusInUppy // If we are not focused on anything BUT we have already, at least once, focused on uppy\n      //   1. We focus when isFocusNowhere, because when the element we were focused\n      //      on disappears (e.g. an overlay), - focus gets lost. If user is typing\n      //      something somewhere else on the page, - focus won't be 'nowhere'.\n      //   2. We only focus when focus is nowhere AND this.ifFocusedOnUppyRecently,\n      //      to avoid focus jumps if we do something else on the page.\n      //   [Practical check] Without '&& this.ifFocusedOnUppyRecently', in Safari, in inline mode,\n      //                     when file is uploading, - navigate via tab to the checkbox,\n      //                     try to press space multiple times. Focus will jump to Uppy.\n      || isFocusNowhere && this.ifFocusedOnUppyRecently)) {\n        this.superFocus(this.el, this.getPluginState().activeOverlayType);\n      } else {\n        this.superFocus.cancel();\n      }\n    };\n\n    this.afterUpdate = () => {\n      if (this.opts.disabled && !this.dashboardIsDisabled) {\n        this.disableAllFocusableElements(true);\n        return;\n      }\n\n      if (!this.opts.disabled && this.dashboardIsDisabled) {\n        this.disableAllFocusableElements(false);\n      }\n\n      this.superFocusOnEachUpdate();\n    };\n\n    this.saveFileCard = (meta, fileID) => {\n      this.uppy.setFileMeta(fileID, meta);\n      this.toggleFileCard(false, fileID);\n    };\n\n    Object.defineProperty(this, _attachRenderFunctionToTarget, {\n      writable: true,\n      value: target => {\n        const plugin = this.uppy.getPlugin(target.id);\n        return { ...target,\n          icon: plugin.icon || this.opts.defaultPickerIcon,\n          render: plugin.render\n        };\n      }\n    });\n    Object.defineProperty(this, _isTargetSupported, {\n      writable: true,\n      value: target => {\n        const plugin = this.uppy.getPlugin(target.id); // If the plugin does not provide a `supported` check, assume the plugin works everywhere.\n\n        if (typeof plugin.isSupported !== 'function') {\n          return true;\n        }\n\n        return plugin.isSupported();\n      }\n    });\n    Object.defineProperty(this, _getAcquirers, {\n      writable: true,\n      value: memoize(targets => {\n        return targets.filter(target => target.type === 'acquirer' && _classPrivateFieldLooseBase(this, _isTargetSupported)[_isTargetSupported](target)).map(_classPrivateFieldLooseBase(this, _attachRenderFunctionToTarget)[_attachRenderFunctionToTarget]);\n      })\n    });\n    Object.defineProperty(this, _getProgressIndicators, {\n      writable: true,\n      value: memoize(targets => {\n        return targets.filter(target => target.type === 'progressindicator').map(_classPrivateFieldLooseBase(this, _attachRenderFunctionToTarget)[_attachRenderFunctionToTarget]);\n      })\n    });\n    Object.defineProperty(this, _getEditors, {\n      writable: true,\n      value: memoize(targets => {\n        return targets.filter(target => target.type === 'editor').map(_classPrivateFieldLooseBase(this, _attachRenderFunctionToTarget)[_attachRenderFunctionToTarget]);\n      })\n    });\n\n    this.render = state => {\n      const pluginState = this.getPluginState();\n      const {\n        files,\n        capabilities,\n        allowNewUpload\n      } = state;\n      const {\n        newFiles,\n        uploadStartedFiles,\n        completeFiles,\n        erroredFiles,\n        inProgressFiles,\n        inProgressNotPausedFiles,\n        processingFiles,\n        isUploadStarted,\n        isAllComplete,\n        isAllErrored,\n        isAllPaused\n      } = this.uppy.getObjectOfFilesPerState();\n\n      const acquirers = _classPrivateFieldLooseBase(this, _getAcquirers)[_getAcquirers](pluginState.targets);\n\n      const progressindicators = _classPrivateFieldLooseBase(this, _getProgressIndicators)[_getProgressIndicators](pluginState.targets);\n\n      const editors = _classPrivateFieldLooseBase(this, _getEditors)[_getEditors](pluginState.targets);\n\n      let theme;\n\n      if (this.opts.theme === 'auto') {\n        theme = capabilities.darkMode ? 'dark' : 'light';\n      } else {\n        theme = this.opts.theme;\n      }\n\n      if (['files', 'folders', 'both'].indexOf(this.opts.fileManagerSelectionType) < 0) {\n        this.opts.fileManagerSelectionType = 'files'; // eslint-disable-next-line no-console\n\n        console.warn(`Unsupported option for \"fileManagerSelectionType\". Using default of \"${this.opts.fileManagerSelectionType}\".`);\n      }\n\n      return DashboardUI({\n        state,\n        isHidden: pluginState.isHidden,\n        files,\n        newFiles,\n        uploadStartedFiles,\n        completeFiles,\n        erroredFiles,\n        inProgressFiles,\n        inProgressNotPausedFiles,\n        processingFiles,\n        isUploadStarted,\n        isAllComplete,\n        isAllErrored,\n        isAllPaused,\n        totalFileCount: Object.keys(files).length,\n        totalProgress: state.totalProgress,\n        allowNewUpload,\n        acquirers,\n        theme,\n        disabled: this.opts.disabled,\n        disableLocalFiles: this.opts.disableLocalFiles,\n        direction: this.opts.direction,\n        activePickerPanel: pluginState.activePickerPanel,\n        showFileEditor: pluginState.showFileEditor,\n        saveFileEditor: this.saveFileEditor,\n        disableAllFocusableElements: this.disableAllFocusableElements,\n        animateOpenClose: this.opts.animateOpenClose,\n        isClosing: pluginState.isClosing,\n        progressindicators,\n        editors,\n        autoProceed: this.uppy.opts.autoProceed,\n        id: this.id,\n        closeModal: this.requestCloseModal,\n        handleClickOutside: this.handleClickOutside,\n        handleInputChange: this.handleInputChange,\n        handlePaste: this.handlePaste,\n        inline: this.opts.inline,\n        showPanel: this.showPanel,\n        hideAllPanels: this.hideAllPanels,\n        i18n: this.i18n,\n        i18nArray: this.i18nArray,\n        uppy: this.uppy,\n        note: this.opts.note,\n        recoveredState: state.recoveredState,\n        metaFields: pluginState.metaFields,\n        resumableUploads: capabilities.resumableUploads || false,\n        individualCancellation: capabilities.individualCancellation,\n        isMobileDevice: capabilities.isMobileDevice,\n        fileCardFor: pluginState.fileCardFor,\n        toggleFileCard: this.toggleFileCard,\n        toggleAddFilesPanel: this.toggleAddFilesPanel,\n        showAddFilesPanel: pluginState.showAddFilesPanel,\n        saveFileCard: this.saveFileCard,\n        openFileEditor: this.openFileEditor,\n        canEditFile: this.canEditFile,\n        width: this.opts.width,\n        height: this.opts.height,\n        showLinkToFileUploadResult: this.opts.showLinkToFileUploadResult,\n        fileManagerSelectionType: this.opts.fileManagerSelectionType,\n        proudlyDisplayPoweredByUppy: this.opts.proudlyDisplayPoweredByUppy,\n        hideCancelButton: this.opts.hideCancelButton,\n        hideRetryButton: this.opts.hideRetryButton,\n        hidePauseResumeButton: this.opts.hidePauseResumeButton,\n        showRemoveButtonAfterComplete: this.opts.showRemoveButtonAfterComplete,\n        containerWidth: pluginState.containerWidth,\n        containerHeight: pluginState.containerHeight,\n        areInsidesReadyToBeVisible: pluginState.areInsidesReadyToBeVisible,\n        isTargetDOMEl: this.isTargetDOMEl,\n        parentElement: this.el,\n        allowedFileTypes: this.uppy.opts.restrictions.allowedFileTypes,\n        maxNumberOfFiles: this.uppy.opts.restrictions.maxNumberOfFiles,\n        requiredMetaFields: this.uppy.opts.restrictions.requiredMetaFields,\n        showSelectedFiles: this.opts.showSelectedFiles,\n        handleCancelRestore: this.handleCancelRestore,\n        handleRequestThumbnail: this.handleRequestThumbnail,\n        handleCancelThumbnail: this.handleCancelThumbnail,\n        // drag props\n        isDraggingOver: pluginState.isDraggingOver,\n        handleDragOver: this.handleDragOver,\n        handleDragLeave: this.handleDragLeave,\n        handleDrop: this.handleDrop\n      });\n    };\n\n    this.discoverProviderPlugins = () => {\n      this.uppy.iteratePlugins(plugin => {\n        if (plugin && !plugin.target && plugin.opts && plugin.opts.target === this.constructor) {\n          this.addTarget(plugin);\n        }\n      });\n    };\n\n    this.install = () => {\n      // Set default state for Dashboard\n      this.setPluginState({\n        isHidden: true,\n        fileCardFor: null,\n        activeOverlayType: null,\n        showAddFilesPanel: false,\n        activePickerPanel: false,\n        showFileEditor: false,\n        metaFields: this.opts.metaFields,\n        targets: [],\n        // We'll make them visible once .containerWidth is determined\n        areInsidesReadyToBeVisible: false,\n        isDraggingOver: false\n      });\n      const {\n        inline,\n        closeAfterFinish\n      } = this.opts;\n\n      if (inline && closeAfterFinish) {\n        throw new Error('[Dashboard] `closeAfterFinish: true` cannot be used on an inline Dashboard, because an inline Dashboard cannot be closed at all. Either set `inline: false`, or disable the `closeAfterFinish` option.');\n      }\n\n      const {\n        allowMultipleUploads,\n        allowMultipleUploadBatches\n      } = this.uppy.opts;\n\n      if ((allowMultipleUploads || allowMultipleUploadBatches) && closeAfterFinish) {\n        this.uppy.log('[Dashboard] When using `closeAfterFinish`, we recommended setting the `allowMultipleUploadBatches` option to `false` in the Uppy constructor. See https://uppy.io/docs/uppy/#allowMultipleUploads-true', 'warning');\n      }\n\n      const {\n        target\n      } = this.opts;\n\n      if (target) {\n        this.mount(target, this);\n      }\n\n      const plugins = this.opts.plugins || [];\n      plugins.forEach(pluginID => {\n        const plugin = this.uppy.getPlugin(pluginID);\n\n        if (plugin) {\n          plugin.mount(this, plugin);\n        }\n      });\n\n      if (!this.opts.disableStatusBar) {\n        this.uppy.use(StatusBar, {\n          id: `${this.id}:StatusBar`,\n          target: this,\n          hideUploadButton: this.opts.hideUploadButton,\n          hideRetryButton: this.opts.hideRetryButton,\n          hidePauseResumeButton: this.opts.hidePauseResumeButton,\n          hideCancelButton: this.opts.hideCancelButton,\n          showProgressDetails: this.opts.showProgressDetails,\n          hideAfterFinish: this.opts.hideProgressAfterFinish,\n          locale: this.opts.locale,\n          doneButtonHandler: this.opts.doneButtonHandler\n        });\n      }\n\n      if (!this.opts.disableInformer) {\n        this.uppy.use(Informer, {\n          id: `${this.id}:Informer`,\n          target: this\n        });\n      }\n\n      if (!this.opts.disableThumbnailGenerator) {\n        this.uppy.use(ThumbnailGenerator, {\n          id: `${this.id}:ThumbnailGenerator`,\n          thumbnailWidth: this.opts.thumbnailWidth,\n          thumbnailType: this.opts.thumbnailType,\n          waitForThumbnailsBeforeUpload: this.opts.waitForThumbnailsBeforeUpload,\n          // If we don't block on thumbnails, we can lazily generate them\n          lazy: !this.opts.waitForThumbnailsBeforeUpload\n        });\n      } // Dark Mode / theme\n\n\n      this.darkModeMediaQuery = typeof window !== 'undefined' && window.matchMedia ? window.matchMedia('(prefers-color-scheme: dark)') : null;\n      const isDarkModeOnFromTheStart = this.darkModeMediaQuery ? this.darkModeMediaQuery.matches : false;\n      this.uppy.log(`[Dashboard] Dark mode is ${isDarkModeOnFromTheStart ? 'on' : 'off'}`);\n      this.setDarkModeCapability(isDarkModeOnFromTheStart);\n\n      if (this.opts.theme === 'auto') {\n        this.darkModeMediaQuery.addListener(this.handleSystemDarkModeChange);\n      }\n\n      this.discoverProviderPlugins();\n      this.initEvents();\n    };\n\n    this.uninstall = () => {\n      if (!this.opts.disableInformer) {\n        const informer = this.uppy.getPlugin(`${this.id}:Informer`); // Checking if this plugin exists, in case it was removed by uppy-core\n        // before the Dashboard was.\n\n        if (informer) this.uppy.removePlugin(informer);\n      }\n\n      if (!this.opts.disableStatusBar) {\n        const statusBar = this.uppy.getPlugin(`${this.id}:StatusBar`);\n        if (statusBar) this.uppy.removePlugin(statusBar);\n      }\n\n      if (!this.opts.disableThumbnailGenerator) {\n        const thumbnail = this.uppy.getPlugin(`${this.id}:ThumbnailGenerator`);\n        if (thumbnail) this.uppy.removePlugin(thumbnail);\n      }\n\n      const plugins = this.opts.plugins || [];\n      plugins.forEach(pluginID => {\n        const plugin = this.uppy.getPlugin(pluginID);\n        if (plugin) plugin.unmount();\n      });\n\n      if (this.opts.theme === 'auto') {\n        this.darkModeMediaQuery.removeListener(this.handleSystemDarkModeChange);\n      }\n\n      this.unmount();\n      this.removeEvents();\n    };\n\n    this.id = this.opts.id || 'Dashboard';\n    this.title = 'Dashboard';\n    this.type = 'orchestrator';\n    this.modalName = `uppy-Dashboard-${nanoid()}`;\n    this.defaultLocale = locale; // set default options\n\n    const defaultOptions = {\n      target: 'body',\n      metaFields: [],\n      trigger: null,\n      inline: false,\n      width: 750,\n      height: 550,\n      thumbnailWidth: 280,\n      thumbnailType: 'image/jpeg',\n      waitForThumbnailsBeforeUpload: false,\n      defaultPickerIcon,\n      showLinkToFileUploadResult: false,\n      showProgressDetails: false,\n      hideUploadButton: false,\n      hideCancelButton: false,\n      hideRetryButton: false,\n      hidePauseResumeButton: false,\n      hideProgressAfterFinish: false,\n      doneButtonHandler: () => {\n        this.uppy.reset();\n        this.requestCloseModal();\n      },\n      note: null,\n      closeModalOnClickOutside: false,\n      closeAfterFinish: false,\n      disableStatusBar: false,\n      disableInformer: false,\n      disableThumbnailGenerator: false,\n      disablePageScrollWhenModalOpen: true,\n      animateOpenClose: true,\n      fileManagerSelectionType: 'files',\n      proudlyDisplayPoweredByUppy: true,\n      onRequestCloseModal: () => this.closeModal(),\n      showSelectedFiles: true,\n      showRemoveButtonAfterComplete: false,\n      browserBackButtonClose: false,\n      theme: 'light',\n      autoOpenFileEditor: false,\n      disabled: false,\n      disableLocalFiles: false\n    }; // merge default options with the ones set by user\n\n    this.opts = { ...defaultOptions,\n      ..._opts\n    };\n    this.i18nInit();\n    this.superFocus = createSuperFocus();\n    this.ifFocusedOnUppyRecently = false; // Timeouts\n\n    this.makeDashboardInsidesVisibleAnywayTimeout = null;\n    this.removeDragOverClassTimeout = null;\n  }\n\n  onMount() {\n    // Set the text direction if the page has not defined one.\n    const element = this.el;\n    const direction = getTextDirection(element);\n\n    if (!direction) {\n      element.dir = 'ltr';\n    }\n  }\n\n}), _class.VERSION = \"2.1.3\", _temp);", "/*\n *  base64.js\n *\n *  Licensed under the BSD 3-Clause License.\n *    http://opensource.org/licenses/BSD-3-Clause\n *\n *  References:\n *    http://en.wikipedia.org/wiki/Base64\n */\n;(function (global, factory) {\n    typeof exports === 'object' && typeof module !== 'undefined'\n        ? module.exports = factory(global)\n        : typeof define === 'function' && define.amd\n        ? define(factory) : factory(global)\n}((\n    typeof self !== 'undefined' ? self\n        : typeof window !== 'undefined' ? window\n        : typeof global !== 'undefined' ? global\n: this\n), function(global) {\n    'use strict';\n    // existing version for noConflict()\n    global = global || {};\n    var _Base64 = global.Base64;\n    var version = \"2.6.4\";\n    // constants\n    var b64chars\n        = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n    var b64tab = function(bin) {\n        var t = {};\n        for (var i = 0, l = bin.length; i < l; i++) t[bin.charAt(i)] = i;\n        return t;\n    }(b64chars);\n    var fromCharCode = String.fromCharCode;\n    // encoder stuff\n    var cb_utob = function(c) {\n        if (c.length < 2) {\n            var cc = c.charCodeAt(0);\n            return cc < 0x80 ? c\n                : cc < 0x800 ? (fromCharCode(0xc0 | (cc >>> 6))\n                                + fromCharCode(0x80 | (cc & 0x3f)))\n                : (fromCharCode(0xe0 | ((cc >>> 12) & 0x0f))\n                    + fromCharCode(0x80 | ((cc >>>  6) & 0x3f))\n                    + fromCharCode(0x80 | ( cc         & 0x3f)));\n        } else {\n            var cc = 0x10000\n                + (c.charCodeAt(0) - 0xD800) * 0x400\n                + (c.charCodeAt(1) - 0xDC00);\n            return (fromCharCode(0xf0 | ((cc >>> 18) & 0x07))\n                    + fromCharCode(0x80 | ((cc >>> 12) & 0x3f))\n                    + fromCharCode(0x80 | ((cc >>>  6) & 0x3f))\n                    + fromCharCode(0x80 | ( cc         & 0x3f)));\n        }\n    };\n    var re_utob = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFFF]|[^\\x00-\\x7F]/g;\n    var utob = function(u) {\n        return u.replace(re_utob, cb_utob);\n    };\n    var cb_encode = function(ccc) {\n        var padlen = [0, 2, 1][ccc.length % 3],\n        ord = ccc.charCodeAt(0) << 16\n            | ((ccc.length > 1 ? ccc.charCodeAt(1) : 0) << 8)\n            | ((ccc.length > 2 ? ccc.charCodeAt(2) : 0)),\n        chars = [\n            b64chars.charAt( ord >>> 18),\n            b64chars.charAt((ord >>> 12) & 63),\n            padlen >= 2 ? '=' : b64chars.charAt((ord >>> 6) & 63),\n            padlen >= 1 ? '=' : b64chars.charAt(ord & 63)\n        ];\n        return chars.join('');\n    };\n    var btoa = global.btoa && typeof global.btoa == 'function'\n        ? function(b){ return global.btoa(b) } : function(b) {\n        if (b.match(/[^\\x00-\\xFF]/)) throw new RangeError(\n            'The string contains invalid characters.'\n        );\n        return b.replace(/[\\s\\S]{1,3}/g, cb_encode);\n    };\n    var _encode = function(u) {\n        return btoa(utob(String(u)));\n    };\n    var mkUriSafe = function (b64) {\n        return b64.replace(/[+\\/]/g, function(m0) {\n            return m0 == '+' ? '-' : '_';\n        }).replace(/=/g, '');\n    };\n    var encode = function(u, urisafe) {\n        return urisafe ? mkUriSafe(_encode(u)) : _encode(u);\n    };\n    var encodeURI = function(u) { return encode(u, true) };\n    var fromUint8Array;\n    if (global.Uint8Array) fromUint8Array = function(a, urisafe) {\n        // return btoa(fromCharCode.apply(null, a));\n        var b64 = '';\n        for (var i = 0, l = a.length; i < l; i += 3) {\n            var a0 = a[i], a1 = a[i+1], a2 = a[i+2];\n            var ord = a0 << 16 | a1 << 8 | a2;\n            b64 +=    b64chars.charAt( ord >>> 18)\n                +     b64chars.charAt((ord >>> 12) & 63)\n                + ( typeof a1 != 'undefined'\n                    ? b64chars.charAt((ord >>>  6) & 63) : '=')\n                + ( typeof a2 != 'undefined'\n                    ? b64chars.charAt( ord         & 63) : '=');\n        }\n        return urisafe ? mkUriSafe(b64) : b64;\n    };\n    // decoder stuff\n    var re_btou = /[\\xC0-\\xDF][\\x80-\\xBF]|[\\xE0-\\xEF][\\x80-\\xBF]{2}|[\\xF0-\\xF7][\\x80-\\xBF]{3}/g;\n    var cb_btou = function(cccc) {\n        switch(cccc.length) {\n        case 4:\n            var cp = ((0x07 & cccc.charCodeAt(0)) << 18)\n                |    ((0x3f & cccc.charCodeAt(1)) << 12)\n                |    ((0x3f & cccc.charCodeAt(2)) <<  6)\n                |     (0x3f & cccc.charCodeAt(3)),\n            offset = cp - 0x10000;\n            return (fromCharCode((offset  >>> 10) + 0xD800)\n                    + fromCharCode((offset & 0x3FF) + 0xDC00));\n        case 3:\n            return fromCharCode(\n                ((0x0f & cccc.charCodeAt(0)) << 12)\n                    | ((0x3f & cccc.charCodeAt(1)) << 6)\n                    |  (0x3f & cccc.charCodeAt(2))\n            );\n        default:\n            return  fromCharCode(\n                ((0x1f & cccc.charCodeAt(0)) << 6)\n                    |  (0x3f & cccc.charCodeAt(1))\n            );\n        }\n    };\n    var btou = function(b) {\n        return b.replace(re_btou, cb_btou);\n    };\n    var cb_decode = function(cccc) {\n        var len = cccc.length,\n        padlen = len % 4,\n        n = (len > 0 ? b64tab[cccc.charAt(0)] << 18 : 0)\n            | (len > 1 ? b64tab[cccc.charAt(1)] << 12 : 0)\n            | (len > 2 ? b64tab[cccc.charAt(2)] <<  6 : 0)\n            | (len > 3 ? b64tab[cccc.charAt(3)]       : 0),\n        chars = [\n            fromCharCode( n >>> 16),\n            fromCharCode((n >>>  8) & 0xff),\n            fromCharCode( n         & 0xff)\n        ];\n        chars.length -= [0, 0, 2, 1][padlen];\n        return chars.join('');\n    };\n    var _atob = global.atob && typeof global.atob == 'function'\n        ? function(a){ return global.atob(a) } : function(a){\n        return a.replace(/\\S{1,4}/g, cb_decode);\n    };\n    var atob = function(a) {\n        return _atob(String(a).replace(/[^A-Za-z0-9\\+\\/]/g, ''));\n    };\n    var _decode = function(a) { return btou(_atob(a)) };\n    var _fromURI = function(a) {\n        return String(a).replace(/[-_]/g, function(m0) {\n            return m0 == '-' ? '+' : '/'\n        }).replace(/[^A-Za-z0-9\\+\\/]/g, '');\n    };\n    var decode = function(a){\n        return _decode(_fromURI(a));\n    };\n    var toUint8Array;\n    if (global.Uint8Array) toUint8Array = function(a) {\n        return Uint8Array.from(atob(_fromURI(a)), function(c) {\n            return c.charCodeAt(0);\n        });\n    };\n    var noConflict = function() {\n        var Base64 = global.Base64;\n        global.Base64 = _Base64;\n        return Base64;\n    };\n    // export Base64\n    global.Base64 = {\n        VERSION: version,\n        atob: atob,\n        btoa: btoa,\n        fromBase64: decode,\n        toBase64: encode,\n        utob: utob,\n        encode: encode,\n        encodeURI: encodeURI,\n        btou: btou,\n        decode: decode,\n        noConflict: noConflict,\n        fromUint8Array: fromUint8Array,\n        toUint8Array: toUint8Array\n    };\n    // if ES5 is available, make Base64.extendString() available\n    if (typeof Object.defineProperty === 'function') {\n        var noEnum = function(v){\n            return {value:v,enumerable:false,writable:true,configurable:true};\n        };\n        global.Base64.extendString = function () {\n            Object.defineProperty(\n                String.prototype, 'fromBase64', noEnum(function () {\n                    return decode(this)\n                }));\n            Object.defineProperty(\n                String.prototype, 'toBase64', noEnum(function (urisafe) {\n                    return encode(this, urisafe)\n                }));\n            Object.defineProperty(\n                String.prototype, 'toBase64URI', noEnum(function () {\n                    return encode(this, true)\n                }));\n        };\n    }\n    //\n    // export Base64 to the namespace\n    //\n    if (global['Meteor']) { // Meteor.js\n        Base64 = global.Base64;\n    }\n    // module.exports and AMD are mutually exclusive.\n    // module.exports has precedence.\n    if (typeof module !== 'undefined' && module.exports) {\n        module.exports.Base64 = global.Base64;\n    }\n    else if (typeof define === 'function' && define.amd) {\n        // AMD. Register as an anonymous module.\n        define([], function(){ return global.Base64 });\n    }\n    // that's it!\n    return {Base64: global.Base64}\n}));\n", "'use strict';\n\n/**\n * Check if we're required to add a port number.\n *\n * @see https://url.spec.whatwg.org/#default-port\n * @param {Number|String} port Port number we need to check\n * @param {String} protocol Protocol we need to check against.\n * @returns {Boolean} Is it a default port for the given protocol\n * @api private\n */\nmodule.exports = function required(port, protocol) {\n  protocol = protocol.split(':')[0];\n  port = +port;\n\n  if (!port) return false;\n\n  switch (protocol) {\n    case 'http':\n    case 'ws':\n    return port !== 80;\n\n    case 'https':\n    case 'wss':\n    return port !== 443;\n\n    case 'ftp':\n    return port !== 21;\n\n    case 'gopher':\n    return port !== 70;\n\n    case 'file':\n    return false;\n  }\n\n  return port !== 0;\n};\n", "'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n  , undef;\n\n/**\n * Decode a URI encoded string.\n *\n * @param {String} input The URI encoded string.\n * @returns {String|Null} The decoded string.\n * @api private\n */\nfunction decode(input) {\n  try {\n    return decodeURIComponent(input.replace(/\\+/g, ' '));\n  } catch (e) {\n    return null;\n  }\n}\n\n/**\n * Attempts to encode a given input.\n *\n * @param {String} input The string that needs to be encoded.\n * @returns {String|Null} The encoded string.\n * @api private\n */\nfunction encode(input) {\n  try {\n    return encodeURIComponent(input);\n  } catch (e) {\n    return null;\n  }\n}\n\n/**\n * Simple query string parser.\n *\n * @param {String} query The query string that needs to be parsed.\n * @returns {Object}\n * @api public\n */\nfunction querystring(query) {\n  var parser = /([^=?#&]+)=?([^&]*)/g\n    , result = {}\n    , part;\n\n  while (part = parser.exec(query)) {\n    var key = decode(part[1])\n      , value = decode(part[2]);\n\n    //\n    // Prevent overriding of existing properties. This ensures that build-in\n    // methods like `toString` or __proto__ are not overriden by malicious\n    // querystrings.\n    //\n    // In the case if failed decoding, we want to omit the key/value pairs\n    // from the result.\n    //\n    if (key === null || value === null || key in result) continue;\n    result[key] = value;\n  }\n\n  return result;\n}\n\n/**\n * Transform a query string to an object.\n *\n * @param {Object} obj Object that should be transformed.\n * @param {String} prefix Optional prefix.\n * @returns {String}\n * @api public\n */\nfunction querystringify(obj, prefix) {\n  prefix = prefix || '';\n\n  var pairs = []\n    , value\n    , key;\n\n  //\n  // Optionally prefix with a '?' if needed\n  //\n  if ('string' !== typeof prefix) prefix = '?';\n\n  for (key in obj) {\n    if (has.call(obj, key)) {\n      value = obj[key];\n\n      //\n      // Edge cases where we actually want to encode the value to an empty\n      // string instead of the stringified value.\n      //\n      if (!value && (value === null || value === undef || isNaN(value))) {\n        value = '';\n      }\n\n      key = encode(key);\n      value = encode(value);\n\n      //\n      // If we failed to encode the strings, we should bail out as we don't\n      // want to add invalid strings to the query.\n      //\n      if (key === null || value === null) continue;\n      pairs.push(key +'='+ value);\n    }\n  }\n\n  return pairs.length ? prefix + pairs.join('&') : '';\n}\n\n//\n// Expose the module.\n//\nexports.stringify = querystringify;\nexports.parse = querystring;\n", "'use strict';\n\nvar required = require('requires-port')\n  , qs = require('querystringify')\n  , slashes = /^[A-Za-z][A-Za-z0-9+-.]*:\\/\\//\n  , protocolre = /^([a-z][a-z0-9.+-]*:)?(\\/\\/)?([\\\\/]+)?([\\S\\s]*)/i\n  , windowsDriveLetter = /^[a-zA-Z]:/\n  , whitespace = '[\\\\x09\\\\x0A\\\\x0B\\\\x0C\\\\x0D\\\\x20\\\\xA0\\\\u1680\\\\u180E\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200A\\\\u202F\\\\u205F\\\\u3000\\\\u2028\\\\u2029\\\\uFEFF]'\n  , left = new RegExp('^'+ whitespace +'+');\n\n/**\n * Trim a given string.\n *\n * @param {String} str String to trim.\n * @public\n */\nfunction trimLeft(str) {\n  return (str ? str : '').toString().replace(left, '');\n}\n\n/**\n * These are the parse rules for the URL parser, it informs the parser\n * about:\n *\n * 0. The char it Needs to parse, if it's a string it should be done using\n *    indexOf, RegExp using exec and NaN means set as current value.\n * 1. The property we should set when parsing this value.\n * 2. Indication if it's backwards or forward parsing, when set as number it's\n *    the value of extra chars that should be split off.\n * 3. Inherit from location if non existing in the parser.\n * 4. `toLowerCase` the resulting value.\n */\nvar rules = [\n  ['#', 'hash'],                        // Extract from the back.\n  ['?', 'query'],                       // Extract from the back.\n  function sanitize(address, url) {     // Sanitize what is left of the address\n    return isSpecial(url.protocol) ? address.replace(/\\\\/g, '/') : address;\n  },\n  ['/', 'pathname'],                    // Extract from the back.\n  ['@', 'auth', 1],                     // Extract from the front.\n  [NaN, 'host', undefined, 1, 1],       // Set left over value.\n  [/:(\\d+)$/, 'port', undefined, 1],    // RegExp the back.\n  [NaN, 'hostname', undefined, 1, 1]    // Set left over.\n];\n\n/**\n * These properties should not be copied or inherited from. This is only needed\n * for all non blob URL's as a blob URL does not include a hash, only the\n * origin.\n *\n * @type {Object}\n * @private\n */\nvar ignore = { hash: 1, query: 1 };\n\n/**\n * The location object differs when your code is loaded through a normal page,\n * Worker or through a worker using a blob. And with the blobble begins the\n * trouble as the location object will contain the URL of the blob, not the\n * location of the page where our code is loaded in. The actual origin is\n * encoded in the `pathname` so we can thankfully generate a good \"default\"\n * location from it so we can generate proper relative URL's again.\n *\n * @param {Object|String} loc Optional default location object.\n * @returns {Object} lolcation object.\n * @public\n */\nfunction lolcation(loc) {\n  var globalVar;\n\n  if (typeof window !== 'undefined') globalVar = window;\n  else if (typeof global !== 'undefined') globalVar = global;\n  else if (typeof self !== 'undefined') globalVar = self;\n  else globalVar = {};\n\n  var location = globalVar.location || {};\n  loc = loc || location;\n\n  var finaldestination = {}\n    , type = typeof loc\n    , key;\n\n  if ('blob:' === loc.protocol) {\n    finaldestination = new Url(unescape(loc.pathname), {});\n  } else if ('string' === type) {\n    finaldestination = new Url(loc, {});\n    for (key in ignore) delete finaldestination[key];\n  } else if ('object' === type) {\n    for (key in loc) {\n      if (key in ignore) continue;\n      finaldestination[key] = loc[key];\n    }\n\n    if (finaldestination.slashes === undefined) {\n      finaldestination.slashes = slashes.test(loc.href);\n    }\n  }\n\n  return finaldestination;\n}\n\n/**\n * Check whether a protocol scheme is special.\n *\n * @param {String} The protocol scheme of the URL\n * @return {Boolean} `true` if the protocol scheme is special, else `false`\n * @private\n */\nfunction isSpecial(scheme) {\n  return (\n    scheme === 'file:' ||\n    scheme === 'ftp:' ||\n    scheme === 'http:' ||\n    scheme === 'https:' ||\n    scheme === 'ws:' ||\n    scheme === 'wss:'\n  );\n}\n\n/**\n * @typedef ProtocolExtract\n * @type Object\n * @property {String} protocol Protocol matched in the URL, in lowercase.\n * @property {Boolean} slashes `true` if protocol is followed by \"//\", else `false`.\n * @property {String} rest Rest of the URL that is not part of the protocol.\n */\n\n/**\n * Extract protocol information from a URL with/without double slash (\"//\").\n *\n * @param {String} address URL we want to extract from.\n * @param {Object} location\n * @return {ProtocolExtract} Extracted information.\n * @private\n */\nfunction extractProtocol(address, location) {\n  address = trimLeft(address);\n  location = location || {};\n\n  var match = protocolre.exec(address);\n  var protocol = match[1] ? match[1].toLowerCase() : '';\n  var forwardSlashes = !!match[2];\n  var otherSlashes = !!match[3];\n  var slashesCount = 0;\n  var rest;\n\n  if (forwardSlashes) {\n    if (otherSlashes) {\n      rest = match[2] + match[3] + match[4];\n      slashesCount = match[2].length + match[3].length;\n    } else {\n      rest = match[2] + match[4];\n      slashesCount = match[2].length;\n    }\n  } else {\n    if (otherSlashes) {\n      rest = match[3] + match[4];\n      slashesCount = match[3].length;\n    } else {\n      rest = match[4]\n    }\n  }\n\n  if (protocol === 'file:') {\n    if (slashesCount >= 2) {\n      rest = rest.slice(2);\n    }\n  } else if (isSpecial(protocol)) {\n    rest = match[4];\n  } else if (protocol) {\n    if (forwardSlashes) {\n      rest = rest.slice(2);\n    }\n  } else if (slashesCount >= 2 && isSpecial(location.protocol)) {\n    rest = match[4];\n  }\n\n  return {\n    protocol: protocol,\n    slashes: forwardSlashes || isSpecial(protocol),\n    slashesCount: slashesCount,\n    rest: rest\n  };\n}\n\n/**\n * Resolve a relative URL pathname against a base URL pathname.\n *\n * @param {String} relative Pathname of the relative URL.\n * @param {String} base Pathname of the base URL.\n * @return {String} Resolved pathname.\n * @private\n */\nfunction resolve(relative, base) {\n  if (relative === '') return base;\n\n  var path = (base || '/').split('/').slice(0, -1).concat(relative.split('/'))\n    , i = path.length\n    , last = path[i - 1]\n    , unshift = false\n    , up = 0;\n\n  while (i--) {\n    if (path[i] === '.') {\n      path.splice(i, 1);\n    } else if (path[i] === '..') {\n      path.splice(i, 1);\n      up++;\n    } else if (up) {\n      if (i === 0) unshift = true;\n      path.splice(i, 1);\n      up--;\n    }\n  }\n\n  if (unshift) path.unshift('');\n  if (last === '.' || last === '..') path.push('');\n\n  return path.join('/');\n}\n\n/**\n * The actual URL instance. Instead of returning an object we've opted-in to\n * create an actual constructor as it's much more memory efficient and\n * faster and it pleases my OCD.\n *\n * It is worth noting that we should not use `URL` as class name to prevent\n * clashes with the global URL instance that got introduced in browsers.\n *\n * @constructor\n * @param {String} address URL we want to parse.\n * @param {Object|String} [location] Location defaults for relative paths.\n * @param {Boolean|Function} [parser] Parser for the query string.\n * @private\n */\nfunction Url(address, location, parser) {\n  address = trimLeft(address);\n\n  if (!(this instanceof Url)) {\n    return new Url(address, location, parser);\n  }\n\n  var relative, extracted, parse, instruction, index, key\n    , instructions = rules.slice()\n    , type = typeof location\n    , url = this\n    , i = 0;\n\n  //\n  // The following if statements allows this module two have compatibility with\n  // 2 different API:\n  //\n  // 1. Node.js's `url.parse` api which accepts a URL, boolean as arguments\n  //    where the boolean indicates that the query string should also be parsed.\n  //\n  // 2. The `URL` interface of the browser which accepts a URL, object as\n  //    arguments. The supplied object will be used as default values / fall-back\n  //    for relative paths.\n  //\n  if ('object' !== type && 'string' !== type) {\n    parser = location;\n    location = null;\n  }\n\n  if (parser && 'function' !== typeof parser) parser = qs.parse;\n\n  location = lolcation(location);\n\n  //\n  // Extract protocol information before running the instructions.\n  //\n  extracted = extractProtocol(address || '', location);\n  relative = !extracted.protocol && !extracted.slashes;\n  url.slashes = extracted.slashes || relative && location.slashes;\n  url.protocol = extracted.protocol || location.protocol || '';\n  address = extracted.rest;\n\n  //\n  // When the authority component is absent the URL starts with a path\n  // component.\n  //\n  if (\n    extracted.protocol === 'file:' && (\n      extracted.slashesCount !== 2 || windowsDriveLetter.test(address)) ||\n    (!extracted.slashes &&\n      (extracted.protocol ||\n        extracted.slashesCount < 2 ||\n        !isSpecial(url.protocol)))\n  ) {\n    instructions[3] = [/(.*)/, 'pathname'];\n  }\n\n  for (; i < instructions.length; i++) {\n    instruction = instructions[i];\n\n    if (typeof instruction === 'function') {\n      address = instruction(address, url);\n      continue;\n    }\n\n    parse = instruction[0];\n    key = instruction[1];\n\n    if (parse !== parse) {\n      url[key] = address;\n    } else if ('string' === typeof parse) {\n      if (~(index = address.indexOf(parse))) {\n        if ('number' === typeof instruction[2]) {\n          url[key] = address.slice(0, index);\n          address = address.slice(index + instruction[2]);\n        } else {\n          url[key] = address.slice(index);\n          address = address.slice(0, index);\n        }\n      }\n    } else if ((index = parse.exec(address))) {\n      url[key] = index[1];\n      address = address.slice(0, index.index);\n    }\n\n    url[key] = url[key] || (\n      relative && instruction[3] ? location[key] || '' : ''\n    );\n\n    //\n    // Hostname, host and protocol should be lowercased so they can be used to\n    // create a proper `origin`.\n    //\n    if (instruction[4]) url[key] = url[key].toLowerCase();\n  }\n\n  //\n  // Also parse the supplied query string in to an object. If we're supplied\n  // with a custom parser as function use that instead of the default build-in\n  // parser.\n  //\n  if (parser) url.query = parser(url.query);\n\n  //\n  // If the URL is relative, resolve the pathname against the base URL.\n  //\n  if (\n      relative\n    && location.slashes\n    && url.pathname.charAt(0) !== '/'\n    && (url.pathname !== '' || location.pathname !== '')\n  ) {\n    url.pathname = resolve(url.pathname, location.pathname);\n  }\n\n  //\n  // Default to a / for pathname if none exists. This normalizes the URL\n  // to always have a /\n  //\n  if (url.pathname.charAt(0) !== '/' && isSpecial(url.protocol)) {\n    url.pathname = '/' + url.pathname;\n  }\n\n  //\n  // We should not add port numbers if they are already the default port number\n  // for a given protocol. As the host also contains the port number we're going\n  // override it with the hostname which contains no port number.\n  //\n  if (!required(url.port, url.protocol)) {\n    url.host = url.hostname;\n    url.port = '';\n  }\n\n  //\n  // Parse down the `auth` for the username and password.\n  //\n  url.username = url.password = '';\n  if (url.auth) {\n    instruction = url.auth.split(':');\n    url.username = instruction[0];\n    url.password = instruction[1] || '';\n  }\n\n  url.origin = url.protocol !== 'file:' && isSpecial(url.protocol) && url.host\n    ? url.protocol +'//'+ url.host\n    : 'null';\n\n  //\n  // The href is just the compiled result.\n  //\n  url.href = url.toString();\n}\n\n/**\n * This is convenience method for changing properties in the URL instance to\n * insure that they all propagate correctly.\n *\n * @param {String} part          Property we need to adjust.\n * @param {Mixed} value          The newly assigned value.\n * @param {Boolean|Function} fn  When setting the query, it will be the function\n *                               used to parse the query.\n *                               When setting the protocol, double slash will be\n *                               removed from the final url if it is true.\n * @returns {URL} URL instance for chaining.\n * @public\n */\nfunction set(part, value, fn) {\n  var url = this;\n\n  switch (part) {\n    case 'query':\n      if ('string' === typeof value && value.length) {\n        value = (fn || qs.parse)(value);\n      }\n\n      url[part] = value;\n      break;\n\n    case 'port':\n      url[part] = value;\n\n      if (!required(value, url.protocol)) {\n        url.host = url.hostname;\n        url[part] = '';\n      } else if (value) {\n        url.host = url.hostname +':'+ value;\n      }\n\n      break;\n\n    case 'hostname':\n      url[part] = value;\n\n      if (url.port) value += ':'+ url.port;\n      url.host = value;\n      break;\n\n    case 'host':\n      url[part] = value;\n\n      if (/:\\d+$/.test(value)) {\n        value = value.split(':');\n        url.port = value.pop();\n        url.hostname = value.join(':');\n      } else {\n        url.hostname = value;\n        url.port = '';\n      }\n\n      break;\n\n    case 'protocol':\n      url.protocol = value.toLowerCase();\n      url.slashes = !fn;\n      break;\n\n    case 'pathname':\n    case 'hash':\n      if (value) {\n        var char = part === 'pathname' ? '/' : '#';\n        url[part] = value.charAt(0) !== char ? char + value : value;\n      } else {\n        url[part] = value;\n      }\n      break;\n\n    case 'username':\n    case 'password':\n      url[part] = encodeURIComponent(value);\n      break;\n\n    case 'auth':\n      var splits = value.split(':');\n      url.username = splits[0];\n      url.password = splits.length === 2 ? splits[1] : '';\n  }\n\n  for (var i = 0; i < rules.length; i++) {\n    var ins = rules[i];\n\n    if (ins[4]) url[ins[1]] = url[ins[1]].toLowerCase();\n  }\n\n  url.auth = url.password ? url.username +':'+ url.password : url.username;\n\n  url.origin = url.protocol !== 'file:' && isSpecial(url.protocol) && url.host\n    ? url.protocol +'//'+ url.host\n    : 'null';\n\n  url.href = url.toString();\n\n  return url;\n}\n\n/**\n * Transform the properties back in to a valid and full URL string.\n *\n * @param {Function} stringify Optional query stringify function.\n * @returns {String} Compiled version of the URL.\n * @public\n */\nfunction toString(stringify) {\n  if (!stringify || 'function' !== typeof stringify) stringify = qs.stringify;\n\n  var query\n    , url = this\n    , protocol = url.protocol;\n\n  if (protocol && protocol.charAt(protocol.length - 1) !== ':') protocol += ':';\n\n  var result =\n    protocol +\n    ((url.protocol && url.slashes) || isSpecial(url.protocol) ? '//' : '');\n\n  if (url.username) {\n    result += url.username;\n    if (url.password) result += ':'+ url.password;\n    result += '@';\n  } else if (url.password) {\n    result += ':'+ url.password;\n    result += '@';\n  }\n\n  result += url.host + url.pathname;\n\n  query = 'object' === typeof url.query ? stringify(url.query) : url.query;\n  if (query) result += '?' !== query.charAt(0) ? '?'+ query : query;\n\n  if (url.hash) result += url.hash;\n\n  return result;\n}\n\nUrl.prototype = { set: set, toString: toString };\n\n//\n// Expose the URL parser and some additional properties that might be useful for\n// others or testing.\n//\nUrl.extractProtocol = extractProtocol;\nUrl.location = lolcation;\nUrl.trimLeft = trimLeft;\nUrl.qs = qs;\n\nmodule.exports = Url;\n", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = void 0;\n\nfunction _typeof(obj) {\n  \"@babel/helpers - typeof\";\n\n  if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n    _typeof = function _typeof(obj) {\n      return typeof obj;\n    };\n  } else {\n    _typeof = function _typeof(obj) {\n      return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n    };\n  }\n\n  return _typeof(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}\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\");\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _createSuper(Derived) {\n  return function () {\n    var Super = _getPrototypeOf(Derived),\n        result;\n\n    if (_isNativeReflectConstruct()) {\n      var NewTarget = _getPrototypeOf(this).constructor;\n\n      result = Reflect.construct(Super, arguments, NewTarget);\n    } else {\n      result = Super.apply(this, arguments);\n    }\n\n    return _possibleConstructorReturn(this, result);\n  };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n  if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n    return call;\n  }\n\n  return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n  if (self === void 0) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return self;\n}\n\nfunction _wrapNativeSuper(Class) {\n  var _cache = typeof Map === \"function\" ? new Map() : undefined;\n\n  _wrapNativeSuper = function _wrapNativeSuper(Class) {\n    if (Class === null || !_isNativeFunction(Class)) return Class;\n\n    if (typeof Class !== \"function\") {\n      throw new TypeError(\"Super expression must either be null or a function\");\n    }\n\n    if (typeof _cache !== \"undefined\") {\n      if (_cache.has(Class)) return _cache.get(Class);\n\n      _cache.set(Class, Wrapper);\n    }\n\n    function Wrapper() {\n      return _construct(Class, arguments, _getPrototypeOf(this).constructor);\n    }\n\n    Wrapper.prototype = Object.create(Class.prototype, {\n      constructor: {\n        value: Wrapper,\n        enumerable: false,\n        writable: true,\n        configurable: true\n      }\n    });\n    return _setPrototypeOf(Wrapper, Class);\n  };\n\n  return _wrapNativeSuper(Class);\n}\n\nfunction _construct(Parent, args, Class) {\n  if (_isNativeReflectConstruct()) {\n    _construct = Reflect.construct;\n  } else {\n    _construct = function _construct(Parent, args, Class) {\n      var a = [null];\n      a.push.apply(a, args);\n      var Constructor = Function.bind.apply(Parent, a);\n      var instance = new Constructor();\n      if (Class) _setPrototypeOf(instance, Class.prototype);\n      return instance;\n    };\n  }\n\n  return _construct.apply(null, arguments);\n}\n\nfunction _isNativeReflectConstruct() {\n  if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n  if (Reflect.construct.sham) return false;\n  if (typeof Proxy === \"function\") return true;\n\n  try {\n    Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n    return true;\n  } catch (e) {\n    return false;\n  }\n}\n\nfunction _isNativeFunction(fn) {\n  return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n}\n\nfunction _setPrototypeOf(o, p) {\n  _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n    o.__proto__ = p;\n    return o;\n  };\n\n  return _setPrototypeOf(o, p);\n}\n\nfunction _getPrototypeOf(o) {\n  _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n    return o.__proto__ || Object.getPrototypeOf(o);\n  };\n  return _getPrototypeOf(o);\n}\n\nvar DetailedError = /*#__PURE__*/function (_Error) {\n  _inherits(DetailedError, _Error);\n\n  var _super = _createSuper(DetailedError);\n\n  function DetailedError(message) {\n    var _this;\n\n    var causingErr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n    var req = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n    var res = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n\n    _classCallCheck(this, DetailedError);\n\n    _this = _super.call(this, message);\n    _this.originalRequest = req;\n    _this.originalResponse = res;\n    _this.causingError = causingErr;\n\n    if (causingErr != null) {\n      message += \", caused by \".concat(causingErr.toString());\n    }\n\n    if (req != null) {\n      var requestId = req.getHeader('X-Request-ID') || 'n/a';\n      var method = req.getMethod();\n      var url = req.getURL();\n      var status = res ? res.getStatus() : 'n/a';\n      var body = res ? res.getBody() || '' : 'n/a';\n      message += \", originated from request (method: \".concat(method, \", url: \").concat(url, \", response code: \").concat(status, \", response text: \").concat(body, \", request id: \").concat(requestId, \")\");\n    }\n\n    _this.message = message;\n    return _this;\n  }\n\n  return DetailedError;\n}( /*#__PURE__*/_wrapNativeSuper(Error));\n\nvar _default = DetailedError;\nexports.default = _default;", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.enableDebugLog = enableDebugLog;\nexports.log = log;\n\n/* eslint no-console: \"off\" */\nvar isEnabled = false;\n\nfunction enableDebugLog() {\n  isEnabled = true;\n}\n\nfunction log(msg) {\n  if (!isEnabled) return;\n  console.log(msg);\n}", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = uuid;\n\n/**\n * Generate a UUID v4 based on random numbers. We intentioanlly use the less\n * secure Math.random function here since the more secure crypto.getRandomNumbers\n * is not available on all platforms.\n * This is not a problem for us since we use the UUID only for generating a\n * request ID, so we can correlate server logs to client errors.\n *\n * This function is taken from following site:\n * https://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript\n *\n * @return {string} The generate UUID\n */\nfunction uuid() {\n  return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n    var r = Math.random() * 16 | 0,\n        v = c == 'x' ? r : r & 0x3 | 0x8;\n    return v.toString(16);\n  });\n}", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = void 0;\n\nvar _jsBase = require(\"js-base64\");\n\nvar _urlParse = _interopRequireDefault(require(\"url-parse\"));\n\nvar _error = _interopRequireDefault(require(\"./error\"));\n\nvar _logger = require(\"./logger\");\n\nvar _uuid = _interopRequireDefault(require(\"./uuid\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction ownKeys(object, enumerableOnly) {\n  var keys = Object.keys(object);\n\n  if (Object.getOwnPropertySymbols) {\n    var symbols = Object.getOwnPropertySymbols(object);\n    if (enumerableOnly) symbols = symbols.filter(function (sym) {\n      return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n    });\n    keys.push.apply(keys, symbols);\n  }\n\n  return keys;\n}\n\nfunction _objectSpread(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i] != null ? arguments[i] : {};\n\n    if (i % 2) {\n      ownKeys(Object(source), true).forEach(function (key) {\n        _defineProperty(target, key, source[key]);\n      });\n    } else if (Object.getOwnPropertyDescriptors) {\n      Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n    } else {\n      ownKeys(Object(source)).forEach(function (key) {\n        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n      });\n    }\n  }\n\n  return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return 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}\n\nfunction _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\nfunction _createClass(Constructor, protoProps, staticProps) {\n  if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n  if (staticProps) _defineProperties(Constructor, staticProps);\n  return Constructor;\n}\n/* global window */\n\n\nvar defaultOptions = {\n  endpoint: null,\n  uploadUrl: null,\n  metadata: {},\n  fingerprint: null,\n  uploadSize: null,\n  onProgress: null,\n  onChunkComplete: null,\n  onSuccess: null,\n  onError: null,\n  _onUploadUrlAvailable: null,\n  overridePatchMethod: false,\n  headers: {},\n  addRequestId: false,\n  onBeforeRequest: null,\n  onAfterResponse: null,\n  onShouldRetry: null,\n  chunkSize: Infinity,\n  retryDelays: [0, 1000, 3000, 5000],\n  parallelUploads: 1,\n  storeFingerprintForResuming: true,\n  removeFingerprintOnSuccess: false,\n  uploadLengthDeferred: false,\n  uploadDataDuringCreation: false,\n  urlStorage: null,\n  fileReader: null,\n  httpStack: null\n};\n\nvar BaseUpload = /*#__PURE__*/function () {\n  function BaseUpload(file, options) {\n    _classCallCheck(this, BaseUpload); // Warn about removed options from previous versions\n\n\n    if ('resume' in options) {\n      console.log('tus: The `resume` option has been removed in tus-js-client v2. Please use the URL storage API instead.'); // eslint-disable-line no-console\n    } // The default options will already be added from the wrapper classes.\n\n\n    this.options = options; // The storage module used to store URLs\n\n    this._urlStorage = this.options.urlStorage; // The underlying File/Blob object\n\n    this.file = file; // The URL against which the file will be uploaded\n\n    this.url = null; // The underlying request object for the current PATCH request\n\n    this._req = null; // The fingerpinrt for the current file (set after start())\n\n    this._fingerprint = null; // The key that the URL storage returned when saving an URL with a fingerprint,\n\n    this._urlStorageKey = null; // The offset used in the current PATCH request\n\n    this._offset = null; // True if the current PATCH request has been aborted\n\n    this._aborted = false; // The file's size in bytes\n\n    this._size = null; // The Source object which will wrap around the given file and provides us\n    // with a unified interface for getting its size and slice chunks from its\n    // content allowing us to easily handle Files, Blobs, Buffers and Streams.\n\n    this._source = null; // The current count of attempts which have been made. Zero indicates none.\n\n    this._retryAttempt = 0; // The timeout's ID which is used to delay the next retry\n\n    this._retryTimeout = null; // The offset of the remote upload before the latest attempt was started.\n\n    this._offsetBeforeRetry = 0; // An array of BaseUpload instances which are used for uploading the different\n    // parts, if the parallelUploads option is used.\n\n    this._parallelUploads = null; // An array of upload URLs which are used for uploading the different\n    // parts, if the parallelUploads option is used.\n\n    this._parallelUploadUrls = null;\n  }\n  /**\n   * Use the Termination extension to delete an upload from the server by sending a DELETE\n   * request to the specified upload URL. This is only possible if the server supports the\n   * Termination extension. If the `options.retryDelays` property is set, the method will\n   * also retry if an error ocurrs.\n   *\n   * @param {String} url The upload's URL which will be terminated.\n   * @param {object} options Optional options for influencing HTTP requests.\n   * @return {Promise} The Promise will be resolved/rejected when the requests finish.\n   */\n\n\n  _createClass(BaseUpload, [{\n    key: \"findPreviousUploads\",\n    value: function findPreviousUploads() {\n      var _this = this;\n\n      return this.options.fingerprint(this.file, this.options).then(function (fingerprint) {\n        return _this._urlStorage.findUploadsByFingerprint(fingerprint);\n      });\n    }\n  }, {\n    key: \"resumeFromPreviousUpload\",\n    value: function resumeFromPreviousUpload(previousUpload) {\n      this.url = previousUpload.uploadUrl || null;\n      this._parallelUploadUrls = previousUpload.parallelUploadUrls || null;\n      this._urlStorageKey = previousUpload.urlStorageKey;\n    }\n  }, {\n    key: \"start\",\n    value: function start() {\n      var _this2 = this;\n\n      var file = this.file;\n\n      if (!file) {\n        this._emitError(new Error('tus: no file or stream to upload provided'));\n\n        return;\n      }\n\n      if (!this.options.endpoint && !this.options.uploadUrl) {\n        this._emitError(new Error('tus: neither an endpoint or an upload URL is provided'));\n\n        return;\n      }\n\n      var retryDelays = this.options.retryDelays;\n\n      if (retryDelays != null && Object.prototype.toString.call(retryDelays) !== '[object Array]') {\n        this._emitError(new Error('tus: the `retryDelays` option must either be an array or null'));\n\n        return;\n      }\n\n      if (this.options.parallelUploads > 1) {\n        // Test which options are incompatible with parallel uploads.\n        ['uploadUrl', 'uploadSize', 'uploadLengthDeferred'].forEach(function (optionName) {\n          if (_this2.options[optionName]) {\n            _this2._emitError(new Error(\"tus: cannot use the \".concat(optionName, \" option when parallelUploads is enabled\")));\n          }\n        });\n      }\n\n      this.options.fingerprint(file, this.options).then(function (fingerprint) {\n        if (fingerprint == null) {\n          (0, _logger.log)('No fingerprint was calculated meaning that the upload cannot be stored in the URL storage.');\n        } else {\n          (0, _logger.log)(\"Calculated fingerprint: \".concat(fingerprint));\n        }\n\n        _this2._fingerprint = fingerprint;\n\n        if (_this2._source) {\n          return _this2._source;\n        }\n\n        return _this2.options.fileReader.openFile(file, _this2.options.chunkSize);\n      }).then(function (source) {\n        _this2._source = source; // If the upload was configured to use multiple requests or if we resume from\n        // an upload which used multiple requests, we start a parallel upload.\n\n        if (_this2.options.parallelUploads > 1 || _this2._parallelUploadUrls != null) {\n          _this2._startParallelUpload();\n        } else {\n          _this2._startSingleUpload();\n        }\n      })[\"catch\"](function (err) {\n        _this2._emitError(err);\n      });\n    }\n    /**\n     * Initiate the uploading procedure for a parallelized upload, where one file is split into\n     * multiple request which are run in parallel.\n     *\n     * @api private\n     */\n\n  }, {\n    key: \"_startParallelUpload\",\n    value: function _startParallelUpload() {\n      var _this3 = this;\n\n      var totalSize = this._size = this._source.size;\n      var totalProgress = 0;\n      this._parallelUploads = [];\n      var partCount = this._parallelUploadUrls != null ? this._parallelUploadUrls.length : this.options.parallelUploads; // The input file will be split into multiple slices which are uploaded in separate\n      // requests. Here we generate the start and end position for the slices.\n\n      var parts = splitSizeIntoParts(this._source.size, partCount, this._parallelUploadUrls); // Create an empty list for storing the upload URLs\n\n      this._parallelUploadUrls = new Array(parts.length); // Generate a promise for each slice that will be resolve if the respective\n      // upload is completed.\n\n      var uploads = parts.map(function (part, index) {\n        var lastPartProgress = 0;\n        return _this3._source.slice(part.start, part.end).then(function (_ref) {\n          var value = _ref.value;\n          return new Promise(function (resolve, reject) {\n            // Merge with the user supplied options but overwrite some values.\n            var options = _objectSpread({}, _this3.options, {\n              // If available, the partial upload should be resumed from a previous URL.\n              uploadUrl: part.uploadUrl || null,\n              // We take manually care of resuming for partial uploads, so they should\n              // not be stored in the URL storage.\n              storeFingerprintForResuming: false,\n              removeFingerprintOnSuccess: false,\n              // Reset the parallelUploads option to not cause recursion.\n              parallelUploads: 1,\n              metadata: {},\n              // Add the header to indicate the this is a partial upload.\n              headers: _objectSpread({}, _this3.options.headers, {\n                'Upload-Concat': 'partial'\n              }),\n              // Reject or resolve the promise if the upload errors or completes.\n              onSuccess: resolve,\n              onError: reject,\n              // Based in the progress for this partial upload, calculate the progress\n              // for the entire final upload.\n              onProgress: function onProgress(newPartProgress) {\n                totalProgress = totalProgress - lastPartProgress + newPartProgress;\n                lastPartProgress = newPartProgress;\n\n                _this3._emitProgress(totalProgress, totalSize);\n              },\n              // Wait until every partial upload has an upload URL, so we can add\n              // them to the URL storage.\n              _onUploadUrlAvailable: function _onUploadUrlAvailable() {\n                _this3._parallelUploadUrls[index] = upload.url; // Test if all uploads have received an URL\n\n                if (_this3._parallelUploadUrls.filter(function (u) {\n                  return !!u;\n                }).length === parts.length) {\n                  _this3._saveUploadInUrlStorage();\n                }\n              }\n            });\n\n            var upload = new BaseUpload(value, options);\n            upload.start(); // Store the upload in an array, so we can later abort them if necessary.\n\n            _this3._parallelUploads.push(upload);\n          });\n        });\n      });\n      var req; // Wait until all partial uploads are finished and we can send the POST request for\n      // creating the final upload.\n\n      Promise.all(uploads).then(function () {\n        req = _this3._openRequest('POST', _this3.options.endpoint);\n        req.setHeader('Upload-Concat', \"final;\".concat(_this3._parallelUploadUrls.join(' '))); // Add metadata if values have been added\n\n        var metadata = encodeMetadata(_this3.options.metadata);\n\n        if (metadata !== '') {\n          req.setHeader('Upload-Metadata', metadata);\n        }\n\n        return _this3._sendRequest(req, null);\n      }).then(function (res) {\n        if (!inStatusCategory(res.getStatus(), 200)) {\n          _this3._emitHttpError(req, res, 'tus: unexpected response while creating upload');\n\n          return;\n        }\n\n        var location = res.getHeader('Location');\n\n        if (location == null) {\n          _this3._emitHttpError(req, res, 'tus: invalid or missing Location header');\n\n          return;\n        }\n\n        _this3.url = resolveUrl(_this3.options.endpoint, location);\n        (0, _logger.log)(\"Created upload at \".concat(_this3.url));\n\n        _this3._emitSuccess();\n      })[\"catch\"](function (err) {\n        _this3._emitError(err);\n      });\n    }\n    /**\n     * Initiate the uploading procedure for a non-parallel upload. Here the entire file is\n     * uploaded in a sequential matter.\n     *\n     * @api private\n     */\n\n  }, {\n    key: \"_startSingleUpload\",\n    value: function _startSingleUpload() {\n      // First, we look at the uploadLengthDeferred option.\n      // Next, we check if the caller has supplied a manual upload size.\n      // Finally, we try to use the calculated size from the source object.\n      if (this.options.uploadLengthDeferred) {\n        this._size = null;\n      } else if (this.options.uploadSize != null) {\n        this._size = +this.options.uploadSize;\n\n        if (isNaN(this._size)) {\n          this._emitError(new Error('tus: cannot convert `uploadSize` option into a number'));\n\n          return;\n        }\n      } else {\n        this._size = this._source.size;\n\n        if (this._size == null) {\n          this._emitError(new Error(\"tus: cannot automatically derive upload's size from input and must be specified manually using the `uploadSize` option\"));\n\n          return;\n        }\n      } // Reset the aborted flag when the upload is started or else the\n      // _performUpload will stop before sending a request if the upload has been\n      // aborted previously.\n\n\n      this._aborted = false; // The upload had been started previously and we should reuse this URL.\n\n      if (this.url != null) {\n        (0, _logger.log)(\"Resuming upload from previous URL: \".concat(this.url));\n\n        this._resumeUpload();\n\n        return;\n      } // A URL has manually been specified, so we try to resume\n\n\n      if (this.options.uploadUrl != null) {\n        (0, _logger.log)(\"Resuming upload from provided URL: \".concat(this.options.url));\n        this.url = this.options.uploadUrl;\n\n        this._resumeUpload();\n\n        return;\n      } // An upload has not started for the file yet, so we start a new one\n\n\n      (0, _logger.log)('Creating a new upload');\n\n      this._createUpload();\n    }\n    /**\n     * Abort any running request and stop the current upload. After abort is called, no event\n     * handler will be invoked anymore. You can use the `start` method to resume the upload\n     * again.\n     * If `shouldTerminate` is true, the `terminate` function will be called to remove the\n     * current upload from the server.\n     *\n     * @param {boolean} shouldTerminate True if the upload should be deleted from the server.\n     * @return {Promise} The Promise will be resolved/rejected when the requests finish.\n     */\n\n  }, {\n    key: \"abort\",\n    value: function abort(shouldTerminate) {\n      var _this4 = this; // Count the number of arguments to see if a callback is being provided in the old style required by tus-js-client 1.x, then throw an error if it is.\n      // `arguments` is a JavaScript built-in variable that contains all of the function's arguments.\n\n\n      if (arguments.length > 1 && typeof arguments[1] === 'function') {\n        throw new Error('tus: the abort function does not accept a callback since v2 anymore; please use the returned Promise instead');\n      } // Stop any parallel partial uploads, that have been started in _startParallelUploads.\n\n\n      if (this._parallelUploads != null) {\n        this._parallelUploads.forEach(function (upload) {\n          upload.abort(shouldTerminate);\n        });\n      } // Stop any current running request.\n\n\n      if (this._req !== null) {\n        this._req.abort();\n\n        this._source.close();\n      }\n\n      this._aborted = true; // Stop any timeout used for initiating a retry.\n\n      if (this._retryTimeout != null) {\n        clearTimeout(this._retryTimeout);\n        this._retryTimeout = null;\n      }\n\n      if (!shouldTerminate || this.url == null) {\n        return Promise.resolve();\n      }\n\n      return BaseUpload.terminate(this.url, this.options) // Remove entry from the URL storage since the upload URL is no longer valid.\n      .then(function () {\n        return _this4._removeFromUrlStorage();\n      });\n    }\n  }, {\n    key: \"_emitHttpError\",\n    value: function _emitHttpError(req, res, message, causingErr) {\n      this._emitError(new _error.default(message, causingErr, req, res));\n    }\n  }, {\n    key: \"_emitError\",\n    value: function _emitError(err) {\n      var _this5 = this; // Do not emit errors, e.g. from aborted HTTP requests, if the upload has been stopped.\n\n\n      if (this._aborted) return; // Check if we should retry, when enabled, before sending the error to the user.\n\n      if (this.options.retryDelays != null) {\n        // We will reset the attempt counter if\n        // - we were already able to connect to the server (offset != null) and\n        // - we were able to upload a small chunk of data to the server\n        var shouldResetDelays = this._offset != null && this._offset > this._offsetBeforeRetry;\n\n        if (shouldResetDelays) {\n          this._retryAttempt = 0;\n        }\n\n        if (shouldRetry(err, this._retryAttempt, this.options)) {\n          var delay = this.options.retryDelays[this._retryAttempt++];\n          this._offsetBeforeRetry = this._offset;\n          this._retryTimeout = setTimeout(function () {\n            _this5.start();\n          }, delay);\n          return;\n        }\n      }\n\n      if (typeof this.options.onError === 'function') {\n        this.options.onError(err);\n      } else {\n        throw err;\n      }\n    }\n    /**\n     * Publishes notification if the upload has been successfully completed.\n     *\n     * @api private\n     */\n\n  }, {\n    key: \"_emitSuccess\",\n    value: function _emitSuccess() {\n      if (this.options.removeFingerprintOnSuccess) {\n        // Remove stored fingerprint and corresponding endpoint. This causes\n        // new uploads of the same file to be treated as a different file.\n        this._removeFromUrlStorage();\n      }\n\n      if (typeof this.options.onSuccess === 'function') {\n        this.options.onSuccess();\n      }\n    }\n    /**\n     * Publishes notification when data has been sent to the server. This\n     * data may not have been accepted by the server yet.\n     *\n     * @param {number} bytesSent  Number of bytes sent to the server.\n     * @param {number} bytesTotal Total number of bytes to be sent to the server.\n     * @api private\n     */\n\n  }, {\n    key: \"_emitProgress\",\n    value: function _emitProgress(bytesSent, bytesTotal) {\n      if (typeof this.options.onProgress === 'function') {\n        this.options.onProgress(bytesSent, bytesTotal);\n      }\n    }\n    /**\n     * Publishes notification when a chunk of data has been sent to the server\n     * and accepted by the server.\n     * @param {number} chunkSize  Size of the chunk that was accepted by the server.\n     * @param {number} bytesAccepted Total number of bytes that have been\n     *                                accepted by the server.\n     * @param {number} bytesTotal Total number of bytes to be sent to the server.\n     * @api private\n     */\n\n  }, {\n    key: \"_emitChunkComplete\",\n    value: function _emitChunkComplete(chunkSize, bytesAccepted, bytesTotal) {\n      if (typeof this.options.onChunkComplete === 'function') {\n        this.options.onChunkComplete(chunkSize, bytesAccepted, bytesTotal);\n      }\n    }\n    /**\n     * Create a new upload using the creation extension by sending a POST\n     * request to the endpoint. After successful creation the file will be\n     * uploaded\n     *\n     * @api private\n     */\n\n  }, {\n    key: \"_createUpload\",\n    value: function _createUpload() {\n      var _this6 = this;\n\n      if (!this.options.endpoint) {\n        this._emitError(new Error('tus: unable to create upload because no endpoint is provided'));\n\n        return;\n      }\n\n      var req = this._openRequest('POST', this.options.endpoint);\n\n      if (this.options.uploadLengthDeferred) {\n        req.setHeader('Upload-Defer-Length', 1);\n      } else {\n        req.setHeader('Upload-Length', this._size);\n      } // Add metadata if values have been added\n\n\n      var metadata = encodeMetadata(this.options.metadata);\n\n      if (metadata !== '') {\n        req.setHeader('Upload-Metadata', metadata);\n      }\n\n      var promise;\n\n      if (this.options.uploadDataDuringCreation && !this.options.uploadLengthDeferred) {\n        this._offset = 0;\n        promise = this._addChunkToRequest(req);\n      } else {\n        promise = this._sendRequest(req, null);\n      }\n\n      promise.then(function (res) {\n        if (!inStatusCategory(res.getStatus(), 200)) {\n          _this6._emitHttpError(req, res, 'tus: unexpected response while creating upload');\n\n          return;\n        }\n\n        var location = res.getHeader('Location');\n\n        if (location == null) {\n          _this6._emitHttpError(req, res, 'tus: invalid or missing Location header');\n\n          return;\n        }\n\n        _this6.url = resolveUrl(_this6.options.endpoint, location);\n        (0, _logger.log)(\"Created upload at \".concat(_this6.url));\n\n        if (typeof _this6.options._onUploadUrlAvailable === 'function') {\n          _this6.options._onUploadUrlAvailable();\n        }\n\n        if (_this6._size === 0) {\n          // Nothing to upload and file was successfully created\n          _this6._emitSuccess();\n\n          _this6._source.close();\n\n          return;\n        }\n\n        _this6._saveUploadInUrlStorage();\n\n        if (_this6.options.uploadDataDuringCreation) {\n          _this6._handleUploadResponse(req, res);\n        } else {\n          _this6._offset = 0;\n\n          _this6._performUpload();\n        }\n      })[\"catch\"](function (err) {\n        _this6._emitHttpError(req, null, 'tus: failed to create upload', err);\n      });\n    }\n    /*\n     * Try to resume an existing upload. First a HEAD request will be sent\n     * to retrieve the offset. If the request fails a new upload will be\n     * created. In the case of a successful response the file will be uploaded.\n     *\n     * @api private\n     */\n\n  }, {\n    key: \"_resumeUpload\",\n    value: function _resumeUpload() {\n      var _this7 = this;\n\n      var req = this._openRequest('HEAD', this.url);\n\n      var promise = this._sendRequest(req, null);\n\n      promise.then(function (res) {\n        var status = res.getStatus();\n\n        if (!inStatusCategory(status, 200)) {\n          if (inStatusCategory(status, 400)) {\n            // Remove stored fingerprint and corresponding endpoint,\n            // on client errors since the file can not be found\n            _this7._removeFromUrlStorage();\n          } // If the upload is locked (indicated by the 423 Locked status code), we\n          // emit an error instead of directly starting a new upload. This way the\n          // retry logic can catch the error and will retry the upload. An upload\n          // is usually locked for a short period of time and will be available\n          // afterwards.\n\n\n          if (status === 423) {\n            _this7._emitHttpError(req, res, 'tus: upload is currently locked; retry later');\n\n            return;\n          }\n\n          if (!_this7.options.endpoint) {\n            // Don't attempt to create a new upload if no endpoint is provided.\n            _this7._emitHttpError(req, res, 'tus: unable to resume upload (new upload cannot be created without an endpoint)');\n\n            return;\n          } // Try to create a new upload\n\n\n          _this7.url = null;\n\n          _this7._createUpload();\n\n          return;\n        }\n\n        var offset = parseInt(res.getHeader('Upload-Offset'), 10);\n\n        if (isNaN(offset)) {\n          _this7._emitHttpError(req, res, 'tus: invalid or missing offset value');\n\n          return;\n        }\n\n        var length = parseInt(res.getHeader('Upload-Length'), 10);\n\n        if (isNaN(length) && !_this7.options.uploadLengthDeferred) {\n          _this7._emitHttpError(req, res, 'tus: invalid or missing length value');\n\n          return;\n        }\n\n        if (typeof _this7.options._onUploadUrlAvailable === 'function') {\n          _this7.options._onUploadUrlAvailable();\n        } // Upload has already been completed and we do not need to send additional\n        // data to the server\n\n\n        if (offset === length) {\n          _this7._emitProgress(length, length);\n\n          _this7._emitSuccess();\n\n          return;\n        }\n\n        _this7._offset = offset;\n\n        _this7._performUpload();\n      })[\"catch\"](function (err) {\n        _this7._emitHttpError(req, null, 'tus: failed to resume upload', err);\n      });\n    }\n    /**\n     * Start uploading the file using PATCH requests. The file will be divided\n     * into chunks as specified in the chunkSize option. During the upload\n     * the onProgress event handler may be invoked multiple times.\n     *\n     * @api private\n     */\n\n  }, {\n    key: \"_performUpload\",\n    value: function _performUpload() {\n      var _this8 = this; // If the upload has been aborted, we will not send the next PATCH request.\n      // This is important if the abort method was called during a callback, such\n      // as onChunkComplete or onProgress.\n\n\n      if (this._aborted) {\n        return;\n      }\n\n      var req; // Some browser and servers may not support the PATCH method. For those\n      // cases, you can tell tus-js-client to use a POST request with the\n      // X-HTTP-Method-Override header for simulating a PATCH request.\n\n      if (this.options.overridePatchMethod) {\n        req = this._openRequest('POST', this.url);\n        req.setHeader('X-HTTP-Method-Override', 'PATCH');\n      } else {\n        req = this._openRequest('PATCH', this.url);\n      }\n\n      req.setHeader('Upload-Offset', this._offset);\n\n      var promise = this._addChunkToRequest(req);\n\n      promise.then(function (res) {\n        if (!inStatusCategory(res.getStatus(), 200)) {\n          _this8._emitHttpError(req, res, 'tus: unexpected response while uploading chunk');\n\n          return;\n        }\n\n        _this8._handleUploadResponse(req, res);\n      })[\"catch\"](function (err) {\n        // Don't emit an error if the upload was aborted manually\n        if (_this8._aborted) {\n          return;\n        }\n\n        _this8._emitHttpError(req, null, \"tus: failed to upload chunk at offset \".concat(_this8._offset), err);\n      });\n    }\n    /**\n     * _addChunktoRequest reads a chunk from the source and sends it using the\n     * supplied request object. It will not handle the response.\n     *\n     * @api private\n     */\n\n  }, {\n    key: \"_addChunkToRequest\",\n    value: function _addChunkToRequest(req) {\n      var _this9 = this;\n\n      var start = this._offset;\n      var end = this._offset + this.options.chunkSize;\n      req.setProgressHandler(function (bytesSent) {\n        _this9._emitProgress(start + bytesSent, _this9._size);\n      });\n      req.setHeader('Content-Type', 'application/offset+octet-stream'); // The specified chunkSize may be Infinity or the calcluated end position\n      // may exceed the file's size. In both cases, we limit the end position to\n      // the input's total size for simpler calculations and correctness.\n\n      if ((end === Infinity || end > this._size) && !this.options.uploadLengthDeferred) {\n        end = this._size;\n      }\n\n      return this._source.slice(start, end).then(function (_ref2) {\n        var value = _ref2.value,\n            done = _ref2.done; // If the upload length is deferred, the upload size was not specified during\n        // upload creation. So, if the file reader is done reading, we know the total\n        // upload size and can tell the tus server.\n\n        if (_this9.options.uploadLengthDeferred && done) {\n          _this9._size = _this9._offset + (value && value.size ? value.size : 0);\n          req.setHeader('Upload-Length', _this9._size);\n        }\n\n        if (value === null) {\n          return _this9._sendRequest(req);\n        }\n\n        _this9._emitProgress(_this9._offset, _this9._size);\n\n        return _this9._sendRequest(req, value);\n      });\n    }\n    /**\n     * _handleUploadResponse is used by requests that haven been sent using _addChunkToRequest\n     * and already have received a response.\n     *\n     * @api private\n     */\n\n  }, {\n    key: \"_handleUploadResponse\",\n    value: function _handleUploadResponse(req, res) {\n      var offset = parseInt(res.getHeader('Upload-Offset'), 10);\n\n      if (isNaN(offset)) {\n        this._emitHttpError(req, res, 'tus: invalid or missing offset value');\n\n        return;\n      }\n\n      this._emitProgress(offset, this._size);\n\n      this._emitChunkComplete(offset - this._offset, offset, this._size);\n\n      this._offset = offset;\n\n      if (offset == this._size) {\n        // Yay, finally done :)\n        this._emitSuccess();\n\n        this._source.close();\n\n        return;\n      }\n\n      this._performUpload();\n    }\n    /**\n     * Create a new HTTP request object with the given method and URL.\n     *\n     * @api private\n     */\n\n  }, {\n    key: \"_openRequest\",\n    value: function _openRequest(method, url) {\n      var req = openRequest(method, url, this.options);\n      this._req = req;\n      return req;\n    }\n    /**\n     * Remove the entry in the URL storage, if it has been saved before.\n     *\n     * @api private\n     */\n\n  }, {\n    key: \"_removeFromUrlStorage\",\n    value: function _removeFromUrlStorage() {\n      var _this10 = this;\n\n      if (!this._urlStorageKey) return;\n\n      this._urlStorage.removeUpload(this._urlStorageKey)[\"catch\"](function (err) {\n        _this10._emitError(err);\n      });\n\n      this._urlStorageKey = null;\n    }\n    /**\n     * Add the upload URL to the URL storage, if possible.\n     *\n     * @api private\n     */\n\n  }, {\n    key: \"_saveUploadInUrlStorage\",\n    value: function _saveUploadInUrlStorage() {\n      var _this11 = this; // Only if a fingerprint was calculated for the input (i.e. not a stream), we can store the upload URL.\n\n\n      if (!this.options.storeFingerprintForResuming || !this._fingerprint) {\n        return;\n      }\n\n      var storedUpload = {\n        size: this._size,\n        metadata: this.options.metadata,\n        creationTime: new Date().toString()\n      };\n\n      if (this._parallelUploads) {\n        // Save multiple URLs if the parallelUploads option is used ...\n        storedUpload.parallelUploadUrls = this._parallelUploadUrls;\n      } else {\n        // ... otherwise we just save the one available URL.\n        storedUpload.uploadUrl = this.url;\n      }\n\n      this._urlStorage.addUpload(this._fingerprint, storedUpload).then(function (urlStorageKey) {\n        return _this11._urlStorageKey = urlStorageKey;\n      })[\"catch\"](function (err) {\n        _this11._emitError(err);\n      });\n    }\n    /**\n     * Send a request with the provided body.\n     *\n     * @api private\n     */\n\n  }, {\n    key: \"_sendRequest\",\n    value: function _sendRequest(req) {\n      var body = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n      return sendRequest(req, body, this.options);\n    }\n  }], [{\n    key: \"terminate\",\n    value: function terminate(url, options) {\n      // Count the number of arguments to see if a callback is being provided as the last\n      // argument in the old style required by tus-js-client 1.x, then throw an error if it is.\n      // `arguments` is a JavaScript built-in variable that contains all of the function's arguments.\n      if (arguments.length > 1 && typeof arguments[arguments.length - 1] === 'function') {\n        throw new Error('tus: the terminate function does not accept a callback since v2 anymore; please use the returned Promise instead');\n      } // Note that in order for the trick above to work, a default value cannot be set for `options`,\n      // so the check below replaces the old default `{}`.\n\n\n      if (options === undefined) {\n        options = {};\n      }\n\n      var req = openRequest('DELETE', url, options);\n      return sendRequest(req, null, options).then(function (res) {\n        // A 204 response indicates a successfull request\n        if (res.getStatus() === 204) {\n          return;\n        }\n\n        throw new _error.default('tus: unexpected response while terminating upload', null, req, res);\n      })[\"catch\"](function (err) {\n        if (!(err instanceof _error.default)) {\n          err = new _error.default('tus: failed to terminate upload', err, req, null);\n        }\n\n        if (!shouldRetry(err, 0, options)) {\n          throw err;\n        } // Instead of keeping track of the retry attempts, we remove the first element from the delays\n        // array. If the array is empty, all retry attempts are used up and we will bubble up the error.\n        // We recursively call the terminate function will removing elements from the retryDelays array.\n\n\n        var delay = options.retryDelays[0];\n        var remainingDelays = options.retryDelays.slice(1);\n\n        var newOptions = _objectSpread({}, options, {\n          retryDelays: remainingDelays\n        });\n\n        return new Promise(function (resolve) {\n          return setTimeout(resolve, delay);\n        }).then(function () {\n          return BaseUpload.terminate(url, newOptions);\n        });\n      });\n    }\n  }]);\n\n  return BaseUpload;\n}();\n\nfunction encodeMetadata(metadata) {\n  var encoded = [];\n\n  for (var key in metadata) {\n    encoded.push(\"\".concat(key, \" \").concat(_jsBase.Base64.encode(metadata[key])));\n  }\n\n  return encoded.join(',');\n}\n/**\n * Checks whether a given status is in the range of the expected category.\n * For example, only a status between 200 and 299 will satisfy the category 200.\n *\n * @api private\n */\n\n\nfunction inStatusCategory(status, category) {\n  return status >= category && status < category + 100;\n}\n/**\n * Create a new HTTP request with the specified method and URL.\n * The necessary headers that are included in every request\n * will be added, including the request ID.\n *\n * @api private\n */\n\n\nfunction openRequest(method, url, options) {\n  var req = options.httpStack.createRequest(method, url);\n  req.setHeader('Tus-Resumable', '1.0.0');\n  var headers = options.headers || {};\n\n  for (var name in headers) {\n    req.setHeader(name, headers[name]);\n  }\n\n  if (options.addRequestId) {\n    var requestId = (0, _uuid.default)();\n    req.setHeader('X-Request-ID', requestId);\n  }\n\n  return req;\n}\n/**\n * Send a request with the provided body while invoking the onBeforeRequest\n * and onAfterResponse callbacks.\n *\n * @api private\n */\n\n\nfunction sendRequest(req, body, options) {\n  var onBeforeRequestPromise = typeof options.onBeforeRequest === 'function' ? Promise.resolve(options.onBeforeRequest(req)) : Promise.resolve();\n  return onBeforeRequestPromise.then(function () {\n    return req.send(body).then(function (res) {\n      var onAfterResponsePromise = typeof options.onAfterResponse === 'function' ? Promise.resolve(options.onAfterResponse(req, res)) : Promise.resolve();\n      return onAfterResponsePromise.then(function () {\n        return res;\n      });\n    });\n  });\n}\n/**\n * Checks whether the browser running this code has internet access.\n * This function will always return true in the node.js environment\n *\n * @api private\n */\n\n\nfunction isOnline() {\n  var online = true;\n\n  if (typeof window !== 'undefined' && 'navigator' in window && window.navigator.onLine === false) {\n    online = false;\n  }\n\n  return online;\n}\n/**\n * Checks whether or not it is ok to retry a request.\n * @param {Error} err the error returned from the last request\n * @param {number} retryAttempt the number of times the request has already been retried\n * @param {object} options tus Upload options\n *\n * @api private\n */\n\n\nfunction shouldRetry(err, retryAttempt, options) {\n  // We only attempt a retry if\n  // - retryDelays option is set\n  // - we didn't exceed the maxium number of retries, yet, and\n  // - this error was caused by a request or it's response and\n  // - the error is server error (i.e. not a status 4xx except a 409 or 423) or\n  // a onShouldRetry is specified and returns true\n  // - the browser does not indicate that we are offline\n  if (options.retryDelays == null || retryAttempt >= options.retryDelays.length || err.originalRequest == null) {\n    return false;\n  }\n\n  if (options && typeof options.onShouldRetry === 'function') {\n    return options.onShouldRetry(err, retryAttempt, options);\n  }\n\n  var status = err.originalResponse ? err.originalResponse.getStatus() : 0;\n  return (!inStatusCategory(status, 400) || status === 409 || status === 423) && isOnline();\n}\n/**\n * Resolve a relative link given the origin as source. For example,\n * if a HTTP request to http://example.com/files/ returns a Location\n * header with the value /upload/abc, the resolved URL will be:\n * http://example.com/upload/abc\n */\n\n\nfunction resolveUrl(origin, link) {\n  return new _urlParse.default(link, origin).toString();\n}\n/**\n * Calculate the start and end positions for the parts if an upload\n * is split into multiple parallel requests.\n *\n * @param {number} totalSize The byte size of the upload, which will be split.\n * @param {number} partCount The number in how many parts the upload will be split.\n * @param {string[]} previousUrls The upload URLs for previous parts.\n * @return {object[]}\n * @api private\n */\n\n\nfunction splitSizeIntoParts(totalSize, partCount, previousUrls) {\n  var partSize = Math.floor(totalSize / partCount);\n  var parts = [];\n\n  for (var i = 0; i < partCount; i++) {\n    parts.push({\n      start: partSize * i,\n      end: partSize * (i + 1)\n    });\n  }\n\n  parts[partCount - 1].end = totalSize; // Attach URLs from previous uploads, if available.\n\n  if (previousUrls) {\n    parts.forEach(function (part, index) {\n      part.uploadUrl = previousUrls[index] || null;\n    });\n  }\n\n  return parts;\n}\n\nBaseUpload.defaultOptions = defaultOptions;\nvar _default = BaseUpload;\nexports.default = _default;", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = void 0;\n\nfunction _classCallCheck(instance, Constructor) {\n  if (!(instance instanceof Constructor)) {\n    throw new TypeError(\"Cannot call a class as a function\");\n  }\n}\n\nfunction _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\nfunction _createClass(Constructor, protoProps, staticProps) {\n  if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n  if (staticProps) _defineProperties(Constructor, staticProps);\n  return Constructor;\n}\n/* eslint no-unused-vars: \"off\" */\n\n\nvar NoopUrlStorage = /*#__PURE__*/function () {\n  function NoopUrlStorage() {\n    _classCallCheck(this, NoopUrlStorage);\n  }\n\n  _createClass(NoopUrlStorage, [{\n    key: \"listAllUploads\",\n    value: function listAllUploads() {\n      return Promise.resolve([]);\n    }\n  }, {\n    key: \"findUploadsByFingerprint\",\n    value: function findUploadsByFingerprint(fingerprint) {\n      return Promise.resolve([]);\n    }\n  }, {\n    key: \"removeUpload\",\n    value: function removeUpload(urlStorageKey) {\n      return Promise.resolve();\n    }\n  }, {\n    key: \"addUpload\",\n    value: function addUpload(fingerprint, upload) {\n      return Promise.resolve(null);\n    }\n  }]);\n\n  return NoopUrlStorage;\n}();\n\nexports.default = NoopUrlStorage;", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.WebStorageUrlStorage = exports.canStoreURLs = void 0;\n\nfunction _classCallCheck(instance, Constructor) {\n  if (!(instance instanceof Constructor)) {\n    throw new TypeError(\"Cannot call a class as a function\");\n  }\n}\n\nfunction _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\nfunction _createClass(Constructor, protoProps, staticProps) {\n  if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n  if (staticProps) _defineProperties(Constructor, staticProps);\n  return Constructor;\n}\n/* global window, localStorage */\n\n\nvar hasStorage = false;\n\ntry {\n  hasStorage = 'localStorage' in window; // Attempt to store and read entries from the local storage to detect Private\n  // Mode on Safari on iOS (see #49)\n\n  var key = 'tusSupport';\n  localStorage.setItem(key, localStorage.getItem(key));\n} catch (e) {\n  // If we try to access localStorage inside a sandboxed iframe, a SecurityError\n  // is thrown. When in private mode on iOS Safari, a QuotaExceededError is\n  // thrown (see #49)\n  if (e.code === e.SECURITY_ERR || e.code === e.QUOTA_EXCEEDED_ERR) {\n    hasStorage = false;\n  } else {\n    throw e;\n  }\n}\n\nvar canStoreURLs = hasStorage;\nexports.canStoreURLs = canStoreURLs;\n\nvar WebStorageUrlStorage = /*#__PURE__*/function () {\n  function WebStorageUrlStorage() {\n    _classCallCheck(this, WebStorageUrlStorage);\n  }\n\n  _createClass(WebStorageUrlStorage, [{\n    key: \"findAllUploads\",\n    value: function findAllUploads() {\n      var results = this._findEntries('tus::');\n\n      return Promise.resolve(results);\n    }\n  }, {\n    key: \"findUploadsByFingerprint\",\n    value: function findUploadsByFingerprint(fingerprint) {\n      var results = this._findEntries(\"tus::\".concat(fingerprint, \"::\"));\n\n      return Promise.resolve(results);\n    }\n  }, {\n    key: \"removeUpload\",\n    value: function removeUpload(urlStorageKey) {\n      localStorage.removeItem(urlStorageKey);\n      return Promise.resolve();\n    }\n  }, {\n    key: \"addUpload\",\n    value: function addUpload(fingerprint, upload) {\n      var id = Math.round(Math.random() * 1e12);\n      var key = \"tus::\".concat(fingerprint, \"::\").concat(id);\n      localStorage.setItem(key, JSON.stringify(upload));\n      return Promise.resolve(key);\n    }\n  }, {\n    key: \"_findEntries\",\n    value: function _findEntries(prefix) {\n      var results = [];\n\n      for (var i = 0; i < localStorage.length; i++) {\n        var _key = localStorage.key(i);\n\n        if (_key.indexOf(prefix) !== 0) continue;\n\n        try {\n          var upload = JSON.parse(localStorage.getItem(_key));\n          upload.urlStorageKey = _key;\n          results.push(upload);\n        } catch (e) {// The JSON parse error is intentionally ignored here, so a malformed\n          // entry in the storage cannot prevent an upload.\n        }\n      }\n\n      return results;\n    }\n  }]);\n\n  return WebStorageUrlStorage;\n}();\n\nexports.WebStorageUrlStorage = WebStorageUrlStorage;", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = void 0;\n\nfunction _classCallCheck(instance, Constructor) {\n  if (!(instance instanceof Constructor)) {\n    throw new TypeError(\"Cannot call a class as a function\");\n  }\n}\n\nfunction _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\nfunction _createClass(Constructor, protoProps, staticProps) {\n  if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n  if (staticProps) _defineProperties(Constructor, staticProps);\n  return Constructor;\n}\n/* global window */\n\n\nvar XHRHttpStack = /*#__PURE__*/function () {\n  function XHRHttpStack() {\n    _classCallCheck(this, XHRHttpStack);\n  }\n\n  _createClass(XHRHttpStack, [{\n    key: \"createRequest\",\n    value: function createRequest(method, url) {\n      return new Request(method, url);\n    }\n  }, {\n    key: \"getName\",\n    value: function getName() {\n      return 'XHRHttpStack';\n    }\n  }]);\n\n  return XHRHttpStack;\n}();\n\nexports.default = XHRHttpStack;\n\nvar Request = /*#__PURE__*/function () {\n  function Request(method, url) {\n    _classCallCheck(this, Request);\n\n    this._xhr = new XMLHttpRequest();\n\n    this._xhr.open(method, url, true);\n\n    this._method = method;\n    this._url = url;\n    this._headers = {};\n  }\n\n  _createClass(Request, [{\n    key: \"getMethod\",\n    value: function getMethod() {\n      return this._method;\n    }\n  }, {\n    key: \"getURL\",\n    value: function getURL() {\n      return this._url;\n    }\n  }, {\n    key: \"setHeader\",\n    value: function setHeader(header, value) {\n      this._xhr.setRequestHeader(header, value);\n\n      this._headers[header] = value;\n    }\n  }, {\n    key: \"getHeader\",\n    value: function getHeader(header) {\n      return this._headers[header];\n    }\n  }, {\n    key: \"setProgressHandler\",\n    value: function setProgressHandler(progressHandler) {\n      // Test support for progress events before attaching an event listener\n      if (!('upload' in this._xhr)) {\n        return;\n      }\n\n      this._xhr.upload.onprogress = function (e) {\n        if (!e.lengthComputable) {\n          return;\n        }\n\n        progressHandler(e.loaded);\n      };\n    }\n  }, {\n    key: \"send\",\n    value: function send() {\n      var _this = this;\n\n      var body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n      return new Promise(function (resolve, reject) {\n        _this._xhr.onload = function () {\n          resolve(new Response(_this._xhr));\n        };\n\n        _this._xhr.onerror = function (err) {\n          reject(err);\n        };\n\n        _this._xhr.send(body);\n      });\n    }\n  }, {\n    key: \"abort\",\n    value: function abort() {\n      this._xhr.abort();\n\n      return Promise.resolve();\n    }\n  }, {\n    key: \"getUnderlyingObject\",\n    value: function getUnderlyingObject() {\n      return this._xhr;\n    }\n  }]);\n\n  return Request;\n}();\n\nvar Response = /*#__PURE__*/function () {\n  function Response(xhr) {\n    _classCallCheck(this, Response);\n\n    this._xhr = xhr;\n  }\n\n  _createClass(Response, [{\n    key: \"getStatus\",\n    value: function getStatus() {\n      return this._xhr.status;\n    }\n  }, {\n    key: \"getHeader\",\n    value: function getHeader(header) {\n      return this._xhr.getResponseHeader(header);\n    }\n  }, {\n    key: \"getBody\",\n    value: function getBody() {\n      return this._xhr.responseText;\n    }\n  }, {\n    key: \"getUnderlyingObject\",\n    value: function getUnderlyingObject() {\n      return this._xhr;\n    }\n  }]);\n\n  return Response;\n}();", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = void 0;\n\nvar isReactNative = function isReactNative() {\n  return typeof navigator !== 'undefined' && typeof navigator.product === 'string' && navigator.product.toLowerCase() === 'reactnative';\n};\n\nvar _default = isReactNative;\nexports.default = _default;", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = uriToBlob;\n\n/**\n * uriToBlob resolves a URI to a Blob object. This is used for\n * React Native to retrieve a file (identified by a file://\n * URI) as a blob.\n */\nfunction uriToBlob(uri) {\n  return new Promise(function (resolve, reject) {\n    var xhr = new XMLHttpRequest();\n    xhr.responseType = 'blob';\n\n    xhr.onload = function () {\n      var blob = xhr.response;\n      resolve(blob);\n    };\n\n    xhr.onerror = function (err) {\n      reject(err);\n    };\n\n    xhr.open('GET', uri);\n    xhr.send();\n  });\n}", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = void 0;\n\nvar isCordova = function isCordova() {\n  return typeof window != 'undefined' && (typeof window.PhoneGap != 'undefined' || typeof window.Cordova != 'undefined' || typeof window.cordova != 'undefined');\n};\n\nvar _default = isCordova;\nexports.default = _default;", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = readAsByteArray;\n\n/**\n * readAsByteArray converts a File object to a Uint8Array.\n * This function is only used on the Apache Cordova platform.\n * See https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/index.html#read-a-file\n */\nfunction readAsByteArray(chunk) {\n  return new Promise(function (resolve, reject) {\n    var reader = new FileReader();\n\n    reader.onload = function () {\n      var value = new Uint8Array(reader.result);\n      resolve({\n        value: value\n      });\n    };\n\n    reader.onerror = function (err) {\n      reject(err);\n    };\n\n    reader.readAsArrayBuffer(chunk);\n  });\n}", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = void 0;\n\nvar _isReactNative = _interopRequireDefault(require(\"./isReactNative\"));\n\nvar _uriToBlob = _interopRequireDefault(require(\"./uriToBlob\"));\n\nvar _isCordova = _interopRequireDefault(require(\"./isCordova\"));\n\nvar _readAsByteArray = _interopRequireDefault(require(\"./readAsByteArray\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) {\n  if (!(instance instanceof Constructor)) {\n    throw new TypeError(\"Cannot call a class as a function\");\n  }\n}\n\nfunction _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\nfunction _createClass(Constructor, protoProps, staticProps) {\n  if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n  if (staticProps) _defineProperties(Constructor, staticProps);\n  return Constructor;\n}\n\nvar FileSource = /*#__PURE__*/function () {\n  // Make this.size a method\n  function FileSource(file) {\n    _classCallCheck(this, FileSource);\n\n    this._file = file;\n    this.size = file.size;\n  }\n\n  _createClass(FileSource, [{\n    key: \"slice\",\n    value: function slice(start, end) {\n      // In Apache Cordova applications, a File must be resolved using\n      // FileReader instances, see\n      // https://cordova.apache.org/docs/en/8.x/reference/cordova-plugin-file/index.html#read-a-file\n      if ((0, _isCordova.default)()) {\n        return (0, _readAsByteArray.default)(this._file.slice(start, end));\n      }\n\n      var value = this._file.slice(start, end);\n\n      return Promise.resolve({\n        value: value\n      });\n    }\n  }, {\n    key: \"close\",\n    value: function close() {// Nothing to do here since we don't need to release any resources.\n    }\n  }]);\n\n  return FileSource;\n}();\n\nvar StreamSource = /*#__PURE__*/function () {\n  function StreamSource(reader, chunkSize) {\n    _classCallCheck(this, StreamSource);\n\n    this._chunkSize = chunkSize;\n    this._buffer = undefined;\n    this._bufferOffset = 0;\n    this._reader = reader;\n    this._done = false;\n  }\n\n  _createClass(StreamSource, [{\n    key: \"slice\",\n    value: function slice(start, end) {\n      if (start < this._bufferOffset) {\n        return Promise.reject(new Error(\"Requested data is before the reader's current offset\"));\n      }\n\n      return this._readUntilEnoughDataOrDone(start, end);\n    }\n  }, {\n    key: \"_readUntilEnoughDataOrDone\",\n    value: function _readUntilEnoughDataOrDone(start, end) {\n      var _this = this;\n\n      var hasEnoughData = end <= this._bufferOffset + len(this._buffer);\n\n      if (this._done || hasEnoughData) {\n        var value = this._getDataFromBuffer(start, end);\n\n        var done = value == null ? this._done : false;\n        return Promise.resolve({\n          value: value,\n          done: done\n        });\n      }\n\n      return this._reader.read().then(function (_ref) {\n        var value = _ref.value,\n            done = _ref.done;\n\n        if (done) {\n          _this._done = true;\n        } else if (_this._buffer === undefined) {\n          _this._buffer = value;\n        } else {\n          _this._buffer = concat(_this._buffer, value);\n        }\n\n        return _this._readUntilEnoughDataOrDone(start, end);\n      });\n    }\n  }, {\n    key: \"_getDataFromBuffer\",\n    value: function _getDataFromBuffer(start, end) {\n      // Remove data from buffer before `start`.\n      // Data might be reread from the buffer if an upload fails, so we can only\n      // safely delete data when it comes *before* what is currently being read.\n      if (start > this._bufferOffset) {\n        this._buffer = this._buffer.slice(start - this._bufferOffset);\n        this._bufferOffset = start;\n      } // If the buffer is empty after removing old data, all data has been read.\n\n\n      var hasAllDataBeenRead = len(this._buffer) === 0;\n\n      if (this._done && hasAllDataBeenRead) {\n        return null;\n      } // We already removed data before `start`, so we just return the first\n      // chunk from the buffer.\n\n\n      return this._buffer.slice(0, end - start);\n    }\n  }, {\n    key: \"close\",\n    value: function close() {\n      if (this._reader.cancel) {\n        this._reader.cancel();\n      }\n    }\n  }]);\n\n  return StreamSource;\n}();\n\nfunction len(blobOrArray) {\n  if (blobOrArray === undefined) return 0;\n  if (blobOrArray.size !== undefined) return blobOrArray.size;\n  return blobOrArray.length;\n}\n/*\n  Typed arrays and blobs don't have a concat method.\n  This function helps StreamSource accumulate data to reach chunkSize.\n*/\n\n\nfunction concat(a, b) {\n  if (a.concat) {\n    // Is `a` an Array?\n    return a.concat(b);\n  }\n\n  if (a instanceof Blob) {\n    return new Blob([a, b], {\n      type: a.type\n    });\n  }\n\n  if (a.set) {\n    // Is `a` a typed array?\n    var c = new a.constructor(a.length + b.length);\n    c.set(a);\n    c.set(b, a.length);\n    return c;\n  }\n\n  throw new Error('Unknown data type');\n}\n\nvar FileReader = /*#__PURE__*/function () {\n  function FileReader() {\n    _classCallCheck(this, FileReader);\n  }\n\n  _createClass(FileReader, [{\n    key: \"openFile\",\n    value: function openFile(input, chunkSize) {\n      // In React Native, when user selects a file, instead of a File or Blob,\n      // you usually get a file object {} with a uri property that contains\n      // a local path to the file. We use XMLHttpRequest to fetch\n      // the file blob, before uploading with tus.\n      if ((0, _isReactNative.default)() && input && typeof input.uri !== 'undefined') {\n        return (0, _uriToBlob.default)(input.uri).then(function (blob) {\n          return new FileSource(blob);\n        })[\"catch\"](function (err) {\n          throw new Error(\"tus: cannot fetch `file.uri` as Blob, make sure the uri is correct and accessible. \".concat(err));\n        });\n      } // Since we emulate the Blob type in our tests (not all target browsers\n      // support it), we cannot use `instanceof` for testing whether the input value\n      // can be handled. Instead, we simply check is the slice() function and the\n      // size property are available.\n\n\n      if (typeof input.slice === 'function' && typeof input.size !== 'undefined') {\n        return Promise.resolve(new FileSource(input));\n      }\n\n      if (typeof input.read === 'function') {\n        chunkSize = +chunkSize;\n\n        if (!isFinite(chunkSize)) {\n          return Promise.reject(new Error('cannot create source for stream without a finite value for the `chunkSize` option'));\n        }\n\n        return Promise.resolve(new StreamSource(input, chunkSize));\n      }\n\n      return Promise.reject(new Error('source object may only be an instance of File, Blob, or Reader in this environment'));\n    }\n  }]);\n\n  return FileReader;\n}();\n\nexports.default = FileReader;", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = fingerprint;\n\nvar _isReactNative = _interopRequireDefault(require(\"./isReactNative\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// TODO: Differenciate between input types\n\n/**\n * Generate a fingerprint for a file which will be used the store the endpoint\n *\n * @param {File} file\n * @param {Object} options\n * @param {Function} callback\n */\nfunction fingerprint(file, options) {\n  if ((0, _isReactNative.default)()) {\n    return Promise.resolve(reactNativeFingerprint(file, options));\n  }\n\n  return Promise.resolve(['tus-br', file.name, file.type, file.size, file.lastModified, options.endpoint].join('-'));\n}\n\nfunction reactNativeFingerprint(file, options) {\n  var exifHash = file.exif ? hashCode(JSON.stringify(file.exif)) : 'noexif';\n  return ['tus-rn', file.name || 'noname', file.size || 'nosize', exifHash, options.endpoint].join('/');\n}\n\nfunction hashCode(str) {\n  // from https://stackoverflow.com/a/8831937/151666\n  var hash = 0;\n\n  if (str.length === 0) {\n    return hash;\n  }\n\n  for (var i = 0; i < str.length; i++) {\n    var _char = str.charCodeAt(i);\n\n    hash = (hash << 5) - hash + _char;\n    hash &= hash; // Convert to 32bit integer\n  }\n\n  return hash;\n}", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nObject.defineProperty(exports, \"enableDebugLog\", {\n  enumerable: true,\n  get: function () {\n    return _logger.enableDebugLog;\n  }\n});\nObject.defineProperty(exports, \"canStoreURLs\", {\n  enumerable: true,\n  get: function () {\n    return _urlStorage.canStoreURLs;\n  }\n});\nObject.defineProperty(exports, \"HttpStack\", {\n  enumerable: true,\n  get: function () {\n    return _httpStack.default;\n  }\n});\nexports.isSupported = exports.defaultOptions = exports.Upload = void 0;\n\nvar _upload = _interopRequireDefault(require(\"../upload\"));\n\nvar _noopUrlStorage = _interopRequireDefault(require(\"../noopUrlStorage\"));\n\nvar _logger = require(\"../logger\");\n\nvar _urlStorage = require(\"./urlStorage\");\n\nvar _httpStack = _interopRequireDefault(require(\"./httpStack\"));\n\nvar _fileReader = _interopRequireDefault(require(\"./fileReader\"));\n\nvar _fingerprint = _interopRequireDefault(require(\"./fingerprint\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _typeof(obj) {\n  \"@babel/helpers - typeof\";\n\n  if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n    _typeof = function _typeof(obj) {\n      return typeof obj;\n    };\n  } else {\n    _typeof = function _typeof(obj) {\n      return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n    };\n  }\n\n  return _typeof(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}\n\nfunction _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\nfunction _createClass(Constructor, protoProps, staticProps) {\n  if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n  if (staticProps) _defineProperties(Constructor, staticProps);\n  return Constructor;\n}\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\");\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n  _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n    o.__proto__ = p;\n    return o;\n  };\n\n  return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n  return function () {\n    var Super = _getPrototypeOf(Derived),\n        result;\n\n    if (_isNativeReflectConstruct()) {\n      var NewTarget = _getPrototypeOf(this).constructor;\n\n      result = Reflect.construct(Super, arguments, NewTarget);\n    } else {\n      result = Super.apply(this, arguments);\n    }\n\n    return _possibleConstructorReturn(this, result);\n  };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n  if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n    return call;\n  }\n\n  return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n  if (self === void 0) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return self;\n}\n\nfunction _isNativeReflectConstruct() {\n  if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n  if (Reflect.construct.sham) return false;\n  if (typeof Proxy === \"function\") return true;\n\n  try {\n    Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n    return true;\n  } catch (e) {\n    return false;\n  }\n}\n\nfunction _getPrototypeOf(o) {\n  _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n    return o.__proto__ || Object.getPrototypeOf(o);\n  };\n  return _getPrototypeOf(o);\n}\n\nfunction ownKeys(object, enumerableOnly) {\n  var keys = Object.keys(object);\n\n  if (Object.getOwnPropertySymbols) {\n    var symbols = Object.getOwnPropertySymbols(object);\n    if (enumerableOnly) symbols = symbols.filter(function (sym) {\n      return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n    });\n    keys.push.apply(keys, symbols);\n  }\n\n  return keys;\n}\n\nfunction _objectSpread(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i] != null ? arguments[i] : {};\n\n    if (i % 2) {\n      ownKeys(Object(source), true).forEach(function (key) {\n        _defineProperty(target, key, source[key]);\n      });\n    } else if (Object.getOwnPropertyDescriptors) {\n      Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n    } else {\n      ownKeys(Object(source)).forEach(function (key) {\n        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n      });\n    }\n  }\n\n  return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n/* global window */\n\n\nvar defaultOptions = _objectSpread({}, _upload.default.defaultOptions, {\n  httpStack: new _httpStack.default(),\n  fileReader: new _fileReader.default(),\n  urlStorage: _urlStorage.canStoreURLs ? new _urlStorage.WebStorageUrlStorage() : new _noopUrlStorage.default(),\n  fingerprint: _fingerprint.default\n});\n\nexports.defaultOptions = defaultOptions;\n\nvar Upload = /*#__PURE__*/function (_BaseUpload) {\n  _inherits(Upload, _BaseUpload);\n\n  var _super = _createSuper(Upload);\n\n  function Upload() {\n    var file = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n    _classCallCheck(this, Upload);\n\n    options = _objectSpread({}, defaultOptions, {}, options);\n    return _super.call(this, file, options);\n  }\n\n  _createClass(Upload, null, [{\n    key: \"terminate\",\n    value: function terminate(url, options, cb) {\n      options = _objectSpread({}, defaultOptions, {}, options);\n      return _upload.default.terminate(url, options, cb);\n    }\n  }]);\n\n  return Upload;\n}(_upload.default);\n\nexports.Upload = Upload;\nvar _window = window,\n    XMLHttpRequest = _window.XMLHttpRequest,\n    Blob = _window.Blob;\nvar isSupported = XMLHttpRequest && Blob && typeof Blob.prototype.slice === 'function';\nexports.isSupported = isSupported;", "\"use strict\";\n\nclass NetworkError extends Error {\n  constructor(error, xhr) {\n    if (xhr === void 0) {\n      xhr = null;\n    }\n\n    super(`This looks like a network error, the endpoint might be blocked by an internet provider or a firewall.`);\n    this.cause = error;\n    this.isNetworkError = true;\n    this.request = xhr;\n  }\n\n}\n\nmodule.exports = NetworkError;", "\"use strict\";\n\nconst NetworkError = require('./NetworkError');\n/**\n * Wrapper around window.fetch that throws a NetworkError when appropriate\n */\n\n\nmodule.exports = function fetchWithNetworkError() {\n  return fetch(...arguments).catch(err => {\n    if (err.name === 'AbortError') {\n      throw err;\n    } else {\n      throw new NetworkError(err);\n    }\n  });\n};", "'use strict';\n\nclass AuthError extends Error {\n  constructor() {\n    super('Authorization required');\n    this.name = 'AuthError';\n    this.isAuthError = true;\n  }\n\n}\n\nmodule.exports = AuthError;", "'use strict';\n\nvar _class, _getPostResponseFunc, _getUrl, _errorHandler, _temp;\n\nfunction _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError(\"attempted to use private field on non-instance\"); } return receiver; }\n\nvar id = 0;\n\nfunction _classPrivateFieldLooseKey(name) { return \"__private_\" + id++ + \"_\" + name; }\n\nconst fetchWithNetworkError = require('@uppy/utils/lib/fetchWithNetworkError');\n\nconst AuthError = require('./AuthError'); // Remove the trailing slash so we can always safely append /xyz.\n\n\nfunction stripSlash(url) {\n  return url.replace(/\\/$/, '');\n}\n\nasync function handleJSONResponse(res) {\n  if (res.status === 401) {\n    throw new AuthError();\n  }\n\n  const jsonPromise = res.json();\n\n  if (res.status < 200 || res.status > 300) {\n    let errMsg = `Failed request with status: ${res.status}. ${res.statusText}`;\n\n    try {\n      const errData = await jsonPromise;\n      errMsg = errData.message ? `${errMsg} message: ${errData.message}` : errMsg;\n      errMsg = errData.requestId ? `${errMsg} request-Id: ${errData.requestId}` : errMsg;\n    } finally {\n      // eslint-disable-next-line no-unsafe-finally\n      throw new Error(errMsg);\n    }\n  }\n\n  return jsonPromise;\n}\n\nmodule.exports = (_temp = (_getPostResponseFunc = /*#__PURE__*/_classPrivateFieldLooseKey(\"getPostResponseFunc\"), _getUrl = /*#__PURE__*/_classPrivateFieldLooseKey(\"getUrl\"), _errorHandler = /*#__PURE__*/_classPrivateFieldLooseKey(\"errorHandler\"), _class = class RequestClient {\n  // eslint-disable-next-line global-require\n  constructor(uppy, opts) {\n    Object.defineProperty(this, _errorHandler, {\n      value: _errorHandler2\n    });\n    Object.defineProperty(this, _getUrl, {\n      value: _getUrl2\n    });\n    Object.defineProperty(this, _getPostResponseFunc, {\n      writable: true,\n      value: skip => response => skip ? response : this.onReceiveResponse(response)\n    });\n    this.uppy = uppy;\n    this.opts = opts;\n    this.onReceiveResponse = this.onReceiveResponse.bind(this);\n    this.allowedHeaders = ['accept', 'content-type', 'uppy-auth-token'];\n    this.preflightDone = false;\n  }\n\n  get hostname() {\n    const {\n      companion\n    } = this.uppy.getState();\n    const host = this.opts.companionUrl;\n    return stripSlash(companion && companion[host] ? companion[host] : host);\n  }\n\n  headers() {\n    const userHeaders = this.opts.companionHeaders || {};\n    return Promise.resolve({ ...RequestClient.defaultHeaders,\n      ...userHeaders\n    });\n  }\n\n  onReceiveResponse(response) {\n    const state = this.uppy.getState();\n    const companion = state.companion || {};\n    const host = this.opts.companionUrl;\n    const {\n      headers\n    } = response; // Store the self-identified domain name for the Companion instance we just hit.\n\n    if (headers.has('i-am') && headers.get('i-am') !== companion[host]) {\n      this.uppy.setState({\n        companion: { ...companion,\n          [host]: headers.get('i-am')\n        }\n      });\n    }\n\n    return response;\n  }\n\n  preflight(path) {\n    if (this.preflightDone) {\n      return Promise.resolve(this.allowedHeaders.slice());\n    }\n\n    return fetch(_classPrivateFieldLooseBase(this, _getUrl)[_getUrl](path), {\n      method: 'OPTIONS'\n    }).then(response => {\n      if (response.headers.has('access-control-allow-headers')) {\n        this.allowedHeaders = response.headers.get('access-control-allow-headers').split(',').map(headerName => headerName.trim().toLowerCase());\n      }\n\n      this.preflightDone = true;\n      return this.allowedHeaders.slice();\n    }).catch(err => {\n      this.uppy.log(`[CompanionClient] unable to make preflight request ${err}`, 'warning');\n      this.preflightDone = true;\n      return this.allowedHeaders.slice();\n    });\n  }\n\n  preflightAndHeaders(path) {\n    return Promise.all([this.preflight(path), this.headers()]).then(_ref => {\n      let [allowedHeaders, headers] = _ref;\n      // filter to keep only allowed Headers\n      Object.keys(headers).forEach(header => {\n        if (!allowedHeaders.includes(header.toLowerCase())) {\n          this.uppy.log(`[CompanionClient] excluding disallowed header ${header}`);\n          delete headers[header]; // eslint-disable-line no-param-reassign\n        }\n      });\n      return headers;\n    });\n  }\n\n  get(path, skipPostResponse) {\n    const method = 'get';\n    return this.preflightAndHeaders(path).then(headers => fetchWithNetworkError(_classPrivateFieldLooseBase(this, _getUrl)[_getUrl](path), {\n      method,\n      headers,\n      credentials: this.opts.companionCookiesRule || 'same-origin'\n    })).then(_classPrivateFieldLooseBase(this, _getPostResponseFunc)[_getPostResponseFunc](skipPostResponse)).then(handleJSONResponse).catch(_classPrivateFieldLooseBase(this, _errorHandler)[_errorHandler](method, path));\n  }\n\n  post(path, data, skipPostResponse) {\n    const method = 'post';\n    return this.preflightAndHeaders(path).then(headers => fetchWithNetworkError(_classPrivateFieldLooseBase(this, _getUrl)[_getUrl](path), {\n      method,\n      headers,\n      credentials: this.opts.companionCookiesRule || 'same-origin',\n      body: JSON.stringify(data)\n    })).then(_classPrivateFieldLooseBase(this, _getPostResponseFunc)[_getPostResponseFunc](skipPostResponse)).then(handleJSONResponse).catch(_classPrivateFieldLooseBase(this, _errorHandler)[_errorHandler](method, path));\n  }\n\n  delete(path, data, skipPostResponse) {\n    const method = 'delete';\n    return this.preflightAndHeaders(path).then(headers => fetchWithNetworkError(`${this.hostname}/${path}`, {\n      method,\n      headers,\n      credentials: this.opts.companionCookiesRule || 'same-origin',\n      body: data ? JSON.stringify(data) : null\n    })).then(_classPrivateFieldLooseBase(this, _getPostResponseFunc)[_getPostResponseFunc](skipPostResponse)).then(handleJSONResponse).catch(_classPrivateFieldLooseBase(this, _errorHandler)[_errorHandler](method, path));\n  }\n\n}), _class.VERSION = \"2.0.4\", _class.defaultHeaders = {\n  Accept: 'application/json',\n  'Content-Type': 'application/json',\n  'Uppy-Versions': `@uppy/companion-client=${_class.VERSION}`\n}, _temp);\n\nfunction _getUrl2(url) {\n  if (/^(https?:|)\\/\\//.test(url)) {\n    return url;\n  }\n\n  return `${this.hostname}/${url}`;\n}\n\nfunction _errorHandler2(method, path) {\n  return err => {\n    var _err;\n\n    if (!((_err = err) != null && _err.isAuthError)) {\n      const error = new Error(`Could not ${method} ${_classPrivateFieldLooseBase(this, _getUrl)[_getUrl](path)}`);\n      error.cause = err;\n      err = error; // eslint-disable-line no-param-reassign\n    }\n\n    return Promise.reject(err);\n  };\n}", "'use strict';\n/**\n * This module serves as an Async wrapper for LocalStorage\n */\n\nmodule.exports.setItem = (key, value) => {\n  return new Promise(resolve => {\n    localStorage.setItem(key, value);\n    resolve();\n  });\n};\n\nmodule.exports.getItem = key => {\n  return Promise.resolve(localStorage.getItem(key));\n};\n\nmodule.exports.removeItem = key => {\n  return new Promise(resolve => {\n    localStorage.removeItem(key);\n    resolve();\n  });\n};", "'use strict';\n\nconst RequestClient = require('./RequestClient');\n\nconst tokenStorage = require('./tokenStorage');\n\nconst getName = id => {\n  return id.split('-').map(s => s.charAt(0).toUpperCase() + s.slice(1)).join(' ');\n};\n\nmodule.exports = class Provider extends RequestClient {\n  constructor(uppy, opts) {\n    super(uppy, opts);\n    this.provider = opts.provider;\n    this.id = this.provider;\n    this.name = this.opts.name || getName(this.id);\n    this.pluginId = this.opts.pluginId;\n    this.tokenKey = `companion-${this.pluginId}-auth-token`;\n    this.companionKeysParams = this.opts.companionKeysParams;\n    this.preAuthToken = null;\n  }\n\n  headers() {\n    return Promise.all([super.headers(), this.getAuthToken()]).then(_ref => {\n      let [headers, token] = _ref;\n      const authHeaders = {};\n\n      if (token) {\n        authHeaders['uppy-auth-token'] = token;\n      }\n\n      if (this.companionKeysParams) {\n        authHeaders['uppy-credentials-params'] = btoa(JSON.stringify({\n          params: this.companionKeysParams\n        }));\n      }\n\n      return { ...headers,\n        ...authHeaders\n      };\n    });\n  }\n\n  onReceiveResponse(response) {\n    response = super.onReceiveResponse(response);\n    const plugin = this.uppy.getPlugin(this.pluginId);\n    const oldAuthenticated = plugin.getPluginState().authenticated;\n    const authenticated = oldAuthenticated ? response.status !== 401 : response.status < 400;\n    plugin.setPluginState({\n      authenticated\n    });\n    return response;\n  }\n\n  setAuthToken(token) {\n    return this.uppy.getPlugin(this.pluginId).storage.setItem(this.tokenKey, token);\n  }\n\n  getAuthToken() {\n    return this.uppy.getPlugin(this.pluginId).storage.getItem(this.tokenKey);\n  }\n\n  authUrl(queries) {\n    if (queries === void 0) {\n      queries = {};\n    }\n\n    if (this.preAuthToken) {\n      queries.uppyPreAuthToken = this.preAuthToken;\n    }\n\n    return `${this.hostname}/${this.id}/connect?${new URLSearchParams(queries)}`;\n  }\n\n  fileUrl(id) {\n    return `${this.hostname}/${this.id}/get/${id}`;\n  }\n\n  fetchPreAuthToken() {\n    if (!this.companionKeysParams) {\n      return Promise.resolve();\n    }\n\n    return this.post(`${this.id}/preauth/`, {\n      params: this.companionKeysParams\n    }).then(res => {\n      this.preAuthToken = res.token;\n    }).catch(err => {\n      this.uppy.log(`[CompanionClient] unable to fetch preAuthToken ${err}`, 'warning');\n    });\n  }\n\n  list(directory) {\n    return this.get(`${this.id}/list/${directory || ''}`);\n  }\n\n  logout() {\n    return this.get(`${this.id}/logout`).then(response => Promise.all([response, this.uppy.getPlugin(this.pluginId).storage.removeItem(this.tokenKey)])).then(_ref2 => {\n      let [response] = _ref2;\n      return response;\n    });\n  }\n\n  static initPlugin(plugin, opts, defaultOpts) {\n    plugin.type = 'acquirer';\n    plugin.files = [];\n\n    if (defaultOpts) {\n      plugin.opts = { ...defaultOpts,\n        ...opts\n      };\n    }\n\n    if (opts.serverUrl || opts.serverPattern) {\n      throw new Error('`serverUrl` and `serverPattern` have been renamed to `companionUrl` and `companionAllowedHosts` respectively in the 0.30.5 release. Please consult the docs (for example, https://uppy.io/docs/instagram/ for the Instagram plugin) and use the updated options.`');\n    }\n\n    if (opts.companionAllowedHosts) {\n      const pattern = opts.companionAllowedHosts; // validate companionAllowedHosts param\n\n      if (typeof pattern !== 'string' && !Array.isArray(pattern) && !(pattern instanceof RegExp)) {\n        throw new TypeError(`${plugin.id}: the option \"companionAllowedHosts\" must be one of string, Array, RegExp`);\n      }\n\n      plugin.opts.companionAllowedHosts = pattern;\n    } else if (/^(?!https?:\\/\\/).*$/i.test(opts.companionUrl)) {\n      // does not start with https://\n      plugin.opts.companionAllowedHosts = `https://${opts.companionUrl.replace(/^\\/\\//, '')}`;\n    } else {\n      plugin.opts.companionAllowedHosts = new URL(opts.companionUrl).origin;\n    }\n\n    plugin.storage = plugin.opts.storage || tokenStorage;\n  }\n\n};", "'use strict';\n\nconst RequestClient = require('./RequestClient');\n\nconst getName = id => {\n  return id.split('-').map(s => s.charAt(0).toUpperCase() + s.slice(1)).join(' ');\n};\n\nmodule.exports = class SearchProvider extends RequestClient {\n  constructor(uppy, opts) {\n    super(uppy, opts);\n    this.provider = opts.provider;\n    this.id = this.provider;\n    this.name = this.opts.name || getName(this.id);\n    this.pluginId = this.opts.pluginId;\n  }\n\n  fileUrl(id) {\n    return `${this.hostname}/search/${this.id}/get/${id}`;\n  }\n\n  search(text, queries) {\n    queries = queries ? `&${queries}` : '';\n    return this.get(`search/${this.id}/list?q=${encodeURIComponent(text)}${queries}`);\n  }\n\n};", "\"use strict\";\n\nvar _queued, _emitter, _isOpen, _socket, _handleMessage;\n\nlet _Symbol$for, _Symbol$for2;\n\nfunction _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError(\"attempted to use private field on non-instance\"); } return receiver; }\n\nvar id = 0;\n\nfunction _classPrivateFieldLooseKey(name) { return \"__private_\" + id++ + \"_\" + name; }\n\nconst ee = require('namespace-emitter');\n\nmodule.exports = (_queued = /*#__PURE__*/_classPrivateFieldLooseKey(\"queued\"), _emitter = /*#__PURE__*/_classPrivateFieldLooseKey(\"emitter\"), _isOpen = /*#__PURE__*/_classPrivateFieldLooseKey(\"isOpen\"), _socket = /*#__PURE__*/_classPrivateFieldLooseKey(\"socket\"), _handleMessage = /*#__PURE__*/_classPrivateFieldLooseKey(\"handleMessage\"), _Symbol$for = Symbol.for('uppy test: getSocket'), _Symbol$for2 = Symbol.for('uppy test: getQueued'), class UppySocket {\n  constructor(opts) {\n    Object.defineProperty(this, _queued, {\n      writable: true,\n      value: []\n    });\n    Object.defineProperty(this, _emitter, {\n      writable: true,\n      value: ee()\n    });\n    Object.defineProperty(this, _isOpen, {\n      writable: true,\n      value: false\n    });\n    Object.defineProperty(this, _socket, {\n      writable: true,\n      value: void 0\n    });\n    Object.defineProperty(this, _handleMessage, {\n      writable: true,\n      value: e => {\n        try {\n          const message = JSON.parse(e.data);\n          this.emit(message.action, message.payload);\n        } catch (err) {\n          // TODO: use a more robust error handler.\n          console.log(err); // eslint-disable-line no-console\n        }\n      }\n    });\n    this.opts = opts;\n\n    if (!opts || opts.autoOpen !== false) {\n      this.open();\n    }\n  }\n\n  get isOpen() {\n    return _classPrivateFieldLooseBase(this, _isOpen)[_isOpen];\n  }\n\n  [_Symbol$for]() {\n    return _classPrivateFieldLooseBase(this, _socket)[_socket];\n  }\n\n  [_Symbol$for2]() {\n    return _classPrivateFieldLooseBase(this, _queued)[_queued];\n  }\n\n  open() {\n    _classPrivateFieldLooseBase(this, _socket)[_socket] = new WebSocket(this.opts.target);\n\n    _classPrivateFieldLooseBase(this, _socket)[_socket].onopen = () => {\n      _classPrivateFieldLooseBase(this, _isOpen)[_isOpen] = true;\n\n      while (_classPrivateFieldLooseBase(this, _queued)[_queued].length > 0 && _classPrivateFieldLooseBase(this, _isOpen)[_isOpen]) {\n        const first = _classPrivateFieldLooseBase(this, _queued)[_queued].shift();\n\n        this.send(first.action, first.payload);\n      }\n    };\n\n    _classPrivateFieldLooseBase(this, _socket)[_socket].onclose = () => {\n      _classPrivateFieldLooseBase(this, _isOpen)[_isOpen] = false;\n    };\n\n    _classPrivateFieldLooseBase(this, _socket)[_socket].onmessage = _classPrivateFieldLooseBase(this, _handleMessage)[_handleMessage];\n  }\n\n  close() {\n    var _classPrivateFieldLoo;\n\n    (_classPrivateFieldLoo = _classPrivateFieldLooseBase(this, _socket)[_socket]) == null ? void 0 : _classPrivateFieldLoo.close();\n  }\n\n  send(action, payload) {\n    // attach uuid\n    if (!_classPrivateFieldLooseBase(this, _isOpen)[_isOpen]) {\n      _classPrivateFieldLooseBase(this, _queued)[_queued].push({\n        action,\n        payload\n      });\n\n      return;\n    }\n\n    _classPrivateFieldLooseBase(this, _socket)[_socket].send(JSON.stringify({\n      action,\n      payload\n    }));\n  }\n\n  on(action, handler) {\n    _classPrivateFieldLooseBase(this, _emitter)[_emitter].on(action, handler);\n  }\n\n  emit(action, payload) {\n    _classPrivateFieldLooseBase(this, _emitter)[_emitter].emit(action, payload);\n  }\n\n  once(action, handler) {\n    _classPrivateFieldLooseBase(this, _emitter)[_emitter].once(action, handler);\n  }\n\n});", "'use strict';\n/**\n * Manages communications with Companion\n */\n\nconst RequestClient = require('./RequestClient');\n\nconst Provider = require('./Provider');\n\nconst SearchProvider = require('./SearchProvider');\n\nconst Socket = require('./Socket');\n\nmodule.exports = {\n  RequestClient,\n  Provider,\n  SearchProvider,\n  Socket\n};", "\"use strict\";\n\nconst throttle = require('lodash.throttle');\n\nfunction emitSocketProgress(uploader, progressData, file) {\n  const {\n    progress,\n    bytesUploaded,\n    bytesTotal\n  } = progressData;\n\n  if (progress) {\n    uploader.uppy.log(`Upload progress: ${progress}`);\n    uploader.uppy.emit('upload-progress', file, {\n      uploader,\n      bytesUploaded,\n      bytesTotal\n    });\n  }\n}\n\nmodule.exports = throttle(emitSocketProgress, 300, {\n  leading: true,\n  trailing: true\n});", "\"use strict\";\n\nmodule.exports = function getSocketHost(url) {\n  // get the host domain\n  const regex = /^(?:https?:\\/\\/|\\/\\/)?(?:[^@\\n]+@)?(?:www\\.)?([^\\n]+)/i;\n  const host = regex.exec(url)[1];\n  const socketProtocol = /^http:\\/\\//i.test(url) ? 'ws' : 'wss';\n  return `${socketProtocol}://${host}`;\n};", "\"use strict\";\n\nmodule.exports = function settle(promises) {\n  const resolutions = [];\n  const rejections = [];\n\n  function resolved(value) {\n    resolutions.push(value);\n  }\n\n  function rejected(error) {\n    rejections.push(error);\n  }\n\n  const wait = Promise.all(promises.map(promise => promise.then(resolved, rejected)));\n  return wait.then(() => {\n    return {\n      successful: resolutions,\n      failed: rejections\n    };\n  });\n};", "\"use strict\";\n\nvar _emitter, _events;\n\nfunction _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError(\"attempted to use private field on non-instance\"); } return receiver; }\n\nvar id = 0;\n\nfunction _classPrivateFieldLooseKey(name) { return \"__private_\" + id++ + \"_\" + name; }\n\n/**\n * Create a wrapper around an event emitter with a `remove` method to remove\n * all events that were added using the wrapped emitter.\n */\nmodule.exports = (_emitter = /*#__PURE__*/_classPrivateFieldLooseKey(\"emitter\"), _events = /*#__PURE__*/_classPrivateFieldLooseKey(\"events\"), class EventTracker {\n  constructor(emitter) {\n    Object.defineProperty(this, _emitter, {\n      writable: true,\n      value: void 0\n    });\n    Object.defineProperty(this, _events, {\n      writable: true,\n      value: []\n    });\n    _classPrivateFieldLooseBase(this, _emitter)[_emitter] = emitter;\n  }\n\n  on(event, fn) {\n    _classPrivateFieldLooseBase(this, _events)[_events].push([event, fn]);\n\n    return _classPrivateFieldLooseBase(this, _emitter)[_emitter].on(event, fn);\n  }\n\n  remove() {\n    for (const [event, fn] of _classPrivateFieldLooseBase(this, _events)[_events].splice(0)) {\n      _classPrivateFieldLooseBase(this, _emitter)[_emitter].off(event, fn);\n    }\n  }\n\n});", "\"use strict\";\n\nfunction isNetworkError(xhr) {\n  if (!xhr) {\n    return false;\n  }\n\n  return xhr.readyState !== 0 && xhr.readyState !== 4 || xhr.status === 0;\n}\n\nmodule.exports = isNetworkError;", "\"use strict\";\n\nfunction _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError(\"attempted to use private field on non-instance\"); } return receiver; }\n\nvar id = 0;\n\nfunction _classPrivateFieldLooseKey(name) { return \"__private_\" + id++ + \"_\" + name; }\n\nfunction createCancelError() {\n  return new Error('Cancelled');\n}\n\nvar _activeRequests = /*#__PURE__*/_classPrivateFieldLooseKey(\"activeRequests\");\n\nvar _queuedHandlers = /*#__PURE__*/_classPrivateFieldLooseKey(\"queuedHandlers\");\n\nvar _paused = /*#__PURE__*/_classPrivateFieldLooseKey(\"paused\");\n\nvar _pauseTimer = /*#__PURE__*/_classPrivateFieldLooseKey(\"pauseTimer\");\n\nvar _downLimit = /*#__PURE__*/_classPrivateFieldLooseKey(\"downLimit\");\n\nvar _upperLimit = /*#__PURE__*/_classPrivateFieldLooseKey(\"upperLimit\");\n\nvar _rateLimitingTimer = /*#__PURE__*/_classPrivateFieldLooseKey(\"rateLimitingTimer\");\n\nvar _call = /*#__PURE__*/_classPrivateFieldLooseKey(\"call\");\n\nvar _queueNext = /*#__PURE__*/_classPrivateFieldLooseKey(\"queueNext\");\n\nvar _next = /*#__PURE__*/_classPrivateFieldLooseKey(\"next\");\n\nvar _queue = /*#__PURE__*/_classPrivateFieldLooseKey(\"queue\");\n\nvar _dequeue = /*#__PURE__*/_classPrivateFieldLooseKey(\"dequeue\");\n\nvar _resume = /*#__PURE__*/_classPrivateFieldLooseKey(\"resume\");\n\nvar _increaseLimit = /*#__PURE__*/_classPrivateFieldLooseKey(\"increaseLimit\");\n\nclass RateLimitedQueue {\n  constructor(limit) {\n    Object.defineProperty(this, _dequeue, {\n      value: _dequeue2\n    });\n    Object.defineProperty(this, _queue, {\n      value: _queue2\n    });\n    Object.defineProperty(this, _next, {\n      value: _next2\n    });\n    Object.defineProperty(this, _queueNext, {\n      value: _queueNext2\n    });\n    Object.defineProperty(this, _call, {\n      value: _call2\n    });\n    Object.defineProperty(this, _activeRequests, {\n      writable: true,\n      value: 0\n    });\n    Object.defineProperty(this, _queuedHandlers, {\n      writable: true,\n      value: []\n    });\n    Object.defineProperty(this, _paused, {\n      writable: true,\n      value: false\n    });\n    Object.defineProperty(this, _pauseTimer, {\n      writable: true,\n      value: void 0\n    });\n    Object.defineProperty(this, _downLimit, {\n      writable: true,\n      value: 1\n    });\n    Object.defineProperty(this, _upperLimit, {\n      writable: true,\n      value: void 0\n    });\n    Object.defineProperty(this, _rateLimitingTimer, {\n      writable: true,\n      value: void 0\n    });\n    Object.defineProperty(this, _resume, {\n      writable: true,\n      value: () => this.resume()\n    });\n    Object.defineProperty(this, _increaseLimit, {\n      writable: true,\n      value: () => {\n        if (_classPrivateFieldLooseBase(this, _paused)[_paused]) {\n          _classPrivateFieldLooseBase(this, _rateLimitingTimer)[_rateLimitingTimer] = setTimeout(_classPrivateFieldLooseBase(this, _increaseLimit)[_increaseLimit], 0);\n          return;\n        }\n\n        _classPrivateFieldLooseBase(this, _downLimit)[_downLimit] = this.limit;\n        this.limit = Math.ceil((_classPrivateFieldLooseBase(this, _upperLimit)[_upperLimit] + _classPrivateFieldLooseBase(this, _downLimit)[_downLimit]) / 2);\n\n        for (let i = _classPrivateFieldLooseBase(this, _downLimit)[_downLimit]; i <= this.limit; i++) {\n          _classPrivateFieldLooseBase(this, _queueNext)[_queueNext]();\n        }\n\n        if (_classPrivateFieldLooseBase(this, _upperLimit)[_upperLimit] - _classPrivateFieldLooseBase(this, _downLimit)[_downLimit] > 3) {\n          _classPrivateFieldLooseBase(this, _rateLimitingTimer)[_rateLimitingTimer] = setTimeout(_classPrivateFieldLooseBase(this, _increaseLimit)[_increaseLimit], 2000);\n        } else {\n          _classPrivateFieldLooseBase(this, _downLimit)[_downLimit] = Math.floor(_classPrivateFieldLooseBase(this, _downLimit)[_downLimit] / 2);\n        }\n      }\n    });\n\n    if (typeof limit !== 'number' || limit === 0) {\n      this.limit = Infinity;\n    } else {\n      this.limit = limit;\n    }\n  }\n\n  run(fn, queueOptions) {\n    if (!_classPrivateFieldLooseBase(this, _paused)[_paused] && _classPrivateFieldLooseBase(this, _activeRequests)[_activeRequests] < this.limit) {\n      return _classPrivateFieldLooseBase(this, _call)[_call](fn);\n    }\n\n    return _classPrivateFieldLooseBase(this, _queue)[_queue](fn, queueOptions);\n  }\n\n  wrapPromiseFunction(fn, queueOptions) {\n    var _this = this;\n\n    return function () {\n      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n        args[_key] = arguments[_key];\n      }\n\n      let queuedRequest;\n      const outerPromise = new Promise((resolve, reject) => {\n        queuedRequest = _this.run(() => {\n          let cancelError;\n          let innerPromise;\n\n          try {\n            innerPromise = Promise.resolve(fn(...args));\n          } catch (err) {\n            innerPromise = Promise.reject(err);\n          }\n\n          innerPromise.then(result => {\n            if (cancelError) {\n              reject(cancelError);\n            } else {\n              queuedRequest.done();\n              resolve(result);\n            }\n          }, err => {\n            if (cancelError) {\n              reject(cancelError);\n            } else {\n              queuedRequest.done();\n              reject(err);\n            }\n          });\n          return () => {\n            cancelError = createCancelError();\n          };\n        }, queueOptions);\n      });\n\n      outerPromise.abort = () => {\n        queuedRequest.abort();\n      };\n\n      return outerPromise;\n    };\n  }\n\n  resume() {\n    _classPrivateFieldLooseBase(this, _paused)[_paused] = false;\n    clearTimeout(_classPrivateFieldLooseBase(this, _pauseTimer)[_pauseTimer]);\n\n    for (let i = 0; i < this.limit; i++) {\n      _classPrivateFieldLooseBase(this, _queueNext)[_queueNext]();\n    }\n  }\n\n  /**\n   * Freezes the queue for a while or indefinitely.\n   *\n   * @param {number | null } [duration] Duration for the pause to happen, in milliseconds.\n   *                                    If omitted, the queue won't resume automatically.\n   */\n  pause(duration) {\n    if (duration === void 0) {\n      duration = null;\n    }\n\n    _classPrivateFieldLooseBase(this, _paused)[_paused] = true;\n    clearTimeout(_classPrivateFieldLooseBase(this, _pauseTimer)[_pauseTimer]);\n\n    if (duration != null) {\n      _classPrivateFieldLooseBase(this, _pauseTimer)[_pauseTimer] = setTimeout(_classPrivateFieldLooseBase(this, _resume)[_resume], duration);\n    }\n  }\n  /**\n   * Pauses the queue for a duration, and lower the limit of concurrent requests\n   * when the queue resumes. When the queue resumes, it tries to progressively\n   * increase the limit in `this.#increaseLimit` until another call is made to\n   * `this.rateLimit`.\n   * Call this function when using the RateLimitedQueue for network requests and\n   * the remote server responds with 429 HTTP code.\n   *\n   * @param {number} duration in milliseconds.\n   */\n\n\n  rateLimit(duration) {\n    clearTimeout(_classPrivateFieldLooseBase(this, _rateLimitingTimer)[_rateLimitingTimer]);\n    this.pause(duration);\n\n    if (this.limit > 1 && Number.isFinite(this.limit)) {\n      _classPrivateFieldLooseBase(this, _upperLimit)[_upperLimit] = this.limit - 1;\n      this.limit = _classPrivateFieldLooseBase(this, _downLimit)[_downLimit];\n      _classPrivateFieldLooseBase(this, _rateLimitingTimer)[_rateLimitingTimer] = setTimeout(_classPrivateFieldLooseBase(this, _increaseLimit)[_increaseLimit], duration);\n    }\n  }\n\n  get isPaused() {\n    return _classPrivateFieldLooseBase(this, _paused)[_paused];\n  }\n\n}\n\nfunction _call2(fn) {\n  _classPrivateFieldLooseBase(this, _activeRequests)[_activeRequests] += 1;\n  let done = false;\n  let cancelActive;\n\n  try {\n    cancelActive = fn();\n  } catch (err) {\n    _classPrivateFieldLooseBase(this, _activeRequests)[_activeRequests] -= 1;\n    throw err;\n  }\n\n  return {\n    abort: () => {\n      if (done) return;\n      done = true;\n      _classPrivateFieldLooseBase(this, _activeRequests)[_activeRequests] -= 1;\n      cancelActive();\n\n      _classPrivateFieldLooseBase(this, _queueNext)[_queueNext]();\n    },\n    done: () => {\n      if (done) return;\n      done = true;\n      _classPrivateFieldLooseBase(this, _activeRequests)[_activeRequests] -= 1;\n\n      _classPrivateFieldLooseBase(this, _queueNext)[_queueNext]();\n    }\n  };\n}\n\nfunction _queueNext2() {\n  // Do it soon but not immediately, this allows clearing out the entire queue synchronously\n  // one by one without continuously _advancing_ it (and starting new tasks before immediately\n  // aborting them)\n  queueMicrotask(() => _classPrivateFieldLooseBase(this, _next)[_next]());\n}\n\nfunction _next2() {\n  if (_classPrivateFieldLooseBase(this, _paused)[_paused] || _classPrivateFieldLooseBase(this, _activeRequests)[_activeRequests] >= this.limit) {\n    return;\n  }\n\n  if (_classPrivateFieldLooseBase(this, _queuedHandlers)[_queuedHandlers].length === 0) {\n    return;\n  } // Dispatch the next request, and update the abort/done handlers\n  // so that cancelling it does the Right Thing (and doesn't just try\n  // to dequeue an already-running request).\n\n\n  const next = _classPrivateFieldLooseBase(this, _queuedHandlers)[_queuedHandlers].shift();\n\n  const handler = _classPrivateFieldLooseBase(this, _call)[_call](next.fn);\n\n  next.abort = handler.abort;\n  next.done = handler.done;\n}\n\nfunction _queue2(fn, options) {\n  if (options === void 0) {\n    options = {};\n  }\n\n  const handler = {\n    fn,\n    priority: options.priority || 0,\n    abort: () => {\n      _classPrivateFieldLooseBase(this, _dequeue)[_dequeue](handler);\n    },\n    done: () => {\n      throw new Error('Cannot mark a queued request as done: this indicates a bug');\n    }\n  };\n\n  const index = _classPrivateFieldLooseBase(this, _queuedHandlers)[_queuedHandlers].findIndex(other => {\n    return handler.priority > other.priority;\n  });\n\n  if (index === -1) {\n    _classPrivateFieldLooseBase(this, _queuedHandlers)[_queuedHandlers].push(handler);\n  } else {\n    _classPrivateFieldLooseBase(this, _queuedHandlers)[_queuedHandlers].splice(index, 0, handler);\n  }\n\n  return handler;\n}\n\nfunction _dequeue2(handler) {\n  const index = _classPrivateFieldLooseBase(this, _queuedHandlers)[_queuedHandlers].indexOf(handler);\n\n  if (index !== -1) {\n    _classPrivateFieldLooseBase(this, _queuedHandlers)[_queuedHandlers].splice(index, 1);\n  }\n}\n\nmodule.exports = {\n  RateLimitedQueue,\n  internalRateLimitedQueue: Symbol('__queue')\n};", "\"use strict\";\n\nconst tus = require('tus-js-client');\n\nfunction isCordova() {\n  return typeof window !== 'undefined' && (typeof window.PhoneGap !== 'undefined' || typeof window.Cordova !== 'undefined' || typeof window.cordova !== 'undefined');\n}\n\nfunction isReactNative() {\n  return typeof navigator !== 'undefined' && typeof navigator.product === 'string' && navigator.product.toLowerCase() === 'reactnative';\n} // We override tus fingerprint to uppy\u2019s `file.id`, since the `file.id`\n// now also includes `relativePath` for files added from folders.\n// This means you can add 2 identical files, if one is in folder a,\n// the other in folder b \u2014 `a/file.jpg` and `b/file.jpg`, when added\n// together with a folder, will be treated as 2 separate files.\n//\n// For React Native and Cordova, we let tus-js-client\u2019s default\n// fingerprint handling take charge.\n\n\nmodule.exports = function getFingerprint(uppyFileObj) {\n  return (file, options) => {\n    if (isCordova() || isReactNative()) {\n      return tus.defaultOptions.fingerprint(file, options);\n    }\n\n    const uppyFingerprint = ['tus', uppyFileObj.id, options.endpoint].join('-');\n    return Promise.resolve(uppyFingerprint);\n  };\n};", "\"use strict\";\n\nvar _class, _retryDelayIterator, _temp;\n\nfunction _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError(\"attempted to use private field on non-instance\"); } return receiver; }\n\nvar id = 0;\n\nfunction _classPrivateFieldLooseKey(name) { return \"__private_\" + id++ + \"_\" + name; }\n\nconst BasePlugin = require('@uppy/core/lib/BasePlugin');\n\nconst tus = require('tus-js-client');\n\nconst {\n  Provider,\n  RequestClient,\n  Socket\n} = require('@uppy/companion-client');\n\nconst emitSocketProgress = require('@uppy/utils/lib/emitSocketProgress');\n\nconst getSocketHost = require('@uppy/utils/lib/getSocketHost');\n\nconst settle = require('@uppy/utils/lib/settle');\n\nconst EventTracker = require('@uppy/utils/lib/EventTracker');\n\nconst NetworkError = require('@uppy/utils/lib/NetworkError');\n\nconst isNetworkError = require('@uppy/utils/lib/isNetworkError');\n\nconst {\n  RateLimitedQueue\n} = require('@uppy/utils/lib/RateLimitedQueue');\n\nconst hasProperty = require('@uppy/utils/lib/hasProperty');\n\nconst getFingerprint = require('./getFingerprint');\n/** @typedef {import('..').TusOptions} TusOptions */\n\n/** @typedef {import('tus-js-client').UploadOptions} RawTusOptions */\n\n/** @typedef {import('@uppy/core').Uppy} Uppy */\n\n/** @typedef {import('@uppy/core').UppyFile} UppyFile */\n\n/** @typedef {import('@uppy/core').FailedUppyFile<{}>} FailedUppyFile */\n\n/**\n * Extracted from https://github.com/tus/tus-js-client/blob/master/lib/upload.js#L13\n * excepted we removed 'fingerprint' key to avoid adding more dependencies\n *\n * @type {RawTusOptions}\n */\n\n\nconst tusDefaultOptions = {\n  endpoint: '',\n  uploadUrl: null,\n  metadata: {},\n  uploadSize: null,\n  onProgress: null,\n  onChunkComplete: null,\n  onSuccess: null,\n  onError: null,\n  overridePatchMethod: false,\n  headers: {},\n  addRequestId: false,\n  chunkSize: Infinity,\n  retryDelays: [100, 1000, 3000, 5000],\n  parallelUploads: 1,\n  removeFingerprintOnSuccess: false,\n  uploadLengthDeferred: false,\n  uploadDataDuringCreation: false\n};\n/**\n * Tus resumable file uploader\n */\n\nmodule.exports = (_temp = (_retryDelayIterator = /*#__PURE__*/_classPrivateFieldLooseKey(\"retryDelayIterator\"), _class = class Tus extends BasePlugin {\n  // eslint-disable-next-line global-require\n\n  /**\n   * @param {Uppy} uppy\n   * @param {TusOptions} opts\n   */\n  constructor(uppy, opts) {\n    var _this$opts$retryDelay;\n\n    super(uppy, opts);\n    Object.defineProperty(this, _retryDelayIterator, {\n      writable: true,\n      value: void 0\n    });\n    this.type = 'uploader';\n    this.id = this.opts.id || 'Tus';\n    this.title = 'Tus'; // set default options\n\n    const defaultOptions = {\n      useFastRemoteRetry: true,\n      limit: 20,\n      retryDelays: tusDefaultOptions.retryDelays,\n      withCredentials: false\n    }; // merge default options with the ones set by user\n\n    /** @type {import(\"..\").TusOptions} */\n\n    this.opts = { ...defaultOptions,\n      ...opts\n    };\n\n    if ('autoRetry' in opts) {\n      throw new Error('The `autoRetry` option was deprecated and has been removed.');\n    }\n    /**\n     * Simultaneous upload limiting is shared across all uploads with this plugin.\n     *\n     * @type {RateLimitedQueue}\n     */\n\n\n    this.requests = new RateLimitedQueue(this.opts.limit);\n    _classPrivateFieldLooseBase(this, _retryDelayIterator)[_retryDelayIterator] = (_this$opts$retryDelay = this.opts.retryDelays) == null ? void 0 : _this$opts$retryDelay.values();\n    this.uploaders = Object.create(null);\n    this.uploaderEvents = Object.create(null);\n    this.uploaderSockets = Object.create(null);\n    this.handleResetProgress = this.handleResetProgress.bind(this);\n    this.handleUpload = this.handleUpload.bind(this);\n  }\n\n  handleResetProgress() {\n    const files = { ...this.uppy.getState().files\n    };\n    Object.keys(files).forEach(fileID => {\n      // Only clone the file object if it has a Tus `uploadUrl` attached.\n      if (files[fileID].tus && files[fileID].tus.uploadUrl) {\n        const tusState = { ...files[fileID].tus\n        };\n        delete tusState.uploadUrl;\n        files[fileID] = { ...files[fileID],\n          tus: tusState\n        };\n      }\n    });\n    this.uppy.setState({\n      files\n    });\n  }\n  /**\n   * Clean up all references for a file's upload: the tus.Upload instance,\n   * any events related to the file, and the Companion WebSocket connection.\n   *\n   * @param {string} fileID\n   */\n\n\n  resetUploaderReferences(fileID, opts) {\n    if (opts === void 0) {\n      opts = {};\n    }\n\n    if (this.uploaders[fileID]) {\n      const uploader = this.uploaders[fileID];\n      uploader.abort();\n\n      if (opts.abort) {\n        uploader.abort(true);\n      }\n\n      this.uploaders[fileID] = null;\n    }\n\n    if (this.uploaderEvents[fileID]) {\n      this.uploaderEvents[fileID].remove();\n      this.uploaderEvents[fileID] = null;\n    }\n\n    if (this.uploaderSockets[fileID]) {\n      this.uploaderSockets[fileID].close();\n      this.uploaderSockets[fileID] = null;\n    }\n  }\n  /**\n   * Create a new Tus upload.\n   *\n   * A lot can happen during an upload, so this is quite hard to follow!\n   * - First, the upload is started. If the file was already paused by the time the upload starts, nothing should happen.\n   *   If the `limit` option is used, the upload must be queued onto the `this.requests` queue.\n   *   When an upload starts, we store the tus.Upload instance, and an EventTracker instance that manages the event listeners\n   *   for pausing, cancellation, removal, etc.\n   * - While the upload is in progress, it may be paused or cancelled.\n   *   Pausing aborts the underlying tus.Upload, and removes the upload from the `this.requests` queue. All other state is\n   *   maintained.\n   *   Cancelling removes the upload from the `this.requests` queue, and completely aborts the upload-- the `tus.Upload`\n   *   instance is aborted and discarded, the EventTracker instance is destroyed (removing all listeners).\n   *   Resuming the upload uses the `this.requests` queue as well, to prevent selectively pausing and resuming uploads from\n   *   bypassing the limit.\n   * - After completing an upload, the tus.Upload and EventTracker instances are cleaned up, and the upload is marked as done\n   *   in the `this.requests` queue.\n   * - When an upload completed with an error, the same happens as on successful completion, but the `upload()` promise is\n   *   rejected.\n   *\n   * When working on this function, keep in mind:\n   *  - When an upload is completed or cancelled for any reason, the tus.Upload and EventTracker instances need to be cleaned\n   *    up using this.resetUploaderReferences().\n   *  - When an upload is cancelled or paused, for any reason, it needs to be removed from the `this.requests` queue using\n   *    `queuedRequest.abort()`.\n   *  - When an upload is completed for any reason, including errors, it needs to be marked as such using\n   *    `queuedRequest.done()`.\n   *  - When an upload is started or resumed, it needs to go through the `this.requests` queue. The `queuedRequest` variable\n   *    must be updated so the other uses of it are valid.\n   *  - Before replacing the `queuedRequest` variable, the previous `queuedRequest` must be aborted, else it will keep taking\n   *    up a spot in the queue.\n   *\n   * @param {UppyFile} file for use with upload\n   * @param {number} current file in a queue\n   * @param {number} total number of files in a queue\n   * @returns {Promise<void>}\n   */\n\n\n  upload(file) {\n    this.resetUploaderReferences(file.id); // Create a new tus upload\n\n    return new Promise((resolve, reject) => {\n      let queuedRequest;\n      let qRequest;\n      this.uppy.emit('upload-started', file);\n      const opts = { ...this.opts,\n        ...(file.tus || {})\n      };\n\n      if (typeof opts.headers === 'function') {\n        opts.headers = opts.headers(file);\n      }\n      /** @type {RawTusOptions} */\n\n\n      const uploadOptions = { ...tusDefaultOptions,\n        ...opts\n      }; // We override tus fingerprint to uppy\u2019s `file.id`, since the `file.id`\n      // now also includes `relativePath` for files added from folders.\n      // This means you can add 2 identical files, if one is in folder a,\n      // the other in folder b.\n\n      uploadOptions.fingerprint = getFingerprint(file);\n\n      uploadOptions.onBeforeRequest = req => {\n        const xhr = req.getUnderlyingObject();\n        xhr.withCredentials = !!opts.withCredentials;\n\n        if (typeof opts.onBeforeRequest === 'function') {\n          opts.onBeforeRequest(req);\n        }\n      };\n\n      uploadOptions.onError = err => {\n        this.uppy.log(err);\n        const xhr = err.originalRequest ? err.originalRequest.getUnderlyingObject() : null;\n\n        if (isNetworkError(xhr)) {\n          err = new NetworkError(err, xhr);\n        }\n\n        this.resetUploaderReferences(file.id);\n        queuedRequest.abort();\n        this.uppy.emit('upload-error', file, err);\n        reject(err);\n      };\n\n      uploadOptions.onProgress = (bytesUploaded, bytesTotal) => {\n        this.onReceiveUploadUrl(file, upload.url);\n        this.uppy.emit('upload-progress', file, {\n          uploader: this,\n          bytesUploaded,\n          bytesTotal\n        });\n      };\n\n      uploadOptions.onSuccess = () => {\n        const uploadResp = {\n          uploadURL: upload.url\n        };\n        this.resetUploaderReferences(file.id);\n        queuedRequest.done();\n        this.uppy.emit('upload-success', file, uploadResp);\n\n        if (upload.url) {\n          this.uppy.log(`Download ${upload.file.name} from ${upload.url}`);\n        }\n\n        resolve(upload);\n      };\n\n      uploadOptions.onShouldRetry = (err, retryAttempt, options) => {\n        var _err$originalResponse;\n\n        const status = err == null ? void 0 : (_err$originalResponse = err.originalResponse) == null ? void 0 : _err$originalResponse.getStatus();\n\n        if (status === 429) {\n          // HTTP 429 Too Many Requests => to avoid the whole download to fail, pause all requests.\n          if (!this.requests.isPaused) {\n            var _classPrivateFieldLoo;\n\n            const next = (_classPrivateFieldLoo = _classPrivateFieldLooseBase(this, _retryDelayIterator)[_retryDelayIterator]) == null ? void 0 : _classPrivateFieldLoo.next();\n\n            if (next == null || next.done) {\n              return false;\n            }\n\n            this.requests.rateLimit(next.value);\n          }\n\n          queuedRequest.abort();\n          queuedRequest = this.requests.run(qRequest);\n        } else if (status > 400 && status < 500 && status !== 409) {\n          // HTTP 4xx, the server won't send anything, it's doesn't make sense to retry\n          return false;\n        } else if (typeof navigator !== 'undefined' && navigator.onLine === false) {\n          // The navigator is offline, let's wait for it to come back online.\n          if (!this.requests.isPaused) {\n            this.requests.pause();\n            window.addEventListener('online', () => {\n              this.requests.resume();\n            }, {\n              once: true\n            });\n          }\n\n          queuedRequest.abort();\n          queuedRequest = this.requests.run(qRequest);\n        } else {\n          // For a non-4xx error, we can re-queue the request.\n          setTimeout(() => {\n            queuedRequest.abort();\n            queuedRequest = this.requests.run(qRequest);\n          }, options.retryDelays[retryAttempt]);\n        } // Aborting the timeout set by tus-js-client to not short-circuit the rate limiting.\n        // eslint-disable-next-line no-underscore-dangle\n\n\n        queueMicrotask(() => clearTimeout(queuedRequest._retryTimeout)); // We need to return true here so tus-js-client increments the retryAttempt and do not emit an error event.\n\n        return true;\n      };\n\n      const copyProp = (obj, srcProp, destProp) => {\n        if (hasProperty(obj, srcProp) && !hasProperty(obj, destProp)) {\n          obj[destProp] = obj[srcProp];\n        }\n      };\n      /** @type {Record<string, string>} */\n\n\n      const meta = {};\n      const metaFields = Array.isArray(opts.metaFields) ? opts.metaFields // Send along all fields by default.\n      : Object.keys(file.meta);\n      metaFields.forEach(item => {\n        meta[item] = file.meta[item];\n      }); // tusd uses metadata fields 'filetype' and 'filename'\n\n      copyProp(meta, 'type', 'filetype');\n      copyProp(meta, 'name', 'filename');\n      uploadOptions.metadata = meta;\n      const upload = new tus.Upload(file.data, uploadOptions);\n      this.uploaders[file.id] = upload;\n      this.uploaderEvents[file.id] = new EventTracker(this.uppy);\n\n      qRequest = () => {\n        if (!file.isPaused) {\n          upload.start();\n        } // Don't do anything here, the caller will take care of cancelling the upload itself\n        // using resetUploaderReferences(). This is because resetUploaderReferences() has to be\n        // called when this request is still in the queue, and has not been started yet, too. At\n        // that point this cancellation function is not going to be called.\n        // Also, we need to remove the request from the queue _without_ destroying everything\n        // related to this upload to handle pauses.\n\n\n        return () => {};\n      };\n\n      upload.findPreviousUploads().then(previousUploads => {\n        const previousUpload = previousUploads[0];\n\n        if (previousUpload) {\n          this.uppy.log(`[Tus] Resuming upload of ${file.id} started at ${previousUpload.creationTime}`);\n          upload.resumeFromPreviousUpload(previousUpload);\n        }\n      });\n      queuedRequest = this.requests.run(qRequest);\n      this.onFileRemove(file.id, targetFileID => {\n        queuedRequest.abort();\n        this.resetUploaderReferences(file.id, {\n          abort: !!upload.url\n        });\n        resolve(`upload ${targetFileID} was removed`);\n      });\n      this.onPause(file.id, isPaused => {\n        if (isPaused) {\n          // Remove this file from the queue so another file can start in its place.\n          queuedRequest.abort();\n          upload.abort();\n        } else {\n          // Resuming an upload should be queued, else you could pause and then\n          // resume a queued upload to make it skip the queue.\n          queuedRequest.abort();\n          queuedRequest = this.requests.run(qRequest);\n        }\n      });\n      this.onPauseAll(file.id, () => {\n        queuedRequest.abort();\n        upload.abort();\n      });\n      this.onCancelAll(file.id, () => {\n        queuedRequest.abort();\n        this.resetUploaderReferences(file.id, {\n          abort: !!upload.url\n        });\n        resolve(`upload ${file.id} was canceled`);\n      });\n      this.onResumeAll(file.id, () => {\n        queuedRequest.abort();\n\n        if (file.error) {\n          upload.abort();\n        }\n\n        queuedRequest = this.requests.run(qRequest);\n      });\n    }).catch(err => {\n      this.uppy.emit('upload-error', file, err);\n      throw err;\n    });\n  }\n  /**\n   * @param {UppyFile} file for use with upload\n   * @param {number} current file in a queue\n   * @param {number} total number of files in a queue\n   * @returns {Promise<void>}\n   */\n\n\n  uploadRemote(file) {\n    this.resetUploaderReferences(file.id);\n    const opts = { ...this.opts\n    };\n\n    if (file.tus) {\n      // Install file-specific upload overrides.\n      Object.assign(opts, file.tus);\n    }\n\n    this.uppy.emit('upload-started', file);\n    this.uppy.log(file.remote.url);\n\n    if (file.serverToken) {\n      return this.connectToServerSocket(file);\n    }\n\n    return new Promise((resolve, reject) => {\n      const Client = file.remote.providerOptions.provider ? Provider : RequestClient;\n      const client = new Client(this.uppy, file.remote.providerOptions); // !! cancellation is NOT supported at this stage yet\n\n      client.post(file.remote.url, { ...file.remote.body,\n        endpoint: opts.endpoint,\n        uploadUrl: opts.uploadUrl,\n        protocol: 'tus',\n        size: file.data.size,\n        headers: opts.headers,\n        metadata: file.meta\n      }).then(res => {\n        this.uppy.setFileState(file.id, {\n          serverToken: res.token\n        });\n        file = this.uppy.getFile(file.id);\n        return this.connectToServerSocket(file);\n      }).then(() => {\n        resolve();\n      }).catch(err => {\n        this.uppy.emit('upload-error', file, err);\n        reject(err);\n      });\n    });\n  }\n  /**\n   * See the comment on the upload() method.\n   *\n   * Additionally, when an upload is removed, completed, or cancelled, we need to close the WebSocket connection. This is\n   * handled by the resetUploaderReferences() function, so the same guidelines apply as in upload().\n   *\n   * @param {UppyFile} file\n   */\n\n\n  connectToServerSocket(file) {\n    return new Promise((resolve, reject) => {\n      const token = file.serverToken;\n      const host = getSocketHost(file.remote.companionUrl);\n      const socket = new Socket({\n        target: `${host}/api/${token}`,\n        autoOpen: false\n      });\n      this.uploaderSockets[file.id] = socket;\n      this.uploaderEvents[file.id] = new EventTracker(this.uppy);\n      let queuedRequest;\n      this.onFileRemove(file.id, () => {\n        queuedRequest.abort();\n        socket.send('cancel', {});\n        this.resetUploaderReferences(file.id);\n        resolve(`upload ${file.id} was removed`);\n      });\n      this.onPause(file.id, isPaused => {\n        if (isPaused) {\n          // Remove this file from the queue so another file can start in its place.\n          queuedRequest.abort();\n          socket.send('pause', {});\n        } else {\n          // Resuming an upload should be queued, else you could pause and then\n          // resume a queued upload to make it skip the queue.\n          queuedRequest.abort();\n          queuedRequest = this.requests.run(() => {\n            socket.send('resume', {});\n            return () => {};\n          });\n        }\n      });\n      this.onPauseAll(file.id, () => {\n        queuedRequest.abort();\n        socket.send('pause', {});\n      });\n      this.onCancelAll(file.id, () => {\n        queuedRequest.abort();\n        socket.send('cancel', {});\n        this.resetUploaderReferences(file.id);\n        resolve(`upload ${file.id} was canceled`);\n      });\n      this.onResumeAll(file.id, () => {\n        queuedRequest.abort();\n\n        if (file.error) {\n          socket.send('pause', {});\n        }\n\n        queuedRequest = this.requests.run(() => {\n          socket.send('resume', {});\n          return () => {};\n        });\n      });\n      this.onRetry(file.id, () => {\n        // Only do the retry if the upload is actually in progress;\n        // else we could try to send these messages when the upload is still queued.\n        // We may need a better check for this since the socket may also be closed\n        // for other reasons, like network failures.\n        if (socket.isOpen) {\n          socket.send('pause', {});\n          socket.send('resume', {});\n        }\n      });\n      this.onRetryAll(file.id, () => {\n        // See the comment in the onRetry() call\n        if (socket.isOpen) {\n          socket.send('pause', {});\n          socket.send('resume', {});\n        }\n      });\n      socket.on('progress', progressData => emitSocketProgress(this, progressData, file));\n      socket.on('error', errData => {\n        const {\n          message\n        } = errData.error;\n        const error = Object.assign(new Error(message), {\n          cause: errData.error\n        }); // If the remote retry optimisation should not be used,\n        // close the socket\u2014this will tell companion to clear state and delete the file.\n\n        if (!this.opts.useFastRemoteRetry) {\n          this.resetUploaderReferences(file.id); // Remove the serverToken so that a new one will be created for the retry.\n\n          this.uppy.setFileState(file.id, {\n            serverToken: null\n          });\n        } else {\n          socket.close();\n        }\n\n        this.uppy.emit('upload-error', file, error);\n        queuedRequest.done();\n        reject(error);\n      });\n      socket.on('success', data => {\n        const uploadResp = {\n          uploadURL: data.url\n        };\n        this.uppy.emit('upload-success', file, uploadResp);\n        this.resetUploaderReferences(file.id);\n        queuedRequest.done();\n        resolve();\n      });\n      queuedRequest = this.requests.run(() => {\n        socket.open();\n\n        if (file.isPaused) {\n          socket.send('pause', {});\n        } // Don't do anything here, the caller will take care of cancelling the upload itself\n        // using resetUploaderReferences(). This is because resetUploaderReferences() has to be\n        // called when this request is still in the queue, and has not been started yet, too. At\n        // that point this cancellation function is not going to be called.\n        // Also, we need to remove the request from the queue _without_ destroying everything\n        // related to this upload to handle pauses.\n\n\n        return () => {};\n      });\n    });\n  }\n  /**\n   * Store the uploadUrl on the file options, so that when Golden Retriever\n   * restores state, we will continue uploading to the correct URL.\n   *\n   * @param {UppyFile} file\n   * @param {string} uploadURL\n   */\n\n\n  onReceiveUploadUrl(file, uploadURL) {\n    const currentFile = this.uppy.getFile(file.id);\n    if (!currentFile) return; // Only do the update if we didn't have an upload URL yet.\n\n    if (!currentFile.tus || currentFile.tus.uploadUrl !== uploadURL) {\n      this.uppy.log('[Tus] Storing upload url');\n      this.uppy.setFileState(currentFile.id, {\n        tus: { ...currentFile.tus,\n          uploadUrl: uploadURL\n        }\n      });\n    }\n  }\n  /**\n   * @param {string} fileID\n   * @param {function(string): void} cb\n   */\n\n\n  onFileRemove(fileID, cb) {\n    this.uploaderEvents[fileID].on('file-removed', file => {\n      if (fileID === file.id) cb(file.id);\n    });\n  }\n  /**\n   * @param {string} fileID\n   * @param {function(boolean): void} cb\n   */\n\n\n  onPause(fileID, cb) {\n    this.uploaderEvents[fileID].on('upload-pause', (targetFileID, isPaused) => {\n      if (fileID === targetFileID) {\n        // const isPaused = this.uppy.pauseResume(fileID)\n        cb(isPaused);\n      }\n    });\n  }\n  /**\n   * @param {string} fileID\n   * @param {function(): void} cb\n   */\n\n\n  onRetry(fileID, cb) {\n    this.uploaderEvents[fileID].on('upload-retry', targetFileID => {\n      if (fileID === targetFileID) {\n        cb();\n      }\n    });\n  }\n  /**\n   * @param {string} fileID\n   * @param {function(): void} cb\n   */\n\n\n  onRetryAll(fileID, cb) {\n    this.uploaderEvents[fileID].on('retry-all', () => {\n      if (!this.uppy.getFile(fileID)) return;\n      cb();\n    });\n  }\n  /**\n   * @param {string} fileID\n   * @param {function(): void} cb\n   */\n\n\n  onPauseAll(fileID, cb) {\n    this.uploaderEvents[fileID].on('pause-all', () => {\n      if (!this.uppy.getFile(fileID)) return;\n      cb();\n    });\n  }\n  /**\n   * @param {string} fileID\n   * @param {function(): void} cb\n   */\n\n\n  onCancelAll(fileID, cb) {\n    this.uploaderEvents[fileID].on('cancel-all', () => {\n      if (!this.uppy.getFile(fileID)) return;\n      cb();\n    });\n  }\n  /**\n   * @param {string} fileID\n   * @param {function(): void} cb\n   */\n\n\n  onResumeAll(fileID, cb) {\n    this.uploaderEvents[fileID].on('resume-all', () => {\n      if (!this.uppy.getFile(fileID)) return;\n      cb();\n    });\n  }\n  /**\n   * @param {(UppyFile | FailedUppyFile)[]} files\n   */\n\n\n  uploadFiles(files) {\n    const promises = files.map((file, i) => {\n      const current = i + 1;\n      const total = files.length;\n\n      if ('error' in file && file.error) {\n        return Promise.reject(new Error(file.error));\n      }\n\n      if (file.isRemote) {\n        // We emit upload-started here, so that it's also emitted for files\n        // that have to wait due to the `limit` option.\n        // Don't double-emit upload-started for Golden Retriever-restored files that were already started\n        if (!file.progress.uploadStarted || !file.isRestored) {\n          this.uppy.emit('upload-started', file);\n        }\n\n        return this.uploadRemote(file, current, total);\n      } // Don't double-emit upload-started for Golden Retriever-restored files that were already started\n\n\n      if (!file.progress.uploadStarted || !file.isRestored) {\n        this.uppy.emit('upload-started', file);\n      }\n\n      return this.upload(file, current, total);\n    });\n    return settle(promises);\n  }\n  /**\n   * @param {string[]} fileIDs\n   */\n\n\n  handleUpload(fileIDs) {\n    if (fileIDs.length === 0) {\n      this.uppy.log('[Tus] No files to upload');\n      return Promise.resolve();\n    }\n\n    if (this.opts.limit === 0) {\n      this.uppy.log('[Tus] When uploading multiple files at once, consider setting the `limit` option (to `10` for example), to limit the number of concurrent uploads, which helps prevent memory and network issues: https://uppy.io/docs/tus/#limit-0', 'warning');\n    }\n\n    this.uppy.log('[Tus] Uploading...');\n    const filesToUpload = fileIDs.map(fileID => this.uppy.getFile(fileID));\n    return this.uploadFiles(filesToUpload).then(() => null);\n  }\n\n  install() {\n    this.uppy.setState({\n      capabilities: { ...this.uppy.getState().capabilities,\n        resumableUploads: true\n      }\n    });\n    this.uppy.addUploader(this.handleUpload);\n    this.uppy.on('reset-progress', this.handleResetProgress);\n  }\n\n  uninstall() {\n    this.uppy.setState({\n      capabilities: { ...this.uppy.getState().capabilities,\n        resumableUploads: false\n      }\n    });\n    this.uppy.removeUploader(this.handleUpload);\n  }\n\n}), _class.VERSION = \"2.2.0\", _temp);", "\"use strict\";\n\n/*eslint-disable */\nconst isSupported = typeof navigator !== 'undefined' && 'serviceWorker' in navigator;\n\nfunction waitForServiceWorker() {\n  return new Promise((resolve, reject) => {\n    if (!isSupported) {\n      reject(new Error('Unsupported'));\n    } else if (navigator.serviceWorker.controller) {\n      // A serviceWorker is already registered and active.\n      resolve();\n    } else {\n      navigator.serviceWorker.addEventListener('controllerchange', () => {\n        resolve();\n      });\n    }\n  });\n}\n\nclass ServiceWorkerStore {\n  constructor(opts) {\n    this.ready = waitForServiceWorker();\n    this.name = opts.storeName;\n  }\n\n  list() {\n    const defer = {};\n    const promise = new Promise((resolve, reject) => {\n      defer.resolve = resolve;\n      defer.reject = reject;\n    });\n    console.log('Loading stored blobs from Service Worker');\n\n    const onMessage = event => {\n      if (event.data.store !== this.name) {\n        return;\n      }\n\n      switch (event.data.type) {\n        case 'uppy/ALL_FILES':\n          defer.resolve(event.data.files);\n          navigator.serviceWorker.removeEventListener('message', onMessage);\n          break;\n\n        default:\n          defer.reject();\n      }\n    };\n\n    this.ready.then(() => {\n      navigator.serviceWorker.addEventListener('message', onMessage);\n      navigator.serviceWorker.controller.postMessage({\n        type: 'uppy/GET_FILES',\n        store: this.name\n      });\n    });\n    return promise;\n  }\n\n  put(file) {\n    return this.ready.then(() => {\n      navigator.serviceWorker.controller.postMessage({\n        type: 'uppy/ADD_FILE',\n        store: this.name,\n        file: file\n      });\n    });\n  }\n\n  delete(fileID) {\n    return this.ready.then(() => {\n      navigator.serviceWorker.controller.postMessage({\n        type: 'uppy/REMOVE_FILE',\n        store: this.name,\n        fileID: fileID\n      });\n    });\n  }\n\n}\n\nServiceWorkerStore.isSupported = isSupported;\nmodule.exports = ServiceWorkerStore;", "\"use strict\";\n\nconst indexedDB = typeof window !== 'undefined' && (window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB || window.OIndexedDB || window.msIndexedDB);\nconst isSupported = !!indexedDB;\nconst DB_NAME = 'uppy-blobs';\nconst STORE_NAME = 'files'; // maybe have a thumbnail store in the future\n\nconst DEFAULT_EXPIRY = 24 * 60 * 60 * 1000; // 24 hours\n\nconst DB_VERSION = 3; // Set default `expires` dates on existing stored blobs.\n\nfunction migrateExpiration(store) {\n  const request = store.openCursor();\n\n  request.onsuccess = event => {\n    const cursor = event.target.result;\n\n    if (!cursor) {\n      return;\n    }\n\n    const entry = cursor.value;\n    entry.expires = Date.now() + DEFAULT_EXPIRY;\n    cursor.update(entry);\n  };\n}\n\nfunction connect(dbName) {\n  const request = indexedDB.open(dbName, DB_VERSION);\n  return new Promise((resolve, reject) => {\n    request.onupgradeneeded = event => {\n      const db = event.target.result;\n      const {\n        transaction\n      } = event.currentTarget;\n\n      if (event.oldVersion < 2) {\n        // Added in v2: DB structure changed to a single shared object store\n        const store = db.createObjectStore(STORE_NAME, {\n          keyPath: 'id'\n        });\n        store.createIndex('store', 'store', {\n          unique: false\n        });\n      }\n\n      if (event.oldVersion < 3) {\n        // Added in v3\n        const store = transaction.objectStore(STORE_NAME);\n        store.createIndex('expires', 'expires', {\n          unique: false\n        });\n        migrateExpiration(store);\n      }\n\n      transaction.oncomplete = () => {\n        resolve(db);\n      };\n    };\n\n    request.onsuccess = event => {\n      resolve(event.target.result);\n    };\n\n    request.onerror = reject;\n  });\n}\n\nfunction waitForRequest(request) {\n  return new Promise((resolve, reject) => {\n    request.onsuccess = event => {\n      resolve(event.target.result);\n    };\n\n    request.onerror = reject;\n  });\n}\n\nlet cleanedUp = false;\n\nclass IndexedDBStore {\n  constructor(opts) {\n    this.opts = {\n      dbName: DB_NAME,\n      storeName: 'default',\n      expires: DEFAULT_EXPIRY,\n      // 24 hours\n      maxFileSize: 10 * 1024 * 1024,\n      // 10 MB\n      maxTotalSize: 300 * 1024 * 1024,\n      // 300 MB\n      ...opts\n    };\n    this.name = this.opts.storeName;\n\n    const createConnection = () => {\n      return connect(this.opts.dbName);\n    };\n\n    if (!cleanedUp) {\n      cleanedUp = true;\n      this.ready = IndexedDBStore.cleanup().then(createConnection, createConnection);\n    } else {\n      this.ready = createConnection();\n    }\n  }\n\n  key(fileID) {\n    return `${this.name}!${fileID}`;\n  }\n  /**\n   * List all file blobs currently in the store.\n   */\n\n\n  list() {\n    return this.ready.then(db => {\n      const transaction = db.transaction([STORE_NAME], 'readonly');\n      const store = transaction.objectStore(STORE_NAME);\n      const request = store.index('store').getAll(IDBKeyRange.only(this.name));\n      return waitForRequest(request);\n    }).then(files => {\n      const result = {};\n      files.forEach(file => {\n        result[file.fileID] = file.data;\n      });\n      return result;\n    });\n  }\n  /**\n   * Get one file blob from the store.\n   */\n\n\n  get(fileID) {\n    return this.ready.then(db => {\n      const transaction = db.transaction([STORE_NAME], 'readonly');\n      const request = transaction.objectStore(STORE_NAME).get(this.key(fileID));\n      return waitForRequest(request);\n    }).then(result => ({\n      id: result.data.fileID,\n      data: result.data.data\n    }));\n  }\n  /**\n   * Get the total size of all stored files.\n   *\n   * @private\n   */\n\n\n  getSize() {\n    return this.ready.then(db => {\n      const transaction = db.transaction([STORE_NAME], 'readonly');\n      const store = transaction.objectStore(STORE_NAME);\n      const request = store.index('store').openCursor(IDBKeyRange.only(this.name));\n      return new Promise((resolve, reject) => {\n        let size = 0;\n\n        request.onsuccess = event => {\n          const cursor = event.target.result;\n\n          if (cursor) {\n            size += cursor.value.data.size;\n            cursor.continue();\n          } else {\n            resolve(size);\n          }\n        };\n\n        request.onerror = () => {\n          reject(new Error('Could not retrieve stored blobs size'));\n        };\n      });\n    });\n  }\n  /**\n   * Save a file in the store.\n   */\n\n\n  put(file) {\n    if (file.data.size > this.opts.maxFileSize) {\n      return Promise.reject(new Error('File is too big to store.'));\n    }\n\n    return this.getSize().then(size => {\n      if (size > this.opts.maxTotalSize) {\n        return Promise.reject(new Error('No space left'));\n      }\n\n      return this.ready;\n    }).then(db => {\n      const transaction = db.transaction([STORE_NAME], 'readwrite');\n      const request = transaction.objectStore(STORE_NAME).add({\n        id: this.key(file.id),\n        fileID: file.id,\n        store: this.name,\n        expires: Date.now() + this.opts.expires,\n        data: file.data\n      });\n      return waitForRequest(request);\n    });\n  }\n  /**\n   * Delete a file blob from the store.\n   */\n\n\n  delete(fileID) {\n    return this.ready.then(db => {\n      const transaction = db.transaction([STORE_NAME], 'readwrite');\n      const request = transaction.objectStore(STORE_NAME).delete(this.key(fileID));\n      return waitForRequest(request);\n    });\n  }\n  /**\n   * Delete all stored blobs that have an expiry date that is before Date.now().\n   * This is a static method because it deletes expired blobs from _all_ Uppy instances.\n   */\n\n\n  static cleanup() {\n    return connect(DB_NAME).then(db => {\n      const transaction = db.transaction([STORE_NAME], 'readwrite');\n      const store = transaction.objectStore(STORE_NAME);\n      const request = store.index('expires').openCursor(IDBKeyRange.upperBound(Date.now()));\n      return new Promise((resolve, reject) => {\n        request.onsuccess = event => {\n          const cursor = event.target.result;\n\n          if (cursor) {\n            cursor.delete(); // Ignoring return value \u2026 it's not terrible if this goes wrong.\n\n            cursor.continue();\n          } else {\n            resolve(db);\n          }\n        };\n\n        request.onerror = reject;\n      });\n    }).then(db => {\n      db.close();\n    });\n  }\n\n}\n\nIndexedDBStore.isSupported = isSupported;\nmodule.exports = IndexedDBStore;", "\"use strict\";\n\n/**\n * Get uppy instance IDs for which state is stored.\n */\nfunction findUppyInstances() {\n  const instances = [];\n\n  for (let i = 0; i < localStorage.length; i++) {\n    const key = localStorage.key(i);\n\n    if (/^uppyState:/.test(key)) {\n      instances.push(key.slice('uppyState:'.length));\n    }\n  }\n\n  return instances;\n}\n/**\n * Try to JSON-parse a string, return null on failure.\n */\n\n\nfunction maybeParse(str) {\n  try {\n    return JSON.parse(str);\n  } catch (err) {\n    return null;\n  }\n}\n\nlet cleanedUp = false;\nmodule.exports = class MetaDataStore {\n  constructor(opts) {\n    this.opts = {\n      expires: 24 * 60 * 60 * 1000,\n      // 24 hours\n      ...opts\n    };\n    this.name = `uppyState:${opts.storeName}`;\n\n    if (!cleanedUp) {\n      cleanedUp = true;\n      MetaDataStore.cleanup();\n    }\n  }\n  /**\n   *\n   */\n\n\n  load() {\n    const savedState = localStorage.getItem(this.name);\n    if (!savedState) return null;\n    const data = maybeParse(savedState);\n    if (!data) return null; // Upgrade pre-0.20.0 uppyState: it used to be just a flat object,\n    // without `expires`.\n\n    if (!data.metadata) {\n      this.save(data);\n      return data;\n    }\n\n    return data.metadata;\n  }\n\n  save(metadata) {\n    const expires = Date.now() + this.opts.expires;\n    const state = JSON.stringify({\n      metadata,\n      expires\n    });\n    localStorage.setItem(this.name, state);\n  }\n  /**\n   * Remove all expired state.\n   */\n\n\n  static cleanup(instanceID) {\n    if (instanceID) {\n      localStorage.removeItem(`uppyState:${instanceID}`);\n      return;\n    }\n\n    const instanceIDs = findUppyInstances();\n    const now = Date.now();\n    instanceIDs.forEach(id => {\n      const data = localStorage.getItem(`uppyState:${id}`);\n      if (!data) return null;\n      const obj = maybeParse(data);\n      if (!obj) return null;\n\n      if (obj.expires && obj.expires < now) {\n        localStorage.removeItem(`uppyState:${id}`);\n      }\n    });\n  }\n\n};", "\"use strict\";\n\nvar _class, _temp;\n\nconst throttle = require('lodash.throttle');\n\nconst BasePlugin = require('@uppy/core/lib/BasePlugin');\n\nconst ServiceWorkerStore = require('./ServiceWorkerStore');\n\nconst IndexedDBStore = require('./IndexedDBStore');\n\nconst MetaDataStore = require('./MetaDataStore');\n/**\n * The GoldenRetriever plugin \u2014 restores selected files and resumes uploads\n * after a closed tab or a browser crash!\n *\n * Uses localStorage, IndexedDB and ServiceWorker to do its magic, read more:\n * https://uppy.io/blog/2017/07/golden-retriever/\n */\n\n\nmodule.exports = (_temp = _class = class GoldenRetriever extends BasePlugin {\n  constructor(uppy, opts) {\n    super(uppy, opts);\n\n    this.addBlobToStores = file => {\n      if (file.isRemote) return;\n\n      if (this.ServiceWorkerStore) {\n        this.ServiceWorkerStore.put(file).catch(err => {\n          this.uppy.log('[GoldenRetriever] Could not store file', 'warning');\n          this.uppy.log(err);\n        });\n      }\n\n      this.IndexedDBStore.put(file).catch(err => {\n        this.uppy.log('[GoldenRetriever] Could not store file', 'warning');\n        this.uppy.log(err);\n      });\n    };\n\n    this.removeBlobFromStores = file => {\n      if (this.ServiceWorkerStore) {\n        this.ServiceWorkerStore.delete(file.id).catch(err => {\n          this.uppy.log('[GoldenRetriever] Failed to remove file', 'warning');\n          this.uppy.log(err);\n        });\n      }\n\n      this.IndexedDBStore.delete(file.id).catch(err => {\n        this.uppy.log('[GoldenRetriever] Failed to remove file', 'warning');\n        this.uppy.log(err);\n      });\n    };\n\n    this.replaceBlobInStores = file => {\n      this.removeBlobFromStores(file);\n      this.addBlobToStores(file);\n    };\n\n    this.handleRestoreConfirmed = () => {\n      this.uppy.log('[GoldenRetriever] Restore confirmed, proceeding...'); // start all uploads again when file blobs are restored\n\n      const {\n        currentUploads\n      } = this.uppy.getState();\n\n      if (currentUploads) {\n        Object.keys(currentUploads).forEach(uploadId => {\n          this.uppy.restore(uploadId, currentUploads[uploadId]);\n        });\n        this.uppy.resumeAll();\n      }\n\n      this.uppy.upload();\n      this.uppy.setState({\n        recoveredState: null\n      });\n    };\n\n    this.abortRestore = () => {\n      this.uppy.log('[GoldenRetriever] Aborting restore...');\n      const fileIDs = Object.keys(this.uppy.getState().files);\n      this.deleteBlobs(fileIDs).then(() => {\n        this.uppy.log(`[GoldenRetriever] Removed ${fileIDs.length} files`);\n      }).catch(err => {\n        this.uppy.log(`[GoldenRetriever] Could not remove ${fileIDs.length} files`, 'warning');\n        this.uppy.log(err);\n      });\n      this.uppy.cancelAll();\n      this.uppy.setState({\n        recoveredState: null\n      });\n      MetaDataStore.cleanup(this.uppy.opts.id);\n    };\n\n    this.handleComplete = _ref => {\n      let {\n        successful\n      } = _ref;\n      const fileIDs = successful.map(file => file.id);\n      this.deleteBlobs(fileIDs).then(() => {\n        this.uppy.log(`[GoldenRetriever] Removed ${successful.length} files that finished uploading`);\n      }).catch(err => {\n        this.uppy.log(`[GoldenRetriever] Could not remove ${successful.length} files that finished uploading`, 'warning');\n        this.uppy.log(err);\n      });\n      this.uppy.setState({\n        recoveredState: null\n      });\n      MetaDataStore.cleanup(this.uppy.opts.id);\n    };\n\n    this.restoreBlobs = () => {\n      if (this.uppy.getFiles().length > 0) {\n        Promise.all([this.loadFileBlobsFromServiceWorker(), this.loadFileBlobsFromIndexedDB()]).then(resultingArrayOfObjects => {\n          const blobs = { ...resultingArrayOfObjects[0],\n            ...resultingArrayOfObjects[1]\n          };\n          this.onBlobsLoaded(blobs);\n        });\n      } else {\n        this.uppy.log('[GoldenRetriever] No files need to be loaded, only restoring processing state...');\n        this.onBlobsLoaded([]);\n      }\n    };\n\n    this.type = 'debugger';\n    this.id = this.opts.id || 'GoldenRetriever';\n    this.title = 'Golden Retriever';\n    const defaultOptions = {\n      expires: 24 * 60 * 60 * 1000,\n      // 24 hours\n      serviceWorker: false\n    };\n    this.opts = { ...defaultOptions,\n      ...opts\n    };\n    this.MetaDataStore = new MetaDataStore({\n      expires: this.opts.expires,\n      storeName: uppy.getID()\n    });\n    this.ServiceWorkerStore = null;\n\n    if (this.opts.serviceWorker) {\n      this.ServiceWorkerStore = new ServiceWorkerStore({\n        storeName: uppy.getID()\n      });\n    }\n\n    this.IndexedDBStore = new IndexedDBStore({\n      expires: this.opts.expires,\n      ...(this.opts.indexedDB || {}),\n      storeName: uppy.getID()\n    });\n    this.saveFilesStateToLocalStorage = throttle(this.saveFilesStateToLocalStorage.bind(this), 500, {\n      leading: true,\n      trailing: true\n    });\n    this.restoreState = this.restoreState.bind(this);\n    this.loadFileBlobsFromServiceWorker = this.loadFileBlobsFromServiceWorker.bind(this);\n    this.loadFileBlobsFromIndexedDB = this.loadFileBlobsFromIndexedDB.bind(this);\n    this.onBlobsLoaded = this.onBlobsLoaded.bind(this);\n  }\n\n  restoreState() {\n    const savedState = this.MetaDataStore.load();\n\n    if (savedState) {\n      this.uppy.log('[GoldenRetriever] Recovered some state from Local Storage');\n      this.uppy.setState({\n        currentUploads: savedState.currentUploads || {},\n        files: savedState.files || {},\n        recoveredState: savedState\n      });\n      this.savedPluginData = savedState.pluginData;\n    }\n  }\n  /**\n   * Get file objects that are currently waiting: they've been selected,\n   * but aren't yet being uploaded.\n   */\n\n\n  getWaitingFiles() {\n    const waitingFiles = {};\n    this.uppy.getFiles().forEach(file => {\n      if (!file.progress || !file.progress.uploadStarted) {\n        waitingFiles[file.id] = file;\n      }\n    });\n    return waitingFiles;\n  }\n  /**\n   * Get file objects that are currently being uploaded. If a file has finished\n   * uploading, but the other files in the same batch have not, the finished\n   * file is also returned.\n   */\n\n\n  getUploadingFiles() {\n    const uploadingFiles = {};\n    const {\n      currentUploads\n    } = this.uppy.getState();\n\n    if (currentUploads) {\n      const uploadIDs = Object.keys(currentUploads);\n      uploadIDs.forEach(uploadID => {\n        const filesInUpload = currentUploads[uploadID].fileIDs;\n        filesInUpload.forEach(fileID => {\n          uploadingFiles[fileID] = this.uppy.getFile(fileID);\n        });\n      });\n    }\n\n    return uploadingFiles;\n  }\n\n  saveFilesStateToLocalStorage() {\n    const filesToSave = { ...this.getWaitingFiles(),\n      ...this.getUploadingFiles()\n    }; // If all files have been removed by the user, clear recovery state\n\n    if (Object.keys(filesToSave).length === 0) {\n      this.uppy.setState({\n        recoveredState: null\n      });\n      MetaDataStore.cleanup(this.uppy.opts.id);\n      return;\n    } // We dont\u2019t need to store file.data on local files, because the actual blob will be restored later,\n    // and we want to avoid having weird properties in the serialized object.\n    // Also adding file.isRestored to all files, since they will be restored from local storage\n\n\n    const filesToSaveWithoutData = {};\n    Object.keys(filesToSave).forEach(file => {\n      if (filesToSave[file].isRemote) {\n        filesToSaveWithoutData[file] = { ...filesToSave[file],\n          isRestored: true\n        };\n      } else {\n        filesToSaveWithoutData[file] = { ...filesToSave[file],\n          isRestored: true,\n          data: null,\n          preview: null\n        };\n      }\n    });\n    const pluginData = {}; // TODO Find a better way to do this?\n    // Other plugins can attach a restore:get-data listener that receives this callback.\n    // Plugins can then use this callback (sync) to provide data to be stored.\n\n    this.uppy.emit('restore:get-data', data => {\n      Object.assign(pluginData, data);\n    });\n    const {\n      currentUploads\n    } = this.uppy.getState();\n    this.MetaDataStore.save({\n      currentUploads,\n      files: filesToSaveWithoutData,\n      pluginData\n    });\n  }\n\n  loadFileBlobsFromServiceWorker() {\n    if (!this.ServiceWorkerStore) {\n      return Promise.resolve({});\n    }\n\n    return this.ServiceWorkerStore.list().then(blobs => {\n      const files = this.uppy.getFiles();\n      const localFilesOnly = files.filter(file => {\n        // maybe && !file.progress.uploadComplete\n        return !file.isRemote;\n      });\n      const numberOfFilesRecovered = Object.keys(blobs).length;\n      const numberOfFilesTryingToRecover = localFilesOnly.length;\n\n      if (numberOfFilesRecovered === numberOfFilesTryingToRecover) {\n        this.uppy.log(`[GoldenRetriever] Successfully recovered ${numberOfFilesRecovered} blobs from Service Worker!`);\n        return blobs;\n      }\n\n      this.uppy.log('[GoldenRetriever] No blobs found in Service Worker, trying IndexedDB now...');\n      return {};\n    }).catch(err => {\n      this.uppy.log('[GoldenRetriever] Failed to recover blobs from Service Worker', 'warning');\n      this.uppy.log(err);\n      return {};\n    });\n  }\n\n  loadFileBlobsFromIndexedDB() {\n    return this.IndexedDBStore.list().then(blobs => {\n      const numberOfFilesRecovered = Object.keys(blobs).length;\n\n      if (numberOfFilesRecovered > 0) {\n        this.uppy.log(`[GoldenRetriever] Successfully recovered ${numberOfFilesRecovered} blobs from IndexedDB!`);\n        return blobs;\n      }\n\n      this.uppy.log('[GoldenRetriever] No blobs found in IndexedDB');\n      return {};\n    }).catch(err => {\n      this.uppy.log('[GoldenRetriever] Failed to recover blobs from IndexedDB', 'warning');\n      this.uppy.log(err);\n      return {};\n    });\n  }\n\n  onBlobsLoaded(blobs) {\n    const obsoleteBlobs = [];\n    const updatedFiles = { ...this.uppy.getState().files\n    }; // Loop through blobs that we can restore, add blobs to file objects\n\n    Object.keys(blobs).forEach(fileID => {\n      const originalFile = this.uppy.getFile(fileID);\n\n      if (!originalFile) {\n        obsoleteBlobs.push(fileID);\n        return;\n      }\n\n      const cachedData = blobs[fileID];\n      const updatedFileData = {\n        data: cachedData,\n        isRestored: true,\n        isGhost: false\n      };\n      updatedFiles[fileID] = { ...originalFile,\n        ...updatedFileData\n      };\n    }); // Loop through files that we can\u2019t restore fully \u2014 we only have meta, not blobs,\n    // set .isGhost on them, also set isRestored to all files\n\n    Object.keys(updatedFiles).forEach(fileID => {\n      if (updatedFiles[fileID].data === null) {\n        updatedFiles[fileID] = { ...updatedFiles[fileID],\n          isGhost: true\n        };\n      }\n    });\n    this.uppy.setState({\n      files: updatedFiles\n    });\n    this.uppy.emit('restored', this.savedPluginData);\n\n    if (obsoleteBlobs.length) {\n      this.deleteBlobs(obsoleteBlobs).then(() => {\n        this.uppy.log(`[GoldenRetriever] Cleaned up ${obsoleteBlobs.length} old files`);\n      }).catch(err => {\n        this.uppy.log(`[GoldenRetriever] Could not clean up ${obsoleteBlobs.length} old files`, 'warning');\n        this.uppy.log(err);\n      });\n    }\n  }\n\n  deleteBlobs(fileIDs) {\n    const promises = [];\n    fileIDs.forEach(id => {\n      if (this.ServiceWorkerStore) {\n        promises.push(this.ServiceWorkerStore.delete(id));\n      }\n\n      if (this.IndexedDBStore) {\n        promises.push(this.IndexedDBStore.delete(id));\n      }\n    });\n    return Promise.all(promises);\n  }\n\n  install() {\n    this.restoreState();\n    this.restoreBlobs();\n    this.uppy.on('file-added', this.addBlobToStores);\n    this.uppy.on('file-editor:complete', this.replaceBlobInStores);\n    this.uppy.on('file-removed', this.removeBlobFromStores);\n    this.uppy.on('state-update', this.saveFilesStateToLocalStorage);\n    this.uppy.on('restore-confirmed', this.handleRestoreConfirmed);\n    this.uppy.on('restore-canceled', this.abortRestore);\n    this.uppy.on('complete', this.handleComplete);\n  }\n\n  uninstall() {\n    this.uppy.off('file-added', this.addBlobToStores);\n    this.uppy.off('file-editor:complete', this.replaceBlobInStores);\n    this.uppy.off('file-removed', this.removeBlobFromStores);\n    this.uppy.off('state-update', this.saveFilesStateToLocalStorage);\n    this.uppy.off('restore-confirmed', this.handleRestoreConfirmed);\n    this.uppy.off('restore-canceled', this.abortRestore);\n    this.uppy.off('complete', this.handleComplete);\n  }\n\n}, _class.VERSION = \"2.0.6\", _temp);", "\"use strict\";\n\nconst cs_CZ = {};\ncs_CZ.strings = {\n  addMore: 'P\u0159idat dal\u0161\u00ED',\n  addMoreFiles: 'P\u0159idat dal\u0161\u00ED soubory',\n  addingMoreFiles: 'P\u0159id\u00E1v\u00E1n\u00ED dal\u0161\u00EDch soubor\u016F',\n  allowAccessDescription: 'Pokud chcete po\u0159izovat fotografie va\u0161\u00EDm za\u0159\u00EDzen\u00EDm, povolte pros\u00EDm p\u0159\u00EDstup ke kame\u0159e.',\n  allowAccessTitle: 'Povolte pros\u00EDm p\u0159\u00EDstup ke kame\u0159e.',\n  authenticateWith: 'P\u0159ipojit k %{pluginName}',\n  authenticateWithTitle: 'Pros\u00EDm p\u0159ihlaste se k %{pluginName} pro v\u00FDb\u011Br soubor\u016F',\n  back: 'Zp\u011Bt',\n  browse: 'proch\u00E1zet',\n  browseFiles: 'proch\u00E1zet',\n  cancel: 'Zru\u0161it',\n  cancelUpload: 'Zru\u0161it nahr\u00E1v\u00E1n\u00ED',\n  chooseFiles: 'Vyberte soubory',\n  closeModal: 'Zav\u0159\u00EDt dialog',\n  companionError: 'Spojen\u00ED s modulem Companion se nezda\u0159ilo',\n  complete: 'Hotovo',\n  connectedToInternet: 'P\u0159ipojeno k internetu',\n  copyLink: 'Zkop\u00EDrovat odkaz',\n  copyLinkToClipboardFallback: 'Zkop\u00EDrujte odkaz n\u00ED\u017Ee',\n  copyLinkToClipboardSuccess: 'Odkaz zkop\u00EDrov\u00E1n do schr\u00E1nky',\n  creatingAssembly: 'Nahr\u00E1v\u00E1n\u00ED se p\u0159ipravuje...',\n  creatingAssemblyFailed: 'Transloadit: Nelze vytvo\u0159it Assembly',\n  dashboardTitle: 'Nahr\u00E1t soubory',\n  dashboardWindowTitle: 'Okno pro nahr\u00E1n\u00ED soubor\u016F. (Stiskn\u011Bte ESC pro zav\u0159en\u00ED.)',\n  dataUploadedOfTotal: '%{complete} z %{total}',\n  done: 'Dokon\u010Deno',\n  dropHereOr: 'P\u0159et\u00E1hn\u011Bte soubory sem nebo %{browse}',\n  dropHint: 'P\u0159et\u00E1hn\u011Bte soubory sem',\n  dropPasteBoth: 'P\u0159et\u00E1hn\u011Bte soubory sem, vlo\u017Ete je, nebo %{browse}',\n  dropPasteFiles: 'P\u0159et\u00E1hn\u011Bte soubory sem, vlo\u017Ete je, nebo %{browse}',\n  dropPasteFolders: 'P\u0159et\u00E1hn\u011Bte soubory sem, vlo\u017Ete je, nebo %{browse}',\n  dropPasteImportBoth: 'P\u0159et\u00E1hn\u011Bte soubory sem, vlo\u017Ete je, %{browse} nebo je importujte',\n  dropPasteImportFiles: 'P\u0159et\u00E1hn\u011Bte soubory sem, vlo\u017Ete je, %{browse} nebo je importujte',\n  dropPasteImportFolders: 'P\u0159et\u00E1hn\u011Bte soubory sem, vlo\u017Ete je, %{browse} nebo je importujte',\n  editFile: 'Upravit soubor',\n  editing: 'Upravujete %{file}',\n  emptyFolderAdded: 'Nebyly p\u0159id\u00E1ny \u017E\u00E1dn\u00E9 soubory, adres\u00E1\u0159 je pr\u00E1zdn\u00FD.',\n  encoding: 'P\u0159ev\u00E1d\u011Bn\u00ED...',\n  enterCorrectUrl: 'Chybn\u00E1 URL: Ujist\u011Bte se, \u017Ee vkl\u00E1d\u00E1te p\u0159\u00EDm\u00FD odkaz na soubor.',\n  enterUrlToImport: 'Vlo\u017Ete URL pro import souboru.',\n  exceedsSize: 'Tento soubor p\u0159ekra\u010Duje maxim\u00E1ln\u00ED povolenou velikost: %{size}',\n  failedToFetch: 'Modulu Companion se nepoda\u0159ilo st\u00E1hnout soubor z t\u00E9to URL, zkontrolujte pros\u00EDm, jestli je URL spr\u00E1vn\u00E1.',\n  failedToUpload: 'Nepoda\u0159ilo se nahr\u00E1t soubor %{file}',\n  fileSource: 'Zdroj souboru: %{name}',\n  filesUploadedOfTotal: {\n    '0': '%{complete} z %{smart_count} souboru nahr\u00E1no',\n    '1': '%{complete} z %{smart_count} soubor\u016F nahr\u00E1no',\n    '2': '%{complete} z %{smart_count} soubor\u016F nahr\u00E1no'\n  },\n  filter: 'Filtrovat',\n  finishEditingFile: 'Dokon\u010Dit editaci souboru',\n  folderAdded: {\n    '0': 'P\u0159id\u00E1n %{smart_count} soubor z adres\u00E1\u0159e %{folder}',\n    '1': 'P\u0159id\u00E1no %{smart_count} soubor\u016F z adres\u00E1\u0159e %{folder}',\n    '2': 'P\u0159id\u00E1no %{smart_count} soubor\u016F z adres\u00E1\u0159e %{folder}'\n  },\n  generatingThumbnails: 'Vytv\u00E1\u0159\u00EDm miniatury...',\n  import: 'Importovat',\n  importFrom: 'Importovat z %{name}',\n  loading: 'Nahr\u00E1v\u00E1n\u00ED...',\n  logOut: 'Odhl\u00E1sit',\n  myDevice: 'Moje za\u0159\u00EDzen\u00ED',\n  noFilesFound: 'Nenalezeny \u017E\u00E1dn\u00E9 soubory ani adres\u00E1\u0159e',\n  noInternetConnection: 'Nep\u0159ipojeno k internetu',\n  openFolderNamed: 'Otev\u0159\u00EDt adres\u00E1\u0159 %{name}',\n  pause: 'Pozastavit',\n  pauseUpload: 'Pozastavit nahr\u00E1v\u00E1n\u00ED',\n  paused: 'Pozastaveno',\n  poweredBy: 'Vytvo\u0159eno pomoc\u00ED %{uppy}',\n  processingXFiles: {\n    '0': 'Zpracov\u00E1n\u00ED %{smart_count} soubor\u016F',\n    '1': 'Zpracov\u00E1n\u00ED %{smart_count} soubor\u016F',\n    '2': 'Zpracov\u00E1n\u00ED %{smart_count} soubor\u016F'\n  },\n  removeFile: 'Odebrat soubor',\n  resetFilter: 'Reset filtru',\n  resume: 'Pok\u0159a\u010Dovat',\n  resumeUpload: 'Pokra\u010Dovat v nahr\u00E1v\u00E1n\u00ED',\n  retry: 'Opakovat',\n  retryUpload: 'Opakovat nahr\u00E1v\u00E1n\u00ED',\n  saveChanges: 'Ulo\u017Eit zm\u011Bny',\n  selectFileNamed: 'Vybrat soubor %{name}',\n  selectX: {\n    '0': 'Vybrat %{smart_count}',\n    '1': 'Vybrat %{smart_count}',\n    '2': 'Vybrat %{smart_count}'\n  },\n  smile: '\u00DAsm\u011Bv pros\u00EDm!',\n  startRecording: 'Spustit nahr\u00E1v\u00E1n\u00ED videa',\n  stopRecording: 'Zastavit nahr\u00E1v\u00E1n\u00ED videa',\n  takePicture: 'Po\u0159\u00EDdit fotografii',\n  timedOut: 'Stav nahr\u00E1v\u00E1n\u00ED se nezm\u011Bnil %{seconds} sekund, ru\u0161\u00EDm nahr\u00E1v\u00E1n\u00ED.',\n  unselectFileNamed: 'Zru\u0161it v\u00FDb\u011Br souboru %{name}',\n  upload: 'Nahr\u00E1t',\n  uploadComplete: 'Nahr\u00E1n\u00ED dokon\u010Deno',\n  uploadFailed: 'Nahr\u00E1n\u00ED se nezda\u0159ilo',\n  uploadPaused: 'Nahr\u00E1n\u00ED dokon\u010Deno',\n  uploadXFiles: {\n    '0': 'Nahr\u00E1t %{smart_count} soubor',\n    '1': 'Nahr\u00E1t %{smart_count} soubor\u016F',\n    '2': 'Nahr\u00E1t %{smart_count} soubor\u016F'\n  },\n  uploadXNewFiles: {\n    '0': 'Nahr\u00E1t +%{smart_count} soubor',\n    '1': 'Nahr\u00E1t +%{smart_count} soubor\u016F',\n    '2': 'Nahr\u00E1t +%{smart_count} soubor\u016F'\n  },\n  uploading: 'Nahr\u00E1v\u00E1n\u00ED',\n  uploadingXFiles: {\n    '0': 'Nahr\u00E1v\u00E1m %{smart_count} soubor',\n    '1': 'Nahr\u00E1v\u00E1m %{smart_count} soubor\u016F',\n    '2': 'Nahr\u00E1v\u00E1m %{smart_count} soubor\u016F'\n  },\n  xFilesSelected: {\n    '0': '%{smart_count} soubor vybr\u00E1n',\n    '1': '%{smart_count} soubory vybr\u00E1ny',\n    '2': '%{smart_count} soubory vybr\u00E1ny'\n  },\n  xMoreFilesAdded: {\n    '0': '%{smart_count} dal\u0161\u00ED soubor p\u0159id\u00E1n',\n    '1': '%{smart_count} dal\u0161\u00EDch soubor\u016F p\u0159id\u00E1no',\n    '2': '%{smart_count} dal\u0161\u00EDch soubor\u016F p\u0159id\u00E1no'\n  },\n  xTimeLeft: '%{time} zb\u00FDv\u00E1',\n  youCanOnlyUploadFileTypes: 'Lze nahr\u00E1t pouze n\u00E1sleduj\u00EDc\u00ED typy soubor\u016F: %{types}',\n  youCanOnlyUploadX: {\n    '0': 'Lze nahr\u00E1t pouze %{smart_count} soubor',\n    '1': 'Lze nahr\u00E1t pouze %{smart_count} soubor\u016F',\n    '2': 'Lze nahr\u00E1t pouze %{smart_count} soubor\u016F'\n  },\n  youHaveToAtLeastSelectX: {\n    '0': 'Je t\u0159eba vybrat alespo\u0148 %{smart_count} soubor',\n    '1': 'Je t\u0159eba vybrat alespo\u0148 %{smart_count} soubor\u016F',\n    '2': 'Je t\u0159eba vybrat alespo\u0148 %{smart_count} soubor\u016F'\n  }\n};\n\ncs_CZ.pluralize = function pluralize(n) {\n  if (n === 1) {\n    return 0;\n  }\n\n  return 1;\n};\n\nif (typeof window !== 'undefined' && typeof window.Uppy !== 'undefined') {\n  window.Uppy.locales.cs_CZ = cs_CZ;\n}\n\nmodule.exports = cs_CZ;", "\"use strict\";\n\nconst sk_SK = {};\nsk_SK.strings = {\n  addBulkFilesFailed: {\n    '0': 'S\u00FAbor %{smart_count} sa nepodarilo prida\u0165 z d\u00F4vodu vn\u00FAtornej chyby',\n    '1': 'Nepodarilo sa prida\u0165 %{smart_count} s\u00FAbory z d\u00F4vodu vn\u00FAtorn\u00FDch ch\u00FDb',\n    '2': 'Nepodarilo sa prida\u0165 %{smart_count} s\u00FAborov z d\u00F4vodu vn\u00FAtorn\u00FDch ch\u00FDb'\n  },\n  addMore: 'Prida\u0165 \u010Fal\u0161ie',\n  addMoreFiles: 'Prida\u0165 \u010Fal\u0161ie s\u00FAbory',\n  addingMoreFiles: 'Prid\u00E1vaj\u00FA sa \u010Fal\u0161ie s\u00FAbory',\n  allowAccessDescription: 'Pokia\u013E chcete urobi\u0165 fotografiu alebo nahra\u0165 video va\u0161\u00EDm zariaden\u00EDm, povo\u013Ete pros\u00EDm pr\u00EDstup ku kamere.',\n  allowAccessTitle: 'Povo\u013Ete pr\u00EDstup ku kamere',\n  aspectRatioLandscape: 'Oreza\u0165 na \u0161\u00EDrku (16:9)',\n  aspectRatioPortrait: 'Oreza\u0165 na v\u00FD\u0161ku (9:16)',\n  aspectRatioSquare: 'Oreza\u0165 do \u0161tvorca',\n  authenticateWith: 'Pripoji\u0165 k %{pluginName}',\n  authenticateWithTitle: 'Pros\u00EDm pr\u00EDhl\u00E1ste sa k %{pluginName} pre v\u00FDber s\u00FAborov',\n  back: 'Sp\u00E4\u0165',\n  backToSearch: 'Sp\u00E4\u0165 na vyh\u013Ead\u00E1vanie',\n  browse: 'vyberte',\n  browseFiles: 'vyberte',\n  cancel: 'Zru\u0161i\u0165',\n  cancelUpload: 'Zru\u0161i\u0165 nahr\u00E1vanie',\n  chooseFiles: 'Vyberte s\u00FAbory',\n  closeModal: 'Zavrie\u0165 okno',\n  companionError: 'Spojenie s modulom Companion sa nepodarilo',\n  companionUnauthorizeHint: 'Pokia\u013E nechcete povoli\u0165 pr\u00EDstup k \u00FA\u010Dtu %{provider}, pros\u00EDm prejdite na t\u00FAto adresu %{url}',\n  complete: 'Hotovo',\n  connectedToInternet: 'Pripojen\u00E9 k internetu',\n  copyLink: 'Kop\u00EDrova\u0165 odkaz',\n  copyLinkToClipboardFallback: 'Skop\u00EDrujte odkaz ni\u017E\u0161ie',\n  copyLinkToClipboardSuccess: 'Odkaz bol skop\u00EDrovan\u00FD do schr\u00E1nky',\n  creatingAssembly: 'Pripravuje sa nahr\u00E1vanie...',\n  creatingAssemblyFailed: 'Transloadit: Nepodarilo sa vytvori\u0165 Assembly',\n  dashboardTitle: 'Nahra\u0165 s\u00FAbory',\n  dashboardWindowTitle: 'Okno na nahr\u00E1vanie s\u00FAborov. (Stla\u010Den\u00EDm ESC ho zavriete)',\n  dataUploadedOfTotal: '%{complete} z %{total}',\n  done: 'Dokon\u010Den\u00E9',\n  dropHereOr: 'Presu\u0148te sem s\u00FAbory alebo %{browse}',\n  dropHint: 'Presu\u0148te sem s\u00FAbory',\n  dropPasteBoth: 'Presu\u0148te sem s\u00FAbory alebo %{browse}',\n  dropPasteFiles: 'Presu\u0148te sem s\u00FAbory alebo %{browse}',\n  dropPasteFolders: 'Presu\u0148te sem s\u00FAbory alebo %{browse}',\n  dropPasteImportBoth: 'Presu\u0148te sem, %{browse} alebo importujte s\u00FAbory:',\n  dropPasteImportFiles: 'Presu\u0148te sem, %{browse} alebo importujte s\u00FAbory:',\n  dropPasteImportFolders: 'Presu\u0148te sem, %{browse} alebo importujte s\u00FAbory:',\n  editFile: 'Upravi\u0165 s\u00FAbor',\n  editing: '\u00DAprava %{file}',\n  emptyFolderAdded: 'Neboli pridan\u00E9 \u017Eiadne s\u00FAbory, preto\u017Ee adres\u00E1r je pr\u00E1zdny.',\n  encoding: 'Konvertovanie...',\n  enterCorrectUrl: 'Nespr\u00E1vna adresa URL: Uistite sa, \u017Ee zad\u00E1vate priamy odkaz na s\u00FAbor',\n  enterTextToSearch: 'Zadajte text pre vyh\u013Eadanie obr\u00E1zkov',\n  enterUrlToImport: 'Ak chcete importova\u0165 s\u00FAbor, zadajte adresu URL',\n  exceedsSize: 'Tento s\u00FAbor presahuje maxim\u00E1lnu povolen\u00FA ve\u013Ekos\u0165 s\u00FAboru %{size}',\n  failedToFetch: 'Nepodarilo sa na\u010D\u00EDta\u0165 t\u00FAto webov\u00FA adresu. Skontrolujte, \u010Di je spr\u00E1vna',\n  failedToUpload: 'Nepodarilo sa nahra\u0165 s\u00FAbor %{file}',\n  fileSource: 'Zdroj s\u00FAboru: %{name}',\n  filesUploadedOfTotal: {\n    '0': '%{complete} z %{smart_count} nahran\u00FDch s\u00FAborov',\n    '1': '%{complete} z %{smart_count} nahran\u00FDch s\u00FAborov'\n  },\n  filter: 'Filtrova\u0165',\n  finishEditingFile: 'Dokon\u010Di\u0165 \u00FApravu s\u00FAborov',\n  flipHorizontal: 'Oto\u010Di\u0165 horizont\u00E1lne',\n  folderAdded: {\n    '0': 'Pridan\u00FD %{smart_count} s\u00FAbor zo zlo\u017Eky %{folder}',\n    '1': 'Pridan\u00E9 %{smart_count} s\u00FAbory zo zlo\u017Eky %{folder}',\n    '2': 'Pridan\u00FDch %{smart_count} s\u00FAborov zo zlo\u017Eky %{folder}'\n  },\n  generatingThumbnails: 'Vytv\u00E1ram miniatury...',\n  import: 'Importova\u0165',\n  importFrom: 'Import z %{name}',\n  inferiorSize: 'Tento s\u00FAbor je men\u0161\u00ED ako povolen\u00E1 ve\u013Ekos\u0165 s\u00FAboru %{size}',\n  loading: 'Nahr\u00E1vanie...',\n  logOut: 'Odhl\u00E1si\u0165',\n  micDisabled: 'U\u017E\u00EDvate\u013E odmietol pr\u00EDstup k mikrof\u00F3nu',\n  myDevice: 'Moje zariadenie',\n  noCameraDescription: 'Ak chcete urobi\u0165 fotku alebo nahra\u0165 video, zapnite kameru',\n  noCameraTitle: 'Kamera nie je k dispoz\u00EDcii',\n  noDuplicates: 'Nem\u00F4\u017Eete prida\u0165 duplik\u00E1tny s\u00FAbor \\'%{fileName}\\', ktor\u00FD u\u017E existuje',\n  noFilesFound: 'Nem\u00E1te pridan\u00E9 \u017Eiadne s\u00FAbory ani zlo\u017Eky',\n  noInternetConnection: '\u017Diadne internetov\u00E9 pripojenie',\n  noMoreFilesAllowed: 'Po\u010Das nahr\u00E1vania nem\u00F4\u017Eete prida\u0165 \u010Fal\u0161ie s\u00FAbory',\n  openFolderNamed: 'Otvori\u0165 zlo\u017Eku %{name}',\n  pause: 'Pozastavi\u0165',\n  pauseUpload: 'Pozastavi\u0165 nahr\u00E1vanie',\n  paused: 'Pozastaven\u00E9',\n  poweredBy: 'Vytvoren\u00E9 pomocou %{uppy}',\n  processingXFiles: {\n    '0': 'Spracovanie %{smart_count} s\u00FAboru',\n    '1': 'Spracovanie %{smart_count} s\u00FAborov'\n  },\n  recording: 'Nahr\u00E1vanie',\n  recordingLength: 'D\u013A\u017Eka z\u00E1znamu %{recording_length}',\n  recordingStoppedMaxSize: 'Nahr\u00E1vanie sa zastavilo, preto\u017Ee ve\u013Ekos\u0165 s\u00FAboru sa chyst\u00E1 prekro\u010Di\u0165 limit',\n  removeFile: 'Odstr\u00E1ni\u0165 s\u00FAbor',\n  resetFilter: 'Zru\u0161i\u0165 filter',\n  resume: 'Pokra\u010Dova\u0165',\n  resumeUpload: 'Pokra\u010Dova\u0165 v nahr\u00E1van\u00ED',\n  retry: 'Opakova\u0165',\n  retryUpload: 'Opakova\u0165 nahr\u00E1vanie',\n  revert: 'Vr\u00E1ti\u0165 sp\u00E4\u0165',\n  rotate: 'Oto\u010Di\u0165',\n  save: 'Ulo\u017Ei\u0165',\n  saveChanges: 'Ulo\u017Ei\u0165 zmeny',\n  searchImages: 'Vyh\u013Eadajte obr\u00E1zky',\n  selectFileNamed: 'Vybra\u0165 s\u00FAbor %{name}',\n  selectX: {\n    '0': 'Vybra\u0165 %{smart_count}',\n    '1': 'Vybra\u0165 %{smart_count}'\n  },\n  smile: '\u00DAsmev pros\u00EDm!',\n  startCapturing: 'Spusti\u0165 sn\u00EDmanie obrazovky',\n  startRecording: 'Spusti\u0165 nahr\u00E1vanie videa',\n  stopCapturing: 'Zastavi\u0165 sn\u00EDmanie obrazovky',\n  stopRecording: 'Zastavi\u0165 nahr\u00E1vanie videa',\n  streamActive: 'Stream je akt\u00EDvny',\n  streamPassive: 'Stream nieje akt\u00EDvny',\n  submitRecordedFile: 'Odosla\u0165 nahrat\u00E9 video',\n  takePicture: 'Urobi\u0165 fotku',\n  timedOut: 'Nahr\u00E1vanie bolo preru\u0161en\u00E9 na %{seconds}, preru\u0161uje sa.',\n  unselectFileNamed: 'Zru\u0161i\u0165 v\u00FDber s\u00FAboru %{name}',\n  upload: 'Nahra\u0165',\n  uploadComplete: 'Nahr\u00E1vanie dokon\u010Den\u00E9',\n  uploadFailed: 'Nahr\u00E1vanie sa nepodarilo',\n  uploadPaused: 'Nahr\u00E1vanie pozastaven\u00E9',\n  uploadXFiles: {\n    '0': 'Nahra\u0165 %{smart_count} s\u00FAbor',\n    '1': 'Nahra\u0165 %{smart_count} s\u00FAbory',\n    '2': 'Nahra\u0165 %{smart_count} s\u00FAborov'\n  },\n  uploadXNewFiles: {\n    '0': 'Nahra\u0165 +%{smart_count} s\u00FAbor',\n    '1': 'Nahra\u0165 +%{smart_count} s\u00FAbory',\n    '2': 'Nahra\u0165 +%{smart_count} s\u00FAborov'\n  },\n  uploading: 'Nahr\u00E1vanie',\n  uploadingXFiles: {\n    '0': 'Nahr\u00E1v\u00E1m %{smart_count} s\u00FAbor',\n    '1': 'Nahr\u00E1v\u00E1m %{smart_count} s\u00FAbory',\n    '2': 'Nahr\u00E1v\u00E1m %{smart_count} s\u00FAborov'\n  },\n  xFilesSelected: {\n    '0': '%{smart_count} vybrat\u00FD s\u00FAbor',\n    '1': '%{smart_count} vybran\u00E9 s\u00FAbory',\n    '2': '%{smart_count} vybran\u00FDch s\u00FAborov'\n  },\n  xMoreFilesAdded: {\n    '0': '%{smart_count} \u010Fal\u0161\u00ED pridan\u00FD s\u00FAbor',\n    '1': '%{smart_count} \u010Fal\u0161ie pridan\u00E9 s\u00FAbory',\n    '2': '%{smart_count} \u010Fal\u0161\u00EDch pridan\u00FDch s\u00FAborov'\n  },\n  xTimeLeft: '%{time} zost\u00E1va',\n  youCanOnlyUploadFileTypes: 'M\u00F4\u017Eete nahra\u0165 iba tieto typy s\u00FAborov: %{types}',\n  youCanOnlyUploadX: {\n    '0': 'M\u00F4\u017Eete nahra\u0165 iba %{smart_count} s\u00FAbor',\n    '1': 'M\u00F4\u017Eete nahra\u0165 iba %{smart_count} s\u00FAbory',\n    '2': 'M\u00F4\u017Eete nahra\u0165 iba %{smart_count} s\u00FAborov'\n  },\n  youHaveToAtLeastSelectX: {\n    '0': 'Mus\u00EDte vybra\u0165 aspo\u0148 %{smart_count} s\u00FAbor',\n    '1': 'Mus\u00EDte vybra\u0165 aspo\u0148 %{smart_count} s\u00FAbory',\n    '2': 'Mus\u00EDte vybra\u0165 aspo\u0148 %{smart_count} s\u00FAborov'\n  },\n  zoomIn: 'Pribl\u00ED\u017Ei\u0165',\n  zoomOut: 'Oddiali\u0165'\n};\n\nsk_SK.pluralize = function pluralize(count) {\n  if (count === 1) {\n    return 0;\n  }\n\n  return 1;\n};\n\nif (typeof window !== 'undefined' && typeof window.Uppy !== 'undefined') {\n  window.Uppy.locales.sk_SK = sk_SK;\n}\n\nmodule.exports = sk_SK;", "var win;\n\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}\n\nmodule.exports = win;\n", "", "var topLevel = typeof global !== 'undefined' ? global :\n    typeof window !== 'undefined' ? window : {}\nvar minDoc = require('min-document');\n\nvar doccy;\n\nif (typeof document !== 'undefined') {\n    doccy = document;\n} else {\n    doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'];\n\n    if (!doccy) {\n        doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc;\n    }\n}\n\nmodule.exports = doccy;\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 = isFunction\n\nvar toString = Object.prototype.toString\n\nfunction isFunction (fn) {\n  if (!fn) {\n    return false\n  }\n  var string = toString.call(fn)\n  return string === '[object Function]' ||\n    (typeof fn === 'function' && string !== '[object RegExp]') ||\n    (typeof window !== 'undefined' &&\n     // IE8 and below\n     (fn === window.setTimeout ||\n      fn === window.alert ||\n      fn === window.confirm ||\n      fn === window.prompt))\n};\n", "\"use strict\";\n\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\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); }\n\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; }\n\nvar InterceptorsStorage = /*#__PURE__*/function () {\n  function InterceptorsStorage() {\n    this.typeToInterceptorsMap_ = new Map();\n    this.enabled_ = false;\n  }\n\n  var _proto = InterceptorsStorage.prototype;\n\n  _proto.getIsEnabled = function getIsEnabled() {\n    return this.enabled_;\n  };\n\n  _proto.enable = function enable() {\n    this.enabled_ = true;\n  };\n\n  _proto.disable = function disable() {\n    this.enabled_ = false;\n  };\n\n  _proto.reset = function reset() {\n    this.typeToInterceptorsMap_ = new Map();\n    this.enabled_ = false;\n  };\n\n  _proto.addInterceptor = function addInterceptor(type, interceptor) {\n    if (!this.typeToInterceptorsMap_.has(type)) {\n      this.typeToInterceptorsMap_.set(type, new Set());\n    }\n\n    var interceptorsSet = this.typeToInterceptorsMap_.get(type);\n\n    if (interceptorsSet.has(interceptor)) {\n      // already have this interceptor\n      return false;\n    }\n\n    interceptorsSet.add(interceptor);\n    return true;\n  };\n\n  _proto.removeInterceptor = function removeInterceptor(type, interceptor) {\n    var interceptorsSet = this.typeToInterceptorsMap_.get(type);\n\n    if (interceptorsSet && interceptorsSet.has(interceptor)) {\n      interceptorsSet.delete(interceptor);\n      return true;\n    }\n\n    return false;\n  };\n\n  _proto.clearInterceptorsByType = function clearInterceptorsByType(type) {\n    var interceptorsSet = this.typeToInterceptorsMap_.get(type);\n\n    if (!interceptorsSet) {\n      return false;\n    }\n\n    this.typeToInterceptorsMap_.delete(type);\n    this.typeToInterceptorsMap_.set(type, new Set());\n    return true;\n  };\n\n  _proto.clear = function clear() {\n    if (!this.typeToInterceptorsMap_.size) {\n      return false;\n    }\n\n    this.typeToInterceptorsMap_ = new Map();\n    return true;\n  };\n\n  _proto.getForType = function getForType(type) {\n    return this.typeToInterceptorsMap_.get(type) || new Set();\n  };\n\n  _proto.execute = function execute(type, payload) {\n    var interceptors = this.getForType(type);\n\n    for (var _iterator = _createForOfIteratorHelperLoose(interceptors), _step; !(_step = _iterator()).done;) {\n      var interceptor = _step.value;\n\n      try {\n        payload = interceptor(payload);\n      } catch (e) {//ignore\n      }\n    }\n\n    return payload;\n  };\n\n  return InterceptorsStorage;\n}();\n\nmodule.exports = InterceptorsStorage;", "\"use strict\";\n\nvar RetryManager = /*#__PURE__*/function () {\n  function RetryManager() {\n    this.maxAttempts_ = 1;\n    this.delayFactor_ = 0.1;\n    this.fuzzFactor_ = 0.1;\n    this.initialDelay_ = 1000;\n    this.enabled_ = false;\n  }\n\n  var _proto = RetryManager.prototype;\n\n  _proto.getIsEnabled = function getIsEnabled() {\n    return this.enabled_;\n  };\n\n  _proto.enable = function enable() {\n    this.enabled_ = true;\n  };\n\n  _proto.disable = function disable() {\n    this.enabled_ = false;\n  };\n\n  _proto.reset = function reset() {\n    this.maxAttempts_ = 1;\n    this.delayFactor_ = 0.1;\n    this.fuzzFactor_ = 0.1;\n    this.initialDelay_ = 1000;\n    this.enabled_ = false;\n  };\n\n  _proto.getMaxAttempts = function getMaxAttempts() {\n    return this.maxAttempts_;\n  };\n\n  _proto.setMaxAttempts = function setMaxAttempts(maxAttempts) {\n    this.maxAttempts_ = maxAttempts;\n  };\n\n  _proto.getDelayFactor = function getDelayFactor() {\n    return this.delayFactor_;\n  };\n\n  _proto.setDelayFactor = function setDelayFactor(delayFactor) {\n    this.delayFactor_ = delayFactor;\n  };\n\n  _proto.getFuzzFactor = function getFuzzFactor() {\n    return this.fuzzFactor_;\n  };\n\n  _proto.setFuzzFactor = function setFuzzFactor(fuzzFactor) {\n    this.fuzzFactor_ = fuzzFactor;\n  };\n\n  _proto.getInitialDelay = function getInitialDelay() {\n    return this.initialDelay_;\n  };\n\n  _proto.setInitialDelay = function setInitialDelay(initialDelay) {\n    this.initialDelay_ = initialDelay;\n  };\n\n  _proto.createRetry = function createRetry(_temp) {\n    var _ref = _temp === void 0 ? {} : _temp,\n        maxAttempts = _ref.maxAttempts,\n        delayFactor = _ref.delayFactor,\n        fuzzFactor = _ref.fuzzFactor,\n        initialDelay = _ref.initialDelay;\n\n    return new Retry({\n      maxAttempts: maxAttempts || this.maxAttempts_,\n      delayFactor: delayFactor || this.delayFactor_,\n      fuzzFactor: fuzzFactor || this.fuzzFactor_,\n      initialDelay: initialDelay || this.initialDelay_\n    });\n  };\n\n  return RetryManager;\n}();\n\nvar Retry = /*#__PURE__*/function () {\n  function Retry(options) {\n    this.maxAttempts_ = options.maxAttempts;\n    this.delayFactor_ = options.delayFactor;\n    this.fuzzFactor_ = options.fuzzFactor;\n    this.currentDelay_ = options.initialDelay;\n    this.currentAttempt_ = 1;\n  }\n\n  var _proto2 = Retry.prototype;\n\n  _proto2.moveToNextAttempt = function moveToNextAttempt() {\n    this.currentAttempt_++;\n    var delayDelta = this.currentDelay_ * this.delayFactor_;\n    this.currentDelay_ = this.currentDelay_ + delayDelta;\n  };\n\n  _proto2.shouldRetry = function shouldRetry() {\n    return this.currentAttempt_ < this.maxAttempts_;\n  };\n\n  _proto2.getCurrentDelay = function getCurrentDelay() {\n    return this.currentDelay_;\n  };\n\n  _proto2.getCurrentMinPossibleDelay = function getCurrentMinPossibleDelay() {\n    return (1 - this.fuzzFactor_) * this.currentDelay_;\n  };\n\n  _proto2.getCurrentMaxPossibleDelay = function getCurrentMaxPossibleDelay() {\n    return (1 + this.fuzzFactor_) * this.currentDelay_;\n  }\n  /**\n   * For example fuzzFactor is 0.1\n   * This means \u00B110% deviation\n   * So if we have delay as 1000\n   * This function can generate any value from 900 to 1100\n   */\n  ;\n\n  _proto2.getCurrentFuzzedDelay = function getCurrentFuzzedDelay() {\n    var lowValue = this.getCurrentMinPossibleDelay();\n    var highValue = this.getCurrentMaxPossibleDelay();\n    return lowValue + Math.random() * (highValue - lowValue);\n  };\n\n  return Retry;\n}();\n\nmodule.exports = RetryManager;", "\"use strict\";\n\nvar window = require('global/window');\n\nvar httpResponseHandler = function httpResponseHandler(callback, decodeResponseBody) {\n  if (decodeResponseBody === void 0) {\n    decodeResponseBody = false;\n  }\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\n    if (response.statusCode >= 400 && response.statusCode <= 599) {\n      var cause = responseBody;\n\n      if (decodeResponseBody) {\n        if (window.TextDecoder) {\n          var charset = getCharset(response.headers && response.headers['content-type']);\n\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\n      callback({\n        cause: cause\n      });\n      return;\n    } // otherwise, request succeeded\n\n\n    callback(null, responseBody);\n  };\n};\n\nfunction getCharset(contentTypeHeader) {\n  if (contentTypeHeader === void 0) {\n    contentTypeHeader = '';\n  }\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\n    if (type.trim() === 'charset') {\n      return value.trim();\n    }\n\n    return charset;\n  }, 'utf-8');\n}\n\nmodule.exports = httpResponseHandler;", "\"use strict\";\n\nvar window = require(\"global/window\");\n\nvar _extends = require(\"@babel/runtime/helpers/extends\");\n\nvar isFunction = require('is-function');\n\nvar InterceptorsStorage = require('./interceptors.js');\n\nvar RetryManager = require(\"./retry.js\");\n\ncreateXHR.httpHandler = require('./http-handler.js');\ncreateXHR.requestInterceptorsStorage = new InterceptorsStorage();\ncreateXHR.responseInterceptorsStorage = new InterceptorsStorage();\ncreateXHR.retryManager = new RetryManager();\n/**\n * @license\n * slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>\n * Copyright (c) 2014 David Bj\u00F6rklund\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\n  if (!headers) {\n    return result;\n  }\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\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};\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});\n\nfunction forEachArray(array, iterator) {\n  for (var i = 0; i < array.length; i++) {\n    iterator(array[i]);\n  }\n}\n\nfunction isEmpty(obj) {\n  for (var i in obj) {\n    if (obj.hasOwnProperty(i)) return false;\n  }\n\n  return true;\n}\n\nfunction initParams(uri, options, callback) {\n  var params = uri;\n\n  if (isFunction(options)) {\n    callback = options;\n\n    if (typeof uri === \"string\") {\n      params = {\n        uri: uri\n      };\n    }\n  } else {\n    params = _extends({}, options, {\n      uri: uri\n    });\n  }\n\n  params.callback = callback;\n  return params;\n}\n\nfunction createXHR(uri, options, callback) {\n  options = initParams(uri, options, callback);\n  return _createXHR(options);\n}\n\nfunction _createXHR(options) {\n  if (typeof options.callback === \"undefined\") {\n    throw new Error(\"callback argument missing\");\n  } // call all registered request interceptors for a given request type:\n\n\n  if (options.requestType && createXHR.requestInterceptorsStorage.getIsEnabled()) {\n    var requestInterceptorPayload = {\n      uri: options.uri || options.url,\n      headers: options.headers || {},\n      body: options.body,\n      metadata: options.metadata || {},\n      retry: options.retry,\n      timeout: options.timeout\n    };\n    var updatedPayload = createXHR.requestInterceptorsStorage.execute(options.requestType, requestInterceptorPayload);\n    options.uri = updatedPayload.uri;\n    options.headers = updatedPayload.headers;\n    options.body = updatedPayload.body;\n    options.metadata = updatedPayload.metadata;\n    options.retry = updatedPayload.retry;\n    options.timeout = updatedPayload.timeout;\n  }\n\n  var called = false;\n\n  var callback = function cbOnce(err, response, body) {\n    if (!called) {\n      called = true;\n      options.callback(err, response, body);\n    }\n  };\n\n  function readystatechange() {\n    // do not call load 2 times when response interceptors are enabled\n    // why do we even need this 2nd load?\n    if (xhr.readyState === 4 && !createXHR.responseInterceptorsStorage.getIsEnabled()) {\n      setTimeout(loadFunc, 0);\n    }\n  }\n\n  function getBody() {\n    // Chrome with requestType=blob throws errors arround when even testing access to responseText\n    var body = undefined;\n\n    if (xhr.response) {\n      body = xhr.response;\n    } else {\n      body = xhr.responseText || getXml(xhr);\n    }\n\n    if (isJson) {\n      try {\n        body = JSON.parse(body);\n      } catch (e) {}\n    }\n\n    return body;\n  }\n\n  function errorFunc(evt) {\n    clearTimeout(timeoutTimer);\n    clearTimeout(options.retryTimeout);\n\n    if (!(evt instanceof Error)) {\n      evt = new Error(\"\" + (evt || \"Unknown XMLHttpRequest Error\"));\n    }\n\n    evt.statusCode = 0; // we would like to retry on error:\n\n    if (!aborted && createXHR.retryManager.getIsEnabled() && options.retry && options.retry.shouldRetry()) {\n      options.retryTimeout = setTimeout(function () {\n        options.retry.moveToNextAttempt(); // we want to re-use the same options and the same xhr object:\n\n        options.xhr = xhr;\n\n        _createXHR(options);\n      }, options.retry.getCurrentFuzzedDelay());\n      return;\n    } // call all registered response interceptors for a given request type:\n\n\n    if (options.requestType && createXHR.responseInterceptorsStorage.getIsEnabled()) {\n      var responseInterceptorPayload = {\n        headers: failureResponse.headers || {},\n        body: failureResponse.body,\n        responseUrl: xhr.responseURL,\n        responseType: xhr.responseType\n      };\n\n      var _updatedPayload = createXHR.responseInterceptorsStorage.execute(options.requestType, responseInterceptorPayload);\n\n      failureResponse.body = _updatedPayload.body;\n      failureResponse.headers = _updatedPayload.headers;\n    }\n\n    return callback(evt, failureResponse);\n  } // will load the data & process the response in a special response object\n\n\n  function loadFunc() {\n    if (aborted) return;\n    var status;\n    clearTimeout(timeoutTimer);\n    clearTimeout(options.retryTimeout);\n\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\n    var response = failureResponse;\n    var err = null;\n\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\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    } // call all registered response interceptors for a given request type:\n\n\n    if (options.requestType && createXHR.responseInterceptorsStorage.getIsEnabled()) {\n      var responseInterceptorPayload = {\n        headers: response.headers || {},\n        body: response.body,\n        responseUrl: xhr.responseURL,\n        responseType: xhr.responseType\n      };\n\n      var _updatedPayload2 = createXHR.responseInterceptorsStorage.execute(options.requestType, responseInterceptorPayload);\n\n      response.body = _updatedPayload2.body;\n      response.headers = _updatedPayload2.headers;\n    }\n\n    return callback(err, response, response.body);\n  }\n\n  var xhr = options.xhr || null;\n\n  if (!xhr) {\n    if (options.cors || options.useXDR) {\n      xhr = new createXHR.XDomainRequest();\n    } else {\n      xhr = new createXHR.XMLHttpRequest();\n    }\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\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\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\n  xhr.onabort = function () {\n    aborted = true;\n    clearTimeout(options.retryTimeout);\n  };\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\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\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\n  if (\"responseType\" in options) {\n    xhr.responseType = options.responseType;\n  }\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\n  xhr.send(body || null);\n  return xhr;\n}\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\n    var firefoxBugTakenEffect = xhr.responseXML && xhr.responseXML.documentElement.nodeName === \"parsererror\";\n\n    if (xhr.responseType === \"\" && !firefoxBugTakenEffect) {\n      return xhr.responseXML;\n    }\n  } catch (e) {}\n\n  return null;\n}\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/* -*- 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');\n\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\n  function computeSeconds(h, m, s, f) {\n    return (h | 0) * 3600 + (m | 0) * 60 + (s | 0) + (f | 0) / 1000;\n  }\n\n  var m = input.match(/^(\\d+):(\\d{1,2})(:\\d{1,2})?\\.(\\d{3})/);\n  if (!m) {\n    return null;\n  }\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}\n\nSettings.prototype = {\n  // Only accept the first assignment to any key.\n  set: function(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(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(k) {\n    return k in this.values;\n  },\n  // Accept a setting if its one of the given alternatives.\n  alt: function(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(k, v) {\n    if (/^-?\\d+$/.test(v)) { // integer\n      this.set(k, parseInt(v, 10));\n    }\n  },\n  // Accept a setting if its a valid percentage.\n  percent: function(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}\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,\n                            \"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\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\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\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) !== \"-->\") {     // (3) next characters must match \"-->\"\n    throw new ParsingError(ParsingError.Errors.BadTimeStamp,\n                           \"Malformed time stamp (time stamps must be separated by '-->'): \" +\n                           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\");\n\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};\n\nvar TAG_ANNOTATION = {\n  v: \"title\",\n  lang: \"lang\"\n};\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\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\n  function unescape(s) {\n    TEXTAREA_ELEMENT.innerHTML = s;\n    s = TEXTAREA_ELEMENT.textContent;\n    TEXTAREA_ELEMENT.textContent = \"\";\n    return s;\n  }\n\n  function shouldAdd(current, element) {\n    return !NEEDS_PARENT[element.localName] ||\n           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\n  var rootDiv = window.document.createElement(\"div\"),\n      current = rootDiv,\n      t,\n      tagStack = [];\n\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 &&\n            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\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\n          if (DEFAULT_COLOR_CLASS.hasOwnProperty(colorName)) {\n            var propName = bgColor ? 'background-color' : 'color';\n            var propValue = DEFAULT_COLOR_CLASS[colorName];\n\n            node.style[propName] = propValue;\n          }\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\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],\n [0x5d0, 0x5ea], [0x5f0, 0x5f4], [0x608, 0x608], [0x60b, 0x60b], [0x60d, 0x60d],\n [0x61b, 0x61b], [0x61e, 0x64a], [0x66d, 0x66f], [0x671, 0x6d5], [0x6e5, 0x6e6],\n [0x6ee, 0x6ef], [0x6fa, 0x70d], [0x70f, 0x710], [0x712, 0x72f], [0x74d, 0x7a5],\n [0x7b1, 0x7b1], [0x7c0, 0x7ea], [0x7f4, 0x7f5], [0x7fa, 0x7fa], [0x800, 0x815],\n [0x81a, 0x81a], [0x824, 0x824], [0x828, 0x828], [0x830, 0x83e], [0x840, 0x858],\n [0x85e, 0x85e], [0x8a0, 0x8a0], [0x8a2, 0x8ac], [0x200f, 0x200f],\n [0xfb1d, 0xfb1d], [0xfb1f, 0xfb28], [0xfb2a, 0xfb36], [0xfb38, 0xfb3c],\n [0xfb3e, 0xfb3e], [0xfb40, 0xfb41], [0xfb43, 0xfb44], [0xfb46, 0xfbc1],\n [0xfbd3, 0xfd3d], [0xfd50, 0xfd8f], [0xfd92, 0xfdc7], [0xfdf0, 0xfdfc],\n [0xfe70, 0xfe74], [0xfe76, 0xfefc], [0x10800, 0x10805], [0x10808, 0x10808],\n [0x1080a, 0x10835], [0x10837, 0x10838], [0x1083c, 0x1083c], [0x1083f, 0x10855],\n [0x10857, 0x1085f], [0x10900, 0x1091b], [0x10920, 0x10939], [0x1093f, 0x1093f],\n [0x10980, 0x109b7], [0x109be, 0x109bf], [0x10a00, 0x10a00], [0x10a10, 0x10a13],\n [0x10a15, 0x10a17], [0x10a19, 0x10a33], [0x10a40, 0x10a47], [0x10a50, 0x10a58],\n [0x10a60, 0x10a7f], [0x10b00, 0x10b35], [0x10b40, 0x10b55], [0x10b58, 0x10b72],\n [0x10b78, 0x10b7f], [0x10c00, 0x10c48], [0x1ee00, 0x1ee03], [0x1ee05, 0x1ee1f],\n [0x1ee21, 0x1ee22], [0x1ee24, 0x1ee24], [0x1ee27, 0x1ee27], [0x1ee29, 0x1ee32],\n [0x1ee34, 0x1ee37], [0x1ee39, 0x1ee39], [0x1ee3b, 0x1ee3b], [0x1ee42, 0x1ee42],\n [0x1ee47, 0x1ee47], [0x1ee49, 0x1ee49], [0x1ee4b, 0x1ee4b], [0x1ee4d, 0x1ee4f],\n [0x1ee51, 0x1ee52], [0x1ee54, 0x1ee54], [0x1ee57, 0x1ee57], [0x1ee59, 0x1ee59],\n [0x1ee5b, 0x1ee5b], [0x1ee5d, 0x1ee5d], [0x1ee5f, 0x1ee5f], [0x1ee61, 0x1ee62],\n [0x1ee64, 0x1ee64], [0x1ee67, 0x1ee6a], [0x1ee6c, 0x1ee72], [0x1ee74, 0x1ee77],\n [0x1ee79, 0x1ee7c], [0x1ee7e, 0x1ee7e], [0x1ee80, 0x1ee89], [0x1ee8b, 0x1ee9b],\n [0x1eea1, 0x1eea3], [0x1eea5, 0x1eea9], [0x1eeab, 0x1eebb], [0x10fffd, 0x10fffd]];\n\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\n  return false;\n}\n\nfunction determineBidi(cueDiv) {\n  var nodeStack = [],\n      text = \"\",\n      charCode;\n\n  if (!cueDiv || !cueDiv.childNodes) {\n    return \"ltr\";\n  }\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\n  function nextTextNode(nodeStack) {\n    if (!nodeStack || !nodeStack.length) {\n      return null;\n    }\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\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}\n\nfunction computeLinePos(cue) {\n  if (typeof cue.line === \"number\" &&\n      (cue.snapToLines || (cue.line >= 0 && cue.line <= 100))) {\n    return cue.line;\n  }\n  if (!cue.track || !cue.track.textTrackList ||\n      !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}\n\nfunction StyleBox() {\n}\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};\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\"\n                                     : cue.vertical === \"lr\" ? \"vertical-lr\"\n                                                             : \"vertical-rl\",\n    unicodeBidi: \"plaintext\"\n  };\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\"\n                                     : cue.vertical === \"lr\" ? \"vertical-lr\"\n                                                             : \"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\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\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\n    var rects = (rects = obj.div.childNodes) && (rects = rects[0]) &&\n                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)\n               : 0;\n\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 &&\n         this.right > b2.left &&\n         this.top < b2.bottom &&\n         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 &&\n         this.bottom <= container.bottom &&\n         this.left >= container.left &&\n         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\n  obj = obj.div ? obj.div.getBoundingClientRect() :\n                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\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]) ||\n             (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\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\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\n  } else {\n    // If we have a percentage line value for the cue.\n    var calculatedPercentage = (boxPosition.lineHeight / containerBox.height) * 100;\n\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\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\n  var bestPosition = findBestPosition(boxPosition, axis);\n  styleBox.move(bestPosition.toCSSCompatValues(containerBox));\n}\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(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};\n\nWebVTT.convertCueToDOMTree = function(window, cuetext) {\n  if (!window || !cuetext) {\n    return null;\n  }\n  return parseContent(window, cuetext);\n};\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\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\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\n  (function() {\n    var styleBox, cue;\n\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\n      boxPositions.push(BoxPosition.getSimpleBoxPosition(styleBox));\n    }\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\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};\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(e) {\n    if (e instanceof ParsingError) {\n      this.onparsingerror && this.onparsingerror(e);\n    } else {\n      throw e;\n    }\n  },\n  parse: function (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, {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\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\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\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\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\n        line = collectNextLine();\n\n        var m = line.match(/^WEBVTT([ \\t].*)?$/);\n        if (!m || !m[0]) {\n          throw new ParsingError(ParsingError.Errors.BadSignature);\n        }\n\n        self.state = \"HEADER\";\n      }\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\n        if (!alreadyCollectedLine) {\n          line = collectNextLine();\n        } else {\n          alreadyCollectedLine = false;\n        }\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\": // 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 () {\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};\n\nmodule.exports = WebVTT;\n", "/**\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};\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}\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}\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\n  Object.defineProperties(this, {\n    \"id\": {\n      enumerable: true,\n      get: function() {\n        return _id;\n      },\n      set: function(value) {\n        _id = \"\" + value;\n      }\n    },\n\n    \"pauseOnExit\": {\n      enumerable: true,\n      get: function() {\n        return _pauseOnExit;\n      },\n      set: function(value) {\n        _pauseOnExit = !!value;\n      }\n    },\n\n    \"startTime\": {\n      enumerable: true,\n      get: function() {\n        return _startTime;\n      },\n      set: function(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\n    \"endTime\": {\n      enumerable: true,\n      get: function() {\n        return _endTime;\n      },\n      set: function(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\n    \"text\": {\n      enumerable: true,\n      get: function() {\n        return _text;\n      },\n      set: function(value) {\n        _text = \"\" + value;\n        this.hasBeenReset = true;\n      }\n    },\n\n    \"region\": {\n      enumerable: true,\n      get: function() {\n        return _region;\n      },\n      set: function(value) {\n        _region = value;\n        this.hasBeenReset = true;\n      }\n    },\n\n    \"vertical\": {\n      enumerable: true,\n      get: function() {\n        return _vertical;\n      },\n      set: function(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\n    \"snapToLines\": {\n      enumerable: true,\n      get: function() {\n        return _snapToLines;\n      },\n      set: function(value) {\n        _snapToLines = !!value;\n        this.hasBeenReset = true;\n      }\n    },\n\n    \"line\": {\n      enumerable: true,\n      get: function() {\n        return _line;\n      },\n      set: function(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\n    \"lineAlign\": {\n      enumerable: true,\n      get: function() {\n        return _lineAlign;\n      },\n      set: function(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\n    \"position\": {\n      enumerable: true,\n      get: function() {\n        return _position;\n      },\n      set: function(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\n    \"positionAlign\": {\n      enumerable: true,\n      get: function() {\n        return _positionAlign;\n      },\n      set: function(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\n    \"size\": {\n      enumerable: true,\n      get: function() {\n        return _size;\n      },\n      set: function(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\n    \"align\": {\n      enumerable: true,\n      get: function() {\n        return _align;\n      },\n      set: function(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};\n\nmodule.exports = VTTCue;\n", "/**\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};\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}\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\n  Object.defineProperties(this, {\n    \"width\": {\n      enumerable: true,\n      get: function() {\n        return _width;\n      },\n      set: function(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() {\n        return _lines;\n      },\n      set: function(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() {\n        return _regionAnchorY;\n      },\n      set: function(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() {\n        return _regionAnchorX;\n      },\n      set: function(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() {\n        return _viewportAnchorY;\n      },\n      set: function(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() {\n        return _viewportAnchorX;\n      },\n      set: function(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() {\n        return _scroll;\n      },\n      set: function(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}\n\nmodule.exports = VTTRegion;\n", "/**\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');\n\nvar vttjs = module.exports = {\n  WebVTT: require(\"./vtt.js\"),\n  VTTCue: require(\"./vttcue.js\"),\n  VTTRegion: require(\"./vttregion.js\")\n};\n\nwindow.vttjs = vttjs;\nwindow.WebVTT = vttjs.WebVTT;\n\nvar cueShim = vttjs.VTTCue;\nvar regionShim = vttjs.VTTRegion;\nvar nativeVTTCue = window.VTTCue;\nvar nativeVTTRegion = window.VTTRegion;\n\nvttjs.shim = function() {\n  window.VTTCue = cueShim;\n  window.VTTRegion = regionShim;\n};\n\nvttjs.restore = function() {\n  window.VTTCue = nativeVTTCue;\n  window.VTTRegion = nativeVTTRegion;\n};\n\nif (!window.VTTCue) {\n  vttjs.shim();\n}\n", "// see https://tools.ietf.org/html/rfc1808\n\n(function (root) {\n  var URL_REGEX =\n    /^(?=((?:[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\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 (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(\n          basePartsForNormalise.path\n        );\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 <net_loc> is non-empty, we skip to\n        // Step 7.  Otherwise, the embedded URL inherits the <net_loc>\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 <params> is non-empty, we skip to\n            // step 7; otherwise, it inherits the <params> of the base\n            // URL (if any) and\n            if (!relativeParts.params) {\n              builtParts.params = baseParts.params;\n              // 5b) if the embedded URL's <query> is non-empty, we skip to\n              // step 7; otherwise, it inherits the <query> 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 =\n              baseURLPath.substring(0, baseURLPath.lastIndexOf('/') + 1) +\n              relativeParts.path;\n            builtParts.path = URLToolkit.normalizePath(newPath);\n          }\n        }\n      }\n      if (builtParts.path === null) {\n        builtParts.path = opts.alwaysNormalize\n          ? URLToolkit.normalizePath(relativeParts.path)\n          : relativeParts.path;\n      }\n      return URLToolkit.buildURLFromParts(builtParts);\n    },\n    parseURL: function (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 (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 \"<segment>/../\", where <segment> 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 \"<segment>/..\", where <segment> is a\n      // complete path segment not equal to \"..\", that\n      // \"<segment>/..\" is removed.\n      while (\n        path.length !== (path = path.replace(SLASH_DOT_DOT_REGEX, '')).length\n      ) {}\n      return path.split('').reverse().join('');\n    },\n    buildURLFromParts: function (parts) {\n      return (\n        parts.scheme +\n        parts.netLoc +\n        parts.path +\n        parts.params +\n        parts.query +\n        parts.fragment\n      );\n    },\n  };\n\n  if (typeof exports === 'object' && typeof module === 'object')\n    module.exports = URLToolkit;\n  else if (typeof define === 'function' && define.amd)\n    define([], function () {\n      return URLToolkit;\n    });\n  else if (typeof exports === 'object') exports['URLToolkit'] = URLToolkit;\n  else root['URLToolkit'] = URLToolkit;\n})(this);\n", "'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<T> | ({length:number, [number]: T})} list\n * @param {function (item: T, index: number, list:Array<T> | ({length:number, [number]: T})):boolean} predicate\n * @param {Partial<Pick<ArrayConstructor['prototype'], 'find'>>?} 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 find(list, predicate, ac) {\n\tif (ac === undefined) {\n\t\tac = Array.prototype;\n\t}\n\tif (list && typeof ac.find === 'function') {\n\t\treturn ac.find.call(list, predicate);\n\t}\n\tfor (var i = 0; i < list.length; i++) {\n\t\tif (Object.prototype.hasOwnProperty.call(list, i)) {\n\t\t\tvar item = list[i];\n\t\t\tif (predicate.call(undefined, item, i, list)) {\n\t\t\t\treturn item;\n\t\t\t}\n\t\t}\n\t}\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<ObjectConstructor, 'freeze'> = Object} oc `Object` by default,\n * \t\t\t\tallows to inject custom object constructor for tests\n * @returns {Readonly<T>}\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze\n */\nfunction freeze(object, oc) {\n\tif (oc === undefined) {\n\t\toc = Object\n\t}\n\treturn 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\tif (target === null || typeof target !== 'object') {\n\t\tthrow new TypeError('target is not an object')\n\t}\n\tfor (var key in source) {\n\t\tif (Object.prototype.hasOwnProperty.call(source, key)) {\n\t\t\ttarget[key] = source[key]\n\t\t}\n\t}\n\treturn 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\t/**\n\t * `text/html`, the only mime type that triggers treating an XML document as HTML.\n\t *\n\t * @see DOMParser.SupportedType.isHTML\n\t * @see https://www.iana.org/assignments/media-types/text/html IANA MimeType registration\n\t * @see https://en.wikipedia.org/wiki/HTML Wikipedia\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString MDN\n\t * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring WHATWG HTML Spec\n\t */\n\tHTML: 'text/html',\n\n\t/**\n\t * Helper method to check a mime type if it indicates an HTML document\n\t *\n\t * @param {string} [value]\n\t * @returns {boolean}\n\t *\n\t * @see https://www.iana.org/assignments/media-types/text/html IANA MimeType registration\n\t * @see https://en.wikipedia.org/wiki/HTML Wikipedia\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString MDN\n\t * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring \t */\n\tisHTML: function (value) {\n\t\treturn value === MIME_TYPE.HTML\n\t},\n\n\t/**\n\t * `application/xml`, the standard mime type for XML documents.\n\t *\n\t * @see https://www.iana.org/assignments/media-types/application/xml IANA MimeType registration\n\t * @see https://tools.ietf.org/html/rfc7303#section-9.1 RFC 7303\n\t * @see https://en.wikipedia.org/wiki/XML_and_MIME Wikipedia\n\t */\n\tXML_APPLICATION: 'application/xml',\n\n\t/**\n\t * `text/html`, an alias for `application/xml`.\n\t *\n\t * @see https://tools.ietf.org/html/rfc7303#section-9.2 RFC 7303\n\t * @see https://www.iana.org/assignments/media-types/text/xml IANA MimeType registration\n\t * @see https://en.wikipedia.org/wiki/XML_and_MIME Wikipedia\n\t */\n\tXML_TEXT: 'text/xml',\n\n\t/**\n\t * `application/xhtml+xml`, indicates an XML document that has the default HTML namespace,\n\t * but is parsed as an XML document.\n\t *\n\t * @see https://www.iana.org/assignments/media-types/application/xhtml+xml IANA MimeType registration\n\t * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument WHATWG DOM Spec\n\t * @see https://en.wikipedia.org/wiki/XHTML Wikipedia\n\t */\n\tXML_XHTML_APPLICATION: 'application/xhtml+xml',\n\n\t/**\n\t * `image/svg+xml`,\n\t *\n\t * @see https://www.iana.org/assignments/media-types/image/svg+xml IANA MimeType registration\n\t * @see https://www.w3.org/TR/SVG11/ W3C SVG 1.1\n\t * @see https://en.wikipedia.org/wiki/Scalable_Vector_Graphics Wikipedia\n\t */\n\tXML_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\t/**\n\t * The XHTML namespace.\n\t *\n\t * @see http://www.w3.org/1999/xhtml\n\t */\n\tHTML: 'http://www.w3.org/1999/xhtml',\n\n\t/**\n\t * Checks if `uri` equals `NAMESPACE.HTML`.\n\t *\n\t * @param {string} [uri]\n\t *\n\t * @see NAMESPACE.HTML\n\t */\n\tisHTML: function (uri) {\n\t\treturn uri === NAMESPACE.HTML\n\t},\n\n\t/**\n\t * The SVG namespace.\n\t *\n\t * @see http://www.w3.org/2000/svg\n\t */\n\tSVG: 'http://www.w3.org/2000/svg',\n\n\t/**\n\t * The `xml:` namespace.\n\t *\n\t * @see http://www.w3.org/XML/1998/namespace\n\t */\n\tXML: 'http://www.w3.org/XML/1998/namespace',\n\n\t/**\n\t * The `xmlns:` namespace\n\t *\n\t * @see https://www.w3.org/2000/xmlns/\n\t */\n\tXMLNS: 'http://www.w3.org/2000/xmlns/',\n})\n\nexports.assign = assign;\nexports.find = find;\nexports.freeze = freeze;\nexports.MIME_TYPE = MIME_TYPE;\nexports.NAMESPACE = NAMESPACE;\n", "var conventions = require(\"./conventions\");\n\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\treturn 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\t// U+0009 TAB, U+000A LF, U+000C FF, U+000D CR, U+0020 SPACE\n\treturn 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\tif (!current.hasOwnProperty(element)) {\n\t\tcurrent[element] = true;\n\t}\n\treturn 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\tif (!input) return [];\n\tvar list = splitOnASCIIWhitespace(input);\n\treturn 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\treturn function(element) {\n\t\treturn list && list.indexOf(element) !== -1;\n\t}\n}\n\nfunction copy(src,dest){\n\tfor(var p in src){\n\t\tif (Object.prototype.hasOwnProperty.call(src, p)) {\n\t\t\tdest[p] = src[p];\n\t\t}\n\t}\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\tvar pt = Class.prototype;\n\tif(!(pt instanceof Super)){\n\t\tfunction t(){};\n\t\tt.prototype = Super.prototype;\n\t\tt = new t();\n\t\tcopy(pt,t);\n\t\tClass.prototype = pt = t;\n\t}\n\tif(pt.constructor != Class){\n\t\tif(typeof Class != 'function'){\n\t\t\tconsole.error(\"unknown Class:\"+Class)\n\t\t}\n\t\tpt.constructor = Class\n\t}\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        \t= ExceptionCode.INVALID_STATE_ERR        \t= ((ExceptionMessage[11]=\"Invalid state\"),11);\nvar SYNTAX_ERR               \t= ExceptionCode.SYNTAX_ERR               \t= ((ExceptionMessage[12]=\"Syntax error\"),12);\nvar INVALID_MODIFICATION_ERR \t= ExceptionCode.INVALID_MODIFICATION_ERR \t= ((ExceptionMessage[13]=\"Invalid modification\"),13);\nvar NAMESPACE_ERR            \t= ExceptionCode.NAMESPACE_ERR           \t= ((ExceptionMessage[14]=\"Invalid namespace\"),14);\nvar INVALID_ACCESS_ERR       \t= ExceptionCode.INVALID_ACCESS_ERR      \t= ((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\tif(message instanceof Error){\n\t\tvar error = message;\n\t}else{\n\t\terror = this;\n\t\tError.call(this, ExceptionMessage[code]);\n\t\tthis.message = ExceptionMessage[code];\n\t\tif(Error.captureStackTrace) Error.captureStackTrace(this, DOMException);\n\t}\n\terror.code = code;\n\tif(message) this.message = this.message + \": \" + message;\n\treturn error;\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\t/**\n\t * The number of nodes in the list. The range of valid child node indices is 0 to length-1 inclusive.\n\t * @standard level1\n\t */\n\tlength:0,\n\t/**\n\t * 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\t * @standard level1\n\t * @param index  unsigned long\n\t *   Index into the collection.\n\t * @return Node\n\t * \tThe node at the indexth position in the NodeList, or null if that is not a valid index.\n\t */\n\titem: function(index) {\n\t\treturn index >= 0 && index < this.length ? this[index] : null;\n\t},\n\ttoString:function(isHTML,nodeFilter){\n\t\tfor(var buf = [], i = 0;i<this.length;i++){\n\t\t\tserializeToString(this[i],buf,isHTML,nodeFilter);\n\t\t}\n\t\treturn buf.join('');\n\t},\n\t/**\n\t * @private\n\t * @param {function (Node):boolean} predicate\n\t * @returns {Node[]}\n\t */\n\tfilter: function (predicate) {\n\t\treturn Array.prototype.filter.call(this, predicate);\n\t},\n\t/**\n\t * @private\n\t * @param {Node} item\n\t * @returns {number}\n\t */\n\tindexOf: function (item) {\n\t\treturn Array.prototype.indexOf.call(this, item);\n\t},\n};\n\nfunction LiveNodeList(node,refresh){\n\tthis._node = node;\n\tthis._refresh = refresh\n\t_updateLiveList(this);\n}\nfunction _updateLiveList(list){\n\tvar inc = list._node._inc || list._node.ownerDocument._inc;\n\tif (list._inc !== inc) {\n\t\tvar ls = list._refresh(list._node);\n\t\t__set__(list,'length',ls.length);\n\t\tif (!list.$$length || ls.length < list.$$length) {\n\t\t\tfor (var i = ls.length; i in list; i++) {\n\t\t\t\tif (Object.prototype.hasOwnProperty.call(list, i)) {\n\t\t\t\t\tdelete list[i];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcopy(ls,list);\n\t\tlist._inc = inc;\n\t}\n}\nLiveNodeList.prototype.item = function(i){\n\t_updateLiveList(this);\n\treturn this[i] || null;\n}\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};\n\nfunction _findNodeIndex(list,node){\n\tvar i = list.length;\n\twhile(i--){\n\t\tif(list[i] === node){return i}\n\t}\n}\n\nfunction _addNamedNode(el,list,newAttr,oldAttr){\n\tif(oldAttr){\n\t\tlist[_findNodeIndex(list,oldAttr)] = newAttr;\n\t}else{\n\t\tlist[list.length++] = newAttr;\n\t}\n\tif(el){\n\t\tnewAttr.ownerElement = el;\n\t\tvar doc = el.ownerDocument;\n\t\tif(doc){\n\t\t\toldAttr && _onRemoveAttribute(doc,el,oldAttr);\n\t\t\t_onAddAttribute(doc,el,newAttr);\n\t\t}\n\t}\n}\nfunction _removeNamedNode(el,list,attr){\n\t//console.log('remove attr:'+attr)\n\tvar i = _findNodeIndex(list,attr);\n\tif(i>=0){\n\t\tvar lastIndex = list.length-1\n\t\twhile(i<lastIndex){\n\t\t\tlist[i] = list[++i]\n\t\t}\n\t\tlist.length = lastIndex;\n\t\tif(el){\n\t\t\tvar doc = el.ownerDocument;\n\t\t\tif(doc){\n\t\t\t\t_onRemoveAttribute(doc,el,attr);\n\t\t\t\tattr.ownerElement = null;\n\t\t\t}\n\t\t}\n\t}else{\n\t\tthrow new DOMException(NOT_FOUND_ERR,new Error(el.tagName+'@'+attr))\n\t}\n}\nNamedNodeMap.prototype = {\n\tlength:0,\n\titem:NodeList.prototype.item,\n\tgetNamedItem: function(key) {\n//\t\tif(key.indexOf(':')>0 || key == 'xmlns'){\n//\t\t\treturn null;\n//\t\t}\n\t\t//console.log()\n\t\tvar i = this.length;\n\t\twhile(i--){\n\t\t\tvar attr = this[i];\n\t\t\t//console.log(attr.nodeName,key)\n\t\t\tif(attr.nodeName == key){\n\t\t\t\treturn attr;\n\t\t\t}\n\t\t}\n\t},\n\tsetNamedItem: function(attr) {\n\t\tvar el = attr.ownerElement;\n\t\tif(el && el!=this._ownerElement){\n\t\t\tthrow new DOMException(INUSE_ATTRIBUTE_ERR);\n\t\t}\n\t\tvar oldAttr = this.getNamedItem(attr.nodeName);\n\t\t_addNamedNode(this._ownerElement,this,attr,oldAttr);\n\t\treturn oldAttr;\n\t},\n\t/* returns Node */\n\tsetNamedItemNS: function(attr) {// raises: WRONG_DOCUMENT_ERR,NO_MODIFICATION_ALLOWED_ERR,INUSE_ATTRIBUTE_ERR\n\t\tvar el = attr.ownerElement, oldAttr;\n\t\tif(el && el!=this._ownerElement){\n\t\t\tthrow new DOMException(INUSE_ATTRIBUTE_ERR);\n\t\t}\n\t\toldAttr = this.getNamedItemNS(attr.namespaceURI,attr.localName);\n\t\t_addNamedNode(this._ownerElement,this,attr,oldAttr);\n\t\treturn oldAttr;\n\t},\n\n\t/* returns Node */\n\tremoveNamedItem: function(key) {\n\t\tvar attr = this.getNamedItem(key);\n\t\t_removeNamedNode(this._ownerElement,this,attr);\n\t\treturn attr;\n\n\n\t},// raises: NOT_FOUND_ERR,NO_MODIFICATION_ALLOWED_ERR\n\n\t//for level2\n\tremoveNamedItemNS:function(namespaceURI,localName){\n\t\tvar attr = this.getNamedItemNS(namespaceURI,localName);\n\t\t_removeNamedNode(this._ownerElement,this,attr);\n\t\treturn attr;\n\t},\n\tgetNamedItemNS: function(namespaceURI, localName) {\n\t\tvar i = this.length;\n\t\twhile(i--){\n\t\t\tvar node = this[i];\n\t\t\tif(node.localName == localName && node.namespaceURI == namespaceURI){\n\t\t\t\treturn node;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\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() {\n}\n\nDOMImplementation.prototype = {\n\t/**\n\t * The DOMImplementation.hasFeature() method returns a Boolean flag indicating if a given feature is supported.\n\t * The different implementations fairly diverged in what kind of features were reported.\n\t * The latest version of the spec settled to force this method to always return true, where the functionality was accurate and in use.\n\t *\n\t * @deprecated It is deprecated and modern browsers return true in all cases.\n\t *\n\t * @param {string} feature\n\t * @param {string} [version]\n\t * @returns {boolean} always true\n\t *\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/hasFeature MDN\n\t * @see https://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-5CED94D7 DOM Level 1 Core\n\t * @see https://dom.spec.whatwg.org/#dom-domimplementation-hasfeature DOM Living Standard\n\t */\n\thasFeature: function(feature, version) {\n\t\t\treturn true;\n\t},\n\t/**\n\t * Creates an XML Document object of the specified type with its document element.\n\t *\n\t * __It behaves slightly different from the description in the living standard__:\n\t * - There is no interface/class `XMLDocument`, it returns a `Document` instance.\n\t * - `contentType`, `encoding`, `mode`, `origin`, `url` fields are currently not declared.\n\t * - this implementation is not validating names or qualified names\n\t *   (when parsing XML strings, the SAX parser takes care of that)\n\t *\n\t * @param {string|null} namespaceURI\n\t * @param {string} qualifiedName\n\t * @param {DocumentType=null} doctype\n\t * @returns {Document}\n\t *\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocument MDN\n\t * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createDocument DOM Level 2 Core (initial)\n\t * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument  DOM Level 2 Core\n\t *\n\t * @see https://dom.spec.whatwg.org/#validate-and-extract DOM: Validate and extract\n\t * @see https://www.w3.org/TR/xml/#NT-NameStartChar XML Spec: Names\n\t * @see https://www.w3.org/TR/xml-names/#ns-qualnames XML Namespaces: Qualified names\n\t */\n\tcreateDocument: function(namespaceURI,  qualifiedName, doctype){\n\t\tvar doc = new Document();\n\t\tdoc.implementation = this;\n\t\tdoc.childNodes = new NodeList();\n\t\tdoc.doctype = doctype || null;\n\t\tif (doctype){\n\t\t\tdoc.appendChild(doctype);\n\t\t}\n\t\tif (qualifiedName){\n\t\t\tvar root = doc.createElementNS(namespaceURI, qualifiedName);\n\t\t\tdoc.appendChild(root);\n\t\t}\n\t\treturn doc;\n\t},\n\t/**\n\t * Returns a doctype, with the given `qualifiedName`, `publicId`, and `systemId`.\n\t *\n\t * __This behavior is slightly different from the in the specs__:\n\t * - this implementation is not validating names or qualified names\n\t *   (when parsing XML strings, the SAX parser takes care of that)\n\t *\n\t * @param {string} qualifiedName\n\t * @param {string} [publicId]\n\t * @param {string} [systemId]\n\t * @returns {DocumentType} which can either be used with `DOMImplementation.createDocument` upon document creation\n\t * \t\t\t\t  or can be put into the document via methods like `Node.insertBefore()` or `Node.replaceChild()`\n\t *\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocumentType MDN\n\t * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createDocType DOM Level 2 Core\n\t * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocumenttype DOM Living Standard\n\t *\n\t * @see https://dom.spec.whatwg.org/#validate-and-extract DOM: Validate and extract\n\t * @see https://www.w3.org/TR/xml/#NT-NameStartChar XML Spec: Names\n\t * @see https://www.w3.org/TR/xml-names/#ns-qualnames XML Namespaces: Qualified names\n\t */\n\tcreateDocumentType: function(qualifiedName, publicId, systemId){\n\t\tvar node = new DocumentType();\n\t\tnode.name = qualifiedName;\n\t\tnode.nodeName = qualifiedName;\n\t\tnode.publicId = publicId || '';\n\t\tnode.systemId = systemId || '';\n\n\t\treturn node;\n\t}\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};\n\nNode.prototype = {\n\tfirstChild : null,\n\tlastChild : null,\n\tpreviousSibling : null,\n\tnextSibling : null,\n\tattributes : null,\n\tparentNode : null,\n\tchildNodes : null,\n\townerDocument : null,\n\tnodeValue : null,\n\tnamespaceURI : null,\n\tprefix : null,\n\tlocalName : null,\n\t// Modified in DOM Level 2:\n\tinsertBefore:function(newChild, refChild){//raises\n\t\treturn _insertBefore(this,newChild,refChild);\n\t},\n\treplaceChild:function(newChild, oldChild){//raises\n\t\t_insertBefore(this, newChild,oldChild, assertPreReplacementValidityInDocument);\n\t\tif(oldChild){\n\t\t\tthis.removeChild(oldChild);\n\t\t}\n\t},\n\tremoveChild:function(oldChild){\n\t\treturn _removeChild(this,oldChild);\n\t},\n\tappendChild:function(newChild){\n\t\treturn this.insertBefore(newChild,null);\n\t},\n\thasChildNodes:function(){\n\t\treturn this.firstChild != null;\n\t},\n\tcloneNode:function(deep){\n\t\treturn cloneNode(this.ownerDocument||this,this,deep);\n\t},\n\t// Modified in DOM Level 2:\n\tnormalize:function(){\n\t\tvar child = this.firstChild;\n\t\twhile(child){\n\t\t\tvar next = child.nextSibling;\n\t\t\tif(next && next.nodeType == TEXT_NODE && child.nodeType == TEXT_NODE){\n\t\t\t\tthis.removeChild(next);\n\t\t\t\tchild.appendData(next.data);\n\t\t\t}else{\n\t\t\t\tchild.normalize();\n\t\t\t\tchild = next;\n\t\t\t}\n\t\t}\n\t},\n  \t// Introduced in DOM Level 2:\n\tisSupported:function(feature, version){\n\t\treturn this.ownerDocument.implementation.hasFeature(feature,version);\n\t},\n    // Introduced in DOM Level 2:\n    hasAttributes:function(){\n    \treturn this.attributes.length>0;\n    },\n\t/**\n\t * Look up the prefix associated to the given namespace URI, starting from this node.\n\t * **The default namespace declarations are ignored by this method.**\n\t * See Namespace Prefix Lookup for details on the algorithm used by this method.\n\t *\n\t * _Note: The implementation seems to be incomplete when compared to the algorithm described in the specs._\n\t *\n\t * @param {string | null} namespaceURI\n\t * @returns {string | null}\n\t * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-lookupNamespacePrefix\n\t * @see https://www.w3.org/TR/DOM-Level-3-Core/namespaces-algorithms.html#lookupNamespacePrefixAlgo\n\t * @see https://dom.spec.whatwg.org/#dom-node-lookupprefix\n\t * @see https://github.com/xmldom/xmldom/issues/322\n\t */\n    lookupPrefix:function(namespaceURI){\n    \tvar el = this;\n    \twhile(el){\n    \t\tvar map = el._nsMap;\n    \t\t//console.dir(map)\n    \t\tif(map){\n    \t\t\tfor(var n in map){\n\t\t\t\t\t\tif (Object.prototype.hasOwnProperty.call(map, n) && map[n] === namespaceURI) {\n\t\t\t\t\t\t\treturn n;\n\t\t\t\t\t\t}\n    \t\t\t}\n    \t\t}\n    \t\tel = el.nodeType == ATTRIBUTE_NODE?el.ownerDocument : el.parentNode;\n    \t}\n    \treturn null;\n    },\n    // Introduced in DOM Level 3:\n    lookupNamespaceURI:function(prefix){\n    \tvar el = this;\n    \twhile(el){\n    \t\tvar map = el._nsMap;\n    \t\t//console.dir(map)\n    \t\tif(map){\n    \t\t\tif(Object.prototype.hasOwnProperty.call(map, prefix)){\n    \t\t\t\treturn map[prefix] ;\n    \t\t\t}\n    \t\t}\n    \t\tel = el.nodeType == ATTRIBUTE_NODE?el.ownerDocument : el.parentNode;\n    \t}\n    \treturn null;\n    },\n    // Introduced in DOM Level 3:\n    isDefaultNamespace:function(namespaceURI){\n    \tvar prefix = this.lookupPrefix(namespaceURI);\n    \treturn prefix == null;\n    }\n};\n\n\nfunction _xmlEncoder(c){\n\treturn c == '<' && '&lt;' ||\n         c == '>' && '&gt;' ||\n         c == '&' && '&amp;' ||\n         c == '\"' && '&quot;' ||\n         '&#'+c.charCodeAt()+';'\n}\n\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\tif(callback(node)){\n\t\treturn true;\n\t}\n\tif(node = node.firstChild){\n\t\tdo{\n\t\t\tif(_visitNode(node,callback)){return true}\n        }while(node=node.nextSibling)\n    }\n}\n\n\n\nfunction Document(){\n\tthis.ownerDocument = this;\n}\n\nfunction _onAddAttribute(doc,el,newAttr){\n\tdoc && doc._inc++;\n\tvar ns = newAttr.namespaceURI ;\n\tif(ns === NAMESPACE.XMLNS){\n\t\t//update namespace\n\t\tel._nsMap[newAttr.prefix?newAttr.localName:''] = newAttr.value\n\t}\n}\n\nfunction _onRemoveAttribute(doc,el,newAttr,remove){\n\tdoc && doc._inc++;\n\tvar ns = newAttr.namespaceURI ;\n\tif(ns === NAMESPACE.XMLNS){\n\t\t//update namespace\n\t\tdelete el._nsMap[newAttr.prefix?newAttr.localName:'']\n\t}\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\tif(doc && doc._inc){\n\t\tdoc._inc++;\n\t\t//update childNodes\n\t\tvar cs = el.childNodes;\n\t\tif (newChild) {\n\t\t\tcs[cs.length++] = newChild;\n\t\t} else {\n\t\t\tvar child = el.firstChild;\n\t\t\tvar i = 0;\n\t\t\twhile (child) {\n\t\t\t\tcs[i++] = child;\n\t\t\t\tchild = child.nextSibling;\n\t\t\t}\n\t\t\tcs.length = i;\n\t\t\tdelete cs[cs.length];\n\t\t}\n\t}\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\tvar previous = child.previousSibling;\n\tvar next = child.nextSibling;\n\tif (previous) {\n\t\tprevious.nextSibling = next;\n\t} else {\n\t\tparentNode.firstChild = next;\n\t}\n\tif (next) {\n\t\tnext.previousSibling = previous;\n\t} else {\n\t\tparentNode.lastChild = previous;\n\t}\n\tchild.parentNode = null;\n\tchild.previousSibling = null;\n\tchild.nextSibling = null;\n\t_onUpdateChild(parentNode.ownerDocument, parentNode);\n\treturn 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\treturn (\n\t\tnode &&\n\t\t(node.nodeType === Node.DOCUMENT_NODE || node.nodeType === Node.DOCUMENT_FRAGMENT_NODE || node.nodeType === Node.ELEMENT_NODE)\n\t);\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\treturn (\n\t\tnode &&\n\t\t(isElementNode(node) ||\n\t\t\tisTextNode(node) ||\n\t\t\tisDocTypeNode(node) ||\n\t\t\tnode.nodeType === Node.DOCUMENT_FRAGMENT_NODE ||\n\t\t\tnode.nodeType === Node.COMMENT_NODE ||\n\t\t\tnode.nodeType === Node.PROCESSING_INSTRUCTION_NODE)\n\t);\n}\n\n/**\n * Returns true if `node` is a DOCTYPE node\n * @param {Node} node\n * @returns {boolean}\n */\nfunction isDocTypeNode(node) {\n\treturn 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\treturn 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\treturn 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\tvar parentChildNodes = doc.childNodes || [];\n\tif (find(parentChildNodes, isElementNode) || isDocTypeNode(child)) {\n\t\treturn false;\n\t}\n\tvar docTypeNode = find(parentChildNodes, isDocTypeNode);\n\treturn !(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\tvar parentChildNodes = doc.childNodes || [];\n\n\tfunction hasElementChildThatIsNotChild(node) {\n\t\treturn isElementNode(node) && node !== child;\n\t}\n\n\tif (find(parentChildNodes, hasElementChildThatIsNotChild)) {\n\t\treturn false;\n\t}\n\tvar docTypeNode = find(parentChildNodes, isDocTypeNode);\n\treturn !(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\t// 1. If `parent` is not a Document, DocumentFragment, or Element node, then throw a \"HierarchyRequestError\" DOMException.\n\tif (!hasValidParentNodeType(parent)) {\n\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Unexpected parent node type ' + parent.nodeType);\n\t}\n\t// 2. If `node` is a host-including inclusive ancestor of `parent`, then throw a \"HierarchyRequestError\" DOMException.\n\t// not implemented!\n\t// 3. If `child` is non-null and its parent is not `parent`, then throw a \"NotFoundError\" DOMException.\n\tif (child && child.parentNode !== parent) {\n\t\tthrow new DOMException(NOT_FOUND_ERR, 'child not in parent');\n\t}\n\tif (\n\t\t// 4. If `node` is not a DocumentFragment, DocumentType, Element, or CharacterData node, then throw a \"HierarchyRequestError\" DOMException.\n\t\t!hasInsertableNodeType(node) ||\n\t\t// 5. If either `node` is a Text node and `parent` is a document,\n\t\t// the sax parser currently adds top level text nodes, this will be fixed in 0.9.0\n\t\t// || (node.nodeType === Node.TEXT_NODE && parent.nodeType === Node.DOCUMENT_NODE)\n\t\t// or `node` is a doctype and `parent` is not a document, then throw a \"HierarchyRequestError\" DOMException.\n\t\t(isDocTypeNode(node) && parent.nodeType !== Node.DOCUMENT_NODE)\n\t) {\n\t\tthrow new DOMException(\n\t\t\tHIERARCHY_REQUEST_ERR,\n\t\t\t'Unexpected node type ' + node.nodeType + ' for parent node type ' + parent.nodeType\n\t\t);\n\t}\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\tvar parentChildNodes = parent.childNodes || [];\n\tvar nodeChildNodes = node.childNodes || [];\n\n\t// DocumentFragment\n\tif (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n\t\tvar nodeChildElements = nodeChildNodes.filter(isElementNode);\n\t\t// If node has more than one element child or has a Text node child.\n\t\tif (nodeChildElements.length > 1 || find(nodeChildNodes, isTextNode)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'More than one element or text in fragment');\n\t\t}\n\t\t// Otherwise, if `node` has one element child and either `parent` has an element child,\n\t\t// `child` is a doctype, or `child` is non-null and a doctype is following `child`.\n\t\tif (nodeChildElements.length === 1 && !isElementInsertionPossible(parent, child)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Element in fragment can not be inserted before doctype');\n\t\t}\n\t}\n\t// Element\n\tif (isElementNode(node)) {\n\t\t// `parent` has an element child, `child` is a doctype,\n\t\t// or `child` is non-null and a doctype is following `child`.\n\t\tif (!isElementInsertionPossible(parent, child)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Only one element can be added and only after doctype');\n\t\t}\n\t}\n\t// DocumentType\n\tif (isDocTypeNode(node)) {\n\t\t// `parent` has a doctype child,\n\t\tif (find(parentChildNodes, isDocTypeNode)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Only one doctype is allowed');\n\t\t}\n\t\tvar parentElementChild = find(parentChildNodes, isElementNode);\n\t\t// `child` is non-null and an element is preceding `child`,\n\t\tif (child && parentChildNodes.indexOf(parentElementChild) < parentChildNodes.indexOf(child)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Doctype can only be inserted before an element');\n\t\t}\n\t\t// or `child` is null and `parent` has an element child.\n\t\tif (!child && parentElementChild) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Doctype can not be appended since element is present');\n\t\t}\n\t}\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\tvar parentChildNodes = parent.childNodes || [];\n\tvar nodeChildNodes = node.childNodes || [];\n\n\t// DocumentFragment\n\tif (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n\t\tvar nodeChildElements = nodeChildNodes.filter(isElementNode);\n\t\t// If `node` has more than one element child or has a Text node child.\n\t\tif (nodeChildElements.length > 1 || find(nodeChildNodes, isTextNode)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'More than one element or text in fragment');\n\t\t}\n\t\t// 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\t\tif (nodeChildElements.length === 1 && !isElementReplacementPossible(parent, child)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Element in fragment can not be inserted before doctype');\n\t\t}\n\t}\n\t// Element\n\tif (isElementNode(node)) {\n\t\t// `parent` has an element child that is not `child` or a doctype is following `child`.\n\t\tif (!isElementReplacementPossible(parent, child)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Only one element can be added and only after doctype');\n\t\t}\n\t}\n\t// DocumentType\n\tif (isDocTypeNode(node)) {\n\t\tfunction hasDoctypeChildThatIsNotChild(node) {\n\t\t\treturn isDocTypeNode(node) && node !== child;\n\t\t}\n\n\t\t// `parent` has a doctype child that is not `child`,\n\t\tif (find(parentChildNodes, hasDoctypeChildThatIsNotChild)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Only one doctype is allowed');\n\t\t}\n\t\tvar parentElementChild = find(parentChildNodes, isElementNode);\n\t\t// or an element is preceding `child`.\n\t\tif (child && parentChildNodes.indexOf(parentElementChild) < parentChildNodes.indexOf(child)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Doctype can only be inserted before an element');\n\t\t}\n\t}\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\t// To ensure pre-insertion validity of a node into a parent before a child, run these steps:\n\tassertPreInsertionValidity1to5(parent, node, child);\n\n\t// If parent is a document, and any of the statements below, switched on the interface node implements,\n\t// are true, then throw a \"HierarchyRequestError\" DOMException.\n\tif (parent.nodeType === Node.DOCUMENT_NODE) {\n\t\t(_inDocumentAssertion || assertPreInsertionValidityInDocument)(parent, node, child);\n\t}\n\n\tvar cp = node.parentNode;\n\tif(cp){\n\t\tcp.removeChild(node);//remove and update\n\t}\n\tif(node.nodeType === DOCUMENT_FRAGMENT_NODE){\n\t\tvar newFirst = node.firstChild;\n\t\tif (newFirst == null) {\n\t\t\treturn node;\n\t\t}\n\t\tvar newLast = node.lastChild;\n\t}else{\n\t\tnewFirst = newLast = node;\n\t}\n\tvar pre = child ? child.previousSibling : parent.lastChild;\n\n\tnewFirst.previousSibling = pre;\n\tnewLast.nextSibling = child;\n\n\n\tif(pre){\n\t\tpre.nextSibling = newFirst;\n\t}else{\n\t\tparent.firstChild = newFirst;\n\t}\n\tif(child == null){\n\t\tparent.lastChild = newLast;\n\t}else{\n\t\tchild.previousSibling = newLast;\n\t}\n\tdo{\n\t\tnewFirst.parentNode = parent;\n\t}while(newFirst !== newLast && (newFirst= newFirst.nextSibling))\n\t_onUpdateChild(parent.ownerDocument||parent, parent);\n\t//console.log(parent.lastChild.nextSibling == null)\n\tif (node.nodeType == DOCUMENT_FRAGMENT_NODE) {\n\t\tnode.firstChild = node.lastChild = null;\n\t}\n\treturn 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\tif (newChild.parentNode) {\n\t\tnewChild.parentNode.removeChild(newChild);\n\t}\n\tnewChild.parentNode = parentNode;\n\tnewChild.previousSibling = parentNode.lastChild;\n\tnewChild.nextSibling = null;\n\tif (newChild.previousSibling) {\n\t\tnewChild.previousSibling.nextSibling = newChild;\n\t} else {\n\t\tparentNode.firstChild = newChild;\n\t}\n\tparentNode.lastChild = newChild;\n\t_onUpdateChild(parentNode.ownerDocument, parentNode, newChild);\n\treturn newChild;\n}\n\nDocument.prototype = {\n\t//implementation : null,\n\tnodeName :  '#document',\n\tnodeType :  DOCUMENT_NODE,\n\t/**\n\t * The DocumentType node of the document.\n\t *\n\t * @readonly\n\t * @type DocumentType\n\t */\n\tdoctype :  null,\n\tdocumentElement :  null,\n\t_inc : 1,\n\n\tinsertBefore :  function(newChild, refChild){//raises\n\t\tif(newChild.nodeType == DOCUMENT_FRAGMENT_NODE){\n\t\t\tvar child = newChild.firstChild;\n\t\t\twhile(child){\n\t\t\t\tvar next = child.nextSibling;\n\t\t\t\tthis.insertBefore(child,refChild);\n\t\t\t\tchild = next;\n\t\t\t}\n\t\t\treturn newChild;\n\t\t}\n\t\t_insertBefore(this, newChild, refChild);\n\t\tnewChild.ownerDocument = this;\n\t\tif (this.documentElement === null && newChild.nodeType === ELEMENT_NODE) {\n\t\t\tthis.documentElement = newChild;\n\t\t}\n\n\t\treturn newChild;\n\t},\n\tremoveChild :  function(oldChild){\n\t\tif(this.documentElement == oldChild){\n\t\t\tthis.documentElement = null;\n\t\t}\n\t\treturn _removeChild(this,oldChild);\n\t},\n\treplaceChild: function (newChild, oldChild) {\n\t\t//raises\n\t\t_insertBefore(this, newChild, oldChild, assertPreReplacementValidityInDocument);\n\t\tnewChild.ownerDocument = this;\n\t\tif (oldChild) {\n\t\t\tthis.removeChild(oldChild);\n\t\t}\n\t\tif (isElementNode(newChild)) {\n\t\t\tthis.documentElement = newChild;\n\t\t}\n\t},\n\t// Introduced in DOM Level 2:\n\timportNode : function(importedNode,deep){\n\t\treturn importNode(this,importedNode,deep);\n\t},\n\t// Introduced in DOM Level 2:\n\tgetElementById :\tfunction(id){\n\t\tvar rtv = null;\n\t\t_visitNode(this.documentElement,function(node){\n\t\t\tif(node.nodeType == ELEMENT_NODE){\n\t\t\t\tif(node.getAttribute('id') == id){\n\t\t\t\t\trtv = node;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t\treturn rtv;\n\t},\n\n\t/**\n\t * The `getElementsByClassName` method of `Document` interface returns an array-like object\n\t * of all child elements which have **all** of the given class name(s).\n\t *\n\t * Returns an empty list if `classeNames` is an empty string or only contains HTML white space characters.\n\t *\n\t *\n\t * Warning: This is a live LiveNodeList.\n\t * Changes in the DOM will reflect in the array as the changes occur.\n\t * If an element selected by this array no longer qualifies for the selector,\n\t * it will automatically be removed. Be aware of this for iteration purposes.\n\t *\n\t * @param {string} classNames is a string representing the class name(s) to match; multiple class names are separated by (ASCII-)whitespace\n\t *\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementsByClassName\n\t * @see https://dom.spec.whatwg.org/#concept-getelementsbyclassname\n\t */\n\tgetElementsByClassName: function(classNames) {\n\t\tvar classNamesSet = toOrderedSet(classNames)\n\t\treturn new LiveNodeList(this, function(base) {\n\t\t\tvar ls = [];\n\t\t\tif (classNamesSet.length > 0) {\n\t\t\t\t_visitNode(base.documentElement, function(node) {\n\t\t\t\t\tif(node !== base && node.nodeType === ELEMENT_NODE) {\n\t\t\t\t\t\tvar nodeClassNames = node.getAttribute('class')\n\t\t\t\t\t\t// can be null if the attribute does not exist\n\t\t\t\t\t\tif (nodeClassNames) {\n\t\t\t\t\t\t\t// before splitting and iterating just compare them for the most common case\n\t\t\t\t\t\t\tvar matches = classNames === nodeClassNames;\n\t\t\t\t\t\t\tif (!matches) {\n\t\t\t\t\t\t\t\tvar nodeClassNamesSet = toOrderedSet(nodeClassNames)\n\t\t\t\t\t\t\t\tmatches = classNamesSet.every(arrayIncludes(nodeClassNamesSet))\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(matches) {\n\t\t\t\t\t\t\t\tls.push(node);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn ls;\n\t\t});\n\t},\n\n\t//document factory method:\n\tcreateElement :\tfunction(tagName){\n\t\tvar node = new Element();\n\t\tnode.ownerDocument = this;\n\t\tnode.nodeName = tagName;\n\t\tnode.tagName = tagName;\n\t\tnode.localName = tagName;\n\t\tnode.childNodes = new NodeList();\n\t\tvar attrs\t= node.attributes = new NamedNodeMap();\n\t\tattrs._ownerElement = node;\n\t\treturn node;\n\t},\n\tcreateDocumentFragment :\tfunction(){\n\t\tvar node = new DocumentFragment();\n\t\tnode.ownerDocument = this;\n\t\tnode.childNodes = new NodeList();\n\t\treturn node;\n\t},\n\tcreateTextNode :\tfunction(data){\n\t\tvar node = new Text();\n\t\tnode.ownerDocument = this;\n\t\tnode.appendData(data)\n\t\treturn node;\n\t},\n\tcreateComment :\tfunction(data){\n\t\tvar node = new Comment();\n\t\tnode.ownerDocument = this;\n\t\tnode.appendData(data)\n\t\treturn node;\n\t},\n\tcreateCDATASection :\tfunction(data){\n\t\tvar node = new CDATASection();\n\t\tnode.ownerDocument = this;\n\t\tnode.appendData(data)\n\t\treturn node;\n\t},\n\tcreateProcessingInstruction :\tfunction(target,data){\n\t\tvar node = new ProcessingInstruction();\n\t\tnode.ownerDocument = this;\n\t\tnode.tagName = node.nodeName = node.target = target;\n\t\tnode.nodeValue = node.data = data;\n\t\treturn node;\n\t},\n\tcreateAttribute :\tfunction(name){\n\t\tvar node = new Attr();\n\t\tnode.ownerDocument\t= this;\n\t\tnode.name = name;\n\t\tnode.nodeName\t= name;\n\t\tnode.localName = name;\n\t\tnode.specified = true;\n\t\treturn node;\n\t},\n\tcreateEntityReference :\tfunction(name){\n\t\tvar node = new EntityReference();\n\t\tnode.ownerDocument\t= this;\n\t\tnode.nodeName\t= name;\n\t\treturn node;\n\t},\n\t// Introduced in DOM Level 2:\n\tcreateElementNS :\tfunction(namespaceURI,qualifiedName){\n\t\tvar node = new Element();\n\t\tvar pl = qualifiedName.split(':');\n\t\tvar attrs\t= node.attributes = new NamedNodeMap();\n\t\tnode.childNodes = new NodeList();\n\t\tnode.ownerDocument = this;\n\t\tnode.nodeName = qualifiedName;\n\t\tnode.tagName = qualifiedName;\n\t\tnode.namespaceURI = namespaceURI;\n\t\tif(pl.length == 2){\n\t\t\tnode.prefix = pl[0];\n\t\t\tnode.localName = pl[1];\n\t\t}else{\n\t\t\t//el.prefix = null;\n\t\t\tnode.localName = qualifiedName;\n\t\t}\n\t\tattrs._ownerElement = node;\n\t\treturn node;\n\t},\n\t// Introduced in DOM Level 2:\n\tcreateAttributeNS :\tfunction(namespaceURI,qualifiedName){\n\t\tvar node = new Attr();\n\t\tvar pl = qualifiedName.split(':');\n\t\tnode.ownerDocument = this;\n\t\tnode.nodeName = qualifiedName;\n\t\tnode.name = qualifiedName;\n\t\tnode.namespaceURI = namespaceURI;\n\t\tnode.specified = true;\n\t\tif(pl.length == 2){\n\t\t\tnode.prefix = pl[0];\n\t\t\tnode.localName = pl[1];\n\t\t}else{\n\t\t\t//el.prefix = null;\n\t\t\tnode.localName = qualifiedName;\n\t\t}\n\t\treturn node;\n\t}\n};\n_extends(Document,Node);\n\n\nfunction Element() {\n\tthis._nsMap = {};\n};\nElement.prototype = {\n\tnodeType : ELEMENT_NODE,\n\thasAttribute : function(name){\n\t\treturn this.getAttributeNode(name)!=null;\n\t},\n\tgetAttribute : function(name){\n\t\tvar attr = this.getAttributeNode(name);\n\t\treturn attr && attr.value || '';\n\t},\n\tgetAttributeNode : function(name){\n\t\treturn this.attributes.getNamedItem(name);\n\t},\n\tsetAttribute : function(name, value){\n\t\tvar attr = this.ownerDocument.createAttribute(name);\n\t\tattr.value = attr.nodeValue = \"\" + value;\n\t\tthis.setAttributeNode(attr)\n\t},\n\tremoveAttribute : function(name){\n\t\tvar attr = this.getAttributeNode(name)\n\t\tattr && this.removeAttributeNode(attr);\n\t},\n\n\t//four real opeartion method\n\tappendChild:function(newChild){\n\t\tif(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){\n\t\t\treturn this.insertBefore(newChild,null);\n\t\t}else{\n\t\t\treturn _appendSingleChild(this,newChild);\n\t\t}\n\t},\n\tsetAttributeNode : function(newAttr){\n\t\treturn this.attributes.setNamedItem(newAttr);\n\t},\n\tsetAttributeNodeNS : function(newAttr){\n\t\treturn this.attributes.setNamedItemNS(newAttr);\n\t},\n\tremoveAttributeNode : function(oldAttr){\n\t\t//console.log(this == oldAttr.ownerElement)\n\t\treturn this.attributes.removeNamedItem(oldAttr.nodeName);\n\t},\n\t//get real attribute name,and remove it by removeAttributeNode\n\tremoveAttributeNS : function(namespaceURI, localName){\n\t\tvar old = this.getAttributeNodeNS(namespaceURI, localName);\n\t\told && this.removeAttributeNode(old);\n\t},\n\n\thasAttributeNS : function(namespaceURI, localName){\n\t\treturn this.getAttributeNodeNS(namespaceURI, localName)!=null;\n\t},\n\tgetAttributeNS : function(namespaceURI, localName){\n\t\tvar attr = this.getAttributeNodeNS(namespaceURI, localName);\n\t\treturn attr && attr.value || '';\n\t},\n\tsetAttributeNS : function(namespaceURI, qualifiedName, value){\n\t\tvar attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName);\n\t\tattr.value = attr.nodeValue = \"\" + value;\n\t\tthis.setAttributeNode(attr)\n\t},\n\tgetAttributeNodeNS : function(namespaceURI, localName){\n\t\treturn this.attributes.getNamedItemNS(namespaceURI, localName);\n\t},\n\n\tgetElementsByTagName : function(tagName){\n\t\treturn new LiveNodeList(this,function(base){\n\t\t\tvar ls = [];\n\t\t\t_visitNode(base,function(node){\n\t\t\t\tif(node !== base && node.nodeType == ELEMENT_NODE && (tagName === '*' || node.tagName == tagName)){\n\t\t\t\t\tls.push(node);\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn ls;\n\t\t});\n\t},\n\tgetElementsByTagNameNS : function(namespaceURI, localName){\n\t\treturn new LiveNodeList(this,function(base){\n\t\t\tvar ls = [];\n\t\t\t_visitNode(base,function(node){\n\t\t\t\tif(node !== base && node.nodeType === ELEMENT_NODE && (namespaceURI === '*' || node.namespaceURI === namespaceURI) && (localName === '*' || node.localName == localName)){\n\t\t\t\t\tls.push(node);\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn ls;\n\n\t\t});\n\t}\n};\nDocument.prototype.getElementsByTagName = Element.prototype.getElementsByTagName;\nDocument.prototype.getElementsByTagNameNS = Element.prototype.getElementsByTagNameNS;\n\n\n_extends(Element,Node);\nfunction Attr() {\n};\nAttr.prototype.nodeType = ATTRIBUTE_NODE;\n_extends(Attr,Node);\n\n\nfunction CharacterData() {\n};\nCharacterData.prototype = {\n\tdata : '',\n\tsubstringData : function(offset, count) {\n\t\treturn this.data.substring(offset, offset+count);\n\t},\n\tappendData: function(text) {\n\t\ttext = this.data+text;\n\t\tthis.nodeValue = this.data = text;\n\t\tthis.length = text.length;\n\t},\n\tinsertData: function(offset,text) {\n\t\tthis.replaceData(offset,0,text);\n\n\t},\n\tappendChild:function(newChild){\n\t\tthrow new Error(ExceptionMessage[HIERARCHY_REQUEST_ERR])\n\t},\n\tdeleteData: function(offset, count) {\n\t\tthis.replaceData(offset,count,\"\");\n\t},\n\treplaceData: function(offset, count, text) {\n\t\tvar start = this.data.substring(0,offset);\n\t\tvar end = this.data.substring(offset+count);\n\t\ttext = start + text + end;\n\t\tthis.nodeValue = this.data = text;\n\t\tthis.length = text.length;\n\t}\n}\n_extends(CharacterData,Node);\nfunction Text() {\n};\nText.prototype = {\n\tnodeName : \"#text\",\n\tnodeType : TEXT_NODE,\n\tsplitText : function(offset) {\n\t\tvar text = this.data;\n\t\tvar newText = text.substring(offset);\n\t\ttext = text.substring(0, offset);\n\t\tthis.data = this.nodeValue = text;\n\t\tthis.length = text.length;\n\t\tvar newNode = this.ownerDocument.createTextNode(newText);\n\t\tif(this.parentNode){\n\t\t\tthis.parentNode.insertBefore(newNode, this.nextSibling);\n\t\t}\n\t\treturn newNode;\n\t}\n}\n_extends(Text,CharacterData);\nfunction Comment() {\n};\nComment.prototype = {\n\tnodeName : \"#comment\",\n\tnodeType : COMMENT_NODE\n}\n_extends(Comment,CharacterData);\n\nfunction CDATASection() {\n};\nCDATASection.prototype = {\n\tnodeName : \"#cdata-section\",\n\tnodeType : CDATA_SECTION_NODE\n}\n_extends(CDATASection,CharacterData);\n\n\nfunction DocumentType() {\n};\nDocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE;\n_extends(DocumentType,Node);\n\nfunction Notation() {\n};\nNotation.prototype.nodeType = NOTATION_NODE;\n_extends(Notation,Node);\n\nfunction Entity() {\n};\nEntity.prototype.nodeType = ENTITY_NODE;\n_extends(Entity,Node);\n\nfunction EntityReference() {\n};\nEntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE;\n_extends(EntityReference,Node);\n\nfunction DocumentFragment() {\n};\nDocumentFragment.prototype.nodeName =\t\"#document-fragment\";\nDocumentFragment.prototype.nodeType =\tDOCUMENT_FRAGMENT_NODE;\n_extends(DocumentFragment,Node);\n\n\nfunction ProcessingInstruction() {\n}\nProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE;\n_extends(ProcessingInstruction,Node);\nfunction XMLSerializer(){}\nXMLSerializer.prototype.serializeToString = function(node,isHtml,nodeFilter){\n\treturn nodeSerializeToString.call(node,isHtml,nodeFilter);\n}\nNode.prototype.toString = nodeSerializeToString;\nfunction nodeSerializeToString(isHtml,nodeFilter){\n\tvar buf = [];\n\tvar refNode = this.nodeType == 9 && this.documentElement || this;\n\tvar prefix = refNode.prefix;\n\tvar uri = refNode.namespaceURI;\n\n\tif(uri && prefix == null){\n\t\t//console.log(prefix)\n\t\tvar prefix = refNode.lookupPrefix(uri);\n\t\tif(prefix == null){\n\t\t\t//isHTML = true;\n\t\t\tvar visibleNamespaces=[\n\t\t\t{namespace:uri,prefix:null}\n\t\t\t//{namespace:uri,prefix:''}\n\t\t\t]\n\t\t}\n\t}\n\tserializeToString(this,buf,isHtml,nodeFilter,visibleNamespaces);\n\t//console.log('###',this.nodeType,uri,prefix,buf.join(''))\n\treturn buf.join('');\n}\n\nfunction needNamespaceDefine(node, isHTML, visibleNamespaces) {\n\tvar prefix = node.prefix || '';\n\tvar uri = node.namespaceURI;\n\t// According to [Namespaces in XML 1.0](https://www.w3.org/TR/REC-xml-names/#ns-using) ,\n\t// and more specifically https://www.w3.org/TR/REC-xml-names/#nsc-NoPrefixUndecl :\n\t// > In a namespace declaration for a prefix [...], the attribute value MUST NOT be empty.\n\t// in a similar manner [Namespaces in XML 1.1](https://www.w3.org/TR/xml-names11/#ns-using)\n\t// and more specifically https://www.w3.org/TR/xml-names11/#nsc-NSDeclared :\n\t// > [...] Furthermore, the attribute value [...] must not be an empty string.\n\t// so serializing empty namespace value like xmlns:ds=\"\" would produce an invalid XML document.\n\tif (!uri) {\n\t\treturn false;\n\t}\n\tif (prefix === \"xml\" && uri === NAMESPACE.XML || uri === NAMESPACE.XMLNS) {\n\t\treturn false;\n\t}\n\n\tvar i = visibleNamespaces.length\n\twhile (i--) {\n\t\tvar ns = visibleNamespaces[i];\n\t\t// get namespace prefix\n\t\tif (ns.prefix === prefix) {\n\t\t\treturn ns.namespace !== uri;\n\t\t}\n\t}\n\treturn 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\tbuf.push(' ', qualifiedName, '=\"', value.replace(/[<>&\"\\t\\n\\r]/g, _xmlEncoder), '\"')\n}\n\nfunction serializeToString(node,buf,isHTML,nodeFilter,visibleNamespaces){\n\tif (!visibleNamespaces) {\n\t\tvisibleNamespaces = [];\n\t}\n\n\tif(nodeFilter){\n\t\tnode = nodeFilter(node);\n\t\tif(node){\n\t\t\tif(typeof node == 'string'){\n\t\t\t\tbuf.push(node);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}else{\n\t\t\treturn;\n\t\t}\n\t\t//buf.sort.apply(attrs, attributeSorter);\n\t}\n\n\tswitch(node.nodeType){\n\tcase ELEMENT_NODE:\n\t\tvar attrs = node.attributes;\n\t\tvar len = attrs.length;\n\t\tvar child = node.firstChild;\n\t\tvar nodeName = node.tagName;\n\n\t\tisHTML = NAMESPACE.isHTML(node.namespaceURI) || isHTML\n\n\t\tvar prefixedNodeName = nodeName\n\t\tif (!isHTML && !node.prefix && node.namespaceURI) {\n\t\t\tvar defaultNS\n\t\t\t// lookup current default ns from `xmlns` attribute\n\t\t\tfor (var ai = 0; ai < attrs.length; ai++) {\n\t\t\t\tif (attrs.item(ai).name === 'xmlns') {\n\t\t\t\t\tdefaultNS = attrs.item(ai).value\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!defaultNS) {\n\t\t\t\t// lookup current default ns in visibleNamespaces\n\t\t\t\tfor (var nsi = visibleNamespaces.length - 1; nsi >= 0; nsi--) {\n\t\t\t\t\tvar namespace = visibleNamespaces[nsi]\n\t\t\t\t\tif (namespace.prefix === '' && namespace.namespace === node.namespaceURI) {\n\t\t\t\t\t\tdefaultNS = namespace.namespace\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (defaultNS !== node.namespaceURI) {\n\t\t\t\tfor (var nsi = visibleNamespaces.length - 1; nsi >= 0; nsi--) {\n\t\t\t\t\tvar namespace = visibleNamespaces[nsi]\n\t\t\t\t\tif (namespace.namespace === node.namespaceURI) {\n\t\t\t\t\t\tif (namespace.prefix) {\n\t\t\t\t\t\t\tprefixedNodeName = namespace.prefix + ':' + nodeName\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuf.push('<', prefixedNodeName);\n\n\t\tfor(var i=0;i<len;i++){\n\t\t\t// add namespaces for attributes\n\t\t\tvar attr = attrs.item(i);\n\t\t\tif (attr.prefix == 'xmlns') {\n\t\t\t\tvisibleNamespaces.push({ prefix: attr.localName, namespace: attr.value });\n\t\t\t}else if(attr.nodeName == 'xmlns'){\n\t\t\t\tvisibleNamespaces.push({ prefix: '', namespace: attr.value });\n\t\t\t}\n\t\t}\n\n\t\tfor(var i=0;i<len;i++){\n\t\t\tvar attr = attrs.item(i);\n\t\t\tif (needNamespaceDefine(attr,isHTML, visibleNamespaces)) {\n\t\t\t\tvar prefix = attr.prefix||'';\n\t\t\t\tvar uri = attr.namespaceURI;\n\t\t\t\taddSerializedAttribute(buf, prefix ? 'xmlns:' + prefix : \"xmlns\", uri);\n\t\t\t\tvisibleNamespaces.push({ prefix: prefix, namespace:uri });\n\t\t\t}\n\t\t\tserializeToString(attr,buf,isHTML,nodeFilter,visibleNamespaces);\n\t\t}\n\n\t\t// add namespace for current node\n\t\tif (nodeName === prefixedNodeName && needNamespaceDefine(node, isHTML, visibleNamespaces)) {\n\t\t\tvar prefix = node.prefix||'';\n\t\t\tvar uri = node.namespaceURI;\n\t\t\taddSerializedAttribute(buf, prefix ? 'xmlns:' + prefix : \"xmlns\", uri);\n\t\t\tvisibleNamespaces.push({ prefix: prefix, namespace:uri });\n\t\t}\n\n\t\tif(child || isHTML && !/^(?:meta|link|img|br|hr|input)$/i.test(nodeName)){\n\t\t\tbuf.push('>');\n\t\t\t//if is cdata child node\n\t\t\tif(isHTML && /^script$/i.test(nodeName)){\n\t\t\t\twhile(child){\n\t\t\t\t\tif(child.data){\n\t\t\t\t\t\tbuf.push(child.data);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tserializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice());\n\t\t\t\t\t}\n\t\t\t\t\tchild = child.nextSibling;\n\t\t\t\t}\n\t\t\t}else\n\t\t\t{\n\t\t\t\twhile(child){\n\t\t\t\t\tserializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice());\n\t\t\t\t\tchild = child.nextSibling;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbuf.push('</',prefixedNodeName,'>');\n\t\t}else{\n\t\t\tbuf.push('/>');\n\t\t}\n\t\t// remove added visible namespaces\n\t\t//visibleNamespaces.length = startVisibleNamespaces;\n\t\treturn;\n\tcase DOCUMENT_NODE:\n\tcase DOCUMENT_FRAGMENT_NODE:\n\t\tvar child = node.firstChild;\n\t\twhile(child){\n\t\t\tserializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice());\n\t\t\tchild = child.nextSibling;\n\t\t}\n\t\treturn;\n\tcase ATTRIBUTE_NODE:\n\t\treturn addSerializedAttribute(buf, node.name, node.value);\n\tcase TEXT_NODE:\n\t\t/**\n\t\t * The ampersand character (&) and the left angle bracket (<) must not appear in their literal form,\n\t\t * except when used as markup delimiters, or within a comment, a processing instruction, or a CDATA section.\n\t\t * If they are needed elsewhere, they must be escaped using either numeric character references or the strings\n\t\t * `&amp;` and `&lt;` respectively.\n\t\t * The right angle bracket (>) may be represented using the string \" &gt; \", and must, for compatibility,\n\t\t * be escaped using either `&gt;` or a character reference when it appears in the string `]]>` in content,\n\t\t * when that string is not marking the end of a CDATA section.\n\t\t *\n\t\t * In the content of elements, character data is any string of characters\n\t\t * which does not contain the start-delimiter of any markup\n\t\t * and does not include the CDATA-section-close delimiter, `]]>`.\n\t\t *\n\t\t * @see https://www.w3.org/TR/xml/#NT-CharData\n\t\t * @see https://w3c.github.io/DOM-Parsing/#xml-serializing-a-text-node\n\t\t */\n\t\treturn buf.push(node.data\n\t\t\t.replace(/[<&>]/g,_xmlEncoder)\n\t\t);\n\tcase CDATA_SECTION_NODE:\n\t\treturn buf.push( '<![CDATA[',node.data,']]>');\n\tcase COMMENT_NODE:\n\t\treturn buf.push( \"<!--\",node.data,\"-->\");\n\tcase DOCUMENT_TYPE_NODE:\n\t\tvar pubid = node.publicId;\n\t\tvar sysid = node.systemId;\n\t\tbuf.push('<!DOCTYPE ',node.name);\n\t\tif(pubid){\n\t\t\tbuf.push(' PUBLIC ', pubid);\n\t\t\tif (sysid && sysid!='.') {\n\t\t\t\tbuf.push(' ', sysid);\n\t\t\t}\n\t\t\tbuf.push('>');\n\t\t}else if(sysid && sysid!='.'){\n\t\t\tbuf.push(' SYSTEM ', sysid, '>');\n\t\t}else{\n\t\t\tvar sub = node.internalSubset;\n\t\t\tif(sub){\n\t\t\t\tbuf.push(\" [\",sub,\"]\");\n\t\t\t}\n\t\t\tbuf.push(\">\");\n\t\t}\n\t\treturn;\n\tcase PROCESSING_INSTRUCTION_NODE:\n\t\treturn buf.push( \"<?\",node.target,\" \",node.data,\"?>\");\n\tcase ENTITY_REFERENCE_NODE:\n\t\treturn buf.push( '&',node.nodeName,';');\n\t//case ENTITY_NODE:\n\t//case NOTATION_NODE:\n\tdefault:\n\t\tbuf.push('??',node.nodeName);\n\t}\n}\nfunction importNode(doc,node,deep){\n\tvar node2;\n\tswitch (node.nodeType) {\n\tcase ELEMENT_NODE:\n\t\tnode2 = node.cloneNode(false);\n\t\tnode2.ownerDocument = doc;\n\t\t//var attrs = node2.attributes;\n\t\t//var len = attrs.length;\n\t\t//for(var i=0;i<len;i++){\n\t\t\t//node2.setAttributeNodeNS(importNode(doc,attrs.item(i),deep));\n\t\t//}\n\tcase DOCUMENT_FRAGMENT_NODE:\n\t\tbreak;\n\tcase ATTRIBUTE_NODE:\n\t\tdeep = true;\n\t\tbreak;\n\t//case ENTITY_REFERENCE_NODE:\n\t//case PROCESSING_INSTRUCTION_NODE:\n\t////case TEXT_NODE:\n\t//case CDATA_SECTION_NODE:\n\t//case COMMENT_NODE:\n\t//\tdeep = false;\n\t//\tbreak;\n\t//case DOCUMENT_NODE:\n\t//case DOCUMENT_TYPE_NODE:\n\t//cannot be imported.\n\t//case ENTITY_NODE:\n\t//case NOTATION_NODE\uFF1A\n\t//can not hit in level3\n\t//default:throw e;\n\t}\n\tif(!node2){\n\t\tnode2 = node.cloneNode(false);//false\n\t}\n\tnode2.ownerDocument = doc;\n\tnode2.parentNode = null;\n\tif(deep){\n\t\tvar child = node.firstChild;\n\t\twhile(child){\n\t\t\tnode2.appendChild(importNode(doc,child,deep));\n\t\t\tchild = child.nextSibling;\n\t\t}\n\t}\n\treturn 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\tvar node2 = new node.constructor();\n\tfor (var n in node) {\n\t\tif (Object.prototype.hasOwnProperty.call(node, n)) {\n\t\t\tvar v = node[n];\n\t\t\tif (typeof v != \"object\") {\n\t\t\t\tif (v != node2[n]) {\n\t\t\t\t\tnode2[n] = v;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif(node.childNodes){\n\t\tnode2.childNodes = new NodeList();\n\t}\n\tnode2.ownerDocument = doc;\n\tswitch (node2.nodeType) {\n\tcase ELEMENT_NODE:\n\t\tvar attrs\t= node.attributes;\n\t\tvar attrs2\t= node2.attributes = new NamedNodeMap();\n\t\tvar len = attrs.length\n\t\tattrs2._ownerElement = node2;\n\t\tfor(var i=0;i<len;i++){\n\t\t\tnode2.setAttributeNode(cloneNode(doc,attrs.item(i),true));\n\t\t}\n\t\tbreak;;\n\tcase ATTRIBUTE_NODE:\n\t\tdeep = true;\n\t}\n\tif(deep){\n\t\tvar child = node.firstChild;\n\t\twhile(child){\n\t\t\tnode2.appendChild(cloneNode(doc,child,deep));\n\t\t\tchild = child.nextSibling;\n\t\t}\n\t}\n\treturn node2;\n}\n\nfunction __set__(object,key,value){\n\tobject[key] = value\n}\n//do dynamic\ntry{\n\tif(Object.defineProperty){\n\t\tObject.defineProperty(LiveNodeList.prototype,'length',{\n\t\t\tget:function(){\n\t\t\t\t_updateLiveList(this);\n\t\t\t\treturn this.$$length;\n\t\t\t}\n\t\t});\n\n\t\tObject.defineProperty(Node.prototype,'textContent',{\n\t\t\tget:function(){\n\t\t\t\treturn getTextContent(this);\n\t\t\t},\n\n\t\t\tset:function(data){\n\t\t\t\tswitch(this.nodeType){\n\t\t\t\tcase ELEMENT_NODE:\n\t\t\t\tcase DOCUMENT_FRAGMENT_NODE:\n\t\t\t\t\twhile(this.firstChild){\n\t\t\t\t\t\tthis.removeChild(this.firstChild);\n\t\t\t\t\t}\n\t\t\t\t\tif(data || String(data)){\n\t\t\t\t\t\tthis.appendChild(this.ownerDocument.createTextNode(data));\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tthis.data = data;\n\t\t\t\t\tthis.value = data;\n\t\t\t\t\tthis.nodeValue = data;\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\n\t\tfunction getTextContent(node){\n\t\t\tswitch(node.nodeType){\n\t\t\tcase ELEMENT_NODE:\n\t\t\tcase DOCUMENT_FRAGMENT_NODE:\n\t\t\t\tvar buf = [];\n\t\t\t\tnode = node.firstChild;\n\t\t\t\twhile(node){\n\t\t\t\t\tif(node.nodeType!==7 && node.nodeType !==8){\n\t\t\t\t\t\tbuf.push(getTextContent(node));\n\t\t\t\t\t}\n\t\t\t\t\tnode = node.nextSibling;\n\t\t\t\t}\n\t\t\t\treturn buf.join('');\n\t\t\tdefault:\n\t\t\t\treturn node.nodeValue;\n\t\t\t}\n\t\t}\n\n\t\t__set__ = function(object,key,value){\n\t\t\t//console.log(value)\n\t\t\tobject['$$'+key] = value\n\t\t}\n\t}\n}catch(e){//ie8\n}\n\n//if(typeof require == 'function'){\n\texports.DocumentType = DocumentType;\n\texports.DOMException = DOMException;\n\texports.DOMImplementation = DOMImplementation;\n\texports.Element = Element;\n\texports.Node = Node;\n\texports.NodeList = NodeList;\n\texports.XMLSerializer = XMLSerializer;\n//}\n", "'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\tamp: '&',\n\tapos: \"'\",\n\tgt: '>',\n\tlt: '<',\n\tquot: '\"',\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\tAacute: '\\u00C1',\n\taacute: '\\u00E1',\n\tAbreve: '\\u0102',\n\tabreve: '\\u0103',\n\tac: '\\u223E',\n\tacd: '\\u223F',\n\tacE: '\\u223E\\u0333',\n\tAcirc: '\\u00C2',\n\tacirc: '\\u00E2',\n\tacute: '\\u00B4',\n\tAcy: '\\u0410',\n\tacy: '\\u0430',\n\tAElig: '\\u00C6',\n\taelig: '\\u00E6',\n\taf: '\\u2061',\n\tAfr: '\\uD835\\uDD04',\n\tafr: '\\uD835\\uDD1E',\n\tAgrave: '\\u00C0',\n\tagrave: '\\u00E0',\n\talefsym: '\\u2135',\n\taleph: '\\u2135',\n\tAlpha: '\\u0391',\n\talpha: '\\u03B1',\n\tAmacr: '\\u0100',\n\tamacr: '\\u0101',\n\tamalg: '\\u2A3F',\n\tAMP: '\\u0026',\n\tamp: '\\u0026',\n\tAnd: '\\u2A53',\n\tand: '\\u2227',\n\tandand: '\\u2A55',\n\tandd: '\\u2A5C',\n\tandslope: '\\u2A58',\n\tandv: '\\u2A5A',\n\tang: '\\u2220',\n\tange: '\\u29A4',\n\tangle: '\\u2220',\n\tangmsd: '\\u2221',\n\tangmsdaa: '\\u29A8',\n\tangmsdab: '\\u29A9',\n\tangmsdac: '\\u29AA',\n\tangmsdad: '\\u29AB',\n\tangmsdae: '\\u29AC',\n\tangmsdaf: '\\u29AD',\n\tangmsdag: '\\u29AE',\n\tangmsdah: '\\u29AF',\n\tangrt: '\\u221F',\n\tangrtvb: '\\u22BE',\n\tangrtvbd: '\\u299D',\n\tangsph: '\\u2222',\n\tangst: '\\u00C5',\n\tangzarr: '\\u237C',\n\tAogon: '\\u0104',\n\taogon: '\\u0105',\n\tAopf: '\\uD835\\uDD38',\n\taopf: '\\uD835\\uDD52',\n\tap: '\\u2248',\n\tapacir: '\\u2A6F',\n\tapE: '\\u2A70',\n\tape: '\\u224A',\n\tapid: '\\u224B',\n\tapos: '\\u0027',\n\tApplyFunction: '\\u2061',\n\tapprox: '\\u2248',\n\tapproxeq: '\\u224A',\n\tAring: '\\u00C5',\n\taring: '\\u00E5',\n\tAscr: '\\uD835\\uDC9C',\n\tascr: '\\uD835\\uDCB6',\n\tAssign: '\\u2254',\n\tast: '\\u002A',\n\tasymp: '\\u2248',\n\tasympeq: '\\u224D',\n\tAtilde: '\\u00C3',\n\tatilde: '\\u00E3',\n\tAuml: '\\u00C4',\n\tauml: '\\u00E4',\n\tawconint: '\\u2233',\n\tawint: '\\u2A11',\n\tbackcong: '\\u224C',\n\tbackepsilon: '\\u03F6',\n\tbackprime: '\\u2035',\n\tbacksim: '\\u223D',\n\tbacksimeq: '\\u22CD',\n\tBackslash: '\\u2216',\n\tBarv: '\\u2AE7',\n\tbarvee: '\\u22BD',\n\tBarwed: '\\u2306',\n\tbarwed: '\\u2305',\n\tbarwedge: '\\u2305',\n\tbbrk: '\\u23B5',\n\tbbrktbrk: '\\u23B6',\n\tbcong: '\\u224C',\n\tBcy: '\\u0411',\n\tbcy: '\\u0431',\n\tbdquo: '\\u201E',\n\tbecaus: '\\u2235',\n\tBecause: '\\u2235',\n\tbecause: '\\u2235',\n\tbemptyv: '\\u29B0',\n\tbepsi: '\\u03F6',\n\tbernou: '\\u212C',\n\tBernoullis: '\\u212C',\n\tBeta: '\\u0392',\n\tbeta: '\\u03B2',\n\tbeth: '\\u2136',\n\tbetween: '\\u226C',\n\tBfr: '\\uD835\\uDD05',\n\tbfr: '\\uD835\\uDD1F',\n\tbigcap: '\\u22C2',\n\tbigcirc: '\\u25EF',\n\tbigcup: '\\u22C3',\n\tbigodot: '\\u2A00',\n\tbigoplus: '\\u2A01',\n\tbigotimes: '\\u2A02',\n\tbigsqcup: '\\u2A06',\n\tbigstar: '\\u2605',\n\tbigtriangledown: '\\u25BD',\n\tbigtriangleup: '\\u25B3',\n\tbiguplus: '\\u2A04',\n\tbigvee: '\\u22C1',\n\tbigwedge: '\\u22C0',\n\tbkarow: '\\u290D',\n\tblacklozenge: '\\u29EB',\n\tblacksquare: '\\u25AA',\n\tblacktriangle: '\\u25B4',\n\tblacktriangledown: '\\u25BE',\n\tblacktriangleleft: '\\u25C2',\n\tblacktriangleright: '\\u25B8',\n\tblank: '\\u2423',\n\tblk12: '\\u2592',\n\tblk14: '\\u2591',\n\tblk34: '\\u2593',\n\tblock: '\\u2588',\n\tbne: '\\u003D\\u20E5',\n\tbnequiv: '\\u2261\\u20E5',\n\tbNot: '\\u2AED',\n\tbnot: '\\u2310',\n\tBopf: '\\uD835\\uDD39',\n\tbopf: '\\uD835\\uDD53',\n\tbot: '\\u22A5',\n\tbottom: '\\u22A5',\n\tbowtie: '\\u22C8',\n\tboxbox: '\\u29C9',\n\tboxDL: '\\u2557',\n\tboxDl: '\\u2556',\n\tboxdL: '\\u2555',\n\tboxdl: '\\u2510',\n\tboxDR: '\\u2554',\n\tboxDr: '\\u2553',\n\tboxdR: '\\u2552',\n\tboxdr: '\\u250C',\n\tboxH: '\\u2550',\n\tboxh: '\\u2500',\n\tboxHD: '\\u2566',\n\tboxHd: '\\u2564',\n\tboxhD: '\\u2565',\n\tboxhd: '\\u252C',\n\tboxHU: '\\u2569',\n\tboxHu: '\\u2567',\n\tboxhU: '\\u2568',\n\tboxhu: '\\u2534',\n\tboxminus: '\\u229F',\n\tboxplus: '\\u229E',\n\tboxtimes: '\\u22A0',\n\tboxUL: '\\u255D',\n\tboxUl: '\\u255C',\n\tboxuL: '\\u255B',\n\tboxul: '\\u2518',\n\tboxUR: '\\u255A',\n\tboxUr: '\\u2559',\n\tboxuR: '\\u2558',\n\tboxur: '\\u2514',\n\tboxV: '\\u2551',\n\tboxv: '\\u2502',\n\tboxVH: '\\u256C',\n\tboxVh: '\\u256B',\n\tboxvH: '\\u256A',\n\tboxvh: '\\u253C',\n\tboxVL: '\\u2563',\n\tboxVl: '\\u2562',\n\tboxvL: '\\u2561',\n\tboxvl: '\\u2524',\n\tboxVR: '\\u2560',\n\tboxVr: '\\u255F',\n\tboxvR: '\\u255E',\n\tboxvr: '\\u251C',\n\tbprime: '\\u2035',\n\tBreve: '\\u02D8',\n\tbreve: '\\u02D8',\n\tbrvbar: '\\u00A6',\n\tBscr: '\\u212C',\n\tbscr: '\\uD835\\uDCB7',\n\tbsemi: '\\u204F',\n\tbsim: '\\u223D',\n\tbsime: '\\u22CD',\n\tbsol: '\\u005C',\n\tbsolb: '\\u29C5',\n\tbsolhsub: '\\u27C8',\n\tbull: '\\u2022',\n\tbullet: '\\u2022',\n\tbump: '\\u224E',\n\tbumpE: '\\u2AAE',\n\tbumpe: '\\u224F',\n\tBumpeq: '\\u224E',\n\tbumpeq: '\\u224F',\n\tCacute: '\\u0106',\n\tcacute: '\\u0107',\n\tCap: '\\u22D2',\n\tcap: '\\u2229',\n\tcapand: '\\u2A44',\n\tcapbrcup: '\\u2A49',\n\tcapcap: '\\u2A4B',\n\tcapcup: '\\u2A47',\n\tcapdot: '\\u2A40',\n\tCapitalDifferentialD: '\\u2145',\n\tcaps: '\\u2229\\uFE00',\n\tcaret: '\\u2041',\n\tcaron: '\\u02C7',\n\tCayleys: '\\u212D',\n\tccaps: '\\u2A4D',\n\tCcaron: '\\u010C',\n\tccaron: '\\u010D',\n\tCcedil: '\\u00C7',\n\tccedil: '\\u00E7',\n\tCcirc: '\\u0108',\n\tccirc: '\\u0109',\n\tCconint: '\\u2230',\n\tccups: '\\u2A4C',\n\tccupssm: '\\u2A50',\n\tCdot: '\\u010A',\n\tcdot: '\\u010B',\n\tcedil: '\\u00B8',\n\tCedilla: '\\u00B8',\n\tcemptyv: '\\u29B2',\n\tcent: '\\u00A2',\n\tCenterDot: '\\u00B7',\n\tcenterdot: '\\u00B7',\n\tCfr: '\\u212D',\n\tcfr: '\\uD835\\uDD20',\n\tCHcy: '\\u0427',\n\tchcy: '\\u0447',\n\tcheck: '\\u2713',\n\tcheckmark: '\\u2713',\n\tChi: '\\u03A7',\n\tchi: '\\u03C7',\n\tcir: '\\u25CB',\n\tcirc: '\\u02C6',\n\tcirceq: '\\u2257',\n\tcirclearrowleft: '\\u21BA',\n\tcirclearrowright: '\\u21BB',\n\tcircledast: '\\u229B',\n\tcircledcirc: '\\u229A',\n\tcircleddash: '\\u229D',\n\tCircleDot: '\\u2299',\n\tcircledR: '\\u00AE',\n\tcircledS: '\\u24C8',\n\tCircleMinus: '\\u2296',\n\tCirclePlus: '\\u2295',\n\tCircleTimes: '\\u2297',\n\tcirE: '\\u29C3',\n\tcire: '\\u2257',\n\tcirfnint: '\\u2A10',\n\tcirmid: '\\u2AEF',\n\tcirscir: '\\u29C2',\n\tClockwiseContourIntegral: '\\u2232',\n\tCloseCurlyDoubleQuote: '\\u201D',\n\tCloseCurlyQuote: '\\u2019',\n\tclubs: '\\u2663',\n\tclubsuit: '\\u2663',\n\tColon: '\\u2237',\n\tcolon: '\\u003A',\n\tColone: '\\u2A74',\n\tcolone: '\\u2254',\n\tcoloneq: '\\u2254',\n\tcomma: '\\u002C',\n\tcommat: '\\u0040',\n\tcomp: '\\u2201',\n\tcompfn: '\\u2218',\n\tcomplement: '\\u2201',\n\tcomplexes: '\\u2102',\n\tcong: '\\u2245',\n\tcongdot: '\\u2A6D',\n\tCongruent: '\\u2261',\n\tConint: '\\u222F',\n\tconint: '\\u222E',\n\tContourIntegral: '\\u222E',\n\tCopf: '\\u2102',\n\tcopf: '\\uD835\\uDD54',\n\tcoprod: '\\u2210',\n\tCoproduct: '\\u2210',\n\tCOPY: '\\u00A9',\n\tcopy: '\\u00A9',\n\tcopysr: '\\u2117',\n\tCounterClockwiseContourIntegral: '\\u2233',\n\tcrarr: '\\u21B5',\n\tCross: '\\u2A2F',\n\tcross: '\\u2717',\n\tCscr: '\\uD835\\uDC9E',\n\tcscr: '\\uD835\\uDCB8',\n\tcsub: '\\u2ACF',\n\tcsube: '\\u2AD1',\n\tcsup: '\\u2AD0',\n\tcsupe: '\\u2AD2',\n\tctdot: '\\u22EF',\n\tcudarrl: '\\u2938',\n\tcudarrr: '\\u2935',\n\tcuepr: '\\u22DE',\n\tcuesc: '\\u22DF',\n\tcularr: '\\u21B6',\n\tcularrp: '\\u293D',\n\tCup: '\\u22D3',\n\tcup: '\\u222A',\n\tcupbrcap: '\\u2A48',\n\tCupCap: '\\u224D',\n\tcupcap: '\\u2A46',\n\tcupcup: '\\u2A4A',\n\tcupdot: '\\u228D',\n\tcupor: '\\u2A45',\n\tcups: '\\u222A\\uFE00',\n\tcurarr: '\\u21B7',\n\tcurarrm: '\\u293C',\n\tcurlyeqprec: '\\u22DE',\n\tcurlyeqsucc: '\\u22DF',\n\tcurlyvee: '\\u22CE',\n\tcurlywedge: '\\u22CF',\n\tcurren: '\\u00A4',\n\tcurvearrowleft: '\\u21B6',\n\tcurvearrowright: '\\u21B7',\n\tcuvee: '\\u22CE',\n\tcuwed: '\\u22CF',\n\tcwconint: '\\u2232',\n\tcwint: '\\u2231',\n\tcylcty: '\\u232D',\n\tDagger: '\\u2021',\n\tdagger: '\\u2020',\n\tdaleth: '\\u2138',\n\tDarr: '\\u21A1',\n\tdArr: '\\u21D3',\n\tdarr: '\\u2193',\n\tdash: '\\u2010',\n\tDashv: '\\u2AE4',\n\tdashv: '\\u22A3',\n\tdbkarow: '\\u290F',\n\tdblac: '\\u02DD',\n\tDcaron: '\\u010E',\n\tdcaron: '\\u010F',\n\tDcy: '\\u0414',\n\tdcy: '\\u0434',\n\tDD: '\\u2145',\n\tdd: '\\u2146',\n\tddagger: '\\u2021',\n\tddarr: '\\u21CA',\n\tDDotrahd: '\\u2911',\n\tddotseq: '\\u2A77',\n\tdeg: '\\u00B0',\n\tDel: '\\u2207',\n\tDelta: '\\u0394',\n\tdelta: '\\u03B4',\n\tdemptyv: '\\u29B1',\n\tdfisht: '\\u297F',\n\tDfr: '\\uD835\\uDD07',\n\tdfr: '\\uD835\\uDD21',\n\tdHar: '\\u2965',\n\tdharl: '\\u21C3',\n\tdharr: '\\u21C2',\n\tDiacriticalAcute: '\\u00B4',\n\tDiacriticalDot: '\\u02D9',\n\tDiacriticalDoubleAcute: '\\u02DD',\n\tDiacriticalGrave: '\\u0060',\n\tDiacriticalTilde: '\\u02DC',\n\tdiam: '\\u22C4',\n\tDiamond: '\\u22C4',\n\tdiamond: '\\u22C4',\n\tdiamondsuit: '\\u2666',\n\tdiams: '\\u2666',\n\tdie: '\\u00A8',\n\tDifferentialD: '\\u2146',\n\tdigamma: '\\u03DD',\n\tdisin: '\\u22F2',\n\tdiv: '\\u00F7',\n\tdivide: '\\u00F7',\n\tdivideontimes: '\\u22C7',\n\tdivonx: '\\u22C7',\n\tDJcy: '\\u0402',\n\tdjcy: '\\u0452',\n\tdlcorn: '\\u231E',\n\tdlcrop: '\\u230D',\n\tdollar: '\\u0024',\n\tDopf: '\\uD835\\uDD3B',\n\tdopf: '\\uD835\\uDD55',\n\tDot: '\\u00A8',\n\tdot: '\\u02D9',\n\tDotDot: '\\u20DC',\n\tdoteq: '\\u2250',\n\tdoteqdot: '\\u2251',\n\tDotEqual: '\\u2250',\n\tdotminus: '\\u2238',\n\tdotplus: '\\u2214',\n\tdotsquare: '\\u22A1',\n\tdoublebarwedge: '\\u2306',\n\tDoubleContourIntegral: '\\u222F',\n\tDoubleDot: '\\u00A8',\n\tDoubleDownArrow: '\\u21D3',\n\tDoubleLeftArrow: '\\u21D0',\n\tDoubleLeftRightArrow: '\\u21D4',\n\tDoubleLeftTee: '\\u2AE4',\n\tDoubleLongLeftArrow: '\\u27F8',\n\tDoubleLongLeftRightArrow: '\\u27FA',\n\tDoubleLongRightArrow: '\\u27F9',\n\tDoubleRightArrow: '\\u21D2',\n\tDoubleRightTee: '\\u22A8',\n\tDoubleUpArrow: '\\u21D1',\n\tDoubleUpDownArrow: '\\u21D5',\n\tDoubleVerticalBar: '\\u2225',\n\tDownArrow: '\\u2193',\n\tDownarrow: '\\u21D3',\n\tdownarrow: '\\u2193',\n\tDownArrowBar: '\\u2913',\n\tDownArrowUpArrow: '\\u21F5',\n\tDownBreve: '\\u0311',\n\tdowndownarrows: '\\u21CA',\n\tdownharpoonleft: '\\u21C3',\n\tdownharpoonright: '\\u21C2',\n\tDownLeftRightVector: '\\u2950',\n\tDownLeftTeeVector: '\\u295E',\n\tDownLeftVector: '\\u21BD',\n\tDownLeftVectorBar: '\\u2956',\n\tDownRightTeeVector: '\\u295F',\n\tDownRightVector: '\\u21C1',\n\tDownRightVectorBar: '\\u2957',\n\tDownTee: '\\u22A4',\n\tDownTeeArrow: '\\u21A7',\n\tdrbkarow: '\\u2910',\n\tdrcorn: '\\u231F',\n\tdrcrop: '\\u230C',\n\tDscr: '\\uD835\\uDC9F',\n\tdscr: '\\uD835\\uDCB9',\n\tDScy: '\\u0405',\n\tdscy: '\\u0455',\n\tdsol: '\\u29F6',\n\tDstrok: '\\u0110',\n\tdstrok: '\\u0111',\n\tdtdot: '\\u22F1',\n\tdtri: '\\u25BF',\n\tdtrif: '\\u25BE',\n\tduarr: '\\u21F5',\n\tduhar: '\\u296F',\n\tdwangle: '\\u29A6',\n\tDZcy: '\\u040F',\n\tdzcy: '\\u045F',\n\tdzigrarr: '\\u27FF',\n\tEacute: '\\u00C9',\n\teacute: '\\u00E9',\n\teaster: '\\u2A6E',\n\tEcaron: '\\u011A',\n\tecaron: '\\u011B',\n\tecir: '\\u2256',\n\tEcirc: '\\u00CA',\n\tecirc: '\\u00EA',\n\tecolon: '\\u2255',\n\tEcy: '\\u042D',\n\tecy: '\\u044D',\n\teDDot: '\\u2A77',\n\tEdot: '\\u0116',\n\teDot: '\\u2251',\n\tedot: '\\u0117',\n\tee: '\\u2147',\n\tefDot: '\\u2252',\n\tEfr: '\\uD835\\uDD08',\n\tefr: '\\uD835\\uDD22',\n\teg: '\\u2A9A',\n\tEgrave: '\\u00C8',\n\tegrave: '\\u00E8',\n\tegs: '\\u2A96',\n\tegsdot: '\\u2A98',\n\tel: '\\u2A99',\n\tElement: '\\u2208',\n\telinters: '\\u23E7',\n\tell: '\\u2113',\n\tels: '\\u2A95',\n\telsdot: '\\u2A97',\n\tEmacr: '\\u0112',\n\temacr: '\\u0113',\n\tempty: '\\u2205',\n\temptyset: '\\u2205',\n\tEmptySmallSquare: '\\u25FB',\n\temptyv: '\\u2205',\n\tEmptyVerySmallSquare: '\\u25AB',\n\temsp: '\\u2003',\n\temsp13: '\\u2004',\n\temsp14: '\\u2005',\n\tENG: '\\u014A',\n\teng: '\\u014B',\n\tensp: '\\u2002',\n\tEogon: '\\u0118',\n\teogon: '\\u0119',\n\tEopf: '\\uD835\\uDD3C',\n\teopf: '\\uD835\\uDD56',\n\tepar: '\\u22D5',\n\teparsl: '\\u29E3',\n\teplus: '\\u2A71',\n\tepsi: '\\u03B5',\n\tEpsilon: '\\u0395',\n\tepsilon: '\\u03B5',\n\tepsiv: '\\u03F5',\n\teqcirc: '\\u2256',\n\teqcolon: '\\u2255',\n\teqsim: '\\u2242',\n\teqslantgtr: '\\u2A96',\n\teqslantless: '\\u2A95',\n\tEqual: '\\u2A75',\n\tequals: '\\u003D',\n\tEqualTilde: '\\u2242',\n\tequest: '\\u225F',\n\tEquilibrium: '\\u21CC',\n\tequiv: '\\u2261',\n\tequivDD: '\\u2A78',\n\teqvparsl: '\\u29E5',\n\terarr: '\\u2971',\n\terDot: '\\u2253',\n\tEscr: '\\u2130',\n\tescr: '\\u212F',\n\tesdot: '\\u2250',\n\tEsim: '\\u2A73',\n\tesim: '\\u2242',\n\tEta: '\\u0397',\n\teta: '\\u03B7',\n\tETH: '\\u00D0',\n\teth: '\\u00F0',\n\tEuml: '\\u00CB',\n\teuml: '\\u00EB',\n\teuro: '\\u20AC',\n\texcl: '\\u0021',\n\texist: '\\u2203',\n\tExists: '\\u2203',\n\texpectation: '\\u2130',\n\tExponentialE: '\\u2147',\n\texponentiale: '\\u2147',\n\tfallingdotseq: '\\u2252',\n\tFcy: '\\u0424',\n\tfcy: '\\u0444',\n\tfemale: '\\u2640',\n\tffilig: '\\uFB03',\n\tfflig: '\\uFB00',\n\tffllig: '\\uFB04',\n\tFfr: '\\uD835\\uDD09',\n\tffr: '\\uD835\\uDD23',\n\tfilig: '\\uFB01',\n\tFilledSmallSquare: '\\u25FC',\n\tFilledVerySmallSquare: '\\u25AA',\n\tfjlig: '\\u0066\\u006A',\n\tflat: '\\u266D',\n\tfllig: '\\uFB02',\n\tfltns: '\\u25B1',\n\tfnof: '\\u0192',\n\tFopf: '\\uD835\\uDD3D',\n\tfopf: '\\uD835\\uDD57',\n\tForAll: '\\u2200',\n\tforall: '\\u2200',\n\tfork: '\\u22D4',\n\tforkv: '\\u2AD9',\n\tFouriertrf: '\\u2131',\n\tfpartint: '\\u2A0D',\n\tfrac12: '\\u00BD',\n\tfrac13: '\\u2153',\n\tfrac14: '\\u00BC',\n\tfrac15: '\\u2155',\n\tfrac16: '\\u2159',\n\tfrac18: '\\u215B',\n\tfrac23: '\\u2154',\n\tfrac25: '\\u2156',\n\tfrac34: '\\u00BE',\n\tfrac35: '\\u2157',\n\tfrac38: '\\u215C',\n\tfrac45: '\\u2158',\n\tfrac56: '\\u215A',\n\tfrac58: '\\u215D',\n\tfrac78: '\\u215E',\n\tfrasl: '\\u2044',\n\tfrown: '\\u2322',\n\tFscr: '\\u2131',\n\tfscr: '\\uD835\\uDCBB',\n\tgacute: '\\u01F5',\n\tGamma: '\\u0393',\n\tgamma: '\\u03B3',\n\tGammad: '\\u03DC',\n\tgammad: '\\u03DD',\n\tgap: '\\u2A86',\n\tGbreve: '\\u011E',\n\tgbreve: '\\u011F',\n\tGcedil: '\\u0122',\n\tGcirc: '\\u011C',\n\tgcirc: '\\u011D',\n\tGcy: '\\u0413',\n\tgcy: '\\u0433',\n\tGdot: '\\u0120',\n\tgdot: '\\u0121',\n\tgE: '\\u2267',\n\tge: '\\u2265',\n\tgEl: '\\u2A8C',\n\tgel: '\\u22DB',\n\tgeq: '\\u2265',\n\tgeqq: '\\u2267',\n\tgeqslant: '\\u2A7E',\n\tges: '\\u2A7E',\n\tgescc: '\\u2AA9',\n\tgesdot: '\\u2A80',\n\tgesdoto: '\\u2A82',\n\tgesdotol: '\\u2A84',\n\tgesl: '\\u22DB\\uFE00',\n\tgesles: '\\u2A94',\n\tGfr: '\\uD835\\uDD0A',\n\tgfr: '\\uD835\\uDD24',\n\tGg: '\\u22D9',\n\tgg: '\\u226B',\n\tggg: '\\u22D9',\n\tgimel: '\\u2137',\n\tGJcy: '\\u0403',\n\tgjcy: '\\u0453',\n\tgl: '\\u2277',\n\tgla: '\\u2AA5',\n\tglE: '\\u2A92',\n\tglj: '\\u2AA4',\n\tgnap: '\\u2A8A',\n\tgnapprox: '\\u2A8A',\n\tgnE: '\\u2269',\n\tgne: '\\u2A88',\n\tgneq: '\\u2A88',\n\tgneqq: '\\u2269',\n\tgnsim: '\\u22E7',\n\tGopf: '\\uD835\\uDD3E',\n\tgopf: '\\uD835\\uDD58',\n\tgrave: '\\u0060',\n\tGreaterEqual: '\\u2265',\n\tGreaterEqualLess: '\\u22DB',\n\tGreaterFullEqual: '\\u2267',\n\tGreaterGreater: '\\u2AA2',\n\tGreaterLess: '\\u2277',\n\tGreaterSlantEqual: '\\u2A7E',\n\tGreaterTilde: '\\u2273',\n\tGscr: '\\uD835\\uDCA2',\n\tgscr: '\\u210A',\n\tgsim: '\\u2273',\n\tgsime: '\\u2A8E',\n\tgsiml: '\\u2A90',\n\tGt: '\\u226B',\n\tGT: '\\u003E',\n\tgt: '\\u003E',\n\tgtcc: '\\u2AA7',\n\tgtcir: '\\u2A7A',\n\tgtdot: '\\u22D7',\n\tgtlPar: '\\u2995',\n\tgtquest: '\\u2A7C',\n\tgtrapprox: '\\u2A86',\n\tgtrarr: '\\u2978',\n\tgtrdot: '\\u22D7',\n\tgtreqless: '\\u22DB',\n\tgtreqqless: '\\u2A8C',\n\tgtrless: '\\u2277',\n\tgtrsim: '\\u2273',\n\tgvertneqq: '\\u2269\\uFE00',\n\tgvnE: '\\u2269\\uFE00',\n\tHacek: '\\u02C7',\n\thairsp: '\\u200A',\n\thalf: '\\u00BD',\n\thamilt: '\\u210B',\n\tHARDcy: '\\u042A',\n\thardcy: '\\u044A',\n\thArr: '\\u21D4',\n\tharr: '\\u2194',\n\tharrcir: '\\u2948',\n\tharrw: '\\u21AD',\n\tHat: '\\u005E',\n\thbar: '\\u210F',\n\tHcirc: '\\u0124',\n\thcirc: '\\u0125',\n\thearts: '\\u2665',\n\theartsuit: '\\u2665',\n\thellip: '\\u2026',\n\thercon: '\\u22B9',\n\tHfr: '\\u210C',\n\thfr: '\\uD835\\uDD25',\n\tHilbertSpace: '\\u210B',\n\thksearow: '\\u2925',\n\thkswarow: '\\u2926',\n\thoarr: '\\u21FF',\n\thomtht: '\\u223B',\n\thookleftarrow: '\\u21A9',\n\thookrightarrow: '\\u21AA',\n\tHopf: '\\u210D',\n\thopf: '\\uD835\\uDD59',\n\thorbar: '\\u2015',\n\tHorizontalLine: '\\u2500',\n\tHscr: '\\u210B',\n\thscr: '\\uD835\\uDCBD',\n\thslash: '\\u210F',\n\tHstrok: '\\u0126',\n\thstrok: '\\u0127',\n\tHumpDownHump: '\\u224E',\n\tHumpEqual: '\\u224F',\n\thybull: '\\u2043',\n\thyphen: '\\u2010',\n\tIacute: '\\u00CD',\n\tiacute: '\\u00ED',\n\tic: '\\u2063',\n\tIcirc: '\\u00CE',\n\ticirc: '\\u00EE',\n\tIcy: '\\u0418',\n\ticy: '\\u0438',\n\tIdot: '\\u0130',\n\tIEcy: '\\u0415',\n\tiecy: '\\u0435',\n\tiexcl: '\\u00A1',\n\tiff: '\\u21D4',\n\tIfr: '\\u2111',\n\tifr: '\\uD835\\uDD26',\n\tIgrave: '\\u00CC',\n\tigrave: '\\u00EC',\n\tii: '\\u2148',\n\tiiiint: '\\u2A0C',\n\tiiint: '\\u222D',\n\tiinfin: '\\u29DC',\n\tiiota: '\\u2129',\n\tIJlig: '\\u0132',\n\tijlig: '\\u0133',\n\tIm: '\\u2111',\n\tImacr: '\\u012A',\n\timacr: '\\u012B',\n\timage: '\\u2111',\n\tImaginaryI: '\\u2148',\n\timagline: '\\u2110',\n\timagpart: '\\u2111',\n\timath: '\\u0131',\n\timof: '\\u22B7',\n\timped: '\\u01B5',\n\tImplies: '\\u21D2',\n\tin: '\\u2208',\n\tincare: '\\u2105',\n\tinfin: '\\u221E',\n\tinfintie: '\\u29DD',\n\tinodot: '\\u0131',\n\tInt: '\\u222C',\n\tint: '\\u222B',\n\tintcal: '\\u22BA',\n\tintegers: '\\u2124',\n\tIntegral: '\\u222B',\n\tintercal: '\\u22BA',\n\tIntersection: '\\u22C2',\n\tintlarhk: '\\u2A17',\n\tintprod: '\\u2A3C',\n\tInvisibleComma: '\\u2063',\n\tInvisibleTimes: '\\u2062',\n\tIOcy: '\\u0401',\n\tiocy: '\\u0451',\n\tIogon: '\\u012E',\n\tiogon: '\\u012F',\n\tIopf: '\\uD835\\uDD40',\n\tiopf: '\\uD835\\uDD5A',\n\tIota: '\\u0399',\n\tiota: '\\u03B9',\n\tiprod: '\\u2A3C',\n\tiquest: '\\u00BF',\n\tIscr: '\\u2110',\n\tiscr: '\\uD835\\uDCBE',\n\tisin: '\\u2208',\n\tisindot: '\\u22F5',\n\tisinE: '\\u22F9',\n\tisins: '\\u22F4',\n\tisinsv: '\\u22F3',\n\tisinv: '\\u2208',\n\tit: '\\u2062',\n\tItilde: '\\u0128',\n\titilde: '\\u0129',\n\tIukcy: '\\u0406',\n\tiukcy: '\\u0456',\n\tIuml: '\\u00CF',\n\tiuml: '\\u00EF',\n\tJcirc: '\\u0134',\n\tjcirc: '\\u0135',\n\tJcy: '\\u0419',\n\tjcy: '\\u0439',\n\tJfr: '\\uD835\\uDD0D',\n\tjfr: '\\uD835\\uDD27',\n\tjmath: '\\u0237',\n\tJopf: '\\uD835\\uDD41',\n\tjopf: '\\uD835\\uDD5B',\n\tJscr: '\\uD835\\uDCA5',\n\tjscr: '\\uD835\\uDCBF',\n\tJsercy: '\\u0408',\n\tjsercy: '\\u0458',\n\tJukcy: '\\u0404',\n\tjukcy: '\\u0454',\n\tKappa: '\\u039A',\n\tkappa: '\\u03BA',\n\tkappav: '\\u03F0',\n\tKcedil: '\\u0136',\n\tkcedil: '\\u0137',\n\tKcy: '\\u041A',\n\tkcy: '\\u043A',\n\tKfr: '\\uD835\\uDD0E',\n\tkfr: '\\uD835\\uDD28',\n\tkgreen: '\\u0138',\n\tKHcy: '\\u0425',\n\tkhcy: '\\u0445',\n\tKJcy: '\\u040C',\n\tkjcy: '\\u045C',\n\tKopf: '\\uD835\\uDD42',\n\tkopf: '\\uD835\\uDD5C',\n\tKscr: '\\uD835\\uDCA6',\n\tkscr: '\\uD835\\uDCC0',\n\tlAarr: '\\u21DA',\n\tLacute: '\\u0139',\n\tlacute: '\\u013A',\n\tlaemptyv: '\\u29B4',\n\tlagran: '\\u2112',\n\tLambda: '\\u039B',\n\tlambda: '\\u03BB',\n\tLang: '\\u27EA',\n\tlang: '\\u27E8',\n\tlangd: '\\u2991',\n\tlangle: '\\u27E8',\n\tlap: '\\u2A85',\n\tLaplacetrf: '\\u2112',\n\tlaquo: '\\u00AB',\n\tLarr: '\\u219E',\n\tlArr: '\\u21D0',\n\tlarr: '\\u2190',\n\tlarrb: '\\u21E4',\n\tlarrbfs: '\\u291F',\n\tlarrfs: '\\u291D',\n\tlarrhk: '\\u21A9',\n\tlarrlp: '\\u21AB',\n\tlarrpl: '\\u2939',\n\tlarrsim: '\\u2973',\n\tlarrtl: '\\u21A2',\n\tlat: '\\u2AAB',\n\tlAtail: '\\u291B',\n\tlatail: '\\u2919',\n\tlate: '\\u2AAD',\n\tlates: '\\u2AAD\\uFE00',\n\tlBarr: '\\u290E',\n\tlbarr: '\\u290C',\n\tlbbrk: '\\u2772',\n\tlbrace: '\\u007B',\n\tlbrack: '\\u005B',\n\tlbrke: '\\u298B',\n\tlbrksld: '\\u298F',\n\tlbrkslu: '\\u298D',\n\tLcaron: '\\u013D',\n\tlcaron: '\\u013E',\n\tLcedil: '\\u013B',\n\tlcedil: '\\u013C',\n\tlceil: '\\u2308',\n\tlcub: '\\u007B',\n\tLcy: '\\u041B',\n\tlcy: '\\u043B',\n\tldca: '\\u2936',\n\tldquo: '\\u201C',\n\tldquor: '\\u201E',\n\tldrdhar: '\\u2967',\n\tldrushar: '\\u294B',\n\tldsh: '\\u21B2',\n\tlE: '\\u2266',\n\tle: '\\u2264',\n\tLeftAngleBracket: '\\u27E8',\n\tLeftArrow: '\\u2190',\n\tLeftarrow: '\\u21D0',\n\tleftarrow: '\\u2190',\n\tLeftArrowBar: '\\u21E4',\n\tLeftArrowRightArrow: '\\u21C6',\n\tleftarrowtail: '\\u21A2',\n\tLeftCeiling: '\\u2308',\n\tLeftDoubleBracket: '\\u27E6',\n\tLeftDownTeeVector: '\\u2961',\n\tLeftDownVector: '\\u21C3',\n\tLeftDownVectorBar: '\\u2959',\n\tLeftFloor: '\\u230A',\n\tleftharpoondown: '\\u21BD',\n\tleftharpoonup: '\\u21BC',\n\tleftleftarrows: '\\u21C7',\n\tLeftRightArrow: '\\u2194',\n\tLeftrightarrow: '\\u21D4',\n\tleftrightarrow: '\\u2194',\n\tleftrightarrows: '\\u21C6',\n\tleftrightharpoons: '\\u21CB',\n\tleftrightsquigarrow: '\\u21AD',\n\tLeftRightVector: '\\u294E',\n\tLeftTee: '\\u22A3',\n\tLeftTeeArrow: '\\u21A4',\n\tLeftTeeVector: '\\u295A',\n\tleftthreetimes: '\\u22CB',\n\tLeftTriangle: '\\u22B2',\n\tLeftTriangleBar: '\\u29CF',\n\tLeftTriangleEqual: '\\u22B4',\n\tLeftUpDownVector: '\\u2951',\n\tLeftUpTeeVector: '\\u2960',\n\tLeftUpVector: '\\u21BF',\n\tLeftUpVectorBar: '\\u2958',\n\tLeftVector: '\\u21BC',\n\tLeftVectorBar: '\\u2952',\n\tlEg: '\\u2A8B',\n\tleg: '\\u22DA',\n\tleq: '\\u2264',\n\tleqq: '\\u2266',\n\tleqslant: '\\u2A7D',\n\tles: '\\u2A7D',\n\tlescc: '\\u2AA8',\n\tlesdot: '\\u2A7F',\n\tlesdoto: '\\u2A81',\n\tlesdotor: '\\u2A83',\n\tlesg: '\\u22DA\\uFE00',\n\tlesges: '\\u2A93',\n\tlessapprox: '\\u2A85',\n\tlessdot: '\\u22D6',\n\tlesseqgtr: '\\u22DA',\n\tlesseqqgtr: '\\u2A8B',\n\tLessEqualGreater: '\\u22DA',\n\tLessFullEqual: '\\u2266',\n\tLessGreater: '\\u2276',\n\tlessgtr: '\\u2276',\n\tLessLess: '\\u2AA1',\n\tlesssim: '\\u2272',\n\tLessSlantEqual: '\\u2A7D',\n\tLessTilde: '\\u2272',\n\tlfisht: '\\u297C',\n\tlfloor: '\\u230A',\n\tLfr: '\\uD835\\uDD0F',\n\tlfr: '\\uD835\\uDD29',\n\tlg: '\\u2276',\n\tlgE: '\\u2A91',\n\tlHar: '\\u2962',\n\tlhard: '\\u21BD',\n\tlharu: '\\u21BC',\n\tlharul: '\\u296A',\n\tlhblk: '\\u2584',\n\tLJcy: '\\u0409',\n\tljcy: '\\u0459',\n\tLl: '\\u22D8',\n\tll: '\\u226A',\n\tllarr: '\\u21C7',\n\tllcorner: '\\u231E',\n\tLleftarrow: '\\u21DA',\n\tllhard: '\\u296B',\n\tlltri: '\\u25FA',\n\tLmidot: '\\u013F',\n\tlmidot: '\\u0140',\n\tlmoust: '\\u23B0',\n\tlmoustache: '\\u23B0',\n\tlnap: '\\u2A89',\n\tlnapprox: '\\u2A89',\n\tlnE: '\\u2268',\n\tlne: '\\u2A87',\n\tlneq: '\\u2A87',\n\tlneqq: '\\u2268',\n\tlnsim: '\\u22E6',\n\tloang: '\\u27EC',\n\tloarr: '\\u21FD',\n\tlobrk: '\\u27E6',\n\tLongLeftArrow: '\\u27F5',\n\tLongleftarrow: '\\u27F8',\n\tlongleftarrow: '\\u27F5',\n\tLongLeftRightArrow: '\\u27F7',\n\tLongleftrightarrow: '\\u27FA',\n\tlongleftrightarrow: '\\u27F7',\n\tlongmapsto: '\\u27FC',\n\tLongRightArrow: '\\u27F6',\n\tLongrightarrow: '\\u27F9',\n\tlongrightarrow: '\\u27F6',\n\tlooparrowleft: '\\u21AB',\n\tlooparrowright: '\\u21AC',\n\tlopar: '\\u2985',\n\tLopf: '\\uD835\\uDD43',\n\tlopf: '\\uD835\\uDD5D',\n\tloplus: '\\u2A2D',\n\tlotimes: '\\u2A34',\n\tlowast: '\\u2217',\n\tlowbar: '\\u005F',\n\tLowerLeftArrow: '\\u2199',\n\tLowerRightArrow: '\\u2198',\n\tloz: '\\u25CA',\n\tlozenge: '\\u25CA',\n\tlozf: '\\u29EB',\n\tlpar: '\\u0028',\n\tlparlt: '\\u2993',\n\tlrarr: '\\u21C6',\n\tlrcorner: '\\u231F',\n\tlrhar: '\\u21CB',\n\tlrhard: '\\u296D',\n\tlrm: '\\u200E',\n\tlrtri: '\\u22BF',\n\tlsaquo: '\\u2039',\n\tLscr: '\\u2112',\n\tlscr: '\\uD835\\uDCC1',\n\tLsh: '\\u21B0',\n\tlsh: '\\u21B0',\n\tlsim: '\\u2272',\n\tlsime: '\\u2A8D',\n\tlsimg: '\\u2A8F',\n\tlsqb: '\\u005B',\n\tlsquo: '\\u2018',\n\tlsquor: '\\u201A',\n\tLstrok: '\\u0141',\n\tlstrok: '\\u0142',\n\tLt: '\\u226A',\n\tLT: '\\u003C',\n\tlt: '\\u003C',\n\tltcc: '\\u2AA6',\n\tltcir: '\\u2A79',\n\tltdot: '\\u22D6',\n\tlthree: '\\u22CB',\n\tltimes: '\\u22C9',\n\tltlarr: '\\u2976',\n\tltquest: '\\u2A7B',\n\tltri: '\\u25C3',\n\tltrie: '\\u22B4',\n\tltrif: '\\u25C2',\n\tltrPar: '\\u2996',\n\tlurdshar: '\\u294A',\n\tluruhar: '\\u2966',\n\tlvertneqq: '\\u2268\\uFE00',\n\tlvnE: '\\u2268\\uFE00',\n\tmacr: '\\u00AF',\n\tmale: '\\u2642',\n\tmalt: '\\u2720',\n\tmaltese: '\\u2720',\n\tMap: '\\u2905',\n\tmap: '\\u21A6',\n\tmapsto: '\\u21A6',\n\tmapstodown: '\\u21A7',\n\tmapstoleft: '\\u21A4',\n\tmapstoup: '\\u21A5',\n\tmarker: '\\u25AE',\n\tmcomma: '\\u2A29',\n\tMcy: '\\u041C',\n\tmcy: '\\u043C',\n\tmdash: '\\u2014',\n\tmDDot: '\\u223A',\n\tmeasuredangle: '\\u2221',\n\tMediumSpace: '\\u205F',\n\tMellintrf: '\\u2133',\n\tMfr: '\\uD835\\uDD10',\n\tmfr: '\\uD835\\uDD2A',\n\tmho: '\\u2127',\n\tmicro: '\\u00B5',\n\tmid: '\\u2223',\n\tmidast: '\\u002A',\n\tmidcir: '\\u2AF0',\n\tmiddot: '\\u00B7',\n\tminus: '\\u2212',\n\tminusb: '\\u229F',\n\tminusd: '\\u2238',\n\tminusdu: '\\u2A2A',\n\tMinusPlus: '\\u2213',\n\tmlcp: '\\u2ADB',\n\tmldr: '\\u2026',\n\tmnplus: '\\u2213',\n\tmodels: '\\u22A7',\n\tMopf: '\\uD835\\uDD44',\n\tmopf: '\\uD835\\uDD5E',\n\tmp: '\\u2213',\n\tMscr: '\\u2133',\n\tmscr: '\\uD835\\uDCC2',\n\tmstpos: '\\u223E',\n\tMu: '\\u039C',\n\tmu: '\\u03BC',\n\tmultimap: '\\u22B8',\n\tmumap: '\\u22B8',\n\tnabla: '\\u2207',\n\tNacute: '\\u0143',\n\tnacute: '\\u0144',\n\tnang: '\\u2220\\u20D2',\n\tnap: '\\u2249',\n\tnapE: '\\u2A70\\u0338',\n\tnapid: '\\u224B\\u0338',\n\tnapos: '\\u0149',\n\tnapprox: '\\u2249',\n\tnatur: '\\u266E',\n\tnatural: '\\u266E',\n\tnaturals: '\\u2115',\n\tnbsp: '\\u00A0',\n\tnbump: '\\u224E\\u0338',\n\tnbumpe: '\\u224F\\u0338',\n\tncap: '\\u2A43',\n\tNcaron: '\\u0147',\n\tncaron: '\\u0148',\n\tNcedil: '\\u0145',\n\tncedil: '\\u0146',\n\tncong: '\\u2247',\n\tncongdot: '\\u2A6D\\u0338',\n\tncup: '\\u2A42',\n\tNcy: '\\u041D',\n\tncy: '\\u043D',\n\tndash: '\\u2013',\n\tne: '\\u2260',\n\tnearhk: '\\u2924',\n\tneArr: '\\u21D7',\n\tnearr: '\\u2197',\n\tnearrow: '\\u2197',\n\tnedot: '\\u2250\\u0338',\n\tNegativeMediumSpace: '\\u200B',\n\tNegativeThickSpace: '\\u200B',\n\tNegativeThinSpace: '\\u200B',\n\tNegativeVeryThinSpace: '\\u200B',\n\tnequiv: '\\u2262',\n\tnesear: '\\u2928',\n\tnesim: '\\u2242\\u0338',\n\tNestedGreaterGreater: '\\u226B',\n\tNestedLessLess: '\\u226A',\n\tNewLine: '\\u000A',\n\tnexist: '\\u2204',\n\tnexists: '\\u2204',\n\tNfr: '\\uD835\\uDD11',\n\tnfr: '\\uD835\\uDD2B',\n\tngE: '\\u2267\\u0338',\n\tnge: '\\u2271',\n\tngeq: '\\u2271',\n\tngeqq: '\\u2267\\u0338',\n\tngeqslant: '\\u2A7E\\u0338',\n\tnges: '\\u2A7E\\u0338',\n\tnGg: '\\u22D9\\u0338',\n\tngsim: '\\u2275',\n\tnGt: '\\u226B\\u20D2',\n\tngt: '\\u226F',\n\tngtr: '\\u226F',\n\tnGtv: '\\u226B\\u0338',\n\tnhArr: '\\u21CE',\n\tnharr: '\\u21AE',\n\tnhpar: '\\u2AF2',\n\tni: '\\u220B',\n\tnis: '\\u22FC',\n\tnisd: '\\u22FA',\n\tniv: '\\u220B',\n\tNJcy: '\\u040A',\n\tnjcy: '\\u045A',\n\tnlArr: '\\u21CD',\n\tnlarr: '\\u219A',\n\tnldr: '\\u2025',\n\tnlE: '\\u2266\\u0338',\n\tnle: '\\u2270',\n\tnLeftarrow: '\\u21CD',\n\tnleftarrow: '\\u219A',\n\tnLeftrightarrow: '\\u21CE',\n\tnleftrightarrow: '\\u21AE',\n\tnleq: '\\u2270',\n\tnleqq: '\\u2266\\u0338',\n\tnleqslant: '\\u2A7D\\u0338',\n\tnles: '\\u2A7D\\u0338',\n\tnless: '\\u226E',\n\tnLl: '\\u22D8\\u0338',\n\tnlsim: '\\u2274',\n\tnLt: '\\u226A\\u20D2',\n\tnlt: '\\u226E',\n\tnltri: '\\u22EA',\n\tnltrie: '\\u22EC',\n\tnLtv: '\\u226A\\u0338',\n\tnmid: '\\u2224',\n\tNoBreak: '\\u2060',\n\tNonBreakingSpace: '\\u00A0',\n\tNopf: '\\u2115',\n\tnopf: '\\uD835\\uDD5F',\n\tNot: '\\u2AEC',\n\tnot: '\\u00AC',\n\tNotCongruent: '\\u2262',\n\tNotCupCap: '\\u226D',\n\tNotDoubleVerticalBar: '\\u2226',\n\tNotElement: '\\u2209',\n\tNotEqual: '\\u2260',\n\tNotEqualTilde: '\\u2242\\u0338',\n\tNotExists: '\\u2204',\n\tNotGreater: '\\u226F',\n\tNotGreaterEqual: '\\u2271',\n\tNotGreaterFullEqual: '\\u2267\\u0338',\n\tNotGreaterGreater: '\\u226B\\u0338',\n\tNotGreaterLess: '\\u2279',\n\tNotGreaterSlantEqual: '\\u2A7E\\u0338',\n\tNotGreaterTilde: '\\u2275',\n\tNotHumpDownHump: '\\u224E\\u0338',\n\tNotHumpEqual: '\\u224F\\u0338',\n\tnotin: '\\u2209',\n\tnotindot: '\\u22F5\\u0338',\n\tnotinE: '\\u22F9\\u0338',\n\tnotinva: '\\u2209',\n\tnotinvb: '\\u22F7',\n\tnotinvc: '\\u22F6',\n\tNotLeftTriangle: '\\u22EA',\n\tNotLeftTriangleBar: '\\u29CF\\u0338',\n\tNotLeftTriangleEqual: '\\u22EC',\n\tNotLess: '\\u226E',\n\tNotLessEqual: '\\u2270',\n\tNotLessGreater: '\\u2278',\n\tNotLessLess: '\\u226A\\u0338',\n\tNotLessSlantEqual: '\\u2A7D\\u0338',\n\tNotLessTilde: '\\u2274',\n\tNotNestedGreaterGreater: '\\u2AA2\\u0338',\n\tNotNestedLessLess: '\\u2AA1\\u0338',\n\tnotni: '\\u220C',\n\tnotniva: '\\u220C',\n\tnotnivb: '\\u22FE',\n\tnotnivc: '\\u22FD',\n\tNotPrecedes: '\\u2280',\n\tNotPrecedesEqual: '\\u2AAF\\u0338',\n\tNotPrecedesSlantEqual: '\\u22E0',\n\tNotReverseElement: '\\u220C',\n\tNotRightTriangle: '\\u22EB',\n\tNotRightTriangleBar: '\\u29D0\\u0338',\n\tNotRightTriangleEqual: '\\u22ED',\n\tNotSquareSubset: '\\u228F\\u0338',\n\tNotSquareSubsetEqual: '\\u22E2',\n\tNotSquareSuperset: '\\u2290\\u0338',\n\tNotSquareSupersetEqual: '\\u22E3',\n\tNotSubset: '\\u2282\\u20D2',\n\tNotSubsetEqual: '\\u2288',\n\tNotSucceeds: '\\u2281',\n\tNotSucceedsEqual: '\\u2AB0\\u0338',\n\tNotSucceedsSlantEqual: '\\u22E1',\n\tNotSucceedsTilde: '\\u227F\\u0338',\n\tNotSuperset: '\\u2283\\u20D2',\n\tNotSupersetEqual: '\\u2289',\n\tNotTilde: '\\u2241',\n\tNotTildeEqual: '\\u2244',\n\tNotTildeFullEqual: '\\u2247',\n\tNotTildeTilde: '\\u2249',\n\tNotVerticalBar: '\\u2224',\n\tnpar: '\\u2226',\n\tnparallel: '\\u2226',\n\tnparsl: '\\u2AFD\\u20E5',\n\tnpart: '\\u2202\\u0338',\n\tnpolint: '\\u2A14',\n\tnpr: '\\u2280',\n\tnprcue: '\\u22E0',\n\tnpre: '\\u2AAF\\u0338',\n\tnprec: '\\u2280',\n\tnpreceq: '\\u2AAF\\u0338',\n\tnrArr: '\\u21CF',\n\tnrarr: '\\u219B',\n\tnrarrc: '\\u2933\\u0338',\n\tnrarrw: '\\u219D\\u0338',\n\tnRightarrow: '\\u21CF',\n\tnrightarrow: '\\u219B',\n\tnrtri: '\\u22EB',\n\tnrtrie: '\\u22ED',\n\tnsc: '\\u2281',\n\tnsccue: '\\u22E1',\n\tnsce: '\\u2AB0\\u0338',\n\tNscr: '\\uD835\\uDCA9',\n\tnscr: '\\uD835\\uDCC3',\n\tnshortmid: '\\u2224',\n\tnshortparallel: '\\u2226',\n\tnsim: '\\u2241',\n\tnsime: '\\u2244',\n\tnsimeq: '\\u2244',\n\tnsmid: '\\u2224',\n\tnspar: '\\u2226',\n\tnsqsube: '\\u22E2',\n\tnsqsupe: '\\u22E3',\n\tnsub: '\\u2284',\n\tnsubE: '\\u2AC5\\u0338',\n\tnsube: '\\u2288',\n\tnsubset: '\\u2282\\u20D2',\n\tnsubseteq: '\\u2288',\n\tnsubseteqq: '\\u2AC5\\u0338',\n\tnsucc: '\\u2281',\n\tnsucceq: '\\u2AB0\\u0338',\n\tnsup: '\\u2285',\n\tnsupE: '\\u2AC6\\u0338',\n\tnsupe: '\\u2289',\n\tnsupset: '\\u2283\\u20D2',\n\tnsupseteq: '\\u2289',\n\tnsupseteqq: '\\u2AC6\\u0338',\n\tntgl: '\\u2279',\n\tNtilde: '\\u00D1',\n\tntilde: '\\u00F1',\n\tntlg: '\\u2278',\n\tntriangleleft: '\\u22EA',\n\tntrianglelefteq: '\\u22EC',\n\tntriangleright: '\\u22EB',\n\tntrianglerighteq: '\\u22ED',\n\tNu: '\\u039D',\n\tnu: '\\u03BD',\n\tnum: '\\u0023',\n\tnumero: '\\u2116',\n\tnumsp: '\\u2007',\n\tnvap: '\\u224D\\u20D2',\n\tnVDash: '\\u22AF',\n\tnVdash: '\\u22AE',\n\tnvDash: '\\u22AD',\n\tnvdash: '\\u22AC',\n\tnvge: '\\u2265\\u20D2',\n\tnvgt: '\\u003E\\u20D2',\n\tnvHarr: '\\u2904',\n\tnvinfin: '\\u29DE',\n\tnvlArr: '\\u2902',\n\tnvle: '\\u2264\\u20D2',\n\tnvlt: '\\u003C\\u20D2',\n\tnvltrie: '\\u22B4\\u20D2',\n\tnvrArr: '\\u2903',\n\tnvrtrie: '\\u22B5\\u20D2',\n\tnvsim: '\\u223C\\u20D2',\n\tnwarhk: '\\u2923',\n\tnwArr: '\\u21D6',\n\tnwarr: '\\u2196',\n\tnwarrow: '\\u2196',\n\tnwnear: '\\u2927',\n\tOacute: '\\u00D3',\n\toacute: '\\u00F3',\n\toast: '\\u229B',\n\tocir: '\\u229A',\n\tOcirc: '\\u00D4',\n\tocirc: '\\u00F4',\n\tOcy: '\\u041E',\n\tocy: '\\u043E',\n\todash: '\\u229D',\n\tOdblac: '\\u0150',\n\todblac: '\\u0151',\n\todiv: '\\u2A38',\n\todot: '\\u2299',\n\todsold: '\\u29BC',\n\tOElig: '\\u0152',\n\toelig: '\\u0153',\n\tofcir: '\\u29BF',\n\tOfr: '\\uD835\\uDD12',\n\tofr: '\\uD835\\uDD2C',\n\togon: '\\u02DB',\n\tOgrave: '\\u00D2',\n\tograve: '\\u00F2',\n\togt: '\\u29C1',\n\tohbar: '\\u29B5',\n\tohm: '\\u03A9',\n\toint: '\\u222E',\n\tolarr: '\\u21BA',\n\tolcir: '\\u29BE',\n\tolcross: '\\u29BB',\n\toline: '\\u203E',\n\tolt: '\\u29C0',\n\tOmacr: '\\u014C',\n\tomacr: '\\u014D',\n\tOmega: '\\u03A9',\n\tomega: '\\u03C9',\n\tOmicron: '\\u039F',\n\tomicron: '\\u03BF',\n\tomid: '\\u29B6',\n\tominus: '\\u2296',\n\tOopf: '\\uD835\\uDD46',\n\toopf: '\\uD835\\uDD60',\n\topar: '\\u29B7',\n\tOpenCurlyDoubleQuote: '\\u201C',\n\tOpenCurlyQuote: '\\u2018',\n\toperp: '\\u29B9',\n\toplus: '\\u2295',\n\tOr: '\\u2A54',\n\tor: '\\u2228',\n\torarr: '\\u21BB',\n\tord: '\\u2A5D',\n\torder: '\\u2134',\n\torderof: '\\u2134',\n\tordf: '\\u00AA',\n\tordm: '\\u00BA',\n\torigof: '\\u22B6',\n\toror: '\\u2A56',\n\torslope: '\\u2A57',\n\torv: '\\u2A5B',\n\toS: '\\u24C8',\n\tOscr: '\\uD835\\uDCAA',\n\toscr: '\\u2134',\n\tOslash: '\\u00D8',\n\toslash: '\\u00F8',\n\tosol: '\\u2298',\n\tOtilde: '\\u00D5',\n\totilde: '\\u00F5',\n\tOtimes: '\\u2A37',\n\totimes: '\\u2297',\n\totimesas: '\\u2A36',\n\tOuml: '\\u00D6',\n\touml: '\\u00F6',\n\tovbar: '\\u233D',\n\tOverBar: '\\u203E',\n\tOverBrace: '\\u23DE',\n\tOverBracket: '\\u23B4',\n\tOverParenthesis: '\\u23DC',\n\tpar: '\\u2225',\n\tpara: '\\u00B6',\n\tparallel: '\\u2225',\n\tparsim: '\\u2AF3',\n\tparsl: '\\u2AFD',\n\tpart: '\\u2202',\n\tPartialD: '\\u2202',\n\tPcy: '\\u041F',\n\tpcy: '\\u043F',\n\tpercnt: '\\u0025',\n\tperiod: '\\u002E',\n\tpermil: '\\u2030',\n\tperp: '\\u22A5',\n\tpertenk: '\\u2031',\n\tPfr: '\\uD835\\uDD13',\n\tpfr: '\\uD835\\uDD2D',\n\tPhi: '\\u03A6',\n\tphi: '\\u03C6',\n\tphiv: '\\u03D5',\n\tphmmat: '\\u2133',\n\tphone: '\\u260E',\n\tPi: '\\u03A0',\n\tpi: '\\u03C0',\n\tpitchfork: '\\u22D4',\n\tpiv: '\\u03D6',\n\tplanck: '\\u210F',\n\tplanckh: '\\u210E',\n\tplankv: '\\u210F',\n\tplus: '\\u002B',\n\tplusacir: '\\u2A23',\n\tplusb: '\\u229E',\n\tpluscir: '\\u2A22',\n\tplusdo: '\\u2214',\n\tplusdu: '\\u2A25',\n\tpluse: '\\u2A72',\n\tPlusMinus: '\\u00B1',\n\tplusmn: '\\u00B1',\n\tplussim: '\\u2A26',\n\tplustwo: '\\u2A27',\n\tpm: '\\u00B1',\n\tPoincareplane: '\\u210C',\n\tpointint: '\\u2A15',\n\tPopf: '\\u2119',\n\tpopf: '\\uD835\\uDD61',\n\tpound: '\\u00A3',\n\tPr: '\\u2ABB',\n\tpr: '\\u227A',\n\tprap: '\\u2AB7',\n\tprcue: '\\u227C',\n\tprE: '\\u2AB3',\n\tpre: '\\u2AAF',\n\tprec: '\\u227A',\n\tprecapprox: '\\u2AB7',\n\tpreccurlyeq: '\\u227C',\n\tPrecedes: '\\u227A',\n\tPrecedesEqual: '\\u2AAF',\n\tPrecedesSlantEqual: '\\u227C',\n\tPrecedesTilde: '\\u227E',\n\tpreceq: '\\u2AAF',\n\tprecnapprox: '\\u2AB9',\n\tprecneqq: '\\u2AB5',\n\tprecnsim: '\\u22E8',\n\tprecsim: '\\u227E',\n\tPrime: '\\u2033',\n\tprime: '\\u2032',\n\tprimes: '\\u2119',\n\tprnap: '\\u2AB9',\n\tprnE: '\\u2AB5',\n\tprnsim: '\\u22E8',\n\tprod: '\\u220F',\n\tProduct: '\\u220F',\n\tprofalar: '\\u232E',\n\tprofline: '\\u2312',\n\tprofsurf: '\\u2313',\n\tprop: '\\u221D',\n\tProportion: '\\u2237',\n\tProportional: '\\u221D',\n\tpropto: '\\u221D',\n\tprsim: '\\u227E',\n\tprurel: '\\u22B0',\n\tPscr: '\\uD835\\uDCAB',\n\tpscr: '\\uD835\\uDCC5',\n\tPsi: '\\u03A8',\n\tpsi: '\\u03C8',\n\tpuncsp: '\\u2008',\n\tQfr: '\\uD835\\uDD14',\n\tqfr: '\\uD835\\uDD2E',\n\tqint: '\\u2A0C',\n\tQopf: '\\u211A',\n\tqopf: '\\uD835\\uDD62',\n\tqprime: '\\u2057',\n\tQscr: '\\uD835\\uDCAC',\n\tqscr: '\\uD835\\uDCC6',\n\tquaternions: '\\u210D',\n\tquatint: '\\u2A16',\n\tquest: '\\u003F',\n\tquesteq: '\\u225F',\n\tQUOT: '\\u0022',\n\tquot: '\\u0022',\n\trAarr: '\\u21DB',\n\trace: '\\u223D\\u0331',\n\tRacute: '\\u0154',\n\tracute: '\\u0155',\n\tradic: '\\u221A',\n\traemptyv: '\\u29B3',\n\tRang: '\\u27EB',\n\trang: '\\u27E9',\n\trangd: '\\u2992',\n\trange: '\\u29A5',\n\trangle: '\\u27E9',\n\traquo: '\\u00BB',\n\tRarr: '\\u21A0',\n\trArr: '\\u21D2',\n\trarr: '\\u2192',\n\trarrap: '\\u2975',\n\trarrb: '\\u21E5',\n\trarrbfs: '\\u2920',\n\trarrc: '\\u2933',\n\trarrfs: '\\u291E',\n\trarrhk: '\\u21AA',\n\trarrlp: '\\u21AC',\n\trarrpl: '\\u2945',\n\trarrsim: '\\u2974',\n\tRarrtl: '\\u2916',\n\trarrtl: '\\u21A3',\n\trarrw: '\\u219D',\n\trAtail: '\\u291C',\n\tratail: '\\u291A',\n\tratio: '\\u2236',\n\trationals: '\\u211A',\n\tRBarr: '\\u2910',\n\trBarr: '\\u290F',\n\trbarr: '\\u290D',\n\trbbrk: '\\u2773',\n\trbrace: '\\u007D',\n\trbrack: '\\u005D',\n\trbrke: '\\u298C',\n\trbrksld: '\\u298E',\n\trbrkslu: '\\u2990',\n\tRcaron: '\\u0158',\n\trcaron: '\\u0159',\n\tRcedil: '\\u0156',\n\trcedil: '\\u0157',\n\trceil: '\\u2309',\n\trcub: '\\u007D',\n\tRcy: '\\u0420',\n\trcy: '\\u0440',\n\trdca: '\\u2937',\n\trdldhar: '\\u2969',\n\trdquo: '\\u201D',\n\trdquor: '\\u201D',\n\trdsh: '\\u21B3',\n\tRe: '\\u211C',\n\treal: '\\u211C',\n\trealine: '\\u211B',\n\trealpart: '\\u211C',\n\treals: '\\u211D',\n\trect: '\\u25AD',\n\tREG: '\\u00AE',\n\treg: '\\u00AE',\n\tReverseElement: '\\u220B',\n\tReverseEquilibrium: '\\u21CB',\n\tReverseUpEquilibrium: '\\u296F',\n\trfisht: '\\u297D',\n\trfloor: '\\u230B',\n\tRfr: '\\u211C',\n\trfr: '\\uD835\\uDD2F',\n\trHar: '\\u2964',\n\trhard: '\\u21C1',\n\trharu: '\\u21C0',\n\trharul: '\\u296C',\n\tRho: '\\u03A1',\n\trho: '\\u03C1',\n\trhov: '\\u03F1',\n\tRightAngleBracket: '\\u27E9',\n\tRightArrow: '\\u2192',\n\tRightarrow: '\\u21D2',\n\trightarrow: '\\u2192',\n\tRightArrowBar: '\\u21E5',\n\tRightArrowLeftArrow: '\\u21C4',\n\trightarrowtail: '\\u21A3',\n\tRightCeiling: '\\u2309',\n\tRightDoubleBracket: '\\u27E7',\n\tRightDownTeeVector: '\\u295D',\n\tRightDownVector: '\\u21C2',\n\tRightDownVectorBar: '\\u2955',\n\tRightFloor: '\\u230B',\n\trightharpoondown: '\\u21C1',\n\trightharpoonup: '\\u21C0',\n\trightleftarrows: '\\u21C4',\n\trightleftharpoons: '\\u21CC',\n\trightrightarrows: '\\u21C9',\n\trightsquigarrow: '\\u219D',\n\tRightTee: '\\u22A2',\n\tRightTeeArrow: '\\u21A6',\n\tRightTeeVector: '\\u295B',\n\trightthreetimes: '\\u22CC',\n\tRightTriangle: '\\u22B3',\n\tRightTriangleBar: '\\u29D0',\n\tRightTriangleEqual: '\\u22B5',\n\tRightUpDownVector: '\\u294F',\n\tRightUpTeeVector: '\\u295C',\n\tRightUpVector: '\\u21BE',\n\tRightUpVectorBar: '\\u2954',\n\tRightVector: '\\u21C0',\n\tRightVectorBar: '\\u2953',\n\tring: '\\u02DA',\n\trisingdotseq: '\\u2253',\n\trlarr: '\\u21C4',\n\trlhar: '\\u21CC',\n\trlm: '\\u200F',\n\trmoust: '\\u23B1',\n\trmoustache: '\\u23B1',\n\trnmid: '\\u2AEE',\n\troang: '\\u27ED',\n\troarr: '\\u21FE',\n\trobrk: '\\u27E7',\n\tropar: '\\u2986',\n\tRopf: '\\u211D',\n\tropf: '\\uD835\\uDD63',\n\troplus: '\\u2A2E',\n\trotimes: '\\u2A35',\n\tRoundImplies: '\\u2970',\n\trpar: '\\u0029',\n\trpargt: '\\u2994',\n\trppolint: '\\u2A12',\n\trrarr: '\\u21C9',\n\tRrightarrow: '\\u21DB',\n\trsaquo: '\\u203A',\n\tRscr: '\\u211B',\n\trscr: '\\uD835\\uDCC7',\n\tRsh: '\\u21B1',\n\trsh: '\\u21B1',\n\trsqb: '\\u005D',\n\trsquo: '\\u2019',\n\trsquor: '\\u2019',\n\trthree: '\\u22CC',\n\trtimes: '\\u22CA',\n\trtri: '\\u25B9',\n\trtrie: '\\u22B5',\n\trtrif: '\\u25B8',\n\trtriltri: '\\u29CE',\n\tRuleDelayed: '\\u29F4',\n\truluhar: '\\u2968',\n\trx: '\\u211E',\n\tSacute: '\\u015A',\n\tsacute: '\\u015B',\n\tsbquo: '\\u201A',\n\tSc: '\\u2ABC',\n\tsc: '\\u227B',\n\tscap: '\\u2AB8',\n\tScaron: '\\u0160',\n\tscaron: '\\u0161',\n\tsccue: '\\u227D',\n\tscE: '\\u2AB4',\n\tsce: '\\u2AB0',\n\tScedil: '\\u015E',\n\tscedil: '\\u015F',\n\tScirc: '\\u015C',\n\tscirc: '\\u015D',\n\tscnap: '\\u2ABA',\n\tscnE: '\\u2AB6',\n\tscnsim: '\\u22E9',\n\tscpolint: '\\u2A13',\n\tscsim: '\\u227F',\n\tScy: '\\u0421',\n\tscy: '\\u0441',\n\tsdot: '\\u22C5',\n\tsdotb: '\\u22A1',\n\tsdote: '\\u2A66',\n\tsearhk: '\\u2925',\n\tseArr: '\\u21D8',\n\tsearr: '\\u2198',\n\tsearrow: '\\u2198',\n\tsect: '\\u00A7',\n\tsemi: '\\u003B',\n\tseswar: '\\u2929',\n\tsetminus: '\\u2216',\n\tsetmn: '\\u2216',\n\tsext: '\\u2736',\n\tSfr: '\\uD835\\uDD16',\n\tsfr: '\\uD835\\uDD30',\n\tsfrown: '\\u2322',\n\tsharp: '\\u266F',\n\tSHCHcy: '\\u0429',\n\tshchcy: '\\u0449',\n\tSHcy: '\\u0428',\n\tshcy: '\\u0448',\n\tShortDownArrow: '\\u2193',\n\tShortLeftArrow: '\\u2190',\n\tshortmid: '\\u2223',\n\tshortparallel: '\\u2225',\n\tShortRightArrow: '\\u2192',\n\tShortUpArrow: '\\u2191',\n\tshy: '\\u00AD',\n\tSigma: '\\u03A3',\n\tsigma: '\\u03C3',\n\tsigmaf: '\\u03C2',\n\tsigmav: '\\u03C2',\n\tsim: '\\u223C',\n\tsimdot: '\\u2A6A',\n\tsime: '\\u2243',\n\tsimeq: '\\u2243',\n\tsimg: '\\u2A9E',\n\tsimgE: '\\u2AA0',\n\tsiml: '\\u2A9D',\n\tsimlE: '\\u2A9F',\n\tsimne: '\\u2246',\n\tsimplus: '\\u2A24',\n\tsimrarr: '\\u2972',\n\tslarr: '\\u2190',\n\tSmallCircle: '\\u2218',\n\tsmallsetminus: '\\u2216',\n\tsmashp: '\\u2A33',\n\tsmeparsl: '\\u29E4',\n\tsmid: '\\u2223',\n\tsmile: '\\u2323',\n\tsmt: '\\u2AAA',\n\tsmte: '\\u2AAC',\n\tsmtes: '\\u2AAC\\uFE00',\n\tSOFTcy: '\\u042C',\n\tsoftcy: '\\u044C',\n\tsol: '\\u002F',\n\tsolb: '\\u29C4',\n\tsolbar: '\\u233F',\n\tSopf: '\\uD835\\uDD4A',\n\tsopf: '\\uD835\\uDD64',\n\tspades: '\\u2660',\n\tspadesuit: '\\u2660',\n\tspar: '\\u2225',\n\tsqcap: '\\u2293',\n\tsqcaps: '\\u2293\\uFE00',\n\tsqcup: '\\u2294',\n\tsqcups: '\\u2294\\uFE00',\n\tSqrt: '\\u221A',\n\tsqsub: '\\u228F',\n\tsqsube: '\\u2291',\n\tsqsubset: '\\u228F',\n\tsqsubseteq: '\\u2291',\n\tsqsup: '\\u2290',\n\tsqsupe: '\\u2292',\n\tsqsupset: '\\u2290',\n\tsqsupseteq: '\\u2292',\n\tsqu: '\\u25A1',\n\tSquare: '\\u25A1',\n\tsquare: '\\u25A1',\n\tSquareIntersection: '\\u2293',\n\tSquareSubset: '\\u228F',\n\tSquareSubsetEqual: '\\u2291',\n\tSquareSuperset: '\\u2290',\n\tSquareSupersetEqual: '\\u2292',\n\tSquareUnion: '\\u2294',\n\tsquarf: '\\u25AA',\n\tsquf: '\\u25AA',\n\tsrarr: '\\u2192',\n\tSscr: '\\uD835\\uDCAE',\n\tsscr: '\\uD835\\uDCC8',\n\tssetmn: '\\u2216',\n\tssmile: '\\u2323',\n\tsstarf: '\\u22C6',\n\tStar: '\\u22C6',\n\tstar: '\\u2606',\n\tstarf: '\\u2605',\n\tstraightepsilon: '\\u03F5',\n\tstraightphi: '\\u03D5',\n\tstrns: '\\u00AF',\n\tSub: '\\u22D0',\n\tsub: '\\u2282',\n\tsubdot: '\\u2ABD',\n\tsubE: '\\u2AC5',\n\tsube: '\\u2286',\n\tsubedot: '\\u2AC3',\n\tsubmult: '\\u2AC1',\n\tsubnE: '\\u2ACB',\n\tsubne: '\\u228A',\n\tsubplus: '\\u2ABF',\n\tsubrarr: '\\u2979',\n\tSubset: '\\u22D0',\n\tsubset: '\\u2282',\n\tsubseteq: '\\u2286',\n\tsubseteqq: '\\u2AC5',\n\tSubsetEqual: '\\u2286',\n\tsubsetneq: '\\u228A',\n\tsubsetneqq: '\\u2ACB',\n\tsubsim: '\\u2AC7',\n\tsubsub: '\\u2AD5',\n\tsubsup: '\\u2AD3',\n\tsucc: '\\u227B',\n\tsuccapprox: '\\u2AB8',\n\tsucccurlyeq: '\\u227D',\n\tSucceeds: '\\u227B',\n\tSucceedsEqual: '\\u2AB0',\n\tSucceedsSlantEqual: '\\u227D',\n\tSucceedsTilde: '\\u227F',\n\tsucceq: '\\u2AB0',\n\tsuccnapprox: '\\u2ABA',\n\tsuccneqq: '\\u2AB6',\n\tsuccnsim: '\\u22E9',\n\tsuccsim: '\\u227F',\n\tSuchThat: '\\u220B',\n\tSum: '\\u2211',\n\tsum: '\\u2211',\n\tsung: '\\u266A',\n\tSup: '\\u22D1',\n\tsup: '\\u2283',\n\tsup1: '\\u00B9',\n\tsup2: '\\u00B2',\n\tsup3: '\\u00B3',\n\tsupdot: '\\u2ABE',\n\tsupdsub: '\\u2AD8',\n\tsupE: '\\u2AC6',\n\tsupe: '\\u2287',\n\tsupedot: '\\u2AC4',\n\tSuperset: '\\u2283',\n\tSupersetEqual: '\\u2287',\n\tsuphsol: '\\u27C9',\n\tsuphsub: '\\u2AD7',\n\tsuplarr: '\\u297B',\n\tsupmult: '\\u2AC2',\n\tsupnE: '\\u2ACC',\n\tsupne: '\\u228B',\n\tsupplus: '\\u2AC0',\n\tSupset: '\\u22D1',\n\tsupset: '\\u2283',\n\tsupseteq: '\\u2287',\n\tsupseteqq: '\\u2AC6',\n\tsupsetneq: '\\u228B',\n\tsupsetneqq: '\\u2ACC',\n\tsupsim: '\\u2AC8',\n\tsupsub: '\\u2AD4',\n\tsupsup: '\\u2AD6',\n\tswarhk: '\\u2926',\n\tswArr: '\\u21D9',\n\tswarr: '\\u2199',\n\tswarrow: '\\u2199',\n\tswnwar: '\\u292A',\n\tszlig: '\\u00DF',\n\tTab: '\\u0009',\n\ttarget: '\\u2316',\n\tTau: '\\u03A4',\n\ttau: '\\u03C4',\n\ttbrk: '\\u23B4',\n\tTcaron: '\\u0164',\n\ttcaron: '\\u0165',\n\tTcedil: '\\u0162',\n\ttcedil: '\\u0163',\n\tTcy: '\\u0422',\n\ttcy: '\\u0442',\n\ttdot: '\\u20DB',\n\ttelrec: '\\u2315',\n\tTfr: '\\uD835\\uDD17',\n\ttfr: '\\uD835\\uDD31',\n\tthere4: '\\u2234',\n\tTherefore: '\\u2234',\n\ttherefore: '\\u2234',\n\tTheta: '\\u0398',\n\ttheta: '\\u03B8',\n\tthetasym: '\\u03D1',\n\tthetav: '\\u03D1',\n\tthickapprox: '\\u2248',\n\tthicksim: '\\u223C',\n\tThickSpace: '\\u205F\\u200A',\n\tthinsp: '\\u2009',\n\tThinSpace: '\\u2009',\n\tthkap: '\\u2248',\n\tthksim: '\\u223C',\n\tTHORN: '\\u00DE',\n\tthorn: '\\u00FE',\n\tTilde: '\\u223C',\n\ttilde: '\\u02DC',\n\tTildeEqual: '\\u2243',\n\tTildeFullEqual: '\\u2245',\n\tTildeTilde: '\\u2248',\n\ttimes: '\\u00D7',\n\ttimesb: '\\u22A0',\n\ttimesbar: '\\u2A31',\n\ttimesd: '\\u2A30',\n\ttint: '\\u222D',\n\ttoea: '\\u2928',\n\ttop: '\\u22A4',\n\ttopbot: '\\u2336',\n\ttopcir: '\\u2AF1',\n\tTopf: '\\uD835\\uDD4B',\n\ttopf: '\\uD835\\uDD65',\n\ttopfork: '\\u2ADA',\n\ttosa: '\\u2929',\n\ttprime: '\\u2034',\n\tTRADE: '\\u2122',\n\ttrade: '\\u2122',\n\ttriangle: '\\u25B5',\n\ttriangledown: '\\u25BF',\n\ttriangleleft: '\\u25C3',\n\ttrianglelefteq: '\\u22B4',\n\ttriangleq: '\\u225C',\n\ttriangleright: '\\u25B9',\n\ttrianglerighteq: '\\u22B5',\n\ttridot: '\\u25EC',\n\ttrie: '\\u225C',\n\ttriminus: '\\u2A3A',\n\tTripleDot: '\\u20DB',\n\ttriplus: '\\u2A39',\n\ttrisb: '\\u29CD',\n\ttritime: '\\u2A3B',\n\ttrpezium: '\\u23E2',\n\tTscr: '\\uD835\\uDCAF',\n\ttscr: '\\uD835\\uDCC9',\n\tTScy: '\\u0426',\n\ttscy: '\\u0446',\n\tTSHcy: '\\u040B',\n\ttshcy: '\\u045B',\n\tTstrok: '\\u0166',\n\ttstrok: '\\u0167',\n\ttwixt: '\\u226C',\n\ttwoheadleftarrow: '\\u219E',\n\ttwoheadrightarrow: '\\u21A0',\n\tUacute: '\\u00DA',\n\tuacute: '\\u00FA',\n\tUarr: '\\u219F',\n\tuArr: '\\u21D1',\n\tuarr: '\\u2191',\n\tUarrocir: '\\u2949',\n\tUbrcy: '\\u040E',\n\tubrcy: '\\u045E',\n\tUbreve: '\\u016C',\n\tubreve: '\\u016D',\n\tUcirc: '\\u00DB',\n\tucirc: '\\u00FB',\n\tUcy: '\\u0423',\n\tucy: '\\u0443',\n\tudarr: '\\u21C5',\n\tUdblac: '\\u0170',\n\tudblac: '\\u0171',\n\tudhar: '\\u296E',\n\tufisht: '\\u297E',\n\tUfr: '\\uD835\\uDD18',\n\tufr: '\\uD835\\uDD32',\n\tUgrave: '\\u00D9',\n\tugrave: '\\u00F9',\n\tuHar: '\\u2963',\n\tuharl: '\\u21BF',\n\tuharr: '\\u21BE',\n\tuhblk: '\\u2580',\n\tulcorn: '\\u231C',\n\tulcorner: '\\u231C',\n\tulcrop: '\\u230F',\n\tultri: '\\u25F8',\n\tUmacr: '\\u016A',\n\tumacr: '\\u016B',\n\tuml: '\\u00A8',\n\tUnderBar: '\\u005F',\n\tUnderBrace: '\\u23DF',\n\tUnderBracket: '\\u23B5',\n\tUnderParenthesis: '\\u23DD',\n\tUnion: '\\u22C3',\n\tUnionPlus: '\\u228E',\n\tUogon: '\\u0172',\n\tuogon: '\\u0173',\n\tUopf: '\\uD835\\uDD4C',\n\tuopf: '\\uD835\\uDD66',\n\tUpArrow: '\\u2191',\n\tUparrow: '\\u21D1',\n\tuparrow: '\\u2191',\n\tUpArrowBar: '\\u2912',\n\tUpArrowDownArrow: '\\u21C5',\n\tUpDownArrow: '\\u2195',\n\tUpdownarrow: '\\u21D5',\n\tupdownarrow: '\\u2195',\n\tUpEquilibrium: '\\u296E',\n\tupharpoonleft: '\\u21BF',\n\tupharpoonright: '\\u21BE',\n\tuplus: '\\u228E',\n\tUpperLeftArrow: '\\u2196',\n\tUpperRightArrow: '\\u2197',\n\tUpsi: '\\u03D2',\n\tupsi: '\\u03C5',\n\tupsih: '\\u03D2',\n\tUpsilon: '\\u03A5',\n\tupsilon: '\\u03C5',\n\tUpTee: '\\u22A5',\n\tUpTeeArrow: '\\u21A5',\n\tupuparrows: '\\u21C8',\n\turcorn: '\\u231D',\n\turcorner: '\\u231D',\n\turcrop: '\\u230E',\n\tUring: '\\u016E',\n\turing: '\\u016F',\n\turtri: '\\u25F9',\n\tUscr: '\\uD835\\uDCB0',\n\tuscr: '\\uD835\\uDCCA',\n\tutdot: '\\u22F0',\n\tUtilde: '\\u0168',\n\tutilde: '\\u0169',\n\tutri: '\\u25B5',\n\tutrif: '\\u25B4',\n\tuuarr: '\\u21C8',\n\tUuml: '\\u00DC',\n\tuuml: '\\u00FC',\n\tuwangle: '\\u29A7',\n\tvangrt: '\\u299C',\n\tvarepsilon: '\\u03F5',\n\tvarkappa: '\\u03F0',\n\tvarnothing: '\\u2205',\n\tvarphi: '\\u03D5',\n\tvarpi: '\\u03D6',\n\tvarpropto: '\\u221D',\n\tvArr: '\\u21D5',\n\tvarr: '\\u2195',\n\tvarrho: '\\u03F1',\n\tvarsigma: '\\u03C2',\n\tvarsubsetneq: '\\u228A\\uFE00',\n\tvarsubsetneqq: '\\u2ACB\\uFE00',\n\tvarsupsetneq: '\\u228B\\uFE00',\n\tvarsupsetneqq: '\\u2ACC\\uFE00',\n\tvartheta: '\\u03D1',\n\tvartriangleleft: '\\u22B2',\n\tvartriangleright: '\\u22B3',\n\tVbar: '\\u2AEB',\n\tvBar: '\\u2AE8',\n\tvBarv: '\\u2AE9',\n\tVcy: '\\u0412',\n\tvcy: '\\u0432',\n\tVDash: '\\u22AB',\n\tVdash: '\\u22A9',\n\tvDash: '\\u22A8',\n\tvdash: '\\u22A2',\n\tVdashl: '\\u2AE6',\n\tVee: '\\u22C1',\n\tvee: '\\u2228',\n\tveebar: '\\u22BB',\n\tveeeq: '\\u225A',\n\tvellip: '\\u22EE',\n\tVerbar: '\\u2016',\n\tverbar: '\\u007C',\n\tVert: '\\u2016',\n\tvert: '\\u007C',\n\tVerticalBar: '\\u2223',\n\tVerticalLine: '\\u007C',\n\tVerticalSeparator: '\\u2758',\n\tVerticalTilde: '\\u2240',\n\tVeryThinSpace: '\\u200A',\n\tVfr: '\\uD835\\uDD19',\n\tvfr: '\\uD835\\uDD33',\n\tvltri: '\\u22B2',\n\tvnsub: '\\u2282\\u20D2',\n\tvnsup: '\\u2283\\u20D2',\n\tVopf: '\\uD835\\uDD4D',\n\tvopf: '\\uD835\\uDD67',\n\tvprop: '\\u221D',\n\tvrtri: '\\u22B3',\n\tVscr: '\\uD835\\uDCB1',\n\tvscr: '\\uD835\\uDCCB',\n\tvsubnE: '\\u2ACB\\uFE00',\n\tvsubne: '\\u228A\\uFE00',\n\tvsupnE: '\\u2ACC\\uFE00',\n\tvsupne: '\\u228B\\uFE00',\n\tVvdash: '\\u22AA',\n\tvzigzag: '\\u299A',\n\tWcirc: '\\u0174',\n\twcirc: '\\u0175',\n\twedbar: '\\u2A5F',\n\tWedge: '\\u22C0',\n\twedge: '\\u2227',\n\twedgeq: '\\u2259',\n\tweierp: '\\u2118',\n\tWfr: '\\uD835\\uDD1A',\n\twfr: '\\uD835\\uDD34',\n\tWopf: '\\uD835\\uDD4E',\n\twopf: '\\uD835\\uDD68',\n\twp: '\\u2118',\n\twr: '\\u2240',\n\twreath: '\\u2240',\n\tWscr: '\\uD835\\uDCB2',\n\twscr: '\\uD835\\uDCCC',\n\txcap: '\\u22C2',\n\txcirc: '\\u25EF',\n\txcup: '\\u22C3',\n\txdtri: '\\u25BD',\n\tXfr: '\\uD835\\uDD1B',\n\txfr: '\\uD835\\uDD35',\n\txhArr: '\\u27FA',\n\txharr: '\\u27F7',\n\tXi: '\\u039E',\n\txi: '\\u03BE',\n\txlArr: '\\u27F8',\n\txlarr: '\\u27F5',\n\txmap: '\\u27FC',\n\txnis: '\\u22FB',\n\txodot: '\\u2A00',\n\tXopf: '\\uD835\\uDD4F',\n\txopf: '\\uD835\\uDD69',\n\txoplus: '\\u2A01',\n\txotime: '\\u2A02',\n\txrArr: '\\u27F9',\n\txrarr: '\\u27F6',\n\tXscr: '\\uD835\\uDCB3',\n\txscr: '\\uD835\\uDCCD',\n\txsqcup: '\\u2A06',\n\txuplus: '\\u2A04',\n\txutri: '\\u25B3',\n\txvee: '\\u22C1',\n\txwedge: '\\u22C0',\n\tYacute: '\\u00DD',\n\tyacute: '\\u00FD',\n\tYAcy: '\\u042F',\n\tyacy: '\\u044F',\n\tYcirc: '\\u0176',\n\tycirc: '\\u0177',\n\tYcy: '\\u042B',\n\tycy: '\\u044B',\n\tyen: '\\u00A5',\n\tYfr: '\\uD835\\uDD1C',\n\tyfr: '\\uD835\\uDD36',\n\tYIcy: '\\u0407',\n\tyicy: '\\u0457',\n\tYopf: '\\uD835\\uDD50',\n\tyopf: '\\uD835\\uDD6A',\n\tYscr: '\\uD835\\uDCB4',\n\tyscr: '\\uD835\\uDCCE',\n\tYUcy: '\\u042E',\n\tyucy: '\\u044E',\n\tYuml: '\\u0178',\n\tyuml: '\\u00FF',\n\tZacute: '\\u0179',\n\tzacute: '\\u017A',\n\tZcaron: '\\u017D',\n\tzcaron: '\\u017E',\n\tZcy: '\\u0417',\n\tzcy: '\\u0437',\n\tZdot: '\\u017B',\n\tzdot: '\\u017C',\n\tzeetrf: '\\u2128',\n\tZeroWidthSpace: '\\u200B',\n\tZeta: '\\u0396',\n\tzeta: '\\u03B6',\n\tZfr: '\\u2128',\n\tzfr: '\\uD835\\uDD37',\n\tZHcy: '\\u0416',\n\tzhcy: '\\u0436',\n\tzigrarr: '\\u21DD',\n\tZopf: '\\u2124',\n\tzopf: '\\uD835\\uDD6B',\n\tZscr: '\\uD835\\uDCB5',\n\tzscr: '\\uD835\\uDCCF',\n\tzwj: '\\u200D',\n\tzwnj: '\\u200C',\n});\n\n/**\n * @deprecated use `HTML_ENTITIES` instead\n * @see HTML_ENTITIES\n */\nexports.entityMap = exports.HTML_ENTITIES;\n", "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\tthis.message = message\n\tthis.locator = locator\n\tif(Error.captureStackTrace) Error.captureStackTrace(this, ParseError);\n}\nParseError.prototype = new Error();\nParseError.prototype.name = ParseError.name\n\nfunction XMLReader(){\n\n}\n\nXMLReader.prototype = {\n\tparse:function(source,defaultNSMap,entityMap){\n\t\tvar domBuilder = this.domBuilder;\n\t\tdomBuilder.startDocument();\n\t\t_copy(defaultNSMap ,defaultNSMap = {})\n\t\tparse(source,defaultNSMap,entityMap,\n\t\t\t\tdomBuilder,this.errorHandler);\n\t\tdomBuilder.endDocument();\n\t}\n}\nfunction parse(source,defaultNSMapCopy,entityMap,domBuilder,errorHandler){\n\tfunction fixedFromCharCode(code) {\n\t\t// String.prototype.fromCharCode does not supports\n\t\t// > 2 bytes unicode chars directly\n\t\tif (code > 0xffff) {\n\t\t\tcode -= 0x10000;\n\t\t\tvar surrogate1 = 0xd800 + (code >> 10)\n\t\t\t\t, surrogate2 = 0xdc00 + (code & 0x3ff);\n\n\t\t\treturn String.fromCharCode(surrogate1, surrogate2);\n\t\t} else {\n\t\t\treturn String.fromCharCode(code);\n\t\t}\n\t}\n\tfunction entityReplacer(a){\n\t\tvar k = a.slice(1,-1);\n\t\tif (Object.hasOwnProperty.call(entityMap, k)) {\n\t\t\treturn entityMap[k];\n\t\t}else if(k.charAt(0) === '#'){\n\t\t\treturn fixedFromCharCode(parseInt(k.substr(1).replace('x','0x')))\n\t\t}else{\n\t\t\terrorHandler.error('entity not found:'+a);\n\t\t\treturn a;\n\t\t}\n\t}\n\tfunction appendText(end){//has some bugs\n\t\tif(end>start){\n\t\t\tvar xt = source.substring(start,end).replace(/&#?\\w+;/g,entityReplacer);\n\t\t\tlocator&&position(start);\n\t\t\tdomBuilder.characters(xt,0,end-start);\n\t\t\tstart = end\n\t\t}\n\t}\n\tfunction position(p,m){\n\t\twhile(p>=lineEnd && (m = linePattern.exec(source))){\n\t\t\tlineStart = m.index;\n\t\t\tlineEnd = lineStart + m[0].length;\n\t\t\tlocator.lineNumber++;\n\t\t\t//console.log('line++:',locator,startPos,endPos)\n\t\t}\n\t\tlocator.columnNumber = p-lineStart+1;\n\t}\n\tvar lineStart = 0;\n\tvar lineEnd = 0;\n\tvar linePattern = /.*(?:\\r\\n?|\\n)|.*$/g\n\tvar locator = domBuilder.locator;\n\n\tvar parseStack = [{currentNSMap:defaultNSMapCopy}]\n\tvar closeMap = {};\n\tvar start = 0;\n\twhile(true){\n\t\ttry{\n\t\t\tvar tagStart = source.indexOf('<',start);\n\t\t\tif(tagStart<0){\n\t\t\t\tif(!source.substr(start).match(/^\\s*$/)){\n\t\t\t\t\tvar doc = domBuilder.doc;\n\t    \t\t\tvar text = doc.createTextNode(source.substr(start));\n\t    \t\t\tdoc.appendChild(text);\n\t    \t\t\tdomBuilder.currentElement = text;\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif(tagStart>start){\n\t\t\t\tappendText(tagStart);\n\t\t\t}\n\t\t\tswitch(source.charAt(tagStart+1)){\n\t\t\tcase '/':\n\t\t\t\tvar end = source.indexOf('>',tagStart+3);\n\t\t\t\tvar tagName = source.substring(tagStart + 2, end).replace(/[ \\t\\n\\r]+$/g, '');\n\t\t\t\tvar config = parseStack.pop();\n\t\t\t\tif(end<0){\n\n\t        \t\ttagName = source.substring(tagStart+2).replace(/[\\s<].*/,'');\n\t        \t\terrorHandler.error(\"end tag name: \"+tagName+' is not complete:'+config.tagName);\n\t        \t\tend = tagStart+1+tagName.length;\n\t        \t}else if(tagName.match(/\\s</)){\n\t        \t\ttagName = tagName.replace(/[\\s<].*/,'');\n\t        \t\terrorHandler.error(\"end tag name: \"+tagName+' maybe not complete');\n\t        \t\tend = tagStart+1+tagName.length;\n\t\t\t\t}\n\t\t\t\tvar localNSMap = config.localNSMap;\n\t\t\t\tvar endMatch = config.tagName == tagName;\n\t\t\t\tvar endIgnoreCaseMach = endMatch || config.tagName&&config.tagName.toLowerCase() == tagName.toLowerCase()\n\t\t        if(endIgnoreCaseMach){\n\t\t        \tdomBuilder.endElement(config.uri,config.localName,tagName);\n\t\t\t\t\tif(localNSMap){\n\t\t\t\t\t\tfor (var prefix in localNSMap) {\n\t\t\t\t\t\t\tif (Object.prototype.hasOwnProperty.call(localNSMap, prefix)) {\n\t\t\t\t\t\t\t\tdomBuilder.endPrefixMapping(prefix);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(!endMatch){\n\t\t            \terrorHandler.fatalError(\"end tag name: \"+tagName+' is not match the current start tagName:'+config.tagName ); // No known test case\n\t\t\t\t\t}\n\t\t        }else{\n\t\t        \tparseStack.push(config)\n\t\t        }\n\n\t\t\t\tend++;\n\t\t\t\tbreak;\n\t\t\t\t// end elment\n\t\t\tcase '?':// <?...?>\n\t\t\t\tlocator&&position(tagStart);\n\t\t\t\tend = parseInstruction(source,tagStart,domBuilder);\n\t\t\t\tbreak;\n\t\t\tcase '!':// <!doctype,<![CDATA,<!--\n\t\t\t\tlocator&&position(tagStart);\n\t\t\t\tend = parseDCC(source,tagStart,domBuilder,errorHandler);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tlocator&&position(tagStart);\n\t\t\t\tvar el = new ElementAttributes();\n\t\t\t\tvar currentNSMap = parseStack[parseStack.length-1].currentNSMap;\n\t\t\t\t//elStartEnd\n\t\t\t\tvar end = parseElementStartPart(source,tagStart,el,currentNSMap,entityReplacer,errorHandler);\n\t\t\t\tvar len = el.length;\n\n\n\t\t\t\tif(!el.closed && fixSelfClosed(source,end,el.tagName,closeMap)){\n\t\t\t\t\tel.closed = true;\n\t\t\t\t\tif(!entityMap.nbsp){\n\t\t\t\t\t\terrorHandler.warning('unclosed xml attribute');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(locator && len){\n\t\t\t\t\tvar locator2 = copyLocator(locator,{});\n\t\t\t\t\t//try{//attribute position fixed\n\t\t\t\t\tfor(var i = 0;i<len;i++){\n\t\t\t\t\t\tvar a = el[i];\n\t\t\t\t\t\tposition(a.offset);\n\t\t\t\t\t\ta.locator = copyLocator(locator,{});\n\t\t\t\t\t}\n\t\t\t\t\tdomBuilder.locator = locator2\n\t\t\t\t\tif(appendElement(el,domBuilder,currentNSMap)){\n\t\t\t\t\t\tparseStack.push(el)\n\t\t\t\t\t}\n\t\t\t\t\tdomBuilder.locator = locator;\n\t\t\t\t}else{\n\t\t\t\t\tif(appendElement(el,domBuilder,currentNSMap)){\n\t\t\t\t\t\tparseStack.push(el)\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (NAMESPACE.isHTML(el.uri) && !el.closed) {\n\t\t\t\t\tend = parseHtmlSpecialContent(source,end,el.tagName,entityReplacer,domBuilder)\n\t\t\t\t} else {\n\t\t\t\t\tend++;\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(e){\n\t\t\tif (e instanceof ParseError) {\n\t\t\t\tthrow e;\n\t\t\t}\n\t\t\terrorHandler.error('element parse error: '+e)\n\t\t\tend = -1;\n\t\t}\n\t\tif(end>start){\n\t\t\tstart = end;\n\t\t}else{\n\t\t\t//TODO: \u8FD9\u91CC\u6709\u53EF\u80FDsax\u56DE\u9000\uFF0C\u6709\u4F4D\u7F6E\u9519\u8BEF\u98CE\u9669\n\t\t\tappendText(Math.max(tagStart,start)+1);\n\t\t}\n\t}\n}\nfunction copyLocator(f,t){\n\tt.lineNumber = f.lineNumber;\n\tt.columnNumber = f.columnNumber;\n\treturn 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\t/**\n\t * @param {string} qname\n\t * @param {string} value\n\t * @param {number} startIndex\n\t */\n\tfunction addAttribute(qname, value, startIndex) {\n\t\tif (el.attributeNames.hasOwnProperty(qname)) {\n\t\t\terrorHandler.fatalError('Attribute ' + qname + ' redefined')\n\t\t}\n\t\tel.addValue(\n\t\t\tqname,\n\t\t\t// @see https://www.w3.org/TR/xml/#AVNormalize\n\t\t\t// since the xmldom sax parser does not \"interpret\" DTD the following is not implemented:\n\t\t\t// - recursive replacement of (DTD) entity references\n\t\t\t// - trimming and collapsing multiple spaces into a single one for attributes that are not of type CDATA\n\t\t\tvalue.replace(/[\\t\\n\\r]/g, ' ').replace(/&#?\\w+;/g, entityReplacer),\n\t\t\tstartIndex\n\t\t)\n\t}\n\tvar attrName;\n\tvar value;\n\tvar p = ++start;\n\tvar s = S_TAG;//status\n\twhile(true){\n\t\tvar c = source.charAt(p);\n\t\tswitch(c){\n\t\tcase '=':\n\t\t\tif(s === S_ATTR){//attrName\n\t\t\t\tattrName = source.slice(start,p);\n\t\t\t\ts = S_EQ;\n\t\t\t}else if(s === S_ATTR_SPACE){\n\t\t\t\ts = S_EQ;\n\t\t\t}else{\n\t\t\t\t//fatalError: equal must after attrName or space after attrName\n\t\t\t\tthrow new Error('attribute equal must after attrName'); // No known test case\n\t\t\t}\n\t\t\tbreak;\n\t\tcase '\\'':\n\t\tcase '\"':\n\t\t\tif(s === S_EQ || s === S_ATTR //|| s == S_ATTR_SPACE\n\t\t\t\t){//equal\n\t\t\t\tif(s === S_ATTR){\n\t\t\t\t\terrorHandler.warning('attribute value must after \"=\"')\n\t\t\t\t\tattrName = source.slice(start,p)\n\t\t\t\t}\n\t\t\t\tstart = p+1;\n\t\t\t\tp = source.indexOf(c,start)\n\t\t\t\tif(p>0){\n\t\t\t\t\tvalue = source.slice(start, p);\n\t\t\t\t\taddAttribute(attrName, value, start-1);\n\t\t\t\t\ts = S_ATTR_END;\n\t\t\t\t}else{\n\t\t\t\t\t//fatalError: no end quot match\n\t\t\t\t\tthrow new Error('attribute value no end \\''+c+'\\' match');\n\t\t\t\t}\n\t\t\t}else if(s == S_ATTR_NOQUOT_VALUE){\n\t\t\t\tvalue = source.slice(start, p);\n\t\t\t\taddAttribute(attrName, value, start);\n\t\t\t\terrorHandler.warning('attribute \"'+attrName+'\" missed start quot('+c+')!!');\n\t\t\t\tstart = p+1;\n\t\t\t\ts = S_ATTR_END\n\t\t\t}else{\n\t\t\t\t//fatalError: no equal before\n\t\t\t\tthrow new Error('attribute value must after \"=\"'); // No known test case\n\t\t\t}\n\t\t\tbreak;\n\t\tcase '/':\n\t\t\tswitch(s){\n\t\t\tcase S_TAG:\n\t\t\t\tel.setTagName(source.slice(start,p));\n\t\t\tcase S_ATTR_END:\n\t\t\tcase S_TAG_SPACE:\n\t\t\tcase S_TAG_CLOSE:\n\t\t\t\ts =S_TAG_CLOSE;\n\t\t\t\tel.closed = true;\n\t\t\tcase S_ATTR_NOQUOT_VALUE:\n\t\t\tcase S_ATTR:\n\t\t\t\tbreak;\n\t\t\t\tcase S_ATTR_SPACE:\n\t\t\t\t\tel.closed = true;\n\t\t\t\tbreak;\n\t\t\t//case S_EQ:\n\t\t\tdefault:\n\t\t\t\tthrow new Error(\"attribute invalid close char('/')\") // No known test case\n\t\t\t}\n\t\t\tbreak;\n\t\tcase ''://end document\n\t\t\terrorHandler.error('unexpected end of input');\n\t\t\tif(s == S_TAG){\n\t\t\t\tel.setTagName(source.slice(start,p));\n\t\t\t}\n\t\t\treturn p;\n\t\tcase '>':\n\t\t\tswitch(s){\n\t\t\tcase S_TAG:\n\t\t\t\tel.setTagName(source.slice(start,p));\n\t\t\tcase S_ATTR_END:\n\t\t\tcase S_TAG_SPACE:\n\t\t\tcase S_TAG_CLOSE:\n\t\t\t\tbreak;//normal\n\t\t\tcase S_ATTR_NOQUOT_VALUE://Compatible state\n\t\t\tcase S_ATTR:\n\t\t\t\tvalue = source.slice(start,p);\n\t\t\t\tif(value.slice(-1) === '/'){\n\t\t\t\t\tel.closed  = true;\n\t\t\t\t\tvalue = value.slice(0,-1)\n\t\t\t\t}\n\t\t\tcase S_ATTR_SPACE:\n\t\t\t\tif(s === S_ATTR_SPACE){\n\t\t\t\t\tvalue = attrName;\n\t\t\t\t}\n\t\t\t\tif(s == S_ATTR_NOQUOT_VALUE){\n\t\t\t\t\terrorHandler.warning('attribute \"'+value+'\" missed quot(\")!');\n\t\t\t\t\taddAttribute(attrName, value, start)\n\t\t\t\t}else{\n\t\t\t\t\tif(!NAMESPACE.isHTML(currentNSMap['']) || !value.match(/^(?:disabled|checked|selected)$/i)){\n\t\t\t\t\t\terrorHandler.warning('attribute \"'+value+'\" missed value!! \"'+value+'\" instead!!')\n\t\t\t\t\t}\n\t\t\t\t\taddAttribute(value, value, start)\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase S_EQ:\n\t\t\t\tthrow new Error('attribute value missed!!');\n\t\t\t}\n//\t\t\tconsole.log(tagName,tagNamePattern,tagNamePattern.test(tagName))\n\t\t\treturn p;\n\t\t/*xml space '\\x20' | #x9 | #xD | #xA; */\n\t\tcase '\\u0080':\n\t\t\tc = ' ';\n\t\tdefault:\n\t\t\tif(c<= ' '){//space\n\t\t\t\tswitch(s){\n\t\t\t\tcase S_TAG:\n\t\t\t\t\tel.setTagName(source.slice(start,p));//tagName\n\t\t\t\t\ts = S_TAG_SPACE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S_ATTR:\n\t\t\t\t\tattrName = source.slice(start,p)\n\t\t\t\t\ts = S_ATTR_SPACE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S_ATTR_NOQUOT_VALUE:\n\t\t\t\t\tvar value = source.slice(start, p);\n\t\t\t\t\terrorHandler.warning('attribute \"'+value+'\" missed quot(\")!!');\n\t\t\t\t\taddAttribute(attrName, value, start)\n\t\t\t\tcase S_ATTR_END:\n\t\t\t\t\ts = S_TAG_SPACE;\n\t\t\t\t\tbreak;\n\t\t\t\t//case S_TAG_SPACE:\n\t\t\t\t//case S_EQ:\n\t\t\t\t//case S_ATTR_SPACE:\n\t\t\t\t//\tvoid();break;\n\t\t\t\t//case S_TAG_CLOSE:\n\t\t\t\t\t//ignore warning\n\t\t\t\t}\n\t\t\t}else{//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\t\t\t\tswitch(s){\n\t\t\t\t//case S_TAG:void();break;\n\t\t\t\t//case S_ATTR:void();break;\n\t\t\t\t//case S_ATTR_NOQUOT_VALUE:void();break;\n\t\t\t\tcase S_ATTR_SPACE:\n\t\t\t\t\tvar tagName =  el.tagName;\n\t\t\t\t\tif (!NAMESPACE.isHTML(currentNSMap['']) || !attrName.match(/^(?:disabled|checked|selected)$/i)) {\n\t\t\t\t\t\terrorHandler.warning('attribute \"'+attrName+'\" missed value!! \"'+attrName+'\" instead2!!')\n\t\t\t\t\t}\n\t\t\t\t\taddAttribute(attrName, attrName, start);\n\t\t\t\t\tstart = p;\n\t\t\t\t\ts = S_ATTR;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S_ATTR_END:\n\t\t\t\t\terrorHandler.warning('attribute space is required\"'+attrName+'\"!!')\n\t\t\t\tcase S_TAG_SPACE:\n\t\t\t\t\ts = S_ATTR;\n\t\t\t\t\tstart = p;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S_EQ:\n\t\t\t\t\ts = S_ATTR_NOQUOT_VALUE;\n\t\t\t\t\tstart = p;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S_TAG_CLOSE:\n\t\t\t\t\tthrow new Error(\"elements closed character '/' and '>' must be connected to\");\n\t\t\t\t}\n\t\t\t}\n\t\t}//end outer switch\n\t\t//console.log('p++',p)\n\t\tp++;\n\t}\n}\n/**\n * @return true if has new namespace define\n */\nfunction appendElement(el,domBuilder,currentNSMap){\n\tvar tagName = el.tagName;\n\tvar localNSMap = null;\n\t//var currentNSMap = parseStack[parseStack.length-1].currentNSMap;\n\tvar i = el.length;\n\twhile(i--){\n\t\tvar a = el[i];\n\t\tvar qName = a.qName;\n\t\tvar value = a.value;\n\t\tvar nsp = qName.indexOf(':');\n\t\tif(nsp>0){\n\t\t\tvar prefix = a.prefix = qName.slice(0,nsp);\n\t\t\tvar localName = qName.slice(nsp+1);\n\t\t\tvar nsPrefix = prefix === 'xmlns' && localName\n\t\t}else{\n\t\t\tlocalName = qName;\n\t\t\tprefix = null\n\t\t\tnsPrefix = qName === 'xmlns' && ''\n\t\t}\n\t\t//can not set prefix,because prefix !== ''\n\t\ta.localName = localName ;\n\t\t//prefix == null for no ns prefix attribute\n\t\tif(nsPrefix !== false){//hack!!\n\t\t\tif(localNSMap == null){\n\t\t\t\tlocalNSMap = {}\n\t\t\t\t//console.log(currentNSMap,0)\n\t\t\t\t_copy(currentNSMap,currentNSMap={})\n\t\t\t\t//console.log(currentNSMap,1)\n\t\t\t}\n\t\t\tcurrentNSMap[nsPrefix] = localNSMap[nsPrefix] = value;\n\t\t\ta.uri = NAMESPACE.XMLNS\n\t\t\tdomBuilder.startPrefixMapping(nsPrefix, value)\n\t\t}\n\t}\n\tvar i = el.length;\n\twhile(i--){\n\t\ta = el[i];\n\t\tvar prefix = a.prefix;\n\t\tif(prefix){//no prefix attribute has no namespace\n\t\t\tif(prefix === 'xml'){\n\t\t\t\ta.uri = NAMESPACE.XML;\n\t\t\t}if(prefix !== 'xmlns'){\n\t\t\t\ta.uri = currentNSMap[prefix || '']\n\n\t\t\t\t//{console.log('###'+a.qName,domBuilder.locator.systemId+'',currentNSMap,a.uri)}\n\t\t\t}\n\t\t}\n\t}\n\tvar nsp = tagName.indexOf(':');\n\tif(nsp>0){\n\t\tprefix = el.prefix = tagName.slice(0,nsp);\n\t\tlocalName = el.localName = tagName.slice(nsp+1);\n\t}else{\n\t\tprefix = null;//important!!\n\t\tlocalName = el.localName = tagName;\n\t}\n\t//no prefix element has default namespace\n\tvar ns = el.uri = currentNSMap[prefix || ''];\n\tdomBuilder.startElement(ns,localName,tagName,el);\n\t//endPrefixMapping and startPrefixMapping have not any help for dom builder\n\t//localNSMap = null\n\tif(el.closed){\n\t\tdomBuilder.endElement(ns,localName,tagName);\n\t\tif(localNSMap){\n\t\t\tfor (prefix in localNSMap) {\n\t\t\t\tif (Object.prototype.hasOwnProperty.call(localNSMap, prefix)) {\n\t\t\t\t\tdomBuilder.endPrefixMapping(prefix);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}else{\n\t\tel.currentNSMap = currentNSMap;\n\t\tel.localNSMap = localNSMap;\n\t\t//parseStack.push(el);\n\t\treturn true;\n\t}\n}\nfunction parseHtmlSpecialContent(source,elStartEnd,tagName,entityReplacer,domBuilder){\n\tif(/^(?:script|textarea)$/i.test(tagName)){\n\t\tvar elEndStart =  source.indexOf('</'+tagName+'>',elStartEnd);\n\t\tvar text = source.substring(elStartEnd+1,elEndStart);\n\t\tif(/[&<]/.test(text)){\n\t\t\tif(/^script$/i.test(tagName)){\n\t\t\t\t//if(!/\\]\\]>/.test(text)){\n\t\t\t\t\t//lexHandler.startCDATA();\n\t\t\t\t\tdomBuilder.characters(text,0,text.length);\n\t\t\t\t\t//lexHandler.endCDATA();\n\t\t\t\t\treturn elEndStart;\n\t\t\t\t//}\n\t\t\t}//}else{//text area\n\t\t\t\ttext = text.replace(/&#?\\w+;/g,entityReplacer);\n\t\t\t\tdomBuilder.characters(text,0,text.length);\n\t\t\t\treturn elEndStart;\n\t\t\t//}\n\n\t\t}\n\t}\n\treturn elStartEnd+1;\n}\nfunction fixSelfClosed(source,elStartEnd,tagName,closeMap){\n\t//if(tagName in closeMap){\n\tvar pos = closeMap[tagName];\n\tif(pos == null){\n\t\t//console.log(tagName)\n\t\tpos =  source.lastIndexOf('</'+tagName+'>')\n\t\tif(pos<elStartEnd){//\u5FD8\u8BB0\u95ED\u5408\n\t\t\tpos = source.lastIndexOf('</'+tagName)\n\t\t}\n\t\tcloseMap[tagName] =pos\n\t}\n\treturn pos<elStartEnd;\n\t//}\n}\n\nfunction _copy (source, target) {\n\tfor (var n in source) {\n\t\tif (Object.prototype.hasOwnProperty.call(source, n)) {\n\t\t\ttarget[n] = source[n];\n\t\t}\n\t}\n}\n\nfunction parseDCC(source,start,domBuilder,errorHandler){//sure start with '<!'\n\tvar next= source.charAt(start+2)\n\tswitch(next){\n\tcase '-':\n\t\tif(source.charAt(start + 3) === '-'){\n\t\t\tvar end = source.indexOf('-->',start+4);\n\t\t\t//append comment source.substring(4,end)//<!--\n\t\t\tif(end>start){\n\t\t\t\tdomBuilder.comment(source,start+4,end-start-4);\n\t\t\t\treturn end+3;\n\t\t\t}else{\n\t\t\t\terrorHandler.error(\"Unclosed comment\");\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}else{\n\t\t\t//error\n\t\t\treturn -1;\n\t\t}\n\tdefault:\n\t\tif(source.substr(start+3,6) == 'CDATA['){\n\t\t\tvar end = source.indexOf(']]>',start+9);\n\t\t\tdomBuilder.startCDATA();\n\t\t\tdomBuilder.characters(source,start+9,end-start-9);\n\t\t\tdomBuilder.endCDATA()\n\t\t\treturn end+3;\n\t\t}\n\t\t//<!DOCTYPE\n\t\t//startDTD(java.lang.String name, java.lang.String publicId, java.lang.String systemId)\n\t\tvar matchs = split(source,start);\n\t\tvar len = matchs.length;\n\t\tif(len>1 && /!doctype/i.test(matchs[0][0])){\n\t\t\tvar name = matchs[1][0];\n\t\t\tvar pubid = false;\n\t\t\tvar sysid = false;\n\t\t\tif(len>3){\n\t\t\t\tif(/^public$/i.test(matchs[2][0])){\n\t\t\t\t\tpubid = matchs[3][0];\n\t\t\t\t\tsysid = len>4 && matchs[4][0];\n\t\t\t\t}else if(/^system$/i.test(matchs[2][0])){\n\t\t\t\t\tsysid = matchs[3][0];\n\t\t\t\t}\n\t\t\t}\n\t\t\tvar lastMatch = matchs[len-1]\n\t\t\tdomBuilder.startDTD(name, pubid, sysid);\n\t\t\tdomBuilder.endDTD();\n\n\t\t\treturn lastMatch.index+lastMatch[0].length\n\t\t}\n\t}\n\treturn -1;\n}\n\n\n\nfunction parseInstruction(source,start,domBuilder){\n\tvar end = source.indexOf('?>',start);\n\tif(end){\n\t\tvar match = source.substring(start,end).match(/^<\\?(\\S*)\\s*([\\s\\S]*?)\\s*$/);\n\t\tif(match){\n\t\t\tvar len = match[0].length;\n\t\t\tdomBuilder.processingInstruction(match[1], match[2]) ;\n\t\t\treturn end+2;\n\t\t}else{//error\n\t\t\treturn -1;\n\t\t}\n\t}\n\treturn -1;\n}\n\nfunction ElementAttributes(){\n\tthis.attributeNames = {}\n}\nElementAttributes.prototype = {\n\tsetTagName:function(tagName){\n\t\tif(!tagNamePattern.test(tagName)){\n\t\t\tthrow new Error('invalid tagName:'+tagName)\n\t\t}\n\t\tthis.tagName = tagName\n\t},\n\taddValue:function(qName, value, offset) {\n\t\tif(!tagNamePattern.test(qName)){\n\t\t\tthrow new Error('invalid attribute:'+qName)\n\t\t}\n\t\tthis.attributeNames[qName] = this.length;\n\t\tthis[this.length++] = {qName:qName,value:value,offset:offset}\n\t},\n\tlength:0,\n\tgetLocalName:function(i){return this[i].localName},\n\tgetLocator:function(i){return this[i].locator},\n\tgetQName:function(i){return this[i].qName},\n\tgetURI:function(i){return this[i].uri},\n\tgetValue:function(i){return this[i].value}\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}\n\n\n\nfunction split(source,start){\n\tvar match;\n\tvar buf = [];\n\tvar reg = /'[^']+'|\"[^\"]+\"|[^\\s<>\\/=]+=?|(\\/?\\s*>|<)/g;\n\treg.lastIndex = start;\n\treg.exec(source);//skip <\n\twhile(match = reg.exec(source)){\n\t\tbuf.push(match);\n\t\tif(match[1])return buf;\n\t}\n}\n\nexports.XMLReader = XMLReader;\nexports.ParseError = ParseError;\n", "var conventions = require(\"./conventions\");\nvar dom = require('./dom')\nvar entities = require('./entities');\nvar sax = require('./sax');\n\nvar DOMImplementation = dom.DOMImplementation;\n\nvar NAMESPACE = conventions.NAMESPACE;\n\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\treturn input\n\t\t.replace(/\\r[\\n\\u0085]/g, '\\n')\n\t\t.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\tthis.options = options ||{locator:{}};\n}\n\nDOMParser.prototype.parseFromString = function(source,mimeType){\n\tvar options = this.options;\n\tvar sax =  new XMLReader();\n\tvar domBuilder = options.domBuilder || new DOMHandler();//contentHandler and LexicalHandler\n\tvar errorHandler = options.errorHandler;\n\tvar locator = options.locator;\n\tvar defaultNSMap = options.xmlns||{};\n\tvar isHTML = /\\/x?html?$/.test(mimeType);//mimeType.toLowerCase().indexOf('html') > -1;\n  \tvar entityMap = isHTML ? entities.HTML_ENTITIES : entities.XML_ENTITIES;\n\tif(locator){\n\t\tdomBuilder.setDocumentLocator(locator)\n\t}\n\n\tsax.errorHandler = buildErrorHandler(errorHandler,domBuilder,locator);\n\tsax.domBuilder = options.domBuilder || domBuilder;\n\tif(isHTML){\n\t\tdefaultNSMap[''] = NAMESPACE.HTML;\n\t}\n\tdefaultNSMap.xml = defaultNSMap.xml || NAMESPACE.XML;\n\tvar normalize = options.normalizeLineEndings || normalizeLineEndings;\n\tif (source && typeof source === 'string') {\n\t\tsax.parse(\n\t\t\tnormalize(source),\n\t\t\tdefaultNSMap,\n\t\t\tentityMap\n\t\t)\n\t} else {\n\t\tsax.errorHandler.error('invalid doc source')\n\t}\n\treturn domBuilder.doc;\n}\nfunction buildErrorHandler(errorImpl,domBuilder,locator){\n\tif(!errorImpl){\n\t\tif(domBuilder instanceof DOMHandler){\n\t\t\treturn domBuilder;\n\t\t}\n\t\terrorImpl = domBuilder ;\n\t}\n\tvar errorHandler = {}\n\tvar isCallback = errorImpl instanceof Function;\n\tlocator = locator||{}\n\tfunction build(key){\n\t\tvar fn = errorImpl[key];\n\t\tif(!fn && isCallback){\n\t\t\tfn = errorImpl.length == 2?function(msg){errorImpl(key,msg)}:errorImpl;\n\t\t}\n\t\terrorHandler[key] = fn && function(msg){\n\t\t\tfn('[xmldom '+key+']\\t'+msg+_locator(locator));\n\t\t}||function(){};\n\t}\n\tbuild('warning');\n\tbuild('error');\n\tbuild('fatalError');\n\treturn 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\tnode.lineNumber = locator.lineNumber;\n\tnode.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\tstartDocument : function() {\n    \tthis.doc = new DOMImplementation().createDocument(null, null, null);\n    \tif (this.locator) {\n        \tthis.doc.documentURI = this.locator.systemId;\n    \t}\n\t},\n\tstartElement:function(namespaceURI, localName, qName, attrs) {\n\t\tvar doc = this.doc;\n\t    var el = doc.createElementNS(namespaceURI, qName||localName);\n\t    var len = attrs.length;\n\t    appendElement(this, el);\n\t    this.currentElement = el;\n\n\t\tthis.locator && position(this.locator,el)\n\t    for (var i = 0 ; i < len; i++) {\n\t        var namespaceURI = attrs.getURI(i);\n\t        var value = attrs.getValue(i);\n\t        var qName = attrs.getQName(i);\n\t\t\tvar attr = doc.createAttributeNS(namespaceURI, qName);\n\t\t\tthis.locator &&position(attrs.getLocator(i),attr);\n\t\t\tattr.value = attr.nodeValue = value;\n\t\t\tel.setAttributeNode(attr)\n\t    }\n\t},\n\tendElement:function(namespaceURI, localName, qName) {\n\t\tvar current = this.currentElement\n\t\tvar tagName = current.tagName;\n\t\tthis.currentElement = current.parentNode;\n\t},\n\tstartPrefixMapping:function(prefix, uri) {\n\t},\n\tendPrefixMapping:function(prefix) {\n\t},\n\tprocessingInstruction:function(target, data) {\n\t    var ins = this.doc.createProcessingInstruction(target, data);\n\t    this.locator && position(this.locator,ins)\n\t    appendElement(this, ins);\n\t},\n\tignorableWhitespace:function(ch, start, length) {\n\t},\n\tcharacters:function(chars, start, length) {\n\t\tchars = _toString.apply(this,arguments)\n\t\t//console.log(chars)\n\t\tif(chars){\n\t\t\tif (this.cdata) {\n\t\t\t\tvar charNode = this.doc.createCDATASection(chars);\n\t\t\t} else {\n\t\t\t\tvar charNode = this.doc.createTextNode(chars);\n\t\t\t}\n\t\t\tif(this.currentElement){\n\t\t\t\tthis.currentElement.appendChild(charNode);\n\t\t\t}else if(/^\\s*$/.test(chars)){\n\t\t\t\tthis.doc.appendChild(charNode);\n\t\t\t\t//process xml\n\t\t\t}\n\t\t\tthis.locator && position(this.locator,charNode)\n\t\t}\n\t},\n\tskippedEntity:function(name) {\n\t},\n\tendDocument:function() {\n\t\tthis.doc.normalize();\n\t},\n\tsetDocumentLocator:function (locator) {\n\t    if(this.locator = locator){// && !('lineNumber' in locator)){\n\t    \tlocator.lineNumber = 0;\n\t    }\n\t},\n\t//LexicalHandler\n\tcomment:function(chars, start, length) {\n\t\tchars = _toString.apply(this,arguments)\n\t    var comm = this.doc.createComment(chars);\n\t    this.locator && position(this.locator,comm)\n\t    appendElement(this, comm);\n\t},\n\n\tstartCDATA:function() {\n\t    //used in characters() methods\n\t    this.cdata = true;\n\t},\n\tendCDATA:function() {\n\t    this.cdata = false;\n\t},\n\n\tstartDTD:function(name, publicId, systemId) {\n\t\tvar impl = this.doc.implementation;\n\t    if (impl && impl.createDocumentType) {\n\t        var dt = impl.createDocumentType(name, publicId, systemId);\n\t        this.locator && position(this.locator,dt)\n\t        appendElement(this, dt);\n\t\t\t\t\tthis.doc.doctype = dt;\n\t    }\n\t},\n\t/**\n\t * @see org.xml.sax.ErrorHandler\n\t * @link http://www.saxproject.org/apidoc/org/xml/sax/ErrorHandler.html\n\t */\n\twarning:function(error) {\n\t\tconsole.warn('[xmldom warning]\\t'+error,_locator(this.locator));\n\t},\n\terror:function(error) {\n\t\tconsole.error('[xmldom error]\\t'+error,_locator(this.locator));\n\t},\n\tfatalError:function(error) {\n\t\tthrow new ParseError(error, this.locator);\n\t}\n}\nfunction _locator(l){\n\tif(l){\n\t\treturn '\\n@'+(l.systemId ||'')+'#[line:'+l.lineNumber+',col:'+l.columnNumber+']'\n\t}\n}\nfunction _toString(chars,start,length){\n\tif(typeof chars == 'string'){\n\t\treturn chars.substr(start,length)\n\t}else{//java sax connect width xmldom on rhino(what about: \"? && !(chars instanceof String)\")\n\t\tif(chars.length >= start+length || start){\n\t\t\treturn new java.lang.String(chars,start,length)+'';\n\t\t}\n\t\treturn chars;\n\t}\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\tDOMHandler.prototype[key] = function(){return null}\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;\n", "var dom = require('./dom')\nexports.DOMImplementation = dom.DOMImplementation\nexports.XMLSerializer = dom.XMLSerializer\nexports.DOMParser = require('./dom-parser').DOMParser\n", "var MAX_UINT32 = Math.pow(2, 32);\n\nvar getUint64 = function(uint8) {\n  var dv = new DataView(uint8.buffer, uint8.byteOffset, uint8.byteLength);\n  var value;\n\n  if (dv.getBigUint64) {\n    value = dv.getBigUint64(0);\n\n    if (value < Number.MAX_SAFE_INTEGER) {\n      return Number(value);\n    }\n\n    return value;\n  }\n\n  return (dv.getUint32(0) * MAX_UINT32) + dv.getUint32(4);\n};\n\nmodule.exports = {\n  getUint64: getUint64,\n  MAX_UINT32: MAX_UINT32\n};\n", "var getUint64 = require('../utils/numbers.js').getUint64;\n\nvar parseSidx = function(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\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\n  i += 2; // reserved\n\n  var referenceCount = view.getUint16(i);\n\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\n  return result;\n};\n\n\nmodule.exports = parseSidx;\n", "/**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n */\nvar\n  ONE_SECOND_IN_TS = 90000, // 90kHz clock\n  secondsToVideoTs,\n  secondsToAudioTs,\n  videoTsToSeconds,\n  audioTsToSeconds,\n  audioTsToVideoTs,\n  videoTsToAudioTs,\n  metadataTsToSeconds;\n\nsecondsToVideoTs = function(seconds) {\n  return seconds * ONE_SECOND_IN_TS;\n};\n\nsecondsToAudioTs = function(seconds, sampleRate) {\n  return seconds * sampleRate;\n};\n\nvideoTsToSeconds = function(timestamp) {\n  return timestamp / ONE_SECOND_IN_TS;\n};\n\naudioTsToSeconds = function(timestamp, sampleRate) {\n  return timestamp / sampleRate;\n};\n\naudioTsToVideoTs = function(timestamp, sampleRate) {\n  return secondsToVideoTs(audioTsToSeconds(timestamp, sampleRate));\n};\n\nvideoTsToAudioTs = function(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(timestamp, timelineStartPts, keepOriginalTimestamps) {\n  return videoTsToSeconds(keepOriginalTimestamps ? timestamp : timestamp - timelineStartPts);\n};\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};\n", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = void 0;\n\n/**\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\n  var _proto = Stream.prototype;\n\n  _proto.on = function on(type, listener) {\n    if (!this.listeners[type]) {\n      this.listeners[type] = [];\n    }\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  ;\n\n  _proto.off = function off(type, listener) {\n    if (!this.listeners[type]) {\n      return false;\n    }\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  ;\n\n  _proto.trigger = function trigger(type) {\n    var callbacks = this.listeners[type];\n\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\n    if (arguments.length === 2) {\n      var length = callbacks.length;\n\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\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  ;\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  ;\n\n  _proto.pipe = function pipe(destination) {\n    this.on('data', function (data) {\n      destination.push(data);\n    });\n  };\n\n  return Stream;\n}();\n\nexports.default = Stream;\nmodule.exports = exports.default;", "function _interopRequireDefault(obj) {\n  return obj && obj.__esModule ? obj : {\n    \"default\": obj\n  };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = decodeB64ToUint8Array;\n\nvar _window = _interopRequireDefault(require(\"global/window\"));\n\nvar atob = function atob(s) {\n  return _window.default.atob ? _window.default.atob(s) : Buffer.from(s, 'base64').toString('binary');\n};\n\nfunction decodeB64ToUint8Array(b64Text) {\n  var decodedString = atob(b64Text);\n  var array = new Uint8Array(decodedString.length);\n\n  for (var i = 0; i < decodedString.length; i++) {\n    array[i] = decodedString.charCodeAt(i);\n  }\n\n  return array;\n}\n\nmodule.exports = exports.default;", "/*! @name m3u8-parser @version 7.1.0 @license Apache-2.0 */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar Stream = require('@videojs/vhs-utils/cjs/stream.js');\nvar _extends = require('@babel/runtime/helpers/extends');\nvar decodeB64ToUint8Array = require('@videojs/vhs-utils/cjs/decode-b64-to-uint8-array.js');\n\nfunction _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }\n\nvar Stream__default = /*#__PURE__*/_interopDefaultLegacy(Stream);\nvar _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);\nvar decodeB64ToUint8Array__default = /*#__PURE__*/_interopDefaultLegacy(decodeB64ToUint8Array);\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 */\n\nclass LineStream extends Stream__default[\"default\"] {\n  constructor() {\n    super();\n    this.buffer = '';\n  }\n  /**\n   * Add new data to be parsed.\n   *\n   * @param {string} data the text to process\n   */\n\n\n  push(data) {\n    let nextNewline;\n    this.buffer += data;\n    nextNewline = this.buffer.indexOf('\\n');\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}\n\nconst TAB = String.fromCharCode(0x09);\n\nconst parseByterange = function (byterangeString) {\n  // optionally match and capture 0+ digits before `@`\n  // optionally match and capture 0+ digits after `@`\n  const match = /([0-9.]*)?@?([0-9.]*)?/.exec(byterangeString || '');\n  const result = {};\n\n  if (match[1]) {\n    result.length = parseInt(match[1], 10);\n  }\n\n  if (match[2]) {\n    result.offset = parseInt(match[2], 10);\n  }\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\n\nconst attributeSeparator = function () {\n  const key = '[^=]*';\n  const value = '\"[^\"]*\"|[^,]*';\n  const 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\n\nconst parseAttributes = function (attributes) {\n  const result = {};\n\n  if (!attributes) {\n    return result;\n  } // split the string using attributes as the separator\n\n\n  const attrs = attributes.split(attributeSeparator());\n  let i = attrs.length;\n  let attr;\n\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\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\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 */\n\n\nclass ParseStream extends Stream__default[\"default\"] {\n  constructor() {\n    super();\n    this.customParsers = [];\n    this.tagMappers = [];\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\n\n  push(line) {\n    let match;\n    let event; // strip whitespace\n\n    line = line.trim();\n\n    if (line.length === 0) {\n      // ignore empty lines\n      return;\n    } // URIs\n\n\n    if (line[0] !== '#') {\n      this.trigger('data', {\n        type: 'uri',\n        uri: line\n      });\n      return;\n    } // map tags\n\n\n    const newLines = this.tagMappers.reduce((acc, mapper) => {\n      const mappedLine = mapper(line); // skip if unchanged\n\n      if (mappedLine === line) {\n        return acc;\n      }\n\n      return acc.concat([mappedLine]);\n    }, [line]);\n    newLines.forEach(newLine => {\n      for (let i = 0; i < this.customParsers.length; i++) {\n        if (this.customParsers[i].call(this, newLine)) {\n          return;\n        }\n      } // Comments\n\n\n      if (newLine.indexOf('#EXT') !== 0) {\n        this.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\n      newLine = newLine.replace('\\r', ''); // Tags\n\n      match = /^#EXTM3U/.exec(newLine);\n\n      if (match) {\n        this.trigger('data', {\n          type: 'tag',\n          tagType: 'm3u'\n        });\n        return;\n      }\n\n      match = /^#EXTINF:([0-9\\.]*)?,?(.*)?$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'inf'\n        };\n\n        if (match[1]) {\n          event.duration = parseFloat(match[1]);\n        }\n\n        if (match[2]) {\n          event.title = match[2];\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'targetduration'\n        };\n\n        if (match[1]) {\n          event.duration = parseInt(match[1], 10);\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-VERSION:([0-9.]*)?/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'version'\n        };\n\n        if (match[1]) {\n          event.version = parseInt(match[1], 10);\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-MEDIA-SEQUENCE:(\\-?[0-9.]*)?/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'media-sequence'\n        };\n\n        if (match[1]) {\n          event.number = parseInt(match[1], 10);\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-DISCONTINUITY-SEQUENCE:(\\-?[0-9.]*)?/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'discontinuity-sequence'\n        };\n\n        if (match[1]) {\n          event.number = parseInt(match[1], 10);\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'playlist-type'\n        };\n\n        if (match[1]) {\n          event.playlistType = match[1];\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-BYTERANGE:(.*)?$/.exec(newLine);\n\n      if (match) {\n        event = _extends__default[\"default\"](parseByterange(match[1]), {\n          type: 'tag',\n          tagType: 'byterange'\n        });\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'allow-cache'\n        };\n\n        if (match[1]) {\n          event.allowed = !/NO/.test(match[1]);\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-MAP:(.*)$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'map'\n        };\n\n        if (match[1]) {\n          const attributes = parseAttributes(match[1]);\n\n          if (attributes.URI) {\n            event.uri = attributes.URI;\n          }\n\n          if (attributes.BYTERANGE) {\n            event.byterange = parseByterange(attributes.BYTERANGE);\n          }\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-STREAM-INF:(.*)$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'stream-inf'\n        };\n\n        if (match[1]) {\n          event.attributes = parseAttributes(match[1]);\n\n          if (event.attributes.RESOLUTION) {\n            const split = event.attributes.RESOLUTION.split('x');\n            const resolution = {};\n\n            if (split[0]) {\n              resolution.width = parseInt(split[0], 10);\n            }\n\n            if (split[1]) {\n              resolution.height = parseInt(split[1], 10);\n            }\n\n            event.attributes.RESOLUTION = resolution;\n          }\n\n          if (event.attributes.BANDWIDTH) {\n            event.attributes.BANDWIDTH = parseInt(event.attributes.BANDWIDTH, 10);\n          }\n\n          if (event.attributes['FRAME-RATE']) {\n            event.attributes['FRAME-RATE'] = parseFloat(event.attributes['FRAME-RATE']);\n          }\n\n          if (event.attributes['PROGRAM-ID']) {\n            event.attributes['PROGRAM-ID'] = parseInt(event.attributes['PROGRAM-ID'], 10);\n          }\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-MEDIA:(.*)$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'media'\n        };\n\n        if (match[1]) {\n          event.attributes = parseAttributes(match[1]);\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-ENDLIST/.exec(newLine);\n\n      if (match) {\n        this.trigger('data', {\n          type: 'tag',\n          tagType: 'endlist'\n        });\n        return;\n      }\n\n      match = /^#EXT-X-DISCONTINUITY/.exec(newLine);\n\n      if (match) {\n        this.trigger('data', {\n          type: 'tag',\n          tagType: 'discontinuity'\n        });\n        return;\n      }\n\n      match = /^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'program-date-time'\n        };\n\n        if (match[1]) {\n          event.dateTimeString = match[1];\n          event.dateTimeObject = new Date(match[1]);\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-KEY:(.*)$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'key'\n        };\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\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\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-START:(.*)$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'start'\n        };\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\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'cue-out-cont'\n        };\n\n        if (match[1]) {\n          event.data = match[1];\n        } else {\n          event.data = '';\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-CUE-OUT:(.*)?$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'cue-out'\n        };\n\n        if (match[1]) {\n          event.data = match[1];\n        } else {\n          event.data = '';\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-CUE-IN:(.*)?$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'cue-in'\n        };\n\n        if (match[1]) {\n          event.data = match[1];\n        } else {\n          event.data = '';\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-SKIP:(.*)$/.exec(newLine);\n\n      if (match && match[1]) {\n        event = {\n          type: 'tag',\n          tagType: 'skip'\n        };\n        event.attributes = parseAttributes(match[1]);\n\n        if (event.attributes.hasOwnProperty('SKIPPED-SEGMENTS')) {\n          event.attributes['SKIPPED-SEGMENTS'] = parseInt(event.attributes['SKIPPED-SEGMENTS'], 10);\n        }\n\n        if (event.attributes.hasOwnProperty('RECENTLY-REMOVED-DATERANGES')) {\n          event.attributes['RECENTLY-REMOVED-DATERANGES'] = event.attributes['RECENTLY-REMOVED-DATERANGES'].split(TAB);\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-PART:(.*)$/.exec(newLine);\n\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\n        if (event.attributes.hasOwnProperty('BYTERANGE')) {\n          event.attributes.byterange = parseByterange(event.attributes.BYTERANGE);\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-SERVER-CONTROL:(.*)$/.exec(newLine);\n\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        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-PART-INF:(.*)$/.exec(newLine);\n\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        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-PRELOAD-HINT:(.*)$/.exec(newLine);\n\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            const 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        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-RENDITION-REPORT:(.*)$/.exec(newLine);\n\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        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-DATERANGE:(.*)$/.exec(newLine);\n\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        const clientAttributePattern = /^X-([A-Z]+-)+[A-Z]+$/;\n\n        for (const key in event.attributes) {\n          if (!clientAttributePattern.test(key)) {\n            continue;\n          }\n\n          const isHexaDecimal = /[0-9A-Fa-f]{6}/g.test(event.attributes[key]);\n          const 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\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-INDEPENDENT-SEGMENTS/.exec(newLine);\n\n      if (match) {\n        this.trigger('data', {\n          type: 'tag',\n          tagType: 'independent-segments'\n        });\n        return;\n      }\n\n      match = /^#EXT-X-CONTENT-STEERING:(.*)$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'content-steering'\n        };\n        event.attributes = parseAttributes(match[1]);\n        this.trigger('data', event);\n        return;\n      } // unknown tag type\n\n\n      this.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\n  addParser({\n    expression,\n    customType,\n    dataParser,\n    segment\n  }) {\n    if (typeof dataParser !== 'function') {\n      dataParser = line => line;\n    }\n\n    this.customParsers.push(line => {\n      const match = expression.exec(line);\n\n      if (match) {\n        this.trigger('data', {\n          type: 'custom',\n          data: dataParser(line),\n          customType,\n          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\n  addTagMapper({\n    expression,\n    map\n  }) {\n    const mapFn = line => {\n      if (expression.test(line)) {\n        return map(line);\n      }\n\n      return line;\n    };\n\n    this.tagMappers.push(mapFn);\n  }\n\n}\n\nconst camelCase = str => str.toLowerCase().replace(/-(\\w)/g, a => a[1].toUpperCase());\n\nconst camelCaseKeys = function (attributes) {\n  const 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\n\nconst setHoldBack = function (manifest) {\n  const {\n    serverControl,\n    targetDuration,\n    partTargetDuration\n  } = manifest;\n\n  if (!serverControl) {\n    return;\n  }\n\n  const tag = '#EXT-X-SERVER-CONTROL';\n  const hb = 'holdBack';\n  const phb = 'partHoldBack';\n  const minTargetDuration = targetDuration && targetDuration * 3;\n  const minPartDuration = partTargetDuration && partTargetDuration * 2;\n\n  if (targetDuration && !serverControl.hasOwnProperty(hb)) {\n    serverControl[hb] = minTargetDuration;\n    this.trigger('info', {\n      message: `${tag} defaulting HOLD-BACK to targetDuration * 3 (${minTargetDuration}).`\n    });\n  }\n\n  if (minTargetDuration && serverControl[hb] < minTargetDuration) {\n    this.trigger('warn', {\n      message: `${tag} clamping HOLD-BACK (${serverControl[hb]}) to targetDuration * 3 (${minTargetDuration})`\n    });\n    serverControl[hb] = minTargetDuration;\n  } // default no part hold back to part target duration * 3\n\n\n  if (partTargetDuration && !serverControl.hasOwnProperty(phb)) {\n    serverControl[phb] = partTargetDuration * 3;\n    this.trigger('info', {\n      message: `${tag} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${serverControl[phb]}).`\n    });\n  } // if part hold back is too small default it to part target duration * 2\n\n\n  if (partTargetDuration && serverControl[phb] < minPartDuration) {\n    this.trigger('warn', {\n      message: `${tag} clamping PART-HOLD-BACK (${serverControl[phb]}) to partTargetDuration * 2 (${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 */\n\n\nclass Parser extends Stream__default[\"default\"] {\n  constructor() {\n    super();\n    this.lineStream = new LineStream();\n    this.parseStream = new ParseStream();\n    this.lineStream.pipe(this.parseStream);\n    this.lastProgramDateTime = null;\n    /* eslint-disable consistent-this */\n\n    const self = this;\n    /* eslint-enable consistent-this */\n\n    const uris = [];\n    let currentUri = {}; // if specified, the active EXT-X-MAP definition\n\n    let currentMap; // if specified, the active decryption key\n\n    let key;\n    let hasParts = false;\n\n    const noop = function () {};\n\n    const 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    const widevineUuid = 'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed'; // group segments into numbered timelines delineated by discontinuities\n\n    let currentTimeline = 0; // the manifest is empty until the parse stream begins delivering data\n\n    this.manifest = {\n      allowCache: true,\n      discontinuityStarts: [],\n      dateRanges: [],\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    let lastByterangeEnd = 0; // keep track of the last seen part's byte range end.\n\n    let lastPartByterangeEnd = 0;\n    const dateRangeTags = {};\n    this.on('end', () => {\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\n      if (!currentUri.map && currentMap) {\n        currentUri.map = currentMap;\n      }\n\n      if (!currentUri.key && key) {\n        currentUri.key = key;\n      }\n\n      if (!currentUri.timeline && typeof currentTimeline === 'number') {\n        currentUri.timeline = currentTimeline;\n      }\n\n      this.manifest.preloadSegment = currentUri;\n    }); // update the manifest with the m3u8 entry from the parse stream\n\n    this.parseStream.on('data', function (entry) {\n      let mediaGroup;\n      let rendition;\n      ({\n        tag() {\n          // switch based on the tag type\n          (({\n            version() {\n              if (entry.version) {\n                this.manifest.version = entry.version;\n              }\n            },\n\n            'allow-cache'() {\n              this.manifest.allowCache = entry.allowed;\n\n              if (!('allowed' in entry)) {\n                this.trigger('info', {\n                  message: 'defaulting allowCache to YES'\n                });\n                this.manifest.allowCache = true;\n              }\n            },\n\n            byterange() {\n              const byterange = {};\n\n              if ('length' in entry) {\n                currentUri.byterange = byterange;\n                byterange.length = entry.length;\n\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\n              if ('offset' in entry) {\n                currentUri.byterange = byterange;\n                byterange.offset = entry.offset;\n              }\n\n              lastByterangeEnd = byterange.offset + byterange.length;\n            },\n\n            endlist() {\n              this.manifest.endList = true;\n            },\n\n            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\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\n              if (entry.title) {\n                currentUri.title = entry.title;\n              }\n\n              if (entry.duration > 0) {\n                currentUri.duration = entry.duration;\n              }\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\n              this.manifest.segments = uris;\n            },\n\n            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\n              if (entry.attributes.METHOD === 'NONE') {\n                key = null;\n                return;\n              }\n\n              if (!entry.attributes.URI) {\n                this.trigger('warn', {\n                  message: 'ignoring key declaration without URI'\n                });\n                return;\n              }\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\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\n              if (entry.attributes.KEYFORMAT === widevineUuid) {\n                const VALID_METHODS = ['SAMPLE-AES', 'SAMPLE-AES-CTR', 'SAMPLE-AES-CENC'];\n\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\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\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\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\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__default[\"default\"](entry.attributes.URI.split(',')[1])\n                };\n                return;\n              }\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\n              key = {\n                method: entry.attributes.METHOD || 'AES-128',\n                uri: entry.attributes.URI\n              };\n\n              if (typeof entry.attributes.IV !== 'undefined') {\n                key.iv = entry.attributes.IV;\n              }\n            },\n\n            'media-sequence'() {\n              if (!isFinite(entry.number)) {\n                this.trigger('warn', {\n                  message: 'ignoring invalid media sequence: ' + entry.number\n                });\n                return;\n              }\n\n              this.manifest.mediaSequence = entry.number;\n            },\n\n            'discontinuity-sequence'() {\n              if (!isFinite(entry.number)) {\n                this.trigger('warn', {\n                  message: 'ignoring invalid discontinuity sequence: ' + entry.number\n                });\n                return;\n              }\n\n              this.manifest.discontinuitySequence = entry.number;\n              currentTimeline = entry.number;\n            },\n\n            'playlist-type'() {\n              if (!/VOD|EVENT/.test(entry.playlistType)) {\n                this.trigger('warn', {\n                  message: 'ignoring unknown playlist type: ' + entry.playlist\n                });\n                return;\n              }\n\n              this.manifest.playlistType = entry.playlistType;\n            },\n\n            map() {\n              currentMap = {};\n\n              if (entry.uri) {\n                currentMap.uri = entry.uri;\n              }\n\n              if (entry.byterange) {\n                currentMap.byterange = entry.byterange;\n              }\n\n              if (key) {\n                currentMap.key = key;\n              }\n            },\n\n            'stream-inf'() {\n              this.manifest.playlists = uris;\n              this.manifest.mediaGroups = this.manifest.mediaGroups || defaultMediaGroups;\n\n              if (!entry.attributes) {\n                this.trigger('warn', {\n                  message: 'ignoring empty stream-inf attributes'\n                });\n                return;\n              }\n\n              if (!currentUri.attributes) {\n                currentUri.attributes = {};\n              }\n\n              _extends__default[\"default\"](currentUri.attributes, entry.attributes);\n            },\n\n            media() {\n              this.manifest.mediaGroups = this.manifest.mediaGroups || defaultMediaGroups;\n\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\n              const 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\n              if (rendition.default) {\n                rendition.autoselect = true;\n              } else {\n                rendition.autoselect = /yes/i.test(entry.attributes.AUTOSELECT);\n              }\n\n              if (entry.attributes.LANGUAGE) {\n                rendition.language = entry.attributes.LANGUAGE;\n              }\n\n              if (entry.attributes.URI) {\n                rendition.uri = entry.attributes.URI;\n              }\n\n              if (entry.attributes['INSTREAM-ID']) {\n                rendition.instreamId = entry.attributes['INSTREAM-ID'];\n              }\n\n              if (entry.attributes.CHARACTERISTICS) {\n                rendition.characteristics = entry.attributes.CHARACTERISTICS;\n              }\n\n              if (entry.attributes.FORCED) {\n                rendition.forced = /yes/i.test(entry.attributes.FORCED);\n              } // insert the new rendition\n\n\n              mediaGroup[entry.attributes.NAME] = rendition;\n            },\n\n            discontinuity() {\n              currentTimeline += 1;\n              currentUri.discontinuity = true;\n              this.manifest.discontinuityStarts.push(uris.length);\n            },\n\n            'program-date-time'() {\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\n              currentUri.dateTimeString = entry.dateTimeString;\n              currentUri.dateTimeObject = entry.dateTimeObject;\n              const {\n                lastProgramDateTime\n              } = this;\n              this.lastProgramDateTime = new Date(entry.dateTimeString).getTime(); // We should extrapolate Program Date Time backward only during first program date time occurrence.\n              // Once we have at least one program date time point, we can always extrapolate it forward using lastProgramDateTime reference.\n\n              if (lastProgramDateTime === null) {\n                // Extrapolate Program Date Time backward\n                // Since it is first program date time occurrence we're assuming that\n                // all this.manifest.segments have no program date time info\n                this.manifest.segments.reduceRight((programDateTime, segment) => {\n                  segment.programDateTime = programDateTime - segment.duration * 1000;\n                  return segment.programDateTime;\n                }, this.lastProgramDateTime);\n              }\n            },\n\n            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\n              this.manifest.targetDuration = entry.duration;\n              setHoldBack.call(this, this.manifest);\n            },\n\n            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\n              this.manifest.start = {\n                timeOffset: entry.attributes['TIME-OFFSET'],\n                precise: entry.attributes.PRECISE\n              };\n            },\n\n            'cue-out'() {\n              currentUri.cueOut = entry.data;\n            },\n\n            'cue-out-cont'() {\n              currentUri.cueOutCont = entry.data;\n            },\n\n            'cue-in'() {\n              currentUri.cueIn = entry.data;\n            },\n\n            'skip'() {\n              this.manifest.skip = camelCaseKeys(entry.attributes);\n              this.warnOnMissingAttributes_('#EXT-X-SKIP', entry.attributes, ['SKIPPED-SEGMENTS']);\n            },\n\n            'part'() {\n              hasParts = true; // parts are always specifed before a segment\n\n              const segmentIndex = this.manifest.segments.length;\n              const part = camelCaseKeys(entry.attributes);\n              currentUri.parts = currentUri.parts || [];\n              currentUri.parts.push(part);\n\n              if (part.byterange) {\n                if (!part.byterange.hasOwnProperty('offset')) {\n                  part.byterange.offset = lastPartByterangeEnd;\n                }\n\n                lastPartByterangeEnd = part.byterange.offset + part.byterange.length;\n              }\n\n              const partIndex = currentUri.parts.length - 1;\n              this.warnOnMissingAttributes_(`#EXT-X-PART #${partIndex} for segment #${segmentIndex}`, entry.attributes, ['URI', 'DURATION']);\n\n              if (this.manifest.renditionReports) {\n                this.manifest.renditionReports.forEach((r, i) => {\n                  if (!r.hasOwnProperty('lastPart')) {\n                    this.trigger('warn', {\n                      message: `#EXT-X-RENDITION-REPORT #${i} lacks required attribute(s): LAST-PART`\n                    });\n                  }\n                });\n              }\n            },\n\n            'server-control'() {\n              const attrs = this.manifest.serverControl = camelCaseKeys(entry.attributes);\n\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\n              setHoldBack.call(this, this.manifest);\n\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\n            'preload-hint'() {\n              // parts are always specifed before a segment\n              const segmentIndex = this.manifest.segments.length;\n              const hint = camelCaseKeys(entry.attributes);\n              const isPart = hint.type && hint.type === 'PART';\n              currentUri.preloadHints = currentUri.preloadHints || [];\n              currentUri.preloadHints.push(hint);\n\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\n                  if (isPart) {\n                    lastPartByterangeEnd = hint.byterange.offset + hint.byterange.length;\n                  }\n                }\n              }\n\n              const index = currentUri.preloadHints.length - 1;\n              this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${index} for segment #${segmentIndex}`, entry.attributes, ['TYPE', 'URI']);\n\n              if (!hint.type) {\n                return;\n              } // search through all preload hints except for the current one for\n              // a duplicate type.\n\n\n              for (let i = 0; i < currentUri.preloadHints.length - 1; i++) {\n                const otherHint = currentUri.preloadHints[i];\n\n                if (!otherHint.type) {\n                  continue;\n                }\n\n                if (otherHint.type === hint.type) {\n                  this.trigger('warn', {\n                    message: `#EXT-X-PRELOAD-HINT #${index} for segment #${segmentIndex} has the same TYPE ${hint.type} as preload hint #${i}`\n                  });\n                }\n              }\n            },\n\n            'rendition-report'() {\n              const report = camelCaseKeys(entry.attributes);\n              this.manifest.renditionReports = this.manifest.renditionReports || [];\n              this.manifest.renditionReports.push(report);\n              const index = this.manifest.renditionReports.length - 1;\n              const required = ['LAST-MSN', 'URI'];\n\n              if (hasParts) {\n                required.push('LAST-PART');\n              }\n\n              this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${index}`, entry.attributes, required);\n            },\n\n            'part-inf'() {\n              this.manifest.partInf = camelCaseKeys(entry.attributes);\n              this.warnOnMissingAttributes_('#EXT-X-PART-INF', entry.attributes, ['PART-TARGET']);\n\n              if (this.manifest.partInf.partTarget) {\n                this.manifest.partTargetDuration = this.manifest.partInf.partTarget;\n              }\n\n              setHoldBack.call(this, this.manifest);\n            },\n\n            'daterange'() {\n              this.manifest.dateRanges.push(camelCaseKeys(entry.attributes));\n              const index = this.manifest.dateRanges.length - 1;\n              this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${index}`, entry.attributes, ['ID', 'START-DATE']);\n              const dateRange = this.manifest.dateRanges[index];\n\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\n              if (dateRange.duration && dateRange.duration < 0) {\n                this.trigger('warn', {\n                  message: 'EXT-X-DATERANGE DURATION must not be negative'\n                });\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\n              const endOnNextYes = !!dateRange.endOnNext;\n\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\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\n              if (dateRange.duration && dateRange.endDate) {\n                const startDate = dateRange.startDate;\n                const newDateInSeconds = startDate.getTime() + dateRange.duration * 1000;\n                this.manifest.dateRanges[index].endDate = new Date(newDateInSeconds);\n              }\n\n              if (!dateRangeTags[dateRange.id]) {\n                dateRangeTags[dateRange.id] = dateRange;\n              } else {\n                for (const attribute in dateRangeTags[dateRange.id]) {\n                  if (!!dateRange[attribute] && JSON.stringify(dateRangeTags[dateRange.id][attribute]) !== JSON.stringify(dateRange[attribute])) {\n                    this.trigger('warn', {\n                      message: 'EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values'\n                    });\n                    break;\n                  }\n                } // if tags with the same ID do not have conflicting attributes, merge them\n\n\n                const dateRangeWithSameId = this.manifest.dateRanges.findIndex(dateRangeToFind => dateRangeToFind.id === dateRange.id);\n                this.manifest.dateRanges[dateRangeWithSameId] = _extends__default[\"default\"](this.manifest.dateRanges[dateRangeWithSameId], dateRange);\n                dateRangeTags[dateRange.id] = _extends__default[\"default\"](dateRangeTags[dateRange.id], dateRange); // after merging, delete the duplicate dateRange that was added last\n\n                this.manifest.dateRanges.pop();\n              }\n            },\n\n            'independent-segments'() {\n              this.manifest.independentSegments = true;\n            },\n\n            'content-steering'() {\n              this.manifest.contentSteering = camelCaseKeys(entry.attributes);\n              this.warnOnMissingAttributes_('#EXT-X-CONTENT-STEERING', entry.attributes, ['SERVER-URI']);\n            }\n\n          })[entry.tagType] || noop).call(self);\n        },\n\n        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\n          if (key) {\n            currentUri.key = key;\n          }\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\n          lastPartByterangeEnd = 0; // Once we have at least one program date time we can always extrapolate it forward\n\n          if (this.lastProgramDateTime !== null) {\n            currentUri.programDateTime = this.lastProgramDateTime;\n            this.lastProgramDateTime += currentUri.duration * 1000;\n          } // prepare for the next URI\n\n\n          currentUri = {};\n        },\n\n        comment() {// comments are not important for playback\n        },\n\n        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\n      })[entry.type].call(self);\n    });\n  }\n\n  warnOnMissingAttributes_(identifier, attributes, required) {\n    const missing = [];\n    required.forEach(function (key) {\n      if (!attributes.hasOwnProperty(key)) {\n        missing.push(key);\n      }\n    });\n\n    if (missing.length) {\n      this.trigger('warn', {\n        message: `${identifier} lacks required attribute(s): ${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\n  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\n  end() {\n    // flush any buffered input\n    this.lineStream.push('\\n');\n\n    if (this.manifest.dateRanges.length && this.lastProgramDateTime === null) {\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\n    this.lastProgramDateTime = null;\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.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\n  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\n  addTagMapper(options) {\n    this.parseStream.addTagMapper(options);\n  }\n\n}\n\nexports.LineStream = LineStream;\nexports.ParseStream = ParseStream;\nexports.Parser = Parser;\n", "var MAX_UINT32 = Math.pow(2, 32);\n\nvar getUint64 = function(uint8) {\n  var dv = new DataView(uint8.buffer, uint8.byteOffset, uint8.byteLength);\n  var value;\n\n  if (dv.getBigUint64) {\n    value = dv.getBigUint64(0);\n\n    if (value < Number.MAX_SAFE_INTEGER) {\n      return Number(value);\n    }\n\n    return value;\n  }\n\n  return (dv.getUint32(0) * MAX_UINT32) + dv.getUint32(4);\n};\n\nmodule.exports = {\n  getUint64: getUint64,\n  MAX_UINT32: MAX_UINT32\n};\n", "var getUint64 = require('../utils/numbers.js').getUint64;\n\nvar parseSidx = function(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\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\n  i += 2; // reserved\n\n  var referenceCount = view.getUint16(i);\n\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\n  return result;\n};\n\n\nmodule.exports = parseSidx;\n", "/**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n */\nvar\n  ONE_SECOND_IN_TS = 90000, // 90kHz clock\n  secondsToVideoTs,\n  secondsToAudioTs,\n  videoTsToSeconds,\n  audioTsToSeconds,\n  audioTsToVideoTs,\n  videoTsToAudioTs,\n  metadataTsToSeconds;\n\nsecondsToVideoTs = function(seconds) {\n  return seconds * ONE_SECOND_IN_TS;\n};\n\nsecondsToAudioTs = function(seconds, sampleRate) {\n  return seconds * sampleRate;\n};\n\nvideoTsToSeconds = function(timestamp) {\n  return timestamp / ONE_SECOND_IN_TS;\n};\n\naudioTsToSeconds = function(timestamp, sampleRate) {\n  return timestamp / sampleRate;\n};\n\naudioTsToVideoTs = function(timestamp, sampleRate) {\n  return secondsToVideoTs(audioTsToSeconds(timestamp, sampleRate));\n};\n\nvideoTsToAudioTs = function(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(timestamp, timelineStartPts, keepOriginalTimestamps) {\n  return videoTsToSeconds(keepOriginalTimestamps ? timestamp : timestamp - timelineStartPts);\n};\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};\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\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) { return false; }\n    if (typeof nameOrCode === 'string') {\n      // check codes\n      var foundNamedKey = codes[nameOrCode.toLowerCase()]\n      if (foundNamedKey) { return foundNamedKey === keyCode; }\n    \n      // check aliases\n      var foundNamedKey = aliases[nameOrCode.toLowerCase()]\n      if (foundNamedKey) { return foundNamedKey === keyCode; }\n    } else if (typeof nameOrCode === 'number') {\n      return nameOrCode === keyCode;\n    }\n    return false;\n  }\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  '\u21E7': 16,\n  '\u2325': 18,\n  '\u2303': 17,\n  '\u2318': 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", "module.exports = SafeParseTuple\n\nfunction SafeParseTuple(obj, reviver) {\n    var json\n    var error = null\n\n    try {\n        json = JSON.parse(obj, reviver)\n    } catch (err) {\n        error = err\n    }\n\n    return [error, json]\n}\n", "\"use strict\";\n\nvar window = require('global/window');\n\nvar httpResponseHandler = function httpResponseHandler(callback, decodeResponseBody) {\n  if (decodeResponseBody === void 0) {\n    decodeResponseBody = false;\n  }\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\n    if (response.statusCode >= 400 && response.statusCode <= 599) {\n      var cause = responseBody;\n\n      if (decodeResponseBody) {\n        if (window.TextDecoder) {\n          var charset = getCharset(response.headers && response.headers['content-type']);\n\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\n      callback({\n        cause: cause\n      });\n      return;\n    } // otherwise, request succeeded\n\n\n    callback(null, responseBody);\n  };\n};\n\nfunction getCharset(contentTypeHeader) {\n  if (contentTypeHeader === void 0) {\n    contentTypeHeader = '';\n  }\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\n    if (type.trim() === 'charset') {\n      return value.trim();\n    }\n\n    return charset;\n  }, 'utf-8');\n}\n\nmodule.exports = httpResponseHandler;", "\"use strict\";\n\nvar window = require(\"global/window\");\n\nvar _extends = require(\"@babel/runtime/helpers/extends\");\n\nvar isFunction = require('is-function');\n\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\u00F6rklund\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\n  if (!headers) {\n    return result;\n  }\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\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};\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});\n\nfunction forEachArray(array, iterator) {\n  for (var i = 0; i < array.length; i++) {\n    iterator(array[i]);\n  }\n}\n\nfunction isEmpty(obj) {\n  for (var i in obj) {\n    if (obj.hasOwnProperty(i)) return false;\n  }\n\n  return true;\n}\n\nfunction initParams(uri, options, callback) {\n  var params = uri;\n\n  if (isFunction(options)) {\n    callback = options;\n\n    if (typeof uri === \"string\") {\n      params = {\n        uri: uri\n      };\n    }\n  } else {\n    params = _extends({}, options, {\n      uri: uri\n    });\n  }\n\n  params.callback = callback;\n  return params;\n}\n\nfunction createXHR(uri, options, callback) {\n  options = initParams(uri, options, callback);\n  return _createXHR(options);\n}\n\nfunction _createXHR(options) {\n  if (typeof options.callback === \"undefined\") {\n    throw new Error(\"callback argument missing\");\n  }\n\n  var called = false;\n\n  var callback = function cbOnce(err, response, body) {\n    if (!called) {\n      called = true;\n      options.callback(err, response, body);\n    }\n  };\n\n  function readystatechange() {\n    if (xhr.readyState === 4) {\n      setTimeout(loadFunc, 0);\n    }\n  }\n\n  function getBody() {\n    // Chrome with requestType=blob throws errors arround when even testing access to responseText\n    var body = undefined;\n\n    if (xhr.response) {\n      body = xhr.response;\n    } else {\n      body = xhr.responseText || getXml(xhr);\n    }\n\n    if (isJson) {\n      try {\n        body = JSON.parse(body);\n      } catch (e) {}\n    }\n\n    return body;\n  }\n\n  function errorFunc(evt) {\n    clearTimeout(timeoutTimer);\n\n    if (!(evt instanceof Error)) {\n      evt = new Error(\"\" + (evt || \"Unknown XMLHttpRequest Error\"));\n    }\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\n  function loadFunc() {\n    if (aborted) return;\n    var status;\n    clearTimeout(timeoutTimer);\n\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\n    var response = failureResponse;\n    var err = null;\n\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\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\n    return callback(err, response, response.body);\n  }\n\n  var xhr = options.xhr || null;\n\n  if (!xhr) {\n    if (options.cors || options.useXDR) {\n      xhr = new createXHR.XDomainRequest();\n    } else {\n      xhr = new createXHR.XMLHttpRequest();\n    }\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\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\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\n  xhr.onabort = function () {\n    aborted = true;\n  };\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\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\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\n  if (\"responseType\" in options) {\n    xhr.responseType = options.responseType;\n  }\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\n  xhr.send(body || null);\n  return xhr;\n}\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\n    var firefoxBugTakenEffect = xhr.responseXML && xhr.responseXML.documentElement.nodeName === \"parsererror\";\n\n    if (xhr.responseType === \"\" && !firefoxBugTakenEffect) {\n      return xhr.responseXML;\n    }\n  } catch (e) {}\n\n  return null;\n}\n\nfunction noop() {}", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = void 0;\n\nvar _urlToolkit = _interopRequireDefault(require(\"url-toolkit\"));\n\nvar _window = _interopRequireDefault(require(\"global/window\"));\n\nvar DEFAULT_LOCATION = 'http://example.com';\n\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\n  if (/^data:/.test(baseUrl)) {\n    baseUrl = _window.default.location && _window.default.location.href || '';\n  } // IE11 supports URL but not the URL constructor\n  // feature detect the behavior we want\n\n\n  var nativeURL = typeof _window.default.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.default.location && !/\\/\\//i.test(baseUrl); // if the base URL is relative then combine with the current location\n\n  if (nativeURL) {\n    baseUrl = new _window.default.URL(baseUrl, _window.default.location || DEFAULT_LOCATION);\n  } else if (!/\\/\\//i.test(baseUrl)) {\n    baseUrl = _urlToolkit.default.buildAbsoluteURL(_window.default.location && _window.default.location.href || '', baseUrl);\n  }\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\n    return newUrl.href;\n  }\n\n  return _urlToolkit.default.buildAbsoluteURL(baseUrl, relativeUrl);\n};\n\nvar _default = resolveUrl;\nexports.default = _default;\nmodule.exports = exports.default;", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.DEFAULT_VIDEO_CODEC = exports.DEFAULT_AUDIO_CODEC = exports.muxerSupportsCodec = exports.browserSupportsCodec = exports.getMimeForCodec = exports.isTextCodec = exports.isAudioCodec = exports.isVideoCodec = exports.codecsFromDefault = exports.parseCodecs = exports.mapLegacyAvcCodecs = exports.translateLegacyCodecs = exports.translateLegacyCodec = void 0;\n\nvar _window = _interopRequireDefault(require(\"global/window\"));\n\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.<dd>.<dd>` codec string with the standard\n * `avc1.<hhhhhh>`\n *\n * @param {string} codec\n *        Codec string to translate\n * @return {string}\n *         The translated codec string\n */\n\nvar translateLegacyCodec = function translateLegacyCodec(codec) {\n  if (!codec) {\n    return codec;\n  }\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.<dd>.<dd>` codec strings with the standard\n * `avc1.<hhhhhh>`\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\n\nexports.translateLegacyCodec = translateLegacyCodec;\n\nvar translateLegacyCodecs = function translateLegacyCodecs(codecs) {\n  return codecs.map(translateLegacyCodec);\n};\n/**\n * Replace codecs in the codec string with the old apple-style `avc1.<dd>.<dd>` to the\n * standard `avc1.<hhhhhh>`.\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\n\nexports.translateLegacyCodecs = translateLegacyCodecs;\n\nvar 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\n\nexports.mapLegacyAvcCodecs = mapLegacyAvcCodecs;\n\nvar parseCodecs = function parseCodecs(codecString) {\n  if (codecString === void 0) {\n    codecString = '';\n  }\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\n      if (!match || match.length <= 1) {\n        return;\n      }\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\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\n\nexports.parseCodecs = parseCodecs;\n\nvar codecsFromDefault = function codecsFromDefault(master, audioGroupId) {\n  if (!master.mediaGroups.AUDIO || !audioGroupId) {\n    return null;\n  }\n\n  var audioGroup = master.mediaGroups.AUDIO[audioGroupId];\n\n  if (!audioGroup) {\n    return null;\n  }\n\n  for (var name in audioGroup) {\n    var audioType = audioGroup[name];\n\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\n  return null;\n};\n\nexports.codecsFromDefault = codecsFromDefault;\n\nvar isVideoCodec = function isVideoCodec(codec) {\n  if (codec === void 0) {\n    codec = '';\n  }\n\n  return regexs.video.test(codec.trim().toLowerCase());\n};\n\nexports.isVideoCodec = isVideoCodec;\n\nvar isAudioCodec = function isAudioCodec(codec) {\n  if (codec === void 0) {\n    codec = '';\n  }\n\n  return regexs.audio.test(codec.trim().toLowerCase());\n};\n\nexports.isAudioCodec = isAudioCodec;\n\nvar isTextCodec = function isTextCodec(codec) {\n  if (codec === void 0) {\n    codec = '';\n  }\n\n  return regexs.text.test(codec.trim().toLowerCase());\n};\n\nexports.isTextCodec = isTextCodec;\n\nvar getMimeForCodec = function getMimeForCodec(codecString) {\n  if (!codecString || typeof codecString !== 'string') {\n    return;\n  }\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/<container> for now\n    type = 'application';\n  } // default the container to mp4\n\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\n  return type + \"/\" + container + \";codecs=\\\"\" + codecString + \"\\\"\";\n};\n\nexports.getMimeForCodec = getMimeForCodec;\n\nvar browserSupportsCodec = function browserSupportsCodec(codecString) {\n  if (codecString === void 0) {\n    codecString = '';\n  }\n\n  return _window.default.MediaSource && _window.default.MediaSource.isTypeSupported && _window.default.MediaSource.isTypeSupported(getMimeForCodec(codecString)) || false;\n};\n\nexports.browserSupportsCodec = browserSupportsCodec;\n\nvar muxerSupportsCodec = function muxerSupportsCodec(codecString) {\n  if (codecString === void 0) {\n    codecString = '';\n  }\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\n      if (regexs[\"muxer\" + type].test(codec)) {\n        return true;\n      }\n    }\n\n    return false;\n  });\n};\n\nexports.muxerSupportsCodec = muxerSupportsCodec;\nvar DEFAULT_AUDIO_CODEC = 'mp4a.40.2';\nexports.DEFAULT_AUDIO_CODEC = DEFAULT_AUDIO_CODEC;\nvar DEFAULT_VIDEO_CODEC = 'avc1.4d400d';\nexports.DEFAULT_VIDEO_CODEC = DEFAULT_VIDEO_CODEC;", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.simpleTypeFromSourceType = void 0;\nvar 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\nvar simpleTypeFromSourceType = function simpleTypeFromSourceType(type) {\n  if (MPEGURL_REGEX.test(type)) {\n    return 'hls';\n  }\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\n  if (type === 'application/vnd.videojs.vhs+json') {\n    return 'vhs-json';\n  }\n\n  return null;\n};\n\nexports.simpleTypeFromSourceType = simpleTypeFromSourceType;", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.reverseBytes = exports.sliceBytes = exports.bytesMatch = exports.concatTypedArrays = exports.stringToBytes = exports.bytesToString = exports.numberToBytes = exports.bytesToNumber = exports.IS_LITTLE_ENDIAN = exports.IS_BIG_ENDIAN = exports.ENDIANNESS = exports.toBinaryString = exports.toHexString = exports.toUint8 = exports.isTypedArray = exports.isArrayBufferView = exports.padStart = exports.countBytes = exports.countBits = void 0;\n\nvar _window = _interopRequireDefault(require(\"global/window\"));\n\n// const log2 = Math.log2 ? Math.log2 : (x) => (Math.log(x) / Math.log(2));\nvar repeat = function repeat(str, len) {\n  var acc = '';\n\n  while (len--) {\n    acc += str;\n  }\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\n\nvar 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\n\nexports.countBits = countBits;\n\nvar countBytes = function countBytes(x) {\n  return Math.ceil(countBits(x) / 8);\n};\n\nexports.countBytes = countBytes;\n\nvar padStart = function padStart(b, len, str) {\n  if (str === void 0) {\n    str = ' ';\n  }\n\n  return (repeat(str, len) + b.toString()).slice(-len);\n};\n\nexports.padStart = padStart;\n\nvar isArrayBufferView = function isArrayBufferView(obj) {\n  if (ArrayBuffer.isView === 'function') {\n    return ArrayBuffer.isView(obj);\n  }\n\n  return obj && obj.buffer instanceof ArrayBuffer;\n};\n\nexports.isArrayBufferView = isArrayBufferView;\n\nvar isTypedArray = function isTypedArray(obj) {\n  return isArrayBufferView(obj);\n};\n\nexports.isTypedArray = isTypedArray;\n\nvar toUint8 = function toUint8(bytes) {\n  if (bytes instanceof Uint8Array) {\n    return bytes;\n  }\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\n  return new Uint8Array(bytes && bytes.buffer || bytes, bytes && bytes.byteOffset || 0, bytes && bytes.byteLength || 0);\n};\n\nexports.toUint8 = toUint8;\n\nvar toHexString = function toHexString(bytes) {\n  bytes = toUint8(bytes);\n  var str = '';\n\n  for (var i = 0; i < bytes.length; i++) {\n    str += padStart(bytes[i].toString(16), 2, '0');\n  }\n\n  return str;\n};\n\nexports.toHexString = toHexString;\n\nvar toBinaryString = function toBinaryString(bytes) {\n  bytes = toUint8(bytes);\n  var str = '';\n\n  for (var i = 0; i < bytes.length; i++) {\n    str += padStart(bytes[i].toString(2), 8, '0');\n  }\n\n  return str;\n};\n\nexports.toBinaryString = toBinaryString;\nvar BigInt = _window.default.BigInt || Number;\nvar BYTE_TABLE = [BigInt('0x1'), BigInt('0x100'), BigInt('0x10000'), BigInt('0x1000000'), BigInt('0x100000000'), BigInt('0x10000000000'), BigInt('0x1000000000000'), BigInt('0x100000000000000'), BigInt('0x10000000000000000')];\n\nvar ENDIANNESS = function () {\n  var a = new Uint16Array([0xFFCC]);\n  var b = new Uint8Array(a.buffer, a.byteOffset, a.byteLength);\n\n  if (b[0] === 0xFF) {\n    return 'big';\n  }\n\n  if (b[0] === 0xCC) {\n    return 'little';\n  }\n\n  return 'unknown';\n}();\n\nexports.ENDIANNESS = ENDIANNESS;\nvar IS_BIG_ENDIAN = ENDIANNESS === 'big';\nexports.IS_BIG_ENDIAN = IS_BIG_ENDIAN;\nvar IS_LITTLE_ENDIAN = ENDIANNESS === 'little';\nexports.IS_LITTLE_ENDIAN = IS_LITTLE_ENDIAN;\n\nvar 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\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\n  if (signed) {\n    var max = BYTE_TABLE[bytes.length] / BigInt(2) - BigInt(1);\n    number = BigInt(number);\n\n    if (number > max) {\n      number -= max;\n      number -= max;\n      number -= BigInt(2);\n    }\n  }\n\n  return Number(number);\n};\n\nexports.bytesToNumber = bytesToNumber;\n\nvar 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\n  number = BigInt(number);\n  var byteCount = countBytes(number);\n  var bytes = new Uint8Array(new ArrayBuffer(byteCount));\n\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\n    if (number < 0) {\n      bytes[byteIndex] = Math.abs(~bytes[byteIndex]);\n      bytes[byteIndex] -= i === 0 ? 1 : 2;\n    }\n  }\n\n  return bytes;\n};\n\nexports.numberToBytes = numberToBytes;\n\nvar 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\n  bytes = Array.prototype.slice.call(bytes);\n  var string = String.fromCharCode.apply(null, toUint8(bytes));\n\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\n  return string;\n};\n\nexports.bytesToString = bytesToString;\n\nvar stringToBytes = function stringToBytes(string, stringIsBytes) {\n  if (typeof string !== 'string' && string && typeof string.toString === 'function') {\n    string = string.toString();\n  }\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\n  if (!stringIsBytes) {\n    string = unescape(encodeURIComponent(string));\n  }\n\n  var view = new Uint8Array(string.length);\n\n  for (var i = 0; i < string.length; i++) {\n    view[i] = string.charCodeAt(i);\n  }\n\n  return view;\n};\n\nexports.stringToBytes = stringToBytes;\n\nvar 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\n  buffers = buffers.filter(function (b) {\n    return b && (b.byteLength || b.length) && typeof b !== 'string';\n  });\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\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\n\nexports.concatTypedArrays = concatTypedArrays;\n\nvar 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\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 && // 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};\n\nexports.bytesMatch = bytesMatch;\n\nvar sliceBytes = function sliceBytes(src, start, end) {\n  if (Uint8Array.prototype.slice) {\n    return Uint8Array.prototype.slice.call(src, start, end);\n  }\n\n  return new Uint8Array(Array.prototype.slice.call(src, start, end));\n};\n\nexports.sliceBytes = sliceBytes;\n\nvar reverseBytes = function reverseBytes(src) {\n  if (src.reverse) {\n    return src.reverse();\n  }\n\n  return Array.prototype.reverse.call(src);\n};\n\nexports.reverseBytes = reverseBytes;", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.forEachMediaGroup = void 0;\n\n/**\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 */\nvar 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\nexports.forEachMediaGroup = forEachMediaGroup;", "\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = decodeB64ToUint8Array;\n\nvar _window = _interopRequireDefault(require(\"global/window\"));\n\nvar atob = function atob(s) {\n  return _window.default.atob ? _window.default.atob(s) : Buffer.from(s, 'base64').toString('binary');\n};\n\nfunction decodeB64ToUint8Array(b64Text) {\n  var decodedString = atob(b64Text);\n  var array = new Uint8Array(decodedString.length);\n\n  for (var i = 0; i < decodedString.length; i++) {\n    array[i] = decodedString.charCodeAt(i);\n  }\n\n  return array;\n}\n\nmodule.exports = exports.default;", "/*! @name mpd-parser @version 1.3.0 @license Apache-2.0 */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar resolveUrl = require('@videojs/vhs-utils/cjs/resolve-url');\nvar window = require('global/window');\nvar mediaGroups = require('@videojs/vhs-utils/cjs/media-groups');\nvar decodeB64ToUint8Array = require('@videojs/vhs-utils/cjs/decode-b64-to-uint8-array');\nvar xmldom = require('@xmldom/xmldom');\n\nfunction _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }\n\nvar resolveUrl__default = /*#__PURE__*/_interopDefaultLegacy(resolveUrl);\nvar window__default = /*#__PURE__*/_interopDefaultLegacy(window);\nvar decodeB64ToUint8Array__default = /*#__PURE__*/_interopDefaultLegacy(decodeB64ToUint8Array);\n\nvar version = \"1.3.0\";\n\nconst isObject = obj => {\n  return !!obj && typeof obj === 'object';\n};\n\nconst merge = (...objects) => {\n  return objects.reduce((result, source) => {\n    if (typeof source !== 'object') {\n      return result;\n    }\n\n    Object.keys(source).forEach(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};\nconst values = o => Object.keys(o).map(k => o[k]);\n\nconst range = (start, end) => {\n  const result = [];\n\n  for (let i = start; i < end; i++) {\n    result.push(i);\n  }\n\n  return result;\n};\nconst flatten = lists => lists.reduce((x, y) => x.concat(y), []);\nconst from = list => {\n  if (!list.length) {\n    return [];\n  }\n\n  const result = [];\n\n  for (let i = 0; i < list.length; i++) {\n    result.push(list[i]);\n  }\n\n  return result;\n};\nconst findIndexes = (l, key) => l.reduce((a, e, i) => {\n  if (e[key]) {\n    a.push(i);\n  }\n\n  return a;\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\nconst union = (lists, keyFunction) => {\n  return values(lists.reduce((acc, list) => {\n    list.forEach(el => {\n      acc[keyFunction(el)] = el;\n    });\n    return acc;\n  }, {}));\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 <BaseUrl> 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\nconst urlTypeToSegment = ({\n  baseUrl = '',\n  source = '',\n  range = '',\n  indexRange = ''\n}) => {\n  const segment = {\n    uri: source,\n    resolvedUri: resolveUrl__default['default'](baseUrl || '', source)\n  };\n\n  if (range || indexRange) {\n    const rangeStr = range ? range : indexRange;\n    const ranges = rangeStr.split('-'); // default to parsing this as a BigInt if possible\n\n    let startRange = window__default['default'].BigInt ? window__default['default'].BigInt(ranges[0]) : parseInt(ranges[0], 10);\n    let endRange = window__default['default'].BigInt ? window__default['default'].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\n    if (endRange < Number.MAX_SAFE_INTEGER && typeof endRange === 'bigint') {\n      endRange = Number(endRange);\n    }\n\n    let length;\n\n    if (typeof endRange === 'bigint' || typeof startRange === 'bigint') {\n      length = window__default['default'].BigInt(endRange) - window__default['default'].BigInt(startRange) + window__default['default'].BigInt(1);\n    } else {\n      length = endRange - startRange + 1;\n    }\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\n    segment.byterange = {\n      length,\n      offset: startRange\n    };\n  }\n\n  return segment;\n};\nconst byteRangeToString = byterange => {\n  // `endRange` is one less than `offset + length` because the HTTP range\n  // header uses inclusive ranges\n  let endRange;\n\n  if (typeof byterange.offset === 'bigint' || typeof byterange.length === 'bigint') {\n    endRange = window__default['default'].BigInt(byterange.offset) + window__default['default'].BigInt(byterange.length) - window__default['default'].BigInt(1);\n  } else {\n    endRange = byterange.offset + byterange.length - 1;\n  }\n\n  return `${byterange.offset}-${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\nconst parseEndNumber = endNumber => {\n  if (endNumber && typeof endNumber !== 'number') {\n    endNumber = parseInt(endNumber, 10);\n  }\n\n  if (isNaN(endNumber)) {\n    return null;\n  }\n\n  return endNumber;\n};\n/**\n * Functions for calculating the range of available segments in static and dynamic\n * manifests.\n */\n\n\nconst 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(attributes) {\n    const {\n      duration,\n      timescale = 1,\n      sourceDuration,\n      periodDuration\n    } = attributes;\n    const endNumber = parseEndNumber(attributes.endNumber);\n    const segmentDuration = duration / timescale;\n\n    if (typeof endNumber === 'number') {\n      return {\n        start: 0,\n        end: endNumber\n      };\n    }\n\n    if (typeof periodDuration === 'number') {\n      return {\n        start: 0,\n        end: periodDuration / segmentDuration\n      };\n    }\n\n    return {\n      start: 0,\n      end: sourceDuration / segmentDuration\n    };\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(attributes) {\n    const {\n      NOW,\n      clientOffset,\n      availabilityStartTime,\n      timescale = 1,\n      duration,\n      periodStart = 0,\n      minimumUpdatePeriod = 0,\n      timeShiftBufferDepth = Infinity\n    } = attributes;\n    const 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    const now = (NOW + clientOffset) / 1000; // WC stands for Wall Clock.\n    // Convert the period start time to EPOCH.\n\n    const periodStartWC = availabilityStartTime + periodStart; // Period end in EPOCH is manifest's retrieval time + time until next update.\n\n    const periodEndWC = now + minimumUpdatePeriod;\n    const periodDuration = periodEndWC - periodStartWC;\n    const segmentCount = Math.ceil(periodDuration * timescale / duration);\n    const availableStart = Math.floor((now - periodStartWC - timeShiftBufferDepth) * timescale / duration);\n    const 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/**\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\nconst toSegments = attributes => number => {\n  const {\n    duration,\n    timescale = 1,\n    periodStart,\n    startNumber = 1\n  } = attributes;\n  return {\n    number: startNumber + number,\n    duration: duration / timescale,\n    timeline: periodStart,\n    time: number * duration\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\nconst parseByDuration = attributes => {\n  const {\n    type,\n    duration,\n    timescale = 1,\n    periodDuration,\n    sourceDuration\n  } = attributes;\n  const {\n    start,\n    end\n  } = segmentRange[type](attributes);\n  const segments = range(start, end).map(toSegments(attributes));\n\n  if (type === 'static') {\n    const index = segments.length - 1; // section is either a period or the full source\n\n    const 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\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 <SegmentURL> 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.<Array>} list of segments\n */\n\nconst segmentsFromBase = attributes => {\n  const {\n    baseUrl,\n    initialization = {},\n    sourceDuration,\n    indexRange = '',\n    periodStart,\n    presentationTime,\n    number = 0,\n    duration\n  } = attributes; // 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\n  const initSegment = urlTypeToSegment({\n    baseUrl,\n    source: initialization.sourceURL,\n    range: initialization.range\n  });\n  const segment = urlTypeToSegment({\n    baseUrl,\n    source: baseUrl,\n    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    const segmentTimeInfo = parseByDuration(attributes);\n\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\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\nconst addSidxSegmentsToPlaylist$1 = (playlist, sidx, baseUrl) => {\n  // Retain init segment information\n  const initSegment = playlist.sidx.map ? playlist.sidx.map : null; // Retain source duration from initial main manifest parsing\n\n  const sourceDuration = playlist.sidx.duration; // Retain source timeline\n\n  const timeline = playlist.timeline || 0;\n  const sidxByteRange = playlist.sidx.byterange;\n  const sidxEnd = sidxByteRange.offset + sidxByteRange.length; // Retain timescale of the parsed sidx\n\n  const timescale = sidx.timescale; // referenceType 1 refers to other sidx boxes\n\n  const mediaReferences = sidx.references.filter(r => r.referenceType !== 1);\n  const segments = [];\n  const type = playlist.endList ? 'static' : 'dynamic';\n  const periodStart = playlist.sidx.timeline;\n  let presentationTime = periodStart;\n  let number = playlist.mediaSequence || 0; // firstOffset is the offset from the end of the sidx box\n\n  let startIndex; // eslint-disable-next-line\n\n  if (typeof sidx.firstOffset === 'bigint') {\n    startIndex = window__default['default'].BigInt(sidxEnd) + sidx.firstOffset;\n  } else {\n    startIndex = sidxEnd + sidx.firstOffset;\n  }\n\n  for (let i = 0; i < mediaReferences.length; i++) {\n    const reference = sidx.references[i]; // size of the referenced (sub)segment\n\n    const size = reference.referencedSize; // duration of the referenced (sub)segment, in  the  timescale\n    // this will be converted to seconds when generating segments\n\n    const duration = reference.subsegmentDuration; // should be an inclusive range\n\n    let endIndex; // eslint-disable-next-line\n\n    if (typeof startIndex === 'bigint') {\n      endIndex = startIndex + window__default['default'].BigInt(size) - window__default['default'].BigInt(1);\n    } else {\n      endIndex = startIndex + size - 1;\n    }\n\n    const indexRange = `${startIndex}-${endIndex}`;\n    const attributes = {\n      baseUrl,\n      timescale,\n      timeline,\n      periodStart,\n      presentationTime,\n      number,\n      duration,\n      sourceDuration,\n      indexRange,\n      type\n    };\n    const segment = segmentsFromBase(attributes)[0];\n\n    if (initSegment) {\n      segment.map = initSegment;\n    }\n\n    segments.push(segment);\n\n    if (typeof startIndex === 'bigint') {\n      startIndex += window__default['default'].BigInt(size);\n    } else {\n      startIndex += size;\n    }\n\n    presentationTime += duration / timescale;\n    number++;\n  }\n\n  playlist.segments = segments;\n  return playlist;\n};\n\nconst SUPPORTED_MEDIA_TYPES = ['AUDIO', 'SUBTITLES']; // allow one 60fps frame as leniency (arbitrarily chosen)\n\nconst 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\nconst getUniqueTimelineStarts = timelineStarts => {\n  return union(timelineStarts, ({\n    timeline\n  }) => timeline).sort((a, b) => a.timeline > b.timeline ? 1 : -1);\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\nconst findPlaylistWithName = (playlists, name) => {\n  for (let i = 0; i < playlists.length; i++) {\n    if (playlists[i].attributes.NAME === name) {\n      return playlists[i];\n    }\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\nconst getMediaGroupPlaylists = manifest => {\n  let mediaGroupPlaylists = [];\n  mediaGroups.forEachMediaGroup(manifest, SUPPORTED_MEDIA_TYPES, (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\nconst updateMediaSequenceForPlaylist = ({\n  playlist,\n  mediaSequence\n}) => {\n  playlist.mediaSequence = mediaSequence;\n  playlist.segments.forEach((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\nconst updateSequenceNumbers = ({\n  oldPlaylists,\n  newPlaylists,\n  timelineStarts\n}) => {\n  newPlaylists.forEach(playlist => {\n    playlist.discontinuitySequence = timelineStarts.findIndex(function ({\n      timeline\n    }) {\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    const oldPlaylist = findPlaylistWithName(oldPlaylists, playlist.attributes.NAME);\n\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\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\n    const firstNewSegment = playlist.segments[0];\n    const 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,\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\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\n    const oldMatchingSegment = oldPlaylist.segments[oldMatchingSegmentIndex];\n\n    if (oldMatchingSegment.discontinuity && !firstNewSegment.discontinuity) {\n      firstNewSegment.discontinuity = true;\n      playlist.discontinuityStarts.unshift(0);\n      playlist.discontinuitySequence--;\n    }\n\n    updateMediaSequenceForPlaylist({\n      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\nconst positionManifestOnTimeline = ({\n  oldManifest,\n  newManifest\n}) => {\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  const oldPlaylists = oldManifest.playlists.concat(getMediaGroupPlaylists(oldManifest));\n  const 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,\n    newPlaylists,\n    timelineStarts: newManifest.timelineStarts\n  });\n  return newManifest;\n};\n\nconst generateSidxKey = sidx => sidx && sidx.uri + '-' + byteRangeToString(sidx.byterange);\n\nconst mergeDiscontiguousPlaylists = playlists => {\n  // Break out playlists into groups based on their baseUrl\n  const playlistsByBaseUrl = playlists.reduce(function (acc, cur) {\n    if (!acc[cur.attributes.baseUrl]) {\n      acc[cur.attributes.baseUrl] = [];\n    }\n\n    acc[cur.attributes.baseUrl].push(cur);\n    return acc;\n  }, {});\n  let allPlaylists = [];\n  Object.values(playlistsByBaseUrl).forEach(playlistGroup => {\n    const mergedPlaylists = values(playlistGroup.reduce((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      const name = playlist.attributes.id + (playlist.attributes.lang || '');\n\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          // first segment of subsequent periods signal a discontinuity\n          if (playlist.segments[0]) {\n            playlist.segments[0].discontinuity = true;\n          }\n\n          acc[name].segments.push(...playlist.segments);\n        } // bubble up contentProtection, this assumes all DRM content\n        // has the same contentProtection\n\n\n        if (playlist.attributes.contentProtection) {\n          acc[name].attributes.contentProtection = playlist.attributes.contentProtection;\n        }\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(playlist => {\n    playlist.discontinuityStarts = findIndexes(playlist.segments || [], 'discontinuity');\n    return playlist;\n  });\n};\n\nconst addSidxSegmentsToPlaylist = (playlist, sidxMapping) => {\n  const sidxKey = generateSidxKey(playlist.sidx);\n  const sidxMatch = sidxKey && sidxMapping[sidxKey] && sidxMapping[sidxKey].sidx;\n\n  if (sidxMatch) {\n    addSidxSegmentsToPlaylist$1(playlist, sidxMatch, playlist.sidx.resolvedUri);\n  }\n\n  return playlist;\n};\nconst addSidxSegmentsToPlaylists = (playlists, sidxMapping = {}) => {\n  if (!Object.keys(sidxMapping).length) {\n    return playlists;\n  }\n\n  for (const i in playlists) {\n    playlists[i] = addSidxSegmentsToPlaylist(playlists[i], sidxMapping);\n  }\n\n  return playlists;\n};\nconst formatAudioPlaylist = ({\n  attributes,\n  segments,\n  sidx,\n  mediaSequence,\n  discontinuitySequence,\n  discontinuityStarts\n}, isAudioOnly) => {\n  const playlist = {\n    attributes: {\n      NAME: attributes.id,\n      BANDWIDTH: attributes.bandwidth,\n      CODECS: attributes.codecs,\n      ['PROGRAM-ID']: 1\n    },\n    uri: '',\n    endList: attributes.type === 'static',\n    timeline: attributes.periodStart,\n    resolvedUri: attributes.baseUrl || '',\n    targetDuration: attributes.duration,\n    discontinuitySequence,\n    discontinuityStarts,\n    timelineStarts: attributes.timelineStarts,\n    mediaSequence,\n    segments\n  };\n\n  if (attributes.contentProtection) {\n    playlist.contentProtection = attributes.contentProtection;\n  }\n\n  if (attributes.serviceLocation) {\n    playlist.attributes.serviceLocation = attributes.serviceLocation;\n  }\n\n  if (sidx) {\n    playlist.sidx = sidx;\n  }\n\n  if (isAudioOnly) {\n    playlist.attributes.AUDIO = 'audio';\n    playlist.attributes.SUBTITLES = 'subs';\n  }\n\n  return playlist;\n};\nconst formatVttPlaylist = ({\n  attributes,\n  segments,\n  mediaSequence,\n  discontinuityStarts,\n  discontinuitySequence\n}) => {\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\n  const m3u8Attributes = {\n    NAME: attributes.id,\n    BANDWIDTH: attributes.bandwidth,\n    ['PROGRAM-ID']: 1\n  };\n\n  if (attributes.codecs) {\n    m3u8Attributes.CODECS = attributes.codecs;\n  }\n\n  const 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,\n    discontinuitySequence,\n    mediaSequence,\n    segments\n  };\n\n  if (attributes.serviceLocation) {\n    vttPlaylist.attributes.serviceLocation = attributes.serviceLocation;\n  }\n\n  return vttPlaylist;\n};\nconst organizeAudioPlaylists = (playlists, sidxMapping = {}, isAudioOnly = false) => {\n  let mainPlaylist;\n  const formattedPlaylists = playlists.reduce((a, playlist) => {\n    const role = playlist.attributes.role && playlist.attributes.role.value || '';\n    const language = playlist.attributes.lang || '';\n    let label = playlist.attributes.label || 'main';\n\n    if (language && !playlist.attributes.label) {\n      const roleLabel = role ? ` (${role})` : '';\n      label = `${playlist.attributes.lang}${roleLabel}`;\n    }\n\n    if (!a[label]) {\n      a[label] = {\n        language,\n        autoselect: true,\n        default: role === 'main',\n        playlists: [],\n        uri: ''\n      };\n    }\n\n    const formatted = addSidxSegmentsToPlaylist(formatAudioPlaylist(playlist, isAudioOnly), sidxMapping);\n    a[label].playlists.push(formatted);\n\n    if (typeof mainPlaylist === 'undefined' && role === 'main') {\n      mainPlaylist = playlist;\n      mainPlaylist.default = true;\n    }\n\n    return a;\n  }, {}); // if no playlists have role \"main\", mark the first as main\n\n  if (!mainPlaylist) {\n    const firstLabel = Object.keys(formattedPlaylists)[0];\n    formattedPlaylists[firstLabel].default = true;\n  }\n\n  return formattedPlaylists;\n};\nconst organizeVttPlaylists = (playlists, sidxMapping = {}) => {\n  return playlists.reduce((a, playlist) => {\n    const label = playlist.attributes.label || playlist.attributes.lang || 'text';\n\n    if (!a[label]) {\n      a[label] = {\n        language: label,\n        default: false,\n        autoselect: false,\n        playlists: [],\n        uri: ''\n      };\n    }\n\n    a[label].playlists.push(addSidxSegmentsToPlaylist(formatVttPlaylist(playlist), sidxMapping));\n    return a;\n  }, {});\n};\n\nconst organizeCaptionServices = captionServices => captionServices.reduce((svcObj, svc) => {\n  if (!svc) {\n    return svcObj;\n  }\n\n  svc.forEach(service => {\n    const {\n      channel,\n      language\n    } = service;\n    svcObj[language] = {\n      autoselect: false,\n      default: false,\n      instreamId: channel,\n      language\n    };\n\n    if (service.hasOwnProperty('aspectRatio')) {\n      svcObj[language].aspectRatio = service.aspectRatio;\n    }\n\n    if (service.hasOwnProperty('easyReader')) {\n      svcObj[language].easyReader = service.easyReader;\n    }\n\n    if (service.hasOwnProperty('3D')) {\n      svcObj[language]['3D'] = service['3D'];\n    }\n  });\n  return svcObj;\n}, {});\n\nconst formatVideoPlaylist = ({\n  attributes,\n  segments,\n  sidx,\n  discontinuityStarts\n}) => {\n  const playlist = {\n    attributes: {\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    },\n    uri: '',\n    endList: attributes.type === 'static',\n    timeline: attributes.periodStart,\n    resolvedUri: attributes.baseUrl || '',\n    targetDuration: attributes.duration,\n    discontinuityStarts,\n    timelineStarts: attributes.timelineStarts,\n    segments\n  };\n\n  if (attributes.frameRate) {\n    playlist.attributes['FRAME-RATE'] = attributes.frameRate;\n  }\n\n  if (attributes.contentProtection) {\n    playlist.contentProtection = attributes.contentProtection;\n  }\n\n  if (attributes.serviceLocation) {\n    playlist.attributes.serviceLocation = attributes.serviceLocation;\n  }\n\n  if (sidx) {\n    playlist.sidx = sidx;\n  }\n\n  return playlist;\n};\n\nconst videoOnly = ({\n  attributes\n}) => attributes.mimeType === 'video/mp4' || attributes.mimeType === 'video/webm' || attributes.contentType === 'video';\n\nconst audioOnly = ({\n  attributes\n}) => attributes.mimeType === 'audio/mp4' || attributes.mimeType === 'audio/webm' || attributes.contentType === 'audio';\n\nconst vttOnly = ({\n  attributes\n}) => attributes.mimeType === 'text/vtt' || attributes.contentType === 'text';\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\n\nconst addMediaSequenceValues = (playlists, timelineStarts) => {\n  // increment all segments sequentially\n  playlists.forEach(playlist => {\n    playlist.mediaSequence = 0;\n    playlist.discontinuitySequence = timelineStarts.findIndex(function ({\n      timeline\n    }) {\n      return timeline === playlist.timeline;\n    });\n\n    if (!playlist.segments) {\n      return;\n    }\n\n    playlist.segments.forEach((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\nconst flattenMediaGroupPlaylists = mediaGroupObject => {\n  if (!mediaGroupObject) {\n    return [];\n  }\n\n  return Object.keys(mediaGroupObject).reduce((acc, label) => {\n    const labelContents = mediaGroupObject[label];\n    return acc.concat(labelContents.playlists);\n  }, []);\n};\nconst toM3u8 = ({\n  dashPlaylists,\n  locations,\n  contentSteering,\n  sidxMapping = {},\n  previousManifest,\n  eventStream\n}) => {\n  if (!dashPlaylists.length) {\n    return {};\n  } // grab all main manifest attributes\n\n\n  const {\n    sourceDuration: duration,\n    type,\n    suggestedPresentationDelay,\n    minimumUpdatePeriod\n  } = dashPlaylists[0].attributes;\n  const videoPlaylists = mergeDiscontiguousPlaylists(dashPlaylists.filter(videoOnly)).map(formatVideoPlaylist);\n  const audioPlaylists = mergeDiscontiguousPlaylists(dashPlaylists.filter(audioOnly));\n  const vttPlaylists = mergeDiscontiguousPlaylists(dashPlaylists.filter(vttOnly));\n  const captions = dashPlaylists.map(playlist => playlist.attributes.captionServices).filter(Boolean);\n  const manifest = {\n    allowCache: true,\n    discontinuityStarts: [],\n    segments: [],\n    endList: true,\n    mediaGroups: {\n      AUDIO: {},\n      VIDEO: {},\n      ['CLOSED-CAPTIONS']: {},\n      SUBTITLES: {}\n    },\n    uri: '',\n    duration,\n    playlists: addSidxSegmentsToPlaylists(videoPlaylists, sidxMapping)\n  };\n\n  if (minimumUpdatePeriod >= 0) {\n    manifest.minimumUpdatePeriod = minimumUpdatePeriod * 1000;\n  }\n\n  if (locations) {\n    manifest.locations = locations;\n  }\n\n  if (contentSteering) {\n    manifest.contentSteering = contentSteering;\n  }\n\n  if (type === 'dynamic') {\n    manifest.suggestedPresentationDelay = suggestedPresentationDelay;\n  }\n\n  if (eventStream && eventStream.length > 0) {\n    manifest.eventStream = eventStream;\n  }\n\n  const isAudioOnly = manifest.playlists.length === 0;\n  const organizedAudioGroup = audioPlaylists.length ? organizeAudioPlaylists(audioPlaylists, sidxMapping, isAudioOnly) : null;\n  const organizedVttGroup = vttPlaylists.length ? organizeVttPlaylists(vttPlaylists, sidxMapping) : null;\n  const formattedPlaylists = videoPlaylists.concat(flattenMediaGroupPlaylists(organizedAudioGroup), flattenMediaGroupPlaylists(organizedVttGroup));\n  const playlistTimelineStarts = formattedPlaylists.map(({\n    timelineStarts\n  }) => timelineStarts);\n  manifest.timelineStarts = getUniqueTimelineStarts(playlistTimelineStarts);\n  addMediaSequenceValues(formattedPlaylists, manifest.timelineStarts);\n\n  if (organizedAudioGroup) {\n    manifest.mediaGroups.AUDIO.audio = organizedAudioGroup;\n  }\n\n  if (organizedVttGroup) {\n    manifest.mediaGroups.SUBTITLES.subs = organizedVttGroup;\n  }\n\n  if (captions.length) {\n    manifest.mediaGroups['CLOSED-CAPTIONS'].cc = organizeCaptionServices(captions);\n  }\n\n  if (previousManifest) {\n    return positionManifestOnTimeline({\n      oldManifest: previousManifest,\n      newManifest: manifest\n    });\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 <S />\n *\n * @return {number}\n *        R value to reach the end of the given period\n */\nconst getLiveRValue = (attributes, time, duration) => {\n  const {\n    NOW,\n    clientOffset,\n    availabilityStartTime,\n    timescale = 1,\n    periodStart = 0,\n    minimumUpdatePeriod = 0\n  } = attributes;\n  const now = (NOW + clientOffset) / 1000;\n  const periodStartWC = availabilityStartTime + periodStart;\n  const periodEndWC = now + minimumUpdatePeriod;\n  const 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\n\nconst parseByTimeline = (attributes, segmentTimeline) => {\n  const {\n    type,\n    minimumUpdatePeriod = 0,\n    media = '',\n    sourceDuration,\n    timescale = 1,\n    startNumber = 1,\n    periodStart: timeline\n  } = attributes;\n  const segments = [];\n  let time = -1;\n\n  for (let sIndex = 0; sIndex < segmentTimeline.length; sIndex++) {\n    const S = segmentTimeline[sIndex];\n    const duration = S.d;\n    const repeat = S.r || 0;\n    const segmentTime = S.t || 0;\n\n    if (time < 0) {\n      // first segment\n      time = segmentTime;\n    }\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      //  <S t=\"0\" d=\"1\" />\n      //  <S d=\"1\" />\n      //  <S d=\"1\" />\n      //  <S t=\"5\" d=\"1\" />\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      //  <S d=\"1\" r=\"-1\" />\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\n    let count;\n\n    if (repeat < 0) {\n      const nextS = sIndex + 1;\n\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\n    const end = startNumber + segments.length + count;\n    let number = startNumber + segments.length;\n\n    while (number < end) {\n      segments.push({\n        number,\n        duration: duration / timescale,\n        time,\n        timeline\n      });\n      time += duration;\n      number++;\n    }\n  }\n\n  return segments;\n};\n\nconst 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\nconst identifierReplacement = values => (match, identifier, format, width) => {\n  if (match === '$$') {\n    // escape sequence\n    return '$';\n  }\n\n  if (typeof values[identifier] === 'undefined') {\n    return match;\n  }\n\n  const value = '' + values[identifier];\n\n  if (identifier === 'RepresentationID') {\n    // Format tag shall not be present with RepresentationID\n    return value;\n  }\n\n  if (!format) {\n    width = 1;\n  } else {\n    width = parseInt(width, 10);\n  }\n\n  if (value.length >= width) {\n    return value;\n  }\n\n  return `${new Array(width - value.length + 1).join('0')}${value}`;\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\nconst constructTemplateUrl = (url, values) => url.replace(identifierPattern, identifierReplacement(values));\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\nconst 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\n  if (attributes.duration) {\n    return parseByDuration(attributes);\n  }\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\nconst segmentsFromTemplate = (attributes, segmentTimeline) => {\n  const templateValues = {\n    RepresentationID: attributes.id,\n    Bandwidth: attributes.bandwidth || 0\n  };\n  const {\n    initialization = {\n      sourceURL: '',\n      range: ''\n    }\n  } = attributes;\n  const mapSegment = urlTypeToSegment({\n    baseUrl: attributes.baseUrl,\n    source: constructTemplateUrl(initialization.sourceURL, templateValues),\n    range: initialization.range\n  });\n  const segments = parseTemplateInfo(attributes, segmentTimeline);\n  return segments.map(segment => {\n    templateValues.Number = segment.number;\n    templateValues.Time = segment.time;\n    const 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    const timescale = attributes.timescale || 1; // - if presentationTimeOffset isn't present on any level, default to 0\n\n    const presentationTimeOffset = attributes.presentationTimeOffset || 0;\n    const presentationTime = // 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    const map = {\n      uri,\n      timeline: segment.timeline,\n      duration: segment.duration,\n      resolvedUri: resolveUrl__default['default'](attributes.baseUrl || '', uri),\n      map: mapSegment,\n      number: segment.number,\n      presentationTime\n    };\n    return map;\n  });\n};\n\n/**\n * Converts a <SegmentUrl> (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 *   <SegmentURL> node to translate into a segment object\n * @return {Object} translated segment object\n */\n\nconst SegmentURLToSegmentObject = (attributes, segmentUrl) => {\n  const {\n    baseUrl,\n    initialization = {}\n  } = attributes;\n  const initSegment = urlTypeToSegment({\n    baseUrl,\n    source: initialization.sourceURL,\n    range: initialization.range\n  });\n  const segment = urlTypeToSegment({\n    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 <SegmentURL> 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.<Array>} list of segments\n */\n\n\nconst segmentsFromList = (attributes, segmentTimeline) => {\n  const {\n    duration,\n    segmentUrls = [],\n    periodStart\n  } = attributes; // 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\n  const segmentUrlMap = segmentUrls.map(segmentUrlObject => SegmentURLToSegmentObject(attributes, segmentUrlObject));\n  let segmentTimeInfo;\n\n  if (duration) {\n    segmentTimeInfo = parseByDuration(attributes);\n  }\n\n  if (segmentTimeline) {\n    segmentTimeInfo = parseByTimeline(attributes, segmentTimeline);\n  }\n\n  const segments = segmentTimeInfo.map((segmentTime, index) => {\n    if (segmentUrlMap[index]) {\n      const 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      const timescale = attributes.timescale || 1; // - if presentationTimeOffset isn't present on any level, default to 0\n\n      const 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\n  }).filter(segment => segment);\n  return segments;\n};\n\nconst generateSegments = ({\n  attributes,\n  segmentInfo\n}) => {\n  let segmentAttributes;\n  let segmentsFn;\n\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\n  const segmentsInfo = {\n    attributes\n  };\n\n  if (!segmentsFn) {\n    return segmentsInfo;\n  }\n\n  const 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    const {\n      duration,\n      timescale = 1\n    } = segmentAttributes;\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((max, segment) => {\n      return Math.max(max, Math.ceil(segment.duration));\n    }, 0);\n  } else {\n    segmentAttributes.duration = 0;\n  }\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\n  return segmentsInfo;\n};\nconst toPlaylists = representations => representations.map(generateSegments);\n\nconst findChildren = (element, name) => from(element.childNodes).filter(({\n  tagName\n}) => tagName === name);\nconst getContent = element => element.textContent.trim();\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 */\nconst parseDivisionValue = value => {\n  return parseFloat(value.split('/').reduce((prev, current) => prev / current));\n};\n\nconst parseDuration = str => {\n  const SECONDS_IN_YEAR = 365 * 24 * 60 * 60;\n  const SECONDS_IN_MONTH = 30 * 24 * 60 * 60;\n  const SECONDS_IN_DAY = 24 * 60 * 60;\n  const SECONDS_IN_HOUR = 60 * 60;\n  const SECONDS_IN_MIN = 60; // P10Y10M10DT10H10M10.1S\n\n  const durationRegex = /P(?:(\\d*)Y)?(?:(\\d*)M)?(?:(\\d*)D)?(?:T(?:(\\d*)H)?(?:(\\d*)M)?(?:([\\d.]*)S)?)?/;\n  const match = durationRegex.exec(str);\n\n  if (!match) {\n    return 0;\n  }\n\n  const [year, month, day, hour, minute, second] = match.slice(1);\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};\nconst parseDate = str => {\n  // Date format without timezone according to ISO 8601\n  // YYY-MM-DDThh:mm:ss.ssssss\n  const 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\n  return Date.parse(str);\n};\n\nconst 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(value) {\n    return parseDuration(value);\n  },\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(value) {\n    return parseDate(value) / 1000;\n  },\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(value) {\n    return parseDuration(value);\n  },\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(value) {\n    return parseDuration(value);\n  },\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(value) {\n    return value;\n  },\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(value) {\n    return parseDuration(value);\n  },\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(value) {\n    return parseDuration(value);\n  },\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(value) {\n    return parseInt(value, 10);\n  },\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(value) {\n    return parseInt(value, 10);\n  },\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(value) {\n    return parseInt(value, 10);\n  },\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(value) {\n    return parseDivisionValue(value);\n  },\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(value) {\n    return parseInt(value, 10);\n  },\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(value) {\n    return parseInt(value, 10);\n  },\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(value) {\n    return parseInt(value, 10);\n  },\n\n  /**\n   * Specifies the constant approximate Segment duration\n   * NOTE: The <Period> 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(value) {\n    const parsedValue = parseInt(value, 10);\n\n    if (isNaN(parsedValue)) {\n      return parseDuration(value);\n    }\n\n    return parsedValue;\n  },\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(value) {\n    return parseInt(value, 10);\n  },\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(value) {\n    return parseInt(value, 10);\n  },\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(value) {\n    return parseInt(value, 10);\n  },\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(value) {\n    return parseInt(value, 10);\n  },\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(value) {\n    return value;\n  }\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\nconst parseAttributes = el => {\n  if (!(el && el.attributes)) {\n    return {};\n  }\n\n  return from(el.attributes).reduce((a, e) => {\n    const parseFn = parsers[e.name] || parsers.DEFAULT;\n    a[e.name] = parseFn(e.value);\n    return a;\n  }, {});\n};\n\nconst 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\nconst buildBaseUrls = (references, baseUrlElements) => {\n  if (!baseUrlElements.length) {\n    return references;\n  }\n\n  return flatten(references.map(function (reference) {\n    return baseUrlElements.map(function (baseUrlElement) {\n      const initialBaseUrl = getContent(baseUrlElement);\n      const resolvedBaseUrl = resolveUrl__default['default'](reference.baseUrl, initialBaseUrl);\n      const 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\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\nconst getSegmentInformation = adaptationSet => {\n  const segmentTemplate = findChildren(adaptationSet, 'SegmentTemplate')[0];\n  const segmentList = findChildren(adaptationSet, 'SegmentList')[0];\n  const segmentUrls = segmentList && findChildren(segmentList, 'SegmentURL').map(s => merge({\n    tag: 'SegmentURL'\n  }, parseAttributes(s)));\n  const segmentBase = findChildren(adaptationSet, 'SegmentBase')[0];\n  const segmentTimelineParentNode = segmentList || segmentTemplate;\n  const segmentTimeline = segmentTimelineParentNode && findChildren(segmentTimelineParentNode, 'SegmentTimeline')[0];\n  const segmentInitializationParentNode = segmentList || segmentBase || segmentTemplate;\n  const segmentInitialization = segmentInitializationParentNode && findChildren(segmentInitializationParentNode, 'Initialization')[0]; // SegmentTemplate is handled slightly differently, since it can have both\n  // @initialization and an <Initialization> node.  @initialization can be templated,\n  // while the node can have a url and range specified.  If the <SegmentTemplate> has\n  // both @initialization and an <Initialization> subelement we opt to override with\n  // the node, as this interaction is not defined in the spec.\n\n  const template = segmentTemplate && parseAttributes(segmentTemplate);\n\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 <SegmentTemplate>\n    template.initialization = {\n      sourceURL: template.initialization\n    };\n  }\n\n  const segmentInfo = {\n    template,\n    segmentTimeline: segmentTimeline && findChildren(segmentTimeline, 'S').map(s => parseAttributes(s)),\n    list: segmentList && merge(parseAttributes(segmentList), {\n      segmentUrls,\n      initialization: parseAttributes(segmentInitialization)\n    }),\n    base: segmentBase && merge(parseAttributes(segmentBase), {\n      initialization: parseAttributes(segmentInitialization)\n    })\n  };\n  Object.keys(segmentInfo).forEach(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\nconst inheritBaseUrls = (adaptationSetAttributes, adaptationSetBaseUrls, adaptationSetSegmentInfo) => representation => {\n  const repBaseUrlElements = findChildren(representation, 'BaseURL');\n  const repBaseUrls = buildBaseUrls(adaptationSetBaseUrls, repBaseUrlElements);\n  const attributes = merge(adaptationSetAttributes, parseAttributes(representation));\n  const representationSegmentInfo = getSegmentInformation(representation);\n  return repBaseUrls.map(baseUrl => {\n    return {\n      segmentInfo: merge(adaptationSetSegmentInfo, representationSegmentInfo),\n      attributes: merge(attributes, baseUrl)\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\nconst generateKeySystemInformation = contentProtectionNodes => {\n  return contentProtectionNodes.reduce((acc, node) => {\n    const 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\n    const keySystem = keySystemsMap[attributes.schemeIdUri];\n\n    if (keySystem) {\n      acc[keySystem] = {\n        attributes\n      };\n      const psshNode = findChildren(node, 'cenc:pssh')[0];\n\n      if (psshNode) {\n        const pssh = getContent(psshNode);\n        acc[keySystem].pssh = pssh && decodeB64ToUint8Array__default['default'](pssh);\n      }\n    }\n\n    return acc;\n  }, {});\n}; // defined in ANSI_SCTE 214-1 2016\n\n\nconst parseCaptionServiceMetadata = service => {\n  // 608 captions\n  if (service.schemeIdUri === 'urn:scte:dash:cc:cea-608:2015') {\n    const values = typeof service.value !== 'string' ? [] : service.value.split(';');\n    return values.map(value => {\n      let channel;\n      let language; // default language to value\n\n      language = value;\n\n      if (/^CC\\d=/.test(value)) {\n        [channel, language] = value.split('=');\n      } else if (/^CC\\d$/.test(value)) {\n        channel = value;\n      }\n\n      return {\n        channel,\n        language\n      };\n    });\n  } else if (service.schemeIdUri === 'urn:scte:dash:cc:cea-708:2015') {\n    const values = typeof service.value !== 'string' ? [] : service.value.split(';');\n    return values.map(value => {\n      const 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\n      if (/=/.test(value)) {\n        const [channel, opts = ''] = value.split('=');\n        flags.channel = channel;\n        flags.language = value;\n        opts.split(',').forEach(opt => {\n          const [name, val] = opt.split(':');\n\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\n      if (flags.channel) {\n        flags.channel = 'SERVICE' + flags.channel;\n      }\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\nconst toEventStream = period => {\n  // get and flatten all EventStreams tags and parse attributes and children\n  return flatten(findChildren(period.node, 'EventStream').map(eventStream => {\n    const eventStreamAttributes = parseAttributes(eventStream);\n    const schemeIdUri = eventStreamAttributes.schemeIdUri; // find all Events per EventStream tag and map to return objects\n\n    return findChildren(eventStream, 'Event').map(event => {\n      const eventAttributes = parseAttributes(event);\n      const presentationTime = eventAttributes.presentationTime || 0;\n      const timescale = eventStreamAttributes.timescale || 1;\n      const duration = eventAttributes.duration || 0;\n      const start = presentationTime / timescale + period.attributes.start;\n      return {\n        schemeIdUri,\n        value: eventStreamAttributes.value,\n        id: eventAttributes.id,\n        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\nconst toRepresentations = (periodAttributes, periodBaseUrls, periodSegmentInfo) => adaptationSet => {\n  const adaptationSetAttributes = parseAttributes(adaptationSet);\n  const adaptationSetBaseUrls = buildBaseUrls(periodBaseUrls, findChildren(adaptationSet, 'BaseURL'));\n  const role = findChildren(adaptationSet, 'Role')[0];\n  const roleAttributes = {\n    role: parseAttributes(role)\n  };\n  let attrs = merge(periodAttributes, adaptationSetAttributes, roleAttributes);\n  const accessibility = findChildren(adaptationSet, 'Accessibility')[0];\n  const captionServices = parseCaptionServiceMetadata(parseAttributes(accessibility));\n\n  if (captionServices) {\n    attrs = merge(attrs, {\n      captionServices\n    });\n  }\n\n  const label = findChildren(adaptationSet, 'Label')[0];\n\n  if (label && label.childNodes.length) {\n    const labelVal = label.childNodes[0].nodeValue.trim();\n    attrs = merge(attrs, {\n      label: labelVal\n    });\n  }\n\n  const contentProtection = generateKeySystemInformation(findChildren(adaptationSet, 'ContentProtection'));\n\n  if (Object.keys(contentProtection).length) {\n    attrs = merge(attrs, {\n      contentProtection\n    });\n  }\n\n  const segmentInfo = getSegmentInformation(adaptationSet);\n  const representations = findChildren(adaptationSet, 'Representation');\n  const adaptationSetSegmentInfo = merge(periodSegmentInfo, segmentInfo);\n  return flatten(representations.map(inheritBaseUrls(attrs, adaptationSetBaseUrls, adaptationSetSegmentInfo)));\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\nconst toAdaptationSets = (mpdAttributes, mpdBaseUrls) => (period, index) => {\n  const periodBaseUrls = buildBaseUrls(mpdBaseUrls, findChildren(period.node, 'BaseURL'));\n  const periodAttributes = merge(mpdAttributes, {\n    periodStart: period.attributes.start\n  });\n\n  if (typeof period.attributes.duration === 'number') {\n    periodAttributes.periodDuration = period.attributes.duration;\n  }\n\n  const adaptationSets = findChildren(period.node, 'AdaptationSet');\n  const periodSegmentInfo = getSegmentInformation(period.node);\n  return flatten(adaptationSets.map(toRepresentations(periodAttributes, periodBaseUrls, periodSegmentInfo)));\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\nconst 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\n  if (!contentSteeringNodes.length) {\n    return null;\n  }\n\n  const 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\nconst getPeriodStart = ({\n  attributes,\n  priorPeriodAttributes,\n  mpdType\n}) => {\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\n  if (priorPeriodAttributes && typeof priorPeriodAttributes.start === 'number' && typeof priorPeriodAttributes.duration === 'number') {\n    return priorPeriodAttributes.start + priorPeriodAttributes.duration;\n  } // (3)\n\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\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\nconst inheritAttributes = (mpd, options = {}) => {\n  const {\n    manifestUri = '',\n    NOW = Date.now(),\n    clientOffset = 0,\n    // TODO: For now, we are expecting an eventHandler callback function\n    // to be passed into the mpd parser as an option.\n    // In the future, we should enable stream parsing by using the Stream class from vhs-utils.\n    // This will support new features including a standardized event handler.\n    // See the m3u8 parser for examples of how stream parsing is currently used for HLS parsing.\n    // https://github.com/videojs/vhs-utils/blob/88d6e10c631e57a5af02c5a62bc7376cd456b4f5/src/stream.js#L9\n    eventHandler = function () {}\n  } = options;\n  const periodNodes = findChildren(mpd, 'Period');\n\n  if (!periodNodes.length) {\n    throw new Error(errors.INVALID_NUMBER_OF_PERIOD);\n  }\n\n  const locations = findChildren(mpd, 'Location');\n  const mpdAttributes = parseAttributes(mpd);\n  const mpdBaseUrls = buildBaseUrls([{\n    baseUrl: manifestUri\n  }], findChildren(mpd, 'BaseURL'));\n  const 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\n  if (locations.length) {\n    mpdAttributes.locations = locations.map(getContent);\n  }\n\n  const 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((node, index) => {\n    const attributes = parseAttributes(node); // Use the last modified prior period, as it may contain added information necessary\n    // for this period.\n\n    const priorPeriod = periods[index - 1];\n    attributes.start = getPeriodStart({\n      attributes,\n      priorPeriodAttributes: priorPeriod ? priorPeriod.attributes : null,\n      mpdType: mpdAttributes.type\n    });\n    periods.push({\n      node,\n      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};\n\nconst stringToMpdXml = manifestString => {\n  if (manifestString === '') {\n    throw new Error(errors.DASH_EMPTY_MANIFEST);\n  }\n\n  const parser = new xmldom.DOMParser();\n  let xml;\n  let mpd;\n\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\n  if (!mpd || mpd && mpd.getElementsByTagName('parsererror').length > 0) {\n    throw new Error(errors.DASH_INVALID_XML);\n  }\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\nconst parseUTCTimingScheme = mpd => {\n  const UTCTimingNode = findChildren(mpd, 'UTCTiming')[0];\n\n  if (!UTCTimingNode) {\n    return null;\n  }\n\n  const attributes = parseAttributes(UTCTimingNode);\n\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\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\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\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\n  return attributes;\n};\n\nconst 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\nconst parse = (manifestString, options = {}) => {\n  const parsedManifestInfo = inheritAttributes(stringToMpdXml(manifestString), options);\n  const 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\n\nconst parseUTCTiming = manifestString => parseUTCTimingScheme(stringToMpdXml(manifestString));\n\nexports.VERSION = VERSION;\nexports.addSidxSegmentsToPlaylist = addSidxSegmentsToPlaylist$1;\nexports.generateSidxKey = generateSidxKey;\nexports.inheritAttributes = inheritAttributes;\nexports.parse = parse;\nexports.parseUTCTiming = parseUTCTiming;\nexports.stringToMpdXml = stringToMpdXml;\nexports.toM3u8 = toM3u8;\nexports.toPlaylists = toPlaylists;\n", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.getId3Offset = exports.getId3Size = void 0;\n\nvar _byteHelpers = require(\"./byte-helpers.js\");\n\nvar ID3 = (0, _byteHelpers.toUint8)([0x49, 0x44, 0x33]);\n\nvar getId3Size = function getId3Size(bytes, offset) {\n  if (offset === void 0) {\n    offset = 0;\n  }\n\n  bytes = (0, _byteHelpers.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\n  if (footerPresent) {\n    return returnSize + 20;\n  }\n\n  return returnSize + 10;\n};\n\nexports.getId3Size = getId3Size;\n\nvar getId3Offset = function getId3Offset(bytes, offset) {\n  if (offset === void 0) {\n    offset = 0;\n  }\n\n  bytes = (0, _byteHelpers.toUint8)(bytes);\n\n  if (bytes.length - offset < 10 || !(0, _byteHelpers.bytesMatch)(bytes, ID3, {\n    offset: offset\n  })) {\n    return offset;\n  }\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\nexports.getId3Offset = getId3Offset;", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.getHvcCodec = exports.getAvcCodec = exports.getAv1Codec = void 0;\n\nvar _byteHelpers = require(\"./byte-helpers.js\");\n\n// https://aomediacodec.github.io/av1-isobmff/#av1codecconfigurationbox-syntax\n// https://developer.mozilla.org/en-US/docs/Web/Media/Formats/codecs_parameter#AV1\nvar getAv1Codec = function getAv1Codec(bytes) {\n  var codec = '';\n  var profile = bytes[1] >>> 3;\n  var level = bytes[1] & 0x1F;\n  var tier = bytes[2] >>> 7;\n  var highBitDepth = (bytes[2] & 0x40) >> 6;\n  var twelveBit = (bytes[2] & 0x20) >> 5;\n  var monochrome = (bytes[2] & 0x10) >> 4;\n  var chromaSubsamplingX = (bytes[2] & 0x08) >> 3;\n  var chromaSubsamplingY = (bytes[2] & 0x04) >> 2;\n  var chromaSamplePosition = bytes[2] & 0x03;\n  codec += profile + \".\" + (0, _byteHelpers.padStart)(level, 2, '0');\n\n  if (tier === 0) {\n    codec += 'M';\n  } else if (tier === 1) {\n    codec += 'H';\n  }\n\n  var bitDepth;\n\n  if (profile === 2 && highBitDepth) {\n    bitDepth = twelveBit ? 12 : 10;\n  } else {\n    bitDepth = highBitDepth ? 10 : 8;\n  }\n\n  codec += \".\" + (0, _byteHelpers.padStart)(bitDepth, 2, '0'); // TODO: can we parse color range??\n\n  codec += \".\" + monochrome;\n  codec += \".\" + chromaSubsamplingX + chromaSubsamplingY + chromaSamplePosition;\n  return codec;\n};\n\nexports.getAv1Codec = getAv1Codec;\n\nvar getAvcCodec = function getAvcCodec(bytes) {\n  var profileId = (0, _byteHelpers.toHexString)(bytes[1]);\n  var constraintFlags = (0, _byteHelpers.toHexString)(bytes[2] & 0xFC);\n  var levelId = (0, _byteHelpers.toHexString)(bytes[3]);\n  return \"\" + profileId + constraintFlags + levelId;\n};\n\nexports.getAvcCodec = getAvcCodec;\n\nvar getHvcCodec = function getHvcCodec(bytes) {\n  var codec = '';\n  var profileSpace = bytes[1] >> 6;\n  var profileId = bytes[1] & 0x1F;\n  var tierFlag = (bytes[1] & 0x20) >> 5;\n  var profileCompat = bytes.subarray(2, 6);\n  var constraintIds = bytes.subarray(6, 12);\n  var levelId = bytes[12];\n\n  if (profileSpace === 1) {\n    codec += 'A';\n  } else if (profileSpace === 2) {\n    codec += 'B';\n  } else if (profileSpace === 3) {\n    codec += 'C';\n  }\n\n  codec += profileId + \".\"; // ffmpeg does this in big endian\n\n  var profileCompatVal = parseInt((0, _byteHelpers.toBinaryString)(profileCompat).split('').reverse().join(''), 2); // apple does this in little endian...\n\n  if (profileCompatVal > 255) {\n    profileCompatVal = parseInt((0, _byteHelpers.toBinaryString)(profileCompat), 2);\n  }\n\n  codec += profileCompatVal.toString(16) + \".\";\n\n  if (tierFlag === 0) {\n    codec += 'L';\n  } else {\n    codec += 'H';\n  }\n\n  codec += levelId;\n  var constraints = '';\n\n  for (var i = 0; i < constraintIds.length; i++) {\n    var v = constraintIds[i];\n\n    if (v) {\n      if (constraints) {\n        constraints += '.';\n      }\n\n      constraints += v.toString(16);\n    }\n  }\n\n  if (constraints) {\n    codec += \".\" + constraints;\n  }\n\n  return codec;\n};\n\nexports.getHvcCodec = getHvcCodec;", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.setOpusHead = exports.parseOpusHead = exports.OPUS_HEAD = void 0;\nvar OPUS_HEAD = new Uint8Array([// O, p, u, s\n0x4f, 0x70, 0x75, 0x73, // 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\nexports.OPUS_HEAD = OPUS_HEAD;\n\nvar 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\n  if (config.channelMappingFamily > 0 && bytes.length > 10) {\n    config.streamCount = view.getUint8(11);\n    config.twoChannelStreamCount = view.getUint8(12);\n    config.channelMapping = [];\n\n    for (var c = 0; c < config.channels; c++) {\n      config.channelMapping.push(view.getUint8(13 + c));\n    }\n  }\n\n  return config;\n};\n\nexports.parseOpusHead = parseOpusHead;\n\nvar 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\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\n  return new Uint8Array(view.buffer);\n};\n\nexports.setOpusHead = setOpusHead;", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.parseMediaInfo = exports.parseTracks = exports.addSampleDescription = exports.buildFrameTable = exports.findNamedBox = exports.findBox = exports.parseDescriptors = void 0;\n\nvar _byteHelpers = require(\"./byte-helpers.js\");\n\nvar _codecHelpers = require(\"./codec-helpers.js\");\n\nvar _opusHelpers = require(\"./opus-helpers.js\");\n\nvar normalizePath = function normalizePath(path) {\n  if (typeof path === 'string') {\n    return (0, _byteHelpers.stringToBytes)(path);\n  }\n\n  if (typeof path === 'number') {\n    return path;\n  }\n\n  return path;\n};\n\nvar normalizePaths = function normalizePaths(paths) {\n  if (!Array.isArray(paths)) {\n    return [normalizePath(paths)];\n  }\n\n  return paths.map(function (p) {\n    return normalizePath(p);\n  });\n};\n\nvar DESCRIPTORS;\n\nvar parseDescriptors = function parseDescriptors(bytes) {\n  bytes = (0, _byteHelpers.toUint8)(bytes);\n  var results = [];\n  var i = 0;\n\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\n    while (byte & 0x80) {\n      size = (byte & 0x7F) << 7;\n      byte = bytes[headerSize];\n      headerSize++;\n    }\n\n    size += byte & 0x7F;\n\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\n      if (tag === id) {\n        results.push(parser(bytes.subarray(headerSize, headerSize + size)));\n        break;\n      }\n    }\n\n    i += size + headerSize;\n  }\n\n  return results;\n};\n\nexports.parseDescriptors = parseDescriptors;\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\n    if (desc.flags & 0x40) {\n      var len = bytes[desc.size];\n      desc.url = (0, _byteHelpers.bytesToString)(bytes.subarray(desc.size + 1, desc.size + 1 + len));\n      desc.size += len;\n    } // ocr es id\n\n\n    if (desc.flags & 0x20) {\n      desc.ocrEsId = bytes[desc.size] << 8 | bytes[desc.size + 1];\n      desc.size += 2;\n    }\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\nvar findBox = function findBox(bytes, paths, complete) {\n  if (complete === void 0) {\n    complete = false;\n  }\n\n  paths = normalizePaths(paths);\n  bytes = (0, _byteHelpers.toUint8)(bytes);\n  var results = [];\n\n  if (!paths.length) {\n    // short-circuit the search for empty paths\n    return results;\n  }\n\n  var i = 0;\n\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\n    var end = i + size;\n\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\n      end = bytes.length;\n    }\n\n    var data = bytes.subarray(i + 8, end);\n\n    if ((0, _byteHelpers.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\n    i = end;\n  } // we've finished searching all of bytes\n\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\n\nexports.findBox = findBox;\n\nvar findNamedBox = function findNamedBox(bytes, name) {\n  name = normalizePath(name);\n\n  if (!name.length) {\n    // short-circuit the search for empty paths\n    return bytes.subarray(bytes.length);\n  }\n\n  var i = 0;\n\n  while (i < bytes.length) {\n    if ((0, _byteHelpers.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\n    i++;\n  } // we've finished searching all of bytes\n\n\n  return bytes.subarray(bytes.length);\n};\n\nexports.findNamedBox = findNamedBox;\n\nvar parseSamples = function parseSamples(data, entrySize, parseEntry) {\n  if (entrySize === void 0) {\n    entrySize = 4;\n  }\n\n  if (parseEntry === void 0) {\n    parseEntry = function parseEntry(d) {\n      return (0, _byteHelpers.bytesToNumber)(d);\n    };\n  }\n\n  var entries = [];\n\n  if (!data || !data.length) {\n    return entries;\n  }\n\n  var entryCount = (0, _byteHelpers.bytesToNumber)(data.subarray(4, 8));\n\n  for (var i = 8; entryCount; i += entrySize, entryCount--) {\n    entries.push(parseEntry(data.subarray(i, i + entrySize)));\n  }\n\n  return entries;\n};\n\nvar 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: (0, _byteHelpers.bytesToNumber)(entry.subarray(0, 4)),\n      sampleDelta: (0, _byteHelpers.bytesToNumber)(entry.subarray(4, 8))\n    };\n  });\n  var samplesToChunks = parseSamples(findBox(stbl, ['stsc'])[0], 12, function (entry) {\n    return {\n      firstChunk: (0, _byteHelpers.bytesToNumber)(entry.subarray(0, 4)),\n      samplesPerChunk: (0, _byteHelpers.bytesToNumber)(entry.subarray(4, 8)),\n      sampleDescriptionIndex: (0, _byteHelpers.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\n  for (var chunkIndex = 0; chunkIndex < chunkOffsets.length; chunkIndex++) {\n    var samplesInChunk = void 0;\n\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\n      if (isThisOne) {\n        samplesInChunk = sampleToChunk.samplesPerChunk;\n        break;\n      }\n    }\n\n    var chunkOffset = chunkOffsets[chunkIndex];\n\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\n      if (keySamples.length && keySamples.indexOf(frames.length + 1) !== -1) {\n        keyframe = true;\n      }\n\n      var frame = {\n        keyframe: keyframe,\n        start: chunkOffset,\n        end: chunkOffset + frameEnd\n      };\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\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\n      frames.push(frame);\n      chunkOffset += frameEnd;\n    }\n  }\n\n  return frames;\n};\n\nexports.buildFrameTable = buildFrameTable;\n\nvar addSampleDescription = function addSampleDescription(track, bytes) {\n  var codec = (0, _byteHelpers.bytesToString)(bytes.subarray(0, 4));\n\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\n  if (codec === 'avc1') {\n    var avcC = findNamedBox(bytes, 'avcC'); // AVCDecoderConfigurationRecord\n\n    codec += \".\" + (0, _codecHelpers.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 += \".\" + (0, _codecHelpers.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\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 += '.' + (0, _byteHelpers.toHexString)(decoderConfig.oti);\n\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 += \".\" + (0, _codecHelpers.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 += \".\" + (0, _byteHelpers.padStart)(profile, 2, '0');\n    codec += \".\" + (0, _byteHelpers.padStart)(level, 2, '0');\n    codec += \".\" + (0, _byteHelpers.padStart)(bitDepth, 2, '0');\n    codec += \".\" + (0, _byteHelpers.padStart)(chromaSubsampling, 2, '0');\n    codec += \".\" + (0, _byteHelpers.padStart)(colourPrimaries, 2, '0');\n    codec += \".\" + (0, _byteHelpers.padStart)(transferCharacteristics, 2, '0');\n    codec += \".\" + (0, _byteHelpers.padStart)(matrixCoefficients, 2, '0');\n    codec += \".\" + (0, _byteHelpers.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 = (0, _opusHelpers.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\n  track.codec = codec;\n};\n\nexports.addSampleDescription = addSampleDescription;\n\nvar parseTracks = function parseTracks(bytes, frameTable) {\n  if (frameTable === void 0) {\n    frameTable = true;\n  }\n\n  bytes = (0, _byteHelpers.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 = (0, _byteHelpers.bytesToString)(hdlr.subarray(8, 12));\n\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\n    var tkhd = findBox(trak, ['tkhd'])[0];\n\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\n    var mdhd = findBox(mdia, ['mdhd'])[0];\n\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\n    var stbl = findBox(mdia, ['minf', 'stbl'])[0];\n    var stsd = findBox(stbl, ['stsd'])[0];\n    var descriptionCount = (0, _byteHelpers.bytesToNumber)(stsd.subarray(4, 8));\n    var offset = 8; // add codec and codec info\n\n    while (descriptionCount--) {\n      var len = (0, _byteHelpers.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\n    if (frameTable) {\n      track.frameTable = buildFrameTable(stbl, track.timescale);\n    } // codec has no sub parameters\n\n\n    tracks.push(track);\n  });\n  return tracks;\n};\n\nexports.parseTracks = parseTracks;\n\nvar parseMediaInfo = function parseMediaInfo(bytes) {\n  var mvhd = findBox(bytes, ['moov', 'mvhd'], true)[0];\n\n  if (!mvhd || !mvhd.length) {\n    return;\n  }\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 = (0, _byteHelpers.bytesToNumber)(mvhd.subarray(20, 24));\n    info.duration = (0, _byteHelpers.bytesToNumber)(mvhd.subarray(24, 32));\n  } else {\n    info.timestampScale = (0, _byteHelpers.bytesToNumber)(mvhd.subarray(12, 16));\n    info.duration = (0, _byteHelpers.bytesToNumber)(mvhd.subarray(16, 20));\n  }\n\n  info.bytes = mvhd;\n  return info;\n};\n\nexports.parseMediaInfo = parseMediaInfo;", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.parseData = exports.parseTracks = exports.decodeBlock = exports.findEbml = exports.EBML_TAGS = void 0;\n\nvar _byteHelpers = require(\"./byte-helpers\");\n\nvar _codecHelpers = require(\"./codec-helpers.js\");\n\n// 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/\nvar EBML_TAGS = {\n  EBML: (0, _byteHelpers.toUint8)([0x1A, 0x45, 0xDF, 0xA3]),\n  DocType: (0, _byteHelpers.toUint8)([0x42, 0x82]),\n  Segment: (0, _byteHelpers.toUint8)([0x18, 0x53, 0x80, 0x67]),\n  SegmentInfo: (0, _byteHelpers.toUint8)([0x15, 0x49, 0xA9, 0x66]),\n  Tracks: (0, _byteHelpers.toUint8)([0x16, 0x54, 0xAE, 0x6B]),\n  Track: (0, _byteHelpers.toUint8)([0xAE]),\n  TrackNumber: (0, _byteHelpers.toUint8)([0xd7]),\n  DefaultDuration: (0, _byteHelpers.toUint8)([0x23, 0xe3, 0x83]),\n  TrackEntry: (0, _byteHelpers.toUint8)([0xAE]),\n  TrackType: (0, _byteHelpers.toUint8)([0x83]),\n  FlagDefault: (0, _byteHelpers.toUint8)([0x88]),\n  CodecID: (0, _byteHelpers.toUint8)([0x86]),\n  CodecPrivate: (0, _byteHelpers.toUint8)([0x63, 0xA2]),\n  VideoTrack: (0, _byteHelpers.toUint8)([0xe0]),\n  AudioTrack: (0, _byteHelpers.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: (0, _byteHelpers.toUint8)([0x1F, 0x43, 0xB6, 0x75]),\n  Timestamp: (0, _byteHelpers.toUint8)([0xE7]),\n  TimestampScale: (0, _byteHelpers.toUint8)([0x2A, 0xD7, 0xB1]),\n  BlockGroup: (0, _byteHelpers.toUint8)([0xA0]),\n  BlockDuration: (0, _byteHelpers.toUint8)([0x9B]),\n  Block: (0, _byteHelpers.toUint8)([0xA1]),\n  SimpleBlock: (0, _byteHelpers.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\nexports.EBML_TAGS = EBML_TAGS;\nvar LENGTH_TABLE = [128, 64, 32, 16, 8, 4, 2, 1];\n\nvar getLength = function getLength(byte) {\n  var len = 1;\n\n  for (var i = 0; i < LENGTH_TABLE.length; i++) {\n    if (byte & LENGTH_TABLE[i]) {\n      break;\n    }\n\n    len++;\n  }\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\n\nvar getvint = function getvint(bytes, offset, removeLength, signed) {\n  if (removeLength === void 0) {\n    removeLength = true;\n  }\n\n  if (signed === void 0) {\n    signed = false;\n  }\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\n  return {\n    length: length,\n    value: (0, _byteHelpers.bytesToNumber)(valueBytes, {\n      signed: signed\n    }),\n    bytes: valueBytes\n  };\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\n  if (typeof path === 'number') {\n    return (0, _byteHelpers.numberToBytes)(path);\n  }\n\n  return path;\n};\n\nvar normalizePaths = function normalizePaths(paths) {\n  if (!Array.isArray(paths)) {\n    return [normalizePath(paths)];\n  }\n\n  return paths.map(function (p) {\n    return normalizePath(p);\n  });\n};\n\nvar getInfinityDataSize = function getInfinityDataSize(id, bytes, offset) {\n  if (offset >= bytes.length) {\n    return bytes.length;\n  }\n\n  var innerid = getvint(bytes, offset, false);\n\n  if ((0, _byteHelpers.bytesMatch)(id.bytes, innerid.bytes)) {\n    return offset;\n  }\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\n\nvar findEbml = function findEbml(bytes, paths) {\n  paths = normalizePaths(paths);\n  bytes = (0, _byteHelpers.toUint8)(bytes);\n  var results = [];\n\n  if (!paths.length) {\n    return results;\n  }\n\n  var i = 0;\n\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\n      if (dataHeader.value !== bytes.length) {\n        dataHeader.value -= dataStart;\n      }\n    }\n\n    var dataEnd = dataStart + dataHeader.value > bytes.length ? bytes.length : dataStart + dataHeader.value;\n    var data = bytes.subarray(dataStart, dataEnd);\n\n    if ((0, _byteHelpers.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\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\n  return results;\n}; // see https://www.matroska.org/technical/basics.html#block-structure\n\n\nexports.findEbml = findEbml;\n\nvar decodeBlock = function decodeBlock(block, type, timestampScale, clusterTimestamp) {\n  var duration;\n\n  if (type === 'group') {\n    duration = findEbml(block, [EBML_TAGS.BlockDuration])[0];\n\n    if (duration) {\n      duration = (0, _byteHelpers.bytesToNumber)(duration);\n      duration = 1 / timestampScale * duration * timestampScale / 1000;\n    }\n\n    block = findEbml(block, [EBML_TAGS.Block])[0];\n    type = 'block'; // treat data as a block after this point\n  }\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\n  if (!parsed.lacing) {\n    parsed.frames.push(data);\n    return parsed;\n  }\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\n    for (var i = 0; i < numberOfFrames; i++) {\n      frameSizes.push(sizeOfFrame);\n    }\n  } // xiph\n\n\n  if (parsed.lacing === 1) {\n    for (var _i = 0; _i < numberOfFrames - 1; _i++) {\n      var size = 0;\n\n      do {\n        size += data[offset];\n        offset++;\n      } while (data[offset - 1] === 0xFF);\n\n      frameSizes.push(size);\n    }\n  } // ebml\n\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\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\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\n\nexports.decodeBlock = decodeBlock;\n\nvar parseVp9Private = function parseVp9Private(bytes) {\n  var i = 0;\n  var params = {};\n\n  while (i < bytes.length) {\n    var id = bytes[i] & 0x7f;\n    var len = bytes[i + 1];\n    var val = void 0;\n\n    if (len === 1) {\n      val = bytes[i + 2];\n    } else {\n      val = bytes.subarray(i + 2, i + 2 + len);\n    }\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\n    i += 2 + len;\n  }\n\n  return params;\n};\n\nvar parseTracks = function parseTracks(bytes) {\n  bytes = (0, _byteHelpers.toUint8)(bytes);\n  var decodedTracks = [];\n  var tracks = findEbml(bytes, [EBML_TAGS.Segment, EBML_TAGS.Tracks, EBML_TAGS.Track]);\n\n  if (!tracks.length) {\n    tracks = findEbml(bytes, [EBML_TAGS.Tracks, EBML_TAGS.Track]);\n  }\n\n  if (!tracks.length) {\n    tracks = findEbml(bytes, [EBML_TAGS.Track]);\n  }\n\n  if (!tracks.length) {\n    return decodedTracks;\n  }\n\n  tracks.forEach(function (track) {\n    var trackType = findEbml(track, EBML_TAGS.TrackType)[0];\n\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\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\n    var decodedTrack = {\n      rawCodec: (0, _byteHelpers.bytesToString)(findEbml(track, [EBML_TAGS.CodecID])[0]),\n      type: trackType,\n      codecPrivate: findEbml(track, [EBML_TAGS.CodecPrivate])[0],\n      number: (0, _byteHelpers.bytesToNumber)(findEbml(track, [EBML_TAGS.TrackNumber])[0]),\n      defaultDuration: (0, _byteHelpers.bytesToNumber)(findEbml(track, [EBML_TAGS.DefaultDuration])[0]),\n      default: findEbml(track, [EBML_TAGS.FlagDefault])[0],\n      rawData: track\n    };\n    var codec = '';\n\n    if (/V_MPEG4\\/ISO\\/AVC/.test(decodedTrack.rawCodec)) {\n      codec = \"avc1.\" + (0, _codecHelpers.getAvcCodec)(decodedTrack.codecPrivate);\n    } else if (/V_MPEGH\\/ISO\\/HEVC/.test(decodedTrack.rawCodec)) {\n      codec = \"hev1.\" + (0, _codecHelpers.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\n        codec = 'vp09.';\n        codec += (0, _byteHelpers.padStart)(profile, 2, '0') + \".\";\n        codec += (0, _byteHelpers.padStart)(level, 2, '0') + \".\";\n        codec += (0, _byteHelpers.padStart)(bitDepth, 2, '0') + \".\";\n        codec += \"\" + (0, _byteHelpers.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 += \".\" + (0, _byteHelpers.padStart)(colourPrimaries[0], 2, '0');\n          codec += \".\" + (0, _byteHelpers.padStart)(transferCharacteristics[0], 2, '0');\n          codec += \".\" + (0, _byteHelpers.padStart)(matrixCoefficients[0], 2, '0');\n          codec += \".\" + (0, _byteHelpers.padStart)(videoFullRangeFlag[0], 2, '0');\n        }\n      } else {\n        codec = 'vp9';\n      }\n    } else if (/^V_AV1/.test(decodedTrack.rawCodec)) {\n      codec = \"av01.\" + (0, _codecHelpers.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\n    decodedTrack.codec = codec;\n    decodedTracks.push(decodedTrack);\n  });\n  return decodedTracks.sort(function (a, b) {\n    return a.number - b.number;\n  });\n};\n\nexports.parseTracks = parseTracks;\n\nvar 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 = (0, _byteHelpers.bytesToNumber)(timestampScale);\n  } else {\n    timestampScale = 1000000;\n  }\n\n  var clusters = findEbml(segment, [EBML_TAGS.Cluster]);\n\n  if (!tracks) {\n    tracks = parseTracks(segment);\n  }\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\n    if (timestamp && timestamp.length) {\n      timestamp = (0, _byteHelpers.bytesToNumber)(timestamp);\n    } // get all blocks then sort them into the correct order\n\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};\n\nexports.parseData = parseData;", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.findH265Nal = exports.findH264Nal = exports.findNal = exports.discardEmulationPreventionBytes = exports.EMULATION_PREVENTION = exports.NAL_TYPE_TWO = exports.NAL_TYPE_ONE = void 0;\n\nvar _byteHelpers = require(\"./byte-helpers.js\");\n\nvar NAL_TYPE_ONE = (0, _byteHelpers.toUint8)([0x00, 0x00, 0x00, 0x01]);\nexports.NAL_TYPE_ONE = NAL_TYPE_ONE;\nvar NAL_TYPE_TWO = (0, _byteHelpers.toUint8)([0x00, 0x00, 0x01]);\nexports.NAL_TYPE_TWO = NAL_TYPE_TWO;\nvar EMULATION_PREVENTION = (0, _byteHelpers.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\nexports.EMULATION_PREVENTION = EMULATION_PREVENTION;\n\nvar 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 ((0, _byteHelpers.bytesMatch)(bytes.subarray(i, i + 3), EMULATION_PREVENTION)) {\n      positions.push(i + 2);\n      i++;\n    }\n\n    i++;\n  } // If no Emulation Prevention Bytes were found just return the original\n  // array\n\n\n  if (positions.length === 0) {\n    return bytes;\n  } // Create a new array to hold the NAL unit data\n\n\n  var newLength = bytes.length - positions.length;\n  var newData = new Uint8Array(newLength);\n  var sourceIndex = 0;\n\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\n    newData[i] = bytes[sourceIndex];\n  }\n\n  return newData;\n};\n\nexports.discardEmulationPreventionBytes = discardEmulationPreventionBytes;\n\nvar findNal = function findNal(bytes, dataType, types, nalLimit) {\n  if (nalLimit === void 0) {\n    nalLimit = Infinity;\n  }\n\n  bytes = (0, _byteHelpers.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\n    if ((0, _byteHelpers.bytesMatch)(bytes.subarray(i), NAL_TYPE_ONE)) {\n      nalOffset = 4;\n    } else if ((0, _byteHelpers.bytesMatch)(bytes.subarray(i), NAL_TYPE_TWO)) {\n      nalOffset = 3;\n    } // we are unsynced,\n    // find the next nal unit\n\n\n    if (!nalOffset) {\n      i++;\n      continue;\n    }\n\n    nalsFound++;\n\n    if (nalStart) {\n      return discardEmulationPreventionBytes(bytes.subarray(nalStart, i));\n    }\n\n    var nalType = void 0;\n\n    if (dataType === 'h264') {\n      nalType = bytes[i + nalOffset] & 0x1f;\n    } else if (dataType === 'h265') {\n      nalType = bytes[i + nalOffset] >> 1 & 0x3f;\n    }\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\n    i += nalOffset + (dataType === 'h264' ? 1 : 2);\n  }\n\n  return bytes.subarray(0, 0);\n};\n\nexports.findNal = findNal;\n\nvar findH264Nal = function findH264Nal(bytes, type, nalLimit) {\n  return findNal(bytes, 'h264', type, nalLimit);\n};\n\nexports.findH264Nal = findH264Nal;\n\nvar findH265Nal = function findH265Nal(bytes, type, nalLimit) {\n  return findNal(bytes, 'h265', type, nalLimit);\n};\n\nexports.findH265Nal = findH265Nal;", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.isLikelyFmp4MediaSegment = exports.detectContainerForBytes = exports.isLikely = void 0;\n\nvar _byteHelpers = require(\"./byte-helpers.js\");\n\nvar _mp4Helpers = require(\"./mp4-helpers.js\");\n\nvar _ebmlHelpers = require(\"./ebml-helpers.js\");\n\nvar _id3Helpers = require(\"./id3-helpers.js\");\n\nvar _nalHelpers = require(\"./nal-helpers.js\");\n\nvar CONSTANTS = {\n  // \"webm\" string literal in hex\n  'webm': (0, _byteHelpers.toUint8)([0x77, 0x65, 0x62, 0x6d]),\n  // \"matroska\" string literal in hex\n  'matroska': (0, _byteHelpers.toUint8)([0x6d, 0x61, 0x74, 0x72, 0x6f, 0x73, 0x6b, 0x61]),\n  // \"fLaC\" string literal in hex\n  'flac': (0, _byteHelpers.toUint8)([0x66, 0x4c, 0x61, 0x43]),\n  // \"OggS\" string literal in hex\n  'ogg': (0, _byteHelpers.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': (0, _byteHelpers.toUint8)([0x0b, 0x77]),\n  // \"RIFF\" string literal in hex used for wav and avi\n  'riff': (0, _byteHelpers.toUint8)([0x52, 0x49, 0x46, 0x46]),\n  // \"AVI\" string literal in hex\n  'avi': (0, _byteHelpers.toUint8)([0x41, 0x56, 0x49]),\n  // \"WAVE\" string literal in hex\n  'wav': (0, _byteHelpers.toUint8)([0x57, 0x41, 0x56, 0x45]),\n  // \"ftyp3g\" string literal in hex\n  '3gp': (0, _byteHelpers.toUint8)([0x66, 0x74, 0x79, 0x70, 0x33, 0x67]),\n  // \"ftyp\" string literal in hex\n  'mp4': (0, _byteHelpers.toUint8)([0x66, 0x74, 0x79, 0x70]),\n  // \"styp\" string literal in hex\n  'fmp4': (0, _byteHelpers.toUint8)([0x73, 0x74, 0x79, 0x70]),\n  // \"ftypqt\" string literal in hex\n  'mov': (0, _byteHelpers.toUint8)([0x66, 0x74, 0x79, 0x70, 0x71, 0x74]),\n  // moov string literal in hex\n  'moov': (0, _byteHelpers.toUint8)([0x6D, 0x6F, 0x6F, 0x76]),\n  // moof string literal in hex\n  'moof': (0, _byteHelpers.toUint8)([0x6D, 0x6F, 0x6F, 0x66])\n};\nvar _isLikely = {\n  aac: function aac(bytes) {\n    var offset = (0, _id3Helpers.getId3Offset)(bytes);\n    return (0, _byteHelpers.bytesMatch)(bytes, [0xFF, 0x10], {\n      offset: offset,\n      mask: [0xFF, 0x16]\n    });\n  },\n  mp3: function mp3(bytes) {\n    var offset = (0, _id3Helpers.getId3Offset)(bytes);\n    return (0, _byteHelpers.bytesMatch)(bytes, [0xFF, 0x02], {\n      offset: offset,\n      mask: [0xFF, 0x06]\n    });\n  },\n  webm: function webm(bytes) {\n    var docType = (0, _ebmlHelpers.findEbml)(bytes, [_ebmlHelpers.EBML_TAGS.EBML, _ebmlHelpers.EBML_TAGS.DocType])[0]; // check if DocType EBML tag is webm\n\n    return (0, _byteHelpers.bytesMatch)(docType, CONSTANTS.webm);\n  },\n  mkv: function mkv(bytes) {\n    var docType = (0, _ebmlHelpers.findEbml)(bytes, [_ebmlHelpers.EBML_TAGS.EBML, _ebmlHelpers.EBML_TAGS.DocType])[0]; // check if DocType EBML tag is matroska\n\n    return (0, _byteHelpers.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\n    if ((0, _byteHelpers.bytesMatch)(bytes, CONSTANTS.mp4, {\n      offset: 4\n    }) || (0, _byteHelpers.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\n    if ((0, _byteHelpers.bytesMatch)(bytes, CONSTANTS.moof, {\n      offset: 4\n    }) || (0, _byteHelpers.bytesMatch)(bytes, CONSTANTS.moov, {\n      offset: 4\n    })) {\n      return true;\n    }\n  },\n  mov: function mov(bytes) {\n    return (0, _byteHelpers.bytesMatch)(bytes, CONSTANTS.mov, {\n      offset: 4\n    });\n  },\n  '3gp': function gp(bytes) {\n    return (0, _byteHelpers.bytesMatch)(bytes, CONSTANTS['3gp'], {\n      offset: 4\n    });\n  },\n  ac3: function ac3(bytes) {\n    var offset = (0, _id3Helpers.getId3Offset)(bytes);\n    return (0, _byteHelpers.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\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\n      i += 1;\n    }\n\n    return false;\n  },\n  flac: function flac(bytes) {\n    var offset = (0, _id3Helpers.getId3Offset)(bytes);\n    return (0, _byteHelpers.bytesMatch)(bytes, CONSTANTS.flac, {\n      offset: offset\n    });\n  },\n  ogg: function ogg(bytes) {\n    return (0, _byteHelpers.bytesMatch)(bytes, CONSTANTS.ogg);\n  },\n  avi: function avi(bytes) {\n    return (0, _byteHelpers.bytesMatch)(bytes, CONSTANTS.riff) && (0, _byteHelpers.bytesMatch)(bytes, CONSTANTS.avi, {\n      offset: 8\n    });\n  },\n  wav: function wav(bytes) {\n    return (0, _byteHelpers.bytesMatch)(bytes, CONSTANTS.riff) && (0, _byteHelpers.bytesMatch)(bytes, CONSTANTS.wav, {\n      offset: 8\n    });\n  },\n  'h264': function h264(bytes) {\n    // find seq_parameter_set_rbsp\n    return (0, _nalHelpers.findH264Nal)(bytes, 7, 3).length;\n  },\n  'h265': function h265(bytes) {\n    // find video_parameter_set_rbsp or seq_parameter_set_rbsp\n    return (0, _nalHelpers.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\n  _isLikely[type] = function (bytes) {\n    return isLikelyFn((0, _byteHelpers.toUint8)(bytes));\n  };\n}); // export after wrapping\n\nvar isLikely = _isLikely; // A useful list of file signatures can be found here\n// https://en.wikipedia.org/wiki/List_of_file_signatures\n\nexports.isLikely = isLikely;\n\nvar detectContainerForBytes = function detectContainerForBytes(bytes) {\n  bytes = (0, _byteHelpers.toUint8)(bytes);\n\n  for (var i = 0; i < isLikelyTypes.length; i++) {\n    var type = isLikelyTypes[i];\n\n    if (isLikely[type](bytes)) {\n      return type;\n    }\n  }\n\n  return '';\n}; // fmp4 is not a container\n\n\nexports.detectContainerForBytes = detectContainerForBytes;\n\nvar isLikelyFmp4MediaSegment = function isLikelyFmp4MediaSegment(bytes) {\n  return (0, _mp4Helpers.findBox)(bytes, ['moof']).length > 0;\n};\n\nexports.isLikelyFmp4MediaSegment = isLikelyFmp4MediaSegment;", "/**\n * @license\n * Video.js 8.10.0 <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\n'use strict';\n\nvar window$1 = require('global/window');\nvar document = require('global/document');\nvar keycode = require('keycode');\nvar safeParseTuple = require('safe-json-parse/tuple');\nvar XHR = require('@videojs/xhr');\nvar vtt = require('videojs-vtt.js');\nvar _extends = require('@babel/runtime/helpers/extends');\nvar _resolveUrl = require('@videojs/vhs-utils/cjs/resolve-url.js');\nvar m3u8Parser = require('m3u8-parser');\nvar codecs_js = require('@videojs/vhs-utils/cjs/codecs.js');\nvar mediaTypes_js = require('@videojs/vhs-utils/cjs/media-types.js');\nvar byteHelpers = require('@videojs/vhs-utils/cjs/byte-helpers');\nvar mpdParser = require('mpd-parser');\nvar parseSidx = require('mux.js/lib/tools/parse-sidx');\nvar id3Helpers = require('@videojs/vhs-utils/cjs/id3-helpers');\nvar containers = require('@videojs/vhs-utils/cjs/containers');\nvar clock = require('mux.js/lib/utils/clock');\n\nfunction _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }\n\nvar window__default = /*#__PURE__*/_interopDefaultLegacy(window$1);\nvar document__default = /*#__PURE__*/_interopDefaultLegacy(document);\nvar keycode__default = /*#__PURE__*/_interopDefaultLegacy(keycode);\nvar safeParseTuple__default = /*#__PURE__*/_interopDefaultLegacy(safeParseTuple);\nvar XHR__default = /*#__PURE__*/_interopDefaultLegacy(XHR);\nvar vtt__default = /*#__PURE__*/_interopDefaultLegacy(vtt);\nvar _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);\nvar _resolveUrl__default = /*#__PURE__*/_interopDefaultLegacy(_resolveUrl);\nvar parseSidx__default = /*#__PURE__*/_interopDefaultLegacy(parseSidx);\n\nvar version$6 = \"8.10.0\";\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 */\nconst 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 */\nconst hooks = function (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 */\nconst hook = function (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 */\nconst removeHook = function (type, fn) {\n  const 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 */\nconst hookOnce = function (type, fn) {\n  hooks(type, [].concat(fn).map(original => {\n    const wrapper = (...args) => {\n      removeHook(type, wrapper);\n      return original(...args);\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 */\nconst FullscreenApi = {\n  prefixed: true\n};\n\n// browser API methods\nconst apiMap = [['requestFullscreen', 'exitFullscreen', 'fullscreenElement', 'fullscreenEnabled', 'fullscreenchange', 'fullscreenerror', 'fullscreen'],\n// WebKit\n['webkitRequestFullscreen', 'webkitExitFullscreen', 'webkitFullscreenElement', 'webkitFullscreenEnabled', 'webkitfullscreenchange', 'webkitfullscreenerror', '-webkit-full-screen']];\nconst specApi = apiMap[0];\nlet browserApi;\n\n// determine the supported set of functions\nfor (let i = 0; i < apiMap.length; i++) {\n  // check for exitFullscreen function\n  if (apiMap[i][1] in document__default[\"default\"]) {\n    browserApi = apiMap[i];\n    break;\n  }\n}\n\n// map the browser API names to the spec API names\nif (browserApi) {\n  for (let i = 0; i < browserApi.length; i++) {\n    FullscreenApi[specApi[i]] = browserApi[i];\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.\nlet 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 */\nconst LogByTypeFactory = (name, log, styles) => (type, level, args) => {\n  const lvl = log.levels[level];\n  const lvlRegExp = new RegExp(`^(${lvl})$`);\n  let 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${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    const 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__default[\"default\"].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  let fn = window__default[\"default\"].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__default[\"default\"].console.info || window__default[\"default\"].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__default[\"default\"].console, args);\n};\nfunction createLogger$1(name, delimiter = ':', styles = '') {\n  // This is the private tracking variable for logging level.\n  let level = 'info';\n\n  // the curried logByType bound to the specific log and history\n  let 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  const log = function (...args) {\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 = (subName, subDelimiter, subStyles) => {\n    const resultDelimiter = subDelimiter !== undefined ? subDelimiter : delimiter;\n    const resultStyles = subStyles !== undefined ? subStyles : styles;\n    const resultName = `${name} ${resultDelimiter} ${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 = (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 = lvl => {\n    if (typeof lvl === 'string') {\n      if (!log.levels.hasOwnProperty(lvl)) {\n        throw new Error(`\"${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 = () => history ? [].concat(history) : [];\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 = fname => {\n    return (history || []).filter(historyItem => {\n      // if the first item in each historyItem includes `fname`, then it's a match\n      return new RegExp(`.*${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 = () => {\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 = () => {\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 = () => {\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 = (...args) => logByType('error', level, args);\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 = (...args) => logByType('warn', level, args);\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 = (...args) => logByType('debug', level, args);\n  return log;\n}\n\n/**\n * @file log.js\n * @module log\n */\nconst log$1 = createLogger$1('VIDEOJS');\nconst 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 */\nconst 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 */\nconst keys = function (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(key => fn(object[key], key));\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, initial = 0) {\n  return keys(object).reduce((accum, key) => fn(accum, object[key], key), 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(...sources) {\n  const result = {};\n  sources.forEach(source => {\n    if (!source) {\n      return;\n    }\n    each(source, (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(source = {}) {\n  const result = [];\n  for (const key in source) {\n    if (source.hasOwnProperty(key)) {\n      const 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, setter = true) {\n  const set = value => Object.defineProperty(obj, key, {\n    value,\n    enumerable: true,\n    writable: true\n  });\n  const options = {\n    configurable: true,\n    enumerable: true,\n    get() {\n      const 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}\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 */\nlet IS_IPOD = false;\n\n/**\n * The detected iOS version - or `null`.\n *\n * @static\n * @type {string|null}\n */\nlet IOS_VERSION = null;\n\n/**\n * Whether or not this is an Android device.\n *\n * @static\n * @type {Boolean}\n */\nlet 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 */\nlet ANDROID_VERSION;\n\n/**\n * Whether or not this is Mozilla Firefox.\n *\n * @static\n * @type {Boolean}\n */\nlet IS_FIREFOX = false;\n\n/**\n * Whether or not this is Microsoft Edge.\n *\n * @static\n * @type {Boolean}\n */\nlet IS_EDGE = false;\n\n/**\n * Whether or not this is any Chromium Browser\n *\n * @static\n * @type {Boolean}\n */\nlet 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 */\nlet IS_CHROME = false;\n\n/**\n * The detected Chromium version - or `null`.\n *\n * @static\n * @type {number|null}\n */\nlet 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 */\nlet CHROME_VERSION = null;\n\n/**\n * The detected Internet Explorer version - or `null`.\n *\n * @static\n * @deprecated\n * @type {number|null}\n */\nlet IE_VERSION = null;\n\n/**\n * Whether or not this is desktop Safari.\n *\n * @static\n * @type {Boolean}\n */\nlet IS_SAFARI = false;\n\n/**\n * Whether or not this is a Windows machine.\n *\n * @static\n * @type {Boolean}\n */\nlet IS_WINDOWS = false;\n\n/**\n * Whether or not this device is an iPad.\n *\n * @static\n * @type {Boolean}\n */\nlet 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/\nlet IS_IPHONE = false;\n\n/**\n * Whether or not this device is touch-enabled.\n *\n * @static\n * @const\n * @type {Boolean}\n */\nconst TOUCH_ENABLED = Boolean(isReal() && ('ontouchstart' in window__default[\"default\"] || window__default[\"default\"].navigator.maxTouchPoints || window__default[\"default\"].DocumentTouch && window__default[\"default\"].document instanceof window__default[\"default\"].DocumentTouch));\nconst UAD = window__default[\"default\"].navigator && window__default[\"default\"].navigator.userAgentData;\nif (UAD && UAD.platform && UAD.brands) {\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(b => b.brand === 'Microsoft Edge'));\n  IS_CHROMIUM = Boolean(UAD.brands.find(b => b.brand === 'Chromium'));\n  IS_CHROME = !IS_EDGE && IS_CHROMIUM;\n  CHROMIUM_VERSION = CHROME_VERSION = (UAD.brands.find(b => b.brand === 'Chromium') || {}).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  const USER_AGENT = window__default[\"default\"].navigator && window__default[\"default\"].navigator.userAgent || '';\n  IS_IPOD = /iPod/i.test(USER_AGENT);\n  IOS_VERSION = function () {\n    const 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    const match = USER_AGENT.match(/Android (\\d+)(?:\\.(\\d+))?(?:\\.(\\d+))*/i);\n    if (!match) {\n      return null;\n    }\n    const major = match[1] && parseFloat(match[1]);\n    const 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    const 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    const result = /MSIE\\s(\\d+)\\.\\d/.exec(USER_AGENT);\n    let 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 */\nconst 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 */\nconst IS_ANY_SAFARI = (IS_SAFARI || IS_IOS) && !IS_CHROME;\n\nvar browser = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  get IS_IPOD () { return IS_IPOD; },\n  get IOS_VERSION () { return IOS_VERSION; },\n  get IS_ANDROID () { return IS_ANDROID; },\n  get ANDROID_VERSION () { return ANDROID_VERSION; },\n  get IS_FIREFOX () { return IS_FIREFOX; },\n  get IS_EDGE () { return IS_EDGE; },\n  get IS_CHROMIUM () { return IS_CHROMIUM; },\n  get IS_CHROME () { return IS_CHROME; },\n  get CHROMIUM_VERSION () { return CHROMIUM_VERSION; },\n  get CHROME_VERSION () { return CHROME_VERSION; },\n  get IE_VERSION () { return IE_VERSION; },\n  get IS_SAFARI () { return IS_SAFARI; },\n  get IS_WINDOWS () { return IS_WINDOWS; },\n  get IS_IPAD () { return IS_IPAD; },\n  get IS_IPHONE () { return IS_IPHONE; },\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__default[\"default\"] === window__default[\"default\"].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__default[\"default\"].parent !== window__default[\"default\"].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__default[\"default\"][method](null);\n    }\n    if (isNonBlankString(context)) {\n      context = document__default[\"default\"].querySelector(context);\n    }\n    const ctx = isEl(context) ? context : document__default[\"default\"];\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(tagName = 'div', properties = {}, attributes = {}, content) {\n  const el = document__default[\"default\"].createElement(tagName);\n  Object.getOwnPropertyNames(properties).forEach(function (propName) {\n    const 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, ...classesToAdd) {\n  element.classList.add(...classesToAdd.reduce((prev, current) => prev.concat(current.split(/\\s+/)), []));\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, ...classesToRemove) {\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  element.classList.remove(...classesToRemove.reduce((prev, current) => prev.concat(current.split(/\\s+/)), []));\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(className => element.classList.toggle(className, predicate));\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    const 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  const 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  const knownBooleans = ['autoplay', 'controls', 'playsinline', 'loop', 'muted', 'default', 'defaultMuted'];\n  if (tag && tag.attributes && tag.attributes.length > 0) {\n    const attrs = tag.attributes;\n    for (let i = attrs.length - 1; i >= 0; i--) {\n      const attrName = attrs[i].name;\n      /** @type {boolean|string} */\n      let attrVal = attrs[i].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__default[\"default\"].body.focus();\n  document__default[\"default\"].onselectstart = function () {\n    return false;\n  };\n}\n\n/**\n * Turn off text selection blocking.\n */\nfunction unblockTextSelection() {\n  document__default[\"default\"].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    const rect = el.getBoundingClientRect();\n    const result = {};\n    ['bottom', 'height', 'left', 'right', 'top', 'width'].forEach(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  const width = el.offsetWidth;\n  const height = el.offsetHeight;\n  let left = 0;\n  let top = 0;\n  while (el.offsetParent && el !== document__default[\"default\"][FullscreenApi.fullscreenElement]) {\n    left += el.offsetLeft;\n    top += el.offsetTop;\n    el = el.offsetParent;\n  }\n  return {\n    left,\n    top,\n    width,\n    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  const translated = {\n    x: 0,\n    y: 0\n  };\n  if (IS_IOS) {\n    let item = el;\n    while (item && item.nodeName.toLowerCase() !== 'html') {\n      const transform = computedStyle(item, 'transform');\n      if (/^matrix/.test(transform)) {\n        const 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        const values = transform.slice(9, -1).split(/,\\s/).map(Number);\n        translated.x += values[12];\n        translated.y += values[13];\n      }\n      item = item.parentNode;\n    }\n  }\n  const position = {};\n  const boxTarget = findPosition(event.target);\n  const box = findPosition(el);\n  const boxW = box.width;\n  const boxH = box.height;\n  let offsetY = event.offsetY - (box.top - boxTarget.top);\n  let 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(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__default[\"default\"].createTextNode(value);\n    }\n  }).filter(value => value);\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(node => el.appendChild(node));\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 */\nconst $ = 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 */\nconst $$ = 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__default[\"default\"].getComputedStyle === 'function') {\n    let computedStyleValue;\n    try {\n      computedStyleValue = window__default[\"default\"].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  [...document__default[\"default\"].styleSheets].forEach(styleSheet => {\n    try {\n      const cssRules = [...styleSheet.cssRules].map(rule => rule.cssText).join('');\n      const style = document__default[\"default\"].createElement('style');\n      style.textContent = cssRules;\n      win.document.head.appendChild(style);\n    } catch (e) {\n      const link = document__default[\"default\"].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}\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 */\nlet _windowLoaded = false;\nlet videojs$1;\n\n/**\n * Set up any tags that have a data-setup `attribute` when the player is started.\n */\nconst autoSetup = function () {\n  if (videojs$1.options.autoSetup === false) {\n    return;\n  }\n  const vids = Array.prototype.slice.call(document__default[\"default\"].getElementsByTagName('video'));\n  const audios = Array.prototype.slice.call(document__default[\"default\"].getElementsByTagName('audio'));\n  const divs = Array.prototype.slice.call(document__default[\"default\"].getElementsByTagName('video-js'));\n  const mediaEls = vids.concat(audios, divs);\n\n  // Check if any media elements exist\n  if (mediaEls && mediaEls.length > 0) {\n    for (let i = 0, e = mediaEls.length; i < e; i++) {\n      const mediaEl = mediaEls[i];\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          const 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__default[\"default\"].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__default[\"default\"].removeEventListener('load', setWindowLoaded);\n}\nif (isReal()) {\n  if (document__default[\"default\"].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__default[\"default\"].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 */\nconst createStyleElement = function (className) {\n  const style = document__default[\"default\"].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 */\nconst setTextContent = function (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\nconst _initialGuid = 3;\n\n/**\n * Unique ID for an element or function\n *\n * @type {Number}\n */\nlet _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  const 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    const old = event || window__default[\"default\"].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 (const 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__default[\"default\"];\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      const doc = document__default[\"default\"].documentElement;\n      const body = document__default[\"default\"].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\n  event.fixed_ = true;\n  // Returns fixed-up instance\n  return event;\n}\n\n/**\n * Whether passive event listeners are supported\n */\nlet _supportsPassive;\nconst supportsPassive = function () {\n  if (typeof _supportsPassive !== 'boolean') {\n    _supportsPassive = false;\n    try {\n      const opts = Object.defineProperty({}, 'passive', {\n        get() {\n          _supportsPassive = true;\n        }\n      });\n      window__default[\"default\"].addEventListener('test', null, opts);\n      window__default[\"default\"].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 */\nconst 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  const 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      const 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        const handlersCopy = handlers.slice(0);\n        for (let 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      let 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  const 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  const removeType = function (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 (const t in data.handlers) {\n      if (Object.prototype.hasOwnProperty.call(data.handlers || {}, t)) {\n        removeType(elem, t);\n      }\n    }\n    return;\n  }\n  const 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 (let 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  const elemData = DomData.has(elem) ? DomData.get(elem) : {};\n  const 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    const 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  const func = function () {\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  const func = function () {\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}\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 */\nconst 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 */\nconst bind_ = function (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  const 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 */\nconst throttle = function (fn, wait) {\n  let last = window__default[\"default\"].performance.now();\n  const throttled = function (...args) {\n    const now = window__default[\"default\"].performance.now();\n    if (now - last >= wait) {\n      fn(...args);\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 */\nconst debounce = function (func, wait, immediate, context = window__default[\"default\"]) {\n  let timeout;\n  const cancel = () => {\n    context.clearTimeout(timeout);\n    timeout = null;\n  };\n\n  /* eslint-disable consistent-this */\n  const debounced = function () {\n    const self = this;\n    const args = arguments;\n    let later = function () {\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};\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 */\nlet 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 */\nclass EventTarget$2 {\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  on(type, fn) {\n    // Remove the addEventListener alias before calling Events.on\n    // so we don't get into an infinite type loop\n    const ael = this.addEventListener;\n    this.addEventListener = () => {};\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  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  one(type, fn) {\n    // Remove the addEventListener aliasing Events.on\n    // so we don't get into an infinite type loop\n    const ael = this.addEventListener;\n    this.addEventListener = () => {};\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  any(type, fn) {\n    // Remove the addEventListener aliasing Events.on\n    // so we don't get into an infinite type loop\n    const ael = this.addEventListener;\n    this.addEventListener = () => {};\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  trigger(event) {\n    const 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\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  queueTrigger(event) {\n    // only set up EVENT_MAP if it'll be used\n    if (!EVENT_MAP) {\n      EVENT_MAP = new Map();\n    }\n    const type = event.type || event;\n    let map = EVENT_MAP.get(this);\n    if (!map) {\n      map = new Map();\n      EVENT_MAP.set(this, map);\n    }\n    const oldTimeout = map.get(type);\n    map.delete(type);\n    window__default[\"default\"].clearTimeout(oldTimeout);\n    const timeout = window__default[\"default\"].setTimeout(() => {\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\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/**\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/**\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 */\nconst 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 */\nconst isEvented = object => object instanceof EventTarget$2 || !!object.eventBusEl_ && ['on', 'one', 'off', 'trigger'].every(k => typeof object[k] === 'function');\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 */\nconst 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 */\nconst isValidEventType = type =>\n// The regex here verifies that the `type` contains at least one non-\n// whitespace character.\ntypeof type === 'string' && /\\S/.test(type) || Array.isArray(type) && !!type.length;\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 */\nconst validateTarget = (target, obj, fnName) => {\n  if (!target || !target.nodeName && !isEvented(target)) {\n    throw new Error(`Invalid target for ${objName(obj)}#${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 */\nconst validateEventType = (type, obj, fnName) => {\n  if (!isValidEventType(type)) {\n    throw new Error(`Invalid event type for ${objName(obj)}#${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 */\nconst validateListener = (listener, obj, fnName) => {\n  if (typeof listener !== 'function') {\n    throw new Error(`Invalid listener for ${objName(obj)}#${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 */\nconst normalizeListenArgs = (self, args, fnName) => {\n  // If the number of arguments is less than 3, the target is always the\n  // evented object itself.\n  const isTargetingSelf = args.length < 3 || args[0] === self || args[0] === self.eventBusEl_;\n  let target;\n  let type;\n  let 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    [type, listener] = args;\n  } else {\n    [target, type, listener] = args;\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,\n    target,\n    type,\n    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 */\nconst 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 */\nconst 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(...args) {\n    const {\n      isTargetingSelf,\n      target,\n      type,\n      listener\n    } = normalizeListenArgs(this, args, 'on');\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      const removeListenerOnDispose = () => this.off(target, type, listener);\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      const removeRemoverOnTargetDispose = () => this.off('dispose', removeListenerOnDispose);\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(...args) {\n    const {\n      isTargetingSelf,\n      target,\n      type,\n      listener\n    } = normalizeListenArgs(this, args, 'one');\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      const wrapper = (...largs) => {\n        this.off(target, type, wrapper);\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(...args) {\n    const {\n      isTargetingSelf,\n      target,\n      type,\n      listener\n    } = normalizeListenArgs(this, args, 'any');\n\n    // Targeting this evented object.\n    if (isTargetingSelf) {\n      listen(target, 'any', type, listener);\n\n      // Targeting another evented object.\n    } else {\n      const wrapper = (...largs) => {\n        this.off(target, type, wrapper);\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(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      const target = targetOrType;\n      const 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(event, hash) {\n    validateTarget(this.eventBusEl_, this, 'trigger');\n    const type = event && typeof event !== 'string' ? event.type : event;\n    if (!isValidEventType(type)) {\n      throw new Error(`Invalid event type for ${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, options = {}) {\n  const {\n    eventBusKey\n  } = options;\n\n  // Set or create the eventBusEl_.\n  if (eventBusKey) {\n    if (!target[eventBusKey].nodeName) {\n      throw new Error(`The eventBusKey \"${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(callback => {\n      callback();\n    });\n  }\n\n  // When any evented object is disposed, it removes all its listeners.\n  target.on('dispose', () => {\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__default[\"default\"].setTimeout(() => {\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 */\nconst 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(stateUpdates) {\n    // Support providing the `stateUpdates` state as a function.\n    if (typeof stateUpdates === 'function') {\n      stateUpdates = stateUpdates();\n    }\n    let changes;\n    each(stateUpdates, (value, key) => {\n      // Record the change if the value is different from what's in the\n      // current state.\n      if (this.state[key] !== value) {\n        changes = changes || {};\n        changes[key] = {\n          from: this.state[key],\n          to: value\n        };\n      }\n      this.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,\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 */\nconst toLowerCase = function (string) {\n  if (typeof string !== 'string') {\n    return string;\n  }\n  return string.replace(/./, w => w.toLowerCase());\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 */\nconst toTitleCase$1 = function (string) {\n  if (typeof string !== 'string') {\n    return string;\n  }\n  return string.replace(/./, w => w.toUpperCase());\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 */\nconst titleCaseEquals = function (str1, str2) {\n  return toTitleCase$1(str1) === toTitleCase$1(str2);\n};\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 */\nclass Component$1 {\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  constructor(player, options, ready) {\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      const id = player && player.id && player.id() || 'no_player';\n      this.id_ = `${id}_component_${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(c => this.addClass(c));\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(fn => {\n      this[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  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. If not specified, all listeners managed by Video.js will be removed.\n   */\n  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  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  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  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  dispose(options = {}) {\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 (let i = this.children_.length - 1; i >= 0; i--) {\n        if (this.children_[i].dispose) {\n          this.children_[i].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  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  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  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  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  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  localize(string, tokens, defaultValue = string) {\n    const code = this.player_.language && this.player_.language();\n    const languages = this.player_.languages && this.player_.languages();\n    const language = languages && languages[code];\n    const primaryCode = code && code.split('-')[0];\n    const primaryLang = languages && languages[primaryCode];\n    let 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        const value = tokens[index - 1];\n        let 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  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  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  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  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  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  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  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  getDescendant(...names) {\n    // flatten array argument into the main array\n    names = names.reduce((acc, n) => acc.concat(n), []);\n    let currentChild = this;\n    for (let i = 0; i < names.length; i++) {\n      currentChild = currentChild.getChild(names[i]);\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  setIcon(iconName, el = 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    const 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    const iconContainer = createEl('span', {\n      className: 'vjs-icon-placeholder vjs-svg-icon'\n    }, {\n      'aria-hidden': 'true'\n    });\n    const svgEl = document__default[\"default\"].createElementNS(xmlnsURL, 'svg');\n    svgEl.setAttributeNS(null, 'viewBox', '0 0 512 512');\n    const useEl = document__default[\"default\"].createElementNS(xmlnsURL, 'use');\n    svgEl.appendChild(useEl);\n    useEl.setAttributeNS(null, 'href', `#vjs-icon-${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  addChild(child, options = {}, index = this.children_.length) {\n    let component;\n    let componentName;\n\n    // If child is a string, create component with options\n    if (typeof child === 'string') {\n      componentName = toTitleCase$1(child);\n      const 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      const ComponentClass = Component$1.getComponent(componentClassName);\n      if (!ComponentClass) {\n        throw new Error(`Component ${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      let 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  removeChild(component) {\n    if (typeof component === 'string') {\n      component = this.getChild(component);\n    }\n    if (!component || !this.children_) {\n      return;\n    }\n    let childFound = false;\n    for (let i = this.children_.length - 1; i >= 0; i--) {\n      if (this.children_[i] === component) {\n        childFound = true;\n        this.children_.splice(i, 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    const 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  initChildren() {\n    const children = this.options_.children;\n    if (children) {\n      // `this` is `parent`\n      const parentOptions = this.options_;\n      const handleAdd = child => {\n        const name = child.name;\n        let 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 = this.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        const newChild = this.addChild(name, opts);\n        if (newChild) {\n          this[name] = newChild;\n        }\n      };\n\n      // Allow for an array of children details to passed in the options\n      let workingChildren;\n      const Tech = 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(child => {\n        let name;\n        let opts;\n        if (typeof child === 'string') {\n          name = child;\n          opts = children[name] || this.options_[name] || {};\n        } else {\n          name = child.name;\n          opts = child;\n        }\n        return {\n          name,\n          opts\n        };\n      }).filter(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        const c = Component$1.getComponent(child.opts.componentClass || toTitleCase$1(child.name));\n        return c && !Tech.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  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  ready(fn, sync = 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  triggerReady() {\n    this.isReady_ = true;\n\n    // Ensure ready is triggered asynchronously\n    this.setTimeout(function () {\n      const 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  $(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  $$(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  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  addClass(...classesToAdd) {\n    addClass(this.el_, ...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  removeClass(...classesToRemove) {\n    removeClass(this.el_, ...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  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  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  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  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  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  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  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  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  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  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  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  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    const val = this.el_.style[widthOrHeight];\n    const 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  currentDimension(widthOrHeight) {\n    let 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      const rule = `offset${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  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  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  currentHeight() {\n    return this.currentDimension('height');\n  }\n\n  /**\n   * Set the focus to this component\n   */\n  focus() {\n    this.el_.focus();\n  }\n\n  /**\n   * Remove the focus from this component\n   */\n  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  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__default[\"default\"].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  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  emitTapEvents() {\n    // Track the start time so we can determine how long the touch lasted\n    let touchStart = 0;\n    let 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    const tapMovementThreshold = 10;\n\n    // The maximum length a touch can be while still being considered a tap\n    const touchTimeThreshold = 200;\n    let 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__default[\"default\"].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        const xdiff = event.touches[0].pageX - firstTouch.pageX;\n        const ydiff = event.touches[0].pageY - firstTouch.pageY;\n        const touchDistance = Math.sqrt(xdiff * xdiff + ydiff * ydiff);\n        if (touchDistance > tapMovementThreshold) {\n          couldBeTap = false;\n        }\n      }\n    });\n    const noTap = function () {\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        const touchTime = window__default[\"default\"].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  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    const report = bind_(this.player(), this.player().reportUserActivity);\n    let 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    const touchEnd = function (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  setTimeout(fn, timeout) {\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__default[\"default\"].setTimeout(() => {\n      if (this.setTimeoutIds_.has(timeoutId)) {\n        this.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  clearTimeout(timeoutId) {\n    if (this.setTimeoutIds_.has(timeoutId)) {\n      this.setTimeoutIds_.delete(timeoutId);\n      window__default[\"default\"].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  setInterval(fn, interval) {\n    fn = bind_(this, fn);\n    this.clearTimersOnDispose_();\n    const intervalId = window__default[\"default\"].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  clearInterval(intervalId) {\n    if (this.setIntervalIds_.has(intervalId)) {\n      this.setIntervalIds_.delete(intervalId);\n      window__default[\"default\"].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  requestAnimationFrame(fn) {\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__default[\"default\"].requestAnimationFrame(() => {\n      if (this.rafIds_.has(id)) {\n        this.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  requestNamedAnimationFrame(name, fn) {\n    if (this.namedRafs_.has(name)) {\n      return;\n    }\n    this.clearTimersOnDispose_();\n    fn = bind_(this, fn);\n    const id = this.requestAnimationFrame(() => {\n      fn();\n      if (this.namedRafs_.has(name)) {\n        this.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  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  cancelAnimationFrame(id) {\n    if (this.rafIds_.has(id)) {\n      this.rafIds_.delete(id);\n      window__default[\"default\"].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  clearTimersOnDispose_() {\n    if (this.clearingTimersOnDispose_) {\n      return;\n    }\n    this.clearingTimersOnDispose_ = true;\n    this.one('dispose', () => {\n      [['namedRafs_', 'cancelNamedAnimationFrame'], ['rafIds_', 'cancelAnimationFrame'], ['setTimeoutIds_', 'clearTimeout'], ['setIntervalIds_', 'clearInterval']].forEach(([idName, cancelName]) => {\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        this[idName].forEach((val, key) => this[cancelName](key));\n      });\n      this.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  static registerComponent(name, ComponentToRegister) {\n    if (typeof name !== 'string' || !name) {\n      throw new Error(`Illegal component name, \"${name}\"; must be a non-empty string.`);\n    }\n    const Tech = Component$1.getComponent('Tech');\n\n    // We need to make sure this check is only done if Tech has been registered.\n    const isTech = Tech && Tech.isTech(ComponentToRegister);\n    const isComp = Component$1 === ComponentToRegister || Component$1.prototype.isPrototypeOf(ComponentToRegister.prototype);\n    if (isTech || !isComp) {\n      let 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, \"${name}\"; ${reason}.`);\n    }\n    name = toTitleCase$1(name);\n    if (!Component$1.components_) {\n      Component$1.components_ = {};\n    }\n    const Player = Component$1.getComponent('Player');\n    if (name === 'Player' && Player && Player.players) {\n      const players = Player.players;\n      const 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(pname => players[pname]).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 {typeof Component}\n   *         The `Component` that got registered under the given name.\n   */\n  static getComponent(name) {\n    if (!name || !Component$1.components_) {\n      return;\n    }\n    return Component$1.components_[name];\n  }\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 '${fnName}' on 'TimeRanges': The index provided (${index}) is non-numeric or out of bounds (0-${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  let timeRangesObj;\n  if (ranges === undefined || ranges.length === 0) {\n    timeRangesObj = {\n      length: 0,\n      start() {\n        throw new Error('This TimeRanges object is empty');\n      },\n      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__default[\"default\"].Symbol && window__default[\"default\"].Symbol.iterator) {\n    timeRangesObj[window__default[\"default\"].Symbol.iterator] = () => (ranges || []).values();\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 */\nconst defaultImplementation = function (seconds, guide) {\n  seconds = seconds < 0 ? 0 : seconds;\n  let s = Math.floor(seconds % 60);\n  let m = Math.floor(seconds / 60 % 60);\n  let h = Math.floor(seconds / 3600);\n  const gm = Math.floor(guide / 60 % 60);\n  const 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.\nlet 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, guide = seconds) {\n  return implementation(seconds, guide);\n}\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  let bufferedDuration = 0;\n  let start;\n  let end;\n  if (!duration) {\n    return 0;\n  }\n  if (!buffered || !buffered.length) {\n    buffered = createTimeRanges$1(0, 0);\n  }\n  for (let i = 0; i < buffered.length; i++) {\n    start = buffered.start(i);\n    end = buffered.end(i);\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 (let 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, 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 */\nconst trackToJson_ = function (track) {\n  const ret = ['kind', 'label', 'language', 'id', 'inBandMetadataTrackDispatchType', 'mode', 'src'].reduce((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 */\nconst textTracksToJson = function (tech) {\n  const trackEls = tech.$$('track');\n  const trackObjs = Array.prototype.map.call(trackEls, t => t.track);\n  const tracks = Array.prototype.map.call(trackEls, function (trackEl) {\n    const 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 */\nconst jsonToTextTracks = function (json, tech) {\n  json.forEach(function (track) {\n    const addedTrack = tech.addRemoteTextTrack(track).track;\n    if (!track.src && track.cues) {\n      track.cues.forEach(cue => addedTrack.addCue(cue));\n    }\n  });\n  return tech.textTracks();\n};\nvar textTrackConverter = {\n  textTracksToJson,\n  jsonToTextTracks,\n  trackToJson_\n};\n\n/**\n * @file modal-dialog.js\n */\nconst 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 */\nclass ModalDialog extends Component$1 {\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  constructor(player, options) {\n    super(player, options);\n    this.handleKeyDown_ = e => this.handleKeyDown(e);\n    this.close_ = e => this.close(e);\n    this.opened_ = this.hasBeenOpened_ = this.hasBeenFilled_ = false;\n    this.closeable(!this.options_.uncloseable);\n    this.content(this.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    this.contentEl_ = createEl('div', {\n      className: `${MODAL_CLASS_NAME}-content`\n    }, {\n      role: 'document'\n    });\n    this.descEl_ = createEl('p', {\n      className: `${MODAL_CLASS_NAME}-description vjs-control-text`,\n      id: this.el().getAttribute('aria-describedby')\n    });\n    textContent(this.descEl_, this.description());\n    this.el_.appendChild(this.descEl_);\n    this.el_.appendChild(this.contentEl_);\n  }\n\n  /**\n   * Create the `ModalDialog`'s DOM element\n   *\n   * @return {Element}\n   *         The DOM element that gets created.\n   */\n  createEl() {\n    return super.createEl('div', {\n      className: this.buildCSSClass(),\n      tabIndex: -1\n    }, {\n      'aria-describedby': `${this.id()}_description`,\n      'aria-hidden': 'true',\n      'aria-label': this.label(),\n      'role': 'dialog'\n    });\n  }\n  dispose() {\n    this.contentEl_ = null;\n    this.descEl_ = null;\n    this.previouslyActiveEl_ = null;\n    super.dispose();\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  buildCSSClass() {\n    return `${MODAL_CLASS_NAME} vjs-hidden ${super.buildCSSClass()}`;\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  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  description() {\n    let 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  open() {\n    if (!this.opened_) {\n      const 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  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  close() {\n    if (!this.opened_) {\n      return;\n    }\n    const 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  closeable(value) {\n    if (typeof value === 'boolean') {\n      const closeable = this.closeable_ = !!value;\n      let 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        const 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  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  fillWith(content) {\n    const contentEl = this.contentEl();\n    const parentEl = contentEl.parentNode;\n    const 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    const 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  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  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  conditionalFocus_() {\n    const activeEl = document__default[\"default\"].activeElement;\n    const 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  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  handleKeyDown(event) {\n    // Do not allow keydowns to reach out of the modal dialog.\n    event.stopPropagation();\n    if (keycode__default[\"default\"].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__default[\"default\"].isEventKey(event, 'Tab')) {\n      return;\n    }\n    const focusableEls = this.focusableEls_();\n    const activeEl = this.el_.querySelector(':focus');\n    let focusIndex;\n    for (let i = 0; i < focusableEls.length; i++) {\n      if (activeEl === focusableEls[i]) {\n        focusIndex = i;\n        break;\n      }\n    }\n    if (document__default[\"default\"].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  focusableEls_() {\n    const allChildren = this.el_.querySelectorAll('*');\n    return Array.prototype.filter.call(allChildren, child => {\n      return (child instanceof window__default[\"default\"].HTMLAnchorElement || child instanceof window__default[\"default\"].HTMLAreaElement) && child.hasAttribute('href') || (child instanceof window__default[\"default\"].HTMLInputElement || child instanceof window__default[\"default\"].HTMLSelectElement || child instanceof window__default[\"default\"].HTMLTextAreaElement || child instanceof window__default[\"default\"].HTMLButtonElement) && !child.hasAttribute('disabled') || child instanceof window__default[\"default\"].HTMLIFrameElement || child instanceof window__default[\"default\"].HTMLObjectElement || child instanceof window__default[\"default\"].HTMLEmbedElement || child.hasAttribute('tabindex') && child.getAttribute('tabindex') !== -1 || child.hasAttribute('contenteditable');\n    });\n  }\n}\n\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 */\nclass TrackList extends EventTarget$2 {\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  constructor(tracks = []) {\n    super();\n    this.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(this, 'length', {\n      get() {\n        return this.tracks_.length;\n      }\n    });\n    for (let i = 0; i < tracks.length; i++) {\n      this.addTrack(tracks[i]);\n    }\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  addTrack(track) {\n    const index = this.tracks_.length;\n    if (!('' + index in this)) {\n      Object.defineProperty(this, index, {\n        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,\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_ = () => {\n      this.trigger({\n        track,\n        type: 'labelchange',\n        target: this\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  removeTrack(rtrack) {\n    let track;\n    for (let i = 0, l = this.length; i < l; i++) {\n      if (this[i] === rtrack) {\n        track = this[i];\n        if (track.off) {\n          track.off();\n        }\n        this.tracks_.splice(i, 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,\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  getTrackById(id) {\n    let result = null;\n    for (let i = 0, l = this.length; i < l; i++) {\n      const track = this[i];\n      if (track.id === id) {\n        result = track;\n        break;\n      }\n    }\n    return result;\n  }\n}\n\n/**\n * Triggered when a different track is selected/enabled.\n *\n * @event TrackList#change\n * @type {Event}\n */\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 (const 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 */\nconst disableOthers$1 = function (list, track) {\n  for (let i = 0; i < list.length; i++) {\n    if (!Object.keys(list[i]).length || track.id === list[i].id) {\n      continue;\n    }\n    // another audio track is enabled, disable it\n    list[i].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 */\nclass AudioTrackList extends TrackList {\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  constructor(tracks = []) {\n    // make sure only 1 track is enabled\n    // sorted from last index to first index\n    for (let i = tracks.length - 1; i >= 0; i--) {\n      if (tracks[i].enabled) {\n        disableOthers$1(tracks, tracks[i]);\n        break;\n      }\n    }\n    super(tracks);\n    this.changing_ = false;\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  addTrack(track) {\n    if (track.enabled) {\n      disableOthers$1(this, track);\n    }\n    super.addTrack(track);\n    // native tracks don't have this\n    if (!track.addEventListener) {\n      return;\n    }\n    track.enabledChange_ = () => {\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 (this.changing_) {\n        return;\n      }\n      this.changing_ = true;\n      disableOthers$1(this, track);\n      this.changing_ = false;\n      this.trigger('change');\n    };\n\n    /**\n     * @listens AudioTrack#enabledchange\n     * @fires TrackList#change\n     */\n    track.addEventListener('enabledchange', track.enabledChange_);\n  }\n  removeTrack(rtrack) {\n    super.removeTrack(rtrack);\n    if (rtrack.removeEventListener && rtrack.enabledChange_) {\n      rtrack.removeEventListener('enabledchange', rtrack.enabledChange_);\n      rtrack.enabledChange_ = null;\n    }\n  }\n}\n\n/**\n * @file video-track-list.js\n */\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 */\nconst disableOthers = function (list, track) {\n  for (let i = 0; i < list.length; i++) {\n    if (!Object.keys(list[i]).length || track.id === list[i].id) {\n      continue;\n    }\n    // another video track is enabled, disable it\n    list[i].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 */\nclass VideoTrackList extends TrackList {\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  constructor(tracks = []) {\n    // make sure only 1 track is enabled\n    // sorted from last index to first index\n    for (let i = tracks.length - 1; i >= 0; i--) {\n      if (tracks[i].selected) {\n        disableOthers(tracks, tracks[i]);\n        break;\n      }\n    }\n    super(tracks);\n    this.changing_ = false;\n\n    /**\n     * @member {number} VideoTrackList#selectedIndex\n     *         The current index of the selected {@link VideoTrack`}.\n     */\n    Object.defineProperty(this, 'selectedIndex', {\n      get() {\n        for (let i = 0; i < this.length; i++) {\n          if (this[i].selected) {\n            return i;\n          }\n        }\n        return -1;\n      },\n      set() {}\n    });\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  addTrack(track) {\n    if (track.selected) {\n      disableOthers(this, track);\n    }\n    super.addTrack(track);\n    // native tracks don't have this\n    if (!track.addEventListener) {\n      return;\n    }\n    track.selectedChange_ = () => {\n      if (this.changing_) {\n        return;\n      }\n      this.changing_ = true;\n      disableOthers(this, track);\n      this.changing_ = false;\n      this.trigger('change');\n    };\n\n    /**\n     * @listens VideoTrack#selectedchange\n     * @fires TrackList#change\n     */\n    track.addEventListener('selectedchange', track.selectedChange_);\n  }\n  removeTrack(rtrack) {\n    super.removeTrack(rtrack);\n    if (rtrack.removeEventListener && rtrack.selectedChange_) {\n      rtrack.removeEventListener('selectedchange', rtrack.selectedChange_);\n      rtrack.selectedChange_ = null;\n    }\n  }\n}\n\n/**\n * @file text-track-list.js\n */\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 */\nclass TextTrackList extends TrackList {\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  addTrack(track) {\n    super.addTrack(track);\n    if (!this.queueChange_) {\n      this.queueChange_ = () => this.queueTrigger('change');\n    }\n    if (!this.triggerSelectedlanguagechange) {\n      this.triggerSelectedlanguagechange_ = () => this.trigger('selectedlanguagechange');\n    }\n\n    /**\n     * @listens TextTrack#modechange\n     * @fires TrackList#change\n     */\n    track.addEventListener('modechange', this.queueChange_);\n    const nonLanguageTextTrackKind = ['metadata', 'chapters'];\n    if (nonLanguageTextTrackKind.indexOf(track.kind) === -1) {\n      track.addEventListener('modechange', this.triggerSelectedlanguagechange_);\n    }\n  }\n  removeTrack(rtrack) {\n    super.removeTrack(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\n/**\n * @file html-track-element-list.js\n */\n\n/**\n * The current list of {@link HtmlTrackElement}s.\n */\nclass HtmlTrackElementList {\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  constructor(trackElements = []) {\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() {\n        return this.trackElements_.length;\n      }\n    });\n    for (let i = 0, length = trackElements.length; i < length; i++) {\n      this.addTrackElement_(trackElements[i]);\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  addTrackElement_(trackElement) {\n    const index = this.trackElements_.length;\n    if (!('' + index in this)) {\n      Object.defineProperty(this, index, {\n        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  getTrackElementByTrack_(track) {\n    let trackElement_;\n    for (let i = 0, length = this.trackElements_.length; i < length; i++) {\n      if (track === this.trackElements_[i].track) {\n        trackElement_ = this.trackElements_[i];\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  removeTrackElement_(trackElement) {\n    for (let i = 0, length = this.trackElements_.length; i < length; i++) {\n      if (trackElement === this.trackElements_[i]) {\n        if (this.trackElements_[i].track && typeof this.trackElements_[i].track.off === 'function') {\n          this.trackElements_[i].track.off();\n        }\n        if (typeof this.trackElements_[i].off === 'function') {\n          this.trackElements_[i].off();\n        }\n        this.trackElements_.splice(i, 1);\n        break;\n      }\n    }\n  }\n}\n\n/**\n * @file text-track-cue-list.js\n */\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/**\n * A List of TextTrackCues.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackcuelist}\n */\nclass TextTrackCueList {\n  /**\n   * Create an instance of this class..\n   *\n   * @param {Array} cues\n   *        A list of cues to be initialized with\n   */\n  constructor(cues) {\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() {\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  setCues_(cues) {\n    const oldLength = this.length || 0;\n    let i = 0;\n    const l = cues.length;\n    this.cues_ = cues;\n    this.length_ = cues.length;\n    const defineProp = function (index) {\n      if (!('' + index in this)) {\n        Object.defineProperty(this, '' + index, {\n          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  getCueById(id) {\n    let result = null;\n    for (let i = 0, l = this.length; i < l; i++) {\n      const cue = this[i];\n      if (cue.id === id) {\n        result = cue;\n        break;\n      }\n    }\n    return result;\n  }\n}\n\n/**\n * @file track-kinds.js\n */\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 */\nconst 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 */\nconst 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 */\nconst 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 */\nconst 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 */\nclass Track extends EventTarget$2 {\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  constructor(options = {}) {\n    super();\n    const trackProps = {\n      id: options.id || 'vjs_track_' + newGUID(),\n      kind: options.kind || '',\n      language: options.language || ''\n    };\n    let 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\n    for (const key in trackProps) {\n      Object.defineProperty(this, key, {\n        get() {\n          return trackProps[key];\n        },\n        set() {}\n      });\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(this, 'label', {\n      get() {\n        return label;\n      },\n      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  }\n}\n\n/**\n * @file url.js\n * @module url\n */\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/**\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 */\nconst parseUrl = function (url) {\n  // This entire method can be replace with URL once we are able to drop IE11\n\n  const props = ['protocol', 'hostname', 'port', 'pathname', 'search', 'hash', 'host'];\n\n  // add the url to an anchor and let the browser parse the URL\n  const a = document__default[\"default\"].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  const details = {};\n  for (let i = 0; i < props.length; i++) {\n    details[props[i]] = a[props[i]];\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__default[\"default\"].location.protocol;\n  }\n\n  /* istanbul ignore if */\n  if (!details.host) {\n    details.host = window__default[\"default\"].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 */\nconst getAbsoluteURL = function (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    const a = document__default[\"default\"].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 */\nconst getFileExtension = function (path) {\n  if (typeof path === 'string') {\n    const splitPathRe = /^(\\/?)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?)(\\.([^\\.\\/\\?]+)))(?:[\\/]*|[\\?].*)$/;\n    const 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 */\nconst isCrossOrigin = function (url, winLoc = window__default[\"default\"].location) {\n  const urlInfo = parseUrl(url);\n\n  // IE8 protocol relative urls will return ':' for protocol\n  const 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  const crossOrigin = srcProtocol + urlInfo.host !== winLoc.protocol + winLoc.host;\n  return crossOrigin;\n};\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 */\nconst parseCues = function (srcContent, track) {\n  const parser = new window__default[\"default\"].WebVTT.Parser(window__default[\"default\"], window__default[\"default\"].vttjs, window__default[\"default\"].WebVTT.StringDecoder());\n  const 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__default[\"default\"].console && window__default[\"default\"].console.groupCollapsed) {\n      window__default[\"default\"].console.groupCollapsed(`Text Track parsing errors for ${track.src}`);\n    }\n    errors.forEach(error => log$1.error(error));\n    if (window__default[\"default\"].console && window__default[\"default\"].console.groupEnd) {\n      window__default[\"default\"].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 */\nconst loadTrack = function (src, track) {\n  const opts = {\n    uri: src\n  };\n  const crossOrigin = isCrossOrigin(src);\n  if (crossOrigin) {\n    opts.cors = crossOrigin;\n  }\n  const withCredentials = track.tech_.crossOrigin() === 'use-credentials';\n  if (withCredentials) {\n    opts.withCredentials = withCredentials;\n  }\n  XHR__default[\"default\"](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__default[\"default\"].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'], event => {\n          if (event.type === 'vttjserror') {\n            log$1.error(`vttjs failed to load, stopping trying to process ${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 */\nclass TextTrack extends Track {\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  constructor(options = {}) {\n    if (!options.tech) {\n      throw new Error('A tech was not provided.');\n    }\n    const settings = merge$1(options, {\n      kind: TextTrackKind[options.kind] || 'subtitles',\n      language: options.language || options.srclang || ''\n    });\n    let mode = TextTrackMode[settings.mode] || 'disabled';\n    const default_ = settings.default;\n    if (settings.kind === 'metadata' || settings.kind === 'chapters') {\n      mode = 'hidden';\n    }\n    super(settings);\n    this.tech_ = settings.tech;\n    this.cues_ = [];\n    this.activeCues_ = [];\n    this.preload_ = this.tech_.preloadTextTracks !== false;\n    const cues = new TextTrackCueList(this.cues_);\n    const activeCues = new TextTrackCueList(this.activeCues_);\n    let changed = false;\n    this.timeupdateHandler = bind_(this, function (event = {}) {\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    const disposeHandler = () => {\n      this.stopTracking();\n    };\n    this.tech_.one('dispose', disposeHandler);\n    if (mode !== 'disabled') {\n      this.startTracking();\n    }\n    Object.defineProperties(this, {\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() {\n          return default_;\n        },\n        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() {\n          return mode;\n        },\n        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() {\n          if (!this.loaded_) {\n            return null;\n          }\n          return cues;\n        },\n        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() {\n          if (!this.loaded_) {\n            return null;\n          }\n\n          // nothing to do\n          if (this.cues.length === 0) {\n            return activeCues;\n          }\n          const ct = this.tech_.currentTime();\n          const active = [];\n          for (let i = 0, l = this.cues.length; i < l; i++) {\n            const cue = this.cues[i];\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 (let i = 0; i < active.length; i++) {\n              if (this.activeCues_.indexOf(active[i]) === -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() {}\n      }\n    });\n    if (settings.src) {\n      this.src = settings.src;\n      if (!this.preload_) {\n        // Tracks will load on-demand.\n        // Act like we're loaded for other purposes.\n        this.loaded_ = true;\n      }\n      if (this.preload_ || settings.kind !== 'subtitles' && settings.kind !== 'captions') {\n        loadTrack(this.src, this);\n      }\n    } else {\n      this.loaded_ = true;\n    }\n  }\n  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  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  addCue(originalCue) {\n    let 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__default[\"default\"].vttjs.VTTCue(originalCue.startTime, originalCue.endTime, originalCue.text);\n      for (const 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    const tracks = this.tech_.textTracks();\n    for (let i = 0; i < tracks.length; i++) {\n      if (tracks[i] !== this) {\n        tracks[i].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  removeCue(removeCue) {\n    let i = this.cues_.length;\n    while (i--) {\n      const 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\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 */\nclass AudioTrack extends Track {\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  constructor(options = {}) {\n    const settings = merge$1(options, {\n      kind: AudioTrackKind[options.kind] || ''\n    });\n    super(settings);\n    let 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(this, 'enabled', {\n      get() {\n        return enabled;\n      },\n      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      this.enabled = settings.enabled;\n    }\n    this.loaded_ = true;\n  }\n}\n\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 */\nclass VideoTrack extends 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 {@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  constructor(options = {}) {\n    const settings = merge$1(options, {\n      kind: VideoTrackKind[options.kind] || ''\n    });\n    super(settings);\n    let 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(this, 'selected', {\n      get() {\n        return selected;\n      },\n      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      this.selected = settings.selected;\n    }\n  }\n}\n\n/**\n * @file html-track-element.js\n */\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 */\nclass HTMLTrackElement extends EventTarget$2 {\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  constructor(options = {}) {\n    super();\n    let readyState;\n    const track = new TextTrack(options);\n    this.kind = track.kind;\n    this.src = track.src;\n    this.srclang = track.language;\n    this.label = track.label;\n    this.default = track.default;\n    Object.defineProperties(this, {\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() {\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() {\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', () => {\n      readyState = HTMLTrackElement.LOADED;\n      this.trigger({\n        type: 'load',\n        target: this\n      });\n    });\n  }\n}\n\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\nconst 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 = `${type}Tracks`;\n  NORMAL[type].privateName = `${type}Tracks_`;\n});\nconst 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};\nconst 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, options = {}) {\n  const 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  const 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 */\nclass Tech extends Component$1 {\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  constructor(options = {}, ready = function () {}) {\n    // we don't want the tech to report user activity automatically.\n    // This is done manually in addControlsListeners\n    options.reportTouchActivity = false;\n    super(null, options, ready);\n    this.onDurationChange_ = e => this.onDurationChange(e);\n    this.trackProgress_ = e => this.trackProgress(e);\n    this.trackCurrentTime_ = e => this.trackCurrentTime(e);\n    this.stopTrackingCurrentTime_ = e => this.stopTrackingCurrentTime(e);\n    this.disposeSourceHandler_ = e => this.disposeSourceHandler(e);\n    this.queuedHanders_ = new Set();\n\n    // keep track of whether the current source has played at all to\n    // implement a very limited played()\n    this.hasStarted_ = false;\n    this.on('playing', function () {\n      this.hasStarted_ = true;\n    });\n    this.on('loadstart', function () {\n      this.hasStarted_ = false;\n    });\n    ALL.names.forEach(name => {\n      const props = ALL[name];\n      if (options && options[props.getterName]) {\n        this[props.privateName] = options[props.getterName];\n      }\n    });\n\n    // Manually track progress in cases where the browser/tech doesn't report it.\n    if (!this.featuresProgressEvents) {\n      this.manualProgressOn();\n    }\n\n    // Manually track timeupdates in cases where the browser/tech doesn't report it.\n    if (!this.featuresTimeupdateEvents) {\n      this.manualTimeUpdatesOn();\n    }\n    ['Text', 'Audio', 'Video'].forEach(track => {\n      if (options[`native${track}Tracks`] === false) {\n        this[`featuresNative${track}Tracks`] = false;\n      }\n    });\n    if (options.nativeCaptions === false || options.nativeTextTracks === false) {\n      this.featuresNativeTextTracks = false;\n    } else if (options.nativeCaptions === true || options.nativeTextTracks === true) {\n      this.featuresNativeTextTracks = true;\n    }\n    if (!this.featuresNativeTextTracks) {\n      this.emulateTextTracks();\n    }\n    this.preloadTextTracks = options.preloadTextTracks !== false;\n    this.autoRemoteTextTracks_ = new ALL.text.ListClass();\n    this.initTrackListeners();\n\n    // Turn on component tap events only if not using native controls\n    if (!options.nativeControlsForTouch) {\n      this.emitTapEvents();\n    }\n    if (this.constructor) {\n      this.name_ = this.constructor.name || 'Unknown Tech';\n    }\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  triggerSourceset(src) {\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', () => this.setTimeout(() => this.triggerSourceset(src), 1));\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,\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  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  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  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      const 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  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  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  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  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  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  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  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  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  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    super.dispose();\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  clearTracks(types) {\n    types = [].concat(types);\n    // clear out all tracks because we can't reuse them between techs\n    types.forEach(type => {\n      const list = this[`${type}Tracks`]() || [];\n      let i = list.length;\n      while (i--) {\n        const track = list[i];\n        if (type === 'text') {\n          this.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  cleanupAutoTextTracks() {\n    const list = this.autoRemoteTextTracks_ || [];\n    let i = list.length;\n    while (i--) {\n      const 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  reset() {}\n\n  /**\n   * Get the value of `crossOrigin` from the tech.\n   *\n   * @abstract\n   *\n   * @see {Html5#crossOrigin}\n   */\n  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  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  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  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  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  setScrubbing(_isScrubbing) {}\n\n  /**\n   * Get whether we are scrubbing or not\n   *\n   * @abstract\n   *\n   * @see {Html5#scrubbing}\n   */\n  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  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  initTrackListeners() {\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(name => {\n      const props = NORMAL[name];\n      const trackListChanges = () => {\n        this.trigger(`${name}trackchange`);\n      };\n      const tracks = this[props.getterName]();\n      tracks.addEventListener('removetrack', trackListChanges);\n      tracks.addEventListener('addtrack', trackListChanges);\n      this.on('dispose', () => {\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  addWebVttScript_() {\n    if (window__default[\"default\"].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__default[\"default\"].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__default[\"default\"]) && Object.keys(vtt__default[\"default\"]).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      const script = document__default[\"default\"].createElement('script');\n      script.src = this.options_['vtt.js'] || 'https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js';\n      script.onload = () => {\n        /**\n         * Fired when vtt.js is loaded.\n         *\n         * @event Tech#vttjsloaded\n         * @type {Event}\n         */\n        this.trigger('vttjsloaded');\n      };\n      script.onerror = () => {\n        /**\n         * Fired when vtt.js was not loaded due to an error\n         *\n         * @event Tech#vttjsloaded\n         * @type {Event}\n         */\n        this.trigger('vttjserror');\n      };\n      this.on('dispose', () => {\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__default[\"default\"].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  emulateTextTracks() {\n    const tracks = this.textTracks();\n    const remoteTracks = this.remoteTextTracks();\n    const handleAddTrack = e => tracks.addTrack(e.track);\n    const handleRemoveTrack = e => tracks.removeTrack(e.track);\n    remoteTracks.on('addtrack', handleAddTrack);\n    remoteTracks.on('removetrack', handleRemoveTrack);\n    this.addWebVttScript_();\n    const updateDisplay = () => this.trigger('texttrackchange');\n    const textTracksChanges = () => {\n      updateDisplay();\n      for (let i = 0; i < tracks.length; i++) {\n        const track = tracks[i];\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 (let i = 0; i < tracks.length; i++) {\n        const track = tracks[i];\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  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  createRemoteTextTrack(options) {\n    const 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  addRemoteTextTrack(options = {}, manualCleanup) {\n    const 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(() => this.autoRemoteTextTracks_.addTrack(htmlTrackElement.track));\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  removeRemoteTextTrack(track) {\n    const 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  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  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  disablePictureInPicture() {\n    return true;\n  }\n\n  /**\n   * A method to set or unset the 'disablePictureInPicture' <video> property.\n   *\n   * @abstract\n   */\n  setDisablePictureInPicture() {}\n\n  /**\n   * A fallback implementation of requestVideoFrameCallback using requestAnimationFrame\n   *\n   * @param {function} cb\n   * @return {number} request id\n   */\n  requestVideoFrameCallback(cb) {\n    const id = newGUID();\n    if (!this.isReady_ || this.paused()) {\n      this.queuedHanders_.add(id);\n      this.one('playing', () => {\n        if (this.queuedHanders_.has(id)) {\n          this.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  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  setPoster() {}\n\n  /**\n   * A method to check for the presence of the 'playsinline' <video> attribute.\n   *\n   * @abstract\n   */\n  playsinline() {}\n\n  /**\n   * A method to set or unset the 'playsinline' <video> attribute.\n   *\n   * @abstract\n   */\n  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  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  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  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  static 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  static 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  static 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  static registerTech(name, tech) {\n    if (!Tech.techs_) {\n      Tech.techs_ = {};\n    }\n    if (!Tech.isTech(tech)) {\n      throw new Error(`Tech ${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  static 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__default[\"default\"] && window__default[\"default\"].videojs && window__default[\"default\"].videojs[name]) {\n      log$1.warn(`The ${name} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`);\n      return window__default[\"default\"].videojs[name];\n    }\n  }\n}\n\n/**\n * Get the {@link VideoTrackList}\n *\n * @returns {VideoTrackList}\n * @method Tech.prototype.videoTracks\n */\n\n/**\n * Get the {@link AudioTrackList}\n *\n * @returns {AudioTrackList}\n * @method Tech.prototype.audioTracks\n */\n\n/**\n * Get the {@link TextTrackList}\n *\n * @returns {TextTrackList}\n * @method Tech.prototype.textTracks\n */\n\n/**\n * Get the remote element {@link TextTrackList}\n *\n * @returns {TextTrackList}\n * @method Tech.prototype.remoteTextTracks\n */\n\n/**\n * Get the remote element {@link HtmlTrackElementList}\n *\n * @returns {HtmlTrackElementList}\n * @method Tech.prototype.remoteTextTrackEls\n */\n\nALL.names.forEach(function (name) {\n  const 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    let 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    const handlers = _Tech.sourceHandlers || [];\n    let can;\n    for (let i = 0; i < handlers.length; i++) {\n      can = handlers[i].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    const handlers = _Tech.sourceHandlers || [];\n    let can;\n    for (let i = 0; i < handlers.length; i++) {\n      can = handlers[i].canHandleSource(source, options);\n      if (can) {\n        return handlers[i];\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    const 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  const 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    const 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    let 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 */\nconst middlewares = {};\nconst middlewareInstances = {};\nconst 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(() => setSourceHelper(src, middlewares[src.type], next, player), 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(mw => mw.setTech && mw.setTech(tech));\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, arg = null) {\n  const callMethod = 'call' + toTitleCase$1(method);\n  const middlewareValue = middleware.reduce(middlewareIterator(callMethod), arg);\n  const 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  const 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 */\nconst 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 */\nconst 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 */\nconst allowedMediators = {\n  play: 1,\n  pause: 1\n};\nfunction middlewareIterator(method) {\n  return (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 (let i = mws.length - 1; i >= 0; i--) {\n    const mw = mws[i];\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  const mws = middlewareInstances[player.id()];\n  let mw = null;\n  if (mws === undefined || mws === null) {\n    mw = mwFactory(player);\n    middlewareInstances[player.id()] = [[mwFactory, mw]];\n    return mw;\n  }\n  for (let i = 0; i < mws.length; i++) {\n    const [mwf, mwi] = mws[i];\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(src = {}, middleware = [], next, player, acc = [], lastRun = false) {\n  const [mwFactory, ...mwrest] = middleware;\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    const 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 */\nconst 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 */\nconst getMimetype = function (src = '') {\n  const ext = getFileExtension(src);\n  const 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 */\nconst 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  const matchingSources = player.cache_.sources.filter(s => s.src === src);\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  const sources = player.$$('source');\n  for (let i = 0; i < sources.length; i++) {\n    const s = sources[i];\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 */\nconst filterSource = function (src) {\n  // traverse array\n  if (Array.isArray(src)) {\n    let 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\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    const mimetype = getMimetype(src.src);\n    if (mimetype) {\n      src.type = mimetype;\n    }\n  }\n  return src;\n}\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 */\nclass MediaLoader extends Component$1 {\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  constructor(player, options, ready) {\n    // MediaLoader has no element\n    const options_ = merge$1({\n      createEl: false\n    }, options);\n    super(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 (let i = 0, j = options.playerOptions.techOrder; i < j.length; i++) {\n        const techName = toTitleCase$1(j[i]);\n        let 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  }\n}\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 */\nclass ClickableComponent extends Component$1 {\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  constructor(player, options) {\n    super(player, options);\n    if (this.options_.controlText) {\n      this.controlText(this.options_.controlText);\n    }\n    this.handleMouseOver_ = e => this.handleMouseOver(e);\n    this.handleMouseOut_ = e => this.handleMouseOut(e);\n    this.handleClick_ = e => this.handleClick(e);\n    this.handleKeyDown_ = e => this.handleKeyDown(e);\n    this.emitTapEvents();\n    this.enable();\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  createEl(tag = 'div', props = {}, attributes = {}) {\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 ${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    const 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  dispose() {\n    // remove controlTextEl_ on dispose\n    this.controlTextEl_ = null;\n    super.dispose();\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  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  controlText(text, el = this.el()) {\n    if (text === undefined) {\n      return this.controlText_ || 'Need Text';\n    }\n    const 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  buildCSSClass() {\n    return `vjs-control vjs-button ${super.buildCSSClass()}`;\n  }\n\n  /**\n   * Enable this `ClickableComponent`\n   */\n  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  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  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  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  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__default[\"default\"].isEventKey(event, 'Space') || keycode__default[\"default\"].isEventKey(event, 'Enter')) {\n      event.preventDefault();\n      event.stopPropagation();\n      this.trigger('click');\n    } else {\n      // Pass keypress handling up for unsupported keys\n      super.handleKeyDown(event);\n    }\n  }\n}\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 */\nclass PosterImage extends ClickableComponent {\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  constructor(player, options) {\n    super(player, options);\n    this.update();\n    this.update_ = e => this.update(e);\n    player.on('posterchange', this.update_);\n  }\n\n  /**\n   * Clean up and dispose of the `PosterImage`.\n   */\n  dispose() {\n    this.player().off('posterchange', this.update_);\n    super.dispose();\n  }\n\n  /**\n   * Create the `PosterImage`s DOM element.\n   *\n   * @return {Element}\n   *         The element that gets created.\n   */\n  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  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 \"${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  update(event) {\n    const 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  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  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\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 */\nconst darkGray = '#222';\nconst lightGray = '#ccc';\nconst 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  let 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 ? `${position}px` : '';\n}\n\n/**\n * The component for displaying text track cues.\n *\n * @extends Component\n */\nclass TextTrackDisplay extends Component$1 {\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  constructor(player, options, ready) {\n    super(player, options, ready);\n    const updateDisplayTextHandler = e => this.updateDisplay(e);\n    const updateDisplayHandler = e => {\n      this.updateDisplayOverlay();\n      this.updateDisplay(e);\n    };\n    player.on('loadstart', e => this.toggleDisplay(e));\n    player.on('texttrackchange', updateDisplayTextHandler);\n    player.on('loadedmetadata', e => {\n      this.updateDisplayOverlay();\n      this.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_(this, 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      const screenOrientation = window__default[\"default\"].screen.orientation || window__default[\"default\"];\n      const changeOrientationEvent = window__default[\"default\"].screen.orientation ? 'change' : 'orientationchange';\n      screenOrientation.addEventListener(changeOrientationEvent, updateDisplayHandler);\n      player.on('dispose', () => screenOrientation.removeEventListener(changeOrientationEvent, updateDisplayHandler));\n      const tracks = this.options_.playerOptions.tracks || [];\n      for (let i = 0; i < tracks.length; i++) {\n        this.player_.addRemoteTextTrack(tracks[i], true);\n      }\n      this.preselectTrack();\n    }));\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  preselectTrack() {\n    const modes = {\n      captions: 1,\n      subtitles: 1\n    };\n    const trackList = this.player_.textTracks();\n    const userPref = this.player_.cache_.selectedLanguage;\n    let firstDesc;\n    let firstCaptions;\n    let preferredTrack;\n    for (let i = 0; i < trackList.length; i++) {\n      const track = trackList[i];\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  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  createEl() {\n    return super.createEl('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  clearDisplay() {\n    if (typeof window__default[\"default\"].WebVTT === 'function') {\n      window__default[\"default\"].WebVTT.processCues(window__default[\"default\"], [], 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  updateDisplay() {\n    const tracks = this.player_.textTracks();\n    const allowMultipleShowingTracks = this.options_.allowMultipleShowingTracks;\n    this.clearDisplay();\n    if (allowMultipleShowingTracks) {\n      const showingTracks = [];\n      for (let i = 0; i < tracks.length; ++i) {\n        const track = tracks[i];\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    let descriptionsTrack = null;\n    let captionsSubtitlesTrack = null;\n    let i = tracks.length;\n    while (i--) {\n      const 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  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__default[\"default\"].CSS.supports('inset-inline: 10px')) {\n      return;\n    }\n    const playerWidth = this.player_.currentWidth();\n    const playerHeight = this.player_.currentHeight();\n    const playerAspectRatio = playerWidth / playerHeight;\n    const videoAspectRatio = this.player_.videoWidth() / this.player_.videoHeight();\n    let insetInlineMatch = 0;\n    let 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  updateDisplayState(track) {\n    const overrides = this.player_.textTrackSettings.getValues();\n    const cues = track.activeCues;\n    let i = cues.length;\n    while (i--) {\n      const cue = cues[i];\n      if (!cue) {\n        continue;\n      }\n      const 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 ${darkGray}, 2px 2px 4px ${darkGray}, 2px 2px 5px ${darkGray}`;\n        } else if (overrides.edgeStyle === 'raised') {\n          cueDiv.firstChild.style.textShadow = `1px 1px ${darkGray}, 2px 2px ${darkGray}, 3px 3px ${darkGray}`;\n        } else if (overrides.edgeStyle === 'depressed') {\n          cueDiv.firstChild.style.textShadow = `1px 1px ${lightGray}, 0 1px ${lightGray}, -1px -1px ${darkGray}, 0 -1px ${darkGray}`;\n        } else if (overrides.edgeStyle === 'uniform') {\n          cueDiv.firstChild.style.textShadow = `0 0 4px ${darkGray}, 0 0 4px ${darkGray}, 0 0 4px ${darkGray}, 0 0 4px ${darkGray}`;\n        }\n      }\n      if (overrides.fontPercent && overrides.fontPercent !== 1) {\n        const fontSize = window__default[\"default\"].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  updateForTrack(tracks) {\n    if (!Array.isArray(tracks)) {\n      tracks = [tracks];\n    }\n    if (typeof window__default[\"default\"].WebVTT !== 'function' || tracks.every(track => {\n      return !track.activeCues;\n    })) {\n      return;\n    }\n    const cues = [];\n\n    // push all active track cues\n    for (let i = 0; i < tracks.length; ++i) {\n      const track = tracks[i];\n      for (let 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__default[\"default\"].WebVTT.processCues(window__default[\"default\"], cues, this.el_);\n\n    // add unique class to each language text track & add settings styling if necessary\n    for (let i = 0; i < tracks.length; ++i) {\n      const track = tracks[i];\n      for (let j = 0; j < track.activeCues.length; ++j) {\n        const cueEl = track.activeCues[j].displayState;\n        addClass(cueEl, 'vjs-text-track-cue', 'vjs-text-track-cue-' + (track.language ? track.language : i));\n        if (track.language) {\n          setAttribute(cueEl, 'lang', track.language);\n        }\n      }\n      if (this.player_.textTrackSettings) {\n        this.updateDisplayState(track);\n      }\n    }\n  }\n}\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 */\nclass LoadingSpinner extends Component$1 {\n  /**\n   * Create the `LoadingSpinner`s DOM element.\n   *\n   * @return {Element}\n   *         The dom element that gets created.\n   */\n  createEl() {\n    const isAudio = this.player_.isAudio();\n    const playerType = this.localize(isAudio ? 'Audio Player' : 'Video Player');\n    const controlText = createEl('span', {\n      className: 'vjs-control-text',\n      textContent: this.localize('{1} is loading.', [playerType])\n    });\n    const el = super.createEl('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  handleLanguagechange() {\n    this.$('.vjs-control-text').textContent = this.localize('{1} is loading.', [this.player_.isAudio() ? 'Audio Player' : 'Video Player']);\n  }\n}\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 */\nclass Button extends ClickableComponent {\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  createEl(tag, props = {}, attributes = {}) {\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    const 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  addChild(child, options = {}) {\n    const className = this.constructor.name;\n    log$1.warn(`Adding an actionable (user controllable) child to a Button (${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  enable() {\n    super.enable();\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  disable() {\n    super.disable();\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  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__default[\"default\"].isEventKey(event, 'Space') || keycode__default[\"default\"].isEventKey(event, 'Enter')) {\n      event.stopPropagation();\n      return;\n    }\n\n    // Pass keypress handling up for unsupported keys\n    super.handleKeyDown(event);\n  }\n}\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 */\nclass BigPlayButton extends Button {\n  constructor(player, options) {\n    super(player, options);\n    this.mouseused_ = false;\n    this.setIcon('play');\n    this.on('mousedown', e => this.handleMouseDown(e));\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  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  handleClick(event) {\n    const 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    const cb = this.player_.getChild('controlBar');\n    const playToggle = cb && cb.getChild('playToggle');\n    if (!playToggle) {\n      this.player_.tech(true).focus();\n      return;\n    }\n    const playFocus = () => playToggle.focus();\n    if (isPromise(playPromise)) {\n      playPromise.then(playFocus, () => {});\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  handleKeyDown(event) {\n    this.mouseused_ = false;\n    super.handleKeyDown(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  handleMouseDown(event) {\n    this.mouseused_ = true;\n  }\n}\n\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 */\nclass CloseButton extends Button {\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  constructor(player, options) {\n    super(player, options);\n    this.setIcon('cancel');\n    this.controlText(options && options.controlText || this.localize('Close'));\n  }\n\n  /**\n  * Builds the default DOM `className`.\n  *\n  * @return {string}\n  *         The DOM `className` for this object.\n  */\n  buildCSSClass() {\n    return `vjs-close-button ${super.buildCSSClass()}`;\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  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  handleKeyDown(event) {\n    // Esc button will trigger `click` event\n    if (keycode__default[\"default\"].isEventKey(event, 'Esc')) {\n      event.preventDefault();\n      event.stopPropagation();\n      this.trigger('click');\n    } else {\n      // Pass keypress handling up for unsupported keys\n      super.handleKeyDown(event);\n    }\n  }\n}\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 */\nclass PlayToggle extends Button {\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  constructor(player, options = {}) {\n    super(player, options);\n\n    // show or hide replay icon\n    options.replay = options.replay === undefined || options.replay;\n    this.setIcon('play');\n    this.on(player, 'play', e => this.handlePlay(e));\n    this.on(player, 'pause', e => this.handlePause(e));\n    if (options.replay) {\n      this.on(player, 'ended', e => this.handleEnded(e));\n    }\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  buildCSSClass() {\n    return `vjs-play-control ${super.buildCSSClass()}`;\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  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  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  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  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  handleEnded(event) {\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', e => this.handleSeeked(e));\n  }\n}\n\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 */\nclass TimeDisplay extends Component$1 {\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  constructor(player, options) {\n    super(player, options);\n    this.on(player, ['timeupdate', 'ended', 'seeking'], e => this.update(e));\n    this.updateTextNode_();\n  }\n\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    const className = this.buildCSSClass();\n    const el = super.createEl('div', {\n      className: `${className} vjs-time-control vjs-control`\n    });\n    const span = createEl('span', {\n      className: 'vjs-control-text',\n      textContent: `${this.localize(this.labelText_)}\\u00a0`\n    }, {\n      role: 'presentation'\n    });\n    el.appendChild(span);\n    this.contentEl_ = createEl('span', {\n      className: `${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  dispose() {\n    this.contentEl_ = null;\n    this.textNode_ = null;\n    super.dispose();\n  }\n\n  /**\n   * Updates the displayed time according to the `updateContent` function which is defined in the child class.\n   *\n   * @param {Event} [event]\n   *          The `timeupdate`, `ended` or `seeking` (if enableSmoothSeeking is true) event that caused this function to be called.\n   */\n  update(event) {\n    if (!this.player_.options_.enableSmoothSeeking && event.type === 'seeking') {\n      return;\n    }\n    this.updateContent(event);\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  updateTextNode_(time = 0) {\n    time = formatTime(time);\n    if (this.formattedTime_ === time) {\n      return;\n    }\n    this.formattedTime_ = time;\n    this.requestNamedAnimationFrame('TimeDisplay#updateTextNode_', () => {\n      if (!this.contentEl_) {\n        return;\n      }\n      let oldNode = this.textNode_;\n      if (oldNode && this.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      this.textNode_ = document__default[\"default\"].createTextNode(this.formattedTime_);\n      if (!this.textNode_) {\n        return;\n      }\n      if (oldNode) {\n        this.contentEl_.replaceChild(this.textNode_, oldNode);\n      } else {\n        this.contentEl_.appendChild(this.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  updateContent(event) {}\n}\n\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 */\nclass CurrentTimeDisplay extends TimeDisplay {\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  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  updateContent(event) {\n    // Allows for smooth scrubbing, when player can't keep up.\n    let 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\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 */\nclass DurationDisplay extends 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  constructor(player, options) {\n    super(player, options);\n    const updateContent = e => this.updateContent(e);\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    this.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    this.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    this.on(player, 'loadedmetadata', updateContent);\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  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  updateContent(event) {\n    const duration = this.player_.duration();\n    this.updateTextNode_(duration);\n  }\n}\n\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 */\nclass TimeDivider extends Component$1 {\n  /**\n   * Create the component's DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    const el = super.createEl('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    const div = super.createEl('div');\n    const span = super.createEl('span', {\n      textContent: '/'\n    });\n    div.appendChild(span);\n    el.appendChild(div);\n    return el;\n  }\n}\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 */\nclass RemainingTimeDisplay extends 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  constructor(player, options) {\n    super(player, options);\n    this.on(player, 'durationchange', e => this.updateContent(e));\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  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  createEl() {\n    const el = super.createEl();\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  updateContent(event) {\n    if (typeof this.player_.duration() !== 'number') {\n      return;\n    }\n    let 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\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 */\nclass LiveDisplay extends Component$1 {\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  constructor(player, options) {\n    super(player, options);\n    this.updateShowing();\n    this.on(this.player(), 'durationchange', e => this.updateShowing(e));\n  }\n\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    const el = super.createEl('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: `${this.localize('Stream Type')}\\u00a0`\n    }));\n    this.contentEl_.appendChild(document__default[\"default\"].createTextNode(this.localize('LIVE')));\n    el.appendChild(this.contentEl_);\n    return el;\n  }\n  dispose() {\n    this.contentEl_ = null;\n    super.dispose();\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  updateShowing(event) {\n    if (this.player().duration() === Infinity) {\n      this.show();\n    } else {\n      this.hide();\n    }\n  }\n}\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 */\nclass SeekToLive extends Button {\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  constructor(player, options) {\n    super(player, options);\n    this.updateLiveEdgeStatus();\n    if (this.player_.liveTracker) {\n      this.updateLiveEdgeStatusHandler_ = e => this.updateLiveEdgeStatus(e);\n      this.on(this.player_.liveTracker, 'liveedgechange', this.updateLiveEdgeStatusHandler_);\n    }\n  }\n\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    const el = super.createEl('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  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  handleClick() {\n    this.player_.liveTracker.seekToLiveEdge();\n  }\n\n  /**\n   * Dispose of the element and stop tracking\n   */\n  dispose() {\n    if (this.player_.liveTracker) {\n      this.off(this.player_.liveTracker, 'liveedgechange', this.updateLiveEdgeStatusHandler_);\n    }\n    this.textEl_ = null;\n    super.dispose();\n  }\n}\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}\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 */\nclass Slider extends Component$1 {\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  constructor(player, options) {\n    super(player, options);\n    this.handleMouseDown_ = e => this.handleMouseDown(e);\n    this.handleMouseUp_ = e => this.handleMouseUp(e);\n    this.handleKeyDown_ = e => this.handleKeyDown(e);\n    this.handleClick_ = e => this.handleClick(e);\n    this.handleMouseMove_ = e => this.handleMouseMove(e);\n    this.update_ = e => this.update(e);\n\n    // Set property names to bar to match with the child Slider class is looking for\n    this.bar = this.getChild(this.options_.barName);\n\n    // Set a horizontal or vertical class on the slider depending on the slider type\n    this.vertical(!!this.options_.vertical);\n    this.enable();\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  enabled() {\n    return this.enabled_;\n  }\n\n  /**\n   * Enable controls for this slider if they are disabled\n   */\n  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  disable() {\n    if (!this.enabled()) {\n      return;\n    }\n    const 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  createEl(type, props = {}, attributes = {}) {\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 super.createEl(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  handleMouseDown(event) {\n    const 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  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  handleMouseUp(event) {\n    const 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  update() {\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    const progress = this.getProgress();\n    if (progress === this.progress_) {\n      return progress;\n    }\n    this.progress_ = progress;\n    this.requestNamedAnimationFrame('Slider#update', () => {\n      // Set the new bar width or height\n      const sizeKey = this.vertical() ? 'height' : 'width';\n\n      // Convert to a percentage for css value\n      this.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  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  calculateDistance(event) {\n    const 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  handleKeyDown(event) {\n    // Left and Down Arrows\n    if (keycode__default[\"default\"].isEventKey(event, 'Left') || keycode__default[\"default\"].isEventKey(event, 'Down')) {\n      event.preventDefault();\n      event.stopPropagation();\n      this.stepBack();\n\n      // Up and Right Arrows\n    } else if (keycode__default[\"default\"].isEventKey(event, 'Right') || keycode__default[\"default\"].isEventKey(event, 'Up')) {\n      event.preventDefault();\n      event.stopPropagation();\n      this.stepForward();\n    } else {\n      // Pass keydown handling up for unsupported keys\n      super.handleKeyDown(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  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  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}\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\nconst percentify = (time, end) => clamp(time / end * 100, 0, 100).toFixed(2) + '%';\n\n/**\n * Shows loading progress\n *\n * @extends Component\n */\nclass LoadProgressBar extends Component$1 {\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  constructor(player, options) {\n    super(player, options);\n    this.partEls_ = [];\n    this.on(player, 'progress', e => this.update(e));\n  }\n\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    const el = super.createEl('div', {\n      className: 'vjs-load-progress'\n    });\n    const wrapper = createEl('span', {\n      className: 'vjs-control-text'\n    });\n    const loadedText = createEl('span', {\n      textContent: this.localize('Loaded')\n    });\n    const separator = document__default[\"default\"].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  dispose() {\n    this.partEls_ = null;\n    this.percentageEl_ = null;\n    super.dispose();\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  update(event) {\n    this.requestNamedAnimationFrame('LoadProgressBar#update', () => {\n      const liveTracker = this.player_.liveTracker;\n      const buffered = this.player_.buffered();\n      const duration = liveTracker && liveTracker.isLive() ? liveTracker.seekableEnd() : this.player_.duration();\n      const bufferedEnd = this.player_.bufferedEnd();\n      const children = this.partEls_;\n      const percent = percentify(bufferedEnd, duration);\n      if (this.percent_ !== percent) {\n        // update the width of the progress bar\n        this.el_.style.width = percent;\n        // update the control-text\n        textContent(this.percentageEl_, percent);\n        this.percent_ = percent;\n      }\n\n      // add child elements to represent the individual buffered time ranges\n      for (let i = 0; i < buffered.length; i++) {\n        const start = buffered.start(i);\n        const end = buffered.end(i);\n        let part = children[i];\n        if (!part) {\n          part = this.el_.appendChild(createEl());\n          children[i] = 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 (let i = children.length; i > buffered.length; i--) {\n        this.el_.removeChild(children[i - 1]);\n      }\n      children.length = buffered.length;\n    });\n  }\n}\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 */\nclass TimeTooltip extends Component$1 {\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  constructor(player, options) {\n    super(player, options);\n    this.update = throttle(bind_(this, this.update), UPDATE_REFRESH_INTERVAL);\n  }\n\n  /**\n   * Create the time tooltip DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    return super.createEl('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  update(seekBarRect, seekBarPoint, content) {\n    const tooltipRect = findPosition(this.el_);\n    const playerRect = getBoundingClientRect(this.player_.el());\n    const 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    const 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    const 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    let 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 = `-${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  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  updateTime(seekBarRect, seekBarPoint, time, cb) {\n    this.requestNamedAnimationFrame('TimeTooltip#updateTime', () => {\n      let content;\n      const duration = this.player_.duration();\n      if (this.player_.liveTracker && this.player_.liveTracker.isLive()) {\n        const liveWindow = this.player_.liveTracker.liveWindow();\n        const secondsBehind = liveWindow - seekBarPoint * liveWindow;\n        content = (secondsBehind < 1 ? '' : '-') + formatTime(secondsBehind, liveWindow);\n      } else {\n        content = formatTime(time, duration);\n      }\n      this.update(seekBarRect, seekBarPoint, content);\n      if (cb) {\n        cb();\n      }\n    });\n  }\n}\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 */\nclass PlayProgressBar extends Component$1 {\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  constructor(player, options) {\n    super(player, options);\n    this.setIcon('circle');\n    this.update = throttle(bind_(this, this.update), UPDATE_REFRESH_INTERVAL);\n  }\n\n  /**\n   * Create the the DOM element for this class.\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    return super.createEl('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  update(seekBarRect, seekBarPoint) {\n    const timeTooltip = this.getChild('timeTooltip');\n    if (!timeTooltip) {\n      return;\n    }\n    const time = this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime();\n    timeTooltip.updateTime(seekBarRect, seekBarPoint, time);\n  }\n}\n\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 */\nclass MouseTimeDisplay extends Component$1 {\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  constructor(player, options) {\n    super(player, options);\n    this.update = throttle(bind_(this, this.update), UPDATE_REFRESH_INTERVAL);\n  }\n\n  /**\n   * Create the DOM element for this class.\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    return super.createEl('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  update(seekBarRect, seekBarPoint) {\n    const time = seekBarPoint * this.player_.duration();\n    this.getChild('timeTooltip').updateTime(seekBarRect, seekBarPoint, time, () => {\n      this.el_.style.left = `${seekBarRect.width * seekBarPoint}px`;\n    });\n  }\n}\n\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.\nconst STEP_SECONDS = 5;\n\n// The multiplier of STEP_SECONDS that PgUp/PgDown move the timeline.\nconst 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 */\nclass SeekBar extends Slider {\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  constructor(player, options) {\n    super(player, options);\n    this.setEventHandlers_();\n  }\n\n  /**\n   * Sets the event handlers\n   *\n   * @private\n   */\n  setEventHandlers_() {\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_ = e => this.enableInterval_(e);\n    this.disableIntervalHandler_ = e => this.disableInterval_(e);\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__default[\"default\"] && 'visibilityState' in document__default[\"default\"]) {\n      this.on(document__default[\"default\"], 'visibilitychange', this.toggleVisibility_);\n    }\n  }\n  toggleVisibility_(e) {\n    if (document__default[\"default\"].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  enableInterval_() {\n    if (this.updateInterval) {\n      return;\n    }\n    this.updateInterval = this.setInterval(this.update, UPDATE_REFRESH_INTERVAL);\n  }\n  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  createEl() {\n    return super.createEl('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  update(event) {\n    // ignore updates while the tab is hidden\n    if (document__default[\"default\"].visibilityState === 'hidden') {\n      return;\n    }\n    const percent = super.update();\n    this.requestNamedAnimationFrame('SeekBar#update', () => {\n      const currentTime = this.player_.ended() ? this.player_.duration() : this.getCurrentTime_();\n      const liveTracker = this.player_.liveTracker;\n      let duration = this.player_.duration();\n      if (liveTracker && liveTracker.isLive()) {\n        duration = this.player_.liveTracker.liveCurrentTime();\n      }\n      if (this.percent_ !== percent) {\n        // machine readable value of progress bar (percentage complete)\n        this.el_.setAttribute('aria-valuenow', (percent * 100).toFixed(2));\n        this.percent_ = percent;\n      }\n      if (this.currentTime_ !== currentTime || this.duration_ !== duration) {\n        // human readable value of progress bar (time complete)\n        this.el_.setAttribute('aria-valuetext', this.localize('progress bar timing: currentTime={1} duration={2}', [formatTime(currentTime, duration), formatTime(duration, duration)], '{1} of {2}'));\n        this.currentTime_ = currentTime;\n        this.duration_ = duration;\n      }\n\n      // update the progress bar time tooltip with the current time\n      if (this.bar) {\n        this.bar.update(getBoundingClientRect(this.el()), this.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  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  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  getPercent() {\n    const currentTime = this.getCurrentTime_();\n    let percent;\n    const 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  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    super.handleMouseDown(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  handleMouseMove(event, mouseDown = 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    let newTime;\n    const distance = this.calculateDistance(event);\n    const 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      const seekableStart = liveTracker.seekableStart();\n      const 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    if (this.player_.options_.enableSmoothSeeking) {\n      this.update();\n    }\n  }\n  enable() {\n    super.enable();\n    const mouseTimeDisplay = this.getChild('mouseTimeDisplay');\n    if (!mouseTimeDisplay) {\n      return;\n    }\n    mouseTimeDisplay.show();\n  }\n  disable() {\n    super.disable();\n    const 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  handleMouseUp(event) {\n    super.handleMouseUp(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  stepForward() {\n    this.userSeek_(this.player_.currentTime() + STEP_SECONDS);\n  }\n\n  /**\n   * Move more quickly rewind for keyboard-only users\n   */\n  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  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  handleKeyDown(event) {\n    const liveTracker = this.player_.liveTracker;\n    if (keycode__default[\"default\"].isEventKey(event, 'Space') || keycode__default[\"default\"].isEventKey(event, 'Enter')) {\n      event.preventDefault();\n      event.stopPropagation();\n      this.handleAction(event);\n    } else if (keycode__default[\"default\"].isEventKey(event, 'Home')) {\n      event.preventDefault();\n      event.stopPropagation();\n      this.userSeek_(0);\n    } else if (keycode__default[\"default\"].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__default[\"default\"](event))) {\n      event.preventDefault();\n      event.stopPropagation();\n      const gotoFraction = (keycode__default[\"default\"].codes[keycode__default[\"default\"](event)] - keycode__default[\"default\"].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__default[\"default\"].isEventKey(event, 'PgDn')) {\n      event.preventDefault();\n      event.stopPropagation();\n      this.userSeek_(this.player_.currentTime() - STEP_SECONDS * PAGE_KEY_MULTIPLIER);\n    } else if (keycode__default[\"default\"].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      super.handleKeyDown(event);\n    }\n  }\n  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__default[\"default\"] && 'visibilityState' in document__default[\"default\"]) {\n      this.off(document__default[\"default\"], 'visibilitychange', this.toggleVisibility_);\n    }\n    super.dispose();\n  }\n}\n\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 */\nclass ProgressControl extends Component$1 {\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  constructor(player, options) {\n    super(player, options);\n    this.handleMouseMove = throttle(bind_(this, this.handleMouseMove), UPDATE_REFRESH_INTERVAL);\n    this.throttledHandleMouseSeek = throttle(bind_(this, this.handleMouseSeek), UPDATE_REFRESH_INTERVAL);\n    this.handleMouseUpHandler_ = e => this.handleMouseUp(e);\n    this.handleMouseDownHandler_ = e => this.handleMouseDown(e);\n    this.enable();\n  }\n\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    return super.createEl('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  handleMouseMove(event) {\n    const seekBar = this.getChild('seekBar');\n    if (!seekBar) {\n      return;\n    }\n    const playProgressBar = seekBar.getChild('playProgressBar');\n    const mouseTimeDisplay = seekBar.getChild('mouseTimeDisplay');\n    if (!playProgressBar && !mouseTimeDisplay) {\n      return;\n    }\n    const seekBarEl = seekBar.el();\n    const seekBarRect = findPosition(seekBarEl);\n    let 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  handleMouseSeek(event) {\n    const 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  enabled() {\n    return this.enabled_;\n  }\n\n  /**\n   * Disable all controls on the progress control and its children\n   */\n  disable() {\n    this.children().forEach(child => child.disable && child.disable());\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      const 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  enable() {\n    this.children().forEach(child => child.enable && child.enable());\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  removeListenersAddedOnMousedownAndTouchstart() {\n    const 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  handleMouseDown(event) {\n    const doc = this.el_.ownerDocument;\n    const 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  handleMouseUp(event) {\n    const seekBar = this.getChild('seekBar');\n    if (seekBar) {\n      seekBar.handleMouseUp(event);\n    }\n    this.removeListenersAddedOnMousedownAndTouchstart();\n  }\n}\n\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 */\nclass PictureInPictureToggle extends Button {\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  constructor(player, options) {\n    super(player, options);\n    this.setIcon('picture-in-picture-enter');\n    this.on(player, ['enterpictureinpicture', 'leavepictureinpicture'], e => this.handlePictureInPictureChange(e));\n    this.on(player, ['disablepictureinpicturechanged', 'loadedmetadata'], e => this.handlePictureInPictureEnabledChange(e));\n    this.on(player, ['loadedmetadata', 'audioonlymodechange', 'audiopostermodechange'], () => this.handlePictureInPictureAudioModeChange());\n\n    // TODO: Deactivate button on player emptied event.\n    this.disable();\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  buildCSSClass() {\n    return `vjs-picture-in-picture-control vjs-hidden ${super.buildCSSClass()}`;\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  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    const isSourceAudio = this.player_.currentType().substring(0, 5) === 'audio';\n    const 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  handlePictureInPictureEnabledChange() {\n    if (document__default[\"default\"].pictureInPictureEnabled && this.player_.disablePictureInPicture() === false || this.player_.options_.enableDocumentPictureInPicture && 'documentPictureInPicture' in window__default[\"default\"]) {\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  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  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  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__default[\"default\"].exitPictureInPicture !== 'function') {\n      return;\n    }\n    super.show();\n  }\n}\n\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 */\nclass FullscreenToggle extends Button {\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  constructor(player, options) {\n    super(player, options);\n    this.setIcon('fullscreen-enter');\n    this.on(player, 'fullscreenchange', e => this.handleFullscreenChange(e));\n    if (document__default[\"default\"][player.fsApi_.fullscreenEnabled] === false) {\n      this.disable();\n    }\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  buildCSSClass() {\n    return `vjs-fullscreen-control ${super.buildCSSClass()}`;\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  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  handleClick(event) {\n    if (!this.player_.isFullscreen()) {\n      this.player_.requestFullscreen();\n    } else {\n      this.player_.exitFullscreen();\n    }\n  }\n}\n\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 */\nconst checkVolumeSupport = function (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 */\nclass VolumeLevel extends Component$1 {\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    const el = super.createEl('div', {\n      className: 'vjs-volume-level'\n    });\n    this.setIcon('circle', el);\n    el.appendChild(super.createEl('span', {\n      className: 'vjs-control-text'\n    }));\n    return el;\n  }\n}\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 */\nclass VolumeLevelTooltip extends Component$1 {\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  constructor(player, options) {\n    super(player, options);\n    this.update = throttle(bind_(this, this.update), UPDATE_REFRESH_INTERVAL);\n  }\n\n  /**\n   * Create the volume tooltip DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    return super.createEl('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  update(rangeBarRect, rangeBarPoint, vertical, content) {\n    if (!vertical) {\n      const tooltipRect = getBoundingClientRect(this.el_);\n      const playerRect = getBoundingClientRect(this.player_.el());\n      const volumeBarPointPx = rangeBarRect.width * rangeBarPoint;\n      if (!playerRect || !tooltipRect) {\n        return;\n      }\n      const spaceLeftOfPoint = rangeBarRect.left - playerRect.left + volumeBarPointPx;\n      const spaceRightOfPoint = rangeBarRect.width - volumeBarPointPx + (playerRect.right - rangeBarRect.right);\n      let 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 = `-${pullTooltipBy}px`;\n    }\n    this.write(`${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  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  updateVolume(rangeBarRect, rangeBarPoint, vertical, volume, cb) {\n    this.requestNamedAnimationFrame('VolumeLevelTooltip#updateVolume', () => {\n      this.update(rangeBarRect, rangeBarPoint, vertical, volume.toFixed(0));\n      if (cb) {\n        cb();\n      }\n    });\n  }\n}\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 */\nclass MouseVolumeLevelDisplay extends Component$1 {\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  constructor(player, options) {\n    super(player, options);\n    this.update = throttle(bind_(this, this.update), UPDATE_REFRESH_INTERVAL);\n  }\n\n  /**\n   * Create the DOM element for this class.\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    return super.createEl('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  update(rangeBarRect, rangeBarPoint, vertical) {\n    const volume = 100 * rangeBarPoint;\n    this.getChild('volumeLevelTooltip').updateVolume(rangeBarRect, rangeBarPoint, vertical, volume, () => {\n      if (vertical) {\n        this.el_.style.bottom = `${rangeBarRect.height * rangeBarPoint}px`;\n      } else {\n        this.el_.style.left = `${rangeBarRect.width * rangeBarPoint}px`;\n      }\n    });\n  }\n}\n\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 */\nclass VolumeBar extends Slider {\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  constructor(player, options) {\n    super(player, options);\n    this.on('slideractive', e => this.updateLastVolume_(e));\n    this.on(player, 'volumechange', e => this.updateARIAAttributes(e));\n    player.ready(() => this.updateARIAAttributes());\n  }\n\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    return super.createEl('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  handleMouseDown(event) {\n    if (!isSingleLeftClick(event)) {\n      return;\n    }\n    super.handleMouseDown(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  handleMouseMove(event) {\n    const mouseVolumeLevelDisplay = this.getChild('mouseVolumeLevelDisplay');\n    if (mouseVolumeLevelDisplay) {\n      const volumeBarEl = this.el();\n      const volumeBarRect = getBoundingClientRect(volumeBarEl);\n      const vertical = this.vertical();\n      let 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  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  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  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  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  updateARIAAttributes(event) {\n    const 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  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  updateLastVolume_() {\n    const volumeBeforeDrag = this.player_.volume();\n    this.one('sliderinactive', () => {\n      if (this.player_.volume() === 0) {\n        this.player_.lastVolume_(volumeBeforeDrag);\n      }\n    });\n  }\n}\n\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 */\nclass VolumeControl extends Component$1 {\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  constructor(player, options = {}) {\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    super(player, options);\n\n    // hide this control if volume support is missing\n    checkVolumeSupport(this, player);\n    this.throttledHandleMouseMove = throttle(bind_(this, this.handleMouseMove), UPDATE_REFRESH_INTERVAL);\n    this.handleMouseUpHandler_ = e => this.handleMouseUp(e);\n    this.on('mousedown', e => this.handleMouseDown(e));\n    this.on('touchstart', e => this.handleMouseDown(e));\n    this.on('mousemove', e => this.handleMouseMove(e));\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    this.on(this.volumeBar, ['focus', 'slideractive'], () => {\n      this.volumeBar.addClass('vjs-slider-active');\n      this.addClass('vjs-slider-active');\n      this.trigger('slideractive');\n    });\n    this.on(this.volumeBar, ['blur', 'sliderinactive'], () => {\n      this.volumeBar.removeClass('vjs-slider-active');\n      this.removeClass('vjs-slider-active');\n      this.trigger('sliderinactive');\n    });\n  }\n\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    let orientationClass = 'vjs-volume-horizontal';\n    if (this.options_.vertical) {\n      orientationClass = 'vjs-volume-vertical';\n    }\n    return super.createEl('div', {\n      className: `vjs-volume-control vjs-control ${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  handleMouseDown(event) {\n    const 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  handleMouseUp(event) {\n    const 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  handleMouseMove(event) {\n    this.volumeBar.handleMouseMove(event);\n  }\n}\n\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 */\nconst checkMuteSupport = function (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 */\nclass MuteToggle extends Button {\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  constructor(player, options) {\n    super(player, options);\n\n    // hide this control if volume support is missing\n    checkMuteSupport(this, player);\n    this.on(player, ['loadstart', 'volumechange'], e => this.update(e));\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  buildCSSClass() {\n    return `vjs-mute-control ${super.buildCSSClass()}`;\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  handleClick(event) {\n    const vol = this.player_.volume();\n    const lastVolume = this.player_.lastVolume_();\n    if (vol === 0) {\n      const 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  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  updateIcon_() {\n    const vol = this.player_.volume();\n    let 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((str, i) => str + `${i ? ' ' : ''}vjs-vol-${i}`, ''));\n    addClass(this.el_, `vjs-vol-${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  updateControlText_() {\n    const soundOff = this.player_.muted() || this.player_.volume() === 0;\n    const text = soundOff ? 'Unmute' : 'Mute';\n    if (this.controlText() !== text) {\n      this.controlText(text);\n    }\n  }\n}\n\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 */\nclass VolumePanel extends Component$1 {\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  constructor(player, options = {}) {\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    super(player, options);\n\n    // this handler is used by mouse handler methods below\n    this.handleKeyPressHandler_ = e => this.handleKeyPress(e);\n    this.on(player, ['loadstart'], e => this.volumePanelState_(e));\n    this.on(this.muteToggle, 'keyup', e => this.handleKeyPress(e));\n    this.on(this.volumeControl, 'keyup', e => this.handleVolumeControlKeyUp(e));\n    this.on('keydown', e => this.handleKeyPress(e));\n    this.on('mouseover', e => this.handleMouseOver(e));\n    this.on('mouseout', e => this.handleMouseOut(e));\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    this.on(this.volumeControl, ['slideractive'], this.sliderActive_);\n    this.on(this.volumeControl, ['sliderinactive'], this.sliderInactive_);\n  }\n\n  /**\n   * Add vjs-slider-active class to the VolumePanel\n   *\n   * @listens VolumeControl#slideractive\n   * @private\n   */\n  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  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  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  createEl() {\n    let orientationClass = 'vjs-volume-panel-horizontal';\n    if (!this.options_.inline) {\n      orientationClass = 'vjs-volume-panel-vertical';\n    }\n    return super.createEl('div', {\n      className: `vjs-volume-panel vjs-control ${orientationClass}`\n    });\n  }\n\n  /**\n   * Dispose of the `volume-panel` and all child components.\n   */\n  dispose() {\n    this.handleMouseOut();\n    super.dispose();\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  handleVolumeControlKeyUp(event) {\n    if (keycode__default[\"default\"].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  handleMouseOver(event) {\n    this.addClass('vjs-hover');\n    on(document__default[\"default\"], '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  handleMouseOut(event) {\n    this.removeClass('vjs-hover');\n    off(document__default[\"default\"], '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  handleKeyPress(event) {\n    if (keycode__default[\"default\"].isEventKey(event, 'Esc')) {\n      this.handleMouseOut();\n    }\n  }\n}\n\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 */\nclass SkipForward extends Button {\n  constructor(player, options) {\n    super(player, options);\n    this.validOptions = [5, 10, 30];\n    this.skipTime = this.getSkipForwardTime();\n    if (this.skipTime && this.validOptions.includes(this.skipTime)) {\n      this.setIcon(`forward-${this.skipTime}`);\n      this.controlText(this.localize('Skip forward {1} seconds', [this.skipTime]));\n      this.show();\n    } else {\n      this.hide();\n    }\n  }\n  getSkipForwardTime() {\n    const playerOptions = this.options_.playerOptions;\n    return playerOptions.controlBar && playerOptions.controlBar.skipButtons && playerOptions.controlBar.skipButtons.forward;\n  }\n  buildCSSClass() {\n    return `vjs-skip-forward-${this.getSkipForwardTime()} ${super.buildCSSClass()}`;\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  handleClick(event) {\n    if (isNaN(this.player_.duration())) {\n      return;\n    }\n    const currentVideoTime = this.player_.currentTime();\n    const liveTracker = this.player_.liveTracker;\n    const duration = liveTracker && liveTracker.isLive() ? liveTracker.seekableEnd() : this.player_.duration();\n    let 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  handleLanguagechange() {\n    this.controlText(this.localize('Skip forward {1} seconds', [this.skipTime]));\n  }\n}\nSkipForward.prototype.controlText_ = 'Skip Forward';\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 */\nclass SkipBackward extends Button {\n  constructor(player, options) {\n    super(player, options);\n    this.validOptions = [5, 10, 30];\n    this.skipTime = this.getSkipBackwardTime();\n    if (this.skipTime && this.validOptions.includes(this.skipTime)) {\n      this.setIcon(`replay-${this.skipTime}`);\n      this.controlText(this.localize('Skip backward {1} seconds', [this.skipTime]));\n      this.show();\n    } else {\n      this.hide();\n    }\n  }\n  getSkipBackwardTime() {\n    const playerOptions = this.options_.playerOptions;\n    return playerOptions.controlBar && playerOptions.controlBar.skipButtons && playerOptions.controlBar.skipButtons.backward;\n  }\n  buildCSSClass() {\n    return `vjs-skip-backward-${this.getSkipBackwardTime()} ${super.buildCSSClass()}`;\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  handleClick(event) {\n    const currentVideoTime = this.player_.currentTime();\n    const liveTracker = this.player_.liveTracker;\n    const seekableStart = liveTracker && liveTracker.isLive() && liveTracker.seekableStart();\n    let 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  handleLanguagechange() {\n    this.controlText(this.localize('Skip backward {1} seconds', [this.skipTime]));\n  }\n}\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 */\nclass Menu extends Component$1 {\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  constructor(player, options) {\n    super(player, options);\n    if (options) {\n      this.menuButton_ = options.menuButton;\n    }\n    this.focusedChild_ = -1;\n    this.on('keydown', e => this.handleKeyDown(e));\n\n    // All the menu item instances share the same blur handler provided by the menu container.\n    this.boundHandleBlur_ = e => this.handleBlur(e);\n    this.boundHandleTapClick_ = e => this.handleTapClick(e);\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  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  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  removeChild(component) {\n    if (typeof component === 'string') {\n      component = this.getChild(component);\n    }\n    this.removeEventListenerForItem(component);\n    super.removeChild(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  addItem(component) {\n    const 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  createEl() {\n    const contentElType = this.options_.contentElType || 'ul';\n    this.contentEl_ = createEl(contentElType, {\n      className: 'vjs-menu-content'\n    });\n    this.contentEl_.setAttribute('role', 'menu');\n    const el = super.createEl('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  dispose() {\n    this.contentEl_ = null;\n    this.boundHandleBlur_ = null;\n    this.boundHandleTapClick_ = null;\n    super.dispose();\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  handleBlur(event) {\n    const relatedTarget = event.relatedTarget || document__default[\"default\"].activeElement;\n\n    // Close menu popup when a user clicks outside the menu\n    if (!this.children().some(element => {\n      return element.el() === relatedTarget;\n    })) {\n      const 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  handleTapClick(event) {\n    // Unpress the associated MenuButton, and move focus back to it\n    if (this.menuButton_) {\n      this.menuButton_.unpressButton();\n      const childComponents = this.children();\n      if (!Array.isArray(childComponents)) {\n        return;\n      }\n      const foundComponent = childComponents.filter(component => component.el() === event.target)[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  handleKeyDown(event) {\n    // Left and Down Arrows\n    if (keycode__default[\"default\"].isEventKey(event, 'Left') || keycode__default[\"default\"].isEventKey(event, 'Down')) {\n      event.preventDefault();\n      event.stopPropagation();\n      this.stepForward();\n\n      // Up and Right Arrows\n    } else if (keycode__default[\"default\"].isEventKey(event, 'Right') || keycode__default[\"default\"].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  stepForward() {\n    let 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  stepBack() {\n    let 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  focus(item = 0) {\n    const children = this.children().slice();\n    const 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}\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 */\nclass MenuButton extends Component$1 {\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  constructor(player, options = {}) {\n    super(player, options);\n    this.menuButton_ = new Button(player, options);\n    this.menuButton_.controlText(this.controlText_);\n    this.menuButton_.el_.setAttribute('aria-haspopup', 'true');\n\n    // Add buildCSSClass values to the button, not the wrapper\n    const buttonClass = Button.prototype.buildCSSClass();\n    this.menuButton_.el_.className = this.buildCSSClass() + ' ' + buttonClass;\n    this.menuButton_.removeClass('vjs-control');\n    this.addChild(this.menuButton_);\n    this.update();\n    this.enabled_ = true;\n    const handleClick = e => this.handleClick(e);\n    this.handleMenuKeyUp_ = e => this.handleMenuKeyUp(e);\n    this.on(this.menuButton_, 'tap', handleClick);\n    this.on(this.menuButton_, 'click', handleClick);\n    this.on(this.menuButton_, 'keydown', e => this.handleKeyDown(e));\n    this.on(this.menuButton_, 'mouseenter', () => {\n      this.addClass('vjs-hover');\n      this.menu.show();\n      on(document__default[\"default\"], 'keyup', this.handleMenuKeyUp_);\n    });\n    this.on('mouseleave', e => this.handleMouseLeave(e));\n    this.on('keydown', e => this.handleSubmenuKeyDown(e));\n  }\n\n  /**\n   * Update the menu based on the current state of its items.\n   */\n  update() {\n    const 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  createMenu() {\n    const 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      const titleEl = createEl('li', {\n        className: 'vjs-menu-title',\n        textContent: toTitleCase$1(this.options_.title),\n        tabIndex: -1\n      });\n      const 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 (let i = 0; i < this.items.length; i++) {\n        menu.addItem(this.items[i]);\n      }\n    }\n    return menu;\n  }\n\n  /**\n   * Create the list of menu items. Specific to each subclass.\n   *\n   * @abstract\n   */\n  createItems() {}\n\n  /**\n   * Create the `MenuButtons`s DOM element.\n   *\n   * @return {Element}\n   *         The element that gets created.\n   */\n  createEl() {\n    return super.createEl('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  setIcon(name) {\n    super.setIcon(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  buildWrapperCSSClass() {\n    let 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    const buttonClass = Button.prototype.buildCSSClass();\n    return `vjs-menu-button ${menuButtonClass} ${buttonClass} ${super.buildCSSClass()}`;\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  buildCSSClass() {\n    let 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 ${menuButtonClass} ${super.buildCSSClass()}`;\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  controlText(text, el = 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  dispose() {\n    this.handleMouseLeave();\n    super.dispose();\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  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  handleMouseLeave(event) {\n    this.removeClass('vjs-hover');\n    off(document__default[\"default\"], 'keyup', this.handleMenuKeyUp_);\n  }\n\n  /**\n   * Set the focus to the actual button, not to this element\n   */\n  focus() {\n    this.menuButton_.focus();\n  }\n\n  /**\n   * Remove the focus from the actual button, not this element\n   */\n  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  handleKeyDown(event) {\n    // Escape or Tab unpress the 'button'\n    if (keycode__default[\"default\"].isEventKey(event, 'Esc') || keycode__default[\"default\"].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__default[\"default\"].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__default[\"default\"].isEventKey(event, 'Up') || keycode__default[\"default\"].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  handleMenuKeyUp(event) {\n    // Escape hides popup menu\n    if (keycode__default[\"default\"].isEventKey(event, 'Esc') || keycode__default[\"default\"].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  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  handleSubmenuKeyDown(event) {\n    // Escape or Tab unpress the 'button'\n    if (keycode__default[\"default\"].isEventKey(event, 'Esc') || keycode__default[\"default\"].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__default[\"default\"].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  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  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  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  enable() {\n    this.enabled_ = true;\n    this.removeClass('vjs-disabled');\n    this.menuButton_.enable();\n  }\n}\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 */\nclass TrackButton extends 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  constructor(player, options) {\n    const tracks = options.tracks;\n    super(player, options);\n    if (this.items.length <= 1) {\n      this.hide();\n    }\n    if (!tracks) {\n      return;\n    }\n    const updateHandler = bind_(this, this.update);\n    tracks.addEventListener('removetrack', updateHandler);\n    tracks.addEventListener('addtrack', updateHandler);\n    tracks.addEventListener('labelchange', updateHandler);\n    this.player_.on('ready', updateHandler);\n    this.player_.on('dispose', function () {\n      tracks.removeEventListener('removetrack', updateHandler);\n      tracks.removeEventListener('addtrack', updateHandler);\n      tracks.removeEventListener('labelchange', updateHandler);\n    });\n  }\n}\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  */\nconst 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 */\nclass MenuItem extends ClickableComponent {\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  constructor(player, options) {\n    super(player, options);\n    this.selectable = options.selectable;\n    this.isSelected_ = options.selected || false;\n    this.multiSelectable = options.multiSelectable;\n    this.selected(this.isSelected_);\n    if (this.selectable) {\n      if (this.multiSelectable) {\n        this.el_.setAttribute('role', 'menuitemcheckbox');\n      } else {\n        this.el_.setAttribute('role', 'menuitemradio');\n      }\n    } else {\n      this.el_.setAttribute('role', 'menuitem');\n    }\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  createEl(type, props, attrs) {\n    // The control is textual, not just an icon\n    this.nonIconControl = true;\n    const el = super.createEl('li', Object.assign({\n      className: 'vjs-menu-item',\n      tabIndex: -1\n    }, props), attrs);\n\n    // swap icon with menu item text.\n    const 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  handleKeyDown(event) {\n    if (!MenuKeys.some(key => keycode__default[\"default\"].isEventKey(event, key))) {\n      // Pass keydown handling up for unused keys\n      super.handleKeyDown(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  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  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}\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 */\nclass TextTrackMenuItem extends MenuItem {\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  constructor(player, options) {\n    const track = options.track;\n    const 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    super(player, options);\n    this.track = track;\n    // Determine the relevant kind(s) of tracks for this component and filter\n    // out empty kinds.\n    this.kinds = (options.kinds || [options.kind || this.track.kind]).filter(Boolean);\n    const changeHandler = (...args) => {\n      this.handleTracksChange.apply(this, args);\n    };\n    const selectedLanguageChangeHandler = (...args) => {\n      this.handleSelectedLanguageChange.apply(this, args);\n    };\n    player.on(['loadstart', 'texttrackchange'], changeHandler);\n    tracks.addEventListener('change', changeHandler);\n    tracks.addEventListener('selectedlanguagechange', selectedLanguageChangeHandler);\n    this.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      let event;\n      this.on(['tap', 'click'], function () {\n        if (typeof window__default[\"default\"].Event !== 'object') {\n          // Android 2.3 throws an Illegal Constructor error for window.Event\n          try {\n            event = new window__default[\"default\"].Event('change');\n          } catch (err) {\n            // continue regardless of error\n          }\n        }\n        if (!event) {\n          event = document__default[\"default\"].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    this.handleTracksChange();\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  handleClick(event) {\n    const referenceTrack = this.track;\n    const tracks = this.player_.textTracks();\n    super.handleClick(event);\n    if (!tracks) {\n      return;\n    }\n    for (let i = 0; i < tracks.length; i++) {\n      const track = tracks[i];\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  handleTracksChange(event) {\n    const 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  handleSelectedLanguageChange(event) {\n    if (this.track.mode === 'showing') {\n      const 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  dispose() {\n    // remove reference to track object on dispose\n    this.track = null;\n    super.dispose();\n  }\n}\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 */\nclass OffTextTrackMenuItem extends 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  constructor(player, options) {\n    // Create pseudo track info\n    // Requires options['kind']\n    options.track = {\n      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    super(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  handleTracksChange(event) {\n    const tracks = this.player().textTracks();\n    let shouldBeSelected = true;\n    for (let i = 0, l = tracks.length; i < l; i++) {\n      const track = tracks[i];\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  handleSelectedLanguageChange(event) {\n    const tracks = this.player().textTracks();\n    let allHidden = true;\n    for (let i = 0, l = tracks.length; i < l; i++) {\n      const track = tracks[i];\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  handleLanguagechange() {\n    this.$('.vjs-menu-item-text').textContent = this.player_.localize(this.options_.label);\n    super.handleLanguagechange();\n  }\n}\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 */\nclass TextTrackButton extends 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  constructor(player, options = {}) {\n    options.tracks = player.textTracks();\n    super(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  createItems(items = [], TrackMenuItem = TextTrackMenuItem) {\n    // Label is an override for the [track] off label\n    // USed to localise captions/subtitles\n    let label;\n    if (this.label_) {\n      label = `${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\n    }));\n    this.hideThreshold_ += 1;\n    const tracks = this.player_.textTracks();\n    if (!Array.isArray(this.kinds_)) {\n      this.kinds_ = [this.kind_];\n    }\n    for (let i = 0; i < tracks.length; i++) {\n      const track = tracks[i];\n\n      // only add tracks that are of an appropriate kind and have a label\n      if (this.kinds_.indexOf(track.kind) > -1) {\n        const item = new TrackMenuItem(this.player_, {\n          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-${track.kind}-menu-item`);\n        items.push(item);\n      }\n    }\n    return items;\n  }\n}\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 */\nclass ChaptersTrackMenuItem extends MenuItem {\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  constructor(player, options) {\n    const track = options.track;\n    const cue = options.cue;\n    const 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    super(player, options);\n    this.track = track;\n    this.cue = cue;\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  handleClick(event) {\n    super.handleClick();\n    this.player_.currentTime(this.cue.startTime);\n  }\n}\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 */\nclass ChaptersButton extends 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   * @param {Function} [ready]\n   *        The function to call when this function is ready.\n   */\n  constructor(player, options, ready) {\n    super(player, options, ready);\n    this.setIcon('chapters');\n    this.selectCurrentItem_ = () => {\n      this.items.forEach(item => {\n        item.selected(this.track_.activeCues[0] === item.cue);\n      });\n    };\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  buildCSSClass() {\n    return `vjs-chapters-button ${super.buildCSSClass()}`;\n  }\n  buildWrapperCSSClass() {\n    return `vjs-chapters-button ${super.buildWrapperCSSClass()}`;\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  update(event) {\n    if (event && event.track && event.track.kind !== 'chapters') {\n      return;\n    }\n    const track = this.findChaptersTrack();\n    if (track !== this.track_) {\n      this.setTrack(track);\n      super.update();\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      super.update();\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  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      const 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      const 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  findChaptersTrack() {\n    const tracks = this.player_.textTracks() || [];\n    for (let i = tracks.length - 1; i >= 0; i--) {\n      // We will always choose the last track as our chaptersTrack\n      const track = tracks[i];\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  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  createMenu() {\n    this.options_.title = this.getMenuCaption();\n    return super.createMenu();\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  createItems() {\n    const items = [];\n    if (!this.track_) {\n      return items;\n    }\n    const cues = this.track_.cues;\n    if (!cues) {\n      return items;\n    }\n    for (let i = 0, l = cues.length; i < l; i++) {\n      const cue = cues[i];\n      const mi = new ChaptersTrackMenuItem(this.player_, {\n        track: this.track_,\n        cue\n      });\n      items.push(mi);\n    }\n    return items;\n  }\n}\n\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 */\nclass DescriptionsButton extends 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   * @param {Function} [ready]\n   *        The function to call when this component is ready.\n   */\n  constructor(player, options, ready) {\n    super(player, options, ready);\n    this.setIcon('audio-description');\n    const tracks = player.textTracks();\n    const changeHandler = bind_(this, this.handleTracksChange);\n    tracks.addEventListener('change', changeHandler);\n    this.on('dispose', function () {\n      tracks.removeEventListener('change', changeHandler);\n    });\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  handleTracksChange(event) {\n    const tracks = this.player().textTracks();\n    let disabled = false;\n\n    // Check whether a track of a different kind is showing\n    for (let i = 0, l = tracks.length; i < l; i++) {\n      const track = tracks[i];\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  buildCSSClass() {\n    return `vjs-descriptions-button ${super.buildCSSClass()}`;\n  }\n  buildWrapperCSSClass() {\n    return `vjs-descriptions-button ${super.buildWrapperCSSClass()}`;\n  }\n}\n\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 */\nclass SubtitlesButton extends 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   * @param {Function} [ready]\n   *        The function to call when this component is ready.\n   */\n  constructor(player, options, ready) {\n    super(player, options, ready);\n    this.setIcon('subtitles');\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  buildCSSClass() {\n    return `vjs-subtitles-button ${super.buildCSSClass()}`;\n  }\n  buildWrapperCSSClass() {\n    return `vjs-subtitles-button ${super.buildWrapperCSSClass()}`;\n  }\n}\n\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 */\nclass CaptionSettingsMenuItem extends 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  constructor(player, options) {\n    options.track = {\n      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    super(player, options);\n    this.addClass('vjs-texttrack-settings');\n    this.controlText(', opens ' + options.kind + ' settings dialog');\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  handleClick(event) {\n    this.player().getChild('textTrackSettings').open();\n  }\n\n  /**\n   * Update control text and label on languagechange\n   */\n  handleLanguagechange() {\n    this.$('.vjs-menu-item-text').textContent = this.player_.localize(this.options_.kind + ' settings');\n    super.handleLanguagechange();\n  }\n}\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 */\nclass CaptionsButton extends 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   * @param {Function} [ready]\n   *        The function to call when this component is ready.\n   */\n  constructor(player, options, ready) {\n    super(player, options, ready);\n    this.setIcon('captions');\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  buildCSSClass() {\n    return `vjs-captions-button ${super.buildCSSClass()}`;\n  }\n  buildWrapperCSSClass() {\n    return `vjs-captions-button ${super.buildWrapperCSSClass()}`;\n  }\n\n  /**\n   * Create caption menu items\n   *\n   * @return {CaptionSettingsMenuItem[]}\n   *         The array of current menu items.\n   */\n  createItems() {\n    const 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 super.createItems(items);\n  }\n}\n\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 */\nclass SubsCapsMenuItem extends TextTrackMenuItem {\n  createEl(type, props, attrs) {\n    const el = super.createEl(type, props, attrs);\n    const 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: ` ${this.localize('Captions')}`\n      }));\n    }\n    return el;\n  }\n}\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 */\nclass SubsCapsButton extends 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   * @param {Function} [ready]\n   *        The function to call when this component is ready.\n   */\n  constructor(player, options = {}) {\n    super(player, options);\n\n    // Although North America uses \"captions\" in most cases for\n    // \"captions and subtitles\" other locales use \"subtitles\"\n    this.label_ = 'subtitles';\n    this.setIcon('subtitles');\n    if (['en', 'en-us', 'en-ca', 'fr-ca'].indexOf(this.player_.language_) > -1) {\n      this.label_ = 'captions';\n      this.setIcon('captions');\n    }\n    this.menuButton_.controlText(toTitleCase$1(this.label_));\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  buildCSSClass() {\n    return `vjs-subs-caps-button ${super.buildCSSClass()}`;\n  }\n  buildWrapperCSSClass() {\n    return `vjs-subs-caps-button ${super.buildWrapperCSSClass()}`;\n  }\n\n  /**\n   * Create caption/subtitles menu items\n   *\n   * @return {CaptionSettingsMenuItem[]}\n   *         The array of current menu items.\n   */\n  createItems() {\n    let 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 = super.createItems(items, SubsCapsMenuItem);\n    return items;\n  }\n}\n\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 */\nclass AudioTrackMenuItem extends MenuItem {\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  constructor(player, options) {\n    const track = options.track;\n    const 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    super(player, options);\n    this.track = track;\n    this.addClass(`vjs-${track.kind}-menu-item`);\n    const changeHandler = (...args) => {\n      this.handleTracksChange.apply(this, args);\n    };\n    tracks.addEventListener('change', changeHandler);\n    this.on('dispose', () => {\n      tracks.removeEventListener('change', changeHandler);\n    });\n  }\n  createEl(type, props, attrs) {\n    const el = super.createEl(type, props, attrs);\n    const 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  handleClick(event) {\n    super.handleClick(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      const tracks = this.player_.audioTracks();\n      for (let i = 0; i < tracks.length; i++) {\n        const track = tracks[i];\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  handleTracksChange(event) {\n    this.selected(this.track.enabled);\n  }\n}\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 */\nclass AudioTrackButton extends TrackButton {\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  constructor(player, options = {}) {\n    options.tracks = player.audioTracks();\n    super(player, options);\n    this.setIcon('audio');\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  buildCSSClass() {\n    return `vjs-audio-button ${super.buildCSSClass()}`;\n  }\n  buildWrapperCSSClass() {\n    return `vjs-audio-button ${super.buildWrapperCSSClass()}`;\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  createItems(items = []) {\n    // if there's only one audio track, there no point in showing it\n    this.hideThreshold_ = 1;\n    const tracks = this.player_.audioTracks();\n    for (let i = 0; i < tracks.length; i++) {\n      const track = tracks[i];\n      items.push(new AudioTrackMenuItem(this.player_, {\n        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\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 */\nclass PlaybackRateMenuItem extends MenuItem {\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  constructor(player, options) {\n    const label = options.rate;\n    const 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    super(player, options);\n    this.label = label;\n    this.rate = rate;\n    this.on(player, 'ratechange', e => this.update(e));\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  handleClick(event) {\n    super.handleClick();\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  update(event) {\n    this.selected(this.player().playbackRate() === this.rate);\n  }\n}\n\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 */\nclass PlaybackRateMenuButton extends 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  constructor(player, options) {\n    super(player, options);\n    this.menuButton_.el_.setAttribute('aria-describedby', this.labelElId_);\n    this.updateVisibility();\n    this.updateLabel();\n    this.on(player, 'loadstart', e => this.updateVisibility(e));\n    this.on(player, 'ratechange', e => this.updateLabel(e));\n    this.on(player, 'playbackrateschange', e => this.handlePlaybackRateschange(e));\n  }\n\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    const el = super.createEl();\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  dispose() {\n    this.labelEl_ = null;\n    super.dispose();\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  buildCSSClass() {\n    return `vjs-playback-rate ${super.buildCSSClass()}`;\n  }\n  buildWrapperCSSClass() {\n    return `vjs-playback-rate ${super.buildWrapperCSSClass()}`;\n  }\n\n  /**\n   * Create the list of menu items. Specific to each subclass.\n   *\n   */\n  createItems() {\n    const rates = this.playbackRates();\n    const items = [];\n    for (let i = rates.length - 1; i >= 0; i--) {\n      items.push(new PlaybackRateMenuItem(this.player(), {\n        rate: rates[i] + '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  handlePlaybackRateschange(event) {\n    this.update();\n  }\n\n  /**\n   * Get possible playback rates\n   *\n   * @return {Array}\n   *         All possible playback rates\n   */\n  playbackRates() {\n    const 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  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  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  updateLabel(event) {\n    if (this.playbackRateSupported()) {\n      this.labelEl_.textContent = this.player().playbackRate() + 'x';\n    }\n  }\n}\n\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 */\nclass Spacer extends Component$1 {\n  /**\n  * Builds the default DOM `className`.\n  *\n  * @return {string}\n  *         The DOM `className` for this object.\n  */\n  buildCSSClass() {\n    return `vjs-spacer ${super.buildCSSClass()}`;\n  }\n\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl(tag = 'div', props = {}, attributes = {}) {\n    if (!props.className) {\n      props.className = this.buildCSSClass();\n    }\n    return super.createEl(tag, props, attributes);\n  }\n}\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 */\nclass CustomControlSpacer extends Spacer {\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  buildCSSClass() {\n    return `vjs-custom-control-spacer ${super.buildCSSClass()}`;\n  }\n\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    return super.createEl('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: '\\u00a0'\n    });\n  }\n}\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 */\nclass ControlBar extends Component$1 {\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    return super.createEl('div', {\n      className: 'vjs-control-bar',\n      dir: 'ltr'\n    });\n  }\n}\n\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 */\nclass ErrorDisplay extends ModalDialog {\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  constructor(player, options) {\n    super(player, options);\n    this.on(player, 'error', e => {\n      this.close();\n      this.open(e);\n    });\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  buildCSSClass() {\n    return `vjs-error-display ${super.buildCSSClass()}`;\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  content() {\n    const error = this.player().error();\n    return error ? this.localize(error.message) : '';\n  }\n}\n\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 */\nconst LOCAL_STORAGE_KEY$1 = 'vjs-text-track-settings';\nconst COLOR_BLACK = ['#000', 'Black'];\nconst COLOR_BLUE = ['#00F', 'Blue'];\nconst COLOR_CYAN = ['#0FF', 'Cyan'];\nconst COLOR_GREEN = ['#0F0', 'Green'];\nconst COLOR_MAGENTA = ['#F0F', 'Magenta'];\nconst COLOR_RED = ['#F00', 'Red'];\nconst COLOR_WHITE = ['#FFF', 'White'];\nconst COLOR_YELLOW = ['#FF0', 'Yellow'];\nconst OPACITY_OPAQUE = ['1', 'Opaque'];\nconst OPACITY_SEMI = ['0.5', 'Semi-Transparent'];\nconst 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.\nconst 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: v => v === '1.00' ? null : Number(v)\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  const 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 (let i = 0; i < el.options.length; i++) {\n    if (parseOptionValue(el.options[i].value, parser) === value) {\n      el.selectedIndex = i;\n      break;\n    }\n  }\n}\n\n/**\n * Manipulate Text Tracks settings.\n *\n * @extends ModalDialog\n */\nclass TextTrackSettings extends ModalDialog {\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  constructor(player, options) {\n    options.temporary = false;\n    super(player, options);\n    this.updateDisplay = this.updateDisplay.bind(this);\n\n    // fill the modal and pretend we have opened it\n    this.fill();\n    this.hasBeenOpened_ = this.hasBeenFilled_ = true;\n    this.endDialog = createEl('p', {\n      className: 'vjs-control-text',\n      textContent: this.localize('End of dialog window.')\n    });\n    this.el().appendChild(this.endDialog);\n    this.setDefaults();\n\n    // Grab `persistTextTrackSettings` from the player options if not passed in child options\n    if (options.persistTextTrackSettings === undefined) {\n      this.options_.persistTextTrackSettings = this.options_.playerOptions.persistTextTrackSettings;\n    }\n    this.on(this.$('.vjs-done-button'), 'click', () => {\n      this.saveSettings();\n      this.close();\n    });\n    this.on(this.$('.vjs-default-button'), 'click', () => {\n      this.setDefaults();\n      this.updateDisplay();\n    });\n    each(selectConfigs, config => {\n      this.on(this.$(config.selector), 'change', this.updateDisplay);\n    });\n    if (this.options_.persistTextTrackSettings) {\n      this.restoreSettings();\n    }\n  }\n  dispose() {\n    this.endDialog = null;\n    super.dispose();\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   * @param {string} [legendId]\n   *        Id of associated <legend>.\n   *\n   * @param {string} [type=label]\n   *        Type of labelling element, `label` or `legend`\n   *\n   * @return {string}\n   *         An HTML string.\n   *\n   * @private\n   */\n  createElSelect_(key, legendId = '', type = 'label') {\n    const config = selectConfigs[key];\n    const id = config.id.replace('%s', this.id_);\n    const selectLabelledbyIds = [legendId, id].join(' ').trim();\n    const guid = `vjs_select_${newGUID()}`;\n    return [`<${type} id=\"${id}\"${type === 'label' ? ` for=\"${guid}\" class=\"vjs-label\"` : ''}>`, this.localize(config.label), `</${type}>`, `<select aria-labelledby=\"${selectLabelledbyIds}\" id=\"${guid}\">`].concat(config.options.map(o => {\n      const optionId = id + '-' + o[1].replace(/\\W+/g, '');\n      return [`<option id=\"${optionId}\" value=\"${o[0]}\" `, `aria-labelledby=\"${selectLabelledbyIds} ${optionId}\">`, this.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  createElFgColor_() {\n    const legendId = `captions-text-legend-${this.id_}`;\n    return ['<fieldset class=\"vjs-fg vjs-track-setting\">', `<legend id=\"${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  createElBgColor_() {\n    const legendId = `captions-background-${this.id_}`;\n    return ['<fieldset class=\"vjs-bg vjs-track-setting\">', `<legend id=\"${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  createElWinColor_() {\n    const legendId = `captions-window-${this.id_}`;\n    return ['<fieldset class=\"vjs-window vjs-track-setting\">', `<legend id=\"${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  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  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  createElControls_() {\n    const 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=\"${defaultsDescription}\">`, this.localize('Reset'), `<span class=\"vjs-control-text\"> ${defaultsDescription}</span>`, '</button>', `<button type=\"button\" class=\"vjs-done-button\">${this.localize('Done')}</button>`].join('')\n    });\n  }\n  content() {\n    return [this.createElColors_(), this.createElFont_(), this.createElControls_()];\n  }\n  label() {\n    return this.localize('Caption Settings Dialog');\n  }\n  description() {\n    return this.localize('Beginning of dialog window. Escape will cancel and close the window.');\n  }\n  buildCSSClass() {\n    return super.buildCSSClass() + ' 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  getValues() {\n    return reduce(selectConfigs, (accum, config, key) => {\n      const value = getSelectedOptionValue(this.$(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  setValues(values) {\n    each(selectConfigs, (config, key) => {\n      setSelectedOption(this.$(config.selector), values[key], config.parser);\n    });\n  }\n\n  /**\n   * Sets all `<select>` elements to their default values.\n   */\n  setDefaults() {\n    each(selectConfigs, config => {\n      const index = config.hasOwnProperty('default') ? config.default : 0;\n      this.$(config.selector).selectedIndex = index;\n    });\n  }\n\n  /**\n   * Restore texttrack settings from localStorage\n   */\n  restoreSettings() {\n    let values;\n    try {\n      values = JSON.parse(window__default[\"default\"].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  saveSettings() {\n    if (!this.options_.persistTextTrackSettings) {\n      return;\n    }\n    const values = this.getValues();\n    try {\n      if (Object.keys(values).length) {\n        window__default[\"default\"].localStorage.setItem(LOCAL_STORAGE_KEY$1, JSON.stringify(values));\n      } else {\n        window__default[\"default\"].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  updateDisplay() {\n    const 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  conditionalBlur_() {\n    this.previouslyActiveEl_ = null;\n    const cb = this.player_.controlBar;\n    const subsCapsBtn = cb && cb.subsCapsButton;\n    const 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  handleLanguagechange() {\n    this.fill();\n  }\n}\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 */\nclass ResizeManager extends Component$1 {\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  constructor(player, options) {\n    let RESIZE_OBSERVER_AVAILABLE = options.ResizeObserver || window__default[\"default\"].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    const options_ = merge$1({\n      createEl: !RESIZE_OBSERVER_AVAILABLE,\n      reportTouchActivity: false\n    }, options);\n    super(player, options_);\n    this.ResizeObserver = options.ResizeObserver || window__default[\"default\"].ResizeObserver;\n    this.loadListener_ = null;\n    this.resizeObserver_ = null;\n    this.debouncedHandler_ = debounce(() => {\n      this.resizeHandler();\n    }, 100, false, this);\n    if (RESIZE_OBSERVER_AVAILABLE) {\n      this.resizeObserver_ = new this.ResizeObserver(this.debouncedHandler_);\n      this.resizeObserver_.observe(player.el());\n    } else {\n      this.loadListener_ = () => {\n        if (!this.el_ || !this.el_.contentWindow) {\n          return;\n        }\n        const debouncedHandler_ = this.debouncedHandler_;\n        let unloadListener_ = this.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(this.el_.contentWindow, 'unload', unloadListener_);\n        on(this.el_.contentWindow, 'resize', debouncedHandler_);\n      };\n      this.one('load', this.loadListener_);\n    }\n  }\n  createEl() {\n    return super.createEl('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  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  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    super.dispose();\n  }\n}\nComponent$1.registerComponent('ResizeManager', ResizeManager);\n\nconst 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 */\nclass LiveTracker extends Component$1 {\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  constructor(player, options) {\n    // LiveTracker does not need an element\n    const options_ = merge$1(defaults, options, {\n      createEl: false\n    });\n    super(player, options_);\n    this.trackLiveHandler_ = () => this.trackLive_();\n    this.handlePlay_ = e => this.handlePlay(e);\n    this.handleFirstTimeupdate_ = e => this.handleFirstTimeupdate(e);\n    this.handleSeeked_ = e => this.handleSeeked(e);\n    this.seekToLiveEdge_ = e => this.seekToLiveEdge(e);\n    this.reset_();\n    this.on(this.player_, 'durationchange', e => this.handleDurationchange(e));\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    this.on(this.player_, 'canplay', () => this.toggleTracking());\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  trackLive_() {\n    const seekable = this.player_.seekable();\n\n    // skip undefined seekable\n    if (!seekable || !seekable.length) {\n      return;\n    }\n    const newTime = Number(window__default[\"default\"].performance.now().toFixed(4));\n    const deltaTime = this.lastTime_ === -1 ? 0 : (newTime - this.lastTime_) / 1000;\n    this.lastTime_ = newTime;\n    this.pastSeekEnd_ = this.pastSeekEnd() + deltaTime;\n    const liveCurrentTime = this.liveCurrentTime();\n    const 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    let 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  handleDurationchange() {\n    this.toggleTracking();\n  }\n\n  /**\n   * start/stop tracking\n   */\n  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  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  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  handleSeeked() {\n    const 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  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  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  nextSeekedFromUser() {\n    this.nextSeekedFromUser_ = true;\n  }\n\n  /**\n   * stop tracking live playback\n   */\n  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  seekableEnd() {\n    const seekable = this.player_.seekable();\n    const seekableEnds = [];\n    let 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  seekableStart() {\n    const seekable = this.player_.seekable();\n    const seekableStarts = [];\n    let 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  liveWindow() {\n    const 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  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  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  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  pastSeekEnd() {\n    const 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  behindLiveEdge() {\n    return this.behindLiveEdge_;\n  }\n\n  /**\n   * Whether live tracker is currently tracking or not.\n   */\n  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  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  dispose() {\n    this.stopTracking();\n    super.dispose();\n  }\n}\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 */\nclass TitleBar extends Component$1 {\n  constructor(player, options) {\n    super(player, options);\n    this.on('statechanged', e => this.updateDom_());\n    this.updateDom_();\n  }\n\n  /**\n   * Create the `TitleBar`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    this.els = {\n      title: createEl('div', {\n        className: 'vjs-title-bar-title',\n        id: `vjs-title-bar-title-${newGUID()}`\n      }),\n      description: createEl('div', {\n        className: 'vjs-title-bar-description',\n        id: `vjs-title-bar-description-${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  updateDom_() {\n    const tech = this.player_.tech_;\n    const techEl = tech && tech.el_;\n    const techAriaAttrs = {\n      title: 'aria-labelledby',\n      description: 'aria-describedby'\n    };\n    ['title', 'description'].forEach(k => {\n      const value = this.state[k];\n      const el = this.els[k];\n      const 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  update(options) {\n    this.setState(options);\n  }\n\n  /**\n   * Dispose the component.\n   */\n  dispose() {\n    const tech = this.player_.tech_;\n    const techEl = tech && tech.el_;\n    if (techEl) {\n      techEl.removeAttribute('aria-labelledby');\n      techEl.removeAttribute('aria-describedby');\n    }\n    super.dispose();\n    this.els = null;\n  }\n}\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 */\nconst sourcesetLoad = tech => {\n  const 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  const sources = tech.$$('source');\n  const srcUrls = [];\n  let 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 (let i = 0; i < sources.length; i++) {\n    const url = sources[i].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 */\nconst innerHTMLDescriptorPolyfill = Object.defineProperty({}, 'innerHTML', {\n  get() {\n    return this.cloneNode(true).innerHTML;\n  },\n  set(v) {\n    // make a dummy node to use innerHTML on\n    const dummy = document__default[\"default\"].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    const docFrag = document__default[\"default\"].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__default[\"default\"].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 */\nconst getDescriptor = (priority, prop) => {\n  let descriptor = {};\n  for (let i = 0; i < priority.length; i++) {\n    descriptor = Object.getOwnPropertyDescriptor(priority[i], prop);\n    if (descriptor && descriptor.set && descriptor.get) {\n      break;\n    }\n  }\n  descriptor.enumerable = true;\n  descriptor.configurable = true;\n  return descriptor;\n};\nconst getInnerHTMLDescriptor = tech => getDescriptor([tech.el(), window__default[\"default\"].HTMLMediaElement.prototype, window__default[\"default\"].Element.prototype, innerHTMLDescriptorPolyfill], 'innerHTML');\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 */\nconst firstSourceWatch = function (tech) {\n  const el = tech.el();\n\n  // make sure firstSourceWatch isn't setup twice.\n  if (el.resetSourceWatch_) {\n    return;\n  }\n  const old = {};\n  const innerDescriptor = getInnerHTMLDescriptor(tech);\n  const appendWrapper = appendFn => (...args) => {\n    const retval = appendFn.apply(el, args);\n    sourcesetLoad(tech);\n    return retval;\n  };\n  ['append', 'appendChild', 'insertAdjacentHTML'].forEach(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_ = () => {\n    el.resetSourceWatch_ = null;\n    Object.keys(old).forEach(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 */\nconst srcDescriptorPolyfill = Object.defineProperty({}, 'src', {\n  get() {\n    if (this.hasAttribute('src')) {\n      return getAbsoluteURL(window__default[\"default\"].Element.prototype.getAttribute.call(this, 'src'));\n    }\n    return '';\n  },\n  set(v) {\n    window__default[\"default\"].Element.prototype.setAttribute.call(this, 'src', v);\n    return v;\n  }\n});\nconst getSrcDescriptor = tech => getDescriptor([tech.el(), window__default[\"default\"].HTMLMediaElement.prototype, srcDescriptorPolyfill], 'src');\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 */\nconst setupSourceset = function (tech) {\n  if (!tech.featuresSourceset) {\n    return;\n  }\n  const el = tech.el();\n\n  // make sure sourceset isn't setup twice.\n  if (el.resetSourceset_) {\n    return;\n  }\n  const srcDescriptor = getSrcDescriptor(tech);\n  const oldSetAttribute = el.setAttribute;\n  const oldLoad = el.load;\n  Object.defineProperty(el, 'src', merge$1(srcDescriptor, {\n    set: v => {\n      const 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 = (n, v) => {\n    const 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 = () => {\n    const 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_ = () => {\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 */\nclass Html5 extends 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  constructor(options, ready) {\n    super(options, ready);\n    const source = options.source;\n    let crossoriginTracks = false;\n    this.featuresVideoFrameCallback = this.featuresVideoFrameCallback && this.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 && (this.el_.currentSrc !== source.src || options.tag && options.tag.initNetworkState_ === 3)) {\n      this.setSource(source);\n    } else {\n      this.handleLateInit_(this.el_);\n    }\n\n    // setup sourceset after late sourceset/init\n    if (options.enableSourceset) {\n      this.setupSourcesetHandling_();\n    }\n    this.isScrubbing_ = false;\n    if (this.el_.hasChildNodes()) {\n      const nodes = this.el_.childNodes;\n      let nodesLength = nodes.length;\n      const removeNodes = [];\n      while (nodesLength--) {\n        const node = nodes[nodesLength];\n        const nodeName = node.nodeName.toLowerCase();\n        if (nodeName === 'track') {\n          if (!this.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            this.remoteTextTrackEls().addTrackElement_(node);\n            this.remoteTextTracks().addTrack(node.track);\n            this.textTracks().addTrack(node.track);\n            if (!crossoriginTracks && !this.el_.hasAttribute('crossorigin') && isCrossOrigin(node.src)) {\n              crossoriginTracks = true;\n            }\n          }\n        }\n      }\n      for (let i = 0; i < removeNodes.length; i++) {\n        this.el_.removeChild(removeNodes[i]);\n      }\n    }\n    this.proxyNativeTracks_();\n    if (this.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    this.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      this.setControls(true);\n    }\n\n    // on iOS, we want to proxy `webkitbeginfullscreen` and `webkitendfullscreen`\n    // into a `fullscreenchange` event\n    this.proxyWebkitFullscreen_();\n    this.triggerReady();\n  }\n\n  /**\n   * Dispose of `HTML5` media element and remove all tracks.\n   */\n  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    super.dispose();\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  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  restoreMetadataTracksInIOSNativePlayer_() {\n    const textTracks = this.textTracks();\n    let metadataTracksPreFullscreenState;\n\n    // captures a snapshot of every metadata track's current state\n    const takeMetadataTrackSnapshot = () => {\n      metadataTracksPreFullscreenState = [];\n      for (let i = 0; i < textTracks.length; i++) {\n        const track = textTracks[i];\n        if (track.kind === 'metadata') {\n          metadataTracksPreFullscreenState.push({\n            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', () => textTracks.removeEventListener('change', takeMetadataTrackSnapshot));\n    const restoreTrackMode = () => {\n      for (let i = 0; i < metadataTracksPreFullscreenState.length; i++) {\n        const storedTrack = metadataTracksPreFullscreenState[i];\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', () => {\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', () => {\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  overrideNative_(type, override) {\n    // If there is no behavioral change don't add/remove listeners\n    if (override !== this[`featuresNative${type}Tracks`]) {\n      return;\n    }\n    const lowerCaseType = type.toLowerCase();\n    if (this[`${lowerCaseType}TracksListeners_`]) {\n      Object.keys(this[`${lowerCaseType}TracksListeners_`]).forEach(eventName => {\n        const elTracks = this.el()[`${lowerCaseType}Tracks`];\n        elTracks.removeEventListener(eventName, this[`${lowerCaseType}TracksListeners_`][eventName]);\n      });\n    }\n    this[`featuresNative${type}Tracks`] = !override;\n    this[`${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  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  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  proxyNativeTracksForType_(name) {\n    const props = NORMAL[name];\n    const elTracks = this.el()[props.getterName];\n    const techTracks = this[props.getterName]();\n    if (!this[`featuresNative${props.capitalName}Tracks`] || !elTracks || !elTracks.addEventListener) {\n      return;\n    }\n    const listeners = {\n      change: e => {\n        const 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          this[REMOTE.remoteText.getterName]().trigger(event);\n        }\n      },\n      addtrack(e) {\n        techTracks.addTrack(e.track);\n      },\n      removetrack(e) {\n        techTracks.removeTrack(e.track);\n      }\n    };\n    const removeOldTracks = function () {\n      const removeTracks = [];\n      for (let i = 0; i < techTracks.length; i++) {\n        let found = false;\n        for (let j = 0; j < elTracks.length; j++) {\n          if (elTracks[j] === techTracks[i]) {\n            found = true;\n            break;\n          }\n        }\n        if (!found) {\n          removeTracks.push(techTracks[i]);\n        }\n      }\n      while (removeTracks.length) {\n        techTracks.removeTrack(removeTracks.shift());\n      }\n    };\n    this[props.getterName + 'Listeners_'] = listeners;\n    Object.keys(listeners).forEach(eventName => {\n      const listener = listeners[eventName];\n      elTracks.addEventListener(eventName, listener);\n      this.on('dispose', e => elTracks.removeEventListener(eventName, listener));\n    });\n\n    // Remove (native) tracks that are not used anymore\n    this.on('loadstart', removeOldTracks);\n    this.on('dispose', e => this.off('loadstart', removeOldTracks));\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  proxyNativeTracks_() {\n    NORMAL.names.forEach(name => {\n      this.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  createEl() {\n    let 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        const 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__default[\"default\"].createElement('video');\n\n        // determine if native controls should be used\n        const tagAttributes = this.options_.tag && getAttributes(this.options_.tag);\n        const 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    const settingsAttrs = ['loop', 'muted', 'playsinline', 'autoplay'];\n    for (let i = 0; i < settingsAttrs.length; i++) {\n      const attr = settingsAttrs[i];\n      const 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  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      let loadstartFired = false;\n      const setLoadstartFired = function () {\n        loadstartFired = true;\n      };\n      this.on('loadstart', setLoadstartFired);\n      const triggerLoadstart = function () {\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    const 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  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  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  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  duration() {\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      const checkProgress = () => {\n        if (this.el_.currentTime > 0) {\n          // Trigger durationchange for genuinely live video\n          if (this.el_.duration === Infinity) {\n            this.trigger('durationchange');\n          }\n          this.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  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  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  proxyWebkitFullscreen_() {\n    if (!('webkitDisplayingFullscreen' in this.el_)) {\n      return;\n    }\n    const endFn = function () {\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    const beginFn = function () {\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', () => {\n      this.off('webkitbeginfullscreen', beginFn);\n      this.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  supportsFullScreen() {\n    return typeof this.el_.webkitEnterFullScreen === 'function';\n  }\n\n  /**\n   * Request that the `HTML5` Tech enter fullscreen.\n   */\n  enterFullScreen() {\n    const 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  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  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  requestVideoFrameCallback(cb) {\n    if (this.featuresVideoFrameCallback && !this.el_.webkitKeys) {\n      return this.el_.requestVideoFrameCallback(cb);\n    }\n    return super.requestVideoFrameCallback(cb);\n  }\n\n  /**\n   * Native or fallback requestVideoFrameCallback\n   *\n   * @param {number} id request id to cancel\n   */\n  cancelVideoFrameCallback(id) {\n    if (this.featuresVideoFrameCallback && !this.el_.webkitKeys) {\n      this.el_.cancelVideoFrameCallback(id);\n    } else {\n      super.cancelVideoFrameCallback(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  src(src) {\n    if (src === undefined) {\n      return this.el_.src;\n    }\n\n    // Setting src through `src` instead of `setSrc` will be deprecated\n    this.setSrc(src);\n  }\n\n  /**\n   * Reset the tech by removing all sources and then calling\n   * {@link Html5.resetMediaElement}.\n   */\n  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  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  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  addTextTrack(kind, label, language) {\n    if (!this.featuresNativeTextTracks) {\n      return super.addTextTrack(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  createRemoteTextTrack(options) {\n    if (!this.featuresNativeTextTracks) {\n      return super.createRemoteTextTrack(options);\n    }\n    const htmlTrackElement = document__default[\"default\"].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  addRemoteTextTrack(options, manualCleanup) {\n    const htmlTrackElement = super.addRemoteTextTrack(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  removeRemoteTextTrack(track) {\n    super.removeRemoteTextTrack(track);\n    if (this.featuresNativeTextTracks) {\n      const tracks = this.$$('track');\n      let i = tracks.length;\n      while (i--) {\n        if (track === tracks[i] || track === tracks[i].track) {\n          this.el().removeChild(tracks[i]);\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  getVideoPlaybackQuality() {\n    if (typeof this.el().getVideoPlaybackQuality === 'function') {\n      return this.el().getVideoPlaybackQuality();\n    }\n    const 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__default[\"default\"].performance) {\n      videoPlaybackQuality.creationTime = window__default[\"default\"].performance.now();\n    }\n    return videoPlaybackQuality;\n  }\n}\n\n/* HTML5 Support Testing ---------------------------------------------------- */\n\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  const video = document__default[\"default\"].createElement('video');\n  const track = document__default[\"default\"].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    const volume = Html5.TEST_VID.volume;\n    Html5.TEST_VID.volume = volume / 2 + 0.1;\n    const 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__default[\"default\"].setTimeout(() => {\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    const 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    const 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    const noop = () => {};\n    Object.defineProperty(document__default[\"default\"].createElement('video'), 'src', {\n      get: noop,\n      set: noop\n    });\n    Object.defineProperty(document__default[\"default\"].createElement('audio'), 'src', {\n      get: noop,\n      set: noop\n    });\n    Object.defineProperty(document__default[\"default\"].createElement('video'), 'innerHTML', {\n      get: noop,\n      set: noop\n    });\n    Object.defineProperty(document__default[\"default\"].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 ([key, fn]) {\n  defineLazyProperty(Html5.prototype, key, () => Html5[fn](), 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  const sources = el.querySelectorAll('source');\n  let 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    const ext = getFileExtension(source.src);\n    return Html5.nativeSourceHandler.canPlayType(`video/${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\nconst 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\nconst TECH_EVENTS_QUEUE = {\n  canplay: 'CanPlay',\n  canplaythrough: 'CanPlayThrough',\n  playing: 'Playing',\n  seeked: 'Seeked'\n};\nconst BREAKPOINT_ORDER = ['tiny', 'xsmall', 'small', 'medium', 'large', 'xlarge', 'huge'];\nconst 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(k => {\n  const v = k.charAt(0) === 'x' ? `x-${k.substring(1)}` : k;\n  BREAKPOINT_CLASSES[k] = `vjs-layout-${v}`;\n});\nconst 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 */\nclass Player extends Component$1 {\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  constructor(tag, options, ready) {\n    // Make sure tag ID exists\n    // also here.. probably better\n    tag.id = tag.id || options.id || `vjs_video_${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      const 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    super(null, options, ready);\n\n    // Create bound methods for document listeners.\n    this.boundDocumentFullscreenChange_ = e => this.documentFullscreenChange_(e);\n    this.boundFullWindowOnEscKey_ = e => this.fullWindowOnEscKey(e);\n    this.boundUpdateStyleEl_ = e => this.updateStyleEl_(e);\n    this.boundApplyInitTime_ = e => this.applyInitTime_(e);\n    this.boundUpdateCurrentBreakpoint_ = e => this.updateCurrentBreakpoint_(e);\n    this.boundHandleTechClick_ = e => this.handleTechClick_(e);\n    this.boundHandleTechDoubleClick_ = e => this.handleTechDoubleClick_(e);\n    this.boundHandleTechTouchStart_ = e => this.handleTechTouchStart_(e);\n    this.boundHandleTechTouchMove_ = e => this.handleTechTouchMove_(e);\n    this.boundHandleTechTouchEnd_ = e => this.handleTechTouchEnd_(e);\n    this.boundHandleTechTap_ = e => this.handleTechTap_(e);\n\n    // default isFullscreen_ to false\n    this.isFullscreen_ = false;\n\n    // create logger\n    this.log = createLogger(this.id_);\n\n    // Hold our own reference to fullscreen api so it can be mocked in tests\n    this.fsApi_ = FullscreenApi;\n\n    // Tracks when a tech changes the poster\n    this.isPosterFromTech_ = false;\n\n    // Holds callback info that gets queued when playback rate is zero\n    // and a seek is happening\n    this.queuedCallbacks_ = [];\n\n    // Turn off API access because we're loading a new tech that might load asynchronously\n    this.isReady_ = false;\n\n    // Init state hasStarted_\n    this.hasStarted_ = false;\n\n    // Init state userActive_\n    this.userActive_ = false;\n\n    // Init debugEnabled_\n    this.debugEnabled_ = false;\n\n    // Init state audioOnlyMode_\n    this.audioOnlyMode_ = false;\n\n    // Init state audioPosterMode_\n    this.audioPosterMode_ = false;\n\n    // Init state audioOnlyCache_\n    this.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 (!this.options_ || !this.options_.techOrder || !this.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    this.tag = tag;\n\n    // Store the tag attributes used to restore html5 element\n    this.tagAttributes = tag && getAttributes(tag);\n\n    // Update current language\n    this.language(this.options_.language);\n\n    // Update Supported Languages\n    if (options.languages) {\n      // Normalise player option languages to lowercase\n      const languagesToLower = {};\n      Object.getOwnPropertyNames(options.languages).forEach(function (name) {\n        languagesToLower[name.toLowerCase()] = options.languages[name];\n      });\n      this.languages_ = languagesToLower;\n    } else {\n      this.languages_ = Player.prototype.options_.languages;\n    }\n    this.resetCache_();\n\n    // Set poster\n    /** @type string */\n    this.poster_ = options.poster || '';\n\n    // Set controls\n    /** @type {boolean} */\n    this.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    this.changingSrc_ = false;\n    this.playCallbacks_ = [];\n    this.playTerminatedQueue_ = [];\n\n    // the attribute overrides the option\n    if (tag.hasAttribute('autoplay')) {\n      this.autoplay(true);\n    } else {\n      // otherwise use the setter to validate and\n      // set the correct value.\n      this.autoplay(this.options_.autoplay);\n    }\n\n    // check plugins\n    if (options.plugins) {\n      Object.keys(options.plugins).forEach(name => {\n        if (typeof this[name] !== 'function') {\n          throw new Error(`plugin \"${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    this.scrubbing_ = false;\n    this.el_ = this.createEl();\n\n    // Make this an evented object and use `el_` as its event bus.\n    evented(this, {\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 (this.fsApi_.requestFullscreen) {\n      on(document__default[\"default\"], this.fsApi_.fullscreenchange, this.boundDocumentFullscreenChange_);\n      this.on(this.fsApi_.fullscreenchange, this.boundDocumentFullscreenChange_);\n    }\n    if (this.fluid_) {\n      this.on(['playerreset', 'resize'], this.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    const playerOptionsCopy = merge$1(this.options_);\n\n    // Load plugins\n    if (options.plugins) {\n      Object.keys(options.plugins).forEach(name => {\n        this[name](options.plugins[name]);\n      });\n    }\n\n    // Enable debug mode to fire debugon event for all plugins.\n    if (options.debug) {\n      this.debug(true);\n    }\n    this.options_.playerOptions = playerOptionsCopy;\n    this.middleware_ = [];\n    this.playbackRates(options.playbackRates);\n    if (options.experimentalSvgIcons) {\n      // Add SVG Sprite to the DOM\n      const parser = new window__default[\"default\"].DOMParser();\n      const parsedSVG = parser.parseFromString(icons, 'image/svg+xml');\n      const errorNode = parsedSVG.querySelector('parsererror');\n      if (errorNode) {\n        log$1.warn('Failed to load SVG Icons. Falling back to Font Icons.');\n        this.options_.experimentalSvgIcons = null;\n      } else {\n        const sprite = parsedSVG.documentElement;\n        sprite.style.display = 'none';\n        this.el_.appendChild(sprite);\n        this.addClass('vjs-svg-icons-enabled');\n      }\n    }\n    this.initChildren();\n\n    // Set isAudio based on whether or not an audio tag was used\n    this.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 (this.controls()) {\n      this.addClass('vjs-controls-enabled');\n    } else {\n      this.addClass('vjs-controls-disabled');\n    }\n\n    // Set ARIA label and region role depending on player type\n    this.el_.setAttribute('role', 'region');\n    if (this.isAudio()) {\n      this.el_.setAttribute('aria-label', this.localize('Audio Player'));\n    } else {\n      this.el_.setAttribute('aria-label', this.localize('Video Player'));\n    }\n    if (this.isAudio()) {\n      this.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      this.addClass('vjs-touch-enabled');\n    }\n\n    // iOS Safari has broken hover handling\n    if (!IS_IOS) {\n      this.addClass('vjs-workinghover');\n    }\n\n    // Make player easily findable by ID\n    Player.players[this.id_] = this;\n\n    // Add a major version class to aid css in plugins\n    const majorVersion = version$6.split('.')[0];\n    this.addClass(`vjs-v${majorVersion}`);\n\n    // When the player is first initialized, trigger activity so components\n    // like the control bar show themselves if needed\n    this.userActive(true);\n    this.reportUserActivity();\n    this.one('play', e => this.listenForUserActivity_(e));\n    this.on('keydown', e => this.handleKeyDown(e));\n    this.on('languagechange', e => this.handleLanguagechange(e));\n    this.breakpoints(this.options_.breakpoints);\n    this.responsive(this.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    this.on('ready', () => {\n      // Calling the audioPosterMode method first so that\n      // the audioOnlyMode can take precedence when both options are set to true\n      this.audioPosterMode(this.options_.audioPosterMode);\n      this.audioOnlyMode(this.options_.audioOnlyMode);\n    });\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  dispose() {\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__default[\"default\"], this.fsApi_.fullscreenchange, this.boundDocumentFullscreenChange_);\n    off(document__default[\"default\"], '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(name => {\n      const props = ALL[name];\n      const list = this[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    super.dispose({\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  createEl() {\n    let tag = this.tag;\n    let el;\n    let playerElIngest = this.playerElIngest_ = tag.parentNode && tag.parentNode.hasAttribute && tag.parentNode.hasAttribute('data-vjs-player');\n    const divEmbed = this.tag.tagName.toLowerCase() === 'video-js';\n    if (playerElIngest) {\n      el = this.el_ = tag.parentNode;\n    } else if (!divEmbed) {\n      el = this.el_ = super.createEl('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    const attrs = getAttributes(tag);\n    if (divEmbed) {\n      el = this.el_ = tag;\n      tag = this.tag = document__default[\"default\"].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(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__default[\"default\"].VIDEOJS_NO_DYNAMIC_STYLE !== true) {\n      this.styleEl_ = createStyleElement('vjs-styles-dimensions');\n      const defaultsStyleEl = $('.vjs-styles-defaults');\n      const 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    const links = tag.getElementsByTagName('a');\n    for (let i = 0; i < links.length; i++) {\n      const linkEl = links.item(i);\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  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 \"${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  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  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  dimension(dimension, value) {\n    const 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    const parsedVal = parseFloat(value);\n    if (isNaN(parsedVal)) {\n      log$1.error(`Improper value \"${value}\" supplied for for ${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  fluid(bool) {\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, () => {\n        this.on(['playerreset', 'resize'], this.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  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  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  updateStyleEl_() {\n    if (window__default[\"default\"].VIDEOJS_NO_DYNAMIC_STYLE === true) {\n      const width = typeof this.width_ === 'number' ? this.width_ : this.options_.width;\n      const height = typeof this.height_ === 'number' ? this.height_ : this.options_.height;\n      const 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    let width;\n    let height;\n    let aspectRatio;\n    let 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    const ratioParts = aspectRatio.split(':');\n    const 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      .${idClass} {\n        width: ${width}px;\n        height: ${height}px;\n      }\n\n      .${idClass}.vjs-fluid:not(.vjs-audio-only-mode) {\n        padding-top: ${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  loadTech_(techName, source) {\n    // Pause and remove current playback technology\n    if (this.tech_) {\n      this.unloadTech_();\n    }\n    const titleTechName = toTitleCase$1(techName);\n    const 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    let 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    const techOptions = {\n      source,\n      autoplay,\n      'nativeControlsForTouch': this.options_.nativeControlsForTouch,\n      'playerId': this.id(),\n      'techId': `${this.id()}_${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(name => {\n      const props = ALL[name];\n      techOptions[props.getterName] = this[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    const TechClass = Tech.getTech(techName);\n    if (!TechClass) {\n      throw new Error(`No Tech named '${titleTechName}' exists! '${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(event => {\n      this.on(this.tech_, event, e => this[`handleTech${toTitleCase$1(event)}_`](e));\n    });\n    Object.keys(TECH_EVENTS_QUEUE).forEach(event => {\n      this.on(this.tech_, event, eventObj => {\n        if (this.tech_.playbackRate() === 0 && this.tech_.seeking()) {\n          this.queuedCallbacks_.push({\n            callback: this[`handleTech${TECH_EVENTS_QUEUE[event]}_`].bind(this),\n            event: eventObj\n          });\n          return;\n        }\n        this[`handleTech${TECH_EVENTS_QUEUE[event]}_`](eventObj);\n      });\n    });\n    this.on(this.tech_, 'loadstart', e => this.handleTechLoadStart_(e));\n    this.on(this.tech_, 'sourceset', e => this.handleTechSourceset_(e));\n    this.on(this.tech_, 'waiting', e => this.handleTechWaiting_(e));\n    this.on(this.tech_, 'ended', e => this.handleTechEnded_(e));\n    this.on(this.tech_, 'seeking', e => this.handleTechSeeking_(e));\n    this.on(this.tech_, 'play', e => this.handleTechPlay_(e));\n    this.on(this.tech_, 'pause', e => this.handleTechPause_(e));\n    this.on(this.tech_, 'durationchange', e => this.handleTechDurationChange_(e));\n    this.on(this.tech_, 'fullscreenchange', (e, data) => this.handleTechFullscreenChange_(e, data));\n    this.on(this.tech_, 'fullscreenerror', (e, err) => this.handleTechFullscreenError_(e, err));\n    this.on(this.tech_, 'enterpictureinpicture', e => this.handleTechEnterPictureInPicture_(e));\n    this.on(this.tech_, 'leavepictureinpicture', e => this.handleTechLeavePictureInPicture_(e));\n    this.on(this.tech_, 'error', e => this.handleTechError_(e));\n    this.on(this.tech_, 'posterchange', e => this.handleTechPosterChange_(e));\n    this.on(this.tech_, 'textdata', e => this.handleTechTextData_(e));\n    this.on(this.tech_, 'ratechange', e => this.handleTechRateChange_(e));\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  unloadTech_() {\n    // Save the current text tracks so that we can reuse the same text tracks with the next tech\n    ALL.names.forEach(name => {\n      const props = ALL[name];\n      this[props.privateName] = this[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  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   * An object that contains Video.js version.\n   *\n   * @typedef {Object} PlayerVersion\n   *\n   * @property {string} 'video.js' - Video.js version\n   */\n\n  /**\n   * Returns an object with Video.js version.\n   *\n   * @return {PlayerVersion}\n   *          An object with Video.js version.\n   */\n  version() {\n    return {\n      'video.js': version$6\n    };\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  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  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  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  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  manualAutoplay_(type) {\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    const resolveMuted = () => {\n      const previouslyMuted = this.muted();\n      this.muted(true);\n      const restoreMuted = () => {\n        this.muted(previouslyMuted);\n      };\n\n      // restore muted on play terminatation\n      this.playTerminatedQueue_.push(restoreMuted);\n      const mutedPromise = this.play();\n      if (!isPromise(mutedPromise)) {\n        return;\n      }\n      return mutedPromise.catch(err => {\n        restoreMuted();\n        throw new Error(`Rejection at manualAutoplay. Restoring muted value. ${err ? err : ''}`);\n      });\n    };\n    let 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(() => {\n      this.trigger({\n        type: 'autoplay-success',\n        autoplay: type\n      });\n    }).catch(() => {\n      this.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  updateSourceCaches_(srcObj = '') {\n    let src = srcObj;\n    let 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,\n      type\n    });\n    const matchingSources = this.cache_.sources.filter(s => s.src && s.src === src);\n    const sourceElSources = [];\n    const sourceEls = this.$$('source');\n    const matchingSourceEls = [];\n    for (let i = 0; i < sourceEls.length; i++) {\n      const sourceObj = getAttributes(sourceEls[i]);\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  handleTechSourceset_(event) {\n    // only update the source cache when the source\n    // was not updated using the player api\n    if (!this.changingSrc_) {\n      let updateSourceCaches = src => this.updateSourceCaches_(src);\n      const playerSrc = this.currentSource().src;\n      const 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 = () => {};\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'], 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          const techSrc = this.techGet_('currentSrc');\n          this.lastSource_.tech = techSrc;\n          this.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  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  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  handleTechRateChange_() {\n    if (this.tech_.playbackRate() > 0 && this.cache_.lastPlaybackRate === 0) {\n      this.queuedCallbacks_.forEach(queued => queued.callback(queued.event));\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  handleTechWaiting_() {\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    const timeWhenWaiting = this.currentTime();\n    const timeUpdateListener = () => {\n      if (timeWhenWaiting !== this.currentTime()) {\n        this.removeClass('vjs-waiting');\n        this.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  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  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  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  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  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  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  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  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  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  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    const inAllowedEls = Array.prototype.some.call(this.$$('.vjs-control-bar, .vjs-modal-dialog'), el => el.contains(event.target));\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  handleTechTap_() {\n    this.userActive(!this.userActive());\n  }\n\n  /**\n   * Handle touch to start\n   *\n   * @listens Tech#touchstart\n   * @private\n   */\n  handleTechTouchStart_() {\n    this.userWasActive = this.userActive();\n  }\n\n  /**\n   * Handle touch to move\n   *\n   * @listens Tech#touchmove\n   * @private\n   */\n  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  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  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  documentFullscreenChange_(e) {\n    const 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    const el = this.el();\n    let isFs = document__default[\"default\"][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  handleTechFullscreenChange_(event, data) {\n    if (data) {\n      if (data.nativeIOSFullscreen) {\n        this.addClass('vjs-ios-native-fs');\n        this.tech_.one('webkitendfullscreen', () => {\n          this.removeClass('vjs-ios-native-fs');\n        });\n      }\n      this.isFullscreen(data.isFullscreen);\n    }\n  }\n  handleTechFullscreenError_(event, err) {\n    this.trigger('fullscreenerror', err);\n  }\n\n  /**\n   * @private\n   */\n  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  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  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  handleTechError_() {\n    const 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  handleTechTextData_() {\n    let 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  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  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  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  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: ${method} method not defined for ${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: ${method} unavailable on ${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  play() {\n    return new Promise(resolve => {\n      this.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  play_(callback = silencePromise) {\n    this.playCallbacks_.push(callback);\n    const isSrcReady = Boolean(!this.changingSrc_ && (this.src() || this.currentSrc()));\n    const 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_ = e => {\n        this.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    const val = this.techGet_('play');\n\n    // For native playback, reset the progress bar if we get a play call from a replay.\n    const 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  runPlayTerminatedQueue_() {\n    const 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  runPlayCallbacks_(val) {\n    const 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  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  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  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  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  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  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  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  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  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  buffered() {\n    let 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 TimeRanges of the media that are currently available\n   * for seeking to.\n   *\n   * @see [Seekable Spec]{@link https://html.spec.whatwg.org/multipage/media.html#dom-media-seekable}\n   *\n   * @return { import('./utils/time').TimeRange }\n   *         A mock {@link TimeRanges} object (following HTML spec)\n   */\n  seekable() {\n    let seekable = this.techGet_('seekable');\n    if (!seekable || !seekable.length) {\n      seekable = createTimeRanges$1(0, 0);\n    }\n    return seekable;\n  }\n\n  /**\n   * Returns whether the player is in the \"seeking\" state.\n   *\n   * @return {boolean} True if the player is in the seeking state, false if not.\n   */\n  seeking() {\n    return this.techGet_('seeking');\n  }\n\n  /**\n   * Returns whether the player is in the \"ended\" state.\n   *\n   * @return {boolean} True if the player is in the ended state, false if not.\n   */\n  ended() {\n    return this.techGet_('ended');\n  }\n\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   */\n  networkState() {\n    return this.techGet_('networkState');\n  }\n\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   */\n  readyState() {\n    return this.techGet_('readyState');\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  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  bufferedEnd() {\n    const buffered = this.buffered();\n    const duration = this.duration();\n    let 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  volume(percentAsDecimal) {\n    let 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  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  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  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  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  isFullscreen(isFS) {\n    if (isFS !== undefined) {\n      const 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  requestFullscreen(fullscreenOptions) {\n    if (this.isInPictureInPicture()) {\n      this.exitPictureInPicture();\n    }\n    const self = this;\n    return new Promise((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      const promise = self.requestFullscreenHelper_(fullscreenOptions);\n      if (promise) {\n        promise.then(offHandler, offHandler);\n        promise.then(resolve, reject);\n      }\n    });\n  }\n  requestFullscreenHelper_(fullscreenOptions) {\n    let 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      const 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(() => this.isFullscreen(true), () => this.isFullscreen(false));\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  exitFullscreen() {\n    const self = this;\n    return new Promise((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      const 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  exitFullscreenHelper_() {\n    if (this.fsApi_.requestFullscreen) {\n      const promise = document__default[\"default\"][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(() => this.isFullscreen(false)));\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  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__default[\"default\"].documentElement.style.overflow;\n\n    // Add listener for esc key to exit fullscreen\n    on(document__default[\"default\"], 'keydown', this.boundFullWindowOnEscKey_);\n\n    // Hide any scroll bars\n    document__default[\"default\"].documentElement.style.overflow = 'hidden';\n\n    // Apply fullscreen styles\n    addClass(document__default[\"default\"].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  fullWindowOnEscKey(event) {\n    if (keycode__default[\"default\"].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  exitFullWindow() {\n    this.isFullscreen(false);\n    this.isFullWindow = false;\n    off(document__default[\"default\"], 'keydown', this.boundFullWindowOnEscKey_);\n\n    // Unhide scroll bars.\n    document__default[\"default\"].documentElement.style.overflow = this.docOrigOverflow;\n\n    // Remove fullscreen styles\n    removeClass(document__default[\"default\"].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  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  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  requestPictureInPicture() {\n    if (this.options_.enableDocumentPictureInPicture && window__default[\"default\"].documentPictureInPicture) {\n      const pipContainer = document__default[\"default\"].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__default[\"default\"].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(pipWindow => {\n        copyStyleSheetsToWindow(pipWindow);\n        this.el_.parentNode.insertBefore(pipContainer, this.el_);\n        pipWindow.document.body.appendChild(this.el_);\n        pipWindow.document.body.classList.add('vjs-pip-window');\n        this.player_.isInPictureInPicture(true);\n        this.player_.trigger('enterpictureinpicture');\n\n        // Listen for the PiP closing event to move the video back.\n        pipWindow.addEventListener('pagehide', event => {\n          const pipVideo = event.target.querySelector('.video-js');\n          pipContainer.parentNode.replaceChild(pipVideo, pipContainer);\n          this.player_.isInPictureInPicture(false);\n          this.player_.trigger('leavepictureinpicture');\n        });\n        return pipWindow;\n      });\n    }\n    if ('pictureInPictureEnabled' in document__default[\"default\"] && 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  exitPictureInPicture() {\n    if (window__default[\"default\"].documentPictureInPicture && window__default[\"default\"].documentPictureInPicture.window) {\n      // With documentPictureInPicture, Player#leavepictureinpicture is fired in the pagehide handler\n      window__default[\"default\"].documentPictureInPicture.window.close();\n      return Promise.resolve();\n    }\n    if ('pictureInPictureEnabled' in document__default[\"default\"]) {\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__default[\"default\"].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  handleKeyDown(event) {\n    const {\n      userActions\n    } = this.options_;\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    const excludeElement = el => {\n      const 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      const 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      const 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  handleHotkeys(event) {\n    const hotkeys = this.options_.userActions ? this.options_.userActions.hotkeys : {};\n\n    // set fullscreenKey, muteKey, playPauseKey from `hotkeys`, use defaults if not set\n    const {\n      fullscreenKey = keydownEvent => keycode__default[\"default\"].isEventKey(keydownEvent, 'f'),\n      muteKey = keydownEvent => keycode__default[\"default\"].isEventKey(keydownEvent, 'm'),\n      playPauseKey = keydownEvent => keycode__default[\"default\"].isEventKey(keydownEvent, 'k') || keycode__default[\"default\"].isEventKey(keydownEvent, 'Space')\n    } = hotkeys;\n    if (fullscreenKey.call(this, event)) {\n      event.preventDefault();\n      event.stopPropagation();\n      const FSToggle = Component$1.getComponent('FullscreenToggle');\n      if (document__default[\"default\"][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      const 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      const 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  canPlayType(type) {\n    let can;\n\n    // Loop through each playback technology in the options order\n    for (let i = 0, j = this.options_.techOrder; i < j.length; i++) {\n      const techName = j[i];\n      let 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 \"${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  selectSource(sources) {\n    // Get only the techs specified in `techOrder` that exist and are supported by the\n    // current platform\n    const techs = this.options_.techOrder.map(techName => {\n      return [techName, Tech.getTech(techName)];\n    }).filter(([techName, tech]) => {\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 \"${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    const findFirstPassingTechSourcePair = function (outerArray, innerArray, tester) {\n      let found;\n      outerArray.some(outerChoice => {\n        return innerArray.some(innerChoice => {\n          found = tester(outerChoice, innerChoice);\n          if (found) {\n            return true;\n          }\n        });\n      });\n      return found;\n    };\n    let foundSourceAndTech;\n    const flip = fn => (a, b) => fn(b, a);\n    const finder = ([techName, tech], source) => {\n      if (tech.canPlaySource(source, this.options_[techName.toLowerCase()])) {\n        return {\n          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  handleSrc_(source, isRetry) {\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    const 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], (middlewareSource, mws) => {\n      this.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        this.cache_.sources = sources;\n      }\n      this.updateSourceCaches_(middlewareSource);\n      const err = this.src_(middlewareSource);\n      if (err) {\n        if (sources.length > 1) {\n          return this.handleSrc_(sources.slice(1));\n        }\n        this.changingSrc_ = false;\n\n        // We need to wrap this in a timeout to give folks a chance to add error event handlers\n        this.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        this.triggerReady();\n        return;\n      }\n      setTech(mws, this.tech_);\n    });\n\n    // Try another available source if this one fails before playback.\n    if (sources.length > 1) {\n      const retry = () => {\n        // Remove the error modal\n        this.error(null);\n        this.handleSrc_(sources.slice(1), true);\n      };\n      const stopListeningForErrors = () => {\n        this.off('error', retry);\n      };\n      this.one('error', retry);\n      this.one('playing', stopListeningForErrors);\n      this.resetRetryOnError_ = () => {\n        this.off('error', retry);\n        this.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  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  src_(source) {\n    const 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(() => {\n        this.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  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  reset() {\n    if (this.paused()) {\n      this.doReset_();\n    } else {\n      const playPromise = this.play();\n      silencePromise(playPromise.then(() => this.doReset_()));\n    }\n  }\n  doReset_() {\n    if (this.tech_) {\n      this.tech_.clearTracks('text');\n    }\n    this.removeClass('vjs-playing');\n    this.addClass('vjs-paused');\n    this.resetCache_();\n    this.poster('');\n    this.loadTech_(this.options_.techOrder[0], null);\n    this.techCall_('reset');\n    this.resetControlBarUI_();\n    this.error(null);\n    if (this.titleBar) {\n      this.titleBar.update({\n        title: undefined,\n        description: undefined\n      });\n    }\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  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  resetProgressBar_() {\n    this.currentTime(0);\n    const {\n      currentTimeDisplay,\n      durationDisplay,\n      progressControl,\n      remainingTimeDisplay\n    } = this.controlBar || {};\n    const {\n      seekBar\n    } = progressControl || {};\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  resetPlaybackRate_() {\n    this.playbackRate(this.defaultPlaybackRate());\n    this.handleTechRateChange_();\n  }\n\n  /**\n   * Reset Volume bar\n   */\n  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  currentSources() {\n    const source = this.currentSource();\n    const 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  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  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  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  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  autoplay(value) {\n    // getter usage\n    if (value === undefined) {\n      return this.options_.autoplay || false;\n    }\n    let 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  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  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  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  handleTechPosterChange_() {\n    if ((!this.poster_ || this.options_.techCanOverridePoster) && this.tech_ && this.tech_.poster) {\n      const 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  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  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  error(err) {\n    if (err === undefined) {\n      return this.error_ || null;\n    }\n\n    // allow hooks to modify error object\n    hooks('beforeerror').forEach(hookFunction => {\n      const newErr = hookFunction(this, err);\n      if (!(isObject(newErr) && !Array.isArray(newErr) || typeof newErr === 'string' || typeof newErr === 'number' || newErr === null)) {\n        this.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      const triggerSuppressedError = function () {\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:${this.error_.code} ${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(hookFunction => hookFunction(this, this.error_));\n    return;\n  }\n\n  /**\n   * Report user activity\n   *\n   * @param {Object} event\n   *        Event object\n   */\n  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  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  listenForUserActivity_() {\n    let mouseInProgress;\n    let lastMoveX;\n    let lastMoveY;\n    const handleActivity = bind_(this, this.reportUserActivity);\n    const handleMouseMove = function (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    const handleMouseDown = function () {\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    const handleMouseUpAndMouseLeave = function (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    const 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    let inactivityTimeout;\n\n    /** @this Player */\n    const activityCheck = function () {\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      const 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  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  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  isAudio(bool) {\n    if (bool !== undefined) {\n      this.isAudio_ = !!bool;\n      return;\n    }\n    return !!this.isAudio_;\n  }\n  enableAudioOnlyUI_() {\n    // Update styling immediately to show the control bar so we can get its height\n    this.addClass('vjs-audio-only-mode');\n    const playerChildren = this.children();\n    const controlBar = this.getChild('ControlBar');\n    const 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(child => {\n      if (child === controlBar) {\n        return;\n      }\n      if (child.el_ && !child.hasClass('vjs-hidden')) {\n        child.hide();\n        this.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  disableAudioOnlyUI_() {\n    this.removeClass('vjs-audio-only-mode');\n\n    // Show player components that were previously hidden\n    this.audioOnlyCache_.hiddenChildren.forEach(child => child.show());\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  audioOnlyMode(value) {\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      const 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(() => this.enableAudioOnlyUI_());\n    }\n\n    // Disable Audio Only Mode\n    return Promise.resolve().then(() => this.disableAudioOnlyUI_());\n  }\n  enablePosterModeUI_() {\n    // Hide the video element and show the poster image to enable posterModeUI\n    const tech = this.tech_ && this.tech_;\n    tech.hide();\n    this.addClass('vjs-audio-poster-mode');\n    this.trigger('audiopostermodechange');\n  }\n  disablePosterModeUI_() {\n    // Show the video element and hide the poster image to disable posterModeUI\n    const 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  audioPosterMode(value) {\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        const audioOnlyModePromise = this.audioOnlyMode(false);\n        return audioOnlyModePromise.then(() => {\n          // enable audio poster mode after audio only mode is disabled\n          this.enablePosterModeUI_();\n        });\n      }\n      return Promise.resolve().then(() => {\n        // enable audio poster mode\n        this.enablePosterModeUI_();\n      });\n    }\n    return Promise.resolve().then(() => {\n      // disable audio poster mode\n      this.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  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  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  removeRemoteTextTrack(obj = {}) {\n    let {\n      track\n    } = obj;\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  getVideoPlaybackQuality() {\n    return this.techGet_('getVideoPlaybackQuality');\n  }\n\n  /**\n   * Get video width\n   *\n   * @return {number}\n   *         current video width\n   */\n  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  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  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  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  toJSON() {\n    const options = merge$1(this.options_);\n    const tracks = options.tracks;\n    options.tracks = [];\n    for (let i = 0; i < tracks.length; i++) {\n      let track = tracks[i];\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[i] = 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  createModal(content, options) {\n    options = options || {};\n    options.content = content || '';\n    const modal = new ModalDialog(this, options);\n    this.addChild(modal);\n    modal.on('dispose', () => {\n      this.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  updateCurrentBreakpoint_() {\n    if (!this.responsive()) {\n      return;\n    }\n    const currentBreakpoint = this.currentBreakpoint();\n    const currentWidth = this.currentWidth();\n    for (let i = 0; i < BREAKPOINT_ORDER.length; i++) {\n      const candidateBreakpoint = BREAKPOINT_ORDER[i];\n      const 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  removeCurrentBreakpoint_() {\n    const 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  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  responsive(value) {\n    // Used as a getter.\n    if (value === undefined) {\n      return this.responsive_;\n    }\n    value = Boolean(value);\n    const 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  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  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  loadMedia(media, ready) {\n    if (!media || typeof media !== 'object') {\n      return;\n    }\n    const 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    const {\n      artist,\n      artwork,\n      description,\n      poster,\n      src,\n      textTracks,\n      title\n    } = this.cache_.media;\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(tt => this.addRemoteTextTrack(tt, false));\n    }\n    if (this.titleBar) {\n      this.titleBar.update({\n        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  getMedia() {\n    if (!this.cache_.media) {\n      const poster = this.poster();\n      const src = this.currentSources();\n      const textTracks = Array.prototype.map.call(this.remoteTextTracks(), tt => ({\n        kind: tt.kind,\n        label: tt.label,\n        language: tt.language,\n        src: tt.src\n      }));\n      const media = {\n        src,\n        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  static getTagSettings(tag) {\n    const baseOptions = {\n      sources: [],\n      tracks: []\n    };\n    const tagOptions = getAttributes(tag);\n    const 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      const [err, data] = safeParseTuple__default[\"default\"](dataSetup || '{}');\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      const children = tag.childNodes;\n      for (let i = 0, j = children.length; i < j; i++) {\n        const child = children[i];\n        // Change case needed: http://ejohn.org/blog/nodename-case-sensitivity/\n        const 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  /**\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  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  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(rate => typeof rate === 'number')) {\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\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/**\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/**\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/**\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/**\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 */\n\nALL.names.forEach(function (name) {\n  const 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 = {};\nconst navigator = window__default[\"default\"].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  // Default smooth seeking to false\n  enableSmoothSeeking: false\n};\nTECH_EVENTS_RETRIGGER.forEach(function (event) {\n  Player.prototype[`handleTech${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 */\nconst 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 */\nconst PLUGIN_CACHE_KEY = 'activePlugins_';\n\n/**\n * Stores registered plugins in a private space.\n *\n * @private\n * @type    {Object}\n */\nconst 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 */\nconst pluginExists = name => pluginStorage.hasOwnProperty(name);\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 */\nconst getPlugin = name => pluginExists(name) ? pluginStorage[name] : undefined;\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 */\nconst 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 */\nconst triggerSetupEvent = (player, hash, before) => {\n  const 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 */\nconst createBasicPlugin = function (name, plugin) {\n  const basicPluginWrapper = function () {\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,\n      plugin,\n      instance: null\n    }, true);\n    const instance = plugin.apply(this, arguments);\n    markPluginAsActive(this, name);\n    triggerSetupEvent(this, {\n      name,\n      plugin,\n      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 */\nconst 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 (...args) {\n    triggerSetupEvent(this, {\n      name,\n      plugin: PluginSubClass,\n      instance: null\n    }, true);\n    const instance = new PluginSubClass(...[this, ...args]);\n\n    // The plugin is replaced by a function that returns the current instance.\n    this[name] = () => instance;\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 */\nclass Plugin {\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  constructor(player) {\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  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  getEventHash(hash = {}) {\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  trigger(event, hash = {}) {\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  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  dispose() {\n    const {\n      name,\n      player\n    } = this;\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  static isBasic(plugin) {\n    const 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  static registerPlugin(name, plugin) {\n    if (typeof name !== 'string') {\n      throw new Error(`Illegal plugin name, \"${name}\", must be a string, was ${typeof name}.`);\n    }\n    if (pluginExists(name)) {\n      log$1.warn(`A plugin named \"${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, \"${name}\", cannot share a name with an existing player method!`);\n    }\n    if (typeof plugin !== 'function') {\n      throw new Error(`Illegal plugin for \"${name}\", must be a function, was ${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  static 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  static getPlugins(names = Object.keys(pluginStorage)) {\n    let result;\n    names.forEach(name => {\n      const 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  static getPluginVersion(name) {\n    const plugin = getPlugin(name);\n    return plugin && plugin.VERSION || '';\n  }\n}\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  let warned = false;\n  return function (...args) {\n    if (!warned) {\n      log$1.warn(message);\n    }\n    warned = true;\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(`${oldName} is deprecated and will be removed in ${major}.0; please use ${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 */\nconst normalizeId = id => id.indexOf('#') === 0 ? id.slice(1) : id;\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  let player = videojs.getPlayer(id);\n  if (player) {\n    if (options) {\n      log$1.warn(`Player \"${id}\" is already initialised. Options will not be applied.`);\n    }\n    if (ready) {\n      player.ready(ready);\n    }\n    return player;\n  }\n  const 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  const inShadowDom = 'getRootNode' in el ? el.getRootNode() instanceof window__default[\"default\"].ShadowRoot : false;\n  const 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(hookFunction => {\n    const 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  const PlayerComponent = Component$1.getComponent('Player');\n  player = new PlayerComponent(el, options, ready);\n  hooks('setup').forEach(hookFunction => hookFunction(player));\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__default[\"default\"].VIDEOJS_NO_DYNAMIC_STYLE !== true && isReal()) {\n  let style = $('.vjs-styles-defaults');\n  if (!style) {\n    style = createStyleElement('vjs-styles-defaults');\n    const 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 = () => Player.players;\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 = id => {\n  const players = Player.players;\n  let tag;\n  if (typeof id === 'string') {\n    const nId = normalizeId(id);\n    const player = players[nId];\n    if (player) {\n      return player;\n    }\n    tag = $('#' + nId);\n  } else {\n    tag = id;\n  }\n  if (isEl(tag)) {\n    const {\n      player,\n      playerId\n    } = tag;\n\n    // Element may have a `player` property referring to an already created\n    // player instance. If so, return that.\n    if (player || players[playerId]) {\n      return player || 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 = () =>\n// Disposed players leave a key with a `null` value, so we need to make sure\n// we filter those out.\nObject.keys(Player.players).map(k => Player.players[k]).filter(Boolean);\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 = (name, comp) => {\n  if (Tech.isTech(comp)) {\n    log$1.warn(`The ${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 = (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, {\n    [code]: data\n  });\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__default[\"default\"];\nvideojs.TextTrack = TextTrack;\nvideojs.AudioTrack = AudioTrack;\nvideojs.VideoTrack = VideoTrack;\n['isEl', 'isTextNode', 'createEl', 'hasClass', 'addClass', 'removeClass', 'toggleClass', 'setAttributes', 'getAttributes', 'emptyEl', 'appendContent', 'insertContent'].forEach(k => {\n  videojs[k] = function () {\n    log$1.warn(`videojs.${k}() is deprecated; use videojs.dom.${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 */\nclass QualityLevel {\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   */\n  constructor(representation) {\n    let 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() {\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(enable) {\n        level.enabled_(enable);\n      }\n    });\n    return level;\n  }\n}\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 */\n\nclass QualityLevelList extends videojs.EventTarget {\n  /**\n   * Creates a QualityLevelList.\n   */\n  constructor() {\n    super();\n    let list = this; // 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() {\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() {\n        return list.levels_.length;\n      }\n    });\n    list[Symbol.iterator] = () => list.levels_.values();\n    return 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\n  addQualityLevel(representation) {\n    let qualityLevel = this.getQualityLevelById(representation.id); // Do not add duplicate quality levels\n\n    if (qualityLevel) {\n      return qualityLevel;\n    }\n    const index = this.levels_.length;\n    qualityLevel = new QualityLevel(representation);\n    if (!('' + index in this)) {\n      Object.defineProperty(this, index, {\n        get() {\n          return this.levels_[index];\n        }\n      });\n    }\n    this.levels_.push(qualityLevel);\n    this.trigger({\n      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  removeQualityLevel(qualityLevel) {\n    let removed = null;\n    for (let i = 0, l = this.length; i < l; i++) {\n      if (this[i] === qualityLevel) {\n        removed = this.levels_.splice(i, 1)[0];\n        if (this.selectedIndex_ === i) {\n          this.selectedIndex_ = -1;\n        } else if (this.selectedIndex_ > i) {\n          this.selectedIndex_--;\n        }\n        break;\n      }\n    }\n    if (removed) {\n      this.trigger({\n        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  getQualityLevelById(id) {\n    for (let i = 0, l = this.length; i < l; i++) {\n      const level = this[i];\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  dispose() {\n    this.selectedIndex_ = -1;\n    this.levels_.length = 0;\n  }\n}\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 */\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 (const event in QualityLevelList.prototype.allowedEvents_) {\n  QualityLevelList.prototype['on' + event] = 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\nconst initPlugin$1 = function (player, options) {\n  const originalPluginFn = player.qualityLevels;\n  const qualityLevelList = new QualityLevelList();\n  const disposeHandler = function () {\n    qualityLevelList.dispose();\n    player.qualityLevels = originalPluginFn;\n    player.off('dispose', disposeHandler);\n  };\n  player.on('dispose', disposeHandler);\n  player.qualityLevels = () => qualityLevelList;\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\nconst qualityLevels = function (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.10.0 @license Apache-2.0 */\n\n/**\n * @file resolve-url.js - Handling how URLs are resolved and manipulated\n */\nconst resolveUrl = _resolveUrl__default[\"default\"];\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\nconst 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};\nconst logger = source => {\n  if (videojs.log.debug) {\n    return videojs.log.debug.bind(videojs, 'VHS:', `${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(...args) {\n  const context = videojs.obj || videojs;\n  const fn = context.merge || context.mergeOptions;\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(...args) {\n  const context = videojs.time || videojs;\n  const fn = context.createTimeRanges || context.createTimeRanges;\n  return fn.apply(context, args);\n}\n\n/**\n * ranges\n *\n * Utilities for working with TimeRanges.\n *\n */\n\nconst 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\nconst SAFE_TIME_DELTA = TIME_FUDGE_FACTOR * 3;\nconst filterRanges = function (timeRanges, predicate) {\n  const results = [];\n  let 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\nconst findRange = function (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\nconst findNextRange = function (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\nconst findGaps = function (buffered) {\n  if (buffered.length < 2) {\n    return createTimeRanges();\n  }\n  const ranges = [];\n  for (let i = 1; i < buffered.length; i++) {\n    const start = buffered.end(i - 1);\n    const end = buffered.start(i);\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\nconst bufferIntersection = function (bufferA, bufferB) {\n  let start = null;\n  let end = null;\n  let arity = 0;\n  const extents = [];\n  const 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  let 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\nconst printableRange = range => {\n  const strArr = [];\n  if (!range || !range.length) {\n    return '';\n  }\n  for (let i = 0; i < range.length; i++) {\n    strArr.push(range.start(i) + ' => ' + range.end(i));\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\nconst timeUntilRebuffer = function (buffered, currentTime, playbackRate = 1) {\n  const 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\nconst timeRangesToArray = timeRanges => {\n  const timeRangesList = [];\n  for (let i = 0; i < timeRanges.length; i++) {\n    timeRangesList.push({\n      start: timeRanges.start(i),\n      end: timeRanges.end(i)\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\nconst isRangeDifferent = function (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 (let i = 0; i < a.length; i++) {\n    if (a.start(i) !== b.start(i) || a.end(i) !== b.end(i)) {\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};\nconst lastBufferedEnd = function (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\nconst timeAheadOf = function (range, startTime) {\n  let time = 0;\n  if (!range || !range.length) {\n    return time;\n  }\n  for (let i = 0; i < range.length; i++) {\n    const start = range.start(i);\n    const end = range.end(i); // 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\nconst 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  let 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\nconst getPartsAndSegments = playlist => (playlist.segments || []).reduce((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,\n        segment\n      });\n    });\n  } else {\n    acc.push({\n      duration: segment.duration,\n      segmentIndex: si,\n      partIndex: null,\n      segment,\n      part: null\n    });\n  }\n  return acc;\n}, []);\nconst getLastParts = media => {\n  const lastSegment = media.segments && media.segments.length && media.segments[media.segments.length - 1];\n  return lastSegment && lastSegment.parts || [];\n};\nconst getKnownPartCount = ({\n  preloadSegment\n}) => {\n  if (!preloadSegment) {\n    return;\n  }\n  const {\n    parts,\n    preloadHints\n  } = preloadSegment;\n  let partCount = (preloadHints || []).reduce((count, hint) => count + (hint.type === 'PART' ? 1 : 0), 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\nconst 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  const 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\nconst backwardDuration = function (playlist, endSequence) {\n  let result = 0;\n  let i = endSequence - playlist.mediaSequence; // if a start time is available for segment immediately following\n  // the interval, use it\n\n  let 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,\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\nconst forwardDuration = function (playlist, endSequence) {\n  let result = 0;\n  let segment;\n  let 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\nconst intervalDuration = function (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  const 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  const 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\nconst duration = function (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__default[\"default\"].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\nconst sumDurations = function ({\n  defaultDuration,\n  durationList,\n  startIndex,\n  endIndex\n}) {\n  let durations = 0;\n  if (startIndex > endIndex) {\n    [startIndex, endIndex] = [endIndex, startIndex];\n  }\n  if (startIndex < 0) {\n    for (let i = startIndex; i < Math.min(0, endIndex); i++) {\n      durations += defaultDuration;\n    }\n    startIndex = 0;\n  }\n  for (let i = startIndex; i < endIndex; i++) {\n    durations += durationList[i].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\nconst playlistEnd = function (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  let 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\nconst seekable = function (playlist, expired, liveEdgePadding) {\n  const useSafeLiveEnd = true;\n  const seekableStart = expired || 0;\n  let 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\nconst getMediaInfoForTime = function ({\n  playlist,\n  currentTime,\n  startingSegmentIndex,\n  startingPartIndex,\n  startTime,\n  exactManifestTimings\n}) {\n  let time = currentTime - startTime;\n  const partsAndSegments = getPartsAndSegments(playlist);\n  let startIndex = 0;\n  for (let i = 0; i < partsAndSegments.length; i++) {\n    const partAndSegment = partsAndSegments[i];\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 = i;\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 (let i = startIndex - 1; i >= 0; i--) {\n        const partAndSegment = partsAndSegments[i];\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,\n            endIndex: i\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 (let i = startIndex; i < 0; i++) {\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 (let i = startIndex; i < partsAndSegments.length; i++) {\n    const partAndSegment = partsAndSegments[i];\n    time -= partAndSegment.duration;\n    const canUseFudgeFactor = partAndSegment.duration > TIME_FUDGE_FACTOR;\n    const isExactlyAtTheEnd = time === 0;\n    const isExtremelyCloseToTheEnd = canUseFudgeFactor && time + TIME_FUDGE_FACTOR >= 0;\n    if (isExactlyAtTheEnd || isExtremelyCloseToTheEnd) {\n      // 1) We are exactly at the end of the current segment.\n      // 2) We are extremely close to the end of the current segment (The difference is less than  1 / 30).\n      //    We may encounter this situation when\n      //    we don't have exact match between segment duration info in the manifest and the actual duration of the segment\n      //    For example:\n      //    We appended 3 segments 10 seconds each, meaning we should have 30 sec buffered,\n      //    but we the actual buffered is 29.99999\n      //\n      // In both cases:\n      // if we passed current time -> it means that we already played current segment\n      // if we passed buffered.end -> it means that this segment is already loaded and buffered\n      // we should select the next segment if we have one:\n      if (i !== partsAndSegments.length - 1) {\n        continue;\n      }\n    }\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,\n        endIndex: i\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\nconst isExcluded = function (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\nconst isIncompatible = function (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\nconst isEnabled = function (playlist) {\n  const 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\nconst isDisabled = function (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\nconst isAes = function (media) {\n  for (let i = 0; i < media.segments.length; i++) {\n    if (media.segments[i].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\nconst hasAttribute = function (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\nconst estimateSegmentRequestTime = function (segmentDuration, bandwidth, playlist, bytesReceived = 0) {\n  if (!hasAttribute('BANDWIDTH', playlist)) {\n    return NaN;\n  }\n  const 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\nconst isLowestEnabledRendition = (main, media) => {\n  if (main.playlists.length === 1) {\n    return true;\n  }\n  const currentBandwidth = media.attributes.BANDWIDTH || Number.MAX_VALUE;\n  return main.playlists.filter(playlist => {\n    if (!isEnabled(playlist)) {\n      return false;\n    }\n    return (playlist.attributes.BANDWIDTH || 0) < currentBandwidth;\n  }).length === 0;\n};\nconst 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};\nconst someAudioVariant = function (main, callback) {\n  const AUDIO = main && main.mediaGroups && main.mediaGroups.AUDIO || {};\n  let found = false;\n  for (const groupName in AUDIO) {\n    for (const 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};\nconst 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    const found = someAudioVariant(main, variant => variant.playlists && variant.playlists.length || variant.uri);\n    return found;\n  } // if every playlist has only an audio codec it is audio only\n\n  for (let i = 0; i < main.playlists.length; i++) {\n    const playlist = main.playlists[i];\n    const CODECS = playlist.attributes && playlist.attributes.CODECS; // all codecs are audio, this is an audio playlist.\n\n    if (CODECS && CODECS.split(',').every(c => codecs_js.isAudioCodec(c))) {\n      continue;\n    } // playlist is in an audio group it is audio only\n\n    const found = someAudioVariant(main, variant => playlistMatch(playlist, variant));\n    if (found) {\n      continue;\n    } // if we make it here this playlist isn't audio and we\n    // are not audio only\n\n    return false;\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,\n  duration,\n  seekable,\n  getMediaInfoForTime,\n  isEnabled,\n  isDisabled,\n  isExcluded,\n  isIncompatible,\n  playlistEnd,\n  isAes,\n  hasAttribute,\n  estimateSegmentRequestTime,\n  isLowestEnabledRendition,\n  isAudioOnly,\n  playlistMatch,\n  segmentDurationWithParts\n};\nconst {\n  log\n} = videojs;\nconst createPlaylistID = (index, uri) => {\n  return `${index}-${uri}`;\n}; // default function for creating a group id\n\nconst groupID = (type, group, label) => {\n  return `placeholder-uri-${type}-${group}-${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\nconst parseManifest = ({\n  onwarn,\n  oninfo,\n  manifestString,\n  customTagParsers = [],\n  customTagMappers = [],\n  llhls\n}) => {\n  const parser = new m3u8Parser.Parser();\n  if (onwarn) {\n    parser.on('warn', onwarn);\n  }\n  if (oninfo) {\n    parser.on('info', oninfo);\n  }\n  customTagParsers.forEach(customParser => parser.addParser(customParser));\n  customTagMappers.forEach(mapper => parser.addTagMapper(mapper));\n  parser.push(manifestString);\n  parser.end();\n  const 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    let targetDuration = 10;\n    if (manifest.segments && manifest.segments.length) {\n      targetDuration = manifest.segments.reduce((acc, s) => Math.max(acc, s.duration), 0);\n    }\n    if (onwarn) {\n      onwarn({\n        message: `manifest has no targetDuration defaulting to ${targetDuration}`\n      });\n    }\n    manifest.targetDuration = targetDuration;\n  }\n  const parts = getLastParts(manifest);\n  if (parts.length && !manifest.partTargetDuration) {\n    const partTargetDuration = parts.reduce((acc, p) => Math.max(acc, p.duration), 0);\n    if (onwarn) {\n      onwarn({\n        message: `manifest has no partTargetDuration defaulting to ${partTargetDuration}`\n      });\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\nconst forEachMediaGroup = (main, callback) => {\n  if (!main.mediaGroups) {\n    return;\n  }\n  ['AUDIO', 'SUBTITLES'].forEach(mediaType => {\n    if (!main.mediaGroups[mediaType]) {\n      return;\n    }\n    for (const groupKey in main.mediaGroups[mediaType]) {\n      for (const labelKey in main.mediaGroups[mediaType][groupKey]) {\n        const 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\nconst setupMediaPlaylist = ({\n  playlist,\n  uri,\n  id\n}) => {\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\nconst setupMediaPlaylists = main => {\n  let i = main.playlists.length;\n  while (i--) {\n    const playlist = main.playlists[i];\n    setupMediaPlaylist({\n      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\nconst resolveMediaGroupUris = main => {\n  forEachMediaGroup(main, 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\nconst mainForMedia = (media, uri) => {\n  const id = createPlaylistID(0, uri);\n  const main = {\n    mediaGroups: {\n      'AUDIO': {},\n      'VIDEO': {},\n      'CLOSED-CAPTIONS': {},\n      'SUBTITLES': {}\n    },\n    uri: window__default[\"default\"].location.href,\n    resolvedUri: window__default[\"default\"].location.href,\n    playlists: [{\n      uri,\n      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\nconst addPropertiesToMain = (main, uri, createGroupID = groupID) => {\n  main.uri = uri;\n  for (let i = 0; i < main.playlists.length; i++) {\n    if (!main.playlists[i].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      const phonyUri = `placeholder-uri-${i}`;\n      main.playlists[i].uri = phonyUri;\n    }\n  }\n  const audioOnlyMain = isAudioOnly(main);\n  forEachMediaGroup(main, (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 (let i = 0; i < main.playlists.length; i++) {\n          const p = main.playlists[i];\n          if (p.attributes && p.attributes.AUDIO && p.attributes.AUDIO === groupKey) {\n            return;\n          }\n        }\n      }\n      properties.playlists = [_extends__default[\"default\"]({}, properties)];\n    }\n    properties.playlists.forEach(function (p, i) {\n      const groupId = createGroupID(mediaType, groupKey, labelKey, p);\n      const 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};\nclass DateRangesStorage {\n  constructor() {\n    this.offset_ = null;\n    this.pendingDateRanges_ = new Map();\n    this.processedDateRanges_ = new Map();\n  }\n  setOffset(segments = []) {\n    // already set\n    if (this.offset_ !== null) {\n      return;\n    } // no segment to process\n\n    if (!segments.length) {\n      return;\n    }\n    const [firstSegment] = segments; // 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  setPendingDateRanges(dateRanges = []) {\n    if (!dateRanges.length) {\n      return;\n    }\n    const [dateRange] = dateRanges;\n    const startTime = dateRange.startDate.getTime();\n    this.trimProcessedDateRanges_(startTime);\n    this.pendingDateRanges_ = dateRanges.reduce((map, pendingDateRange) => {\n      map.set(pendingDateRange.id, pendingDateRange);\n      return map;\n    }, new Map());\n  }\n  processDateRange(dateRange) {\n    this.pendingDateRanges_.delete(dateRange.id);\n    this.processedDateRanges_.set(dateRange.id, dateRange);\n  }\n  getDateRangesToProcess() {\n    if (this.offset_ === null) {\n      return [];\n    }\n    const dateRangeClasses = {};\n    const dateRangesToProcess = [];\n    this.pendingDateRanges_.forEach((dateRange, id) => {\n      if (this.processedDateRanges_.has(id)) {\n        return;\n      }\n      dateRange.startTime = dateRange.startDate.getTime() / 1000 - this.offset_;\n      dateRange.processDateRange = () => this.processDateRange(dateRange);\n      dateRangesToProcess.push(dateRange);\n      if (!dateRange.class) {\n        return;\n      }\n      if (dateRangeClasses[dateRange.class]) {\n        const 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 (const dateRange of dateRangesToProcess) {\n      const 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  trimProcessedDateRanges_(startTime) {\n    const copy = new Map(this.processedDateRanges_);\n    copy.forEach((dateRange, id) => {\n      if (dateRange.startDate.getTime() < startTime) {\n        this.processedDateRanges_.delete(id);\n      }\n    });\n  }\n}\nconst {\n  EventTarget: EventTarget$1\n} = videojs;\nconst addLLHLSQueryDirectives = (uri, media) => {\n  if (media.endList || !media.serverControl) {\n    return uri;\n  }\n  const parameters = {};\n  if (media.serverControl.canBlockReload) {\n    const {\n      preloadSegment\n    } = media; // next msn is a zero based value, length is not.\n\n    let 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      const parts = preloadSegment.parts || []; // _HLS_part is a zero based index\n\n      const 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    const parsedUri = new window__default[\"default\"].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\nconst updateSegment = (a, b) => {\n  if (!a) {\n    return b;\n  }\n  const 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 (let i = 0; i < b.parts.length; i++) {\n      if (a.parts && a.parts[i]) {\n        result.parts[i] = merge(a.parts[i], b.parts[i]);\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\nconst updateSegments = (original, update, offset) => {\n  const oldSegments = original.slice();\n  const newSegments = update.slice();\n  offset = offset || 0;\n  const result = [];\n  let currentMap;\n  for (let newIndex = 0; newIndex < newSegments.length; newIndex++) {\n    const oldSegment = oldSegments[newIndex + offset];\n    const 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};\nconst 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(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(p => {\n      if (p.resolvedUri) {\n        return;\n      }\n      p.resolvedUri = resolveUrl(baseUri, p.uri);\n    });\n  }\n};\nconst getAllSegments = function (media) {\n  const segments = media.segments || [];\n  const 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 (let i = 0; i < preloadSegment.preloadHints.length; i++) {\n        if (preloadSegment.preloadHints[i].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\nconst isPlaylistUnchanged = (a, b) => 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  * 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\nconst updateMain$1 = (main, newMedia, unchangedCheck = isPlaylistUnchanged) => {\n  const result = merge(main, {});\n  const 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  const 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 (let i = 0; i < newMedia.skip.skippedSegments; i++) {\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(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 (let i = 0; i < result.playlists.length; i++) {\n    if (result.playlists[i].id === newMedia.id) {\n      result.playlists[i] = 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, (properties, mediaType, groupKey, labelKey) => {\n    if (!properties.playlists) {\n      return;\n    }\n    for (let i = 0; i < properties.playlists.length; i++) {\n      if (newMedia.id === properties.playlists[i].id) {\n        properties.playlists[i] = 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\nconst refreshDelay = (media, update) => {\n  const segments = media.segments || [];\n  const lastSegment = segments[segments.length - 1];\n  const lastPart = lastSegment && lastSegment.parts && lastSegment.parts[lastSegment.parts.length - 1];\n  const 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 */\n\nclass PlaylistLoader extends EventTarget$1 {\n  constructor(src, vhs, options = {}) {\n    super();\n    if (!src) {\n      throw new Error('A non-empty playlist URL or object is required');\n    }\n    this.logger_ = logger('PlaylistLoader');\n    const {\n      withCredentials = false\n    } = options;\n    this.src = src;\n    this.vhs_ = vhs;\n    this.withCredentials = withCredentials;\n    this.addDateRangesToTextTrack_ = options.addDateRangesToTextTrack;\n    const vhsOptions = vhs.options_;\n    this.customTagParsers = vhsOptions && vhsOptions.customTagParsers || [];\n    this.customTagMappers = vhsOptions && vhsOptions.customTagMappers || [];\n    this.llhls = vhsOptions && vhsOptions.llhls;\n    this.dateRangesStorage_ = new DateRangesStorage(); // initialize the loader state\n\n    this.state = 'HAVE_NOTHING'; // live playlist staleness timeout\n\n    this.handleMediaupdatetimeout_ = this.handleMediaupdatetimeout_.bind(this);\n    this.on('mediaupdatetimeout', this.handleMediaupdatetimeout_);\n    this.on('loadedplaylist', this.handleLoadedPlaylist_.bind(this));\n  }\n  handleLoadedPlaylist_() {\n    const mediaPlaylist = this.media();\n    if (!mediaPlaylist) {\n      return;\n    }\n    this.dateRangesStorage_.setOffset(mediaPlaylist.segments);\n    this.dateRangesStorage_.setPendingDateRanges(mediaPlaylist.dateRanges);\n    const availableDateRanges = this.dateRangesStorage_.getDateRangesToProcess();\n    if (!availableDateRanges.length || !this.addDateRangesToTextTrack_) {\n      return;\n    }\n    this.addDateRangesToTextTrack_(availableDateRanges);\n  }\n  handleMediaupdatetimeout_() {\n    if (this.state !== 'HAVE_METADATA') {\n      // only refresh the media playlist if no other activity is going on\n      return;\n    }\n    const media = this.media();\n    let 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,\n      withCredentials: this.withCredentials\n    }, (error, req) => {\n      // disposed\n      if (!this.request) {\n        return;\n      }\n      if (error) {\n        return this.playlistRequestError(this.request, this.media(), 'HAVE_METADATA');\n      }\n      this.haveMetadata({\n        playlistString: this.request.responseText,\n        url: this.media().uri,\n        id: this.media().id\n      });\n    });\n  }\n  playlistRequestError(xhr, playlist, startingState) {\n    const {\n      uri,\n      id\n    } = playlist; // 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: ${uri}.`,\n      responseText: xhr.responseText,\n      code: xhr.status >= 500 ? 4 : 2\n    };\n    this.trigger('error');\n  }\n  parseManifest_({\n    url,\n    manifestString\n  }) {\n    return parseManifest({\n      onwarn: ({\n        message\n      }) => this.logger_(`m3u8-parser warn for ${url}: ${message}`),\n      oninfo: ({\n        message\n      }) => this.logger_(`m3u8-parser info for ${url}: ${message}`),\n      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  haveMetadata({\n    playlistString,\n    playlistObject,\n    url,\n    id\n  }) {\n    // any in-flight request is now finished\n    this.request = null;\n    this.state = 'HAVE_METADATA';\n    const playlist = playlistObject || this.parseManifest_({\n      url,\n      manifestString: playlistString\n    });\n    playlist.lastRequest = Date.now();\n    setupMediaPlaylist({\n      playlist,\n      uri: url,\n      id\n    }); // merge this playlist into the main manifest\n\n    const 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  dispose() {\n    this.trigger('dispose');\n    this.stopRequest();\n    window__default[\"default\"].clearTimeout(this.mediaUpdateTimeout);\n    window__default[\"default\"].clearTimeout(this.finalRenditionTimeout);\n    this.dateRangesStorage_ = new DateRangesStorage();\n    this.off();\n  }\n  stopRequest() {\n    if (this.request) {\n      const 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  media(playlist, shouldDelay) {\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__default[\"default\"].clearTimeout(this.finalRenditionTimeout);\n    if (shouldDelay) {\n      const delay = (playlist.partTargetDuration || playlist.targetDuration) / 2 * 1000 || 5 * 1000;\n      this.finalRenditionTimeout = window__default[\"default\"].setTimeout(this.media.bind(this, playlist, false), delay);\n      return;\n    }\n    const startingState = this.state;\n    const mediaChange = !this.media_ || playlist.id !== this.media_.id;\n    const 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    }, (error, req) => {\n      // disposed\n      if (!this.request) {\n        return;\n      }\n      playlist.lastRequest = Date.now();\n      playlist.resolvedUri = resolveManifestRedirect(playlist.resolvedUri, req);\n      if (error) {\n        return this.playlistRequestError(this.request, playlist, startingState);\n      }\n      this.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        this.trigger('loadedmetadata');\n      } else {\n        this.trigger('mediachange');\n      }\n    });\n  }\n  /**\n   * pause loading of the playlist\n   */\n\n  pause() {\n    if (this.mediaUpdateTimeout) {\n      window__default[\"default\"].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  load(shouldDelay) {\n    if (this.mediaUpdateTimeout) {\n      window__default[\"default\"].clearTimeout(this.mediaUpdateTimeout);\n      this.mediaUpdateTimeout = null;\n    }\n    const media = this.media();\n    if (shouldDelay) {\n      const delay = media ? (media.partTargetDuration || media.targetDuration) / 2 * 1000 : 5 * 1000;\n      this.mediaUpdateTimeout = window__default[\"default\"].setTimeout(() => {\n        this.mediaUpdateTimeout = null;\n        this.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  updateMediaUpdateTimeout_(delay) {\n    if (this.mediaUpdateTimeout) {\n      window__default[\"default\"].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__default[\"default\"].setTimeout(() => {\n      this.mediaUpdateTimeout = null;\n      this.trigger('mediaupdatetimeout');\n      this.updateMediaUpdateTimeout_(delay);\n    }, delay);\n  }\n  /**\n   * start loading of the playlist\n   */\n\n  start() {\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__default[\"default\"].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(() => {\n        this.setupInitialPlaylist(this.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    }, (error, req) => {\n      // disposed\n      if (!this.request) {\n        return;\n      } // clear the loader's request reference\n\n      this.request = null;\n      if (error) {\n        this.error = {\n          status: req.status,\n          message: `HLS playlist request error at URL: ${this.src}.`,\n          responseText: req.responseText,\n          // MEDIA_ERR_NETWORK\n          code: 2\n        };\n        if (this.state === 'HAVE_NOTHING') {\n          this.started = false;\n        }\n        return this.trigger('error');\n      }\n      this.src = resolveManifestRedirect(this.src, req);\n      const manifest = this.parseManifest_({\n        manifestString: req.responseText,\n        url: this.src\n      });\n      this.setupInitialPlaylist(manifest);\n    });\n  }\n  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  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(playlist => {\n        playlist.segments = getAllSegments(playlist);\n        playlist.segments.forEach(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    const uri = this.srcUri() || window__default[\"default\"].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   * Updates or deletes a preexisting pathway clone.\n   * Ensures that all playlists related to the old pathway clone are\n   * either updated or deleted.\n   *\n   * @param {Object} clone On update, the pathway clone object for the newly updated pathway clone.\n   *        On delete, the old pathway clone object to be deleted.\n   * @param {boolean} isUpdate True if the pathway is to be updated,\n   *        false if it is meant to be deleted.\n   */\n\n  updateOrDeleteClone(clone, isUpdate) {\n    const main = this.main;\n    const pathway = clone.ID;\n    let i = main.playlists.length; // Iterate backwards through the playlist so we can remove playlists if necessary.\n\n    while (i--) {\n      const p = main.playlists[i];\n      if (p.attributes['PATHWAY-ID'] === pathway) {\n        const oldPlaylistUri = p.resolvedUri;\n        const oldPlaylistId = p.id; // update the indexed playlist and add new playlists by ID and URI\n\n        if (isUpdate) {\n          const newPlaylistUri = this.createCloneURI_(p.resolvedUri, clone);\n          const newPlaylistId = createPlaylistID(pathway, newPlaylistUri);\n          const attributes = this.createCloneAttributes_(pathway, p.attributes);\n          const updatedPlaylist = this.createClonePlaylist_(p, newPlaylistId, clone, attributes);\n          main.playlists[i] = updatedPlaylist;\n          main.playlists[newPlaylistId] = updatedPlaylist;\n          main.playlists[newPlaylistUri] = updatedPlaylist;\n        } else {\n          // Remove the indexed playlist.\n          main.playlists.splice(i, 1);\n        } // Remove playlists by the old ID and URI.\n\n        delete main.playlists[oldPlaylistId];\n        delete main.playlists[oldPlaylistUri];\n      }\n    }\n    this.updateOrDeleteCloneMedia(clone, isUpdate);\n  }\n  /**\n   * Updates or deletes media data based on the pathway clone object.\n   * Due to the complexity of the media groups and playlists, in all cases\n   * we remove all of the old media groups and playlists.\n   * On updates, we then create new media groups and playlists based on the\n   * new pathway clone object.\n   *\n   * @param {Object} clone The pathway clone object for the newly updated pathway clone.\n   * @param {boolean} isUpdate True if the pathway is to be updated,\n   *        false if it is meant to be deleted.\n   */\n\n  updateOrDeleteCloneMedia(clone, isUpdate) {\n    const main = this.main;\n    const id = clone.ID;\n    ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(mediaType => {\n      if (!main.mediaGroups[mediaType] || !main.mediaGroups[mediaType][id]) {\n        return;\n      }\n      for (const groupKey in main.mediaGroups[mediaType]) {\n        // Remove all media playlists for the media group for this pathway clone.\n        if (groupKey === id) {\n          for (const labelKey in main.mediaGroups[mediaType][groupKey]) {\n            const oldMedia = main.mediaGroups[mediaType][groupKey][labelKey];\n            oldMedia.playlists.forEach((p, i) => {\n              const oldMediaPlaylist = main.playlists[p.id];\n              const oldPlaylistId = oldMediaPlaylist.id;\n              const oldPlaylistUri = oldMediaPlaylist.resolvedUri;\n              delete main.playlists[oldPlaylistId];\n              delete main.playlists[oldPlaylistUri];\n            });\n          } // Delete the old media group.\n\n          delete main.mediaGroups[mediaType][groupKey];\n        }\n      }\n    }); // Create the new media groups and playlists if there is an update.\n\n    if (isUpdate) {\n      this.createClonedMediaGroups_(clone);\n    }\n  }\n  /**\n   * Given a pathway clone object, clones all necessary playlists.\n   *\n   * @param {Object} clone The pathway clone object.\n   * @param {Object} basePlaylist The original playlist to clone from.\n   */\n\n  addClonePathway(clone, basePlaylist = {}) {\n    const main = this.main;\n    const index = main.playlists.length;\n    const uri = this.createCloneURI_(basePlaylist.resolvedUri, clone);\n    const playlistId = createPlaylistID(clone.ID, uri);\n    const attributes = this.createCloneAttributes_(clone.ID, basePlaylist.attributes);\n    const playlist = this.createClonePlaylist_(basePlaylist, playlistId, clone, attributes);\n    main.playlists[index] = playlist; // add playlist by ID and URI\n\n    main.playlists[playlistId] = playlist;\n    main.playlists[uri] = playlist;\n    this.createClonedMediaGroups_(clone);\n  }\n  /**\n   * Given a pathway clone object we create clones of all media.\n   * In this function, all necessary information and updated playlists\n   * are added to the `mediaGroup` object.\n   * Playlists are also added to the `playlists` array so the media groups\n   * will be properly linked.\n   *\n   * @param {Object} clone The pathway clone object.\n   */\n\n  createClonedMediaGroups_(clone) {\n    const id = clone.ID;\n    const baseID = clone['BASE-ID'];\n    const main = this.main;\n    ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(mediaType => {\n      // If the media type doesn't exist, or there is already a clone, skip\n      // to the next media type.\n      if (!main.mediaGroups[mediaType] || main.mediaGroups[mediaType][id]) {\n        return;\n      }\n      for (const groupKey in main.mediaGroups[mediaType]) {\n        if (groupKey === baseID) {\n          // Create the group.\n          main.mediaGroups[mediaType][id] = {};\n        } else {\n          // There is no need to iterate over label keys in this case.\n          continue;\n        }\n        for (const labelKey in main.mediaGroups[mediaType][groupKey]) {\n          const oldMedia = main.mediaGroups[mediaType][groupKey][labelKey];\n          main.mediaGroups[mediaType][id][labelKey] = _extends__default[\"default\"]({}, oldMedia);\n          const newMedia = main.mediaGroups[mediaType][id][labelKey]; // update URIs on the media\n\n          const newUri = this.createCloneURI_(oldMedia.resolvedUri, clone);\n          newMedia.resolvedUri = newUri;\n          newMedia.uri = newUri; // Reset playlists in the new media group.\n\n          newMedia.playlists = []; // Create new playlists in the newly cloned media group.\n\n          oldMedia.playlists.forEach((p, i) => {\n            const oldMediaPlaylist = main.playlists[p.id];\n            const group = groupID(mediaType, id, labelKey);\n            const newPlaylistID = createPlaylistID(id, group); // Check to see if it already exists\n\n            if (oldMediaPlaylist && !main.playlists[newPlaylistID]) {\n              const newMediaPlaylist = this.createClonePlaylist_(oldMediaPlaylist, newPlaylistID, clone);\n              const newPlaylistUri = newMediaPlaylist.resolvedUri;\n              main.playlists[newPlaylistID] = newMediaPlaylist;\n              main.playlists[newPlaylistUri] = newMediaPlaylist;\n            }\n            newMedia.playlists[i] = this.createClonePlaylist_(p, newPlaylistID, clone);\n          });\n        }\n      }\n    });\n  }\n  /**\n   * Using the original playlist to be cloned, and the pathway clone object\n   * information, we create a new playlist.\n   *\n   * @param {Object} basePlaylist  The original playlist to be cloned from.\n   * @param {string} id The desired id of the newly cloned playlist.\n   * @param {Object} clone The pathway clone object.\n   * @param {Object} attributes An optional object to populate the `attributes` property in the playlist.\n   *\n   * @return {Object} The combined cloned playlist.\n   */\n\n  createClonePlaylist_(basePlaylist, id, clone, attributes) {\n    const uri = this.createCloneURI_(basePlaylist.resolvedUri, clone);\n    const newProps = {\n      resolvedUri: uri,\n      uri,\n      id\n    }; // Remove all segments from previous playlist in the clone.\n\n    if (basePlaylist.segments) {\n      newProps.segments = [];\n    }\n    if (attributes) {\n      newProps.attributes = attributes;\n    }\n    return merge(basePlaylist, newProps);\n  }\n  /**\n   * Generates an updated URI for a cloned pathway based on the original\n   * pathway's URI and the paramaters from the pathway clone object in the\n   * content steering server response.\n   *\n   * @param {string} baseUri URI to be updated in the cloned pathway.\n   * @param {Object} clone The pathway clone object.\n   *\n   * @return {string} The updated URI for the cloned pathway.\n   */\n\n  createCloneURI_(baseURI, clone) {\n    const uri = new URL(baseURI);\n    uri.hostname = clone['URI-REPLACEMENT'].HOST;\n    const params = clone['URI-REPLACEMENT'].PARAMS; // Add params to the cloned URL.\n\n    for (const key of Object.keys(params)) {\n      uri.searchParams.set(key, params[key]);\n    }\n    return uri.href;\n  }\n  /**\n   * Helper function to create the attributes needed for the new clone.\n   * This mainly adds the necessary media attributes.\n   *\n   * @param {string} id The pathway clone object ID.\n   * @param {Object} oldAttributes The old attributes to compare to.\n   * @return {Object} The new attributes to add to the playlist.\n   */\n\n  createCloneAttributes_(id, oldAttributes) {\n    const attributes = {\n      ['PATHWAY-ID']: id\n    };\n    ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(mediaType => {\n      if (oldAttributes[mediaType]) {\n        attributes[mediaType] = id;\n      }\n    });\n    return attributes;\n  }\n  /**\n   * Returns the key ID set from a playlist\n   *\n   * @param {playlist} playlist to fetch the key ID set from.\n   * @return a Set of 32 digit hex strings that represent the unique keyIds for that playlist.\n   */\n\n  getKeyIdSet(playlist) {\n    if (playlist.contentProtection) {\n      const keyIds = new Set();\n      for (const keysystem in playlist.contentProtection) {\n        const keyId = playlist.contentProtection[keysystem].attributes.keyId;\n        if (keyId) {\n          keyIds.add(keyId.toLowerCase());\n        }\n      }\n      return keyIds;\n    }\n  }\n}\n\n/**\n * @file xhr.js\n */\nconst {\n  xhr: videojsXHR\n} = videojs;\nconst callbackWrapper = function (request, error, response, callback) {\n  const 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\nconst callAllRequestHooks = (requestSet, options) => {\n  if (!requestSet || !requestSet.size) {\n    return;\n  }\n  let newOptions = options;\n  requestSet.forEach(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\nconst callAllResponseHooks = (responseSet, request, error, response) => {\n  if (!responseSet || !responseSet.size) {\n    return;\n  }\n  responseSet.forEach(responseCallback => {\n    responseCallback(request, error, response);\n  });\n};\nconst xhrFactory = function () {\n  const 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    const 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    const _requestCallbackSet = XhrFunction._requestCallbackSet || videojs.Vhs.xhr._requestCallbackSet || new Set();\n    const _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    const xhrMethod = videojs.Vhs.xhr.original === true ? videojsXHR : videojs.Vhs.xhr; // call all registered onRequest hooks, assign new options.\n\n    const 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    const 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    const 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\nconst byterangeStr = function (byterange) {\n  // `byterangeEnd` is one less than `offset + length` because the HTTP range\n  // header uses inclusive ranges\n  let byterangeEnd;\n  const byterangeStart = byterange.offset;\n  if (typeof byterange.offset === 'bigint' || typeof byterange.length === 'bigint') {\n    byterangeEnd = window__default[\"default\"].BigInt(byterange.offset) + window__default[\"default\"].BigInt(byterange.length) - window__default[\"default\"].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\nconst segmentXhrHeaders = function (segment) {\n  const 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\nconst textRange = function (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\nconst formatHexString = function (e, i) {\n  const value = e.toString(16);\n  return '00'.substring(0, 2 - value.length) + value + (i % 2 ? ' ' : '');\n};\nconst formatAsciiString = function (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\nconst createTransferableMessage = function (message) {\n  const transferable = {};\n  Object.keys(message).forEach(key => {\n    const value = message[key];\n    if (byteHelpers.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\nconst initSegmentId = function (initSegment) {\n  const 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\nconst segmentKeyId = function (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\nconst hexDump = data => {\n  const bytes = Array.prototype.slice.call(data);\n  const step = 16;\n  let result = '';\n  let hex;\n  let ascii;\n  for (let 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};\nconst tagDump = ({\n  bytes\n}) => hexDump(bytes);\nconst textRanges = ranges => {\n  let result = '';\n  let 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\nconst 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\nconst 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  const transmuxerPrependedSeconds = segment.videoTimingInfo.transmuxerPrependedSeconds;\n  const transmuxedStart = segment.videoTimingInfo.transmuxedPresentationStart; // get the start of the content from before old content is prepended\n\n  const startOfSegment = transmuxedStart + transmuxerPrependedSeconds;\n  const offsetFromSegmentStart = playerTime - startOfSegment;\n  return new Date(segment.dateTimeObject.getTime() + offsetFromSegmentStart * 1000);\n};\nconst 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\nconst findSegmentForProgramTime = (programTime, playlist) => {\n  // Assumptions:\n  //  - verifyProgramDateTimeTags has already been run\n  //  - live streams have been started\n  let 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  let segment = playlist.segments[0];\n  if (dateTimeObject < new Date(segment.dateTimeObject)) {\n    // Requested time is before stream start.\n    return null;\n  }\n  for (let i = 0; i < playlist.segments.length - 1; i++) {\n    segment = playlist.segments[i];\n    const nextSegmentStart = new Date(playlist.segments[i + 1].dateTimeObject);\n    if (dateTimeObject < nextSegmentStart) {\n      break;\n    }\n  }\n  const lastSegment = playlist.segments[playlist.segments.length - 1];\n  const lastSegmentStart = lastSegment.dateTimeObject;\n  const lastSegmentDuration = lastSegment.videoTimingInfo ? originalSegmentVideoDuration(lastSegment.videoTimingInfo) : lastSegment.duration + lastSegment.duration * SEGMENT_END_FUDGE_PERCENT;\n  const 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,\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\nconst 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  let segmentEnd = 0;\n  let segment;\n  for (let i = 0; i < playlist.segments.length; i++) {\n    segment = playlist.segments[i]; // 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  const 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,\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\nconst getOffsetFromTimestamp = (comparisonTimeStamp, programTime) => {\n  let segmentDateTime;\n  let programDateTime;\n  try {\n    segmentDateTime = new Date(comparisonTimeStamp);\n    programDateTime = new Date(programTime);\n  } catch (e) {// TODO handle error\n  }\n  const segmentTimeEpoch = segmentDateTime.getTime();\n  const 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\nconst verifyProgramDateTimeTags = playlist => {\n  if (!playlist.segments || playlist.segments.length === 0) {\n    return false;\n  }\n  for (let i = 0; i < playlist.segments.length; i++) {\n    const segment = playlist.segments[i];\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\nconst getProgramTime = ({\n  playlist,\n  time = undefined,\n  callback\n}) => {\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  const 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  const programTimeObject = {\n    mediaSeconds: time\n  };\n  const 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\nconst seekToProgramTime = ({\n  programTime,\n  playlist,\n  retryCount = 2,\n  seekTo,\n  pauseAfterSeek = true,\n  tech,\n  callback\n}) => {\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  const matchedSegment = findSegmentForProgramTime(programTime, playlist); // no match\n\n  if (!matchedSegment) {\n    return callback({\n      message: `${programTime} was not found in the stream`\n    });\n  }\n  const segment = matchedSegment.segment;\n  const 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: `${programTime} is not buffered yet. Try again`\n      });\n    }\n    seekTo(matchedSegment.estimatedStart + mediaOffset);\n    tech.one('seeked', () => {\n      seekToProgramTime({\n        programTime,\n        playlist,\n        retryCount: retryCount - 1,\n        seekTo,\n        pauseAfterSeek,\n        tech,\n        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  const seekToTime = segment.start + mediaOffset;\n  const 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\nconst callbackOnCompleted = (request, cb) => {\n  if (request.readyState === 4) {\n    return cb();\n  }\n  return;\n};\nconst containerRequest = (uri, xhr, cb) => {\n  let bytes = [];\n  let id3Offset;\n  let finished = false;\n  const endRequestAndCallback = function (err, req, type, _bytes) {\n    req.abort();\n    finished = true;\n    return cb(err, req, type, _bytes);\n  };\n  const progressListener = function (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    const newPart = request.responseText.substring(bytes && bytes.byteLength || 0, request.responseText.length); // add that onto bytes\n\n    bytes = byteHelpers.concatTypedArrays(bytes, byteHelpers.stringToBytes(newPart, true));\n    id3Offset = id3Offset || id3Helpers.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, () => endRequestAndCallback(error, request, '', bytes));\n    }\n    const type = containers.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, () => endRequestAndCallback(error, request, '', bytes));\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, () => endRequestAndCallback(error, request, '', bytes));\n    }\n    return endRequestAndCallback(null, request, type, bytes);\n  };\n  const options = {\n    uri,\n    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 ({\n        total,\n        loaded\n      }) {\n        return callbackWrapper(request, null, {\n          statusCode: request.status\n        }, progressListener);\n      });\n    }\n  };\n  const request = xhr(options, function (error, response) {\n    return callbackWrapper(request, error, response, progressListener);\n  });\n  return request;\n};\nconst {\n  EventTarget\n} = videojs;\nconst dashPlaylistUnchanged = function (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 (let i = 0; i < a.segments.length; i++) {\n    const aSegment = a.segments[i];\n    const bSegment = b.segments[i]; // 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    const aByterange = aSegment.byterange;\n    const 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\nconst dashGroupId = (type, group, label, playlist) => {\n  // If the manifest somehow does not have an ID (non-dash compliant), use the label.\n  const playlistId = playlist.attributes.NAME || label;\n  return `placeholder-uri-${type}-${group}-${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\nconst parseMainXml = ({\n  mainXml,\n  srcUrl,\n  clientOffset,\n  sidxMapping,\n  previousManifest\n}) => {\n  const manifest = mpdParser.parse(mainXml, {\n    manifestUri: srcUrl,\n    clientOffset,\n    sidxMapping,\n    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\nconst removeOldMediaGroupLabels = (update, newMain) => {\n  forEachMediaGroup(update, (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\nconst updateMain = (oldMain, newMain, sidxMapping) => {\n  let noChanges = true;\n  let 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 (let i = 0; i < newMain.playlists.length; i++) {\n    const playlist = newMain.playlists[i];\n    if (playlist.sidx) {\n      const sidxKey = mpdParser.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        mpdParser.addSidxSegmentsToPlaylist(playlist, sidxMapping[sidxKey].sidx, playlist.sidx.resolvedUri);\n      }\n    }\n    const 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, (properties, type, group, label) => {\n    if (properties.playlists && properties.playlists.length) {\n      const id = properties.playlists[0].id;\n      const 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\nconst equivalentSidx = (a, b) => {\n  const neitherMap = Boolean(!a.map && !b.map);\n  const 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\nconst compareSidxEntry = (playlists, oldSidxMapping) => {\n  const newSidxMapping = {};\n  for (const id in playlists) {\n    const playlist = playlists[id];\n    const currentSidxInfo = playlist.sidx;\n    if (currentSidxInfo) {\n      const key = mpdParser.generateSidxKey(currentSidxInfo);\n      if (!oldSidxMapping[key]) {\n        break;\n      }\n      const 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\nconst filterChangedSidxMappings = (main, oldSidxMapping) => {\n  const videoSidx = compareSidxEntry(main.playlists, oldSidxMapping);\n  let mediaGroupSidx = videoSidx;\n  forEachMediaGroup(main, (properties, mediaType, groupKey, labelKey) => {\n    if (properties.playlists && properties.playlists.length) {\n      const playlists = properties.playlists;\n      mediaGroupSidx = merge(mediaGroupSidx, compareSidxEntry(playlists, oldSidxMapping));\n    }\n  });\n  return mediaGroupSidx;\n};\nclass DashPlaylistLoader extends EventTarget {\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  constructor(srcUrlOrPlaylist, vhs, options = {}, mainPlaylistLoader) {\n    super();\n    this.mainPlaylistLoader_ = mainPlaylistLoader || this;\n    if (!mainPlaylistLoader) {\n      this.isMain_ = true;\n    }\n    const {\n      withCredentials = false\n    } = options;\n    this.vhs_ = vhs;\n    this.withCredentials = withCredentials;\n    this.addMetadataToTextTrack = options.addMetadataToTextTrack;\n    if (!srcUrlOrPlaylist) {\n      throw new Error('A non-empty playlist URL or object is required');\n    } // event naming?\n\n    this.on('minimumUpdatePeriod', () => {\n      this.refreshXml_();\n    }); // live playlist staleness timeout\n\n    this.on('mediaupdatetimeout', () => {\n      this.refreshMedia_(this.media().id);\n    });\n    this.state = 'HAVE_NOTHING';\n    this.loadedPlaylists_ = {};\n    this.logger_ = logger('DashPlaylistLoader'); // initialize the loader state\n    // The mainPlaylistLoader will be created with a string\n\n    if (this.isMain_) {\n      this.mainPlaylistLoader_.srcUrl = srcUrlOrPlaylist; // TODO: reset sidxMapping between period changes\n      // once multi-period is refactored\n\n      this.mainPlaylistLoader_.sidxMapping_ = {};\n    } else {\n      this.childPlaylist_ = srcUrlOrPlaylist;\n    }\n  }\n  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  addSidxSegments_(playlist, startingState, cb) {\n    const sidxKey = playlist.sidx && mpdParser.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__default[\"default\"].setTimeout(() => cb(false), 0);\n      return;\n    } // resolve the segment URL relative to the playlist\n\n    const uri = resolveManifestRedirect(playlist.sidx.resolvedUri);\n    const fin = (err, request) => {\n      if (this.requestErrored_(err, request, startingState)) {\n        return;\n      }\n      const sidxMapping = this.mainPlaylistLoader_.sidxMapping_;\n      let sidx;\n      try {\n        sidx = parseSidx__default[\"default\"](byteHelpers.toUint8(request.response).subarray(8));\n      } catch (e) {\n        // sidx parsing failed.\n        this.requestErrored_(e, request, startingState);\n        return;\n      }\n      sidxMapping[sidxKey] = {\n        sidxInfo: playlist.sidx,\n        sidx\n      };\n      mpdParser.addSidxSegmentsToPlaylist(playlist, sidx, playlist.sidx.resolvedUri);\n      return cb(true);\n    };\n    this.request = containerRequest(uri, this.vhs_.xhr, (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 ${container || 'unknown'} container type for sidx segment at URL: ${uri}`,\n          // response is just bytes in this case\n          // but we really don't want to return that.\n          response: '',\n          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      const {\n        offset,\n        length\n      } = playlist.sidx.byterange;\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      this.request = this.vhs_.xhr({\n        uri,\n        responseType: 'arraybuffer',\n        headers: segmentXhrHeaders({\n          byterange: playlist.sidx.byterange\n        })\n      }, fin);\n    });\n  }\n  dispose() {\n    this.trigger('dispose');\n    this.stopRequest();\n    this.loadedPlaylists_ = {};\n    window__default[\"default\"].clearTimeout(this.minimumUpdatePeriodTimeout_);\n    window__default[\"default\"].clearTimeout(this.mediaRequest_);\n    window__default[\"default\"].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  hasPendingRequest() {\n    return this.request || this.mediaRequest_;\n  }\n  stopRequest() {\n    if (this.request) {\n      const oldRequest = this.request;\n      this.request = null;\n      oldRequest.onreadystatechange = null;\n      oldRequest.abort();\n    }\n  }\n  media(playlist) {\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    const 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    const 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, sidxChanged => {\n      // everything is ready just continue to haveMetadata\n      this.haveMetadata({\n        startingState,\n        playlist\n      });\n    });\n  }\n  haveMetadata({\n    startingState,\n    playlist\n  }) {\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  pause() {\n    if (this.mainPlaylistLoader_.createMupOnMedia_) {\n      this.off('loadedmetadata', this.mainPlaylistLoader_.createMupOnMedia_);\n      this.mainPlaylistLoader_.createMupOnMedia_ = null;\n    }\n    this.stopRequest();\n    window__default[\"default\"].clearTimeout(this.mediaUpdateTimeout);\n    this.mediaUpdateTimeout = null;\n    if (this.isMain_) {\n      window__default[\"default\"].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  load(isFinalRendition) {\n    window__default[\"default\"].clearTimeout(this.mediaUpdateTimeout);\n    this.mediaUpdateTimeout = null;\n    const media = this.media();\n    if (isFinalRendition) {\n      const delay = media ? media.targetDuration / 2 * 1000 : 5 * 1000;\n      this.mediaUpdateTimeout = window__default[\"default\"].setTimeout(() => this.load(), 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  start() {\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__default[\"default\"].setTimeout(() => this.haveMain_(), 0);\n      return;\n    }\n    this.requestMain_((req, mainChanged) => {\n      this.haveMain_();\n      if (!this.hasPendingRequest() && !this.media_) {\n        this.media(this.mainPlaylistLoader_.main.playlists[0]);\n      }\n    });\n  }\n  requestMain_(cb) {\n    this.request = this.vhs_.xhr({\n      uri: this.mainPlaylistLoader_.srcUrl,\n      withCredentials: this.withCredentials\n    }, (error, req) => {\n      if (this.requestErrored_(error, req)) {\n        if (this.state === 'HAVE_NOTHING') {\n          this.started = false;\n        }\n        return;\n      }\n      const mainChanged = req.responseText !== this.mainPlaylistLoader_.mainXml_;\n      this.mainPlaylistLoader_.mainXml_ = req.responseText;\n      if (req.responseHeaders && req.responseHeaders.date) {\n        this.mainLoaded_ = Date.parse(req.responseHeaders.date);\n      } else {\n        this.mainLoaded_ = Date.now();\n      }\n      this.mainPlaylistLoader_.srcUrl = resolveManifestRedirect(this.mainPlaylistLoader_.srcUrl, req);\n      if (mainChanged) {\n        this.handleMain_();\n        this.syncClientServerClock_(() => {\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  syncClientServerClock_(done) {\n    const utcTiming = mpdParser.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    }, (error, req) => {\n      // disposed\n      if (!this.request) {\n        return;\n      }\n      if (error) {\n        // sync request failed, fall back to using date header from mpd\n        // TODO: log warning\n        this.mainPlaylistLoader_.clientOffset_ = this.mainLoaded_ - Date.now();\n        return done();\n      }\n      let 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 = this.mainLoaded_;\n        } else {\n          serverTime = Date.parse(req.responseHeaders.date);\n        }\n      } else {\n        serverTime = Date.parse(req.responseText);\n      }\n      this.mainPlaylistLoader_.clientOffset_ = serverTime - Date.now();\n      done();\n    });\n  }\n  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  handleMain_() {\n    // clear media request\n    this.mediaRequest_ = null;\n    const oldMain = this.mainPlaylistLoader_.main;\n    let 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    const 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  updateMinimumUpdatePeriodTimeout_() {\n    const 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__default[\"default\"].clearTimeout(mpl.minimumUpdatePeriodTimeout_);\n      mpl.minimumUpdatePeriodTimeout_ = null;\n    }\n    let 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 ${mup}, not setting a timeout`);\n      }\n      return;\n    }\n    this.createMUPTimeout_(mup);\n  }\n  createMUPTimeout_(mup) {\n    const mpl = this.mainPlaylistLoader_;\n    mpl.minimumUpdatePeriodTimeout_ = window__default[\"default\"].setTimeout(() => {\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  refreshXml_() {\n    this.requestMain_((req, mainChanged) => {\n      if (!mainChanged) {\n        return;\n      }\n      if (this.media_) {\n        this.media_ = this.mainPlaylistLoader_.main.playlists[this.media_.id];\n      } // This will filter out updated sidx info from the mapping\n\n      this.mainPlaylistLoader_.sidxMapping_ = filterChangedSidxMappings(this.mainPlaylistLoader_.main, this.mainPlaylistLoader_.sidxMapping_);\n      this.addSidxSegments_(this.media(), this.state, sidxChanged => {\n        // TODO: do we need to reload the current playlist?\n        this.refreshMedia_(this.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  refreshMedia_(mediaID) {\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    const playlists = this.mainPlaylistLoader_.main.playlists;\n    const 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      const createMediaUpdateTimeout = () => {\n        if (this.media().endList) {\n          return;\n        }\n        this.mediaUpdateTimeout = window__default[\"default\"].setTimeout(() => {\n          this.trigger('mediaupdatetimeout');\n          createMediaUpdateTimeout();\n        }, refreshDelay(this.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  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      const metadataArray = this.mainPlaylistLoader_.main.eventStream.map(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   * Returns the key ID set from a playlist\n   *\n   * @param {playlist} playlist to fetch the key ID set from.\n   * @return a Set of 32 digit hex strings that represent the unique keyIds for that playlist.\n   */\n\n  getKeyIdSet(playlist) {\n    if (playlist.contentProtection) {\n      const keyIds = new Set();\n      for (const keysystem in playlist.contentProtection) {\n        const defaultKID = playlist.contentProtection[keysystem].attributes['cenc:default_KID'];\n        if (defaultKID) {\n          // DASH keyIds are separated by dashes.\n          keyIds.add(defaultKID.replace(/-/g, '').toLowerCase());\n        }\n      }\n      return keyIds;\n    }\n  }\n}\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};\nconst stringToArrayBuffer = string => {\n  const view = new Uint8Array(new ArrayBuffer(string.length));\n  for (let i = 0; i < string.length; i++) {\n    view[i] = string.charCodeAt(i);\n  }\n  return view.buffer;\n};\n\n/* global Blob, BlobBuilder, Worker */\n// unify worker interface\nconst browserWorkerPolyFill = function (workerObj) {\n  // node only supports on/off\n  workerObj.on = workerObj.addEventListener;\n  workerObj.off = workerObj.removeEventListener;\n  return workerObj;\n};\nconst createObjectURL = function (str) {\n  try {\n    return URL.createObjectURL(new Blob([str], {\n      type: 'application/javascript'\n    }));\n  } catch (e) {\n    const blob = new BlobBuilder();\n    blob.append(str);\n    return URL.createObjectURL(blob.getBlob());\n  }\n};\nconst factory = function (code) {\n  return function () {\n    const objectUrl = createObjectURL(code);\n    const worker = browserWorkerPolyFill(new Worker(objectUrl));\n    worker.objURL = objectUrl;\n    const 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};\nconst transform = function (code) {\n  return `var browserWorkerPolyFill = ${browserWorkerPolyFill.toString()};\\n` + 'browserWorkerPolyFill(self);\\n' + code;\n};\nconst getWorkerString = function (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 */\nconst 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 () {\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 (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\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\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\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\n    STCO = new Uint8Array([0x00,\n    // version\n    0x00, 0x00, 0x00,\n    // flags\n    0x00, 0x00, 0x00, 0x00 // entry_count\n    ]);\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\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\n  box = function (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 () {\n    return box(types.dinf, box(types.dref, DREF));\n  };\n  esds = function (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\n  ftyp = function () {\n    return box(types.ftyp, MAJOR_BRAND, MINOR_VERSION, MAJOR_BRAND, AVC1_BRAND);\n  };\n  hdlr = function (type) {\n    return box(types.hdlr, HDLR_TYPES[type]);\n  };\n  mdat = function (data) {\n    return box(types.mdat, data);\n  };\n  mdhd = function (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 (track) {\n    return box(types.mdia, mdhd(track), hdlr(track.type), minf(track));\n  };\n  mfhd = function (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\n  minf = function (track) {\n    return box(types.minf, track.type === 'video' ? box(types.vmhd, VMHD) : box(types.smhd, SMHD), dinf(), stbl(track));\n  };\n  moof = function (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 (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 (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 (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\n    return box(types.mvhd, bytes);\n  };\n  sdtp = function (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 (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 (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 (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\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 (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 (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\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 (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\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 (track) {\n    track.duration = track.duration || 0xffffffff;\n    return box(types.trak, tkhd(track), mdia(track));\n  };\n  trex = function (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 (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\n    videoTrun = function (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\n      return box(types.trun, bytes);\n    };\n    audioTrun = function (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\n      return box(types.trun, bytes);\n    };\n    trun$1 = function (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 (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 (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 (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 (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 () {\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 (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 (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 (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 (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 (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 (count) {\n    var a = [];\n    while (count--) {\n      a.push(0);\n    }\n    return a;\n  };\n  var makeTable = function (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 () {\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 (seconds) {\n    return seconds * ONE_SECOND_IN_TS$4;\n  };\n  secondsToAudioTs = function (seconds, sampleRate) {\n    return seconds * sampleRate;\n  };\n  videoTsToSeconds = function (timestamp) {\n    return timestamp / ONE_SECOND_IN_TS$4;\n  };\n  audioTsToSeconds = function (timestamp, sampleRate) {\n    return timestamp / sampleRate;\n  };\n  audioTsToVideoTs = function (timestamp, sampleRate) {\n    return secondsToVideoTs(audioTsToSeconds(timestamp, sampleRate));\n  };\n  videoTsToAudioTs = function (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 (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 (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 (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 (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 (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\n    return samples;\n  }; // generate the track's sample table from an array of frames\n\n  var concatenateFrameData = function (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 (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 (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 (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 (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 (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 (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 (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 (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\n    if (this.parse708captions_) {\n      this.cc708Stream_ = new Cea708Stream({\n        captionServices: options.captionServices\n      }); // eslint-disable-line no-use-before-define\n    }\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    // \u266A\n    0x1020: 0x20,\n    // Transparent Space\n    0x1021: 0xa0,\n    // Nob-breaking Transparent Space\n    0x1025: 0x2026,\n    // \u2026\n    0x102a: 0x0160,\n    // \u0160\n    0x102c: 0x0152,\n    // \u0152\n    0x1030: 0x2588,\n    // \u2588\n    0x1031: 0x2018,\n    // \u2018\n    0x1032: 0x2019,\n    // \u2019\n    0x1033: 0x201c,\n    // \u201C\n    0x1034: 0x201d,\n    // \u201D\n    0x1035: 0x2022,\n    // \u2022\n    0x1039: 0x2122,\n    // \u2122\n    0x103a: 0x0161,\n    // \u0161\n    0x103c: 0x0153,\n    // \u0153\n    0x103d: 0x2120,\n    // \u2120\n    0x103f: 0x0178,\n    // \u0178\n    0x1076: 0x215b,\n    // \u215B\n    0x1077: 0x215c,\n    // \u215C\n    0x1078: 0x215d,\n    // \u215D\n    0x1079: 0x215e,\n    // \u215E\n    0x107a: 0x23d0,\n    // \u23D0\n    0x107b: 0x23a4,\n    // \u23A4\n    0x107c: 0x23a3,\n    // \u23A3\n    0x107d: 0x23af,\n    // \u23AF\n    0x107e: 0x23a6,\n    // \u23A6\n    0x107f: 0x23a1,\n    // \u23A1\n    0x10a0: 0x3138 // \u3138 (CC char)\n  };\n\n  var get708CharFromCode = function (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 (b) {\n    return 0x20 <= b && b <= 0x7f || 0xa0 <= b && b <= 0xff;\n  };\n  var Cea708Window = function (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 (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 (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(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(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        const 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    // \u00E1\n    0x5c: 0xe9,\n    // \u00E9\n    0x5e: 0xed,\n    // \u00ED\n    0x5f: 0xf3,\n    // \u00F3\n    0x60: 0xfa,\n    // \u00FA\n    0x7b: 0xe7,\n    // \u00E7\n    0x7c: 0xf7,\n    // \u00F7\n    0x7d: 0xd1,\n    // \u00D1\n    0x7e: 0xf1,\n    // \u00F1\n    0x7f: 0x2588,\n    // \u2588\n    0x0130: 0xae,\n    // \u00AE\n    0x0131: 0xb0,\n    // \u00B0\n    0x0132: 0xbd,\n    // \u00BD\n    0x0133: 0xbf,\n    // \u00BF\n    0x0134: 0x2122,\n    // \u2122\n    0x0135: 0xa2,\n    // \u00A2\n    0x0136: 0xa3,\n    // \u00A3\n    0x0137: 0x266a,\n    // \u266A\n    0x0138: 0xe0,\n    // \u00E0\n    0x0139: 0xa0,\n    //\n    0x013a: 0xe8,\n    // \u00E8\n    0x013b: 0xe2,\n    // \u00E2\n    0x013c: 0xea,\n    // \u00EA\n    0x013d: 0xee,\n    // \u00EE\n    0x013e: 0xf4,\n    // \u00F4\n    0x013f: 0xfb,\n    // \u00FB\n    0x0220: 0xc1,\n    // \u00C1\n    0x0221: 0xc9,\n    // \u00C9\n    0x0222: 0xd3,\n    // \u00D3\n    0x0223: 0xda,\n    // \u00DA\n    0x0224: 0xdc,\n    // \u00DC\n    0x0225: 0xfc,\n    // \u00FC\n    0x0226: 0x2018,\n    // \u2018\n    0x0227: 0xa1,\n    // \u00A1\n    0x0228: 0x2a,\n    // *\n    0x0229: 0x27,\n    // '\n    0x022a: 0x2014,\n    // \u2014\n    0x022b: 0xa9,\n    // \u00A9\n    0x022c: 0x2120,\n    // \u2120\n    0x022d: 0x2022,\n    // \u2022\n    0x022e: 0x201c,\n    // \u201C\n    0x022f: 0x201d,\n    // \u201D\n    0x0230: 0xc0,\n    // \u00C0\n    0x0231: 0xc2,\n    // \u00C2\n    0x0232: 0xc7,\n    // \u00C7\n    0x0233: 0xc8,\n    // \u00C8\n    0x0234: 0xca,\n    // \u00CA\n    0x0235: 0xcb,\n    // \u00CB\n    0x0236: 0xeb,\n    // \u00EB\n    0x0237: 0xce,\n    // \u00CE\n    0x0238: 0xcf,\n    // \u00CF\n    0x0239: 0xef,\n    // \u00EF\n    0x023a: 0xd4,\n    // \u00D4\n    0x023b: 0xd9,\n    // \u00D9\n    0x023c: 0xf9,\n    // \u00F9\n    0x023d: 0xdb,\n    // \u00DB\n    0x023e: 0xab,\n    // \u00AB\n    0x023f: 0xbb,\n    // \u00BB\n    0x0320: 0xc3,\n    // \u00C3\n    0x0321: 0xe3,\n    // \u00E3\n    0x0322: 0xcd,\n    // \u00CD\n    0x0323: 0xcc,\n    // \u00CC\n    0x0324: 0xec,\n    // \u00EC\n    0x0325: 0xd2,\n    // \u00D2\n    0x0326: 0xf2,\n    // \u00F2\n    0x0327: 0xd5,\n    // \u00D5\n    0x0328: 0xf5,\n    // \u00F5\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    // \u00C4\n    0x0331: 0xe4,\n    // \u00E4\n    0x0332: 0xd6,\n    // \u00D6\n    0x0333: 0xf6,\n    // \u00F6\n    0x0334: 0xdf,\n    // \u00DF\n    0x0335: 0xa5,\n    // \u00A5\n    0x0336: 0xa4,\n    // \u00A4\n    0x0337: 0x2502,\n    // \u2502\n    0x0338: 0xc5,\n    // \u00C5\n    0x0339: 0xe5,\n    // \u00E5\n    0x033a: 0xd8,\n    // \u00D8\n    0x033b: 0xf8,\n    // \u00F8\n    0x033c: 0x250c,\n    // \u250C\n    0x033d: 0x2510,\n    // \u2510\n    0x033e: 0x2514,\n    // \u2514\n    0x033f: 0x2518 // \u2518\n  };\n\n  var getCharFromCode = function (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 () {\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 (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 \"\u00E8\" is desired, you'll always receive \"e\u00E8\"; non-compliant\n        // decoders are supposed to drop the \"\u00E8\", while compliant decoders\n        // backspace the \"e\" and insert \"\u00E8\".\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        const 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          const 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\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    const logWarning = index => {\n      this.trigger('log', {\n        level: 'warn',\n        message: 'Skipping a malformed 608 caption at index ' + index + '.'\n      });\n    };\n    const content = [];\n    this.displayed_.forEach((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,\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 (char) {\n    return char >= 0x20 && char <= 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 (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 (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      /**\n       * Rollover stream expects data from elementary stream.\n       * Elementary stream can push forward 2 types of data\n       * - Parsed Video/Audio/Timed-metadata PES (packetized elementary stream) packets\n       * - Tracks metadata from PMT (Program Map Table)\n       * Rollover stream expects pts/dts info to be available, since it stores lastDTS\n       * We should ignore non-PES packets since they may override lastDTS to undefined.\n       * lastDTS is important to signal the next segments\n       * about rollover from the previous segments.\n       */\n      if (data.type === 'metadata') {\n        this.trigger('data', data);\n        return;\n      } // Any \"shared\" rollover streams will accept _all_ data. Otherwise,\n      // streams will only accept data that matches their type.\n\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 = (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 (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 (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 (bytes, start, end) {\n      return unescape(percentEncode$1(bytes, start, end)); // jshint ignore:line\n    },\n    parseSyncSafeInteger$1 = function (data) {\n      return data[0] << 21 | data[1] << 14 | data[2] << 7 | data[3];\n    },\n    frameParsers = {\n      'APIC': function (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 (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 (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 (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 (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 (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 (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 (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 () {\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 () {\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 (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 (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 (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 () {\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 (payload, pes) {\n        var ptsDtsFlags;\n        const 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 (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 () {// we have to wait for the PMT to arrive as well before we\n          // have any meaningful metadata\n        },\n        pes: function () {\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 () {\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$1;\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$1 = function (handlePartialSegments) {\n    var buffer,\n      frameNum = 0;\n    AdtsStream$1.prototype.init.call(this);\n    this.skipWarn_ = function (start, end) {\n      this.trigger('log', {\n        level: 'warn',\n        message: `adts skiping bytes ${start} to ${end} in frame ${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$1.prototype = new Stream$3();\n  var adts = AdtsStream$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 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 (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\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$1, 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 () {\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$1 = function () {\n    var nalByteStream = new NalByteStream(),\n      self,\n      trackId,\n      currentPts,\n      currentDts,\n      discardEmulationPreventionBytes,\n      readSequenceParameterSet,\n      skipScalingList;\n    H264Stream$1.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 (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 (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 (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\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\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\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$1.prototype = new Stream$2();\n  var h264 = {\n    H264Stream: H264Stream$1,\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 (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 (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 (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 (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 (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 (bytes, start, end) {\n    return unescape(percentEncode(bytes, start, end)); // jshint ignore:line\n  };\n\n  var parseAdtsSize = function (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 (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 (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 (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$1;\n  /**\n   * Splits an incoming stream of binary data into ADTS and ID3 Frames.\n   */\n\n  AacStream$1 = function () {\n    var everything = new Uint8Array(),\n      timeStamp = 0;\n    AacStream$1.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$1.prototype = new Stream$1();\n  var aac = AacStream$1;\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 (key, event) {\n    event.stream = key;\n    this.trigger('log', event);\n  };\n  var addPipelineLogRetriggers = function (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 (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 (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 (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 (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 (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 (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 (value) {\n    return value >>> 0;\n  };\n  var toHexString$1 = function (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 () {\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 (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 (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,\n      value,\n      // if timescale is undefined or 0 set to 1 \n      timescale: timescale ? timescale : 1,\n      presentation_time,\n      presentation_time_delta,\n      event_duration,\n      id,\n      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 (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 (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 (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 (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 (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      let 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 (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 (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 (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 (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 (segmentData, offset = 0) {\n    var emsgBoxes = findBox(segmentData, ['emsg']);\n    return emsgBoxes.map(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 (packet) {\n    var pid = packet[1] & 0x1f;\n    pid <<= 8;\n    pid |= packet[2];\n    return pid;\n  };\n  var parsePayloadUnitStartIndicator = function (packet) {\n    return !!(packet[1] & 0x40);\n  };\n  var parseAdaptionField = function (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 (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 (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 (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 (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 (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\n    return pes;\n  };\n  var parseNalUnitType = function (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 (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 (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 (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 (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 (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 (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 (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 (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  const wireTransmuxerEvents = function (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      const initArray = segment.initSegment;\n      segment.initSegment = {\n        data: initArray.buffer,\n        byteOffset: initArray.byteOffset,\n        byteLength: initArray.byteLength\n      };\n      const typedArray = segment.data;\n      segment.data = typedArray.buffer;\n      self.postMessage({\n        action: 'data',\n        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\n      });\n    });\n    transmuxer.on('videoSegmentTimingInfo', function (timingInfo) {\n      const 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\n      });\n    });\n    transmuxer.on('audioSegmentTimingInfo', function (timingInfo) {\n      // Note that all times for [audio/video]SegmentTimingInfo events are in video clock\n      const 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\n      });\n    });\n    transmuxer.on('id3Frame', function (id3Frame) {\n      self.postMessage({\n        action: 'id3Frame',\n        id3Frame\n      });\n    });\n    transmuxer.on('caption', function (caption) {\n      self.postMessage({\n        action: 'caption',\n        caption\n      });\n    });\n    transmuxer.on('trackinfo', function (trackInfo) {\n      self.postMessage({\n        action: 'trackinfo',\n        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\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\n  class MessageHandlers {\n    constructor(self, options) {\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\n    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    pushMp4Captions(data) {\n      if (!this.captionParser) {\n        this.captionParser = new captionParser();\n        this.captionParser.init();\n      }\n      const segment = new Uint8Array(data.data, data.byteOffset, data.byteLength);\n      const 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    probeMp4StartTime({\n      timescales,\n      data\n    }) {\n      const startTime = probe$2.startTime(timescales, data);\n      this.self.postMessage({\n        action: 'probeMp4StartTime',\n        startTime,\n        data\n      }, [data.buffer]);\n    }\n    probeMp4Tracks({\n      data\n    }) {\n      const tracks = probe$2.tracks(data);\n      this.self.postMessage({\n        action: 'probeMp4Tracks',\n        tracks,\n        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    probeEmsgID3({\n      data,\n      offset\n    }) {\n      const id3Frames = probe$2.getEmsgID3(data, offset);\n      this.self.postMessage({\n        action: 'probeEmsgID3',\n        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    probeTs({\n      data,\n      baseStartTime\n    }) {\n      const tsStartTime = typeof baseStartTime === 'number' && !isNaN(baseStartTime) ? baseStartTime * clock$2.ONE_SECOND_IN_TS : void 0;\n      const timeInfo = tsInspector.inspect(data, tsStartTime);\n      let 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,\n        data\n      }, [data.buffer]);\n    }\n    clearAllMp4Captions() {\n      if (this.captionParser) {\n        this.captionParser.clearAllCaptions();\n      }\n    }\n    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    push(data) {\n      // Cast array buffer to correct type for transmuxer\n      const 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    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    setTimestampOffset(data) {\n      const timestampOffset = data.timestampOffset || 0;\n      this.transmuxer.setBaseMediaDecodeTime(Math.round(clock$2.secondsToVideoTs(timestampOffset)));\n    }\n    setAudioAppendStart(data) {\n      this.transmuxer.setAudioAppendStart(Math.ceil(clock$2.secondsToVideoTs(data.appendStart)));\n    }\n    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    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    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    alignGopsWith(data) {\n      this.transmuxer.alignGopsWith(data.gopsToAlignWith.slice());\n    }\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\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\nconst handleData_ = (event, transmuxedData, callback) => {\n  const {\n    type,\n    initSegment,\n    captions,\n    captionStreams,\n    metadata,\n    videoFrameDtsTime,\n    videoFramePtsTime\n  } = event.data.segment;\n  transmuxedData.buffer.push({\n    captions,\n    captionStreams,\n    metadata\n  });\n  const boxes = event.data.segment.boxes || {\n    data: event.data.segment.data\n  };\n  const result = {\n    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};\nconst handleDone_ = ({\n  transmuxedData,\n  callback\n}) => {\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};\nconst handleGopInfo_ = (event, transmuxedData) => {\n  transmuxedData.gopInfo = event.data.gopInfo;\n};\nconst processTransmux = options => {\n  const {\n    transmuxer,\n    bytes,\n    audioAppendStart,\n    gopsToAlignWith,\n    remux,\n    onData,\n    onTrackInfo,\n    onAudioTimingInfo,\n    onVideoTimingInfo,\n    onVideoSegmentTimingInfo,\n    onAudioSegmentTimingInfo,\n    onId3,\n    onCaptions,\n    onDone,\n    onEndedTimeline,\n    onTransmuxerLog,\n    isEndOfTimeline\n  } = options;\n  const transmuxedData = {\n    buffer: []\n  };\n  let waitForEndedTimelineEvent = isEndOfTimeline;\n  const 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,\n      callback: onDone\n    });\n    /* eslint-disable no-use-before-define */\n\n    dequeue(transmuxer);\n    /* eslint-enable */\n  };\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\n    });\n  }\n  if (typeof remux !== 'undefined') {\n    transmuxer.postMessage({\n      action: 'setRemux',\n      remux\n    });\n  }\n  if (bytes.byteLength) {\n    const buffer = bytes instanceof ArrayBuffer ? bytes : bytes.buffer;\n    const 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,\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};\nconst 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};\nconst processAction = (transmuxer, action) => {\n  transmuxer.postMessage({\n    action\n  });\n  dequeue(transmuxer);\n};\nconst 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};\nconst reset = transmuxer => {\n  enqueueAction('reset', transmuxer);\n};\nconst endTimeline = transmuxer => {\n  enqueueAction('endTimeline', transmuxer);\n};\nconst 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};\nconst createTransmuxer = options => {\n  const transmuxer = new TransmuxWorker();\n  transmuxer.currentTransmux = null;\n  transmuxer.transmuxQueue = [];\n  const term = transmuxer.terminate;\n  transmuxer.terminate = () => {\n    transmuxer.currentTransmux = null;\n    transmuxer.transmuxQueue.length = 0;\n    return term.call(transmuxer);\n  };\n  transmuxer.postMessage({\n    action: 'init',\n    options\n  });\n  return transmuxer;\n};\nvar segmentTransmuxer = {\n  reset,\n  endTimeline,\n  transmux,\n  createTransmuxer\n};\nconst workerCallback = function (options) {\n  const transmuxer = options.transmuxer;\n  const endAction = options.endAction || options.action;\n  const callback = options.callback;\n  const message = _extends__default[\"default\"]({}, options, {\n    endAction: null,\n    transmuxer: null,\n    callback: null\n  });\n  const 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    const isArrayBuffer = options.data instanceof ArrayBuffer;\n    message.byteOffset = isArrayBuffer ? 0 : options.data.byteOffset;\n    message.byteLength = options.data.byteLength;\n    const transfers = [isArrayBuffer ? options.data : options.data.buffer];\n    transmuxer.postMessage(message, transfers);\n  } else {\n    transmuxer.postMessage(message);\n  }\n};\nconst 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\nconst abortAll = activeXhrs => {\n  activeXhrs.forEach(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\nconst 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\nconst getProgressStats = progressEvent => {\n  const request = progressEvent.target;\n  const roundTripTime = Date.now() - request.requestTime;\n  const 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\nconst 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\nconst handleKeyResponse = (segment, objects, finishProcessingFn) => (error, request) => {\n  const response = request.response;\n  const 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  const view = new DataView(response);\n  const bytes = new Uint32Array([view.getUint32(0), view.getUint32(4), view.getUint32(8), view.getUint32(12)]);\n  for (let i = 0; i < objects.length; i++) {\n    objects[i].bytes = bytes;\n  }\n  return finishProcessingFn(null, segment);\n};\nconst parseInitSegment = (segment, callback) => {\n  const type = containers.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    const uri = segment.map.resolvedUri || segment.map.uri;\n    return callback({\n      internal: true,\n      message: `Found unsupported ${type || 'unknown'} container for initialization segment at URL: ${uri}`,\n      code: REQUEST_ERRORS.FAILURE\n    });\n  }\n  workerCallback({\n    action: 'probeMp4Tracks',\n    data: segment.map.bytes,\n    transmuxer: segment.transmuxer,\n    callback: ({\n      tracks,\n      data\n    }) => {\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\nconst handleInitSegmentResponse = ({\n  segment,\n  finishProcessingFn\n}) => (error, request) => {\n  const errorObj = handleErrors(error, request);\n  if (errorObj) {\n    return finishProcessingFn(errorObj, segment);\n  }\n  const 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 * 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\nconst handleSegmentResponse = ({\n  segment,\n  finishProcessingFn,\n  responseType\n}) => (error, request) => {\n  const errorObj = handleErrors(error, request);\n  if (errorObj) {\n    return finishProcessingFn(errorObj, segment);\n  }\n  const 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};\nconst transmuxAndNotify = ({\n  segment,\n  bytes,\n  trackInfoFn,\n  timingInfoFn,\n  videoSegmentTimingInfoFn,\n  audioSegmentTimingInfoFn,\n  id3Fn,\n  captionsFn,\n  isEndOfTimeline,\n  endedTimelineFn,\n  dataFn,\n  doneFn,\n  onTransmuxerLog\n}) => {\n  const fmp4Tracks = segment.map && segment.map.tracks || {};\n  const 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  let audioStartFn = timingInfoFn.bind(null, segment, 'audio', 'start');\n  const audioEndFn = timingInfoFn.bind(null, segment, 'audio', 'end');\n  let videoStartFn = timingInfoFn.bind(null, segment, 'video', 'start');\n  const videoEndFn = timingInfoFn.bind(null, segment, 'video', 'end');\n  const finish = () => transmux({\n    bytes,\n    transmuxer: segment.transmuxer,\n    audioAppendStart: segment.audioAppendStart,\n    gopsToAlignWith: segment.gopsToAlignWith,\n    remux: isMuxed,\n    onData: result => {\n      result.type = result.type === 'combined' ? 'video' : result.type;\n      dataFn(segment, result);\n    },\n    onTrackInfo: trackInfo => {\n      if (trackInfoFn) {\n        if (isMuxed) {\n          trackInfo.isMuxed = true;\n        }\n        trackInfoFn(segment, trackInfo);\n      }\n    },\n    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: 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: videoSegmentTimingInfo => {\n      videoSegmentTimingInfoFn(videoSegmentTimingInfo);\n    },\n    onAudioSegmentTimingInfo: audioSegmentTimingInfo => {\n      audioSegmentTimingInfoFn(audioSegmentTimingInfo);\n    },\n    onId3: (id3Frames, dispatchType) => {\n      id3Fn(segment, id3Frames, dispatchType);\n    },\n    onCaptions: captions => {\n      captionsFn(segment, [captions]);\n    },\n    isEndOfTimeline,\n    onEndedTimeline: () => {\n      endedTimelineFn();\n    },\n    onTransmuxerLog,\n    onDone: result => {\n      if (!doneFn) {\n        return;\n      }\n      result.type = result.type === 'combined' ? 'video' : result.type;\n      doneFn(null, segment, result);\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: data => {\n      segment.bytes = bytes = data.data;\n      const probeResult = data.result;\n      if (probeResult) {\n        trackInfoFn(segment, {\n          hasAudio: probeResult.hasAudio,\n          hasVideo: probeResult.hasVideo,\n          isMuxed\n        });\n        trackInfoFn = null;\n      }\n      finish();\n    }\n  });\n};\nconst handleSegmentBytes = ({\n  segment,\n  bytes,\n  trackInfoFn,\n  timingInfoFn,\n  videoSegmentTimingInfoFn,\n  audioSegmentTimingInfoFn,\n  id3Fn,\n  captionsFn,\n  isEndOfTimeline,\n  endedTimelineFn,\n  dataFn,\n  doneFn,\n  onTransmuxerLog\n}) => {\n  let 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 (containers.isLikelyFmp4MediaSegment(bytesAsUint8Array)) {\n    segment.isFmp4 = true;\n    const {\n      tracks\n    } = segment.map;\n    const 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    const 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: ({\n        data,\n        startTime\n      }) => {\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: ({\n            emsgData,\n            id3Frames\n          }) => {\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: 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 = containers.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,\n    bytes,\n    trackInfoFn,\n    timingInfoFn,\n    videoSegmentTimingInfoFn,\n    audioSegmentTimingInfoFn,\n    id3Fn,\n    captionsFn,\n    isEndOfTimeline,\n    endedTimelineFn,\n    dataFn,\n    doneFn,\n    onTransmuxerLog\n  });\n};\nconst decrypt = function ({\n  id,\n  key,\n  encryptedBytes,\n  decryptionWorker\n}, callback) {\n  const decryptionHandler = event => {\n    if (event.data.source === id) {\n      decryptionWorker.removeEventListener('message', decryptionHandler);\n      const decrypted = event.data.decrypted;\n      callback(new Uint8Array(decrypted.bytes, decrypted.byteOffset, decrypted.byteLength));\n    }\n  };\n  decryptionWorker.addEventListener('message', decryptionHandler);\n  let 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\nconst decryptSegment = ({\n  decryptionWorker,\n  segment,\n  trackInfoFn,\n  timingInfoFn,\n  videoSegmentTimingInfoFn,\n  audioSegmentTimingInfoFn,\n  id3Fn,\n  captionsFn,\n  isEndOfTimeline,\n  endedTimelineFn,\n  dataFn,\n  doneFn,\n  onTransmuxerLog\n}) => {\n  decrypt({\n    id: segment.requestId,\n    key: segment.key,\n    encryptedBytes: segment.encryptedBytes,\n    decryptionWorker\n  }, decryptedBytes => {\n    segment.bytes = decryptedBytes;\n    handleSegmentBytes({\n      segment,\n      bytes: segment.bytes,\n      trackInfoFn,\n      timingInfoFn,\n      videoSegmentTimingInfoFn,\n      audioSegmentTimingInfoFn,\n      id3Fn,\n      captionsFn,\n      isEndOfTimeline,\n      endedTimelineFn,\n      dataFn,\n      doneFn,\n      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\nconst waitForCompletion = ({\n  activeXhrs,\n  decryptionWorker,\n  trackInfoFn,\n  timingInfoFn,\n  videoSegmentTimingInfoFn,\n  audioSegmentTimingInfoFn,\n  id3Fn,\n  captionsFn,\n  isEndOfTimeline,\n  endedTimelineFn,\n  dataFn,\n  doneFn,\n  onTransmuxerLog\n}) => {\n  let count = 0;\n  let didError = false;\n  return (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      const segmentFinish = function () {\n        if (segment.encryptedBytes) {\n          return decryptSegment({\n            decryptionWorker,\n            segment,\n            trackInfoFn,\n            timingInfoFn,\n            videoSegmentTimingInfoFn,\n            audioSegmentTimingInfoFn,\n            id3Fn,\n            captionsFn,\n            isEndOfTimeline,\n            endedTimelineFn,\n            dataFn,\n            doneFn,\n            onTransmuxerLog\n          });\n        } // Otherwise, everything is ready just continue\n\n        handleSegmentBytes({\n          segment,\n          bytes: segment.bytes,\n          trackInfoFn,\n          timingInfoFn,\n          videoSegmentTimingInfoFn,\n          audioSegmentTimingInfoFn,\n          id3Fn,\n          captionsFn,\n          isEndOfTimeline,\n          endedTimelineFn,\n          dataFn,\n          doneFn,\n          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,\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        }, decryptedBytes => {\n          segment.map.bytes = decryptedBytes;\n          parseInitSegment(segment, 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\nconst handleLoadEnd = ({\n  loadendState,\n  abortFn\n}) => event => {\n  const request = event.target;\n  if (request.aborted && abortFn && !loadendState.calledAbortFn) {\n    abortFn();\n    loadendState.calledAbortFn = true;\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\nconst handleProgress = ({\n  segment,\n  progressFn,\n  trackInfoFn,\n  timingInfoFn,\n  videoSegmentTimingInfoFn,\n  audioSegmentTimingInfoFn,\n  id3Fn,\n  captionsFn,\n  isEndOfTimeline,\n  endedTimelineFn,\n  dataFn\n}) => event => {\n  const 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 * 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\nconst mediaSegmentRequest = ({\n  xhr,\n  xhrOptions,\n  decryptionWorker,\n  segment,\n  abortFn,\n  progressFn,\n  trackInfoFn,\n  timingInfoFn,\n  videoSegmentTimingInfoFn,\n  audioSegmentTimingInfoFn,\n  id3Fn,\n  captionsFn,\n  isEndOfTimeline,\n  endedTimelineFn,\n  dataFn,\n  doneFn,\n  onTransmuxerLog\n}) => {\n  const activeXhrs = [];\n  const finishProcessingFn = waitForCompletion({\n    activeXhrs,\n    decryptionWorker,\n    trackInfoFn,\n    timingInfoFn,\n    videoSegmentTimingInfoFn,\n    audioSegmentTimingInfoFn,\n    id3Fn,\n    captionsFn,\n    isEndOfTimeline,\n    endedTimelineFn,\n    dataFn,\n    doneFn,\n    onTransmuxerLog\n  }); // optionally, request the decryption key\n\n  if (segment.key && !segment.key.bytes) {\n    const 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    const keyRequestOptions = merge(xhrOptions, {\n      uri: segment.key.resolvedUri,\n      responseType: 'arraybuffer'\n    });\n    const keyRequestCallback = handleKeyResponse(segment, objects, finishProcessingFn);\n    const 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    const differentMapKey = segment.map.key && (!segment.key || segment.key.resolvedUri !== segment.map.key.resolvedUri);\n    if (differentMapKey) {\n      const mapKeyRequestOptions = merge(xhrOptions, {\n        uri: segment.map.key.resolvedUri,\n        responseType: 'arraybuffer'\n      });\n      const mapKeyRequestCallback = handleKeyResponse(segment, [segment.map.key], finishProcessingFn);\n      const mapKeyXhr = xhr(mapKeyRequestOptions, mapKeyRequestCallback);\n      activeXhrs.push(mapKeyXhr);\n    }\n    const initSegmentOptions = merge(xhrOptions, {\n      uri: segment.map.resolvedUri,\n      responseType: 'arraybuffer',\n      headers: segmentXhrHeaders(segment.map)\n    });\n    const initSegmentRequestCallback = handleInitSegmentResponse({\n      segment,\n      finishProcessingFn\n    });\n    const initSegmentXhr = xhr(initSegmentOptions, initSegmentRequestCallback);\n    activeXhrs.push(initSegmentXhr);\n  }\n  const segmentRequestOptions = merge(xhrOptions, {\n    uri: segment.part && segment.part.resolvedUri || segment.resolvedUri,\n    responseType: 'arraybuffer',\n    headers: segmentXhrHeaders(segment)\n  });\n  const segmentRequestCallback = handleSegmentResponse({\n    segment,\n    finishProcessingFn,\n    responseType: segmentRequestOptions.responseType\n  });\n  const segmentXhr = xhr(segmentRequestOptions, segmentRequestCallback);\n  segmentXhr.addEventListener('progress', handleProgress({\n    segment,\n    progressFn,\n    trackInfoFn,\n    timingInfoFn,\n    videoSegmentTimingInfoFn,\n    audioSegmentTimingInfoFn,\n    id3Fn,\n    captionsFn,\n    isEndOfTimeline,\n    endedTimelineFn,\n    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  const loadendState = {};\n  activeXhrs.forEach(activeXhr => {\n    activeXhr.addEventListener('loadend', handleLoadEnd({\n      loadendState,\n      abortFn\n    }));\n  });\n  return () => abortAll(activeXhrs);\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 */\nconst 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\nconst getCodecs = function (media) {\n  // if the codecs were explicitly specified, use them instead of the\n  // defaults\n  const mediaAttributes = media.attributes || {};\n  if (mediaAttributes.CODECS) {\n    return codecs_js.parseCodecs(mediaAttributes.CODECS);\n  }\n};\nconst isMaat = (main, media) => {\n  const mediaAttributes = media.attributes || {};\n  return main && main.mediaGroups && main.mediaGroups.AUDIO && mediaAttributes.AUDIO && main.mediaGroups.AUDIO[mediaAttributes.AUDIO];\n};\nconst isMuxed = (main, media) => {\n  if (!isMaat(main, media)) {\n    return true;\n  }\n  const mediaAttributes = media.attributes || {};\n  const audioGroup = main.mediaGroups.AUDIO[mediaAttributes.AUDIO];\n  for (const 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};\nconst unwrapCodecList = function (codecList) {\n  const codecs = {};\n  codecList.forEach(({\n    mediaType,\n    type,\n    details\n  }) => {\n    codecs[mediaType] = codecs[mediaType] || [];\n    codecs[mediaType].push(codecs_js.translateLegacyCodec(`${type}${details}`));\n  });\n  Object.keys(codecs).forEach(function (mediaType) {\n    if (codecs[mediaType].length > 1) {\n      logFn$1(`multiple ${mediaType} codecs found as attributes: ${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};\nconst codecCount = function (codecObj) {\n  let 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\nconst codecsForPlaylist = function (main, media) {\n  const mediaAttributes = media.attributes || {};\n  const 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      const defaultCodecs = unwrapCodecList(codecs_js.codecsFromDefault(main, mediaAttributes.AUDIO) || []);\n      if (defaultCodecs.audio) {\n        codecInfo.audio = defaultCodecs.audio;\n      }\n    }\n  }\n  return codecInfo;\n};\nconst logFn = logger('PlaylistSelector');\nconst representationToString = function (representation) {\n  if (!representation || !representation.playlist) {\n    return;\n  }\n  const 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\nconst safeGetComputedStyle = function (el, property) {\n  if (!el) {\n    return '';\n  }\n  const result = window__default[\"default\"].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\nconst stableSort = function (array, sortFn) {\n  const newArray = array.slice();\n  array.sort(function (left, right) {\n    const 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\nconst comparePlaylistBandwidth = function (left, right) {\n  let leftBandwidth;\n  let rightBandwidth;\n  if (left.attributes.BANDWIDTH) {\n    leftBandwidth = left.attributes.BANDWIDTH;\n  }\n  leftBandwidth = leftBandwidth || window__default[\"default\"].Number.MAX_VALUE;\n  if (right.attributes.BANDWIDTH) {\n    rightBandwidth = right.attributes.BANDWIDTH;\n  }\n  rightBandwidth = rightBandwidth || window__default[\"default\"].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\nconst comparePlaylistResolution = function (left, right) {\n  let leftWidth;\n  let rightWidth;\n  if (left.attributes.RESOLUTION && left.attributes.RESOLUTION.width) {\n    leftWidth = left.attributes.RESOLUTION.width;\n  }\n  leftWidth = leftWidth || window__default[\"default\"].Number.MAX_VALUE;\n  if (right.attributes.RESOLUTION && right.attributes.RESOLUTION.width) {\n    rightWidth = right.attributes.RESOLUTION.width;\n  }\n  rightWidth = rightWidth || window__default[\"default\"].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\nlet simpleSelector = function (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  const options = {\n    bandwidth: playerBandwidth,\n    width: playerWidth,\n    height: playerHeight,\n    limitRenditionByPlayerDimensions\n  };\n  let 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  let sortedPlaylistReps = playlists.map(playlist => {\n    let bandwidth;\n    const width = playlist.attributes && playlist.attributes.RESOLUTION && playlist.attributes.RESOLUTION.width;\n    const height = playlist.attributes && playlist.attributes.RESOLUTION && playlist.attributes.RESOLUTION.height;\n    bandwidth = playlist.attributes && playlist.attributes.BANDWIDTH;\n    bandwidth = bandwidth || window__default[\"default\"].Number.MAX_VALUE;\n    return {\n      bandwidth,\n      width,\n      height,\n      playlist\n    };\n  });\n  stableSort(sortedPlaylistReps, (left, right) => left.bandwidth - right.bandwidth); // filter out any playlists that have been excluded due to\n  // incompatible configurations\n\n  sortedPlaylistReps = sortedPlaylistReps.filter(rep => !Playlist.isIncompatible(rep.playlist)); // filter out any playlists that have been disabled manually through the representations\n  // api or excluded temporarily due to playback errors.\n\n  let enabledPlaylistReps = sortedPlaylistReps.filter(rep => Playlist.isEnabled(rep.playlist));\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(rep => !Playlist.isDisabled(rep.playlist));\n  } // filter out any variant that has greater effective bitrate\n  // than the current estimated bandwidth\n\n  const bandwidthPlaylistReps = enabledPlaylistReps.filter(rep => rep.bandwidth * Config.BANDWIDTH_VARIANCE < playerBandwidth);\n  let 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  const bandwidthBestRep = bandwidthPlaylistReps.filter(rep => rep.bandwidth === highestRemainingBandwidthRep.bandwidth)[0]; // if we're not going to limit renditions by player size, make an early decision.\n\n  if (limitRenditionByPlayerDimensions === false) {\n    const chosenRep = bandwidthBestRep || enabledPlaylistReps[0] || sortedPlaylistReps[0];\n    if (chosenRep && chosenRep.playlist) {\n      let type = 'sortedPlaylistReps';\n      if (bandwidthBestRep) {\n        type = 'bandwidthBestRep';\n      }\n      if (enabledPlaylistReps[0]) {\n        type = 'enabledPlaylistReps';\n      }\n      logFn(`choosing ${representationToString(chosenRep)} using ${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  const haveResolution = bandwidthPlaylistReps.filter(rep => rep.width && rep.height); // sort variants by resolution\n\n  stableSort(haveResolution, (left, right) => left.width - right.width); // if we have the exact resolution as the player use it\n\n  const resolutionBestRepList = haveResolution.filter(rep => rep.width === playerWidth && rep.height === playerHeight);\n  highestRemainingBandwidthRep = resolutionBestRepList[resolutionBestRepList.length - 1]; // ensure that we pick the highest bandwidth variant that have exact resolution\n\n  const resolutionBestRep = resolutionBestRepList.filter(rep => rep.bandwidth === highestRemainingBandwidthRep.bandwidth)[0];\n  let resolutionPlusOneList;\n  let resolutionPlusOneSmallest;\n  let 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(rep => rep.width > playerWidth || rep.height > playerHeight); // find all the variants have the same smallest resolution\n\n    resolutionPlusOneSmallest = resolutionPlusOneList.filter(rep => rep.width === resolutionPlusOneList[0].width && rep.height === resolutionPlusOneList[0].height); // 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(rep => rep.bandwidth === highestRemainingBandwidthRep.bandwidth)[0];\n  }\n  let 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    const leastPixelDiffList = haveResolution.map(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, (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  const chosenRep = leastPixelDiffRep || resolutionPlusOneRep || resolutionBestRep || bandwidthBestRep || enabledPlaylistReps[0] || sortedPlaylistReps[0];\n  if (chosenRep && chosenRep.playlist) {\n    let type = 'sortedPlaylistReps';\n    if (leastPixelDiffRep) {\n      type = 'leastPixelDiffRep';\n    } else if (resolutionPlusOneRep) {\n      type = 'resolutionPlusOneRep';\n    } else if (resolutionBestRep) {\n      type = 'resolutionBestRep';\n    } else if (bandwidthBestRep) {\n      type = 'bandwidthBestRep';\n    } else if (enabledPlaylistReps[0]) {\n      type = 'enabledPlaylistReps';\n    }\n    logFn(`choosing ${representationToString(chosenRep)} using ${type} 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\nconst lastBandwidthSelector = function () {\n  const pixelRatio = this.useDevicePixelRatio ? window__default[\"default\"].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\nconst movingAverageBandwidthSelector = function (decay) {\n  let average = -1;\n  let 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    const pixelRatio = this.useDevicePixelRatio ? window__default[\"default\"].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\nconst minRebufferMaxBandwidthSelector = function (settings) {\n  const {\n    main,\n    currentTime,\n    bandwidth,\n    duration,\n    segmentDuration,\n    timeUntilRebuffer,\n    currentTimeline,\n    syncController\n  } = settings; // filter out any playlists that have been excluded due to\n  // incompatible configurations\n\n  const compatiblePlaylists = main.playlists.filter(playlist => !Playlist.isIncompatible(playlist)); // filter out any playlists that have been disabled manually through the representations\n  // api or excluded temporarily due to playback errors.\n\n  let 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(playlist => !Playlist.isDisabled(playlist));\n  }\n  const bandwidthPlaylists = enabledPlaylists.filter(Playlist.hasAttribute.bind(null, 'BANDWIDTH'));\n  const rebufferingEstimates = bandwidthPlaylists.map(playlist => {\n    const 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    const numRequests = syncPoint ? 1 : 2;\n    const requestTimeEstimate = Playlist.estimateSegmentRequestTime(segmentDuration, bandwidth, playlist);\n    const rebufferingImpact = requestTimeEstimate * numRequests - timeUntilRebuffer;\n    return {\n      playlist,\n      rebufferingImpact\n    };\n  });\n  const noRebufferingPlaylists = rebufferingEstimates.filter(estimate => estimate.rebufferingImpact <= 0); // Sort by bandwidth DESC\n\n  stableSort(noRebufferingPlaylists, (a, b) => comparePlaylistBandwidth(b.playlist, a.playlist));\n  if (noRebufferingPlaylists.length) {\n    return noRebufferingPlaylists[0];\n  }\n  stableSort(rebufferingEstimates, (a, b) => a.rebufferingImpact - b.rebufferingImpact);\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\nconst lowestBitrateCompatibleVariantSelector = function () {\n  // filter out any playlists that have been excluded due to\n  // incompatible configurations or playback errors\n  const playlists = this.playlists.main.playlists.filter(Playlist.isEnabled); // Sort ascending by bitrate\n\n  stableSort(playlists, (a, b) => comparePlaylistBandwidth(a, b)); // 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  const playlistsWithVideo = playlists.filter(playlist => !!codecsForPlaylist(this.playlists.main, playlist).video);\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 */\nconst concatSegments = segmentObj => {\n  let offset = 0;\n  let 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(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\nconst createCaptionsTrackIfNotExists = function (inbandTextTracks, tech, captionStream) {\n  if (!inbandTextTracks[captionStream]) {\n    tech.trigger({\n      type: 'usage',\n      name: 'vhs-608'\n    });\n    let 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    const 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      const captionServices = tech.options_.vhs && tech.options_.vhs.captionServices || {};\n      let label = captionStream;\n      let language = captionStream;\n      let def = false;\n      const 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,\n        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\nconst addCaptionData = function ({\n  inbandTextTracks,\n  captionArray,\n  timestampOffset\n}) {\n  if (!captionArray) {\n    return;\n  }\n  const Cue = window__default[\"default\"].WebKitDataCue || window__default[\"default\"].VTTCue;\n  captionArray.forEach(caption => {\n    const 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(value => {\n        const 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\nconst deprecateOldCue = function (cue) {\n  Object.defineProperties(cue.frame, {\n    id: {\n      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() {\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() {\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\nconst addMetadata = ({\n  inbandTextTracks,\n  metadataArray,\n  timestampOffset,\n  videoDuration\n}) => {\n  if (!metadataArray) {\n    return;\n  }\n  const Cue = window__default[\"default\"].WebKitDataCue || window__default[\"default\"].VTTCue;\n  const metadataTrack = inbandTextTracks.metadataTrack_;\n  if (!metadataTrack) {\n    return;\n  }\n  metadataArray.forEach(metadata => {\n    const 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__default[\"default\"].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(frame => {\n      const 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  const cues = metadataTrack.cues;\n  const cuesArray = []; // Create a copy of the TextTrackCueList...\n  // ...disregarding cues with a falsey value\n\n  for (let i = 0; i < cues.length; i++) {\n    if (cues[i]) {\n      cuesArray.push(cues[i]);\n    }\n  } // Group cues by their startTime value\n\n  const cuesGroupedByStartTime = cuesArray.reduce((obj, cue) => {\n    const timeSlot = obj[cue.startTime] || [];\n    timeSlot.push(cue);\n    obj[cue.startTime] = timeSlot;\n    return obj;\n  }, {}); // Sort startTimes by ascending order\n\n  const sortedStartTimes = Object.keys(cuesGroupedByStartTime).sort((a, b) => Number(a) - Number(b)); // Map each cue group's endTime to the next group's startTime\n\n  sortedStartTimes.forEach((startTime, idx) => {\n    const cueGroup = cuesGroupedByStartTime[startTime];\n    const finiteDuration = isFinite(videoDuration) ? videoDuration : startTime;\n    const nextTime = Number(sortedStartTimes[idx + 1]) || finiteDuration; // Map each cue's endTime the next group's startTime\n\n    cueGroup.forEach(cue => {\n      cue.endTime = nextTime;\n    });\n  });\n}; // object for mapping daterange attributes\n\nconst 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};\nconst 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\nconst addDateRangeMetadata = ({\n  inbandTextTracks,\n  dateRanges\n}) => {\n  const metadataTrack = inbandTextTracks.metadataTrack_;\n  if (!metadataTrack) {\n    return;\n  }\n  const Cue = window__default[\"default\"].WebKitDataCue || window__default[\"default\"].VTTCue;\n  dateRanges.forEach(dateRange => {\n    // we generate multiple cues for each date range with different attributes\n    for (const key of Object.keys(dateRange)) {\n      if (dateRangeKeysToOmit.has(key)) {\n        continue;\n      }\n      const 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\nconst 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\nconst removeCuesFromTrack = function (start, end, track) {\n  let i;\n  let 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\nconst removeDuplicateCuesFromTrack = function (track) {\n  const cues = track.cues;\n  if (!cues) {\n    return;\n  }\n  const uniqueCues = {};\n  for (let i = cues.length - 1; i >= 0; i--) {\n    const cue = cues[i];\n    const cueKey = `${cue.startTime}-${cue.endTime}-${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\nconst 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  const currentTimePts = Math.ceil((currentTime - mapping + 3) * clock.ONE_SECOND_IN_TS);\n  let 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\nconst 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  const start = gops[0].pts;\n  let 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\nconst removeGopBuffer = (buffer, start, end, mapping) => {\n  const startPts = Math.ceil((start - mapping) * clock.ONE_SECOND_IN_TS);\n  const endPts = Math.ceil((end - mapping) * clock.ONE_SECOND_IN_TS);\n  const updatedBuffer = buffer.slice();\n  let 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  let 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};\nconst shallowEqual = function (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  const akeys = Object.keys(a).sort();\n  const bkeys = Object.keys(b).sort(); // different number of keys, not equal\n\n  if (akeys.length !== bkeys.length) {\n    return false;\n  }\n  for (let i = 0; i < akeys.length; i++) {\n    const key = akeys[i]; // different sorted keys, not equal\n\n    if (key !== bkeys[i]) {\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\nconst 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\nconst getSyncSegmentCandidate = function (currentTimeline, segments, targetTime) {\n  segments = segments || [];\n  const timelineSegments = [];\n  let time = 0;\n  for (let i = 0; i < segments.length; i++) {\n    const segment = segments[i];\n    if (currentTimeline === segment.timeline) {\n      timelineSegments.push(i);\n      time += segment.duration;\n      if (time > targetTime) {\n        return i;\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\nconst MIN_BACK_BUFFER = 1; // in ms\n\nconst CHECK_BUFFER_DELAY = 500;\nconst finite = num => typeof num === 'number' && isFinite(num); // 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\nconst MIN_SEGMENT_DURATION_TO_SAVE_STATS = 1 / 60;\nconst 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\nconst 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  let 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  const maxTrimTime = currentTime - targetDuration;\n  return Math.min(maxTrimTime, trimTime);\n};\nconst segmentInfoString = segmentInfo => {\n  const {\n    startOfSegment,\n    duration,\n    segment,\n    part,\n    playlist: {\n      mediaSequence: seq,\n      id,\n      segments = []\n    },\n    mediaIndex: index,\n    partIndex,\n    timeline\n  } = segmentInfo;\n  const segmentLen = segments.length - 1;\n  let selection = 'mediaIndex/partIndex increment';\n  if (segmentInfo.getMediaInfoForTime) {\n    selection = `getMediaInfoForTime (${segmentInfo.getMediaInfoForTime})`;\n  } else if (segmentInfo.isSyncRequest) {\n    selection = 'getSyncSegmentCandidate (isSyncRequest)';\n  }\n  if (segmentInfo.independent) {\n    selection += ` with independent ${segmentInfo.independent}`;\n  }\n  const hasPartIndex = typeof partIndex === 'number';\n  const name = segmentInfo.segment.uri ? 'segment' : 'pre-segment';\n  const zeroBasedPartCount = hasPartIndex ? getKnownPartCount({\n    preloadSegment: segment\n  }) - 1 : 0;\n  return `${name} [${seq + index}/${seq + segmentLen}]` + (hasPartIndex ? ` part [${partIndex}/${zeroBasedPartCount}]` : '') + ` segment start/end [${segment.start} => ${segment.end}]` + (hasPartIndex ? ` part start/end [${part.start} => ${part.end}]` : '') + ` startOfSegment [${startOfSegment}]` + ` duration [${duration}]` + ` timeline [${timeline}]` + ` selected by [${selection}]` + ` playlist [${id}]`;\n};\nconst timingInfoPropertyForMedia = mediaType => `${mediaType}TimingInfo`;\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} 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\nconst timestampOffsetForSegment = ({\n  segmentTimeline,\n  currentTimeline,\n  startOfSegment,\n  buffered,\n  overrideCheck\n}) => {\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  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 buffered.length ? buffered.end(buffered.length - 1) : 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\nconst shouldWaitForTimelineChange = ({\n  timelineChangeController,\n  currentTimeline,\n  segmentTimeline,\n  loaderType,\n  audioDisabled\n}) => {\n  if (currentTimeline === segmentTimeline) {\n    return false;\n  }\n  if (loaderType === 'audio') {\n    const 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    const 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};\nconst mediaDuration = timingInfos => {\n  let maxDuration = 0;\n  ['video', 'audio'].forEach(function (type) {\n    const typeTimingInfo = timingInfos[`${type}TimingInfo`];\n    if (!typeTimingInfo) {\n      return;\n    }\n    const {\n      start,\n      end\n    } = typeTimingInfo;\n    let duration;\n    if (typeof start === 'bigint' || typeof end === 'bigint') {\n      duration = window__default[\"default\"].BigInt(end) - window__default[\"default\"].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};\nconst segmentTooLong = ({\n  segmentDuration,\n  maxDuration\n}) => {\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};\nconst 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  const 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  const targetDuration = segmentInfo.playlist.targetDuration;\n  const isSegmentWayTooLong = segmentTooLong({\n    segmentDuration,\n    maxDuration: targetDuration * 2\n  });\n  const isSegmentSlightlyTooLong = segmentTooLong({\n    segmentDuration,\n    maxDuration: targetDuration\n  });\n  const segmentTooLongMessage = `Segment with index ${segmentInfo.mediaIndex} ` + `from playlist ${segmentInfo.playlist.id} ` + `has a duration of ${segmentDuration} ` + `when the reported duration is ${segmentInfo.duration} ` + `and the target duration is ${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 */\n\nclass SegmentLoader extends videojs.EventTarget {\n  constructor(settings, options = {}) {\n    super(); // 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    this.bandwidth = settings.bandwidth;\n    this.throughput = {\n      rate: 0,\n      count: 0\n    };\n    this.roundTrip = NaN;\n    this.resetStats_();\n    this.mediaIndex = null;\n    this.partIndex = null; // private settings\n\n    this.hasPlayed_ = settings.hasPlayed;\n    this.currentTime_ = settings.currentTime;\n    this.seekable_ = settings.seekable;\n    this.seeking_ = settings.seeking;\n    this.duration_ = settings.duration;\n    this.mediaSource_ = settings.mediaSource;\n    this.vhs_ = settings.vhs;\n    this.loaderType_ = settings.loaderType;\n    this.currentMediaInfo_ = void 0;\n    this.startingMediaInfo_ = void 0;\n    this.segmentMetadataTrack_ = settings.segmentMetadataTrack;\n    this.goalBufferLength_ = settings.goalBufferLength;\n    this.sourceType_ = settings.sourceType;\n    this.sourceUpdater_ = settings.sourceUpdater;\n    this.inbandTextTracks_ = settings.inbandTextTracks;\n    this.state_ = 'INIT';\n    this.timelineChangeController_ = settings.timelineChangeController;\n    this.shouldSaveSegmentTimingInfo_ = true;\n    this.parse708captions_ = settings.parse708captions;\n    this.useDtsForTimestampOffset_ = settings.useDtsForTimestampOffset;\n    this.captionServices_ = settings.captionServices;\n    this.exactManifestTimings = settings.exactManifestTimings;\n    this.addMetadataToTextTrack = settings.addMetadataToTextTrack; // private instance variables\n\n    this.checkBufferTimeout_ = null;\n    this.error_ = void 0;\n    this.currentTimeline_ = -1;\n    this.shouldForceTimestampOffsetAfterResync_ = false;\n    this.pendingSegment_ = null;\n    this.xhrOptions_ = null;\n    this.pendingSegments_ = [];\n    this.audioDisabled_ = false;\n    this.isPendingTimestampOffset_ = false; // TODO possibly move gopBuffer and timeMapping info to a separate controller\n\n    this.gopBuffer_ = [];\n    this.timeMapping_ = 0;\n    this.safeAppend_ = false;\n    this.appendInitSegment_ = {\n      audio: true,\n      video: true\n    };\n    this.playlistOfLastInitSegment_ = {\n      audio: null,\n      video: null\n    };\n    this.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    this.loadQueue_ = [];\n    this.metadataQueue_ = {\n      id3: [],\n      caption: []\n    };\n    this.waitingOnRemove_ = false;\n    this.quotaExceededErrorRetryTimeout_ = null; // Fragmented mp4 playback\n\n    this.activeInitSegmentId_ = null;\n    this.initSegments_ = {}; // HLSe playback\n\n    this.cacheEncryptionKeys_ = settings.cacheEncryptionKeys;\n    this.keyCache_ = {};\n    this.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    this.syncController_ = settings.syncController;\n    this.syncPoint_ = {\n      segmentIndex: 0,\n      time: 0\n    };\n    this.transmuxer_ = this.createTransmuxer_();\n    this.triggerSyncInfoUpdate_ = () => this.trigger('syncinfoupdate');\n    this.syncController_.on('syncinfoupdate', this.triggerSyncInfoUpdate_);\n    this.mediaSource_.addEventListener('sourceopen', () => {\n      if (!this.isEndOfStream_()) {\n        this.ended_ = false;\n      }\n    }); // ...for determining the fetch location\n\n    this.fetchAtBuffer_ = false;\n    this.logger_ = logger(`SegmentLoader[${this.loaderType_}]`);\n    Object.defineProperty(this, 'state', {\n      get() {\n        return this.state_;\n      },\n      set(newState) {\n        if (newState !== this.state_) {\n          this.logger_(`${this.state_} -> ${newState}`);\n          this.state_ = newState;\n          this.trigger('statechange');\n        }\n      }\n    });\n    this.sourceUpdater_.on('ready', () => {\n      if (this.hasEnoughInfoToAppend_()) {\n        this.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 (this.loaderType_ === 'main') {\n      this.timelineChangeController_.on('pendingtimelinechange', () => {\n        if (this.hasEnoughInfoToAppend_()) {\n          this.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 (this.loaderType_ === 'audio') {\n      this.timelineChangeController_.on('timelinechange', () => {\n        if (this.hasEnoughInfoToLoad_()) {\n          this.processLoadQueue_();\n        }\n        if (this.hasEnoughInfoToAppend_()) {\n          this.processCallQueue_();\n        }\n      });\n    }\n  }\n  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  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  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__default[\"default\"].clearTimeout(this.checkBufferTimeout_);\n    }\n    if (this.syncController_ && this.triggerSyncInfoUpdate_) {\n      this.syncController_.off('syncinfoupdate', this.triggerSyncInfoUpdate_);\n    }\n    this.off();\n  }\n  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  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  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__default[\"default\"].clearTimeout(this.quotaExceededErrorRetryTimeout_);\n    this.quotaExceededErrorRetryTimeout_ = null;\n  }\n  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  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  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  buffered_() {\n    const trackInfo = this.getMediaInfo_();\n    if (!this.sourceUpdater_ || !trackInfo) {\n      return createTimeRanges();\n    }\n    if (this.loaderType_ === 'main') {\n      const {\n        hasAudio,\n        hasVideo,\n        isMuxed\n      } = trackInfo;\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  initSegmentForMap(map, set = false) {\n    if (!map) {\n      return null;\n    }\n    const id = initSegmentId(map);\n    let 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  segmentKey(key, set = false) {\n    if (!key) {\n      return null;\n    }\n    const id = segmentKeyId(key);\n    let 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    const 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  couldBeginLoading_() {\n    return this.playlist_ && !this.paused();\n  }\n  /**\n   * load a playlist and start to fill the buffer\n   */\n\n  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  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  playlist(newPlaylist, options = {}) {\n    if (!newPlaylist) {\n      return;\n    }\n    const oldPlaylist = this.playlist_;\n    const 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    let 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 [${oldId} => ${newPlaylist.id || newPlaylist.uri}]`);\n    this.syncController_.updateMediaSequenceMap(newPlaylist, this.currentTime_(), this.loaderType_); // 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        const 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    const mediaSequenceDiff = newPlaylist.mediaSequence - oldPlaylist.mediaSequence;\n    this.logger_(`live window shift [${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        const 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          const mediaIndex = this.mediaIndex;\n          this.logger_(`currently processing part (index ${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  pause() {\n    if (this.checkBufferTimeout_) {\n      window__default[\"default\"].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  paused() {\n    return this.checkBufferTimeout_ === null;\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  resetEverything(done) {\n    this.ended_ = false;\n    this.activeInitSegmentId_ = null;\n    this.appendInitSegment_ = {\n      audio: true,\n      video: true\n    };\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  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  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.shouldForceTimestampOffsetAfterResync_ = true;\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  remove(start, end, done = () => {}, force = 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    let removesRemaining = 1;\n    const 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 (const 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  monitorBuffer_() {\n    if (this.checkBufferTimeout_) {\n      window__default[\"default\"].clearTimeout(this.checkBufferTimeout_);\n    }\n    this.checkBufferTimeout_ = window__default[\"default\"].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  monitorBufferTick_() {\n    if (this.state === 'READY') {\n      this.fillBuffer_();\n    }\n    if (this.checkBufferTimeout_) {\n      window__default[\"default\"].clearTimeout(this.checkBufferTimeout_);\n    }\n    this.checkBufferTimeout_ = window__default[\"default\"].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  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    const 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  isEndOfStream_(mediaIndex = this.mediaIndex, playlist = this.playlist_, partIndex = this.partIndex) {\n    if (!playlist || !this.mediaSource_) {\n      return false;\n    }\n    const segment = typeof mediaIndex === 'number' && playlist.segments[mediaIndex]; // mediaIndex is zero based but length is 1 based\n\n    const appendedLastSegment = mediaIndex + 1 === playlist.segments.length; // true if there are no parts, or this is the last part.\n\n    const 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  chooseNextRequest_() {\n    const buffered = this.buffered_();\n    const bufferedEnd = lastBufferedEnd(buffered) || 0;\n    const bufferedTime = timeAheadOf(buffered, this.currentTime_());\n    const preloaded = !this.hasPlayed_() && bufferedTime >= 1;\n    const haveEnoughBuffer = bufferedTime >= this.goalBufferLength_();\n    const 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_(), this.loaderType_);\n    const 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      this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${next.mediaIndex}`);\n    } else if (this.mediaIndex !== null) {\n      const segment = segments[this.mediaIndex];\n      const 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      const {\n        segmentIndex,\n        startTime,\n        partIndex\n      } = 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      next.getMediaInfoForTime = this.fetchAtBuffer_ ? `bufferedEnd ${bufferedEnd}` : `currentTime ${this.currentTime_()}`;\n      next.mediaIndex = segmentIndex;\n      next.startOfSegment = startTime;\n      next.partIndex = partIndex;\n      this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${next.mediaIndex} `);\n    }\n    const nextSegment = segments[next.mediaIndex];\n    let 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    const 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        const lastSegment = segments[next.mediaIndex - 1];\n        const 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    const 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    if (this.shouldForceTimestampOffsetAfterResync_) {\n      this.shouldForceTimestampOffsetAfterResync_ = false;\n      next.forceTimestampOffset = true;\n      this.logger_('choose next request. Force timestamp offset after loader resync');\n    }\n    return this.generateSegmentInfo_(next);\n  }\n  generateSegmentInfo_(options) {\n    const {\n      independent,\n      playlist,\n      mediaIndex,\n      startOfSegment,\n      isSyncRequest,\n      partIndex,\n      forceTimestampOffset,\n      getMediaInfoForTime\n    } = options;\n    const segment = playlist.segments[mediaIndex];\n    const part = typeof partIndex === 'number' && segment.parts[partIndex];\n    const 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,\n      partIndex: part ? partIndex : null,\n      // whether or not to update the SegmentLoader's state with this\n      // segment's mediaIndex\n      isSyncRequest,\n      startOfSegment,\n      // the segment's playlist\n      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,\n      part,\n      byteLength: 0,\n      transmuxer: this.transmuxer_,\n      // type of getMediaInfoForTime that was used to get this segment\n      getMediaInfoForTime,\n      independent\n    };\n    const overrideCheck = typeof forceTimestampOffset !== 'undefined' ? forceTimestampOffset : this.isPendingTimestampOffset_;\n    segmentInfo.timestampOffset = this.timestampOffsetForSegment_({\n      segmentTimeline: segment.timeline,\n      currentTimeline: this.currentTimeline_,\n      startOfSegment,\n      buffered: this.buffered_(),\n      overrideCheck\n    });\n    const 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  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  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    const currentTime = this.currentTime_();\n    const measuredBandwidth = stats.bandwidth;\n    const segmentDuration = this.pendingSegment_.duration;\n    const 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    const 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    const switchCandidate = minRebufferMaxBandwidthSelector({\n      main: this.vhs_.playlists.main,\n      currentTime,\n      bandwidth: measuredBandwidth,\n      duration: this.duration_(),\n      segmentDuration,\n      timeUntilRebuffer: timeUntilRebuffer$1,\n      currentTimeline: this.currentTimeline_,\n      syncController: this.syncController_\n    });\n    if (!switchCandidate) {\n      return;\n    }\n    const rebufferingImpact = requestTimeRemaining - timeUntilRebuffer$1;\n    const timeSavedBySwitching = rebufferingImpact - switchCandidate.rebufferingImpact;\n    let 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  handleAbort_(segmentInfo) {\n    this.logger_(`Aborting ${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  handleProgress_(event, simpleSegment) {\n    this.earlyAbortWhenNeeded_(simpleSegment.stats);\n    if (this.checkForAbort_(simpleSegment.requestId)) {\n      return;\n    }\n    this.trigger('progress');\n  }\n  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  handleTimingInfo_(simpleSegment, mediaType, timeType, time) {\n    this.earlyAbortWhenNeeded_(simpleSegment.stats);\n    if (this.checkForAbort_(simpleSegment.requestId)) {\n      return;\n    }\n    const segmentInfo = this.pendingSegment_;\n    const timingInfoProperty = timingInfoPropertyForMedia(mediaType);\n    segmentInfo[timingInfoProperty] = segmentInfo[timingInfoProperty] || {};\n    segmentInfo[timingInfoProperty][timeType] = time;\n    this.logger_(`timinginfo: ${mediaType} - ${timeType} - ${time}`); // check if any calls were waiting on the timing info\n\n    if (this.hasEnoughInfoToAppend_()) {\n      this.processCallQueue_();\n    }\n  }\n  handleCaptions_(simpleSegment, captionData) {\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    const 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    const timestampOffset = this.sourceUpdater_.videoTimestampOffset() === null ? this.sourceUpdater_.audioTimestampOffset() : this.sourceUpdater_.videoTimestampOffset();\n    const captionTracks = {}; // get total start/end and captions for each track/stream\n\n    captionData.forEach(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      const 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(trackName => {\n      const {\n        startTime,\n        endTime,\n        captions\n      } = captionTracks[trackName];\n      const inbandTextTracks = this.inbandTextTracks_;\n      this.logger_(`adding cues from ${startTime} -> ${endTime} for ${trackName}`);\n      createCaptionsTrackIfNotExists(inbandTextTracks, this.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,\n        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  handleId3_(simpleSegment, id3Frames, dispatchType) {\n    this.earlyAbortWhenNeeded_(simpleSegment.stats);\n    if (this.checkForAbort_(simpleSegment.requestId)) {\n      return;\n    }\n    const 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  processMetadataQueue_() {\n    this.metadataQueue_.id3.forEach(fn => fn());\n    this.metadataQueue_.caption.forEach(fn => fn());\n    this.metadataQueue_.id3 = [];\n    this.metadataQueue_.caption = [];\n  }\n  processCallQueue_() {\n    const 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(fun => fun());\n  }\n  processLoadQueue_() {\n    const 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(fun => fun());\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  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    const 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  getCurrentMediaInfo_(segmentInfo = this.pendingSegment_) {\n    return segmentInfo && segmentInfo.trackInfo || this.currentMediaInfo_;\n  }\n  getMediaInfo_(segmentInfo = this.pendingSegment_) {\n    return this.getCurrentMediaInfo_(segmentInfo) || this.startingMediaInfo_;\n  }\n  getPendingSegmentPlaylist() {\n    return this.pendingSegment_ ? this.pendingSegment_.playlist : null;\n  }\n  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    const segmentInfo = this.pendingSegment_;\n    const 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    const {\n      hasAudio,\n      hasVideo,\n      isMuxed\n    } = trackInfo;\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  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    const 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      const trackInfo = this.getCurrentMediaInfo_();\n      const useVideoTimingInfo = this.loaderType_ === 'main' && trackInfo && trackInfo.hasVideo;\n      let 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,\n        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,\n        shouldSaveTimelineMapping: this.loaderType_ === 'main'\n      });\n      const 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  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  getInitSegmentAndUpdateState_({\n    type,\n    initSegment,\n    map,\n    playlist\n  }) {\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      const 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  handleQuotaExceededError_({\n    segmentInfo,\n    type,\n    bytes\n  }, error) {\n    const audioBuffered = this.sourceUpdater_.audioBuffered();\n    const 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    const audioBufferStart = audioBuffered.length ? audioBuffered.start(0) : 0;\n    const audioBufferEnd = audioBuffered.length ? audioBuffered.end(audioBuffered.length - 1) : 0;\n    const videoBufferStart = videoBuffered.length ? videoBuffered.start(0) : 0;\n    const 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: ${bytes.byteLength}, ` + `audio buffer: ${timeRangesToArray(audioBuffered).join(', ')}, ` + `video buffer: ${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,\n      type,\n      bytes\n    }));\n    const currentTime = this.currentTime_(); // Try to remove as much audio and video as possible to make room for new content\n    // before retrying.\n\n    const timeToRemoveUntil = currentTime - MIN_BACK_BUFFER;\n    this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${timeToRemoveUntil}`);\n    this.remove(0, timeToRemoveUntil, () => {\n      this.logger_(`On QUOTA_EXCEEDED_ERR, retrying append in ${MIN_BACK_BUFFER}s`);\n      this.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      this.quotaExceededErrorRetryTimeout_ = window__default[\"default\"].setTimeout(() => {\n        this.logger_('On QUOTA_EXCEEDED_ERR, re-processing call queue');\n        this.quotaExceededErrorRetryTimeout_ = null;\n        this.processCallQueue_();\n      }, MIN_BACK_BUFFER * 1000);\n    }, true);\n  }\n  handleAppendError_({\n    segmentInfo,\n    type,\n    bytes\n  }, error) {\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,\n        type,\n        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(`${type} append of ${bytes.length}b failed for segment ` + `#${segmentInfo.mediaIndex} in playlist ${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  appendToSourceBuffer_({\n    segmentInfo,\n    type,\n    initSegment,\n    data,\n    bytes\n  }) {\n    // If this is a re-append, bytes were already created and don't need to be recreated\n    if (!bytes) {\n      const segments = [data];\n      let 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\n      });\n    }\n    this.sourceUpdater_.appendBuffer({\n      segmentInfo,\n      type,\n      bytes\n    }, this.handleAppendError_.bind(this, {\n      segmentInfo,\n      type,\n      bytes\n    }));\n  }\n  handleSegmentTimingInfo_(type, requestId, segmentTimingInfo) {\n    if (!this.pendingSegment_ || requestId !== this.pendingSegment_.requestId) {\n      return;\n    }\n    const segment = this.pendingSegment_.segment;\n    const timingInfoProperty = `${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  appendData_(segmentInfo, result) {\n    const {\n      type,\n      data\n    } = result;\n    if (!data || !data.byteLength) {\n      return;\n    }\n    if (type === 'audio' && this.audioDisabled_) {\n      return;\n    }\n    const initSegment = this.getInitSegmentAndUpdateState_({\n      type,\n      initSegment: result.initSegment,\n      playlist: segmentInfo.playlist,\n      map: segmentInfo.isFmp4 ? segmentInfo.segment.map : null\n    });\n    this.appendToSourceBuffer_({\n      segmentInfo,\n      type,\n      initSegment,\n      data\n    });\n  }\n  /**\n   * load a specific segment from a request into the buffer\n   *\n   * @private\n   */\n\n  loadSegment_(segmentInfo) {\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(() => {\n        // regenerate the audioAppendStart, timestampOffset, etc as they\n        // may have changed since this function was added to the queue.\n        const options = _extends__default[\"default\"]({}, segmentInfo, {\n          forceTimestampOffset: true\n        });\n        _extends__default[\"default\"](segmentInfo, this.generateSegmentInfo_(options));\n        this.isPendingTimestampOffset_ = false;\n        this.updateTransmuxerAndRequestSegment_(segmentInfo);\n      });\n      return;\n    }\n    this.updateTransmuxerAndRequestSegment_(segmentInfo);\n  }\n  updateTransmuxerAndRequestSegment_(segmentInfo) {\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    const simpleSegment = this.createSimplifiedSegmentObj_(segmentInfo);\n    const isEndOfStream = this.isEndOfStream_(segmentInfo.mediaIndex, segmentInfo.playlist, segmentInfo.partIndex);\n    const isWalkingForward = this.mediaIndex !== null;\n    const 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    const isEndOfTimeline = isEndOfStream || isWalkingForward && isDiscontinuity;\n    this.logger_(`Requesting ${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,\n      endedTimelineFn: () => {\n        this.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: ({\n        message,\n        level,\n        stream\n      }) => {\n        this.logger_(`${segmentInfoString(segmentInfo)} logged from transmuxer stream ${stream} as a ${level}: ${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  trimBackBuffer_(segmentInfo) {\n    const 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  createSimplifiedSegmentObj_(segmentInfo) {\n    const segment = segmentInfo.segment;\n    const part = segmentInfo.part;\n    const 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    const 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      const 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  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  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 ${duration}` + ` is less than the min to record ${MIN_SEGMENT_DURATION_TO_SAVE_STATS}`);\n      return;\n    }\n    this.bandwidth = stats.bandwidth;\n    this.roundTrip = stats.roundTripTime;\n  }\n  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  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    const 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  setTimeMapping_(timeline) {\n    const timelineMapping = this.syncController_.mappingForTimeline(timeline);\n    if (timelineMapping !== null) {\n      this.timeMapping_ = timelineMapping;\n    }\n  }\n  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  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  trueSegmentStart_({\n    currentStart,\n    playlist,\n    mediaIndex,\n    firstVideoFrameTimeForData,\n    currentVideoTimestampOffset,\n    useVideoTimingInfo,\n    videoTimingInfo,\n    audioTimingInfo\n  }) {\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    const 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  waitForAppendsToComplete_(segmentInfo) {\n    const 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    const {\n      hasAudio,\n      hasVideo,\n      isMuxed\n    } = trackInfo;\n    const waitForVideo = this.loaderType_ === 'main' && hasVideo;\n    const 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  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  checkForIllegalMediaSwitch(trackInfo) {\n    const 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  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    let 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  getSegmentStartTimeForTimestampOffsetCalculation_({\n    videoTimingInfo,\n    audioTimingInfo,\n    timingInfo\n  }) {\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  updateTimingInfoEnd_(segmentInfo) {\n    segmentInfo.timingInfo = segmentInfo.timingInfo || {};\n    const trackInfo = this.getMediaInfo_();\n    const useVideoTimingInfo = this.loaderType_ === 'main' && trackInfo && trackInfo.hasVideo;\n    const 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  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    const 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,\n        shouldSaveTimelineMapping: this.loaderType_ === 'main'\n      });\n    }\n    const 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 ${segmentInfoString(segmentInfo)}`);\n        return;\n      }\n    }\n    this.logger_(`Appended ${segmentInfoString(segmentInfo)}`);\n    this.addSegmentMetadataCue_(segmentInfo);\n    this.fetchAtBuffer_ = true;\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    const segment = segmentInfo.segment;\n    const part = segmentInfo.part;\n    const badSegmentGuess = segment.end && this.currentTime_() - segment.end > segmentInfo.playlist.targetDuration * 3;\n    const 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 ${badSegmentGuess ? 'segment' : 'part'} ${segmentInfoString(segmentInfo)}`);\n      this.resetEverything();\n      return;\n    }\n    const 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  recordThroughput_(segmentInfo) {\n    if (segmentInfo.duration < MIN_SEGMENT_DURATION_TO_SAVE_STATS) {\n      this.logger_(`Ignoring segment's throughput because its duration of ${segmentInfo.duration}` + ` is less than the min to record ${MIN_SEGMENT_DURATION_TO_SAVE_STATS}`);\n      return;\n    }\n    const 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    const segmentProcessingTime = Date.now() - segmentInfo.endOfAllRequests + 1; // Multiply by 8000 to convert from bytes/millisecond to bits/second\n\n    const 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  addSegmentMetadataCue_(segmentInfo) {\n    if (!this.segmentMetadataTrack_) {\n      return;\n    }\n    const segment = segmentInfo.segment;\n    const start = segment.start;\n    const 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    const Cue = window__default[\"default\"].WebKitDataCue || window__default[\"default\"].VTTCue;\n    const 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,\n      end\n    };\n    const data = JSON.stringify(value);\n    const 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}\nfunction noop() {}\nconst toTitleCase = function (string) {\n  if (typeof string !== 'string') {\n    return string;\n  }\n  return string.replace(/./, w => w.toUpperCase());\n};\n\n/**\n * @file source-updater.js\n */\nconst bufferTypes = ['video', 'audio'];\nconst updating = (type, sourceUpdater) => {\n  const sourceBuffer = sourceUpdater[`${type}Buffer`];\n  return sourceBuffer && sourceBuffer.updating || sourceUpdater.queuePending[type];\n};\nconst nextQueueIndexOfType = (type, queue) => {\n  for (let i = 0; i < queue.length; i++) {\n    const queueEntry = queue[i];\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 i;\n    }\n  }\n  return null;\n};\nconst shiftQueue = (type, sourceUpdater) => {\n  if (sourceUpdater.queue.length === 0) {\n    return;\n  }\n  let queueIndex = 0;\n  let 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};\nconst cleanupBuffer = (type, sourceUpdater) => {\n  const buffer = sourceUpdater[`${type}Buffer`];\n  const titleType = toTitleCase(type);\n  if (!buffer) {\n    return;\n  }\n  buffer.removeEventListener('updateend', sourceUpdater[`on${titleType}UpdateEnd_`]);\n  buffer.removeEventListener('error', sourceUpdater[`on${titleType}Error_`]);\n  sourceUpdater.codecs[type] = null;\n  sourceUpdater[`${type}Buffer`] = null;\n};\nconst inSourceBuffers = (mediaSource, sourceBuffer) => mediaSource && sourceBuffer && Array.prototype.indexOf.call(mediaSource.sourceBuffers, sourceBuffer) !== -1;\nconst actions = {\n  appendBuffer: (bytes, segmentInfo, onError) => (type, sourceUpdater) => {\n    const sourceBuffer = sourceUpdater[`${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 ${segmentInfo.mediaIndex}'s ${bytes.length} bytes to ${type}Buffer`);\n    try {\n      sourceBuffer.appendBuffer(bytes);\n    } catch (e) {\n      sourceUpdater.logger_(`Error with code ${e.code} ` + (e.code === QUOTA_EXCEEDED_ERR ? '(QUOTA_EXCEEDED_ERR) ' : '') + `when appending segment ${segmentInfo.mediaIndex} to ${type}Buffer`);\n      sourceUpdater.queuePending[type] = null;\n      onError(e);\n    }\n  },\n  remove: (start, end) => (type, sourceUpdater) => {\n    const sourceBuffer = sourceUpdater[`${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 ${start} to ${end} from ${type}Buffer`);\n    try {\n      sourceBuffer.remove(start, end);\n    } catch (e) {\n      sourceUpdater.logger_(`Remove ${start} to ${end} from ${type}Buffer failed`);\n    }\n  },\n  timestampOffset: offset => (type, sourceUpdater) => {\n    const sourceBuffer = sourceUpdater[`${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 ${type}timestampOffset to ${offset}`);\n    sourceBuffer.timestampOffset = offset;\n  },\n  callback: callback => (type, sourceUpdater) => {\n    callback();\n  },\n  endOfStream: error => sourceUpdater => {\n    if (sourceUpdater.mediaSource.readyState !== 'open') {\n      return;\n    }\n    sourceUpdater.logger_(`Calling mediaSource endOfStream(${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  duration: duration => sourceUpdater => {\n    sourceUpdater.logger_(`Setting mediaSource duration to ${duration}`);\n    try {\n      sourceUpdater.mediaSource.duration = duration;\n    } catch (e) {\n      videojs.log.warn('Failed to set media source duration', e);\n    }\n  },\n  abort: () => (type, sourceUpdater) => {\n    if (sourceUpdater.mediaSource.readyState !== 'open') {\n      return;\n    }\n    const sourceBuffer = sourceUpdater[`${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 ${type}Buffer`);\n    try {\n      sourceBuffer.abort();\n    } catch (e) {\n      videojs.log.warn(`Failed to abort on ${type}Buffer`, e);\n    }\n  },\n  addSourceBuffer: (type, codec) => sourceUpdater => {\n    const titleType = toTitleCase(type);\n    const mime = codecs_js.getMimeForCodec(codec);\n    sourceUpdater.logger_(`Adding ${type}Buffer with codec ${codec} to mediaSource`);\n    const sourceBuffer = sourceUpdater.mediaSource.addSourceBuffer(mime);\n    sourceBuffer.addEventListener('updateend', sourceUpdater[`on${titleType}UpdateEnd_`]);\n    sourceBuffer.addEventListener('error', sourceUpdater[`on${titleType}Error_`]);\n    sourceUpdater.codecs[type] = codec;\n    sourceUpdater[`${type}Buffer`] = sourceBuffer;\n  },\n  removeSourceBuffer: type => sourceUpdater => {\n    const sourceBuffer = sourceUpdater[`${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 ${type}Buffer with codec ${sourceUpdater.codecs[type]} from mediaSource`);\n    try {\n      sourceUpdater.mediaSource.removeSourceBuffer(sourceBuffer);\n    } catch (e) {\n      videojs.log.warn(`Failed to removeSourceBuffer ${type}Buffer`, e);\n    }\n  },\n  changeType: codec => (type, sourceUpdater) => {\n    const sourceBuffer = sourceUpdater[`${type}Buffer`];\n    const mime = codecs_js.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 ${type}Buffer codec from ${sourceUpdater.codecs[type]} to ${codec}`); // check if change to the provided type is supported\n\n    try {\n      sourceBuffer.changeType(mime);\n      sourceUpdater.codecs[type] = codec;\n    } catch (e) {\n      videojs.log.warn(`Failed to changeType on ${type}Buffer`, e);\n    }\n  }\n};\nconst pushQueue = ({\n  type,\n  sourceUpdater,\n  action,\n  doneFn,\n  name\n}) => {\n  sourceUpdater.queue.push({\n    type,\n    action,\n    doneFn,\n    name\n  });\n  shiftQueue(type, sourceUpdater);\n};\nconst onUpdateend = (type, sourceUpdater) => e => {\n  // 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  if (sourceUpdater.queuePending[type]) {\n    const doneFn = sourceUpdater.queuePending[type].doneFn;\n    sourceUpdater.queuePending[type] = null;\n    if (doneFn) {\n      // if there's an error, report it\n      doneFn(sourceUpdater[`${type}Error_`]);\n    }\n  }\n  shiftQueue(type, sourceUpdater);\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 */\n\nclass SourceUpdater extends videojs.EventTarget {\n  constructor(mediaSource) {\n    super();\n    this.mediaSource = mediaSource;\n    this.sourceopenListener_ = () => shiftQueue('mediaSource', this);\n    this.mediaSource.addEventListener('sourceopen', this.sourceopenListener_);\n    this.logger_ = logger('SourceUpdater'); // initial timestamp offset is 0\n\n    this.audioTimestampOffset_ = 0;\n    this.videoTimestampOffset_ = 0;\n    this.queue = [];\n    this.queuePending = {\n      audio: null,\n      video: null\n    };\n    this.delayedAudioAppendQueue_ = [];\n    this.videoAppendQueued_ = false;\n    this.codecs = {};\n    this.onVideoUpdateEnd_ = onUpdateend('video', this);\n    this.onAudioUpdateEnd_ = onUpdateend('audio', this);\n    this.onVideoError_ = e => {\n      // used for debugging\n      this.videoError_ = e;\n    };\n    this.onAudioError_ = e => {\n      // used for debugging\n      this.audioError_ = e;\n    };\n    this.createdSourceBuffers_ = false;\n    this.initializedEme_ = false;\n    this.triggeredReady_ = false;\n  }\n  initializedEme() {\n    this.initializedEme_ = true;\n    this.triggerReady();\n  }\n  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  hasInitializedAnyEme() {\n    return this.initializedEme_;\n  }\n  ready() {\n    return this.hasCreatedSourceBuffers() && this.hasInitializedAnyEme();\n  }\n  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  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  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  abort(type) {\n    pushQueue({\n      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  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  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__default[\"default\"].MediaSource && window__default[\"default\"].MediaSource.prototype && typeof window__default[\"default\"].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  static canChangeType() {\n    return window__default[\"default\"].SourceBuffer && window__default[\"default\"].SourceBuffer.prototype && typeof window__default[\"default\"].SourceBuffer.prototype.changeType === '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  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  changeType(type, codec) {\n    if (!this.canChangeType()) {\n      videojs.log.error('changeType is not supported!');\n      return;\n    }\n    pushQueue({\n      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  addOrChangeSourceBuffers(codecs) {\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(type => {\n      const codec = codecs[type];\n      if (!this.hasCreatedSourceBuffers()) {\n        return this.addSourceBuffer(type, codec);\n      }\n      if (this.canChangeType()) {\n        this.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  appendBuffer(options, doneFn) {\n    const {\n      segmentInfo,\n      type,\n      bytes\n    } = options;\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 ${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    const onError = doneFn;\n    pushQueue({\n      type,\n      sourceUpdater: this,\n      action: actions.appendBuffer(bytes, segmentInfo || {\n        mediaIndex: -1\n      }, onError),\n      doneFn,\n      name: 'appendBuffer'\n    });\n    if (type === 'video') {\n      this.videoAppendQueued_ = true;\n      if (!this.delayedAudioAppendQueue_.length) {\n        return;\n      }\n      const queue = this.delayedAudioAppendQueue_.slice();\n      this.logger_(`queuing delayed audio ${queue.length} appendBuffers`);\n      this.delayedAudioAppendQueue_.length = 0;\n      queue.forEach(que => {\n        this.appendBuffer.apply(this, 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  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  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  buffered() {\n    const video = inSourceBuffers(this.mediaSource, this.videoBuffer) ? this.videoBuffer : null;\n    const 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  setDuration(duration, doneFn = 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\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  endOfStream(error = null, doneFn = 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\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  removeAudio(start, end, done = 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  removeVideo(start, end, done = 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  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  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  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  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  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  dispose() {\n    this.trigger('dispose');\n    bufferTypes.forEach(type => {\n      this.abort(type);\n      if (this.canRemoveSourceBuffer()) {\n        this.removeSourceBuffer(type);\n      } else {\n        this[`${type}QueueCallback`](() => cleanupBuffer(type, this));\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}\nconst uint8ToUtf8 = uintArray => decodeURIComponent(escape(String.fromCharCode.apply(null, uintArray)));\nconst bufferToHexString = buffer => {\n  const uInt8Buffer = new Uint8Array(buffer);\n  return Array.from(uInt8Buffer).map(byte => byte.toString(16).padStart(2, '0')).join('');\n};\n\n/**\n * @file vtt-segment-loader.js\n */\nconst VTT_LINE_TERMINATORS = new Uint8Array('\\n\\n'.split('').map(char => char.charCodeAt(0)));\nclass NoVttJsError extends Error {\n  constructor() {\n    super('Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.');\n  }\n}\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 */\n\nclass VTTSegmentLoader extends SegmentLoader {\n  constructor(settings, options = {}) {\n    super(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    this.mediaSource_ = null;\n    this.subtitlesTrack_ = null;\n    this.loaderType_ = 'subtitle';\n    this.featuresNativeTextTracks_ = settings.featuresNativeTextTracks;\n    this.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    this.shouldSaveSegmentTimingInfo_ = false;\n  }\n  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  buffered_() {\n    if (!this.subtitlesTrack_ || !this.subtitlesTrack_.cues || !this.subtitlesTrack_.cues.length) {\n      return createTimeRanges();\n    }\n    const cues = this.subtitlesTrack_.cues;\n    const start = cues[0].startTime;\n    const 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  initSegmentForMap(map, set = false) {\n    if (!map) {\n      return null;\n    }\n    const id = initSegmentId(map);\n    let 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      const combinedByteLength = VTT_LINE_TERMINATORS.byteLength + map.bytes.byteLength;\n      const 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  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  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  track(track) {\n    if (typeof track === 'undefined') {\n      return this.subtitlesTrack_;\n    }\n    this.subtitlesTrack_ = track; // 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  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  fillBuffer_() {\n    // see if we need to begin loading immediately\n    const 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      const checkTimestampOffset = () => {\n        this.state = 'READY';\n        if (!this.paused()) {\n          // if not paused, queue a buffer check as soon as possible\n          this.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  timestampOffsetForSegment_() {\n    return null;\n  }\n  chooseNextRequest_() {\n    return this.skipEmptySegments_(super.chooseNextRequest_());\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  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  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  segmentRequestFinished_(error, simpleSegment, result) {\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    const 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    const 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__default[\"default\"].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(() => this.segmentRequestFinished_(error, simpleSegment, result), () => this.stopForError({\n        message: 'Error loading vtt.js'\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(cue => {\n      this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_ ? new window__default[\"default\"].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  handleData_() {// noop as we shouldn't be getting video/audio data captions\n    // that we do not support here.\n  }\n  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  parseVTTCues_(segmentInfo) {\n    let decoder;\n    let decodeBytesToString = false;\n    if (typeof window__default[\"default\"].WebVTT !== 'function') {\n      // caller is responsible for exception handling.\n      throw new NoVttJsError();\n    }\n    if (typeof window__default[\"default\"].TextDecoder === 'function') {\n      decoder = new window__default[\"default\"].TextDecoder('utf8');\n    } else {\n      decoder = window__default[\"default\"].WebVTT.StringDecoder();\n      decodeBytesToString = true;\n    }\n    const parser = new window__default[\"default\"].WebVTT.Parser(window__default[\"default\"], window__default[\"default\"].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 = map => {\n      segmentInfo.timestampmap = map;\n    };\n    parser.onparsingerror = error => {\n      videojs.log.warn('Error encountered when parsing cues: ' + error.message);\n    };\n    if (segmentInfo.segment.map) {\n      let mapData = segmentInfo.segment.map.bytes;\n      if (decodeBytesToString) {\n        mapData = uint8ToUtf8(mapData);\n      }\n      parser.parse(mapData);\n    }\n    let 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  updateTimeMapping_(segmentInfo, mappingObj, playlist) {\n    const 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    const {\n      MPEGTS,\n      LOCAL\n    } = segmentInfo.timestampmap;\n    /**\n     * From the spec:\n     * The MPEGTS media timestamp MUST use a 90KHz timescale,\n     * even when non-WebVTT Media Segments use a different timescale.\n     */\n\n    const mpegTsInSeconds = MPEGTS / clock.ONE_SECOND_IN_TS;\n    const diff = mpegTsInSeconds - LOCAL + mappingObj.mapping;\n    segmentInfo.cues.forEach(cue => {\n      const duration = cue.endTime - cue.startTime;\n      const startTime = MPEGTS === 0 ? cue.startTime + diff : this.handleRollover_(cue.startTime + diff, mappingObj.time);\n      cue.startTime = Math.max(startTime, 0);\n      cue.endTime = Math.max(startTime + duration, 0);\n    });\n    if (!playlist.syncInfo) {\n      const firstStart = segmentInfo.cues[0].startTime;\n      const 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   * MPEG-TS PES timestamps are limited to 2^33.\n   * Once they reach 2^33, they roll over to 0.\n   * mux.js handles PES timestamp rollover for the following scenarios:\n   * [forward rollover(right)] ->\n   *    PES timestamps monotonically increase, and once they reach 2^33, they roll over to 0\n   * [backward rollover(left)] -->\n   *    we seek back to position before rollover.\n   *\n   * According to the HLS SPEC:\n   * When synchronizing WebVTT with PES timestamps, clients SHOULD account\n   * for cases where the 33-bit PES timestamps have wrapped and the WebVTT\n   * cue times have not.  When the PES timestamp wraps, the WebVTT Segment\n   * SHOULD have a X-TIMESTAMP-MAP header that maps the current WebVTT\n   * time to the new (low valued) PES timestamp.\n   *\n   * So we want to handle rollover here and align VTT Cue start/end time to the player's time.\n   */\n\n  handleRollover_(value, reference) {\n    if (reference === null) {\n      return value;\n    }\n    let valueIn90khz = value * clock.ONE_SECOND_IN_TS;\n    const referenceIn90khz = reference * clock.ONE_SECOND_IN_TS;\n    let offset;\n    if (referenceIn90khz < valueIn90khz) {\n      // - 2^33\n      offset = -8589934592;\n    } else {\n      // + 2^33\n      offset = 8589934592;\n    } // distance(value - reference) > 2^32\n\n    while (Math.abs(valueIn90khz - referenceIn90khz) > 4294967296) {\n      valueIn90khz += offset;\n    }\n    return valueIn90khz / clock.ONE_SECOND_IN_TS;\n  }\n}\n\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 */\n\nconst findAdCue = function (track, mediaTime) {\n  const cues = track.cues;\n  for (let i = 0; i < cues.length; i++) {\n    const cue = cues[i];\n    if (mediaTime >= cue.adStartTime && mediaTime <= cue.adEndTime) {\n      return cue;\n    }\n  }\n  return null;\n};\nconst updateAdCues = function (media, track, offset = 0) {\n  if (!media.segments) {\n    return;\n  }\n  let mediaTime = offset;\n  let cue;\n  for (let i = 0; i < media.segments.length; i++) {\n    const segment = media.segments[i];\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__default[\"default\"].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        const [adOffset, adTotal] = segment.cueOutCont.split('/').map(parseFloat);\n        cue = new window__default[\"default\"].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\nconst MAX_MEDIA_SEQUENCE_DIFF_FOR_SYNC = 86400;\nconst 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: (syncController, playlist, duration, currentTimeline, currentTime) => {\n    if (duration !== Infinity) {\n      const syncPoint = {\n        time: 0,\n        segmentIndex: 0,\n        partIndex: null\n      };\n      return syncPoint;\n    }\n    return null;\n  }\n}, {\n  name: 'MediaSequence',\n  /**\n   * run media sequence strategy\n   *\n   * @param {SyncController} syncController\n   * @param {Object} playlist\n   * @param {number} duration\n   * @param {number} currentTimeline\n   * @param {number} currentTime\n   * @param {string} type\n   */\n  run: (syncController, playlist, duration, currentTimeline, currentTime, type) => {\n    if (!type) {\n      return null;\n    }\n    const mediaSequenceMap = syncController.getMediaSequenceMap(type);\n    if (!mediaSequenceMap || mediaSequenceMap.size === 0) {\n      return null;\n    }\n    if (playlist.mediaSequence === undefined || !Array.isArray(playlist.segments) || !playlist.segments.length) {\n      return null;\n    }\n    let currentMediaSequence = playlist.mediaSequence;\n    let segmentIndex = 0;\n    for (const segment of playlist.segments) {\n      const range = mediaSequenceMap.get(currentMediaSequence);\n      if (!range) {\n        // unexpected case\n        // we expect this playlist to be the same playlist in the map\n        // just break from the loop and move forward to the next strategy\n        break;\n      }\n      if (currentTime >= range.start && currentTime < range.end) {\n        // we found segment\n        if (Array.isArray(segment.parts) && segment.parts.length) {\n          let currentPartStart = range.start;\n          let partIndex = 0;\n          for (const part of segment.parts) {\n            const start = currentPartStart;\n            const end = start + part.duration;\n            if (currentTime >= start && currentTime < end) {\n              return {\n                time: range.start,\n                segmentIndex,\n                partIndex\n              };\n            }\n            partIndex++;\n            currentPartStart = end;\n          }\n        } // no parts found, return sync point for segment\n\n        return {\n          time: range.start,\n          segmentIndex,\n          partIndex: null\n        };\n      }\n      segmentIndex++;\n      currentMediaSequence++;\n    } // we didn't find any segments for provided current time\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: (syncController, playlist, duration, currentTimeline, currentTime) => {\n    if (!Object.keys(syncController.timelineToDatetimeMappings).length) {\n      return null;\n    }\n    let syncPoint = null;\n    let lastDistance = null;\n    const partsAndSegments = getPartsAndSegments(playlist);\n    currentTime = currentTime || 0;\n    for (let i = 0; i < partsAndSegments.length; i++) {\n      // start from the end and loop backwards for live\n      // or start from the front and loop forwards for non-live\n      const index = playlist.endList || currentTime === 0 ? i : partsAndSegments.length - (i + 1);\n      const partAndSegment = partsAndSegments[index];\n      const segment = partAndSegment.segment;\n      const datetimeMapping = syncController.timelineToDatetimeMappings[segment.timeline];\n      if (!datetimeMapping || !segment.dateTimeObject) {\n        continue;\n      }\n      const segmentTime = segment.dateTimeObject.getTime() / 1000;\n      let start = segmentTime + datetimeMapping; // take part duration into account.\n\n      if (segment.parts && typeof partAndSegment.partIndex === 'number') {\n        for (let z = 0; z < partAndSegment.partIndex; z++) {\n          start += segment.parts[z].duration;\n        }\n      }\n      const 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: (syncController, playlist, duration, currentTimeline, currentTime) => {\n    let syncPoint = null;\n    let lastDistance = null;\n    currentTime = currentTime || 0;\n    const partsAndSegments = getPartsAndSegments(playlist);\n    for (let i = 0; i < partsAndSegments.length; i++) {\n      // start from the end and loop backwards for live\n      // or start from the front and loop forwards for non-live\n      const index = playlist.endList || currentTime === 0 ? i : partsAndSegments.length - (i + 1);\n      const partAndSegment = partsAndSegments[index];\n      const segment = partAndSegment.segment;\n      const start = partAndSegment.part && partAndSegment.part.start || segment && segment.start;\n      if (segment.timeline === currentTimeline && typeof start !== 'undefined') {\n        const 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: (syncController, playlist, duration, currentTimeline, currentTime) => {\n    let syncPoint = null;\n    currentTime = currentTime || 0;\n    if (playlist.discontinuityStarts && playlist.discontinuityStarts.length) {\n      let lastDistance = null;\n      for (let i = 0; i < playlist.discontinuityStarts.length; i++) {\n        const segmentIndex = playlist.discontinuityStarts[i];\n        const discontinuity = playlist.discontinuitySequence + i + 1;\n        const discontinuitySync = syncController.discontinuities[discontinuity];\n        if (discontinuitySync) {\n          const 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,\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: (syncController, playlist, duration, currentTimeline, currentTime) => {\n    if (playlist.syncInfo) {\n      const 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}];\nclass SyncController extends videojs.EventTarget {\n  constructor(options = {}) {\n    super(); // ...for synching across variants\n\n    this.timelines = [];\n    this.discontinuities = [];\n    this.timelineToDatetimeMappings = {};\n    /**\n     * @type {Map<string, Map<number, { start: number, end: number }>>}\n     * @private\n     */\n\n    this.mediaSequenceStorage_ = new Map();\n    this.logger_ = logger('SyncController');\n  }\n  /**\n   * Get media sequence map by type\n   *\n   * @param {string} type - segment loader type\n   * @return {Map<number, { start: number, end: number }> | undefined}\n   */\n\n  getMediaSequenceMap(type) {\n    return this.mediaSequenceStorage_.get(type);\n  }\n  /**\n   * Update Media Sequence Map -> <MediaSequence, Range>\n   *\n   * @param {Object} playlist - parsed playlist\n   * @param {number} currentTime - current player's time\n   * @param {string} type - segment loader type\n   * @return {void}\n   */\n\n  updateMediaSequenceMap(playlist, currentTime, type) {\n    // we should not process this playlist if it does not have mediaSequence or segments\n    if (playlist.mediaSequence === undefined || !Array.isArray(playlist.segments) || !playlist.segments.length) {\n      return;\n    }\n    const currentMap = this.getMediaSequenceMap(type);\n    const result = new Map();\n    let currentMediaSequence = playlist.mediaSequence;\n    let currentBaseTime;\n    if (!currentMap) {\n      // first playlist setup:\n      currentBaseTime = 0;\n    } else if (currentMap.has(playlist.mediaSequence)) {\n      // further playlists setup:\n      currentBaseTime = currentMap.get(playlist.mediaSequence).start;\n    } else {\n      // it seems like we have a gap between playlists, use current time as a fallback:\n      this.logger_(`MediaSequence sync for ${type} segment loader - received a gap between playlists.\nFallback base time to: ${currentTime}.\nReceived media sequence: ${currentMediaSequence}.\nCurrent map: `, currentMap);\n      currentBaseTime = currentTime;\n    }\n    this.logger_(`MediaSequence sync for ${type} segment loader.\nReceived media sequence: ${currentMediaSequence}.\nbase time is ${currentBaseTime}\nCurrent map: `, currentMap);\n    playlist.segments.forEach(segment => {\n      const start = currentBaseTime;\n      const end = start + segment.duration;\n      const range = {\n        start,\n        end\n      };\n      result.set(currentMediaSequence, range);\n      currentMediaSequence++;\n      currentBaseTime = end;\n    });\n    this.mediaSequenceStorage_.set(type, result);\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   * @param {number} currentTime\n   *        Current player's time\n   * @param {string} type\n   *        Segment loader type\n   * @return {Object}\n   *          A sync-point object\n   */\n\n  getSyncPoint(playlist, duration, currentTimeline, currentTime, type) {\n    // Always use VOD sync point for VOD\n    if (duration !== Infinity) {\n      const vodSyncPointStrategy = syncPointStrategies.find(({\n        name\n      }) => name === 'VOD');\n      return vodSyncPointStrategy.run(this, playlist, duration);\n    }\n    const syncPoints = this.runStrategies_(playlist, duration, currentTimeline, currentTime, type);\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    } // If we have exact match just return it instead of finding the nearest distance\n\n    for (const syncPointInfo of syncPoints) {\n      const {\n        syncPoint,\n        strategy\n      } = syncPointInfo;\n      const {\n        segmentIndex,\n        time\n      } = syncPoint;\n      if (segmentIndex < 0) {\n        continue;\n      }\n      const selectedSegment = playlist.segments[segmentIndex];\n      const start = time;\n      const end = start + selectedSegment.duration;\n      this.logger_(`Strategy: ${strategy}. Current time: ${currentTime}. selected segment: ${segmentIndex}. Time: [${start} -> ${end}]}`);\n      if (currentTime >= start && currentTime < end) {\n        this.logger_('Found sync point with exact match: ', syncPoint);\n        return syncPoint;\n      }\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  getExpiredTime(playlist, duration) {\n    if (!playlist || !playlist.segments) {\n      return null;\n    }\n    const syncPoints = this.runStrategies_(playlist, duration, playlist.discontinuitySequence, 0, 'main'); // Without sync-points, there is not enough information to determine the expired time\n\n    if (!syncPoints.length) {\n      return null;\n    }\n    const 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   * @param {number} currentTime\n   *        Current player's time\n   * @param {string} type\n   *        Segment loader type\n   * @return {Array}\n   *          A list of sync-point objects\n   */\n\n  runStrategies_(playlist, duration, currentTimeline, currentTime, type) {\n    const syncPoints = []; // Try to find a sync-point in by utilizing various strategies...\n\n    for (let i = 0; i < syncPointStrategies.length; i++) {\n      const strategy = syncPointStrategies[i];\n      const syncPoint = strategy.run(this, playlist, duration, currentTimeline, currentTime, type);\n      if (syncPoint) {\n        syncPoint.strategy = strategy.name;\n        syncPoints.push({\n          strategy: strategy.name,\n          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  selectSyncPoint_(syncPoints, target) {\n    let bestSyncPoint = syncPoints[0].syncPoint;\n    let bestDistance = Math.abs(syncPoints[0].syncPoint[target.key] - target.value);\n    let bestStrategy = syncPoints[0].strategy;\n    for (let i = 1; i < syncPoints.length; i++) {\n      const newDistance = Math.abs(syncPoints[i].syncPoint[target.key] - target.value);\n      if (newDistance < bestDistance) {\n        bestDistance = newDistance;\n        bestSyncPoint = syncPoints[i].syncPoint;\n        bestStrategy = syncPoints[i].strategy;\n      }\n    }\n    this.logger_(`syncPoint for [${target.key}: ${target.value}] chosen with strategy` + ` [${bestStrategy}]: [time:${bestSyncPoint.time},` + ` segmentIndex:${bestSyncPoint.segmentIndex}` + (typeof bestSyncPoint.partIndex === 'number' ? `,partIndex:${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  saveExpiredSegmentInfo(oldPlaylist, newPlaylist) {\n    const 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 ${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 (let i = mediaSequenceDiff - 1; i >= 0; i--) {\n      const lastRemovedSegment = oldPlaylist.segments[i];\n      if (lastRemovedSegment && typeof lastRemovedSegment.start !== 'undefined') {\n        newPlaylist.syncInfo = {\n          mediaSequence: oldPlaylist.mediaSequence + i,\n          time: lastRemovedSegment.start\n        };\n        this.logger_(`playlist refresh sync: [time:${newPlaylist.syncInfo.time},` + ` mediaSequence: ${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  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      const firstSegment = playlist.segments[0];\n      const 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  saveSegmentTimingInfo({\n    segmentInfo,\n    shouldSaveTimelineMapping\n  }) {\n    const didCalculateSegmentTimeMapping = this.calculateSegmentTimeMapping_(segmentInfo, segmentInfo.timingInfo, shouldSaveTimelineMapping);\n    const 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    const dateTime = segment.dateTimeObject;\n    if (segment.discontinuity && shouldSaveTimelineMapping && dateTime) {\n      this.timelineToDatetimeMappings[segment.timeline] = -(dateTime.getTime() / 1000);\n    }\n  }\n  timestampOffsetForTimeline(timeline) {\n    if (typeof this.timelines[timeline] === 'undefined') {\n      return null;\n    }\n    return this.timelines[timeline].time;\n  }\n  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  calculateSegmentTimeMapping_(segmentInfo, timingInfo, shouldSaveTimelineMapping) {\n    // TODO: remove side effects\n    const segment = segmentInfo.segment;\n    const part = segmentInfo.part;\n    let mappingObj = this.timelines[segmentInfo.timeline];\n    let start;\n    let 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 ${segmentInfo.timeline}: ` + `[time: ${mappingObj.time}] [mapping: ${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  saveDiscontinuitySyncInfo_(segmentInfo) {\n    const playlist = segmentInfo.playlist;\n    const 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 (let i = 0; i < playlist.discontinuityStarts.length; i++) {\n        const segmentIndex = playlist.discontinuityStarts[i];\n        const discontinuity = playlist.discontinuitySequence + i + 1;\n        const mediaIndexDiff = segmentIndex - segmentInfo.mediaIndex;\n        const accuracy = Math.abs(mediaIndexDiff);\n        if (!this.discontinuities[discontinuity] || this.discontinuities[discontinuity].accuracy > accuracy) {\n          let time;\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,\n            accuracy\n          };\n        }\n      }\n    }\n  }\n  dispose() {\n    this.trigger('dispose');\n    this.off();\n  }\n}\n\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 */\n\nclass TimelineChangeController extends videojs.EventTarget {\n  constructor() {\n    super();\n    this.pendingTimelineChanges_ = {};\n    this.lastTimelineChanges_ = {};\n  }\n  clearPendingTimelineChange(type) {\n    this.pendingTimelineChanges_[type] = null;\n    this.trigger('pendingtimelinechange');\n  }\n  pendingTimelineChange({\n    type,\n    from,\n    to\n  }) {\n    if (typeof from === 'number' && typeof to === 'number') {\n      this.pendingTimelineChanges_[type] = {\n        type,\n        from,\n        to\n      };\n      this.trigger('pendingtimelinechange');\n    }\n    return this.pendingTimelineChanges_[type];\n  }\n  lastTimelineChange({\n    type,\n    from,\n    to\n  }) {\n    if (typeof from === 'number' && typeof to === 'number') {\n      this.lastTimelineChanges_[type] = {\n        type,\n        from,\n        to\n      };\n      delete this.pendingTimelineChanges_[type];\n      this.trigger('timelinechange');\n    }\n    return this.lastTimelineChanges_[type];\n  }\n  dispose() {\n    this.trigger('dispose');\n    this.pendingTimelineChanges_ = {};\n    this.lastTimelineChanges_ = {};\n    this.off();\n  }\n}\n\n/* rollup-plugin-worker-factory start for worker!/home/runner/work/http-streaming/http-streaming/src/decrypter-worker.js */\nconst 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\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\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\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\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  const precompute = function () {\n    const tables = [[[], [], [], [], []], [[], [], [], [], []]];\n    const encTable = tables[0];\n    const decTable = tables[1];\n    const sbox = encTable[4];\n    const sboxInv = decTable[4];\n    let i;\n    let x;\n    let xInv;\n    const d = [];\n    const th = [];\n    let x2;\n    let x4;\n    let x8;\n    let s;\n    let tEnc;\n    let 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  let 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\n  class AES {\n    constructor(key) {\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      let i;\n      let j;\n      let tmp;\n      const sbox = this._tables[0][4];\n      const decTable = this._tables[1];\n      const keyLen = key.length;\n      let rcon = 1;\n      if (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n        throw new Error('Invalid aes key size');\n      }\n      const encKey = key.slice(0);\n      const 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\n    decrypt(encrypted0, encrypted1, encrypted2, encrypted3, out, offset) {\n      const key = this._key[1]; // state variables a,b,c,d are loaded with pre-whitened data\n\n      let a = encrypted0 ^ key[0];\n      let b = encrypted3 ^ key[1];\n      let c = encrypted2 ^ key[2];\n      let d = encrypted1 ^ key[3];\n      let a2;\n      let b2;\n      let c2; // key.length === 2 ?\n\n      const nInnerRounds = key.length / 4 - 2;\n      let i;\n      let kIndex = 4;\n      const table = this._tables[1]; // load up the tables\n\n      const table0 = table[0];\n      const table1 = table[1];\n      const table2 = table[2];\n      const table3 = table[3];\n      const 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  /**\n   * @file async-stream.js\n   */\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\n  class AsyncStream extends Stream {\n    constructor() {\n      super(Stream);\n      this.jobs = [];\n      this.delay = 1;\n      this.timeout_ = null;\n    }\n    /**\n     * process an async job\n     *\n     * @private\n     */\n\n    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    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  /**\n   * @file decrypter.js\n   *\n   * An asynchronous implementation of AES-128 CBC decryption with\n   * PKCS#7 padding.\n   */\n\n  /**\n   * Convert network-order (big-endian) bytes into their little-endian\n   * representation.\n   */\n\n  const ntoh = function (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  const decrypt = function (encrypted, key, initVector) {\n    // word-level access to the encrypted bytes\n    const encrypted32 = new Int32Array(encrypted.buffer, encrypted.byteOffset, encrypted.byteLength >> 2);\n    const decipher = new AES(Array.prototype.slice.call(key)); // byte and word-level access for the decrypted output\n\n    const decrypted = new Uint8Array(encrypted.byteLength);\n    const decrypted32 = new Int32Array(decrypted.buffer); // temporary variables for working with the IV, encrypted, and\n    // decrypted data\n\n    let init0;\n    let init1;\n    let init2;\n    let init3;\n    let encrypted0;\n    let encrypted1;\n    let encrypted2;\n    let encrypted3; // iteration variable\n\n    let 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\n  class Decrypter {\n    constructor(encrypted, key, initVector, done) {\n      const step = Decrypter.STEP;\n      const encrypted32 = new Int32Array(encrypted.buffer);\n      const decrypted = new Uint8Array(encrypted.byteLength);\n      let 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\n    static get STEP() {\n      // 4 * 8000;\n      return 32000;\n    }\n    /**\n     * @private\n     */\n\n    decryptChunk_(encrypted, key, initVector, decrypted) {\n      return function () {\n        const bytes = decrypt(encrypted, key, initVector);\n        decrypted.set(bytes, encrypted.byteOffset);\n      };\n    }\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  const createTransferableMessage = function (message) {\n    const transferable = {};\n    Object.keys(message).forEach(key => {\n      const 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    const data = event.data;\n    const encrypted = new Uint8Array(data.encrypted.bytes, data.encrypted.byteOffset, data.encrypted.byteLength);\n    const key = new Uint32Array(data.key.bytes, data.key.byteOffset, data.key.byteLength / 4);\n    const 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}));\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\nconst audioTrackKind_ = properties => {\n  let 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\nconst 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\nconst 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\nconst onGroupChanged = (type, settings) => () => {\n  const {\n    segmentLoaders: {\n      [type]: segmentLoader,\n      main: mainSegmentLoader\n    },\n    mediaTypes: {\n      [type]: mediaType\n    }\n  } = settings;\n  const activeTrack = mediaType.activeTrack();\n  const activeGroup = mediaType.getActiveGroup();\n  const previousActiveLoader = mediaType.activePlaylistLoader;\n  const 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};\nconst onGroupChanging = (type, settings) => () => {\n  const {\n    segmentLoaders: {\n      [type]: segmentLoader\n    },\n    mediaTypes: {\n      [type]: mediaType\n    }\n  } = settings;\n  mediaType.lastGroup_ = null;\n  segmentLoader.abort();\n  segmentLoader.pause();\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\nconst onTrackChanged = (type, settings) => () => {\n  const {\n    mainPlaylistLoader,\n    segmentLoaders: {\n      [type]: segmentLoader,\n      main: mainSegmentLoader\n    },\n    mediaTypes: {\n      [type]: mediaType\n    }\n  } = settings;\n  const activeTrack = mediaType.activeTrack();\n  const activeGroup = mediaType.getActiveGroup();\n  const previousActiveLoader = mediaType.activePlaylistLoader;\n  const 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    const pc = settings.vhs.playlistController_;\n    const 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 ${lastTrack.id} to ${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};\nconst 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: (type, settings) => () => {\n    const {\n      mediaTypes: {\n        [type]: mediaType\n      },\n      excludePlaylist\n    } = settings; // switch back to default audio track\n\n    const activeTrack = mediaType.activeTrack();\n    const activeGroup = mediaType.activeGroup();\n    const id = (activeGroup.filter(group => group.default)[0] || activeGroup[0]).id;\n    const 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 (const trackId in mediaType.tracks) {\n      mediaType.tracks[trackId].enabled = mediaType.tracks[trackId] === defaultTrack;\n    }\n    mediaType.onTrackChanged();\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: (type, settings) => () => {\n    const {\n      mediaTypes: {\n        [type]: mediaType\n      }\n    } = settings;\n    videojs.log.warn('Problem encountered loading the subtitle track.' + 'Disabling subtitle track.');\n    const track = mediaType.activeTrack();\n    if (track) {\n      track.mode = 'disabled';\n    }\n    mediaType.onTrackChanged();\n  }\n};\nconst 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: (type, playlistLoader, settings) => {\n    if (!playlistLoader) {\n      // no playlist loader means audio will be muxed with the video\n      return;\n    }\n    const {\n      tech,\n      requestOptions,\n      segmentLoaders: {\n        [type]: segmentLoader\n      }\n    } = settings;\n    playlistLoader.on('loadedmetadata', () => {\n      const 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', () => {\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: (type, playlistLoader, settings) => {\n    const {\n      tech,\n      requestOptions,\n      segmentLoaders: {\n        [type]: segmentLoader\n      },\n      mediaTypes: {\n        [type]: mediaType\n      }\n    } = settings;\n    playlistLoader.on('loadedmetadata', () => {\n      const 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', () => {\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};\nconst 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': (type, settings) => {\n    const {\n      vhs,\n      sourceType,\n      segmentLoaders: {\n        [type]: segmentLoader\n      },\n      requestOptions,\n      main: {\n        mediaGroups\n      },\n      mediaTypes: {\n        [type]: {\n          groups,\n          tracks,\n          logger_\n        }\n      },\n      mainPlaylistLoader\n    } = settings;\n    const 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 (const groupId in mediaGroups[type]) {\n      if (!groups[groupId]) {\n        groups[groupId] = [];\n      }\n      for (const variantLabel in mediaGroups[type][groupId]) {\n        let properties = mediaGroups[type][groupId][variantLabel];\n        let playlistLoader;\n        if (audioOnlyMain) {\n          logger_(`AUDIO group '${groupId}' label '${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\n        }, properties);\n        setupListeners[type](type, properties.playlistLoader, settings);\n        groups[groupId].push(properties);\n        if (typeof tracks[variantLabel] === 'undefined') {\n          const 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': (type, settings) => {\n    const {\n      tech,\n      vhs,\n      sourceType,\n      segmentLoaders: {\n        [type]: segmentLoader\n      },\n      requestOptions,\n      main: {\n        mediaGroups\n      },\n      mediaTypes: {\n        [type]: {\n          groups,\n          tracks\n        }\n      },\n      mainPlaylistLoader\n    } = settings;\n    for (const groupId in mediaGroups[type]) {\n      if (!groups[groupId]) {\n        groups[groupId] = [];\n      }\n      for (const 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        let properties = mediaGroups[type][groupId][variantLabel];\n        let playlistLoader;\n        if (sourceType === 'hls') {\n          playlistLoader = new PlaylistLoader(properties.resolvedUri, vhs, requestOptions);\n        } else if (sourceType === 'dash') {\n          const playlists = properties.playlists.filter(p => p.excludeUntil !== Infinity);\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\n        }, properties);\n        setupListeners[type](type, properties.playlistLoader, settings);\n        groups[groupId].push(properties);\n        if (typeof tracks[variantLabel] === 'undefined') {\n          const 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': (type, settings) => {\n    const {\n      tech,\n      main: {\n        mediaGroups\n      },\n      mediaTypes: {\n        [type]: {\n          groups,\n          tracks\n        }\n      }\n    } = settings;\n    for (const groupId in mediaGroups[type]) {\n      if (!groups[groupId]) {\n        groups[groupId] = [];\n      }\n      for (const variantLabel in mediaGroups[type][groupId]) {\n        const 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        const captionServices = tech.options_.vhs && tech.options_.vhs.captionServices || {};\n        let 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          const 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};\nconst groupMatch = (list, media) => {\n  for (let i = 0; i < list.length; i++) {\n    if (playlistMatch(media, list[i])) {\n      return true;\n    }\n    if (list[i].playlists && groupMatch(list[i].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\nconst activeGroup = (type, settings) => track => {\n  const {\n    mainPlaylistLoader,\n    mediaTypes: {\n      [type]: {\n        groups\n      }\n    }\n  } = settings;\n  const media = mainPlaylistLoader.media();\n  if (!media) {\n    return null;\n  }\n  let variants = null; // set to variants to main media active group\n\n  if (media.attributes[type]) {\n    variants = groups[media.attributes[type]];\n  }\n  const 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 (let i = 0; i < groupKeys.length; i++) {\n        const groupPropertyList = groups[groupKeys[i]];\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(props => props.id === track.id)[0] || null;\n};\nconst 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: (type, settings) => () => {\n    const {\n      mediaTypes: {\n        [type]: {\n          tracks\n        }\n      }\n    } = settings;\n    for (const id in tracks) {\n      if (tracks[id].enabled) {\n        return tracks[id];\n      }\n    }\n    return null;\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: (type, settings) => () => {\n    const {\n      mediaTypes: {\n        [type]: {\n          tracks\n        }\n      }\n    } = settings;\n    for (const id in tracks) {\n      if (tracks[id].mode === 'showing' || tracks[id].mode === 'hidden') {\n        return tracks[id];\n      }\n    }\n    return null;\n  }\n};\nconst getActiveGroup = (type, {\n  mediaTypes\n}) => () => {\n  const activeTrack_ = mediaTypes[type].activeTrack();\n  if (!activeTrack_) {\n    return null;\n  }\n  return mediaTypes[type].activeGroup(activeTrack_);\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\nconst setupMediaGroups = settings => {\n  ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(type => {\n    initialize[type](type, settings);\n  });\n  const {\n    mediaTypes,\n    mainPlaylistLoader,\n    tech,\n    vhs,\n    segmentLoaders: {\n      ['AUDIO']: audioSegmentLoader,\n      main: mainSegmentLoader\n    }\n  } = settings; // setup active group and track getters and change event handlers\n\n  ['AUDIO', 'SUBTITLES'].forEach(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  const audioGroup = mediaTypes.AUDIO.activeGroup();\n  if (audioGroup) {\n    const groupId = (audioGroup.filter(group => group.default)[0] || audioGroup[0]).id;\n    mediaTypes.AUDIO.tracks[groupId].enabled = true;\n    mediaTypes.AUDIO.onGroupChanged();\n    mediaTypes.AUDIO.onTrackChanged();\n    const 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', () => {\n    ['AUDIO', 'SUBTITLES'].forEach(type => mediaTypes[type].onGroupChanged());\n  });\n  mainPlaylistLoader.on('mediachanging', () => {\n    ['AUDIO', 'SUBTITLES'].forEach(type => mediaTypes[type].onGroupChanging());\n  }); // custom audio track change event handler for usage event\n\n  const 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', () => {\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 (const 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\nconst createMediaTypes = () => {\n  const mediaTypes = {};\n  ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(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[${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 * PATHWAY-CLONES: array (optional) (HLS only) pathway clone objects to copy from other playlists.\n */\n\nclass SteeringManifest {\n  constructor() {\n    this.priority_ = [];\n    this.pathwayClones_ = new Map();\n  }\n  set version(number) {\n    // Only version 1 is currently supported for both DASH and HLS.\n    if (number === 1) {\n      this.version_ = number;\n    }\n  }\n  set ttl(seconds) {\n    // TTL = time-to-live, default = 300 seconds.\n    this.ttl_ = seconds || 300;\n  }\n  set reloadUri(uri) {\n    if (uri) {\n      // reload URI can be relative to the previous reloadUri.\n      this.reloadUri_ = resolveUrl(this.reloadUri_, uri);\n    }\n  }\n  set priority(array) {\n    // priority must be non-empty and unique values.\n    if (array && array.length) {\n      this.priority_ = array;\n    }\n  }\n  set pathwayClones(array) {\n    // pathwayClones must be non-empty.\n    if (array && array.length) {\n      this.pathwayClones_ = new Map(array.map(clone => [clone.ID, clone]));\n    }\n  }\n  get version() {\n    return this.version_;\n  }\n  get ttl() {\n    return this.ttl_;\n  }\n  get reloadUri() {\n    return this.reloadUri_;\n  }\n  get priority() {\n    return this.priority_;\n  }\n  get pathwayClones() {\n    return this.pathwayClones_;\n  }\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 */\n\nclass ContentSteeringController extends videojs.EventTarget {\n  constructor(xhr, bandwidth) {\n    super();\n    this.currentPathway = null;\n    this.defaultPathway = null;\n    this.queryBeforeStart = false;\n    this.availablePathways_ = new Set();\n    this.steeringManifest = new SteeringManifest();\n    this.proxyServerUrl_ = null;\n    this.manifestType_ = null;\n    this.ttlTimeout_ = null;\n    this.request_ = null;\n    this.currentPathwayClones = new Map();\n    this.nextPathwayClones = new Map();\n    this.excludedSteeringManifestURLs = new Set();\n    this.logger_ = logger('Content Steering');\n    this.xhr_ = xhr;\n    this.getBandwidth_ = bandwidth;\n  }\n  /**\n   * Assigns the content steering tag properties to the steering controller\n   *\n   * @param {string} baseUrl the baseURL from the main manifest for resolving the steering manifest url\n   * @param {Object} steeringTag the content steering tag from the main manifest\n   */\n\n  assignTagProperties(baseUrl, steeringTag) {\n    this.manifestType_ = steeringTag.serverUri ? 'HLS' : 'DASH'; // serverUri is HLS serverURL is DASH\n\n    const steeringUri = steeringTag.serverUri || steeringTag.serverURL;\n    if (!steeringUri) {\n      this.logger_(`steering manifest URL is ${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    } // reloadUri is the resolution of the main manifest URL and steering URL.\n\n    this.steeringManifest.reloadUri = 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;\n    this.proxyServerUrl_ = steeringTag.proxyServerURL; // 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  }\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 should only happen once on initalization.\n   */\n\n  requestSteeringManifest(initial) {\n    const reloadUri = this.steeringManifest.reloadUri;\n    if (!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    const uri = initial ? reloadUri : 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\n    }, (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          this.logger_(`manifest request 410 ${error}.`);\n          this.logger_(`There will be no more content steering requests to ${uri} this session.`);\n          this.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          const retrySeconds = errorInfo.responseHeaders['retry-after'];\n          this.logger_(`manifest request 429 ${error}.`);\n          this.logger_(`content steering will retry in ${retrySeconds} seconds.`);\n          this.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        this.logger_(`manifest failed to load ${error}.`);\n        this.startTTLTimeout_();\n        return;\n      }\n      const steeringManifestJson = JSON.parse(this.request_.responseText);\n      this.assignSteeringProperties_(steeringManifestJson);\n      this.startTTLTimeout_();\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  setProxyServerUrl_(steeringUrl) {\n    const steeringUrlObject = new window__default[\"default\"].URL(steeringUrl);\n    const proxyServerUrlObject = new window__default[\"default\"].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  decodeDataUriManifest_(dataUri) {\n    const steeringManifestJson = JSON.parse(window__default[\"default\"].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  setSteeringParams_(url) {\n    const urlObject = new window__default[\"default\"].URL(url);\n    const path = this.getPathway();\n    const networkThroughput = this.getBandwidth_();\n    if (path) {\n      const pathwayKey = `_${this.manifestType_}_pathway`;\n      urlObject.searchParams.set(pathwayKey, path);\n    }\n    if (networkThroughput) {\n      const throughputKey = `_${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  assignSteeringProperties_(steeringJson) {\n    this.steeringManifest.version = steeringJson.VERSION;\n    if (!this.steeringManifest.version) {\n      this.logger_(`manifest version is ${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']; // Pathway clones to be created/updated in HLS.\n    // See section 7.2 https://datatracker.ietf.org/doc/draft-pantos-hls-rfc8216bis/\n\n    this.steeringManifest.pathwayClones = steeringJson['PATHWAY-CLONES'];\n    this.nextPathwayClones = this.steeringManifest.pathwayClones; // 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    const chooseNextPathway = pathwaysByPriority => {\n      for (const path of pathwaysByPriority) {\n        if (this.availablePathways_.has(path)) {\n          return path;\n        }\n      } // If no pathway matches, ignore the manifest and choose the first available.\n\n      return [...this.availablePathways_][0];\n    };\n    const 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  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  getRequestURI(reloadUri) {\n    if (!reloadUri) {\n      return null;\n    }\n    const isExcluded = uri => this.excludedSteeringManifestURLs.has(uri);\n    if (this.proxyServerUrl_) {\n      const proxyURI = this.setProxyServerUrl_(reloadUri);\n      if (!isExcluded(proxyURI)) {\n        return proxyURI;\n      }\n    }\n    const 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  startTTLTimeout_(ttl = this.steeringManifest.ttl) {\n    // 300 (5 minutes) is the default value.\n    const ttlMS = ttl * 1000;\n    this.ttlTimeout_ = window__default[\"default\"].setTimeout(() => {\n      this.requestSteeringManifest();\n    }, ttlMS);\n  }\n  /**\n   * Clear the TTL timeout if necessary.\n   */\n\n  clearTTLTimeout_() {\n    window__default[\"default\"].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  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  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.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  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  clearAvailablePathways() {\n    this.availablePathways_.clear();\n  }\n  /**\n   * Removes a pathway from the available pathways set.\n   */\n\n  excludePathway(pathway) {\n    return this.availablePathways_.delete(pathway);\n  }\n  /**\n   * Checks the refreshed DASH manifest content steering tag for changes.\n   *\n   * @param {string} baseURL new steering tag on DASH manifest refresh\n   * @param {Object} newTag the new tag to check for changes\n   * @return a true or false whether the new tag has different values\n   */\n\n  didDASHTagChange(baseURL, newTag) {\n    return !newTag && this.steeringManifest.reloadUri || newTag && (resolveUrl(baseURL, newTag.serverURL) !== this.steeringManifest.reloadUri || newTag.defaultServiceLocation !== this.defaultPathway || newTag.queryBeforeStart !== this.queryBeforeStart || newTag.proxyServerURL !== this.proxyServerUrl_);\n  }\n  getAvailablePathways() {\n    return this.availablePathways_;\n  }\n}\n\n/**\n * @file playlist-controller.js\n */\nconst ABORT_EARLY_EXCLUSION_SECONDS = 10;\nlet Vhs$1; // SegmentLoader stats that need to have each loader's\n// values summed to calculate the final value\n\nconst loaderStats = ['mediaRequests', 'mediaRequestsAborted', 'mediaRequestsTimedout', 'mediaRequestsErrored', 'mediaTransferDuration', 'mediaBytesTransferred', 'mediaAppends'];\nconst sumLoaderStat = function (stat) {\n  return this.audioSegmentLoader_[stat] + this.mainSegmentLoader_[stat];\n};\nconst shouldSwitchToMedia = function ({\n  currentPlaylist,\n  buffered,\n  currentTime,\n  nextPlaylist,\n  bufferLowWaterLine,\n  bufferHighWaterLine,\n  duration,\n  bufferBasedABR,\n  log\n}) {\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  const sharedLogLine = `allowing switch ${currentPlaylist && currentPlaylist.id || 'null'} -> ${nextPlaylist.id}`;\n  if (!currentPlaylist) {\n    log(`${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  const 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 ${sharedLogLine} as current playlist is live llhls, but currentTime isn't in buffered.`);\n      return false;\n    }\n    log(`${sharedLogLine} as current playlist is live`);\n    return true;\n  }\n  const forwardBuffer = timeAheadOf(buffered, currentTime);\n  const 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(`${sharedLogLine} as duration < max low water line (${duration} < ${maxBufferLowWaterLine})`);\n    return true;\n  }\n  const nextBandwidth = nextPlaylist.attributes.BANDWIDTH;\n  const 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    let logLine = `${sharedLogLine} as next bandwidth < current bandwidth (${nextBandwidth} < ${currBandwidth})`;\n    if (bufferBasedABR) {\n      logLine += ` and forwardBuffer < bufferHighWaterLine (${forwardBuffer} < ${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    let logLine = `${sharedLogLine} as forwardBuffer >= bufferLowWaterLine (${forwardBuffer} >= ${bufferLowWaterLine})`;\n    if (bufferBasedABR) {\n      logLine += ` and next bandwidth > current bandwidth (${nextBandwidth} > ${currBandwidth})`;\n    }\n    log(logLine);\n    return true;\n  }\n  log(`not ${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 */\n\nclass PlaylistController extends videojs.EventTarget {\n  constructor(options) {\n    super();\n    const {\n      src,\n      withCredentials,\n      tech,\n      bandwidth,\n      externVhs,\n      useCueTags,\n      playlistExclusionDuration,\n      enableLowInitialPlaylist,\n      sourceType,\n      cacheEncryptionKeys,\n      bufferBasedABR,\n      leastPixelDiffSelector,\n      captionServices\n    } = options;\n    if (!src) {\n      throw new Error('A non-empty playlist URL or JSON manifest string is required');\n    }\n    let {\n      maxPlaylistRetries\n    } = options;\n    if (maxPlaylistRetries === null || typeof maxPlaylistRetries === 'undefined') {\n      maxPlaylistRetries = Infinity;\n    }\n    Vhs$1 = externVhs;\n    this.bufferBasedABR = Boolean(bufferBasedABR);\n    this.leastPixelDiffSelector = Boolean(leastPixelDiffSelector);\n    this.withCredentials = withCredentials;\n    this.tech_ = tech;\n    this.vhs_ = tech.vhs;\n    this.sourceType_ = sourceType;\n    this.useCueTags_ = useCueTags;\n    this.playlistExclusionDuration = playlistExclusionDuration;\n    this.maxPlaylistRetries = maxPlaylistRetries;\n    this.enableLowInitialPlaylist = enableLowInitialPlaylist;\n    if (this.useCueTags_) {\n      this.cueTagsTrack_ = this.tech_.addTextTrack('metadata', 'ad-cues');\n      this.cueTagsTrack_.inBandMetadataTrackDispatchType = '';\n    }\n    this.requestOptions_ = {\n      withCredentials,\n      maxPlaylistRetries,\n      timeout: null\n    };\n    this.on('error', this.pauseLoading);\n    this.mediaTypes_ = createMediaTypes();\n    this.mediaSource = new window__default[\"default\"].MediaSource();\n    this.handleDurationChange_ = this.handleDurationChange_.bind(this);\n    this.handleSourceOpen_ = this.handleSourceOpen_.bind(this);\n    this.handleSourceEnded_ = this.handleSourceEnded_.bind(this);\n    this.mediaSource.addEventListener('durationchange', this.handleDurationChange_); // load the media source into the player\n\n    this.mediaSource.addEventListener('sourceopen', this.handleSourceOpen_);\n    this.mediaSource.addEventListener('sourceended', this.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    this.seekable_ = createTimeRanges();\n    this.hasPlayed_ = false;\n    this.syncController_ = new SyncController(options);\n    this.segmentMetadataTrack_ = tech.addRemoteTextTrack({\n      kind: 'metadata',\n      label: 'segment-metadata'\n    }, false).track;\n    this.decrypter_ = new Decrypter();\n    this.sourceUpdater_ = new SourceUpdater(this.mediaSource);\n    this.inbandTextTracks_ = {};\n    this.timelineChangeController_ = new TimelineChangeController();\n    this.keyStatusMap_ = new Map();\n    const segmentLoaderSettings = {\n      vhs: this.vhs_,\n      parse708captions: options.parse708captions,\n      useDtsForTimestampOffset: options.useDtsForTimestampOffset,\n      captionServices,\n      mediaSource: this.mediaSource,\n      currentTime: this.tech_.currentTime.bind(this.tech_),\n      seekable: () => this.seekable(),\n      seeking: () => this.tech_.seeking(),\n      duration: () => this.duration(),\n      hasPlayed: () => this.hasPlayed_,\n      goalBufferLength: () => this.goalBufferLength(),\n      bandwidth,\n      syncController: this.syncController_,\n      decrypter: this.decrypter_,\n      sourceType: this.sourceType_,\n      inbandTextTracks: this.inbandTextTracks_,\n      cacheEncryptionKeys,\n      sourceUpdater: this.sourceUpdater_,\n      timelineChangeController: this.timelineChangeController_,\n      exactManifestTimings: options.exactManifestTimings,\n      addMetadataToTextTrack: this.addMetadataToTextTrack.bind(this)\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    this.mainPlaylistLoader_ = this.sourceType_ === 'dash' ? new DashPlaylistLoader(src, this.vhs_, merge(this.requestOptions_, {\n      addMetadataToTextTrack: this.addMetadataToTextTrack.bind(this)\n    })) : new PlaylistLoader(src, this.vhs_, merge(this.requestOptions_, {\n      addDateRangesToTextTrack: this.addDateRangesToTextTrack_.bind(this)\n    }));\n    this.setupMainPlaylistLoaderListeners_(); // setup segment loaders\n    // combined audio/video or just video when alternate audio track is selected\n\n    this.mainSegmentLoader_ = new SegmentLoader(merge(segmentLoaderSettings, {\n      segmentMetadataTrack: this.segmentMetadataTrack_,\n      loaderType: 'main'\n    }), options); // alternate audio track\n\n    this.audioSegmentLoader_ = new SegmentLoader(merge(segmentLoaderSettings, {\n      loaderType: 'audio'\n    }), options);\n    this.subtitleSegmentLoader_ = new VTTSegmentLoader(merge(segmentLoaderSettings, {\n      loaderType: 'vtt',\n      featuresNativeTextTracks: this.tech_.featuresNativeTextTracks,\n      loadVttJs: () => new Promise((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    }), options);\n    const getBandwidth = () => {\n      return this.mainSegmentLoader_.bandwidth;\n    };\n    this.contentSteeringController_ = new ContentSteeringController(this.vhs_.xhr, getBandwidth);\n    this.setupSegmentLoaderListeners_();\n    if (this.bufferBasedABR) {\n      this.mainPlaylistLoader_.one('loadedplaylist', () => this.startABRTimer_());\n      this.tech_.on('pause', () => this.stopABRTimer_());\n      this.tech_.on('play', () => this.startABRTimer_());\n    } // Create SegmentLoader stat-getters\n    // mediaRequests_\n    // mediaRequestsAborted_\n    // mediaRequestsTimedout_\n    // mediaRequestsErrored_\n    // mediaTransferDuration_\n    // mediaBytesTransferred_\n    // mediaAppends_\n\n    loaderStats.forEach(stat => {\n      this[stat + '_'] = sumLoaderStat.bind(this, stat);\n    });\n    this.logger_ = logger('pc');\n    this.triggeredFmp4Usage = false;\n    if (this.tech_.preload() === 'none') {\n      this.loadOnPlay_ = () => {\n        this.loadOnPlay_ = null;\n        this.mainPlaylistLoader_.load();\n      };\n      this.tech_.one('play', this.loadOnPlay_);\n    } else {\n      this.mainPlaylistLoader_.load();\n    }\n    this.timeToLoadedData__ = -1;\n    this.mainAppendsToLoadedData__ = -1;\n    this.audioAppendsToLoadedData__ = -1;\n    const event = this.tech_.preload() === 'none' ? 'play' : 'loadstart'; // start the first frame timer on loadstart or play (for preload none)\n\n    this.tech_.one(event, () => {\n      const timeToLoadedDataStart = Date.now();\n      this.tech_.one('loadeddata', () => {\n        this.timeToLoadedData__ = Date.now() - timeToLoadedDataStart;\n        this.mainAppendsToLoadedData__ = this.mainSegmentLoader_.mediaAppends;\n        this.audioAppendsToLoadedData__ = this.audioSegmentLoader_.mediaAppends;\n      });\n    });\n  }\n  mainAppendsToLoadedData_() {\n    return this.mainAppendsToLoadedData__;\n  }\n  audioAppendsToLoadedData_() {\n    return this.audioAppendsToLoadedData__;\n  }\n  appendsToLoadedData_() {\n    const main = this.mainAppendsToLoadedData_();\n    const audio = this.audioAppendsToLoadedData_();\n    if (main === -1 || audio === -1) {\n      return -1;\n    }\n    return main + audio;\n  }\n  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  checkABR_(reason = 'abr') {\n    const nextPlaylist = this.selectPlaylist();\n    if (nextPlaylist && this.shouldSwitchToMedia_(nextPlaylist)) {\n      this.switchMedia_(nextPlaylist, reason);\n    }\n  }\n  switchMedia_(playlist, cause, delay) {\n    const oldMedia = this.media();\n    const oldId = oldMedia && (oldMedia.id || oldMedia.uri);\n    const newId = playlist && (playlist.id || playlist.uri);\n    if (oldId && oldId !== newId) {\n      this.logger_(`switch media ${oldId} -> ${newId} from ${cause}`);\n      this.tech_.trigger({\n        type: 'usage',\n        name: `vhs-rendition-change-${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  switchMediaForDASHContentSteering_() {\n    ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(type => {\n      const mediaType = this.mediaTypes_[type];\n      const activeGroup = mediaType ? mediaType.activeGroup() : null;\n      const pathway = this.contentSteeringController_.getPathway();\n      if (activeGroup && pathway) {\n        // activeGroup can be an array or a single group\n        const mediaPlaylists = activeGroup.length ? activeGroup[0].playlists : activeGroup.playlists;\n        const dashMediaPlaylists = mediaPlaylists.filter(p => p.attributes.serviceLocation === pathway); // Switch the current active playlist to the correct CDN\n\n        if (dashMediaPlaylists.length) {\n          this.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  startABRTimer_() {\n    this.stopABRTimer_();\n    this.abrTimer_ = window__default[\"default\"].setInterval(() => this.checkABR_(), 250);\n  }\n  /**\n   * Stop the timer that periodically calls checkABR_\n   *\n   * @private\n   */\n\n  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__default[\"default\"].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  getAudioTrackPlaylists_() {\n    const main = this.main();\n    const 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    const AUDIO = main.mediaGroups.AUDIO;\n    const groupKeys = Object.keys(AUDIO);\n    let 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      const defaultGroup = AUDIO.main || groupKeys.length && AUDIO[groupKeys[0]];\n      for (const label in defaultGroup) {\n        if (defaultGroup[label].default) {\n          track = {\n            label\n          };\n          break;\n        }\n      }\n    } // no active track no playlists.\n\n    if (!track) {\n      return defaultPlaylists;\n    }\n    const playlists = []; // get all of the playlists that are possible for the\n    // active track.\n\n    for (const group in AUDIO) {\n      if (AUDIO[group][track.label]) {\n        const 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 (let i = 0; i < main.playlists.length; i++) {\n            const playlist = main.playlists[i];\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  setupMainPlaylistLoaderListeners_() {\n    this.mainPlaylistLoader_.on('loadedmetadata', () => {\n      const media = this.mainPlaylistLoader_.media();\n      const 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(this.mainPlaylistLoader_.main, this.mainPlaylistLoader_.media())) {\n        this.requestOptions_.timeout = 0;\n      } else {\n        this.requestOptions_.timeout = requestTimeout;\n      } // if this isn't a live video and preload permits, start\n      // downloading segments\n\n      if (media.endList && this.tech_.preload() !== 'none') {\n        this.mainSegmentLoader_.playlist(media, this.requestOptions_);\n        this.mainSegmentLoader_.load();\n      }\n      setupMediaGroups({\n        sourceType: this.sourceType_,\n        segmentLoaders: {\n          AUDIO: this.audioSegmentLoader_,\n          SUBTITLES: this.subtitleSegmentLoader_,\n          main: this.mainSegmentLoader_\n        },\n        tech: this.tech_,\n        requestOptions: this.requestOptions_,\n        mainPlaylistLoader: this.mainPlaylistLoader_,\n        vhs: this.vhs_,\n        main: this.main(),\n        mediaTypes: this.mediaTypes_,\n        excludePlaylist: this.excludePlaylist.bind(this)\n      });\n      this.triggerPresenceUsage_(this.main(), media);\n      this.setupFirstPlay();\n      if (!this.mediaTypes_.AUDIO.activePlaylistLoader || this.mediaTypes_.AUDIO.activePlaylistLoader.media()) {\n        this.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        this.mediaTypes_.AUDIO.activePlaylistLoader.one('loadedmetadata', () => {\n          this.trigger('selectedinitialmedia');\n        });\n      }\n    });\n    this.mainPlaylistLoader_.on('loadedplaylist', () => {\n      if (this.loadOnPlay_) {\n        this.tech_.off('play', this.loadOnPlay_);\n      }\n      let updatedPlaylist = this.mainPlaylistLoader_.media();\n      if (!updatedPlaylist) {\n        // Add content steering listeners on first load and init.\n        this.attachContentSteeringListeners_();\n        this.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        this.excludeUnsupportedVariants_();\n        let selectedMedia;\n        if (this.enableLowInitialPlaylist) {\n          selectedMedia = this.selectInitialPlaylist();\n        }\n        if (!selectedMedia) {\n          selectedMedia = this.selectPlaylist();\n        }\n        if (!selectedMedia || !this.shouldSwitchToMedia_(selectedMedia)) {\n          return;\n        }\n        this.initialMedia_ = selectedMedia;\n        this.switchMedia_(this.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        const haveJsonSource = this.sourceType_ === 'vhs-json' && this.initialMedia_.segments;\n        if (!haveJsonSource) {\n          return;\n        }\n        updatedPlaylist = this.initialMedia_;\n      }\n      this.handleUpdatedMediaPlaylist(updatedPlaylist);\n    });\n    this.mainPlaylistLoader_.on('error', () => {\n      const error = this.mainPlaylistLoader_.error;\n      this.excludePlaylist({\n        playlistToExclude: error.playlist,\n        error\n      });\n    });\n    this.mainPlaylistLoader_.on('mediachanging', () => {\n      this.mainSegmentLoader_.abort();\n      this.mainSegmentLoader_.pause();\n    });\n    this.mainPlaylistLoader_.on('mediachange', () => {\n      const media = this.mainPlaylistLoader_.media();\n      const 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(this.mainPlaylistLoader_.main, this.mainPlaylistLoader_.media())) {\n        this.requestOptions_.timeout = 0;\n      } else {\n        this.requestOptions_.timeout = requestTimeout;\n      }\n      if (this.sourceType_ === 'dash') {\n        // we don't want to re-request the same hls playlist right after it was changed\n        this.mainPlaylistLoader_.load();\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 `loadedplaylist`\n\n      this.mainSegmentLoader_.pause();\n      this.mainSegmentLoader_.playlist(media, this.requestOptions_);\n      if (this.waitingForFastQualityPlaylistReceived_) {\n        this.runFastQualitySwitch_();\n      } else {\n        this.mainSegmentLoader_.load();\n      }\n      this.tech_.trigger({\n        type: 'mediachange',\n        bubbles: true\n      });\n    });\n    this.mainPlaylistLoader_.on('playlistunchanged', () => {\n      const updatedPlaylist = this.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      const playlistOutdated = this.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        this.excludePlaylist({\n          error: {\n            message: 'Playlist no longer updating.',\n            reason: 'playlist-unchanged'\n          }\n        }); // useful for monitoring QoS\n\n        this.tech_.trigger('playliststuck');\n      }\n    });\n    this.mainPlaylistLoader_.on('renditiondisabled', () => {\n      this.tech_.trigger({\n        type: 'usage',\n        name: 'vhs-rendition-disabled'\n      });\n    });\n    this.mainPlaylistLoader_.on('renditionenabled', () => {\n      this.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  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_.pause();\n    this.mainSegmentLoader_.playlist(updatedPlaylist, this.requestOptions_);\n    if (this.waitingForFastQualityPlaylistReceived_) {\n      this.runFastQualitySwitch_();\n    }\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  triggerPresenceUsage_(main, media) {\n    const mediaGroups = main.mediaGroups || {};\n    let defaultDemuxed = true;\n    const audioGroupKeys = Object.keys(mediaGroups.AUDIO);\n    for (const mediaGroup in mediaGroups.AUDIO) {\n      for (const label in mediaGroups.AUDIO[mediaGroup]) {\n        const 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  shouldSwitchToMedia_(nextPlaylist) {\n    const currentPlaylist = this.mainPlaylistLoader_.media() || this.mainPlaylistLoader_.pendingMedia_;\n    const currentTime = this.tech_.currentTime();\n    const bufferLowWaterLine = this.bufferLowWaterLine();\n    const bufferHighWaterLine = this.bufferHighWaterLine();\n    const buffered = this.tech_.buffered();\n    return shouldSwitchToMedia({\n      buffered,\n      currentTime,\n      currentPlaylist,\n      nextPlaylist,\n      bufferLowWaterLine,\n      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  setupSegmentLoaderListeners_() {\n    this.mainSegmentLoader_.on('bandwidthupdate', () => {\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      this.checkABR_('bandwidthupdate');\n      this.tech_.trigger('bandwidthupdate');\n    });\n    this.mainSegmentLoader_.on('timeout', () => {\n      if (this.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        this.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', () => {\n        this.trigger('progress');\n      });\n    }\n    this.mainSegmentLoader_.on('error', () => {\n      const error = this.mainSegmentLoader_.error();\n      this.excludePlaylist({\n        playlistToExclude: error.playlist,\n        error\n      });\n    });\n    this.mainSegmentLoader_.on('appenderror', () => {\n      this.error = this.mainSegmentLoader_.error_;\n      this.trigger('error');\n    });\n    this.mainSegmentLoader_.on('syncinfoupdate', () => {\n      this.onSyncInfoUpdate_();\n    });\n    this.mainSegmentLoader_.on('timestampoffset', () => {\n      this.tech_.trigger({\n        type: 'usage',\n        name: 'vhs-timestamp-offset'\n      });\n    });\n    this.audioSegmentLoader_.on('syncinfoupdate', () => {\n      this.onSyncInfoUpdate_();\n    });\n    this.audioSegmentLoader_.on('appenderror', () => {\n      this.error = this.audioSegmentLoader_.error_;\n      this.trigger('error');\n    });\n    this.mainSegmentLoader_.on('ended', () => {\n      this.logger_('main segment loader ended');\n      this.onEndOfStream();\n    });\n    this.mainSegmentLoader_.on('earlyabort', event => {\n      // never try to early abort with the new ABR algorithm\n      if (this.bufferBasedABR) {\n        return;\n      }\n      this.delegateLoaders_('all', ['abort']);\n      this.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    const updateCodecs = () => {\n      if (!this.sourceUpdater_.hasCreatedSourceBuffers()) {\n        return this.tryToCreateSourceBuffers_();\n      }\n      const codecs = this.getCodecsOrExclude_(); // no codecs means that the playlist was excluded\n\n      if (!codecs) {\n        return;\n      }\n      this.sourceUpdater_.addOrChangeSourceBuffers(codecs);\n    };\n    this.mainSegmentLoader_.on('trackinfo', updateCodecs);\n    this.audioSegmentLoader_.on('trackinfo', updateCodecs);\n    this.mainSegmentLoader_.on('fmp4', () => {\n      if (!this.triggeredFmp4Usage) {\n        this.tech_.trigger({\n          type: 'usage',\n          name: 'vhs-fmp4'\n        });\n        this.triggeredFmp4Usage = true;\n      }\n    });\n    this.audioSegmentLoader_.on('fmp4', () => {\n      if (!this.triggeredFmp4Usage) {\n        this.tech_.trigger({\n          type: 'usage',\n          name: 'vhs-fmp4'\n        });\n        this.triggeredFmp4Usage = true;\n      }\n    });\n    this.audioSegmentLoader_.on('ended', () => {\n      this.logger_('audioSegmentLoader ended');\n      this.onEndOfStream();\n    });\n  }\n  mediaSecondsLoaded_() {\n    return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded + this.mainSegmentLoader_.mediaSecondsLoaded);\n  }\n  /**\n   * Call load on our SegmentLoaders\n   */\n\n  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 method will perform destructive actions like removing\n   * already buffered content in order to readjust the currently active\n   * playlist quickly. This is good for manual quality changes\n   *\n   * @private\n   */\n\n  fastQualityChange_(media = this.selectPlaylist()) {\n    if (media && 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'); // we would like to avoid race condition when we call fastQuality,\n    // reset everything and start loading segments from prev segments instead of new because new playlist is not received yet\n\n    this.waitingForFastQualityPlaylistReceived_ = true;\n  }\n  runFastQualitySwitch_() {\n    this.waitingForFastQualityPlaylistReceived_ = false; // Delete all buffered data to allow an immediate quality switch, then seek to give\n    // the browser a kick to remove any cached frames from the previous rendtion (.04 seconds\n    // ahead was roughly the minimum that will accomplish this across a variety of content\n    // in IE and Edge, but seeking in place is sufficient on all other browsers)\n    // Edge/IE bug: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/14600375/\n    // Chrome bug: https://bugs.chromium.org/p/chromium/issues/detail?id=651904\n\n    this.mainSegmentLoader_.pause();\n    this.mainSegmentLoader_.resetEverything(() => {\n      this.tech_.setCurrentTime(this.tech_.currentTime());\n    }); // don't need to reset audio as it is reset when media changes\n  }\n  /**\n   * Begin playback.\n   */\n\n  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    const 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  setupFirstPlay() {\n    const 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      const 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      const seekableEnd = seekable.end(0);\n      let startPoint = seekableEnd;\n      if (media.start) {\n        const 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  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      const 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, e => {});\n      }\n    }\n    this.trigger('sourceopen');\n  }\n  /**\n   * handle the sourceended event on the MediaSource\n   *\n   * @private\n   */\n\n  handleSourceEnded_() {\n    if (!this.inbandTextTracks_.metadataTrack_) {\n      return;\n    }\n    const cues = this.inbandTextTracks_.metadataTrack_.cues;\n    if (!cues || !cues.length) {\n      return;\n    }\n    const 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  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  onEndOfStream() {\n    let isEndOfStream = this.mainSegmentLoader_.ended_;\n    if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n      const 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  stuckAtPlaylistEnd_(playlist) {\n    const 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    const 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    const absolutePlaylistEnd = Vhs$1.Playlist.playlistEnd(playlist, expired);\n    const currentTime = this.tech_.currentTime();\n    const 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    const 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  excludePlaylist({\n    playlistToExclude = this.mainPlaylistLoader_.media(),\n    error = {},\n    playlistExclusionDuration\n  }) {\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    const playlists = this.mainPlaylistLoader_.main.playlists;\n    const enabledPlaylists = playlists.filter(isEnabled);\n    const 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 ${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        const pathway = this.pathwayAttribute_(playlistToExclude); // Ignore at least 1 steering manifest refresh.\n\n        const reIncludeDelay = this.contentSteeringController_.steeringManifest.ttl * 1000;\n        this.contentSteeringController_.excludePathway(pathway);\n        this.excludeThenChangePathway_();\n        setTimeout(() => {\n          this.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      let reincluded = false;\n      playlists.forEach(playlist => {\n        // skip current playlist which is about to be excluded\n        if (playlist === playlistToExclude) {\n          return;\n        }\n        const 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    let 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    const 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    const logFn = error.internal ? this.logger_ : videojs.log.warn;\n    const errorMessage = error.message ? ' ' + error.message : '';\n    logFn(`${error.internal ? 'Internal problem' : 'Problem'} encountered with playlist ${playlistToExclude.id}.` + `${errorMessage} Switching to playlist ${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    const delayDuration = nextPlaylist.targetDuration / 2 * 1000 || 5 * 1000;\n    const 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  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  delegateLoaders_(filter, fnNames) {\n    const loaders = [];\n    const dontFilterPlaylist = filter === 'all';\n    if (dontFilterPlaylist || filter === 'main') {\n      loaders.push(this.mainPlaylistLoader_);\n    }\n    const 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(mediaType => {\n      const loader = this.mediaTypes_[mediaType] && this.mediaTypes_[mediaType].activePlaylistLoader;\n      if (loader) {\n        loaders.push(loader);\n      }\n    });\n    ['main', 'audio', 'subtitle'].forEach(name => {\n      const loader = this[`${name}SegmentLoader_`];\n      if (loader && (filter === name || filter === 'all')) {\n        loaders.push(loader);\n      }\n    });\n    loaders.forEach(loader => fnNames.forEach(fnName => {\n      if (typeof loader[fnName] === 'function') {\n        loader[fnName]();\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  setCurrentTime(currentTime) {\n    const 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_.pause();\n    this.mainSegmentLoader_.resetEverything();\n    if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n      this.audioSegmentLoader_.pause();\n      this.audioSegmentLoader_.resetEverything();\n    }\n    if (this.mediaTypes_.SUBTITLES.activePlaylistLoader) {\n      this.subtitleSegmentLoader_.pause();\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  duration() {\n    if (!this.mainPlaylistLoader_) {\n      return 0;\n    }\n    const 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  seekable() {\n    return this.seekable_;\n  }\n  onSyncInfoUpdate_() {\n    let 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    let media = this.mainPlaylistLoader_.media();\n    if (!media) {\n      return;\n    }\n    let expired = this.syncController_.getExpiredTime(media, this.duration());\n    if (expired === null) {\n      // not enough information to update seekable\n      return;\n    }\n    const main = this.mainPlaylistLoader_.main;\n    const 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    let oldEnd;\n    let 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 [${printableRange(this.seekable_)}]`);\n    this.tech_.trigger('seekablechanged');\n  }\n  /**\n   * Update the player duration\n   */\n\n  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      const seekable = this.seekable();\n      if (!seekable.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 < seekable.end(seekable.length - 1)) {\n        this.sourceUpdater_.setDuration(seekable.end(seekable.length - 1));\n      }\n      return;\n    }\n    const buffered = this.tech_.buffered();\n    let 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  dispose() {\n    this.trigger('dispose');\n    this.decrypter_.terminate();\n    this.mainPlaylistLoader_.dispose();\n    this.mainSegmentLoader_.dispose();\n    this.contentSteeringController_.dispose();\n    this.keyStatusMap_.clear();\n    if (this.loadOnPlay_) {\n      this.tech_.off('play', this.loadOnPlay_);\n    }\n    ['AUDIO', 'SUBTITLES'].forEach(type => {\n      const groups = this.mediaTypes_[type].groups;\n      for (const id in groups) {\n        groups[id].forEach(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  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  media() {\n    // playlist loader will not return media if it has not been fully loaded\n    return this.mainPlaylistLoader_.media() || this.initialMedia_;\n  }\n  areMediaTypesKnown_() {\n    const usingAudioLoader = !!this.mediaTypes_.AUDIO.activePlaylistLoader;\n    const 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    const 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  getCodecsOrExclude_() {\n    const media = {\n      main: this.mainSegmentLoader_.getCurrentMediaInfo_() || {},\n      audio: this.audioSegmentLoader_.getCurrentMediaInfo_() || {}\n    };\n    const playlist = this.mainSegmentLoader_.getPendingSegmentPlaylist() || this.media(); // set \"main\" media equal to video\n\n    media.video = media.main;\n    const playlistCodecs = codecsForPlaylist(this.main(), playlist);\n    const codecs = {};\n    const usingAudioLoader = !!this.mediaTypes_.AUDIO.activePlaylistLoader;\n    if (media.main.hasVideo) {\n      codecs.video = playlistCodecs.video || media.main.videoCodec || codecs_js.DEFAULT_VIDEO_CODEC;\n    }\n    if (media.main.isMuxed) {\n      codecs.video += `,${playlistCodecs.audio || media.main.audioCodec || codecs_js.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 || codecs_js.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    const supportFunction = (isFmp4, codec) => isFmp4 ? codecs_js.browserSupportsCodec(codec) : codecs_js.muxerSupportsCodec(codec);\n    const unsupportedCodecs = {};\n    let unsupportedAudio;\n    ['video', 'audio'].forEach(function (type) {\n      if (codecs.hasOwnProperty(type) && !supportFunction(media[type].isFmp4, codecs[type])) {\n        const 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      const audioGroup = playlist.attributes.AUDIO;\n      this.main().playlists.forEach(variant => {\n        const variantAudioGroup = variant.attributes && variant.attributes.AUDIO;\n        if (variantAudioGroup === audioGroup && variant !== playlist) {\n          variant.excludeUntil = Infinity;\n        }\n      });\n      this.logger_(`excluding audio group ${audioGroup} as ${unsupportedAudio} does not support codec(s): \"${codecs.audio}\"`);\n    } // if we have any unsupported codecs exclude this playlist.\n\n    if (Object.keys(unsupportedCodecs).length) {\n      const message = Object.keys(unsupportedCodecs).reduce((acc, supporter) => {\n        if (acc) {\n          acc += ', ';\n        }\n        acc += `${supporter} does not support codec(s): \"${unsupportedCodecs[supporter].join(',')}\"`;\n        return acc;\n      }, '') + '.';\n      this.excludePlaylist({\n        playlistToExclude: playlist,\n        error: {\n          internal: true,\n          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      const switchMessages = [];\n      ['video', 'audio'].forEach(type => {\n        const newCodec = (codecs_js.parseCodecs(this.sourceUpdater_.codecs[type] || '')[0] || {}).type;\n        const oldCodec = (codecs_js.parseCodecs(codecs[type] || '')[0] || {}).type;\n        if (newCodec && oldCodec && newCodec.toLowerCase() !== oldCodec.toLowerCase()) {\n          switchMessages.push(`\"${this.sourceUpdater_.codecs[type]}\" -> \"${codecs[type]}\"`);\n        }\n      });\n      if (switchMessages.length) {\n        this.excludePlaylist({\n          playlistToExclude: playlist,\n          error: {\n            message: `Codec switching not supported: ${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  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    const codecs = this.getCodecsOrExclude_(); // no codecs means that the playlist was excluded\n\n    if (!codecs) {\n      return;\n    }\n    this.sourceUpdater_.createSourceBuffers(codecs);\n    const 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  excludeUnsupportedVariants_() {\n    const playlists = this.main().playlists;\n    const 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(key => {\n      const 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      const codecs = codecsForPlaylist(this.main, variant);\n      const unsupported = [];\n      if (codecs.audio && !codecs_js.muxerSupportsCodec(codecs.audio) && !codecs_js.browserSupportsCodec(codecs.audio)) {\n        unsupported.push(`audio codec ${codecs.audio}`);\n      }\n      if (codecs.video && !codecs_js.muxerSupportsCodec(codecs.video) && !codecs_js.browserSupportsCodec(codecs.video)) {\n        unsupported.push(`video codec ${codecs.video}`);\n      }\n      if (codecs.text && codecs.text === 'stpp.ttml.im1t') {\n        unsupported.push(`text codec ${codecs.text}`);\n      }\n      if (unsupported.length) {\n        variant.excludeUntil = Infinity;\n        this.logger_(`excluding ${variant.id} for unsupported: ${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  excludeIncompatibleVariants_(codecString) {\n    const ids = [];\n    const playlists = this.main().playlists;\n    const codecs = unwrapCodecList(codecs_js.parseCodecs(codecString));\n    const codecCount_ = codecCount(codecs);\n    const videoDetails = codecs.video && codecs_js.parseCodecs(codecs.video)[0] || null;\n    const audioDetails = codecs.audio && codecs_js.parseCodecs(codecs.audio)[0] || null;\n    Object.keys(playlists).forEach(key => {\n      const 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      const exclusionReasons = []; // get codecs from the playlist for this variant\n\n      const variantCodecs = codecsForPlaylist(this.mainPlaylistLoader_.main, variant);\n      const 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 \"${variantCodecCount}\" !== \"${codecCount_}\"`);\n      } // only exclude playlists by codec change, if codecs cannot switch\n      // during playback.\n\n      if (!this.sourceUpdater_.canChangeType()) {\n        const variantVideoDetails = variantCodecs.video && codecs_js.parseCodecs(variantCodecs.video)[0] || null;\n        const variantAudioDetails = variantCodecs.audio && codecs_js.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 \"${variantVideoDetails.type}\" !== \"${videoDetails.type}\"`);\n        } // the audio codec cannot change\n\n        if (variantAudioDetails && audioDetails && variantAudioDetails.type.toLowerCase() !== audioDetails.type.toLowerCase()) {\n          exclusionReasons.push(`audio codec \"${variantAudioDetails.type}\" !== \"${audioDetails.type}\"`);\n        }\n      }\n      if (exclusionReasons.length) {\n        variant.excludeUntil = Infinity;\n        this.logger_(`excluding ${variant.id}: ${exclusionReasons.join(' && ')}`);\n      }\n    });\n  }\n  updateAdCues_(media) {\n    let offset = 0;\n    const 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  goalBufferLength() {\n    const currentTime = this.tech_.currentTime();\n    const initial = Config.GOAL_BUFFER_LENGTH;\n    const rate = Config.GOAL_BUFFER_LENGTH_RATE;\n    const 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  bufferLowWaterLine() {\n    const currentTime = this.tech_.currentTime();\n    const initial = Config.BUFFER_LOW_WATER_LINE;\n    const rate = Config.BUFFER_LOW_WATER_LINE_RATE;\n    const max = Math.max(initial, Config.MAX_BUFFER_LOW_WATER_LINE);\n    const newMax = Math.max(initial, Config.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);\n    return Math.min(initial + currentTime * rate, this.bufferBasedABR ? newMax : max);\n  }\n  bufferHighWaterLine() {\n    return Config.BUFFER_HIGH_WATER_LINE;\n  }\n  addDateRangesToTextTrack_(dateRanges) {\n    createMetadataTrackIfNotExists(this.inbandTextTracks_, 'com.apple.streaming', this.tech_);\n    addDateRangeMetadata({\n      inbandTextTracks: this.inbandTextTracks_,\n      dateRanges\n    });\n  }\n  addMetadataToTextTrack(dispatchType, metadataArray, videoDuration) {\n    const 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,\n      timestampOffset,\n      videoDuration\n    });\n  }\n  /**\n   * Utility for getting the pathway or service location from an HLS or DASH playlist.\n   *\n   * @param {Object} playlist for getting pathway from.\n   * @return the pathway attribute of a playlist\n   */\n\n  pathwayAttribute_(playlist) {\n    return playlist.attributes['PATHWAY-ID'] || playlist.attributes.serviceLocation;\n  }\n  /**\n   * Initialize available pathways and apply the tag properties.\n   */\n\n  initContentSteeringController_() {\n    const main = this.main();\n    if (!main.contentSteering) {\n      return;\n    }\n    for (const playlist of main.playlists) {\n      this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(playlist));\n    }\n    this.contentSteeringController_.assignTagProperties(main.uri, main.contentSteering); // request the steering manifest immediately if queryBeforeStart is set.\n\n    if (this.contentSteeringController_.queryBeforeStart) {\n      // When queryBeforeStart is true, initial request should omit steering parameters.\n      this.contentSteeringController_.requestSteeringManifest(true);\n      return;\n    } // otherwise start content steering after playback starts\n\n    this.tech_.one('canplay', () => {\n      this.contentSteeringController_.requestSteeringManifest();\n    });\n  }\n  /**\n   * Reset the content steering controller and re-init.\n   */\n\n  resetContentSteeringController_() {\n    this.contentSteeringController_.clearAvailablePathways();\n    this.contentSteeringController_.dispose();\n    this.initContentSteeringController_();\n  }\n  /**\n   * Attaches the listeners for content steering.\n   */\n\n  attachContentSteeringListeners_() {\n    this.contentSteeringController_.on('content-steering', this.excludeThenChangePathway_.bind(this));\n    if (this.sourceType_ === 'dash') {\n      this.mainPlaylistLoader_.on('loadedplaylist', () => {\n        const main = this.main(); // check if steering tag or pathways changed.\n\n        const didDashTagChange = this.contentSteeringController_.didDASHTagChange(main.uri, main.contentSteering);\n        const didPathwaysChange = () => {\n          const availablePathways = this.contentSteeringController_.getAvailablePathways();\n          const newPathways = [];\n          for (const playlist of main.playlists) {\n            const serviceLocation = playlist.attributes.serviceLocation;\n            if (serviceLocation) {\n              newPathways.push(serviceLocation);\n              if (!availablePathways.has(serviceLocation)) {\n                return true;\n              }\n            }\n          } // If we have no new serviceLocations and previously had availablePathways\n\n          if (!newPathways.length && availablePathways.size) {\n            return true;\n          }\n          return false;\n        };\n        if (didDashTagChange || didPathwaysChange()) {\n          this.resetContentSteeringController_();\n        }\n      });\n    }\n  }\n  /**\n   * Simple exclude and change playlist logic for content steering.\n   */\n\n  excludeThenChangePathway_() {\n    const currentPathway = this.contentSteeringController_.getPathway();\n    if (!currentPathway) {\n      return;\n    }\n    this.handlePathwayClones_();\n    const main = this.main();\n    const playlists = main.playlists;\n    const ids = new Set();\n    let didEnablePlaylists = false;\n    Object.keys(playlists).forEach(key => {\n      const variant = playlists[key];\n      const pathwayId = this.pathwayAttribute_(variant);\n      const differentPathwayId = pathwayId && currentPathway !== pathwayId;\n      const 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      const noExcludeUntil = !variant.excludeUntil && variant.excludeUntil !== Infinity;\n      const 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      this.logger_(`excluding ${variant.id} for ${variant.lastExcludeReason_}`);\n    });\n    if (this.contentSteeringController_.manifestType_ === 'DASH') {\n      Object.keys(this.mediaTypes_).forEach(key => {\n        const type = this.mediaTypes_[key];\n        if (type.activePlaylistLoader) {\n          const 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   * Add, update, or delete playlists and media groups for\n   * the pathway clones for HLS Content Steering.\n   *\n   * See https://datatracker.ietf.org/doc/draft-pantos-hls-rfc8216bis/\n   *\n   * NOTE: Pathway cloning does not currently support the `PER_VARIANT_URIS` and\n   * `PER_RENDITION_URIS` as we do not handle `STABLE-VARIANT-ID` or\n   * `STABLE-RENDITION-ID` values.\n   */\n\n  handlePathwayClones_() {\n    const main = this.main();\n    const playlists = main.playlists;\n    const currentPathwayClones = this.contentSteeringController_.currentPathwayClones;\n    const nextPathwayClones = this.contentSteeringController_.nextPathwayClones;\n    const hasClones = currentPathwayClones && currentPathwayClones.size || nextPathwayClones && nextPathwayClones.size;\n    if (!hasClones) {\n      return;\n    }\n    for (const [id, clone] of currentPathwayClones.entries()) {\n      const newClone = nextPathwayClones.get(id); // Delete the old pathway clone.\n\n      if (!newClone) {\n        this.mainPlaylistLoader_.updateOrDeleteClone(clone);\n        this.contentSteeringController_.excludePathway(id);\n      }\n    }\n    for (const [id, clone] of nextPathwayClones.entries()) {\n      const oldClone = currentPathwayClones.get(id); // Create a new pathway if it is a new pathway clone object.\n\n      if (!oldClone) {\n        const playlistsToClone = playlists.filter(p => {\n          return p.attributes['PATHWAY-ID'] === clone['BASE-ID'];\n        });\n        playlistsToClone.forEach(p => {\n          this.mainPlaylistLoader_.addClonePathway(clone, p);\n        });\n        this.contentSteeringController_.addAvailablePathway(id);\n        continue;\n      } // There have not been changes to the pathway clone object, so skip.\n\n      if (this.equalPathwayClones_(oldClone, clone)) {\n        continue;\n      } // Update a preexisting cloned pathway.\n      // True is set for the update flag.\n\n      this.mainPlaylistLoader_.updateOrDeleteClone(clone, true);\n      this.contentSteeringController_.addAvailablePathway(id);\n    } // Deep copy contents of next to current pathways.\n\n    this.contentSteeringController_.currentPathwayClones = new Map(JSON.parse(JSON.stringify([...nextPathwayClones])));\n  }\n  /**\n   * Determines whether two pathway clone objects are equivalent.\n   *\n   * @param {Object} a The first pathway clone object.\n   * @param {Object} b The second pathway clone object.\n   * @return {boolean} True if the pathway clone objects are equal, false otherwise.\n   */\n\n  equalPathwayClones_(a, b) {\n    if (a['BASE-ID'] !== b['BASE-ID'] || a.ID !== b.ID || a['URI-REPLACEMENT'].HOST !== b['URI-REPLACEMENT'].HOST) {\n      return false;\n    }\n    const aParams = a['URI-REPLACEMENT'].PARAMS;\n    const bParams = b['URI-REPLACEMENT'].PARAMS; // We need to iterate through both lists of params because one could be\n    // missing a parameter that the other has.\n\n    for (const p in aParams) {\n      if (aParams[p] !== bParams[p]) {\n        return false;\n      }\n    }\n    for (const p in bParams) {\n      if (aParams[p] !== bParams[p]) {\n        return false;\n      }\n    }\n    return true;\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  changeSegmentPathway_() {\n    const 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   * Iterates through playlists and check their keyId set and compare with the\n   * keyStatusMap, only enable playlists that have a usable key. If the playlist\n   * has no keyId leave it enabled by default.\n   */\n\n  excludeNonUsablePlaylistsByKeyId_() {\n    if (!this.mainPlaylistLoader_ || !this.mainPlaylistLoader_.main) {\n      return;\n    }\n    let nonUsableKeyStatusCount = 0;\n    const NON_USABLE = 'non-usable';\n    this.mainPlaylistLoader_.main.playlists.forEach(playlist => {\n      const keyIdSet = this.mainPlaylistLoader_.getKeyIdSet(playlist); // If the playlist doesn't have keyIDs lets not exclude it.\n\n      if (!keyIdSet || !keyIdSet.size) {\n        return;\n      }\n      keyIdSet.forEach(key => {\n        const USABLE = 'usable';\n        const hasUsableKeyStatus = this.keyStatusMap_.has(key) && this.keyStatusMap_.get(key) === USABLE;\n        const nonUsableExclusion = playlist.lastExcludeReason_ === NON_USABLE && playlist.excludeUntil === Infinity;\n        if (!hasUsableKeyStatus) {\n          // Only exclude playlists that haven't already been excluded as non-usable.\n          if (playlist.excludeUntil !== Infinity && playlist.lastExcludeReason_ !== NON_USABLE) {\n            playlist.excludeUntil = Infinity;\n            playlist.lastExcludeReason_ = NON_USABLE;\n            this.logger_(`excluding playlist ${playlist.id} because the key ID ${key} doesn't exist in the keyStatusMap or is not ${USABLE}`);\n          } // count all nonUsableKeyStatus\n\n          nonUsableKeyStatusCount++;\n        } else if (hasUsableKeyStatus && nonUsableExclusion) {\n          delete playlist.excludeUntil;\n          delete playlist.lastExcludeReason_;\n          this.logger_(`enabling playlist ${playlist.id} because key ID ${key} is ${USABLE}`);\n        }\n      });\n    }); // If for whatever reason every playlist has a non usable key status. Lets try re-including the SD renditions as a failsafe.\n\n    if (nonUsableKeyStatusCount >= this.mainPlaylistLoader_.main.playlists.length) {\n      this.mainPlaylistLoader_.main.playlists.forEach(playlist => {\n        const isNonHD = playlist && playlist.attributes && playlist.attributes.RESOLUTION && playlist.attributes.RESOLUTION.height < 720;\n        const excludedForNonUsableKey = playlist.excludeUntil === Infinity && playlist.lastExcludeReason_ === NON_USABLE;\n        if (isNonHD && excludedForNonUsableKey) {\n          // Only delete the excludeUntil so we don't try and re-exclude these playlists.\n          delete playlist.excludeUntil;\n          videojs.log.warn(`enabling non-HD playlist ${playlist.id} because all playlists were excluded due to ${NON_USABLE} key IDs`);\n        }\n      });\n    }\n  }\n  /**\n   * Adds a keystatus to the keystatus map, tries to convert to string if necessary.\n   *\n   * @param {any} keyId the keyId to add a status for\n   * @param {string} status the status of the keyId\n   */\n\n  addKeyStatus_(keyId, status) {\n    const isString = typeof keyId === 'string';\n    const keyIdHexString = isString ? keyId : bufferToHexString(keyId);\n    const formattedKeyIdString = keyIdHexString.slice(0, 32).toLowerCase();\n    this.logger_(`KeyStatus '${status}' with key ID ${formattedKeyIdString} added to the keyStatusMap`);\n    this.keyStatusMap_.set(formattedKeyIdString, status);\n  }\n  /**\n   * Utility function for adding key status to the keyStatusMap and filtering usable encrypted playlists.\n   *\n   * @param {any} keyId the keyId from the keystatuschange event\n   * @param {string} status the key status string\n   */\n\n  updatePlaylistByKeyStatus(keyId, status) {\n    this.addKeyStatus_(keyId, status);\n    if (!this.waitingForFastQualityPlaylistReceived_) {\n      this.excludeNonUsableThenChangePlaylist_();\n    } // Listen to loadedplaylist with a single listener and check for new contentProtection elements when a playlist is updated.\n\n    this.mainPlaylistLoader_.off('loadedplaylist', this.excludeNonUsableThenChangePlaylist_.bind(this));\n    this.mainPlaylistLoader_.on('loadedplaylist', this.excludeNonUsableThenChangePlaylist_.bind(this));\n  }\n  excludeNonUsableThenChangePlaylist_() {\n    this.excludeNonUsablePlaylistsByKeyId_();\n    this.fastQualityChange_();\n  }\n}\n\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 */\n\nconst enableFunction = (loader, playlistID, changePlaylistFn) => enable => {\n  const playlist = loader.main.playlists[playlistID];\n  const incompatible = isIncompatible(playlist);\n  const 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 * 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 */\n\nclass Representation {\n  constructor(vhsHandler, playlist, id) {\n    const {\n      playlistController_: pc\n    } = vhsHandler;\n    const qualityChangeFunction = pc.fastQualityChange_.bind(pc); // some playlist attributes are optional\n\n    if (playlist.attributes) {\n      const 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/**\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 */\n\nconst renditionSelectionMixin = function (vhsHandler) {\n  // Add a single API-specific function to the VhsHandler instance\n  vhsHandler.representations = () => {\n    const main = vhsHandler.playlistController_.main();\n    const playlists = isAudioOnly(main) ? vhsHandler.playlistController_.getAudioTrackPlaylists_() : main.playlists;\n    if (!playlists) {\n      return [];\n    }\n    return playlists.filter(media => !isIncompatible(media)).map((e, i) => new Representation(vhsHandler, e, e.id));\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\nconst timerCancelEvents = ['seeking', 'seeked', 'pause', 'playing', 'error'];\n/**\n * @class PlaybackWatcher\n */\n\nclass PlaybackWatcher {\n  /**\n   * Represents an PlaybackWatcher object.\n   *\n   * @class\n   * @param {Object} options an object that includes the tech and settings\n   */\n  constructor(options) {\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    const playHandler = () => this.monitorCurrentTime_();\n    const canPlayHandler = () => this.monitorCurrentTime_();\n    const waitingHandler = () => this.techWaiting_();\n    const cancelTimerHandler = () => this.resetTimeUpdate_();\n    const pc = this.playlistController_;\n    const loaderTypes = ['main', 'subtitle', 'audio'];\n    const loaderChecks = {};\n    loaderTypes.forEach(type => {\n      loaderChecks[type] = {\n        reset: () => this.resetSegmentDownloads_(type),\n        updateend: () => this.checkSegmentDownloads_(type)\n      };\n      pc[`${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[`${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      this.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    const setSeekingHandlers = fn => {\n      ['main', 'audio'].forEach(type => {\n        pc[`${type}SegmentLoader_`][fn]('appended', this.seekingAppendCheck_);\n      });\n    };\n    this.seekingAppendCheck_ = () => {\n      if (this.fixesBadSeeks_()) {\n        this.consecutiveUpdates = 0;\n        this.lastRecordedTime = this.tech_.currentTime();\n        setSeekingHandlers('off');\n      }\n    };\n    this.clearSeekingAppendCheck_ = () => setSeekingHandlers('off');\n    this.watchForBadSeeking_ = () => {\n      this.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 = () => {\n      this.clearSeekingAppendCheck_();\n      this.logger_('dispose');\n      this.tech_.off('waiting', waitingHandler);\n      this.tech_.off(timerCancelEvents, cancelTimerHandler);\n      this.tech_.off('canplay', canPlayHandler);\n      this.tech_.off('play', playHandler);\n      this.tech_.off('seeking', this.watchForBadSeeking_);\n      this.tech_.off('seeked', this.clearSeekingAppendCheck_);\n      loaderTypes.forEach(type => {\n        pc[`${type}SegmentLoader_`].off('appendsdone', loaderChecks[type].updateend);\n        pc[`${type}SegmentLoader_`].off('playlistupdate', loaderChecks[type].reset);\n        this.tech_.off(['seeked', 'seeking'], loaderChecks[type].reset);\n      });\n      if (this.checkCurrentTimeTimeout_) {\n        window__default[\"default\"].clearTimeout(this.checkCurrentTimeTimeout_);\n      }\n      this.resetTimeUpdate_();\n    };\n  }\n  /**\n   * Periodically check current time to see if playback stopped\n   *\n   * @private\n   */\n\n  monitorCurrentTime_() {\n    this.checkCurrentTime_();\n    if (this.checkCurrentTimeTimeout_) {\n      window__default[\"default\"].clearTimeout(this.checkCurrentTimeTimeout_);\n    } // 42 = 24 fps // 250 is what Webkit uses // FF uses 15\n\n    this.checkCurrentTimeTimeout_ = window__default[\"default\"].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  resetSegmentDownloads_(type) {\n    const loader = this.playlistController_[`${type}SegmentLoader_`];\n    if (this[`${type}StalledDownloads_`] > 0) {\n      this.logger_(`resetting possible stalled download count for ${type} loader`);\n    }\n    this[`${type}StalledDownloads_`] = 0;\n    this[`${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  checkSegmentDownloads_(type) {\n    const pc = this.playlistController_;\n    const loader = pc[`${type}SegmentLoader_`];\n    const buffered = loader.buffered_();\n    const isBufferedDifferent = isRangeDifferent(this[`${type}Buffered_`], buffered);\n    this[`${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[`${type}StalledDownloads_`]++;\n    this.logger_(`found #${this[`${type}StalledDownloads_`]} ${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[`${type}StalledDownloads_`] < 10) {\n      return;\n    }\n    this.logger_(`${type} loader stalled download exclusion`);\n    this.resetSegmentDownloads_(type);\n    this.tech_.trigger({\n      type: 'usage',\n      name: `vhs-${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 ${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  checkCurrentTime_() {\n    if (this.tech_.paused() || this.tech_.seeking()) {\n      return;\n    }\n    const currentTime = this.tech_.currentTime();\n    const 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  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  fixesBadSeeks_() {\n    const 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    const seekable = this.seekable();\n    const currentTime = this.tech_.currentTime();\n    const isAfterSeekableRange = this.afterSeekableWindow_(seekable, currentTime, this.media(), this.allowSeeksWithinUnsafeLiveWindow);\n    let seekTo;\n    if (isAfterSeekableRange) {\n      const 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      const 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 ${currentTime} with ` + `seekable range ${printableRange(seekable)}. Seeking to ` + `${seekTo}.`);\n      this.tech_.setCurrentTime(seekTo);\n      return true;\n    }\n    const sourceUpdater = this.playlistController_.sourceUpdater_;\n    const buffered = this.tech_.buffered();\n    const audioBuffered = sourceUpdater.audioBuffer ? sourceUpdater.audioBuffered() : null;\n    const videoBuffered = sourceUpdater.videoBuffer ? sourceUpdater.videoBuffered() : null;\n    const 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    const 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    const bufferedToCheck = [audioBuffered, videoBuffered];\n    for (let i = 0; i < bufferedToCheck.length; i++) {\n      // skip null buffered\n      if (!bufferedToCheck[i]) {\n        continue;\n      }\n      const timeAhead = timeAheadOf(bufferedToCheck[i], 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    const 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 (${nextRange.start(0)}) ` + ` just beyond seek point (${currentTime}). Seeking to ${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  waiting_() {\n    if (this.techWaiting_()) {\n      return;\n    } // All tech waiting checks failed. Use last resort correction\n\n    const currentTime = this.tech_.currentTime();\n    const buffered = this.tech_.buffered();\n    const 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 ${currentTime} while inside a buffered region ` + `[${currentRange.start(0)} -> ${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  techWaiting_() {\n    const seekable = this.seekable();\n    const 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      const livePoint = seekable.end(seekable.length - 1);\n      this.logger_(`Fell out of live window at time ${currentTime}. Seeking to ` + `live point (seekable end) ${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    const sourceUpdater = this.tech_.vhs.playlistController_.sourceUpdater_;\n    const buffered = this.tech_.buffered();\n    const videoUnderflow = this.videoUnderflow_({\n      audioBuffered: sourceUpdater.audioBuffered(),\n      videoBuffered: sourceUpdater.videoBuffered(),\n      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    const nextRange = findNextRange(buffered, currentTime); // check for gap\n\n    if (nextRange.length > 0) {\n      this.logger_(`Stopped at ${currentTime} and seeking to ${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  afterSeekableWindow_(seekable, currentTime, playlist, allowSeeksWithinUnsafeLiveWindow = 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    let allowedEnd = seekable.end(seekable.length - 1) + SAFE_TIME_DELTA;\n    const isLive = !playlist.endList;\n    const 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  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  videoUnderflow_({\n    videoBuffered,\n    audioBuffered,\n    currentTime\n  }) {\n    // audio only content will not have video underflow :)\n    if (!videoBuffered) {\n      return;\n    }\n    let 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      const lastVideoRange = findRange(videoBuffered, currentTime - 3);\n      const videoRange = findRange(videoBuffered, currentTime);\n      const 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      const 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 ${gap.start} to ${gap.end}. ` + `Seeking to current time ${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  skipTheGap_(scheduledCurrentTime) {\n    const buffered = this.tech_.buffered();\n    const currentTime = this.tech_.currentTime();\n    const 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  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    const gaps = findGaps(buffered);\n    for (let i = 0; i < gaps.length; i++) {\n      const start = gaps.start(i);\n      const end = gaps.end(i); // gap is starts no more than 4 seconds back\n\n      if (currentTime - start < 4 && currentTime - start > 2) {\n        return {\n          start,\n          end\n        };\n      }\n    }\n    return null;\n  }\n}\nconst defaultOptions = {\n  errorInterval: 30,\n  getSource(next) {\n    const tech = this.tech({\n      IWillNotUseThisInPlugins: true\n    });\n    const 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\nconst initPlugin = function (player, options) {\n  let lastCalled = 0;\n  let seekTo = 0;\n  const localOptions = merge(defaultOptions, options);\n  player.ready(() => {\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  const loadedMetadataHandler = function () {\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  const setSource = function (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  const errorHandler = function () {\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  const cleanupEvents = function () {\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  const reinitPlugin = function (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\nconst reloadSourceOnError = function (options) {\n  initPlugin(this, options);\n};\nvar version$4 = \"3.10.0\";\nvar version$3 = \"7.0.2\";\nvar version$2 = \"1.3.0\";\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 */\nconst Vhs = {\n  PlaylistLoader,\n  Playlist,\n  utils,\n  STANDARD_PLAYLIST_SELECTOR: lastBandwidthSelector,\n  INITIAL_PLAYLIST_SELECTOR: lowestBitrateCompatibleVariantSelector,\n  lastBandwidthSelector,\n  movingAverageBandwidthSelector,\n  comparePlaylistBandwidth,\n  comparePlaylistResolution,\n  xhr: xhrFactory()\n}; // Define getter/setters for config properties\n\nObject.keys(Config).forEach(prop => {\n  Object.defineProperty(Vhs, prop, {\n    get() {\n      videojs.log.warn(`using Vhs.${prop} is UNSAFE be sure you know what you are doing`);\n      return Config[prop];\n    },\n    set(value) {\n      videojs.log.warn(`using Vhs.${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.${prop} must be greater than or equal to 0`);\n        return;\n      }\n      Config[prop] = value;\n    }\n  });\n});\nconst 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\nconst handleVhsMediaChange = function (qualityLevels, playlistLoader) {\n  const newPlaylist = playlistLoader.media();\n  let selectedIndex = -1;\n  for (let i = 0; i < qualityLevels.length; i++) {\n    if (qualityLevels[i].id === newPlaylist.id) {\n      selectedIndex = i;\n      break;\n    }\n  }\n  qualityLevels.selectedIndex_ = selectedIndex;\n  qualityLevels.trigger({\n    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\nconst handleVhsLoadedMetadata = function (qualityLevels, vhs) {\n  vhs.representations().forEach(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};\nconst emeKeySystems = (keySystemOptions, mainPlaylist, audioPlaylist) => {\n  if (!keySystemOptions) {\n    return keySystemOptions;\n  }\n  let codecs = {};\n  if (mainPlaylist && mainPlaylist.attributes && mainPlaylist.attributes.CODECS) {\n    codecs = unwrapCodecList(codecs_js.parseCodecs(mainPlaylist.attributes.CODECS));\n  }\n  if (audioPlaylist && audioPlaylist.attributes && audioPlaylist.attributes.CODECS) {\n    codecs.audio = audioPlaylist.attributes.CODECS;\n  }\n  const videoContentType = codecs_js.getMimeForCodec(codecs.video);\n  const audioContentType = codecs_js.getMimeForCodec(codecs.audio); // upsert the content types based on the selected playlist\n\n  const keySystemContentTypes = {};\n  for (const 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\nconst getAllPsshKeySystemsOptions = (playlists, keySystems) => {\n  return playlists.reduce((keySystemsArr, playlist) => {\n    if (!playlist.contentProtection) {\n      return keySystemsArr;\n    }\n    const keySystemsOptions = keySystems.reduce((keySystemsObj, keySystem) => {\n      const 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\nconst waitForKeySessionCreation = ({\n  player,\n  sourceKeySystems,\n  audioMedia,\n  mainPlaylists\n}) => {\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  const playlists = audioMedia ? mainPlaylists.concat([audioMedia]) : mainPlaylists;\n  const keySystemsOptionsArr = getAllPsshKeySystemsOptions(playlists, Object.keys(sourceKeySystems));\n  const initializationFinishedPromises = [];\n  const 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(keySystemsOptions => {\n    keySessionCreatedPromises.push(new Promise((resolve, reject) => {\n      player.tech_.one('keysessioncreated', resolve);\n    }));\n    initializationFinishedPromises.push(new Promise((resolve, reject) => {\n      player.eme.initializeMediaKeys({\n        keySystems: keySystemsOptions\n      }, 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\nconst setupEmeOptions = ({\n  player,\n  sourceKeySystems,\n  media,\n  audioMedia\n}) => {\n  const 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};\nconst getVhsLocalStorage = () => {\n  if (!window__default[\"default\"].localStorage) {\n    return null;\n  }\n  const storedObject = window__default[\"default\"].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};\nconst updateVhsLocalStorage = options => {\n  if (!window__default[\"default\"].localStorage) {\n    return false;\n  }\n  let objectToStore = getVhsLocalStorage();\n  objectToStore = objectToStore ? merge(objectToStore, options) : options;\n  try {\n    window__default[\"default\"].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\nconst 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\nconst 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\nconst 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\nconst 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\nconst 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__default[\"default\"] || !document__default[\"default\"].createElement) {\n    return false;\n  }\n  const video = document__default[\"default\"].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  const 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__default[\"default\"] || !document__default[\"default\"].createElement || !videojs.getTech('Html5').isSupported()) {\n    return false;\n  }\n  return /maybe|probably/i.test(document__default[\"default\"].createElement('video').canPlayType('application/dash+xml'));\n}();\nVhs.supportsTypeNatively = 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};\nconst 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 */\n\nclass VhsHandler extends Component {\n  constructor(source, tech, options) {\n    super(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      this.options_.bandwidth = options.initialBandwidth;\n    }\n    this.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      const _player = videojs.getPlayer(tech.options_.playerId);\n      this.player_ = _player;\n    }\n    this.tech_ = tech;\n    this.source_ = source;\n    this.stats = {};\n    this.ignoreNextSeekingEvent_ = false;\n    this.setOptions_();\n    if (this.options_.overrideNative && tech.overrideNativeAudioTracks && tech.overrideNativeVideoTracks) {\n      tech.overrideNativeAudioTracks(true);\n      tech.overrideNativeVideoTracks(true);\n    } else if (this.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    this.on(document__default[\"default\"], ['fullscreenchange', 'webkitfullscreenchange', 'mozfullscreenchange', 'MSFullscreenChange'], event => {\n      const fullscreenElement = document__default[\"default\"].fullscreenElement || document__default[\"default\"].webkitFullscreenElement || document__default[\"default\"].mozFullScreenElement || document__default[\"default\"].msFullscreenElement;\n      if (fullscreenElement && fullscreenElement.contains(this.tech_.el())) {\n        this.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        this.playlistController_.checkABR_();\n      }\n    });\n    this.on(this.tech_, 'seeking', function () {\n      if (this.ignoreNextSeekingEvent_) {\n        this.ignoreNextSeekingEvent_ = false;\n        return;\n      }\n      this.setCurrentTime(this.tech_.currentTime());\n    });\n    this.on(this.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    this.on(this.tech_, 'play', this.play);\n  }\n  /**\n   * Set VHS options based on options from configuration, as well as partial\n   * options to be passed at a later time.\n   *\n   * @param {Object} options A partial chunk of config options\n   */\n\n  setOptions_(options = {}) {\n    this.options_ = merge(this.options_, options); // defaults\n\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_.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        const 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', 'exactManifestTimings', 'leastPixelDiffSelector'].forEach(option => {\n      if (typeof this.source_[option] !== 'undefined') {\n        this.options_[option] = this.source_[option];\n      }\n    });\n    this.limitRenditionByPlayerDimensions = this.options_.limitRenditionByPlayerDimensions;\n    this.useDevicePixelRatio = this.options_.useDevicePixelRatio;\n  } // alias for public method to set options\n\n  setOptions(options = {}) {\n    this.setOptions_(options);\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  src(src, type) {\n    // do nothing if the src is falsey\n    if (!src) {\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 = mediaTypes_js.simpleTypeFromSourceType(type); // Whenever we seek internally, we should update the tech\n\n    this.options_.seekTo = time => {\n      this.tech_.setCurrentTime(time);\n    };\n    this.playlistController_ = new PlaylistController(this.options_);\n    const playbackWatcherOptions = merge({\n      liveRangeSafeTimeDelta: SAFE_TIME_DELTA\n    }, this.options_, {\n      seekable: () => this.seekable(),\n      media: () => this.playlistController_.media(),\n      playlistController: this.playlistController_\n    });\n    this.playbackWatcher_ = new PlaybackWatcher(playbackWatcherOptions);\n    this.playlistController_.on('error', () => {\n      const player = videojs.players[this.tech_.options_.playerId];\n      let error = this.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    const 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() {\n          return this.playlistController_.selectPlaylist;\n        },\n        set(selectPlaylist) {\n          this.playlistController_.selectPlaylist = selectPlaylist.bind(this);\n        }\n      },\n      throughput: {\n        get() {\n          return this.playlistController_.mainSegmentLoader_.throughput.rate;\n        },\n        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() {\n          let playerBandwidthEst = this.playlistController_.mainSegmentLoader_.bandwidth;\n          const networkInformation = window__default[\"default\"].navigator.connection || window__default[\"default\"].navigator.mozConnection || window__default[\"default\"].navigator.webkitConnection;\n          const 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            const 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(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() {\n          const invBandwidth = 1 / (this.bandwidth || 1);\n          let invThroughput;\n          if (this.throughput > 0) {\n            invThroughput = 1 / this.throughput;\n          } else {\n            invThroughput = 0;\n          }\n          const systemBitrate = Math.floor(1 / (invBandwidth + invThroughput));\n          return systemBitrate;\n        },\n        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: () => this.bandwidth || 0,\n        enumerable: true\n      },\n      mediaRequests: {\n        get: () => this.playlistController_.mediaRequests_() || 0,\n        enumerable: true\n      },\n      mediaRequestsAborted: {\n        get: () => this.playlistController_.mediaRequestsAborted_() || 0,\n        enumerable: true\n      },\n      mediaRequestsTimedout: {\n        get: () => this.playlistController_.mediaRequestsTimedout_() || 0,\n        enumerable: true\n      },\n      mediaRequestsErrored: {\n        get: () => this.playlistController_.mediaRequestsErrored_() || 0,\n        enumerable: true\n      },\n      mediaTransferDuration: {\n        get: () => this.playlistController_.mediaTransferDuration_() || 0,\n        enumerable: true\n      },\n      mediaBytesTransferred: {\n        get: () => this.playlistController_.mediaBytesTransferred_() || 0,\n        enumerable: true\n      },\n      mediaSecondsLoaded: {\n        get: () => this.playlistController_.mediaSecondsLoaded_() || 0,\n        enumerable: true\n      },\n      mediaAppends: {\n        get: () => this.playlistController_.mediaAppends_() || 0,\n        enumerable: true\n      },\n      mainAppendsToLoadedData: {\n        get: () => this.playlistController_.mainAppendsToLoadedData_() || 0,\n        enumerable: true\n      },\n      audioAppendsToLoadedData: {\n        get: () => this.playlistController_.audioAppendsToLoadedData_() || 0,\n        enumerable: true\n      },\n      appendsToLoadedData: {\n        get: () => this.playlistController_.appendsToLoadedData_() || 0,\n        enumerable: true\n      },\n      timeToLoadedData: {\n        get: () => this.playlistController_.timeToLoadedData_() || 0,\n        enumerable: true\n      },\n      buffered: {\n        get: () => timeRangesToArray(this.tech_.buffered()),\n        enumerable: true\n      },\n      currentTime: {\n        get: () => this.tech_.currentTime(),\n        enumerable: true\n      },\n      currentSource: {\n        get: () => this.tech_.currentSource_,\n        enumerable: true\n      },\n      currentTech: {\n        get: () => this.tech_.name_,\n        enumerable: true\n      },\n      duration: {\n        get: () => this.tech_.duration(),\n        enumerable: true\n      },\n      main: {\n        get: () => this.playlists.main,\n        enumerable: true\n      },\n      playerDimensions: {\n        get: () => this.tech_.currentDimensions(),\n        enumerable: true\n      },\n      seekable: {\n        get: () => timeRangesToArray(this.tech_.seekable()),\n        enumerable: true\n      },\n      timestamp: {\n        get: () => Date.now(),\n        enumerable: true\n      },\n      videoPlaybackQuality: {\n        get: () => this.tech_.getVideoPlaybackQuality(),\n        enumerable: true\n      }\n    });\n    this.tech_.one('canplay', this.playlistController_.setupFirstPlay.bind(this.playlistController_));\n    this.tech_.on('bandwidthupdate', () => {\n      if (this.options_.useBandwidthFromLocalStorage) {\n        updateVhsLocalStorage({\n          bandwidth: this.bandwidth,\n          throughput: Math.round(this.throughput)\n        });\n      }\n    });\n    this.playlistController_.on('selectedinitialmedia', () => {\n      // Add the manual rendition mix-in to VhsHandler\n      renditionSelectionMixin(this);\n    });\n    this.playlistController_.sourceUpdater_.on('createdsourcebuffers', () => {\n      this.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__default[\"default\"].URL.createObjectURL(this.playlistController_.mediaSource);\n    this.tech_.src(this.mediaSourceUrl_);\n  }\n  createKeySessions_() {\n    const 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(() => {\n      this.logger_('created EME key session');\n      this.playlistController_.sourceUpdater_.initializedEme();\n    }).catch(err => {\n      this.logger_('error while creating EME key session', err);\n      this.player_.error({\n        message: 'Failed to initialize media keys for EME',\n        code: 3\n      });\n    });\n  }\n  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  setupEme_() {\n    const audioPlaylistLoader = this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;\n    const 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', e => {\n      this.playlistController_.updatePlaylistByKeyStatus(e.keyId, e.status);\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  setupQualityLevels_() {\n    const 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', () => {\n      handleVhsLoadedMetadata(this.qualityLevels_, this);\n    });\n    this.playlists.on('mediachange', () => {\n      handleVhsMediaChange(this.qualityLevels_, this.playlists);\n    });\n  }\n  /**\n   * return the version\n   */\n\n  static 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 the version\n   */\n\n  version() {\n    return this.constructor.version();\n  }\n  canChangeType() {\n    return SourceUpdater.canChangeType();\n  }\n  /**\n   * Begin playing the video.\n   */\n\n  play() {\n    this.playlistController_.play();\n  }\n  /**\n   * a wrapper around the function in PlaylistController\n   */\n\n  setCurrentTime(currentTime) {\n    this.playlistController_.setCurrentTime(currentTime);\n  }\n  /**\n   * a wrapper around the function in PlaylistController\n   */\n\n  duration() {\n    return this.playlistController_.duration();\n  }\n  /**\n   * a wrapper around the function in PlaylistController\n   */\n\n  seekable() {\n    return this.playlistController_.seekable();\n  }\n  /**\n   * Abort all outstanding work and cleanup.\n   */\n\n  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__default[\"default\"].URL.revokeObjectURL) {\n      window__default[\"default\"].URL.revokeObjectURL(this.mediaSourceUrl_);\n      this.mediaSourceUrl_ = null;\n    }\n    if (this.tech_) {\n      this.tech_.off('waitingforkey', this.handleWaitingForKey_);\n    }\n    super.dispose();\n  }\n  convertToProgramTime(time, callback) {\n    return getProgramTime({\n      playlist: this.playlistController_.media(),\n      time,\n      callback\n    });\n  } // the player must be playing before calling this\n\n  seekToProgramTime(programTime, callback, pauseAfterSeek = true, retryCount = 2) {\n    return seekToProgramTime({\n      programTime,\n      playlist: this.playlistController_.media(),\n      retryCount,\n      pauseAfterSeek,\n      seekTo: this.options_.seekTo,\n      tech: this.options_.tech,\n      callback\n    });\n  }\n  /**\n   * Adds the onRequest, onResponse, offRequest and offResponse functions\n   * to the VhsHandler xhr Object.\n   */\n\n  setupXhrHooks_() {\n    /**\n     * A player function for setting an onRequest hook\n     *\n     * @param {function} callback for request modifiction\n     */\n    this.xhr.onRequest = callback => {\n      addOnRequestHook(this.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 = callback => {\n      addOnResponseHook(this.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 = callback => {\n      removeOnRequestHook(this.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 = callback => {\n      removeOnResponseHook(this.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/**\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 */\n\nconst VhsSourceHandler = {\n  name: 'videojs-http-streaming',\n  VERSION: version$4,\n  canHandleSource(srcObj, options = {}) {\n    const localOptions = merge(videojs.options, options);\n    return VhsSourceHandler.canPlayType(srcObj.type, localOptions);\n  },\n  handleSource(source, tech, options = {}) {\n    const 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(type, options) {\n    const simpleType = mediaTypes_js.simpleTypeFromSourceType(type);\n    if (!simpleType) {\n      return '';\n    }\n    const overrideNative = VhsSourceHandler.getOverrideNative(options);\n    const supportsTypeNatively = Vhs.supportsTypeNatively(simpleType);\n    const canUseMsePlayback = !supportsTypeNatively || overrideNative;\n    return canUseMsePlayback ? 'maybe' : '';\n  },\n  getOverrideNative(options = {}) {\n    const {\n      vhs = {}\n    } = options;\n    const defaultOverrideNative = !(videojs.browser.IS_ANY_SAFARI || videojs.browser.IS_IOS);\n    const {\n      overrideNative = defaultOverrideNative\n    } = vhs;\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\nconst supportsNativeMediaSources = () => {\n  return codecs_js.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}\n\nmodule.exports = videojs;\n", "/*! @name jb-videojs-hls-quality-selector @version 2.0.2 @license MIT */\n(function (global, factory) {\n  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('video.js')) :\n  typeof define === 'function' && define.amd ? define(['video.js'], factory) :\n  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.jbVideojsHlsQualitySelector = factory(global.videojs));\n}(this, (function (videojs) { 'use strict';\n\n  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }\n\n  var videojs__default = /*#__PURE__*/_interopDefaultLegacy(videojs);\n\n  var version = \"2.0.2\";\n\n  const VideoJsButtonClass = videojs__default['default'].getComponent('MenuButton');\n  const VideoJsMenuClass = videojs__default['default'].getComponent('Menu');\n  const VideoJsComponent = videojs__default['default'].getComponent('Component');\n  const Dom = videojs__default['default'].dom;\n  /**\n   * Convert string to title case.\n   *\n   * @param {string} string - the string to convert\n   * @return {string} the returned titlecase string\n   */\n\n  function toTitleCase(string) {\n    if (typeof string !== 'string') {\n      return string;\n    }\n\n    return string.charAt(0).toUpperCase() + string.slice(1);\n  }\n  /**\n   * Extend vjs button class for quality button.\n   */\n\n\n  class ConcreteButton extends VideoJsButtonClass {\n    /**\n     * Button constructor.\n     *\n     * @param {Player} player - videojs player instance\n     */\n    constructor(player) {\n      super(player, {\n        title: player.localize('Quality'),\n        name: 'QualityButton'\n      });\n    }\n    /**\n     * Creates button items.\n     *\n     * @return {Array} - Button items\n     */\n\n\n    createItems() {\n      return [];\n    }\n    /**\n     * Create the menu and add all items to it.\n     *\n     * @return {Menu}\n     *         The constructed menu\n     */\n\n\n    createMenu() {\n      const menu = new VideoJsMenuClass(this.player_, {\n        menuButton: this\n      });\n      menu.addClass('hls-quality-button');\n      this.hideThreshold_ = 0; // Add a title list item to the top\n\n      if (this.options_.title) {\n        const titleEl = Dom.createEl('li', {\n          className: 'vjs-menu-title',\n          innerHTML: toTitleCase(this.options_.title),\n          tabIndex: -1\n        });\n        const titleComponent = new VideoJsComponent(this.player_, {\n          el: titleEl\n        });\n        this.hideThreshold_ += 1;\n        menu.addItem(titleComponent);\n      }\n\n      this.items = this.createItems();\n\n      if (this.items) {\n        // Add menu items to the menu\n        for (let i = 0; i < this.items.length; i++) {\n          menu.addItem(this.items[i]);\n        }\n      }\n\n      return menu;\n    }\n\n  }\n\n  const VideoJsMenuItemClass = videojs__default['default'].getComponent('MenuItem');\n  /**\n   * Extend vjs menu item class.\n   */\n\n  class ConcreteMenuItem extends VideoJsMenuItemClass {\n    /**\n     * Menu item constructor.\n     *\n     * @param {Player} player - vjs player\n     * @param {Object} item - Item object\n     * @param {ConcreteButton} qualityButton - The containing button.\n     * @param {HlsQualitySelectorPlugin} plugin - This plugin instance.\n     */\n    constructor(player, item, qualityButton, plugin) {\n      super(player, {\n        label: item.label,\n        selectable: true,\n        selected: item.selected || false\n      });\n      this.item = item;\n      this.qualityButton = qualityButton;\n      this.plugin = plugin;\n    }\n    /**\n     * Click event for menu item.\n     */\n\n\n    handleClick() {\n      // Reset other menu items selected status.\n      for (let i = 0; i < this.qualityButton.items.length; ++i) {\n        this.qualityButton.items[i].selected(false);\n      } // Set this menu item to selected, and set quality.\n\n\n      this.plugin.setQuality(this.item.value);\n      this.selected(true);\n    }\n\n  }\n\n  const defaults = {}; // Cross-compatibility for Video.js 5 and 6.\n\n  const registerPlugin = videojs__default['default'].registerPlugin || videojs__default['default'].plugin; // const dom = videojs.dom || videojs;\n\n  /**\n   * VideoJS HLS Quality Selector Plugin class.\n   */\n\n  class HlsQualitySelectorPlugin {\n    /**\n     * Plugin Constructor.\n     *\n     * @param {Player} player - The videojs player instance.\n     * @param {Object} options - The plugin options.\n     */\n    constructor(player, options) {\n      this.player = player;\n      this.config = options; // If there is quality levels plugin and the HLS tech exists\n      // then continue.\n\n      if (this.player.qualityLevels) {\n        // Create the quality button.\n        this.createQualityButton();\n        this.bindPlayerEvents();\n      }\n    }\n    /**\n     * Returns HLS Plugin\n     *\n     * @return {*} - videojs-hls-contrib plugin.\n     */\n\n\n    getHls() {\n      return this.player.tech({\n        IWillNotUseThisInPlugins: true\n      }).vhs;\n    }\n    /**\n     * Binds listener for quality level changes.\n     */\n\n\n    bindPlayerEvents() {\n      this.player.qualityLevels().on('addqualitylevel', this.onAddQualityLevel.bind(this));\n    }\n    /**\n     * Adds the quality menu button to the player control bar.\n     */\n\n\n    createQualityButton() {\n      const player = this.player;\n      this._qualityButton = new ConcreteButton(player);\n      const placementIndex = player.controlBar.children().length - 2;\n      const concreteButtonInstance = player.controlBar.addChild(this._qualityButton, {\n        componentClass: 'qualitySelector'\n      }, this.config.placementIndex || placementIndex);\n      concreteButtonInstance.addClass('vjs-quality-selector');\n\n      if (!this.config.displayCurrentQuality) {\n        const icon = ` ${this.config.vjsIconClass || 'vjs-icon-hd'}`;\n        concreteButtonInstance.menuButton_.$('.vjs-icon-placeholder').className += icon;\n      } else {\n        this.setButtonInnerText(this.player.localize('Auto'));\n      }\n\n      concreteButtonInstance.removeClass('vjs-hidden');\n    }\n    /**\n     *Set inner button text.\n     *\n     * @param {string} text - the text to display in the button.\n     */\n\n\n    setButtonInnerText(text) {\n      this._qualityButton.menuButton_.$('.vjs-icon-placeholder').innerHTML = text;\n    }\n    /**\n     * Builds individual quality menu items.\n     *\n     * @param {Object} item - Individual quality menu item.\n     * @return {ConcreteMenuItem} - Menu item\n     */\n\n\n    getQualityMenuItem(item) {\n      const player = this.player;\n      return new ConcreteMenuItem(player, item, this._qualityButton, this);\n    }\n    /**\n     * Executed when a quality level is added from HLS playlist.\n     */\n\n\n    onAddQualityLevel() {\n      const player = this.player;\n      const qualityList = player.qualityLevels();\n      const levels = qualityList.levels_ || [];\n      const levelItems = [];\n\n      for (let i = 0; i < levels.length; ++i) {\n        const {\n          width,\n          height\n        } = levels[i];\n        const pixels = width > height ? height : width;\n\n        if (!pixels) {\n          continue;\n        }\n\n        if (!levelItems.filter(_existingItem => {\n          return _existingItem.item && _existingItem.item.value === pixels;\n        }).length) {\n          const levelItem = this.getQualityMenuItem.call(this, {\n            label: pixels + 'p',\n            value: pixels\n          });\n          levelItems.push(levelItem);\n        }\n      }\n\n      levelItems.sort((current, next) => {\n        if (typeof current !== 'object' || typeof next !== 'object') {\n          return -1;\n        }\n\n        if (current.item.value < next.item.value) {\n          return -1;\n        }\n\n        if (current.item.value > next.item.value) {\n          return 1;\n        }\n\n        return 0;\n      });\n      levelItems.push(this.getQualityMenuItem.call(this, {\n        label: player.localize('Auto'),\n        value: 'auto',\n        selected: true\n      }));\n\n      if (this._qualityButton) {\n        this._qualityButton.createItems = function () {\n          return levelItems;\n        };\n\n        this._qualityButton.update();\n      }\n    }\n    /**\n     * Sets quality (based on media short side)\n     *\n     * @param {number} quality - A number representing HLS playlist.\n     */\n\n\n    setQuality(quality) {\n      const qualityList = this.player.qualityLevels(); // Set quality on plugin\n\n      this._currentQuality = quality;\n\n      if (this.config.displayCurrentQuality) {\n        this.setButtonInnerText(quality === 'auto' ? this.player.localize('Auto') : `${quality}p`);\n      }\n\n      for (let i = 0; i < qualityList.length; ++i) {\n        const {\n          width,\n          height\n        } = qualityList[i];\n        const pixels = width > height ? height : width;\n        qualityList[i].enabled = pixels === quality || quality === 'auto';\n      }\n\n      this._qualityButton.unpressButton();\n    }\n    /**\n     * Return the current set quality or 'auto'\n     *\n     * @return {string} the currently set quality\n     */\n\n\n    getCurrentQuality() {\n      return this._currentQuality || 'auto';\n    }\n\n  }\n  /**\n   * Function to invoke when the player is ready.\n   *\n   * This is a great place for your plugin to initialize itself. When this\n   * function is called, the player will have its DOM and child components\n   * in place.\n   *\n   * @function onPlayerReady\n   * @param    {Player} player\n   *           A Video.js player object.\n   *\n   * @param    {Object} [options={}]\n   *           A plain object containing options for the plugin.\n   */\n\n\n  const onPlayerReady = (player, options) => {\n    player.addClass('vjs-hls-quality-selector');\n    player.hlsQualitySelector = new HlsQualitySelectorPlugin(player, options);\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   * @function hlsQualitySelector\n   * @param    {Object} [options={}]\n   *           An object of options left to the plugin author to define.\n   */\n\n\n  const hlsQualitySelector = function (options) {\n    this.ready(() => {\n      onPlayerReady(this, videojs__default['default'].obj.merge(defaults, options));\n    });\n  }; // Register the plugin with video.js.\n\n\n  registerPlugin('hlsQualitySelector', hlsQualitySelector); // Include the version number.\n\n  hlsQualitySelector.VERSION = version;\n\n  return hlsQualitySelector;\n\n})));\n", "var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nvar activestorage = {exports: {}};\n\n(function (module, exports) {\n(function(global, factory) {\n  factory(exports) ;\n})(commonjsGlobal, (function(exports) {\n  var sparkMd5 = {\n    exports: {}\n  };\n  (function(module, exports) {\n    (function(factory) {\n      {\n        module.exports = factory();\n      }\n    })((function(undefined$1) {\n      var hex_chr = [ \"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\" ];\n      function md5cycle(x, k) {\n        var a = x[0], b = x[1], c = x[2], d = x[3];\n        a += (b & c | ~b & d) + k[0] - 680876936 | 0;\n        a = (a << 7 | a >>> 25) + b | 0;\n        d += (a & b | ~a & c) + k[1] - 389564586 | 0;\n        d = (d << 12 | d >>> 20) + a | 0;\n        c += (d & a | ~d & b) + k[2] + 606105819 | 0;\n        c = (c << 17 | c >>> 15) + d | 0;\n        b += (c & d | ~c & a) + k[3] - 1044525330 | 0;\n        b = (b << 22 | b >>> 10) + c | 0;\n        a += (b & c | ~b & d) + k[4] - 176418897 | 0;\n        a = (a << 7 | a >>> 25) + b | 0;\n        d += (a & b | ~a & c) + k[5] + 1200080426 | 0;\n        d = (d << 12 | d >>> 20) + a | 0;\n        c += (d & a | ~d & b) + k[6] - 1473231341 | 0;\n        c = (c << 17 | c >>> 15) + d | 0;\n        b += (c & d | ~c & a) + k[7] - 45705983 | 0;\n        b = (b << 22 | b >>> 10) + c | 0;\n        a += (b & c | ~b & d) + k[8] + 1770035416 | 0;\n        a = (a << 7 | a >>> 25) + b | 0;\n        d += (a & b | ~a & c) + k[9] - 1958414417 | 0;\n        d = (d << 12 | d >>> 20) + a | 0;\n        c += (d & a | ~d & b) + k[10] - 42063 | 0;\n        c = (c << 17 | c >>> 15) + d | 0;\n        b += (c & d | ~c & a) + k[11] - 1990404162 | 0;\n        b = (b << 22 | b >>> 10) + c | 0;\n        a += (b & c | ~b & d) + k[12] + 1804603682 | 0;\n        a = (a << 7 | a >>> 25) + b | 0;\n        d += (a & b | ~a & c) + k[13] - 40341101 | 0;\n        d = (d << 12 | d >>> 20) + a | 0;\n        c += (d & a | ~d & b) + k[14] - 1502002290 | 0;\n        c = (c << 17 | c >>> 15) + d | 0;\n        b += (c & d | ~c & a) + k[15] + 1236535329 | 0;\n        b = (b << 22 | b >>> 10) + c | 0;\n        a += (b & d | c & ~d) + k[1] - 165796510 | 0;\n        a = (a << 5 | a >>> 27) + b | 0;\n        d += (a & c | b & ~c) + k[6] - 1069501632 | 0;\n        d = (d << 9 | d >>> 23) + a | 0;\n        c += (d & b | a & ~b) + k[11] + 643717713 | 0;\n        c = (c << 14 | c >>> 18) + d | 0;\n        b += (c & a | d & ~a) + k[0] - 373897302 | 0;\n        b = (b << 20 | b >>> 12) + c | 0;\n        a += (b & d | c & ~d) + k[5] - 701558691 | 0;\n        a = (a << 5 | a >>> 27) + b | 0;\n        d += (a & c | b & ~c) + k[10] + 38016083 | 0;\n        d = (d << 9 | d >>> 23) + a | 0;\n        c += (d & b | a & ~b) + k[15] - 660478335 | 0;\n        c = (c << 14 | c >>> 18) + d | 0;\n        b += (c & a | d & ~a) + k[4] - 405537848 | 0;\n        b = (b << 20 | b >>> 12) + c | 0;\n        a += (b & d | c & ~d) + k[9] + 568446438 | 0;\n        a = (a << 5 | a >>> 27) + b | 0;\n        d += (a & c | b & ~c) + k[14] - 1019803690 | 0;\n        d = (d << 9 | d >>> 23) + a | 0;\n        c += (d & b | a & ~b) + k[3] - 187363961 | 0;\n        c = (c << 14 | c >>> 18) + d | 0;\n        b += (c & a | d & ~a) + k[8] + 1163531501 | 0;\n        b = (b << 20 | b >>> 12) + c | 0;\n        a += (b & d | c & ~d) + k[13] - 1444681467 | 0;\n        a = (a << 5 | a >>> 27) + b | 0;\n        d += (a & c | b & ~c) + k[2] - 51403784 | 0;\n        d = (d << 9 | d >>> 23) + a | 0;\n        c += (d & b | a & ~b) + k[7] + 1735328473 | 0;\n        c = (c << 14 | c >>> 18) + d | 0;\n        b += (c & a | d & ~a) + k[12] - 1926607734 | 0;\n        b = (b << 20 | b >>> 12) + c | 0;\n        a += (b ^ c ^ d) + k[5] - 378558 | 0;\n        a = (a << 4 | a >>> 28) + b | 0;\n        d += (a ^ b ^ c) + k[8] - 2022574463 | 0;\n        d = (d << 11 | d >>> 21) + a | 0;\n        c += (d ^ a ^ b) + k[11] + 1839030562 | 0;\n        c = (c << 16 | c >>> 16) + d | 0;\n        b += (c ^ d ^ a) + k[14] - 35309556 | 0;\n        b = (b << 23 | b >>> 9) + c | 0;\n        a += (b ^ c ^ d) + k[1] - 1530992060 | 0;\n        a = (a << 4 | a >>> 28) + b | 0;\n        d += (a ^ b ^ c) + k[4] + 1272893353 | 0;\n        d = (d << 11 | d >>> 21) + a | 0;\n        c += (d ^ a ^ b) + k[7] - 155497632 | 0;\n        c = (c << 16 | c >>> 16) + d | 0;\n        b += (c ^ d ^ a) + k[10] - 1094730640 | 0;\n        b = (b << 23 | b >>> 9) + c | 0;\n        a += (b ^ c ^ d) + k[13] + 681279174 | 0;\n        a = (a << 4 | a >>> 28) + b | 0;\n        d += (a ^ b ^ c) + k[0] - 358537222 | 0;\n        d = (d << 11 | d >>> 21) + a | 0;\n        c += (d ^ a ^ b) + k[3] - 722521979 | 0;\n        c = (c << 16 | c >>> 16) + d | 0;\n        b += (c ^ d ^ a) + k[6] + 76029189 | 0;\n        b = (b << 23 | b >>> 9) + c | 0;\n        a += (b ^ c ^ d) + k[9] - 640364487 | 0;\n        a = (a << 4 | a >>> 28) + b | 0;\n        d += (a ^ b ^ c) + k[12] - 421815835 | 0;\n        d = (d << 11 | d >>> 21) + a | 0;\n        c += (d ^ a ^ b) + k[15] + 530742520 | 0;\n        c = (c << 16 | c >>> 16) + d | 0;\n        b += (c ^ d ^ a) + k[2] - 995338651 | 0;\n        b = (b << 23 | b >>> 9) + c | 0;\n        a += (c ^ (b | ~d)) + k[0] - 198630844 | 0;\n        a = (a << 6 | a >>> 26) + b | 0;\n        d += (b ^ (a | ~c)) + k[7] + 1126891415 | 0;\n        d = (d << 10 | d >>> 22) + a | 0;\n        c += (a ^ (d | ~b)) + k[14] - 1416354905 | 0;\n        c = (c << 15 | c >>> 17) + d | 0;\n        b += (d ^ (c | ~a)) + k[5] - 57434055 | 0;\n        b = (b << 21 | b >>> 11) + c | 0;\n        a += (c ^ (b | ~d)) + k[12] + 1700485571 | 0;\n        a = (a << 6 | a >>> 26) + b | 0;\n        d += (b ^ (a | ~c)) + k[3] - 1894986606 | 0;\n        d = (d << 10 | d >>> 22) + a | 0;\n        c += (a ^ (d | ~b)) + k[10] - 1051523 | 0;\n        c = (c << 15 | c >>> 17) + d | 0;\n        b += (d ^ (c | ~a)) + k[1] - 2054922799 | 0;\n        b = (b << 21 | b >>> 11) + c | 0;\n        a += (c ^ (b | ~d)) + k[8] + 1873313359 | 0;\n        a = (a << 6 | a >>> 26) + b | 0;\n        d += (b ^ (a | ~c)) + k[15] - 30611744 | 0;\n        d = (d << 10 | d >>> 22) + a | 0;\n        c += (a ^ (d | ~b)) + k[6] - 1560198380 | 0;\n        c = (c << 15 | c >>> 17) + d | 0;\n        b += (d ^ (c | ~a)) + k[13] + 1309151649 | 0;\n        b = (b << 21 | b >>> 11) + c | 0;\n        a += (c ^ (b | ~d)) + k[4] - 145523070 | 0;\n        a = (a << 6 | a >>> 26) + b | 0;\n        d += (b ^ (a | ~c)) + k[11] - 1120210379 | 0;\n        d = (d << 10 | d >>> 22) + a | 0;\n        c += (a ^ (d | ~b)) + k[2] + 718787259 | 0;\n        c = (c << 15 | c >>> 17) + d | 0;\n        b += (d ^ (c | ~a)) + k[9] - 343485551 | 0;\n        b = (b << 21 | b >>> 11) + c | 0;\n        x[0] = a + x[0] | 0;\n        x[1] = b + x[1] | 0;\n        x[2] = c + x[2] | 0;\n        x[3] = d + x[3] | 0;\n      }\n      function md5blk(s) {\n        var md5blks = [], i;\n        for (i = 0; i < 64; i += 4) {\n          md5blks[i >> 2] = s.charCodeAt(i) + (s.charCodeAt(i + 1) << 8) + (s.charCodeAt(i + 2) << 16) + (s.charCodeAt(i + 3) << 24);\n        }\n        return md5blks;\n      }\n      function md5blk_array(a) {\n        var md5blks = [], i;\n        for (i = 0; i < 64; i += 4) {\n          md5blks[i >> 2] = a[i] + (a[i + 1] << 8) + (a[i + 2] << 16) + (a[i + 3] << 24);\n        }\n        return md5blks;\n      }\n      function md51(s) {\n        var n = s.length, state = [ 1732584193, -271733879, -1732584194, 271733878 ], i, length, tail, tmp, lo, hi;\n        for (i = 64; i <= n; i += 64) {\n          md5cycle(state, md5blk(s.substring(i - 64, i)));\n        }\n        s = s.substring(i - 64);\n        length = s.length;\n        tail = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ];\n        for (i = 0; i < length; i += 1) {\n          tail[i >> 2] |= s.charCodeAt(i) << (i % 4 << 3);\n        }\n        tail[i >> 2] |= 128 << (i % 4 << 3);\n        if (i > 55) {\n          md5cycle(state, tail);\n          for (i = 0; i < 16; i += 1) {\n            tail[i] = 0;\n          }\n        }\n        tmp = n * 8;\n        tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);\n        lo = parseInt(tmp[2], 16);\n        hi = parseInt(tmp[1], 16) || 0;\n        tail[14] = lo;\n        tail[15] = hi;\n        md5cycle(state, tail);\n        return state;\n      }\n      function md51_array(a) {\n        var n = a.length, state = [ 1732584193, -271733879, -1732584194, 271733878 ], i, length, tail, tmp, lo, hi;\n        for (i = 64; i <= n; i += 64) {\n          md5cycle(state, md5blk_array(a.subarray(i - 64, i)));\n        }\n        a = i - 64 < n ? a.subarray(i - 64) : new Uint8Array(0);\n        length = a.length;\n        tail = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ];\n        for (i = 0; i < length; i += 1) {\n          tail[i >> 2] |= a[i] << (i % 4 << 3);\n        }\n        tail[i >> 2] |= 128 << (i % 4 << 3);\n        if (i > 55) {\n          md5cycle(state, tail);\n          for (i = 0; i < 16; i += 1) {\n            tail[i] = 0;\n          }\n        }\n        tmp = n * 8;\n        tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);\n        lo = parseInt(tmp[2], 16);\n        hi = parseInt(tmp[1], 16) || 0;\n        tail[14] = lo;\n        tail[15] = hi;\n        md5cycle(state, tail);\n        return state;\n      }\n      function rhex(n) {\n        var s = \"\", j;\n        for (j = 0; j < 4; j += 1) {\n          s += hex_chr[n >> j * 8 + 4 & 15] + hex_chr[n >> j * 8 & 15];\n        }\n        return s;\n      }\n      function hex(x) {\n        var i;\n        for (i = 0; i < x.length; i += 1) {\n          x[i] = rhex(x[i]);\n        }\n        return x.join(\"\");\n      }\n      if (hex(md51(\"hello\")) !== \"5d41402abc4b2a76b9719d911017c592\") ;\n      if (typeof ArrayBuffer !== \"undefined\" && !ArrayBuffer.prototype.slice) {\n        (function() {\n          function clamp(val, length) {\n            val = val | 0 || 0;\n            if (val < 0) {\n              return Math.max(val + length, 0);\n            }\n            return Math.min(val, length);\n          }\n          ArrayBuffer.prototype.slice = function(from, to) {\n            var length = this.byteLength, begin = clamp(from, length), end = length, num, target, targetArray, sourceArray;\n            if (to !== undefined$1) {\n              end = clamp(to, length);\n            }\n            if (begin > end) {\n              return new ArrayBuffer(0);\n            }\n            num = end - begin;\n            target = new ArrayBuffer(num);\n            targetArray = new Uint8Array(target);\n            sourceArray = new Uint8Array(this, begin, num);\n            targetArray.set(sourceArray);\n            return target;\n          };\n        })();\n      }\n      function toUtf8(str) {\n        if (/[\\u0080-\\uFFFF]/.test(str)) {\n          str = unescape(encodeURIComponent(str));\n        }\n        return str;\n      }\n      function utf8Str2ArrayBuffer(str, returnUInt8Array) {\n        var length = str.length, buff = new ArrayBuffer(length), arr = new Uint8Array(buff), i;\n        for (i = 0; i < length; i += 1) {\n          arr[i] = str.charCodeAt(i);\n        }\n        return returnUInt8Array ? arr : buff;\n      }\n      function arrayBuffer2Utf8Str(buff) {\n        return String.fromCharCode.apply(null, new Uint8Array(buff));\n      }\n      function concatenateArrayBuffers(first, second, returnUInt8Array) {\n        var result = new Uint8Array(first.byteLength + second.byteLength);\n        result.set(new Uint8Array(first));\n        result.set(new Uint8Array(second), first.byteLength);\n        return returnUInt8Array ? result : result.buffer;\n      }\n      function hexToBinaryString(hex) {\n        var bytes = [], length = hex.length, x;\n        for (x = 0; x < length - 1; x += 2) {\n          bytes.push(parseInt(hex.substr(x, 2), 16));\n        }\n        return String.fromCharCode.apply(String, bytes);\n      }\n      function SparkMD5() {\n        this.reset();\n      }\n      SparkMD5.prototype.append = function(str) {\n        this.appendBinary(toUtf8(str));\n        return this;\n      };\n      SparkMD5.prototype.appendBinary = function(contents) {\n        this._buff += contents;\n        this._length += contents.length;\n        var length = this._buff.length, i;\n        for (i = 64; i <= length; i += 64) {\n          md5cycle(this._hash, md5blk(this._buff.substring(i - 64, i)));\n        }\n        this._buff = this._buff.substring(i - 64);\n        return this;\n      };\n      SparkMD5.prototype.end = function(raw) {\n        var buff = this._buff, length = buff.length, i, tail = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], ret;\n        for (i = 0; i < length; i += 1) {\n          tail[i >> 2] |= buff.charCodeAt(i) << (i % 4 << 3);\n        }\n        this._finish(tail, length);\n        ret = hex(this._hash);\n        if (raw) {\n          ret = hexToBinaryString(ret);\n        }\n        this.reset();\n        return ret;\n      };\n      SparkMD5.prototype.reset = function() {\n        this._buff = \"\";\n        this._length = 0;\n        this._hash = [ 1732584193, -271733879, -1732584194, 271733878 ];\n        return this;\n      };\n      SparkMD5.prototype.getState = function() {\n        return {\n          buff: this._buff,\n          length: this._length,\n          hash: this._hash.slice()\n        };\n      };\n      SparkMD5.prototype.setState = function(state) {\n        this._buff = state.buff;\n        this._length = state.length;\n        this._hash = state.hash;\n        return this;\n      };\n      SparkMD5.prototype.destroy = function() {\n        delete this._hash;\n        delete this._buff;\n        delete this._length;\n      };\n      SparkMD5.prototype._finish = function(tail, length) {\n        var i = length, tmp, lo, hi;\n        tail[i >> 2] |= 128 << (i % 4 << 3);\n        if (i > 55) {\n          md5cycle(this._hash, tail);\n          for (i = 0; i < 16; i += 1) {\n            tail[i] = 0;\n          }\n        }\n        tmp = this._length * 8;\n        tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);\n        lo = parseInt(tmp[2], 16);\n        hi = parseInt(tmp[1], 16) || 0;\n        tail[14] = lo;\n        tail[15] = hi;\n        md5cycle(this._hash, tail);\n      };\n      SparkMD5.hash = function(str, raw) {\n        return SparkMD5.hashBinary(toUtf8(str), raw);\n      };\n      SparkMD5.hashBinary = function(content, raw) {\n        var hash = md51(content), ret = hex(hash);\n        return raw ? hexToBinaryString(ret) : ret;\n      };\n      SparkMD5.ArrayBuffer = function() {\n        this.reset();\n      };\n      SparkMD5.ArrayBuffer.prototype.append = function(arr) {\n        var buff = concatenateArrayBuffers(this._buff.buffer, arr, true), length = buff.length, i;\n        this._length += arr.byteLength;\n        for (i = 64; i <= length; i += 64) {\n          md5cycle(this._hash, md5blk_array(buff.subarray(i - 64, i)));\n        }\n        this._buff = i - 64 < length ? new Uint8Array(buff.buffer.slice(i - 64)) : new Uint8Array(0);\n        return this;\n      };\n      SparkMD5.ArrayBuffer.prototype.end = function(raw) {\n        var buff = this._buff, length = buff.length, tail = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], i, ret;\n        for (i = 0; i < length; i += 1) {\n          tail[i >> 2] |= buff[i] << (i % 4 << 3);\n        }\n        this._finish(tail, length);\n        ret = hex(this._hash);\n        if (raw) {\n          ret = hexToBinaryString(ret);\n        }\n        this.reset();\n        return ret;\n      };\n      SparkMD5.ArrayBuffer.prototype.reset = function() {\n        this._buff = new Uint8Array(0);\n        this._length = 0;\n        this._hash = [ 1732584193, -271733879, -1732584194, 271733878 ];\n        return this;\n      };\n      SparkMD5.ArrayBuffer.prototype.getState = function() {\n        var state = SparkMD5.prototype.getState.call(this);\n        state.buff = arrayBuffer2Utf8Str(state.buff);\n        return state;\n      };\n      SparkMD5.ArrayBuffer.prototype.setState = function(state) {\n        state.buff = utf8Str2ArrayBuffer(state.buff, true);\n        return SparkMD5.prototype.setState.call(this, state);\n      };\n      SparkMD5.ArrayBuffer.prototype.destroy = SparkMD5.prototype.destroy;\n      SparkMD5.ArrayBuffer.prototype._finish = SparkMD5.prototype._finish;\n      SparkMD5.ArrayBuffer.hash = function(arr, raw) {\n        var hash = md51_array(new Uint8Array(arr)), ret = hex(hash);\n        return raw ? hexToBinaryString(ret) : ret;\n      };\n      return SparkMD5;\n    }));\n  })(sparkMd5);\n  var SparkMD5 = sparkMd5.exports;\n  const fileSlice = File.prototype.slice || File.prototype.mozSlice || File.prototype.webkitSlice;\n  class FileChecksum {\n    static create(file, callback) {\n      const instance = new FileChecksum(file);\n      instance.create(callback);\n    }\n    constructor(file) {\n      this.file = file;\n      this.chunkSize = 2097152;\n      this.chunkCount = Math.ceil(this.file.size / this.chunkSize);\n      this.chunkIndex = 0;\n    }\n    create(callback) {\n      this.callback = callback;\n      this.md5Buffer = new SparkMD5.ArrayBuffer;\n      this.fileReader = new FileReader;\n      this.fileReader.addEventListener(\"load\", (event => this.fileReaderDidLoad(event)));\n      this.fileReader.addEventListener(\"error\", (event => this.fileReaderDidError(event)));\n      this.readNextChunk();\n    }\n    fileReaderDidLoad(event) {\n      this.md5Buffer.append(event.target.result);\n      if (!this.readNextChunk()) {\n        const binaryDigest = this.md5Buffer.end(true);\n        const base64digest = btoa(binaryDigest);\n        this.callback(null, base64digest);\n      }\n    }\n    fileReaderDidError(event) {\n      this.callback(`Error reading ${this.file.name}`);\n    }\n    readNextChunk() {\n      if (this.chunkIndex < this.chunkCount || this.chunkIndex == 0 && this.chunkCount == 0) {\n        const start = this.chunkIndex * this.chunkSize;\n        const end = Math.min(start + this.chunkSize, this.file.size);\n        const bytes = fileSlice.call(this.file, start, end);\n        this.fileReader.readAsArrayBuffer(bytes);\n        this.chunkIndex++;\n        return true;\n      } else {\n        return false;\n      }\n    }\n  }\n  function getMetaValue(name) {\n    const element = findElement(document.head, `meta[name=\"${name}\"]`);\n    if (element) {\n      return element.getAttribute(\"content\");\n    }\n  }\n  function findElements(root, selector) {\n    if (typeof root == \"string\") {\n      selector = root;\n      root = document;\n    }\n    const elements = root.querySelectorAll(selector);\n    return toArray(elements);\n  }\n  function findElement(root, selector) {\n    if (typeof root == \"string\") {\n      selector = root;\n      root = document;\n    }\n    return root.querySelector(selector);\n  }\n  function dispatchEvent(element, type, eventInit = {}) {\n    const {disabled: disabled} = element;\n    const {bubbles: bubbles, cancelable: cancelable, detail: detail} = eventInit;\n    const event = document.createEvent(\"Event\");\n    event.initEvent(type, bubbles || true, cancelable || true);\n    event.detail = detail || {};\n    try {\n      element.disabled = false;\n      element.dispatchEvent(event);\n    } finally {\n      element.disabled = disabled;\n    }\n    return event;\n  }\n  function toArray(value) {\n    if (Array.isArray(value)) {\n      return value;\n    } else if (Array.from) {\n      return Array.from(value);\n    } else {\n      return [].slice.call(value);\n    }\n  }\n  class BlobRecord {\n    constructor(file, checksum, url) {\n      this.file = file;\n      this.attributes = {\n        filename: file.name,\n        content_type: file.type || \"application/octet-stream\",\n        byte_size: file.size,\n        checksum: checksum\n      };\n      this.xhr = new XMLHttpRequest;\n      this.xhr.open(\"POST\", url, true);\n      this.xhr.responseType = \"json\";\n      this.xhr.setRequestHeader(\"Content-Type\", \"application/json\");\n      this.xhr.setRequestHeader(\"Accept\", \"application/json\");\n      this.xhr.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\n      const csrfToken = getMetaValue(\"csrf-token\");\n      if (csrfToken != undefined) {\n        this.xhr.setRequestHeader(\"X-CSRF-Token\", csrfToken);\n      }\n      this.xhr.addEventListener(\"load\", (event => this.requestDidLoad(event)));\n      this.xhr.addEventListener(\"error\", (event => this.requestDidError(event)));\n    }\n    get status() {\n      return this.xhr.status;\n    }\n    get response() {\n      const {responseType: responseType, response: response} = this.xhr;\n      if (responseType == \"json\") {\n        return response;\n      } else {\n        return JSON.parse(response);\n      }\n    }\n    create(callback) {\n      this.callback = callback;\n      this.xhr.send(JSON.stringify({\n        blob: this.attributes\n      }));\n    }\n    requestDidLoad(event) {\n      if (this.status >= 200 && this.status < 300) {\n        const {response: response} = this;\n        const {direct_upload: direct_upload} = response;\n        delete response.direct_upload;\n        this.attributes = response;\n        this.directUploadData = direct_upload;\n        this.callback(null, this.toJSON());\n      } else {\n        this.requestDidError(event);\n      }\n    }\n    requestDidError(event) {\n      this.callback(`Error creating Blob for \"${this.file.name}\". Status: ${this.status}`);\n    }\n    toJSON() {\n      const result = {};\n      for (const key in this.attributes) {\n        result[key] = this.attributes[key];\n      }\n      return result;\n    }\n  }\n  class BlobUpload {\n    constructor(blob) {\n      this.blob = blob;\n      this.file = blob.file;\n      const {url: url, headers: headers} = blob.directUploadData;\n      this.xhr = new XMLHttpRequest;\n      this.xhr.open(\"PUT\", url, true);\n      this.xhr.responseType = \"text\";\n      for (const key in headers) {\n        this.xhr.setRequestHeader(key, headers[key]);\n      }\n      this.xhr.addEventListener(\"load\", (event => this.requestDidLoad(event)));\n      this.xhr.addEventListener(\"error\", (event => this.requestDidError(event)));\n    }\n    create(callback) {\n      this.callback = callback;\n      this.xhr.send(this.file.slice());\n    }\n    requestDidLoad(event) {\n      const {status: status, response: response} = this.xhr;\n      if (status >= 200 && status < 300) {\n        this.callback(null, response);\n      } else {\n        this.requestDidError(event);\n      }\n    }\n    requestDidError(event) {\n      this.callback(`Error storing \"${this.file.name}\". Status: ${this.xhr.status}`);\n    }\n  }\n  let id = 0;\n  class DirectUpload {\n    constructor(file, url, delegate) {\n      this.id = ++id;\n      this.file = file;\n      this.url = url;\n      this.delegate = delegate;\n    }\n    create(callback) {\n      FileChecksum.create(this.file, ((error, checksum) => {\n        if (error) {\n          callback(error);\n          return;\n        }\n        const blob = new BlobRecord(this.file, checksum, this.url);\n        notify(this.delegate, \"directUploadWillCreateBlobWithXHR\", blob.xhr);\n        blob.create((error => {\n          if (error) {\n            callback(error);\n          } else {\n            const upload = new BlobUpload(blob);\n            notify(this.delegate, \"directUploadWillStoreFileWithXHR\", upload.xhr);\n            upload.create((error => {\n              if (error) {\n                callback(error);\n              } else {\n                callback(null, blob.toJSON());\n              }\n            }));\n          }\n        }));\n      }));\n    }\n  }\n  function notify(object, methodName, ...messages) {\n    if (object && typeof object[methodName] == \"function\") {\n      return object[methodName](...messages);\n    }\n  }\n  class DirectUploadController {\n    constructor(input, file) {\n      this.input = input;\n      this.file = file;\n      this.directUpload = new DirectUpload(this.file, this.url, this);\n      this.dispatch(\"initialize\");\n    }\n    start(callback) {\n      const hiddenInput = document.createElement(\"input\");\n      hiddenInput.type = \"hidden\";\n      hiddenInput.name = this.input.name;\n      this.input.insertAdjacentElement(\"beforebegin\", hiddenInput);\n      this.dispatch(\"start\");\n      this.directUpload.create(((error, attributes) => {\n        if (error) {\n          hiddenInput.parentNode.removeChild(hiddenInput);\n          this.dispatchError(error);\n        } else {\n          hiddenInput.value = attributes.signed_id;\n        }\n        this.dispatch(\"end\");\n        callback(error);\n      }));\n    }\n    uploadRequestDidProgress(event) {\n      const progress = event.loaded / event.total * 100;\n      if (progress) {\n        this.dispatch(\"progress\", {\n          progress: progress\n        });\n      }\n    }\n    get url() {\n      return this.input.getAttribute(\"data-direct-upload-url\");\n    }\n    dispatch(name, detail = {}) {\n      detail.file = this.file;\n      detail.id = this.directUpload.id;\n      return dispatchEvent(this.input, `direct-upload:${name}`, {\n        detail: detail\n      });\n    }\n    dispatchError(error) {\n      const event = this.dispatch(\"error\", {\n        error: error\n      });\n      if (!event.defaultPrevented) {\n        alert(error);\n      }\n    }\n    directUploadWillCreateBlobWithXHR(xhr) {\n      this.dispatch(\"before-blob-request\", {\n        xhr: xhr\n      });\n    }\n    directUploadWillStoreFileWithXHR(xhr) {\n      this.dispatch(\"before-storage-request\", {\n        xhr: xhr\n      });\n      xhr.upload.addEventListener(\"progress\", (event => this.uploadRequestDidProgress(event)));\n    }\n  }\n  const inputSelector = \"input[type=file][data-direct-upload-url]:not([disabled])\";\n  class DirectUploadsController {\n    constructor(form) {\n      this.form = form;\n      this.inputs = findElements(form, inputSelector).filter((input => input.files.length));\n    }\n    start(callback) {\n      const controllers = this.createDirectUploadControllers();\n      const startNextController = () => {\n        const controller = controllers.shift();\n        if (controller) {\n          controller.start((error => {\n            if (error) {\n              callback(error);\n              this.dispatch(\"end\");\n            } else {\n              startNextController();\n            }\n          }));\n        } else {\n          callback();\n          this.dispatch(\"end\");\n        }\n      };\n      this.dispatch(\"start\");\n      startNextController();\n    }\n    createDirectUploadControllers() {\n      const controllers = [];\n      this.inputs.forEach((input => {\n        toArray(input.files).forEach((file => {\n          const controller = new DirectUploadController(input, file);\n          controllers.push(controller);\n        }));\n      }));\n      return controllers;\n    }\n    dispatch(name, detail = {}) {\n      return dispatchEvent(this.form, `direct-uploads:${name}`, {\n        detail: detail\n      });\n    }\n  }\n  const processingAttribute = \"data-direct-uploads-processing\";\n  const submitButtonsByForm = new WeakMap;\n  let started = false;\n  function start() {\n    if (!started) {\n      started = true;\n      document.addEventListener(\"click\", didClick, true);\n      document.addEventListener(\"submit\", didSubmitForm, true);\n      document.addEventListener(\"ajax:before\", didSubmitRemoteElement);\n    }\n  }\n  function didClick(event) {\n    const {target: target} = event;\n    if ((target.tagName == \"INPUT\" || target.tagName == \"BUTTON\") && target.type == \"submit\" && target.form) {\n      submitButtonsByForm.set(target.form, target);\n    }\n  }\n  function didSubmitForm(event) {\n    handleFormSubmissionEvent(event);\n  }\n  function didSubmitRemoteElement(event) {\n    if (event.target.tagName == \"FORM\") {\n      handleFormSubmissionEvent(event);\n    }\n  }\n  function handleFormSubmissionEvent(event) {\n    const form = event.target;\n    if (form.hasAttribute(processingAttribute)) {\n      event.preventDefault();\n      return;\n    }\n    const controller = new DirectUploadsController(form);\n    const {inputs: inputs} = controller;\n    if (inputs.length) {\n      event.preventDefault();\n      form.setAttribute(processingAttribute, \"\");\n      inputs.forEach(disable);\n      controller.start((error => {\n        form.removeAttribute(processingAttribute);\n        if (error) {\n          inputs.forEach(enable);\n        } else {\n          submitForm(form);\n        }\n      }));\n    }\n  }\n  function submitForm(form) {\n    let button = submitButtonsByForm.get(form) || findElement(form, \"input[type=submit], button[type=submit]\");\n    if (button) {\n      const {disabled: disabled} = button;\n      button.disabled = false;\n      button.focus();\n      button.click();\n      button.disabled = disabled;\n    } else {\n      button = document.createElement(\"input\");\n      button.type = \"submit\";\n      button.style.display = \"none\";\n      form.appendChild(button);\n      button.click();\n      form.removeChild(button);\n    }\n    submitButtonsByForm.delete(form);\n  }\n  function disable(input) {\n    input.disabled = true;\n  }\n  function enable(input) {\n    input.disabled = false;\n  }\n  function autostart() {\n    if (window.ActiveStorage) {\n      start();\n    }\n  }\n  setTimeout(autostart, 1);\n  exports.DirectUpload = DirectUpload;\n  exports.start = start;\n  Object.defineProperty(exports, \"__esModule\", {\n    value: true\n  });\n}));\n}(activestorage, activestorage.exports));\n\nclass AttachmentUpload {\n  constructor(attachment, element) {\n    this.attachment = attachment;\n    this.element = element;\n    this.directUpload = new activestorage.exports.DirectUpload(attachment.file, this.directUploadUrl, this);\n  }\n\n  start() {\n    this.directUpload.create(this.directUploadDidComplete.bind(this));\n  }\n\n  directUploadWillStoreFileWithXHR(xhr) {\n    xhr.upload.addEventListener(\"progress\", event => {\n      const progress = event.loaded / event.total * 100;\n      this.attachment.setUploadProgress(progress);\n    });\n  }\n\n  directUploadDidComplete(error, attributes) {\n    if (error) {\n      throw new Error(`Direct upload failed: ${error}`)\n    }\n\n    this.attachment.setAttributes({\n      sgid: attributes.attachable_sgid,\n      url: this.createBlobUrl(attributes.signed_id, attributes.filename)\n    });\n  }\n\n  createBlobUrl(signedId, filename) {\n    return this.blobUrlTemplate\n      .replace(\":signed_id\", signedId)\n      .replace(\":filename\", encodeURIComponent(filename))\n  }\n\n  get directUploadUrl() {\n    return this.element.dataset.directUploadUrl\n  }\n\n  get blobUrlTemplate() {\n    return this.element.dataset.blobUrlTemplate\n  }\n}\n\naddEventListener(\"trix-attachment-add\", event => {\n  const { attachment, target } = event;\n\n  if (attachment.file) {\n    const upload = new AttachmentUpload(attachment, target);\n    upload.start();\n  }\n});\n", "var sparkMd5 = {\n  exports: {}\n};\n\n(function(module, exports) {\n  (function(factory) {\n    {\n      module.exports = factory();\n    }\n  })((function(undefined$1) {\n    var hex_chr = [ \"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\" ];\n    function md5cycle(x, k) {\n      var a = x[0], b = x[1], c = x[2], d = x[3];\n      a += (b & c | ~b & d) + k[0] - 680876936 | 0;\n      a = (a << 7 | a >>> 25) + b | 0;\n      d += (a & b | ~a & c) + k[1] - 389564586 | 0;\n      d = (d << 12 | d >>> 20) + a | 0;\n      c += (d & a | ~d & b) + k[2] + 606105819 | 0;\n      c = (c << 17 | c >>> 15) + d | 0;\n      b += (c & d | ~c & a) + k[3] - 1044525330 | 0;\n      b = (b << 22 | b >>> 10) + c | 0;\n      a += (b & c | ~b & d) + k[4] - 176418897 | 0;\n      a = (a << 7 | a >>> 25) + b | 0;\n      d += (a & b | ~a & c) + k[5] + 1200080426 | 0;\n      d = (d << 12 | d >>> 20) + a | 0;\n      c += (d & a | ~d & b) + k[6] - 1473231341 | 0;\n      c = (c << 17 | c >>> 15) + d | 0;\n      b += (c & d | ~c & a) + k[7] - 45705983 | 0;\n      b = (b << 22 | b >>> 10) + c | 0;\n      a += (b & c | ~b & d) + k[8] + 1770035416 | 0;\n      a = (a << 7 | a >>> 25) + b | 0;\n      d += (a & b | ~a & c) + k[9] - 1958414417 | 0;\n      d = (d << 12 | d >>> 20) + a | 0;\n      c += (d & a | ~d & b) + k[10] - 42063 | 0;\n      c = (c << 17 | c >>> 15) + d | 0;\n      b += (c & d | ~c & a) + k[11] - 1990404162 | 0;\n      b = (b << 22 | b >>> 10) + c | 0;\n      a += (b & c | ~b & d) + k[12] + 1804603682 | 0;\n      a = (a << 7 | a >>> 25) + b | 0;\n      d += (a & b | ~a & c) + k[13] - 40341101 | 0;\n      d = (d << 12 | d >>> 20) + a | 0;\n      c += (d & a | ~d & b) + k[14] - 1502002290 | 0;\n      c = (c << 17 | c >>> 15) + d | 0;\n      b += (c & d | ~c & a) + k[15] + 1236535329 | 0;\n      b = (b << 22 | b >>> 10) + c | 0;\n      a += (b & d | c & ~d) + k[1] - 165796510 | 0;\n      a = (a << 5 | a >>> 27) + b | 0;\n      d += (a & c | b & ~c) + k[6] - 1069501632 | 0;\n      d = (d << 9 | d >>> 23) + a | 0;\n      c += (d & b | a & ~b) + k[11] + 643717713 | 0;\n      c = (c << 14 | c >>> 18) + d | 0;\n      b += (c & a | d & ~a) + k[0] - 373897302 | 0;\n      b = (b << 20 | b >>> 12) + c | 0;\n      a += (b & d | c & ~d) + k[5] - 701558691 | 0;\n      a = (a << 5 | a >>> 27) + b | 0;\n      d += (a & c | b & ~c) + k[10] + 38016083 | 0;\n      d = (d << 9 | d >>> 23) + a | 0;\n      c += (d & b | a & ~b) + k[15] - 660478335 | 0;\n      c = (c << 14 | c >>> 18) + d | 0;\n      b += (c & a | d & ~a) + k[4] - 405537848 | 0;\n      b = (b << 20 | b >>> 12) + c | 0;\n      a += (b & d | c & ~d) + k[9] + 568446438 | 0;\n      a = (a << 5 | a >>> 27) + b | 0;\n      d += (a & c | b & ~c) + k[14] - 1019803690 | 0;\n      d = (d << 9 | d >>> 23) + a | 0;\n      c += (d & b | a & ~b) + k[3] - 187363961 | 0;\n      c = (c << 14 | c >>> 18) + d | 0;\n      b += (c & a | d & ~a) + k[8] + 1163531501 | 0;\n      b = (b << 20 | b >>> 12) + c | 0;\n      a += (b & d | c & ~d) + k[13] - 1444681467 | 0;\n      a = (a << 5 | a >>> 27) + b | 0;\n      d += (a & c | b & ~c) + k[2] - 51403784 | 0;\n      d = (d << 9 | d >>> 23) + a | 0;\n      c += (d & b | a & ~b) + k[7] + 1735328473 | 0;\n      c = (c << 14 | c >>> 18) + d | 0;\n      b += (c & a | d & ~a) + k[12] - 1926607734 | 0;\n      b = (b << 20 | b >>> 12) + c | 0;\n      a += (b ^ c ^ d) + k[5] - 378558 | 0;\n      a = (a << 4 | a >>> 28) + b | 0;\n      d += (a ^ b ^ c) + k[8] - 2022574463 | 0;\n      d = (d << 11 | d >>> 21) + a | 0;\n      c += (d ^ a ^ b) + k[11] + 1839030562 | 0;\n      c = (c << 16 | c >>> 16) + d | 0;\n      b += (c ^ d ^ a) + k[14] - 35309556 | 0;\n      b = (b << 23 | b >>> 9) + c | 0;\n      a += (b ^ c ^ d) + k[1] - 1530992060 | 0;\n      a = (a << 4 | a >>> 28) + b | 0;\n      d += (a ^ b ^ c) + k[4] + 1272893353 | 0;\n      d = (d << 11 | d >>> 21) + a | 0;\n      c += (d ^ a ^ b) + k[7] - 155497632 | 0;\n      c = (c << 16 | c >>> 16) + d | 0;\n      b += (c ^ d ^ a) + k[10] - 1094730640 | 0;\n      b = (b << 23 | b >>> 9) + c | 0;\n      a += (b ^ c ^ d) + k[13] + 681279174 | 0;\n      a = (a << 4 | a >>> 28) + b | 0;\n      d += (a ^ b ^ c) + k[0] - 358537222 | 0;\n      d = (d << 11 | d >>> 21) + a | 0;\n      c += (d ^ a ^ b) + k[3] - 722521979 | 0;\n      c = (c << 16 | c >>> 16) + d | 0;\n      b += (c ^ d ^ a) + k[6] + 76029189 | 0;\n      b = (b << 23 | b >>> 9) + c | 0;\n      a += (b ^ c ^ d) + k[9] - 640364487 | 0;\n      a = (a << 4 | a >>> 28) + b | 0;\n      d += (a ^ b ^ c) + k[12] - 421815835 | 0;\n      d = (d << 11 | d >>> 21) + a | 0;\n      c += (d ^ a ^ b) + k[15] + 530742520 | 0;\n      c = (c << 16 | c >>> 16) + d | 0;\n      b += (c ^ d ^ a) + k[2] - 995338651 | 0;\n      b = (b << 23 | b >>> 9) + c | 0;\n      a += (c ^ (b | ~d)) + k[0] - 198630844 | 0;\n      a = (a << 6 | a >>> 26) + b | 0;\n      d += (b ^ (a | ~c)) + k[7] + 1126891415 | 0;\n      d = (d << 10 | d >>> 22) + a | 0;\n      c += (a ^ (d | ~b)) + k[14] - 1416354905 | 0;\n      c = (c << 15 | c >>> 17) + d | 0;\n      b += (d ^ (c | ~a)) + k[5] - 57434055 | 0;\n      b = (b << 21 | b >>> 11) + c | 0;\n      a += (c ^ (b | ~d)) + k[12] + 1700485571 | 0;\n      a = (a << 6 | a >>> 26) + b | 0;\n      d += (b ^ (a | ~c)) + k[3] - 1894986606 | 0;\n      d = (d << 10 | d >>> 22) + a | 0;\n      c += (a ^ (d | ~b)) + k[10] - 1051523 | 0;\n      c = (c << 15 | c >>> 17) + d | 0;\n      b += (d ^ (c | ~a)) + k[1] - 2054922799 | 0;\n      b = (b << 21 | b >>> 11) + c | 0;\n      a += (c ^ (b | ~d)) + k[8] + 1873313359 | 0;\n      a = (a << 6 | a >>> 26) + b | 0;\n      d += (b ^ (a | ~c)) + k[15] - 30611744 | 0;\n      d = (d << 10 | d >>> 22) + a | 0;\n      c += (a ^ (d | ~b)) + k[6] - 1560198380 | 0;\n      c = (c << 15 | c >>> 17) + d | 0;\n      b += (d ^ (c | ~a)) + k[13] + 1309151649 | 0;\n      b = (b << 21 | b >>> 11) + c | 0;\n      a += (c ^ (b | ~d)) + k[4] - 145523070 | 0;\n      a = (a << 6 | a >>> 26) + b | 0;\n      d += (b ^ (a | ~c)) + k[11] - 1120210379 | 0;\n      d = (d << 10 | d >>> 22) + a | 0;\n      c += (a ^ (d | ~b)) + k[2] + 718787259 | 0;\n      c = (c << 15 | c >>> 17) + d | 0;\n      b += (d ^ (c | ~a)) + k[9] - 343485551 | 0;\n      b = (b << 21 | b >>> 11) + c | 0;\n      x[0] = a + x[0] | 0;\n      x[1] = b + x[1] | 0;\n      x[2] = c + x[2] | 0;\n      x[3] = d + x[3] | 0;\n    }\n    function md5blk(s) {\n      var md5blks = [], i;\n      for (i = 0; i < 64; i += 4) {\n        md5blks[i >> 2] = s.charCodeAt(i) + (s.charCodeAt(i + 1) << 8) + (s.charCodeAt(i + 2) << 16) + (s.charCodeAt(i + 3) << 24);\n      }\n      return md5blks;\n    }\n    function md5blk_array(a) {\n      var md5blks = [], i;\n      for (i = 0; i < 64; i += 4) {\n        md5blks[i >> 2] = a[i] + (a[i + 1] << 8) + (a[i + 2] << 16) + (a[i + 3] << 24);\n      }\n      return md5blks;\n    }\n    function md51(s) {\n      var n = s.length, state = [ 1732584193, -271733879, -1732584194, 271733878 ], i, length, tail, tmp, lo, hi;\n      for (i = 64; i <= n; i += 64) {\n        md5cycle(state, md5blk(s.substring(i - 64, i)));\n      }\n      s = s.substring(i - 64);\n      length = s.length;\n      tail = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ];\n      for (i = 0; i < length; i += 1) {\n        tail[i >> 2] |= s.charCodeAt(i) << (i % 4 << 3);\n      }\n      tail[i >> 2] |= 128 << (i % 4 << 3);\n      if (i > 55) {\n        md5cycle(state, tail);\n        for (i = 0; i < 16; i += 1) {\n          tail[i] = 0;\n        }\n      }\n      tmp = n * 8;\n      tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);\n      lo = parseInt(tmp[2], 16);\n      hi = parseInt(tmp[1], 16) || 0;\n      tail[14] = lo;\n      tail[15] = hi;\n      md5cycle(state, tail);\n      return state;\n    }\n    function md51_array(a) {\n      var n = a.length, state = [ 1732584193, -271733879, -1732584194, 271733878 ], i, length, tail, tmp, lo, hi;\n      for (i = 64; i <= n; i += 64) {\n        md5cycle(state, md5blk_array(a.subarray(i - 64, i)));\n      }\n      a = i - 64 < n ? a.subarray(i - 64) : new Uint8Array(0);\n      length = a.length;\n      tail = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ];\n      for (i = 0; i < length; i += 1) {\n        tail[i >> 2] |= a[i] << (i % 4 << 3);\n      }\n      tail[i >> 2] |= 128 << (i % 4 << 3);\n      if (i > 55) {\n        md5cycle(state, tail);\n        for (i = 0; i < 16; i += 1) {\n          tail[i] = 0;\n        }\n      }\n      tmp = n * 8;\n      tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);\n      lo = parseInt(tmp[2], 16);\n      hi = parseInt(tmp[1], 16) || 0;\n      tail[14] = lo;\n      tail[15] = hi;\n      md5cycle(state, tail);\n      return state;\n    }\n    function rhex(n) {\n      var s = \"\", j;\n      for (j = 0; j < 4; j += 1) {\n        s += hex_chr[n >> j * 8 + 4 & 15] + hex_chr[n >> j * 8 & 15];\n      }\n      return s;\n    }\n    function hex(x) {\n      var i;\n      for (i = 0; i < x.length; i += 1) {\n        x[i] = rhex(x[i]);\n      }\n      return x.join(\"\");\n    }\n    if (hex(md51(\"hello\")) !== \"5d41402abc4b2a76b9719d911017c592\") ;\n    if (typeof ArrayBuffer !== \"undefined\" && !ArrayBuffer.prototype.slice) {\n      (function() {\n        function clamp(val, length) {\n          val = val | 0 || 0;\n          if (val < 0) {\n            return Math.max(val + length, 0);\n          }\n          return Math.min(val, length);\n        }\n        ArrayBuffer.prototype.slice = function(from, to) {\n          var length = this.byteLength, begin = clamp(from, length), end = length, num, target, targetArray, sourceArray;\n          if (to !== undefined$1) {\n            end = clamp(to, length);\n          }\n          if (begin > end) {\n            return new ArrayBuffer(0);\n          }\n          num = end - begin;\n          target = new ArrayBuffer(num);\n          targetArray = new Uint8Array(target);\n          sourceArray = new Uint8Array(this, begin, num);\n          targetArray.set(sourceArray);\n          return target;\n        };\n      })();\n    }\n    function toUtf8(str) {\n      if (/[\\u0080-\\uFFFF]/.test(str)) {\n        str = unescape(encodeURIComponent(str));\n      }\n      return str;\n    }\n    function utf8Str2ArrayBuffer(str, returnUInt8Array) {\n      var length = str.length, buff = new ArrayBuffer(length), arr = new Uint8Array(buff), i;\n      for (i = 0; i < length; i += 1) {\n        arr[i] = str.charCodeAt(i);\n      }\n      return returnUInt8Array ? arr : buff;\n    }\n    function arrayBuffer2Utf8Str(buff) {\n      return String.fromCharCode.apply(null, new Uint8Array(buff));\n    }\n    function concatenateArrayBuffers(first, second, returnUInt8Array) {\n      var result = new Uint8Array(first.byteLength + second.byteLength);\n      result.set(new Uint8Array(first));\n      result.set(new Uint8Array(second), first.byteLength);\n      return returnUInt8Array ? result : result.buffer;\n    }\n    function hexToBinaryString(hex) {\n      var bytes = [], length = hex.length, x;\n      for (x = 0; x < length - 1; x += 2) {\n        bytes.push(parseInt(hex.substr(x, 2), 16));\n      }\n      return String.fromCharCode.apply(String, bytes);\n    }\n    function SparkMD5() {\n      this.reset();\n    }\n    SparkMD5.prototype.append = function(str) {\n      this.appendBinary(toUtf8(str));\n      return this;\n    };\n    SparkMD5.prototype.appendBinary = function(contents) {\n      this._buff += contents;\n      this._length += contents.length;\n      var length = this._buff.length, i;\n      for (i = 64; i <= length; i += 64) {\n        md5cycle(this._hash, md5blk(this._buff.substring(i - 64, i)));\n      }\n      this._buff = this._buff.substring(i - 64);\n      return this;\n    };\n    SparkMD5.prototype.end = function(raw) {\n      var buff = this._buff, length = buff.length, i, tail = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], ret;\n      for (i = 0; i < length; i += 1) {\n        tail[i >> 2] |= buff.charCodeAt(i) << (i % 4 << 3);\n      }\n      this._finish(tail, length);\n      ret = hex(this._hash);\n      if (raw) {\n        ret = hexToBinaryString(ret);\n      }\n      this.reset();\n      return ret;\n    };\n    SparkMD5.prototype.reset = function() {\n      this._buff = \"\";\n      this._length = 0;\n      this._hash = [ 1732584193, -271733879, -1732584194, 271733878 ];\n      return this;\n    };\n    SparkMD5.prototype.getState = function() {\n      return {\n        buff: this._buff,\n        length: this._length,\n        hash: this._hash.slice()\n      };\n    };\n    SparkMD5.prototype.setState = function(state) {\n      this._buff = state.buff;\n      this._length = state.length;\n      this._hash = state.hash;\n      return this;\n    };\n    SparkMD5.prototype.destroy = function() {\n      delete this._hash;\n      delete this._buff;\n      delete this._length;\n    };\n    SparkMD5.prototype._finish = function(tail, length) {\n      var i = length, tmp, lo, hi;\n      tail[i >> 2] |= 128 << (i % 4 << 3);\n      if (i > 55) {\n        md5cycle(this._hash, tail);\n        for (i = 0; i < 16; i += 1) {\n          tail[i] = 0;\n        }\n      }\n      tmp = this._length * 8;\n      tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);\n      lo = parseInt(tmp[2], 16);\n      hi = parseInt(tmp[1], 16) || 0;\n      tail[14] = lo;\n      tail[15] = hi;\n      md5cycle(this._hash, tail);\n    };\n    SparkMD5.hash = function(str, raw) {\n      return SparkMD5.hashBinary(toUtf8(str), raw);\n    };\n    SparkMD5.hashBinary = function(content, raw) {\n      var hash = md51(content), ret = hex(hash);\n      return raw ? hexToBinaryString(ret) : ret;\n    };\n    SparkMD5.ArrayBuffer = function() {\n      this.reset();\n    };\n    SparkMD5.ArrayBuffer.prototype.append = function(arr) {\n      var buff = concatenateArrayBuffers(this._buff.buffer, arr, true), length = buff.length, i;\n      this._length += arr.byteLength;\n      for (i = 64; i <= length; i += 64) {\n        md5cycle(this._hash, md5blk_array(buff.subarray(i - 64, i)));\n      }\n      this._buff = i - 64 < length ? new Uint8Array(buff.buffer.slice(i - 64)) : new Uint8Array(0);\n      return this;\n    };\n    SparkMD5.ArrayBuffer.prototype.end = function(raw) {\n      var buff = this._buff, length = buff.length, tail = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], i, ret;\n      for (i = 0; i < length; i += 1) {\n        tail[i >> 2] |= buff[i] << (i % 4 << 3);\n      }\n      this._finish(tail, length);\n      ret = hex(this._hash);\n      if (raw) {\n        ret = hexToBinaryString(ret);\n      }\n      this.reset();\n      return ret;\n    };\n    SparkMD5.ArrayBuffer.prototype.reset = function() {\n      this._buff = new Uint8Array(0);\n      this._length = 0;\n      this._hash = [ 1732584193, -271733879, -1732584194, 271733878 ];\n      return this;\n    };\n    SparkMD5.ArrayBuffer.prototype.getState = function() {\n      var state = SparkMD5.prototype.getState.call(this);\n      state.buff = arrayBuffer2Utf8Str(state.buff);\n      return state;\n    };\n    SparkMD5.ArrayBuffer.prototype.setState = function(state) {\n      state.buff = utf8Str2ArrayBuffer(state.buff, true);\n      return SparkMD5.prototype.setState.call(this, state);\n    };\n    SparkMD5.ArrayBuffer.prototype.destroy = SparkMD5.prototype.destroy;\n    SparkMD5.ArrayBuffer.prototype._finish = SparkMD5.prototype._finish;\n    SparkMD5.ArrayBuffer.hash = function(arr, raw) {\n      var hash = md51_array(new Uint8Array(arr)), ret = hex(hash);\n      return raw ? hexToBinaryString(ret) : ret;\n    };\n    return SparkMD5;\n  }));\n})(sparkMd5);\n\nvar SparkMD5 = sparkMd5.exports;\n\nconst fileSlice = File.prototype.slice || File.prototype.mozSlice || File.prototype.webkitSlice;\n\nclass FileChecksum {\n  static create(file, callback) {\n    const instance = new FileChecksum(file);\n    instance.create(callback);\n  }\n  constructor(file) {\n    this.file = file;\n    this.chunkSize = 2097152;\n    this.chunkCount = Math.ceil(this.file.size / this.chunkSize);\n    this.chunkIndex = 0;\n  }\n  create(callback) {\n    this.callback = callback;\n    this.md5Buffer = new SparkMD5.ArrayBuffer;\n    this.fileReader = new FileReader;\n    this.fileReader.addEventListener(\"load\", (event => this.fileReaderDidLoad(event)));\n    this.fileReader.addEventListener(\"error\", (event => this.fileReaderDidError(event)));\n    this.readNextChunk();\n  }\n  fileReaderDidLoad(event) {\n    this.md5Buffer.append(event.target.result);\n    if (!this.readNextChunk()) {\n      const binaryDigest = this.md5Buffer.end(true);\n      const base64digest = btoa(binaryDigest);\n      this.callback(null, base64digest);\n    }\n  }\n  fileReaderDidError(event) {\n    this.callback(`Error reading ${this.file.name}`);\n  }\n  readNextChunk() {\n    if (this.chunkIndex < this.chunkCount || this.chunkIndex == 0 && this.chunkCount == 0) {\n      const start = this.chunkIndex * this.chunkSize;\n      const end = Math.min(start + this.chunkSize, this.file.size);\n      const bytes = fileSlice.call(this.file, start, end);\n      this.fileReader.readAsArrayBuffer(bytes);\n      this.chunkIndex++;\n      return true;\n    } else {\n      return false;\n    }\n  }\n}\n\nfunction getMetaValue(name) {\n  const element = findElement(document.head, `meta[name=\"${name}\"]`);\n  if (element) {\n    return element.getAttribute(\"content\");\n  }\n}\n\nfunction findElements(root, selector) {\n  if (typeof root == \"string\") {\n    selector = root;\n    root = document;\n  }\n  const elements = root.querySelectorAll(selector);\n  return toArray(elements);\n}\n\nfunction findElement(root, selector) {\n  if (typeof root == \"string\") {\n    selector = root;\n    root = document;\n  }\n  return root.querySelector(selector);\n}\n\nfunction dispatchEvent(element, type, eventInit = {}) {\n  const {disabled: disabled} = element;\n  const {bubbles: bubbles, cancelable: cancelable, detail: detail} = eventInit;\n  const event = document.createEvent(\"Event\");\n  event.initEvent(type, bubbles || true, cancelable || true);\n  event.detail = detail || {};\n  try {\n    element.disabled = false;\n    element.dispatchEvent(event);\n  } finally {\n    element.disabled = disabled;\n  }\n  return event;\n}\n\nfunction toArray(value) {\n  if (Array.isArray(value)) {\n    return value;\n  } else if (Array.from) {\n    return Array.from(value);\n  } else {\n    return [].slice.call(value);\n  }\n}\n\nclass BlobRecord {\n  constructor(file, checksum, url, directUploadToken, attachmentName) {\n    this.file = file;\n    this.attributes = {\n      filename: file.name,\n      content_type: file.type || \"application/octet-stream\",\n      byte_size: file.size,\n      checksum: checksum\n    };\n    this.directUploadToken = directUploadToken;\n    this.attachmentName = attachmentName;\n    this.xhr = new XMLHttpRequest;\n    this.xhr.open(\"POST\", url, true);\n    this.xhr.responseType = \"json\";\n    this.xhr.setRequestHeader(\"Content-Type\", \"application/json\");\n    this.xhr.setRequestHeader(\"Accept\", \"application/json\");\n    this.xhr.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\n    const csrfToken = getMetaValue(\"csrf-token\");\n    if (csrfToken != undefined) {\n      this.xhr.setRequestHeader(\"X-CSRF-Token\", csrfToken);\n    }\n    this.xhr.addEventListener(\"load\", (event => this.requestDidLoad(event)));\n    this.xhr.addEventListener(\"error\", (event => this.requestDidError(event)));\n  }\n  get status() {\n    return this.xhr.status;\n  }\n  get response() {\n    const {responseType: responseType, response: response} = this.xhr;\n    if (responseType == \"json\") {\n      return response;\n    } else {\n      return JSON.parse(response);\n    }\n  }\n  create(callback) {\n    this.callback = callback;\n    this.xhr.send(JSON.stringify({\n      blob: this.attributes,\n      direct_upload_token: this.directUploadToken,\n      attachment_name: this.attachmentName\n    }));\n  }\n  requestDidLoad(event) {\n    if (this.status >= 200 && this.status < 300) {\n      const {response: response} = this;\n      const {direct_upload: direct_upload} = response;\n      delete response.direct_upload;\n      this.attributes = response;\n      this.directUploadData = direct_upload;\n      this.callback(null, this.toJSON());\n    } else {\n      this.requestDidError(event);\n    }\n  }\n  requestDidError(event) {\n    this.callback(`Error creating Blob for \"${this.file.name}\". Status: ${this.status}`);\n  }\n  toJSON() {\n    const result = {};\n    for (const key in this.attributes) {\n      result[key] = this.attributes[key];\n    }\n    return result;\n  }\n}\n\nclass BlobUpload {\n  constructor(blob) {\n    this.blob = blob;\n    this.file = blob.file;\n    const {url: url, headers: headers} = blob.directUploadData;\n    this.xhr = new XMLHttpRequest;\n    this.xhr.open(\"PUT\", url, true);\n    this.xhr.responseType = \"text\";\n    for (const key in headers) {\n      this.xhr.setRequestHeader(key, headers[key]);\n    }\n    this.xhr.addEventListener(\"load\", (event => this.requestDidLoad(event)));\n    this.xhr.addEventListener(\"error\", (event => this.requestDidError(event)));\n  }\n  create(callback) {\n    this.callback = callback;\n    this.xhr.send(this.file.slice());\n  }\n  requestDidLoad(event) {\n    const {status: status, response: response} = this.xhr;\n    if (status >= 200 && status < 300) {\n      this.callback(null, response);\n    } else {\n      this.requestDidError(event);\n    }\n  }\n  requestDidError(event) {\n    this.callback(`Error storing \"${this.file.name}\". Status: ${this.xhr.status}`);\n  }\n}\n\nlet id = 0;\n\nclass DirectUpload {\n  constructor(file, url, serviceName, attachmentName, delegate) {\n    this.id = ++id;\n    this.file = file;\n    this.url = url;\n    this.serviceName = serviceName;\n    this.attachmentName = attachmentName;\n    this.delegate = delegate;\n  }\n  create(callback) {\n    FileChecksum.create(this.file, ((error, checksum) => {\n      if (error) {\n        callback(error);\n        return;\n      }\n      const blob = new BlobRecord(this.file, checksum, this.url, this.serviceName, this.attachmentName);\n      notify(this.delegate, \"directUploadWillCreateBlobWithXHR\", blob.xhr);\n      blob.create((error => {\n        if (error) {\n          callback(error);\n        } else {\n          const upload = new BlobUpload(blob);\n          notify(this.delegate, \"directUploadWillStoreFileWithXHR\", upload.xhr);\n          upload.create((error => {\n            if (error) {\n              callback(error);\n            } else {\n              callback(null, blob.toJSON());\n            }\n          }));\n        }\n      }));\n    }));\n  }\n}\n\nfunction notify(object, methodName, ...messages) {\n  if (object && typeof object[methodName] == \"function\") {\n    return object[methodName](...messages);\n  }\n}\n\nclass DirectUploadController {\n  constructor(input, file) {\n    this.input = input;\n    this.file = file;\n    this.directUpload = new DirectUpload(this.file, this.url, this.directUploadToken, this.attachmentName, this);\n    this.dispatch(\"initialize\");\n  }\n  start(callback) {\n    const hiddenInput = document.createElement(\"input\");\n    hiddenInput.type = \"hidden\";\n    hiddenInput.name = this.input.name;\n    this.input.insertAdjacentElement(\"beforebegin\", hiddenInput);\n    this.dispatch(\"start\");\n    this.directUpload.create(((error, attributes) => {\n      if (error) {\n        hiddenInput.parentNode.removeChild(hiddenInput);\n        this.dispatchError(error);\n      } else {\n        hiddenInput.value = attributes.signed_id;\n      }\n      this.dispatch(\"end\");\n      callback(error);\n    }));\n  }\n  uploadRequestDidProgress(event) {\n    const progress = event.loaded / event.total * 100;\n    if (progress) {\n      this.dispatch(\"progress\", {\n        progress: progress\n      });\n    }\n  }\n  get url() {\n    return this.input.getAttribute(\"data-direct-upload-url\");\n  }\n  get directUploadToken() {\n    return this.input.getAttribute(\"data-direct-upload-token\");\n  }\n  get attachmentName() {\n    return this.input.getAttribute(\"data-direct-upload-attachment-name\");\n  }\n  dispatch(name, detail = {}) {\n    detail.file = this.file;\n    detail.id = this.directUpload.id;\n    return dispatchEvent(this.input, `direct-upload:${name}`, {\n      detail: detail\n    });\n  }\n  dispatchError(error) {\n    const event = this.dispatch(\"error\", {\n      error: error\n    });\n    if (!event.defaultPrevented) {\n      alert(error);\n    }\n  }\n  directUploadWillCreateBlobWithXHR(xhr) {\n    this.dispatch(\"before-blob-request\", {\n      xhr: xhr\n    });\n  }\n  directUploadWillStoreFileWithXHR(xhr) {\n    this.dispatch(\"before-storage-request\", {\n      xhr: xhr\n    });\n    xhr.upload.addEventListener(\"progress\", (event => this.uploadRequestDidProgress(event)));\n  }\n}\n\nconst inputSelector = \"input[type=file][data-direct-upload-url]:not([disabled])\";\n\nclass DirectUploadsController {\n  constructor(form) {\n    this.form = form;\n    this.inputs = findElements(form, inputSelector).filter((input => input.files.length));\n  }\n  start(callback) {\n    const controllers = this.createDirectUploadControllers();\n    const startNextController = () => {\n      const controller = controllers.shift();\n      if (controller) {\n        controller.start((error => {\n          if (error) {\n            callback(error);\n            this.dispatch(\"end\");\n          } else {\n            startNextController();\n          }\n        }));\n      } else {\n        callback();\n        this.dispatch(\"end\");\n      }\n    };\n    this.dispatch(\"start\");\n    startNextController();\n  }\n  createDirectUploadControllers() {\n    const controllers = [];\n    this.inputs.forEach((input => {\n      toArray(input.files).forEach((file => {\n        const controller = new DirectUploadController(input, file);\n        controllers.push(controller);\n      }));\n    }));\n    return controllers;\n  }\n  dispatch(name, detail = {}) {\n    return dispatchEvent(this.form, `direct-uploads:${name}`, {\n      detail: detail\n    });\n  }\n}\n\nconst processingAttribute = \"data-direct-uploads-processing\";\n\nconst submitButtonsByForm = new WeakMap;\n\nlet started = false;\n\nfunction start() {\n  if (!started) {\n    started = true;\n    document.addEventListener(\"click\", didClick, true);\n    document.addEventListener(\"submit\", didSubmitForm, true);\n    document.addEventListener(\"ajax:before\", didSubmitRemoteElement);\n  }\n}\n\nfunction didClick(event) {\n  const {target: target} = event;\n  if ((target.tagName == \"INPUT\" || target.tagName == \"BUTTON\") && target.type == \"submit\" && target.form) {\n    submitButtonsByForm.set(target.form, target);\n  }\n}\n\nfunction didSubmitForm(event) {\n  handleFormSubmissionEvent(event);\n}\n\nfunction didSubmitRemoteElement(event) {\n  if (event.target.tagName == \"FORM\") {\n    handleFormSubmissionEvent(event);\n  }\n}\n\nfunction handleFormSubmissionEvent(event) {\n  const form = event.target;\n  if (form.hasAttribute(processingAttribute)) {\n    event.preventDefault();\n    return;\n  }\n  const controller = new DirectUploadsController(form);\n  const {inputs: inputs} = controller;\n  if (inputs.length) {\n    event.preventDefault();\n    form.setAttribute(processingAttribute, \"\");\n    inputs.forEach(disable);\n    controller.start((error => {\n      form.removeAttribute(processingAttribute);\n      if (error) {\n        inputs.forEach(enable);\n      } else {\n        submitForm(form);\n      }\n    }));\n  }\n}\n\nfunction submitForm(form) {\n  let button = submitButtonsByForm.get(form) || findElement(form, \"input[type=submit], button[type=submit]\");\n  if (button) {\n    const {disabled: disabled} = button;\n    button.disabled = false;\n    button.focus();\n    button.click();\n    button.disabled = disabled;\n  } else {\n    button = document.createElement(\"input\");\n    button.type = \"submit\";\n    button.style.display = \"none\";\n    form.appendChild(button);\n    button.click();\n    form.removeChild(button);\n  }\n  submitButtonsByForm.delete(form);\n}\n\nfunction disable(input) {\n  input.disabled = true;\n}\n\nfunction enable(input) {\n  input.disabled = false;\n}\n\nfunction autostart() {\n  if (window.ActiveStorage) {\n    start();\n  }\n}\n\nsetTimeout(autostart, 1);\n\nexport { DirectUpload, start };\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\nimport * as ActiveStorage from \"@rails/activestorage\"\nActiveStorage.start()\n\n// import \"./channels/**/*_channel.js\"\nimport \"flowbite/dist/flowbite.turbo.js\"\n\nimport \"@hotwired/turbo-rails\"\nimport \"./controllers\"\n\nimport anime from \"animejs/lib/anime.es.js\"\nimport Alpine from \"alpinejs\"\nimport intersect from \"@alpinejs/intersect\"\nimport persist from \"@alpinejs/persist\"\nimport focus from \"@alpinejs/focus\"\nimport collapse from \"@alpinejs/collapse\"\nimport Clipboard from \"@ryangjchandler/alpine-clipboard\"\nimport moment from \"moment\"\n\nwindow.anime = anime\nwindow.Alpine = Alpine\n\nAlpine.plugin(intersect)\nAlpine.plugin(persist)\nAlpine.plugin(focus)\nAlpine.plugin(Clipboard)\nAlpine.plugin(collapse)\nAlpine.start()\n\n// Uncomment to copy all static images under ../images to the output folder and reference\n// them with the image_pack_tag helper in views (e.g <%= image_pack_tag 'rails.png' %>)\n// or the `imagePath` JavaScript helper below.\n//\n// const images = require.context('../images', true)\n// const imagePath = (name) => images(name, true)\n\nimport(\"chartkick/chart.js\")\n// import(\"./components/topic_checkbox\")\nimport(\"./components/license_slider\")\nimport(\"./components/file_input\")\nimport(\"./components/star_rating\")\nimport(\"./components/user_cover_submit\")\nimport(\"./components/theater_mode\")\nimport(\"./components/resize\")\nimport(\"./components/particles\")\nimport(\"./components/direct_upload\")\n\ndocument.addEventListener(\n  \"turbo:load\",\n  (event) => {\n    if (typeof window.dataLayer == \"undefined\") return\n\n    window.dataLayer.push({ page_location: event.detail.url })\n  },\n  false\n)\n\nimport Trix from \"trix\"\n\nTrix.config.blockAttributes.heading2 = {\n  tagName: \"h2\",\n  terminal: true,\n  breakOnReturn: true,\n  group: false,\n}\n\nTrix.config.blockAttributes.heading3 = {\n  tagName: \"h3\",\n  terminal: true,\n  breakOnReturn: true,\n  group: false,\n}\n\nconst { lang } = Trix.config\n\ndocument.addEventListener(\"trix-before-initialize\", () => {\n  Trix.config.toolbar.getDefaultHTML = () =>\n    `\\\n      <div class=\"trix-button-row\">\n        <span class=\"trix-button-group trix-button-group--text-tools\" data-trix-button-group=\"text-tools\">\n          <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-bold\" data-trix-attribute=\"bold\" data-trix-key=\"b\" title=\"${lang.bold}\" tabindex=\"-1\">${lang.bold}</button>\n          <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-italic\" data-trix-attribute=\"italic\" data-trix-key=\"i\" title=\"${lang.italic}\" tabindex=\"-1\">${lang.italic}</button>\n          <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-strike\" data-trix-attribute=\"strike\" title=\"${lang.strike}\" tabindex=\"-1\">${lang.strike}</button>\n          <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-link\" data-trix-attribute=\"href\" data-trix-action=\"link\" data-trix-key=\"k\" title=\"${lang.link}\" tabindex=\"-1\">${lang.link}</button>\n        </span>\n        <span class=\"trix-button-group trix-button-group--block-tools\" data-trix-button-group=\"block-tools\">\n          <button type=\"button\" class=\"trix-button flex items-center justify-center\" data-trix-attribute=\"heading2\" title=\"h2\" tabindex=\"-1\">H2</button>\n          <button type=\"button\" class=\"trix-button flex items-center justify-center\" data-trix-attribute=\"heading3\" title=\"h3\" tabindex=\"-1\">H3</button>\n          <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-quote\" data-trix-attribute=\"quote\" title=\"${lang.quote}\" tabindex=\"-1\">${lang.quote}</button>\n          <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-code\" data-trix-attribute=\"code\" title=\"${lang.code}\" tabindex=\"-1\">${lang.code}</button>\n          <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-bullet-list\" data-trix-attribute=\"bullet\" title=\"${lang.bullets}\" tabindex=\"-1\">${lang.bullets}</button>\n          <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-number-list\" data-trix-attribute=\"number\" title=\"${lang.numbers}\" tabindex=\"-1\">${lang.numbers}</button>\n          <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-decrease-nesting-level\" data-trix-action=\"decreaseNestingLevel\" title=\"${lang.outdent}\" tabindex=\"-1\">${lang.outdent}</button>\n          <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-increase-nesting-level\" data-trix-action=\"increaseNestingLevel\" title=\"${lang.indent}\" tabindex=\"-1\">${lang.indent}</button>\n        </span>\n        <span class=\"trix-button-group trix-button-group--file-tools\" data-trix-button-group=\"file-tools\">\n          <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-attach\" data-trix-action=\"attachFiles\" title=\"${lang.attachFiles}\" tabindex=\"-1\">${lang.attachFiles}</button>\n        </span>\n        <span class=\"trix-button-group-spacer\"></span>\n        <span class=\"trix-button-group trix-button-group--history-tools\" data-trix-button-group=\"history-tools\">\n          <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-undo\" data-trix-action=\"undo\" data-trix-key=\"z\" title=\"${lang.undo}\" tabindex=\"-1\">${lang.undo}</button>\n          <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-redo\" data-trix-action=\"redo\" data-trix-key=\"shift+z\" title=\"${lang.redo}\" tabindex=\"-1\">${lang.redo}</button>\n        </span>\n      </div>\n      <div class=\"trix-dialogs\" data-trix-dialogs>\n        <div class=\"trix-dialog trix-dialog--link\" data-trix-dialog=\"href\" data-trix-dialog-attribute=\"href\">\n          <div class=\"trix-dialog__link-fields\">\n            <input type=\"url\" name=\"href\" class=\"trix-input trix-input--dialog\" placeholder=\"${lang.urlPlaceholder}\" aria-label=\"${lang.url}\" required data-trix-input>\n            <div class=\"trix-button-group\">\n              <input type=\"button\" class=\"trix-button trix-button--dialog\" value=\"${lang.link}\" data-trix-method=\"setAttribute\">\n              <input type=\"button\" class=\"trix-button trix-button--dialog\" value=\"${lang.unlink}\" data-trix-method=\"removeAttribute\">\n            </div>\n          </div>\n        </div>\n      </div>\\\n    `\n})\n\nrequire(\"@rails/actiontext\")\n\nconst installButton = document.querySelector(\"#install\")\nlet installPrompt = null\n\nfunction beforeInstallPrompt(event) {\n  if (installButton) {\n    event.preventDefault()\n    installPrompt = event\n    installButton.removeAttribute(\"hidden\")\n  }\n}\n\nwindow.addEventListener(\"beforeinstallprompt\", beforeInstallPrompt)\n\nif (installButton) {\n  installButton.addEventListener(\"click\", async () => {\n    if (!installPrompt) {\n      return\n    }\n\n    const result = await installPrompt.prompt()\n    console.log(`Install prompt was: ${result.outcome}`)\n    disableInAppInstallPrompt()\n  })\n}\n\nfunction disableInAppInstallPrompt() {\n  installPrompt = null\n  installButton.setAttribute(\"hidden\", \"\")\n}\n", "/*\nTurbo 7.3.0\nCopyright \u00A9 2023 37signals LLC\n */\n(function () {\n    if (window.Reflect === undefined ||\n        window.customElements === undefined ||\n        window.customElements.polyfillWrapFlushCallback) {\n        return;\n    }\n    const BuiltInHTMLElement = HTMLElement;\n    const wrapperForTheName = {\n        HTMLElement: function HTMLElement() {\n            return Reflect.construct(BuiltInHTMLElement, [], this.constructor);\n        },\n    };\n    window.HTMLElement = wrapperForTheName[\"HTMLElement\"];\n    HTMLElement.prototype = BuiltInHTMLElement.prototype;\n    HTMLElement.prototype.constructor = HTMLElement;\n    Object.setPrototypeOf(HTMLElement, BuiltInHTMLElement);\n})();\n\n/**\n * The MIT License (MIT)\n * \n * Copyright (c) 2019 Javan Makhmali\n * \n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n * \n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n(function(prototype) {\n  if (typeof prototype.requestSubmit == \"function\") return\n\n  prototype.requestSubmit = function(submitter) {\n    if (submitter) {\n      validateSubmitter(submitter, this);\n      submitter.click();\n    } else {\n      submitter = document.createElement(\"input\");\n      submitter.type = \"submit\";\n      submitter.hidden = true;\n      this.appendChild(submitter);\n      submitter.click();\n      this.removeChild(submitter);\n    }\n  };\n\n  function validateSubmitter(submitter, form) {\n    submitter instanceof HTMLElement || raise(TypeError, \"parameter 1 is not of type 'HTMLElement'\");\n    submitter.type == \"submit\" || raise(TypeError, \"The specified element is not a submit button\");\n    submitter.form == form || raise(DOMException, \"The specified element is not owned by this form element\", \"NotFoundError\");\n  }\n\n  function raise(errorConstructor, message, name) {\n    throw new errorConstructor(\"Failed to execute 'requestSubmit' on 'HTMLFormElement': \" + message + \".\", name)\n  }\n})(HTMLFormElement.prototype);\n\nconst submittersByForm = new WeakMap();\nfunction findSubmitterFromClickTarget(target) {\n    const element = target instanceof Element ? target : target instanceof Node ? target.parentElement : null;\n    const candidate = element ? element.closest(\"input, button\") : null;\n    return (candidate === null || candidate === void 0 ? void 0 : candidate.type) == \"submit\" ? candidate : null;\n}\nfunction clickCaptured(event) {\n    const submitter = findSubmitterFromClickTarget(event.target);\n    if (submitter && submitter.form) {\n        submittersByForm.set(submitter.form, submitter);\n    }\n}\n(function () {\n    if (\"submitter\" in Event.prototype)\n        return;\n    let prototype = window.Event.prototype;\n    if (\"SubmitEvent\" in window && /Apple Computer/.test(navigator.vendor)) {\n        prototype = window.SubmitEvent.prototype;\n    }\n    else if (\"SubmitEvent\" in window) {\n        return;\n    }\n    addEventListener(\"click\", clickCaptured, true);\n    Object.defineProperty(prototype, \"submitter\", {\n        get() {\n            if (this.type == \"submit\" && this.target instanceof HTMLFormElement) {\n                return submittersByForm.get(this.target);\n            }\n        },\n    });\n})();\n\nvar FrameLoadingStyle;\n(function (FrameLoadingStyle) {\n    FrameLoadingStyle[\"eager\"] = \"eager\";\n    FrameLoadingStyle[\"lazy\"] = \"lazy\";\n})(FrameLoadingStyle || (FrameLoadingStyle = {}));\nclass FrameElement extends HTMLElement {\n    static get observedAttributes() {\n        return [\"disabled\", \"complete\", \"loading\", \"src\"];\n    }\n    constructor() {\n        super();\n        this.loaded = Promise.resolve();\n        this.delegate = new FrameElement.delegateConstructor(this);\n    }\n    connectedCallback() {\n        this.delegate.connect();\n    }\n    disconnectedCallback() {\n        this.delegate.disconnect();\n    }\n    reload() {\n        return this.delegate.sourceURLReloaded();\n    }\n    attributeChangedCallback(name) {\n        if (name == \"loading\") {\n            this.delegate.loadingStyleChanged();\n        }\n        else if (name == \"complete\") {\n            this.delegate.completeChanged();\n        }\n        else if (name == \"src\") {\n            this.delegate.sourceURLChanged();\n        }\n        else {\n            this.delegate.disabledChanged();\n        }\n    }\n    get src() {\n        return this.getAttribute(\"src\");\n    }\n    set src(value) {\n        if (value) {\n            this.setAttribute(\"src\", value);\n        }\n        else {\n            this.removeAttribute(\"src\");\n        }\n    }\n    get loading() {\n        return frameLoadingStyleFromString(this.getAttribute(\"loading\") || \"\");\n    }\n    set loading(value) {\n        if (value) {\n            this.setAttribute(\"loading\", value);\n        }\n        else {\n            this.removeAttribute(\"loading\");\n        }\n    }\n    get disabled() {\n        return this.hasAttribute(\"disabled\");\n    }\n    set disabled(value) {\n        if (value) {\n            this.setAttribute(\"disabled\", \"\");\n        }\n        else {\n            this.removeAttribute(\"disabled\");\n        }\n    }\n    get autoscroll() {\n        return this.hasAttribute(\"autoscroll\");\n    }\n    set autoscroll(value) {\n        if (value) {\n            this.setAttribute(\"autoscroll\", \"\");\n        }\n        else {\n            this.removeAttribute(\"autoscroll\");\n        }\n    }\n    get complete() {\n        return !this.delegate.isLoading;\n    }\n    get isActive() {\n        return this.ownerDocument === document && !this.isPreview;\n    }\n    get isPreview() {\n        var _a, _b;\n        return (_b = (_a = this.ownerDocument) === null || _a === void 0 ? void 0 : _a.documentElement) === null || _b === void 0 ? void 0 : _b.hasAttribute(\"data-turbo-preview\");\n    }\n}\nfunction frameLoadingStyleFromString(style) {\n    switch (style.toLowerCase()) {\n        case \"lazy\":\n            return FrameLoadingStyle.lazy;\n        default:\n            return FrameLoadingStyle.eager;\n    }\n}\n\nfunction expandURL(locatable) {\n    return new URL(locatable.toString(), document.baseURI);\n}\nfunction getAnchor(url) {\n    let anchorMatch;\n    if (url.hash) {\n        return url.hash.slice(1);\n    }\n    else if ((anchorMatch = url.href.match(/#(.*)$/))) {\n        return anchorMatch[1];\n    }\n}\nfunction getAction(form, submitter) {\n    const action = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"formaction\")) || form.getAttribute(\"action\") || form.action;\n    return expandURL(action);\n}\nfunction getExtension(url) {\n    return (getLastPathComponent(url).match(/\\.[^.]*$/) || [])[0] || \"\";\n}\nfunction isHTML(url) {\n    return !!getExtension(url).match(/^(?:|\\.(?:htm|html|xhtml|php))$/);\n}\nfunction isPrefixedBy(baseURL, url) {\n    const prefix = getPrefix(url);\n    return baseURL.href === expandURL(prefix).href || baseURL.href.startsWith(prefix);\n}\nfunction locationIsVisitable(location, rootLocation) {\n    return isPrefixedBy(location, rootLocation) && isHTML(location);\n}\nfunction getRequestURL(url) {\n    const anchor = getAnchor(url);\n    return anchor != null ? url.href.slice(0, -(anchor.length + 1)) : url.href;\n}\nfunction toCacheKey(url) {\n    return getRequestURL(url);\n}\nfunction urlsAreEqual(left, right) {\n    return expandURL(left).href == expandURL(right).href;\n}\nfunction getPathComponents(url) {\n    return url.pathname.split(\"/\").slice(1);\n}\nfunction getLastPathComponent(url) {\n    return getPathComponents(url).slice(-1)[0];\n}\nfunction getPrefix(url) {\n    return addTrailingSlash(url.origin + url.pathname);\n}\nfunction addTrailingSlash(value) {\n    return value.endsWith(\"/\") ? value : value + \"/\";\n}\n\nclass FetchResponse {\n    constructor(response) {\n        this.response = response;\n    }\n    get succeeded() {\n        return this.response.ok;\n    }\n    get failed() {\n        return !this.succeeded;\n    }\n    get clientError() {\n        return this.statusCode >= 400 && this.statusCode <= 499;\n    }\n    get serverError() {\n        return this.statusCode >= 500 && this.statusCode <= 599;\n    }\n    get redirected() {\n        return this.response.redirected;\n    }\n    get location() {\n        return expandURL(this.response.url);\n    }\n    get isHTML() {\n        return this.contentType && this.contentType.match(/^(?:text\\/([^\\s;,]+\\b)?html|application\\/xhtml\\+xml)\\b/);\n    }\n    get statusCode() {\n        return this.response.status;\n    }\n    get contentType() {\n        return this.header(\"Content-Type\");\n    }\n    get responseText() {\n        return this.response.clone().text();\n    }\n    get responseHTML() {\n        if (this.isHTML) {\n            return this.response.clone().text();\n        }\n        else {\n            return Promise.resolve(undefined);\n        }\n    }\n    header(name) {\n        return this.response.headers.get(name);\n    }\n}\n\nfunction activateScriptElement(element) {\n    if (element.getAttribute(\"data-turbo-eval\") == \"false\") {\n        return element;\n    }\n    else {\n        const createdScriptElement = document.createElement(\"script\");\n        const cspNonce = getMetaContent(\"csp-nonce\");\n        if (cspNonce) {\n            createdScriptElement.nonce = cspNonce;\n        }\n        createdScriptElement.textContent = element.textContent;\n        createdScriptElement.async = false;\n        copyElementAttributes(createdScriptElement, element);\n        return createdScriptElement;\n    }\n}\nfunction copyElementAttributes(destinationElement, sourceElement) {\n    for (const { name, value } of sourceElement.attributes) {\n        destinationElement.setAttribute(name, value);\n    }\n}\nfunction createDocumentFragment(html) {\n    const template = document.createElement(\"template\");\n    template.innerHTML = html;\n    return template.content;\n}\nfunction dispatch(eventName, { target, cancelable, detail } = {}) {\n    const event = new CustomEvent(eventName, {\n        cancelable,\n        bubbles: true,\n        composed: true,\n        detail,\n    });\n    if (target && target.isConnected) {\n        target.dispatchEvent(event);\n    }\n    else {\n        document.documentElement.dispatchEvent(event);\n    }\n    return event;\n}\nfunction nextAnimationFrame() {\n    return new Promise((resolve) => requestAnimationFrame(() => resolve()));\n}\nfunction nextEventLoopTick() {\n    return new Promise((resolve) => setTimeout(() => resolve(), 0));\n}\nfunction nextMicrotask() {\n    return Promise.resolve();\n}\nfunction parseHTMLDocument(html = \"\") {\n    return new DOMParser().parseFromString(html, \"text/html\");\n}\nfunction unindent(strings, ...values) {\n    const lines = interpolate(strings, values).replace(/^\\n/, \"\").split(\"\\n\");\n    const match = lines[0].match(/^\\s+/);\n    const indent = match ? match[0].length : 0;\n    return lines.map((line) => line.slice(indent)).join(\"\\n\");\n}\nfunction interpolate(strings, values) {\n    return strings.reduce((result, string, i) => {\n        const value = values[i] == undefined ? \"\" : values[i];\n        return result + string + value;\n    }, \"\");\n}\nfunction uuid() {\n    return Array.from({ length: 36 })\n        .map((_, i) => {\n        if (i == 8 || i == 13 || i == 18 || i == 23) {\n            return \"-\";\n        }\n        else if (i == 14) {\n            return \"4\";\n        }\n        else if (i == 19) {\n            return (Math.floor(Math.random() * 4) + 8).toString(16);\n        }\n        else {\n            return Math.floor(Math.random() * 15).toString(16);\n        }\n    })\n        .join(\"\");\n}\nfunction getAttribute(attributeName, ...elements) {\n    for (const value of elements.map((element) => element === null || element === void 0 ? void 0 : element.getAttribute(attributeName))) {\n        if (typeof value == \"string\")\n            return value;\n    }\n    return null;\n}\nfunction hasAttribute(attributeName, ...elements) {\n    return elements.some((element) => element && element.hasAttribute(attributeName));\n}\nfunction markAsBusy(...elements) {\n    for (const element of elements) {\n        if (element.localName == \"turbo-frame\") {\n            element.setAttribute(\"busy\", \"\");\n        }\n        element.setAttribute(\"aria-busy\", \"true\");\n    }\n}\nfunction clearBusyState(...elements) {\n    for (const element of elements) {\n        if (element.localName == \"turbo-frame\") {\n            element.removeAttribute(\"busy\");\n        }\n        element.removeAttribute(\"aria-busy\");\n    }\n}\nfunction waitForLoad(element, timeoutInMilliseconds = 2000) {\n    return new Promise((resolve) => {\n        const onComplete = () => {\n            element.removeEventListener(\"error\", onComplete);\n            element.removeEventListener(\"load\", onComplete);\n            resolve();\n        };\n        element.addEventListener(\"load\", onComplete, { once: true });\n        element.addEventListener(\"error\", onComplete, { once: true });\n        setTimeout(resolve, timeoutInMilliseconds);\n    });\n}\nfunction getHistoryMethodForAction(action) {\n    switch (action) {\n        case \"replace\":\n            return history.replaceState;\n        case \"advance\":\n        case \"restore\":\n            return history.pushState;\n    }\n}\nfunction isAction(action) {\n    return action == \"advance\" || action == \"replace\" || action == \"restore\";\n}\nfunction getVisitAction(...elements) {\n    const action = getAttribute(\"data-turbo-action\", ...elements);\n    return isAction(action) ? action : null;\n}\nfunction getMetaElement(name) {\n    return document.querySelector(`meta[name=\"${name}\"]`);\n}\nfunction getMetaContent(name) {\n    const element = getMetaElement(name);\n    return element && element.content;\n}\nfunction setMetaContent(name, content) {\n    let element = getMetaElement(name);\n    if (!element) {\n        element = document.createElement(\"meta\");\n        element.setAttribute(\"name\", name);\n        document.head.appendChild(element);\n    }\n    element.setAttribute(\"content\", content);\n    return element;\n}\nfunction findClosestRecursively(element, selector) {\n    var _a;\n    if (element instanceof Element) {\n        return (element.closest(selector) ||\n            findClosestRecursively(element.assignedSlot || ((_a = element.getRootNode()) === null || _a === void 0 ? void 0 : _a.host), selector));\n    }\n}\n\nvar FetchMethod;\n(function (FetchMethod) {\n    FetchMethod[FetchMethod[\"get\"] = 0] = \"get\";\n    FetchMethod[FetchMethod[\"post\"] = 1] = \"post\";\n    FetchMethod[FetchMethod[\"put\"] = 2] = \"put\";\n    FetchMethod[FetchMethod[\"patch\"] = 3] = \"patch\";\n    FetchMethod[FetchMethod[\"delete\"] = 4] = \"delete\";\n})(FetchMethod || (FetchMethod = {}));\nfunction fetchMethodFromString(method) {\n    switch (method.toLowerCase()) {\n        case \"get\":\n            return FetchMethod.get;\n        case \"post\":\n            return FetchMethod.post;\n        case \"put\":\n            return FetchMethod.put;\n        case \"patch\":\n            return FetchMethod.patch;\n        case \"delete\":\n            return FetchMethod.delete;\n    }\n}\nclass FetchRequest {\n    constructor(delegate, method, location, body = new URLSearchParams(), target = null) {\n        this.abortController = new AbortController();\n        this.resolveRequestPromise = (_value) => { };\n        this.delegate = delegate;\n        this.method = method;\n        this.headers = this.defaultHeaders;\n        this.body = body;\n        this.url = location;\n        this.target = target;\n    }\n    get location() {\n        return this.url;\n    }\n    get params() {\n        return this.url.searchParams;\n    }\n    get entries() {\n        return this.body ? Array.from(this.body.entries()) : [];\n    }\n    cancel() {\n        this.abortController.abort();\n    }\n    async perform() {\n        const { fetchOptions } = this;\n        this.delegate.prepareRequest(this);\n        await this.allowRequestToBeIntercepted(fetchOptions);\n        try {\n            this.delegate.requestStarted(this);\n            const response = await fetch(this.url.href, fetchOptions);\n            return await this.receive(response);\n        }\n        catch (error) {\n            if (error.name !== \"AbortError\") {\n                if (this.willDelegateErrorHandling(error)) {\n                    this.delegate.requestErrored(this, error);\n                }\n                throw error;\n            }\n        }\n        finally {\n            this.delegate.requestFinished(this);\n        }\n    }\n    async receive(response) {\n        const fetchResponse = new FetchResponse(response);\n        const event = dispatch(\"turbo:before-fetch-response\", {\n            cancelable: true,\n            detail: { fetchResponse },\n            target: this.target,\n        });\n        if (event.defaultPrevented) {\n            this.delegate.requestPreventedHandlingResponse(this, fetchResponse);\n        }\n        else if (fetchResponse.succeeded) {\n            this.delegate.requestSucceededWithResponse(this, fetchResponse);\n        }\n        else {\n            this.delegate.requestFailedWithResponse(this, fetchResponse);\n        }\n        return fetchResponse;\n    }\n    get fetchOptions() {\n        var _a;\n        return {\n            method: FetchMethod[this.method].toUpperCase(),\n            credentials: \"same-origin\",\n            headers: this.headers,\n            redirect: \"follow\",\n            body: this.isSafe ? null : this.body,\n            signal: this.abortSignal,\n            referrer: (_a = this.delegate.referrer) === null || _a === void 0 ? void 0 : _a.href,\n        };\n    }\n    get defaultHeaders() {\n        return {\n            Accept: \"text/html, application/xhtml+xml\",\n        };\n    }\n    get isSafe() {\n        return this.method === FetchMethod.get;\n    }\n    get abortSignal() {\n        return this.abortController.signal;\n    }\n    acceptResponseType(mimeType) {\n        this.headers[\"Accept\"] = [mimeType, this.headers[\"Accept\"]].join(\", \");\n    }\n    async allowRequestToBeIntercepted(fetchOptions) {\n        const requestInterception = new Promise((resolve) => (this.resolveRequestPromise = resolve));\n        const event = dispatch(\"turbo:before-fetch-request\", {\n            cancelable: true,\n            detail: {\n                fetchOptions,\n                url: this.url,\n                resume: this.resolveRequestPromise,\n            },\n            target: this.target,\n        });\n        if (event.defaultPrevented)\n            await requestInterception;\n    }\n    willDelegateErrorHandling(error) {\n        const event = dispatch(\"turbo:fetch-request-error\", {\n            target: this.target,\n            cancelable: true,\n            detail: { request: this, error: error },\n        });\n        return !event.defaultPrevented;\n    }\n}\n\nclass AppearanceObserver {\n    constructor(delegate, element) {\n        this.started = false;\n        this.intersect = (entries) => {\n            const lastEntry = entries.slice(-1)[0];\n            if (lastEntry === null || lastEntry === void 0 ? void 0 : lastEntry.isIntersecting) {\n                this.delegate.elementAppearedInViewport(this.element);\n            }\n        };\n        this.delegate = delegate;\n        this.element = element;\n        this.intersectionObserver = new IntersectionObserver(this.intersect);\n    }\n    start() {\n        if (!this.started) {\n            this.started = true;\n            this.intersectionObserver.observe(this.element);\n        }\n    }\n    stop() {\n        if (this.started) {\n            this.started = false;\n            this.intersectionObserver.unobserve(this.element);\n        }\n    }\n}\n\nclass StreamMessage {\n    static wrap(message) {\n        if (typeof message == \"string\") {\n            return new this(createDocumentFragment(message));\n        }\n        else {\n            return message;\n        }\n    }\n    constructor(fragment) {\n        this.fragment = importStreamElements(fragment);\n    }\n}\nStreamMessage.contentType = \"text/vnd.turbo-stream.html\";\nfunction importStreamElements(fragment) {\n    for (const element of fragment.querySelectorAll(\"turbo-stream\")) {\n        const streamElement = document.importNode(element, true);\n        for (const inertScriptElement of streamElement.templateElement.content.querySelectorAll(\"script\")) {\n            inertScriptElement.replaceWith(activateScriptElement(inertScriptElement));\n        }\n        element.replaceWith(streamElement);\n    }\n    return fragment;\n}\n\nvar FormSubmissionState;\n(function (FormSubmissionState) {\n    FormSubmissionState[FormSubmissionState[\"initialized\"] = 0] = \"initialized\";\n    FormSubmissionState[FormSubmissionState[\"requesting\"] = 1] = \"requesting\";\n    FormSubmissionState[FormSubmissionState[\"waiting\"] = 2] = \"waiting\";\n    FormSubmissionState[FormSubmissionState[\"receiving\"] = 3] = \"receiving\";\n    FormSubmissionState[FormSubmissionState[\"stopping\"] = 4] = \"stopping\";\n    FormSubmissionState[FormSubmissionState[\"stopped\"] = 5] = \"stopped\";\n})(FormSubmissionState || (FormSubmissionState = {}));\nvar FormEnctype;\n(function (FormEnctype) {\n    FormEnctype[\"urlEncoded\"] = \"application/x-www-form-urlencoded\";\n    FormEnctype[\"multipart\"] = \"multipart/form-data\";\n    FormEnctype[\"plain\"] = \"text/plain\";\n})(FormEnctype || (FormEnctype = {}));\nfunction formEnctypeFromString(encoding) {\n    switch (encoding.toLowerCase()) {\n        case FormEnctype.multipart:\n            return FormEnctype.multipart;\n        case FormEnctype.plain:\n            return FormEnctype.plain;\n        default:\n            return FormEnctype.urlEncoded;\n    }\n}\nclass FormSubmission {\n    static confirmMethod(message, _element, _submitter) {\n        return Promise.resolve(confirm(message));\n    }\n    constructor(delegate, formElement, submitter, mustRedirect = false) {\n        this.state = FormSubmissionState.initialized;\n        this.delegate = delegate;\n        this.formElement = formElement;\n        this.submitter = submitter;\n        this.formData = buildFormData(formElement, submitter);\n        this.location = expandURL(this.action);\n        if (this.method == FetchMethod.get) {\n            mergeFormDataEntries(this.location, [...this.body.entries()]);\n        }\n        this.fetchRequest = new FetchRequest(this, this.method, this.location, this.body, this.formElement);\n        this.mustRedirect = mustRedirect;\n    }\n    get method() {\n        var _a;\n        const method = ((_a = this.submitter) === null || _a === void 0 ? void 0 : _a.getAttribute(\"formmethod\")) || this.formElement.getAttribute(\"method\") || \"\";\n        return fetchMethodFromString(method.toLowerCase()) || FetchMethod.get;\n    }\n    get action() {\n        var _a;\n        const formElementAction = typeof this.formElement.action === \"string\" ? this.formElement.action : null;\n        if ((_a = this.submitter) === null || _a === void 0 ? void 0 : _a.hasAttribute(\"formaction\")) {\n            return this.submitter.getAttribute(\"formaction\") || \"\";\n        }\n        else {\n            return this.formElement.getAttribute(\"action\") || formElementAction || \"\";\n        }\n    }\n    get body() {\n        if (this.enctype == FormEnctype.urlEncoded || this.method == FetchMethod.get) {\n            return new URLSearchParams(this.stringFormData);\n        }\n        else {\n            return this.formData;\n        }\n    }\n    get enctype() {\n        var _a;\n        return formEnctypeFromString(((_a = this.submitter) === null || _a === void 0 ? void 0 : _a.getAttribute(\"formenctype\")) || this.formElement.enctype);\n    }\n    get isSafe() {\n        return this.fetchRequest.isSafe;\n    }\n    get stringFormData() {\n        return [...this.formData].reduce((entries, [name, value]) => {\n            return entries.concat(typeof value == \"string\" ? [[name, value]] : []);\n        }, []);\n    }\n    async start() {\n        const { initialized, requesting } = FormSubmissionState;\n        const confirmationMessage = getAttribute(\"data-turbo-confirm\", this.submitter, this.formElement);\n        if (typeof confirmationMessage === \"string\") {\n            const answer = await FormSubmission.confirmMethod(confirmationMessage, this.formElement, this.submitter);\n            if (!answer) {\n                return;\n            }\n        }\n        if (this.state == initialized) {\n            this.state = requesting;\n            return this.fetchRequest.perform();\n        }\n    }\n    stop() {\n        const { stopping, stopped } = FormSubmissionState;\n        if (this.state != stopping && this.state != stopped) {\n            this.state = stopping;\n            this.fetchRequest.cancel();\n            return true;\n        }\n    }\n    prepareRequest(request) {\n        if (!request.isSafe) {\n            const token = getCookieValue(getMetaContent(\"csrf-param\")) || getMetaContent(\"csrf-token\");\n            if (token) {\n                request.headers[\"X-CSRF-Token\"] = token;\n            }\n        }\n        if (this.requestAcceptsTurboStreamResponse(request)) {\n            request.acceptResponseType(StreamMessage.contentType);\n        }\n    }\n    requestStarted(_request) {\n        var _a;\n        this.state = FormSubmissionState.waiting;\n        (_a = this.submitter) === null || _a === void 0 ? void 0 : _a.setAttribute(\"disabled\", \"\");\n        this.setSubmitsWith();\n        dispatch(\"turbo:submit-start\", {\n            target: this.formElement,\n            detail: { formSubmission: this },\n        });\n        this.delegate.formSubmissionStarted(this);\n    }\n    requestPreventedHandlingResponse(request, response) {\n        this.result = { success: response.succeeded, fetchResponse: response };\n    }\n    requestSucceededWithResponse(request, response) {\n        if (response.clientError || response.serverError) {\n            this.delegate.formSubmissionFailedWithResponse(this, response);\n        }\n        else if (this.requestMustRedirect(request) && responseSucceededWithoutRedirect(response)) {\n            const error = new Error(\"Form responses must redirect to another location\");\n            this.delegate.formSubmissionErrored(this, error);\n        }\n        else {\n            this.state = FormSubmissionState.receiving;\n            this.result = { success: true, fetchResponse: response };\n            this.delegate.formSubmissionSucceededWithResponse(this, response);\n        }\n    }\n    requestFailedWithResponse(request, response) {\n        this.result = { success: false, fetchResponse: response };\n        this.delegate.formSubmissionFailedWithResponse(this, response);\n    }\n    requestErrored(request, error) {\n        this.result = { success: false, error };\n        this.delegate.formSubmissionErrored(this, error);\n    }\n    requestFinished(_request) {\n        var _a;\n        this.state = FormSubmissionState.stopped;\n        (_a = this.submitter) === null || _a === void 0 ? void 0 : _a.removeAttribute(\"disabled\");\n        this.resetSubmitterText();\n        dispatch(\"turbo:submit-end\", {\n            target: this.formElement,\n            detail: Object.assign({ formSubmission: this }, this.result),\n        });\n        this.delegate.formSubmissionFinished(this);\n    }\n    setSubmitsWith() {\n        if (!this.submitter || !this.submitsWith)\n            return;\n        if (this.submitter.matches(\"button\")) {\n            this.originalSubmitText = this.submitter.innerHTML;\n            this.submitter.innerHTML = this.submitsWith;\n        }\n        else if (this.submitter.matches(\"input\")) {\n            const input = this.submitter;\n            this.originalSubmitText = input.value;\n            input.value = this.submitsWith;\n        }\n    }\n    resetSubmitterText() {\n        if (!this.submitter || !this.originalSubmitText)\n            return;\n        if (this.submitter.matches(\"button\")) {\n            this.submitter.innerHTML = this.originalSubmitText;\n        }\n        else if (this.submitter.matches(\"input\")) {\n            const input = this.submitter;\n            input.value = this.originalSubmitText;\n        }\n    }\n    requestMustRedirect(request) {\n        return !request.isSafe && this.mustRedirect;\n    }\n    requestAcceptsTurboStreamResponse(request) {\n        return !request.isSafe || hasAttribute(\"data-turbo-stream\", this.submitter, this.formElement);\n    }\n    get submitsWith() {\n        var _a;\n        return (_a = this.submitter) === null || _a === void 0 ? void 0 : _a.getAttribute(\"data-turbo-submits-with\");\n    }\n}\nfunction buildFormData(formElement, submitter) {\n    const formData = new FormData(formElement);\n    const name = submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"name\");\n    const value = submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"value\");\n    if (name) {\n        formData.append(name, value || \"\");\n    }\n    return formData;\n}\nfunction getCookieValue(cookieName) {\n    if (cookieName != null) {\n        const cookies = document.cookie ? document.cookie.split(\"; \") : [];\n        const cookie = cookies.find((cookie) => cookie.startsWith(cookieName));\n        if (cookie) {\n            const value = cookie.split(\"=\").slice(1).join(\"=\");\n            return value ? decodeURIComponent(value) : undefined;\n        }\n    }\n}\nfunction responseSucceededWithoutRedirect(response) {\n    return response.statusCode == 200 && !response.redirected;\n}\nfunction mergeFormDataEntries(url, entries) {\n    const searchParams = new URLSearchParams();\n    for (const [name, value] of entries) {\n        if (value instanceof File)\n            continue;\n        searchParams.append(name, value);\n    }\n    url.search = searchParams.toString();\n    return url;\n}\n\nclass Snapshot {\n    constructor(element) {\n        this.element = element;\n    }\n    get activeElement() {\n        return this.element.ownerDocument.activeElement;\n    }\n    get children() {\n        return [...this.element.children];\n    }\n    hasAnchor(anchor) {\n        return this.getElementForAnchor(anchor) != null;\n    }\n    getElementForAnchor(anchor) {\n        return anchor ? this.element.querySelector(`[id='${anchor}'], a[name='${anchor}']`) : null;\n    }\n    get isConnected() {\n        return this.element.isConnected;\n    }\n    get firstAutofocusableElement() {\n        const inertDisabledOrHidden = \"[inert], :disabled, [hidden], details:not([open]), dialog:not([open])\";\n        for (const element of this.element.querySelectorAll(\"[autofocus]\")) {\n            if (element.closest(inertDisabledOrHidden) == null)\n                return element;\n            else\n                continue;\n        }\n        return null;\n    }\n    get permanentElements() {\n        return queryPermanentElementsAll(this.element);\n    }\n    getPermanentElementById(id) {\n        return getPermanentElementById(this.element, id);\n    }\n    getPermanentElementMapForSnapshot(snapshot) {\n        const permanentElementMap = {};\n        for (const currentPermanentElement of this.permanentElements) {\n            const { id } = currentPermanentElement;\n            const newPermanentElement = snapshot.getPermanentElementById(id);\n            if (newPermanentElement) {\n                permanentElementMap[id] = [currentPermanentElement, newPermanentElement];\n            }\n        }\n        return permanentElementMap;\n    }\n}\nfunction getPermanentElementById(node, id) {\n    return node.querySelector(`#${id}[data-turbo-permanent]`);\n}\nfunction queryPermanentElementsAll(node) {\n    return node.querySelectorAll(\"[id][data-turbo-permanent]\");\n}\n\nclass FormSubmitObserver {\n    constructor(delegate, eventTarget) {\n        this.started = false;\n        this.submitCaptured = () => {\n            this.eventTarget.removeEventListener(\"submit\", this.submitBubbled, false);\n            this.eventTarget.addEventListener(\"submit\", this.submitBubbled, false);\n        };\n        this.submitBubbled = ((event) => {\n            if (!event.defaultPrevented) {\n                const form = event.target instanceof HTMLFormElement ? event.target : undefined;\n                const submitter = event.submitter || undefined;\n                if (form &&\n                    submissionDoesNotDismissDialog(form, submitter) &&\n                    submissionDoesNotTargetIFrame(form, submitter) &&\n                    this.delegate.willSubmitForm(form, submitter)) {\n                    event.preventDefault();\n                    event.stopImmediatePropagation();\n                    this.delegate.formSubmitted(form, submitter);\n                }\n            }\n        });\n        this.delegate = delegate;\n        this.eventTarget = eventTarget;\n    }\n    start() {\n        if (!this.started) {\n            this.eventTarget.addEventListener(\"submit\", this.submitCaptured, true);\n            this.started = true;\n        }\n    }\n    stop() {\n        if (this.started) {\n            this.eventTarget.removeEventListener(\"submit\", this.submitCaptured, true);\n            this.started = false;\n        }\n    }\n}\nfunction submissionDoesNotDismissDialog(form, submitter) {\n    const method = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"formmethod\")) || form.getAttribute(\"method\");\n    return method != \"dialog\";\n}\nfunction submissionDoesNotTargetIFrame(form, submitter) {\n    if ((submitter === null || submitter === void 0 ? void 0 : submitter.hasAttribute(\"formtarget\")) || form.hasAttribute(\"target\")) {\n        const target = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"formtarget\")) || form.target;\n        for (const element of document.getElementsByName(target)) {\n            if (element instanceof HTMLIFrameElement)\n                return false;\n        }\n        return true;\n    }\n    else {\n        return true;\n    }\n}\n\nclass View {\n    constructor(delegate, element) {\n        this.resolveRenderPromise = (_value) => { };\n        this.resolveInterceptionPromise = (_value) => { };\n        this.delegate = delegate;\n        this.element = element;\n    }\n    scrollToAnchor(anchor) {\n        const element = this.snapshot.getElementForAnchor(anchor);\n        if (element) {\n            this.scrollToElement(element);\n            this.focusElement(element);\n        }\n        else {\n            this.scrollToPosition({ x: 0, y: 0 });\n        }\n    }\n    scrollToAnchorFromLocation(location) {\n        this.scrollToAnchor(getAnchor(location));\n    }\n    scrollToElement(element) {\n        element.scrollIntoView();\n    }\n    focusElement(element) {\n        if (element instanceof HTMLElement) {\n            if (element.hasAttribute(\"tabindex\")) {\n                element.focus();\n            }\n            else {\n                element.setAttribute(\"tabindex\", \"-1\");\n                element.focus();\n                element.removeAttribute(\"tabindex\");\n            }\n        }\n    }\n    scrollToPosition({ x, y }) {\n        this.scrollRoot.scrollTo(x, y);\n    }\n    scrollToTop() {\n        this.scrollToPosition({ x: 0, y: 0 });\n    }\n    get scrollRoot() {\n        return window;\n    }\n    async render(renderer) {\n        const { isPreview, shouldRender, newSnapshot: snapshot } = renderer;\n        if (shouldRender) {\n            try {\n                this.renderPromise = new Promise((resolve) => (this.resolveRenderPromise = resolve));\n                this.renderer = renderer;\n                await this.prepareToRenderSnapshot(renderer);\n                const renderInterception = new Promise((resolve) => (this.resolveInterceptionPromise = resolve));\n                const options = { resume: this.resolveInterceptionPromise, render: this.renderer.renderElement };\n                const immediateRender = this.delegate.allowsImmediateRender(snapshot, options);\n                if (!immediateRender)\n                    await renderInterception;\n                await this.renderSnapshot(renderer);\n                this.delegate.viewRenderedSnapshot(snapshot, isPreview);\n                this.delegate.preloadOnLoadLinksForView(this.element);\n                this.finishRenderingSnapshot(renderer);\n            }\n            finally {\n                delete this.renderer;\n                this.resolveRenderPromise(undefined);\n                delete this.renderPromise;\n            }\n        }\n        else {\n            this.invalidate(renderer.reloadReason);\n        }\n    }\n    invalidate(reason) {\n        this.delegate.viewInvalidated(reason);\n    }\n    async prepareToRenderSnapshot(renderer) {\n        this.markAsPreview(renderer.isPreview);\n        await renderer.prepareToRender();\n    }\n    markAsPreview(isPreview) {\n        if (isPreview) {\n            this.element.setAttribute(\"data-turbo-preview\", \"\");\n        }\n        else {\n            this.element.removeAttribute(\"data-turbo-preview\");\n        }\n    }\n    async renderSnapshot(renderer) {\n        await renderer.render();\n    }\n    finishRenderingSnapshot(renderer) {\n        renderer.finishRendering();\n    }\n}\n\nclass FrameView extends View {\n    missing() {\n        this.element.innerHTML = `<strong class=\"turbo-frame-error\">Content missing</strong>`;\n    }\n    get snapshot() {\n        return new Snapshot(this.element);\n    }\n}\n\nclass LinkInterceptor {\n    constructor(delegate, element) {\n        this.clickBubbled = (event) => {\n            if (this.respondsToEventTarget(event.target)) {\n                this.clickEvent = event;\n            }\n            else {\n                delete this.clickEvent;\n            }\n        };\n        this.linkClicked = ((event) => {\n            if (this.clickEvent && this.respondsToEventTarget(event.target) && event.target instanceof Element) {\n                if (this.delegate.shouldInterceptLinkClick(event.target, event.detail.url, event.detail.originalEvent)) {\n                    this.clickEvent.preventDefault();\n                    event.preventDefault();\n                    this.delegate.linkClickIntercepted(event.target, event.detail.url, event.detail.originalEvent);\n                }\n            }\n            delete this.clickEvent;\n        });\n        this.willVisit = ((_event) => {\n            delete this.clickEvent;\n        });\n        this.delegate = delegate;\n        this.element = element;\n    }\n    start() {\n        this.element.addEventListener(\"click\", this.clickBubbled);\n        document.addEventListener(\"turbo:click\", this.linkClicked);\n        document.addEventListener(\"turbo:before-visit\", this.willVisit);\n    }\n    stop() {\n        this.element.removeEventListener(\"click\", this.clickBubbled);\n        document.removeEventListener(\"turbo:click\", this.linkClicked);\n        document.removeEventListener(\"turbo:before-visit\", this.willVisit);\n    }\n    respondsToEventTarget(target) {\n        const element = target instanceof Element ? target : target instanceof Node ? target.parentElement : null;\n        return element && element.closest(\"turbo-frame, html\") == this.element;\n    }\n}\n\nclass LinkClickObserver {\n    constructor(delegate, eventTarget) {\n        this.started = false;\n        this.clickCaptured = () => {\n            this.eventTarget.removeEventListener(\"click\", this.clickBubbled, false);\n            this.eventTarget.addEventListener(\"click\", this.clickBubbled, false);\n        };\n        this.clickBubbled = (event) => {\n            if (event instanceof MouseEvent && this.clickEventIsSignificant(event)) {\n                const target = (event.composedPath && event.composedPath()[0]) || event.target;\n                const link = this.findLinkFromClickTarget(target);\n                if (link && doesNotTargetIFrame(link)) {\n                    const location = this.getLocationForLink(link);\n                    if (this.delegate.willFollowLinkToLocation(link, location, event)) {\n                        event.preventDefault();\n                        this.delegate.followedLinkToLocation(link, location);\n                    }\n                }\n            }\n        };\n        this.delegate = delegate;\n        this.eventTarget = eventTarget;\n    }\n    start() {\n        if (!this.started) {\n            this.eventTarget.addEventListener(\"click\", this.clickCaptured, true);\n            this.started = true;\n        }\n    }\n    stop() {\n        if (this.started) {\n            this.eventTarget.removeEventListener(\"click\", this.clickCaptured, true);\n            this.started = false;\n        }\n    }\n    clickEventIsSignificant(event) {\n        return !((event.target && event.target.isContentEditable) ||\n            event.defaultPrevented ||\n            event.which > 1 ||\n            event.altKey ||\n            event.ctrlKey ||\n            event.metaKey ||\n            event.shiftKey);\n    }\n    findLinkFromClickTarget(target) {\n        return findClosestRecursively(target, \"a[href]:not([target^=_]):not([download])\");\n    }\n    getLocationForLink(link) {\n        return expandURL(link.getAttribute(\"href\") || \"\");\n    }\n}\nfunction doesNotTargetIFrame(anchor) {\n    if (anchor.hasAttribute(\"target\")) {\n        for (const element of document.getElementsByName(anchor.target)) {\n            if (element instanceof HTMLIFrameElement)\n                return false;\n        }\n        return true;\n    }\n    else {\n        return true;\n    }\n}\n\nclass FormLinkClickObserver {\n    constructor(delegate, element) {\n        this.delegate = delegate;\n        this.linkInterceptor = new LinkClickObserver(this, element);\n    }\n    start() {\n        this.linkInterceptor.start();\n    }\n    stop() {\n        this.linkInterceptor.stop();\n    }\n    willFollowLinkToLocation(link, location, originalEvent) {\n        return (this.delegate.willSubmitFormLinkToLocation(link, location, originalEvent) &&\n            link.hasAttribute(\"data-turbo-method\"));\n    }\n    followedLinkToLocation(link, location) {\n        const form = document.createElement(\"form\");\n        const type = \"hidden\";\n        for (const [name, value] of location.searchParams) {\n            form.append(Object.assign(document.createElement(\"input\"), { type, name, value }));\n        }\n        const action = Object.assign(location, { search: \"\" });\n        form.setAttribute(\"data-turbo\", \"true\");\n        form.setAttribute(\"action\", action.href);\n        form.setAttribute(\"hidden\", \"\");\n        const method = link.getAttribute(\"data-turbo-method\");\n        if (method)\n            form.setAttribute(\"method\", method);\n        const turboFrame = link.getAttribute(\"data-turbo-frame\");\n        if (turboFrame)\n            form.setAttribute(\"data-turbo-frame\", turboFrame);\n        const turboAction = getVisitAction(link);\n        if (turboAction)\n            form.setAttribute(\"data-turbo-action\", turboAction);\n        const turboConfirm = link.getAttribute(\"data-turbo-confirm\");\n        if (turboConfirm)\n            form.setAttribute(\"data-turbo-confirm\", turboConfirm);\n        const turboStream = link.hasAttribute(\"data-turbo-stream\");\n        if (turboStream)\n            form.setAttribute(\"data-turbo-stream\", \"\");\n        this.delegate.submittedFormLinkToLocation(link, location, form);\n        document.body.appendChild(form);\n        form.addEventListener(\"turbo:submit-end\", () => form.remove(), { once: true });\n        requestAnimationFrame(() => form.requestSubmit());\n    }\n}\n\nclass Bardo {\n    static async preservingPermanentElements(delegate, permanentElementMap, callback) {\n        const bardo = new this(delegate, permanentElementMap);\n        bardo.enter();\n        await callback();\n        bardo.leave();\n    }\n    constructor(delegate, permanentElementMap) {\n        this.delegate = delegate;\n        this.permanentElementMap = permanentElementMap;\n    }\n    enter() {\n        for (const id in this.permanentElementMap) {\n            const [currentPermanentElement, newPermanentElement] = this.permanentElementMap[id];\n            this.delegate.enteringBardo(currentPermanentElement, newPermanentElement);\n            this.replaceNewPermanentElementWithPlaceholder(newPermanentElement);\n        }\n    }\n    leave() {\n        for (const id in this.permanentElementMap) {\n            const [currentPermanentElement] = this.permanentElementMap[id];\n            this.replaceCurrentPermanentElementWithClone(currentPermanentElement);\n            this.replacePlaceholderWithPermanentElement(currentPermanentElement);\n            this.delegate.leavingBardo(currentPermanentElement);\n        }\n    }\n    replaceNewPermanentElementWithPlaceholder(permanentElement) {\n        const placeholder = createPlaceholderForPermanentElement(permanentElement);\n        permanentElement.replaceWith(placeholder);\n    }\n    replaceCurrentPermanentElementWithClone(permanentElement) {\n        const clone = permanentElement.cloneNode(true);\n        permanentElement.replaceWith(clone);\n    }\n    replacePlaceholderWithPermanentElement(permanentElement) {\n        const placeholder = this.getPlaceholderById(permanentElement.id);\n        placeholder === null || placeholder === void 0 ? void 0 : placeholder.replaceWith(permanentElement);\n    }\n    getPlaceholderById(id) {\n        return this.placeholders.find((element) => element.content == id);\n    }\n    get placeholders() {\n        return [...document.querySelectorAll(\"meta[name=turbo-permanent-placeholder][content]\")];\n    }\n}\nfunction createPlaceholderForPermanentElement(permanentElement) {\n    const element = document.createElement(\"meta\");\n    element.setAttribute(\"name\", \"turbo-permanent-placeholder\");\n    element.setAttribute(\"content\", permanentElement.id);\n    return element;\n}\n\nclass Renderer {\n    constructor(currentSnapshot, newSnapshot, renderElement, isPreview, willRender = true) {\n        this.activeElement = null;\n        this.currentSnapshot = currentSnapshot;\n        this.newSnapshot = newSnapshot;\n        this.isPreview = isPreview;\n        this.willRender = willRender;\n        this.renderElement = renderElement;\n        this.promise = new Promise((resolve, reject) => (this.resolvingFunctions = { resolve, reject }));\n    }\n    get shouldRender() {\n        return true;\n    }\n    get reloadReason() {\n        return;\n    }\n    prepareToRender() {\n        return;\n    }\n    finishRendering() {\n        if (this.resolvingFunctions) {\n            this.resolvingFunctions.resolve();\n            delete this.resolvingFunctions;\n        }\n    }\n    async preservingPermanentElements(callback) {\n        await Bardo.preservingPermanentElements(this, this.permanentElementMap, callback);\n    }\n    focusFirstAutofocusableElement() {\n        const element = this.connectedSnapshot.firstAutofocusableElement;\n        if (elementIsFocusable(element)) {\n            element.focus();\n        }\n    }\n    enteringBardo(currentPermanentElement) {\n        if (this.activeElement)\n            return;\n        if (currentPermanentElement.contains(this.currentSnapshot.activeElement)) {\n            this.activeElement = this.currentSnapshot.activeElement;\n        }\n    }\n    leavingBardo(currentPermanentElement) {\n        if (currentPermanentElement.contains(this.activeElement) && this.activeElement instanceof HTMLElement) {\n            this.activeElement.focus();\n            this.activeElement = null;\n        }\n    }\n    get connectedSnapshot() {\n        return this.newSnapshot.isConnected ? this.newSnapshot : this.currentSnapshot;\n    }\n    get currentElement() {\n        return this.currentSnapshot.element;\n    }\n    get newElement() {\n        return this.newSnapshot.element;\n    }\n    get permanentElementMap() {\n        return this.currentSnapshot.getPermanentElementMapForSnapshot(this.newSnapshot);\n    }\n}\nfunction elementIsFocusable(element) {\n    return element && typeof element.focus == \"function\";\n}\n\nclass FrameRenderer extends Renderer {\n    static renderElement(currentElement, newElement) {\n        var _a;\n        const destinationRange = document.createRange();\n        destinationRange.selectNodeContents(currentElement);\n        destinationRange.deleteContents();\n        const frameElement = newElement;\n        const sourceRange = (_a = frameElement.ownerDocument) === null || _a === void 0 ? void 0 : _a.createRange();\n        if (sourceRange) {\n            sourceRange.selectNodeContents(frameElement);\n            currentElement.appendChild(sourceRange.extractContents());\n        }\n    }\n    constructor(delegate, currentSnapshot, newSnapshot, renderElement, isPreview, willRender = true) {\n        super(currentSnapshot, newSnapshot, renderElement, isPreview, willRender);\n        this.delegate = delegate;\n    }\n    get shouldRender() {\n        return true;\n    }\n    async render() {\n        await nextAnimationFrame();\n        this.preservingPermanentElements(() => {\n            this.loadFrameElement();\n        });\n        this.scrollFrameIntoView();\n        await nextAnimationFrame();\n        this.focusFirstAutofocusableElement();\n        await nextAnimationFrame();\n        this.activateScriptElements();\n    }\n    loadFrameElement() {\n        this.delegate.willRenderFrame(this.currentElement, this.newElement);\n        this.renderElement(this.currentElement, this.newElement);\n    }\n    scrollFrameIntoView() {\n        if (this.currentElement.autoscroll || this.newElement.autoscroll) {\n            const element = this.currentElement.firstElementChild;\n            const block = readScrollLogicalPosition(this.currentElement.getAttribute(\"data-autoscroll-block\"), \"end\");\n            const behavior = readScrollBehavior(this.currentElement.getAttribute(\"data-autoscroll-behavior\"), \"auto\");\n            if (element) {\n                element.scrollIntoView({ block, behavior });\n                return true;\n            }\n        }\n        return false;\n    }\n    activateScriptElements() {\n        for (const inertScriptElement of this.newScriptElements) {\n            const activatedScriptElement = activateScriptElement(inertScriptElement);\n            inertScriptElement.replaceWith(activatedScriptElement);\n        }\n    }\n    get newScriptElements() {\n        return this.currentElement.querySelectorAll(\"script\");\n    }\n}\nfunction readScrollLogicalPosition(value, defaultValue) {\n    if (value == \"end\" || value == \"start\" || value == \"center\" || value == \"nearest\") {\n        return value;\n    }\n    else {\n        return defaultValue;\n    }\n}\nfunction readScrollBehavior(value, defaultValue) {\n    if (value == \"auto\" || value == \"smooth\") {\n        return value;\n    }\n    else {\n        return defaultValue;\n    }\n}\n\nclass ProgressBar {\n    static get defaultCSS() {\n        return unindent `\n      .turbo-progress-bar {\n        position: fixed;\n        display: block;\n        top: 0;\n        left: 0;\n        height: 3px;\n        background: #0076ff;\n        z-index: 2147483647;\n        transition:\n          width ${ProgressBar.animationDuration}ms ease-out,\n          opacity ${ProgressBar.animationDuration / 2}ms ${ProgressBar.animationDuration / 2}ms ease-in;\n        transform: translate3d(0, 0, 0);\n      }\n    `;\n    }\n    constructor() {\n        this.hiding = false;\n        this.value = 0;\n        this.visible = false;\n        this.trickle = () => {\n            this.setValue(this.value + Math.random() / 100);\n        };\n        this.stylesheetElement = this.createStylesheetElement();\n        this.progressElement = this.createProgressElement();\n        this.installStylesheetElement();\n        this.setValue(0);\n    }\n    show() {\n        if (!this.visible) {\n            this.visible = true;\n            this.installProgressElement();\n            this.startTrickling();\n        }\n    }\n    hide() {\n        if (this.visible && !this.hiding) {\n            this.hiding = true;\n            this.fadeProgressElement(() => {\n                this.uninstallProgressElement();\n                this.stopTrickling();\n                this.visible = false;\n                this.hiding = false;\n            });\n        }\n    }\n    setValue(value) {\n        this.value = value;\n        this.refresh();\n    }\n    installStylesheetElement() {\n        document.head.insertBefore(this.stylesheetElement, document.head.firstChild);\n    }\n    installProgressElement() {\n        this.progressElement.style.width = \"0\";\n        this.progressElement.style.opacity = \"1\";\n        document.documentElement.insertBefore(this.progressElement, document.body);\n        this.refresh();\n    }\n    fadeProgressElement(callback) {\n        this.progressElement.style.opacity = \"0\";\n        setTimeout(callback, ProgressBar.animationDuration * 1.5);\n    }\n    uninstallProgressElement() {\n        if (this.progressElement.parentNode) {\n            document.documentElement.removeChild(this.progressElement);\n        }\n    }\n    startTrickling() {\n        if (!this.trickleInterval) {\n            this.trickleInterval = window.setInterval(this.trickle, ProgressBar.animationDuration);\n        }\n    }\n    stopTrickling() {\n        window.clearInterval(this.trickleInterval);\n        delete this.trickleInterval;\n    }\n    refresh() {\n        requestAnimationFrame(() => {\n            this.progressElement.style.width = `${10 + this.value * 90}%`;\n        });\n    }\n    createStylesheetElement() {\n        const element = document.createElement(\"style\");\n        element.type = \"text/css\";\n        element.textContent = ProgressBar.defaultCSS;\n        if (this.cspNonce) {\n            element.nonce = this.cspNonce;\n        }\n        return element;\n    }\n    createProgressElement() {\n        const element = document.createElement(\"div\");\n        element.className = \"turbo-progress-bar\";\n        return element;\n    }\n    get cspNonce() {\n        return getMetaContent(\"csp-nonce\");\n    }\n}\nProgressBar.animationDuration = 300;\n\nclass HeadSnapshot extends Snapshot {\n    constructor() {\n        super(...arguments);\n        this.detailsByOuterHTML = this.children\n            .filter((element) => !elementIsNoscript(element))\n            .map((element) => elementWithoutNonce(element))\n            .reduce((result, element) => {\n            const { outerHTML } = element;\n            const details = outerHTML in result\n                ? result[outerHTML]\n                : {\n                    type: elementType(element),\n                    tracked: elementIsTracked(element),\n                    elements: [],\n                };\n            return Object.assign(Object.assign({}, result), { [outerHTML]: Object.assign(Object.assign({}, details), { elements: [...details.elements, element] }) });\n        }, {});\n    }\n    get trackedElementSignature() {\n        return Object.keys(this.detailsByOuterHTML)\n            .filter((outerHTML) => this.detailsByOuterHTML[outerHTML].tracked)\n            .join(\"\");\n    }\n    getScriptElementsNotInSnapshot(snapshot) {\n        return this.getElementsMatchingTypeNotInSnapshot(\"script\", snapshot);\n    }\n    getStylesheetElementsNotInSnapshot(snapshot) {\n        return this.getElementsMatchingTypeNotInSnapshot(\"stylesheet\", snapshot);\n    }\n    getElementsMatchingTypeNotInSnapshot(matchedType, snapshot) {\n        return Object.keys(this.detailsByOuterHTML)\n            .filter((outerHTML) => !(outerHTML in snapshot.detailsByOuterHTML))\n            .map((outerHTML) => this.detailsByOuterHTML[outerHTML])\n            .filter(({ type }) => type == matchedType)\n            .map(({ elements: [element] }) => element);\n    }\n    get provisionalElements() {\n        return Object.keys(this.detailsByOuterHTML).reduce((result, outerHTML) => {\n            const { type, tracked, elements } = this.detailsByOuterHTML[outerHTML];\n            if (type == null && !tracked) {\n                return [...result, ...elements];\n            }\n            else if (elements.length > 1) {\n                return [...result, ...elements.slice(1)];\n            }\n            else {\n                return result;\n            }\n        }, []);\n    }\n    getMetaValue(name) {\n        const element = this.findMetaElementByName(name);\n        return element ? element.getAttribute(\"content\") : null;\n    }\n    findMetaElementByName(name) {\n        return Object.keys(this.detailsByOuterHTML).reduce((result, outerHTML) => {\n            const { elements: [element], } = this.detailsByOuterHTML[outerHTML];\n            return elementIsMetaElementWithName(element, name) ? element : result;\n        }, undefined);\n    }\n}\nfunction elementType(element) {\n    if (elementIsScript(element)) {\n        return \"script\";\n    }\n    else if (elementIsStylesheet(element)) {\n        return \"stylesheet\";\n    }\n}\nfunction elementIsTracked(element) {\n    return element.getAttribute(\"data-turbo-track\") == \"reload\";\n}\nfunction elementIsScript(element) {\n    const tagName = element.localName;\n    return tagName == \"script\";\n}\nfunction elementIsNoscript(element) {\n    const tagName = element.localName;\n    return tagName == \"noscript\";\n}\nfunction elementIsStylesheet(element) {\n    const tagName = element.localName;\n    return tagName == \"style\" || (tagName == \"link\" && element.getAttribute(\"rel\") == \"stylesheet\");\n}\nfunction elementIsMetaElementWithName(element, name) {\n    const tagName = element.localName;\n    return tagName == \"meta\" && element.getAttribute(\"name\") == name;\n}\nfunction elementWithoutNonce(element) {\n    if (element.hasAttribute(\"nonce\")) {\n        element.setAttribute(\"nonce\", \"\");\n    }\n    return element;\n}\n\nclass PageSnapshot extends Snapshot {\n    static fromHTMLString(html = \"\") {\n        return this.fromDocument(parseHTMLDocument(html));\n    }\n    static fromElement(element) {\n        return this.fromDocument(element.ownerDocument);\n    }\n    static fromDocument({ head, body }) {\n        return new this(body, new HeadSnapshot(head));\n    }\n    constructor(element, headSnapshot) {\n        super(element);\n        this.headSnapshot = headSnapshot;\n    }\n    clone() {\n        const clonedElement = this.element.cloneNode(true);\n        const selectElements = this.element.querySelectorAll(\"select\");\n        const clonedSelectElements = clonedElement.querySelectorAll(\"select\");\n        for (const [index, source] of selectElements.entries()) {\n            const clone = clonedSelectElements[index];\n            for (const option of clone.selectedOptions)\n                option.selected = false;\n            for (const option of source.selectedOptions)\n                clone.options[option.index].selected = true;\n        }\n        for (const clonedPasswordInput of clonedElement.querySelectorAll('input[type=\"password\"]')) {\n            clonedPasswordInput.value = \"\";\n        }\n        return new PageSnapshot(clonedElement, this.headSnapshot);\n    }\n    get headElement() {\n        return this.headSnapshot.element;\n    }\n    get rootLocation() {\n        var _a;\n        const root = (_a = this.getSetting(\"root\")) !== null && _a !== void 0 ? _a : \"/\";\n        return expandURL(root);\n    }\n    get cacheControlValue() {\n        return this.getSetting(\"cache-control\");\n    }\n    get isPreviewable() {\n        return this.cacheControlValue != \"no-preview\";\n    }\n    get isCacheable() {\n        return this.cacheControlValue != \"no-cache\";\n    }\n    get isVisitable() {\n        return this.getSetting(\"visit-control\") != \"reload\";\n    }\n    getSetting(name) {\n        return this.headSnapshot.getMetaValue(`turbo-${name}`);\n    }\n}\n\nvar TimingMetric;\n(function (TimingMetric) {\n    TimingMetric[\"visitStart\"] = \"visitStart\";\n    TimingMetric[\"requestStart\"] = \"requestStart\";\n    TimingMetric[\"requestEnd\"] = \"requestEnd\";\n    TimingMetric[\"visitEnd\"] = \"visitEnd\";\n})(TimingMetric || (TimingMetric = {}));\nvar VisitState;\n(function (VisitState) {\n    VisitState[\"initialized\"] = \"initialized\";\n    VisitState[\"started\"] = \"started\";\n    VisitState[\"canceled\"] = \"canceled\";\n    VisitState[\"failed\"] = \"failed\";\n    VisitState[\"completed\"] = \"completed\";\n})(VisitState || (VisitState = {}));\nconst defaultOptions = {\n    action: \"advance\",\n    historyChanged: false,\n    visitCachedSnapshot: () => { },\n    willRender: true,\n    updateHistory: true,\n    shouldCacheSnapshot: true,\n    acceptsStreamResponse: false,\n};\nvar SystemStatusCode;\n(function (SystemStatusCode) {\n    SystemStatusCode[SystemStatusCode[\"networkFailure\"] = 0] = \"networkFailure\";\n    SystemStatusCode[SystemStatusCode[\"timeoutFailure\"] = -1] = \"timeoutFailure\";\n    SystemStatusCode[SystemStatusCode[\"contentTypeMismatch\"] = -2] = \"contentTypeMismatch\";\n})(SystemStatusCode || (SystemStatusCode = {}));\nclass Visit {\n    constructor(delegate, location, restorationIdentifier, options = {}) {\n        this.identifier = uuid();\n        this.timingMetrics = {};\n        this.followedRedirect = false;\n        this.historyChanged = false;\n        this.scrolled = false;\n        this.shouldCacheSnapshot = true;\n        this.acceptsStreamResponse = false;\n        this.snapshotCached = false;\n        this.state = VisitState.initialized;\n        this.delegate = delegate;\n        this.location = location;\n        this.restorationIdentifier = restorationIdentifier || uuid();\n        const { action, historyChanged, referrer, snapshot, snapshotHTML, response, visitCachedSnapshot, willRender, updateHistory, shouldCacheSnapshot, acceptsStreamResponse, } = Object.assign(Object.assign({}, defaultOptions), options);\n        this.action = action;\n        this.historyChanged = historyChanged;\n        this.referrer = referrer;\n        this.snapshot = snapshot;\n        this.snapshotHTML = snapshotHTML;\n        this.response = response;\n        this.isSamePage = this.delegate.locationWithActionIsSamePage(this.location, this.action);\n        this.visitCachedSnapshot = visitCachedSnapshot;\n        this.willRender = willRender;\n        this.updateHistory = updateHistory;\n        this.scrolled = !willRender;\n        this.shouldCacheSnapshot = shouldCacheSnapshot;\n        this.acceptsStreamResponse = acceptsStreamResponse;\n    }\n    get adapter() {\n        return this.delegate.adapter;\n    }\n    get view() {\n        return this.delegate.view;\n    }\n    get history() {\n        return this.delegate.history;\n    }\n    get restorationData() {\n        return this.history.getRestorationDataForIdentifier(this.restorationIdentifier);\n    }\n    get silent() {\n        return this.isSamePage;\n    }\n    start() {\n        if (this.state == VisitState.initialized) {\n            this.recordTimingMetric(TimingMetric.visitStart);\n            this.state = VisitState.started;\n            this.adapter.visitStarted(this);\n            this.delegate.visitStarted(this);\n        }\n    }\n    cancel() {\n        if (this.state == VisitState.started) {\n            if (this.request) {\n                this.request.cancel();\n            }\n            this.cancelRender();\n            this.state = VisitState.canceled;\n        }\n    }\n    complete() {\n        if (this.state == VisitState.started) {\n            this.recordTimingMetric(TimingMetric.visitEnd);\n            this.state = VisitState.completed;\n            this.followRedirect();\n            if (!this.followedRedirect) {\n                this.adapter.visitCompleted(this);\n                this.delegate.visitCompleted(this);\n            }\n        }\n    }\n    fail() {\n        if (this.state == VisitState.started) {\n            this.state = VisitState.failed;\n            this.adapter.visitFailed(this);\n        }\n    }\n    changeHistory() {\n        var _a;\n        if (!this.historyChanged && this.updateHistory) {\n            const actionForHistory = this.location.href === ((_a = this.referrer) === null || _a === void 0 ? void 0 : _a.href) ? \"replace\" : this.action;\n            const method = getHistoryMethodForAction(actionForHistory);\n            this.history.update(method, this.location, this.restorationIdentifier);\n            this.historyChanged = true;\n        }\n    }\n    issueRequest() {\n        if (this.hasPreloadedResponse()) {\n            this.simulateRequest();\n        }\n        else if (this.shouldIssueRequest() && !this.request) {\n            this.request = new FetchRequest(this, FetchMethod.get, this.location);\n            this.request.perform();\n        }\n    }\n    simulateRequest() {\n        if (this.response) {\n            this.startRequest();\n            this.recordResponse();\n            this.finishRequest();\n        }\n    }\n    startRequest() {\n        this.recordTimingMetric(TimingMetric.requestStart);\n        this.adapter.visitRequestStarted(this);\n    }\n    recordResponse(response = this.response) {\n        this.response = response;\n        if (response) {\n            const { statusCode } = response;\n            if (isSuccessful(statusCode)) {\n                this.adapter.visitRequestCompleted(this);\n            }\n            else {\n                this.adapter.visitRequestFailedWithStatusCode(this, statusCode);\n            }\n        }\n    }\n    finishRequest() {\n        this.recordTimingMetric(TimingMetric.requestEnd);\n        this.adapter.visitRequestFinished(this);\n    }\n    loadResponse() {\n        if (this.response) {\n            const { statusCode, responseHTML } = this.response;\n            this.render(async () => {\n                if (this.shouldCacheSnapshot)\n                    this.cacheSnapshot();\n                if (this.view.renderPromise)\n                    await this.view.renderPromise;\n                if (isSuccessful(statusCode) && responseHTML != null) {\n                    await this.view.renderPage(PageSnapshot.fromHTMLString(responseHTML), false, this.willRender, this);\n                    this.performScroll();\n                    this.adapter.visitRendered(this);\n                    this.complete();\n                }\n                else {\n                    await this.view.renderError(PageSnapshot.fromHTMLString(responseHTML), this);\n                    this.adapter.visitRendered(this);\n                    this.fail();\n                }\n            });\n        }\n    }\n    getCachedSnapshot() {\n        const snapshot = this.view.getCachedSnapshotForLocation(this.location) || this.getPreloadedSnapshot();\n        if (snapshot && (!getAnchor(this.location) || snapshot.hasAnchor(getAnchor(this.location)))) {\n            if (this.action == \"restore\" || snapshot.isPreviewable) {\n                return snapshot;\n            }\n        }\n    }\n    getPreloadedSnapshot() {\n        if (this.snapshotHTML) {\n            return PageSnapshot.fromHTMLString(this.snapshotHTML);\n        }\n    }\n    hasCachedSnapshot() {\n        return this.getCachedSnapshot() != null;\n    }\n    loadCachedSnapshot() {\n        const snapshot = this.getCachedSnapshot();\n        if (snapshot) {\n            const isPreview = this.shouldIssueRequest();\n            this.render(async () => {\n                this.cacheSnapshot();\n                if (this.isSamePage) {\n                    this.adapter.visitRendered(this);\n                }\n                else {\n                    if (this.view.renderPromise)\n                        await this.view.renderPromise;\n                    await this.view.renderPage(snapshot, isPreview, this.willRender, this);\n                    this.performScroll();\n                    this.adapter.visitRendered(this);\n                    if (!isPreview) {\n                        this.complete();\n                    }\n                }\n            });\n        }\n    }\n    followRedirect() {\n        var _a;\n        if (this.redirectedToLocation && !this.followedRedirect && ((_a = this.response) === null || _a === void 0 ? void 0 : _a.redirected)) {\n            this.adapter.visitProposedToLocation(this.redirectedToLocation, {\n                action: \"replace\",\n                response: this.response,\n                shouldCacheSnapshot: false,\n                willRender: false,\n            });\n            this.followedRedirect = true;\n        }\n    }\n    goToSamePageAnchor() {\n        if (this.isSamePage) {\n            this.render(async () => {\n                this.cacheSnapshot();\n                this.performScroll();\n                this.changeHistory();\n                this.adapter.visitRendered(this);\n            });\n        }\n    }\n    prepareRequest(request) {\n        if (this.acceptsStreamResponse) {\n            request.acceptResponseType(StreamMessage.contentType);\n        }\n    }\n    requestStarted() {\n        this.startRequest();\n    }\n    requestPreventedHandlingResponse(_request, _response) { }\n    async requestSucceededWithResponse(request, response) {\n        const responseHTML = await response.responseHTML;\n        const { redirected, statusCode } = response;\n        if (responseHTML == undefined) {\n            this.recordResponse({\n                statusCode: SystemStatusCode.contentTypeMismatch,\n                redirected,\n            });\n        }\n        else {\n            this.redirectedToLocation = response.redirected ? response.location : undefined;\n            this.recordResponse({ statusCode: statusCode, responseHTML, redirected });\n        }\n    }\n    async requestFailedWithResponse(request, response) {\n        const responseHTML = await response.responseHTML;\n        const { redirected, statusCode } = response;\n        if (responseHTML == undefined) {\n            this.recordResponse({\n                statusCode: SystemStatusCode.contentTypeMismatch,\n                redirected,\n            });\n        }\n        else {\n            this.recordResponse({ statusCode: statusCode, responseHTML, redirected });\n        }\n    }\n    requestErrored(_request, _error) {\n        this.recordResponse({\n            statusCode: SystemStatusCode.networkFailure,\n            redirected: false,\n        });\n    }\n    requestFinished() {\n        this.finishRequest();\n    }\n    performScroll() {\n        if (!this.scrolled && !this.view.forceReloaded) {\n            if (this.action == \"restore\") {\n                this.scrollToRestoredPosition() || this.scrollToAnchor() || this.view.scrollToTop();\n            }\n            else {\n                this.scrollToAnchor() || this.view.scrollToTop();\n            }\n            if (this.isSamePage) {\n                this.delegate.visitScrolledToSamePageLocation(this.view.lastRenderedLocation, this.location);\n            }\n            this.scrolled = true;\n        }\n    }\n    scrollToRestoredPosition() {\n        const { scrollPosition } = this.restorationData;\n        if (scrollPosition) {\n            this.view.scrollToPosition(scrollPosition);\n            return true;\n        }\n    }\n    scrollToAnchor() {\n        const anchor = getAnchor(this.location);\n        if (anchor != null) {\n            this.view.scrollToAnchor(anchor);\n            return true;\n        }\n    }\n    recordTimingMetric(metric) {\n        this.timingMetrics[metric] = new Date().getTime();\n    }\n    getTimingMetrics() {\n        return Object.assign({}, this.timingMetrics);\n    }\n    getHistoryMethodForAction(action) {\n        switch (action) {\n            case \"replace\":\n                return history.replaceState;\n            case \"advance\":\n            case \"restore\":\n                return history.pushState;\n        }\n    }\n    hasPreloadedResponse() {\n        return typeof this.response == \"object\";\n    }\n    shouldIssueRequest() {\n        if (this.isSamePage) {\n            return false;\n        }\n        else if (this.action == \"restore\") {\n            return !this.hasCachedSnapshot();\n        }\n        else {\n            return this.willRender;\n        }\n    }\n    cacheSnapshot() {\n        if (!this.snapshotCached) {\n            this.view.cacheSnapshot(this.snapshot).then((snapshot) => snapshot && this.visitCachedSnapshot(snapshot));\n            this.snapshotCached = true;\n        }\n    }\n    async render(callback) {\n        this.cancelRender();\n        await new Promise((resolve) => {\n            this.frame = requestAnimationFrame(() => resolve());\n        });\n        await callback();\n        delete this.frame;\n    }\n    cancelRender() {\n        if (this.frame) {\n            cancelAnimationFrame(this.frame);\n            delete this.frame;\n        }\n    }\n}\nfunction isSuccessful(statusCode) {\n    return statusCode >= 200 && statusCode < 300;\n}\n\nclass BrowserAdapter {\n    constructor(session) {\n        this.progressBar = new ProgressBar();\n        this.showProgressBar = () => {\n            this.progressBar.show();\n        };\n        this.session = session;\n    }\n    visitProposedToLocation(location, options) {\n        this.navigator.startVisit(location, (options === null || options === void 0 ? void 0 : options.restorationIdentifier) || uuid(), options);\n    }\n    visitStarted(visit) {\n        this.location = visit.location;\n        visit.loadCachedSnapshot();\n        visit.issueRequest();\n        visit.goToSamePageAnchor();\n    }\n    visitRequestStarted(visit) {\n        this.progressBar.setValue(0);\n        if (visit.hasCachedSnapshot() || visit.action != \"restore\") {\n            this.showVisitProgressBarAfterDelay();\n        }\n        else {\n            this.showProgressBar();\n        }\n    }\n    visitRequestCompleted(visit) {\n        visit.loadResponse();\n    }\n    visitRequestFailedWithStatusCode(visit, statusCode) {\n        switch (statusCode) {\n            case SystemStatusCode.networkFailure:\n            case SystemStatusCode.timeoutFailure:\n            case SystemStatusCode.contentTypeMismatch:\n                return this.reload({\n                    reason: \"request_failed\",\n                    context: {\n                        statusCode,\n                    },\n                });\n            default:\n                return visit.loadResponse();\n        }\n    }\n    visitRequestFinished(_visit) {\n        this.progressBar.setValue(1);\n        this.hideVisitProgressBar();\n    }\n    visitCompleted(_visit) { }\n    pageInvalidated(reason) {\n        this.reload(reason);\n    }\n    visitFailed(_visit) { }\n    visitRendered(_visit) { }\n    formSubmissionStarted(_formSubmission) {\n        this.progressBar.setValue(0);\n        this.showFormProgressBarAfterDelay();\n    }\n    formSubmissionFinished(_formSubmission) {\n        this.progressBar.setValue(1);\n        this.hideFormProgressBar();\n    }\n    showVisitProgressBarAfterDelay() {\n        this.visitProgressBarTimeout = window.setTimeout(this.showProgressBar, this.session.progressBarDelay);\n    }\n    hideVisitProgressBar() {\n        this.progressBar.hide();\n        if (this.visitProgressBarTimeout != null) {\n            window.clearTimeout(this.visitProgressBarTimeout);\n            delete this.visitProgressBarTimeout;\n        }\n    }\n    showFormProgressBarAfterDelay() {\n        if (this.formProgressBarTimeout == null) {\n            this.formProgressBarTimeout = window.setTimeout(this.showProgressBar, this.session.progressBarDelay);\n        }\n    }\n    hideFormProgressBar() {\n        this.progressBar.hide();\n        if (this.formProgressBarTimeout != null) {\n            window.clearTimeout(this.formProgressBarTimeout);\n            delete this.formProgressBarTimeout;\n        }\n    }\n    reload(reason) {\n        var _a;\n        dispatch(\"turbo:reload\", { detail: reason });\n        window.location.href = ((_a = this.location) === null || _a === void 0 ? void 0 : _a.toString()) || window.location.href;\n    }\n    get navigator() {\n        return this.session.navigator;\n    }\n}\n\nclass CacheObserver {\n    constructor() {\n        this.selector = \"[data-turbo-temporary]\";\n        this.deprecatedSelector = \"[data-turbo-cache=false]\";\n        this.started = false;\n        this.removeTemporaryElements = ((_event) => {\n            for (const element of this.temporaryElements) {\n                element.remove();\n            }\n        });\n    }\n    start() {\n        if (!this.started) {\n            this.started = true;\n            addEventListener(\"turbo:before-cache\", this.removeTemporaryElements, false);\n        }\n    }\n    stop() {\n        if (this.started) {\n            this.started = false;\n            removeEventListener(\"turbo:before-cache\", this.removeTemporaryElements, false);\n        }\n    }\n    get temporaryElements() {\n        return [...document.querySelectorAll(this.selector), ...this.temporaryElementsWithDeprecation];\n    }\n    get temporaryElementsWithDeprecation() {\n        const elements = document.querySelectorAll(this.deprecatedSelector);\n        if (elements.length) {\n            console.warn(`The ${this.deprecatedSelector} selector is deprecated and will be removed in a future version. Use ${this.selector} instead.`);\n        }\n        return [...elements];\n    }\n}\n\nclass FrameRedirector {\n    constructor(session, element) {\n        this.session = session;\n        this.element = element;\n        this.linkInterceptor = new LinkInterceptor(this, element);\n        this.formSubmitObserver = new FormSubmitObserver(this, element);\n    }\n    start() {\n        this.linkInterceptor.start();\n        this.formSubmitObserver.start();\n    }\n    stop() {\n        this.linkInterceptor.stop();\n        this.formSubmitObserver.stop();\n    }\n    shouldInterceptLinkClick(element, _location, _event) {\n        return this.shouldRedirect(element);\n    }\n    linkClickIntercepted(element, url, event) {\n        const frame = this.findFrameElement(element);\n        if (frame) {\n            frame.delegate.linkClickIntercepted(element, url, event);\n        }\n    }\n    willSubmitForm(element, submitter) {\n        return (element.closest(\"turbo-frame\") == null &&\n            this.shouldSubmit(element, submitter) &&\n            this.shouldRedirect(element, submitter));\n    }\n    formSubmitted(element, submitter) {\n        const frame = this.findFrameElement(element, submitter);\n        if (frame) {\n            frame.delegate.formSubmitted(element, submitter);\n        }\n    }\n    shouldSubmit(form, submitter) {\n        var _a;\n        const action = getAction(form, submitter);\n        const meta = this.element.ownerDocument.querySelector(`meta[name=\"turbo-root\"]`);\n        const rootLocation = expandURL((_a = meta === null || meta === void 0 ? void 0 : meta.content) !== null && _a !== void 0 ? _a : \"/\");\n        return this.shouldRedirect(form, submitter) && locationIsVisitable(action, rootLocation);\n    }\n    shouldRedirect(element, submitter) {\n        const isNavigatable = element instanceof HTMLFormElement\n            ? this.session.submissionIsNavigatable(element, submitter)\n            : this.session.elementIsNavigatable(element);\n        if (isNavigatable) {\n            const frame = this.findFrameElement(element, submitter);\n            return frame ? frame != element.closest(\"turbo-frame\") : false;\n        }\n        else {\n            return false;\n        }\n    }\n    findFrameElement(element, submitter) {\n        const id = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"data-turbo-frame\")) || element.getAttribute(\"data-turbo-frame\");\n        if (id && id != \"_top\") {\n            const frame = this.element.querySelector(`#${id}:not([disabled])`);\n            if (frame instanceof FrameElement) {\n                return frame;\n            }\n        }\n    }\n}\n\nclass History {\n    constructor(delegate) {\n        this.restorationIdentifier = uuid();\n        this.restorationData = {};\n        this.started = false;\n        this.pageLoaded = false;\n        this.onPopState = (event) => {\n            if (this.shouldHandlePopState()) {\n                const { turbo } = event.state || {};\n                if (turbo) {\n                    this.location = new URL(window.location.href);\n                    const { restorationIdentifier } = turbo;\n                    this.restorationIdentifier = restorationIdentifier;\n                    this.delegate.historyPoppedToLocationWithRestorationIdentifier(this.location, restorationIdentifier);\n                }\n            }\n        };\n        this.onPageLoad = async (_event) => {\n            await nextMicrotask();\n            this.pageLoaded = true;\n        };\n        this.delegate = delegate;\n    }\n    start() {\n        if (!this.started) {\n            addEventListener(\"popstate\", this.onPopState, false);\n            addEventListener(\"load\", this.onPageLoad, false);\n            this.started = true;\n            this.replace(new URL(window.location.href));\n        }\n    }\n    stop() {\n        if (this.started) {\n            removeEventListener(\"popstate\", this.onPopState, false);\n            removeEventListener(\"load\", this.onPageLoad, false);\n            this.started = false;\n        }\n    }\n    push(location, restorationIdentifier) {\n        this.update(history.pushState, location, restorationIdentifier);\n    }\n    replace(location, restorationIdentifier) {\n        this.update(history.replaceState, location, restorationIdentifier);\n    }\n    update(method, location, restorationIdentifier = uuid()) {\n        const state = { turbo: { restorationIdentifier } };\n        method.call(history, state, \"\", location.href);\n        this.location = location;\n        this.restorationIdentifier = restorationIdentifier;\n    }\n    getRestorationDataForIdentifier(restorationIdentifier) {\n        return this.restorationData[restorationIdentifier] || {};\n    }\n    updateRestorationData(additionalData) {\n        const { restorationIdentifier } = this;\n        const restorationData = this.restorationData[restorationIdentifier];\n        this.restorationData[restorationIdentifier] = Object.assign(Object.assign({}, restorationData), additionalData);\n    }\n    assumeControlOfScrollRestoration() {\n        var _a;\n        if (!this.previousScrollRestoration) {\n            this.previousScrollRestoration = (_a = history.scrollRestoration) !== null && _a !== void 0 ? _a : \"auto\";\n            history.scrollRestoration = \"manual\";\n        }\n    }\n    relinquishControlOfScrollRestoration() {\n        if (this.previousScrollRestoration) {\n            history.scrollRestoration = this.previousScrollRestoration;\n            delete this.previousScrollRestoration;\n        }\n    }\n    shouldHandlePopState() {\n        return this.pageIsLoaded();\n    }\n    pageIsLoaded() {\n        return this.pageLoaded || document.readyState == \"complete\";\n    }\n}\n\nclass Navigator {\n    constructor(delegate) {\n        this.delegate = delegate;\n    }\n    proposeVisit(location, options = {}) {\n        if (this.delegate.allowsVisitingLocationWithAction(location, options.action)) {\n            if (locationIsVisitable(location, this.view.snapshot.rootLocation)) {\n                this.delegate.visitProposedToLocation(location, options);\n            }\n            else {\n                window.location.href = location.toString();\n            }\n        }\n    }\n    startVisit(locatable, restorationIdentifier, options = {}) {\n        this.stop();\n        this.currentVisit = new Visit(this, expandURL(locatable), restorationIdentifier, Object.assign({ referrer: this.location }, options));\n        this.currentVisit.start();\n    }\n    submitForm(form, submitter) {\n        this.stop();\n        this.formSubmission = new FormSubmission(this, form, submitter, true);\n        this.formSubmission.start();\n    }\n    stop() {\n        if (this.formSubmission) {\n            this.formSubmission.stop();\n            delete this.formSubmission;\n        }\n        if (this.currentVisit) {\n            this.currentVisit.cancel();\n            delete this.currentVisit;\n        }\n    }\n    get adapter() {\n        return this.delegate.adapter;\n    }\n    get view() {\n        return this.delegate.view;\n    }\n    get history() {\n        return this.delegate.history;\n    }\n    formSubmissionStarted(formSubmission) {\n        if (typeof this.adapter.formSubmissionStarted === \"function\") {\n            this.adapter.formSubmissionStarted(formSubmission);\n        }\n    }\n    async formSubmissionSucceededWithResponse(formSubmission, fetchResponse) {\n        if (formSubmission == this.formSubmission) {\n            const responseHTML = await fetchResponse.responseHTML;\n            if (responseHTML) {\n                const shouldCacheSnapshot = formSubmission.isSafe;\n                if (!shouldCacheSnapshot) {\n                    this.view.clearSnapshotCache();\n                }\n                const { statusCode, redirected } = fetchResponse;\n                const action = this.getActionForFormSubmission(formSubmission);\n                const visitOptions = {\n                    action,\n                    shouldCacheSnapshot,\n                    response: { statusCode, responseHTML, redirected },\n                };\n                this.proposeVisit(fetchResponse.location, visitOptions);\n            }\n        }\n    }\n    async formSubmissionFailedWithResponse(formSubmission, fetchResponse) {\n        const responseHTML = await fetchResponse.responseHTML;\n        if (responseHTML) {\n            const snapshot = PageSnapshot.fromHTMLString(responseHTML);\n            if (fetchResponse.serverError) {\n                await this.view.renderError(snapshot, this.currentVisit);\n            }\n            else {\n                await this.view.renderPage(snapshot, false, true, this.currentVisit);\n            }\n            this.view.scrollToTop();\n            this.view.clearSnapshotCache();\n        }\n    }\n    formSubmissionErrored(formSubmission, error) {\n        console.error(error);\n    }\n    formSubmissionFinished(formSubmission) {\n        if (typeof this.adapter.formSubmissionFinished === \"function\") {\n            this.adapter.formSubmissionFinished(formSubmission);\n        }\n    }\n    visitStarted(visit) {\n        this.delegate.visitStarted(visit);\n    }\n    visitCompleted(visit) {\n        this.delegate.visitCompleted(visit);\n    }\n    locationWithActionIsSamePage(location, action) {\n        const anchor = getAnchor(location);\n        const currentAnchor = getAnchor(this.view.lastRenderedLocation);\n        const isRestorationToTop = action === \"restore\" && typeof anchor === \"undefined\";\n        return (action !== \"replace\" &&\n            getRequestURL(location) === getRequestURL(this.view.lastRenderedLocation) &&\n            (isRestorationToTop || (anchor != null && anchor !== currentAnchor)));\n    }\n    visitScrolledToSamePageLocation(oldURL, newURL) {\n        this.delegate.visitScrolledToSamePageLocation(oldURL, newURL);\n    }\n    get location() {\n        return this.history.location;\n    }\n    get restorationIdentifier() {\n        return this.history.restorationIdentifier;\n    }\n    getActionForFormSubmission({ submitter, formElement }) {\n        return getVisitAction(submitter, formElement) || \"advance\";\n    }\n}\n\nvar PageStage;\n(function (PageStage) {\n    PageStage[PageStage[\"initial\"] = 0] = \"initial\";\n    PageStage[PageStage[\"loading\"] = 1] = \"loading\";\n    PageStage[PageStage[\"interactive\"] = 2] = \"interactive\";\n    PageStage[PageStage[\"complete\"] = 3] = \"complete\";\n})(PageStage || (PageStage = {}));\nclass PageObserver {\n    constructor(delegate) {\n        this.stage = PageStage.initial;\n        this.started = false;\n        this.interpretReadyState = () => {\n            const { readyState } = this;\n            if (readyState == \"interactive\") {\n                this.pageIsInteractive();\n            }\n            else if (readyState == \"complete\") {\n                this.pageIsComplete();\n            }\n        };\n        this.pageWillUnload = () => {\n            this.delegate.pageWillUnload();\n        };\n        this.delegate = delegate;\n    }\n    start() {\n        if (!this.started) {\n            if (this.stage == PageStage.initial) {\n                this.stage = PageStage.loading;\n            }\n            document.addEventListener(\"readystatechange\", this.interpretReadyState, false);\n            addEventListener(\"pagehide\", this.pageWillUnload, false);\n            this.started = true;\n        }\n    }\n    stop() {\n        if (this.started) {\n            document.removeEventListener(\"readystatechange\", this.interpretReadyState, false);\n            removeEventListener(\"pagehide\", this.pageWillUnload, false);\n            this.started = false;\n        }\n    }\n    pageIsInteractive() {\n        if (this.stage == PageStage.loading) {\n            this.stage = PageStage.interactive;\n            this.delegate.pageBecameInteractive();\n        }\n    }\n    pageIsComplete() {\n        this.pageIsInteractive();\n        if (this.stage == PageStage.interactive) {\n            this.stage = PageStage.complete;\n            this.delegate.pageLoaded();\n        }\n    }\n    get readyState() {\n        return document.readyState;\n    }\n}\n\nclass ScrollObserver {\n    constructor(delegate) {\n        this.started = false;\n        this.onScroll = () => {\n            this.updatePosition({ x: window.pageXOffset, y: window.pageYOffset });\n        };\n        this.delegate = delegate;\n    }\n    start() {\n        if (!this.started) {\n            addEventListener(\"scroll\", this.onScroll, false);\n            this.onScroll();\n            this.started = true;\n        }\n    }\n    stop() {\n        if (this.started) {\n            removeEventListener(\"scroll\", this.onScroll, false);\n            this.started = false;\n        }\n    }\n    updatePosition(position) {\n        this.delegate.scrollPositionChanged(position);\n    }\n}\n\nclass StreamMessageRenderer {\n    render({ fragment }) {\n        Bardo.preservingPermanentElements(this, getPermanentElementMapForFragment(fragment), () => document.documentElement.appendChild(fragment));\n    }\n    enteringBardo(currentPermanentElement, newPermanentElement) {\n        newPermanentElement.replaceWith(currentPermanentElement.cloneNode(true));\n    }\n    leavingBardo() { }\n}\nfunction getPermanentElementMapForFragment(fragment) {\n    const permanentElementsInDocument = queryPermanentElementsAll(document.documentElement);\n    const permanentElementMap = {};\n    for (const permanentElementInDocument of permanentElementsInDocument) {\n        const { id } = permanentElementInDocument;\n        for (const streamElement of fragment.querySelectorAll(\"turbo-stream\")) {\n            const elementInStream = getPermanentElementById(streamElement.templateElement.content, id);\n            if (elementInStream) {\n                permanentElementMap[id] = [permanentElementInDocument, elementInStream];\n            }\n        }\n    }\n    return permanentElementMap;\n}\n\nclass StreamObserver {\n    constructor(delegate) {\n        this.sources = new Set();\n        this.started = false;\n        this.inspectFetchResponse = ((event) => {\n            const response = fetchResponseFromEvent(event);\n            if (response && fetchResponseIsStream(response)) {\n                event.preventDefault();\n                this.receiveMessageResponse(response);\n            }\n        });\n        this.receiveMessageEvent = (event) => {\n            if (this.started && typeof event.data == \"string\") {\n                this.receiveMessageHTML(event.data);\n            }\n        };\n        this.delegate = delegate;\n    }\n    start() {\n        if (!this.started) {\n            this.started = true;\n            addEventListener(\"turbo:before-fetch-response\", this.inspectFetchResponse, false);\n        }\n    }\n    stop() {\n        if (this.started) {\n            this.started = false;\n            removeEventListener(\"turbo:before-fetch-response\", this.inspectFetchResponse, false);\n        }\n    }\n    connectStreamSource(source) {\n        if (!this.streamSourceIsConnected(source)) {\n            this.sources.add(source);\n            source.addEventListener(\"message\", this.receiveMessageEvent, false);\n        }\n    }\n    disconnectStreamSource(source) {\n        if (this.streamSourceIsConnected(source)) {\n            this.sources.delete(source);\n            source.removeEventListener(\"message\", this.receiveMessageEvent, false);\n        }\n    }\n    streamSourceIsConnected(source) {\n        return this.sources.has(source);\n    }\n    async receiveMessageResponse(response) {\n        const html = await response.responseHTML;\n        if (html) {\n            this.receiveMessageHTML(html);\n        }\n    }\n    receiveMessageHTML(html) {\n        this.delegate.receivedMessageFromStream(StreamMessage.wrap(html));\n    }\n}\nfunction fetchResponseFromEvent(event) {\n    var _a;\n    const fetchResponse = (_a = event.detail) === null || _a === void 0 ? void 0 : _a.fetchResponse;\n    if (fetchResponse instanceof FetchResponse) {\n        return fetchResponse;\n    }\n}\nfunction fetchResponseIsStream(response) {\n    var _a;\n    const contentType = (_a = response.contentType) !== null && _a !== void 0 ? _a : \"\";\n    return contentType.startsWith(StreamMessage.contentType);\n}\n\nclass ErrorRenderer extends Renderer {\n    static renderElement(currentElement, newElement) {\n        const { documentElement, body } = document;\n        documentElement.replaceChild(newElement, body);\n    }\n    async render() {\n        this.replaceHeadAndBody();\n        this.activateScriptElements();\n    }\n    replaceHeadAndBody() {\n        const { documentElement, head } = document;\n        documentElement.replaceChild(this.newHead, head);\n        this.renderElement(this.currentElement, this.newElement);\n    }\n    activateScriptElements() {\n        for (const replaceableElement of this.scriptElements) {\n            const parentNode = replaceableElement.parentNode;\n            if (parentNode) {\n                const element = activateScriptElement(replaceableElement);\n                parentNode.replaceChild(element, replaceableElement);\n            }\n        }\n    }\n    get newHead() {\n        return this.newSnapshot.headSnapshot.element;\n    }\n    get scriptElements() {\n        return document.documentElement.querySelectorAll(\"script\");\n    }\n}\n\nclass PageRenderer extends Renderer {\n    static renderElement(currentElement, newElement) {\n        if (document.body && newElement instanceof HTMLBodyElement) {\n            document.body.replaceWith(newElement);\n        }\n        else {\n            document.documentElement.appendChild(newElement);\n        }\n    }\n    get shouldRender() {\n        return this.newSnapshot.isVisitable && this.trackedElementsAreIdentical;\n    }\n    get reloadReason() {\n        if (!this.newSnapshot.isVisitable) {\n            return {\n                reason: \"turbo_visit_control_is_reload\",\n            };\n        }\n        if (!this.trackedElementsAreIdentical) {\n            return {\n                reason: \"tracked_element_mismatch\",\n            };\n        }\n    }\n    async prepareToRender() {\n        await this.mergeHead();\n    }\n    async render() {\n        if (this.willRender) {\n            await this.replaceBody();\n        }\n    }\n    finishRendering() {\n        super.finishRendering();\n        if (!this.isPreview) {\n            this.focusFirstAutofocusableElement();\n        }\n    }\n    get currentHeadSnapshot() {\n        return this.currentSnapshot.headSnapshot;\n    }\n    get newHeadSnapshot() {\n        return this.newSnapshot.headSnapshot;\n    }\n    get newElement() {\n        return this.newSnapshot.element;\n    }\n    async mergeHead() {\n        const mergedHeadElements = this.mergeProvisionalElements();\n        const newStylesheetElements = this.copyNewHeadStylesheetElements();\n        this.copyNewHeadScriptElements();\n        await mergedHeadElements;\n        await newStylesheetElements;\n    }\n    async replaceBody() {\n        await this.preservingPermanentElements(async () => {\n            this.activateNewBody();\n            await this.assignNewBody();\n        });\n    }\n    get trackedElementsAreIdentical() {\n        return this.currentHeadSnapshot.trackedElementSignature == this.newHeadSnapshot.trackedElementSignature;\n    }\n    async copyNewHeadStylesheetElements() {\n        const loadingElements = [];\n        for (const element of this.newHeadStylesheetElements) {\n            loadingElements.push(waitForLoad(element));\n            document.head.appendChild(element);\n        }\n        await Promise.all(loadingElements);\n    }\n    copyNewHeadScriptElements() {\n        for (const element of this.newHeadScriptElements) {\n            document.head.appendChild(activateScriptElement(element));\n        }\n    }\n    async mergeProvisionalElements() {\n        const newHeadElements = [...this.newHeadProvisionalElements];\n        for (const element of this.currentHeadProvisionalElements) {\n            if (!this.isCurrentElementInElementList(element, newHeadElements)) {\n                document.head.removeChild(element);\n            }\n        }\n        for (const element of newHeadElements) {\n            document.head.appendChild(element);\n        }\n    }\n    isCurrentElementInElementList(element, elementList) {\n        for (const [index, newElement] of elementList.entries()) {\n            if (element.tagName == \"TITLE\") {\n                if (newElement.tagName != \"TITLE\") {\n                    continue;\n                }\n                if (element.innerHTML == newElement.innerHTML) {\n                    elementList.splice(index, 1);\n                    return true;\n                }\n            }\n            if (newElement.isEqualNode(element)) {\n                elementList.splice(index, 1);\n                return true;\n            }\n        }\n        return false;\n    }\n    removeCurrentHeadProvisionalElements() {\n        for (const element of this.currentHeadProvisionalElements) {\n            document.head.removeChild(element);\n        }\n    }\n    copyNewHeadProvisionalElements() {\n        for (const element of this.newHeadProvisionalElements) {\n            document.head.appendChild(element);\n        }\n    }\n    activateNewBody() {\n        document.adoptNode(this.newElement);\n        this.activateNewBodyScriptElements();\n    }\n    activateNewBodyScriptElements() {\n        for (const inertScriptElement of this.newBodyScriptElements) {\n            const activatedScriptElement = activateScriptElement(inertScriptElement);\n            inertScriptElement.replaceWith(activatedScriptElement);\n        }\n    }\n    async assignNewBody() {\n        await this.renderElement(this.currentElement, this.newElement);\n    }\n    get newHeadStylesheetElements() {\n        return this.newHeadSnapshot.getStylesheetElementsNotInSnapshot(this.currentHeadSnapshot);\n    }\n    get newHeadScriptElements() {\n        return this.newHeadSnapshot.getScriptElementsNotInSnapshot(this.currentHeadSnapshot);\n    }\n    get currentHeadProvisionalElements() {\n        return this.currentHeadSnapshot.provisionalElements;\n    }\n    get newHeadProvisionalElements() {\n        return this.newHeadSnapshot.provisionalElements;\n    }\n    get newBodyScriptElements() {\n        return this.newElement.querySelectorAll(\"script\");\n    }\n}\n\nclass SnapshotCache {\n    constructor(size) {\n        this.keys = [];\n        this.snapshots = {};\n        this.size = size;\n    }\n    has(location) {\n        return toCacheKey(location) in this.snapshots;\n    }\n    get(location) {\n        if (this.has(location)) {\n            const snapshot = this.read(location);\n            this.touch(location);\n            return snapshot;\n        }\n    }\n    put(location, snapshot) {\n        this.write(location, snapshot);\n        this.touch(location);\n        return snapshot;\n    }\n    clear() {\n        this.snapshots = {};\n    }\n    read(location) {\n        return this.snapshots[toCacheKey(location)];\n    }\n    write(location, snapshot) {\n        this.snapshots[toCacheKey(location)] = snapshot;\n    }\n    touch(location) {\n        const key = toCacheKey(location);\n        const index = this.keys.indexOf(key);\n        if (index > -1)\n            this.keys.splice(index, 1);\n        this.keys.unshift(key);\n        this.trim();\n    }\n    trim() {\n        for (const key of this.keys.splice(this.size)) {\n            delete this.snapshots[key];\n        }\n    }\n}\n\nclass PageView extends View {\n    constructor() {\n        super(...arguments);\n        this.snapshotCache = new SnapshotCache(10);\n        this.lastRenderedLocation = new URL(location.href);\n        this.forceReloaded = false;\n    }\n    renderPage(snapshot, isPreview = false, willRender = true, visit) {\n        const renderer = new PageRenderer(this.snapshot, snapshot, PageRenderer.renderElement, isPreview, willRender);\n        if (!renderer.shouldRender) {\n            this.forceReloaded = true;\n        }\n        else {\n            visit === null || visit === void 0 ? void 0 : visit.changeHistory();\n        }\n        return this.render(renderer);\n    }\n    renderError(snapshot, visit) {\n        visit === null || visit === void 0 ? void 0 : visit.changeHistory();\n        const renderer = new ErrorRenderer(this.snapshot, snapshot, ErrorRenderer.renderElement, false);\n        return this.render(renderer);\n    }\n    clearSnapshotCache() {\n        this.snapshotCache.clear();\n    }\n    async cacheSnapshot(snapshot = this.snapshot) {\n        if (snapshot.isCacheable) {\n            this.delegate.viewWillCacheSnapshot();\n            const { lastRenderedLocation: location } = this;\n            await nextEventLoopTick();\n            const cachedSnapshot = snapshot.clone();\n            this.snapshotCache.put(location, cachedSnapshot);\n            return cachedSnapshot;\n        }\n    }\n    getCachedSnapshotForLocation(location) {\n        return this.snapshotCache.get(location);\n    }\n    get snapshot() {\n        return PageSnapshot.fromElement(this.element);\n    }\n}\n\nclass Preloader {\n    constructor(delegate) {\n        this.selector = \"a[data-turbo-preload]\";\n        this.delegate = delegate;\n    }\n    get snapshotCache() {\n        return this.delegate.navigator.view.snapshotCache;\n    }\n    start() {\n        if (document.readyState === \"loading\") {\n            return document.addEventListener(\"DOMContentLoaded\", () => {\n                this.preloadOnLoadLinksForView(document.body);\n            });\n        }\n        else {\n            this.preloadOnLoadLinksForView(document.body);\n        }\n    }\n    preloadOnLoadLinksForView(element) {\n        for (const link of element.querySelectorAll(this.selector)) {\n            this.preloadURL(link);\n        }\n    }\n    async preloadURL(link) {\n        const location = new URL(link.href);\n        if (this.snapshotCache.has(location)) {\n            return;\n        }\n        try {\n            const response = await fetch(location.toString(), { headers: { \"VND.PREFETCH\": \"true\", Accept: \"text/html\" } });\n            const responseText = await response.text();\n            const snapshot = PageSnapshot.fromHTMLString(responseText);\n            this.snapshotCache.put(location, snapshot);\n        }\n        catch (_) {\n        }\n    }\n}\n\nclass Session {\n    constructor() {\n        this.navigator = new Navigator(this);\n        this.history = new History(this);\n        this.preloader = new Preloader(this);\n        this.view = new PageView(this, document.documentElement);\n        this.adapter = new BrowserAdapter(this);\n        this.pageObserver = new PageObserver(this);\n        this.cacheObserver = new CacheObserver();\n        this.linkClickObserver = new LinkClickObserver(this, window);\n        this.formSubmitObserver = new FormSubmitObserver(this, document);\n        this.scrollObserver = new ScrollObserver(this);\n        this.streamObserver = new StreamObserver(this);\n        this.formLinkClickObserver = new FormLinkClickObserver(this, document.documentElement);\n        this.frameRedirector = new FrameRedirector(this, document.documentElement);\n        this.streamMessageRenderer = new StreamMessageRenderer();\n        this.drive = true;\n        this.enabled = true;\n        this.progressBarDelay = 500;\n        this.started = false;\n        this.formMode = \"on\";\n    }\n    start() {\n        if (!this.started) {\n            this.pageObserver.start();\n            this.cacheObserver.start();\n            this.formLinkClickObserver.start();\n            this.linkClickObserver.start();\n            this.formSubmitObserver.start();\n            this.scrollObserver.start();\n            this.streamObserver.start();\n            this.frameRedirector.start();\n            this.history.start();\n            this.preloader.start();\n            this.started = true;\n            this.enabled = true;\n        }\n    }\n    disable() {\n        this.enabled = false;\n    }\n    stop() {\n        if (this.started) {\n            this.pageObserver.stop();\n            this.cacheObserver.stop();\n            this.formLinkClickObserver.stop();\n            this.linkClickObserver.stop();\n            this.formSubmitObserver.stop();\n            this.scrollObserver.stop();\n            this.streamObserver.stop();\n            this.frameRedirector.stop();\n            this.history.stop();\n            this.started = false;\n        }\n    }\n    registerAdapter(adapter) {\n        this.adapter = adapter;\n    }\n    visit(location, options = {}) {\n        const frameElement = options.frame ? document.getElementById(options.frame) : null;\n        if (frameElement instanceof FrameElement) {\n            frameElement.src = location.toString();\n            frameElement.loaded;\n        }\n        else {\n            this.navigator.proposeVisit(expandURL(location), options);\n        }\n    }\n    connectStreamSource(source) {\n        this.streamObserver.connectStreamSource(source);\n    }\n    disconnectStreamSource(source) {\n        this.streamObserver.disconnectStreamSource(source);\n    }\n    renderStreamMessage(message) {\n        this.streamMessageRenderer.render(StreamMessage.wrap(message));\n    }\n    clearCache() {\n        this.view.clearSnapshotCache();\n    }\n    setProgressBarDelay(delay) {\n        this.progressBarDelay = delay;\n    }\n    setFormMode(mode) {\n        this.formMode = mode;\n    }\n    get location() {\n        return this.history.location;\n    }\n    get restorationIdentifier() {\n        return this.history.restorationIdentifier;\n    }\n    historyPoppedToLocationWithRestorationIdentifier(location, restorationIdentifier) {\n        if (this.enabled) {\n            this.navigator.startVisit(location, restorationIdentifier, {\n                action: \"restore\",\n                historyChanged: true,\n            });\n        }\n        else {\n            this.adapter.pageInvalidated({\n                reason: \"turbo_disabled\",\n            });\n        }\n    }\n    scrollPositionChanged(position) {\n        this.history.updateRestorationData({ scrollPosition: position });\n    }\n    willSubmitFormLinkToLocation(link, location) {\n        return this.elementIsNavigatable(link) && locationIsVisitable(location, this.snapshot.rootLocation);\n    }\n    submittedFormLinkToLocation() { }\n    willFollowLinkToLocation(link, location, event) {\n        return (this.elementIsNavigatable(link) &&\n            locationIsVisitable(location, this.snapshot.rootLocation) &&\n            this.applicationAllowsFollowingLinkToLocation(link, location, event));\n    }\n    followedLinkToLocation(link, location) {\n        const action = this.getActionForLink(link);\n        const acceptsStreamResponse = link.hasAttribute(\"data-turbo-stream\");\n        this.visit(location.href, { action, acceptsStreamResponse });\n    }\n    allowsVisitingLocationWithAction(location, action) {\n        return this.locationWithActionIsSamePage(location, action) || this.applicationAllowsVisitingLocation(location);\n    }\n    visitProposedToLocation(location, options) {\n        extendURLWithDeprecatedProperties(location);\n        this.adapter.visitProposedToLocation(location, options);\n    }\n    visitStarted(visit) {\n        if (!visit.acceptsStreamResponse) {\n            markAsBusy(document.documentElement);\n        }\n        extendURLWithDeprecatedProperties(visit.location);\n        if (!visit.silent) {\n            this.notifyApplicationAfterVisitingLocation(visit.location, visit.action);\n        }\n    }\n    visitCompleted(visit) {\n        clearBusyState(document.documentElement);\n        this.notifyApplicationAfterPageLoad(visit.getTimingMetrics());\n    }\n    locationWithActionIsSamePage(location, action) {\n        return this.navigator.locationWithActionIsSamePage(location, action);\n    }\n    visitScrolledToSamePageLocation(oldURL, newURL) {\n        this.notifyApplicationAfterVisitingSamePageLocation(oldURL, newURL);\n    }\n    willSubmitForm(form, submitter) {\n        const action = getAction(form, submitter);\n        return (this.submissionIsNavigatable(form, submitter) &&\n            locationIsVisitable(expandURL(action), this.snapshot.rootLocation));\n    }\n    formSubmitted(form, submitter) {\n        this.navigator.submitForm(form, submitter);\n    }\n    pageBecameInteractive() {\n        this.view.lastRenderedLocation = this.location;\n        this.notifyApplicationAfterPageLoad();\n    }\n    pageLoaded() {\n        this.history.assumeControlOfScrollRestoration();\n    }\n    pageWillUnload() {\n        this.history.relinquishControlOfScrollRestoration();\n    }\n    receivedMessageFromStream(message) {\n        this.renderStreamMessage(message);\n    }\n    viewWillCacheSnapshot() {\n        var _a;\n        if (!((_a = this.navigator.currentVisit) === null || _a === void 0 ? void 0 : _a.silent)) {\n            this.notifyApplicationBeforeCachingSnapshot();\n        }\n    }\n    allowsImmediateRender({ element }, options) {\n        const event = this.notifyApplicationBeforeRender(element, options);\n        const { defaultPrevented, detail: { render }, } = event;\n        if (this.view.renderer && render) {\n            this.view.renderer.renderElement = render;\n        }\n        return !defaultPrevented;\n    }\n    viewRenderedSnapshot(_snapshot, _isPreview) {\n        this.view.lastRenderedLocation = this.history.location;\n        this.notifyApplicationAfterRender();\n    }\n    preloadOnLoadLinksForView(element) {\n        this.preloader.preloadOnLoadLinksForView(element);\n    }\n    viewInvalidated(reason) {\n        this.adapter.pageInvalidated(reason);\n    }\n    frameLoaded(frame) {\n        this.notifyApplicationAfterFrameLoad(frame);\n    }\n    frameRendered(fetchResponse, frame) {\n        this.notifyApplicationAfterFrameRender(fetchResponse, frame);\n    }\n    applicationAllowsFollowingLinkToLocation(link, location, ev) {\n        const event = this.notifyApplicationAfterClickingLinkToLocation(link, location, ev);\n        return !event.defaultPrevented;\n    }\n    applicationAllowsVisitingLocation(location) {\n        const event = this.notifyApplicationBeforeVisitingLocation(location);\n        return !event.defaultPrevented;\n    }\n    notifyApplicationAfterClickingLinkToLocation(link, location, event) {\n        return dispatch(\"turbo:click\", {\n            target: link,\n            detail: { url: location.href, originalEvent: event },\n            cancelable: true,\n        });\n    }\n    notifyApplicationBeforeVisitingLocation(location) {\n        return dispatch(\"turbo:before-visit\", {\n            detail: { url: location.href },\n            cancelable: true,\n        });\n    }\n    notifyApplicationAfterVisitingLocation(location, action) {\n        return dispatch(\"turbo:visit\", { detail: { url: location.href, action } });\n    }\n    notifyApplicationBeforeCachingSnapshot() {\n        return dispatch(\"turbo:before-cache\");\n    }\n    notifyApplicationBeforeRender(newBody, options) {\n        return dispatch(\"turbo:before-render\", {\n            detail: Object.assign({ newBody }, options),\n            cancelable: true,\n        });\n    }\n    notifyApplicationAfterRender() {\n        return dispatch(\"turbo:render\");\n    }\n    notifyApplicationAfterPageLoad(timing = {}) {\n        return dispatch(\"turbo:load\", {\n            detail: { url: this.location.href, timing },\n        });\n    }\n    notifyApplicationAfterVisitingSamePageLocation(oldURL, newURL) {\n        dispatchEvent(new HashChangeEvent(\"hashchange\", {\n            oldURL: oldURL.toString(),\n            newURL: newURL.toString(),\n        }));\n    }\n    notifyApplicationAfterFrameLoad(frame) {\n        return dispatch(\"turbo:frame-load\", { target: frame });\n    }\n    notifyApplicationAfterFrameRender(fetchResponse, frame) {\n        return dispatch(\"turbo:frame-render\", {\n            detail: { fetchResponse },\n            target: frame,\n            cancelable: true,\n        });\n    }\n    submissionIsNavigatable(form, submitter) {\n        if (this.formMode == \"off\") {\n            return false;\n        }\n        else {\n            const submitterIsNavigatable = submitter ? this.elementIsNavigatable(submitter) : true;\n            if (this.formMode == \"optin\") {\n                return submitterIsNavigatable && form.closest('[data-turbo=\"true\"]') != null;\n            }\n            else {\n                return submitterIsNavigatable && this.elementIsNavigatable(form);\n            }\n        }\n    }\n    elementIsNavigatable(element) {\n        const container = findClosestRecursively(element, \"[data-turbo]\");\n        const withinFrame = findClosestRecursively(element, \"turbo-frame\");\n        if (this.drive || withinFrame) {\n            if (container) {\n                return container.getAttribute(\"data-turbo\") != \"false\";\n            }\n            else {\n                return true;\n            }\n        }\n        else {\n            if (container) {\n                return container.getAttribute(\"data-turbo\") == \"true\";\n            }\n            else {\n                return false;\n            }\n        }\n    }\n    getActionForLink(link) {\n        return getVisitAction(link) || \"advance\";\n    }\n    get snapshot() {\n        return this.view.snapshot;\n    }\n}\nfunction extendURLWithDeprecatedProperties(url) {\n    Object.defineProperties(url, deprecatedLocationPropertyDescriptors);\n}\nconst deprecatedLocationPropertyDescriptors = {\n    absoluteURL: {\n        get() {\n            return this.toString();\n        },\n    },\n};\n\nclass Cache {\n    constructor(session) {\n        this.session = session;\n    }\n    clear() {\n        this.session.clearCache();\n    }\n    resetCacheControl() {\n        this.setCacheControl(\"\");\n    }\n    exemptPageFromCache() {\n        this.setCacheControl(\"no-cache\");\n    }\n    exemptPageFromPreview() {\n        this.setCacheControl(\"no-preview\");\n    }\n    setCacheControl(value) {\n        setMetaContent(\"turbo-cache-control\", value);\n    }\n}\n\nconst StreamActions = {\n    after() {\n        this.targetElements.forEach((e) => { var _a; return (_a = e.parentElement) === null || _a === void 0 ? void 0 : _a.insertBefore(this.templateContent, e.nextSibling); });\n    },\n    append() {\n        this.removeDuplicateTargetChildren();\n        this.targetElements.forEach((e) => e.append(this.templateContent));\n    },\n    before() {\n        this.targetElements.forEach((e) => { var _a; return (_a = e.parentElement) === null || _a === void 0 ? void 0 : _a.insertBefore(this.templateContent, e); });\n    },\n    prepend() {\n        this.removeDuplicateTargetChildren();\n        this.targetElements.forEach((e) => e.prepend(this.templateContent));\n    },\n    remove() {\n        this.targetElements.forEach((e) => e.remove());\n    },\n    replace() {\n        this.targetElements.forEach((e) => e.replaceWith(this.templateContent));\n    },\n    update() {\n        this.targetElements.forEach((targetElement) => {\n            targetElement.innerHTML = \"\";\n            targetElement.append(this.templateContent);\n        });\n    },\n};\n\nconst session = new Session();\nconst cache = new Cache(session);\nconst { navigator: navigator$1 } = session;\nfunction start() {\n    session.start();\n}\nfunction registerAdapter(adapter) {\n    session.registerAdapter(adapter);\n}\nfunction visit(location, options) {\n    session.visit(location, options);\n}\nfunction connectStreamSource(source) {\n    session.connectStreamSource(source);\n}\nfunction disconnectStreamSource(source) {\n    session.disconnectStreamSource(source);\n}\nfunction renderStreamMessage(message) {\n    session.renderStreamMessage(message);\n}\nfunction clearCache() {\n    console.warn(\"Please replace `Turbo.clearCache()` with `Turbo.cache.clear()`. The top-level function is deprecated and will be removed in a future version of Turbo.`\");\n    session.clearCache();\n}\nfunction setProgressBarDelay(delay) {\n    session.setProgressBarDelay(delay);\n}\nfunction setConfirmMethod(confirmMethod) {\n    FormSubmission.confirmMethod = confirmMethod;\n}\nfunction setFormMode(mode) {\n    session.setFormMode(mode);\n}\n\nvar Turbo = /*#__PURE__*/Object.freeze({\n    __proto__: null,\n    navigator: navigator$1,\n    session: session,\n    cache: cache,\n    PageRenderer: PageRenderer,\n    PageSnapshot: PageSnapshot,\n    FrameRenderer: FrameRenderer,\n    start: start,\n    registerAdapter: registerAdapter,\n    visit: visit,\n    connectStreamSource: connectStreamSource,\n    disconnectStreamSource: disconnectStreamSource,\n    renderStreamMessage: renderStreamMessage,\n    clearCache: clearCache,\n    setProgressBarDelay: setProgressBarDelay,\n    setConfirmMethod: setConfirmMethod,\n    setFormMode: setFormMode,\n    StreamActions: StreamActions\n});\n\nclass TurboFrameMissingError extends Error {\n}\n\nclass FrameController {\n    constructor(element) {\n        this.fetchResponseLoaded = (_fetchResponse) => { };\n        this.currentFetchRequest = null;\n        this.resolveVisitPromise = () => { };\n        this.connected = false;\n        this.hasBeenLoaded = false;\n        this.ignoredAttributes = new Set();\n        this.action = null;\n        this.visitCachedSnapshot = ({ element }) => {\n            const frame = element.querySelector(\"#\" + this.element.id);\n            if (frame && this.previousFrameElement) {\n                frame.replaceChildren(...this.previousFrameElement.children);\n            }\n            delete this.previousFrameElement;\n        };\n        this.element = element;\n        this.view = new FrameView(this, this.element);\n        this.appearanceObserver = new AppearanceObserver(this, this.element);\n        this.formLinkClickObserver = new FormLinkClickObserver(this, this.element);\n        this.linkInterceptor = new LinkInterceptor(this, this.element);\n        this.restorationIdentifier = uuid();\n        this.formSubmitObserver = new FormSubmitObserver(this, this.element);\n    }\n    connect() {\n        if (!this.connected) {\n            this.connected = true;\n            if (this.loadingStyle == FrameLoadingStyle.lazy) {\n                this.appearanceObserver.start();\n            }\n            else {\n                this.loadSourceURL();\n            }\n            this.formLinkClickObserver.start();\n            this.linkInterceptor.start();\n            this.formSubmitObserver.start();\n        }\n    }\n    disconnect() {\n        if (this.connected) {\n            this.connected = false;\n            this.appearanceObserver.stop();\n            this.formLinkClickObserver.stop();\n            this.linkInterceptor.stop();\n            this.formSubmitObserver.stop();\n        }\n    }\n    disabledChanged() {\n        if (this.loadingStyle == FrameLoadingStyle.eager) {\n            this.loadSourceURL();\n        }\n    }\n    sourceURLChanged() {\n        if (this.isIgnoringChangesTo(\"src\"))\n            return;\n        if (this.element.isConnected) {\n            this.complete = false;\n        }\n        if (this.loadingStyle == FrameLoadingStyle.eager || this.hasBeenLoaded) {\n            this.loadSourceURL();\n        }\n    }\n    sourceURLReloaded() {\n        const { src } = this.element;\n        this.ignoringChangesToAttribute(\"complete\", () => {\n            this.element.removeAttribute(\"complete\");\n        });\n        this.element.src = null;\n        this.element.src = src;\n        return this.element.loaded;\n    }\n    completeChanged() {\n        if (this.isIgnoringChangesTo(\"complete\"))\n            return;\n        this.loadSourceURL();\n    }\n    loadingStyleChanged() {\n        if (this.loadingStyle == FrameLoadingStyle.lazy) {\n            this.appearanceObserver.start();\n        }\n        else {\n            this.appearanceObserver.stop();\n            this.loadSourceURL();\n        }\n    }\n    async loadSourceURL() {\n        if (this.enabled && this.isActive && !this.complete && this.sourceURL) {\n            this.element.loaded = this.visit(expandURL(this.sourceURL));\n            this.appearanceObserver.stop();\n            await this.element.loaded;\n            this.hasBeenLoaded = true;\n        }\n    }\n    async loadResponse(fetchResponse) {\n        if (fetchResponse.redirected || (fetchResponse.succeeded && fetchResponse.isHTML)) {\n            this.sourceURL = fetchResponse.response.url;\n        }\n        try {\n            const html = await fetchResponse.responseHTML;\n            if (html) {\n                const document = parseHTMLDocument(html);\n                const pageSnapshot = PageSnapshot.fromDocument(document);\n                if (pageSnapshot.isVisitable) {\n                    await this.loadFrameResponse(fetchResponse, document);\n                }\n                else {\n                    await this.handleUnvisitableFrameResponse(fetchResponse);\n                }\n            }\n        }\n        finally {\n            this.fetchResponseLoaded = () => { };\n        }\n    }\n    elementAppearedInViewport(element) {\n        this.proposeVisitIfNavigatedWithAction(element, element);\n        this.loadSourceURL();\n    }\n    willSubmitFormLinkToLocation(link) {\n        return this.shouldInterceptNavigation(link);\n    }\n    submittedFormLinkToLocation(link, _location, form) {\n        const frame = this.findFrameElement(link);\n        if (frame)\n            form.setAttribute(\"data-turbo-frame\", frame.id);\n    }\n    shouldInterceptLinkClick(element, _location, _event) {\n        return this.shouldInterceptNavigation(element);\n    }\n    linkClickIntercepted(element, location) {\n        this.navigateFrame(element, location);\n    }\n    willSubmitForm(element, submitter) {\n        return element.closest(\"turbo-frame\") == this.element && this.shouldInterceptNavigation(element, submitter);\n    }\n    formSubmitted(element, submitter) {\n        if (this.formSubmission) {\n            this.formSubmission.stop();\n        }\n        this.formSubmission = new FormSubmission(this, element, submitter);\n        const { fetchRequest } = this.formSubmission;\n        this.prepareRequest(fetchRequest);\n        this.formSubmission.start();\n    }\n    prepareRequest(request) {\n        var _a;\n        request.headers[\"Turbo-Frame\"] = this.id;\n        if ((_a = this.currentNavigationElement) === null || _a === void 0 ? void 0 : _a.hasAttribute(\"data-turbo-stream\")) {\n            request.acceptResponseType(StreamMessage.contentType);\n        }\n    }\n    requestStarted(_request) {\n        markAsBusy(this.element);\n    }\n    requestPreventedHandlingResponse(_request, _response) {\n        this.resolveVisitPromise();\n    }\n    async requestSucceededWithResponse(request, response) {\n        await this.loadResponse(response);\n        this.resolveVisitPromise();\n    }\n    async requestFailedWithResponse(request, response) {\n        await this.loadResponse(response);\n        this.resolveVisitPromise();\n    }\n    requestErrored(request, error) {\n        console.error(error);\n        this.resolveVisitPromise();\n    }\n    requestFinished(_request) {\n        clearBusyState(this.element);\n    }\n    formSubmissionStarted({ formElement }) {\n        markAsBusy(formElement, this.findFrameElement(formElement));\n    }\n    formSubmissionSucceededWithResponse(formSubmission, response) {\n        const frame = this.findFrameElement(formSubmission.formElement, formSubmission.submitter);\n        frame.delegate.proposeVisitIfNavigatedWithAction(frame, formSubmission.formElement, formSubmission.submitter);\n        frame.delegate.loadResponse(response);\n        if (!formSubmission.isSafe) {\n            session.clearCache();\n        }\n    }\n    formSubmissionFailedWithResponse(formSubmission, fetchResponse) {\n        this.element.delegate.loadResponse(fetchResponse);\n        session.clearCache();\n    }\n    formSubmissionErrored(formSubmission, error) {\n        console.error(error);\n    }\n    formSubmissionFinished({ formElement }) {\n        clearBusyState(formElement, this.findFrameElement(formElement));\n    }\n    allowsImmediateRender({ element: newFrame }, options) {\n        const event = dispatch(\"turbo:before-frame-render\", {\n            target: this.element,\n            detail: Object.assign({ newFrame }, options),\n            cancelable: true,\n        });\n        const { defaultPrevented, detail: { render }, } = event;\n        if (this.view.renderer && render) {\n            this.view.renderer.renderElement = render;\n        }\n        return !defaultPrevented;\n    }\n    viewRenderedSnapshot(_snapshot, _isPreview) { }\n    preloadOnLoadLinksForView(element) {\n        session.preloadOnLoadLinksForView(element);\n    }\n    viewInvalidated() { }\n    willRenderFrame(currentElement, _newElement) {\n        this.previousFrameElement = currentElement.cloneNode(true);\n    }\n    async loadFrameResponse(fetchResponse, document) {\n        const newFrameElement = await this.extractForeignFrameElement(document.body);\n        if (newFrameElement) {\n            const snapshot = new Snapshot(newFrameElement);\n            const renderer = new FrameRenderer(this, this.view.snapshot, snapshot, FrameRenderer.renderElement, false, false);\n            if (this.view.renderPromise)\n                await this.view.renderPromise;\n            this.changeHistory();\n            await this.view.render(renderer);\n            this.complete = true;\n            session.frameRendered(fetchResponse, this.element);\n            session.frameLoaded(this.element);\n            this.fetchResponseLoaded(fetchResponse);\n        }\n        else if (this.willHandleFrameMissingFromResponse(fetchResponse)) {\n            this.handleFrameMissingFromResponse(fetchResponse);\n        }\n    }\n    async visit(url) {\n        var _a;\n        const request = new FetchRequest(this, FetchMethod.get, url, new URLSearchParams(), this.element);\n        (_a = this.currentFetchRequest) === null || _a === void 0 ? void 0 : _a.cancel();\n        this.currentFetchRequest = request;\n        return new Promise((resolve) => {\n            this.resolveVisitPromise = () => {\n                this.resolveVisitPromise = () => { };\n                this.currentFetchRequest = null;\n                resolve();\n            };\n            request.perform();\n        });\n    }\n    navigateFrame(element, url, submitter) {\n        const frame = this.findFrameElement(element, submitter);\n        frame.delegate.proposeVisitIfNavigatedWithAction(frame, element, submitter);\n        this.withCurrentNavigationElement(element, () => {\n            frame.src = url;\n        });\n    }\n    proposeVisitIfNavigatedWithAction(frame, element, submitter) {\n        this.action = getVisitAction(submitter, element, frame);\n        if (this.action) {\n            const pageSnapshot = PageSnapshot.fromElement(frame).clone();\n            const { visitCachedSnapshot } = frame.delegate;\n            frame.delegate.fetchResponseLoaded = (fetchResponse) => {\n                if (frame.src) {\n                    const { statusCode, redirected } = fetchResponse;\n                    const responseHTML = frame.ownerDocument.documentElement.outerHTML;\n                    const response = { statusCode, redirected, responseHTML };\n                    const options = {\n                        response,\n                        visitCachedSnapshot,\n                        willRender: false,\n                        updateHistory: false,\n                        restorationIdentifier: this.restorationIdentifier,\n                        snapshot: pageSnapshot,\n                    };\n                    if (this.action)\n                        options.action = this.action;\n                    session.visit(frame.src, options);\n                }\n            };\n        }\n    }\n    changeHistory() {\n        if (this.action) {\n            const method = getHistoryMethodForAction(this.action);\n            session.history.update(method, expandURL(this.element.src || \"\"), this.restorationIdentifier);\n        }\n    }\n    async handleUnvisitableFrameResponse(fetchResponse) {\n        console.warn(`The response (${fetchResponse.statusCode}) from <turbo-frame id=\"${this.element.id}\"> is performing a full page visit due to turbo-visit-control.`);\n        await this.visitResponse(fetchResponse.response);\n    }\n    willHandleFrameMissingFromResponse(fetchResponse) {\n        this.element.setAttribute(\"complete\", \"\");\n        const response = fetchResponse.response;\n        const visit = async (url, options = {}) => {\n            if (url instanceof Response) {\n                this.visitResponse(url);\n            }\n            else {\n                session.visit(url, options);\n            }\n        };\n        const event = dispatch(\"turbo:frame-missing\", {\n            target: this.element,\n            detail: { response, visit },\n            cancelable: true,\n        });\n        return !event.defaultPrevented;\n    }\n    handleFrameMissingFromResponse(fetchResponse) {\n        this.view.missing();\n        this.throwFrameMissingError(fetchResponse);\n    }\n    throwFrameMissingError(fetchResponse) {\n        const message = `The response (${fetchResponse.statusCode}) did not contain the expected <turbo-frame id=\"${this.element.id}\"> and will be ignored. To perform a full page visit instead, set turbo-visit-control to reload.`;\n        throw new TurboFrameMissingError(message);\n    }\n    async visitResponse(response) {\n        const wrapped = new FetchResponse(response);\n        const responseHTML = await wrapped.responseHTML;\n        const { location, redirected, statusCode } = wrapped;\n        return session.visit(location, { response: { redirected, statusCode, responseHTML } });\n    }\n    findFrameElement(element, submitter) {\n        var _a;\n        const id = getAttribute(\"data-turbo-frame\", submitter, element) || this.element.getAttribute(\"target\");\n        return (_a = getFrameElementById(id)) !== null && _a !== void 0 ? _a : this.element;\n    }\n    async extractForeignFrameElement(container) {\n        let element;\n        const id = CSS.escape(this.id);\n        try {\n            element = activateElement(container.querySelector(`turbo-frame#${id}`), this.sourceURL);\n            if (element) {\n                return element;\n            }\n            element = activateElement(container.querySelector(`turbo-frame[src][recurse~=${id}]`), this.sourceURL);\n            if (element) {\n                await element.loaded;\n                return await this.extractForeignFrameElement(element);\n            }\n        }\n        catch (error) {\n            console.error(error);\n            return new FrameElement();\n        }\n        return null;\n    }\n    formActionIsVisitable(form, submitter) {\n        const action = getAction(form, submitter);\n        return locationIsVisitable(expandURL(action), this.rootLocation);\n    }\n    shouldInterceptNavigation(element, submitter) {\n        const id = getAttribute(\"data-turbo-frame\", submitter, element) || this.element.getAttribute(\"target\");\n        if (element instanceof HTMLFormElement && !this.formActionIsVisitable(element, submitter)) {\n            return false;\n        }\n        if (!this.enabled || id == \"_top\") {\n            return false;\n        }\n        if (id) {\n            const frameElement = getFrameElementById(id);\n            if (frameElement) {\n                return !frameElement.disabled;\n            }\n        }\n        if (!session.elementIsNavigatable(element)) {\n            return false;\n        }\n        if (submitter && !session.elementIsNavigatable(submitter)) {\n            return false;\n        }\n        return true;\n    }\n    get id() {\n        return this.element.id;\n    }\n    get enabled() {\n        return !this.element.disabled;\n    }\n    get sourceURL() {\n        if (this.element.src) {\n            return this.element.src;\n        }\n    }\n    set sourceURL(sourceURL) {\n        this.ignoringChangesToAttribute(\"src\", () => {\n            this.element.src = sourceURL !== null && sourceURL !== void 0 ? sourceURL : null;\n        });\n    }\n    get loadingStyle() {\n        return this.element.loading;\n    }\n    get isLoading() {\n        return this.formSubmission !== undefined || this.resolveVisitPromise() !== undefined;\n    }\n    get complete() {\n        return this.element.hasAttribute(\"complete\");\n    }\n    set complete(value) {\n        this.ignoringChangesToAttribute(\"complete\", () => {\n            if (value) {\n                this.element.setAttribute(\"complete\", \"\");\n            }\n            else {\n                this.element.removeAttribute(\"complete\");\n            }\n        });\n    }\n    get isActive() {\n        return this.element.isActive && this.connected;\n    }\n    get rootLocation() {\n        var _a;\n        const meta = this.element.ownerDocument.querySelector(`meta[name=\"turbo-root\"]`);\n        const root = (_a = meta === null || meta === void 0 ? void 0 : meta.content) !== null && _a !== void 0 ? _a : \"/\";\n        return expandURL(root);\n    }\n    isIgnoringChangesTo(attributeName) {\n        return this.ignoredAttributes.has(attributeName);\n    }\n    ignoringChangesToAttribute(attributeName, callback) {\n        this.ignoredAttributes.add(attributeName);\n        callback();\n        this.ignoredAttributes.delete(attributeName);\n    }\n    withCurrentNavigationElement(element, callback) {\n        this.currentNavigationElement = element;\n        callback();\n        delete this.currentNavigationElement;\n    }\n}\nfunction getFrameElementById(id) {\n    if (id != null) {\n        const element = document.getElementById(id);\n        if (element instanceof FrameElement) {\n            return element;\n        }\n    }\n}\nfunction activateElement(element, currentURL) {\n    if (element) {\n        const src = element.getAttribute(\"src\");\n        if (src != null && currentURL != null && urlsAreEqual(src, currentURL)) {\n            throw new Error(`Matching <turbo-frame id=\"${element.id}\"> element has a source URL which references itself`);\n        }\n        if (element.ownerDocument !== document) {\n            element = document.importNode(element, true);\n        }\n        if (element instanceof FrameElement) {\n            element.connectedCallback();\n            element.disconnectedCallback();\n            return element;\n        }\n    }\n}\n\nclass StreamElement extends HTMLElement {\n    static async renderElement(newElement) {\n        await newElement.performAction();\n    }\n    async connectedCallback() {\n        try {\n            await this.render();\n        }\n        catch (error) {\n            console.error(error);\n        }\n        finally {\n            this.disconnect();\n        }\n    }\n    async render() {\n        var _a;\n        return ((_a = this.renderPromise) !== null && _a !== void 0 ? _a : (this.renderPromise = (async () => {\n            const event = this.beforeRenderEvent;\n            if (this.dispatchEvent(event)) {\n                await nextAnimationFrame();\n                await event.detail.render(this);\n            }\n        })()));\n    }\n    disconnect() {\n        try {\n            this.remove();\n        }\n        catch (_a) { }\n    }\n    removeDuplicateTargetChildren() {\n        this.duplicateChildren.forEach((c) => c.remove());\n    }\n    get duplicateChildren() {\n        var _a;\n        const existingChildren = this.targetElements.flatMap((e) => [...e.children]).filter((c) => !!c.id);\n        const newChildrenIds = [...(((_a = this.templateContent) === null || _a === void 0 ? void 0 : _a.children) || [])].filter((c) => !!c.id).map((c) => c.id);\n        return existingChildren.filter((c) => newChildrenIds.includes(c.id));\n    }\n    get performAction() {\n        if (this.action) {\n            const actionFunction = StreamActions[this.action];\n            if (actionFunction) {\n                return actionFunction;\n            }\n            this.raise(\"unknown action\");\n        }\n        this.raise(\"action attribute is missing\");\n    }\n    get targetElements() {\n        if (this.target) {\n            return this.targetElementsById;\n        }\n        else if (this.targets) {\n            return this.targetElementsByQuery;\n        }\n        else {\n            this.raise(\"target or targets attribute is missing\");\n        }\n    }\n    get templateContent() {\n        return this.templateElement.content.cloneNode(true);\n    }\n    get templateElement() {\n        if (this.firstElementChild === null) {\n            const template = this.ownerDocument.createElement(\"template\");\n            this.appendChild(template);\n            return template;\n        }\n        else if (this.firstElementChild instanceof HTMLTemplateElement) {\n            return this.firstElementChild;\n        }\n        this.raise(\"first child element must be a <template> element\");\n    }\n    get action() {\n        return this.getAttribute(\"action\");\n    }\n    get target() {\n        return this.getAttribute(\"target\");\n    }\n    get targets() {\n        return this.getAttribute(\"targets\");\n    }\n    raise(message) {\n        throw new Error(`${this.description}: ${message}`);\n    }\n    get description() {\n        var _a, _b;\n        return (_b = ((_a = this.outerHTML.match(/<[^>]+>/)) !== null && _a !== void 0 ? _a : [])[0]) !== null && _b !== void 0 ? _b : \"<turbo-stream>\";\n    }\n    get beforeRenderEvent() {\n        return new CustomEvent(\"turbo:before-stream-render\", {\n            bubbles: true,\n            cancelable: true,\n            detail: { newStream: this, render: StreamElement.renderElement },\n        });\n    }\n    get targetElementsById() {\n        var _a;\n        const element = (_a = this.ownerDocument) === null || _a === void 0 ? void 0 : _a.getElementById(this.target);\n        if (element !== null) {\n            return [element];\n        }\n        else {\n            return [];\n        }\n    }\n    get targetElementsByQuery() {\n        var _a;\n        const elements = (_a = this.ownerDocument) === null || _a === void 0 ? void 0 : _a.querySelectorAll(this.targets);\n        if (elements.length !== 0) {\n            return Array.prototype.slice.call(elements);\n        }\n        else {\n            return [];\n        }\n    }\n}\n\nclass StreamSourceElement extends HTMLElement {\n    constructor() {\n        super(...arguments);\n        this.streamSource = null;\n    }\n    connectedCallback() {\n        this.streamSource = this.src.match(/^ws{1,2}:/) ? new WebSocket(this.src) : new EventSource(this.src);\n        connectStreamSource(this.streamSource);\n    }\n    disconnectedCallback() {\n        if (this.streamSource) {\n            disconnectStreamSource(this.streamSource);\n        }\n    }\n    get src() {\n        return this.getAttribute(\"src\") || \"\";\n    }\n}\n\nFrameElement.delegateConstructor = FrameController;\nif (customElements.get(\"turbo-frame\") === undefined) {\n    customElements.define(\"turbo-frame\", FrameElement);\n}\nif (customElements.get(\"turbo-stream\") === undefined) {\n    customElements.define(\"turbo-stream\", StreamElement);\n}\nif (customElements.get(\"turbo-stream-source\") === undefined) {\n    customElements.define(\"turbo-stream-source\", StreamSourceElement);\n}\n\n(() => {\n    let element = document.currentScript;\n    if (!element)\n        return;\n    if (element.hasAttribute(\"data-turbo-suppress-warning\"))\n        return;\n    element = element.parentElement;\n    while (element) {\n        if (element == document.body) {\n            return console.warn(unindent `\n        You are loading Turbo from a <script> element inside the <body> element. This is probably not what you meant to do!\n\n        Load your application\u2019s JavaScript bundle inside the <head> element instead. <script> elements in <body> are evaluated with each page change.\n\n        For more information, see: https://turbo.hotwired.dev/handbook/building#working-with-script-elements\n\n        \u2014\u2014\n        Suppress this warning by adding a \"data-turbo-suppress-warning\" attribute to: %s\n      `, element.outerHTML);\n        }\n        element = element.parentElement;\n    }\n})();\n\nwindow.Turbo = Turbo;\nstart();\n\nexport { FrameElement, FrameLoadingStyle, FrameRenderer, PageRenderer, PageSnapshot, StreamActions, StreamElement, StreamSourceElement, cache, clearCache, connectStreamSource, disconnectStreamSource, navigator$1 as navigator, registerAdapter, renderStreamMessage, session, setConfirmMethod, setFormMode, setProgressBarDelay, start, visit };\n", "let consumer\n\nexport async function getConsumer() {\n  return consumer || setConsumer(createConsumer().then(setConsumer))\n}\n\nexport function setConsumer(newConsumer) {\n  return consumer = newConsumer\n}\n\nexport async function createConsumer() {\n  const { createConsumer } = await import(/* webpackChunkName: \"actioncable\" */ \"@rails/actioncable/src\")\n  return createConsumer()\n}\n\nexport async function subscribeTo(channel, mixin) {\n  const { subscriptions } = await getConsumer()\n  return subscriptions.create(channel, mixin)\n}\n", "// Based on https://github.com/nathan7/snakeize\n//\n// This software is released under the MIT license:\n// Permission is hereby granted, free of charge, to any person obtaining a copy of\n// this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to\n// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n// the Software, and to permit persons to whom the Software is furnished to do so,\n// subject to the following conditions:\n\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\nexport default function walk (obj) {\n    if (!obj || typeof obj !== 'object') return obj;\n    if (obj instanceof Date || obj instanceof RegExp) return obj;\n    if (Array.isArray(obj)) return obj.map(walk);\n    return Object.keys(obj).reduce(function (acc, key) {\n        var camel = key[0].toLowerCase() + key.slice(1).replace(/([A-Z]+)/g, function (m, x) {\n            return '_' + x.toLowerCase();\n        });\n        acc[camel] = walk(obj[key]);\n        return acc;\n    }, {});\n};", "import { connectStreamSource, disconnectStreamSource } from \"@hotwired/turbo\"\nimport { subscribeTo } from \"./cable\"\nimport snakeize from \"./snakeize\"\n\nclass TurboCableStreamSourceElement extends HTMLElement {\n  async connectedCallback() {\n    connectStreamSource(this)\n    this.subscription = await subscribeTo(this.channel, {\n      received: this.dispatchMessageEvent.bind(this),\n      connected: this.subscriptionConnected.bind(this),\n      disconnected: this.subscriptionDisconnected.bind(this)\n    })\n  }\n\n  disconnectedCallback() {\n    disconnectStreamSource(this)\n    if (this.subscription) this.subscription.unsubscribe()\n  }\n\n  dispatchMessageEvent(data) {\n    const event = new MessageEvent(\"message\", { data })\n    return this.dispatchEvent(event)\n  }\n\n  subscriptionConnected() {\n    this.setAttribute(\"connected\", \"\")\n  }\n\n  subscriptionDisconnected() {\n    this.removeAttribute(\"connected\")\n  }\n\n  get channel() {\n    const channel = this.getAttribute(\"channel\")\n    const signed_stream_name = this.getAttribute(\"signed-stream-name\")\n    return { channel, signed_stream_name, ...snakeize({ ...this.dataset }) }\n  }\n}\n\n\nif (customElements.get(\"turbo-cable-stream-source\") === undefined) {\n  customElements.define(\"turbo-cable-stream-source\", TurboCableStreamSourceElement)\n}\n", "export function encodeMethodIntoRequestBody(event) {\n  if (event.target instanceof HTMLFormElement) {\n    const { target: form, detail: { fetchOptions } } = event\n\n    form.addEventListener(\"turbo:submit-start\", ({ detail: { formSubmission: { submitter } } }) => {\n      const body = isBodyInit(fetchOptions.body) ? fetchOptions.body : new URLSearchParams()\n      const method = determineFetchMethod(submitter, body, form)\n\n      if (!/get/i.test(method)) {\n        if (/post/i.test(method)) {\n          body.delete(\"_method\")\n        } else {\n          body.set(\"_method\", method)\n        }\n\n        fetchOptions.method = \"post\"\n      }\n    }, { once: true })\n  }\n}\n\nfunction determineFetchMethod(submitter, body, form) {\n  const formMethod = determineFormMethod(submitter)\n  const overrideMethod = body.get(\"_method\")\n  const method = form.getAttribute(\"method\") || \"get\"\n\n  if (typeof formMethod == \"string\") {\n    return formMethod\n  } else if (typeof overrideMethod == \"string\") {\n    return overrideMethod\n  } else {\n    return method\n  }\n}\n\nfunction determineFormMethod(submitter) {\n  if (submitter instanceof HTMLButtonElement || submitter instanceof HTMLInputElement) {\n    if (submitter.hasAttribute(\"formmethod\")) {\n      return submitter.formMethod\n    } else {\n      return null\n    }\n  } else {\n    return null\n  }\n}\n\nfunction isBodyInit(body) {\n  return body instanceof FormData || body instanceof URLSearchParams\n}\n", "import \"./cable_stream_source_element\"\n\nimport * as Turbo from \"@hotwired/turbo\"\nexport { Turbo }\n\nimport * as cable from \"./cable\"\nexport { cable }\n\nimport { encodeMethodIntoRequestBody } from \"./fetch_requests\"\n\naddEventListener(\"turbo:before-fetch-request\", encodeMethodIntoRequestBody)\n", "/*\nStimulus 3.2.1\nCopyright \u00A9 2022 Basecamp, LLC\n */\nclass EventListener {\n    constructor(eventTarget, eventName, eventOptions) {\n        this.eventTarget = eventTarget;\n        this.eventName = eventName;\n        this.eventOptions = eventOptions;\n        this.unorderedBindings = new Set();\n    }\n    connect() {\n        this.eventTarget.addEventListener(this.eventName, this, this.eventOptions);\n    }\n    disconnect() {\n        this.eventTarget.removeEventListener(this.eventName, this, this.eventOptions);\n    }\n    bindingConnected(binding) {\n        this.unorderedBindings.add(binding);\n    }\n    bindingDisconnected(binding) {\n        this.unorderedBindings.delete(binding);\n    }\n    handleEvent(event) {\n        const extendedEvent = extendEvent(event);\n        for (const binding of this.bindings) {\n            if (extendedEvent.immediatePropagationStopped) {\n                break;\n            }\n            else {\n                binding.handleEvent(extendedEvent);\n            }\n        }\n    }\n    hasBindings() {\n        return this.unorderedBindings.size > 0;\n    }\n    get bindings() {\n        return Array.from(this.unorderedBindings).sort((left, right) => {\n            const leftIndex = left.index, rightIndex = right.index;\n            return leftIndex < rightIndex ? -1 : leftIndex > rightIndex ? 1 : 0;\n        });\n    }\n}\nfunction extendEvent(event) {\n    if (\"immediatePropagationStopped\" in event) {\n        return event;\n    }\n    else {\n        const { stopImmediatePropagation } = event;\n        return Object.assign(event, {\n            immediatePropagationStopped: false,\n            stopImmediatePropagation() {\n                this.immediatePropagationStopped = true;\n                stopImmediatePropagation.call(this);\n            },\n        });\n    }\n}\n\nclass Dispatcher {\n    constructor(application) {\n        this.application = application;\n        this.eventListenerMaps = new Map();\n        this.started = false;\n    }\n    start() {\n        if (!this.started) {\n            this.started = true;\n            this.eventListeners.forEach((eventListener) => eventListener.connect());\n        }\n    }\n    stop() {\n        if (this.started) {\n            this.started = false;\n            this.eventListeners.forEach((eventListener) => eventListener.disconnect());\n        }\n    }\n    get eventListeners() {\n        return Array.from(this.eventListenerMaps.values()).reduce((listeners, map) => listeners.concat(Array.from(map.values())), []);\n    }\n    bindingConnected(binding) {\n        this.fetchEventListenerForBinding(binding).bindingConnected(binding);\n    }\n    bindingDisconnected(binding, clearEventListeners = false) {\n        this.fetchEventListenerForBinding(binding).bindingDisconnected(binding);\n        if (clearEventListeners)\n            this.clearEventListenersForBinding(binding);\n    }\n    handleError(error, message, detail = {}) {\n        this.application.handleError(error, `Error ${message}`, detail);\n    }\n    clearEventListenersForBinding(binding) {\n        const eventListener = this.fetchEventListenerForBinding(binding);\n        if (!eventListener.hasBindings()) {\n            eventListener.disconnect();\n            this.removeMappedEventListenerFor(binding);\n        }\n    }\n    removeMappedEventListenerFor(binding) {\n        const { eventTarget, eventName, eventOptions } = binding;\n        const eventListenerMap = this.fetchEventListenerMapForEventTarget(eventTarget);\n        const cacheKey = this.cacheKey(eventName, eventOptions);\n        eventListenerMap.delete(cacheKey);\n        if (eventListenerMap.size == 0)\n            this.eventListenerMaps.delete(eventTarget);\n    }\n    fetchEventListenerForBinding(binding) {\n        const { eventTarget, eventName, eventOptions } = binding;\n        return this.fetchEventListener(eventTarget, eventName, eventOptions);\n    }\n    fetchEventListener(eventTarget, eventName, eventOptions) {\n        const eventListenerMap = this.fetchEventListenerMapForEventTarget(eventTarget);\n        const cacheKey = this.cacheKey(eventName, eventOptions);\n        let eventListener = eventListenerMap.get(cacheKey);\n        if (!eventListener) {\n            eventListener = this.createEventListener(eventTarget, eventName, eventOptions);\n            eventListenerMap.set(cacheKey, eventListener);\n        }\n        return eventListener;\n    }\n    createEventListener(eventTarget, eventName, eventOptions) {\n        const eventListener = new EventListener(eventTarget, eventName, eventOptions);\n        if (this.started) {\n            eventListener.connect();\n        }\n        return eventListener;\n    }\n    fetchEventListenerMapForEventTarget(eventTarget) {\n        let eventListenerMap = this.eventListenerMaps.get(eventTarget);\n        if (!eventListenerMap) {\n            eventListenerMap = new Map();\n            this.eventListenerMaps.set(eventTarget, eventListenerMap);\n        }\n        return eventListenerMap;\n    }\n    cacheKey(eventName, eventOptions) {\n        const parts = [eventName];\n        Object.keys(eventOptions)\n            .sort()\n            .forEach((key) => {\n            parts.push(`${eventOptions[key] ? \"\" : \"!\"}${key}`);\n        });\n        return parts.join(\":\");\n    }\n}\n\nconst defaultActionDescriptorFilters = {\n    stop({ event, value }) {\n        if (value)\n            event.stopPropagation();\n        return true;\n    },\n    prevent({ event, value }) {\n        if (value)\n            event.preventDefault();\n        return true;\n    },\n    self({ event, value, element }) {\n        if (value) {\n            return element === event.target;\n        }\n        else {\n            return true;\n        }\n    },\n};\nconst descriptorPattern = /^(?:(.+?)(?:\\.(.+?))?(?:@(window|document))?->)?(.+?)(?:#([^:]+?))(?::(.+))?$/;\nfunction parseActionDescriptorString(descriptorString) {\n    const source = descriptorString.trim();\n    const matches = source.match(descriptorPattern) || [];\n    let eventName = matches[1];\n    let keyFilter = matches[2];\n    if (keyFilter && ![\"keydown\", \"keyup\", \"keypress\"].includes(eventName)) {\n        eventName += `.${keyFilter}`;\n        keyFilter = \"\";\n    }\n    return {\n        eventTarget: parseEventTarget(matches[3]),\n        eventName,\n        eventOptions: matches[6] ? parseEventOptions(matches[6]) : {},\n        identifier: matches[4],\n        methodName: matches[5],\n        keyFilter,\n    };\n}\nfunction parseEventTarget(eventTargetName) {\n    if (eventTargetName == \"window\") {\n        return window;\n    }\n    else if (eventTargetName == \"document\") {\n        return document;\n    }\n}\nfunction parseEventOptions(eventOptions) {\n    return eventOptions\n        .split(\":\")\n        .reduce((options, token) => Object.assign(options, { [token.replace(/^!/, \"\")]: !/^!/.test(token) }), {});\n}\nfunction stringifyEventTarget(eventTarget) {\n    if (eventTarget == window) {\n        return \"window\";\n    }\n    else if (eventTarget == document) {\n        return \"document\";\n    }\n}\n\nfunction camelize(value) {\n    return value.replace(/(?:[_-])([a-z0-9])/g, (_, char) => char.toUpperCase());\n}\nfunction namespaceCamelize(value) {\n    return camelize(value.replace(/--/g, \"-\").replace(/__/g, \"_\"));\n}\nfunction capitalize(value) {\n    return value.charAt(0).toUpperCase() + value.slice(1);\n}\nfunction dasherize(value) {\n    return value.replace(/([A-Z])/g, (_, char) => `-${char.toLowerCase()}`);\n}\nfunction tokenize(value) {\n    return value.match(/[^\\s]+/g) || [];\n}\n\nclass Action {\n    constructor(element, index, descriptor, schema) {\n        this.element = element;\n        this.index = index;\n        this.eventTarget = descriptor.eventTarget || element;\n        this.eventName = descriptor.eventName || getDefaultEventNameForElement(element) || error(\"missing event name\");\n        this.eventOptions = descriptor.eventOptions || {};\n        this.identifier = descriptor.identifier || error(\"missing identifier\");\n        this.methodName = descriptor.methodName || error(\"missing method name\");\n        this.keyFilter = descriptor.keyFilter || \"\";\n        this.schema = schema;\n    }\n    static forToken(token, schema) {\n        return new this(token.element, token.index, parseActionDescriptorString(token.content), schema);\n    }\n    toString() {\n        const eventFilter = this.keyFilter ? `.${this.keyFilter}` : \"\";\n        const eventTarget = this.eventTargetName ? `@${this.eventTargetName}` : \"\";\n        return `${this.eventName}${eventFilter}${eventTarget}->${this.identifier}#${this.methodName}`;\n    }\n    isFilterTarget(event) {\n        if (!this.keyFilter) {\n            return false;\n        }\n        const filteres = this.keyFilter.split(\"+\");\n        const modifiers = [\"meta\", \"ctrl\", \"alt\", \"shift\"];\n        const [meta, ctrl, alt, shift] = modifiers.map((modifier) => filteres.includes(modifier));\n        if (event.metaKey !== meta || event.ctrlKey !== ctrl || event.altKey !== alt || event.shiftKey !== shift) {\n            return true;\n        }\n        const standardFilter = filteres.filter((key) => !modifiers.includes(key))[0];\n        if (!standardFilter) {\n            return false;\n        }\n        if (!Object.prototype.hasOwnProperty.call(this.keyMappings, standardFilter)) {\n            error(`contains unknown key filter: ${this.keyFilter}`);\n        }\n        return this.keyMappings[standardFilter].toLowerCase() !== event.key.toLowerCase();\n    }\n    get params() {\n        const params = {};\n        const pattern = new RegExp(`^data-${this.identifier}-(.+)-param$`, \"i\");\n        for (const { name, value } of Array.from(this.element.attributes)) {\n            const match = name.match(pattern);\n            const key = match && match[1];\n            if (key) {\n                params[camelize(key)] = typecast(value);\n            }\n        }\n        return params;\n    }\n    get eventTargetName() {\n        return stringifyEventTarget(this.eventTarget);\n    }\n    get keyMappings() {\n        return this.schema.keyMappings;\n    }\n}\nconst defaultEventNames = {\n    a: () => \"click\",\n    button: () => \"click\",\n    form: () => \"submit\",\n    details: () => \"toggle\",\n    input: (e) => (e.getAttribute(\"type\") == \"submit\" ? \"click\" : \"input\"),\n    select: () => \"change\",\n    textarea: () => \"input\",\n};\nfunction getDefaultEventNameForElement(element) {\n    const tagName = element.tagName.toLowerCase();\n    if (tagName in defaultEventNames) {\n        return defaultEventNames[tagName](element);\n    }\n}\nfunction error(message) {\n    throw new Error(message);\n}\nfunction typecast(value) {\n    try {\n        return JSON.parse(value);\n    }\n    catch (o_O) {\n        return value;\n    }\n}\n\nclass Binding {\n    constructor(context, action) {\n        this.context = context;\n        this.action = action;\n    }\n    get index() {\n        return this.action.index;\n    }\n    get eventTarget() {\n        return this.action.eventTarget;\n    }\n    get eventOptions() {\n        return this.action.eventOptions;\n    }\n    get identifier() {\n        return this.context.identifier;\n    }\n    handleEvent(event) {\n        if (this.willBeInvokedByEvent(event) && this.applyEventModifiers(event)) {\n            this.invokeWithEvent(event);\n        }\n    }\n    get eventName() {\n        return this.action.eventName;\n    }\n    get method() {\n        const method = this.controller[this.methodName];\n        if (typeof method == \"function\") {\n            return method;\n        }\n        throw new Error(`Action \"${this.action}\" references undefined method \"${this.methodName}\"`);\n    }\n    applyEventModifiers(event) {\n        const { element } = this.action;\n        const { actionDescriptorFilters } = this.context.application;\n        let passes = true;\n        for (const [name, value] of Object.entries(this.eventOptions)) {\n            if (name in actionDescriptorFilters) {\n                const filter = actionDescriptorFilters[name];\n                passes = passes && filter({ name, value, event, element });\n            }\n            else {\n                continue;\n            }\n        }\n        return passes;\n    }\n    invokeWithEvent(event) {\n        const { target, currentTarget } = event;\n        try {\n            const { params } = this.action;\n            const actionEvent = Object.assign(event, { params });\n            this.method.call(this.controller, actionEvent);\n            this.context.logDebugActivity(this.methodName, { event, target, currentTarget, action: this.methodName });\n        }\n        catch (error) {\n            const { identifier, controller, element, index } = this;\n            const detail = { identifier, controller, element, index, event };\n            this.context.handleError(error, `invoking action \"${this.action}\"`, detail);\n        }\n    }\n    willBeInvokedByEvent(event) {\n        const eventTarget = event.target;\n        if (event instanceof KeyboardEvent && this.action.isFilterTarget(event)) {\n            return false;\n        }\n        if (this.element === eventTarget) {\n            return true;\n        }\n        else if (eventTarget instanceof Element && this.element.contains(eventTarget)) {\n            return this.scope.containsElement(eventTarget);\n        }\n        else {\n            return this.scope.containsElement(this.action.element);\n        }\n    }\n    get controller() {\n        return this.context.controller;\n    }\n    get methodName() {\n        return this.action.methodName;\n    }\n    get element() {\n        return this.scope.element;\n    }\n    get scope() {\n        return this.context.scope;\n    }\n}\n\nclass ElementObserver {\n    constructor(element, delegate) {\n        this.mutationObserverInit = { attributes: true, childList: true, subtree: true };\n        this.element = element;\n        this.started = false;\n        this.delegate = delegate;\n        this.elements = new Set();\n        this.mutationObserver = new MutationObserver((mutations) => this.processMutations(mutations));\n    }\n    start() {\n        if (!this.started) {\n            this.started = true;\n            this.mutationObserver.observe(this.element, this.mutationObserverInit);\n            this.refresh();\n        }\n    }\n    pause(callback) {\n        if (this.started) {\n            this.mutationObserver.disconnect();\n            this.started = false;\n        }\n        callback();\n        if (!this.started) {\n            this.mutationObserver.observe(this.element, this.mutationObserverInit);\n            this.started = true;\n        }\n    }\n    stop() {\n        if (this.started) {\n            this.mutationObserver.takeRecords();\n            this.mutationObserver.disconnect();\n            this.started = false;\n        }\n    }\n    refresh() {\n        if (this.started) {\n            const matches = new Set(this.matchElementsInTree());\n            for (const element of Array.from(this.elements)) {\n                if (!matches.has(element)) {\n                    this.removeElement(element);\n                }\n            }\n            for (const element of Array.from(matches)) {\n                this.addElement(element);\n            }\n        }\n    }\n    processMutations(mutations) {\n        if (this.started) {\n            for (const mutation of mutations) {\n                this.processMutation(mutation);\n            }\n        }\n    }\n    processMutation(mutation) {\n        if (mutation.type == \"attributes\") {\n            this.processAttributeChange(mutation.target, mutation.attributeName);\n        }\n        else if (mutation.type == \"childList\") {\n            this.processRemovedNodes(mutation.removedNodes);\n            this.processAddedNodes(mutation.addedNodes);\n        }\n    }\n    processAttributeChange(node, attributeName) {\n        const element = node;\n        if (this.elements.has(element)) {\n            if (this.delegate.elementAttributeChanged && this.matchElement(element)) {\n                this.delegate.elementAttributeChanged(element, attributeName);\n            }\n            else {\n                this.removeElement(element);\n            }\n        }\n        else if (this.matchElement(element)) {\n            this.addElement(element);\n        }\n    }\n    processRemovedNodes(nodes) {\n        for (const node of Array.from(nodes)) {\n            const element = this.elementFromNode(node);\n            if (element) {\n                this.processTree(element, this.removeElement);\n            }\n        }\n    }\n    processAddedNodes(nodes) {\n        for (const node of Array.from(nodes)) {\n            const element = this.elementFromNode(node);\n            if (element && this.elementIsActive(element)) {\n                this.processTree(element, this.addElement);\n            }\n        }\n    }\n    matchElement(element) {\n        return this.delegate.matchElement(element);\n    }\n    matchElementsInTree(tree = this.element) {\n        return this.delegate.matchElementsInTree(tree);\n    }\n    processTree(tree, processor) {\n        for (const element of this.matchElementsInTree(tree)) {\n            processor.call(this, element);\n        }\n    }\n    elementFromNode(node) {\n        if (node.nodeType == Node.ELEMENT_NODE) {\n            return node;\n        }\n    }\n    elementIsActive(element) {\n        if (element.isConnected != this.element.isConnected) {\n            return false;\n        }\n        else {\n            return this.element.contains(element);\n        }\n    }\n    addElement(element) {\n        if (!this.elements.has(element)) {\n            if (this.elementIsActive(element)) {\n                this.elements.add(element);\n                if (this.delegate.elementMatched) {\n                    this.delegate.elementMatched(element);\n                }\n            }\n        }\n    }\n    removeElement(element) {\n        if (this.elements.has(element)) {\n            this.elements.delete(element);\n            if (this.delegate.elementUnmatched) {\n                this.delegate.elementUnmatched(element);\n            }\n        }\n    }\n}\n\nclass AttributeObserver {\n    constructor(element, attributeName, delegate) {\n        this.attributeName = attributeName;\n        this.delegate = delegate;\n        this.elementObserver = new ElementObserver(element, this);\n    }\n    get element() {\n        return this.elementObserver.element;\n    }\n    get selector() {\n        return `[${this.attributeName}]`;\n    }\n    start() {\n        this.elementObserver.start();\n    }\n    pause(callback) {\n        this.elementObserver.pause(callback);\n    }\n    stop() {\n        this.elementObserver.stop();\n    }\n    refresh() {\n        this.elementObserver.refresh();\n    }\n    get started() {\n        return this.elementObserver.started;\n    }\n    matchElement(element) {\n        return element.hasAttribute(this.attributeName);\n    }\n    matchElementsInTree(tree) {\n        const match = this.matchElement(tree) ? [tree] : [];\n        const matches = Array.from(tree.querySelectorAll(this.selector));\n        return match.concat(matches);\n    }\n    elementMatched(element) {\n        if (this.delegate.elementMatchedAttribute) {\n            this.delegate.elementMatchedAttribute(element, this.attributeName);\n        }\n    }\n    elementUnmatched(element) {\n        if (this.delegate.elementUnmatchedAttribute) {\n            this.delegate.elementUnmatchedAttribute(element, this.attributeName);\n        }\n    }\n    elementAttributeChanged(element, attributeName) {\n        if (this.delegate.elementAttributeValueChanged && this.attributeName == attributeName) {\n            this.delegate.elementAttributeValueChanged(element, attributeName);\n        }\n    }\n}\n\nfunction add(map, key, value) {\n    fetch(map, key).add(value);\n}\nfunction del(map, key, value) {\n    fetch(map, key).delete(value);\n    prune(map, key);\n}\nfunction fetch(map, key) {\n    let values = map.get(key);\n    if (!values) {\n        values = new Set();\n        map.set(key, values);\n    }\n    return values;\n}\nfunction prune(map, key) {\n    const values = map.get(key);\n    if (values != null && values.size == 0) {\n        map.delete(key);\n    }\n}\n\nclass Multimap {\n    constructor() {\n        this.valuesByKey = new Map();\n    }\n    get keys() {\n        return Array.from(this.valuesByKey.keys());\n    }\n    get values() {\n        const sets = Array.from(this.valuesByKey.values());\n        return sets.reduce((values, set) => values.concat(Array.from(set)), []);\n    }\n    get size() {\n        const sets = Array.from(this.valuesByKey.values());\n        return sets.reduce((size, set) => size + set.size, 0);\n    }\n    add(key, value) {\n        add(this.valuesByKey, key, value);\n    }\n    delete(key, value) {\n        del(this.valuesByKey, key, value);\n    }\n    has(key, value) {\n        const values = this.valuesByKey.get(key);\n        return values != null && values.has(value);\n    }\n    hasKey(key) {\n        return this.valuesByKey.has(key);\n    }\n    hasValue(value) {\n        const sets = Array.from(this.valuesByKey.values());\n        return sets.some((set) => set.has(value));\n    }\n    getValuesForKey(key) {\n        const values = this.valuesByKey.get(key);\n        return values ? Array.from(values) : [];\n    }\n    getKeysForValue(value) {\n        return Array.from(this.valuesByKey)\n            .filter(([_key, values]) => values.has(value))\n            .map(([key, _values]) => key);\n    }\n}\n\nclass IndexedMultimap extends Multimap {\n    constructor() {\n        super();\n        this.keysByValue = new Map();\n    }\n    get values() {\n        return Array.from(this.keysByValue.keys());\n    }\n    add(key, value) {\n        super.add(key, value);\n        add(this.keysByValue, value, key);\n    }\n    delete(key, value) {\n        super.delete(key, value);\n        del(this.keysByValue, value, key);\n    }\n    hasValue(value) {\n        return this.keysByValue.has(value);\n    }\n    getKeysForValue(value) {\n        const set = this.keysByValue.get(value);\n        return set ? Array.from(set) : [];\n    }\n}\n\nclass SelectorObserver {\n    constructor(element, selector, delegate, details = {}) {\n        this.selector = selector;\n        this.details = details;\n        this.elementObserver = new ElementObserver(element, this);\n        this.delegate = delegate;\n        this.matchesByElement = new Multimap();\n    }\n    get started() {\n        return this.elementObserver.started;\n    }\n    start() {\n        this.elementObserver.start();\n    }\n    pause(callback) {\n        this.elementObserver.pause(callback);\n    }\n    stop() {\n        this.elementObserver.stop();\n    }\n    refresh() {\n        this.elementObserver.refresh();\n    }\n    get element() {\n        return this.elementObserver.element;\n    }\n    matchElement(element) {\n        const matches = element.matches(this.selector);\n        if (this.delegate.selectorMatchElement) {\n            return matches && this.delegate.selectorMatchElement(element, this.details);\n        }\n        return matches;\n    }\n    matchElementsInTree(tree) {\n        const match = this.matchElement(tree) ? [tree] : [];\n        const matches = Array.from(tree.querySelectorAll(this.selector)).filter((match) => this.matchElement(match));\n        return match.concat(matches);\n    }\n    elementMatched(element) {\n        this.selectorMatched(element);\n    }\n    elementUnmatched(element) {\n        this.selectorUnmatched(element);\n    }\n    elementAttributeChanged(element, _attributeName) {\n        const matches = this.matchElement(element);\n        const matchedBefore = this.matchesByElement.has(this.selector, element);\n        if (!matches && matchedBefore) {\n            this.selectorUnmatched(element);\n        }\n    }\n    selectorMatched(element) {\n        if (this.delegate.selectorMatched) {\n            this.delegate.selectorMatched(element, this.selector, this.details);\n            this.matchesByElement.add(this.selector, element);\n        }\n    }\n    selectorUnmatched(element) {\n        this.delegate.selectorUnmatched(element, this.selector, this.details);\n        this.matchesByElement.delete(this.selector, element);\n    }\n}\n\nclass StringMapObserver {\n    constructor(element, delegate) {\n        this.element = element;\n        this.delegate = delegate;\n        this.started = false;\n        this.stringMap = new Map();\n        this.mutationObserver = new MutationObserver((mutations) => this.processMutations(mutations));\n    }\n    start() {\n        if (!this.started) {\n            this.started = true;\n            this.mutationObserver.observe(this.element, { attributes: true, attributeOldValue: true });\n            this.refresh();\n        }\n    }\n    stop() {\n        if (this.started) {\n            this.mutationObserver.takeRecords();\n            this.mutationObserver.disconnect();\n            this.started = false;\n        }\n    }\n    refresh() {\n        if (this.started) {\n            for (const attributeName of this.knownAttributeNames) {\n                this.refreshAttribute(attributeName, null);\n            }\n        }\n    }\n    processMutations(mutations) {\n        if (this.started) {\n            for (const mutation of mutations) {\n                this.processMutation(mutation);\n            }\n        }\n    }\n    processMutation(mutation) {\n        const attributeName = mutation.attributeName;\n        if (attributeName) {\n            this.refreshAttribute(attributeName, mutation.oldValue);\n        }\n    }\n    refreshAttribute(attributeName, oldValue) {\n        const key = this.delegate.getStringMapKeyForAttribute(attributeName);\n        if (key != null) {\n            if (!this.stringMap.has(attributeName)) {\n                this.stringMapKeyAdded(key, attributeName);\n            }\n            const value = this.element.getAttribute(attributeName);\n            if (this.stringMap.get(attributeName) != value) {\n                this.stringMapValueChanged(value, key, oldValue);\n            }\n            if (value == null) {\n                const oldValue = this.stringMap.get(attributeName);\n                this.stringMap.delete(attributeName);\n                if (oldValue)\n                    this.stringMapKeyRemoved(key, attributeName, oldValue);\n            }\n            else {\n                this.stringMap.set(attributeName, value);\n            }\n        }\n    }\n    stringMapKeyAdded(key, attributeName) {\n        if (this.delegate.stringMapKeyAdded) {\n            this.delegate.stringMapKeyAdded(key, attributeName);\n        }\n    }\n    stringMapValueChanged(value, key, oldValue) {\n        if (this.delegate.stringMapValueChanged) {\n            this.delegate.stringMapValueChanged(value, key, oldValue);\n        }\n    }\n    stringMapKeyRemoved(key, attributeName, oldValue) {\n        if (this.delegate.stringMapKeyRemoved) {\n            this.delegate.stringMapKeyRemoved(key, attributeName, oldValue);\n        }\n    }\n    get knownAttributeNames() {\n        return Array.from(new Set(this.currentAttributeNames.concat(this.recordedAttributeNames)));\n    }\n    get currentAttributeNames() {\n        return Array.from(this.element.attributes).map((attribute) => attribute.name);\n    }\n    get recordedAttributeNames() {\n        return Array.from(this.stringMap.keys());\n    }\n}\n\nclass TokenListObserver {\n    constructor(element, attributeName, delegate) {\n        this.attributeObserver = new AttributeObserver(element, attributeName, this);\n        this.delegate = delegate;\n        this.tokensByElement = new Multimap();\n    }\n    get started() {\n        return this.attributeObserver.started;\n    }\n    start() {\n        this.attributeObserver.start();\n    }\n    pause(callback) {\n        this.attributeObserver.pause(callback);\n    }\n    stop() {\n        this.attributeObserver.stop();\n    }\n    refresh() {\n        this.attributeObserver.refresh();\n    }\n    get element() {\n        return this.attributeObserver.element;\n    }\n    get attributeName() {\n        return this.attributeObserver.attributeName;\n    }\n    elementMatchedAttribute(element) {\n        this.tokensMatched(this.readTokensForElement(element));\n    }\n    elementAttributeValueChanged(element) {\n        const [unmatchedTokens, matchedTokens] = this.refreshTokensForElement(element);\n        this.tokensUnmatched(unmatchedTokens);\n        this.tokensMatched(matchedTokens);\n    }\n    elementUnmatchedAttribute(element) {\n        this.tokensUnmatched(this.tokensByElement.getValuesForKey(element));\n    }\n    tokensMatched(tokens) {\n        tokens.forEach((token) => this.tokenMatched(token));\n    }\n    tokensUnmatched(tokens) {\n        tokens.forEach((token) => this.tokenUnmatched(token));\n    }\n    tokenMatched(token) {\n        this.delegate.tokenMatched(token);\n        this.tokensByElement.add(token.element, token);\n    }\n    tokenUnmatched(token) {\n        this.delegate.tokenUnmatched(token);\n        this.tokensByElement.delete(token.element, token);\n    }\n    refreshTokensForElement(element) {\n        const previousTokens = this.tokensByElement.getValuesForKey(element);\n        const currentTokens = this.readTokensForElement(element);\n        const firstDifferingIndex = zip(previousTokens, currentTokens).findIndex(([previousToken, currentToken]) => !tokensAreEqual(previousToken, currentToken));\n        if (firstDifferingIndex == -1) {\n            return [[], []];\n        }\n        else {\n            return [previousTokens.slice(firstDifferingIndex), currentTokens.slice(firstDifferingIndex)];\n        }\n    }\n    readTokensForElement(element) {\n        const attributeName = this.attributeName;\n        const tokenString = element.getAttribute(attributeName) || \"\";\n        return parseTokenString(tokenString, element, attributeName);\n    }\n}\nfunction parseTokenString(tokenString, element, attributeName) {\n    return tokenString\n        .trim()\n        .split(/\\s+/)\n        .filter((content) => content.length)\n        .map((content, index) => ({ element, attributeName, content, index }));\n}\nfunction zip(left, right) {\n    const length = Math.max(left.length, right.length);\n    return Array.from({ length }, (_, index) => [left[index], right[index]]);\n}\nfunction tokensAreEqual(left, right) {\n    return left && right && left.index == right.index && left.content == right.content;\n}\n\nclass ValueListObserver {\n    constructor(element, attributeName, delegate) {\n        this.tokenListObserver = new TokenListObserver(element, attributeName, this);\n        this.delegate = delegate;\n        this.parseResultsByToken = new WeakMap();\n        this.valuesByTokenByElement = new WeakMap();\n    }\n    get started() {\n        return this.tokenListObserver.started;\n    }\n    start() {\n        this.tokenListObserver.start();\n    }\n    stop() {\n        this.tokenListObserver.stop();\n    }\n    refresh() {\n        this.tokenListObserver.refresh();\n    }\n    get element() {\n        return this.tokenListObserver.element;\n    }\n    get attributeName() {\n        return this.tokenListObserver.attributeName;\n    }\n    tokenMatched(token) {\n        const { element } = token;\n        const { value } = this.fetchParseResultForToken(token);\n        if (value) {\n            this.fetchValuesByTokenForElement(element).set(token, value);\n            this.delegate.elementMatchedValue(element, value);\n        }\n    }\n    tokenUnmatched(token) {\n        const { element } = token;\n        const { value } = this.fetchParseResultForToken(token);\n        if (value) {\n            this.fetchValuesByTokenForElement(element).delete(token);\n            this.delegate.elementUnmatchedValue(element, value);\n        }\n    }\n    fetchParseResultForToken(token) {\n        let parseResult = this.parseResultsByToken.get(token);\n        if (!parseResult) {\n            parseResult = this.parseToken(token);\n            this.parseResultsByToken.set(token, parseResult);\n        }\n        return parseResult;\n    }\n    fetchValuesByTokenForElement(element) {\n        let valuesByToken = this.valuesByTokenByElement.get(element);\n        if (!valuesByToken) {\n            valuesByToken = new Map();\n            this.valuesByTokenByElement.set(element, valuesByToken);\n        }\n        return valuesByToken;\n    }\n    parseToken(token) {\n        try {\n            const value = this.delegate.parseValueForToken(token);\n            return { value };\n        }\n        catch (error) {\n            return { error };\n        }\n    }\n}\n\nclass BindingObserver {\n    constructor(context, delegate) {\n        this.context = context;\n        this.delegate = delegate;\n        this.bindingsByAction = new Map();\n    }\n    start() {\n        if (!this.valueListObserver) {\n            this.valueListObserver = new ValueListObserver(this.element, this.actionAttribute, this);\n            this.valueListObserver.start();\n        }\n    }\n    stop() {\n        if (this.valueListObserver) {\n            this.valueListObserver.stop();\n            delete this.valueListObserver;\n            this.disconnectAllActions();\n        }\n    }\n    get element() {\n        return this.context.element;\n    }\n    get identifier() {\n        return this.context.identifier;\n    }\n    get actionAttribute() {\n        return this.schema.actionAttribute;\n    }\n    get schema() {\n        return this.context.schema;\n    }\n    get bindings() {\n        return Array.from(this.bindingsByAction.values());\n    }\n    connectAction(action) {\n        const binding = new Binding(this.context, action);\n        this.bindingsByAction.set(action, binding);\n        this.delegate.bindingConnected(binding);\n    }\n    disconnectAction(action) {\n        const binding = this.bindingsByAction.get(action);\n        if (binding) {\n            this.bindingsByAction.delete(action);\n            this.delegate.bindingDisconnected(binding);\n        }\n    }\n    disconnectAllActions() {\n        this.bindings.forEach((binding) => this.delegate.bindingDisconnected(binding, true));\n        this.bindingsByAction.clear();\n    }\n    parseValueForToken(token) {\n        const action = Action.forToken(token, this.schema);\n        if (action.identifier == this.identifier) {\n            return action;\n        }\n    }\n    elementMatchedValue(element, action) {\n        this.connectAction(action);\n    }\n    elementUnmatchedValue(element, action) {\n        this.disconnectAction(action);\n    }\n}\n\nclass ValueObserver {\n    constructor(context, receiver) {\n        this.context = context;\n        this.receiver = receiver;\n        this.stringMapObserver = new StringMapObserver(this.element, this);\n        this.valueDescriptorMap = this.controller.valueDescriptorMap;\n    }\n    start() {\n        this.stringMapObserver.start();\n        this.invokeChangedCallbacksForDefaultValues();\n    }\n    stop() {\n        this.stringMapObserver.stop();\n    }\n    get element() {\n        return this.context.element;\n    }\n    get controller() {\n        return this.context.controller;\n    }\n    getStringMapKeyForAttribute(attributeName) {\n        if (attributeName in this.valueDescriptorMap) {\n            return this.valueDescriptorMap[attributeName].name;\n        }\n    }\n    stringMapKeyAdded(key, attributeName) {\n        const descriptor = this.valueDescriptorMap[attributeName];\n        if (!this.hasValue(key)) {\n            this.invokeChangedCallback(key, descriptor.writer(this.receiver[key]), descriptor.writer(descriptor.defaultValue));\n        }\n    }\n    stringMapValueChanged(value, name, oldValue) {\n        const descriptor = this.valueDescriptorNameMap[name];\n        if (value === null)\n            return;\n        if (oldValue === null) {\n            oldValue = descriptor.writer(descriptor.defaultValue);\n        }\n        this.invokeChangedCallback(name, value, oldValue);\n    }\n    stringMapKeyRemoved(key, attributeName, oldValue) {\n        const descriptor = this.valueDescriptorNameMap[key];\n        if (this.hasValue(key)) {\n            this.invokeChangedCallback(key, descriptor.writer(this.receiver[key]), oldValue);\n        }\n        else {\n            this.invokeChangedCallback(key, descriptor.writer(descriptor.defaultValue), oldValue);\n        }\n    }\n    invokeChangedCallbacksForDefaultValues() {\n        for (const { key, name, defaultValue, writer } of this.valueDescriptors) {\n            if (defaultValue != undefined && !this.controller.data.has(key)) {\n                this.invokeChangedCallback(name, writer(defaultValue), undefined);\n            }\n        }\n    }\n    invokeChangedCallback(name, rawValue, rawOldValue) {\n        const changedMethodName = `${name}Changed`;\n        const changedMethod = this.receiver[changedMethodName];\n        if (typeof changedMethod == \"function\") {\n            const descriptor = this.valueDescriptorNameMap[name];\n            try {\n                const value = descriptor.reader(rawValue);\n                let oldValue = rawOldValue;\n                if (rawOldValue) {\n                    oldValue = descriptor.reader(rawOldValue);\n                }\n                changedMethod.call(this.receiver, value, oldValue);\n            }\n            catch (error) {\n                if (error instanceof TypeError) {\n                    error.message = `Stimulus Value \"${this.context.identifier}.${descriptor.name}\" - ${error.message}`;\n                }\n                throw error;\n            }\n        }\n    }\n    get valueDescriptors() {\n        const { valueDescriptorMap } = this;\n        return Object.keys(valueDescriptorMap).map((key) => valueDescriptorMap[key]);\n    }\n    get valueDescriptorNameMap() {\n        const descriptors = {};\n        Object.keys(this.valueDescriptorMap).forEach((key) => {\n            const descriptor = this.valueDescriptorMap[key];\n            descriptors[descriptor.name] = descriptor;\n        });\n        return descriptors;\n    }\n    hasValue(attributeName) {\n        const descriptor = this.valueDescriptorNameMap[attributeName];\n        const hasMethodName = `has${capitalize(descriptor.name)}`;\n        return this.receiver[hasMethodName];\n    }\n}\n\nclass TargetObserver {\n    constructor(context, delegate) {\n        this.context = context;\n        this.delegate = delegate;\n        this.targetsByName = new Multimap();\n    }\n    start() {\n        if (!this.tokenListObserver) {\n            this.tokenListObserver = new TokenListObserver(this.element, this.attributeName, this);\n            this.tokenListObserver.start();\n        }\n    }\n    stop() {\n        if (this.tokenListObserver) {\n            this.disconnectAllTargets();\n            this.tokenListObserver.stop();\n            delete this.tokenListObserver;\n        }\n    }\n    tokenMatched({ element, content: name }) {\n        if (this.scope.containsElement(element)) {\n            this.connectTarget(element, name);\n        }\n    }\n    tokenUnmatched({ element, content: name }) {\n        this.disconnectTarget(element, name);\n    }\n    connectTarget(element, name) {\n        var _a;\n        if (!this.targetsByName.has(name, element)) {\n            this.targetsByName.add(name, element);\n            (_a = this.tokenListObserver) === null || _a === void 0 ? void 0 : _a.pause(() => this.delegate.targetConnected(element, name));\n        }\n    }\n    disconnectTarget(element, name) {\n        var _a;\n        if (this.targetsByName.has(name, element)) {\n            this.targetsByName.delete(name, element);\n            (_a = this.tokenListObserver) === null || _a === void 0 ? void 0 : _a.pause(() => this.delegate.targetDisconnected(element, name));\n        }\n    }\n    disconnectAllTargets() {\n        for (const name of this.targetsByName.keys) {\n            for (const element of this.targetsByName.getValuesForKey(name)) {\n                this.disconnectTarget(element, name);\n            }\n        }\n    }\n    get attributeName() {\n        return `data-${this.context.identifier}-target`;\n    }\n    get element() {\n        return this.context.element;\n    }\n    get scope() {\n        return this.context.scope;\n    }\n}\n\nfunction readInheritableStaticArrayValues(constructor, propertyName) {\n    const ancestors = getAncestorsForConstructor(constructor);\n    return Array.from(ancestors.reduce((values, constructor) => {\n        getOwnStaticArrayValues(constructor, propertyName).forEach((name) => values.add(name));\n        return values;\n    }, new Set()));\n}\nfunction readInheritableStaticObjectPairs(constructor, propertyName) {\n    const ancestors = getAncestorsForConstructor(constructor);\n    return ancestors.reduce((pairs, constructor) => {\n        pairs.push(...getOwnStaticObjectPairs(constructor, propertyName));\n        return pairs;\n    }, []);\n}\nfunction getAncestorsForConstructor(constructor) {\n    const ancestors = [];\n    while (constructor) {\n        ancestors.push(constructor);\n        constructor = Object.getPrototypeOf(constructor);\n    }\n    return ancestors.reverse();\n}\nfunction getOwnStaticArrayValues(constructor, propertyName) {\n    const definition = constructor[propertyName];\n    return Array.isArray(definition) ? definition : [];\n}\nfunction getOwnStaticObjectPairs(constructor, propertyName) {\n    const definition = constructor[propertyName];\n    return definition ? Object.keys(definition).map((key) => [key, definition[key]]) : [];\n}\n\nclass OutletObserver {\n    constructor(context, delegate) {\n        this.context = context;\n        this.delegate = delegate;\n        this.outletsByName = new Multimap();\n        this.outletElementsByName = new Multimap();\n        this.selectorObserverMap = new Map();\n    }\n    start() {\n        if (this.selectorObserverMap.size === 0) {\n            this.outletDefinitions.forEach((outletName) => {\n                const selector = this.selector(outletName);\n                const details = { outletName };\n                if (selector) {\n                    this.selectorObserverMap.set(outletName, new SelectorObserver(document.body, selector, this, details));\n                }\n            });\n            this.selectorObserverMap.forEach((observer) => observer.start());\n        }\n        this.dependentContexts.forEach((context) => context.refresh());\n    }\n    stop() {\n        if (this.selectorObserverMap.size > 0) {\n            this.disconnectAllOutlets();\n            this.selectorObserverMap.forEach((observer) => observer.stop());\n            this.selectorObserverMap.clear();\n        }\n    }\n    refresh() {\n        this.selectorObserverMap.forEach((observer) => observer.refresh());\n    }\n    selectorMatched(element, _selector, { outletName }) {\n        const outlet = this.getOutlet(element, outletName);\n        if (outlet) {\n            this.connectOutlet(outlet, element, outletName);\n        }\n    }\n    selectorUnmatched(element, _selector, { outletName }) {\n        const outlet = this.getOutletFromMap(element, outletName);\n        if (outlet) {\n            this.disconnectOutlet(outlet, element, outletName);\n        }\n    }\n    selectorMatchElement(element, { outletName }) {\n        return (this.hasOutlet(element, outletName) &&\n            element.matches(`[${this.context.application.schema.controllerAttribute}~=${outletName}]`));\n    }\n    connectOutlet(outlet, element, outletName) {\n        var _a;\n        if (!this.outletElementsByName.has(outletName, element)) {\n            this.outletsByName.add(outletName, outlet);\n            this.outletElementsByName.add(outletName, element);\n            (_a = this.selectorObserverMap.get(outletName)) === null || _a === void 0 ? void 0 : _a.pause(() => this.delegate.outletConnected(outlet, element, outletName));\n        }\n    }\n    disconnectOutlet(outlet, element, outletName) {\n        var _a;\n        if (this.outletElementsByName.has(outletName, element)) {\n            this.outletsByName.delete(outletName, outlet);\n            this.outletElementsByName.delete(outletName, element);\n            (_a = this.selectorObserverMap\n                .get(outletName)) === null || _a === void 0 ? void 0 : _a.pause(() => this.delegate.outletDisconnected(outlet, element, outletName));\n        }\n    }\n    disconnectAllOutlets() {\n        for (const outletName of this.outletElementsByName.keys) {\n            for (const element of this.outletElementsByName.getValuesForKey(outletName)) {\n                for (const outlet of this.outletsByName.getValuesForKey(outletName)) {\n                    this.disconnectOutlet(outlet, element, outletName);\n                }\n            }\n        }\n    }\n    selector(outletName) {\n        return this.scope.outlets.getSelectorForOutletName(outletName);\n    }\n    get outletDependencies() {\n        const dependencies = new Multimap();\n        this.router.modules.forEach((module) => {\n            const constructor = module.definition.controllerConstructor;\n            const outlets = readInheritableStaticArrayValues(constructor, \"outlets\");\n            outlets.forEach((outlet) => dependencies.add(outlet, module.identifier));\n        });\n        return dependencies;\n    }\n    get outletDefinitions() {\n        return this.outletDependencies.getKeysForValue(this.identifier);\n    }\n    get dependentControllerIdentifiers() {\n        return this.outletDependencies.getValuesForKey(this.identifier);\n    }\n    get dependentContexts() {\n        const identifiers = this.dependentControllerIdentifiers;\n        return this.router.contexts.filter((context) => identifiers.includes(context.identifier));\n    }\n    hasOutlet(element, outletName) {\n        return !!this.getOutlet(element, outletName) || !!this.getOutletFromMap(element, outletName);\n    }\n    getOutlet(element, outletName) {\n        return this.application.getControllerForElementAndIdentifier(element, outletName);\n    }\n    getOutletFromMap(element, outletName) {\n        return this.outletsByName.getValuesForKey(outletName).find((outlet) => outlet.element === element);\n    }\n    get scope() {\n        return this.context.scope;\n    }\n    get identifier() {\n        return this.context.identifier;\n    }\n    get application() {\n        return this.context.application;\n    }\n    get router() {\n        return this.application.router;\n    }\n}\n\nclass Context {\n    constructor(module, scope) {\n        this.logDebugActivity = (functionName, detail = {}) => {\n            const { identifier, controller, element } = this;\n            detail = Object.assign({ identifier, controller, element }, detail);\n            this.application.logDebugActivity(this.identifier, functionName, detail);\n        };\n        this.module = module;\n        this.scope = scope;\n        this.controller = new module.controllerConstructor(this);\n        this.bindingObserver = new BindingObserver(this, this.dispatcher);\n        this.valueObserver = new ValueObserver(this, this.controller);\n        this.targetObserver = new TargetObserver(this, this);\n        this.outletObserver = new OutletObserver(this, this);\n        try {\n            this.controller.initialize();\n            this.logDebugActivity(\"initialize\");\n        }\n        catch (error) {\n            this.handleError(error, \"initializing controller\");\n        }\n    }\n    connect() {\n        this.bindingObserver.start();\n        this.valueObserver.start();\n        this.targetObserver.start();\n        this.outletObserver.start();\n        try {\n            this.controller.connect();\n            this.logDebugActivity(\"connect\");\n        }\n        catch (error) {\n            this.handleError(error, \"connecting controller\");\n        }\n    }\n    refresh() {\n        this.outletObserver.refresh();\n    }\n    disconnect() {\n        try {\n            this.controller.disconnect();\n            this.logDebugActivity(\"disconnect\");\n        }\n        catch (error) {\n            this.handleError(error, \"disconnecting controller\");\n        }\n        this.outletObserver.stop();\n        this.targetObserver.stop();\n        this.valueObserver.stop();\n        this.bindingObserver.stop();\n    }\n    get application() {\n        return this.module.application;\n    }\n    get identifier() {\n        return this.module.identifier;\n    }\n    get schema() {\n        return this.application.schema;\n    }\n    get dispatcher() {\n        return this.application.dispatcher;\n    }\n    get element() {\n        return this.scope.element;\n    }\n    get parentElement() {\n        return this.element.parentElement;\n    }\n    handleError(error, message, detail = {}) {\n        const { identifier, controller, element } = this;\n        detail = Object.assign({ identifier, controller, element }, detail);\n        this.application.handleError(error, `Error ${message}`, detail);\n    }\n    targetConnected(element, name) {\n        this.invokeControllerMethod(`${name}TargetConnected`, element);\n    }\n    targetDisconnected(element, name) {\n        this.invokeControllerMethod(`${name}TargetDisconnected`, element);\n    }\n    outletConnected(outlet, element, name) {\n        this.invokeControllerMethod(`${namespaceCamelize(name)}OutletConnected`, outlet, element);\n    }\n    outletDisconnected(outlet, element, name) {\n        this.invokeControllerMethod(`${namespaceCamelize(name)}OutletDisconnected`, outlet, element);\n    }\n    invokeControllerMethod(methodName, ...args) {\n        const controller = this.controller;\n        if (typeof controller[methodName] == \"function\") {\n            controller[methodName](...args);\n        }\n    }\n}\n\nfunction bless(constructor) {\n    return shadow(constructor, getBlessedProperties(constructor));\n}\nfunction shadow(constructor, properties) {\n    const shadowConstructor = extend(constructor);\n    const shadowProperties = getShadowProperties(constructor.prototype, properties);\n    Object.defineProperties(shadowConstructor.prototype, shadowProperties);\n    return shadowConstructor;\n}\nfunction getBlessedProperties(constructor) {\n    const blessings = readInheritableStaticArrayValues(constructor, \"blessings\");\n    return blessings.reduce((blessedProperties, blessing) => {\n        const properties = blessing(constructor);\n        for (const key in properties) {\n            const descriptor = blessedProperties[key] || {};\n            blessedProperties[key] = Object.assign(descriptor, properties[key]);\n        }\n        return blessedProperties;\n    }, {});\n}\nfunction getShadowProperties(prototype, properties) {\n    return getOwnKeys(properties).reduce((shadowProperties, key) => {\n        const descriptor = getShadowedDescriptor(prototype, properties, key);\n        if (descriptor) {\n            Object.assign(shadowProperties, { [key]: descriptor });\n        }\n        return shadowProperties;\n    }, {});\n}\nfunction getShadowedDescriptor(prototype, properties, key) {\n    const shadowingDescriptor = Object.getOwnPropertyDescriptor(prototype, key);\n    const shadowedByValue = shadowingDescriptor && \"value\" in shadowingDescriptor;\n    if (!shadowedByValue) {\n        const descriptor = Object.getOwnPropertyDescriptor(properties, key).value;\n        if (shadowingDescriptor) {\n            descriptor.get = shadowingDescriptor.get || descriptor.get;\n            descriptor.set = shadowingDescriptor.set || descriptor.set;\n        }\n        return descriptor;\n    }\n}\nconst getOwnKeys = (() => {\n    if (typeof Object.getOwnPropertySymbols == \"function\") {\n        return (object) => [...Object.getOwnPropertyNames(object), ...Object.getOwnPropertySymbols(object)];\n    }\n    else {\n        return Object.getOwnPropertyNames;\n    }\n})();\nconst extend = (() => {\n    function extendWithReflect(constructor) {\n        function extended() {\n            return Reflect.construct(constructor, arguments, new.target);\n        }\n        extended.prototype = Object.create(constructor.prototype, {\n            constructor: { value: extended },\n        });\n        Reflect.setPrototypeOf(extended, constructor);\n        return extended;\n    }\n    function testReflectExtension() {\n        const a = function () {\n            this.a.call(this);\n        };\n        const b = extendWithReflect(a);\n        b.prototype.a = function () { };\n        return new b();\n    }\n    try {\n        testReflectExtension();\n        return extendWithReflect;\n    }\n    catch (error) {\n        return (constructor) => class extended extends constructor {\n        };\n    }\n})();\n\nfunction blessDefinition(definition) {\n    return {\n        identifier: definition.identifier,\n        controllerConstructor: bless(definition.controllerConstructor),\n    };\n}\n\nclass Module {\n    constructor(application, definition) {\n        this.application = application;\n        this.definition = blessDefinition(definition);\n        this.contextsByScope = new WeakMap();\n        this.connectedContexts = new Set();\n    }\n    get identifier() {\n        return this.definition.identifier;\n    }\n    get controllerConstructor() {\n        return this.definition.controllerConstructor;\n    }\n    get contexts() {\n        return Array.from(this.connectedContexts);\n    }\n    connectContextForScope(scope) {\n        const context = this.fetchContextForScope(scope);\n        this.connectedContexts.add(context);\n        context.connect();\n    }\n    disconnectContextForScope(scope) {\n        const context = this.contextsByScope.get(scope);\n        if (context) {\n            this.connectedContexts.delete(context);\n            context.disconnect();\n        }\n    }\n    fetchContextForScope(scope) {\n        let context = this.contextsByScope.get(scope);\n        if (!context) {\n            context = new Context(this, scope);\n            this.contextsByScope.set(scope, context);\n        }\n        return context;\n    }\n}\n\nclass ClassMap {\n    constructor(scope) {\n        this.scope = scope;\n    }\n    has(name) {\n        return this.data.has(this.getDataKey(name));\n    }\n    get(name) {\n        return this.getAll(name)[0];\n    }\n    getAll(name) {\n        const tokenString = this.data.get(this.getDataKey(name)) || \"\";\n        return tokenize(tokenString);\n    }\n    getAttributeName(name) {\n        return this.data.getAttributeNameForKey(this.getDataKey(name));\n    }\n    getDataKey(name) {\n        return `${name}-class`;\n    }\n    get data() {\n        return this.scope.data;\n    }\n}\n\nclass DataMap {\n    constructor(scope) {\n        this.scope = scope;\n    }\n    get element() {\n        return this.scope.element;\n    }\n    get identifier() {\n        return this.scope.identifier;\n    }\n    get(key) {\n        const name = this.getAttributeNameForKey(key);\n        return this.element.getAttribute(name);\n    }\n    set(key, value) {\n        const name = this.getAttributeNameForKey(key);\n        this.element.setAttribute(name, value);\n        return this.get(key);\n    }\n    has(key) {\n        const name = this.getAttributeNameForKey(key);\n        return this.element.hasAttribute(name);\n    }\n    delete(key) {\n        if (this.has(key)) {\n            const name = this.getAttributeNameForKey(key);\n            this.element.removeAttribute(name);\n            return true;\n        }\n        else {\n            return false;\n        }\n    }\n    getAttributeNameForKey(key) {\n        return `data-${this.identifier}-${dasherize(key)}`;\n    }\n}\n\nclass Guide {\n    constructor(logger) {\n        this.warnedKeysByObject = new WeakMap();\n        this.logger = logger;\n    }\n    warn(object, key, message) {\n        let warnedKeys = this.warnedKeysByObject.get(object);\n        if (!warnedKeys) {\n            warnedKeys = new Set();\n            this.warnedKeysByObject.set(object, warnedKeys);\n        }\n        if (!warnedKeys.has(key)) {\n            warnedKeys.add(key);\n            this.logger.warn(message, object);\n        }\n    }\n}\n\nfunction attributeValueContainsToken(attributeName, token) {\n    return `[${attributeName}~=\"${token}\"]`;\n}\n\nclass TargetSet {\n    constructor(scope) {\n        this.scope = scope;\n    }\n    get element() {\n        return this.scope.element;\n    }\n    get identifier() {\n        return this.scope.identifier;\n    }\n    get schema() {\n        return this.scope.schema;\n    }\n    has(targetName) {\n        return this.find(targetName) != null;\n    }\n    find(...targetNames) {\n        return targetNames.reduce((target, targetName) => target || this.findTarget(targetName) || this.findLegacyTarget(targetName), undefined);\n    }\n    findAll(...targetNames) {\n        return targetNames.reduce((targets, targetName) => [\n            ...targets,\n            ...this.findAllTargets(targetName),\n            ...this.findAllLegacyTargets(targetName),\n        ], []);\n    }\n    findTarget(targetName) {\n        const selector = this.getSelectorForTargetName(targetName);\n        return this.scope.findElement(selector);\n    }\n    findAllTargets(targetName) {\n        const selector = this.getSelectorForTargetName(targetName);\n        return this.scope.findAllElements(selector);\n    }\n    getSelectorForTargetName(targetName) {\n        const attributeName = this.schema.targetAttributeForScope(this.identifier);\n        return attributeValueContainsToken(attributeName, targetName);\n    }\n    findLegacyTarget(targetName) {\n        const selector = this.getLegacySelectorForTargetName(targetName);\n        return this.deprecate(this.scope.findElement(selector), targetName);\n    }\n    findAllLegacyTargets(targetName) {\n        const selector = this.getLegacySelectorForTargetName(targetName);\n        return this.scope.findAllElements(selector).map((element) => this.deprecate(element, targetName));\n    }\n    getLegacySelectorForTargetName(targetName) {\n        const targetDescriptor = `${this.identifier}.${targetName}`;\n        return attributeValueContainsToken(this.schema.targetAttribute, targetDescriptor);\n    }\n    deprecate(element, targetName) {\n        if (element) {\n            const { identifier } = this;\n            const attributeName = this.schema.targetAttribute;\n            const revisedAttributeName = this.schema.targetAttributeForScope(identifier);\n            this.guide.warn(element, `target:${targetName}`, `Please replace ${attributeName}=\"${identifier}.${targetName}\" with ${revisedAttributeName}=\"${targetName}\". ` +\n                `The ${attributeName} attribute is deprecated and will be removed in a future version of Stimulus.`);\n        }\n        return element;\n    }\n    get guide() {\n        return this.scope.guide;\n    }\n}\n\nclass OutletSet {\n    constructor(scope, controllerElement) {\n        this.scope = scope;\n        this.controllerElement = controllerElement;\n    }\n    get element() {\n        return this.scope.element;\n    }\n    get identifier() {\n        return this.scope.identifier;\n    }\n    get schema() {\n        return this.scope.schema;\n    }\n    has(outletName) {\n        return this.find(outletName) != null;\n    }\n    find(...outletNames) {\n        return outletNames.reduce((outlet, outletName) => outlet || this.findOutlet(outletName), undefined);\n    }\n    findAll(...outletNames) {\n        return outletNames.reduce((outlets, outletName) => [...outlets, ...this.findAllOutlets(outletName)], []);\n    }\n    getSelectorForOutletName(outletName) {\n        const attributeName = this.schema.outletAttributeForScope(this.identifier, outletName);\n        return this.controllerElement.getAttribute(attributeName);\n    }\n    findOutlet(outletName) {\n        const selector = this.getSelectorForOutletName(outletName);\n        if (selector)\n            return this.findElement(selector, outletName);\n    }\n    findAllOutlets(outletName) {\n        const selector = this.getSelectorForOutletName(outletName);\n        return selector ? this.findAllElements(selector, outletName) : [];\n    }\n    findElement(selector, outletName) {\n        const elements = this.scope.queryElements(selector);\n        return elements.filter((element) => this.matchesElement(element, selector, outletName))[0];\n    }\n    findAllElements(selector, outletName) {\n        const elements = this.scope.queryElements(selector);\n        return elements.filter((element) => this.matchesElement(element, selector, outletName));\n    }\n    matchesElement(element, selector, outletName) {\n        const controllerAttribute = element.getAttribute(this.scope.schema.controllerAttribute) || \"\";\n        return element.matches(selector) && controllerAttribute.split(\" \").includes(outletName);\n    }\n}\n\nclass Scope {\n    constructor(schema, element, identifier, logger) {\n        this.targets = new TargetSet(this);\n        this.classes = new ClassMap(this);\n        this.data = new DataMap(this);\n        this.containsElement = (element) => {\n            return element.closest(this.controllerSelector) === this.element;\n        };\n        this.schema = schema;\n        this.element = element;\n        this.identifier = identifier;\n        this.guide = new Guide(logger);\n        this.outlets = new OutletSet(this.documentScope, element);\n    }\n    findElement(selector) {\n        return this.element.matches(selector) ? this.element : this.queryElements(selector).find(this.containsElement);\n    }\n    findAllElements(selector) {\n        return [\n            ...(this.element.matches(selector) ? [this.element] : []),\n            ...this.queryElements(selector).filter(this.containsElement),\n        ];\n    }\n    queryElements(selector) {\n        return Array.from(this.element.querySelectorAll(selector));\n    }\n    get controllerSelector() {\n        return attributeValueContainsToken(this.schema.controllerAttribute, this.identifier);\n    }\n    get isDocumentScope() {\n        return this.element === document.documentElement;\n    }\n    get documentScope() {\n        return this.isDocumentScope\n            ? this\n            : new Scope(this.schema, document.documentElement, this.identifier, this.guide.logger);\n    }\n}\n\nclass ScopeObserver {\n    constructor(element, schema, delegate) {\n        this.element = element;\n        this.schema = schema;\n        this.delegate = delegate;\n        this.valueListObserver = new ValueListObserver(this.element, this.controllerAttribute, this);\n        this.scopesByIdentifierByElement = new WeakMap();\n        this.scopeReferenceCounts = new WeakMap();\n    }\n    start() {\n        this.valueListObserver.start();\n    }\n    stop() {\n        this.valueListObserver.stop();\n    }\n    get controllerAttribute() {\n        return this.schema.controllerAttribute;\n    }\n    parseValueForToken(token) {\n        const { element, content: identifier } = token;\n        const scopesByIdentifier = this.fetchScopesByIdentifierForElement(element);\n        let scope = scopesByIdentifier.get(identifier);\n        if (!scope) {\n            scope = this.delegate.createScopeForElementAndIdentifier(element, identifier);\n            scopesByIdentifier.set(identifier, scope);\n        }\n        return scope;\n    }\n    elementMatchedValue(element, value) {\n        const referenceCount = (this.scopeReferenceCounts.get(value) || 0) + 1;\n        this.scopeReferenceCounts.set(value, referenceCount);\n        if (referenceCount == 1) {\n            this.delegate.scopeConnected(value);\n        }\n    }\n    elementUnmatchedValue(element, value) {\n        const referenceCount = this.scopeReferenceCounts.get(value);\n        if (referenceCount) {\n            this.scopeReferenceCounts.set(value, referenceCount - 1);\n            if (referenceCount == 1) {\n                this.delegate.scopeDisconnected(value);\n            }\n        }\n    }\n    fetchScopesByIdentifierForElement(element) {\n        let scopesByIdentifier = this.scopesByIdentifierByElement.get(element);\n        if (!scopesByIdentifier) {\n            scopesByIdentifier = new Map();\n            this.scopesByIdentifierByElement.set(element, scopesByIdentifier);\n        }\n        return scopesByIdentifier;\n    }\n}\n\nclass Router {\n    constructor(application) {\n        this.application = application;\n        this.scopeObserver = new ScopeObserver(this.element, this.schema, this);\n        this.scopesByIdentifier = new Multimap();\n        this.modulesByIdentifier = new Map();\n    }\n    get element() {\n        return this.application.element;\n    }\n    get schema() {\n        return this.application.schema;\n    }\n    get logger() {\n        return this.application.logger;\n    }\n    get controllerAttribute() {\n        return this.schema.controllerAttribute;\n    }\n    get modules() {\n        return Array.from(this.modulesByIdentifier.values());\n    }\n    get contexts() {\n        return this.modules.reduce((contexts, module) => contexts.concat(module.contexts), []);\n    }\n    start() {\n        this.scopeObserver.start();\n    }\n    stop() {\n        this.scopeObserver.stop();\n    }\n    loadDefinition(definition) {\n        this.unloadIdentifier(definition.identifier);\n        const module = new Module(this.application, definition);\n        this.connectModule(module);\n        const afterLoad = definition.controllerConstructor.afterLoad;\n        if (afterLoad) {\n            afterLoad(definition.identifier, this.application);\n        }\n    }\n    unloadIdentifier(identifier) {\n        const module = this.modulesByIdentifier.get(identifier);\n        if (module) {\n            this.disconnectModule(module);\n        }\n    }\n    getContextForElementAndIdentifier(element, identifier) {\n        const module = this.modulesByIdentifier.get(identifier);\n        if (module) {\n            return module.contexts.find((context) => context.element == element);\n        }\n    }\n    handleError(error, message, detail) {\n        this.application.handleError(error, message, detail);\n    }\n    createScopeForElementAndIdentifier(element, identifier) {\n        return new Scope(this.schema, element, identifier, this.logger);\n    }\n    scopeConnected(scope) {\n        this.scopesByIdentifier.add(scope.identifier, scope);\n        const module = this.modulesByIdentifier.get(scope.identifier);\n        if (module) {\n            module.connectContextForScope(scope);\n        }\n    }\n    scopeDisconnected(scope) {\n        this.scopesByIdentifier.delete(scope.identifier, scope);\n        const module = this.modulesByIdentifier.get(scope.identifier);\n        if (module) {\n            module.disconnectContextForScope(scope);\n        }\n    }\n    connectModule(module) {\n        this.modulesByIdentifier.set(module.identifier, module);\n        const scopes = this.scopesByIdentifier.getValuesForKey(module.identifier);\n        scopes.forEach((scope) => module.connectContextForScope(scope));\n    }\n    disconnectModule(module) {\n        this.modulesByIdentifier.delete(module.identifier);\n        const scopes = this.scopesByIdentifier.getValuesForKey(module.identifier);\n        scopes.forEach((scope) => module.disconnectContextForScope(scope));\n    }\n}\n\nconst defaultSchema = {\n    controllerAttribute: \"data-controller\",\n    actionAttribute: \"data-action\",\n    targetAttribute: \"data-target\",\n    targetAttributeForScope: (identifier) => `data-${identifier}-target`,\n    outletAttributeForScope: (identifier, outlet) => `data-${identifier}-${outlet}-outlet`,\n    keyMappings: Object.assign(Object.assign({ enter: \"Enter\", tab: \"Tab\", esc: \"Escape\", space: \" \", up: \"ArrowUp\", down: \"ArrowDown\", left: \"ArrowLeft\", right: \"ArrowRight\", home: \"Home\", end: \"End\" }, objectFromEntries(\"abcdefghijklmnopqrstuvwxyz\".split(\"\").map((c) => [c, c]))), objectFromEntries(\"0123456789\".split(\"\").map((n) => [n, n]))),\n};\nfunction objectFromEntries(array) {\n    return array.reduce((memo, [k, v]) => (Object.assign(Object.assign({}, memo), { [k]: v })), {});\n}\n\nclass Application {\n    constructor(element = document.documentElement, schema = defaultSchema) {\n        this.logger = console;\n        this.debug = false;\n        this.logDebugActivity = (identifier, functionName, detail = {}) => {\n            if (this.debug) {\n                this.logFormattedMessage(identifier, functionName, detail);\n            }\n        };\n        this.element = element;\n        this.schema = schema;\n        this.dispatcher = new Dispatcher(this);\n        this.router = new Router(this);\n        this.actionDescriptorFilters = Object.assign({}, defaultActionDescriptorFilters);\n    }\n    static start(element, schema) {\n        const application = new this(element, schema);\n        application.start();\n        return application;\n    }\n    async start() {\n        await domReady();\n        this.logDebugActivity(\"application\", \"starting\");\n        this.dispatcher.start();\n        this.router.start();\n        this.logDebugActivity(\"application\", \"start\");\n    }\n    stop() {\n        this.logDebugActivity(\"application\", \"stopping\");\n        this.dispatcher.stop();\n        this.router.stop();\n        this.logDebugActivity(\"application\", \"stop\");\n    }\n    register(identifier, controllerConstructor) {\n        this.load({ identifier, controllerConstructor });\n    }\n    registerActionOption(name, filter) {\n        this.actionDescriptorFilters[name] = filter;\n    }\n    load(head, ...rest) {\n        const definitions = Array.isArray(head) ? head : [head, ...rest];\n        definitions.forEach((definition) => {\n            if (definition.controllerConstructor.shouldLoad) {\n                this.router.loadDefinition(definition);\n            }\n        });\n    }\n    unload(head, ...rest) {\n        const identifiers = Array.isArray(head) ? head : [head, ...rest];\n        identifiers.forEach((identifier) => this.router.unloadIdentifier(identifier));\n    }\n    get controllers() {\n        return this.router.contexts.map((context) => context.controller);\n    }\n    getControllerForElementAndIdentifier(element, identifier) {\n        const context = this.router.getContextForElementAndIdentifier(element, identifier);\n        return context ? context.controller : null;\n    }\n    handleError(error, message, detail) {\n        var _a;\n        this.logger.error(`%s\\n\\n%o\\n\\n%o`, message, error, detail);\n        (_a = window.onerror) === null || _a === void 0 ? void 0 : _a.call(window, message, \"\", 0, 0, error);\n    }\n    logFormattedMessage(identifier, functionName, detail = {}) {\n        detail = Object.assign({ application: this }, detail);\n        this.logger.groupCollapsed(`${identifier} #${functionName}`);\n        this.logger.log(\"details:\", Object.assign({}, detail));\n        this.logger.groupEnd();\n    }\n}\nfunction domReady() {\n    return new Promise((resolve) => {\n        if (document.readyState == \"loading\") {\n            document.addEventListener(\"DOMContentLoaded\", () => resolve());\n        }\n        else {\n            resolve();\n        }\n    });\n}\n\nfunction ClassPropertiesBlessing(constructor) {\n    const classes = readInheritableStaticArrayValues(constructor, \"classes\");\n    return classes.reduce((properties, classDefinition) => {\n        return Object.assign(properties, propertiesForClassDefinition(classDefinition));\n    }, {});\n}\nfunction propertiesForClassDefinition(key) {\n    return {\n        [`${key}Class`]: {\n            get() {\n                const { classes } = this;\n                if (classes.has(key)) {\n                    return classes.get(key);\n                }\n                else {\n                    const attribute = classes.getAttributeName(key);\n                    throw new Error(`Missing attribute \"${attribute}\"`);\n                }\n            },\n        },\n        [`${key}Classes`]: {\n            get() {\n                return this.classes.getAll(key);\n            },\n        },\n        [`has${capitalize(key)}Class`]: {\n            get() {\n                return this.classes.has(key);\n            },\n        },\n    };\n}\n\nfunction OutletPropertiesBlessing(constructor) {\n    const outlets = readInheritableStaticArrayValues(constructor, \"outlets\");\n    return outlets.reduce((properties, outletDefinition) => {\n        return Object.assign(properties, propertiesForOutletDefinition(outletDefinition));\n    }, {});\n}\nfunction propertiesForOutletDefinition(name) {\n    const camelizedName = namespaceCamelize(name);\n    return {\n        [`${camelizedName}Outlet`]: {\n            get() {\n                const outlet = this.outlets.find(name);\n                if (outlet) {\n                    const outletController = this.application.getControllerForElementAndIdentifier(outlet, name);\n                    if (outletController) {\n                        return outletController;\n                    }\n                    else {\n                        throw new Error(`Missing \"data-controller=${name}\" attribute on outlet element for \"${this.identifier}\" controller`);\n                    }\n                }\n                throw new Error(`Missing outlet element \"${name}\" for \"${this.identifier}\" controller`);\n            },\n        },\n        [`${camelizedName}Outlets`]: {\n            get() {\n                const outlets = this.outlets.findAll(name);\n                if (outlets.length > 0) {\n                    return outlets\n                        .map((outlet) => {\n                        const controller = this.application.getControllerForElementAndIdentifier(outlet, name);\n                        if (controller) {\n                            return controller;\n                        }\n                        else {\n                            console.warn(`The provided outlet element is missing the outlet controller \"${name}\" for \"${this.identifier}\"`, outlet);\n                        }\n                    })\n                        .filter((controller) => controller);\n                }\n                return [];\n            },\n        },\n        [`${camelizedName}OutletElement`]: {\n            get() {\n                const outlet = this.outlets.find(name);\n                if (outlet) {\n                    return outlet;\n                }\n                else {\n                    throw new Error(`Missing outlet element \"${name}\" for \"${this.identifier}\" controller`);\n                }\n            },\n        },\n        [`${camelizedName}OutletElements`]: {\n            get() {\n                return this.outlets.findAll(name);\n            },\n        },\n        [`has${capitalize(camelizedName)}Outlet`]: {\n            get() {\n                return this.outlets.has(name);\n            },\n        },\n    };\n}\n\nfunction TargetPropertiesBlessing(constructor) {\n    const targets = readInheritableStaticArrayValues(constructor, \"targets\");\n    return targets.reduce((properties, targetDefinition) => {\n        return Object.assign(properties, propertiesForTargetDefinition(targetDefinition));\n    }, {});\n}\nfunction propertiesForTargetDefinition(name) {\n    return {\n        [`${name}Target`]: {\n            get() {\n                const target = this.targets.find(name);\n                if (target) {\n                    return target;\n                }\n                else {\n                    throw new Error(`Missing target element \"${name}\" for \"${this.identifier}\" controller`);\n                }\n            },\n        },\n        [`${name}Targets`]: {\n            get() {\n                return this.targets.findAll(name);\n            },\n        },\n        [`has${capitalize(name)}Target`]: {\n            get() {\n                return this.targets.has(name);\n            },\n        },\n    };\n}\n\nfunction ValuePropertiesBlessing(constructor) {\n    const valueDefinitionPairs = readInheritableStaticObjectPairs(constructor, \"values\");\n    const propertyDescriptorMap = {\n        valueDescriptorMap: {\n            get() {\n                return valueDefinitionPairs.reduce((result, valueDefinitionPair) => {\n                    const valueDescriptor = parseValueDefinitionPair(valueDefinitionPair, this.identifier);\n                    const attributeName = this.data.getAttributeNameForKey(valueDescriptor.key);\n                    return Object.assign(result, { [attributeName]: valueDescriptor });\n                }, {});\n            },\n        },\n    };\n    return valueDefinitionPairs.reduce((properties, valueDefinitionPair) => {\n        return Object.assign(properties, propertiesForValueDefinitionPair(valueDefinitionPair));\n    }, propertyDescriptorMap);\n}\nfunction propertiesForValueDefinitionPair(valueDefinitionPair, controller) {\n    const definition = parseValueDefinitionPair(valueDefinitionPair, controller);\n    const { key, name, reader: read, writer: write } = definition;\n    return {\n        [name]: {\n            get() {\n                const value = this.data.get(key);\n                if (value !== null) {\n                    return read(value);\n                }\n                else {\n                    return definition.defaultValue;\n                }\n            },\n            set(value) {\n                if (value === undefined) {\n                    this.data.delete(key);\n                }\n                else {\n                    this.data.set(key, write(value));\n                }\n            },\n        },\n        [`has${capitalize(name)}`]: {\n            get() {\n                return this.data.has(key) || definition.hasCustomDefaultValue;\n            },\n        },\n    };\n}\nfunction parseValueDefinitionPair([token, typeDefinition], controller) {\n    return valueDescriptorForTokenAndTypeDefinition({\n        controller,\n        token,\n        typeDefinition,\n    });\n}\nfunction parseValueTypeConstant(constant) {\n    switch (constant) {\n        case Array:\n            return \"array\";\n        case Boolean:\n            return \"boolean\";\n        case Number:\n            return \"number\";\n        case Object:\n            return \"object\";\n        case String:\n            return \"string\";\n    }\n}\nfunction parseValueTypeDefault(defaultValue) {\n    switch (typeof defaultValue) {\n        case \"boolean\":\n            return \"boolean\";\n        case \"number\":\n            return \"number\";\n        case \"string\":\n            return \"string\";\n    }\n    if (Array.isArray(defaultValue))\n        return \"array\";\n    if (Object.prototype.toString.call(defaultValue) === \"[object Object]\")\n        return \"object\";\n}\nfunction parseValueTypeObject(payload) {\n    const typeFromObject = parseValueTypeConstant(payload.typeObject.type);\n    if (!typeFromObject)\n        return;\n    const defaultValueType = parseValueTypeDefault(payload.typeObject.default);\n    if (typeFromObject !== defaultValueType) {\n        const propertyPath = payload.controller ? `${payload.controller}.${payload.token}` : payload.token;\n        throw new Error(`The specified default value for the Stimulus Value \"${propertyPath}\" must match the defined type \"${typeFromObject}\". The provided default value of \"${payload.typeObject.default}\" is of type \"${defaultValueType}\".`);\n    }\n    return typeFromObject;\n}\nfunction parseValueTypeDefinition(payload) {\n    const typeFromObject = parseValueTypeObject({\n        controller: payload.controller,\n        token: payload.token,\n        typeObject: payload.typeDefinition,\n    });\n    const typeFromDefaultValue = parseValueTypeDefault(payload.typeDefinition);\n    const typeFromConstant = parseValueTypeConstant(payload.typeDefinition);\n    const type = typeFromObject || typeFromDefaultValue || typeFromConstant;\n    if (type)\n        return type;\n    const propertyPath = payload.controller ? `${payload.controller}.${payload.typeDefinition}` : payload.token;\n    throw new Error(`Unknown value type \"${propertyPath}\" for \"${payload.token}\" value`);\n}\nfunction defaultValueForDefinition(typeDefinition) {\n    const constant = parseValueTypeConstant(typeDefinition);\n    if (constant)\n        return defaultValuesByType[constant];\n    const defaultValue = typeDefinition.default;\n    if (defaultValue !== undefined)\n        return defaultValue;\n    return typeDefinition;\n}\nfunction valueDescriptorForTokenAndTypeDefinition(payload) {\n    const key = `${dasherize(payload.token)}-value`;\n    const type = parseValueTypeDefinition(payload);\n    return {\n        type,\n        key,\n        name: camelize(key),\n        get defaultValue() {\n            return defaultValueForDefinition(payload.typeDefinition);\n        },\n        get hasCustomDefaultValue() {\n            return parseValueTypeDefault(payload.typeDefinition) !== undefined;\n        },\n        reader: readers[type],\n        writer: writers[type] || writers.default,\n    };\n}\nconst defaultValuesByType = {\n    get array() {\n        return [];\n    },\n    boolean: false,\n    number: 0,\n    get object() {\n        return {};\n    },\n    string: \"\",\n};\nconst readers = {\n    array(value) {\n        const array = JSON.parse(value);\n        if (!Array.isArray(array)) {\n            throw new TypeError(`expected value of type \"array\" but instead got value \"${value}\" of type \"${parseValueTypeDefault(array)}\"`);\n        }\n        return array;\n    },\n    boolean(value) {\n        return !(value == \"0\" || String(value).toLowerCase() == \"false\");\n    },\n    number(value) {\n        return Number(value);\n    },\n    object(value) {\n        const object = JSON.parse(value);\n        if (object === null || typeof object != \"object\" || Array.isArray(object)) {\n            throw new TypeError(`expected value of type \"object\" but instead got value \"${value}\" of type \"${parseValueTypeDefault(object)}\"`);\n        }\n        return object;\n    },\n    string(value) {\n        return value;\n    },\n};\nconst writers = {\n    default: writeString,\n    array: writeJSON,\n    object: writeJSON,\n};\nfunction writeJSON(value) {\n    return JSON.stringify(value);\n}\nfunction writeString(value) {\n    return `${value}`;\n}\n\nclass Controller {\n    constructor(context) {\n        this.context = context;\n    }\n    static get shouldLoad() {\n        return true;\n    }\n    static afterLoad(_identifier, _application) {\n        return;\n    }\n    get application() {\n        return this.context.application;\n    }\n    get scope() {\n        return this.context.scope;\n    }\n    get element() {\n        return this.scope.element;\n    }\n    get identifier() {\n        return this.scope.identifier;\n    }\n    get targets() {\n        return this.scope.targets;\n    }\n    get outlets() {\n        return this.scope.outlets;\n    }\n    get classes() {\n        return this.scope.classes;\n    }\n    get data() {\n        return this.scope.data;\n    }\n    initialize() {\n    }\n    connect() {\n    }\n    disconnect() {\n    }\n    dispatch(eventName, { target = this.element, detail = {}, prefix = this.identifier, bubbles = true, cancelable = true } = {}) {\n        const type = prefix ? `${prefix}:${eventName}` : eventName;\n        const event = new CustomEvent(type, { detail, bubbles, cancelable });\n        target.dispatchEvent(event);\n        return event;\n    }\n}\nController.blessings = [\n    ClassPropertiesBlessing,\n    TargetPropertiesBlessing,\n    ValuePropertiesBlessing,\n    OutletPropertiesBlessing,\n];\nController.targets = [];\nController.outlets = [];\nController.values = {};\n\nexport { Application, AttributeObserver, Context, Controller, ElementObserver, IndexedMultimap, Multimap, SelectorObserver, StringMapObserver, TokenListObserver, ValueListObserver, add, defaultSchema, del, fetch, prune };\n", "import { Controller } from \"@hotwired/stimulus\"\n\nconst optionSelector = \"[role='option']:not([aria-disabled])\"\nconst activeSelector = \"[aria-selected='true']\"\n\nexport default class Autocomplete extends Controller {\n  static targets = [\"input\", \"hidden\", \"results\"]\n  static classes = [\"selected\"]\n  static values = {\n    ready: Boolean,\n    submitOnEnter: Boolean,\n    url: String,\n    minLength: Number,\n  }\n\n  connect() {\n    this.close()\n\n    if(!this.inputTarget.hasAttribute(\"autocomplete\")) this.inputTarget.setAttribute(\"autocomplete\", \"off\")\n    this.inputTarget.setAttribute(\"spellcheck\", \"false\")\n\n    this.mouseDown = false\n\n    this.onInputChange = debounce(this.onInputChange, 300)\n\n    this.inputTarget.addEventListener(\"keydown\", this.onKeydown)\n    this.inputTarget.addEventListener(\"blur\", this.onInputBlur)\n    this.inputTarget.addEventListener(\"input\", this.onInputChange)\n    this.resultsTarget.addEventListener(\"mousedown\", this.onResultsMouseDown)\n    this.resultsTarget.addEventListener(\"click\", this.onResultsClick)\n\n    if (this.inputTarget.hasAttribute(\"autofocus\")) {\n      this.inputTarget.focus()\n    }\n\n    this.readyValue = true\n  }\n\n  disconnect() {\n    if (this.hasInputTarget) {\n      this.inputTarget.removeEventListener(\"keydown\", this.onKeydown)\n      this.inputTarget.removeEventListener(\"focus\", this.onInputFocus)\n      this.inputTarget.removeEventListener(\"blur\", this.onInputBlur)\n      this.inputTarget.removeEventListener(\"input\", this.onInputChange)\n    }\n\n    if (this.hasResultsTarget) {\n      this.resultsTarget.removeEventListener(\"mousedown\", this.onResultsMouseDown)\n      this.resultsTarget.removeEventListener(\"click\", this.onResultsClick)\n    }\n  }\n\n  sibling(next) {\n    const options = this.options\n    const selected = this.selectedOption\n    const index = options.indexOf(selected)\n    const sibling = next ? options[index + 1] : options[index - 1]\n    const def = next ? options[0] : options[options.length - 1]\n    return sibling || def\n  }\n\n  select(target) {\n    const previouslySelected = this.selectedOption\n    if (previouslySelected) {\n      previouslySelected.removeAttribute(\"aria-selected\")\n      previouslySelected.classList.remove(...this.selectedClassesOrDefault)\n    }\n\n    target.setAttribute(\"aria-selected\", \"true\")\n    target.classList.add(...this.selectedClassesOrDefault)\n    this.inputTarget.setAttribute(\"aria-activedescendant\", target.id)\n    target.scrollIntoView({ behavior: \"smooth\", block: \"nearest\" })\n  }\n\n  onKeydown = (event) => {\n    const handler = this[`on${event.key}Keydown`]\n    if (handler) handler(event)\n  }\n\n  onEscapeKeydown = (event) => {\n    if (!this.resultsShown) return\n\n    this.hideAndRemoveOptions()\n    event.stopPropagation()\n    event.preventDefault()\n  }\n\n  onArrowDownKeydown = (event) => {\n    const item = this.sibling(true)\n    if (item) this.select(item)\n    event.preventDefault()\n  }\n\n  onArrowUpKeydown = (event) => {\n    const item = this.sibling(false)\n    if (item) this.select(item)\n    event.preventDefault()\n  }\n\n  onTabKeydown = (event) => {\n    const selected = this.selectedOption\n    if (selected) this.commit(selected)\n  }\n\n  onEnterKeydown = (event) => {\n    const selected = this.selectedOption\n    if (selected && this.resultsShown) {\n      this.commit(selected)\n      if (!this.hasSubmitOnEnterValue) {\n        event.preventDefault()\n      }\n    }\n  }\n\n  onInputBlur = () => {\n    if (this.mouseDown) return\n    this.close()\n  }\n\n  commit(selected) {\n    if (selected.getAttribute(\"aria-disabled\") === \"true\") return\n\n    if (selected instanceof HTMLAnchorElement) {\n      selected.click()\n      this.close()\n      return\n    }\n\n    const textValue = selected.getAttribute(\"data-autocomplete-label\") || selected.textContent.trim()\n    const value = selected.getAttribute(\"data-autocomplete-value\") || textValue\n    this.inputTarget.value = textValue\n\n    if (this.hasHiddenTarget) {\n      this.hiddenTarget.value = value\n      this.hiddenTarget.dispatchEvent(new Event(\"input\"))\n      this.hiddenTarget.dispatchEvent(new Event(\"change\"))\n    } else {\n      this.inputTarget.value = value\n    }\n\n    this.inputTarget.focus()\n    this.hideAndRemoveOptions()\n\n    this.element.dispatchEvent(\n      new CustomEvent(\"autocomplete.change\", {\n        bubbles: true,\n        detail: { value: value, textValue: textValue, selected: selected }\n      })\n    )\n  }\n\n  clear() {\n    this.inputTarget.value = \"\"\n    if (this.hasHiddenTarget) this.hiddenTarget.value = \"\"\n  }\n\n  onResultsClick = (event) => {\n    if (!(event.target instanceof Element)) return\n    const selected = event.target.closest(optionSelector)\n    if (selected) this.commit(selected)\n  }\n\n  onResultsMouseDown = () => {\n    this.mouseDown = true\n    this.resultsTarget.addEventListener(\"mouseup\", () => {\n      this.mouseDown = false\n    }, { once: true })\n  }\n\n  onInputChange = () => {\n    this.element.removeAttribute(\"value\")\n    if (this.hasHiddenTarget) this.hiddenTarget.value = \"\"\n\n    const query = this.inputTarget.value.trim()\n    if (query && query.length >= this.minLengthValue) {\n      this.fetchResults(query)\n    } else {\n      this.hideAndRemoveOptions()\n    }\n  }\n\n  identifyOptions() {\n    let id = 0\n    const optionsWithoutId = this.resultsTarget.querySelectorAll(`${optionSelector}:not([id])`)\n    optionsWithoutId.forEach((el) => {\n      el.id = `${this.resultsTarget.id}-option-${id++}`\n    })\n  }\n\n  hideAndRemoveOptions() {\n    this.close()\n    this.resultsTarget.innerHTML = null\n  }\n\n  fetchResults = async (query) => {\n    if (!this.hasUrlValue) return\n\n    const url = this.buildURL(query)\n    try {\n      this.element.dispatchEvent(new CustomEvent(\"loadstart\"))\n      const html = await this.doFetch(url)\n      this.replaceResults(html)\n      this.element.dispatchEvent(new CustomEvent(\"load\"))\n      this.element.dispatchEvent(new CustomEvent(\"loadend\"))\n    } catch(error) {\n      this.element.dispatchEvent(new CustomEvent(\"error\"))\n      this.element.dispatchEvent(new CustomEvent(\"loadend\"))\n      throw error\n    }\n  }\n\n  buildURL(query) {\n    const url = new URL(this.urlValue, window.location.href)\n    const params = new URLSearchParams(url.search.slice(1))\n    params.append(\"q\", query)\n    url.search = params.toString()\n\n    return url.toString()\n  }\n\n  doFetch = async (url) => {\n    const response = await fetch(url, this.optionsForFetch())\n    const html = await response.text()\n    return html\n  }\n\n  replaceResults(html) {\n    this.resultsTarget.innerHTML = html\n    this.identifyOptions()\n    if (!!this.options) {\n      this.open()\n    } else {\n      this.close()\n    }\n  }\n\n  open() {\n    if (this.resultsShown) return\n\n    this.resultsShown = true\n    this.element.setAttribute(\"aria-expanded\", \"true\")\n    this.element.dispatchEvent(\n      new CustomEvent(\"toggle\", {\n        detail: { action: \"open\", inputTarget: this.inputTarget, resultsTarget: this.resultsTarget }\n      })\n    )\n  }\n\n  close() {\n    if (!this.resultsShown) return\n\n    this.resultsShown = false\n    this.inputTarget.removeAttribute(\"aria-activedescendant\")\n    this.element.setAttribute(\"aria-expanded\", \"false\")\n    this.element.dispatchEvent(\n      new CustomEvent(\"toggle\", {\n        detail: { action: \"close\", inputTarget: this.inputTarget, resultsTarget: this.resultsTarget }\n      })\n    )\n  }\n\n  get resultsShown() {\n    return !this.resultsTarget.hidden\n  }\n\n  set resultsShown(value) {\n    this.resultsTarget.hidden = !value\n  }\n\n  get options() {\n    return Array.from(this.resultsTarget.querySelectorAll(optionSelector))\n  }\n\n  get selectedOption() {\n    return this.resultsTarget.querySelector(activeSelector)\n  }\n\n  get selectedClassesOrDefault() {\n    return this.hasSelectedClass ? this.selectedClasses : [\"active\"]\n  }\n\n  optionsForFetch() {\n    return { headers: { \"X-Requested-With\": \"XMLHttpRequest\" } } // override if you need\n  }\n}\n\nconst debounce = (fn, delay = 10) => {\n  let timeoutId = null\n\n  return (...args) => {\n    clearTimeout(timeoutId)\n    timeoutId = setTimeout(fn, delay)\n  }\n}\n\nexport { Autocomplete }\n", "import { Controller } from \"@hotwired/stimulus\";\nconst _Dialog = class _Dialog extends Controller {\n  initialize() {\n    this.forceClose = this.forceClose.bind(this);\n  }\n  connect() {\n    this.openValue && this.open(), document.addEventListener(\"turbo:before-render\", this.forceClose);\n  }\n  disconnect() {\n    document.removeEventListener(\"turbo:before-render\", this.forceClose);\n  }\n  open() {\n    this.dialogTarget.showModal();\n  }\n  close() {\n    this.dialogTarget.setAttribute(\"closing\", \"\"), Promise.all(this.dialogTarget.getAnimations().map((animation) => animation.finished)).then(() => {\n      this.dialogTarget.removeAttribute(\"closing\"), this.dialogTarget.close();\n    });\n  }\n  backdropClose(event) {\n    event.target === this.dialogTarget && this.close();\n  }\n  forceClose() {\n    this.dialogTarget.close();\n  }\n};\n_Dialog.targets = [\"dialog\"], _Dialog.values = {\n  open: {\n    type: Boolean,\n    default: !1\n  }\n};\nlet Dialog = _Dialog;\nexport {\n  Dialog as default\n};\n", "import { Controller as n } from \"@hotwired/stimulus\";\nfunction r(t, e) {\n  let i;\n  return (...o) => {\n    const s = this;\n    clearTimeout(i), i = setTimeout(() => t.apply(s, o), e);\n  };\n}\nclass l extends n {\n  initialize() {\n    this.autogrow = this.autogrow.bind(this);\n  }\n  connect() {\n    this.element.style.overflow = \"hidden\";\n    const e = this.resizeDebounceDelayValue;\n    this.onResize = e > 0 ? r(this.autogrow, e) : this.autogrow, this.autogrow(), this.element.addEventListener(\"input\", this.autogrow), window.addEventListener(\"resize\", this.onResize);\n  }\n  disconnect() {\n    window.removeEventListener(\"resize\", this.onResize);\n  }\n  autogrow() {\n    this.element.style.height = \"auto\", this.element.style.height = `${this.element.scrollHeight}px`;\n  }\n}\nl.values = {\n  resizeDebounceDelay: {\n    type: Number,\n    default: 100\n  }\n};\nexport {\n  l as default\n};\n", "import { Application } from \"@hotwired/stimulus\"\nimport Autocomplete from \"stimulus-autocomplete\"\nimport Dialog from \"@stimulus-components/dialog\"\nimport TextareaAutogrow from \"stimulus-textarea-autogrow\"\n\nconst application = Application.start()\n\n// Configure Stimulus development experience\napplication.debug = false\nwindow.Stimulus = application\n\napplication.register(\"autocomplete\", Autocomplete)\napplication.register(\"dialog\", Dialog)\napplication.register(\"textarea-autogrow\", TextareaAutogrow)\n\nexport { application }\n", "import { Controller } from \"@hotwired/stimulus\"\nimport { Turbo } from \"@hotwired/turbo-rails\"\n\nexport default class extends Controller {\n  static targets = [\"param\", \"trigger\"]\n\n  trigger() {\n    let separator, href, params, query\n\n    href = this.triggerTarget.getAttribute(\"href\")\n\n    params = this.paramTargets.filter((p) => {\n      return p.value\n    })\n\n    query = this.serialize(params)\n\n    if (query == \"\") return\n\n    if (href.match(/\\?/)) {\n      separator = \"&\"\n    } else {\n      separator = \"?\"\n    }\n\n    Turbo.visit(`${href}${separator}${query}`, { action: \"replace\" })\n  }\n\n  handleKeypress(e) {\n    if (e.keyCode == 13) {\n      this.trigger()\n    }\n  }\n\n  handleClick(e) {\n    e.preventDefault()\n\n    this.trigger()\n  }\n\n  serialize(params) {\n    let obj = {}\n\n    params.forEach((param) => {\n      obj[param.getAttribute(\"name\")] = param.value\n    })\n\n    return new URLSearchParams(obj).toString()\n  }\n}\n", "import {Controller} from \"@hotwired/stimulus\"\n\n// Connects to data-controller=\"admin--locale-copy\"\nexport default class extends Controller {\n  static targets = [\"input\"]\n  static values = {\n    fromLocale: String,\n    toLocale: String,\n  }\n\n  copy(fromLocale = \"sk\", toLocale = \"cs\") {\n    const fromLocaleValues = this.inputTargets.filter((field) => field.dataset.language === fromLocale)\n    const toLocaleValues = this.inputTargets.filter((field) => field.dataset.language === toLocale)\n\n    toLocaleValues.forEach((field, index) => {\n      if (field.value !== '' && field.value !== \"<div class=\\\"trix-content\\\">\\n  \\n</div>\") {\n        return\n      }\n\n      field.value = fromLocaleValues[index].value\n    })\n  }\n\n  copyFromSkToCsClick(e) {\n    e.preventDefault()\n\n    this.copy(\"sk\",\"cs\")\n  }\n\n  copyFromCsToSkClick(e) {\n    e.preventDefault()\n\n    this.copy(\"cs\",\"sk\")\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n  static values = {\n    eventName: String,\n    eventObject: String,\n    currentUserId: String,\n  }\n\n  connect() {\n    window.dataLayer = window.dataLayer || []\n\n    this.push()\n  }\n\n  push() {\n    window.dataLayer.push({ ecommerce: null })\n\n    window.dataLayer.push({\n      ...(this.eventName && this.eventName),\n      ...(this.userId && this.userId),\n      ...(this.ecommerceObject && this.ecommerceObject),\n    })\n  }\n\n  get eventName() {\n    if (this.hasEventNameValue && this.eventNameValue.length > 0) {\n      return { event: this.eventNameValue.toString() }\n    } else {\n      return null\n    }\n  }\n\n  get ecommerceObject() {\n    if (this.hasEventObjectValue && this.eventObjectValue.length > 0) {\n      return { ecommerce: JSON.parse(this.eventObjectValue) }\n    } else {\n      return null\n    }\n  }\n\n  get userId() {\n    if (this.hasCurrentUserIdValue && this.currentUserIdValue.length > 0) {\n      return { userId: this.currentUserIdValue.toString() }\n    } else {\n      return null\n    }\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\n// import Rails from \"@rails/ujs\"\n\nexport default class extends Controller {\n  submit() {\n    // Rails.fire(this.element, \"submit\")\n  }\n}\n", "export class FetchResponse {\n  constructor (response) {\n    this.response = response\n  }\n\n  get statusCode () {\n    return this.response.status\n  }\n\n  get redirected () {\n    return this.response.redirected\n  }\n\n  get ok () {\n    return this.response.ok\n  }\n\n  get unauthenticated () {\n    return this.statusCode === 401\n  }\n\n  get unprocessableEntity () {\n    return this.statusCode === 422\n  }\n\n  get authenticationURL () {\n    return this.response.headers.get('WWW-Authenticate')\n  }\n\n  get contentType () {\n    const contentType = this.response.headers.get('Content-Type') || ''\n\n    return contentType.replace(/;.*$/, '')\n  }\n\n  get headers () {\n    return this.response.headers\n  }\n\n  get html () {\n    if (this.contentType.match(/^(application|text)\\/(html|xhtml\\+xml)$/)) {\n      return this.text\n    }\n\n    return Promise.reject(new Error(`Expected an HTML response but got \"${this.contentType}\" instead`))\n  }\n\n  get json () {\n    if (this.contentType.match(/^application\\/.*json$/)) {\n      return this.responseJson || (this.responseJson = this.response.json())\n    }\n\n    return Promise.reject(new Error(`Expected a JSON response but got \"${this.contentType}\" instead`))\n  }\n\n  get text () {\n    return this.responseText || (this.responseText = this.response.text())\n  }\n\n  get isTurboStream () {\n    return this.contentType.match(/^text\\/vnd\\.turbo-stream\\.html/)\n  }\n\n  async renderTurboStream () {\n    if (this.isTurboStream) {\n      if (window.Turbo) {\n        await window.Turbo.renderStreamMessage(await this.text)\n      } else {\n        console.warn('You must set `window.Turbo = Turbo` to automatically process Turbo Stream events with request.js')\n      }\n    } else {\n      return Promise.reject(new Error(`Expected a Turbo Stream response but got \"${this.contentType}\" instead`))\n    }\n  }\n}\n", "export class RequestInterceptor {\n  static register (interceptor) {\n    this.interceptor = interceptor\n  }\n\n  static get () {\n    return this.interceptor\n  }\n\n  static reset () {\n    this.interceptor = undefined\n  }\n}\n", "export function getCookie (name) {\n  const cookies = document.cookie ? document.cookie.split('; ') : []\n  const prefix = `${encodeURIComponent(name)}=`\n  const cookie = cookies.find(cookie => cookie.startsWith(prefix))\n\n  if (cookie) {\n    const value = cookie.split('=').slice(1).join('=')\n\n    if (value) {\n      return decodeURIComponent(value)\n    }\n  }\n}\n\nexport function compact (object) {\n  const result = {}\n\n  for (const key in object) {\n    const value = object[key]\n    if (value !== undefined) {\n      result[key] = value\n    }\n  }\n\n  return result\n}\n\nexport function metaContent (name) {\n  const element = document.head.querySelector(`meta[name=\"${name}\"]`)\n  return element && element.content\n}\n\nexport function stringEntriesFromFormData (formData) {\n  return [...formData].reduce((entries, [name, value]) => {\n    return entries.concat(typeof value === 'string' ? [[name, value]] : [])\n  }, [])\n}\n\nexport function mergeEntries (searchParams, entries) {\n  for (const [name, value] of entries) {\n    if (value instanceof window.File) continue\n\n    if (searchParams.has(name)) {\n      searchParams.delete(name)\n      searchParams.set(name, value)\n    } else {\n      searchParams.append(name, value)\n    }\n  }\n}\n", "import { FetchResponse } from './fetch_response'\nimport { RequestInterceptor } from './request_interceptor'\nimport { getCookie, compact, metaContent, stringEntriesFromFormData, mergeEntries } from './lib/utils'\n\nexport class FetchRequest {\n  constructor (method, url, options = {}) {\n    this.method = method\n    this.options = options\n    this.originalUrl = url.toString()\n  }\n\n  async perform () {\n    try {\n      const requestInterceptor = RequestInterceptor.get()\n      if (requestInterceptor) {\n        await requestInterceptor(this)\n      }\n    } catch (error) {\n      console.error(error)\n    }\n\n    const response = new FetchResponse(await window.fetch(this.url, this.fetchOptions))\n\n    if (response.unauthenticated && response.authenticationURL) {\n      return Promise.reject(window.location.href = response.authenticationURL)\n    }\n\n    if (response.ok && response.isTurboStream) {\n      await response.renderTurboStream()\n    }\n\n    return response\n  }\n\n  addHeader (key, value) {\n    const headers = this.additionalHeaders\n    headers[key] = value\n    this.options.headers = headers\n  }\n\n  get fetchOptions () {\n    return {\n      method: this.method.toUpperCase(),\n      headers: this.headers,\n      body: this.formattedBody,\n      signal: this.signal,\n      credentials: 'same-origin',\n      redirect: this.redirect\n    }\n  }\n\n  get headers () {\n    return compact(\n      Object.assign({\n        'X-Requested-With': 'XMLHttpRequest',\n        'X-CSRF-Token': this.csrfToken,\n        'Content-Type': this.contentType,\n        Accept: this.accept\n      },\n      this.additionalHeaders)\n    )\n  }\n\n  get csrfToken () {\n    return getCookie(metaContent('csrf-param')) || metaContent('csrf-token')\n  }\n\n  get contentType () {\n    if (this.options.contentType) {\n      return this.options.contentType\n    } else if (this.body == null || this.body instanceof window.FormData) {\n      return undefined\n    } else if (this.body instanceof window.File) {\n      return this.body.type\n    }\n\n    return 'application/json'\n  }\n\n  get accept () {\n    switch (this.responseKind) {\n      case 'html':\n        return 'text/html, application/xhtml+xml'\n      case 'turbo-stream':\n        return 'text/vnd.turbo-stream.html, text/html, application/xhtml+xml'\n      case 'json':\n        return 'application/json, application/vnd.api+json'\n      default:\n        return '*/*'\n    }\n  }\n\n  get body () {\n    return this.options.body\n  }\n\n  get query () {\n    const originalQuery = (this.originalUrl.split('?')[1] || '').split('#')[0]\n    const params = new URLSearchParams(originalQuery)\n\n    let requestQuery = this.options.query\n    if (requestQuery instanceof window.FormData) {\n      requestQuery = stringEntriesFromFormData(requestQuery)\n    } else if (requestQuery instanceof window.URLSearchParams) {\n      requestQuery = requestQuery.entries()\n    } else {\n      requestQuery = Object.entries(requestQuery || {})\n    }\n\n    mergeEntries(params, requestQuery)\n\n    const query = params.toString()\n    return (query.length > 0 ? `?${query}` : '')\n  }\n\n  get url () {\n    return (this.originalUrl.split('?')[0]).split('#')[0] + this.query\n  }\n\n  get responseKind () {\n    return this.options.responseKind || 'html'\n  }\n\n  get signal () {\n    return this.options.signal\n  }\n\n  get redirect () {\n    return this.options.redirect || 'follow'\n  }\n\n  get additionalHeaders () {\n    return this.options.headers || {}\n  }\n\n  get formattedBody () {\n    const bodyIsAString = Object.prototype.toString.call(this.body) === '[object String]'\n    const contentTypeIsJson = this.headers['Content-Type'] === 'application/json'\n\n    if (contentTypeIsJson && !bodyIsAString) {\n      return JSON.stringify(this.body)\n    }\n\n    return this.body\n  }\n}\n", "import { FetchRequest } from './fetch_request'\n\nasync function get (url, options) {\n  const request = new FetchRequest('get', url, options)\n  return request.perform()\n}\n\nasync function post (url, options) {\n  const request = new FetchRequest('post', url, options)\n  return request.perform()\n}\n\nasync function put (url, options) {\n  const request = new FetchRequest('put', url, options)\n  return request.perform()\n}\n\nasync function patch (url, options) {\n  const request = new FetchRequest('patch', url, options)\n  return request.perform()\n}\n\nasync function destroy (url, options) {\n  const request = new FetchRequest('delete', url, options)\n  return request.perform()\n}\n\nexport { get, post, put, patch, destroy }\n", "import { Controller } from \"@hotwired/stimulus\"\nimport { patch } from \"@rails/request.js\"\n\nexport default class extends Controller {\n  static classes = [\"autoplayButtonOn\", \"autoplayButtonOff\", \"autoplayTogglerOn\", \"autoplayTogglerOff\"]\n  static targets = [\"autoplayButton\", \"autoplayToggler\", \"autoplayOnLabel\", \"autoplayOffLabel\", \"video\"]\n\n  static values = {\n    autoplay: Boolean,\n    toggleAutoplayUrl: String,\n  }\n\n  async toggleAutoplay() {\n    const response = await patch(this.toggleAutoplayUrlValue, {\n      responseKind: \"json\",\n    })\n\n    if (response.ok) {\n      const json = await response.json\n\n      this.autoplayValue = json.autoplay\n    } else {\n      console.error(\"Error trying to toggle autoplay.\")\n    }\n  }\n\n  autoplayValueChanged() {\n    if(this.hasAutoplayButtonTarget){\n      if(this.autoplayValue){\n        this.autoplayButtonTarget.classList.add(...this.autoplayButtonOnClasses)\n        this.autoplayButtonTarget.classList.remove(...this.autoplayButtonOffClasses)\n      }\n      else{\n        this.autoplayButtonTarget.classList.add(...this.autoplayButtonOffClasses)\n        this.autoplayButtonTarget.classList.remove(...this.autoplayButtonOnClasses)\n      }\n    }\n\n    if(this.hasAutoplayTogglerTarget){\n      if(this.autoplayValue){\n        this.autoplayTogglerTarget.classList.add(...this.autoplayTogglerOnClasses)\n        this.autoplayTogglerTarget.classList.remove(...this.autoplayTogglerOffClasses)\n      }\n      else{\n        this.autoplayTogglerTarget.classList.add(...this.autoplayTogglerOffClasses)\n        this.autoplayTogglerTarget.classList.remove(...this.autoplayTogglerOnClasses)\n      }\n    }\n\n    if(this.hasAutoplayOnLabelTarget){\n      this.autoplayOnLabelTarget.classList.toggle(\"hidden\", !this.autoplayValue)\n    }\n\n    if(this.hasAutoplayOffLabelTarget){\n      this.autoplayOffLabelTarget.classList.toggle(\"hidden\", this.autoplayValue)\n    }\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\nimport { post } from \"@rails/request.js\"\nimport uniq from \"lodash/uniq\"\n\n// Connects to data-controller=\"b2b--enrollments-wizard\"\nexport default class extends Controller {\n  static targets = [\n    \"courseCheckbox\",\n    \"coursesCount\",\n    \"courseIdsInput\",\n    \"coursesBottomNavigation\",\n    \"employeeCheckbox\",\n    \"employeeIdsInput\",\n    \"employeesCount\",\n    \"employeesBottomNavigation\",\n    \"deadlineSelect\",\n  ]\n\n  static values = {\n    submitUrl: String,\n  }\n\n  initialize() {\n    this.initializeLocalStorage()\n  }\n\n  connect() {\n    this.resetStorage()\n\n    document.addEventListener(\"turbo:load\", () => {\n      this.initializeSelectedCourses()\n      this.updateSelectedCoursesCounter()\n      this.initializeSelectedEmployees()\n      this.updateSelectedEmployeesCounter()\n    })\n  }\n\n  handleCourseClick(e) {\n    const isChecked = e.target.checked\n    const courseId = e.target.value\n\n    const data = this.skmData\n\n    if (isChecked) {\n      data.skmEnrollmentsWizard.selectedCourses.push(courseId)\n    } else {\n      data.skmEnrollmentsWizard.selectedCourses.pop(courseId)\n    }\n\n    this.updateSkmData(data)\n  }\n\n  handleEmployeeClick(e) {\n    const isChecked = e.target.checked\n    const employeeId = e.target.value\n\n    const data = this.skmData\n\n    if (isChecked) {\n      data.skmEnrollmentsWizard.selectedEmployees.push(employeeId)\n    } else {\n      data.skmEnrollmentsWizard.selectedEmployees.pop(employeeId)\n    }\n\n    this.updateSkmData(data)\n  }\n\n  async submit(e) {\n    e.preventDefault()\n\n    const response = await post(this.submitUrlValue, {\n      body: {\n        course_ids: this.skmData.skmEnrollmentsWizard.selectedCourses,\n        employee_ids: this.skmData.skmEnrollmentsWizard.selectedEmployees,\n        deadline_in_weeks: this.selectedDeadline,\n      },\n      responseKind: \"turbo-stream\",\n    })\n\n    if (response.ok) {\n      this.resetStorage()\n    }\n  }\n\n  initializeSelectedCourses() {\n    const selectedCourses = this.selectedCourses\n\n    this.courseCheckboxTargets.forEach((courseCheckbox) => {\n      const courseId = courseCheckbox.value\n\n      courseCheckbox.checked = this.isCourseSelected(courseId, selectedCourses)\n    })\n  }\n\n  updateSelectedCoursesCounter() {\n    if (this.hasCoursesCountTarget) {\n      this.coursesCountTarget.innerHTML = this.selectedCourses.length\n    }\n\n    if (this.hasCoursesBottomNavigationTarget) {\n      this.coursesBottomNavigationTarget.hidden = this.selectedCourses.length == 0\n    }\n  }\n\n  async clearSelectedCourses() {\n    const data = JSON.parse(localStorage.getItem(\"skmData\"))\n\n    data.skmEnrollmentsWizard.selectedCourses = []\n\n    await this.updateSkmData(data)\n    this.initializeSelectedCourses()\n  }\n\n  updateSelectedEmployeesCounter() {\n    if (this.hasEmployeesCountTarget) {\n      this.employeesCountTarget.innerHTML = this.selectedEmployees.length\n    }\n\n    if (this.hasEmployeesBottomNavigationTarget) {\n      this.employeesBottomNavigationTarget.hidden = this.selectedEmployees.length == 0\n    }\n  }\n\n  initializeSelectedEmployees() {\n    const selectedEmployees = this.selectedCourses\n\n    this.employeeCheckboxTargets.forEach((employeeCheckbox) => {\n      const employeeId = employeeCheckbox.value\n\n      employeeCheckbox.checked = this.isEmployeeSelected(employeeId, selectedEmployees)\n    })\n  }\n\n  async clearSelectedEmployees() {\n    const data = this.skmData\n\n    data.skmEnrollmentsWizard.selectedEmployees = []\n\n    await this.updateSkmData(data)\n    this.initializeSelectedEmployees()\n  }\n\n  initializeLocalStorage() {\n    const defaultSkmData = {\n      skmEnrollmentsWizard: {\n        selectedCourses: [],\n        selectedEmployees: [],\n      },\n    }\n\n    if (localStorage.getItem(\"skmData\") == null) {\n      localStorage.setItem(\"skmData\", JSON.stringify(defaultSkmData))\n    }\n  }\n\n  resetStorage() {\n    localStorage.removeItem(\"skmData\")\n\n    this.initializeLocalStorage()\n    this.initializeSelectedCourses()\n    this.initializeSelectedEmployees()\n  }\n\n  updateSkmData(newData) {\n    newData.skmEnrollmentsWizard.selectedCourses = uniq(newData.skmEnrollmentsWizard.selectedCourses)\n    newData.skmEnrollmentsWizard.selectedEmployees = uniq(newData.skmEnrollmentsWizard.selectedEmployees)\n\n    localStorage.setItem(\"skmData\", JSON.stringify(newData))\n\n    this.updateSelectedCoursesCounter()\n    this.updateSelectedEmployeesCounter()\n  }\n\n  isCourseSelected(courseId, selectedCourses) {\n    return selectedCourses.indexOf(courseId) !== -1\n  }\n\n  isEmployeeSelected(employeeId, selectedEmployees) {\n    return selectedEmployees.indexOf(employeeId) !== -1\n  }\n\n  get skmData() {\n    return JSON.parse(localStorage.getItem(\"skmData\"))\n  }\n\n  get selectedCourses() {\n    return this.skmData.skmEnrollmentsWizard.selectedCourses\n  }\n\n  get selectedEmployees() {\n    return this.skmData.skmEnrollmentsWizard.selectedEmployees\n  }\n\n  get selectedDeadline() {\n    if (this.hasSelectedDeadlineTarget) {\n      return this.deadlineSelectTarget.value;\n    } else {\n      return 0;\n    }\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\nconst _debounce = require(\"lodash/debounce\")\n\n// Connects to data-controller=\"invitation-form\"\nexport default class extends Controller {\n  static targets = [\"userInput\", \"validAddresses\"]\n\n  initialize() {\n    this.input = _debounce(this.input, 300).bind(this)\n  }\n\n  connect() {\n    console.log(\"Hello, Stimulus!\", this.element)\n  }\n\n  input() {\n    const inputVal = this.userInputTarget.value\n    const regex = /([a-zA-Z0-9.+_-]+@[a-zA-Z0-9._-]+\\.[a-zA-Z0-9_-]+)/g\n    const match = inputVal.match(regex)\n    const matchedUnique = [...new Set(match)]\n\n    this.validAddressesTarget.value = JSON.stringify(matchedUnique)\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\n// TODO: Improve toggler controller, refactor to use values\nexport default class extends Controller {\n  static targets = [\"toggler\", \"toggleable\"];\n\n  toggle() {\n    this.toggleableTarget.classList.toggle(\"hidden\");\n\n    let textContainer = this.togglerTarget.querySelector(\".toggle-text\");\n    const showText = this.togglerTarget.getAttribute(\"data-b2b--widgets-show-text\");\n    const hideText = this.togglerTarget.getAttribute(\"data-b2b--widgets-hide-text\");\n\n    if (this.toggleableTarget.classList.contains(\"hidden\")) {\n      textContainer.textContent = showText;\n    } else {\n      textContainer.textContent = hideText;\n    }\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\n\n// Connects to data-controller=\"above-page-banner\"\nexport default class extends Controller {\n  // Local variables\n\n  // External variables\n  static values = {\n    open: Boolean,\n    slug: String\n  }\n\n  initialize() {\n    // Check for existing settings\n    this.readLsSettings();\n  }\n\n  // Read settings from local storage\n  readLsSettings() {\n    // Read local storage settings\n    const bannerLS = localStorage.getItem(this.slugValue);\n\n    // If the local storage variable doesnt exist, create it (true)\n    if(!bannerLS){\n      this.openValue = true;\n    } else {\n      this.openValue = bannerLS;\n    }\n  }\n\n  // Write settings to local storage\n  storeLsSettings() {\n    localStorage.setItem(this.slugValue, this.openValue)\n  }\n\n  // Close banner\n  close() {\n    this.openValue = false;\n  }\n\n  // Watcher for change in open state\n  openValueChanged(){\n    this.storeLsSettings()\n    this.element.classList.toggle('hidden', !this.openValue)\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\nimport _throttle from \"lodash/throttle\"\n\n// Connects to data-controller=\"carousel\"\nexport default class extends Controller {\n  // Local vars\n  responsiveSkip = 0\n  nothingToScroll = false\n  childrenInViewport = 0\n\n  // External+reactive vars\n  static values = {\n    skip: Number,\n    activeDot: Number,\n    numberOfDots: Number,\n    isAtStart: Boolean,\n    isAtEnd: Boolean\n  }\n\n  // Targets\n  static targets = [\n    \"slider\",\n    \"pagination\",\n    \"next\",\n    \"previous\"\n  ]\n\n  connect() {\n    // Abort initialization if slider doesn't have any children - EDGE CASE\n    if (!this.sliderTarget.firstElementChild) return\n\n    //Event listeners\n    this.sliderTarget.addEventListener('scroll', _throttle(()=>{\n      this.carouselChecks();\n    }, 100))\n\n    // Intersection observer - track visible children - add/remove visible class\n    // Intersection Observer Callback fn\n    const observerCB = entries => {\n      entries.forEach(entry => {\n        entry.target.classList.toggle(\"visible\", entry.isIntersecting);\n      })\n    };\n    // Intersection Observer Opts\n    const observerOptions = {\n      root: this.sliderTarget,\n      rootMargin: '0px',\n      threshold: 0.5\n    };\n    // Create Intersection Observer\n    const observer = new IntersectionObserver(observerCB, observerOptions);\n    // Attach observer to DOM instances\n    const observerTargets = this.sliderTarget.querySelectorAll('.slide');\n    observerTargets.forEach(target => observer.observe(target));\n\n    // Resize Observer\n    //Observer callback fn\n    const resizeObserverCb = entries => {\n      this.carouselChecks();\n    }\n\n    const resizeObserver = new ResizeObserver(resizeObserverCb);\n    resizeObserver.observe(this.sliderTarget)\n\n    //OnLoad setup\n    this.carouselChecks();\n  }\n\n  next() {\n    this.to((current, offset) => current + (offset * this.responsiveSkip))\n  }\n\n  prev() {\n    this.to((current, offset) => current - (offset * this.responsiveSkip))\n  }\n\n  jumpTo(event) {\n    this.to((current, offset) => event.params.index * (offset * this.responsiveSkip))\n  }\n\n  to(strategy) {\n    let slider = this.sliderTarget\n\n    if (!slider) return;\n\n    let current = slider.scrollLeft\n    let offset = slider.firstElementChild.clientWidth\n\n    slider.scrollTo({\n      left: strategy(current, offset),\n      behavior: 'smooth'\n    })\n  }\n\n  // Provides basic carousel checks - is Carousel at edge, how many children are visible, resolves active dot\n  carouselChecks() {\n    const slider = this.sliderTarget\n    if (!slider) return;\n\n    const current = slider.scrollLeft;\n    const sliderWidth = slider.clientWidth;\n    const offset = slider.firstElementChild.clientWidth;\n    const nrOfChildren = slider.children.length;\n\n    // Determines if carousel is at its edges or if its even scrollable\n    this.isAtStartValue = current == 0 ? true : false;\n    this.isAtEndValue = slider.clientWidth > slider.scrollWidth - (current + 10) ? true : false; //10 je tam pridane len ako buffer kvoli nespravnemu zaokruhlovaniu cisiel JS\n    this.nothingToScroll = slider.scrollWidth > slider.clientWidth ? false : true;\n\n    // Determines the number of visible slides\n    this.childrenInViewport = Math.round(sliderWidth / offset);\n\n    // Resolves if the skip is fixed number or if the carousel should skip number of slides based on visible slides (responsive option)\n    const resolveSkip = () => {\n      if (this.skipValue === 0) {\n        return this.childrenInViewport\n      } else {\n        return this.skipValue\n      }\n    }\n\n    // If there are less elements in viewport than it is set to skip at any given directional step(left/right) than set the responsive skip to that of the viewport width\n    if (resolveSkip() > this.childrenInViewport) {\n      this.responsiveSkip = this.childrenInViewport;\n    } else {\n      this.responsiveSkip = resolveSkip();\n    }\n\n    // Determines number of navigation dots in carousel\n    // nrOfChildren - this.childrenInViewport + 1\n    const isThereRemainder = (nrOfChildren - this.childrenInViewport) % this.responsiveSkip ? 1 : 0;\n    this.numberOfDotsValue = Math.floor((nrOfChildren - this.childrenInViewport) / this.responsiveSkip) + 1 + isThereRemainder;\n\n    //Resolves active page within carousel\n    this.activeDotValue = Math.ceil(current / (offset * this.responsiveSkip));\n  }\n\n  // Watcher for changes in number of Pagination dots - re-renders pagination\n  numberOfDotsValueChanged() {\n    if (this.hasPaginationTarget) {\n      // Get the dot template\n      const dotTemplate = this.element.querySelector(\"#temp_navigation_dot\");\n\n      // First we clear the pagination container, so that it can be redrawn\n      this.paginationTarget.innerHTML = \"\";\n\n      // than we render new number of dots based on numberOfDotsValue\n      for (let index = 0; index < this.numberOfDotsValue; index++) {\n        let dotClone = dotTemplate.content.firstElementChild.cloneNode(true);\n        dotClone.dataset.carouselIndexParam = index;\n        this.paginationTarget.appendChild(dotClone)\n      }\n\n      // Render current active DOT\n      this.activeDotValueChanged();\n    }\n  }\n\n  // Watcher for changes in active dot - renders active dot in pagination\n  activeDotValueChanged() {\n    if (this.hasPaginationTarget && this.paginationTarget.childNodes.length) {\n      this.paginationTarget.childNodes.forEach(el => {\n        el.classList.toggle(\"bg-corporate\", el.dataset.carouselIndexParam == this.activeDotValue)\n        el.classList.toggle(\"w-8\", el.dataset.carouselIndexParam == this.activeDotValue)\n\n        el.classList.toggle(\"bg-slate-300\", el.dataset.carouselIndexParam != this.activeDotValue)\n      })\n    }\n  }\n\n  // Watcher for if its carousel at its starting edge - disables the previous navigation button\n  isAtStartValueChanged() {\n    if (this.hasPreviousTarget) {\n      this.previousTarget.disabled = this.isAtStartValue;\n    }\n  }\n\n  // Watcher for if its carousel at its ending edge - disables the next navigation button\n  isAtEndValueChanged() {\n    if (this.hasNextTarget) {\n      this.nextTarget.disabled = this.isAtEndValue;\n    }\n  }\n\n}\n", "import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n  pushHistoryState(e) {\n    window.history.pushState(null, \"\", e.currentTarget.dataset.chapterPath)\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n  static targets = [\"query\", \"item\"]\n\n  toggleInput(event) {\n    const element = this.queryTarget\n    element.classList.toggle(\"d-none\")\n    element.focus()\n\n    event.preventDefault()\n  }\n\n  search() {\n    const element = this.queryTarget\n    const query = element.value\n\n    // Clear initial state\n    const sections = document.querySelectorAll(\"[data-expand]\")\n    for (let section of sections) {\n      section.removeAttribute(\"data-expand\")\n      section.classList.remove(\"show\")\n      section.previousElementSibling.parentElement.classList.add(\"d-none\")\n    }\n\n    // Filter items\n    const items = this.itemTargets\n    for (let item of items) {\n      let title = item.dataset.title\n      let sectionDomId = item.dataset.sectionDomId\n      let section = document.getElementById(sectionDomId)\n\n      if (title.search(new RegExp(query, \"i\")) < 0) {\n        item.classList.add(\"d-none\")\n      } else {\n        item.classList.remove(\"d-none\")\n        section.dataset.expand = \"true\"\n      }\n    }\n\n    // Expand sections with results\n    const sectionsToExpand = document.querySelectorAll(\"[data-expand=true]\")\n    for (let section of sectionsToExpand) {\n      section.classList.add(\"show\")\n      section.previousElementSibling.parentElement.classList.remove(\"d-none\")\n    }\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\nimport Chart from \"chart.js/auto\"\n\nexport default class extends Controller {\n  static values = { type: String, data: Array }\n\n  connect() {\n    var myChart = new Chart(this.element, {\n      type: this.typeValue,\n      data: {\n        datasets: [\n          {\n            label: \"\",\n            data: this.dataValue,\n            backgroundColor: [\"#bbe0e6\", \"#e3f6f9\"],\n            borderColor: [\"transparent\"],\n          },\n        ],\n      },\n      options: {\n        width: 200,\n      },\n    })\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\n\n// Connects to data-controller=\"checkbox-select-all\"\nexport default class extends Controller {\n  static values = {\n    checkboxCount: Number,\n  }\n\n  static targets = [\"checkboxAll\", \"checkbox\", \"checkedCount\"]\n\n  initialize() {\n    this.toggle = this.toggle.bind(this)\n    this.refresh = this.refresh.bind(this)\n  }\n\n  connect() {\n    if (!this.hasCheckboxAllTarget) return\n\n    this.checkboxAllTarget.addEventListener(\"change\", this.toggle)\n    this.checkboxTargets.forEach((checkbox) => checkbox.addEventListener(\"change\", this.refresh))\n\n    this.refresh()\n  }\n\n  disconnect() {\n    if (!this.hasCheckboxAllTarget) return\n\n    this.checkboxAllTarget.removeEventListener(\"change\", this.toggle)\n    this.checkboxTargets.forEach((checkbox) => checkbox.removeEventListener(\"change\", this.refresh))\n  }\n\n  toggle(e) {\n    e.preventDefault()\n\n    this.checkboxTargets.forEach((checkbox) => {\n      if(checkbox.disabled) return \n      checkbox.checked = e.target.checked\n      this.triggerInputEvent(checkbox)\n    })\n\n    this.refresh()\n  }\n\n  disableAll(e) {\n    e.preventDefault()\n\n    this.checkboxTargets.forEach((checkbox) => {\n      checkbox.checked = false;\n    })\n\n    this.refresh()\n  }\n\n  refresh() {\n    const checkboxesCount = this.checkboxTargets.length\n    const checkboxesCheckedCount = this.checked.length\n\n    this.checkedCountTargets.forEach((el)=>{\n      el.innerText = `${this.checked.length} / ${this.checkboxCountValue}`\n    })\n    this.checkboxAllTarget.checked = checkboxesCheckedCount > 0\n    this.checkboxAllTarget.indeterminate = checkboxesCheckedCount > 0 && checkboxesCheckedCount < checkboxesCount\n  }\n\n  triggerInputEvent(checkbox) {\n    const event = new Event(\"input\", { bubbles: false, cancelable: true })\n\n    checkbox.dispatchEvent(event)\n  }\n\n  reload(e) {\n    e.preventDefault()\n\n    const modal = document.getElementById(\"modal\")\n\n    if (modal) {\n      modal.reload()\n    }\n  }\n\n  get checked() {\n    return this.checkboxTargets.filter((checkbox) => {\n      return checkbox.checked && !checkbox.disabled\n    })\n  }\n\n  get unchecked() {\n    return this.checkboxTargets.filter((checkbox) => {\n      return !checkbox.checked\n    })\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\nimport { post } from \"@rails/request.js\"\nimport camelCase from \"lodash/camelCase\"\nimport debounce from \"lodash/debounce\"\n\nexport default class extends Controller {\n  static values = {\n    validationUrl: String,\n    validatableAttributes: Array,\n    originalSubmitButtonLabel: String,\n    alternativeSubmitButtonLabel: String,\n  }\n\n  static targets = [\n    \"companyId\",\n    \"billingFields\",\n    \"paymentMethods\",\n    \"form\",\n    \"invoiceFields\",\n    \"invoiceCheckbox\",\n    \"price\",\n    \"submit\",\n    \"submitButton\",\n    // \"vatId\",\n    // \"vatIdCheckbox\",\n    // \"vatIdInputGroup\",\n    \"voucherCheckbox\",\n    \"voucherCode\",\n    \"voucherCodeInputGroup\",\n    \"recurrenceCycle\",\n    \"recurrencePeriod\",\n  ]\n\n  initialize() {\n    this.validate = debounce(this.validateForm, 200).bind(this)\n  }\n\n  connect() {\n    this.validateForm()\n  }\n\n  async validateForm() {\n    const response = await post(this.validationUrl, {\n      body: {\n        company_id: this.companyId,\n        has_invoice: this.hasInvoice,\n        has_voucher: this.hasVoucherCode,\n        voucher_code: this.voucherCode,\n        has_vat_id: this.hasVatId,\n        // vat_id: this.vatId,\n        item_type: this.purchaseableType,\n        item_id: this.purchaseableId,\n        recurrence_cycle: this.recurrenceCycle,\n        recurrence_period: this.recurrencePeriod,\n      },\n      responseKind: \"json\",\n    })\n\n    if (response.ok) {\n      const json = await response.json\n\n      this.handlePriceChange(json.data.attributes)\n      this.handleValidationErrors(json.data.errors)\n    } else {\n      console.error(\"Validation failed.\")\n    }\n  }\n\n  handlePriceChange(attributes) {\n    this.submitTarget.innerHTML = attributes.submit_button_label\n    this.priceTarget.innerHTML = attributes.price_label\n\n    if (attributes.amount === 0) {\n      this.invoiceFieldsTarget.setAttribute(\"hidden\", true)\n      this.paymentMethodsTarget.setAttribute(\"hidden\", true)\n    } else {\n      this.invoiceFieldsTarget.removeAttribute(\"hidden\")\n      this.paymentMethodsTarget.removeAttribute(\"hidden\")\n    }\n  }\n\n  handleValidationErrors(errors) {\n    errors ||= []\n\n    // ['vat_id', 'voucher_code', ...].forEach()\n    this.validatableAttributesValue.forEach((attribute) => {\n      // Find corresponding error for attribute if any\n      const error = errors.find((e) => {\n        return e.attribute === attribute\n      })\n\n      if (error) {\n        // cleanup & hide validation block for error.attribute\n        const inputGroupTarget = this.inputGroupTargetFor(error)\n\n        this[inputGroupTarget].querySelector(\"[data-validation-errors]\").innerHTML = error.title\n      } else {\n        // render & show validation block for attribute\n        const inputGroupTarget = this.inputGroupTargetFor(attribute)\n\n        this[inputGroupTarget].querySelector(\"[data-validation-errors]\").innerHTML = \"\"\n      }\n    })\n  }\n\n  inputGroupTargetFor(identifier) {\n    // attribute_name -> attributeNameInputGroupTarget\n    let attribute = \"\"\n\n    if (typeof identifier === \"object\") {\n      attribute = camelCase(identifier.attribute)\n    } else if (typeof identifier === \"string\") {\n      attribute = camelCase(identifier)\n    } else {\n      console.error(\"Unknown identifier.\")\n    }\n\n    return `${attribute}InputGroupTarget`\n  }\n\n  disableSubmitButton() {\n    if (!this.hasSubmitButtonTarget) {\n      console.error(\"No submit button target found\")\n    } else {\n      this.submitButtonTarget.disabled = true\n    }\n  }\n\n  get companyId() {\n    return this.companyIdTarget.value.trim()\n  }\n\n  get purchaseableType() {\n    return this.formTarget.elements[\"payment_form[purchaseable_type]\"].value\n  }\n\n  get purchaseableId() {\n    return this.formTarget.elements[\"payment_form[purchaseable_id]\"].value\n  }\n\n  get hasInvoice() {\n    return this.invoiceCheckboxTarget.checked ? \"1\" : \"0\"\n  }\n\n  // get hasVatId() {\n  //   return this.vatIdCheckboxTarget.checked ? \"1\" : \"0\"\n  // }\n\n  // get vatId() {\n  //   return this.vatIdTarget.value.trim()\n  // }\n\n  get hasVoucherCode() {\n    return this.voucherCheckboxTarget.checked ? \"1\" : \"0\"\n  }\n\n  get voucherCode() {\n    return this.voucherCodeTarget.value.trim()\n  }\n\n  get validationUrl() {\n    return this.validationUrlValue\n  }\n\n  get recurrenceCycle() {\n    return this.recurrenceCycleTarget.value\n  }\n\n  get recurrencePeriod() {\n    return this.recurrencePeriodTarget.value\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\n\n// Connects to data-controller=\"checkout--purchase-as-gift\"\nexport default class extends Controller {\n  static targets = [\n    \"addressDeliveryFields\",\n    \"pickupPointDeliveryFields\",\n    \"contactDetailsFields\",\n    \"packetaPlace\",\n    \"packetaStreet\",\n    \"packetaZip\",\n    \"packetaCity\",\n    \"packetaEmptyState\",\n    \"packetaSelectedState\",\n    \"packetaPickupPointIdField\",\n    \"packetaPlaceField\",\n    \"packetaAddressField\",\n    \"packetaCityField\",\n    \"packetaZipField\",\n    \"validation\",\n  ]\n\n  static values = {\n    pickupPointSelected: Boolean,\n    locale: String,\n  }\n\n  connect() {\n    this.packetaApiKey = \"XXX XXX API550bc18b24dc5b37 XXX\"\n    this.packetaOptions = {\n      country: \"cz,sk\",\n      language: this.localeValue,\n    }\n\n    this.showSelectedPickupPoint = (point) => {\n      if (point) {\n        this.packetaPlaceTarget.innerText = point.place\n        this.packetaStreetTarget.innerText = point.street\n        this.packetaZipTarget.innerText = point.zip\n        this.packetaCityTarget.innerText = point.city\n\n        this.packetaPickupPointIdFieldTarget.value = point.id\n        this.packetaPlaceFieldTarget.value = point.place\n        this.packetaAddressFieldTarget.value = point.street\n        this.packetaCityFieldTarget.value = point.city\n        this.packetaZipFieldTarget.value = point.zip\n\n        this.setSelectedState()\n      } else {\n        this.setEmptyState()\n      }\n    }\n  }\n\n  selectAddressDelivery() {\n    this.contactDetailsFieldsTarget.classList.remove(\"hidden\")\n    this.addressDeliveryFieldsTarget.classList.remove(\"hidden\")\n    this.pickupPointDeliveryFieldsTarget.classList.add(\"hidden\")\n\n    this.clearValidations()\n  }\n\n  selectPickupPointDelivery() {\n    this.contactDetailsFieldsTarget.classList.remove(\"hidden\")\n    this.addressDeliveryFieldsTarget.classList.add(\"hidden\")\n    this.pickupPointDeliveryFieldsTarget.classList.remove(\"hidden\")\n\n    this.clearValidations()\n    if (!this.pickupPointSelectedValue) {\n      this.openWidgetModal()\n    }\n  }\n\n  openWidgetModal() {\n    window.Packeta.Widget.pick(this.packetaApiKey, this.showSelectedPickupPoint, this.packetaOptions)\n  }\n\n  setEmptyState() {\n    this.packetaEmptyStateTarget.classList.remove(\"hidden\")\n    this.packetaSelectedStateTarget.classList.add(\"hidden\")\n\n    this.pickupPointSelectedValue = false\n  }\n\n  setSelectedState() {\n    this.packetaEmptyStateTarget.classList.add(\"hidden\")\n    this.packetaSelectedStateTarget.classList.remove(\"hidden\")\n\n    this.pickupPointSelectedValue = true\n  }\n\n  clearValidations() {\n    this.validationTargets.forEach((element) => {\n      element.innerText = \"\"\n    })\n  }\n}\n", "export var top = 'top';\nexport var bottom = 'bottom';\nexport var right = 'right';\nexport var left = 'left';\nexport var auto = 'auto';\nexport var basePlacements = [top, bottom, right, left];\nexport var start = 'start';\nexport var end = 'end';\nexport var clippingParents = 'clippingParents';\nexport var viewport = 'viewport';\nexport var popper = 'popper';\nexport var reference = 'reference';\nexport var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n  return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nexport var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n  return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []); // modifiers that need to read the DOM\n\nexport var beforeRead = 'beforeRead';\nexport var read = 'read';\nexport var afterRead = 'afterRead'; // pure-logic modifiers\n\nexport var beforeMain = 'beforeMain';\nexport var main = 'main';\nexport var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\nexport var beforeWrite = 'beforeWrite';\nexport var write = 'write';\nexport var afterWrite = 'afterWrite';\nexport var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];", "export default function getNodeName(element) {\n  return element ? (element.nodeName || '').toLowerCase() : null;\n}", "export default function getWindow(node) {\n  if (node == null) {\n    return window;\n  }\n\n  if (node.toString() !== '[object Window]') {\n    var ownerDocument = node.ownerDocument;\n    return ownerDocument ? ownerDocument.defaultView || window : window;\n  }\n\n  return node;\n}", "import getWindow from \"./getWindow.js\";\n\nfunction isElement(node) {\n  var OwnElement = getWindow(node).Element;\n  return node instanceof OwnElement || node instanceof Element;\n}\n\nfunction isHTMLElement(node) {\n  var OwnElement = getWindow(node).HTMLElement;\n  return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nfunction isShadowRoot(node) {\n  // IE 11 has no ShadowRoot\n  if (typeof ShadowRoot === 'undefined') {\n    return false;\n  }\n\n  var OwnElement = getWindow(node).ShadowRoot;\n  return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };", "import getNodeName from \"../dom-utils/getNodeName.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // This modifier takes the styles prepared by the `computeStyles` modifier\n// and applies them to the HTMLElements such as popper and arrow\n\nfunction applyStyles(_ref) {\n  var state = _ref.state;\n  Object.keys(state.elements).forEach(function (name) {\n    var style = state.styles[name] || {};\n    var attributes = state.attributes[name] || {};\n    var element = state.elements[name]; // arrow is optional + virtual elements\n\n    if (!isHTMLElement(element) || !getNodeName(element)) {\n      return;\n    } // Flow doesn't support to extend this property, but it's the most\n    // effective way to apply styles to an HTMLElement\n    // $FlowFixMe[cannot-write]\n\n\n    Object.assign(element.style, style);\n    Object.keys(attributes).forEach(function (name) {\n      var value = attributes[name];\n\n      if (value === false) {\n        element.removeAttribute(name);\n      } else {\n        element.setAttribute(name, value === true ? '' : value);\n      }\n    });\n  });\n}\n\nfunction effect(_ref2) {\n  var state = _ref2.state;\n  var initialStyles = {\n    popper: {\n      position: state.options.strategy,\n      left: '0',\n      top: '0',\n      margin: '0'\n    },\n    arrow: {\n      position: 'absolute'\n    },\n    reference: {}\n  };\n  Object.assign(state.elements.popper.style, initialStyles.popper);\n  state.styles = initialStyles;\n\n  if (state.elements.arrow) {\n    Object.assign(state.elements.arrow.style, initialStyles.arrow);\n  }\n\n  return function () {\n    Object.keys(state.elements).forEach(function (name) {\n      var element = state.elements[name];\n      var attributes = state.attributes[name] || {};\n      var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n      var style = styleProperties.reduce(function (style, property) {\n        style[property] = '';\n        return style;\n      }, {}); // arrow is optional + virtual elements\n\n      if (!isHTMLElement(element) || !getNodeName(element)) {\n        return;\n      }\n\n      Object.assign(element.style, style);\n      Object.keys(attributes).forEach(function (attribute) {\n        element.removeAttribute(attribute);\n      });\n    });\n  };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'applyStyles',\n  enabled: true,\n  phase: 'write',\n  fn: applyStyles,\n  effect: effect,\n  requires: ['computeStyles']\n};", "import { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n  return placement.split('-')[0];\n}", "export var max = Math.max;\nexport var min = Math.min;\nexport var round = Math.round;", "export default function getUAString() {\n  var uaData = navigator.userAgentData;\n\n  if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) {\n    return uaData.brands.map(function (item) {\n      return item.brand + \"/\" + item.version;\n    }).join(' ');\n  }\n\n  return navigator.userAgent;\n}", "import getUAString from \"../utils/userAgent.js\";\nexport default function isLayoutViewport() {\n  return !/^((?!chrome|android).)*safari/i.test(getUAString());\n}", "import { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport { round } from \"../utils/math.js\";\nimport getWindow from \"./getWindow.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getBoundingClientRect(element, includeScale, isFixedStrategy) {\n  if (includeScale === void 0) {\n    includeScale = false;\n  }\n\n  if (isFixedStrategy === void 0) {\n    isFixedStrategy = false;\n  }\n\n  var clientRect = element.getBoundingClientRect();\n  var scaleX = 1;\n  var scaleY = 1;\n\n  if (includeScale && isHTMLElement(element)) {\n    scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;\n    scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;\n  }\n\n  var _ref = isElement(element) ? getWindow(element) : window,\n      visualViewport = _ref.visualViewport;\n\n  var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;\n  var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;\n  var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;\n  var width = clientRect.width / scaleX;\n  var height = clientRect.height / scaleY;\n  return {\n    width: width,\n    height: height,\n    top: y,\n    right: x + width,\n    bottom: y + height,\n    left: x,\n    x: x,\n    y: y\n  };\n}", "import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n  var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n  // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n  var width = element.offsetWidth;\n  var height = element.offsetHeight;\n\n  if (Math.abs(clientRect.width - width) <= 1) {\n    width = clientRect.width;\n  }\n\n  if (Math.abs(clientRect.height - height) <= 1) {\n    height = clientRect.height;\n  }\n\n  return {\n    x: element.offsetLeft,\n    y: element.offsetTop,\n    width: width,\n    height: height\n  };\n}", "import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n  var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n  if (parent.contains(child)) {\n    return true;\n  } // then fallback to custom implementation with Shadow DOM support\n  else if (rootNode && isShadowRoot(rootNode)) {\n      var next = child;\n\n      do {\n        if (next && parent.isSameNode(next)) {\n          return true;\n        } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n        next = next.parentNode || next.host;\n      } while (next);\n    } // Give up, the result is false\n\n\n  return false;\n}", "import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n  return getWindow(element).getComputedStyle(element);\n}", "import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n  return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}", "import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n  // $FlowFixMe[incompatible-return]: assume body is always available\n  return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n  element.document) || window.document).documentElement;\n}", "import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n  if (getNodeName(element) === 'html') {\n    return element;\n  }\n\n  return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n    // $FlowFixMe[incompatible-return]\n    // $FlowFixMe[prop-missing]\n    element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n    element.parentNode || ( // DOM Element detected\n    isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n    // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n    getDocumentElement(element) // fallback\n\n  );\n}", "import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement, isShadowRoot } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getUAString from \"../utils/userAgent.js\";\n\nfunction getTrueOffsetParent(element) {\n  if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n  getComputedStyle(element).position === 'fixed') {\n    return null;\n  }\n\n  return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n  var isFirefox = /firefox/i.test(getUAString());\n  var isIE = /Trident/i.test(getUAString());\n\n  if (isIE && isHTMLElement(element)) {\n    // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n    var elementCss = getComputedStyle(element);\n\n    if (elementCss.position === 'fixed') {\n      return null;\n    }\n  }\n\n  var currentNode = getParentNode(element);\n\n  if (isShadowRoot(currentNode)) {\n    currentNode = currentNode.host;\n  }\n\n  while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n    var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n    // create a containing block.\n    // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n    if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n      return currentNode;\n    } else {\n      currentNode = currentNode.parentNode;\n    }\n  }\n\n  return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n  var window = getWindow(element);\n  var offsetParent = getTrueOffsetParent(element);\n\n  while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n    offsetParent = getTrueOffsetParent(offsetParent);\n  }\n\n  if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n    return window;\n  }\n\n  return offsetParent || getContainingBlock(element) || window;\n}", "export default function getMainAxisFromPlacement(placement) {\n  return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}", "import { max as mathMax, min as mathMin } from \"./math.js\";\nexport function within(min, value, max) {\n  return mathMax(min, mathMin(value, max));\n}\nexport function withinMaxClamp(min, value, max) {\n  var v = within(min, value, max);\n  return v > max ? max : v;\n}", "export default function getFreshSideObject() {\n  return {\n    top: 0,\n    right: 0,\n    bottom: 0,\n    left: 0\n  };\n}", "import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n  return Object.assign({}, getFreshSideObject(), paddingObject);\n}", "export default function expandToHashMap(value, keys) {\n  return keys.reduce(function (hashMap, key) {\n    hashMap[key] = value;\n    return hashMap;\n  }, {});\n}", "import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport { within } from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n  padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n    placement: state.placement\n  })) : padding;\n  return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n  var _state$modifiersData$;\n\n  var state = _ref.state,\n      name = _ref.name,\n      options = _ref.options;\n  var arrowElement = state.elements.arrow;\n  var popperOffsets = state.modifiersData.popperOffsets;\n  var basePlacement = getBasePlacement(state.placement);\n  var axis = getMainAxisFromPlacement(basePlacement);\n  var isVertical = [left, right].indexOf(basePlacement) >= 0;\n  var len = isVertical ? 'height' : 'width';\n\n  if (!arrowElement || !popperOffsets) {\n    return;\n  }\n\n  var paddingObject = toPaddingObject(options.padding, state);\n  var arrowRect = getLayoutRect(arrowElement);\n  var minProp = axis === 'y' ? top : left;\n  var maxProp = axis === 'y' ? bottom : right;\n  var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n  var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n  var arrowOffsetParent = getOffsetParent(arrowElement);\n  var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n  var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n  // outside of the popper bounds\n\n  var min = paddingObject[minProp];\n  var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n  var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n  var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n  var axisProp = axis;\n  state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n  var state = _ref2.state,\n      options = _ref2.options;\n  var _options$element = options.element,\n      arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n  if (arrowElement == null) {\n    return;\n  } // CSS selector\n\n\n  if (typeof arrowElement === 'string') {\n    arrowElement = state.elements.popper.querySelector(arrowElement);\n\n    if (!arrowElement) {\n      return;\n    }\n  }\n\n  if (process.env.NODE_ENV !== \"production\") {\n    if (!isHTMLElement(arrowElement)) {\n      console.error(['Popper: \"arrow\" element must be an HTMLElement (not an SVGElement).', 'To use an SVG arrow, wrap it in an HTMLElement that will be used as', 'the arrow.'].join(' '));\n    }\n  }\n\n  if (!contains(state.elements.popper, arrowElement)) {\n    if (process.env.NODE_ENV !== \"production\") {\n      console.error(['Popper: \"arrow\" modifier\\'s `element` must be a child of the popper', 'element.'].join(' '));\n    }\n\n    return;\n  }\n\n  state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'arrow',\n  enabled: true,\n  phase: 'main',\n  fn: arrow,\n  effect: effect,\n  requires: ['popperOffsets'],\n  requiresIfExists: ['preventOverflow']\n};", "export default function getVariation(placement) {\n  return placement.split('-')[1];\n}", "import { top, left, right, bottom, end } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n  top: 'auto',\n  right: 'auto',\n  bottom: 'auto',\n  left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref, win) {\n  var x = _ref.x,\n      y = _ref.y;\n  var dpr = win.devicePixelRatio || 1;\n  return {\n    x: round(x * dpr) / dpr || 0,\n    y: round(y * dpr) / dpr || 0\n  };\n}\n\nexport function mapToStyles(_ref2) {\n  var _Object$assign2;\n\n  var popper = _ref2.popper,\n      popperRect = _ref2.popperRect,\n      placement = _ref2.placement,\n      variation = _ref2.variation,\n      offsets = _ref2.offsets,\n      position = _ref2.position,\n      gpuAcceleration = _ref2.gpuAcceleration,\n      adaptive = _ref2.adaptive,\n      roundOffsets = _ref2.roundOffsets,\n      isFixed = _ref2.isFixed;\n  var _offsets$x = offsets.x,\n      x = _offsets$x === void 0 ? 0 : _offsets$x,\n      _offsets$y = offsets.y,\n      y = _offsets$y === void 0 ? 0 : _offsets$y;\n\n  var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({\n    x: x,\n    y: y\n  }) : {\n    x: x,\n    y: y\n  };\n\n  x = _ref3.x;\n  y = _ref3.y;\n  var hasX = offsets.hasOwnProperty('x');\n  var hasY = offsets.hasOwnProperty('y');\n  var sideX = left;\n  var sideY = top;\n  var win = window;\n\n  if (adaptive) {\n    var offsetParent = getOffsetParent(popper);\n    var heightProp = 'clientHeight';\n    var widthProp = 'clientWidth';\n\n    if (offsetParent === getWindow(popper)) {\n      offsetParent = getDocumentElement(popper);\n\n      if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {\n        heightProp = 'scrollHeight';\n        widthProp = 'scrollWidth';\n      }\n    } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n    offsetParent = offsetParent;\n\n    if (placement === top || (placement === left || placement === right) && variation === end) {\n      sideY = bottom;\n      var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n      offsetParent[heightProp];\n      y -= offsetY - popperRect.height;\n      y *= gpuAcceleration ? 1 : -1;\n    }\n\n    if (placement === left || (placement === top || placement === bottom) && variation === end) {\n      sideX = right;\n      var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n      offsetParent[widthProp];\n      x -= offsetX - popperRect.width;\n      x *= gpuAcceleration ? 1 : -1;\n    }\n  }\n\n  var commonStyles = Object.assign({\n    position: position\n  }, adaptive && unsetSides);\n\n  var _ref4 = roundOffsets === true ? roundOffsetsByDPR({\n    x: x,\n    y: y\n  }, getWindow(popper)) : {\n    x: x,\n    y: y\n  };\n\n  x = _ref4.x;\n  y = _ref4.y;\n\n  if (gpuAcceleration) {\n    var _Object$assign;\n\n    return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n  }\n\n  return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref5) {\n  var state = _ref5.state,\n      options = _ref5.options;\n  var _options$gpuAccelerat = options.gpuAcceleration,\n      gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n      _options$adaptive = options.adaptive,\n      adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n      _options$roundOffsets = options.roundOffsets,\n      roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n\n  if (process.env.NODE_ENV !== \"production\") {\n    var transitionProperty = getComputedStyle(state.elements.popper).transitionProperty || '';\n\n    if (adaptive && ['transform', 'top', 'right', 'bottom', 'left'].some(function (property) {\n      return transitionProperty.indexOf(property) >= 0;\n    })) {\n      console.warn(['Popper: Detected CSS transitions on at least one of the following', 'CSS properties: \"transform\", \"top\", \"right\", \"bottom\", \"left\".', '\\n\\n', 'Disable the \"computeStyles\" modifier\\'s `adaptive` option to allow', 'for smooth transitions, or remove these properties from the CSS', 'transition declaration on the popper element if only transitioning', 'opacity or background-color for example.', '\\n\\n', 'We recommend using the popper element as a wrapper around an inner', 'element that can have any CSS property transitioned for animations.'].join(' '));\n    }\n  }\n\n  var commonStyles = {\n    placement: getBasePlacement(state.placement),\n    variation: getVariation(state.placement),\n    popper: state.elements.popper,\n    popperRect: state.rects.popper,\n    gpuAcceleration: gpuAcceleration,\n    isFixed: state.options.strategy === 'fixed'\n  };\n\n  if (state.modifiersData.popperOffsets != null) {\n    state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n      offsets: state.modifiersData.popperOffsets,\n      position: state.options.strategy,\n      adaptive: adaptive,\n      roundOffsets: roundOffsets\n    })));\n  }\n\n  if (state.modifiersData.arrow != null) {\n    state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n      offsets: state.modifiersData.arrow,\n      position: 'absolute',\n      adaptive: false,\n      roundOffsets: roundOffsets\n    })));\n  }\n\n  state.attributes.popper = Object.assign({}, state.attributes.popper, {\n    'data-popper-placement': state.placement\n  });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'computeStyles',\n  enabled: true,\n  phase: 'beforeWrite',\n  fn: computeStyles,\n  data: {}\n};", "import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n  passive: true\n};\n\nfunction effect(_ref) {\n  var state = _ref.state,\n      instance = _ref.instance,\n      options = _ref.options;\n  var _options$scroll = options.scroll,\n      scroll = _options$scroll === void 0 ? true : _options$scroll,\n      _options$resize = options.resize,\n      resize = _options$resize === void 0 ? true : _options$resize;\n  var window = getWindow(state.elements.popper);\n  var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n  if (scroll) {\n    scrollParents.forEach(function (scrollParent) {\n      scrollParent.addEventListener('scroll', instance.update, passive);\n    });\n  }\n\n  if (resize) {\n    window.addEventListener('resize', instance.update, passive);\n  }\n\n  return function () {\n    if (scroll) {\n      scrollParents.forEach(function (scrollParent) {\n        scrollParent.removeEventListener('scroll', instance.update, passive);\n      });\n    }\n\n    if (resize) {\n      window.removeEventListener('resize', instance.update, passive);\n    }\n  };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'eventListeners',\n  enabled: true,\n  phase: 'write',\n  fn: function fn() {},\n  effect: effect,\n  data: {}\n};", "var hash = {\n  left: 'right',\n  right: 'left',\n  bottom: 'top',\n  top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n  return placement.replace(/left|right|bottom|top/g, function (matched) {\n    return hash[matched];\n  });\n}", "var hash = {\n  start: 'end',\n  end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n  return placement.replace(/start|end/g, function (matched) {\n    return hash[matched];\n  });\n}", "import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n  var win = getWindow(node);\n  var scrollLeft = win.pageXOffset;\n  var scrollTop = win.pageYOffset;\n  return {\n    scrollLeft: scrollLeft,\n    scrollTop: scrollTop\n  };\n}", "import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n  // If <html> has a CSS width greater than the viewport, then this will be\n  // incorrect for RTL.\n  // Popper 1 is broken in this case and never had a bug report so let's assume\n  // it's not an issue. I don't think anyone ever specifies width on <html>\n  // anyway.\n  // Browsers where the left scrollbar doesn't cause an issue report `0` for\n  // this (e.g. Edge 2019, IE11, Safari)\n  return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}", "import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getViewportRect(element, strategy) {\n  var win = getWindow(element);\n  var html = getDocumentElement(element);\n  var visualViewport = win.visualViewport;\n  var width = html.clientWidth;\n  var height = html.clientHeight;\n  var x = 0;\n  var y = 0;\n\n  if (visualViewport) {\n    width = visualViewport.width;\n    height = visualViewport.height;\n    var layoutViewport = isLayoutViewport();\n\n    if (layoutViewport || !layoutViewport && strategy === 'fixed') {\n      x = visualViewport.offsetLeft;\n      y = visualViewport.offsetTop;\n    }\n  }\n\n  return {\n    width: width,\n    height: height,\n    x: x + getWindowScrollBarX(element),\n    y: y\n  };\n}", "import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n  var _element$ownerDocumen;\n\n  var html = getDocumentElement(element);\n  var winScroll = getWindowScroll(element);\n  var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n  var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n  var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n  var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n  var y = -winScroll.scrollTop;\n\n  if (getComputedStyle(body || html).direction === 'rtl') {\n    x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n  }\n\n  return {\n    width: width,\n    height: height,\n    x: x,\n    y: y\n  };\n}", "import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n  // Firefox wants us to check `-x` and `-y` variations as well\n  var _getComputedStyle = getComputedStyle(element),\n      overflow = _getComputedStyle.overflow,\n      overflowX = _getComputedStyle.overflowX,\n      overflowY = _getComputedStyle.overflowY;\n\n  return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}", "import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n  if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n    // $FlowFixMe[incompatible-return]: assume body is always available\n    return node.ownerDocument.body;\n  }\n\n  if (isHTMLElement(node) && isScrollParent(node)) {\n    return node;\n  }\n\n  return getScrollParent(getParentNode(node));\n}", "import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n  var _element$ownerDocumen;\n\n  if (list === void 0) {\n    list = [];\n  }\n\n  var scrollParent = getScrollParent(element);\n  var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n  var win = getWindow(scrollParent);\n  var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n  var updatedList = list.concat(target);\n  return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n  updatedList.concat(listScrollParents(getParentNode(target)));\n}", "export default function rectToClientRect(rect) {\n  return Object.assign({}, rect, {\n    left: rect.x,\n    top: rect.y,\n    right: rect.x + rect.width,\n    bottom: rect.y + rect.height\n  });\n}", "import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element, strategy) {\n  var rect = getBoundingClientRect(element, false, strategy === 'fixed');\n  rect.top = rect.top + element.clientTop;\n  rect.left = rect.left + element.clientLeft;\n  rect.bottom = rect.top + element.clientHeight;\n  rect.right = rect.left + element.clientWidth;\n  rect.width = element.clientWidth;\n  rect.height = element.clientHeight;\n  rect.x = rect.left;\n  rect.y = rect.top;\n  return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent, strategy) {\n  return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n  var clippingParents = listScrollParents(getParentNode(element));\n  var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n  var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n  if (!isElement(clipperElement)) {\n    return [];\n  } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n  return clippingParents.filter(function (clippingParent) {\n    return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n  });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary, strategy) {\n  var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n  var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n  var firstClippingParent = clippingParents[0];\n  var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n    var rect = getClientRectFromMixedType(element, clippingParent, strategy);\n    accRect.top = max(rect.top, accRect.top);\n    accRect.right = min(rect.right, accRect.right);\n    accRect.bottom = min(rect.bottom, accRect.bottom);\n    accRect.left = max(rect.left, accRect.left);\n    return accRect;\n  }, getClientRectFromMixedType(element, firstClippingParent, strategy));\n  clippingRect.width = clippingRect.right - clippingRect.left;\n  clippingRect.height = clippingRect.bottom - clippingRect.top;\n  clippingRect.x = clippingRect.left;\n  clippingRect.y = clippingRect.top;\n  return clippingRect;\n}", "import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n  var reference = _ref.reference,\n      element = _ref.element,\n      placement = _ref.placement;\n  var basePlacement = placement ? getBasePlacement(placement) : null;\n  var variation = placement ? getVariation(placement) : null;\n  var commonX = reference.x + reference.width / 2 - element.width / 2;\n  var commonY = reference.y + reference.height / 2 - element.height / 2;\n  var offsets;\n\n  switch (basePlacement) {\n    case top:\n      offsets = {\n        x: commonX,\n        y: reference.y - element.height\n      };\n      break;\n\n    case bottom:\n      offsets = {\n        x: commonX,\n        y: reference.y + reference.height\n      };\n      break;\n\n    case right:\n      offsets = {\n        x: reference.x + reference.width,\n        y: commonY\n      };\n      break;\n\n    case left:\n      offsets = {\n        x: reference.x - element.width,\n        y: commonY\n      };\n      break;\n\n    default:\n      offsets = {\n        x: reference.x,\n        y: reference.y\n      };\n  }\n\n  var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n  if (mainAxis != null) {\n    var len = mainAxis === 'y' ? 'height' : 'width';\n\n    switch (variation) {\n      case start:\n        offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n        break;\n\n      case end:\n        offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n        break;\n\n      default:\n    }\n  }\n\n  return offsets;\n}", "import getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n  if (options === void 0) {\n    options = {};\n  }\n\n  var _options = options,\n      _options$placement = _options.placement,\n      placement = _options$placement === void 0 ? state.placement : _options$placement,\n      _options$strategy = _options.strategy,\n      strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,\n      _options$boundary = _options.boundary,\n      boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n      _options$rootBoundary = _options.rootBoundary,\n      rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n      _options$elementConte = _options.elementContext,\n      elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n      _options$altBoundary = _options.altBoundary,\n      altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n      _options$padding = _options.padding,\n      padding = _options$padding === void 0 ? 0 : _options$padding;\n  var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n  var altContext = elementContext === popper ? reference : popper;\n  var popperRect = state.rects.popper;\n  var element = state.elements[altBoundary ? altContext : elementContext];\n  var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);\n  var referenceClientRect = getBoundingClientRect(state.elements.reference);\n  var popperOffsets = computeOffsets({\n    reference: referenceClientRect,\n    element: popperRect,\n    strategy: 'absolute',\n    placement: placement\n  });\n  var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n  var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n  // 0 or negative = within the clipping rect\n\n  var overflowOffsets = {\n    top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n    bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n    left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n    right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n  };\n  var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n  if (elementContext === popper && offsetData) {\n    var offset = offsetData[placement];\n    Object.keys(overflowOffsets).forEach(function (key) {\n      var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n      var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n      overflowOffsets[key] += offset[axis] * multiply;\n    });\n  }\n\n  return overflowOffsets;\n}", "import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n  if (options === void 0) {\n    options = {};\n  }\n\n  var _options = options,\n      placement = _options.placement,\n      boundary = _options.boundary,\n      rootBoundary = _options.rootBoundary,\n      padding = _options.padding,\n      flipVariations = _options.flipVariations,\n      _options$allowedAutoP = _options.allowedAutoPlacements,\n      allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n  var variation = getVariation(placement);\n  var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n    return getVariation(placement) === variation;\n  }) : basePlacements;\n  var allowedPlacements = placements.filter(function (placement) {\n    return allowedAutoPlacements.indexOf(placement) >= 0;\n  });\n\n  if (allowedPlacements.length === 0) {\n    allowedPlacements = placements;\n\n    if (process.env.NODE_ENV !== \"production\") {\n      console.error(['Popper: The `allowedAutoPlacements` option did not allow any', 'placements. Ensure the `placement` option matches the variation', 'of the allowed placements.', 'For example, \"auto\" cannot be used to allow \"bottom-start\".', 'Use \"auto-start\" instead.'].join(' '));\n    }\n  } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n  var overflows = allowedPlacements.reduce(function (acc, placement) {\n    acc[placement] = detectOverflow(state, {\n      placement: placement,\n      boundary: boundary,\n      rootBoundary: rootBoundary,\n      padding: padding\n    })[getBasePlacement(placement)];\n    return acc;\n  }, {});\n  return Object.keys(overflows).sort(function (a, b) {\n    return overflows[a] - overflows[b];\n  });\n}", "import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n  if (getBasePlacement(placement) === auto) {\n    return [];\n  }\n\n  var oppositePlacement = getOppositePlacement(placement);\n  return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n  var state = _ref.state,\n      options = _ref.options,\n      name = _ref.name;\n\n  if (state.modifiersData[name]._skip) {\n    return;\n  }\n\n  var _options$mainAxis = options.mainAxis,\n      checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n      _options$altAxis = options.altAxis,\n      checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n      specifiedFallbackPlacements = options.fallbackPlacements,\n      padding = options.padding,\n      boundary = options.boundary,\n      rootBoundary = options.rootBoundary,\n      altBoundary = options.altBoundary,\n      _options$flipVariatio = options.flipVariations,\n      flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n      allowedAutoPlacements = options.allowedAutoPlacements;\n  var preferredPlacement = state.options.placement;\n  var basePlacement = getBasePlacement(preferredPlacement);\n  var isBasePlacement = basePlacement === preferredPlacement;\n  var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n  var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n    return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n      placement: placement,\n      boundary: boundary,\n      rootBoundary: rootBoundary,\n      padding: padding,\n      flipVariations: flipVariations,\n      allowedAutoPlacements: allowedAutoPlacements\n    }) : placement);\n  }, []);\n  var referenceRect = state.rects.reference;\n  var popperRect = state.rects.popper;\n  var checksMap = new Map();\n  var makeFallbackChecks = true;\n  var firstFittingPlacement = placements[0];\n\n  for (var i = 0; i < placements.length; i++) {\n    var placement = placements[i];\n\n    var _basePlacement = getBasePlacement(placement);\n\n    var isStartVariation = getVariation(placement) === start;\n    var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n    var len = isVertical ? 'width' : 'height';\n    var overflow = detectOverflow(state, {\n      placement: placement,\n      boundary: boundary,\n      rootBoundary: rootBoundary,\n      altBoundary: altBoundary,\n      padding: padding\n    });\n    var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n    if (referenceRect[len] > popperRect[len]) {\n      mainVariationSide = getOppositePlacement(mainVariationSide);\n    }\n\n    var altVariationSide = getOppositePlacement(mainVariationSide);\n    var checks = [];\n\n    if (checkMainAxis) {\n      checks.push(overflow[_basePlacement] <= 0);\n    }\n\n    if (checkAltAxis) {\n      checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n    }\n\n    if (checks.every(function (check) {\n      return check;\n    })) {\n      firstFittingPlacement = placement;\n      makeFallbackChecks = false;\n      break;\n    }\n\n    checksMap.set(placement, checks);\n  }\n\n  if (makeFallbackChecks) {\n    // `2` may be desired in some cases \u2013 research later\n    var numberOfChecks = flipVariations ? 3 : 1;\n\n    var _loop = function _loop(_i) {\n      var fittingPlacement = placements.find(function (placement) {\n        var checks = checksMap.get(placement);\n\n        if (checks) {\n          return checks.slice(0, _i).every(function (check) {\n            return check;\n          });\n        }\n      });\n\n      if (fittingPlacement) {\n        firstFittingPlacement = fittingPlacement;\n        return \"break\";\n      }\n    };\n\n    for (var _i = numberOfChecks; _i > 0; _i--) {\n      var _ret = _loop(_i);\n\n      if (_ret === \"break\") break;\n    }\n  }\n\n  if (state.placement !== firstFittingPlacement) {\n    state.modifiersData[name]._skip = true;\n    state.placement = firstFittingPlacement;\n    state.reset = true;\n  }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'flip',\n  enabled: true,\n  phase: 'main',\n  fn: flip,\n  requiresIfExists: ['offset'],\n  data: {\n    _skip: false\n  }\n};", "import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n  if (preventedOffsets === void 0) {\n    preventedOffsets = {\n      x: 0,\n      y: 0\n    };\n  }\n\n  return {\n    top: overflow.top - rect.height - preventedOffsets.y,\n    right: overflow.right - rect.width + preventedOffsets.x,\n    bottom: overflow.bottom - rect.height + preventedOffsets.y,\n    left: overflow.left - rect.width - preventedOffsets.x\n  };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n  return [top, right, bottom, left].some(function (side) {\n    return overflow[side] >= 0;\n  });\n}\n\nfunction hide(_ref) {\n  var state = _ref.state,\n      name = _ref.name;\n  var referenceRect = state.rects.reference;\n  var popperRect = state.rects.popper;\n  var preventedOffsets = state.modifiersData.preventOverflow;\n  var referenceOverflow = detectOverflow(state, {\n    elementContext: 'reference'\n  });\n  var popperAltOverflow = detectOverflow(state, {\n    altBoundary: true\n  });\n  var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n  var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n  var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n  var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n  state.modifiersData[name] = {\n    referenceClippingOffsets: referenceClippingOffsets,\n    popperEscapeOffsets: popperEscapeOffsets,\n    isReferenceHidden: isReferenceHidden,\n    hasPopperEscaped: hasPopperEscaped\n  };\n  state.attributes.popper = Object.assign({}, state.attributes.popper, {\n    'data-popper-reference-hidden': isReferenceHidden,\n    'data-popper-escaped': hasPopperEscaped\n  });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'hide',\n  enabled: true,\n  phase: 'main',\n  requiresIfExists: ['preventOverflow'],\n  fn: hide\n};", "import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n  var basePlacement = getBasePlacement(placement);\n  var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n  var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n    placement: placement\n  })) : offset,\n      skidding = _ref[0],\n      distance = _ref[1];\n\n  skidding = skidding || 0;\n  distance = (distance || 0) * invertDistance;\n  return [left, right].indexOf(basePlacement) >= 0 ? {\n    x: distance,\n    y: skidding\n  } : {\n    x: skidding,\n    y: distance\n  };\n}\n\nfunction offset(_ref2) {\n  var state = _ref2.state,\n      options = _ref2.options,\n      name = _ref2.name;\n  var _options$offset = options.offset,\n      offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n  var data = placements.reduce(function (acc, placement) {\n    acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n    return acc;\n  }, {});\n  var _data$state$placement = data[state.placement],\n      x = _data$state$placement.x,\n      y = _data$state$placement.y;\n\n  if (state.modifiersData.popperOffsets != null) {\n    state.modifiersData.popperOffsets.x += x;\n    state.modifiersData.popperOffsets.y += y;\n  }\n\n  state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'offset',\n  enabled: true,\n  phase: 'main',\n  requires: ['popperOffsets'],\n  fn: offset\n};", "import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n  var state = _ref.state,\n      name = _ref.name;\n  // Offsets are the actual position the popper needs to have to be\n  // properly positioned near its reference element\n  // This is the most basic placement, and will be adjusted by\n  // the modifiers in the next step\n  state.modifiersData[name] = computeOffsets({\n    reference: state.rects.reference,\n    element: state.rects.popper,\n    strategy: 'absolute',\n    placement: state.placement\n  });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'popperOffsets',\n  enabled: true,\n  phase: 'read',\n  fn: popperOffsets,\n  data: {}\n};", "export default function getAltAxis(axis) {\n  return axis === 'x' ? 'y' : 'x';\n}", "import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport { within, withinMaxClamp } from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { min as mathMin, max as mathMax } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n  var state = _ref.state,\n      options = _ref.options,\n      name = _ref.name;\n  var _options$mainAxis = options.mainAxis,\n      checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n      _options$altAxis = options.altAxis,\n      checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n      boundary = options.boundary,\n      rootBoundary = options.rootBoundary,\n      altBoundary = options.altBoundary,\n      padding = options.padding,\n      _options$tether = options.tether,\n      tether = _options$tether === void 0 ? true : _options$tether,\n      _options$tetherOffset = options.tetherOffset,\n      tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n  var overflow = detectOverflow(state, {\n    boundary: boundary,\n    rootBoundary: rootBoundary,\n    padding: padding,\n    altBoundary: altBoundary\n  });\n  var basePlacement = getBasePlacement(state.placement);\n  var variation = getVariation(state.placement);\n  var isBasePlacement = !variation;\n  var mainAxis = getMainAxisFromPlacement(basePlacement);\n  var altAxis = getAltAxis(mainAxis);\n  var popperOffsets = state.modifiersData.popperOffsets;\n  var referenceRect = state.rects.reference;\n  var popperRect = state.rects.popper;\n  var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n    placement: state.placement\n  })) : tetherOffset;\n  var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n    mainAxis: tetherOffsetValue,\n    altAxis: tetherOffsetValue\n  } : Object.assign({\n    mainAxis: 0,\n    altAxis: 0\n  }, tetherOffsetValue);\n  var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n  var data = {\n    x: 0,\n    y: 0\n  };\n\n  if (!popperOffsets) {\n    return;\n  }\n\n  if (checkMainAxis) {\n    var _offsetModifierState$;\n\n    var mainSide = mainAxis === 'y' ? top : left;\n    var altSide = mainAxis === 'y' ? bottom : right;\n    var len = mainAxis === 'y' ? 'height' : 'width';\n    var offset = popperOffsets[mainAxis];\n    var min = offset + overflow[mainSide];\n    var max = offset - overflow[altSide];\n    var additive = tether ? -popperRect[len] / 2 : 0;\n    var minLen = variation === start ? referenceRect[len] : popperRect[len];\n    var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n    // outside the reference bounds\n\n    var arrowElement = state.elements.arrow;\n    var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n      width: 0,\n      height: 0\n    };\n    var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n    var arrowPaddingMin = arrowPaddingObject[mainSide];\n    var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n    // to include its full size in the calculation. If the reference is small\n    // and near the edge of a boundary, the popper can overflow even if the\n    // reference is not overflowing as well (e.g. virtual elements with no\n    // width or height)\n\n    var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n    var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n    var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n    var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n    var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n    var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n    var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n    var tetherMax = offset + maxOffset - offsetModifierValue;\n    var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n    popperOffsets[mainAxis] = preventedOffset;\n    data[mainAxis] = preventedOffset - offset;\n  }\n\n  if (checkAltAxis) {\n    var _offsetModifierState$2;\n\n    var _mainSide = mainAxis === 'x' ? top : left;\n\n    var _altSide = mainAxis === 'x' ? bottom : right;\n\n    var _offset = popperOffsets[altAxis];\n\n    var _len = altAxis === 'y' ? 'height' : 'width';\n\n    var _min = _offset + overflow[_mainSide];\n\n    var _max = _offset - overflow[_altSide];\n\n    var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n    var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n    var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n    var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n    var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n    popperOffsets[altAxis] = _preventedOffset;\n    data[altAxis] = _preventedOffset - _offset;\n  }\n\n  state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'preventOverflow',\n  enabled: true,\n  phase: 'main',\n  fn: preventOverflow,\n  requiresIfExists: ['offset']\n};", "export default function getHTMLElementScroll(element) {\n  return {\n    scrollLeft: element.scrollLeft,\n    scrollTop: element.scrollTop\n  };\n}", "import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n  if (node === getWindow(node) || !isHTMLElement(node)) {\n    return getWindowScroll(node);\n  } else {\n    return getHTMLElementScroll(node);\n  }\n}", "import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport { round } from \"../utils/math.js\";\n\nfunction isElementScaled(element) {\n  var rect = element.getBoundingClientRect();\n  var scaleX = round(rect.width) / element.offsetWidth || 1;\n  var scaleY = round(rect.height) / element.offsetHeight || 1;\n  return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n  if (isFixed === void 0) {\n    isFixed = false;\n  }\n\n  var isOffsetParentAnElement = isHTMLElement(offsetParent);\n  var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n  var documentElement = getDocumentElement(offsetParent);\n  var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n  var scroll = {\n    scrollLeft: 0,\n    scrollTop: 0\n  };\n  var offsets = {\n    x: 0,\n    y: 0\n  };\n\n  if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n    if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n    isScrollParent(documentElement)) {\n      scroll = getNodeScroll(offsetParent);\n    }\n\n    if (isHTMLElement(offsetParent)) {\n      offsets = getBoundingClientRect(offsetParent, true);\n      offsets.x += offsetParent.clientLeft;\n      offsets.y += offsetParent.clientTop;\n    } else if (documentElement) {\n      offsets.x = getWindowScrollBarX(documentElement);\n    }\n  }\n\n  return {\n    x: rect.left + scroll.scrollLeft - offsets.x,\n    y: rect.top + scroll.scrollTop - offsets.y,\n    width: rect.width,\n    height: rect.height\n  };\n}", "import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n  var map = new Map();\n  var visited = new Set();\n  var result = [];\n  modifiers.forEach(function (modifier) {\n    map.set(modifier.name, modifier);\n  }); // On visiting object, check for its dependencies and visit them recursively\n\n  function sort(modifier) {\n    visited.add(modifier.name);\n    var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n    requires.forEach(function (dep) {\n      if (!visited.has(dep)) {\n        var depModifier = map.get(dep);\n\n        if (depModifier) {\n          sort(depModifier);\n        }\n      }\n    });\n    result.push(modifier);\n  }\n\n  modifiers.forEach(function (modifier) {\n    if (!visited.has(modifier.name)) {\n      // check for visited object\n      sort(modifier);\n    }\n  });\n  return result;\n}\n\nexport default function orderModifiers(modifiers) {\n  // order based on dependencies\n  var orderedModifiers = order(modifiers); // order based on phase\n\n  return modifierPhases.reduce(function (acc, phase) {\n    return acc.concat(orderedModifiers.filter(function (modifier) {\n      return modifier.phase === phase;\n    }));\n  }, []);\n}", "export default function debounce(fn) {\n  var pending;\n  return function () {\n    if (!pending) {\n      pending = new Promise(function (resolve) {\n        Promise.resolve().then(function () {\n          pending = undefined;\n          resolve(fn());\n        });\n      });\n    }\n\n    return pending;\n  };\n}", "export default function format(str) {\n  for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n    args[_key - 1] = arguments[_key];\n  }\n\n  return [].concat(args).reduce(function (p, c) {\n    return p.replace(/%s/, c);\n  }, str);\n}", "import format from \"./format.js\";\nimport { modifierPhases } from \"../enums.js\";\nvar INVALID_MODIFIER_ERROR = 'Popper: modifier \"%s\" provided an invalid %s property, expected %s but got %s';\nvar MISSING_DEPENDENCY_ERROR = 'Popper: modifier \"%s\" requires \"%s\", but \"%s\" modifier is not available';\nvar VALID_PROPERTIES = ['name', 'enabled', 'phase', 'fn', 'effect', 'requires', 'options'];\nexport default function validateModifiers(modifiers) {\n  modifiers.forEach(function (modifier) {\n    [].concat(Object.keys(modifier), VALID_PROPERTIES) // IE11-compatible replacement for `new Set(iterable)`\n    .filter(function (value, index, self) {\n      return self.indexOf(value) === index;\n    }).forEach(function (key) {\n      switch (key) {\n        case 'name':\n          if (typeof modifier.name !== 'string') {\n            console.error(format(INVALID_MODIFIER_ERROR, String(modifier.name), '\"name\"', '\"string\"', \"\\\"\" + String(modifier.name) + \"\\\"\"));\n          }\n\n          break;\n\n        case 'enabled':\n          if (typeof modifier.enabled !== 'boolean') {\n            console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '\"enabled\"', '\"boolean\"', \"\\\"\" + String(modifier.enabled) + \"\\\"\"));\n          }\n\n          break;\n\n        case 'phase':\n          if (modifierPhases.indexOf(modifier.phase) < 0) {\n            console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '\"phase\"', \"either \" + modifierPhases.join(', '), \"\\\"\" + String(modifier.phase) + \"\\\"\"));\n          }\n\n          break;\n\n        case 'fn':\n          if (typeof modifier.fn !== 'function') {\n            console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '\"fn\"', '\"function\"', \"\\\"\" + String(modifier.fn) + \"\\\"\"));\n          }\n\n          break;\n\n        case 'effect':\n          if (modifier.effect != null && typeof modifier.effect !== 'function') {\n            console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '\"effect\"', '\"function\"', \"\\\"\" + String(modifier.fn) + \"\\\"\"));\n          }\n\n          break;\n\n        case 'requires':\n          if (modifier.requires != null && !Array.isArray(modifier.requires)) {\n            console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '\"requires\"', '\"array\"', \"\\\"\" + String(modifier.requires) + \"\\\"\"));\n          }\n\n          break;\n\n        case 'requiresIfExists':\n          if (!Array.isArray(modifier.requiresIfExists)) {\n            console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '\"requiresIfExists\"', '\"array\"', \"\\\"\" + String(modifier.requiresIfExists) + \"\\\"\"));\n          }\n\n          break;\n\n        case 'options':\n        case 'data':\n          break;\n\n        default:\n          console.error(\"PopperJS: an invalid property has been provided to the \\\"\" + modifier.name + \"\\\" modifier, valid properties are \" + VALID_PROPERTIES.map(function (s) {\n            return \"\\\"\" + s + \"\\\"\";\n          }).join(', ') + \"; but \\\"\" + key + \"\\\" was provided.\");\n      }\n\n      modifier.requires && modifier.requires.forEach(function (requirement) {\n        if (modifiers.find(function (mod) {\n          return mod.name === requirement;\n        }) == null) {\n          console.error(format(MISSING_DEPENDENCY_ERROR, String(modifier.name), requirement, requirement));\n        }\n      });\n    });\n  });\n}", "export default function uniqueBy(arr, fn) {\n  var identifiers = new Set();\n  return arr.filter(function (item) {\n    var identifier = fn(item);\n\n    if (!identifiers.has(identifier)) {\n      identifiers.add(identifier);\n      return true;\n    }\n  });\n}", "export default function mergeByName(modifiers) {\n  var merged = modifiers.reduce(function (merged, current) {\n    var existing = merged[current.name];\n    merged[current.name] = existing ? Object.assign({}, existing, current, {\n      options: Object.assign({}, existing.options, current.options),\n      data: Object.assign({}, existing.data, current.data)\n    }) : current;\n    return merged;\n  }, {}); // IE11 does not support Object.values\n\n  return Object.keys(merged).map(function (key) {\n    return merged[key];\n  });\n}", "import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport getComputedStyle from \"./dom-utils/getComputedStyle.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport validateModifiers from \"./utils/validateModifiers.js\";\nimport uniqueBy from \"./utils/uniqueBy.js\";\nimport getBasePlacement from \"./utils/getBasePlacement.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nimport { auto } from \"./enums.js\";\nvar INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.';\nvar INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.';\nvar DEFAULT_OPTIONS = {\n  placement: 'bottom',\n  modifiers: [],\n  strategy: 'absolute'\n};\n\nfunction areValidElements() {\n  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n    args[_key] = arguments[_key];\n  }\n\n  return !args.some(function (element) {\n    return !(element && typeof element.getBoundingClientRect === 'function');\n  });\n}\n\nexport function popperGenerator(generatorOptions) {\n  if (generatorOptions === void 0) {\n    generatorOptions = {};\n  }\n\n  var _generatorOptions = generatorOptions,\n      _generatorOptions$def = _generatorOptions.defaultModifiers,\n      defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n      _generatorOptions$def2 = _generatorOptions.defaultOptions,\n      defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n  return function createPopper(reference, popper, options) {\n    if (options === void 0) {\n      options = defaultOptions;\n    }\n\n    var state = {\n      placement: 'bottom',\n      orderedModifiers: [],\n      options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n      modifiersData: {},\n      elements: {\n        reference: reference,\n        popper: popper\n      },\n      attributes: {},\n      styles: {}\n    };\n    var effectCleanupFns = [];\n    var isDestroyed = false;\n    var instance = {\n      state: state,\n      setOptions: function setOptions(setOptionsAction) {\n        var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n        cleanupModifierEffects();\n        state.options = Object.assign({}, defaultOptions, state.options, options);\n        state.scrollParents = {\n          reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n          popper: listScrollParents(popper)\n        }; // Orders the modifiers based on their dependencies and `phase`\n        // properties\n\n        var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n        state.orderedModifiers = orderedModifiers.filter(function (m) {\n          return m.enabled;\n        }); // Validate the provided modifiers so that the consumer will get warned\n        // if one of the modifiers is invalid for any reason\n\n        if (process.env.NODE_ENV !== \"production\") {\n          var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function (_ref) {\n            var name = _ref.name;\n            return name;\n          });\n          validateModifiers(modifiers);\n\n          if (getBasePlacement(state.options.placement) === auto) {\n            var flipModifier = state.orderedModifiers.find(function (_ref2) {\n              var name = _ref2.name;\n              return name === 'flip';\n            });\n\n            if (!flipModifier) {\n              console.error(['Popper: \"auto\" placements require the \"flip\" modifier be', 'present and enabled to work.'].join(' '));\n            }\n          }\n\n          var _getComputedStyle = getComputedStyle(popper),\n              marginTop = _getComputedStyle.marginTop,\n              marginRight = _getComputedStyle.marginRight,\n              marginBottom = _getComputedStyle.marginBottom,\n              marginLeft = _getComputedStyle.marginLeft; // We no longer take into account `margins` on the popper, and it can\n          // cause bugs with positioning, so we'll warn the consumer\n\n\n          if ([marginTop, marginRight, marginBottom, marginLeft].some(function (margin) {\n            return parseFloat(margin);\n          })) {\n            console.warn(['Popper: CSS \"margin\" styles cannot be used to apply padding', 'between the popper and its reference element or boundary.', 'To replicate margin, use the `offset` modifier, as well as', 'the `padding` option in the `preventOverflow` and `flip`', 'modifiers.'].join(' '));\n          }\n        }\n\n        runModifierEffects();\n        return instance.update();\n      },\n      // Sync update \u2013 it will always be executed, even if not necessary. This\n      // is useful for low frequency updates where sync behavior simplifies the\n      // logic.\n      // For high frequency updates (e.g. `resize` and `scroll` events), always\n      // prefer the async Popper#update method\n      forceUpdate: function forceUpdate() {\n        if (isDestroyed) {\n          return;\n        }\n\n        var _state$elements = state.elements,\n            reference = _state$elements.reference,\n            popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n        // anymore\n\n        if (!areValidElements(reference, popper)) {\n          if (process.env.NODE_ENV !== \"production\") {\n            console.error(INVALID_ELEMENT_ERROR);\n          }\n\n          return;\n        } // Store the reference and popper rects to be read by modifiers\n\n\n        state.rects = {\n          reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n          popper: getLayoutRect(popper)\n        }; // Modifiers have the ability to reset the current update cycle. The\n        // most common use case for this is the `flip` modifier changing the\n        // placement, which then needs to re-run all the modifiers, because the\n        // logic was previously ran for the previous placement and is therefore\n        // stale/incorrect\n\n        state.reset = false;\n        state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n        // is filled with the initial data specified by the modifier. This means\n        // it doesn't persist and is fresh on each update.\n        // To ensure persistent data, use `${name}#persistent`\n\n        state.orderedModifiers.forEach(function (modifier) {\n          return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n        });\n        var __debug_loops__ = 0;\n\n        for (var index = 0; index < state.orderedModifiers.length; index++) {\n          if (process.env.NODE_ENV !== \"production\") {\n            __debug_loops__ += 1;\n\n            if (__debug_loops__ > 100) {\n              console.error(INFINITE_LOOP_ERROR);\n              break;\n            }\n          }\n\n          if (state.reset === true) {\n            state.reset = false;\n            index = -1;\n            continue;\n          }\n\n          var _state$orderedModifie = state.orderedModifiers[index],\n              fn = _state$orderedModifie.fn,\n              _state$orderedModifie2 = _state$orderedModifie.options,\n              _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n              name = _state$orderedModifie.name;\n\n          if (typeof fn === 'function') {\n            state = fn({\n              state: state,\n              options: _options,\n              name: name,\n              instance: instance\n            }) || state;\n          }\n        }\n      },\n      // Async and optimistically optimized update \u2013 it will not be executed if\n      // not necessary (debounced to run at most once-per-tick)\n      update: debounce(function () {\n        return new Promise(function (resolve) {\n          instance.forceUpdate();\n          resolve(state);\n        });\n      }),\n      destroy: function destroy() {\n        cleanupModifierEffects();\n        isDestroyed = true;\n      }\n    };\n\n    if (!areValidElements(reference, popper)) {\n      if (process.env.NODE_ENV !== \"production\") {\n        console.error(INVALID_ELEMENT_ERROR);\n      }\n\n      return instance;\n    }\n\n    instance.setOptions(options).then(function (state) {\n      if (!isDestroyed && options.onFirstUpdate) {\n        options.onFirstUpdate(state);\n      }\n    }); // Modifiers have the ability to execute arbitrary code before the first\n    // update cycle runs. They will be executed in the same order as the update\n    // cycle. This is useful when a modifier adds some persistent data that\n    // other modifiers need to use, but the modifier is run after the dependent\n    // one.\n\n    function runModifierEffects() {\n      state.orderedModifiers.forEach(function (_ref3) {\n        var name = _ref3.name,\n            _ref3$options = _ref3.options,\n            options = _ref3$options === void 0 ? {} : _ref3$options,\n            effect = _ref3.effect;\n\n        if (typeof effect === 'function') {\n          var cleanupFn = effect({\n            state: state,\n            name: name,\n            instance: instance,\n            options: options\n          });\n\n          var noopFn = function noopFn() {};\n\n          effectCleanupFns.push(cleanupFn || noopFn);\n        }\n      });\n    }\n\n    function cleanupModifierEffects() {\n      effectCleanupFns.forEach(function (fn) {\n        return fn();\n      });\n      effectCleanupFns = [];\n    }\n\n    return instance;\n  };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };", "import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n  defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";", "export const ROUND_ARROW =\n  '<svg width=\"16\" height=\"6\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M0 6s1.796-.013 4.67-3.615C5.851.9 6.93.006 8 0c1.07-.006 2.148.887 3.343 2.385C14.233 6.005 16 6 16 6H0z\"></svg>';\n\nexport const BOX_CLASS = `__NAMESPACE_PREFIX__-box`;\nexport const CONTENT_CLASS = `__NAMESPACE_PREFIX__-content`;\nexport const BACKDROP_CLASS = `__NAMESPACE_PREFIX__-backdrop`;\nexport const ARROW_CLASS = `__NAMESPACE_PREFIX__-arrow`;\nexport const SVG_ARROW_CLASS = `__NAMESPACE_PREFIX__-svg-arrow`;\n\nexport const TOUCH_OPTIONS = {passive: true, capture: true};\n\nexport const TIPPY_DEFAULT_APPEND_TO = () => document.body;\n", "import {BasePlacement, Placement} from './types';\n\nexport function hasOwnProperty(\n  obj: Record<string, unknown>,\n  key: string\n): boolean {\n  return {}.hasOwnProperty.call(obj, key);\n}\n\nexport function getValueAtIndexOrReturn<T>(\n  value: T | [T | null, T | null],\n  index: number,\n  defaultValue: T | [T, T]\n): T {\n  if (Array.isArray(value)) {\n    const v = value[index];\n    return v == null\n      ? Array.isArray(defaultValue)\n        ? defaultValue[index]\n        : defaultValue\n      : v;\n  }\n\n  return value;\n}\n\nexport function isType(value: any, type: string): boolean {\n  const str = {}.toString.call(value);\n  return str.indexOf('[object') === 0 && str.indexOf(`${type}]`) > -1;\n}\n\nexport function invokeWithArgsOrReturn(value: any, args: any[]): any {\n  return typeof value === 'function' ? value(...args) : value;\n}\n\nexport function debounce<T>(\n  fn: (arg: T) => void,\n  ms: number\n): (arg: T) => void {\n  // Avoid wrapping in `setTimeout` if ms is 0 anyway\n  if (ms === 0) {\n    return fn;\n  }\n\n  let timeout: any;\n\n  return (arg): void => {\n    clearTimeout(timeout);\n    timeout = setTimeout(() => {\n      fn(arg);\n    }, ms);\n  };\n}\n\nexport function removeProperties<T>(obj: T, keys: string[]): Partial<T> {\n  const clone = {...obj};\n  keys.forEach((key) => {\n    delete (clone as any)[key];\n  });\n  return clone;\n}\n\nexport function splitBySpaces(value: string): string[] {\n  return value.split(/\\s+/).filter(Boolean);\n}\n\nexport function normalizeToArray<T>(value: T | T[]): T[] {\n  return ([] as T[]).concat(value);\n}\n\nexport function pushIfUnique<T>(arr: T[], value: T): void {\n  if (arr.indexOf(value) === -1) {\n    arr.push(value);\n  }\n}\n\nexport function appendPxIfNumber(value: string | number): string {\n  return typeof value === 'number' ? `${value}px` : value;\n}\n\nexport function unique<T>(arr: T[]): T[] {\n  return arr.filter((item, index) => arr.indexOf(item) === index);\n}\n\nexport function getNumber(value: string | number): number {\n  return typeof value === 'number' ? value : parseFloat(value);\n}\n\nexport function getBasePlacement(placement: Placement): BasePlacement {\n  return placement.split('-')[0] as BasePlacement;\n}\n\nexport function arrayFrom(value: ArrayLike<any>): any[] {\n  return [].slice.call(value);\n}\n\nexport function removeUndefinedProps(\n  obj: Record<string, unknown>\n): Partial<Record<string, unknown>> {\n  return Object.keys(obj).reduce((acc, key) => {\n    if (obj[key] !== undefined) {\n      (acc as any)[key] = obj[key];\n    }\n\n    return acc;\n  }, {});\n}\n", "import {ReferenceElement, Targets} from './types';\nimport {PopperTreeData} from './types-internal';\nimport {arrayFrom, isType, normalizeToArray, getBasePlacement} from './utils';\n\nexport function div(): HTMLDivElement {\n  return document.createElement('div');\n}\n\nexport function isElement(value: unknown): value is Element | DocumentFragment {\n  return ['Element', 'Fragment'].some((type) => isType(value, type));\n}\n\nexport function isNodeList(value: unknown): value is NodeList {\n  return isType(value, 'NodeList');\n}\n\nexport function isMouseEvent(value: unknown): value is MouseEvent {\n  return isType(value, 'MouseEvent');\n}\n\nexport function isReferenceElement(value: any): value is ReferenceElement {\n  return !!(value && value._tippy && value._tippy.reference === value);\n}\n\nexport function getArrayOfElements(value: Targets): Element[] {\n  if (isElement(value)) {\n    return [value];\n  }\n\n  if (isNodeList(value)) {\n    return arrayFrom(value);\n  }\n\n  if (Array.isArray(value)) {\n    return value;\n  }\n\n  return arrayFrom(document.querySelectorAll(value));\n}\n\nexport function setTransitionDuration(\n  els: (HTMLDivElement | null)[],\n  value: number\n): void {\n  els.forEach((el) => {\n    if (el) {\n      el.style.transitionDuration = `${value}ms`;\n    }\n  });\n}\n\nexport function setVisibilityState(\n  els: (HTMLDivElement | null)[],\n  state: 'visible' | 'hidden'\n): void {\n  els.forEach((el) => {\n    if (el) {\n      el.setAttribute('data-state', state);\n    }\n  });\n}\n\nexport function getOwnerDocument(\n  elementOrElements: Element | Element[]\n): Document {\n  const [element] = normalizeToArray(elementOrElements);\n\n  // Elements created via a <template> have an ownerDocument with no reference to the body\n  return element?.ownerDocument?.body ? element.ownerDocument : document;\n}\n\nexport function isCursorOutsideInteractiveBorder(\n  popperTreeData: PopperTreeData[],\n  event: MouseEvent\n): boolean {\n  const {clientX, clientY} = event;\n\n  return popperTreeData.every(({popperRect, popperState, props}) => {\n    const {interactiveBorder} = props;\n    const basePlacement = getBasePlacement(popperState.placement);\n    const offsetData = popperState.modifiersData.offset;\n\n    if (!offsetData) {\n      return true;\n    }\n\n    const topDistance = basePlacement === 'bottom' ? offsetData.top!.y : 0;\n    const bottomDistance = basePlacement === 'top' ? offsetData.bottom!.y : 0;\n    const leftDistance = basePlacement === 'right' ? offsetData.left!.x : 0;\n    const rightDistance = basePlacement === 'left' ? offsetData.right!.x : 0;\n\n    const exceedsTop =\n      popperRect.top - clientY + topDistance > interactiveBorder;\n    const exceedsBottom =\n      clientY - popperRect.bottom - bottomDistance > interactiveBorder;\n    const exceedsLeft =\n      popperRect.left - clientX + leftDistance > interactiveBorder;\n    const exceedsRight =\n      clientX - popperRect.right - rightDistance > interactiveBorder;\n\n    return exceedsTop || exceedsBottom || exceedsLeft || exceedsRight;\n  });\n}\n\nexport function updateTransitionEndListener(\n  box: HTMLDivElement,\n  action: 'add' | 'remove',\n  listener: (event: TransitionEvent) => void\n): void {\n  const method = `${action}EventListener` as\n    | 'addEventListener'\n    | 'removeEventListener';\n\n  // some browsers apparently support `transition` (unprefixed) but only fire\n  // `webkitTransitionEnd`...\n  ['transitionend', 'webkitTransitionEnd'].forEach((event) => {\n    box[method](event, listener as EventListener);\n  });\n}\n\n/**\n * Compared to xxx.contains, this function works for dom structures with shadow\n * dom\n */\nexport function actualContains(parent: Element, child: Element): boolean {\n  let target = child;\n  while (target) {\n    if (parent.contains(target)) {\n      return true;\n    }\n    target = (target.getRootNode?.() as any)?.host;\n  }\n  return false;\n}\n", "import {TOUCH_OPTIONS} from './constants';\nimport {isReferenceElement} from './dom-utils';\n\nexport const currentInput = {isTouch: false};\nlet lastMouseMoveTime = 0;\n\n/**\n * When a `touchstart` event is fired, it's assumed the user is using touch\n * input. We'll bind a `mousemove` event listener to listen for mouse input in\n * the future. This way, the `isTouch` property is fully dynamic and will handle\n * hybrid devices that use a mix of touch + mouse input.\n */\nexport function onDocumentTouchStart(): void {\n  if (currentInput.isTouch) {\n    return;\n  }\n\n  currentInput.isTouch = true;\n\n  if (window.performance) {\n    document.addEventListener('mousemove', onDocumentMouseMove);\n  }\n}\n\n/**\n * When two `mousemove` event are fired consecutively within 20ms, it's assumed\n * the user is using mouse input again. `mousemove` can fire on touch devices as\n * well, but very rarely that quickly.\n */\nexport function onDocumentMouseMove(): void {\n  const now = performance.now();\n\n  if (now - lastMouseMoveTime < 20) {\n    currentInput.isTouch = false;\n\n    document.removeEventListener('mousemove', onDocumentMouseMove);\n  }\n\n  lastMouseMoveTime = now;\n}\n\n/**\n * When an element is in focus and has a tippy, leaving the tab/window and\n * returning causes it to show again. For mouse users this is unexpected, but\n * for keyboard use it makes sense.\n * TODO: find a better technique to solve this problem\n */\nexport function onWindowBlur(): void {\n  const activeElement = document.activeElement as HTMLElement | null;\n\n  if (isReferenceElement(activeElement)) {\n    const instance = activeElement._tippy!;\n\n    if (activeElement.blur && !instance.state.isVisible) {\n      activeElement.blur();\n    }\n  }\n}\n\nexport default function bindGlobalEventListeners(): void {\n  document.addEventListener('touchstart', onDocumentTouchStart, TOUCH_OPTIONS);\n  window.addEventListener('blur', onWindowBlur);\n}\n", "export const isBrowser =\n  typeof window !== 'undefined' && typeof document !== 'undefined';\n\nexport const isIE11 = isBrowser\n  ? // @ts-ignore\n    !!window.msCrypto\n  : false;\n", "import {Targets} from './types';\n\nexport function createMemoryLeakWarning(method: string): string {\n  const txt = method === 'destroy' ? 'n already-' : ' ';\n\n  return [\n    `${method}() was called on a${txt}destroyed instance. This is a no-op but`,\n    'indicates a potential memory leak.',\n  ].join(' ');\n}\n\nexport function clean(value: string): string {\n  const spacesAndTabs = /[ \\t]{2,}/g;\n  const lineStartWithSpaces = /^[ \\t]*/gm;\n\n  return value\n    .replace(spacesAndTabs, ' ')\n    .replace(lineStartWithSpaces, '')\n    .trim();\n}\n\nfunction getDevMessage(message: string): string {\n  return clean(`\n  %ctippy.js\n\n  %c${clean(message)}\n\n  %c\uD83D\uDC77\u200D This is a development-only message. It will be removed in production.\n  `);\n}\n\nexport function getFormattedMessage(message: string): string[] {\n  return [\n    getDevMessage(message),\n    // title\n    'color: #00C584; font-size: 1.3em; font-weight: bold;',\n    // message\n    'line-height: 1.5',\n    // footer\n    'color: #a6a095;',\n  ];\n}\n\n// Assume warnings and errors never have the same message\nlet visitedMessages: Set<string>;\nif (__DEV__) {\n  resetVisitedMessages();\n}\n\nexport function resetVisitedMessages(): void {\n  visitedMessages = new Set();\n}\n\nexport function warnWhen(condition: boolean, message: string): void {\n  if (condition && !visitedMessages.has(message)) {\n    visitedMessages.add(message);\n    console.warn(...getFormattedMessage(message));\n  }\n}\n\nexport function errorWhen(condition: boolean, message: string): void {\n  if (condition && !visitedMessages.has(message)) {\n    visitedMessages.add(message);\n    console.error(...getFormattedMessage(message));\n  }\n}\n\nexport function validateTargets(targets: Targets): void {\n  const didPassFalsyValue = !targets;\n  const didPassPlainObject =\n    Object.prototype.toString.call(targets) === '[object Object]' &&\n    !(targets as any).addEventListener;\n\n  errorWhen(\n    didPassFalsyValue,\n    [\n      'tippy() was passed',\n      '`' + String(targets) + '`',\n      'as its targets (first) argument. Valid types are: String, Element,',\n      'Element[], or NodeList.',\n    ].join(' ')\n  );\n\n  errorWhen(\n    didPassPlainObject,\n    [\n      'tippy() was passed a plain object which is not supported as an argument',\n      'for virtual positioning. Use props.getReferenceClientRect instead.',\n    ].join(' ')\n  );\n}\n", "import {DefaultProps, Plugin, Props, ReferenceElement, Tippy} from './types';\nimport {\n  hasOwnProperty,\n  removeProperties,\n  invokeWithArgsOrReturn,\n} from './utils';\nimport {warnWhen} from './validation';\nimport {TIPPY_DEFAULT_APPEND_TO} from './constants';\n\nconst pluginProps = {\n  animateFill: false,\n  followCursor: false,\n  inlinePositioning: false,\n  sticky: false,\n};\n\nconst renderProps = {\n  allowHTML: false,\n  animation: 'fade',\n  arrow: true,\n  content: '',\n  inertia: false,\n  maxWidth: 350,\n  role: 'tooltip',\n  theme: '',\n  zIndex: 9999,\n};\n\nexport const defaultProps: DefaultProps = {\n  appendTo: TIPPY_DEFAULT_APPEND_TO,\n  aria: {\n    content: 'auto',\n    expanded: 'auto',\n  },\n  delay: 0,\n  duration: [300, 250],\n  getReferenceClientRect: null,\n  hideOnClick: true,\n  ignoreAttributes: false,\n  interactive: false,\n  interactiveBorder: 2,\n  interactiveDebounce: 0,\n  moveTransition: '',\n  offset: [0, 10],\n  onAfterUpdate() {},\n  onBeforeUpdate() {},\n  onCreate() {},\n  onDestroy() {},\n  onHidden() {},\n  onHide() {},\n  onMount() {},\n  onShow() {},\n  onShown() {},\n  onTrigger() {},\n  onUntrigger() {},\n  onClickOutside() {},\n  placement: 'top',\n  plugins: [],\n  popperOptions: {},\n  render: null,\n  showOnCreate: false,\n  touch: true,\n  trigger: 'mouseenter focus',\n  triggerTarget: null,\n  ...pluginProps,\n  ...renderProps,\n};\n\nconst defaultKeys = Object.keys(defaultProps);\n\nexport const setDefaultProps: Tippy['setDefaultProps'] = (partialProps) => {\n  /* istanbul ignore else */\n  if (__DEV__) {\n    validateProps(partialProps, []);\n  }\n\n  const keys = Object.keys(partialProps) as Array<keyof DefaultProps>;\n  keys.forEach((key) => {\n    (defaultProps as any)[key] = partialProps[key];\n  });\n};\n\nexport function getExtendedPassedProps(\n  passedProps: Partial<Props> & Record<string, unknown>\n): Partial<Props> {\n  const plugins = passedProps.plugins || [];\n  const pluginProps = plugins.reduce<Record<string, unknown>>((acc, plugin) => {\n    const {name, defaultValue} = plugin;\n\n    if (name) {\n      acc[name] =\n        passedProps[name] !== undefined\n          ? passedProps[name]\n          : (defaultProps as any)[name] ?? defaultValue;\n    }\n\n    return acc;\n  }, {});\n\n  return {\n    ...passedProps,\n    ...pluginProps,\n  };\n}\n\nexport function getDataAttributeProps(\n  reference: ReferenceElement,\n  plugins: Plugin[]\n): Record<string, unknown> {\n  const propKeys = plugins\n    ? Object.keys(getExtendedPassedProps({...defaultProps, plugins}))\n    : defaultKeys;\n\n  const props = propKeys.reduce(\n    (acc: Partial<Props> & Record<string, unknown>, key) => {\n      const valueAsString = (\n        reference.getAttribute(`data-tippy-${key}`) || ''\n      ).trim();\n\n      if (!valueAsString) {\n        return acc;\n      }\n\n      if (key === 'content') {\n        acc[key] = valueAsString;\n      } else {\n        try {\n          acc[key] = JSON.parse(valueAsString);\n        } catch (e) {\n          acc[key] = valueAsString;\n        }\n      }\n\n      return acc;\n    },\n    {}\n  );\n\n  return props;\n}\n\nexport function evaluateProps(\n  reference: ReferenceElement,\n  props: Props\n): Props {\n  const out = {\n    ...props,\n    content: invokeWithArgsOrReturn(props.content, [reference]),\n    ...(props.ignoreAttributes\n      ? {}\n      : getDataAttributeProps(reference, props.plugins)),\n  };\n\n  out.aria = {\n    ...defaultProps.aria,\n    ...out.aria,\n  };\n\n  out.aria = {\n    expanded:\n      out.aria.expanded === 'auto' ? props.interactive : out.aria.expanded,\n    content:\n      out.aria.content === 'auto'\n        ? props.interactive\n          ? null\n          : 'describedby'\n        : out.aria.content,\n  };\n\n  return out;\n}\n\nexport function validateProps(\n  partialProps: Partial<Props> = {},\n  plugins: Plugin[] = []\n): void {\n  const keys = Object.keys(partialProps) as Array<keyof Props>;\n  keys.forEach((prop) => {\n    const nonPluginProps = removeProperties(\n      defaultProps,\n      Object.keys(pluginProps)\n    );\n\n    let didPassUnknownProp = !hasOwnProperty(nonPluginProps, prop);\n\n    // Check if the prop exists in `plugins`\n    if (didPassUnknownProp) {\n      didPassUnknownProp =\n        plugins.filter((plugin) => plugin.name === prop).length === 0;\n    }\n\n    warnWhen(\n      didPassUnknownProp,\n      [\n        `\\`${prop}\\``,\n        \"is not a valid prop. You may have spelled it incorrectly, or if it's\",\n        'a plugin, forgot to pass it in an array as props.plugins.',\n        '\\n\\n',\n        'All props: https://atomiks.github.io/tippyjs/v6/all-props/\\n',\n        'Plugins: https://atomiks.github.io/tippyjs/v6/plugins/',\n      ].join(' ')\n    );\n  });\n}\n", "import {\n  ARROW_CLASS,\n  BACKDROP_CLASS,\n  BOX_CLASS,\n  CONTENT_CLASS,\n  SVG_ARROW_CLASS,\n} from './constants';\nimport {div, isElement} from './dom-utils';\nimport {Instance, PopperElement, Props} from './types';\nimport {PopperChildren} from './types-internal';\nimport {arrayFrom} from './utils';\n\n// Firefox extensions don't allow .innerHTML = \"...\" property. This tricks it.\nconst innerHTML = (): 'innerHTML' => 'innerHTML';\n\nfunction dangerouslySetInnerHTML(element: Element, html: string): void {\n  element[innerHTML()] = html;\n}\n\nfunction createArrowElement(value: Props['arrow']): HTMLDivElement {\n  const arrow = div();\n\n  if (value === true) {\n    arrow.className = ARROW_CLASS;\n  } else {\n    arrow.className = SVG_ARROW_CLASS;\n\n    if (isElement(value)) {\n      arrow.appendChild(value);\n    } else {\n      dangerouslySetInnerHTML(arrow, value as string);\n    }\n  }\n\n  return arrow;\n}\n\nexport function setContent(content: HTMLDivElement, props: Props): void {\n  if (isElement(props.content)) {\n    dangerouslySetInnerHTML(content, '');\n    content.appendChild(props.content);\n  } else if (typeof props.content !== 'function') {\n    if (props.allowHTML) {\n      dangerouslySetInnerHTML(content, props.content);\n    } else {\n      content.textContent = props.content;\n    }\n  }\n}\n\nexport function getChildren(popper: PopperElement): PopperChildren {\n  const box = popper.firstElementChild as HTMLDivElement;\n  const boxChildren = arrayFrom(box.children);\n\n  return {\n    box,\n    content: boxChildren.find((node) => node.classList.contains(CONTENT_CLASS)),\n    arrow: boxChildren.find(\n      (node) =>\n        node.classList.contains(ARROW_CLASS) ||\n        node.classList.contains(SVG_ARROW_CLASS)\n    ),\n    backdrop: boxChildren.find((node) =>\n      node.classList.contains(BACKDROP_CLASS)\n    ),\n  };\n}\n\nexport function render(\n  instance: Instance\n): {\n  popper: PopperElement;\n  onUpdate?: (prevProps: Props, nextProps: Props) => void;\n} {\n  const popper = div();\n\n  const box = div();\n  box.className = BOX_CLASS;\n  box.setAttribute('data-state', 'hidden');\n  box.setAttribute('tabindex', '-1');\n\n  const content = div();\n  content.className = CONTENT_CLASS;\n  content.setAttribute('data-state', 'hidden');\n\n  setContent(content, instance.props);\n\n  popper.appendChild(box);\n  box.appendChild(content);\n\n  onUpdate(instance.props, instance.props);\n\n  function onUpdate(prevProps: Props, nextProps: Props): void {\n    const {box, content, arrow} = getChildren(popper);\n\n    if (nextProps.theme) {\n      box.setAttribute('data-theme', nextProps.theme);\n    } else {\n      box.removeAttribute('data-theme');\n    }\n\n    if (typeof nextProps.animation === 'string') {\n      box.setAttribute('data-animation', nextProps.animation);\n    } else {\n      box.removeAttribute('data-animation');\n    }\n\n    if (nextProps.inertia) {\n      box.setAttribute('data-inertia', '');\n    } else {\n      box.removeAttribute('data-inertia');\n    }\n\n    box.style.maxWidth =\n      typeof nextProps.maxWidth === 'number'\n        ? `${nextProps.maxWidth}px`\n        : nextProps.maxWidth;\n\n    if (nextProps.role) {\n      box.setAttribute('role', nextProps.role);\n    } else {\n      box.removeAttribute('role');\n    }\n\n    if (\n      prevProps.content !== nextProps.content ||\n      prevProps.allowHTML !== nextProps.allowHTML\n    ) {\n      setContent(content, instance.props);\n    }\n\n    if (nextProps.arrow) {\n      if (!arrow) {\n        box.appendChild(createArrowElement(nextProps.arrow));\n      } else if (prevProps.arrow !== nextProps.arrow) {\n        box.removeChild(arrow);\n        box.appendChild(createArrowElement(nextProps.arrow));\n      }\n    } else if (arrow) {\n      box.removeChild(arrow!);\n    }\n  }\n\n  return {\n    popper,\n    onUpdate,\n  };\n}\n\n// Runtime check to identify if the render function is the default one; this\n// way we can apply default CSS transitions logic and it can be tree-shaken away\nrender.$$tippy = true;\n", "import {createPopper, StrictModifiers, Modifier} from '@popperjs/core';\nimport {currentInput} from './bindGlobalEventListeners';\nimport {isIE11} from './browser';\nimport {TIPPY_DEFAULT_APPEND_TO, TOUCH_OPTIONS} from './constants';\nimport {\n  actualContains,\n  div,\n  getOwnerDocument,\n  isCursorOutsideInteractiveBorder,\n  isMouseEvent,\n  setTransitionDuration,\n  setVisibilityState,\n  updateTransitionEndListener,\n} from './dom-utils';\nimport {defaultProps, evaluateProps, getExtendedPassedProps} from './props';\nimport {getChildren} from './template';\nimport {\n  Content,\n  Instance,\n  LifecycleHooks,\n  PopperElement,\n  Props,\n  ReferenceElement,\n} from './types';\nimport {ListenerObject, PopperTreeData, PopperChildren} from './types-internal';\nimport {\n  arrayFrom,\n  debounce,\n  getValueAtIndexOrReturn,\n  invokeWithArgsOrReturn,\n  normalizeToArray,\n  pushIfUnique,\n  splitBySpaces,\n  unique,\n  removeUndefinedProps,\n} from './utils';\nimport {createMemoryLeakWarning, errorWhen, warnWhen} from './validation';\n\nlet idCounter = 1;\nlet mouseMoveListeners: ((event: MouseEvent) => void)[] = [];\n\n// Used by `hideAll()`\nexport let mountedInstances: Instance[] = [];\n\nexport default function createTippy(\n  reference: ReferenceElement,\n  passedProps: Partial<Props>\n): Instance {\n  const props = evaluateProps(reference, {\n    ...defaultProps,\n    ...getExtendedPassedProps(removeUndefinedProps(passedProps)),\n  });\n\n  // ===========================================================================\n  // \uD83D\uDD12 Private members\n  // ===========================================================================\n  let showTimeout: any;\n  let hideTimeout: any;\n  let scheduleHideAnimationFrame: number;\n  let isVisibleFromClick = false;\n  let didHideDueToDocumentMouseDown = false;\n  let didTouchMove = false;\n  let ignoreOnFirstUpdate = false;\n  let lastTriggerEvent: Event | undefined;\n  let currentTransitionEndListener: (event: TransitionEvent) => void;\n  let onFirstUpdate: () => void;\n  let listeners: ListenerObject[] = [];\n  let debouncedOnMouseMove = debounce(onMouseMove, props.interactiveDebounce);\n  let currentTarget: Element;\n\n  // ===========================================================================\n  // \uD83D\uDD11 Public members\n  // ===========================================================================\n  const id = idCounter++;\n  const popperInstance = null;\n  const plugins = unique(props.plugins);\n\n  const state = {\n    // Is the instance currently enabled?\n    isEnabled: true,\n    // Is the tippy currently showing and not transitioning out?\n    isVisible: false,\n    // Has the instance been destroyed?\n    isDestroyed: false,\n    // Is the tippy currently mounted to the DOM?\n    isMounted: false,\n    // Has the tippy finished transitioning in?\n    isShown: false,\n  };\n\n  const instance: Instance = {\n    // properties\n    id,\n    reference,\n    popper: div(),\n    popperInstance,\n    props,\n    state,\n    plugins,\n    // methods\n    clearDelayTimeouts,\n    setProps,\n    setContent,\n    show,\n    hide,\n    hideWithInteractivity,\n    enable,\n    disable,\n    unmount,\n    destroy,\n  };\n\n  // TODO: Investigate why this early return causes a TDZ error in the tests \u2014\n  // it doesn't seem to happen in the browser\n  /* istanbul ignore if */\n  if (!props.render) {\n    if (__DEV__) {\n      errorWhen(true, 'render() function has not been supplied.');\n    }\n\n    return instance;\n  }\n\n  // ===========================================================================\n  // Initial mutations\n  // ===========================================================================\n  const {popper, onUpdate} = props.render(instance);\n\n  popper.setAttribute('data-__NAMESPACE_PREFIX__-root', '');\n  popper.id = `__NAMESPACE_PREFIX__-${instance.id}`;\n\n  instance.popper = popper;\n  reference._tippy = instance;\n  popper._tippy = instance;\n\n  const pluginsHooks = plugins.map((plugin) => plugin.fn(instance));\n  const hasAriaExpanded = reference.hasAttribute('aria-expanded');\n\n  addListeners();\n  handleAriaExpandedAttribute();\n  handleStyles();\n\n  invokeHook('onCreate', [instance]);\n\n  if (props.showOnCreate) {\n    scheduleShow();\n  }\n\n  // Prevent a tippy with a delay from hiding if the cursor left then returned\n  // before it started hiding\n  popper.addEventListener('mouseenter', () => {\n    if (instance.props.interactive && instance.state.isVisible) {\n      instance.clearDelayTimeouts();\n    }\n  });\n\n  popper.addEventListener('mouseleave', () => {\n    if (\n      instance.props.interactive &&\n      instance.props.trigger.indexOf('mouseenter') >= 0\n    ) {\n      getDocument().addEventListener('mousemove', debouncedOnMouseMove);\n    }\n  });\n\n  return instance;\n\n  // ===========================================================================\n  // \uD83D\uDD12 Private methods\n  // ===========================================================================\n  function getNormalizedTouchSettings(): [string | boolean, number] {\n    const {touch} = instance.props;\n    return Array.isArray(touch) ? touch : [touch, 0];\n  }\n\n  function getIsCustomTouchBehavior(): boolean {\n    return getNormalizedTouchSettings()[0] === 'hold';\n  }\n\n  function getIsDefaultRenderFn(): boolean {\n    // @ts-ignore\n    return !!instance.props.render?.$$tippy;\n  }\n\n  function getCurrentTarget(): Element {\n    return currentTarget || reference;\n  }\n\n  function getDocument(): Document {\n    const parent = getCurrentTarget().parentNode as Element;\n    return parent ? getOwnerDocument(parent) : document;\n  }\n\n  function getDefaultTemplateChildren(): PopperChildren {\n    return getChildren(popper);\n  }\n\n  function getDelay(isShow: boolean): number {\n    // For touch or keyboard input, force `0` delay for UX reasons\n    // Also if the instance is mounted but not visible (transitioning out),\n    // ignore delay\n    if (\n      (instance.state.isMounted && !instance.state.isVisible) ||\n      currentInput.isTouch ||\n      (lastTriggerEvent && lastTriggerEvent.type === 'focus')\n    ) {\n      return 0;\n    }\n\n    return getValueAtIndexOrReturn(\n      instance.props.delay,\n      isShow ? 0 : 1,\n      defaultProps.delay\n    );\n  }\n\n  function handleStyles(fromHide = false): void {\n    popper.style.pointerEvents =\n      instance.props.interactive && !fromHide ? '' : 'none';\n    popper.style.zIndex = `${instance.props.zIndex}`;\n  }\n\n  function invokeHook(\n    hook: keyof LifecycleHooks,\n    args: [Instance, any?],\n    shouldInvokePropsHook = true\n  ): void {\n    pluginsHooks.forEach((pluginHooks) => {\n      if (pluginHooks[hook]) {\n        pluginHooks[hook]!(...args);\n      }\n    });\n\n    if (shouldInvokePropsHook) {\n      instance.props[hook](...args);\n    }\n  }\n\n  function handleAriaContentAttribute(): void {\n    const {aria} = instance.props;\n\n    if (!aria.content) {\n      return;\n    }\n\n    const attr = `aria-${aria.content}`;\n    const id = popper.id;\n    const nodes = normalizeToArray(instance.props.triggerTarget || reference);\n\n    nodes.forEach((node) => {\n      const currentValue = node.getAttribute(attr);\n\n      if (instance.state.isVisible) {\n        node.setAttribute(attr, currentValue ? `${currentValue} ${id}` : id);\n      } else {\n        const nextValue = currentValue && currentValue.replace(id, '').trim();\n\n        if (nextValue) {\n          node.setAttribute(attr, nextValue);\n        } else {\n          node.removeAttribute(attr);\n        }\n      }\n    });\n  }\n\n  function handleAriaExpandedAttribute(): void {\n    if (hasAriaExpanded || !instance.props.aria.expanded) {\n      return;\n    }\n\n    const nodes = normalizeToArray(instance.props.triggerTarget || reference);\n\n    nodes.forEach((node) => {\n      if (instance.props.interactive) {\n        node.setAttribute(\n          'aria-expanded',\n          instance.state.isVisible && node === getCurrentTarget()\n            ? 'true'\n            : 'false'\n        );\n      } else {\n        node.removeAttribute('aria-expanded');\n      }\n    });\n  }\n\n  function cleanupInteractiveMouseListeners(): void {\n    getDocument().removeEventListener('mousemove', debouncedOnMouseMove);\n    mouseMoveListeners = mouseMoveListeners.filter(\n      (listener) => listener !== debouncedOnMouseMove\n    );\n  }\n\n  function onDocumentPress(event: MouseEvent | TouchEvent): void {\n    // Moved finger to scroll instead of an intentional tap outside\n    if (currentInput.isTouch) {\n      if (didTouchMove || event.type === 'mousedown') {\n        return;\n      }\n    }\n\n    const actualTarget =\n      (event.composedPath && event.composedPath()[0]) || event.target;\n\n    // Clicked on interactive popper\n    if (\n      instance.props.interactive &&\n      actualContains(popper, actualTarget as Element)\n    ) {\n      return;\n    }\n\n    // Clicked on the event listeners target\n    if (\n      normalizeToArray(instance.props.triggerTarget || reference).some((el) =>\n        actualContains(el, actualTarget as Element)\n      )\n    ) {\n      if (currentInput.isTouch) {\n        return;\n      }\n\n      if (\n        instance.state.isVisible &&\n        instance.props.trigger.indexOf('click') >= 0\n      ) {\n        return;\n      }\n    } else {\n      invokeHook('onClickOutside', [instance, event]);\n    }\n\n    if (instance.props.hideOnClick === true) {\n      instance.clearDelayTimeouts();\n      instance.hide();\n\n      // `mousedown` event is fired right before `focus` if pressing the\n      // currentTarget. This lets a tippy with `focus` trigger know that it\n      // should not show\n      didHideDueToDocumentMouseDown = true;\n      setTimeout(() => {\n        didHideDueToDocumentMouseDown = false;\n      });\n\n      // The listener gets added in `scheduleShow()`, but this may be hiding it\n      // before it shows, and hide()'s early bail-out behavior can prevent it\n      // from being cleaned up\n      if (!instance.state.isMounted) {\n        removeDocumentPress();\n      }\n    }\n  }\n\n  function onTouchMove(): void {\n    didTouchMove = true;\n  }\n\n  function onTouchStart(): void {\n    didTouchMove = false;\n  }\n\n  function addDocumentPress(): void {\n    const doc = getDocument();\n    doc.addEventListener('mousedown', onDocumentPress, true);\n    doc.addEventListener('touchend', onDocumentPress, TOUCH_OPTIONS);\n    doc.addEventListener('touchstart', onTouchStart, TOUCH_OPTIONS);\n    doc.addEventListener('touchmove', onTouchMove, TOUCH_OPTIONS);\n  }\n\n  function removeDocumentPress(): void {\n    const doc = getDocument();\n    doc.removeEventListener('mousedown', onDocumentPress, true);\n    doc.removeEventListener('touchend', onDocumentPress, TOUCH_OPTIONS);\n    doc.removeEventListener('touchstart', onTouchStart, TOUCH_OPTIONS);\n    doc.removeEventListener('touchmove', onTouchMove, TOUCH_OPTIONS);\n  }\n\n  function onTransitionedOut(duration: number, callback: () => void): void {\n    onTransitionEnd(duration, () => {\n      if (\n        !instance.state.isVisible &&\n        popper.parentNode &&\n        popper.parentNode.contains(popper)\n      ) {\n        callback();\n      }\n    });\n  }\n\n  function onTransitionedIn(duration: number, callback: () => void): void {\n    onTransitionEnd(duration, callback);\n  }\n\n  function onTransitionEnd(duration: number, callback: () => void): void {\n    const box = getDefaultTemplateChildren().box;\n\n    function listener(event: TransitionEvent): void {\n      if (event.target === box) {\n        updateTransitionEndListener(box, 'remove', listener);\n        callback();\n      }\n    }\n\n    // Make callback synchronous if duration is 0\n    // `transitionend` won't fire otherwise\n    if (duration === 0) {\n      return callback();\n    }\n\n    updateTransitionEndListener(box, 'remove', currentTransitionEndListener);\n    updateTransitionEndListener(box, 'add', listener);\n\n    currentTransitionEndListener = listener;\n  }\n\n  function on(\n    eventType: string,\n    handler: EventListener,\n    options: boolean | Record<string, unknown> = false\n  ): void {\n    const nodes = normalizeToArray(instance.props.triggerTarget || reference);\n    nodes.forEach((node) => {\n      node.addEventListener(eventType, handler, options);\n      listeners.push({node, eventType, handler, options});\n    });\n  }\n\n  function addListeners(): void {\n    if (getIsCustomTouchBehavior()) {\n      on('touchstart', onTrigger, {passive: true});\n      on('touchend', onMouseLeave as EventListener, {passive: true});\n    }\n\n    splitBySpaces(instance.props.trigger).forEach((eventType) => {\n      if (eventType === 'manual') {\n        return;\n      }\n\n      on(eventType, onTrigger);\n\n      switch (eventType) {\n        case 'mouseenter':\n          on('mouseleave', onMouseLeave as EventListener);\n          break;\n        case 'focus':\n          on(isIE11 ? 'focusout' : 'blur', onBlurOrFocusOut as EventListener);\n          break;\n        case 'focusin':\n          on('focusout', onBlurOrFocusOut as EventListener);\n          break;\n      }\n    });\n  }\n\n  function removeListeners(): void {\n    listeners.forEach(({node, eventType, handler, options}: ListenerObject) => {\n      node.removeEventListener(eventType, handler, options);\n    });\n    listeners = [];\n  }\n\n  function onTrigger(event: Event): void {\n    let shouldScheduleClickHide = false;\n\n    if (\n      !instance.state.isEnabled ||\n      isEventListenerStopped(event) ||\n      didHideDueToDocumentMouseDown\n    ) {\n      return;\n    }\n\n    const wasFocused = lastTriggerEvent?.type === 'focus';\n\n    lastTriggerEvent = event;\n    currentTarget = event.currentTarget as Element;\n\n    handleAriaExpandedAttribute();\n\n    if (!instance.state.isVisible && isMouseEvent(event)) {\n      // If scrolling, `mouseenter` events can be fired if the cursor lands\n      // over a new target, but `mousemove` events don't get fired. This\n      // causes interactive tooltips to get stuck open until the cursor is\n      // moved\n      mouseMoveListeners.forEach((listener) => listener(event));\n    }\n\n    // Toggle show/hide when clicking click-triggered tooltips\n    if (\n      event.type === 'click' &&\n      (instance.props.trigger.indexOf('mouseenter') < 0 ||\n        isVisibleFromClick) &&\n      instance.props.hideOnClick !== false &&\n      instance.state.isVisible\n    ) {\n      shouldScheduleClickHide = true;\n    } else {\n      scheduleShow(event);\n    }\n\n    if (event.type === 'click') {\n      isVisibleFromClick = !shouldScheduleClickHide;\n    }\n\n    if (shouldScheduleClickHide && !wasFocused) {\n      scheduleHide(event);\n    }\n  }\n\n  function onMouseMove(event: MouseEvent): void {\n    const target = event.target as Node;\n    const isCursorOverReferenceOrPopper =\n      getCurrentTarget().contains(target) || popper.contains(target);\n\n    if (event.type === 'mousemove' && isCursorOverReferenceOrPopper) {\n      return;\n    }\n\n    const popperTreeData = getNestedPopperTree()\n      .concat(popper)\n      .map((popper) => {\n        const instance = popper._tippy!;\n        const state = instance.popperInstance?.state;\n\n        if (state) {\n          return {\n            popperRect: popper.getBoundingClientRect(),\n            popperState: state,\n            props,\n          };\n        }\n\n        return null;\n      })\n      .filter(Boolean) as PopperTreeData[];\n\n    if (isCursorOutsideInteractiveBorder(popperTreeData, event)) {\n      cleanupInteractiveMouseListeners();\n      scheduleHide(event);\n    }\n  }\n\n  function onMouseLeave(event: MouseEvent): void {\n    const shouldBail =\n      isEventListenerStopped(event) ||\n      (instance.props.trigger.indexOf('click') >= 0 && isVisibleFromClick);\n\n    if (shouldBail) {\n      return;\n    }\n\n    if (instance.props.interactive) {\n      instance.hideWithInteractivity(event);\n      return;\n    }\n\n    scheduleHide(event);\n  }\n\n  function onBlurOrFocusOut(event: FocusEvent): void {\n    if (\n      instance.props.trigger.indexOf('focusin') < 0 &&\n      event.target !== getCurrentTarget()\n    ) {\n      return;\n    }\n\n    // If focus was moved to within the popper\n    if (\n      instance.props.interactive &&\n      event.relatedTarget &&\n      popper.contains(event.relatedTarget as Element)\n    ) {\n      return;\n    }\n\n    scheduleHide(event);\n  }\n\n  function isEventListenerStopped(event: Event): boolean {\n    return currentInput.isTouch\n      ? getIsCustomTouchBehavior() !== event.type.indexOf('touch') >= 0\n      : false;\n  }\n\n  function createPopperInstance(): void {\n    destroyPopperInstance();\n\n    const {\n      popperOptions,\n      placement,\n      offset,\n      getReferenceClientRect,\n      moveTransition,\n    } = instance.props;\n\n    const arrow = getIsDefaultRenderFn() ? getChildren(popper).arrow : null;\n\n    const computedReference = getReferenceClientRect\n      ? {\n          getBoundingClientRect: getReferenceClientRect,\n          contextElement:\n            getReferenceClientRect.contextElement || getCurrentTarget(),\n        }\n      : reference;\n\n    const tippyModifier: Modifier<'$$tippy', Record<string, unknown>> = {\n      name: '$$tippy',\n      enabled: true,\n      phase: 'beforeWrite',\n      requires: ['computeStyles'],\n      fn({state}) {\n        if (getIsDefaultRenderFn()) {\n          const {box} = getDefaultTemplateChildren();\n\n          ['placement', 'reference-hidden', 'escaped'].forEach((attr) => {\n            if (attr === 'placement') {\n              box.setAttribute('data-placement', state.placement);\n            } else {\n              if (state.attributes.popper[`data-popper-${attr}`]) {\n                box.setAttribute(`data-${attr}`, '');\n              } else {\n                box.removeAttribute(`data-${attr}`);\n              }\n            }\n          });\n\n          state.attributes.popper = {};\n        }\n      },\n    };\n\n    type TippyModifier = Modifier<'$$tippy', Record<string, unknown>>;\n    type ExtendedModifiers = StrictModifiers | Partial<TippyModifier>;\n\n    const modifiers: Array<ExtendedModifiers> = [\n      {\n        name: 'offset',\n        options: {\n          offset,\n        },\n      },\n      {\n        name: 'preventOverflow',\n        options: {\n          padding: {\n            top: 2,\n            bottom: 2,\n            left: 5,\n            right: 5,\n          },\n        },\n      },\n      {\n        name: 'flip',\n        options: {\n          padding: 5,\n        },\n      },\n      {\n        name: 'computeStyles',\n        options: {\n          adaptive: !moveTransition,\n        },\n      },\n      tippyModifier,\n    ];\n\n    if (getIsDefaultRenderFn() && arrow) {\n      modifiers.push({\n        name: 'arrow',\n        options: {\n          element: arrow,\n          padding: 3,\n        },\n      });\n    }\n\n    modifiers.push(...(popperOptions?.modifiers || []));\n\n    instance.popperInstance = createPopper<ExtendedModifiers>(\n      computedReference,\n      popper,\n      {\n        ...popperOptions,\n        placement,\n        onFirstUpdate,\n        modifiers,\n      }\n    );\n  }\n\n  function destroyPopperInstance(): void {\n    if (instance.popperInstance) {\n      instance.popperInstance.destroy();\n      instance.popperInstance = null;\n    }\n  }\n\n  function mount(): void {\n    const {appendTo} = instance.props;\n\n    let parentNode: any;\n\n    // By default, we'll append the popper to the triggerTargets's parentNode so\n    // it's directly after the reference element so the elements inside the\n    // tippy can be tabbed to\n    // If there are clipping issues, the user can specify a different appendTo\n    // and ensure focus management is handled correctly manually\n    const node = getCurrentTarget();\n\n    if (\n      (instance.props.interactive && appendTo === TIPPY_DEFAULT_APPEND_TO) ||\n      appendTo === 'parent'\n    ) {\n      parentNode = node.parentNode;\n    } else {\n      parentNode = invokeWithArgsOrReturn(appendTo, [node]);\n    }\n\n    // The popper element needs to exist on the DOM before its position can be\n    // updated as Popper needs to read its dimensions\n    if (!parentNode.contains(popper)) {\n      parentNode.appendChild(popper);\n    }\n\n    instance.state.isMounted = true;\n\n    createPopperInstance();\n\n    /* istanbul ignore else */\n    if (__DEV__) {\n      // Accessibility check\n      warnWhen(\n        instance.props.interactive &&\n          appendTo === defaultProps.appendTo &&\n          node.nextElementSibling !== popper,\n        [\n          'Interactive tippy element may not be accessible via keyboard',\n          'navigation because it is not directly after the reference element',\n          'in the DOM source order.',\n          '\\n\\n',\n          'Using a wrapper <div> or <span> tag around the reference element',\n          'solves this by creating a new parentNode context.',\n          '\\n\\n',\n          'Specifying `appendTo: document.body` silences this warning, but it',\n          'assumes you are using a focus management solution to handle',\n          'keyboard navigation.',\n          '\\n\\n',\n          'See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity',\n        ].join(' ')\n      );\n    }\n  }\n\n  function getNestedPopperTree(): PopperElement[] {\n    return arrayFrom(\n      popper.querySelectorAll('[data-__NAMESPACE_PREFIX__-root]')\n    );\n  }\n\n  function scheduleShow(event?: Event): void {\n    instance.clearDelayTimeouts();\n\n    if (event) {\n      invokeHook('onTrigger', [instance, event]);\n    }\n\n    addDocumentPress();\n\n    let delay = getDelay(true);\n    const [touchValue, touchDelay] = getNormalizedTouchSettings();\n\n    if (currentInput.isTouch && touchValue === 'hold' && touchDelay) {\n      delay = touchDelay;\n    }\n\n    if (delay) {\n      showTimeout = setTimeout(() => {\n        instance.show();\n      }, delay);\n    } else {\n      instance.show();\n    }\n  }\n\n  function scheduleHide(event: Event): void {\n    instance.clearDelayTimeouts();\n\n    invokeHook('onUntrigger', [instance, event]);\n\n    if (!instance.state.isVisible) {\n      removeDocumentPress();\n\n      return;\n    }\n\n    // For interactive tippies, scheduleHide is added to a document.body handler\n    // from onMouseLeave so must intercept scheduled hides from mousemove/leave\n    // events when trigger contains mouseenter and click, and the tip is\n    // currently shown as a result of a click.\n    if (\n      instance.props.trigger.indexOf('mouseenter') >= 0 &&\n      instance.props.trigger.indexOf('click') >= 0 &&\n      ['mouseleave', 'mousemove'].indexOf(event.type) >= 0 &&\n      isVisibleFromClick\n    ) {\n      return;\n    }\n\n    const delay = getDelay(false);\n\n    if (delay) {\n      hideTimeout = setTimeout(() => {\n        if (instance.state.isVisible) {\n          instance.hide();\n        }\n      }, delay);\n    } else {\n      // Fixes a `transitionend` problem when it fires 1 frame too\n      // late sometimes, we don't want hide() to be called.\n      scheduleHideAnimationFrame = requestAnimationFrame(() => {\n        instance.hide();\n      });\n    }\n  }\n\n  // ===========================================================================\n  // \uD83D\uDD11 Public methods\n  // ===========================================================================\n  function enable(): void {\n    instance.state.isEnabled = true;\n  }\n\n  function disable(): void {\n    // Disabling the instance should also hide it\n    // https://github.com/atomiks/tippy.js-react/issues/106\n    instance.hide();\n    instance.state.isEnabled = false;\n  }\n\n  function clearDelayTimeouts(): void {\n    clearTimeout(showTimeout);\n    clearTimeout(hideTimeout);\n    cancelAnimationFrame(scheduleHideAnimationFrame);\n  }\n\n  function setProps(partialProps: Partial<Props>): void {\n    /* istanbul ignore else */\n    if (__DEV__) {\n      warnWhen(instance.state.isDestroyed, createMemoryLeakWarning('setProps'));\n    }\n\n    if (instance.state.isDestroyed) {\n      return;\n    }\n\n    invokeHook('onBeforeUpdate', [instance, partialProps]);\n\n    removeListeners();\n\n    const prevProps = instance.props;\n    const nextProps = evaluateProps(reference, {\n      ...prevProps,\n      ...removeUndefinedProps(partialProps),\n      ignoreAttributes: true,\n    });\n\n    instance.props = nextProps;\n\n    addListeners();\n\n    if (prevProps.interactiveDebounce !== nextProps.interactiveDebounce) {\n      cleanupInteractiveMouseListeners();\n      debouncedOnMouseMove = debounce(\n        onMouseMove,\n        nextProps.interactiveDebounce\n      );\n    }\n\n    // Ensure stale aria-expanded attributes are removed\n    if (prevProps.triggerTarget && !nextProps.triggerTarget) {\n      normalizeToArray(prevProps.triggerTarget).forEach((node) => {\n        node.removeAttribute('aria-expanded');\n      });\n    } else if (nextProps.triggerTarget) {\n      reference.removeAttribute('aria-expanded');\n    }\n\n    handleAriaExpandedAttribute();\n    handleStyles();\n\n    if (onUpdate) {\n      onUpdate(prevProps, nextProps);\n    }\n\n    if (instance.popperInstance) {\n      createPopperInstance();\n\n      // Fixes an issue with nested tippies if they are all getting re-rendered,\n      // and the nested ones get re-rendered first.\n      // https://github.com/atomiks/tippyjs-react/issues/177\n      // TODO: find a cleaner / more efficient solution(!)\n      getNestedPopperTree().forEach((nestedPopper) => {\n        // React (and other UI libs likely) requires a rAF wrapper as it flushes\n        // its work in one\n        requestAnimationFrame(nestedPopper._tippy!.popperInstance!.forceUpdate);\n      });\n    }\n\n    invokeHook('onAfterUpdate', [instance, partialProps]);\n  }\n\n  function setContent(content: Content): void {\n    instance.setProps({content});\n  }\n\n  function show(): void {\n    /* istanbul ignore else */\n    if (__DEV__) {\n      warnWhen(instance.state.isDestroyed, createMemoryLeakWarning('show'));\n    }\n\n    // Early bail-out\n    const isAlreadyVisible = instance.state.isVisible;\n    const isDestroyed = instance.state.isDestroyed;\n    const isDisabled = !instance.state.isEnabled;\n    const isTouchAndTouchDisabled =\n      currentInput.isTouch && !instance.props.touch;\n    const duration = getValueAtIndexOrReturn(\n      instance.props.duration,\n      0,\n      defaultProps.duration\n    );\n\n    if (\n      isAlreadyVisible ||\n      isDestroyed ||\n      isDisabled ||\n      isTouchAndTouchDisabled\n    ) {\n      return;\n    }\n\n    // Normalize `disabled` behavior across browsers.\n    // Firefox allows events on disabled elements, but Chrome doesn't.\n    // Using a wrapper element (i.e. <span>) is recommended.\n    if (getCurrentTarget().hasAttribute('disabled')) {\n      return;\n    }\n\n    invokeHook('onShow', [instance], false);\n    if (instance.props.onShow(instance) === false) {\n      return;\n    }\n\n    instance.state.isVisible = true;\n\n    if (getIsDefaultRenderFn()) {\n      popper.style.visibility = 'visible';\n    }\n\n    handleStyles();\n    addDocumentPress();\n\n    if (!instance.state.isMounted) {\n      popper.style.transition = 'none';\n    }\n\n    // If flipping to the opposite side after hiding at least once, the\n    // animation will use the wrong placement without resetting the duration\n    if (getIsDefaultRenderFn()) {\n      const {box, content} = getDefaultTemplateChildren();\n      setTransitionDuration([box, content], 0);\n    }\n\n    onFirstUpdate = (): void => {\n      if (!instance.state.isVisible || ignoreOnFirstUpdate) {\n        return;\n      }\n\n      ignoreOnFirstUpdate = true;\n\n      // reflow\n      void popper.offsetHeight;\n\n      popper.style.transition = instance.props.moveTransition;\n\n      if (getIsDefaultRenderFn() && instance.props.animation) {\n        const {box, content} = getDefaultTemplateChildren();\n        setTransitionDuration([box, content], duration);\n        setVisibilityState([box, content], 'visible');\n      }\n\n      handleAriaContentAttribute();\n      handleAriaExpandedAttribute();\n\n      pushIfUnique(mountedInstances, instance);\n\n      // certain modifiers (e.g. `maxSize`) require a second update after the\n      // popper has been positioned for the first time\n      instance.popperInstance?.forceUpdate();\n\n      invokeHook('onMount', [instance]);\n\n      if (instance.props.animation && getIsDefaultRenderFn()) {\n        onTransitionedIn(duration, () => {\n          instance.state.isShown = true;\n          invokeHook('onShown', [instance]);\n        });\n      }\n    };\n\n    mount();\n  }\n\n  function hide(): void {\n    /* istanbul ignore else */\n    if (__DEV__) {\n      warnWhen(instance.state.isDestroyed, createMemoryLeakWarning('hide'));\n    }\n\n    // Early bail-out\n    const isAlreadyHidden = !instance.state.isVisible;\n    const isDestroyed = instance.state.isDestroyed;\n    const isDisabled = !instance.state.isEnabled;\n    const duration = getValueAtIndexOrReturn(\n      instance.props.duration,\n      1,\n      defaultProps.duration\n    );\n\n    if (isAlreadyHidden || isDestroyed || isDisabled) {\n      return;\n    }\n\n    invokeHook('onHide', [instance], false);\n    if (instance.props.onHide(instance) === false) {\n      return;\n    }\n\n    instance.state.isVisible = false;\n    instance.state.isShown = false;\n    ignoreOnFirstUpdate = false;\n    isVisibleFromClick = false;\n\n    if (getIsDefaultRenderFn()) {\n      popper.style.visibility = 'hidden';\n    }\n\n    cleanupInteractiveMouseListeners();\n    removeDocumentPress();\n    handleStyles(true);\n\n    if (getIsDefaultRenderFn()) {\n      const {box, content} = getDefaultTemplateChildren();\n\n      if (instance.props.animation) {\n        setTransitionDuration([box, content], duration);\n        setVisibilityState([box, content], 'hidden');\n      }\n    }\n\n    handleAriaContentAttribute();\n    handleAriaExpandedAttribute();\n\n    if (instance.props.animation) {\n      if (getIsDefaultRenderFn()) {\n        onTransitionedOut(duration, instance.unmount);\n      }\n    } else {\n      instance.unmount();\n    }\n  }\n\n  function hideWithInteractivity(event: MouseEvent): void {\n    /* istanbul ignore else */\n    if (__DEV__) {\n      warnWhen(\n        instance.state.isDestroyed,\n        createMemoryLeakWarning('hideWithInteractivity')\n      );\n    }\n\n    getDocument().addEventListener('mousemove', debouncedOnMouseMove);\n    pushIfUnique(mouseMoveListeners, debouncedOnMouseMove);\n    debouncedOnMouseMove(event);\n  }\n\n  function unmount(): void {\n    /* istanbul ignore else */\n    if (__DEV__) {\n      warnWhen(instance.state.isDestroyed, createMemoryLeakWarning('unmount'));\n    }\n\n    if (instance.state.isVisible) {\n      instance.hide();\n    }\n\n    if (!instance.state.isMounted) {\n      return;\n    }\n\n    destroyPopperInstance();\n\n    // If a popper is not interactive, it will be appended outside the popper\n    // tree by default. This seems mainly for interactive tippies, but we should\n    // find a workaround if possible\n    getNestedPopperTree().forEach((nestedPopper) => {\n      nestedPopper._tippy!.unmount();\n    });\n\n    if (popper.parentNode) {\n      popper.parentNode.removeChild(popper);\n    }\n\n    mountedInstances = mountedInstances.filter((i) => i !== instance);\n\n    instance.state.isMounted = false;\n    invokeHook('onHidden', [instance]);\n  }\n\n  function destroy(): void {\n    /* istanbul ignore else */\n    if (__DEV__) {\n      warnWhen(instance.state.isDestroyed, createMemoryLeakWarning('destroy'));\n    }\n\n    if (instance.state.isDestroyed) {\n      return;\n    }\n\n    instance.clearDelayTimeouts();\n    instance.unmount();\n\n    removeListeners();\n\n    delete reference._tippy;\n\n    instance.state.isDestroyed = true;\n\n    invokeHook('onDestroy', [instance]);\n  }\n}\n", "import bindGlobalEventListeners, {\n  currentInput,\n} from './bindGlobalEventListeners';\nimport createTippy, {mountedInstances} from './createTippy';\nimport {getArrayOfElements, isElement, isReferenceElement} from './dom-utils';\nimport {defaultProps, setDefaultProps, validateProps} from './props';\nimport {HideAll, HideAllOptions, Instance, Props, Targets} from './types';\nimport {validateTargets, warnWhen} from './validation';\n\nfunction tippy(\n  targets: Targets,\n  optionalProps: Partial<Props> = {}\n): Instance | Instance[] {\n  const plugins = defaultProps.plugins.concat(optionalProps.plugins || []);\n\n  /* istanbul ignore else */\n  if (__DEV__) {\n    validateTargets(targets);\n    validateProps(optionalProps, plugins);\n  }\n\n  bindGlobalEventListeners();\n\n  const passedProps: Partial<Props> = {...optionalProps, plugins};\n\n  const elements = getArrayOfElements(targets);\n\n  /* istanbul ignore else */\n  if (__DEV__) {\n    const isSingleContentElement = isElement(passedProps.content);\n    const isMoreThanOneReferenceElement = elements.length > 1;\n    warnWhen(\n      isSingleContentElement && isMoreThanOneReferenceElement,\n      [\n        'tippy() was passed an Element as the `content` prop, but more than',\n        'one tippy instance was created by this invocation. This means the',\n        'content element will only be appended to the last tippy instance.',\n        '\\n\\n',\n        'Instead, pass the .innerHTML of the element, or use a function that',\n        'returns a cloned version of the element instead.',\n        '\\n\\n',\n        '1) content: element.innerHTML\\n',\n        '2) content: () => element.cloneNode(true)',\n      ].join(' ')\n    );\n  }\n\n  const instances = elements.reduce<Instance[]>(\n    (acc, reference): Instance[] => {\n      const instance = reference && createTippy(reference, passedProps);\n\n      if (instance) {\n        acc.push(instance);\n      }\n\n      return acc;\n    },\n    []\n  );\n\n  return isElement(targets) ? instances[0] : instances;\n}\n\ntippy.defaultProps = defaultProps;\ntippy.setDefaultProps = setDefaultProps;\ntippy.currentInput = currentInput;\n\nexport default tippy;\n\nexport const hideAll: HideAll = ({\n  exclude: excludedReferenceOrInstance,\n  duration,\n}: HideAllOptions = {}) => {\n  mountedInstances.forEach((instance) => {\n    let isExcluded = false;\n\n    if (excludedReferenceOrInstance) {\n      isExcluded = isReferenceElement(excludedReferenceOrInstance)\n        ? instance.reference === excludedReferenceOrInstance\n        : instance.popper === (excludedReferenceOrInstance as Instance).popper;\n    }\n\n    if (!isExcluded) {\n      const originalDuration = instance.props.duration;\n\n      instance.setProps({duration});\n      instance.hide();\n\n      if (!instance.state.isDestroyed) {\n        instance.setProps({duration: originalDuration});\n      }\n    }\n  });\n};\n", "import tippy from '..';\nimport {div} from '../dom-utils';\nimport {\n  CreateSingleton,\n  Plugin,\n  CreateSingletonProps,\n  ReferenceElement,\n  CreateSingletonInstance,\n  Instance,\n  Props,\n} from '../types';\nimport {normalizeToArray, removeProperties} from '../utils';\nimport {errorWhen} from '../validation';\nimport {applyStyles, Modifier} from '@popperjs/core';\n\n// The default `applyStyles` modifier has a cleanup function that gets called\n// every time the popper is destroyed (i.e. a new target), removing the styles\n// and causing transitions to break for singletons when the console is open, but\n// most notably for non-transform styles being used, `gpuAcceleration: false`.\nconst applyStylesModifier: Modifier<'applyStyles', Record<string, unknown>> = {\n  ...applyStyles,\n  effect({state}) {\n    const initialStyles = {\n      popper: {\n        position: state.options.strategy,\n        left: '0',\n        top: '0',\n        margin: '0',\n      },\n      arrow: {\n        position: 'absolute',\n      },\n      reference: {},\n    };\n\n    Object.assign(state.elements.popper.style, initialStyles.popper);\n    state.styles = initialStyles;\n\n    if (state.elements.arrow) {\n      Object.assign(state.elements.arrow.style, initialStyles.arrow);\n    }\n\n    // intentionally return no cleanup function\n    // return () => { ... }\n  },\n};\n\nconst createSingleton: CreateSingleton = (\n  tippyInstances,\n  optionalProps = {}\n) => {\n  /* istanbul ignore else */\n  if (__DEV__) {\n    errorWhen(\n      !Array.isArray(tippyInstances),\n      [\n        'The first argument passed to createSingleton() must be an array of',\n        'tippy instances. The passed value was',\n        String(tippyInstances),\n      ].join(' ')\n    );\n  }\n\n  let individualInstances = tippyInstances;\n  let references: Array<ReferenceElement> = [];\n  let triggerTargets: Array<Element> = [];\n  let currentTarget: Element | null;\n  let overrides = optionalProps.overrides;\n  let interceptSetPropsCleanups: Array<() => void> = [];\n  let shownOnCreate = false;\n\n  function setTriggerTargets(): void {\n    triggerTargets = individualInstances\n      .map((instance) =>\n        normalizeToArray(instance.props.triggerTarget || instance.reference)\n      )\n      .reduce((acc, item) => acc.concat(item), []);\n  }\n\n  function setReferences(): void {\n    references = individualInstances.map((instance) => instance.reference);\n  }\n\n  function enableInstances(isEnabled: boolean): void {\n    individualInstances.forEach((instance) => {\n      if (isEnabled) {\n        instance.enable();\n      } else {\n        instance.disable();\n      }\n    });\n  }\n\n  function interceptSetProps(singleton: Instance): Array<() => void> {\n    return individualInstances.map((instance) => {\n      const originalSetProps = instance.setProps;\n\n      instance.setProps = (props): void => {\n        originalSetProps(props);\n\n        if (instance.reference === currentTarget) {\n          singleton.setProps(props);\n        }\n      };\n\n      return (): void => {\n        instance.setProps = originalSetProps;\n      };\n    });\n  }\n\n  // have to pass singleton, as it maybe undefined on first call\n  function prepareInstance(\n    singleton: Instance,\n    target: ReferenceElement\n  ): void {\n    const index = triggerTargets.indexOf(target);\n\n    // bail-out\n    if (target === currentTarget) {\n      return;\n    }\n\n    currentTarget = target;\n\n    const overrideProps: Partial<Props> = (overrides || [])\n      .concat('content')\n      .reduce((acc, prop) => {\n        (acc as any)[prop] = individualInstances[index].props[prop];\n        return acc;\n      }, {});\n\n    singleton.setProps({\n      ...overrideProps,\n      getReferenceClientRect:\n        typeof overrideProps.getReferenceClientRect === 'function'\n          ? overrideProps.getReferenceClientRect\n          : (): ClientRect => references[index]?.getBoundingClientRect(),\n    });\n  }\n\n  enableInstances(false);\n  setReferences();\n  setTriggerTargets();\n\n  const plugin: Plugin = {\n    fn() {\n      return {\n        onDestroy(): void {\n          enableInstances(true);\n        },\n        onHidden(): void {\n          currentTarget = null;\n        },\n        onClickOutside(instance): void {\n          if (instance.props.showOnCreate && !shownOnCreate) {\n            shownOnCreate = true;\n            currentTarget = null;\n          }\n        },\n        onShow(instance): void {\n          if (instance.props.showOnCreate && !shownOnCreate) {\n            shownOnCreate = true;\n            prepareInstance(instance, references[0]);\n          }\n        },\n        onTrigger(instance, event): void {\n          prepareInstance(instance, event.currentTarget as Element);\n        },\n      };\n    },\n  };\n\n  const singleton = tippy(div(), {\n    ...removeProperties(optionalProps, ['overrides']),\n    plugins: [plugin, ...(optionalProps.plugins || [])],\n    triggerTarget: triggerTargets,\n    popperOptions: {\n      ...optionalProps.popperOptions,\n      modifiers: [\n        ...(optionalProps.popperOptions?.modifiers || []),\n        applyStylesModifier,\n      ],\n    },\n  }) as CreateSingletonInstance<CreateSingletonProps>;\n\n  const originalShow = singleton.show;\n\n  singleton.show = (target?: ReferenceElement | Instance | number): void => {\n    originalShow();\n\n    // first time, showOnCreate or programmatic call with no params\n    // default to showing first instance\n    if (!currentTarget && target == null) {\n      return prepareInstance(singleton, references[0]);\n    }\n\n    // triggered from event (do nothing as prepareInstance already called by onTrigger)\n    // programmatic call with no params when already visible (do nothing again)\n    if (currentTarget && target == null) {\n      return;\n    }\n\n    // target is index of instance\n    if (typeof target === 'number') {\n      return (\n        references[target] && prepareInstance(singleton, references[target])\n      );\n    }\n\n    // target is a child tippy instance\n    if (individualInstances.indexOf(target as Instance) >= 0) {\n      const ref = (target as Instance).reference;\n      return prepareInstance(singleton, ref);\n    }\n\n    // target is a ReferenceElement\n    if (references.indexOf(target as ReferenceElement) >= 0) {\n      return prepareInstance(singleton, target as ReferenceElement);\n    }\n  };\n\n  singleton.showNext = (): void => {\n    const first = references[0];\n    if (!currentTarget) {\n      return singleton.show(0);\n    }\n    const index = references.indexOf(currentTarget);\n    singleton.show(references[index + 1] || first);\n  };\n\n  singleton.showPrevious = (): void => {\n    const last = references[references.length - 1];\n    if (!currentTarget) {\n      return singleton.show(last);\n    }\n    const index = references.indexOf(currentTarget);\n    const target = references[index - 1] || last;\n    singleton.show(target);\n  };\n\n  const originalSetProps = singleton.setProps;\n\n  singleton.setProps = (props): void => {\n    overrides = props.overrides || overrides;\n    originalSetProps(props);\n  };\n\n  singleton.setInstances = (nextInstances): void => {\n    enableInstances(true);\n    interceptSetPropsCleanups.forEach((fn) => fn());\n\n    individualInstances = nextInstances;\n\n    enableInstances(false);\n    setReferences();\n    setTriggerTargets();\n    interceptSetPropsCleanups = interceptSetProps(singleton);\n\n    singleton.setProps({triggerTarget: triggerTargets});\n  };\n\n  interceptSetPropsCleanups = interceptSetProps(singleton);\n\n  return singleton;\n};\n\nexport default createSingleton;\n", "import tippy from '..';\nimport {TOUCH_OPTIONS} from '../constants';\nimport {defaultProps} from '../props';\nimport {Instance, Props, Targets} from '../types';\nimport {ListenerObject} from '../types-internal';\nimport {normalizeToArray, removeProperties} from '../utils';\nimport {errorWhen} from '../validation';\n\nconst BUBBLING_EVENTS_MAP = {\n  mouseover: 'mouseenter',\n  focusin: 'focus',\n  click: 'click',\n};\n\n/**\n * Creates a delegate instance that controls the creation of tippy instances\n * for child elements (`target` CSS selector).\n */\nfunction delegate(\n  targets: Targets,\n  props: Partial<Props> & {target: string}\n): Instance | Instance[] {\n  /* istanbul ignore else */\n  if (__DEV__) {\n    errorWhen(\n      !(props && props.target),\n      [\n        'You must specity a `target` prop indicating a CSS selector string matching',\n        'the target elements that should receive a tippy.',\n      ].join(' ')\n    );\n  }\n\n  let listeners: ListenerObject[] = [];\n  let childTippyInstances: Instance[] = [];\n  let disabled = false;\n\n  const {target} = props;\n\n  const nativeProps = removeProperties(props, ['target']);\n  const parentProps = {...nativeProps, trigger: 'manual', touch: false};\n  const childProps = {\n    touch: defaultProps.touch,\n    ...nativeProps,\n    showOnCreate: true,\n  };\n\n  const returnValue = tippy(targets, parentProps);\n  const normalizedReturnValue = normalizeToArray(returnValue);\n\n  function onTrigger(event: Event): void {\n    if (!event.target || disabled) {\n      return;\n    }\n\n    const targetNode = (event.target as Element).closest(target);\n\n    if (!targetNode) {\n      return;\n    }\n\n    // Get relevant trigger with fallbacks:\n    // 1. Check `data-tippy-trigger` attribute on target node\n    // 2. Fallback to `trigger` passed to `delegate()`\n    // 3. Fallback to `defaultProps.trigger`\n    const trigger =\n      targetNode.getAttribute('data-tippy-trigger') ||\n      props.trigger ||\n      defaultProps.trigger;\n\n    // @ts-ignore\n    if (targetNode._tippy) {\n      return;\n    }\n\n    if (event.type === 'touchstart' && typeof childProps.touch === 'boolean') {\n      return;\n    }\n\n    if (\n      event.type !== 'touchstart' &&\n      trigger.indexOf((BUBBLING_EVENTS_MAP as any)[event.type]) < 0\n    ) {\n      return;\n    }\n\n    const instance = tippy(targetNode, childProps);\n\n    if (instance) {\n      childTippyInstances = childTippyInstances.concat(instance);\n    }\n  }\n\n  function on(\n    node: Element,\n    eventType: string,\n    handler: EventListener,\n    options: boolean | Record<string, unknown> = false\n  ): void {\n    node.addEventListener(eventType, handler, options);\n    listeners.push({node, eventType, handler, options});\n  }\n\n  function addEventListeners(instance: Instance): void {\n    const {reference} = instance;\n\n    on(reference, 'touchstart', onTrigger, TOUCH_OPTIONS);\n    on(reference, 'mouseover', onTrigger);\n    on(reference, 'focusin', onTrigger);\n    on(reference, 'click', onTrigger);\n  }\n\n  function removeEventListeners(): void {\n    listeners.forEach(({node, eventType, handler, options}: ListenerObject) => {\n      node.removeEventListener(eventType, handler, options);\n    });\n    listeners = [];\n  }\n\n  function applyMutations(instance: Instance): void {\n    const originalDestroy = instance.destroy;\n    const originalEnable = instance.enable;\n    const originalDisable = instance.disable;\n\n    instance.destroy = (shouldDestroyChildInstances = true): void => {\n      if (shouldDestroyChildInstances) {\n        childTippyInstances.forEach((instance) => {\n          instance.destroy();\n        });\n      }\n\n      childTippyInstances = [];\n\n      removeEventListeners();\n      originalDestroy();\n    };\n\n    instance.enable = (): void => {\n      originalEnable();\n      childTippyInstances.forEach((instance) => instance.enable());\n      disabled = false;\n    };\n\n    instance.disable = (): void => {\n      originalDisable();\n      childTippyInstances.forEach((instance) => instance.disable());\n      disabled = true;\n    };\n\n    addEventListeners(instance);\n  }\n\n  normalizedReturnValue.forEach(applyMutations);\n\n  return returnValue;\n}\n\nexport default delegate;\n", "import {BACKDROP_CLASS} from '../constants';\nimport {div, setVisibilityState} from '../dom-utils';\nimport {getChildren} from '../template';\nimport {AnimateFill} from '../types';\nimport {errorWhen} from '../validation';\n\nconst animateFill: AnimateFill = {\n  name: 'animateFill',\n  defaultValue: false,\n  fn(instance) {\n    // @ts-ignore\n    if (!instance.props.render?.$$tippy) {\n      if (__DEV__) {\n        errorWhen(\n          instance.props.animateFill,\n          'The `animateFill` plugin requires the default render function.'\n        );\n      }\n\n      return {};\n    }\n\n    const {box, content} = getChildren(instance.popper);\n\n    const backdrop = instance.props.animateFill\n      ? createBackdropElement()\n      : null;\n\n    return {\n      onCreate(): void {\n        if (backdrop) {\n          box.insertBefore(backdrop, box.firstElementChild!);\n          box.setAttribute('data-animatefill', '');\n          box.style.overflow = 'hidden';\n\n          instance.setProps({arrow: false, animation: 'shift-away'});\n        }\n      },\n      onMount(): void {\n        if (backdrop) {\n          const {transitionDuration} = box.style;\n          const duration = Number(transitionDuration.replace('ms', ''));\n\n          // The content should fade in after the backdrop has mostly filled the\n          // tooltip element. `clip-path` is the other alternative but is not\n          // well-supported and is buggy on some devices.\n          content.style.transitionDelay = `${Math.round(duration / 10)}ms`;\n\n          backdrop.style.transitionDuration = transitionDuration;\n          setVisibilityState([backdrop], 'visible');\n        }\n      },\n      onShow(): void {\n        if (backdrop) {\n          backdrop.style.transitionDuration = '0ms';\n        }\n      },\n      onHide(): void {\n        if (backdrop) {\n          setVisibilityState([backdrop], 'hidden');\n        }\n      },\n    };\n  },\n};\n\nexport default animateFill;\n\nfunction createBackdropElement(): HTMLDivElement {\n  const backdrop = div();\n  backdrop.className = BACKDROP_CLASS;\n  setVisibilityState([backdrop], 'hidden');\n  return backdrop;\n}\n", "import {getOwnerDocument, isMouseEvent} from '../dom-utils';\nimport {FollowCursor, Instance} from '../types';\n\nlet mouseCoords = {clientX: 0, clientY: 0};\nlet activeInstances: Array<{instance: Instance; doc: Document}> = [];\n\nfunction storeMouseCoords({clientX, clientY}: MouseEvent): void {\n  mouseCoords = {clientX, clientY};\n}\n\nfunction addMouseCoordsListener(doc: Document): void {\n  doc.addEventListener('mousemove', storeMouseCoords);\n}\n\nfunction removeMouseCoordsListener(doc: Document): void {\n  doc.removeEventListener('mousemove', storeMouseCoords);\n}\n\nconst followCursor: FollowCursor = {\n  name: 'followCursor',\n  defaultValue: false,\n  fn(instance) {\n    const reference = instance.reference;\n    const doc = getOwnerDocument(instance.props.triggerTarget || reference);\n\n    let isInternalUpdate = false;\n    let wasFocusEvent = false;\n    let isUnmounted = true;\n    let prevProps = instance.props;\n\n    function getIsInitialBehavior(): boolean {\n      return (\n        instance.props.followCursor === 'initial' && instance.state.isVisible\n      );\n    }\n\n    function addListener(): void {\n      doc.addEventListener('mousemove', onMouseMove);\n    }\n\n    function removeListener(): void {\n      doc.removeEventListener('mousemove', onMouseMove);\n    }\n\n    function unsetGetReferenceClientRect(): void {\n      isInternalUpdate = true;\n      instance.setProps({getReferenceClientRect: null});\n      isInternalUpdate = false;\n    }\n\n    function onMouseMove(event: MouseEvent): void {\n      // If the instance is interactive, avoid updating the position unless it's\n      // over the reference element\n      const isCursorOverReference = event.target\n        ? reference.contains(event.target as Node)\n        : true;\n      const {followCursor} = instance.props;\n      const {clientX, clientY} = event;\n\n      const rect = reference.getBoundingClientRect();\n      const relativeX = clientX - rect.left;\n      const relativeY = clientY - rect.top;\n\n      if (isCursorOverReference || !instance.props.interactive) {\n        instance.setProps({\n          // @ts-ignore - unneeded DOMRect properties\n          getReferenceClientRect() {\n            const rect = reference.getBoundingClientRect();\n\n            let x = clientX;\n            let y = clientY;\n\n            if (followCursor === 'initial') {\n              x = rect.left + relativeX;\n              y = rect.top + relativeY;\n            }\n\n            const top = followCursor === 'horizontal' ? rect.top : y;\n            const right = followCursor === 'vertical' ? rect.right : x;\n            const bottom = followCursor === 'horizontal' ? rect.bottom : y;\n            const left = followCursor === 'vertical' ? rect.left : x;\n\n            return {\n              width: right - left,\n              height: bottom - top,\n              top,\n              right,\n              bottom,\n              left,\n            };\n          },\n        });\n      }\n    }\n\n    function create(): void {\n      if (instance.props.followCursor) {\n        activeInstances.push({instance, doc});\n        addMouseCoordsListener(doc);\n      }\n    }\n\n    function destroy(): void {\n      activeInstances = activeInstances.filter(\n        (data) => data.instance !== instance\n      );\n\n      if (activeInstances.filter((data) => data.doc === doc).length === 0) {\n        removeMouseCoordsListener(doc);\n      }\n    }\n\n    return {\n      onCreate: create,\n      onDestroy: destroy,\n      onBeforeUpdate(): void {\n        prevProps = instance.props;\n      },\n      onAfterUpdate(_, {followCursor}): void {\n        if (isInternalUpdate) {\n          return;\n        }\n\n        if (\n          followCursor !== undefined &&\n          prevProps.followCursor !== followCursor\n        ) {\n          destroy();\n\n          if (followCursor) {\n            create();\n\n            if (\n              instance.state.isMounted &&\n              !wasFocusEvent &&\n              !getIsInitialBehavior()\n            ) {\n              addListener();\n            }\n          } else {\n            removeListener();\n            unsetGetReferenceClientRect();\n          }\n        }\n      },\n      onMount(): void {\n        if (instance.props.followCursor && !wasFocusEvent) {\n          if (isUnmounted) {\n            onMouseMove(mouseCoords as MouseEvent);\n            isUnmounted = false;\n          }\n\n          if (!getIsInitialBehavior()) {\n            addListener();\n          }\n        }\n      },\n      onTrigger(_, event): void {\n        if (isMouseEvent(event)) {\n          mouseCoords = {clientX: event.clientX, clientY: event.clientY};\n        }\n        wasFocusEvent = event.type === 'focus';\n      },\n      onHidden(): void {\n        if (instance.props.followCursor) {\n          unsetGetReferenceClientRect();\n          removeListener();\n          isUnmounted = true;\n        }\n      },\n    };\n  },\n};\n\nexport default followCursor;\n", "import {Modifier, Placement} from '@popperjs/core';\nimport {isMouseEvent} from '../dom-utils';\nimport {BasePlacement, InlinePositioning, Props} from '../types';\nimport {arrayFrom, getBasePlacement} from '../utils';\n\nfunction getProps(props: Props, modifier: Modifier<any, any>): Partial<Props> {\n  return {\n    popperOptions: {\n      ...props.popperOptions,\n      modifiers: [\n        ...(props.popperOptions?.modifiers || []).filter(\n          ({name}) => name !== modifier.name\n        ),\n        modifier,\n      ],\n    },\n  };\n}\n\nconst inlinePositioning: InlinePositioning = {\n  name: 'inlinePositioning',\n  defaultValue: false,\n  fn(instance) {\n    const {reference} = instance;\n\n    function isEnabled(): boolean {\n      return !!instance.props.inlinePositioning;\n    }\n\n    let placement: Placement;\n    let cursorRectIndex = -1;\n    let isInternalUpdate = false;\n    let triedPlacements: Array<string> = [];\n\n    const modifier: Modifier<\n      'tippyInlinePositioning',\n      Record<string, unknown>\n    > = {\n      name: 'tippyInlinePositioning',\n      enabled: true,\n      phase: 'afterWrite',\n      fn({state}) {\n        if (isEnabled()) {\n          if (triedPlacements.indexOf(state.placement) !== -1) {\n            triedPlacements = [];\n          }\n\n          if (\n            placement !== state.placement &&\n            triedPlacements.indexOf(state.placement) === -1\n          ) {\n            triedPlacements.push(state.placement);\n            instance.setProps({\n              // @ts-ignore - unneeded DOMRect properties\n              getReferenceClientRect: () =>\n                getReferenceClientRect(state.placement),\n            });\n          }\n\n          placement = state.placement;\n        }\n      },\n    };\n\n    function getReferenceClientRect(placement: Placement): Partial<DOMRect> {\n      return getInlineBoundingClientRect(\n        getBasePlacement(placement),\n        reference.getBoundingClientRect(),\n        arrayFrom(reference.getClientRects()),\n        cursorRectIndex\n      );\n    }\n\n    function setInternalProps(partialProps: Partial<Props>): void {\n      isInternalUpdate = true;\n      instance.setProps(partialProps);\n      isInternalUpdate = false;\n    }\n\n    function addModifier(): void {\n      if (!isInternalUpdate) {\n        setInternalProps(getProps(instance.props, modifier));\n      }\n    }\n\n    return {\n      onCreate: addModifier,\n      onAfterUpdate: addModifier,\n      onTrigger(_, event): void {\n        if (isMouseEvent(event)) {\n          const rects = arrayFrom(instance.reference.getClientRects());\n          const cursorRect = rects.find(\n            (rect) =>\n              rect.left - 2 <= event.clientX &&\n              rect.right + 2 >= event.clientX &&\n              rect.top - 2 <= event.clientY &&\n              rect.bottom + 2 >= event.clientY\n          );\n          const index = rects.indexOf(cursorRect);\n          cursorRectIndex = index > -1 ? index : cursorRectIndex;\n        }\n      },\n      onHidden(): void {\n        cursorRectIndex = -1;\n      },\n    };\n  },\n};\n\nexport default inlinePositioning;\n\nexport function getInlineBoundingClientRect(\n  currentBasePlacement: BasePlacement | null,\n  boundingRect: DOMRect,\n  clientRects: DOMRect[],\n  cursorRectIndex: number\n): {\n  top: number;\n  bottom: number;\n  left: number;\n  right: number;\n  width: number;\n  height: number;\n} {\n  // Not an inline element, or placement is not yet known\n  if (clientRects.length < 2 || currentBasePlacement === null) {\n    return boundingRect;\n  }\n\n  // There are two rects and they are disjoined\n  if (\n    clientRects.length === 2 &&\n    cursorRectIndex >= 0 &&\n    clientRects[0].left > clientRects[1].right\n  ) {\n    return clientRects[cursorRectIndex] || boundingRect;\n  }\n\n  switch (currentBasePlacement) {\n    case 'top':\n    case 'bottom': {\n      const firstRect = clientRects[0];\n      const lastRect = clientRects[clientRects.length - 1];\n      const isTop = currentBasePlacement === 'top';\n\n      const top = firstRect.top;\n      const bottom = lastRect.bottom;\n      const left = isTop ? firstRect.left : lastRect.left;\n      const right = isTop ? firstRect.right : lastRect.right;\n      const width = right - left;\n      const height = bottom - top;\n\n      return {top, bottom, left, right, width, height};\n    }\n    case 'left':\n    case 'right': {\n      const minLeft = Math.min(...clientRects.map((rects) => rects.left));\n      const maxRight = Math.max(...clientRects.map((rects) => rects.right));\n      const measureRects = clientRects.filter((rect) =>\n        currentBasePlacement === 'left'\n          ? rect.left === minLeft\n          : rect.right === maxRight\n      );\n\n      const top = measureRects[0].top;\n      const bottom = measureRects[measureRects.length - 1].bottom;\n      const left = minLeft;\n      const right = maxRight;\n      const width = right - left;\n      const height = bottom - top;\n\n      return {top, bottom, left, right, width, height};\n    }\n    default: {\n      return boundingRect;\n    }\n  }\n}\n", "import {VirtualElement} from '@popperjs/core';\nimport {ReferenceElement, Sticky} from '../types';\n\nconst sticky: Sticky = {\n  name: 'sticky',\n  defaultValue: false,\n  fn(instance) {\n    const {reference, popper} = instance;\n\n    function getReference(): ReferenceElement | VirtualElement {\n      return instance.popperInstance\n        ? instance.popperInstance.state.elements.reference\n        : reference;\n    }\n\n    function shouldCheck(value: 'reference' | 'popper'): boolean {\n      return instance.props.sticky === true || instance.props.sticky === value;\n    }\n\n    let prevRefRect: ClientRect | null = null;\n    let prevPopRect: ClientRect | null = null;\n\n    function updatePosition(): void {\n      const currentRefRect = shouldCheck('reference')\n        ? getReference().getBoundingClientRect()\n        : null;\n      const currentPopRect = shouldCheck('popper')\n        ? popper.getBoundingClientRect()\n        : null;\n\n      if (\n        (currentRefRect && areRectsDifferent(prevRefRect, currentRefRect)) ||\n        (currentPopRect && areRectsDifferent(prevPopRect, currentPopRect))\n      ) {\n        if (instance.popperInstance) {\n          instance.popperInstance.update();\n        }\n      }\n\n      prevRefRect = currentRefRect;\n      prevPopRect = currentPopRect;\n\n      if (instance.state.isMounted) {\n        requestAnimationFrame(updatePosition);\n      }\n    }\n\n    return {\n      onMount(): void {\n        if (instance.props.sticky) {\n          updatePosition();\n        }\n      },\n    };\n  },\n};\n\nexport default sticky;\n\nfunction areRectsDifferent(\n  rectA: ClientRect | null,\n  rectB: ClientRect | null\n): boolean {\n  if (rectA && rectB) {\n    return (\n      rectA.top !== rectB.top ||\n      rectA.right !== rectB.right ||\n      rectA.bottom !== rectB.bottom ||\n      rectA.left !== rectB.left\n    );\n  }\n\n  return true;\n}\n", "import tippy from '../src';\nimport {render} from '../src/template';\n\ntippy.setDefaultProps({render});\n\nexport {default, hideAll} from '../src';\nexport {default as createSingleton} from '../src/addons/createSingleton';\nexport {default as delegate} from '../src/addons/delegate';\nexport {default as animateFill} from '../src/plugins/animateFill';\nexport {default as followCursor} from '../src/plugins/followCursor';\nexport {default as inlinePositioning} from '../src/plugins/inlinePositioning';\nexport {default as sticky} from '../src/plugins/sticky';\nexport {ROUND_ARROW as roundArrow} from '../src/constants';\n", "import { Controller } from '@hotwired/stimulus';\nimport tippy from 'tippy.js';\n\nexport default class extends Controller {\n  copy(event) {\n    event.preventDefault();\n\n    const triggerElement = event.currentTarget;\n\n    const linkToCopy = this.data.get('link');\n\n    const tooltipSuccess = this.data.get('tooltipSuccess');\n    const tooltipError = this.data.get('tooltipError');\n\n    navigator.clipboard.writeText(linkToCopy).then(() => {\n      this.showTooltip(triggerElement, tooltipSuccess);\n    }, () => {\n      this.showTooltip(triggerElement, tooltipError);\n    });\n  }\n\n  showTooltip(element, tooltipText) {\n    tippy(element, {\n      content: tooltipText,\n      trigger: 'manual',\n      onShow(instance) {\n        setTimeout(() => {\n          instance.hide();\n        }, 2000);\n      },\n    }).show();\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\n\n// Connects to data-controller=\"cloak\"\nexport default class extends Controller {\n  connect() {\n    this.element.removeAttribute(\"skm-cloak\")\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\nimport _debounce from \"lodash/debounce\"\n\n// Connects to data-controller=\"collapse\"\nexport default class extends Controller {\n\n  static values = {\n    open: false,\n    maxHeight: Number,\n    minHeight: 200,\n    readMoreContent: String,\n    readLessContent: String\n  }\n\n  static classes = [\n    'expanded',\n    'collapsed'\n  ]\n\n  static targets = [\n    \"collapse\",\n    \"content\",\n    \"trigger\"\n  ]\n\n  connect() {\n    // Initial calculations of content max height\n    this.defineCollapseMaxHeight();\n    // Initial set for trigger button text\n    this.resolveTriggerButtonsContent();\n\n    // Nasledne zmensime collapse na 0 vysku\n    this.collapseTarget.style.maxHeight = `${this.minHeightValue}px`;\n\n    // Mutation OBSERVER\n    // tracks changes in DOM tree of the collapse content, then recounts max height\n    // Create the observer + callback\n    this.observer = new MutationObserver(function() {\n        this.defineCollapseMaxHeight()\n    }.bind(this));\n\n    // observer settings\n    this.observer.observe(\n        this.contentTarget,\n        { attributes: true, childList: true, characterData: true, subtree: true }\n    );\n\n\n    // Track all image elements inside collapse content and recount max height accordingly\n    Promise.all(Array.from(this.contentTarget.querySelectorAll('img')).map(img => {\n      if (img.complete)\n        return Promise.resolve(img.naturalHeight !== 0);\n      return new Promise(resolve => {\n        img.addEventListener('load', () => resolve(true));\n        img.addEventListener('error', () => resolve(false));\n      });\n    })).then(results => {\n        // console.log(\"all images loaded\")\n        this.defineCollapseMaxHeight();\n    });\n\n    // Handle resize of content block - recount max height\n    window.addEventListener('resize', _debounce(this.defineCollapseMaxHeight , 150).bind(this));\n  }\n\n  // Opens/Closes Collapse content\n  toggle() {\n    let el = this.collapseTarget;\n    this.openValue = !this.openValue;\n\n    el.classList.toggle('expanded', this.openValue)\n    this.resolveTriggerButtonsContent();\n\n    // OPEN\n    // collapse\n    if(this.openValue){\n      el.style.maxHeight = this.maxHeightValue+'px';\n    }\n\n    // CLOSE\n    // collapse\n    else{\n      el.style.maxHeight = this.minHeightValue+'px';\n    }\n  }\n\n  // Resolve Trigger button content and visual\n  resolveTriggerButtonsContent() {\n    this.triggerTargets.forEach((el)=>{\n      // Switch content\n      if(this.openValue){\n        el.innerHTML = this.readLessContentValue;\n      }\n      else{\n        el.innerHTML = this.readMoreContentValue;\n      }\n\n      // Switch opened/closed classes\n      if(this.hasCollapsedClass && this.hasExpandedClass){\n        this.collapsedClasses.map(colCls => el.classList.toggle(colCls, !this.openValue));\n        this.expandedClasses.map(expCls => el.classList.toggle(expCls, this.openValue));\n      }\n\n    })\n  }\n\n  // Define Collapsile content max-hegight\n  defineCollapseMaxHeight() {\n    this.maxHeightValue = this.contentTarget.offsetHeight;\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\nimport { get } from \"@rails/request.js\"\nimport _debounce from \"lodash/debounce\"\n\n// Connects to data-controller=\"combo-box\"\nexport default class extends Controller {\n  static targets = [\"input\", \"list\", \"listItem\", \"userId\", \"email\"]\n  static values = { url: String }\n\n  connect() {\n    this.performSearch = _debounce(this.search, 500).bind(this)\n\n    this.inputTarget.addEventListener(\"focus\", () => this.showList())\n  }\n\n  search() {\n    get(`${this.urlValue}?query=${this.inputTarget.value}`, {\n      responseKind: \"turbo-stream\",\n    })\n  }\n\n  selectItem(event) {\n    if (this.hasInputTarget) {\n      this.inputTarget.value = event.params.user.email\n    }\n\n    if (this.hasUserIdTarget) {\n      this.userIdTarget.value = event.params.user.id\n    }\n\n    if (this.hasEmailTarget) {\n      this.emailTarget.value = event.params.user.email\n    }\n\n    this.hideList()\n  }\n\n  showList() {\n    this.listTarget.classList.remove(\"hidden\")\n  }\n\n  hideList() {\n    this.listTarget.classList.add(\"hidden\")\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n  static values = {\n    itemPrice: Number,\n  }\n\n  connect() {\n    this.recalculatePrice()\n  }\n\n  static targets = [\"quantity\", \"total\"]\n\n  recalculatePrice() {\n    if (this.quantity < 1) {\n      this.quantityTarget.value = 1\n    }\n\n    this.totalTarget.innerText = this.total\n  }\n\n  incrementQuantity() {\n    this.quantityTarget.value = parseInt(this.quantityTarget.value) + 1\n\n    this.recalculatePrice()\n  }\n\n  decrementQuantity() {\n    this.quantityTarget.value = parseInt(this.quantityTarget.value) - 1\n\n    this.recalculatePrice()\n  }\n\n  get total() {\n    return parseFloat(this.quantity * this.itemPrice).toFixed(0)\n  }\n\n  get quantity() {\n    return parseInt(this.quantityTarget.value)\n  }\n\n  get itemPrice() {\n    return parseFloat(this.itemPriceValue).toFixed(0)\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\n\n// Connects to data-controller=\"countdown-redirect\"\nexport default class extends Controller {\n  static values = {\n    wait: 10,\n    url: 'https://skillmea.cz'\n  }\n  \n  static targets = [\n    \"timer\"\n  ]\n\n  connect() {\n    this.timerTarget.innerHTML = this.waitValue\n\n    this.countdownRedirect = setInterval(() => {\n      // Countdown\n      if(this.waitValue > 0){\n        this.waitValue --\n        if(this.hasTimerTarget){\n          this.timerTarget.innerHTML = this.waitValue\n        }\n      }\n      // Redirect to URL\n      else{\n        // Using location href, so it doesnt get blocked by ad blockers\n        window.location.href = this.urlValue;\n        clearInterval(this.countdownRedirect)\n        this.element.classList.add('hidden')\n      }\n    }, 1000) \n  }\n\n  // Cleanup\n  disconnect(){\n    clearInterval(this.countdownRedirect)\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\n\n// Connects to data-controller=\"countdown-timer\"\nexport default class extends Controller {\n  static values = {\n    deadline: Number,\n    countdown: {\n      minutes: '00',\n      hours: '00',\n      days: '00'\n    },\n  }\n  static targets = [\n    'days',\n    'hours',\n    'minutes'\n  ]\n\n  connect() {\n    // Define interval\n    this.countdownInverval = setInterval(() => {\n      const now = new Date().getTime();\n      const timeLeft = (new Date(this.deadlineValue).getTime() - now) / 1000; //ms\n\n      this.countdownValue = {\n        minutes: Math.floor(timeLeft / 60) % 60,\n        hours: Math.floor(timeLeft / (60 * 60)) % 24,\n        days: Math.floor(timeLeft / (60 * 60 *24))\n      }\n\n    }, 1000);\n  }\n\n  // Deep watcher for countdown object - change displayed time\n  countdownValueChanged(){\n    this.daysTarget.innerHTML = this.countdownValue.days;\n    this.hoursTarget.innerHTML = this.countdownValue.hours;\n    this.minutesTarget.innerHTML = this.countdownValue.minutes;\n  }\n\n  disconnect(){\n    // Stop interval on disconnect\n    clearInterval(this.countdownInverval)\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\n\n// Connects to data-controller=\"counter\"\nexport default class extends Controller {\n  static targets = [\n    \"input\"\n  ]\n\n  static values = {\n    count: Number\n  }\n\n  increment(e){\n    this.countValue = parseInt(this.countValue+1);\n  }\n\n  decrement(e){\n    if(this.countValue > 0){\n      this.countValue = parseInt(this.countValue-1);\n    }\n  }\n\n  setCountTo(event){\n    this.countValue = parseInt(event.detail.count)\n  }\n\n  countValueChanged(){\n    // Render value into Input\n    this.inputTarget.value = this.countValue;\n\n    // Trigger custom event, so that other controllers might react to it\n    dispatchEvent(new CustomEvent('counterCountValueChanged', { detail: {count: this.countValue} }))\n  }\n  \n}\n", "import { Controller } from \"@hotwired/stimulus\"\nimport { Turbo } from \"@hotwired/turbo-rails\"\n\nexport default class extends Controller {\n  static values = {\n    url: String,\n  }\n\n  connect() {\n    const query = document.URL.split(\"#\")[1]\n\n    if (typeof query === \"undefined\") return\n\n    //TODO: Refactor this to function\n    fetch(`${this.urlValue}?${query}`, {\n      headers: { Accept: \"text/vnd.turbo-stream.html\" },\n    })\n      .then((r) => r.text())\n      .then((r) =>\n        r.replace('turbo-stream action=\"append\" target=\"courses\"', 'turbo-stream action=\"update\" target=\"courses\"')\n      )\n      .then((html) => Turbo.renderStreamMessage(html))\n  }\n\n  filter(e) {\n    e.preventDefault()\n\n    const filterParamsObj = JSON.parse(e.target.dataset.filterParams)\n\n    const filterParams = this.serializeFilterParamsObj(filterParamsObj).join(\"&\")\n    const query = encodeURI(filterParams)\n\n    fetch(`${this.urlValue}?${query}`, {\n      headers: { Accept: \"text/vnd.turbo-stream.html\" },\n    })\n      .then((r) => r.text())\n      .then((r) =>\n        r.replace('turbo-stream action=\"append\" target=\"courses\"', 'turbo-stream action=\"update\" target=\"courses\"')\n      )\n      .then((html) => Turbo.renderStreamMessage(html))\n      .then(() => history.replaceState(history.state, \"\", `${this.urlValue}#${query}`))\n  }\n\n  resetFilter(e) {\n    e.preventDefault()\n\n    fetch(`${this.urlValue}`, {\n      headers: { Accept: \"text/vnd.turbo-stream.html\" },\n    })\n      .then((r) => r.text())\n      .then((r) =>\n        r.replace('turbo-stream action=\"append\" target=\"courses\"', 'turbo-stream action=\"update\" target=\"courses\"')\n      )\n      .then((html) => Turbo.renderStreamMessage(html))\n      .then(() => history.replaceState(history.state, \"\", `${this.urlValue}`))\n  }\n\n  serializeFilterParamsObj(filterParams) {\n    let str = []\n\n    for (let param in filterParams) {\n      if (Array.isArray(filterParams[param])) {\n        for (let item in filterParams[param]) {\n          str.push(`${param}[]=${filterParams[param][item]}`)\n        }\n      } else if (typeof filterParams[param] == \"string\") {\n        str.push(`${param}=${filterParams[param]}`)\n      } else {\n        console.error(`Unknown param: ${param} -> ${filterParams[param]}`)\n      }\n    }\n\n    return str\n  }\n}\n", "import Dialog from '@stimulus-components/dialog'\n\nexport default class extends Dialog {\n  connect() {\n    super.connect()\n  }\n\n  // Function to override on close.\n  close() {\n    this.dialogTarget.setAttribute(\"closing\", \"\")\n\n    Promise.all(this.dialogTarget.getAnimations().map((animation) => animation.finished)).then(() => {\n      this.dialogTarget.removeAttribute(\"closing\")\n      this.dialogTarget.close()\n    })\n\n    let iframe = this.element.querySelector('iframe');\n\n    if(iframe){\n      this.pauseVimeoVideo(iframe);\n    }\n  }\n\n  pauseVimeoVideo(vimeoIframe){\n    const cachedSrcAttr = vimeoIframe.src;\n\n    vimeoIframe.src = '';\n    vimeoIframe.src = cachedSrcAttr;\n  }\n}\n", "export var HOOKS = [\n    \"onChange\",\n    \"onClose\",\n    \"onDayCreate\",\n    \"onDestroy\",\n    \"onKeyDown\",\n    \"onMonthChange\",\n    \"onOpen\",\n    \"onParseConfig\",\n    \"onReady\",\n    \"onValueUpdate\",\n    \"onYearChange\",\n    \"onPreCalendarPosition\",\n];\nexport var defaults = {\n    _disable: [],\n    allowInput: false,\n    allowInvalidPreload: false,\n    altFormat: \"F j, Y\",\n    altInput: false,\n    altInputClass: \"form-control input\",\n    animate: typeof window === \"object\" &&\n        window.navigator.userAgent.indexOf(\"MSIE\") === -1,\n    ariaDateFormat: \"F j, Y\",\n    autoFillDefaultTime: true,\n    clickOpens: true,\n    closeOnSelect: true,\n    conjunction: \", \",\n    dateFormat: \"Y-m-d\",\n    defaultHour: 12,\n    defaultMinute: 0,\n    defaultSeconds: 0,\n    disable: [],\n    disableMobile: false,\n    enableSeconds: false,\n    enableTime: false,\n    errorHandler: function (err) {\n        return typeof console !== \"undefined\" && console.warn(err);\n    },\n    getWeek: function (givenDate) {\n        var date = new Date(givenDate.getTime());\n        date.setHours(0, 0, 0, 0);\n        date.setDate(date.getDate() + 3 - ((date.getDay() + 6) % 7));\n        var week1 = new Date(date.getFullYear(), 0, 4);\n        return (1 +\n            Math.round(((date.getTime() - week1.getTime()) / 86400000 -\n                3 +\n                ((week1.getDay() + 6) % 7)) /\n                7));\n    },\n    hourIncrement: 1,\n    ignoredFocusElements: [],\n    inline: false,\n    locale: \"default\",\n    minuteIncrement: 5,\n    mode: \"single\",\n    monthSelectorType: \"dropdown\",\n    nextArrow: \"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>\",\n    noCalendar: false,\n    now: new Date(),\n    onChange: [],\n    onClose: [],\n    onDayCreate: [],\n    onDestroy: [],\n    onKeyDown: [],\n    onMonthChange: [],\n    onOpen: [],\n    onParseConfig: [],\n    onReady: [],\n    onValueUpdate: [],\n    onYearChange: [],\n    onPreCalendarPosition: [],\n    plugins: [],\n    position: \"auto\",\n    positionElement: undefined,\n    prevArrow: \"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>\",\n    shorthandCurrentMonth: false,\n    showMonths: 1,\n    static: false,\n    time_24hr: false,\n    weekNumbers: false,\n    wrap: false,\n};\n", "export var english = {\n    weekdays: {\n        shorthand: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n        longhand: [\n            \"Sunday\",\n            \"Monday\",\n            \"Tuesday\",\n            \"Wednesday\",\n            \"Thursday\",\n            \"Friday\",\n            \"Saturday\",\n        ],\n    },\n    months: {\n        shorthand: [\n            \"Jan\",\n            \"Feb\",\n            \"Mar\",\n            \"Apr\",\n            \"May\",\n            \"Jun\",\n            \"Jul\",\n            \"Aug\",\n            \"Sep\",\n            \"Oct\",\n            \"Nov\",\n            \"Dec\",\n        ],\n        longhand: [\n            \"January\",\n            \"February\",\n            \"March\",\n            \"April\",\n            \"May\",\n            \"June\",\n            \"July\",\n            \"August\",\n            \"September\",\n            \"October\",\n            \"November\",\n            \"December\",\n        ],\n    },\n    daysInMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],\n    firstDayOfWeek: 0,\n    ordinal: function (nth) {\n        var s = nth % 100;\n        if (s > 3 && s < 21)\n            return \"th\";\n        switch (s % 10) {\n            case 1:\n                return \"st\";\n            case 2:\n                return \"nd\";\n            case 3:\n                return \"rd\";\n            default:\n                return \"th\";\n        }\n    },\n    rangeSeparator: \" to \",\n    weekAbbreviation: \"Wk\",\n    scrollTitle: \"Scroll to increment\",\n    toggleTitle: \"Click to toggle\",\n    amPM: [\"AM\", \"PM\"],\n    yearAriaLabel: \"Year\",\n    monthAriaLabel: \"Month\",\n    hourAriaLabel: \"Hour\",\n    minuteAriaLabel: \"Minute\",\n    time_24hr: false,\n};\nexport default english;\n", "export var pad = function (number, length) {\n    if (length === void 0) { length = 2; }\n    return (\"000\" + number).slice(length * -1);\n};\nexport var int = function (bool) { return (bool === true ? 1 : 0); };\nexport function debounce(fn, wait) {\n    var t;\n    return function () {\n        var _this = this;\n        var args = arguments;\n        clearTimeout(t);\n        t = setTimeout(function () { return fn.apply(_this, args); }, wait);\n    };\n}\nexport var arrayify = function (obj) {\n    return obj instanceof Array ? obj : [obj];\n};\n", "export function toggleClass(elem, className, bool) {\n    if (bool === true)\n        return elem.classList.add(className);\n    elem.classList.remove(className);\n}\nexport function createElement(tag, className, content) {\n    var e = window.document.createElement(tag);\n    className = className || \"\";\n    content = content || \"\";\n    e.className = className;\n    if (content !== undefined)\n        e.textContent = content;\n    return e;\n}\nexport function clearNode(node) {\n    while (node.firstChild)\n        node.removeChild(node.firstChild);\n}\nexport function findParent(node, condition) {\n    if (condition(node))\n        return node;\n    else if (node.parentNode)\n        return findParent(node.parentNode, condition);\n    return undefined;\n}\nexport function createNumberInput(inputClassName, opts) {\n    var wrapper = createElement(\"div\", \"numInputWrapper\"), numInput = createElement(\"input\", \"numInput \" + inputClassName), arrowUp = createElement(\"span\", \"arrowUp\"), arrowDown = createElement(\"span\", \"arrowDown\");\n    if (navigator.userAgent.indexOf(\"MSIE 9.0\") === -1) {\n        numInput.type = \"number\";\n    }\n    else {\n        numInput.type = \"text\";\n        numInput.pattern = \"\\\\d*\";\n    }\n    if (opts !== undefined)\n        for (var key in opts)\n            numInput.setAttribute(key, opts[key]);\n    wrapper.appendChild(numInput);\n    wrapper.appendChild(arrowUp);\n    wrapper.appendChild(arrowDown);\n    return wrapper;\n}\nexport function getEventTarget(event) {\n    try {\n        if (typeof event.composedPath === \"function\") {\n            var path = event.composedPath();\n            return path[0];\n        }\n        return event.target;\n    }\n    catch (error) {\n        return event.target;\n    }\n}\n", "import { int, pad } from \"../utils\";\nvar doNothing = function () { return undefined; };\nexport var monthToStr = function (monthNumber, shorthand, locale) { return locale.months[shorthand ? \"shorthand\" : \"longhand\"][monthNumber]; };\nexport var revFormat = {\n    D: doNothing,\n    F: function (dateObj, monthName, locale) {\n        dateObj.setMonth(locale.months.longhand.indexOf(monthName));\n    },\n    G: function (dateObj, hour) {\n        dateObj.setHours((dateObj.getHours() >= 12 ? 12 : 0) + parseFloat(hour));\n    },\n    H: function (dateObj, hour) {\n        dateObj.setHours(parseFloat(hour));\n    },\n    J: function (dateObj, day) {\n        dateObj.setDate(parseFloat(day));\n    },\n    K: function (dateObj, amPM, locale) {\n        dateObj.setHours((dateObj.getHours() % 12) +\n            12 * int(new RegExp(locale.amPM[1], \"i\").test(amPM)));\n    },\n    M: function (dateObj, shortMonth, locale) {\n        dateObj.setMonth(locale.months.shorthand.indexOf(shortMonth));\n    },\n    S: function (dateObj, seconds) {\n        dateObj.setSeconds(parseFloat(seconds));\n    },\n    U: function (_, unixSeconds) { return new Date(parseFloat(unixSeconds) * 1000); },\n    W: function (dateObj, weekNum, locale) {\n        var weekNumber = parseInt(weekNum);\n        var date = new Date(dateObj.getFullYear(), 0, 2 + (weekNumber - 1) * 7, 0, 0, 0, 0);\n        date.setDate(date.getDate() - date.getDay() + locale.firstDayOfWeek);\n        return date;\n    },\n    Y: function (dateObj, year) {\n        dateObj.setFullYear(parseFloat(year));\n    },\n    Z: function (_, ISODate) { return new Date(ISODate); },\n    d: function (dateObj, day) {\n        dateObj.setDate(parseFloat(day));\n    },\n    h: function (dateObj, hour) {\n        dateObj.setHours((dateObj.getHours() >= 12 ? 12 : 0) + parseFloat(hour));\n    },\n    i: function (dateObj, minutes) {\n        dateObj.setMinutes(parseFloat(minutes));\n    },\n    j: function (dateObj, day) {\n        dateObj.setDate(parseFloat(day));\n    },\n    l: doNothing,\n    m: function (dateObj, month) {\n        dateObj.setMonth(parseFloat(month) - 1);\n    },\n    n: function (dateObj, month) {\n        dateObj.setMonth(parseFloat(month) - 1);\n    },\n    s: function (dateObj, seconds) {\n        dateObj.setSeconds(parseFloat(seconds));\n    },\n    u: function (_, unixMillSeconds) {\n        return new Date(parseFloat(unixMillSeconds));\n    },\n    w: doNothing,\n    y: function (dateObj, year) {\n        dateObj.setFullYear(2000 + parseFloat(year));\n    },\n};\nexport var tokenRegex = {\n    D: \"\",\n    F: \"\",\n    G: \"(\\\\d\\\\d|\\\\d)\",\n    H: \"(\\\\d\\\\d|\\\\d)\",\n    J: \"(\\\\d\\\\d|\\\\d)\\\\w+\",\n    K: \"\",\n    M: \"\",\n    S: \"(\\\\d\\\\d|\\\\d)\",\n    U: \"(.+)\",\n    W: \"(\\\\d\\\\d|\\\\d)\",\n    Y: \"(\\\\d{4})\",\n    Z: \"(.+)\",\n    d: \"(\\\\d\\\\d|\\\\d)\",\n    h: \"(\\\\d\\\\d|\\\\d)\",\n    i: \"(\\\\d\\\\d|\\\\d)\",\n    j: \"(\\\\d\\\\d|\\\\d)\",\n    l: \"\",\n    m: \"(\\\\d\\\\d|\\\\d)\",\n    n: \"(\\\\d\\\\d|\\\\d)\",\n    s: \"(\\\\d\\\\d|\\\\d)\",\n    u: \"(.+)\",\n    w: \"(\\\\d\\\\d|\\\\d)\",\n    y: \"(\\\\d{2})\",\n};\nexport var formats = {\n    Z: function (date) { return date.toISOString(); },\n    D: function (date, locale, options) {\n        return locale.weekdays.shorthand[formats.w(date, locale, options)];\n    },\n    F: function (date, locale, options) {\n        return monthToStr(formats.n(date, locale, options) - 1, false, locale);\n    },\n    G: function (date, locale, options) {\n        return pad(formats.h(date, locale, options));\n    },\n    H: function (date) { return pad(date.getHours()); },\n    J: function (date, locale) {\n        return locale.ordinal !== undefined\n            ? date.getDate() + locale.ordinal(date.getDate())\n            : date.getDate();\n    },\n    K: function (date, locale) { return locale.amPM[int(date.getHours() > 11)]; },\n    M: function (date, locale) {\n        return monthToStr(date.getMonth(), true, locale);\n    },\n    S: function (date) { return pad(date.getSeconds()); },\n    U: function (date) { return date.getTime() / 1000; },\n    W: function (date, _, options) {\n        return options.getWeek(date);\n    },\n    Y: function (date) { return pad(date.getFullYear(), 4); },\n    d: function (date) { return pad(date.getDate()); },\n    h: function (date) { return (date.getHours() % 12 ? date.getHours() % 12 : 12); },\n    i: function (date) { return pad(date.getMinutes()); },\n    j: function (date) { return date.getDate(); },\n    l: function (date, locale) {\n        return locale.weekdays.longhand[date.getDay()];\n    },\n    m: function (date) { return pad(date.getMonth() + 1); },\n    n: function (date) { return date.getMonth() + 1; },\n    s: function (date) { return date.getSeconds(); },\n    u: function (date) { return date.getTime(); },\n    w: function (date) { return date.getDay(); },\n    y: function (date) { return String(date.getFullYear()).substring(2); },\n};\n", "import { tokenRegex, revFormat, formats, } from \"./formatting\";\nimport { defaults } from \"../types/options\";\nimport { english } from \"../l10n/default\";\nexport var createDateFormatter = function (_a) {\n    var _b = _a.config, config = _b === void 0 ? defaults : _b, _c = _a.l10n, l10n = _c === void 0 ? english : _c, _d = _a.isMobile, isMobile = _d === void 0 ? false : _d;\n    return function (dateObj, frmt, overrideLocale) {\n        var locale = overrideLocale || l10n;\n        if (config.formatDate !== undefined && !isMobile) {\n            return config.formatDate(dateObj, frmt, locale);\n        }\n        return frmt\n            .split(\"\")\n            .map(function (c, i, arr) {\n            return formats[c] && arr[i - 1] !== \"\\\\\"\n                ? formats[c](dateObj, locale, config)\n                : c !== \"\\\\\"\n                    ? c\n                    : \"\";\n        })\n            .join(\"\");\n    };\n};\nexport var createDateParser = function (_a) {\n    var _b = _a.config, config = _b === void 0 ? defaults : _b, _c = _a.l10n, l10n = _c === void 0 ? english : _c;\n    return function (date, givenFormat, timeless, customLocale) {\n        if (date !== 0 && !date)\n            return undefined;\n        var locale = customLocale || l10n;\n        var parsedDate;\n        var dateOrig = date;\n        if (date instanceof Date)\n            parsedDate = new Date(date.getTime());\n        else if (typeof date !== \"string\" &&\n            date.toFixed !== undefined)\n            parsedDate = new Date(date);\n        else if (typeof date === \"string\") {\n            var format = givenFormat || (config || defaults).dateFormat;\n            var datestr = String(date).trim();\n            if (datestr === \"today\") {\n                parsedDate = new Date();\n                timeless = true;\n            }\n            else if (config && config.parseDate) {\n                parsedDate = config.parseDate(date, format);\n            }\n            else if (/Z$/.test(datestr) ||\n                /GMT$/.test(datestr)) {\n                parsedDate = new Date(date);\n            }\n            else {\n                var matched = void 0, ops = [];\n                for (var i = 0, matchIndex = 0, regexStr = \"\"; i < format.length; i++) {\n                    var token = format[i];\n                    var isBackSlash = token === \"\\\\\";\n                    var escaped = format[i - 1] === \"\\\\\" || isBackSlash;\n                    if (tokenRegex[token] && !escaped) {\n                        regexStr += tokenRegex[token];\n                        var match = new RegExp(regexStr).exec(date);\n                        if (match && (matched = true)) {\n                            ops[token !== \"Y\" ? \"push\" : \"unshift\"]({\n                                fn: revFormat[token],\n                                val: match[++matchIndex],\n                            });\n                        }\n                    }\n                    else if (!isBackSlash)\n                        regexStr += \".\";\n                }\n                parsedDate =\n                    !config || !config.noCalendar\n                        ? new Date(new Date().getFullYear(), 0, 1, 0, 0, 0, 0)\n                        : new Date(new Date().setHours(0, 0, 0, 0));\n                ops.forEach(function (_a) {\n                    var fn = _a.fn, val = _a.val;\n                    return (parsedDate = fn(parsedDate, val, locale) || parsedDate);\n                });\n                parsedDate = matched ? parsedDate : undefined;\n            }\n        }\n        if (!(parsedDate instanceof Date && !isNaN(parsedDate.getTime()))) {\n            config.errorHandler(new Error(\"Invalid date provided: \" + dateOrig));\n            return undefined;\n        }\n        if (timeless === true)\n            parsedDate.setHours(0, 0, 0, 0);\n        return parsedDate;\n    };\n};\nexport function compareDates(date1, date2, timeless) {\n    if (timeless === void 0) { timeless = true; }\n    if (timeless !== false) {\n        return (new Date(date1.getTime()).setHours(0, 0, 0, 0) -\n            new Date(date2.getTime()).setHours(0, 0, 0, 0));\n    }\n    return date1.getTime() - date2.getTime();\n}\nexport function compareTimes(date1, date2) {\n    return (3600 * (date1.getHours() - date2.getHours()) +\n        60 * (date1.getMinutes() - date2.getMinutes()) +\n        date1.getSeconds() -\n        date2.getSeconds());\n}\nexport var isBetween = function (ts, ts1, ts2) {\n    return ts > Math.min(ts1, ts2) && ts < Math.max(ts1, ts2);\n};\nexport var calculateSecondsSinceMidnight = function (hours, minutes, seconds) {\n    return hours * 3600 + minutes * 60 + seconds;\n};\nexport var parseSeconds = function (secondsSinceMidnight) {\n    var hours = Math.floor(secondsSinceMidnight / 3600), minutes = (secondsSinceMidnight - hours * 3600) / 60;\n    return [hours, minutes, secondsSinceMidnight - hours * 3600 - minutes * 60];\n};\nexport var duration = {\n    DAY: 86400000,\n};\nexport function getDefaultHours(config) {\n    var hours = config.defaultHour;\n    var minutes = config.defaultMinute;\n    var seconds = config.defaultSeconds;\n    if (config.minDate !== undefined) {\n        var minHour = config.minDate.getHours();\n        var minMinutes = config.minDate.getMinutes();\n        var minSeconds = config.minDate.getSeconds();\n        if (hours < minHour) {\n            hours = minHour;\n        }\n        if (hours === minHour && minutes < minMinutes) {\n            minutes = minMinutes;\n        }\n        if (hours === minHour && minutes === minMinutes && seconds < minSeconds)\n            seconds = config.minDate.getSeconds();\n    }\n    if (config.maxDate !== undefined) {\n        var maxHr = config.maxDate.getHours();\n        var maxMinutes = config.maxDate.getMinutes();\n        hours = Math.min(hours, maxHr);\n        if (hours === maxHr)\n            minutes = Math.min(maxMinutes, minutes);\n        if (hours === maxHr && minutes === maxMinutes)\n            seconds = config.maxDate.getSeconds();\n    }\n    return { hours: hours, minutes: minutes, seconds: seconds };\n}\n", "\"use strict\";\nif (typeof Object.assign !== \"function\") {\n    Object.assign = function (target) {\n        var args = [];\n        for (var _i = 1; _i < arguments.length; _i++) {\n            args[_i - 1] = arguments[_i];\n        }\n        if (!target) {\n            throw TypeError(\"Cannot convert undefined or null to object\");\n        }\n        var _loop_1 = function (source) {\n            if (source) {\n                Object.keys(source).forEach(function (key) { return (target[key] = source[key]); });\n            }\n        };\n        for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {\n            var source = args_1[_a];\n            _loop_1(source);\n        }\n        return target;\n    };\n}\n", "var __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nvar __spreadArrays = (this && this.__spreadArrays) || function () {\n    for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n    for (var r = Array(s), k = 0, i = 0; i < il; i++)\n        for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n            r[k] = a[j];\n    return r;\n};\nimport { defaults as defaultOptions, HOOKS, } from \"./types/options\";\nimport English from \"./l10n/default\";\nimport { arrayify, debounce, int, pad } from \"./utils\";\nimport { clearNode, createElement, createNumberInput, findParent, toggleClass, getEventTarget, } from \"./utils/dom\";\nimport { compareDates, createDateParser, createDateFormatter, duration, isBetween, getDefaultHours, calculateSecondsSinceMidnight, parseSeconds, } from \"./utils/dates\";\nimport { tokenRegex, monthToStr } from \"./utils/formatting\";\nimport \"./utils/polyfills\";\nvar DEBOUNCED_CHANGE_MS = 300;\nfunction FlatpickrInstance(element, instanceConfig) {\n    var self = {\n        config: __assign(__assign({}, defaultOptions), flatpickr.defaultConfig),\n        l10n: English,\n    };\n    self.parseDate = createDateParser({ config: self.config, l10n: self.l10n });\n    self._handlers = [];\n    self.pluginElements = [];\n    self.loadedPlugins = [];\n    self._bind = bind;\n    self._setHoursFromDate = setHoursFromDate;\n    self._positionCalendar = positionCalendar;\n    self.changeMonth = changeMonth;\n    self.changeYear = changeYear;\n    self.clear = clear;\n    self.close = close;\n    self.onMouseOver = onMouseOver;\n    self._createElement = createElement;\n    self.createDay = createDay;\n    self.destroy = destroy;\n    self.isEnabled = isEnabled;\n    self.jumpToDate = jumpToDate;\n    self.updateValue = updateValue;\n    self.open = open;\n    self.redraw = redraw;\n    self.set = set;\n    self.setDate = setDate;\n    self.toggle = toggle;\n    function setupHelperFunctions() {\n        self.utils = {\n            getDaysInMonth: function (month, yr) {\n                if (month === void 0) { month = self.currentMonth; }\n                if (yr === void 0) { yr = self.currentYear; }\n                if (month === 1 && ((yr % 4 === 0 && yr % 100 !== 0) || yr % 400 === 0))\n                    return 29;\n                return self.l10n.daysInMonth[month];\n            },\n        };\n    }\n    function init() {\n        self.element = self.input = element;\n        self.isOpen = false;\n        parseConfig();\n        setupLocale();\n        setupInputs();\n        setupDates();\n        setupHelperFunctions();\n        if (!self.isMobile)\n            build();\n        bindEvents();\n        if (self.selectedDates.length || self.config.noCalendar) {\n            if (self.config.enableTime) {\n                setHoursFromDate(self.config.noCalendar ? self.latestSelectedDateObj : undefined);\n            }\n            updateValue(false);\n        }\n        setCalendarWidth();\n        var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n        if (!self.isMobile && isSafari) {\n            positionCalendar();\n        }\n        triggerEvent(\"onReady\");\n    }\n    function getClosestActiveElement() {\n        var _a;\n        return (((_a = self.calendarContainer) === null || _a === void 0 ? void 0 : _a.getRootNode())\n            .activeElement || document.activeElement);\n    }\n    function bindToInstance(fn) {\n        return fn.bind(self);\n    }\n    function setCalendarWidth() {\n        var config = self.config;\n        if (config.weekNumbers === false && config.showMonths === 1) {\n            return;\n        }\n        else if (config.noCalendar !== true) {\n            window.requestAnimationFrame(function () {\n                if (self.calendarContainer !== undefined) {\n                    self.calendarContainer.style.visibility = \"hidden\";\n                    self.calendarContainer.style.display = \"block\";\n                }\n                if (self.daysContainer !== undefined) {\n                    var daysWidth = (self.days.offsetWidth + 1) * config.showMonths;\n                    self.daysContainer.style.width = daysWidth + \"px\";\n                    self.calendarContainer.style.width =\n                        daysWidth +\n                            (self.weekWrapper !== undefined\n                                ? self.weekWrapper.offsetWidth\n                                : 0) +\n                            \"px\";\n                    self.calendarContainer.style.removeProperty(\"visibility\");\n                    self.calendarContainer.style.removeProperty(\"display\");\n                }\n            });\n        }\n    }\n    function updateTime(e) {\n        if (self.selectedDates.length === 0) {\n            var defaultDate = self.config.minDate === undefined ||\n                compareDates(new Date(), self.config.minDate) >= 0\n                ? new Date()\n                : new Date(self.config.minDate.getTime());\n            var defaults = getDefaultHours(self.config);\n            defaultDate.setHours(defaults.hours, defaults.minutes, defaults.seconds, defaultDate.getMilliseconds());\n            self.selectedDates = [defaultDate];\n            self.latestSelectedDateObj = defaultDate;\n        }\n        if (e !== undefined && e.type !== \"blur\") {\n            timeWrapper(e);\n        }\n        var prevValue = self._input.value;\n        setHoursFromInputs();\n        updateValue();\n        if (self._input.value !== prevValue) {\n            self._debouncedChange();\n        }\n    }\n    function ampm2military(hour, amPM) {\n        return (hour % 12) + 12 * int(amPM === self.l10n.amPM[1]);\n    }\n    function military2ampm(hour) {\n        switch (hour % 24) {\n            case 0:\n            case 12:\n                return 12;\n            default:\n                return hour % 12;\n        }\n    }\n    function setHoursFromInputs() {\n        if (self.hourElement === undefined || self.minuteElement === undefined)\n            return;\n        var hours = (parseInt(self.hourElement.value.slice(-2), 10) || 0) % 24, minutes = (parseInt(self.minuteElement.value, 10) || 0) % 60, seconds = self.secondElement !== undefined\n            ? (parseInt(self.secondElement.value, 10) || 0) % 60\n            : 0;\n        if (self.amPM !== undefined) {\n            hours = ampm2military(hours, self.amPM.textContent);\n        }\n        var limitMinHours = self.config.minTime !== undefined ||\n            (self.config.minDate &&\n                self.minDateHasTime &&\n                self.latestSelectedDateObj &&\n                compareDates(self.latestSelectedDateObj, self.config.minDate, true) ===\n                    0);\n        var limitMaxHours = self.config.maxTime !== undefined ||\n            (self.config.maxDate &&\n                self.maxDateHasTime &&\n                self.latestSelectedDateObj &&\n                compareDates(self.latestSelectedDateObj, self.config.maxDate, true) ===\n                    0);\n        if (self.config.maxTime !== undefined &&\n            self.config.minTime !== undefined &&\n            self.config.minTime > self.config.maxTime) {\n            var minBound = calculateSecondsSinceMidnight(self.config.minTime.getHours(), self.config.minTime.getMinutes(), self.config.minTime.getSeconds());\n            var maxBound = calculateSecondsSinceMidnight(self.config.maxTime.getHours(), self.config.maxTime.getMinutes(), self.config.maxTime.getSeconds());\n            var currentTime = calculateSecondsSinceMidnight(hours, minutes, seconds);\n            if (currentTime > maxBound && currentTime < minBound) {\n                var result = parseSeconds(minBound);\n                hours = result[0];\n                minutes = result[1];\n                seconds = result[2];\n            }\n        }\n        else {\n            if (limitMaxHours) {\n                var maxTime = self.config.maxTime !== undefined\n                    ? self.config.maxTime\n                    : self.config.maxDate;\n                hours = Math.min(hours, maxTime.getHours());\n                if (hours === maxTime.getHours())\n                    minutes = Math.min(minutes, maxTime.getMinutes());\n                if (minutes === maxTime.getMinutes())\n                    seconds = Math.min(seconds, maxTime.getSeconds());\n            }\n            if (limitMinHours) {\n                var minTime = self.config.minTime !== undefined\n                    ? self.config.minTime\n                    : self.config.minDate;\n                hours = Math.max(hours, minTime.getHours());\n                if (hours === minTime.getHours() && minutes < minTime.getMinutes())\n                    minutes = minTime.getMinutes();\n                if (minutes === minTime.getMinutes())\n                    seconds = Math.max(seconds, minTime.getSeconds());\n            }\n        }\n        setHours(hours, minutes, seconds);\n    }\n    function setHoursFromDate(dateObj) {\n        var date = dateObj || self.latestSelectedDateObj;\n        if (date && date instanceof Date) {\n            setHours(date.getHours(), date.getMinutes(), date.getSeconds());\n        }\n    }\n    function setHours(hours, minutes, seconds) {\n        if (self.latestSelectedDateObj !== undefined) {\n            self.latestSelectedDateObj.setHours(hours % 24, minutes, seconds || 0, 0);\n        }\n        if (!self.hourElement || !self.minuteElement || self.isMobile)\n            return;\n        self.hourElement.value = pad(!self.config.time_24hr\n            ? ((12 + hours) % 12) + 12 * int(hours % 12 === 0)\n            : hours);\n        self.minuteElement.value = pad(minutes);\n        if (self.amPM !== undefined)\n            self.amPM.textContent = self.l10n.amPM[int(hours >= 12)];\n        if (self.secondElement !== undefined)\n            self.secondElement.value = pad(seconds);\n    }\n    function onYearInput(event) {\n        var eventTarget = getEventTarget(event);\n        var year = parseInt(eventTarget.value) + (event.delta || 0);\n        if (year / 1000 > 1 ||\n            (event.key === \"Enter\" && !/[^\\d]/.test(year.toString()))) {\n            changeYear(year);\n        }\n    }\n    function bind(element, event, handler, options) {\n        if (event instanceof Array)\n            return event.forEach(function (ev) { return bind(element, ev, handler, options); });\n        if (element instanceof Array)\n            return element.forEach(function (el) { return bind(el, event, handler, options); });\n        element.addEventListener(event, handler, options);\n        self._handlers.push({\n            remove: function () { return element.removeEventListener(event, handler, options); },\n        });\n    }\n    function triggerChange() {\n        triggerEvent(\"onChange\");\n    }\n    function bindEvents() {\n        if (self.config.wrap) {\n            [\"open\", \"close\", \"toggle\", \"clear\"].forEach(function (evt) {\n                Array.prototype.forEach.call(self.element.querySelectorAll(\"[data-\" + evt + \"]\"), function (el) {\n                    return bind(el, \"click\", self[evt]);\n                });\n            });\n        }\n        if (self.isMobile) {\n            setupMobile();\n            return;\n        }\n        var debouncedResize = debounce(onResize, 50);\n        self._debouncedChange = debounce(triggerChange, DEBOUNCED_CHANGE_MS);\n        if (self.daysContainer && !/iPhone|iPad|iPod/i.test(navigator.userAgent))\n            bind(self.daysContainer, \"mouseover\", function (e) {\n                if (self.config.mode === \"range\")\n                    onMouseOver(getEventTarget(e));\n            });\n        bind(self._input, \"keydown\", onKeyDown);\n        if (self.calendarContainer !== undefined) {\n            bind(self.calendarContainer, \"keydown\", onKeyDown);\n        }\n        if (!self.config.inline && !self.config.static)\n            bind(window, \"resize\", debouncedResize);\n        if (window.ontouchstart !== undefined)\n            bind(window.document, \"touchstart\", documentClick);\n        else\n            bind(window.document, \"mousedown\", documentClick);\n        bind(window.document, \"focus\", documentClick, { capture: true });\n        if (self.config.clickOpens === true) {\n            bind(self._input, \"focus\", self.open);\n            bind(self._input, \"click\", self.open);\n        }\n        if (self.daysContainer !== undefined) {\n            bind(self.monthNav, \"click\", onMonthNavClick);\n            bind(self.monthNav, [\"keyup\", \"increment\"], onYearInput);\n            bind(self.daysContainer, \"click\", selectDate);\n        }\n        if (self.timeContainer !== undefined &&\n            self.minuteElement !== undefined &&\n            self.hourElement !== undefined) {\n            var selText = function (e) {\n                return getEventTarget(e).select();\n            };\n            bind(self.timeContainer, [\"increment\"], updateTime);\n            bind(self.timeContainer, \"blur\", updateTime, { capture: true });\n            bind(self.timeContainer, \"click\", timeIncrement);\n            bind([self.hourElement, self.minuteElement], [\"focus\", \"click\"], selText);\n            if (self.secondElement !== undefined)\n                bind(self.secondElement, \"focus\", function () { return self.secondElement && self.secondElement.select(); });\n            if (self.amPM !== undefined) {\n                bind(self.amPM, \"click\", function (e) {\n                    updateTime(e);\n                });\n            }\n        }\n        if (self.config.allowInput) {\n            bind(self._input, \"blur\", onBlur);\n        }\n    }\n    function jumpToDate(jumpDate, triggerChange) {\n        var jumpTo = jumpDate !== undefined\n            ? self.parseDate(jumpDate)\n            : self.latestSelectedDateObj ||\n                (self.config.minDate && self.config.minDate > self.now\n                    ? self.config.minDate\n                    : self.config.maxDate && self.config.maxDate < self.now\n                        ? self.config.maxDate\n                        : self.now);\n        var oldYear = self.currentYear;\n        var oldMonth = self.currentMonth;\n        try {\n            if (jumpTo !== undefined) {\n                self.currentYear = jumpTo.getFullYear();\n                self.currentMonth = jumpTo.getMonth();\n            }\n        }\n        catch (e) {\n            e.message = \"Invalid date supplied: \" + jumpTo;\n            self.config.errorHandler(e);\n        }\n        if (triggerChange && self.currentYear !== oldYear) {\n            triggerEvent(\"onYearChange\");\n            buildMonthSwitch();\n        }\n        if (triggerChange &&\n            (self.currentYear !== oldYear || self.currentMonth !== oldMonth)) {\n            triggerEvent(\"onMonthChange\");\n        }\n        self.redraw();\n    }\n    function timeIncrement(e) {\n        var eventTarget = getEventTarget(e);\n        if (~eventTarget.className.indexOf(\"arrow\"))\n            incrementNumInput(e, eventTarget.classList.contains(\"arrowUp\") ? 1 : -1);\n    }\n    function incrementNumInput(e, delta, inputElem) {\n        var target = e && getEventTarget(e);\n        var input = inputElem ||\n            (target && target.parentNode && target.parentNode.firstChild);\n        var event = createEvent(\"increment\");\n        event.delta = delta;\n        input && input.dispatchEvent(event);\n    }\n    function build() {\n        var fragment = window.document.createDocumentFragment();\n        self.calendarContainer = createElement(\"div\", \"flatpickr-calendar\");\n        self.calendarContainer.tabIndex = -1;\n        if (!self.config.noCalendar) {\n            fragment.appendChild(buildMonthNav());\n            self.innerContainer = createElement(\"div\", \"flatpickr-innerContainer\");\n            if (self.config.weekNumbers) {\n                var _a = buildWeeks(), weekWrapper = _a.weekWrapper, weekNumbers = _a.weekNumbers;\n                self.innerContainer.appendChild(weekWrapper);\n                self.weekNumbers = weekNumbers;\n                self.weekWrapper = weekWrapper;\n            }\n            self.rContainer = createElement(\"div\", \"flatpickr-rContainer\");\n            self.rContainer.appendChild(buildWeekdays());\n            if (!self.daysContainer) {\n                self.daysContainer = createElement(\"div\", \"flatpickr-days\");\n                self.daysContainer.tabIndex = -1;\n            }\n            buildDays();\n            self.rContainer.appendChild(self.daysContainer);\n            self.innerContainer.appendChild(self.rContainer);\n            fragment.appendChild(self.innerContainer);\n        }\n        if (self.config.enableTime) {\n            fragment.appendChild(buildTime());\n        }\n        toggleClass(self.calendarContainer, \"rangeMode\", self.config.mode === \"range\");\n        toggleClass(self.calendarContainer, \"animate\", self.config.animate === true);\n        toggleClass(self.calendarContainer, \"multiMonth\", self.config.showMonths > 1);\n        self.calendarContainer.appendChild(fragment);\n        var customAppend = self.config.appendTo !== undefined &&\n            self.config.appendTo.nodeType !== undefined;\n        if (self.config.inline || self.config.static) {\n            self.calendarContainer.classList.add(self.config.inline ? \"inline\" : \"static\");\n            if (self.config.inline) {\n                if (!customAppend && self.element.parentNode)\n                    self.element.parentNode.insertBefore(self.calendarContainer, self._input.nextSibling);\n                else if (self.config.appendTo !== undefined)\n                    self.config.appendTo.appendChild(self.calendarContainer);\n            }\n            if (self.config.static) {\n                var wrapper = createElement(\"div\", \"flatpickr-wrapper\");\n                if (self.element.parentNode)\n                    self.element.parentNode.insertBefore(wrapper, self.element);\n                wrapper.appendChild(self.element);\n                if (self.altInput)\n                    wrapper.appendChild(self.altInput);\n                wrapper.appendChild(self.calendarContainer);\n            }\n        }\n        if (!self.config.static && !self.config.inline)\n            (self.config.appendTo !== undefined\n                ? self.config.appendTo\n                : window.document.body).appendChild(self.calendarContainer);\n    }\n    function createDay(className, date, _dayNumber, i) {\n        var dateIsEnabled = isEnabled(date, true), dayElement = createElement(\"span\", className, date.getDate().toString());\n        dayElement.dateObj = date;\n        dayElement.$i = i;\n        dayElement.setAttribute(\"aria-label\", self.formatDate(date, self.config.ariaDateFormat));\n        if (className.indexOf(\"hidden\") === -1 &&\n            compareDates(date, self.now) === 0) {\n            self.todayDateElem = dayElement;\n            dayElement.classList.add(\"today\");\n            dayElement.setAttribute(\"aria-current\", \"date\");\n        }\n        if (dateIsEnabled) {\n            dayElement.tabIndex = -1;\n            if (isDateSelected(date)) {\n                dayElement.classList.add(\"selected\");\n                self.selectedDateElem = dayElement;\n                if (self.config.mode === \"range\") {\n                    toggleClass(dayElement, \"startRange\", self.selectedDates[0] &&\n                        compareDates(date, self.selectedDates[0], true) === 0);\n                    toggleClass(dayElement, \"endRange\", self.selectedDates[1] &&\n                        compareDates(date, self.selectedDates[1], true) === 0);\n                    if (className === \"nextMonthDay\")\n                        dayElement.classList.add(\"inRange\");\n                }\n            }\n        }\n        else {\n            dayElement.classList.add(\"flatpickr-disabled\");\n        }\n        if (self.config.mode === \"range\") {\n            if (isDateInRange(date) && !isDateSelected(date))\n                dayElement.classList.add(\"inRange\");\n        }\n        if (self.weekNumbers &&\n            self.config.showMonths === 1 &&\n            className !== \"prevMonthDay\" &&\n            i % 7 === 6) {\n            self.weekNumbers.insertAdjacentHTML(\"beforeend\", \"<span class='flatpickr-day'>\" + self.config.getWeek(date) + \"</span>\");\n        }\n        triggerEvent(\"onDayCreate\", dayElement);\n        return dayElement;\n    }\n    function focusOnDayElem(targetNode) {\n        targetNode.focus();\n        if (self.config.mode === \"range\")\n            onMouseOver(targetNode);\n    }\n    function getFirstAvailableDay(delta) {\n        var startMonth = delta > 0 ? 0 : self.config.showMonths - 1;\n        var endMonth = delta > 0 ? self.config.showMonths : -1;\n        for (var m = startMonth; m != endMonth; m += delta) {\n            var month = self.daysContainer.children[m];\n            var startIndex = delta > 0 ? 0 : month.children.length - 1;\n            var endIndex = delta > 0 ? month.children.length : -1;\n            for (var i = startIndex; i != endIndex; i += delta) {\n                var c = month.children[i];\n                if (c.className.indexOf(\"hidden\") === -1 && isEnabled(c.dateObj))\n                    return c;\n            }\n        }\n        return undefined;\n    }\n    function getNextAvailableDay(current, delta) {\n        var givenMonth = current.className.indexOf(\"Month\") === -1\n            ? current.dateObj.getMonth()\n            : self.currentMonth;\n        var endMonth = delta > 0 ? self.config.showMonths : -1;\n        var loopDelta = delta > 0 ? 1 : -1;\n        for (var m = givenMonth - self.currentMonth; m != endMonth; m += loopDelta) {\n            var month = self.daysContainer.children[m];\n            var startIndex = givenMonth - self.currentMonth === m\n                ? current.$i + delta\n                : delta < 0\n                    ? month.children.length - 1\n                    : 0;\n            var numMonthDays = month.children.length;\n            for (var i = startIndex; i >= 0 && i < numMonthDays && i != (delta > 0 ? numMonthDays : -1); i += loopDelta) {\n                var c = month.children[i];\n                if (c.className.indexOf(\"hidden\") === -1 &&\n                    isEnabled(c.dateObj) &&\n                    Math.abs(current.$i - i) >= Math.abs(delta))\n                    return focusOnDayElem(c);\n            }\n        }\n        self.changeMonth(loopDelta);\n        focusOnDay(getFirstAvailableDay(loopDelta), 0);\n        return undefined;\n    }\n    function focusOnDay(current, offset) {\n        var activeElement = getClosestActiveElement();\n        var dayFocused = isInView(activeElement || document.body);\n        var startElem = current !== undefined\n            ? current\n            : dayFocused\n                ? activeElement\n                : self.selectedDateElem !== undefined && isInView(self.selectedDateElem)\n                    ? self.selectedDateElem\n                    : self.todayDateElem !== undefined && isInView(self.todayDateElem)\n                        ? self.todayDateElem\n                        : getFirstAvailableDay(offset > 0 ? 1 : -1);\n        if (startElem === undefined) {\n            self._input.focus();\n        }\n        else if (!dayFocused) {\n            focusOnDayElem(startElem);\n        }\n        else {\n            getNextAvailableDay(startElem, offset);\n        }\n    }\n    function buildMonthDays(year, month) {\n        var firstOfMonth = (new Date(year, month, 1).getDay() - self.l10n.firstDayOfWeek + 7) % 7;\n        var prevMonthDays = self.utils.getDaysInMonth((month - 1 + 12) % 12, year);\n        var daysInMonth = self.utils.getDaysInMonth(month, year), days = window.document.createDocumentFragment(), isMultiMonth = self.config.showMonths > 1, prevMonthDayClass = isMultiMonth ? \"prevMonthDay hidden\" : \"prevMonthDay\", nextMonthDayClass = isMultiMonth ? \"nextMonthDay hidden\" : \"nextMonthDay\";\n        var dayNumber = prevMonthDays + 1 - firstOfMonth, dayIndex = 0;\n        for (; dayNumber <= prevMonthDays; dayNumber++, dayIndex++) {\n            days.appendChild(createDay(\"flatpickr-day \" + prevMonthDayClass, new Date(year, month - 1, dayNumber), dayNumber, dayIndex));\n        }\n        for (dayNumber = 1; dayNumber <= daysInMonth; dayNumber++, dayIndex++) {\n            days.appendChild(createDay(\"flatpickr-day\", new Date(year, month, dayNumber), dayNumber, dayIndex));\n        }\n        for (var dayNum = daysInMonth + 1; dayNum <= 42 - firstOfMonth &&\n            (self.config.showMonths === 1 || dayIndex % 7 !== 0); dayNum++, dayIndex++) {\n            days.appendChild(createDay(\"flatpickr-day \" + nextMonthDayClass, new Date(year, month + 1, dayNum % daysInMonth), dayNum, dayIndex));\n        }\n        var dayContainer = createElement(\"div\", \"dayContainer\");\n        dayContainer.appendChild(days);\n        return dayContainer;\n    }\n    function buildDays() {\n        if (self.daysContainer === undefined) {\n            return;\n        }\n        clearNode(self.daysContainer);\n        if (self.weekNumbers)\n            clearNode(self.weekNumbers);\n        var frag = document.createDocumentFragment();\n        for (var i = 0; i < self.config.showMonths; i++) {\n            var d = new Date(self.currentYear, self.currentMonth, 1);\n            d.setMonth(self.currentMonth + i);\n            frag.appendChild(buildMonthDays(d.getFullYear(), d.getMonth()));\n        }\n        self.daysContainer.appendChild(frag);\n        self.days = self.daysContainer.firstChild;\n        if (self.config.mode === \"range\" && self.selectedDates.length === 1) {\n            onMouseOver();\n        }\n    }\n    function buildMonthSwitch() {\n        if (self.config.showMonths > 1 ||\n            self.config.monthSelectorType !== \"dropdown\")\n            return;\n        var shouldBuildMonth = function (month) {\n            if (self.config.minDate !== undefined &&\n                self.currentYear === self.config.minDate.getFullYear() &&\n                month < self.config.minDate.getMonth()) {\n                return false;\n            }\n            return !(self.config.maxDate !== undefined &&\n                self.currentYear === self.config.maxDate.getFullYear() &&\n                month > self.config.maxDate.getMonth());\n        };\n        self.monthsDropdownContainer.tabIndex = -1;\n        self.monthsDropdownContainer.innerHTML = \"\";\n        for (var i = 0; i < 12; i++) {\n            if (!shouldBuildMonth(i))\n                continue;\n            var month = createElement(\"option\", \"flatpickr-monthDropdown-month\");\n            month.value = new Date(self.currentYear, i).getMonth().toString();\n            month.textContent = monthToStr(i, self.config.shorthandCurrentMonth, self.l10n);\n            month.tabIndex = -1;\n            if (self.currentMonth === i) {\n                month.selected = true;\n            }\n            self.monthsDropdownContainer.appendChild(month);\n        }\n    }\n    function buildMonth() {\n        var container = createElement(\"div\", \"flatpickr-month\");\n        var monthNavFragment = window.document.createDocumentFragment();\n        var monthElement;\n        if (self.config.showMonths > 1 ||\n            self.config.monthSelectorType === \"static\") {\n            monthElement = createElement(\"span\", \"cur-month\");\n        }\n        else {\n            self.monthsDropdownContainer = createElement(\"select\", \"flatpickr-monthDropdown-months\");\n            self.monthsDropdownContainer.setAttribute(\"aria-label\", self.l10n.monthAriaLabel);\n            bind(self.monthsDropdownContainer, \"change\", function (e) {\n                var target = getEventTarget(e);\n                var selectedMonth = parseInt(target.value, 10);\n                self.changeMonth(selectedMonth - self.currentMonth);\n                triggerEvent(\"onMonthChange\");\n            });\n            buildMonthSwitch();\n            monthElement = self.monthsDropdownContainer;\n        }\n        var yearInput = createNumberInput(\"cur-year\", { tabindex: \"-1\" });\n        var yearElement = yearInput.getElementsByTagName(\"input\")[0];\n        yearElement.setAttribute(\"aria-label\", self.l10n.yearAriaLabel);\n        if (self.config.minDate) {\n            yearElement.setAttribute(\"min\", self.config.minDate.getFullYear().toString());\n        }\n        if (self.config.maxDate) {\n            yearElement.setAttribute(\"max\", self.config.maxDate.getFullYear().toString());\n            yearElement.disabled =\n                !!self.config.minDate &&\n                    self.config.minDate.getFullYear() === self.config.maxDate.getFullYear();\n        }\n        var currentMonth = createElement(\"div\", \"flatpickr-current-month\");\n        currentMonth.appendChild(monthElement);\n        currentMonth.appendChild(yearInput);\n        monthNavFragment.appendChild(currentMonth);\n        container.appendChild(monthNavFragment);\n        return {\n            container: container,\n            yearElement: yearElement,\n            monthElement: monthElement,\n        };\n    }\n    function buildMonths() {\n        clearNode(self.monthNav);\n        self.monthNav.appendChild(self.prevMonthNav);\n        if (self.config.showMonths) {\n            self.yearElements = [];\n            self.monthElements = [];\n        }\n        for (var m = self.config.showMonths; m--;) {\n            var month = buildMonth();\n            self.yearElements.push(month.yearElement);\n            self.monthElements.push(month.monthElement);\n            self.monthNav.appendChild(month.container);\n        }\n        self.monthNav.appendChild(self.nextMonthNav);\n    }\n    function buildMonthNav() {\n        self.monthNav = createElement(\"div\", \"flatpickr-months\");\n        self.yearElements = [];\n        self.monthElements = [];\n        self.prevMonthNav = createElement(\"span\", \"flatpickr-prev-month\");\n        self.prevMonthNav.innerHTML = self.config.prevArrow;\n        self.nextMonthNav = createElement(\"span\", \"flatpickr-next-month\");\n        self.nextMonthNav.innerHTML = self.config.nextArrow;\n        buildMonths();\n        Object.defineProperty(self, \"_hidePrevMonthArrow\", {\n            get: function () { return self.__hidePrevMonthArrow; },\n            set: function (bool) {\n                if (self.__hidePrevMonthArrow !== bool) {\n                    toggleClass(self.prevMonthNav, \"flatpickr-disabled\", bool);\n                    self.__hidePrevMonthArrow = bool;\n                }\n            },\n        });\n        Object.defineProperty(self, \"_hideNextMonthArrow\", {\n            get: function () { return self.__hideNextMonthArrow; },\n            set: function (bool) {\n                if (self.__hideNextMonthArrow !== bool) {\n                    toggleClass(self.nextMonthNav, \"flatpickr-disabled\", bool);\n                    self.__hideNextMonthArrow = bool;\n                }\n            },\n        });\n        self.currentYearElement = self.yearElements[0];\n        updateNavigationCurrentMonth();\n        return self.monthNav;\n    }\n    function buildTime() {\n        self.calendarContainer.classList.add(\"hasTime\");\n        if (self.config.noCalendar)\n            self.calendarContainer.classList.add(\"noCalendar\");\n        var defaults = getDefaultHours(self.config);\n        self.timeContainer = createElement(\"div\", \"flatpickr-time\");\n        self.timeContainer.tabIndex = -1;\n        var separator = createElement(\"span\", \"flatpickr-time-separator\", \":\");\n        var hourInput = createNumberInput(\"flatpickr-hour\", {\n            \"aria-label\": self.l10n.hourAriaLabel,\n        });\n        self.hourElement = hourInput.getElementsByTagName(\"input\")[0];\n        var minuteInput = createNumberInput(\"flatpickr-minute\", {\n            \"aria-label\": self.l10n.minuteAriaLabel,\n        });\n        self.minuteElement = minuteInput.getElementsByTagName(\"input\")[0];\n        self.hourElement.tabIndex = self.minuteElement.tabIndex = -1;\n        self.hourElement.value = pad(self.latestSelectedDateObj\n            ? self.latestSelectedDateObj.getHours()\n            : self.config.time_24hr\n                ? defaults.hours\n                : military2ampm(defaults.hours));\n        self.minuteElement.value = pad(self.latestSelectedDateObj\n            ? self.latestSelectedDateObj.getMinutes()\n            : defaults.minutes);\n        self.hourElement.setAttribute(\"step\", self.config.hourIncrement.toString());\n        self.minuteElement.setAttribute(\"step\", self.config.minuteIncrement.toString());\n        self.hourElement.setAttribute(\"min\", self.config.time_24hr ? \"0\" : \"1\");\n        self.hourElement.setAttribute(\"max\", self.config.time_24hr ? \"23\" : \"12\");\n        self.hourElement.setAttribute(\"maxlength\", \"2\");\n        self.minuteElement.setAttribute(\"min\", \"0\");\n        self.minuteElement.setAttribute(\"max\", \"59\");\n        self.minuteElement.setAttribute(\"maxlength\", \"2\");\n        self.timeContainer.appendChild(hourInput);\n        self.timeContainer.appendChild(separator);\n        self.timeContainer.appendChild(minuteInput);\n        if (self.config.time_24hr)\n            self.timeContainer.classList.add(\"time24hr\");\n        if (self.config.enableSeconds) {\n            self.timeContainer.classList.add(\"hasSeconds\");\n            var secondInput = createNumberInput(\"flatpickr-second\");\n            self.secondElement = secondInput.getElementsByTagName(\"input\")[0];\n            self.secondElement.value = pad(self.latestSelectedDateObj\n                ? self.latestSelectedDateObj.getSeconds()\n                : defaults.seconds);\n            self.secondElement.setAttribute(\"step\", self.minuteElement.getAttribute(\"step\"));\n            self.secondElement.setAttribute(\"min\", \"0\");\n            self.secondElement.setAttribute(\"max\", \"59\");\n            self.secondElement.setAttribute(\"maxlength\", \"2\");\n            self.timeContainer.appendChild(createElement(\"span\", \"flatpickr-time-separator\", \":\"));\n            self.timeContainer.appendChild(secondInput);\n        }\n        if (!self.config.time_24hr) {\n            self.amPM = createElement(\"span\", \"flatpickr-am-pm\", self.l10n.amPM[int((self.latestSelectedDateObj\n                ? self.hourElement.value\n                : self.config.defaultHour) > 11)]);\n            self.amPM.title = self.l10n.toggleTitle;\n            self.amPM.tabIndex = -1;\n            self.timeContainer.appendChild(self.amPM);\n        }\n        return self.timeContainer;\n    }\n    function buildWeekdays() {\n        if (!self.weekdayContainer)\n            self.weekdayContainer = createElement(\"div\", \"flatpickr-weekdays\");\n        else\n            clearNode(self.weekdayContainer);\n        for (var i = self.config.showMonths; i--;) {\n            var container = createElement(\"div\", \"flatpickr-weekdaycontainer\");\n            self.weekdayContainer.appendChild(container);\n        }\n        updateWeekdays();\n        return self.weekdayContainer;\n    }\n    function updateWeekdays() {\n        if (!self.weekdayContainer) {\n            return;\n        }\n        var firstDayOfWeek = self.l10n.firstDayOfWeek;\n        var weekdays = __spreadArrays(self.l10n.weekdays.shorthand);\n        if (firstDayOfWeek > 0 && firstDayOfWeek < weekdays.length) {\n            weekdays = __spreadArrays(weekdays.splice(firstDayOfWeek, weekdays.length), weekdays.splice(0, firstDayOfWeek));\n        }\n        for (var i = self.config.showMonths; i--;) {\n            self.weekdayContainer.children[i].innerHTML = \"\\n      <span class='flatpickr-weekday'>\\n        \" + weekdays.join(\"</span><span class='flatpickr-weekday'>\") + \"\\n      </span>\\n      \";\n        }\n    }\n    function buildWeeks() {\n        self.calendarContainer.classList.add(\"hasWeeks\");\n        var weekWrapper = createElement(\"div\", \"flatpickr-weekwrapper\");\n        weekWrapper.appendChild(createElement(\"span\", \"flatpickr-weekday\", self.l10n.weekAbbreviation));\n        var weekNumbers = createElement(\"div\", \"flatpickr-weeks\");\n        weekWrapper.appendChild(weekNumbers);\n        return {\n            weekWrapper: weekWrapper,\n            weekNumbers: weekNumbers,\n        };\n    }\n    function changeMonth(value, isOffset) {\n        if (isOffset === void 0) { isOffset = true; }\n        var delta = isOffset ? value : value - self.currentMonth;\n        if ((delta < 0 && self._hidePrevMonthArrow === true) ||\n            (delta > 0 && self._hideNextMonthArrow === true))\n            return;\n        self.currentMonth += delta;\n        if (self.currentMonth < 0 || self.currentMonth > 11) {\n            self.currentYear += self.currentMonth > 11 ? 1 : -1;\n            self.currentMonth = (self.currentMonth + 12) % 12;\n            triggerEvent(\"onYearChange\");\n            buildMonthSwitch();\n        }\n        buildDays();\n        triggerEvent(\"onMonthChange\");\n        updateNavigationCurrentMonth();\n    }\n    function clear(triggerChangeEvent, toInitial) {\n        if (triggerChangeEvent === void 0) { triggerChangeEvent = true; }\n        if (toInitial === void 0) { toInitial = true; }\n        self.input.value = \"\";\n        if (self.altInput !== undefined)\n            self.altInput.value = \"\";\n        if (self.mobileInput !== undefined)\n            self.mobileInput.value = \"\";\n        self.selectedDates = [];\n        self.latestSelectedDateObj = undefined;\n        if (toInitial === true) {\n            self.currentYear = self._initialDate.getFullYear();\n            self.currentMonth = self._initialDate.getMonth();\n        }\n        if (self.config.enableTime === true) {\n            var _a = getDefaultHours(self.config), hours = _a.hours, minutes = _a.minutes, seconds = _a.seconds;\n            setHours(hours, minutes, seconds);\n        }\n        self.redraw();\n        if (triggerChangeEvent)\n            triggerEvent(\"onChange\");\n    }\n    function close() {\n        self.isOpen = false;\n        if (!self.isMobile) {\n            if (self.calendarContainer !== undefined) {\n                self.calendarContainer.classList.remove(\"open\");\n            }\n            if (self._input !== undefined) {\n                self._input.classList.remove(\"active\");\n            }\n        }\n        triggerEvent(\"onClose\");\n    }\n    function destroy() {\n        if (self.config !== undefined)\n            triggerEvent(\"onDestroy\");\n        for (var i = self._handlers.length; i--;) {\n            self._handlers[i].remove();\n        }\n        self._handlers = [];\n        if (self.mobileInput) {\n            if (self.mobileInput.parentNode)\n                self.mobileInput.parentNode.removeChild(self.mobileInput);\n            self.mobileInput = undefined;\n        }\n        else if (self.calendarContainer && self.calendarContainer.parentNode) {\n            if (self.config.static && self.calendarContainer.parentNode) {\n                var wrapper = self.calendarContainer.parentNode;\n                wrapper.lastChild && wrapper.removeChild(wrapper.lastChild);\n                if (wrapper.parentNode) {\n                    while (wrapper.firstChild)\n                        wrapper.parentNode.insertBefore(wrapper.firstChild, wrapper);\n                    wrapper.parentNode.removeChild(wrapper);\n                }\n            }\n            else\n                self.calendarContainer.parentNode.removeChild(self.calendarContainer);\n        }\n        if (self.altInput) {\n            self.input.type = \"text\";\n            if (self.altInput.parentNode)\n                self.altInput.parentNode.removeChild(self.altInput);\n            delete self.altInput;\n        }\n        if (self.input) {\n            self.input.type = self.input._type;\n            self.input.classList.remove(\"flatpickr-input\");\n            self.input.removeAttribute(\"readonly\");\n        }\n        [\n            \"_showTimeInput\",\n            \"latestSelectedDateObj\",\n            \"_hideNextMonthArrow\",\n            \"_hidePrevMonthArrow\",\n            \"__hideNextMonthArrow\",\n            \"__hidePrevMonthArrow\",\n            \"isMobile\",\n            \"isOpen\",\n            \"selectedDateElem\",\n            \"minDateHasTime\",\n            \"maxDateHasTime\",\n            \"days\",\n            \"daysContainer\",\n            \"_input\",\n            \"_positionElement\",\n            \"innerContainer\",\n            \"rContainer\",\n            \"monthNav\",\n            \"todayDateElem\",\n            \"calendarContainer\",\n            \"weekdayContainer\",\n            \"prevMonthNav\",\n            \"nextMonthNav\",\n            \"monthsDropdownContainer\",\n            \"currentMonthElement\",\n            \"currentYearElement\",\n            \"navigationCurrentMonth\",\n            \"selectedDateElem\",\n            \"config\",\n        ].forEach(function (k) {\n            try {\n                delete self[k];\n            }\n            catch (_) { }\n        });\n    }\n    function isCalendarElem(elem) {\n        return self.calendarContainer.contains(elem);\n    }\n    function documentClick(e) {\n        if (self.isOpen && !self.config.inline) {\n            var eventTarget_1 = getEventTarget(e);\n            var isCalendarElement = isCalendarElem(eventTarget_1);\n            var isInput = eventTarget_1 === self.input ||\n                eventTarget_1 === self.altInput ||\n                self.element.contains(eventTarget_1) ||\n                (e.path &&\n                    e.path.indexOf &&\n                    (~e.path.indexOf(self.input) ||\n                        ~e.path.indexOf(self.altInput)));\n            var lostFocus = !isInput &&\n                !isCalendarElement &&\n                !isCalendarElem(e.relatedTarget);\n            var isIgnored = !self.config.ignoredFocusElements.some(function (elem) {\n                return elem.contains(eventTarget_1);\n            });\n            if (lostFocus && isIgnored) {\n                if (self.config.allowInput) {\n                    self.setDate(self._input.value, false, self.config.altInput\n                        ? self.config.altFormat\n                        : self.config.dateFormat);\n                }\n                if (self.timeContainer !== undefined &&\n                    self.minuteElement !== undefined &&\n                    self.hourElement !== undefined &&\n                    self.input.value !== \"\" &&\n                    self.input.value !== undefined) {\n                    updateTime();\n                }\n                self.close();\n                if (self.config &&\n                    self.config.mode === \"range\" &&\n                    self.selectedDates.length === 1)\n                    self.clear(false);\n            }\n        }\n    }\n    function changeYear(newYear) {\n        if (!newYear ||\n            (self.config.minDate && newYear < self.config.minDate.getFullYear()) ||\n            (self.config.maxDate && newYear > self.config.maxDate.getFullYear()))\n            return;\n        var newYearNum = newYear, isNewYear = self.currentYear !== newYearNum;\n        self.currentYear = newYearNum || self.currentYear;\n        if (self.config.maxDate &&\n            self.currentYear === self.config.maxDate.getFullYear()) {\n            self.currentMonth = Math.min(self.config.maxDate.getMonth(), self.currentMonth);\n        }\n        else if (self.config.minDate &&\n            self.currentYear === self.config.minDate.getFullYear()) {\n            self.currentMonth = Math.max(self.config.minDate.getMonth(), self.currentMonth);\n        }\n        if (isNewYear) {\n            self.redraw();\n            triggerEvent(\"onYearChange\");\n            buildMonthSwitch();\n        }\n    }\n    function isEnabled(date, timeless) {\n        var _a;\n        if (timeless === void 0) { timeless = true; }\n        var dateToCheck = self.parseDate(date, undefined, timeless);\n        if ((self.config.minDate &&\n            dateToCheck &&\n            compareDates(dateToCheck, self.config.minDate, timeless !== undefined ? timeless : !self.minDateHasTime) < 0) ||\n            (self.config.maxDate &&\n                dateToCheck &&\n                compareDates(dateToCheck, self.config.maxDate, timeless !== undefined ? timeless : !self.maxDateHasTime) > 0))\n            return false;\n        if (!self.config.enable && self.config.disable.length === 0)\n            return true;\n        if (dateToCheck === undefined)\n            return false;\n        var bool = !!self.config.enable, array = (_a = self.config.enable) !== null && _a !== void 0 ? _a : self.config.disable;\n        for (var i = 0, d = void 0; i < array.length; i++) {\n            d = array[i];\n            if (typeof d === \"function\" &&\n                d(dateToCheck))\n                return bool;\n            else if (d instanceof Date &&\n                dateToCheck !== undefined &&\n                d.getTime() === dateToCheck.getTime())\n                return bool;\n            else if (typeof d === \"string\") {\n                var parsed = self.parseDate(d, undefined, true);\n                return parsed && parsed.getTime() === dateToCheck.getTime()\n                    ? bool\n                    : !bool;\n            }\n            else if (typeof d === \"object\" &&\n                dateToCheck !== undefined &&\n                d.from &&\n                d.to &&\n                dateToCheck.getTime() >= d.from.getTime() &&\n                dateToCheck.getTime() <= d.to.getTime())\n                return bool;\n        }\n        return !bool;\n    }\n    function isInView(elem) {\n        if (self.daysContainer !== undefined)\n            return (elem.className.indexOf(\"hidden\") === -1 &&\n                elem.className.indexOf(\"flatpickr-disabled\") === -1 &&\n                self.daysContainer.contains(elem));\n        return false;\n    }\n    function onBlur(e) {\n        var isInput = e.target === self._input;\n        var valueChanged = self._input.value.trimEnd() !== getDateStr();\n        if (isInput &&\n            valueChanged &&\n            !(e.relatedTarget && isCalendarElem(e.relatedTarget))) {\n            self.setDate(self._input.value, true, e.target === self.altInput\n                ? self.config.altFormat\n                : self.config.dateFormat);\n        }\n    }\n    function onKeyDown(e) {\n        var eventTarget = getEventTarget(e);\n        var isInput = self.config.wrap\n            ? element.contains(eventTarget)\n            : eventTarget === self._input;\n        var allowInput = self.config.allowInput;\n        var allowKeydown = self.isOpen && (!allowInput || !isInput);\n        var allowInlineKeydown = self.config.inline && isInput && !allowInput;\n        if (e.keyCode === 13 && isInput) {\n            if (allowInput) {\n                self.setDate(self._input.value, true, eventTarget === self.altInput\n                    ? self.config.altFormat\n                    : self.config.dateFormat);\n                self.close();\n                return eventTarget.blur();\n            }\n            else {\n                self.open();\n            }\n        }\n        else if (isCalendarElem(eventTarget) ||\n            allowKeydown ||\n            allowInlineKeydown) {\n            var isTimeObj = !!self.timeContainer &&\n                self.timeContainer.contains(eventTarget);\n            switch (e.keyCode) {\n                case 13:\n                    if (isTimeObj) {\n                        e.preventDefault();\n                        updateTime();\n                        focusAndClose();\n                    }\n                    else\n                        selectDate(e);\n                    break;\n                case 27:\n                    e.preventDefault();\n                    focusAndClose();\n                    break;\n                case 8:\n                case 46:\n                    if (isInput && !self.config.allowInput) {\n                        e.preventDefault();\n                        self.clear();\n                    }\n                    break;\n                case 37:\n                case 39:\n                    if (!isTimeObj && !isInput) {\n                        e.preventDefault();\n                        var activeElement = getClosestActiveElement();\n                        if (self.daysContainer !== undefined &&\n                            (allowInput === false ||\n                                (activeElement && isInView(activeElement)))) {\n                            var delta_1 = e.keyCode === 39 ? 1 : -1;\n                            if (!e.ctrlKey)\n                                focusOnDay(undefined, delta_1);\n                            else {\n                                e.stopPropagation();\n                                changeMonth(delta_1);\n                                focusOnDay(getFirstAvailableDay(1), 0);\n                            }\n                        }\n                    }\n                    else if (self.hourElement)\n                        self.hourElement.focus();\n                    break;\n                case 38:\n                case 40:\n                    e.preventDefault();\n                    var delta = e.keyCode === 40 ? 1 : -1;\n                    if ((self.daysContainer &&\n                        eventTarget.$i !== undefined) ||\n                        eventTarget === self.input ||\n                        eventTarget === self.altInput) {\n                        if (e.ctrlKey) {\n                            e.stopPropagation();\n                            changeYear(self.currentYear - delta);\n                            focusOnDay(getFirstAvailableDay(1), 0);\n                        }\n                        else if (!isTimeObj)\n                            focusOnDay(undefined, delta * 7);\n                    }\n                    else if (eventTarget === self.currentYearElement) {\n                        changeYear(self.currentYear - delta);\n                    }\n                    else if (self.config.enableTime) {\n                        if (!isTimeObj && self.hourElement)\n                            self.hourElement.focus();\n                        updateTime(e);\n                        self._debouncedChange();\n                    }\n                    break;\n                case 9:\n                    if (isTimeObj) {\n                        var elems = [\n                            self.hourElement,\n                            self.minuteElement,\n                            self.secondElement,\n                            self.amPM,\n                        ]\n                            .concat(self.pluginElements)\n                            .filter(function (x) { return x; });\n                        var i = elems.indexOf(eventTarget);\n                        if (i !== -1) {\n                            var target = elems[i + (e.shiftKey ? -1 : 1)];\n                            e.preventDefault();\n                            (target || self._input).focus();\n                        }\n                    }\n                    else if (!self.config.noCalendar &&\n                        self.daysContainer &&\n                        self.daysContainer.contains(eventTarget) &&\n                        e.shiftKey) {\n                        e.preventDefault();\n                        self._input.focus();\n                    }\n                    break;\n                default:\n                    break;\n            }\n        }\n        if (self.amPM !== undefined && eventTarget === self.amPM) {\n            switch (e.key) {\n                case self.l10n.amPM[0].charAt(0):\n                case self.l10n.amPM[0].charAt(0).toLowerCase():\n                    self.amPM.textContent = self.l10n.amPM[0];\n                    setHoursFromInputs();\n                    updateValue();\n                    break;\n                case self.l10n.amPM[1].charAt(0):\n                case self.l10n.amPM[1].charAt(0).toLowerCase():\n                    self.amPM.textContent = self.l10n.amPM[1];\n                    setHoursFromInputs();\n                    updateValue();\n                    break;\n            }\n        }\n        if (isInput || isCalendarElem(eventTarget)) {\n            triggerEvent(\"onKeyDown\", e);\n        }\n    }\n    function onMouseOver(elem, cellClass) {\n        if (cellClass === void 0) { cellClass = \"flatpickr-day\"; }\n        if (self.selectedDates.length !== 1 ||\n            (elem &&\n                (!elem.classList.contains(cellClass) ||\n                    elem.classList.contains(\"flatpickr-disabled\"))))\n            return;\n        var hoverDate = elem\n            ? elem.dateObj.getTime()\n            : self.days.firstElementChild.dateObj.getTime(), initialDate = self.parseDate(self.selectedDates[0], undefined, true).getTime(), rangeStartDate = Math.min(hoverDate, self.selectedDates[0].getTime()), rangeEndDate = Math.max(hoverDate, self.selectedDates[0].getTime());\n        var containsDisabled = false;\n        var minRange = 0, maxRange = 0;\n        for (var t = rangeStartDate; t < rangeEndDate; t += duration.DAY) {\n            if (!isEnabled(new Date(t), true)) {\n                containsDisabled =\n                    containsDisabled || (t > rangeStartDate && t < rangeEndDate);\n                if (t < initialDate && (!minRange || t > minRange))\n                    minRange = t;\n                else if (t > initialDate && (!maxRange || t < maxRange))\n                    maxRange = t;\n            }\n        }\n        var hoverableCells = Array.from(self.rContainer.querySelectorAll(\"*:nth-child(-n+\" + self.config.showMonths + \") > .\" + cellClass));\n        hoverableCells.forEach(function (dayElem) {\n            var date = dayElem.dateObj;\n            var timestamp = date.getTime();\n            var outOfRange = (minRange > 0 && timestamp < minRange) ||\n                (maxRange > 0 && timestamp > maxRange);\n            if (outOfRange) {\n                dayElem.classList.add(\"notAllowed\");\n                [\"inRange\", \"startRange\", \"endRange\"].forEach(function (c) {\n                    dayElem.classList.remove(c);\n                });\n                return;\n            }\n            else if (containsDisabled && !outOfRange)\n                return;\n            [\"startRange\", \"inRange\", \"endRange\", \"notAllowed\"].forEach(function (c) {\n                dayElem.classList.remove(c);\n            });\n            if (elem !== undefined) {\n                elem.classList.add(hoverDate <= self.selectedDates[0].getTime()\n                    ? \"startRange\"\n                    : \"endRange\");\n                if (initialDate < hoverDate && timestamp === initialDate)\n                    dayElem.classList.add(\"startRange\");\n                else if (initialDate > hoverDate && timestamp === initialDate)\n                    dayElem.classList.add(\"endRange\");\n                if (timestamp >= minRange &&\n                    (maxRange === 0 || timestamp <= maxRange) &&\n                    isBetween(timestamp, initialDate, hoverDate))\n                    dayElem.classList.add(\"inRange\");\n            }\n        });\n    }\n    function onResize() {\n        if (self.isOpen && !self.config.static && !self.config.inline)\n            positionCalendar();\n    }\n    function open(e, positionElement) {\n        if (positionElement === void 0) { positionElement = self._positionElement; }\n        if (self.isMobile === true) {\n            if (e) {\n                e.preventDefault();\n                var eventTarget = getEventTarget(e);\n                if (eventTarget) {\n                    eventTarget.blur();\n                }\n            }\n            if (self.mobileInput !== undefined) {\n                self.mobileInput.focus();\n                self.mobileInput.click();\n            }\n            triggerEvent(\"onOpen\");\n            return;\n        }\n        else if (self._input.disabled || self.config.inline) {\n            return;\n        }\n        var wasOpen = self.isOpen;\n        self.isOpen = true;\n        if (!wasOpen) {\n            self.calendarContainer.classList.add(\"open\");\n            self._input.classList.add(\"active\");\n            triggerEvent(\"onOpen\");\n            positionCalendar(positionElement);\n        }\n        if (self.config.enableTime === true && self.config.noCalendar === true) {\n            if (self.config.allowInput === false &&\n                (e === undefined ||\n                    !self.timeContainer.contains(e.relatedTarget))) {\n                setTimeout(function () { return self.hourElement.select(); }, 50);\n            }\n        }\n    }\n    function minMaxDateSetter(type) {\n        return function (date) {\n            var dateObj = (self.config[\"_\" + type + \"Date\"] = self.parseDate(date, self.config.dateFormat));\n            var inverseDateObj = self.config[\"_\" + (type === \"min\" ? \"max\" : \"min\") + \"Date\"];\n            if (dateObj !== undefined) {\n                self[type === \"min\" ? \"minDateHasTime\" : \"maxDateHasTime\"] =\n                    dateObj.getHours() > 0 ||\n                        dateObj.getMinutes() > 0 ||\n                        dateObj.getSeconds() > 0;\n            }\n            if (self.selectedDates) {\n                self.selectedDates = self.selectedDates.filter(function (d) { return isEnabled(d); });\n                if (!self.selectedDates.length && type === \"min\")\n                    setHoursFromDate(dateObj);\n                updateValue();\n            }\n            if (self.daysContainer) {\n                redraw();\n                if (dateObj !== undefined)\n                    self.currentYearElement[type] = dateObj.getFullYear().toString();\n                else\n                    self.currentYearElement.removeAttribute(type);\n                self.currentYearElement.disabled =\n                    !!inverseDateObj &&\n                        dateObj !== undefined &&\n                        inverseDateObj.getFullYear() === dateObj.getFullYear();\n            }\n        };\n    }\n    function parseConfig() {\n        var boolOpts = [\n            \"wrap\",\n            \"weekNumbers\",\n            \"allowInput\",\n            \"allowInvalidPreload\",\n            \"clickOpens\",\n            \"time_24hr\",\n            \"enableTime\",\n            \"noCalendar\",\n            \"altInput\",\n            \"shorthandCurrentMonth\",\n            \"inline\",\n            \"static\",\n            \"enableSeconds\",\n            \"disableMobile\",\n        ];\n        var userConfig = __assign(__assign({}, JSON.parse(JSON.stringify(element.dataset || {}))), instanceConfig);\n        var formats = {};\n        self.config.parseDate = userConfig.parseDate;\n        self.config.formatDate = userConfig.formatDate;\n        Object.defineProperty(self.config, \"enable\", {\n            get: function () { return self.config._enable; },\n            set: function (dates) {\n                self.config._enable = parseDateRules(dates);\n            },\n        });\n        Object.defineProperty(self.config, \"disable\", {\n            get: function () { return self.config._disable; },\n            set: function (dates) {\n                self.config._disable = parseDateRules(dates);\n            },\n        });\n        var timeMode = userConfig.mode === \"time\";\n        if (!userConfig.dateFormat && (userConfig.enableTime || timeMode)) {\n            var defaultDateFormat = flatpickr.defaultConfig.dateFormat || defaultOptions.dateFormat;\n            formats.dateFormat =\n                userConfig.noCalendar || timeMode\n                    ? \"H:i\" + (userConfig.enableSeconds ? \":S\" : \"\")\n                    : defaultDateFormat + \" H:i\" + (userConfig.enableSeconds ? \":S\" : \"\");\n        }\n        if (userConfig.altInput &&\n            (userConfig.enableTime || timeMode) &&\n            !userConfig.altFormat) {\n            var defaultAltFormat = flatpickr.defaultConfig.altFormat || defaultOptions.altFormat;\n            formats.altFormat =\n                userConfig.noCalendar || timeMode\n                    ? \"h:i\" + (userConfig.enableSeconds ? \":S K\" : \" K\")\n                    : defaultAltFormat + (\" h:i\" + (userConfig.enableSeconds ? \":S\" : \"\") + \" K\");\n        }\n        Object.defineProperty(self.config, \"minDate\", {\n            get: function () { return self.config._minDate; },\n            set: minMaxDateSetter(\"min\"),\n        });\n        Object.defineProperty(self.config, \"maxDate\", {\n            get: function () { return self.config._maxDate; },\n            set: minMaxDateSetter(\"max\"),\n        });\n        var minMaxTimeSetter = function (type) { return function (val) {\n            self.config[type === \"min\" ? \"_minTime\" : \"_maxTime\"] = self.parseDate(val, \"H:i:S\");\n        }; };\n        Object.defineProperty(self.config, \"minTime\", {\n            get: function () { return self.config._minTime; },\n            set: minMaxTimeSetter(\"min\"),\n        });\n        Object.defineProperty(self.config, \"maxTime\", {\n            get: function () { return self.config._maxTime; },\n            set: minMaxTimeSetter(\"max\"),\n        });\n        if (userConfig.mode === \"time\") {\n            self.config.noCalendar = true;\n            self.config.enableTime = true;\n        }\n        Object.assign(self.config, formats, userConfig);\n        for (var i = 0; i < boolOpts.length; i++)\n            self.config[boolOpts[i]] =\n                self.config[boolOpts[i]] === true ||\n                    self.config[boolOpts[i]] === \"true\";\n        HOOKS.filter(function (hook) { return self.config[hook] !== undefined; }).forEach(function (hook) {\n            self.config[hook] = arrayify(self.config[hook] || []).map(bindToInstance);\n        });\n        self.isMobile =\n            !self.config.disableMobile &&\n                !self.config.inline &&\n                self.config.mode === \"single\" &&\n                !self.config.disable.length &&\n                !self.config.enable &&\n                !self.config.weekNumbers &&\n                /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\n        for (var i = 0; i < self.config.plugins.length; i++) {\n            var pluginConf = self.config.plugins[i](self) || {};\n            for (var key in pluginConf) {\n                if (HOOKS.indexOf(key) > -1) {\n                    self.config[key] = arrayify(pluginConf[key])\n                        .map(bindToInstance)\n                        .concat(self.config[key]);\n                }\n                else if (typeof userConfig[key] === \"undefined\")\n                    self.config[key] = pluginConf[key];\n            }\n        }\n        if (!userConfig.altInputClass) {\n            self.config.altInputClass =\n                getInputElem().className + \" \" + self.config.altInputClass;\n        }\n        triggerEvent(\"onParseConfig\");\n    }\n    function getInputElem() {\n        return self.config.wrap\n            ? element.querySelector(\"[data-input]\")\n            : element;\n    }\n    function setupLocale() {\n        if (typeof self.config.locale !== \"object\" &&\n            typeof flatpickr.l10ns[self.config.locale] === \"undefined\")\n            self.config.errorHandler(new Error(\"flatpickr: invalid locale \" + self.config.locale));\n        self.l10n = __assign(__assign({}, flatpickr.l10ns.default), (typeof self.config.locale === \"object\"\n            ? self.config.locale\n            : self.config.locale !== \"default\"\n                ? flatpickr.l10ns[self.config.locale]\n                : undefined));\n        tokenRegex.D = \"(\" + self.l10n.weekdays.shorthand.join(\"|\") + \")\";\n        tokenRegex.l = \"(\" + self.l10n.weekdays.longhand.join(\"|\") + \")\";\n        tokenRegex.M = \"(\" + self.l10n.months.shorthand.join(\"|\") + \")\";\n        tokenRegex.F = \"(\" + self.l10n.months.longhand.join(\"|\") + \")\";\n        tokenRegex.K = \"(\" + self.l10n.amPM[0] + \"|\" + self.l10n.amPM[1] + \"|\" + self.l10n.amPM[0].toLowerCase() + \"|\" + self.l10n.amPM[1].toLowerCase() + \")\";\n        var userConfig = __assign(__assign({}, instanceConfig), JSON.parse(JSON.stringify(element.dataset || {})));\n        if (userConfig.time_24hr === undefined &&\n            flatpickr.defaultConfig.time_24hr === undefined) {\n            self.config.time_24hr = self.l10n.time_24hr;\n        }\n        self.formatDate = createDateFormatter(self);\n        self.parseDate = createDateParser({ config: self.config, l10n: self.l10n });\n    }\n    function positionCalendar(customPositionElement) {\n        if (typeof self.config.position === \"function\") {\n            return void self.config.position(self, customPositionElement);\n        }\n        if (self.calendarContainer === undefined)\n            return;\n        triggerEvent(\"onPreCalendarPosition\");\n        var positionElement = customPositionElement || self._positionElement;\n        var calendarHeight = Array.prototype.reduce.call(self.calendarContainer.children, (function (acc, child) { return acc + child.offsetHeight; }), 0), calendarWidth = self.calendarContainer.offsetWidth, configPos = self.config.position.split(\" \"), configPosVertical = configPos[0], configPosHorizontal = configPos.length > 1 ? configPos[1] : null, inputBounds = positionElement.getBoundingClientRect(), distanceFromBottom = window.innerHeight - inputBounds.bottom, showOnTop = configPosVertical === \"above\" ||\n            (configPosVertical !== \"below\" &&\n                distanceFromBottom < calendarHeight &&\n                inputBounds.top > calendarHeight);\n        var top = window.pageYOffset +\n            inputBounds.top +\n            (!showOnTop ? positionElement.offsetHeight + 2 : -calendarHeight - 2);\n        toggleClass(self.calendarContainer, \"arrowTop\", !showOnTop);\n        toggleClass(self.calendarContainer, \"arrowBottom\", showOnTop);\n        if (self.config.inline)\n            return;\n        var left = window.pageXOffset + inputBounds.left;\n        var isCenter = false;\n        var isRight = false;\n        if (configPosHorizontal === \"center\") {\n            left -= (calendarWidth - inputBounds.width) / 2;\n            isCenter = true;\n        }\n        else if (configPosHorizontal === \"right\") {\n            left -= calendarWidth - inputBounds.width;\n            isRight = true;\n        }\n        toggleClass(self.calendarContainer, \"arrowLeft\", !isCenter && !isRight);\n        toggleClass(self.calendarContainer, \"arrowCenter\", isCenter);\n        toggleClass(self.calendarContainer, \"arrowRight\", isRight);\n        var right = window.document.body.offsetWidth -\n            (window.pageXOffset + inputBounds.right);\n        var rightMost = left + calendarWidth > window.document.body.offsetWidth;\n        var centerMost = right + calendarWidth > window.document.body.offsetWidth;\n        toggleClass(self.calendarContainer, \"rightMost\", rightMost);\n        if (self.config.static)\n            return;\n        self.calendarContainer.style.top = top + \"px\";\n        if (!rightMost) {\n            self.calendarContainer.style.left = left + \"px\";\n            self.calendarContainer.style.right = \"auto\";\n        }\n        else if (!centerMost) {\n            self.calendarContainer.style.left = \"auto\";\n            self.calendarContainer.style.right = right + \"px\";\n        }\n        else {\n            var doc = getDocumentStyleSheet();\n            if (doc === undefined)\n                return;\n            var bodyWidth = window.document.body.offsetWidth;\n            var centerLeft = Math.max(0, bodyWidth / 2 - calendarWidth / 2);\n            var centerBefore = \".flatpickr-calendar.centerMost:before\";\n            var centerAfter = \".flatpickr-calendar.centerMost:after\";\n            var centerIndex = doc.cssRules.length;\n            var centerStyle = \"{left:\" + inputBounds.left + \"px;right:auto;}\";\n            toggleClass(self.calendarContainer, \"rightMost\", false);\n            toggleClass(self.calendarContainer, \"centerMost\", true);\n            doc.insertRule(centerBefore + \",\" + centerAfter + centerStyle, centerIndex);\n            self.calendarContainer.style.left = centerLeft + \"px\";\n            self.calendarContainer.style.right = \"auto\";\n        }\n    }\n    function getDocumentStyleSheet() {\n        var editableSheet = null;\n        for (var i = 0; i < document.styleSheets.length; i++) {\n            var sheet = document.styleSheets[i];\n            if (!sheet.cssRules)\n                continue;\n            try {\n                sheet.cssRules;\n            }\n            catch (err) {\n                continue;\n            }\n            editableSheet = sheet;\n            break;\n        }\n        return editableSheet != null ? editableSheet : createStyleSheet();\n    }\n    function createStyleSheet() {\n        var style = document.createElement(\"style\");\n        document.head.appendChild(style);\n        return style.sheet;\n    }\n    function redraw() {\n        if (self.config.noCalendar || self.isMobile)\n            return;\n        buildMonthSwitch();\n        updateNavigationCurrentMonth();\n        buildDays();\n    }\n    function focusAndClose() {\n        self._input.focus();\n        if (window.navigator.userAgent.indexOf(\"MSIE\") !== -1 ||\n            navigator.msMaxTouchPoints !== undefined) {\n            setTimeout(self.close, 0);\n        }\n        else {\n            self.close();\n        }\n    }\n    function selectDate(e) {\n        e.preventDefault();\n        e.stopPropagation();\n        var isSelectable = function (day) {\n            return day.classList &&\n                day.classList.contains(\"flatpickr-day\") &&\n                !day.classList.contains(\"flatpickr-disabled\") &&\n                !day.classList.contains(\"notAllowed\");\n        };\n        var t = findParent(getEventTarget(e), isSelectable);\n        if (t === undefined)\n            return;\n        var target = t;\n        var selectedDate = (self.latestSelectedDateObj = new Date(target.dateObj.getTime()));\n        var shouldChangeMonth = (selectedDate.getMonth() < self.currentMonth ||\n            selectedDate.getMonth() >\n                self.currentMonth + self.config.showMonths - 1) &&\n            self.config.mode !== \"range\";\n        self.selectedDateElem = target;\n        if (self.config.mode === \"single\")\n            self.selectedDates = [selectedDate];\n        else if (self.config.mode === \"multiple\") {\n            var selectedIndex = isDateSelected(selectedDate);\n            if (selectedIndex)\n                self.selectedDates.splice(parseInt(selectedIndex), 1);\n            else\n                self.selectedDates.push(selectedDate);\n        }\n        else if (self.config.mode === \"range\") {\n            if (self.selectedDates.length === 2) {\n                self.clear(false, false);\n            }\n            self.latestSelectedDateObj = selectedDate;\n            self.selectedDates.push(selectedDate);\n            if (compareDates(selectedDate, self.selectedDates[0], true) !== 0)\n                self.selectedDates.sort(function (a, b) { return a.getTime() - b.getTime(); });\n        }\n        setHoursFromInputs();\n        if (shouldChangeMonth) {\n            var isNewYear = self.currentYear !== selectedDate.getFullYear();\n            self.currentYear = selectedDate.getFullYear();\n            self.currentMonth = selectedDate.getMonth();\n            if (isNewYear) {\n                triggerEvent(\"onYearChange\");\n                buildMonthSwitch();\n            }\n            triggerEvent(\"onMonthChange\");\n        }\n        updateNavigationCurrentMonth();\n        buildDays();\n        updateValue();\n        if (!shouldChangeMonth &&\n            self.config.mode !== \"range\" &&\n            self.config.showMonths === 1)\n            focusOnDayElem(target);\n        else if (self.selectedDateElem !== undefined &&\n            self.hourElement === undefined) {\n            self.selectedDateElem && self.selectedDateElem.focus();\n        }\n        if (self.hourElement !== undefined)\n            self.hourElement !== undefined && self.hourElement.focus();\n        if (self.config.closeOnSelect) {\n            var single = self.config.mode === \"single\" && !self.config.enableTime;\n            var range = self.config.mode === \"range\" &&\n                self.selectedDates.length === 2 &&\n                !self.config.enableTime;\n            if (single || range) {\n                focusAndClose();\n            }\n        }\n        triggerChange();\n    }\n    var CALLBACKS = {\n        locale: [setupLocale, updateWeekdays],\n        showMonths: [buildMonths, setCalendarWidth, buildWeekdays],\n        minDate: [jumpToDate],\n        maxDate: [jumpToDate],\n        positionElement: [updatePositionElement],\n        clickOpens: [\n            function () {\n                if (self.config.clickOpens === true) {\n                    bind(self._input, \"focus\", self.open);\n                    bind(self._input, \"click\", self.open);\n                }\n                else {\n                    self._input.removeEventListener(\"focus\", self.open);\n                    self._input.removeEventListener(\"click\", self.open);\n                }\n            },\n        ],\n    };\n    function set(option, value) {\n        if (option !== null && typeof option === \"object\") {\n            Object.assign(self.config, option);\n            for (var key in option) {\n                if (CALLBACKS[key] !== undefined)\n                    CALLBACKS[key].forEach(function (x) { return x(); });\n            }\n        }\n        else {\n            self.config[option] = value;\n            if (CALLBACKS[option] !== undefined)\n                CALLBACKS[option].forEach(function (x) { return x(); });\n            else if (HOOKS.indexOf(option) > -1)\n                self.config[option] = arrayify(value);\n        }\n        self.redraw();\n        updateValue(true);\n    }\n    function setSelectedDate(inputDate, format) {\n        var dates = [];\n        if (inputDate instanceof Array)\n            dates = inputDate.map(function (d) { return self.parseDate(d, format); });\n        else if (inputDate instanceof Date || typeof inputDate === \"number\")\n            dates = [self.parseDate(inputDate, format)];\n        else if (typeof inputDate === \"string\") {\n            switch (self.config.mode) {\n                case \"single\":\n                case \"time\":\n                    dates = [self.parseDate(inputDate, format)];\n                    break;\n                case \"multiple\":\n                    dates = inputDate\n                        .split(self.config.conjunction)\n                        .map(function (date) { return self.parseDate(date, format); });\n                    break;\n                case \"range\":\n                    dates = inputDate\n                        .split(self.l10n.rangeSeparator)\n                        .map(function (date) { return self.parseDate(date, format); });\n                    break;\n                default:\n                    break;\n            }\n        }\n        else\n            self.config.errorHandler(new Error(\"Invalid date supplied: \" + JSON.stringify(inputDate)));\n        self.selectedDates = (self.config.allowInvalidPreload\n            ? dates\n            : dates.filter(function (d) { return d instanceof Date && isEnabled(d, false); }));\n        if (self.config.mode === \"range\")\n            self.selectedDates.sort(function (a, b) { return a.getTime() - b.getTime(); });\n    }\n    function setDate(date, triggerChange, format) {\n        if (triggerChange === void 0) { triggerChange = false; }\n        if (format === void 0) { format = self.config.dateFormat; }\n        if ((date !== 0 && !date) || (date instanceof Array && date.length === 0))\n            return self.clear(triggerChange);\n        setSelectedDate(date, format);\n        self.latestSelectedDateObj =\n            self.selectedDates[self.selectedDates.length - 1];\n        self.redraw();\n        jumpToDate(undefined, triggerChange);\n        setHoursFromDate();\n        if (self.selectedDates.length === 0) {\n            self.clear(false);\n        }\n        updateValue(triggerChange);\n        if (triggerChange)\n            triggerEvent(\"onChange\");\n    }\n    function parseDateRules(arr) {\n        return arr\n            .slice()\n            .map(function (rule) {\n            if (typeof rule === \"string\" ||\n                typeof rule === \"number\" ||\n                rule instanceof Date) {\n                return self.parseDate(rule, undefined, true);\n            }\n            else if (rule &&\n                typeof rule === \"object\" &&\n                rule.from &&\n                rule.to)\n                return {\n                    from: self.parseDate(rule.from, undefined),\n                    to: self.parseDate(rule.to, undefined),\n                };\n            return rule;\n        })\n            .filter(function (x) { return x; });\n    }\n    function setupDates() {\n        self.selectedDates = [];\n        self.now = self.parseDate(self.config.now) || new Date();\n        var preloadedDate = self.config.defaultDate ||\n            ((self.input.nodeName === \"INPUT\" ||\n                self.input.nodeName === \"TEXTAREA\") &&\n                self.input.placeholder &&\n                self.input.value === self.input.placeholder\n                ? null\n                : self.input.value);\n        if (preloadedDate)\n            setSelectedDate(preloadedDate, self.config.dateFormat);\n        self._initialDate =\n            self.selectedDates.length > 0\n                ? self.selectedDates[0]\n                : self.config.minDate &&\n                    self.config.minDate.getTime() > self.now.getTime()\n                    ? self.config.minDate\n                    : self.config.maxDate &&\n                        self.config.maxDate.getTime() < self.now.getTime()\n                        ? self.config.maxDate\n                        : self.now;\n        self.currentYear = self._initialDate.getFullYear();\n        self.currentMonth = self._initialDate.getMonth();\n        if (self.selectedDates.length > 0)\n            self.latestSelectedDateObj = self.selectedDates[0];\n        if (self.config.minTime !== undefined)\n            self.config.minTime = self.parseDate(self.config.minTime, \"H:i\");\n        if (self.config.maxTime !== undefined)\n            self.config.maxTime = self.parseDate(self.config.maxTime, \"H:i\");\n        self.minDateHasTime =\n            !!self.config.minDate &&\n                (self.config.minDate.getHours() > 0 ||\n                    self.config.minDate.getMinutes() > 0 ||\n                    self.config.minDate.getSeconds() > 0);\n        self.maxDateHasTime =\n            !!self.config.maxDate &&\n                (self.config.maxDate.getHours() > 0 ||\n                    self.config.maxDate.getMinutes() > 0 ||\n                    self.config.maxDate.getSeconds() > 0);\n    }\n    function setupInputs() {\n        self.input = getInputElem();\n        if (!self.input) {\n            self.config.errorHandler(new Error(\"Invalid input element specified\"));\n            return;\n        }\n        self.input._type = self.input.type;\n        self.input.type = \"text\";\n        self.input.classList.add(\"flatpickr-input\");\n        self._input = self.input;\n        if (self.config.altInput) {\n            self.altInput = createElement(self.input.nodeName, self.config.altInputClass);\n            self._input = self.altInput;\n            self.altInput.placeholder = self.input.placeholder;\n            self.altInput.disabled = self.input.disabled;\n            self.altInput.required = self.input.required;\n            self.altInput.tabIndex = self.input.tabIndex;\n            self.altInput.type = \"text\";\n            self.input.setAttribute(\"type\", \"hidden\");\n            if (!self.config.static && self.input.parentNode)\n                self.input.parentNode.insertBefore(self.altInput, self.input.nextSibling);\n        }\n        if (!self.config.allowInput)\n            self._input.setAttribute(\"readonly\", \"readonly\");\n        updatePositionElement();\n    }\n    function updatePositionElement() {\n        self._positionElement = self.config.positionElement || self._input;\n    }\n    function setupMobile() {\n        var inputType = self.config.enableTime\n            ? self.config.noCalendar\n                ? \"time\"\n                : \"datetime-local\"\n            : \"date\";\n        self.mobileInput = createElement(\"input\", self.input.className + \" flatpickr-mobile\");\n        self.mobileInput.tabIndex = 1;\n        self.mobileInput.type = inputType;\n        self.mobileInput.disabled = self.input.disabled;\n        self.mobileInput.required = self.input.required;\n        self.mobileInput.placeholder = self.input.placeholder;\n        self.mobileFormatStr =\n            inputType === \"datetime-local\"\n                ? \"Y-m-d\\\\TH:i:S\"\n                : inputType === \"date\"\n                    ? \"Y-m-d\"\n                    : \"H:i:S\";\n        if (self.selectedDates.length > 0) {\n            self.mobileInput.defaultValue = self.mobileInput.value = self.formatDate(self.selectedDates[0], self.mobileFormatStr);\n        }\n        if (self.config.minDate)\n            self.mobileInput.min = self.formatDate(self.config.minDate, \"Y-m-d\");\n        if (self.config.maxDate)\n            self.mobileInput.max = self.formatDate(self.config.maxDate, \"Y-m-d\");\n        if (self.input.getAttribute(\"step\"))\n            self.mobileInput.step = String(self.input.getAttribute(\"step\"));\n        self.input.type = \"hidden\";\n        if (self.altInput !== undefined)\n            self.altInput.type = \"hidden\";\n        try {\n            if (self.input.parentNode)\n                self.input.parentNode.insertBefore(self.mobileInput, self.input.nextSibling);\n        }\n        catch (_a) { }\n        bind(self.mobileInput, \"change\", function (e) {\n            self.setDate(getEventTarget(e).value, false, self.mobileFormatStr);\n            triggerEvent(\"onChange\");\n            triggerEvent(\"onClose\");\n        });\n    }\n    function toggle(e) {\n        if (self.isOpen === true)\n            return self.close();\n        self.open(e);\n    }\n    function triggerEvent(event, data) {\n        if (self.config === undefined)\n            return;\n        var hooks = self.config[event];\n        if (hooks !== undefined && hooks.length > 0) {\n            for (var i = 0; hooks[i] && i < hooks.length; i++)\n                hooks[i](self.selectedDates, self.input.value, self, data);\n        }\n        if (event === \"onChange\") {\n            self.input.dispatchEvent(createEvent(\"change\"));\n            self.input.dispatchEvent(createEvent(\"input\"));\n        }\n    }\n    function createEvent(name) {\n        var e = document.createEvent(\"Event\");\n        e.initEvent(name, true, true);\n        return e;\n    }\n    function isDateSelected(date) {\n        for (var i = 0; i < self.selectedDates.length; i++) {\n            var selectedDate = self.selectedDates[i];\n            if (selectedDate instanceof Date &&\n                compareDates(selectedDate, date) === 0)\n                return \"\" + i;\n        }\n        return false;\n    }\n    function isDateInRange(date) {\n        if (self.config.mode !== \"range\" || self.selectedDates.length < 2)\n            return false;\n        return (compareDates(date, self.selectedDates[0]) >= 0 &&\n            compareDates(date, self.selectedDates[1]) <= 0);\n    }\n    function updateNavigationCurrentMonth() {\n        if (self.config.noCalendar || self.isMobile || !self.monthNav)\n            return;\n        self.yearElements.forEach(function (yearElement, i) {\n            var d = new Date(self.currentYear, self.currentMonth, 1);\n            d.setMonth(self.currentMonth + i);\n            if (self.config.showMonths > 1 ||\n                self.config.monthSelectorType === \"static\") {\n                self.monthElements[i].textContent =\n                    monthToStr(d.getMonth(), self.config.shorthandCurrentMonth, self.l10n) + \" \";\n            }\n            else {\n                self.monthsDropdownContainer.value = d.getMonth().toString();\n            }\n            yearElement.value = d.getFullYear().toString();\n        });\n        self._hidePrevMonthArrow =\n            self.config.minDate !== undefined &&\n                (self.currentYear === self.config.minDate.getFullYear()\n                    ? self.currentMonth <= self.config.minDate.getMonth()\n                    : self.currentYear < self.config.minDate.getFullYear());\n        self._hideNextMonthArrow =\n            self.config.maxDate !== undefined &&\n                (self.currentYear === self.config.maxDate.getFullYear()\n                    ? self.currentMonth + 1 > self.config.maxDate.getMonth()\n                    : self.currentYear > self.config.maxDate.getFullYear());\n    }\n    function getDateStr(specificFormat) {\n        var format = specificFormat ||\n            (self.config.altInput ? self.config.altFormat : self.config.dateFormat);\n        return self.selectedDates\n            .map(function (dObj) { return self.formatDate(dObj, format); })\n            .filter(function (d, i, arr) {\n            return self.config.mode !== \"range\" ||\n                self.config.enableTime ||\n                arr.indexOf(d) === i;\n        })\n            .join(self.config.mode !== \"range\"\n            ? self.config.conjunction\n            : self.l10n.rangeSeparator);\n    }\n    function updateValue(triggerChange) {\n        if (triggerChange === void 0) { triggerChange = true; }\n        if (self.mobileInput !== undefined && self.mobileFormatStr) {\n            self.mobileInput.value =\n                self.latestSelectedDateObj !== undefined\n                    ? self.formatDate(self.latestSelectedDateObj, self.mobileFormatStr)\n                    : \"\";\n        }\n        self.input.value = getDateStr(self.config.dateFormat);\n        if (self.altInput !== undefined) {\n            self.altInput.value = getDateStr(self.config.altFormat);\n        }\n        if (triggerChange !== false)\n            triggerEvent(\"onValueUpdate\");\n    }\n    function onMonthNavClick(e) {\n        var eventTarget = getEventTarget(e);\n        var isPrevMonth = self.prevMonthNav.contains(eventTarget);\n        var isNextMonth = self.nextMonthNav.contains(eventTarget);\n        if (isPrevMonth || isNextMonth) {\n            changeMonth(isPrevMonth ? -1 : 1);\n        }\n        else if (self.yearElements.indexOf(eventTarget) >= 0) {\n            eventTarget.select();\n        }\n        else if (eventTarget.classList.contains(\"arrowUp\")) {\n            self.changeYear(self.currentYear + 1);\n        }\n        else if (eventTarget.classList.contains(\"arrowDown\")) {\n            self.changeYear(self.currentYear - 1);\n        }\n    }\n    function timeWrapper(e) {\n        e.preventDefault();\n        var isKeyDown = e.type === \"keydown\", eventTarget = getEventTarget(e), input = eventTarget;\n        if (self.amPM !== undefined && eventTarget === self.amPM) {\n            self.amPM.textContent =\n                self.l10n.amPM[int(self.amPM.textContent === self.l10n.amPM[0])];\n        }\n        var min = parseFloat(input.getAttribute(\"min\")), max = parseFloat(input.getAttribute(\"max\")), step = parseFloat(input.getAttribute(\"step\")), curValue = parseInt(input.value, 10), delta = e.delta ||\n            (isKeyDown ? (e.which === 38 ? 1 : -1) : 0);\n        var newValue = curValue + step * delta;\n        if (typeof input.value !== \"undefined\" && input.value.length === 2) {\n            var isHourElem = input === self.hourElement, isMinuteElem = input === self.minuteElement;\n            if (newValue < min) {\n                newValue =\n                    max +\n                        newValue +\n                        int(!isHourElem) +\n                        (int(isHourElem) && int(!self.amPM));\n                if (isMinuteElem)\n                    incrementNumInput(undefined, -1, self.hourElement);\n            }\n            else if (newValue > max) {\n                newValue =\n                    input === self.hourElement ? newValue - max - int(!self.amPM) : min;\n                if (isMinuteElem)\n                    incrementNumInput(undefined, 1, self.hourElement);\n            }\n            if (self.amPM &&\n                isHourElem &&\n                (step === 1\n                    ? newValue + curValue === 23\n                    : Math.abs(newValue - curValue) > step)) {\n                self.amPM.textContent =\n                    self.l10n.amPM[int(self.amPM.textContent === self.l10n.amPM[0])];\n            }\n            input.value = pad(newValue);\n        }\n    }\n    init();\n    return self;\n}\nfunction _flatpickr(nodeList, config) {\n    var nodes = Array.prototype.slice\n        .call(nodeList)\n        .filter(function (x) { return x instanceof HTMLElement; });\n    var instances = [];\n    for (var i = 0; i < nodes.length; i++) {\n        var node = nodes[i];\n        try {\n            if (node.getAttribute(\"data-fp-omit\") !== null)\n                continue;\n            if (node._flatpickr !== undefined) {\n                node._flatpickr.destroy();\n                node._flatpickr = undefined;\n            }\n            node._flatpickr = FlatpickrInstance(node, config || {});\n            instances.push(node._flatpickr);\n        }\n        catch (e) {\n            console.error(e);\n        }\n    }\n    return instances.length === 1 ? instances[0] : instances;\n}\nif (typeof HTMLElement !== \"undefined\" &&\n    typeof HTMLCollection !== \"undefined\" &&\n    typeof NodeList !== \"undefined\") {\n    HTMLCollection.prototype.flatpickr = NodeList.prototype.flatpickr = function (config) {\n        return _flatpickr(this, config);\n    };\n    HTMLElement.prototype.flatpickr = function (config) {\n        return _flatpickr([this], config);\n    };\n}\nvar flatpickr = function (selector, config) {\n    if (typeof selector === \"string\") {\n        return _flatpickr(window.document.querySelectorAll(selector), config);\n    }\n    else if (selector instanceof Node) {\n        return _flatpickr([selector], config);\n    }\n    else {\n        return _flatpickr(selector, config);\n    }\n};\nflatpickr.defaultConfig = {};\nflatpickr.l10ns = {\n    en: __assign({}, English),\n    default: __assign({}, English),\n};\nflatpickr.localize = function (l10n) {\n    flatpickr.l10ns.default = __assign(__assign({}, flatpickr.l10ns.default), l10n);\n};\nflatpickr.setDefaults = function (config) {\n    flatpickr.defaultConfig = __assign(__assign({}, flatpickr.defaultConfig), config);\n};\nflatpickr.parseDate = createDateParser({});\nflatpickr.formatDate = createDateFormatter({});\nflatpickr.compareDates = compareDates;\nif (typeof jQuery !== \"undefined\" && typeof jQuery.fn !== \"undefined\") {\n    jQuery.fn.flatpickr = function (config) {\n        return _flatpickr(this, config);\n    };\n}\nDate.prototype.fp_incr = function (days) {\n    return new Date(this.getFullYear(), this.getMonth(), this.getDate() + (typeof days === \"string\" ? parseInt(days, 10) : days));\n};\nif (typeof window !== \"undefined\") {\n    window.flatpickr = flatpickr;\n}\nexport default flatpickr;\n", "import flatpickr from \"flatpickr\"\nimport { Controller } from \"@hotwired/stimulus\"\nimport { Slovak } from \"flatpickr/dist/l10n/sk\"\nimport { Czech } from \"flatpickr/dist/l10n/cs\"\nimport moment from \"moment/moment\"\nimport predefinedRanges from \"../plugins/flatpickr-predefined-ranges\"\n\n// Connects to data-controller=\"flatpickr\"\nexport default class extends Controller {\n  static targets = [\"input\", \"timeFrom\", \"timeTo\"]\n\n  static values = {\n    locale: String,\n    todayLabel: String,\n    thisWeekLabel: String,\n    thisMonthLabel: String,\n    thisYearLabel: String,\n    lastWeekLabel: String,\n    lastMonthLabel: String,\n    lastYearLabel: String,\n  }\n\n  connect() {\n    if (!this.hasInputTarget) return\n    if (!this.hasLocaleValue) return\n\n    if (this.inputTarget.classList.contains(\"flatpickr-intialized\")) return\n\n    flatpickr(this.inputTarget, {\n      altFormat: \"d.m.Y\",\n      altInput: true,\n      dateFormat: \"Y-m-d\",\n      defaultDate: [this.timeFromTarget.value, this.timeToTarget.value],\n      locale: this.localeValue === \"cs\" ? Czech : Slovak,\n      mode: \"range\",\n      plugins: [predefinedRanges()],\n      rangesOnly: false,\n      allowCustom: false,\n      ranges: {\n        [this.todayLabelValue]: [new Date(), new Date()],\n        [this.thisWeekLabelValue]: [moment().startOf(\"isoWeek\").toDate(), moment().endOf(\"isoWeek\").toDate()],\n        [this.thisMonthLabelValue]: [moment().startOf(\"month\").toDate(), moment().endOf(\"month\").toDate()],\n        [this.thisYearLabelValue]: [moment().startOf(\"year\").toDate(), moment().endOf(\"year\").toDate()],\n        [this.lastWeekLabelValue]: [\n          moment().subtract(1, \"week\").startOf(\"isoWeek\").toDate(),\n          moment().subtract(1, \"week\").endOf(\"isoWeek\").toDate(),\n        ],\n        [this.lastMonthLabelValue]: [\n          moment().subtract(1, \"month\").startOf(\"month\").toDate(),\n          moment().subtract(1, \"month\").endOf(\"month\").toDate(),\n        ],\n        [this.lastYearLabelValue]: [\n          moment().subtract(1, \"year\").startOf(\"year\").toDate(),\n          moment().subtract(1, \"year\").endOf(\"year\").toDate(),\n        ],\n      },\n      onClose: (selectedDates) => {\n        const dateFrom = selectedDates[0]\n        const dateTo = selectedDates[1]\n\n        const from = `${dateFrom.getFullYear()}-${dateFrom.getMonth() + 1}-${dateFrom.getDate()}`\n        const to = `${dateTo.getFullYear()}-${dateTo.getMonth() + 1}-${dateTo.getDate()}`\n\n        if (from === this.timeFromTarget.value && to === this.timeToTarget.value) return\n\n        this.timeFromTarget.value = from\n        this.timeToTarget.value = to\n\n        this.element.requestSubmit()\n      },\n    })\n\n    this.inputTarget.classList.add(\"flatpickr-intialized\")\n  }\n}\n", "import moment from \"moment/moment\"\n\nexport default function () {\n  return function (fp) {\n    let rangesNav = document.createElement(\"ul\")\n    rangesNav.className = \"nav flex-column p-2 flatpickr-predefined-ranges\"\n\n    const pluginData = {\n      ranges: typeof fp.config.ranges !== \"undefined\" ? fp.config.ranges : {},\n      rangesOnly: typeof fp.config.rangesOnly === \"undefined\" || fp.config.rangesOnly,\n      rangesNav: rangesNav,\n      rangesButtons: {},\n    }\n\n    /**\n     * @param {string} label\n     * @returns HTML Element\n     */\n    const addRangeButton = function (label) {\n      let button = document.createElement(\"button\")\n      button.type = \"button\"\n      button.className = \"nav-link btn btn-link\"\n      button.innerText = label\n\n      pluginData.rangesButtons[label] = button\n\n      let item = document.createElement(\"li\")\n      item.className = \"nav-item d-grid\"\n\n      item.appendChild(pluginData.rangesButtons[label])\n\n      pluginData.rangesNav.appendChild(item)\n\n      return pluginData.rangesButtons[label]\n    }\n\n    /**\n     * Loop the ranges and check for one that matches the selected dates, adding\n     * an active class to its corresponding button.\n     *\n     * If there are selected dates and a range is not matched, check for a custom\n     * range button and set it to active.\n     *\n     * If there are no selected dates or a range is not matched, check if the\n     * rangeOnly option is true and if so hide the calendar.\n     *\n     * @param {Array} selectedDates\n     */\n    const selectActiveRangeButton = function (selectedDates) {\n      // let isPredefinedRange = false\n      let current = pluginData.rangesNav.querySelector(\".active\")\n\n      if (current) {\n        current.classList.remove(\"active\")\n      }\n\n      if (selectedDates.length > 0) {\n        let startDate = moment(selectedDates[0])\n        let endDate = selectedDates.length > 1 ? moment(selectedDates[1]) : startDate\n        for (const [label, range] of Object.entries(pluginData.ranges)) {\n          if (startDate.isSame(moment(range[0]), \"day\") && endDate.isSame(moment(range[1]), \"day\")) {\n            pluginData.rangesButtons[label].classList.add(\"active\")\n            // isPredefinedRange = true\n            break\n          }\n        }\n      }\n\n      // if (\n      //   selectedDates.length > 0 && !isPredefinedRange\n      // ) {\n      //   fp.calendarContainer.classList.add(\"flatpickr-predefined-ranges-only\")\n      // }\n    }\n\n    return {\n      /**\n       * Loop the ranges and add buttons for each range which a click handler to set the date.\n       * Also adds a custom range button if the rangesAllowCustom option is set to true.\n       */\n      onReady(selectedDates) {\n        for (const [label, range] of Object.entries(pluginData.ranges)) {\n          addRangeButton(label).addEventListener(\"click\", function () {\n            let start = moment(range[0]).toDate()\n            let end = moment(range[1]).toDate()\n\n            if (!start) {\n              fp.clear()\n            } else {\n              fp.setDate([start, end], true)\n            }\n\n            fp.close()\n          })\n        }\n\n        if (pluginData.rangesNav.children.length > 0) {\n          fp.calendarContainer.prepend(pluginData.rangesNav)\n          fp.calendarContainer.classList.add(\"flatpickr-has-predefined-ranges\")\n          // make sure the right range button is active for the default value\n          selectActiveRangeButton(selectedDates)\n        }\n      },\n\n      /**\n       * Make sure the right range button is active when a value is manually entered\n       *\n       * @param {Array} selectedDates\n       */\n      onValueUpdate(selectedDates) {\n        selectActiveRangeButton(selectedDates)\n      },\n    }\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n  static targets = [\"submit\", \"spinner\"]\n\n  disable() {\n    this.spinnerTarget.classList.remove(\"hidden\")\n    this.submitTarget.textContent = \"Wait...\"\n    this.submitTarget.disabled = true\n    this.submitTarget.classList.add(\"opacity-50\", \"cursor-not-allowed\")\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\nimport GLightbox from \"glightbox\"\n\nexport default class extends Controller {\n  connect() {\n    this.lightbox = GLightbox({\n      autoplayVideos: true,\n      touchNavigation: true,\n      loop: true,\n      zoomable: false\n    });\n\n  }\n\n  disconnect(){\n    this.lightbox = null;\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\nimport debounce from \"lodash/debounce\"\nimport { post } from \"@rails/request.js\"\n\nexport default class extends Controller {\n  static targets = [\"clearButton\", \"query\", \"mobileOverlay\", \"searchIcon\", \"loadingIcon\", \"desktopDropdown\"]\n  static classes = [\"open\", \"close\"]\n  static values = {\n    url: String,\n  }\n\n  initialize() {\n    if (this.hasMobileOverlayTarget) {\n      this.mobileSearchOpen = false\n    }\n\n    if (this.hasDesktopDropdownTarget) {\n      this.dropdownOpen = false\n    }\n\n    this.perform = debounce(this.submitForm, 500).bind(this)\n  }\n\n  connect() {\n    this.ensureDependencies()\n    this.setupEvents()\n  }\n\n  submitForm() {\n    if (this.queryTarget.value) {\n      this.showClearButton()\n    } else {\n      this.hideClearButton()\n    }\n\n    this.showLoadingState()\n\n    post(this.urlValue, {\n      body: {\n        query: this.queryTarget.value,\n      },\n      responseKind: \"turbo-stream\",\n    }).then(() => {\n      this.hideLoadingState()\n    })\n  }\n\n  clear() {\n    this.queryTarget.value = \"\"\n    this.submitForm()\n  }\n\n  searchRecent({ params }) {\n    if (!params.query) return\n\n    this.queryTarget.value = params.query\n    this.submitForm()\n  }\n\n  toggleMobileOverlay() {\n    if (!this.hasMobileOverlayTarget) return\n\n    if (this.mobileSearchOpen === true) {\n      this.mobileOverlayTarget.classList.add(...this.closeClasses)\n      this.mobileOverlayTarget.classList.remove(...this.openClasses)\n      this.queryTarget.blur()\n      this.queryTarget.value = \"\"\n\n      this.submitForm()\n\n      this.mobileSearchOpen = false\n    } else {\n      this.mobileOverlayTarget.classList.add(...this.openClasses)\n      this.mobileOverlayTarget.classList.remove(...this.closeClasses)\n      this.queryTarget.focus()\n      this.queryTarget.value = \"\"\n\n      this.submitForm()\n\n      this.mobileSearchOpen = true\n    }\n  }\n\n  openDesktopDropdown() {\n    if (!this.hasDesktopDropdownTarget) return\n\n    this.dropdownOpen = true\n    this.desktopDropdownTarget.classList.remove(\"hidden\")\n    this.queryTarget.focus()\n\n    this.submitForm()\n  }\n\n  closeDesktopDropdown() {\n    if (!this.hasDesktopDropdownTarget) return\n\n    this.dropdownOpen = false\n    this.desktopDropdownTarget.classList.add(\"hidden\")\n    this.queryTarget.blur()\n    this.queryTarget.value = \"\"\n\n    this.submitForm()\n  }\n\n  showLoadingState() {\n    this.searchIconTarget.classList.add(\"hidden\")\n    this.loadingIconTarget.classList.remove(\"hidden\")\n  }\n\n  hideLoadingState() {\n    this.loadingIconTarget.classList.add(\"hidden\")\n    this.searchIconTarget.classList.remove(\"hidden\")\n  }\n\n  showClearButton() {\n    this.clearButtonTarget.classList.add(\"flex\")\n    this.clearButtonTarget.classList.remove(\"hidden\")\n  }\n\n  hideClearButton() {\n    this.clearButtonTarget.classList.add(\"hidden\")\n    this.clearButtonTarget.classList.remove(\"flex\")\n  }\n\n  ensureDependencies() {\n    if (!this.hasQueryTarget) {\n      console.error(\"GlobalSearchController: Missing query target.\")\n    }\n\n    if (!this.hasUrlValue) {\n      console.error(\"GlobalSearchController: Missing url value.\")\n    }\n  }\n\n  setupEvents() {\n    this.queryTarget.addEventListener(\"focusin\", () => {\n      if (this.hasDesktopDropdownTarget) {\n        this.openDesktopDropdown()\n      }\n    })\n\n    if (this.hasDesktopDropdownTarget) {\n      // Either improve this or remove it. It causes bugs when inside textareas.\n      // document.addEventListener(\"keyup\", (evt) => {\n      //   if (evt.code !== \"Slash\") return\n      //   // Ignore when modifier key is pressed\n      //   if (evt.altKey || evt.ctrlKey || evt.metaKey || evt.shiftKey) return\n      //   // Ignore global key when in a form\n      //   if (/^(?:input|textarea|select|button)$/i.test(evt.target.tagName)) return\n\n      //   evt.preventDefault()\n\n      //   this.openDesktopDropdown()\n      // })\n\n      document.addEventListener(\"keyup\", (evt) => {\n        if (evt.code !== \"Escape\") return\n        if (this.dropdownOpen === false) return\n\n        evt.preventDefault()\n\n        this.closeDesktopDropdown()\n      })\n\n      document.addEventListener(\"click\", (evt) => {\n        if (this.dropdownOpen && !this.element.contains(evt.target)) {\n          this.closeDesktopDropdown()\n        }\n      })\n    }\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n  static values = { url: String }\n\n  connect() {\n    _gopay.checkout({ gatewayUrl: this.urlValue, inline: true })\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\nimport Headroom from \"headroom.js\"\n\nexport default class extends Controller {\n  connect() {\n    const headroom = new Headroom(this.element, {\n      offset: 800,\n      tolerance: 0\n    })\n\n    headroom.init()\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\n\n// Connects to data-controller=\"image-attachments\"\nexport default class extends Controller {\n  static targets = [\"previewContainer\", \"imagePreview\", \"input\", \"label\"]\n\n  connect() {\n    if (!this.hasImagePreviewTarget) {\n      console.error(\"Missing imagePreviewTarget element!\")\n    }\n  }\n\n  updatePreview(evt) {\n    const reader = new FileReader()\n\n    reader.onload = (e) => {\n      this.imagePreviewTarget.setAttribute(\"src\", e.target.result)\n    }\n\n    reader.readAsDataURL(evt.target.files[0])\n\n    if (this.hasPreviewContainerTarget) {\n      this.previewContainerTarget.classList.remove(\"hidden\")\n    }\n\n    if (this.hasLabelTarget) {\n      this.labelTarget.classList.add(\"hidden\")\n    }\n  }\n\n  reset() {\n    if (this.hasPreviewContainerTarget) {\n      this.previewContainerTarget.classList.add(\"hidden\")\n    }\n\n    if (this.hasLabelTarget) {\n      this.labelTarget.classList.remove(\"hidden\")\n    }\n\n    this.inputTarget.value = \"\"\n  }\n}\n", "import { Controller } from '@hotwired/stimulus';\nimport { Turbo } from \"@hotwired/turbo-rails\";\n\nexport default class extends Controller {\n  visit() {\n    if (window.getSelection().type !== 'Range') {\n      Turbo.visit(this.data.get('show'));\n    }\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\nconst _debounce = require(\"lodash/debounce\")\n\n// Connects to data-controller=\"invite-users\"\nexport default class extends Controller {\n  static values = {\n    availableLicenses: Number,\n    overdrawAdresses: Boolean,\n    trialLicense: Boolean,\n    preselectedRole: String,\n    remainingLicenses: Number,\n  }\n\n  static targets = [\n    \"availableLicenses\",\n    \"buttonSubmitInviteUsers\",\n    \"formBuyMoreLicenses\",\n    \"formInviteUsers\",\n    \"licensesStatus\",\n    \"licensesStatusIcon\",\n    \"overdrawError\",\n    \"renderedEmailAddresses\",\n    \"totalLicenses\",\n    \"usersInput\",\n    \"validAddresses\",\n  ]\n\n  initialize() {\n    // Debounce input action to prevent performance issues\n    this.input = _debounce(this.input, 300).bind(this)\n  }\n\n  connect() {\n    if (this.trialLicenseValue) {\n      this.overdrawAdressesValue = false\n    } else {\n      // Set Initial value for adresses overdraw based on number of available licenses\n      this.overdrawAdressesValue = this.availableLicensesValue ? false : true\n\n      // Set initial licesnses status\n      this.remainingLicensesValue = this.availableLicensesValue\n      this.totalLicensesTarget.textContent = this.availableLicensesValue\n      this.availableLicensesTarget.textContent = this.availableLicensesValue\n    }\n  }\n\n  input() {\n    // 1, Search for email addresses in input content\n    const inputVal = this.usersInputTarget.value\n    const regex = /([a-zA-Z0-9.+_-]+@[a-zA-Z0-9._-]+\\.[a-zA-Z0-9_-]+)/g\n    const match = inputVal.match(regex)\n    const matchedUnique = [...new Set(match)]\n\n    // 2, If there are matches, than change the displayed status of available licenses\n    // if there are none, than reset the status\n    if (matchedUnique && matchedUnique.length) {\n      this.remainingLicensesValue = this.availableLicensesValue - matchedUnique.length\n\n      let validAddresses;\n      if (this.trialLicenseValue) {\n        validAddresses = matchedUnique\n      } else {\n        validAddresses = matchedUnique.slice(0, this.availableLicensesValue)\n      }\n      this.validAddressesTarget.value = JSON.stringify(validAddresses)\n\n      // if the sum of licenses is positive, than display status, otherwise display 0 and overdraw warning\n      if (this.remainingLicensesValue >= 0 || this.trialLicenseValue) {\n        this.availableLicensesTarget.textContent = this.remainingLicensesValue\n        this.overdrawAdressesValue = false\n      } else {\n        this.availableLicensesTarget.textContent = 0\n        this.overdrawAdressesValue = true\n      }\n    } else {\n      this.remainingLicensesValue = this.availableLicensesValue\n      // Show initial licenses status\n      this.availableLicensesTarget.textContent = this.availableLicensesValue\n      this.overdrawAdressesValue = false\n    }\n    if (this.trialLicenseValue) {\n      this.availableLicensesTarget.textContent = '\u221E'\n    }\n  }\n\n  overdrawAdressesValueChanged(current, _old) {\n    // Disable/Enable invite-users form to prevent accidental submission\n    if (current) {\n      this.formInviteUsersTarget.setAttribute(\"onsubmit\", \"return false\")\n    } else {\n      this.formInviteUsersTarget.removeAttribute(\"onsubmit\")\n    }\n\n    // Change color of the license status indicator\n    this.licensesStatusTarget.classList.toggle(\"bg-faded-red\", current)\n    this.licensesStatusTarget.classList.toggle(\"bg-skillmea-green-200\", !current)\n\n    this.licensesStatusIconTarget.classList.toggle(\"bg-vivid-raspberry\", current)\n    this.licensesStatusIconTarget.classList.toggle(\"bg-corporate\", !current)\n\n    // Show/Hide the overdraw error\n    this.overdrawErrorTarget.classList.toggle(\"hidden\", !current)\n\n    // Show/hide Submit button of the invite users form\n    this.buttonSubmitInviteUsersTarget.classList.toggle(\"hidden\", current)\n\n    // Show/hide form for ordering additional licenses\n    this.formBuyMoreLicensesTarget.classList.toggle(\"hidden\", !current)\n  }\n\n  remainingLicensesValueChanged(current, previous) {\n    if (previous != current) {\n      // Play animation\n      window.anime({\n        targets: this.element.querySelector(\"#license_status\"),\n        keyframes: [{ scale: 1.6 }, { scale: 1 }],\n        duration: 150,\n        easing: \"easeOutQuad\",\n      })\n    }\n\n    if (current < 0) {\n      // Trigger custom event, so that other controllers might react to it\n      dispatchEvent(\n        new CustomEvent(\"inviteUsersInvalidAddressesCountChanged\", { detail: { count: Math.abs(current) } })\n      )\n    }\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\n\n// Connects to data-controller=\"items-filter\"\nexport default class extends Controller {\n  static targets = [\"clearQuery\", \"emptyState\", \"query\", \"item\"]\n\n  connect() {\n    this.handleQueryChange()\n  }\n\n  isMatch(itemTarget) {\n    if (this.queryValue.length === 0) return true\n\n    return itemTarget.dataset.filterableBy.match(this.queryToRegex)\n  }\n\n  reset(e) {\n    e.preventDefault()\n\n    this.queryTarget.value = \"\"\n\n    this.handleQueryChange()\n  }\n\n  handleQueryChange() {\n    this.handleQueryButtonVisibility()\n    this.handleItemsVisibility()\n    this.handleEmptyStateVisibility()\n  }\n\n  handleQueryButtonVisibility() {\n    if (this.queryValue) {\n      this.clearQueryTarget.hidden = false\n    } else {\n      this.clearQueryTarget.hidden = true\n    }\n  }\n\n  handleItemsVisibility() {\n    this.itemTargets.forEach((itemTarget) => {\n      if (this.isMatch(itemTarget)) {\n        itemTarget.hidden = false\n      } else {\n        itemTarget.hidden = true\n      }\n    })\n  }\n\n  handleEmptyStateVisibility() {\n    if (this.queryValue.length > 0 && this.matchedItems.length === 0) {\n      this.emptyStateTarget.classList.remove(\"hidden\")\n      this.emptyStateTarget.classList.add(\"flex\")\n    } else {\n      this.emptyStateTarget.classList.add(\"hidden\")\n      this.emptyStateTarget.classList.remove(\"flex\")\n    }\n  }\n\n  get queryValue() {\n    return this.queryTarget.value.toLowerCase()\n  }\n\n  get queryToRegex() {\n    return new RegExp(this.queryValue, \"i\")\n  }\n\n  get matchedItems() {\n    return this.itemTargets.filter((itemTarget) => {\n      return this.isMatch(itemTarget)\n    })\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\n\n// Connects to data-controller=\"nested-field\"\nexport default class extends Controller {\n  static targets = [\"destroyField\"]\n  static classes = [\"opacity\"]\n\n  toggle(e) {\n    e.preventDefault()\n\n    if (this.destroyFieldTarget.value === \"0\") {\n      this.destroyFieldTarget.value = \"1\"\n      this.element.classList.add(this.opacityClass)\n    } else {\n      this.destroyFieldTarget.value = \"0\"\n      this.element.classList.remove(this.opacityClass)\n    }\n  }\n\n  remove() {\n    this.element.remove()\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\n\n// Connects to data-controller=\"nested-fields\"\nexport default class extends Controller {\n  static targets = [\"template\", \"container\"]\n\n  connect() {\n    if (!this.hasTemplateTarget) console.error(\"Missing template target.\")\n    if (!this.hasContainerTarget) console.error(\"Missing container target.\")\n  }\n\n  add(e) {\n    e.preventDefault()\n\n    const id = this.epochTime\n    const elementClone = this.templateTarget.content.cloneNode(true)\n    const elementHTML = elementClone.firstElementChild.outerHTML\n    const sanitizedHTML = elementHTML.replaceAll(\"REPLACE\", id)\n\n    this.containerTarget.insertAdjacentHTML(\"beforeend\", sanitizedHTML)\n  }\n\n  get epochTime() {\n    return new Date().valueOf()\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\nimport { post } from \"@rails/request.js\"\n\n// Connects to data-controller=\"notifications\"\nexport default class extends Controller {\n  static values = {\n    url: String,\n    read: Boolean\n  }\n\n  markAsRead() {\n    // Return if notification is already read\n    if(this.readValue == true) return;\n\n    post(this.urlValue, {\n      responseKind: 'turbo-stream'\n    })\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\n\n// Connects to data-controller=\"other-field\"\nexport default class extends Controller {\n  static targets = [\"dropdown\", \"input\"]\n\n  connect() {\n    this.resolveInputVisibility()\n  }\n\n  resolveInputVisibility() {\n    if (this.dropdownTarget.value === \"other\") {\n      this.inputTarget.classList.remove(\"hidden\")\n    } else {\n      this.inputTarget.classList.add(\"hidden\")\n    }\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\nimport  _throttle from \"lodash/throttle\"\nimport { gsap } from \"gsap\";\n\n// Connects to data-controller=\"parallax\"\nexport default class extends Controller {\n  static targets = [\n    'layer',\n  ]\n  // Throttled animation function - performance opt.\n  throttled = _throttle(this.animateLayers, 17, {trailing: false}).bind(this);\n\n  connect() {\n    //If user uses mouse pointer    \n    if (matchMedia('(pointer:fine)').matches) {\n      // Event listeners\n      this.element.addEventListener('mousemove', this.throttled);\n      //this.element.addEventListener('mouseleave', this.resetLayers.bind(this));\n    }\n  }\n\n  disconnect() {\n    // Cleanup\n    // Remove listeners\n    this.element.removeEventListener('mousemove', this.throttled);\n    //this.element.removeEventListener('mouseleave', this.resetLayers);\n  }\n\n  animateLayers(e) {\n    const maxOffsetX = 10;\n\t\tconst maxOffsetY = 10;\n\n    let divPosX = Math.floor(e.clientX - this.element.getBoundingClientRect().left);\n    let divPosY = Math.floor(e.clientY - this.element.getBoundingClientRect().top);\n\n    let h_percentage = ((2/this.element.offsetWidth)*divPosX)-1;\n    let v_percentage = ((2/this.element.offsetHeight)*divPosY)-1;\n\n\n    this.layerTargets.forEach((layer)=>{\n      const depth = layer.getAttribute(\"data-depth\") ? layer.getAttribute(\"data-depth\") : 1 ;\n      gsap.to(layer, {duration: .75, translateY: `${v_percentage*maxOffsetY*depth}px`, translateX: `${h_percentage*maxOffsetX*depth}px`, ease: \"slow\"})\n    })\n  }\n\n  resetLayers() {\n    this.layerTargets.forEach((layer)=>{\n      gsap.to(layer, {duration: 1.5, translateY: '0px', translateX: '0px', ease: \"power1.inOut\"})\n    })\n  }\n}\n", "function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\n/*!\n * GSAP 3.12.5\n * https://gsap.com\n *\n * @license Copyright 2008-2024, GreenSock. All rights reserved.\n * Subject to the terms at https://gsap.com/standard-license or for\n * Club GSAP members, the agreement issued with that membership.\n * @author: Jack Doyle, jack@greensock.com\n*/\n\n/* eslint-disable */\nvar _config = {\n  autoSleep: 120,\n  force3D: \"auto\",\n  nullTargetWarn: 1,\n  units: {\n    lineHeight: \"\"\n  }\n},\n    _defaults = {\n  duration: .5,\n  overwrite: false,\n  delay: 0\n},\n    _suppressOverwrites,\n    _reverting,\n    _context,\n    _bigNum = 1e8,\n    _tinyNum = 1 / _bigNum,\n    _2PI = Math.PI * 2,\n    _HALF_PI = _2PI / 4,\n    _gsID = 0,\n    _sqrt = Math.sqrt,\n    _cos = Math.cos,\n    _sin = Math.sin,\n    _isString = function _isString(value) {\n  return typeof value === \"string\";\n},\n    _isFunction = function _isFunction(value) {\n  return typeof value === \"function\";\n},\n    _isNumber = function _isNumber(value) {\n  return typeof value === \"number\";\n},\n    _isUndefined = function _isUndefined(value) {\n  return typeof value === \"undefined\";\n},\n    _isObject = function _isObject(value) {\n  return typeof value === \"object\";\n},\n    _isNotFalse = function _isNotFalse(value) {\n  return value !== false;\n},\n    _windowExists = function _windowExists() {\n  return typeof window !== \"undefined\";\n},\n    _isFuncOrString = function _isFuncOrString(value) {\n  return _isFunction(value) || _isString(value);\n},\n    _isTypedArray = typeof ArrayBuffer === \"function\" && ArrayBuffer.isView || function () {},\n    // note: IE10 has ArrayBuffer, but NOT ArrayBuffer.isView().\n_isArray = Array.isArray,\n    _strictNumExp = /(?:-?\\.?\\d|\\.)+/gi,\n    //only numbers (including negatives and decimals) but NOT relative values.\n_numExp = /[-+=.]*\\d+[.e\\-+]*\\d*[e\\-+]*\\d*/g,\n    //finds any numbers, including ones that start with += or -=, negative numbers, and ones in scientific notation like 1e-8.\n_numWithUnitExp = /[-+=.]*\\d+[.e-]*\\d*[a-z%]*/g,\n    _complexStringNumExp = /[-+=.]*\\d+\\.?\\d*(?:e-|e\\+)?\\d*/gi,\n    //duplicate so that while we're looping through matches from exec(), it doesn't contaminate the lastIndex of _numExp which we use to search for colors too.\n_relExp = /[+-]=-?[.\\d]+/,\n    _delimitedValueExp = /[^,'\"\\[\\]\\s]+/gi,\n    // previously /[#\\-+.]*\\b[a-z\\d\\-=+%.]+/gi but didn't catch special characters.\n_unitExp = /^[+\\-=e\\s\\d]*\\d+[.\\d]*([a-z]*|%)\\s*$/i,\n    _globalTimeline,\n    _win,\n    _coreInitted,\n    _doc,\n    _globals = {},\n    _installScope = {},\n    _coreReady,\n    _install = function _install(scope) {\n  return (_installScope = _merge(scope, _globals)) && gsap;\n},\n    _missingPlugin = function _missingPlugin(property, value) {\n  return console.warn(\"Invalid property\", property, \"set to\", value, \"Missing plugin? gsap.registerPlugin()\");\n},\n    _warn = function _warn(message, suppress) {\n  return !suppress && console.warn(message);\n},\n    _addGlobal = function _addGlobal(name, obj) {\n  return name && (_globals[name] = obj) && _installScope && (_installScope[name] = obj) || _globals;\n},\n    _emptyFunc = function _emptyFunc() {\n  return 0;\n},\n    _startAtRevertConfig = {\n  suppressEvents: true,\n  isStart: true,\n  kill: false\n},\n    _revertConfigNoKill = {\n  suppressEvents: true,\n  kill: false\n},\n    _revertConfig = {\n  suppressEvents: true\n},\n    _reservedProps = {},\n    _lazyTweens = [],\n    _lazyLookup = {},\n    _lastRenderedFrame,\n    _plugins = {},\n    _effects = {},\n    _nextGCFrame = 30,\n    _harnessPlugins = [],\n    _callbackNames = \"\",\n    _harness = function _harness(targets) {\n  var target = targets[0],\n      harnessPlugin,\n      i;\n  _isObject(target) || _isFunction(target) || (targets = [targets]);\n\n  if (!(harnessPlugin = (target._gsap || {}).harness)) {\n    // find the first target with a harness. We assume targets passed into an animation will be of similar type, meaning the same kind of harness can be used for them all (performance optimization)\n    i = _harnessPlugins.length;\n\n    while (i-- && !_harnessPlugins[i].targetTest(target)) {}\n\n    harnessPlugin = _harnessPlugins[i];\n  }\n\n  i = targets.length;\n\n  while (i--) {\n    targets[i] && (targets[i]._gsap || (targets[i]._gsap = new GSCache(targets[i], harnessPlugin))) || targets.splice(i, 1);\n  }\n\n  return targets;\n},\n    _getCache = function _getCache(target) {\n  return target._gsap || _harness(toArray(target))[0]._gsap;\n},\n    _getProperty = function _getProperty(target, property, v) {\n  return (v = target[property]) && _isFunction(v) ? target[property]() : _isUndefined(v) && target.getAttribute && target.getAttribute(property) || v;\n},\n    _forEachName = function _forEachName(names, func) {\n  return (names = names.split(\",\")).forEach(func) || names;\n},\n    //split a comma-delimited list of names into an array, then run a forEach() function and return the split array (this is just a way to consolidate/shorten some code).\n_round = function _round(value) {\n  return Math.round(value * 100000) / 100000 || 0;\n},\n    _roundPrecise = function _roundPrecise(value) {\n  return Math.round(value * 10000000) / 10000000 || 0;\n},\n    // increased precision mostly for timing values.\n_parseRelative = function _parseRelative(start, value) {\n  var operator = value.charAt(0),\n      end = parseFloat(value.substr(2));\n  start = parseFloat(start);\n  return operator === \"+\" ? start + end : operator === \"-\" ? start - end : operator === \"*\" ? start * end : start / end;\n},\n    _arrayContainsAny = function _arrayContainsAny(toSearch, toFind) {\n  //searches one array to find matches for any of the items in the toFind array. As soon as one is found, it returns true. It does NOT return all the matches; it's simply a boolean search.\n  var l = toFind.length,\n      i = 0;\n\n  for (; toSearch.indexOf(toFind[i]) < 0 && ++i < l;) {}\n\n  return i < l;\n},\n    _lazyRender = function _lazyRender() {\n  var l = _lazyTweens.length,\n      a = _lazyTweens.slice(0),\n      i,\n      tween;\n\n  _lazyLookup = {};\n  _lazyTweens.length = 0;\n\n  for (i = 0; i < l; i++) {\n    tween = a[i];\n    tween && tween._lazy && (tween.render(tween._lazy[0], tween._lazy[1], true)._lazy = 0);\n  }\n},\n    _lazySafeRender = function _lazySafeRender(animation, time, suppressEvents, force) {\n  _lazyTweens.length && !_reverting && _lazyRender();\n  animation.render(time, suppressEvents, force || _reverting && time < 0 && (animation._initted || animation._startAt));\n  _lazyTweens.length && !_reverting && _lazyRender(); //in case rendering caused any tweens to lazy-init, we should render them because typically when someone calls seek() or time() or progress(), they expect an immediate render.\n},\n    _numericIfPossible = function _numericIfPossible(value) {\n  var n = parseFloat(value);\n  return (n || n === 0) && (value + \"\").match(_delimitedValueExp).length < 2 ? n : _isString(value) ? value.trim() : value;\n},\n    _passThrough = function _passThrough(p) {\n  return p;\n},\n    _setDefaults = function _setDefaults(obj, defaults) {\n  for (var p in defaults) {\n    p in obj || (obj[p] = defaults[p]);\n  }\n\n  return obj;\n},\n    _setKeyframeDefaults = function _setKeyframeDefaults(excludeDuration) {\n  return function (obj, defaults) {\n    for (var p in defaults) {\n      p in obj || p === \"duration\" && excludeDuration || p === \"ease\" || (obj[p] = defaults[p]);\n    }\n  };\n},\n    _merge = function _merge(base, toMerge) {\n  for (var p in toMerge) {\n    base[p] = toMerge[p];\n  }\n\n  return base;\n},\n    _mergeDeep = function _mergeDeep(base, toMerge) {\n  for (var p in toMerge) {\n    p !== \"__proto__\" && p !== \"constructor\" && p !== \"prototype\" && (base[p] = _isObject(toMerge[p]) ? _mergeDeep(base[p] || (base[p] = {}), toMerge[p]) : toMerge[p]);\n  }\n\n  return base;\n},\n    _copyExcluding = function _copyExcluding(obj, excluding) {\n  var copy = {},\n      p;\n\n  for (p in obj) {\n    p in excluding || (copy[p] = obj[p]);\n  }\n\n  return copy;\n},\n    _inheritDefaults = function _inheritDefaults(vars) {\n  var parent = vars.parent || _globalTimeline,\n      func = vars.keyframes ? _setKeyframeDefaults(_isArray(vars.keyframes)) : _setDefaults;\n\n  if (_isNotFalse(vars.inherit)) {\n    while (parent) {\n      func(vars, parent.vars.defaults);\n      parent = parent.parent || parent._dp;\n    }\n  }\n\n  return vars;\n},\n    _arraysMatch = function _arraysMatch(a1, a2) {\n  var i = a1.length,\n      match = i === a2.length;\n\n  while (match && i-- && a1[i] === a2[i]) {}\n\n  return i < 0;\n},\n    _addLinkedListItem = function _addLinkedListItem(parent, child, firstProp, lastProp, sortBy) {\n  if (firstProp === void 0) {\n    firstProp = \"_first\";\n  }\n\n  if (lastProp === void 0) {\n    lastProp = \"_last\";\n  }\n\n  var prev = parent[lastProp],\n      t;\n\n  if (sortBy) {\n    t = child[sortBy];\n\n    while (prev && prev[sortBy] > t) {\n      prev = prev._prev;\n    }\n  }\n\n  if (prev) {\n    child._next = prev._next;\n    prev._next = child;\n  } else {\n    child._next = parent[firstProp];\n    parent[firstProp] = child;\n  }\n\n  if (child._next) {\n    child._next._prev = child;\n  } else {\n    parent[lastProp] = child;\n  }\n\n  child._prev = prev;\n  child.parent = child._dp = parent;\n  return child;\n},\n    _removeLinkedListItem = function _removeLinkedListItem(parent, child, firstProp, lastProp) {\n  if (firstProp === void 0) {\n    firstProp = \"_first\";\n  }\n\n  if (lastProp === void 0) {\n    lastProp = \"_last\";\n  }\n\n  var prev = child._prev,\n      next = child._next;\n\n  if (prev) {\n    prev._next = next;\n  } else if (parent[firstProp] === child) {\n    parent[firstProp] = next;\n  }\n\n  if (next) {\n    next._prev = prev;\n  } else if (parent[lastProp] === child) {\n    parent[lastProp] = prev;\n  }\n\n  child._next = child._prev = child.parent = null; // don't delete the _dp just so we can revert if necessary. But parent should be null to indicate the item isn't in a linked list.\n},\n    _removeFromParent = function _removeFromParent(child, onlyIfParentHasAutoRemove) {\n  child.parent && (!onlyIfParentHasAutoRemove || child.parent.autoRemoveChildren) && child.parent.remove && child.parent.remove(child);\n  child._act = 0;\n},\n    _uncache = function _uncache(animation, child) {\n  if (animation && (!child || child._end > animation._dur || child._start < 0)) {\n    // performance optimization: if a child animation is passed in we should only uncache if that child EXTENDS the animation (its end time is beyond the end)\n    var a = animation;\n\n    while (a) {\n      a._dirty = 1;\n      a = a.parent;\n    }\n  }\n\n  return animation;\n},\n    _recacheAncestors = function _recacheAncestors(animation) {\n  var parent = animation.parent;\n\n  while (parent && parent.parent) {\n    //sometimes we must force a re-sort of all children and update the duration/totalDuration of all ancestor timelines immediately in case, for example, in the middle of a render loop, one tween alters another tween's timeScale which shoves its startTime before 0, forcing the parent timeline to shift around and shiftChildren() which could affect that next tween's render (startTime). Doesn't matter for the root timeline though.\n    parent._dirty = 1;\n    parent.totalDuration();\n    parent = parent.parent;\n  }\n\n  return animation;\n},\n    _rewindStartAt = function _rewindStartAt(tween, totalTime, suppressEvents, force) {\n  return tween._startAt && (_reverting ? tween._startAt.revert(_revertConfigNoKill) : tween.vars.immediateRender && !tween.vars.autoRevert || tween._startAt.render(totalTime, true, force));\n},\n    _hasNoPausedAncestors = function _hasNoPausedAncestors(animation) {\n  return !animation || animation._ts && _hasNoPausedAncestors(animation.parent);\n},\n    _elapsedCycleDuration = function _elapsedCycleDuration(animation) {\n  return animation._repeat ? _animationCycle(animation._tTime, animation = animation.duration() + animation._rDelay) * animation : 0;\n},\n    // feed in the totalTime and cycleDuration and it'll return the cycle (iteration minus 1) and if the playhead is exactly at the very END, it will NOT bump up to the next cycle.\n_animationCycle = function _animationCycle(tTime, cycleDuration) {\n  var whole = Math.floor(tTime /= cycleDuration);\n  return tTime && whole === tTime ? whole - 1 : whole;\n},\n    _parentToChildTotalTime = function _parentToChildTotalTime(parentTime, child) {\n  return (parentTime - child._start) * child._ts + (child._ts >= 0 ? 0 : child._dirty ? child.totalDuration() : child._tDur);\n},\n    _setEnd = function _setEnd(animation) {\n  return animation._end = _roundPrecise(animation._start + (animation._tDur / Math.abs(animation._ts || animation._rts || _tinyNum) || 0));\n},\n    _alignPlayhead = function _alignPlayhead(animation, totalTime) {\n  // adjusts the animation's _start and _end according to the provided totalTime (only if the parent's smoothChildTiming is true and the animation isn't paused). It doesn't do any rendering or forcing things back into parent timelines, etc. - that's what totalTime() is for.\n  var parent = animation._dp;\n\n  if (parent && parent.smoothChildTiming && animation._ts) {\n    animation._start = _roundPrecise(parent._time - (animation._ts > 0 ? totalTime / animation._ts : ((animation._dirty ? animation.totalDuration() : animation._tDur) - totalTime) / -animation._ts));\n\n    _setEnd(animation);\n\n    parent._dirty || _uncache(parent, animation); //for performance improvement. If the parent's cache is already dirty, it already took care of marking the ancestors as dirty too, so skip the function call here.\n  }\n\n  return animation;\n},\n\n/*\n_totalTimeToTime = (clampedTotalTime, duration, repeat, repeatDelay, yoyo) => {\n\tlet cycleDuration = duration + repeatDelay,\n\t\ttime = _round(clampedTotalTime % cycleDuration);\n\tif (time > duration) {\n\t\ttime = duration;\n\t}\n\treturn (yoyo && (~~(clampedTotalTime / cycleDuration) & 1)) ? duration - time : time;\n},\n*/\n_postAddChecks = function _postAddChecks(timeline, child) {\n  var t;\n\n  if (child._time || !child._dur && child._initted || child._start < timeline._time && (child._dur || !child.add)) {\n    // in case, for example, the _start is moved on a tween that has already rendered, or if it's being inserted into a timeline BEFORE where the playhead is currently. Imagine it's at its end state, then the startTime is moved WAY later (after the end of this timeline), it should render at its beginning. Special case: if it's a timeline (has .add() method) and no duration, we can skip rendering because the user may be populating it AFTER adding it to a parent timeline (unconventional, but possible, and we wouldn't want it to get removed if the parent's autoRemoveChildren is true).\n    t = _parentToChildTotalTime(timeline.rawTime(), child);\n\n    if (!child._dur || _clamp(0, child.totalDuration(), t) - child._tTime > _tinyNum) {\n      child.render(t, true);\n    }\n  } //if the timeline has already ended but the inserted tween/timeline extends the duration, we should enable this timeline again so that it renders properly. We should also align the playhead with the parent timeline's when appropriate.\n\n\n  if (_uncache(timeline, child)._dp && timeline._initted && timeline._time >= timeline._dur && timeline._ts) {\n    //in case any of the ancestors had completed but should now be enabled...\n    if (timeline._dur < timeline.duration()) {\n      t = timeline;\n\n      while (t._dp) {\n        t.rawTime() >= 0 && t.totalTime(t._tTime); //moves the timeline (shifts its startTime) if necessary, and also enables it. If it's currently zero, though, it may not be scheduled to render until later so there's no need to force it to align with the current playhead position. Only move to catch up with the playhead.\n\n        t = t._dp;\n      }\n    }\n\n    timeline._zTime = -_tinyNum; // helps ensure that the next render() will be forced (crossingStart = true in render()), even if the duration hasn't changed (we're adding a child which would need to get rendered). Definitely an edge case. Note: we MUST do this AFTER the loop above where the totalTime() might trigger a render() because this _addToTimeline() method gets called from the Animation constructor, BEFORE tweens even record their targets, etc. so we wouldn't want things to get triggered in the wrong order.\n  }\n},\n    _addToTimeline = function _addToTimeline(timeline, child, position, skipChecks) {\n  child.parent && _removeFromParent(child);\n  child._start = _roundPrecise((_isNumber(position) ? position : position || timeline !== _globalTimeline ? _parsePosition(timeline, position, child) : timeline._time) + child._delay);\n  child._end = _roundPrecise(child._start + (child.totalDuration() / Math.abs(child.timeScale()) || 0));\n\n  _addLinkedListItem(timeline, child, \"_first\", \"_last\", timeline._sort ? \"_start\" : 0);\n\n  _isFromOrFromStart(child) || (timeline._recent = child);\n  skipChecks || _postAddChecks(timeline, child);\n  timeline._ts < 0 && _alignPlayhead(timeline, timeline._tTime); // if the timeline is reversed and the new child makes it longer, we may need to adjust the parent's _start (push it back)\n\n  return timeline;\n},\n    _scrollTrigger = function _scrollTrigger(animation, trigger) {\n  return (_globals.ScrollTrigger || _missingPlugin(\"scrollTrigger\", trigger)) && _globals.ScrollTrigger.create(trigger, animation);\n},\n    _attemptInitTween = function _attemptInitTween(tween, time, force, suppressEvents, tTime) {\n  _initTween(tween, time, tTime);\n\n  if (!tween._initted) {\n    return 1;\n  }\n\n  if (!force && tween._pt && !_reverting && (tween._dur && tween.vars.lazy !== false || !tween._dur && tween.vars.lazy) && _lastRenderedFrame !== _ticker.frame) {\n    _lazyTweens.push(tween);\n\n    tween._lazy = [tTime, suppressEvents];\n    return 1;\n  }\n},\n    _parentPlayheadIsBeforeStart = function _parentPlayheadIsBeforeStart(_ref) {\n  var parent = _ref.parent;\n  return parent && parent._ts && parent._initted && !parent._lock && (parent.rawTime() < 0 || _parentPlayheadIsBeforeStart(parent));\n},\n    // check parent's _lock because when a timeline repeats/yoyos and does its artificial wrapping, we shouldn't force the ratio back to 0\n_isFromOrFromStart = function _isFromOrFromStart(_ref2) {\n  var data = _ref2.data;\n  return data === \"isFromStart\" || data === \"isStart\";\n},\n    _renderZeroDurationTween = function _renderZeroDurationTween(tween, totalTime, suppressEvents, force) {\n  var prevRatio = tween.ratio,\n      ratio = totalTime < 0 || !totalTime && (!tween._start && _parentPlayheadIsBeforeStart(tween) && !(!tween._initted && _isFromOrFromStart(tween)) || (tween._ts < 0 || tween._dp._ts < 0) && !_isFromOrFromStart(tween)) ? 0 : 1,\n      // if the tween or its parent is reversed and the totalTime is 0, we should go to a ratio of 0. Edge case: if a from() or fromTo() stagger tween is placed later in a timeline, the \"startAt\" zero-duration tween could initially render at a time when the parent timeline's playhead is technically BEFORE where this tween is, so make sure that any \"from\" and \"fromTo\" startAt tweens are rendered the first time at a ratio of 1.\n  repeatDelay = tween._rDelay,\n      tTime = 0,\n      pt,\n      iteration,\n      prevIteration;\n\n  if (repeatDelay && tween._repeat) {\n    // in case there's a zero-duration tween that has a repeat with a repeatDelay\n    tTime = _clamp(0, tween._tDur, totalTime);\n    iteration = _animationCycle(tTime, repeatDelay);\n    tween._yoyo && iteration & 1 && (ratio = 1 - ratio);\n\n    if (iteration !== _animationCycle(tween._tTime, repeatDelay)) {\n      // if iteration changed\n      prevRatio = 1 - ratio;\n      tween.vars.repeatRefresh && tween._initted && tween.invalidate();\n    }\n  }\n\n  if (ratio !== prevRatio || _reverting || force || tween._zTime === _tinyNum || !totalTime && tween._zTime) {\n    if (!tween._initted && _attemptInitTween(tween, totalTime, force, suppressEvents, tTime)) {\n      // if we render the very beginning (time == 0) of a fromTo(), we must force the render (normal tweens wouldn't need to render at a time of 0 when the prevTime was also 0). This is also mandatory to make sure overwriting kicks in immediately.\n      return;\n    }\n\n    prevIteration = tween._zTime;\n    tween._zTime = totalTime || (suppressEvents ? _tinyNum : 0); // when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect.\n\n    suppressEvents || (suppressEvents = totalTime && !prevIteration); // if it was rendered previously at exactly 0 (_zTime) and now the playhead is moving away, DON'T fire callbacks otherwise they'll seem like duplicates.\n\n    tween.ratio = ratio;\n    tween._from && (ratio = 1 - ratio);\n    tween._time = 0;\n    tween._tTime = tTime;\n    pt = tween._pt;\n\n    while (pt) {\n      pt.r(ratio, pt.d);\n      pt = pt._next;\n    }\n\n    totalTime < 0 && _rewindStartAt(tween, totalTime, suppressEvents, true);\n    tween._onUpdate && !suppressEvents && _callback(tween, \"onUpdate\");\n    tTime && tween._repeat && !suppressEvents && tween.parent && _callback(tween, \"onRepeat\");\n\n    if ((totalTime >= tween._tDur || totalTime < 0) && tween.ratio === ratio) {\n      ratio && _removeFromParent(tween, 1);\n\n      if (!suppressEvents && !_reverting) {\n        _callback(tween, ratio ? \"onComplete\" : \"onReverseComplete\", true);\n\n        tween._prom && tween._prom();\n      }\n    }\n  } else if (!tween._zTime) {\n    tween._zTime = totalTime;\n  }\n},\n    _findNextPauseTween = function _findNextPauseTween(animation, prevTime, time) {\n  var child;\n\n  if (time > prevTime) {\n    child = animation._first;\n\n    while (child && child._start <= time) {\n      if (child.data === \"isPause\" && child._start > prevTime) {\n        return child;\n      }\n\n      child = child._next;\n    }\n  } else {\n    child = animation._last;\n\n    while (child && child._start >= time) {\n      if (child.data === \"isPause\" && child._start < prevTime) {\n        return child;\n      }\n\n      child = child._prev;\n    }\n  }\n},\n    _setDuration = function _setDuration(animation, duration, skipUncache, leavePlayhead) {\n  var repeat = animation._repeat,\n      dur = _roundPrecise(duration) || 0,\n      totalProgress = animation._tTime / animation._tDur;\n  totalProgress && !leavePlayhead && (animation._time *= dur / animation._dur);\n  animation._dur = dur;\n  animation._tDur = !repeat ? dur : repeat < 0 ? 1e10 : _roundPrecise(dur * (repeat + 1) + animation._rDelay * repeat);\n  totalProgress > 0 && !leavePlayhead && _alignPlayhead(animation, animation._tTime = animation._tDur * totalProgress);\n  animation.parent && _setEnd(animation);\n  skipUncache || _uncache(animation.parent, animation);\n  return animation;\n},\n    _onUpdateTotalDuration = function _onUpdateTotalDuration(animation) {\n  return animation instanceof Timeline ? _uncache(animation) : _setDuration(animation, animation._dur);\n},\n    _zeroPosition = {\n  _start: 0,\n  endTime: _emptyFunc,\n  totalDuration: _emptyFunc\n},\n    _parsePosition = function _parsePosition(animation, position, percentAnimation) {\n  var labels = animation.labels,\n      recent = animation._recent || _zeroPosition,\n      clippedDuration = animation.duration() >= _bigNum ? recent.endTime(false) : animation._dur,\n      //in case there's a child that infinitely repeats, users almost never intend for the insertion point of a new child to be based on a SUPER long value like that so we clip it and assume the most recently-added child's endTime should be used instead.\n  i,\n      offset,\n      isPercent;\n\n  if (_isString(position) && (isNaN(position) || position in labels)) {\n    //if the string is a number like \"1\", check to see if there's a label with that name, otherwise interpret it as a number (absolute value).\n    offset = position.charAt(0);\n    isPercent = position.substr(-1) === \"%\";\n    i = position.indexOf(\"=\");\n\n    if (offset === \"<\" || offset === \">\") {\n      i >= 0 && (position = position.replace(/=/, \"\"));\n      return (offset === \"<\" ? recent._start : recent.endTime(recent._repeat >= 0)) + (parseFloat(position.substr(1)) || 0) * (isPercent ? (i < 0 ? recent : percentAnimation).totalDuration() / 100 : 1);\n    }\n\n    if (i < 0) {\n      position in labels || (labels[position] = clippedDuration);\n      return labels[position];\n    }\n\n    offset = parseFloat(position.charAt(i - 1) + position.substr(i + 1));\n\n    if (isPercent && percentAnimation) {\n      offset = offset / 100 * (_isArray(percentAnimation) ? percentAnimation[0] : percentAnimation).totalDuration();\n    }\n\n    return i > 1 ? _parsePosition(animation, position.substr(0, i - 1), percentAnimation) + offset : clippedDuration + offset;\n  }\n\n  return position == null ? clippedDuration : +position;\n},\n    _createTweenType = function _createTweenType(type, params, timeline) {\n  var isLegacy = _isNumber(params[1]),\n      varsIndex = (isLegacy ? 2 : 1) + (type < 2 ? 0 : 1),\n      vars = params[varsIndex],\n      irVars,\n      parent;\n\n  isLegacy && (vars.duration = params[1]);\n  vars.parent = timeline;\n\n  if (type) {\n    irVars = vars;\n    parent = timeline;\n\n    while (parent && !(\"immediateRender\" in irVars)) {\n      // inheritance hasn't happened yet, but someone may have set a default in an ancestor timeline. We could do vars.immediateRender = _isNotFalse(_inheritDefaults(vars).immediateRender) but that'd exact a slight performance penalty because _inheritDefaults() also runs in the Tween constructor. We're paying a small kb price here to gain speed.\n      irVars = parent.vars.defaults || {};\n      parent = _isNotFalse(parent.vars.inherit) && parent.parent;\n    }\n\n    vars.immediateRender = _isNotFalse(irVars.immediateRender);\n    type < 2 ? vars.runBackwards = 1 : vars.startAt = params[varsIndex - 1]; // \"from\" vars\n  }\n\n  return new Tween(params[0], vars, params[varsIndex + 1]);\n},\n    _conditionalReturn = function _conditionalReturn(value, func) {\n  return value || value === 0 ? func(value) : func;\n},\n    _clamp = function _clamp(min, max, value) {\n  return value < min ? min : value > max ? max : value;\n},\n    getUnit = function getUnit(value, v) {\n  return !_isString(value) || !(v = _unitExp.exec(value)) ? \"\" : v[1];\n},\n    // note: protect against padded numbers as strings, like \"100.100\". That shouldn't return \"00\" as the unit. If it's numeric, return no unit.\nclamp = function clamp(min, max, value) {\n  return _conditionalReturn(value, function (v) {\n    return _clamp(min, max, v);\n  });\n},\n    _slice = [].slice,\n    _isArrayLike = function _isArrayLike(value, nonEmpty) {\n  return value && _isObject(value) && \"length\" in value && (!nonEmpty && !value.length || value.length - 1 in value && _isObject(value[0])) && !value.nodeType && value !== _win;\n},\n    _flatten = function _flatten(ar, leaveStrings, accumulator) {\n  if (accumulator === void 0) {\n    accumulator = [];\n  }\n\n  return ar.forEach(function (value) {\n    var _accumulator;\n\n    return _isString(value) && !leaveStrings || _isArrayLike(value, 1) ? (_accumulator = accumulator).push.apply(_accumulator, toArray(value)) : accumulator.push(value);\n  }) || accumulator;\n},\n    //takes any value and returns an array. If it's a string (and leaveStrings isn't true), it'll use document.querySelectorAll() and convert that to an array. It'll also accept iterables like jQuery objects.\ntoArray = function toArray(value, scope, leaveStrings) {\n  return _context && !scope && _context.selector ? _context.selector(value) : _isString(value) && !leaveStrings && (_coreInitted || !_wake()) ? _slice.call((scope || _doc).querySelectorAll(value), 0) : _isArray(value) ? _flatten(value, leaveStrings) : _isArrayLike(value) ? _slice.call(value, 0) : value ? [value] : [];\n},\n    selector = function selector(value) {\n  value = toArray(value)[0] || _warn(\"Invalid scope\") || {};\n  return function (v) {\n    var el = value.current || value.nativeElement || value;\n    return toArray(v, el.querySelectorAll ? el : el === value ? _warn(\"Invalid scope\") || _doc.createElement(\"div\") : value);\n  };\n},\n    shuffle = function shuffle(a) {\n  return a.sort(function () {\n    return .5 - Math.random();\n  });\n},\n    // alternative that's a bit faster and more reliably diverse but bigger:   for (let j, v, i = a.length; i; j = Math.floor(Math.random() * i), v = a[--i], a[i] = a[j], a[j] = v); return a;\n//for distributing values across an array. Can accept a number, a function or (most commonly) a function which can contain the following properties: {base, amount, from, ease, grid, axis, length, each}. Returns a function that expects the following parameters: index, target, array. Recognizes the following\ndistribute = function distribute(v) {\n  if (_isFunction(v)) {\n    return v;\n  }\n\n  var vars = _isObject(v) ? v : {\n    each: v\n  },\n      //n:1 is just to indicate v was a number; we leverage that later to set v according to the length we get. If a number is passed in, we treat it like the old stagger value where 0.1, for example, would mean that things would be distributed with 0.1 between each element in the array rather than a total \"amount\" that's chunked out among them all.\n  ease = _parseEase(vars.ease),\n      from = vars.from || 0,\n      base = parseFloat(vars.base) || 0,\n      cache = {},\n      isDecimal = from > 0 && from < 1,\n      ratios = isNaN(from) || isDecimal,\n      axis = vars.axis,\n      ratioX = from,\n      ratioY = from;\n\n  if (_isString(from)) {\n    ratioX = ratioY = {\n      center: .5,\n      edges: .5,\n      end: 1\n    }[from] || 0;\n  } else if (!isDecimal && ratios) {\n    ratioX = from[0];\n    ratioY = from[1];\n  }\n\n  return function (i, target, a) {\n    var l = (a || vars).length,\n        distances = cache[l],\n        originX,\n        originY,\n        x,\n        y,\n        d,\n        j,\n        max,\n        min,\n        wrapAt;\n\n    if (!distances) {\n      wrapAt = vars.grid === \"auto\" ? 0 : (vars.grid || [1, _bigNum])[1];\n\n      if (!wrapAt) {\n        max = -_bigNum;\n\n        while (max < (max = a[wrapAt++].getBoundingClientRect().left) && wrapAt < l) {}\n\n        wrapAt < l && wrapAt--;\n      }\n\n      distances = cache[l] = [];\n      originX = ratios ? Math.min(wrapAt, l) * ratioX - .5 : from % wrapAt;\n      originY = wrapAt === _bigNum ? 0 : ratios ? l * ratioY / wrapAt - .5 : from / wrapAt | 0;\n      max = 0;\n      min = _bigNum;\n\n      for (j = 0; j < l; j++) {\n        x = j % wrapAt - originX;\n        y = originY - (j / wrapAt | 0);\n        distances[j] = d = !axis ? _sqrt(x * x + y * y) : Math.abs(axis === \"y\" ? y : x);\n        d > max && (max = d);\n        d < min && (min = d);\n      }\n\n      from === \"random\" && shuffle(distances);\n      distances.max = max - min;\n      distances.min = min;\n      distances.v = l = (parseFloat(vars.amount) || parseFloat(vars.each) * (wrapAt > l ? l - 1 : !axis ? Math.max(wrapAt, l / wrapAt) : axis === \"y\" ? l / wrapAt : wrapAt) || 0) * (from === \"edges\" ? -1 : 1);\n      distances.b = l < 0 ? base - l : base;\n      distances.u = getUnit(vars.amount || vars.each) || 0; //unit\n\n      ease = ease && l < 0 ? _invertEase(ease) : ease;\n    }\n\n    l = (distances[i] - distances.min) / distances.max || 0;\n    return _roundPrecise(distances.b + (ease ? ease(l) : l) * distances.v) + distances.u; //round in order to work around floating point errors\n  };\n},\n    _roundModifier = function _roundModifier(v) {\n  //pass in 0.1 get a function that'll round to the nearest tenth, or 5 to round to the closest 5, or 0.001 to the closest 1000th, etc.\n  var p = Math.pow(10, ((v + \"\").split(\".\")[1] || \"\").length); //to avoid floating point math errors (like 24 * 0.1 == 2.4000000000000004), we chop off at a specific number of decimal places (much faster than toFixed())\n\n  return function (raw) {\n    var n = _roundPrecise(Math.round(parseFloat(raw) / v) * v * p);\n\n    return (n - n % 1) / p + (_isNumber(raw) ? 0 : getUnit(raw)); // n - n % 1 replaces Math.floor() in order to handle negative values properly. For example, Math.floor(-150.00000000000003) is 151!\n  };\n},\n    snap = function snap(snapTo, value) {\n  var isArray = _isArray(snapTo),\n      radius,\n      is2D;\n\n  if (!isArray && _isObject(snapTo)) {\n    radius = isArray = snapTo.radius || _bigNum;\n\n    if (snapTo.values) {\n      snapTo = toArray(snapTo.values);\n\n      if (is2D = !_isNumber(snapTo[0])) {\n        radius *= radius; //performance optimization so we don't have to Math.sqrt() in the loop.\n      }\n    } else {\n      snapTo = _roundModifier(snapTo.increment);\n    }\n  }\n\n  return _conditionalReturn(value, !isArray ? _roundModifier(snapTo) : _isFunction(snapTo) ? function (raw) {\n    is2D = snapTo(raw);\n    return Math.abs(is2D - raw) <= radius ? is2D : raw;\n  } : function (raw) {\n    var x = parseFloat(is2D ? raw.x : raw),\n        y = parseFloat(is2D ? raw.y : 0),\n        min = _bigNum,\n        closest = 0,\n        i = snapTo.length,\n        dx,\n        dy;\n\n    while (i--) {\n      if (is2D) {\n        dx = snapTo[i].x - x;\n        dy = snapTo[i].y - y;\n        dx = dx * dx + dy * dy;\n      } else {\n        dx = Math.abs(snapTo[i] - x);\n      }\n\n      if (dx < min) {\n        min = dx;\n        closest = i;\n      }\n    }\n\n    closest = !radius || min <= radius ? snapTo[closest] : raw;\n    return is2D || closest === raw || _isNumber(raw) ? closest : closest + getUnit(raw);\n  });\n},\n    random = function random(min, max, roundingIncrement, returnFunction) {\n  return _conditionalReturn(_isArray(min) ? !max : roundingIncrement === true ? !!(roundingIncrement = 0) : !returnFunction, function () {\n    return _isArray(min) ? min[~~(Math.random() * min.length)] : (roundingIncrement = roundingIncrement || 1e-5) && (returnFunction = roundingIncrement < 1 ? Math.pow(10, (roundingIncrement + \"\").length - 2) : 1) && Math.floor(Math.round((min - roundingIncrement / 2 + Math.random() * (max - min + roundingIncrement * .99)) / roundingIncrement) * roundingIncrement * returnFunction) / returnFunction;\n  });\n},\n    pipe = function pipe() {\n  for (var _len = arguments.length, functions = new Array(_len), _key = 0; _key < _len; _key++) {\n    functions[_key] = arguments[_key];\n  }\n\n  return function (value) {\n    return functions.reduce(function (v, f) {\n      return f(v);\n    }, value);\n  };\n},\n    unitize = function unitize(func, unit) {\n  return function (value) {\n    return func(parseFloat(value)) + (unit || getUnit(value));\n  };\n},\n    normalize = function normalize(min, max, value) {\n  return mapRange(min, max, 0, 1, value);\n},\n    _wrapArray = function _wrapArray(a, wrapper, value) {\n  return _conditionalReturn(value, function (index) {\n    return a[~~wrapper(index)];\n  });\n},\n    wrap = function wrap(min, max, value) {\n  // NOTE: wrap() CANNOT be an arrow function! A very odd compiling bug causes problems (unrelated to GSAP).\n  var range = max - min;\n  return _isArray(min) ? _wrapArray(min, wrap(0, min.length), max) : _conditionalReturn(value, function (value) {\n    return (range + (value - min) % range) % range + min;\n  });\n},\n    wrapYoyo = function wrapYoyo(min, max, value) {\n  var range = max - min,\n      total = range * 2;\n  return _isArray(min) ? _wrapArray(min, wrapYoyo(0, min.length - 1), max) : _conditionalReturn(value, function (value) {\n    value = (total + (value - min) % total) % total || 0;\n    return min + (value > range ? total - value : value);\n  });\n},\n    _replaceRandom = function _replaceRandom(value) {\n  //replaces all occurrences of random(...) in a string with the calculated random value. can be a range like random(-100, 100, 5) or an array like random([0, 100, 500])\n  var prev = 0,\n      s = \"\",\n      i,\n      nums,\n      end,\n      isArray;\n\n  while (~(i = value.indexOf(\"random(\", prev))) {\n    end = value.indexOf(\")\", i);\n    isArray = value.charAt(i + 7) === \"[\";\n    nums = value.substr(i + 7, end - i - 7).match(isArray ? _delimitedValueExp : _strictNumExp);\n    s += value.substr(prev, i - prev) + random(isArray ? nums : +nums[0], isArray ? 0 : +nums[1], +nums[2] || 1e-5);\n    prev = end + 1;\n  }\n\n  return s + value.substr(prev, value.length - prev);\n},\n    mapRange = function mapRange(inMin, inMax, outMin, outMax, value) {\n  var inRange = inMax - inMin,\n      outRange = outMax - outMin;\n  return _conditionalReturn(value, function (value) {\n    return outMin + ((value - inMin) / inRange * outRange || 0);\n  });\n},\n    interpolate = function interpolate(start, end, progress, mutate) {\n  var func = isNaN(start + end) ? 0 : function (p) {\n    return (1 - p) * start + p * end;\n  };\n\n  if (!func) {\n    var isString = _isString(start),\n        master = {},\n        p,\n        i,\n        interpolators,\n        l,\n        il;\n\n    progress === true && (mutate = 1) && (progress = null);\n\n    if (isString) {\n      start = {\n        p: start\n      };\n      end = {\n        p: end\n      };\n    } else if (_isArray(start) && !_isArray(end)) {\n      interpolators = [];\n      l = start.length;\n      il = l - 2;\n\n      for (i = 1; i < l; i++) {\n        interpolators.push(interpolate(start[i - 1], start[i])); //build the interpolators up front as a performance optimization so that when the function is called many times, it can just reuse them.\n      }\n\n      l--;\n\n      func = function func(p) {\n        p *= l;\n        var i = Math.min(il, ~~p);\n        return interpolators[i](p - i);\n      };\n\n      progress = end;\n    } else if (!mutate) {\n      start = _merge(_isArray(start) ? [] : {}, start);\n    }\n\n    if (!interpolators) {\n      for (p in end) {\n        _addPropTween.call(master, start, p, \"get\", end[p]);\n      }\n\n      func = function func(p) {\n        return _renderPropTweens(p, master) || (isString ? start.p : start);\n      };\n    }\n  }\n\n  return _conditionalReturn(progress, func);\n},\n    _getLabelInDirection = function _getLabelInDirection(timeline, fromTime, backward) {\n  //used for nextLabel() and previousLabel()\n  var labels = timeline.labels,\n      min = _bigNum,\n      p,\n      distance,\n      label;\n\n  for (p in labels) {\n    distance = labels[p] - fromTime;\n\n    if (distance < 0 === !!backward && distance && min > (distance = Math.abs(distance))) {\n      label = p;\n      min = distance;\n    }\n  }\n\n  return label;\n},\n    _callback = function _callback(animation, type, executeLazyFirst) {\n  var v = animation.vars,\n      callback = v[type],\n      prevContext = _context,\n      context = animation._ctx,\n      params,\n      scope,\n      result;\n\n  if (!callback) {\n    return;\n  }\n\n  params = v[type + \"Params\"];\n  scope = v.callbackScope || animation;\n  executeLazyFirst && _lazyTweens.length && _lazyRender(); //in case rendering caused any tweens to lazy-init, we should render them because typically when a timeline finishes, users expect things to have rendered fully. Imagine an onUpdate on a timeline that reports/checks tweened values.\n\n  context && (_context = context);\n  result = params ? callback.apply(scope, params) : callback.call(scope);\n  _context = prevContext;\n  return result;\n},\n    _interrupt = function _interrupt(animation) {\n  _removeFromParent(animation);\n\n  animation.scrollTrigger && animation.scrollTrigger.kill(!!_reverting);\n  animation.progress() < 1 && _callback(animation, \"onInterrupt\");\n  return animation;\n},\n    _quickTween,\n    _registerPluginQueue = [],\n    _createPlugin = function _createPlugin(config) {\n  if (!config) return;\n  config = !config.name && config[\"default\"] || config; // UMD packaging wraps things oddly, so for example MotionPathHelper becomes {MotionPathHelper:MotionPathHelper, default:MotionPathHelper}.\n\n  if (_windowExists() || config.headless) {\n    // edge case: some build tools may pass in a null/undefined value\n    var name = config.name,\n        isFunc = _isFunction(config),\n        Plugin = name && !isFunc && config.init ? function () {\n      this._props = [];\n    } : config,\n        //in case someone passes in an object that's not a plugin, like CustomEase\n    instanceDefaults = {\n      init: _emptyFunc,\n      render: _renderPropTweens,\n      add: _addPropTween,\n      kill: _killPropTweensOf,\n      modifier: _addPluginModifier,\n      rawVars: 0\n    },\n        statics = {\n      targetTest: 0,\n      get: 0,\n      getSetter: _getSetter,\n      aliases: {},\n      register: 0\n    };\n\n    _wake();\n\n    if (config !== Plugin) {\n      if (_plugins[name]) {\n        return;\n      }\n\n      _setDefaults(Plugin, _setDefaults(_copyExcluding(config, instanceDefaults), statics)); //static methods\n\n\n      _merge(Plugin.prototype, _merge(instanceDefaults, _copyExcluding(config, statics))); //instance methods\n\n\n      _plugins[Plugin.prop = name] = Plugin;\n\n      if (config.targetTest) {\n        _harnessPlugins.push(Plugin);\n\n        _reservedProps[name] = 1;\n      }\n\n      name = (name === \"css\" ? \"CSS\" : name.charAt(0).toUpperCase() + name.substr(1)) + \"Plugin\"; //for the global name. \"motionPath\" should become MotionPathPlugin\n    }\n\n    _addGlobal(name, Plugin);\n\n    config.register && config.register(gsap, Plugin, PropTween);\n  } else {\n    _registerPluginQueue.push(config);\n  }\n},\n\n/*\n * --------------------------------------------------------------------------------------\n * COLORS\n * --------------------------------------------------------------------------------------\n */\n_255 = 255,\n    _colorLookup = {\n  aqua: [0, _255, _255],\n  lime: [0, _255, 0],\n  silver: [192, 192, 192],\n  black: [0, 0, 0],\n  maroon: [128, 0, 0],\n  teal: [0, 128, 128],\n  blue: [0, 0, _255],\n  navy: [0, 0, 128],\n  white: [_255, _255, _255],\n  olive: [128, 128, 0],\n  yellow: [_255, _255, 0],\n  orange: [_255, 165, 0],\n  gray: [128, 128, 128],\n  purple: [128, 0, 128],\n  green: [0, 128, 0],\n  red: [_255, 0, 0],\n  pink: [_255, 192, 203],\n  cyan: [0, _255, _255],\n  transparent: [_255, _255, _255, 0]\n},\n    // possible future idea to replace the hard-coded color name values - put this in the ticker.wake() where we set the _doc:\n// let ctx = _doc.createElement(\"canvas\").getContext(\"2d\");\n// _forEachName(\"aqua,lime,silver,black,maroon,teal,blue,navy,white,olive,yellow,orange,gray,purple,green,red,pink,cyan\", color => {ctx.fillStyle = color; _colorLookup[color] = splitColor(ctx.fillStyle)});\n_hue = function _hue(h, m1, m2) {\n  h += h < 0 ? 1 : h > 1 ? -1 : 0;\n  return (h * 6 < 1 ? m1 + (m2 - m1) * h * 6 : h < .5 ? m2 : h * 3 < 2 ? m1 + (m2 - m1) * (2 / 3 - h) * 6 : m1) * _255 + .5 | 0;\n},\n    splitColor = function splitColor(v, toHSL, forceAlpha) {\n  var a = !v ? _colorLookup.black : _isNumber(v) ? [v >> 16, v >> 8 & _255, v & _255] : 0,\n      r,\n      g,\n      b,\n      h,\n      s,\n      l,\n      max,\n      min,\n      d,\n      wasHSL;\n\n  if (!a) {\n    if (v.substr(-1) === \",\") {\n      //sometimes a trailing comma is included and we should chop it off (typically from a comma-delimited list of values like a textShadow:\"2px 2px 2px blue, 5px 5px 5px rgb(255,0,0)\" - in this example \"blue,\" has a trailing comma. We could strip it out inside parseComplex() but we'd need to do it to the beginning and ending values plus it wouldn't provide protection from other potential scenarios like if the user passes in a similar value.\n      v = v.substr(0, v.length - 1);\n    }\n\n    if (_colorLookup[v]) {\n      a = _colorLookup[v];\n    } else if (v.charAt(0) === \"#\") {\n      if (v.length < 6) {\n        //for shorthand like #9F0 or #9F0F (could have alpha)\n        r = v.charAt(1);\n        g = v.charAt(2);\n        b = v.charAt(3);\n        v = \"#\" + r + r + g + g + b + b + (v.length === 5 ? v.charAt(4) + v.charAt(4) : \"\");\n      }\n\n      if (v.length === 9) {\n        // hex with alpha, like #fd5e53ff\n        a = parseInt(v.substr(1, 6), 16);\n        return [a >> 16, a >> 8 & _255, a & _255, parseInt(v.substr(7), 16) / 255];\n      }\n\n      v = parseInt(v.substr(1), 16);\n      a = [v >> 16, v >> 8 & _255, v & _255];\n    } else if (v.substr(0, 3) === \"hsl\") {\n      a = wasHSL = v.match(_strictNumExp);\n\n      if (!toHSL) {\n        h = +a[0] % 360 / 360;\n        s = +a[1] / 100;\n        l = +a[2] / 100;\n        g = l <= .5 ? l * (s + 1) : l + s - l * s;\n        r = l * 2 - g;\n        a.length > 3 && (a[3] *= 1); //cast as number\n\n        a[0] = _hue(h + 1 / 3, r, g);\n        a[1] = _hue(h, r, g);\n        a[2] = _hue(h - 1 / 3, r, g);\n      } else if (~v.indexOf(\"=\")) {\n        //if relative values are found, just return the raw strings with the relative prefixes in place.\n        a = v.match(_numExp);\n        forceAlpha && a.length < 4 && (a[3] = 1);\n        return a;\n      }\n    } else {\n      a = v.match(_strictNumExp) || _colorLookup.transparent;\n    }\n\n    a = a.map(Number);\n  }\n\n  if (toHSL && !wasHSL) {\n    r = a[0] / _255;\n    g = a[1] / _255;\n    b = a[2] / _255;\n    max = Math.max(r, g, b);\n    min = Math.min(r, g, b);\n    l = (max + min) / 2;\n\n    if (max === min) {\n      h = s = 0;\n    } else {\n      d = max - min;\n      s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n      h = max === r ? (g - b) / d + (g < b ? 6 : 0) : max === g ? (b - r) / d + 2 : (r - g) / d + 4;\n      h *= 60;\n    }\n\n    a[0] = ~~(h + .5);\n    a[1] = ~~(s * 100 + .5);\n    a[2] = ~~(l * 100 + .5);\n  }\n\n  forceAlpha && a.length < 4 && (a[3] = 1);\n  return a;\n},\n    _colorOrderData = function _colorOrderData(v) {\n  // strips out the colors from the string, finds all the numeric slots (with units) and returns an array of those. The Array also has a \"c\" property which is an Array of the index values where the colors belong. This is to help work around issues where there's a mis-matched order of color/numeric data like drop-shadow(#f00 0px 1px 2px) and drop-shadow(0x 1px 2px #f00). This is basically a helper function used in _formatColors()\n  var values = [],\n      c = [],\n      i = -1;\n  v.split(_colorExp).forEach(function (v) {\n    var a = v.match(_numWithUnitExp) || [];\n    values.push.apply(values, a);\n    c.push(i += a.length + 1);\n  });\n  values.c = c;\n  return values;\n},\n    _formatColors = function _formatColors(s, toHSL, orderMatchData) {\n  var result = \"\",\n      colors = (s + result).match(_colorExp),\n      type = toHSL ? \"hsla(\" : \"rgba(\",\n      i = 0,\n      c,\n      shell,\n      d,\n      l;\n\n  if (!colors) {\n    return s;\n  }\n\n  colors = colors.map(function (color) {\n    return (color = splitColor(color, toHSL, 1)) && type + (toHSL ? color[0] + \",\" + color[1] + \"%,\" + color[2] + \"%,\" + color[3] : color.join(\",\")) + \")\";\n  });\n\n  if (orderMatchData) {\n    d = _colorOrderData(s);\n    c = orderMatchData.c;\n\n    if (c.join(result) !== d.c.join(result)) {\n      shell = s.replace(_colorExp, \"1\").split(_numWithUnitExp);\n      l = shell.length - 1;\n\n      for (; i < l; i++) {\n        result += shell[i] + (~c.indexOf(i) ? colors.shift() || type + \"0,0,0,0)\" : (d.length ? d : colors.length ? colors : orderMatchData).shift());\n      }\n    }\n  }\n\n  if (!shell) {\n    shell = s.split(_colorExp);\n    l = shell.length - 1;\n\n    for (; i < l; i++) {\n      result += shell[i] + colors[i];\n    }\n  }\n\n  return result + shell[l];\n},\n    _colorExp = function () {\n  var s = \"(?:\\\\b(?:(?:rgb|rgba|hsl|hsla)\\\\(.+?\\\\))|\\\\B#(?:[0-9a-f]{3,4}){1,2}\\\\b\",\n      //we'll dynamically build this Regular Expression to conserve file size. After building it, it will be able to find rgb(), rgba(), # (hexadecimal), and named color values like red, blue, purple, etc.,\n  p;\n\n  for (p in _colorLookup) {\n    s += \"|\" + p + \"\\\\b\";\n  }\n\n  return new RegExp(s + \")\", \"gi\");\n}(),\n    _hslExp = /hsl[a]?\\(/,\n    _colorStringFilter = function _colorStringFilter(a) {\n  var combined = a.join(\" \"),\n      toHSL;\n  _colorExp.lastIndex = 0;\n\n  if (_colorExp.test(combined)) {\n    toHSL = _hslExp.test(combined);\n    a[1] = _formatColors(a[1], toHSL);\n    a[0] = _formatColors(a[0], toHSL, _colorOrderData(a[1])); // make sure the order of numbers/colors match with the END value.\n\n    return true;\n  }\n},\n\n/*\n * --------------------------------------------------------------------------------------\n * TICKER\n * --------------------------------------------------------------------------------------\n */\n_tickerActive,\n    _ticker = function () {\n  var _getTime = Date.now,\n      _lagThreshold = 500,\n      _adjustedLag = 33,\n      _startTime = _getTime(),\n      _lastUpdate = _startTime,\n      _gap = 1000 / 240,\n      _nextTime = _gap,\n      _listeners = [],\n      _id,\n      _req,\n      _raf,\n      _self,\n      _delta,\n      _i,\n      _tick = function _tick(v) {\n    var elapsed = _getTime() - _lastUpdate,\n        manual = v === true,\n        overlap,\n        dispatch,\n        time,\n        frame;\n\n    (elapsed > _lagThreshold || elapsed < 0) && (_startTime += elapsed - _adjustedLag);\n    _lastUpdate += elapsed;\n    time = _lastUpdate - _startTime;\n    overlap = time - _nextTime;\n\n    if (overlap > 0 || manual) {\n      frame = ++_self.frame;\n      _delta = time - _self.time * 1000;\n      _self.time = time = time / 1000;\n      _nextTime += overlap + (overlap >= _gap ? 4 : _gap - overlap);\n      dispatch = 1;\n    }\n\n    manual || (_id = _req(_tick)); //make sure the request is made before we dispatch the \"tick\" event so that timing is maintained. Otherwise, if processing the \"tick\" requires a bunch of time (like 15ms) and we're using a setTimeout() that's based on 16.7ms, it'd technically take 31.7ms between frames otherwise.\n\n    if (dispatch) {\n      for (_i = 0; _i < _listeners.length; _i++) {\n        // use _i and check _listeners.length instead of a variable because a listener could get removed during the loop, and if that happens to an element less than the current index, it'd throw things off in the loop.\n        _listeners[_i](time, _delta, frame, v);\n      }\n    }\n  };\n\n  _self = {\n    time: 0,\n    frame: 0,\n    tick: function tick() {\n      _tick(true);\n    },\n    deltaRatio: function deltaRatio(fps) {\n      return _delta / (1000 / (fps || 60));\n    },\n    wake: function wake() {\n      if (_coreReady) {\n        if (!_coreInitted && _windowExists()) {\n          _win = _coreInitted = window;\n          _doc = _win.document || {};\n          _globals.gsap = gsap;\n          (_win.gsapVersions || (_win.gsapVersions = [])).push(gsap.version);\n\n          _install(_installScope || _win.GreenSockGlobals || !_win.gsap && _win || {});\n\n          _registerPluginQueue.forEach(_createPlugin);\n        }\n\n        _raf = typeof requestAnimationFrame !== \"undefined\" && requestAnimationFrame;\n        _id && _self.sleep();\n\n        _req = _raf || function (f) {\n          return setTimeout(f, _nextTime - _self.time * 1000 + 1 | 0);\n        };\n\n        _tickerActive = 1;\n\n        _tick(2);\n      }\n    },\n    sleep: function sleep() {\n      (_raf ? cancelAnimationFrame : clearTimeout)(_id);\n      _tickerActive = 0;\n      _req = _emptyFunc;\n    },\n    lagSmoothing: function lagSmoothing(threshold, adjustedLag) {\n      _lagThreshold = threshold || Infinity; // zero should be interpreted as basically unlimited\n\n      _adjustedLag = Math.min(adjustedLag || 33, _lagThreshold);\n    },\n    fps: function fps(_fps) {\n      _gap = 1000 / (_fps || 240);\n      _nextTime = _self.time * 1000 + _gap;\n    },\n    add: function add(callback, once, prioritize) {\n      var func = once ? function (t, d, f, v) {\n        callback(t, d, f, v);\n\n        _self.remove(func);\n      } : callback;\n\n      _self.remove(callback);\n\n      _listeners[prioritize ? \"unshift\" : \"push\"](func);\n\n      _wake();\n\n      return func;\n    },\n    remove: function remove(callback, i) {\n      ~(i = _listeners.indexOf(callback)) && _listeners.splice(i, 1) && _i >= i && _i--;\n    },\n    _listeners: _listeners\n  };\n  return _self;\n}(),\n    _wake = function _wake() {\n  return !_tickerActive && _ticker.wake();\n},\n    //also ensures the core classes are initialized.\n\n/*\n* -------------------------------------------------\n* EASING\n* -------------------------------------------------\n*/\n_easeMap = {},\n    _customEaseExp = /^[\\d.\\-M][\\d.\\-,\\s]/,\n    _quotesExp = /[\"']/g,\n    _parseObjectInString = function _parseObjectInString(value) {\n  //takes a string like \"{wiggles:10, type:anticipate})\" and turns it into a real object. Notice it ends in \")\" and includes the {} wrappers. This is because we only use this function for parsing ease configs and prioritized optimization rather than reusability.\n  var obj = {},\n      split = value.substr(1, value.length - 3).split(\":\"),\n      key = split[0],\n      i = 1,\n      l = split.length,\n      index,\n      val,\n      parsedVal;\n\n  for (; i < l; i++) {\n    val = split[i];\n    index = i !== l - 1 ? val.lastIndexOf(\",\") : val.length;\n    parsedVal = val.substr(0, index);\n    obj[key] = isNaN(parsedVal) ? parsedVal.replace(_quotesExp, \"\").trim() : +parsedVal;\n    key = val.substr(index + 1).trim();\n  }\n\n  return obj;\n},\n    _valueInParentheses = function _valueInParentheses(value) {\n  var open = value.indexOf(\"(\") + 1,\n      close = value.indexOf(\")\"),\n      nested = value.indexOf(\"(\", open);\n  return value.substring(open, ~nested && nested < close ? value.indexOf(\")\", close + 1) : close);\n},\n    _configEaseFromString = function _configEaseFromString(name) {\n  //name can be a string like \"elastic.out(1,0.5)\", and pass in _easeMap as obj and it'll parse it out and call the actual function like _easeMap.Elastic.easeOut.config(1,0.5). It will also parse custom ease strings as long as CustomEase is loaded and registered (internally as _easeMap._CE).\n  var split = (name + \"\").split(\"(\"),\n      ease = _easeMap[split[0]];\n  return ease && split.length > 1 && ease.config ? ease.config.apply(null, ~name.indexOf(\"{\") ? [_parseObjectInString(split[1])] : _valueInParentheses(name).split(\",\").map(_numericIfPossible)) : _easeMap._CE && _customEaseExp.test(name) ? _easeMap._CE(\"\", name) : ease;\n},\n    _invertEase = function _invertEase(ease) {\n  return function (p) {\n    return 1 - ease(1 - p);\n  };\n},\n    // allow yoyoEase to be set in children and have those affected when the parent/ancestor timeline yoyos.\n_propagateYoyoEase = function _propagateYoyoEase(timeline, isYoyo) {\n  var child = timeline._first,\n      ease;\n\n  while (child) {\n    if (child instanceof Timeline) {\n      _propagateYoyoEase(child, isYoyo);\n    } else if (child.vars.yoyoEase && (!child._yoyo || !child._repeat) && child._yoyo !== isYoyo) {\n      if (child.timeline) {\n        _propagateYoyoEase(child.timeline, isYoyo);\n      } else {\n        ease = child._ease;\n        child._ease = child._yEase;\n        child._yEase = ease;\n        child._yoyo = isYoyo;\n      }\n    }\n\n    child = child._next;\n  }\n},\n    _parseEase = function _parseEase(ease, defaultEase) {\n  return !ease ? defaultEase : (_isFunction(ease) ? ease : _easeMap[ease] || _configEaseFromString(ease)) || defaultEase;\n},\n    _insertEase = function _insertEase(names, easeIn, easeOut, easeInOut) {\n  if (easeOut === void 0) {\n    easeOut = function easeOut(p) {\n      return 1 - easeIn(1 - p);\n    };\n  }\n\n  if (easeInOut === void 0) {\n    easeInOut = function easeInOut(p) {\n      return p < .5 ? easeIn(p * 2) / 2 : 1 - easeIn((1 - p) * 2) / 2;\n    };\n  }\n\n  var ease = {\n    easeIn: easeIn,\n    easeOut: easeOut,\n    easeInOut: easeInOut\n  },\n      lowercaseName;\n\n  _forEachName(names, function (name) {\n    _easeMap[name] = _globals[name] = ease;\n    _easeMap[lowercaseName = name.toLowerCase()] = easeOut;\n\n    for (var p in ease) {\n      _easeMap[lowercaseName + (p === \"easeIn\" ? \".in\" : p === \"easeOut\" ? \".out\" : \".inOut\")] = _easeMap[name + \".\" + p] = ease[p];\n    }\n  });\n\n  return ease;\n},\n    _easeInOutFromOut = function _easeInOutFromOut(easeOut) {\n  return function (p) {\n    return p < .5 ? (1 - easeOut(1 - p * 2)) / 2 : .5 + easeOut((p - .5) * 2) / 2;\n  };\n},\n    _configElastic = function _configElastic(type, amplitude, period) {\n  var p1 = amplitude >= 1 ? amplitude : 1,\n      //note: if amplitude is < 1, we simply adjust the period for a more natural feel. Otherwise the math doesn't work right and the curve starts at 1.\n  p2 = (period || (type ? .3 : .45)) / (amplitude < 1 ? amplitude : 1),\n      p3 = p2 / _2PI * (Math.asin(1 / p1) || 0),\n      easeOut = function easeOut(p) {\n    return p === 1 ? 1 : p1 * Math.pow(2, -10 * p) * _sin((p - p3) * p2) + 1;\n  },\n      ease = type === \"out\" ? easeOut : type === \"in\" ? function (p) {\n    return 1 - easeOut(1 - p);\n  } : _easeInOutFromOut(easeOut);\n\n  p2 = _2PI / p2; //precalculate to optimize\n\n  ease.config = function (amplitude, period) {\n    return _configElastic(type, amplitude, period);\n  };\n\n  return ease;\n},\n    _configBack = function _configBack(type, overshoot) {\n  if (overshoot === void 0) {\n    overshoot = 1.70158;\n  }\n\n  var easeOut = function easeOut(p) {\n    return p ? --p * p * ((overshoot + 1) * p + overshoot) + 1 : 0;\n  },\n      ease = type === \"out\" ? easeOut : type === \"in\" ? function (p) {\n    return 1 - easeOut(1 - p);\n  } : _easeInOutFromOut(easeOut);\n\n  ease.config = function (overshoot) {\n    return _configBack(type, overshoot);\n  };\n\n  return ease;\n}; // a cheaper (kb and cpu) but more mild way to get a parameterized weighted ease by feeding in a value between -1 (easeIn) and 1 (easeOut) where 0 is linear.\n// _weightedEase = ratio => {\n// \tlet y = 0.5 + ratio / 2;\n// \treturn p => (2 * (1 - p) * p * y + p * p);\n// },\n// a stronger (but more expensive kb/cpu) parameterized weighted ease that lets you feed in a value between -1 (easeIn) and 1 (easeOut) where 0 is linear.\n// _weightedEaseStrong = ratio => {\n// \tratio = .5 + ratio / 2;\n// \tlet o = 1 / 3 * (ratio < .5 ? ratio : 1 - ratio),\n// \t\tb = ratio - o,\n// \t\tc = ratio + o;\n// \treturn p => p === 1 ? p : 3 * b * (1 - p) * (1 - p) * p + 3 * c * (1 - p) * p * p + p * p * p;\n// };\n\n\n_forEachName(\"Linear,Quad,Cubic,Quart,Quint,Strong\", function (name, i) {\n  var power = i < 5 ? i + 1 : i;\n\n  _insertEase(name + \",Power\" + (power - 1), i ? function (p) {\n    return Math.pow(p, power);\n  } : function (p) {\n    return p;\n  }, function (p) {\n    return 1 - Math.pow(1 - p, power);\n  }, function (p) {\n    return p < .5 ? Math.pow(p * 2, power) / 2 : 1 - Math.pow((1 - p) * 2, power) / 2;\n  });\n});\n\n_easeMap.Linear.easeNone = _easeMap.none = _easeMap.Linear.easeIn;\n\n_insertEase(\"Elastic\", _configElastic(\"in\"), _configElastic(\"out\"), _configElastic());\n\n(function (n, c) {\n  var n1 = 1 / c,\n      n2 = 2 * n1,\n      n3 = 2.5 * n1,\n      easeOut = function easeOut(p) {\n    return p < n1 ? n * p * p : p < n2 ? n * Math.pow(p - 1.5 / c, 2) + .75 : p < n3 ? n * (p -= 2.25 / c) * p + .9375 : n * Math.pow(p - 2.625 / c, 2) + .984375;\n  };\n\n  _insertEase(\"Bounce\", function (p) {\n    return 1 - easeOut(1 - p);\n  }, easeOut);\n})(7.5625, 2.75);\n\n_insertEase(\"Expo\", function (p) {\n  return p ? Math.pow(2, 10 * (p - 1)) : 0;\n});\n\n_insertEase(\"Circ\", function (p) {\n  return -(_sqrt(1 - p * p) - 1);\n});\n\n_insertEase(\"Sine\", function (p) {\n  return p === 1 ? 1 : -_cos(p * _HALF_PI) + 1;\n});\n\n_insertEase(\"Back\", _configBack(\"in\"), _configBack(\"out\"), _configBack());\n\n_easeMap.SteppedEase = _easeMap.steps = _globals.SteppedEase = {\n  config: function config(steps, immediateStart) {\n    if (steps === void 0) {\n      steps = 1;\n    }\n\n    var p1 = 1 / steps,\n        p2 = steps + (immediateStart ? 0 : 1),\n        p3 = immediateStart ? 1 : 0,\n        max = 1 - _tinyNum;\n    return function (p) {\n      return ((p2 * _clamp(0, max, p) | 0) + p3) * p1;\n    };\n  }\n};\n_defaults.ease = _easeMap[\"quad.out\"];\n\n_forEachName(\"onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt\", function (name) {\n  return _callbackNames += name + \",\" + name + \"Params,\";\n});\n/*\n * --------------------------------------------------------------------------------------\n * CACHE\n * --------------------------------------------------------------------------------------\n */\n\n\nexport var GSCache = function GSCache(target, harness) {\n  this.id = _gsID++;\n  target._gsap = this;\n  this.target = target;\n  this.harness = harness;\n  this.get = harness ? harness.get : _getProperty;\n  this.set = harness ? harness.getSetter : _getSetter;\n};\n/*\n * --------------------------------------------------------------------------------------\n * ANIMATION\n * --------------------------------------------------------------------------------------\n */\n\nexport var Animation = /*#__PURE__*/function () {\n  function Animation(vars) {\n    this.vars = vars;\n    this._delay = +vars.delay || 0;\n\n    if (this._repeat = vars.repeat === Infinity ? -2 : vars.repeat || 0) {\n      // TODO: repeat: Infinity on a timeline's children must flag that timeline internally and affect its totalDuration, otherwise it'll stop in the negative direction when reaching the start.\n      this._rDelay = vars.repeatDelay || 0;\n      this._yoyo = !!vars.yoyo || !!vars.yoyoEase;\n    }\n\n    this._ts = 1;\n\n    _setDuration(this, +vars.duration, 1, 1);\n\n    this.data = vars.data;\n\n    if (_context) {\n      this._ctx = _context;\n\n      _context.data.push(this);\n    }\n\n    _tickerActive || _ticker.wake();\n  }\n\n  var _proto = Animation.prototype;\n\n  _proto.delay = function delay(value) {\n    if (value || value === 0) {\n      this.parent && this.parent.smoothChildTiming && this.startTime(this._start + value - this._delay);\n      this._delay = value;\n      return this;\n    }\n\n    return this._delay;\n  };\n\n  _proto.duration = function duration(value) {\n    return arguments.length ? this.totalDuration(this._repeat > 0 ? value + (value + this._rDelay) * this._repeat : value) : this.totalDuration() && this._dur;\n  };\n\n  _proto.totalDuration = function totalDuration(value) {\n    if (!arguments.length) {\n      return this._tDur;\n    }\n\n    this._dirty = 0;\n    return _setDuration(this, this._repeat < 0 ? value : (value - this._repeat * this._rDelay) / (this._repeat + 1));\n  };\n\n  _proto.totalTime = function totalTime(_totalTime, suppressEvents) {\n    _wake();\n\n    if (!arguments.length) {\n      return this._tTime;\n    }\n\n    var parent = this._dp;\n\n    if (parent && parent.smoothChildTiming && this._ts) {\n      _alignPlayhead(this, _totalTime);\n\n      !parent._dp || parent.parent || _postAddChecks(parent, this); // edge case: if this is a child of a timeline that already completed, for example, we must re-activate the parent.\n      //in case any of the ancestor timelines had completed but should now be enabled, we should reset their totalTime() which will also ensure that they're lined up properly and enabled. Skip for animations that are on the root (wasteful). Example: a TimelineLite.exportRoot() is performed when there's a paused tween on the root, the export will not complete until that tween is unpaused, but imagine a child gets restarted later, after all [unpaused] tweens have completed. The start of that child would get pushed out, but one of the ancestors may have completed.\n\n      while (parent && parent.parent) {\n        if (parent.parent._time !== parent._start + (parent._ts >= 0 ? parent._tTime / parent._ts : (parent.totalDuration() - parent._tTime) / -parent._ts)) {\n          parent.totalTime(parent._tTime, true);\n        }\n\n        parent = parent.parent;\n      }\n\n      if (!this.parent && this._dp.autoRemoveChildren && (this._ts > 0 && _totalTime < this._tDur || this._ts < 0 && _totalTime > 0 || !this._tDur && !_totalTime)) {\n        //if the animation doesn't have a parent, put it back into its last parent (recorded as _dp for exactly cases like this). Limit to parents with autoRemoveChildren (like globalTimeline) so that if the user manually removes an animation from a timeline and then alters its playhead, it doesn't get added back in.\n        _addToTimeline(this._dp, this, this._start - this._delay);\n      }\n    }\n\n    if (this._tTime !== _totalTime || !this._dur && !suppressEvents || this._initted && Math.abs(this._zTime) === _tinyNum || !_totalTime && !this._initted && (this.add || this._ptLookup)) {\n      // check for _ptLookup on a Tween instance to ensure it has actually finished being instantiated, otherwise if this.reverse() gets called in the Animation constructor, it could trigger a render() here even though the _targets weren't populated, thus when _init() is called there won't be any PropTweens (it'll act like the tween is non-functional)\n      this._ts || (this._pTime = _totalTime); // otherwise, if an animation is paused, then the playhead is moved back to zero, then resumed, it'd revert back to the original time at the pause\n      //if (!this._lock) { // avoid endless recursion (not sure we need this yet or if it's worth the performance hit)\n      //   this._lock = 1;\n\n      _lazySafeRender(this, _totalTime, suppressEvents); //   this._lock = 0;\n      //}\n\n    }\n\n    return this;\n  };\n\n  _proto.time = function time(value, suppressEvents) {\n    return arguments.length ? this.totalTime(Math.min(this.totalDuration(), value + _elapsedCycleDuration(this)) % (this._dur + this._rDelay) || (value ? this._dur : 0), suppressEvents) : this._time; // note: if the modulus results in 0, the playhead could be exactly at the end or the beginning, and we always defer to the END with a non-zero value, otherwise if you set the time() to the very end (duration()), it would render at the START!\n  };\n\n  _proto.totalProgress = function totalProgress(value, suppressEvents) {\n    return arguments.length ? this.totalTime(this.totalDuration() * value, suppressEvents) : this.totalDuration() ? Math.min(1, this._tTime / this._tDur) : this.rawTime() > 0 ? 1 : 0;\n  };\n\n  _proto.progress = function progress(value, suppressEvents) {\n    return arguments.length ? this.totalTime(this.duration() * (this._yoyo && !(this.iteration() & 1) ? 1 - value : value) + _elapsedCycleDuration(this), suppressEvents) : this.duration() ? Math.min(1, this._time / this._dur) : this.rawTime() > 0 ? 1 : 0;\n  };\n\n  _proto.iteration = function iteration(value, suppressEvents) {\n    var cycleDuration = this.duration() + this._rDelay;\n\n    return arguments.length ? this.totalTime(this._time + (value - 1) * cycleDuration, suppressEvents) : this._repeat ? _animationCycle(this._tTime, cycleDuration) + 1 : 1;\n  } // potential future addition:\n  // isPlayingBackwards() {\n  // \tlet animation = this,\n  // \t\torientation = 1; // 1 = forward, -1 = backward\n  // \twhile (animation) {\n  // \t\torientation *= animation.reversed() || (animation.repeat() && !(animation.iteration() & 1)) ? -1 : 1;\n  // \t\tanimation = animation.parent;\n  // \t}\n  // \treturn orientation < 0;\n  // }\n  ;\n\n  _proto.timeScale = function timeScale(value, suppressEvents) {\n    if (!arguments.length) {\n      return this._rts === -_tinyNum ? 0 : this._rts; // recorded timeScale. Special case: if someone calls reverse() on an animation with timeScale of 0, we assign it -_tinyNum to remember it's reversed.\n    }\n\n    if (this._rts === value) {\n      return this;\n    }\n\n    var tTime = this.parent && this._ts ? _parentToChildTotalTime(this.parent._time, this) : this._tTime; // make sure to do the parentToChildTotalTime() BEFORE setting the new _ts because the old one must be used in that calculation.\n    // future addition? Up side: fast and minimal file size. Down side: only works on this animation; if a timeline is reversed, for example, its childrens' onReverse wouldn't get called.\n    //(+value < 0 && this._rts >= 0) && _callback(this, \"onReverse\", true);\n    // prioritize rendering where the parent's playhead lines up instead of this._tTime because there could be a tween that's animating another tween's timeScale in the same rendering loop (same parent), thus if the timeScale tween renders first, it would alter _start BEFORE _tTime was set on that tick (in the rendering loop), effectively freezing it until the timeScale tween finishes.\n\n    this._rts = +value || 0;\n    this._ts = this._ps || value === -_tinyNum ? 0 : this._rts; // _ts is the functional timeScale which would be 0 if the animation is paused.\n\n    this.totalTime(_clamp(-Math.abs(this._delay), this._tDur, tTime), suppressEvents !== false);\n\n    _setEnd(this); // if parent.smoothChildTiming was false, the end time didn't get updated in the _alignPlayhead() method, so do it here.\n\n\n    return _recacheAncestors(this);\n  };\n\n  _proto.paused = function paused(value) {\n    if (!arguments.length) {\n      return this._ps;\n    }\n\n    if (this._ps !== value) {\n      this._ps = value;\n\n      if (value) {\n        this._pTime = this._tTime || Math.max(-this._delay, this.rawTime()); // if the pause occurs during the delay phase, make sure that's factored in when resuming.\n\n        this._ts = this._act = 0; // _ts is the functional timeScale, so a paused tween would effectively have a timeScale of 0. We record the \"real\" timeScale as _rts (recorded time scale)\n      } else {\n        _wake();\n\n        this._ts = this._rts; //only defer to _pTime (pauseTime) if tTime is zero. Remember, someone could pause() an animation, then scrub the playhead and resume(). If the parent doesn't have smoothChildTiming, we render at the rawTime() because the startTime won't get updated.\n\n        this.totalTime(this.parent && !this.parent.smoothChildTiming ? this.rawTime() : this._tTime || this._pTime, this.progress() === 1 && Math.abs(this._zTime) !== _tinyNum && (this._tTime -= _tinyNum)); // edge case: animation.progress(1).pause().play() wouldn't render again because the playhead is already at the end, but the call to totalTime() below will add it back to its parent...and not remove it again (since removing only happens upon rendering at a new time). Offsetting the _tTime slightly is done simply to cause the final render in totalTime() that'll pop it off its timeline (if autoRemoveChildren is true, of course). Check to make sure _zTime isn't -_tinyNum to avoid an edge case where the playhead is pushed to the end but INSIDE a tween/callback, the timeline itself is paused thus halting rendering and leaving a few unrendered. When resuming, it wouldn't render those otherwise.\n      }\n    }\n\n    return this;\n  };\n\n  _proto.startTime = function startTime(value) {\n    if (arguments.length) {\n      this._start = value;\n      var parent = this.parent || this._dp;\n      parent && (parent._sort || !this.parent) && _addToTimeline(parent, this, value - this._delay);\n      return this;\n    }\n\n    return this._start;\n  };\n\n  _proto.endTime = function endTime(includeRepeats) {\n    return this._start + (_isNotFalse(includeRepeats) ? this.totalDuration() : this.duration()) / Math.abs(this._ts || 1);\n  };\n\n  _proto.rawTime = function rawTime(wrapRepeats) {\n    var parent = this.parent || this._dp; // _dp = detached parent\n\n    return !parent ? this._tTime : wrapRepeats && (!this._ts || this._repeat && this._time && this.totalProgress() < 1) ? this._tTime % (this._dur + this._rDelay) : !this._ts ? this._tTime : _parentToChildTotalTime(parent.rawTime(wrapRepeats), this);\n  };\n\n  _proto.revert = function revert(config) {\n    if (config === void 0) {\n      config = _revertConfig;\n    }\n\n    var prevIsReverting = _reverting;\n    _reverting = config;\n\n    if (this._initted || this._startAt) {\n      this.timeline && this.timeline.revert(config);\n      this.totalTime(-0.01, config.suppressEvents);\n    }\n\n    this.data !== \"nested\" && config.kill !== false && this.kill();\n    _reverting = prevIsReverting;\n    return this;\n  };\n\n  _proto.globalTime = function globalTime(rawTime) {\n    var animation = this,\n        time = arguments.length ? rawTime : animation.rawTime();\n\n    while (animation) {\n      time = animation._start + time / (Math.abs(animation._ts) || 1);\n      animation = animation._dp;\n    }\n\n    return !this.parent && this._sat ? this._sat.globalTime(rawTime) : time; // the _startAt tweens for .fromTo() and .from() that have immediateRender should always be FIRST in the timeline (important for context.revert()). \"_sat\" stands for _startAtTween, referring to the parent tween that created the _startAt. We must discern if that tween had immediateRender so that we can know whether or not to prioritize it in revert().\n  };\n\n  _proto.repeat = function repeat(value) {\n    if (arguments.length) {\n      this._repeat = value === Infinity ? -2 : value;\n      return _onUpdateTotalDuration(this);\n    }\n\n    return this._repeat === -2 ? Infinity : this._repeat;\n  };\n\n  _proto.repeatDelay = function repeatDelay(value) {\n    if (arguments.length) {\n      var time = this._time;\n      this._rDelay = value;\n\n      _onUpdateTotalDuration(this);\n\n      return time ? this.time(time) : this;\n    }\n\n    return this._rDelay;\n  };\n\n  _proto.yoyo = function yoyo(value) {\n    if (arguments.length) {\n      this._yoyo = value;\n      return this;\n    }\n\n    return this._yoyo;\n  };\n\n  _proto.seek = function seek(position, suppressEvents) {\n    return this.totalTime(_parsePosition(this, position), _isNotFalse(suppressEvents));\n  };\n\n  _proto.restart = function restart(includeDelay, suppressEvents) {\n    return this.play().totalTime(includeDelay ? -this._delay : 0, _isNotFalse(suppressEvents));\n  };\n\n  _proto.play = function play(from, suppressEvents) {\n    from != null && this.seek(from, suppressEvents);\n    return this.reversed(false).paused(false);\n  };\n\n  _proto.reverse = function reverse(from, suppressEvents) {\n    from != null && this.seek(from || this.totalDuration(), suppressEvents);\n    return this.reversed(true).paused(false);\n  };\n\n  _proto.pause = function pause(atTime, suppressEvents) {\n    atTime != null && this.seek(atTime, suppressEvents);\n    return this.paused(true);\n  };\n\n  _proto.resume = function resume() {\n    return this.paused(false);\n  };\n\n  _proto.reversed = function reversed(value) {\n    if (arguments.length) {\n      !!value !== this.reversed() && this.timeScale(-this._rts || (value ? -_tinyNum : 0)); // in case timeScale is zero, reversing would have no effect so we use _tinyNum.\n\n      return this;\n    }\n\n    return this._rts < 0;\n  };\n\n  _proto.invalidate = function invalidate() {\n    this._initted = this._act = 0;\n    this._zTime = -_tinyNum;\n    return this;\n  };\n\n  _proto.isActive = function isActive() {\n    var parent = this.parent || this._dp,\n        start = this._start,\n        rawTime;\n    return !!(!parent || this._ts && this._initted && parent.isActive() && (rawTime = parent.rawTime(true)) >= start && rawTime < this.endTime(true) - _tinyNum);\n  };\n\n  _proto.eventCallback = function eventCallback(type, callback, params) {\n    var vars = this.vars;\n\n    if (arguments.length > 1) {\n      if (!callback) {\n        delete vars[type];\n      } else {\n        vars[type] = callback;\n        params && (vars[type + \"Params\"] = params);\n        type === \"onUpdate\" && (this._onUpdate = callback);\n      }\n\n      return this;\n    }\n\n    return vars[type];\n  };\n\n  _proto.then = function then(onFulfilled) {\n    var self = this;\n    return new Promise(function (resolve) {\n      var f = _isFunction(onFulfilled) ? onFulfilled : _passThrough,\n          _resolve = function _resolve() {\n        var _then = self.then;\n        self.then = null; // temporarily null the then() method to avoid an infinite loop (see https://github.com/greensock/GSAP/issues/322)\n\n        _isFunction(f) && (f = f(self)) && (f.then || f === self) && (self.then = _then);\n        resolve(f);\n        self.then = _then;\n      };\n\n      if (self._initted && self.totalProgress() === 1 && self._ts >= 0 || !self._tTime && self._ts < 0) {\n        _resolve();\n      } else {\n        self._prom = _resolve;\n      }\n    });\n  };\n\n  _proto.kill = function kill() {\n    _interrupt(this);\n  };\n\n  return Animation;\n}();\n\n_setDefaults(Animation.prototype, {\n  _time: 0,\n  _start: 0,\n  _end: 0,\n  _tTime: 0,\n  _tDur: 0,\n  _dirty: 0,\n  _repeat: 0,\n  _yoyo: false,\n  parent: null,\n  _initted: false,\n  _rDelay: 0,\n  _ts: 1,\n  _dp: 0,\n  ratio: 0,\n  _zTime: -_tinyNum,\n  _prom: 0,\n  _ps: false,\n  _rts: 1\n});\n/*\n * -------------------------------------------------\n * TIMELINE\n * -------------------------------------------------\n */\n\n\nexport var Timeline = /*#__PURE__*/function (_Animation) {\n  _inheritsLoose(Timeline, _Animation);\n\n  function Timeline(vars, position) {\n    var _this;\n\n    if (vars === void 0) {\n      vars = {};\n    }\n\n    _this = _Animation.call(this, vars) || this;\n    _this.labels = {};\n    _this.smoothChildTiming = !!vars.smoothChildTiming;\n    _this.autoRemoveChildren = !!vars.autoRemoveChildren;\n    _this._sort = _isNotFalse(vars.sortChildren);\n    _globalTimeline && _addToTimeline(vars.parent || _globalTimeline, _assertThisInitialized(_this), position);\n    vars.reversed && _this.reverse();\n    vars.paused && _this.paused(true);\n    vars.scrollTrigger && _scrollTrigger(_assertThisInitialized(_this), vars.scrollTrigger);\n    return _this;\n  }\n\n  var _proto2 = Timeline.prototype;\n\n  _proto2.to = function to(targets, vars, position) {\n    _createTweenType(0, arguments, this);\n\n    return this;\n  };\n\n  _proto2.from = function from(targets, vars, position) {\n    _createTweenType(1, arguments, this);\n\n    return this;\n  };\n\n  _proto2.fromTo = function fromTo(targets, fromVars, toVars, position) {\n    _createTweenType(2, arguments, this);\n\n    return this;\n  };\n\n  _proto2.set = function set(targets, vars, position) {\n    vars.duration = 0;\n    vars.parent = this;\n    _inheritDefaults(vars).repeatDelay || (vars.repeat = 0);\n    vars.immediateRender = !!vars.immediateRender;\n    new Tween(targets, vars, _parsePosition(this, position), 1);\n    return this;\n  };\n\n  _proto2.call = function call(callback, params, position) {\n    return _addToTimeline(this, Tween.delayedCall(0, callback, params), position);\n  } //ONLY for backward compatibility! Maybe delete?\n  ;\n\n  _proto2.staggerTo = function staggerTo(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams) {\n    vars.duration = duration;\n    vars.stagger = vars.stagger || stagger;\n    vars.onComplete = onCompleteAll;\n    vars.onCompleteParams = onCompleteAllParams;\n    vars.parent = this;\n    new Tween(targets, vars, _parsePosition(this, position));\n    return this;\n  };\n\n  _proto2.staggerFrom = function staggerFrom(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams) {\n    vars.runBackwards = 1;\n    _inheritDefaults(vars).immediateRender = _isNotFalse(vars.immediateRender);\n    return this.staggerTo(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams);\n  };\n\n  _proto2.staggerFromTo = function staggerFromTo(targets, duration, fromVars, toVars, stagger, position, onCompleteAll, onCompleteAllParams) {\n    toVars.startAt = fromVars;\n    _inheritDefaults(toVars).immediateRender = _isNotFalse(toVars.immediateRender);\n    return this.staggerTo(targets, duration, toVars, stagger, position, onCompleteAll, onCompleteAllParams);\n  };\n\n  _proto2.render = function render(totalTime, suppressEvents, force) {\n    var prevTime = this._time,\n        tDur = this._dirty ? this.totalDuration() : this._tDur,\n        dur = this._dur,\n        tTime = totalTime <= 0 ? 0 : _roundPrecise(totalTime),\n        // if a paused timeline is resumed (or its _start is updated for another reason...which rounds it), that could result in the playhead shifting a **tiny** amount and a zero-duration child at that spot may get rendered at a different ratio, like its totalTime in render() may be 1e-17 instead of 0, for example.\n    crossingStart = this._zTime < 0 !== totalTime < 0 && (this._initted || !dur),\n        time,\n        child,\n        next,\n        iteration,\n        cycleDuration,\n        prevPaused,\n        pauseTween,\n        timeScale,\n        prevStart,\n        prevIteration,\n        yoyo,\n        isYoyo;\n    this !== _globalTimeline && tTime > tDur && totalTime >= 0 && (tTime = tDur);\n\n    if (tTime !== this._tTime || force || crossingStart) {\n      if (prevTime !== this._time && dur) {\n        //if totalDuration() finds a child with a negative startTime and smoothChildTiming is true, things get shifted around internally so we need to adjust the time accordingly. For example, if a tween starts at -30 we must shift EVERYTHING forward 30 seconds and move this timeline's startTime backward by 30 seconds so that things align with the playhead (no jump).\n        tTime += this._time - prevTime;\n        totalTime += this._time - prevTime;\n      }\n\n      time = tTime;\n      prevStart = this._start;\n      timeScale = this._ts;\n      prevPaused = !timeScale;\n\n      if (crossingStart) {\n        dur || (prevTime = this._zTime); //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration timeline, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect.\n\n        (totalTime || !suppressEvents) && (this._zTime = totalTime);\n      }\n\n      if (this._repeat) {\n        //adjust the time for repeats and yoyos\n        yoyo = this._yoyo;\n        cycleDuration = dur + this._rDelay;\n\n        if (this._repeat < -1 && totalTime < 0) {\n          return this.totalTime(cycleDuration * 100 + totalTime, suppressEvents, force);\n        }\n\n        time = _roundPrecise(tTime % cycleDuration); //round to avoid floating point errors. (4 % 0.8 should be 0 but some browsers report it as 0.79999999!)\n\n        if (tTime === tDur) {\n          // the tDur === tTime is for edge cases where there's a lengthy decimal on the duration and it may reach the very end but the time is rendered as not-quite-there (remember, tDur is rounded to 4 decimals whereas dur isn't)\n          iteration = this._repeat;\n          time = dur;\n        } else {\n          iteration = ~~(tTime / cycleDuration);\n\n          if (iteration && iteration === tTime / cycleDuration) {\n            time = dur;\n            iteration--;\n          }\n\n          time > dur && (time = dur);\n        }\n\n        prevIteration = _animationCycle(this._tTime, cycleDuration);\n        !prevTime && this._tTime && prevIteration !== iteration && this._tTime - prevIteration * cycleDuration - this._dur <= 0 && (prevIteration = iteration); // edge case - if someone does addPause() at the very beginning of a repeating timeline, that pause is technically at the same spot as the end which causes this._time to get set to 0 when the totalTime would normally place the playhead at the end. See https://gsap.com/forums/topic/23823-closing-nav-animation-not-working-on-ie-and-iphone-6-maybe-other-older-browser/?tab=comments#comment-113005 also, this._tTime - prevIteration * cycleDuration - this._dur <= 0 just checks to make sure it wasn't previously in the \"repeatDelay\" portion\n\n        if (yoyo && iteration & 1) {\n          time = dur - time;\n          isYoyo = 1;\n        }\n        /*\n        make sure children at the end/beginning of the timeline are rendered properly. If, for example,\n        a 3-second long timeline rendered at 2.9 seconds previously, and now renders at 3.2 seconds (which\n        would get translated to 2.8 seconds if the timeline yoyos or 0.2 seconds if it just repeats), there\n        could be a callback or a short tween that's at 2.95 or 3 seconds in which wouldn't render. So\n        we need to push the timeline to the end (and/or beginning depending on its yoyo value). Also we must\n        ensure that zero-duration tweens at the very beginning or end of the Timeline work.\n        */\n\n\n        if (iteration !== prevIteration && !this._lock) {\n          var rewinding = yoyo && prevIteration & 1,\n              doesWrap = rewinding === (yoyo && iteration & 1);\n          iteration < prevIteration && (rewinding = !rewinding);\n          prevTime = rewinding ? 0 : tTime % dur ? dur : tTime; // if the playhead is landing exactly at the end of an iteration, use that totalTime rather than only the duration, otherwise it'll skip the 2nd render since it's effectively at the same time.\n\n          this._lock = 1;\n          this.render(prevTime || (isYoyo ? 0 : _roundPrecise(iteration * cycleDuration)), suppressEvents, !dur)._lock = 0;\n          this._tTime = tTime; // if a user gets the iteration() inside the onRepeat, for example, it should be accurate.\n\n          !suppressEvents && this.parent && _callback(this, \"onRepeat\");\n          this.vars.repeatRefresh && !isYoyo && (this.invalidate()._lock = 1);\n\n          if (prevTime && prevTime !== this._time || prevPaused !== !this._ts || this.vars.onRepeat && !this.parent && !this._act) {\n            // if prevTime is 0 and we render at the very end, _time will be the end, thus won't match. So in this edge case, prevTime won't match _time but that's okay. If it gets killed in the onRepeat, eject as well.\n            return this;\n          }\n\n          dur = this._dur; // in case the duration changed in the onRepeat\n\n          tDur = this._tDur;\n\n          if (doesWrap) {\n            this._lock = 2;\n            prevTime = rewinding ? dur : -0.0001;\n            this.render(prevTime, true);\n            this.vars.repeatRefresh && !isYoyo && this.invalidate();\n          }\n\n          this._lock = 0;\n\n          if (!this._ts && !prevPaused) {\n            return this;\n          } //in order for yoyoEase to work properly when there's a stagger, we must swap out the ease in each sub-tween.\n\n\n          _propagateYoyoEase(this, isYoyo);\n        }\n      }\n\n      if (this._hasPause && !this._forcing && this._lock < 2) {\n        pauseTween = _findNextPauseTween(this, _roundPrecise(prevTime), _roundPrecise(time));\n\n        if (pauseTween) {\n          tTime -= time - (time = pauseTween._start);\n        }\n      }\n\n      this._tTime = tTime;\n      this._time = time;\n      this._act = !timeScale; //as long as it's not paused, force it to be active so that if the user renders independent of the parent timeline, it'll be forced to re-render on the next tick.\n\n      if (!this._initted) {\n        this._onUpdate = this.vars.onUpdate;\n        this._initted = 1;\n        this._zTime = totalTime;\n        prevTime = 0; // upon init, the playhead should always go forward; someone could invalidate() a completed timeline and then if they restart(), that would make child tweens render in reverse order which could lock in the wrong starting values if they build on each other, like tl.to(obj, {x: 100}).to(obj, {x: 0}).\n      }\n\n      if (!prevTime && time && !suppressEvents && !iteration) {\n        _callback(this, \"onStart\");\n\n        if (this._tTime !== tTime) {\n          // in case the onStart triggered a render at a different spot, eject. Like if someone did animation.pause(0.5) or something inside the onStart.\n          return this;\n        }\n      }\n\n      if (time >= prevTime && totalTime >= 0) {\n        child = this._first;\n\n        while (child) {\n          next = child._next;\n\n          if ((child._act || time >= child._start) && child._ts && pauseTween !== child) {\n            if (child.parent !== this) {\n              // an extreme edge case - the child's render could do something like kill() the \"next\" one in the linked list, or reparent it. In that case we must re-initiate the whole render to be safe.\n              return this.render(totalTime, suppressEvents, force);\n            }\n\n            child.render(child._ts > 0 ? (time - child._start) * child._ts : (child._dirty ? child.totalDuration() : child._tDur) + (time - child._start) * child._ts, suppressEvents, force);\n\n            if (time !== this._time || !this._ts && !prevPaused) {\n              //in case a tween pauses or seeks the timeline when rendering, like inside of an onUpdate/onComplete\n              pauseTween = 0;\n              next && (tTime += this._zTime = -_tinyNum); // it didn't finish rendering, so flag zTime as negative so that so that the next time render() is called it'll be forced (to render any remaining children)\n\n              break;\n            }\n          }\n\n          child = next;\n        }\n      } else {\n        child = this._last;\n        var adjustedTime = totalTime < 0 ? totalTime : time; //when the playhead goes backward beyond the start of this timeline, we must pass that information down to the child animations so that zero-duration tweens know whether to render their starting or ending values.\n\n        while (child) {\n          next = child._prev;\n\n          if ((child._act || adjustedTime <= child._end) && child._ts && pauseTween !== child) {\n            if (child.parent !== this) {\n              // an extreme edge case - the child's render could do something like kill() the \"next\" one in the linked list, or reparent it. In that case we must re-initiate the whole render to be safe.\n              return this.render(totalTime, suppressEvents, force);\n            }\n\n            child.render(child._ts > 0 ? (adjustedTime - child._start) * child._ts : (child._dirty ? child.totalDuration() : child._tDur) + (adjustedTime - child._start) * child._ts, suppressEvents, force || _reverting && (child._initted || child._startAt)); // if reverting, we should always force renders of initted tweens (but remember that .fromTo() or .from() may have a _startAt but not _initted yet). If, for example, a .fromTo() tween with a stagger (which creates an internal timeline) gets reverted BEFORE some of its child tweens render for the first time, it may not properly trigger them to revert.\n\n            if (time !== this._time || !this._ts && !prevPaused) {\n              //in case a tween pauses or seeks the timeline when rendering, like inside of an onUpdate/onComplete\n              pauseTween = 0;\n              next && (tTime += this._zTime = adjustedTime ? -_tinyNum : _tinyNum); // it didn't finish rendering, so adjust zTime so that so that the next time render() is called it'll be forced (to render any remaining children)\n\n              break;\n            }\n          }\n\n          child = next;\n        }\n      }\n\n      if (pauseTween && !suppressEvents) {\n        this.pause();\n        pauseTween.render(time >= prevTime ? 0 : -_tinyNum)._zTime = time >= prevTime ? 1 : -1;\n\n        if (this._ts) {\n          //the callback resumed playback! So since we may have held back the playhead due to where the pause is positioned, go ahead and jump to where it's SUPPOSED to be (if no pause happened).\n          this._start = prevStart; //if the pause was at an earlier time and the user resumed in the callback, it could reposition the timeline (changing its startTime), throwing things off slightly, so we make sure the _start doesn't shift.\n\n          _setEnd(this);\n\n          return this.render(totalTime, suppressEvents, force);\n        }\n      }\n\n      this._onUpdate && !suppressEvents && _callback(this, \"onUpdate\", true);\n      if (tTime === tDur && this._tTime >= this.totalDuration() || !tTime && prevTime) if (prevStart === this._start || Math.abs(timeScale) !== Math.abs(this._ts)) if (!this._lock) {\n        // remember, a child's callback may alter this timeline's playhead or timeScale which is why we need to add some of these checks.\n        (totalTime || !dur) && (tTime === tDur && this._ts > 0 || !tTime && this._ts < 0) && _removeFromParent(this, 1); // don't remove if the timeline is reversed and the playhead isn't at 0, otherwise tl.progress(1).reverse() won't work. Only remove if the playhead is at the end and timeScale is positive, or if the playhead is at 0 and the timeScale is negative.\n\n        if (!suppressEvents && !(totalTime < 0 && !prevTime) && (tTime || prevTime || !tDur)) {\n          _callback(this, tTime === tDur && totalTime >= 0 ? \"onComplete\" : \"onReverseComplete\", true);\n\n          this._prom && !(tTime < tDur && this.timeScale() > 0) && this._prom();\n        }\n      }\n    }\n\n    return this;\n  };\n\n  _proto2.add = function add(child, position) {\n    var _this2 = this;\n\n    _isNumber(position) || (position = _parsePosition(this, position, child));\n\n    if (!(child instanceof Animation)) {\n      if (_isArray(child)) {\n        child.forEach(function (obj) {\n          return _this2.add(obj, position);\n        });\n        return this;\n      }\n\n      if (_isString(child)) {\n        return this.addLabel(child, position);\n      }\n\n      if (_isFunction(child)) {\n        child = Tween.delayedCall(0, child);\n      } else {\n        return this;\n      }\n    }\n\n    return this !== child ? _addToTimeline(this, child, position) : this; //don't allow a timeline to be added to itself as a child!\n  };\n\n  _proto2.getChildren = function getChildren(nested, tweens, timelines, ignoreBeforeTime) {\n    if (nested === void 0) {\n      nested = true;\n    }\n\n    if (tweens === void 0) {\n      tweens = true;\n    }\n\n    if (timelines === void 0) {\n      timelines = true;\n    }\n\n    if (ignoreBeforeTime === void 0) {\n      ignoreBeforeTime = -_bigNum;\n    }\n\n    var a = [],\n        child = this._first;\n\n    while (child) {\n      if (child._start >= ignoreBeforeTime) {\n        if (child instanceof Tween) {\n          tweens && a.push(child);\n        } else {\n          timelines && a.push(child);\n          nested && a.push.apply(a, child.getChildren(true, tweens, timelines));\n        }\n      }\n\n      child = child._next;\n    }\n\n    return a;\n  };\n\n  _proto2.getById = function getById(id) {\n    var animations = this.getChildren(1, 1, 1),\n        i = animations.length;\n\n    while (i--) {\n      if (animations[i].vars.id === id) {\n        return animations[i];\n      }\n    }\n  };\n\n  _proto2.remove = function remove(child) {\n    if (_isString(child)) {\n      return this.removeLabel(child);\n    }\n\n    if (_isFunction(child)) {\n      return this.killTweensOf(child);\n    }\n\n    _removeLinkedListItem(this, child);\n\n    if (child === this._recent) {\n      this._recent = this._last;\n    }\n\n    return _uncache(this);\n  };\n\n  _proto2.totalTime = function totalTime(_totalTime2, suppressEvents) {\n    if (!arguments.length) {\n      return this._tTime;\n    }\n\n    this._forcing = 1;\n\n    if (!this._dp && this._ts) {\n      //special case for the global timeline (or any other that has no parent or detached parent).\n      this._start = _roundPrecise(_ticker.time - (this._ts > 0 ? _totalTime2 / this._ts : (this.totalDuration() - _totalTime2) / -this._ts));\n    }\n\n    _Animation.prototype.totalTime.call(this, _totalTime2, suppressEvents);\n\n    this._forcing = 0;\n    return this;\n  };\n\n  _proto2.addLabel = function addLabel(label, position) {\n    this.labels[label] = _parsePosition(this, position);\n    return this;\n  };\n\n  _proto2.removeLabel = function removeLabel(label) {\n    delete this.labels[label];\n    return this;\n  };\n\n  _proto2.addPause = function addPause(position, callback, params) {\n    var t = Tween.delayedCall(0, callback || _emptyFunc, params);\n    t.data = \"isPause\";\n    this._hasPause = 1;\n    return _addToTimeline(this, t, _parsePosition(this, position));\n  };\n\n  _proto2.removePause = function removePause(position) {\n    var child = this._first;\n    position = _parsePosition(this, position);\n\n    while (child) {\n      if (child._start === position && child.data === \"isPause\") {\n        _removeFromParent(child);\n      }\n\n      child = child._next;\n    }\n  };\n\n  _proto2.killTweensOf = function killTweensOf(targets, props, onlyActive) {\n    var tweens = this.getTweensOf(targets, onlyActive),\n        i = tweens.length;\n\n    while (i--) {\n      _overwritingTween !== tweens[i] && tweens[i].kill(targets, props);\n    }\n\n    return this;\n  };\n\n  _proto2.getTweensOf = function getTweensOf(targets, onlyActive) {\n    var a = [],\n        parsedTargets = toArray(targets),\n        child = this._first,\n        isGlobalTime = _isNumber(onlyActive),\n        // a number is interpreted as a global time. If the animation spans\n    children;\n\n    while (child) {\n      if (child instanceof Tween) {\n        if (_arrayContainsAny(child._targets, parsedTargets) && (isGlobalTime ? (!_overwritingTween || child._initted && child._ts) && child.globalTime(0) <= onlyActive && child.globalTime(child.totalDuration()) > onlyActive : !onlyActive || child.isActive())) {\n          // note: if this is for overwriting, it should only be for tweens that aren't paused and are initted.\n          a.push(child);\n        }\n      } else if ((children = child.getTweensOf(parsedTargets, onlyActive)).length) {\n        a.push.apply(a, children);\n      }\n\n      child = child._next;\n    }\n\n    return a;\n  } // potential future feature - targets() on timelines\n  // targets() {\n  // \tlet result = [];\n  // \tthis.getChildren(true, true, false).forEach(t => result.push(...t.targets()));\n  // \treturn result.filter((v, i) => result.indexOf(v) === i);\n  // }\n  ;\n\n  _proto2.tweenTo = function tweenTo(position, vars) {\n    vars = vars || {};\n\n    var tl = this,\n        endTime = _parsePosition(tl, position),\n        _vars = vars,\n        startAt = _vars.startAt,\n        _onStart = _vars.onStart,\n        onStartParams = _vars.onStartParams,\n        immediateRender = _vars.immediateRender,\n        initted,\n        tween = Tween.to(tl, _setDefaults({\n      ease: vars.ease || \"none\",\n      lazy: false,\n      immediateRender: false,\n      time: endTime,\n      overwrite: \"auto\",\n      duration: vars.duration || Math.abs((endTime - (startAt && \"time\" in startAt ? startAt.time : tl._time)) / tl.timeScale()) || _tinyNum,\n      onStart: function onStart() {\n        tl.pause();\n\n        if (!initted) {\n          var duration = vars.duration || Math.abs((endTime - (startAt && \"time\" in startAt ? startAt.time : tl._time)) / tl.timeScale());\n          tween._dur !== duration && _setDuration(tween, duration, 0, 1).render(tween._time, true, true);\n          initted = 1;\n        }\n\n        _onStart && _onStart.apply(tween, onStartParams || []); //in case the user had an onStart in the vars - we don't want to overwrite it.\n      }\n    }, vars));\n\n    return immediateRender ? tween.render(0) : tween;\n  };\n\n  _proto2.tweenFromTo = function tweenFromTo(fromPosition, toPosition, vars) {\n    return this.tweenTo(toPosition, _setDefaults({\n      startAt: {\n        time: _parsePosition(this, fromPosition)\n      }\n    }, vars));\n  };\n\n  _proto2.recent = function recent() {\n    return this._recent;\n  };\n\n  _proto2.nextLabel = function nextLabel(afterTime) {\n    if (afterTime === void 0) {\n      afterTime = this._time;\n    }\n\n    return _getLabelInDirection(this, _parsePosition(this, afterTime));\n  };\n\n  _proto2.previousLabel = function previousLabel(beforeTime) {\n    if (beforeTime === void 0) {\n      beforeTime = this._time;\n    }\n\n    return _getLabelInDirection(this, _parsePosition(this, beforeTime), 1);\n  };\n\n  _proto2.currentLabel = function currentLabel(value) {\n    return arguments.length ? this.seek(value, true) : this.previousLabel(this._time + _tinyNum);\n  };\n\n  _proto2.shiftChildren = function shiftChildren(amount, adjustLabels, ignoreBeforeTime) {\n    if (ignoreBeforeTime === void 0) {\n      ignoreBeforeTime = 0;\n    }\n\n    var child = this._first,\n        labels = this.labels,\n        p;\n\n    while (child) {\n      if (child._start >= ignoreBeforeTime) {\n        child._start += amount;\n        child._end += amount;\n      }\n\n      child = child._next;\n    }\n\n    if (adjustLabels) {\n      for (p in labels) {\n        if (labels[p] >= ignoreBeforeTime) {\n          labels[p] += amount;\n        }\n      }\n    }\n\n    return _uncache(this);\n  };\n\n  _proto2.invalidate = function invalidate(soft) {\n    var child = this._first;\n    this._lock = 0;\n\n    while (child) {\n      child.invalidate(soft);\n      child = child._next;\n    }\n\n    return _Animation.prototype.invalidate.call(this, soft);\n  };\n\n  _proto2.clear = function clear(includeLabels) {\n    if (includeLabels === void 0) {\n      includeLabels = true;\n    }\n\n    var child = this._first,\n        next;\n\n    while (child) {\n      next = child._next;\n      this.remove(child);\n      child = next;\n    }\n\n    this._dp && (this._time = this._tTime = this._pTime = 0);\n    includeLabels && (this.labels = {});\n    return _uncache(this);\n  };\n\n  _proto2.totalDuration = function totalDuration(value) {\n    var max = 0,\n        self = this,\n        child = self._last,\n        prevStart = _bigNum,\n        prev,\n        start,\n        parent;\n\n    if (arguments.length) {\n      return self.timeScale((self._repeat < 0 ? self.duration() : self.totalDuration()) / (self.reversed() ? -value : value));\n    }\n\n    if (self._dirty) {\n      parent = self.parent;\n\n      while (child) {\n        prev = child._prev; //record it here in case the tween changes position in the sequence...\n\n        child._dirty && child.totalDuration(); //could change the tween._startTime, so make sure the animation's cache is clean before analyzing it.\n\n        start = child._start;\n\n        if (start > prevStart && self._sort && child._ts && !self._lock) {\n          //in case one of the tweens shifted out of order, it needs to be re-inserted into the correct position in the sequence\n          self._lock = 1; //prevent endless recursive calls - there are methods that get triggered that check duration/totalDuration when we add().\n\n          _addToTimeline(self, child, start - child._delay, 1)._lock = 0;\n        } else {\n          prevStart = start;\n        }\n\n        if (start < 0 && child._ts) {\n          //children aren't allowed to have negative startTimes unless smoothChildTiming is true, so adjust here if one is found.\n          max -= start;\n\n          if (!parent && !self._dp || parent && parent.smoothChildTiming) {\n            self._start += start / self._ts;\n            self._time -= start;\n            self._tTime -= start;\n          }\n\n          self.shiftChildren(-start, false, -1e999);\n          prevStart = 0;\n        }\n\n        child._end > max && child._ts && (max = child._end);\n        child = prev;\n      }\n\n      _setDuration(self, self === _globalTimeline && self._time > max ? self._time : max, 1, 1);\n\n      self._dirty = 0;\n    }\n\n    return self._tDur;\n  };\n\n  Timeline.updateRoot = function updateRoot(time) {\n    if (_globalTimeline._ts) {\n      _lazySafeRender(_globalTimeline, _parentToChildTotalTime(time, _globalTimeline));\n\n      _lastRenderedFrame = _ticker.frame;\n    }\n\n    if (_ticker.frame >= _nextGCFrame) {\n      _nextGCFrame += _config.autoSleep || 120;\n      var child = _globalTimeline._first;\n      if (!child || !child._ts) if (_config.autoSleep && _ticker._listeners.length < 2) {\n        while (child && !child._ts) {\n          child = child._next;\n        }\n\n        child || _ticker.sleep();\n      }\n    }\n  };\n\n  return Timeline;\n}(Animation);\n\n_setDefaults(Timeline.prototype, {\n  _lock: 0,\n  _hasPause: 0,\n  _forcing: 0\n});\n\nvar _addComplexStringPropTween = function _addComplexStringPropTween(target, prop, start, end, setter, stringFilter, funcParam) {\n  //note: we call _addComplexStringPropTween.call(tweenInstance...) to ensure that it's scoped properly. We may call it from within a plugin too, thus \"this\" would refer to the plugin.\n  var pt = new PropTween(this._pt, target, prop, 0, 1, _renderComplexString, null, setter),\n      index = 0,\n      matchIndex = 0,\n      result,\n      startNums,\n      color,\n      endNum,\n      chunk,\n      startNum,\n      hasRandom,\n      a;\n  pt.b = start;\n  pt.e = end;\n  start += \"\"; //ensure values are strings\n\n  end += \"\";\n\n  if (hasRandom = ~end.indexOf(\"random(\")) {\n    end = _replaceRandom(end);\n  }\n\n  if (stringFilter) {\n    a = [start, end];\n    stringFilter(a, target, prop); //pass an array with the starting and ending values and let the filter do whatever it needs to the values.\n\n    start = a[0];\n    end = a[1];\n  }\n\n  startNums = start.match(_complexStringNumExp) || [];\n\n  while (result = _complexStringNumExp.exec(end)) {\n    endNum = result[0];\n    chunk = end.substring(index, result.index);\n\n    if (color) {\n      color = (color + 1) % 5;\n    } else if (chunk.substr(-5) === \"rgba(\") {\n      color = 1;\n    }\n\n    if (endNum !== startNums[matchIndex++]) {\n      startNum = parseFloat(startNums[matchIndex - 1]) || 0; //these nested PropTweens are handled in a special way - we'll never actually call a render or setter method on them. We'll just loop through them in the parent complex string PropTween's render method.\n\n      pt._pt = {\n        _next: pt._pt,\n        p: chunk || matchIndex === 1 ? chunk : \",\",\n        //note: SVG spec allows omission of comma/space when a negative sign is wedged between two numbers, like 2.5-5.3 instead of 2.5,-5.3 but when tweening, the negative value may switch to positive, so we insert the comma just in case.\n        s: startNum,\n        c: endNum.charAt(1) === \"=\" ? _parseRelative(startNum, endNum) - startNum : parseFloat(endNum) - startNum,\n        m: color && color < 4 ? Math.round : 0\n      };\n      index = _complexStringNumExp.lastIndex;\n    }\n  }\n\n  pt.c = index < end.length ? end.substring(index, end.length) : \"\"; //we use the \"c\" of the PropTween to store the final part of the string (after the last number)\n\n  pt.fp = funcParam;\n\n  if (_relExp.test(end) || hasRandom) {\n    pt.e = 0; //if the end string contains relative values or dynamic random(...) values, delete the end it so that on the final render we don't actually set it to the string with += or -= characters (forces it to use the calculated value).\n  }\n\n  this._pt = pt; //start the linked list with this new PropTween. Remember, we call _addComplexStringPropTween.call(tweenInstance...) to ensure that it's scoped properly. We may call it from within a plugin too, thus \"this\" would refer to the plugin.\n\n  return pt;\n},\n    _addPropTween = function _addPropTween(target, prop, start, end, index, targets, modifier, stringFilter, funcParam, optional) {\n  _isFunction(end) && (end = end(index || 0, target, targets));\n  var currentValue = target[prop],\n      parsedStart = start !== \"get\" ? start : !_isFunction(currentValue) ? currentValue : funcParam ? target[prop.indexOf(\"set\") || !_isFunction(target[\"get\" + prop.substr(3)]) ? prop : \"get\" + prop.substr(3)](funcParam) : target[prop](),\n      setter = !_isFunction(currentValue) ? _setterPlain : funcParam ? _setterFuncWithParam : _setterFunc,\n      pt;\n\n  if (_isString(end)) {\n    if (~end.indexOf(\"random(\")) {\n      end = _replaceRandom(end);\n    }\n\n    if (end.charAt(1) === \"=\") {\n      pt = _parseRelative(parsedStart, end) + (getUnit(parsedStart) || 0);\n\n      if (pt || pt === 0) {\n        // to avoid isNaN, like if someone passes in a value like \"!= whatever\"\n        end = pt;\n      }\n    }\n  }\n\n  if (!optional || parsedStart !== end || _forceAllPropTweens) {\n    if (!isNaN(parsedStart * end) && end !== \"\") {\n      // fun fact: any number multiplied by \"\" is evaluated as the number 0!\n      pt = new PropTween(this._pt, target, prop, +parsedStart || 0, end - (parsedStart || 0), typeof currentValue === \"boolean\" ? _renderBoolean : _renderPlain, 0, setter);\n      funcParam && (pt.fp = funcParam);\n      modifier && pt.modifier(modifier, this, target);\n      return this._pt = pt;\n    }\n\n    !currentValue && !(prop in target) && _missingPlugin(prop, end);\n    return _addComplexStringPropTween.call(this, target, prop, parsedStart, end, setter, stringFilter || _config.stringFilter, funcParam);\n  }\n},\n    //creates a copy of the vars object and processes any function-based values (putting the resulting values directly into the copy) as well as strings with \"random()\" in them. It does NOT process relative values.\n_processVars = function _processVars(vars, index, target, targets, tween) {\n  _isFunction(vars) && (vars = _parseFuncOrString(vars, tween, index, target, targets));\n\n  if (!_isObject(vars) || vars.style && vars.nodeType || _isArray(vars) || _isTypedArray(vars)) {\n    return _isString(vars) ? _parseFuncOrString(vars, tween, index, target, targets) : vars;\n  }\n\n  var copy = {},\n      p;\n\n  for (p in vars) {\n    copy[p] = _parseFuncOrString(vars[p], tween, index, target, targets);\n  }\n\n  return copy;\n},\n    _checkPlugin = function _checkPlugin(property, vars, tween, index, target, targets) {\n  var plugin, pt, ptLookup, i;\n\n  if (_plugins[property] && (plugin = new _plugins[property]()).init(target, plugin.rawVars ? vars[property] : _processVars(vars[property], index, target, targets, tween), tween, index, targets) !== false) {\n    tween._pt = pt = new PropTween(tween._pt, target, property, 0, 1, plugin.render, plugin, 0, plugin.priority);\n\n    if (tween !== _quickTween) {\n      ptLookup = tween._ptLookup[tween._targets.indexOf(target)]; //note: we can't use tween._ptLookup[index] because for staggered tweens, the index from the fullTargets array won't match what it is in each individual tween that spawns from the stagger.\n\n      i = plugin._props.length;\n\n      while (i--) {\n        ptLookup[plugin._props[i]] = pt;\n      }\n    }\n  }\n\n  return plugin;\n},\n    _overwritingTween,\n    //store a reference temporarily so we can avoid overwriting itself.\n_forceAllPropTweens,\n    _initTween = function _initTween(tween, time, tTime) {\n  var vars = tween.vars,\n      ease = vars.ease,\n      startAt = vars.startAt,\n      immediateRender = vars.immediateRender,\n      lazy = vars.lazy,\n      onUpdate = vars.onUpdate,\n      runBackwards = vars.runBackwards,\n      yoyoEase = vars.yoyoEase,\n      keyframes = vars.keyframes,\n      autoRevert = vars.autoRevert,\n      dur = tween._dur,\n      prevStartAt = tween._startAt,\n      targets = tween._targets,\n      parent = tween.parent,\n      fullTargets = parent && parent.data === \"nested\" ? parent.vars.targets : targets,\n      autoOverwrite = tween._overwrite === \"auto\" && !_suppressOverwrites,\n      tl = tween.timeline,\n      cleanVars,\n      i,\n      p,\n      pt,\n      target,\n      hasPriority,\n      gsData,\n      harness,\n      plugin,\n      ptLookup,\n      index,\n      harnessVars,\n      overwritten;\n  tl && (!keyframes || !ease) && (ease = \"none\");\n  tween._ease = _parseEase(ease, _defaults.ease);\n  tween._yEase = yoyoEase ? _invertEase(_parseEase(yoyoEase === true ? ease : yoyoEase, _defaults.ease)) : 0;\n\n  if (yoyoEase && tween._yoyo && !tween._repeat) {\n    //there must have been a parent timeline with yoyo:true that is currently in its yoyo phase, so flip the eases.\n    yoyoEase = tween._yEase;\n    tween._yEase = tween._ease;\n    tween._ease = yoyoEase;\n  }\n\n  tween._from = !tl && !!vars.runBackwards; //nested timelines should never run backwards - the backwards-ness is in the child tweens.\n\n  if (!tl || keyframes && !vars.stagger) {\n    //if there's an internal timeline, skip all the parsing because we passed that task down the chain.\n    harness = targets[0] ? _getCache(targets[0]).harness : 0;\n    harnessVars = harness && vars[harness.prop]; //someone may need to specify CSS-specific values AND non-CSS values, like if the element has an \"x\" property plus it's a standard DOM element. We allow people to distinguish by wrapping plugin-specific stuff in a css:{} object for example.\n\n    cleanVars = _copyExcluding(vars, _reservedProps);\n\n    if (prevStartAt) {\n      prevStartAt._zTime < 0 && prevStartAt.progress(1); // in case it's a lazy startAt that hasn't rendered yet.\n\n      time < 0 && runBackwards && immediateRender && !autoRevert ? prevStartAt.render(-1, true) : prevStartAt.revert(runBackwards && dur ? _revertConfigNoKill : _startAtRevertConfig); // if it's a \"startAt\" (not \"from()\" or runBackwards: true), we only need to do a shallow revert (keep transforms cached in CSSPlugin)\n      // don't just _removeFromParent(prevStartAt.render(-1, true)) because that'll leave inline styles. We're creating a new _startAt for \"startAt\" tweens that re-capture things to ensure that if the pre-tween values changed since the tween was created, they're recorded.\n\n      prevStartAt._lazy = 0;\n    }\n\n    if (startAt) {\n      _removeFromParent(tween._startAt = Tween.set(targets, _setDefaults({\n        data: \"isStart\",\n        overwrite: false,\n        parent: parent,\n        immediateRender: true,\n        lazy: !prevStartAt && _isNotFalse(lazy),\n        startAt: null,\n        delay: 0,\n        onUpdate: onUpdate && function () {\n          return _callback(tween, \"onUpdate\");\n        },\n        stagger: 0\n      }, startAt))); //copy the properties/values into a new object to avoid collisions, like var to = {x:0}, from = {x:500}; timeline.fromTo(e, from, to).fromTo(e, to, from);\n\n\n      tween._startAt._dp = 0; // don't allow it to get put back into root timeline! Like when revert() is called and totalTime() gets set.\n\n      tween._startAt._sat = tween; // used in globalTime(). _sat stands for _startAtTween\n\n      time < 0 && (_reverting || !immediateRender && !autoRevert) && tween._startAt.revert(_revertConfigNoKill); // rare edge case, like if a render is forced in the negative direction of a non-initted tween.\n\n      if (immediateRender) {\n        if (dur && time <= 0 && tTime <= 0) {\n          // check tTime here because in the case of a yoyo tween whose playhead gets pushed to the end like tween.progress(1), we should allow it through so that the onComplete gets fired properly.\n          time && (tween._zTime = time);\n          return; //we skip initialization here so that overwriting doesn't occur until the tween actually begins. Otherwise, if you create several immediateRender:true tweens of the same target/properties to drop into a Timeline, the last one created would overwrite the first ones because they didn't get placed into the timeline yet before the first render occurs and kicks in overwriting.\n        }\n      }\n    } else if (runBackwards && dur) {\n      //from() tweens must be handled uniquely: their beginning values must be rendered but we don't want overwriting to occur yet (when time is still 0). Wait until the tween actually begins before doing all the routines like overwriting. At that time, we should render at the END of the tween to ensure that things initialize correctly (remember, from() tweens go backwards)\n      if (!prevStartAt) {\n        time && (immediateRender = false); //in rare cases (like if a from() tween runs and then is invalidate()-ed), immediateRender could be true but the initial forced-render gets skipped, so there's no need to force the render in this context when the _time is greater than 0\n\n        p = _setDefaults({\n          overwrite: false,\n          data: \"isFromStart\",\n          //we tag the tween with as \"isFromStart\" so that if [inside a plugin] we need to only do something at the very END of a tween, we have a way of identifying this tween as merely the one that's setting the beginning values for a \"from()\" tween. For example, clearProps in CSSPlugin should only get applied at the very END of a tween and without this tag, from(...{height:100, clearProps:\"height\", delay:1}) would wipe the height at the beginning of the tween and after 1 second, it'd kick back in.\n          lazy: immediateRender && !prevStartAt && _isNotFalse(lazy),\n          immediateRender: immediateRender,\n          //zero-duration tweens render immediately by default, but if we're not specifically instructed to render this tween immediately, we should skip this and merely _init() to record the starting values (rendering them immediately would push them to completion which is wasteful in that case - we'd have to render(-1) immediately after)\n          stagger: 0,\n          parent: parent //ensures that nested tweens that had a stagger are handled properly, like gsap.from(\".class\", {y: gsap.utils.wrap([-100,100]), stagger: 0.5})\n\n        }, cleanVars);\n        harnessVars && (p[harness.prop] = harnessVars); // in case someone does something like .from(..., {css:{}})\n\n        _removeFromParent(tween._startAt = Tween.set(targets, p));\n\n        tween._startAt._dp = 0; // don't allow it to get put back into root timeline!\n\n        tween._startAt._sat = tween; // used in globalTime()\n\n        time < 0 && (_reverting ? tween._startAt.revert(_revertConfigNoKill) : tween._startAt.render(-1, true));\n        tween._zTime = time;\n\n        if (!immediateRender) {\n          _initTween(tween._startAt, _tinyNum, _tinyNum); //ensures that the initial values are recorded\n\n        } else if (!time) {\n          return;\n        }\n      }\n    }\n\n    tween._pt = tween._ptCache = 0;\n    lazy = dur && _isNotFalse(lazy) || lazy && !dur;\n\n    for (i = 0; i < targets.length; i++) {\n      target = targets[i];\n      gsData = target._gsap || _harness(targets)[i]._gsap;\n      tween._ptLookup[i] = ptLookup = {};\n      _lazyLookup[gsData.id] && _lazyTweens.length && _lazyRender(); //if other tweens of the same target have recently initted but haven't rendered yet, we've got to force the render so that the starting values are correct (imagine populating a timeline with a bunch of sequential tweens and then jumping to the end)\n\n      index = fullTargets === targets ? i : fullTargets.indexOf(target);\n\n      if (harness && (plugin = new harness()).init(target, harnessVars || cleanVars, tween, index, fullTargets) !== false) {\n        tween._pt = pt = new PropTween(tween._pt, target, plugin.name, 0, 1, plugin.render, plugin, 0, plugin.priority);\n\n        plugin._props.forEach(function (name) {\n          ptLookup[name] = pt;\n        });\n\n        plugin.priority && (hasPriority = 1);\n      }\n\n      if (!harness || harnessVars) {\n        for (p in cleanVars) {\n          if (_plugins[p] && (plugin = _checkPlugin(p, cleanVars, tween, index, target, fullTargets))) {\n            plugin.priority && (hasPriority = 1);\n          } else {\n            ptLookup[p] = pt = _addPropTween.call(tween, target, p, \"get\", cleanVars[p], index, fullTargets, 0, vars.stringFilter);\n          }\n        }\n      }\n\n      tween._op && tween._op[i] && tween.kill(target, tween._op[i]);\n\n      if (autoOverwrite && tween._pt) {\n        _overwritingTween = tween;\n\n        _globalTimeline.killTweensOf(target, ptLookup, tween.globalTime(time)); // make sure the overwriting doesn't overwrite THIS tween!!!\n\n\n        overwritten = !tween.parent;\n        _overwritingTween = 0;\n      }\n\n      tween._pt && lazy && (_lazyLookup[gsData.id] = 1);\n    }\n\n    hasPriority && _sortPropTweensByPriority(tween);\n    tween._onInit && tween._onInit(tween); //plugins like RoundProps must wait until ALL of the PropTweens are instantiated. In the plugin's init() function, it sets the _onInit on the tween instance. May not be pretty/intuitive, but it's fast and keeps file size down.\n  }\n\n  tween._onUpdate = onUpdate;\n  tween._initted = (!tween._op || tween._pt) && !overwritten; // if overwrittenProps resulted in the entire tween being killed, do NOT flag it as initted or else it may render for one tick.\n\n  keyframes && time <= 0 && tl.render(_bigNum, true, true); // if there's a 0% keyframe, it'll render in the \"before\" state for any staggered/delayed animations thus when the following tween initializes, it'll use the \"before\" state instead of the \"after\" state as the initial values.\n},\n    _updatePropTweens = function _updatePropTweens(tween, property, value, start, startIsRelative, ratio, time, skipRecursion) {\n  var ptCache = (tween._pt && tween._ptCache || (tween._ptCache = {}))[property],\n      pt,\n      rootPT,\n      lookup,\n      i;\n\n  if (!ptCache) {\n    ptCache = tween._ptCache[property] = [];\n    lookup = tween._ptLookup;\n    i = tween._targets.length;\n\n    while (i--) {\n      pt = lookup[i][property];\n\n      if (pt && pt.d && pt.d._pt) {\n        // it's a plugin, so find the nested PropTween\n        pt = pt.d._pt;\n\n        while (pt && pt.p !== property && pt.fp !== property) {\n          // \"fp\" is functionParam for things like setting CSS variables which require .setProperty(\"--var-name\", value)\n          pt = pt._next;\n        }\n      }\n\n      if (!pt) {\n        // there is no PropTween associated with that property, so we must FORCE one to be created and ditch out of this\n        // if the tween has other properties that already rendered at new positions, we'd normally have to rewind to put them back like tween.render(0, true) before forcing an _initTween(), but that can create another edge case like tweening a timeline's progress would trigger onUpdates to fire which could move other things around. It's better to just inform users that .resetTo() should ONLY be used for tweens that already have that property. For example, you can't gsap.to(...{ y: 0 }) and then tween.restTo(\"x\", 200) for example.\n        _forceAllPropTweens = 1; // otherwise, when we _addPropTween() and it finds no change between the start and end values, it skips creating a PropTween (for efficiency...why tween when there's no difference?) but in this case we NEED that PropTween created so we can edit it.\n\n        tween.vars[property] = \"+=0\";\n\n        _initTween(tween, time);\n\n        _forceAllPropTweens = 0;\n        return skipRecursion ? _warn(property + \" not eligible for reset\") : 1; // if someone tries to do a quickTo() on a special property like borderRadius which must get split into 4 different properties, that's not eligible for .resetTo().\n      }\n\n      ptCache.push(pt);\n    }\n  }\n\n  i = ptCache.length;\n\n  while (i--) {\n    rootPT = ptCache[i];\n    pt = rootPT._pt || rootPT; // complex values may have nested PropTweens. We only accommodate the FIRST value.\n\n    pt.s = (start || start === 0) && !startIsRelative ? start : pt.s + (start || 0) + ratio * pt.c;\n    pt.c = value - pt.s;\n    rootPT.e && (rootPT.e = _round(value) + getUnit(rootPT.e)); // mainly for CSSPlugin (end value)\n\n    rootPT.b && (rootPT.b = pt.s + getUnit(rootPT.b)); // (beginning value)\n  }\n},\n    _addAliasesToVars = function _addAliasesToVars(targets, vars) {\n  var harness = targets[0] ? _getCache(targets[0]).harness : 0,\n      propertyAliases = harness && harness.aliases,\n      copy,\n      p,\n      i,\n      aliases;\n\n  if (!propertyAliases) {\n    return vars;\n  }\n\n  copy = _merge({}, vars);\n\n  for (p in propertyAliases) {\n    if (p in copy) {\n      aliases = propertyAliases[p].split(\",\");\n      i = aliases.length;\n\n      while (i--) {\n        copy[aliases[i]] = copy[p];\n      }\n    }\n  }\n\n  return copy;\n},\n    // parses multiple formats, like {\"0%\": {x: 100}, {\"50%\": {x: -20}} and { x: {\"0%\": 100, \"50%\": -20} }, and an \"ease\" can be set on any object. We populate an \"allProps\" object with an Array for each property, like {x: [{}, {}], y:[{}, {}]} with data for each property tween. The objects have a \"t\" (time), \"v\", (value), and \"e\" (ease) property. This allows us to piece together a timeline later.\n_parseKeyframe = function _parseKeyframe(prop, obj, allProps, easeEach) {\n  var ease = obj.ease || easeEach || \"power1.inOut\",\n      p,\n      a;\n\n  if (_isArray(obj)) {\n    a = allProps[prop] || (allProps[prop] = []); // t = time (out of 100), v = value, e = ease\n\n    obj.forEach(function (value, i) {\n      return a.push({\n        t: i / (obj.length - 1) * 100,\n        v: value,\n        e: ease\n      });\n    });\n  } else {\n    for (p in obj) {\n      a = allProps[p] || (allProps[p] = []);\n      p === \"ease\" || a.push({\n        t: parseFloat(prop),\n        v: obj[p],\n        e: ease\n      });\n    }\n  }\n},\n    _parseFuncOrString = function _parseFuncOrString(value, tween, i, target, targets) {\n  return _isFunction(value) ? value.call(tween, i, target, targets) : _isString(value) && ~value.indexOf(\"random(\") ? _replaceRandom(value) : value;\n},\n    _staggerTweenProps = _callbackNames + \"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert\",\n    _staggerPropsToSkip = {};\n\n_forEachName(_staggerTweenProps + \",id,stagger,delay,duration,paused,scrollTrigger\", function (name) {\n  return _staggerPropsToSkip[name] = 1;\n});\n/*\n * --------------------------------------------------------------------------------------\n * TWEEN\n * --------------------------------------------------------------------------------------\n */\n\n\nexport var Tween = /*#__PURE__*/function (_Animation2) {\n  _inheritsLoose(Tween, _Animation2);\n\n  function Tween(targets, vars, position, skipInherit) {\n    var _this3;\n\n    if (typeof vars === \"number\") {\n      position.duration = vars;\n      vars = position;\n      position = null;\n    }\n\n    _this3 = _Animation2.call(this, skipInherit ? vars : _inheritDefaults(vars)) || this;\n    var _this3$vars = _this3.vars,\n        duration = _this3$vars.duration,\n        delay = _this3$vars.delay,\n        immediateRender = _this3$vars.immediateRender,\n        stagger = _this3$vars.stagger,\n        overwrite = _this3$vars.overwrite,\n        keyframes = _this3$vars.keyframes,\n        defaults = _this3$vars.defaults,\n        scrollTrigger = _this3$vars.scrollTrigger,\n        yoyoEase = _this3$vars.yoyoEase,\n        parent = vars.parent || _globalTimeline,\n        parsedTargets = (_isArray(targets) || _isTypedArray(targets) ? _isNumber(targets[0]) : \"length\" in vars) ? [targets] : toArray(targets),\n        tl,\n        i,\n        copy,\n        l,\n        p,\n        curTarget,\n        staggerFunc,\n        staggerVarsToMerge;\n    _this3._targets = parsedTargets.length ? _harness(parsedTargets) : _warn(\"GSAP target \" + targets + \" not found. https://gsap.com\", !_config.nullTargetWarn) || [];\n    _this3._ptLookup = []; //PropTween lookup. An array containing an object for each target, having keys for each tweening property\n\n    _this3._overwrite = overwrite;\n\n    if (keyframes || stagger || _isFuncOrString(duration) || _isFuncOrString(delay)) {\n      vars = _this3.vars;\n      tl = _this3.timeline = new Timeline({\n        data: \"nested\",\n        defaults: defaults || {},\n        targets: parent && parent.data === \"nested\" ? parent.vars.targets : parsedTargets\n      }); // we need to store the targets because for staggers and keyframes, we end up creating an individual tween for each but function-based values need to know the index and the whole Array of targets.\n\n      tl.kill();\n      tl.parent = tl._dp = _assertThisInitialized(_this3);\n      tl._start = 0;\n\n      if (stagger || _isFuncOrString(duration) || _isFuncOrString(delay)) {\n        l = parsedTargets.length;\n        staggerFunc = stagger && distribute(stagger);\n\n        if (_isObject(stagger)) {\n          //users can pass in callbacks like onStart/onComplete in the stagger object. These should fire with each individual tween.\n          for (p in stagger) {\n            if (~_staggerTweenProps.indexOf(p)) {\n              staggerVarsToMerge || (staggerVarsToMerge = {});\n              staggerVarsToMerge[p] = stagger[p];\n            }\n          }\n        }\n\n        for (i = 0; i < l; i++) {\n          copy = _copyExcluding(vars, _staggerPropsToSkip);\n          copy.stagger = 0;\n          yoyoEase && (copy.yoyoEase = yoyoEase);\n          staggerVarsToMerge && _merge(copy, staggerVarsToMerge);\n          curTarget = parsedTargets[i]; //don't just copy duration or delay because if they're a string or function, we'd end up in an infinite loop because _isFuncOrString() would evaluate as true in the child tweens, entering this loop, etc. So we parse the value straight from vars and default to 0.\n\n          copy.duration = +_parseFuncOrString(duration, _assertThisInitialized(_this3), i, curTarget, parsedTargets);\n          copy.delay = (+_parseFuncOrString(delay, _assertThisInitialized(_this3), i, curTarget, parsedTargets) || 0) - _this3._delay;\n\n          if (!stagger && l === 1 && copy.delay) {\n            // if someone does delay:\"random(1, 5)\", repeat:-1, for example, the delay shouldn't be inside the repeat.\n            _this3._delay = delay = copy.delay;\n            _this3._start += delay;\n            copy.delay = 0;\n          }\n\n          tl.to(curTarget, copy, staggerFunc ? staggerFunc(i, curTarget, parsedTargets) : 0);\n          tl._ease = _easeMap.none;\n        }\n\n        tl.duration() ? duration = delay = 0 : _this3.timeline = 0; // if the timeline's duration is 0, we don't need a timeline internally!\n      } else if (keyframes) {\n        _inheritDefaults(_setDefaults(tl.vars.defaults, {\n          ease: \"none\"\n        }));\n\n        tl._ease = _parseEase(keyframes.ease || vars.ease || \"none\");\n        var time = 0,\n            a,\n            kf,\n            v;\n\n        if (_isArray(keyframes)) {\n          keyframes.forEach(function (frame) {\n            return tl.to(parsedTargets, frame, \">\");\n          });\n          tl.duration(); // to ensure tl._dur is cached because we tap into it for performance purposes in the render() method.\n        } else {\n          copy = {};\n\n          for (p in keyframes) {\n            p === \"ease\" || p === \"easeEach\" || _parseKeyframe(p, keyframes[p], copy, keyframes.easeEach);\n          }\n\n          for (p in copy) {\n            a = copy[p].sort(function (a, b) {\n              return a.t - b.t;\n            });\n            time = 0;\n\n            for (i = 0; i < a.length; i++) {\n              kf = a[i];\n              v = {\n                ease: kf.e,\n                duration: (kf.t - (i ? a[i - 1].t : 0)) / 100 * duration\n              };\n              v[p] = kf.v;\n              tl.to(parsedTargets, v, time);\n              time += v.duration;\n            }\n          }\n\n          tl.duration() < duration && tl.to({}, {\n            duration: duration - tl.duration()\n          }); // in case keyframes didn't go to 100%\n        }\n      }\n\n      duration || _this3.duration(duration = tl.duration());\n    } else {\n      _this3.timeline = 0; //speed optimization, faster lookups (no going up the prototype chain)\n    }\n\n    if (overwrite === true && !_suppressOverwrites) {\n      _overwritingTween = _assertThisInitialized(_this3);\n\n      _globalTimeline.killTweensOf(parsedTargets);\n\n      _overwritingTween = 0;\n    }\n\n    _addToTimeline(parent, _assertThisInitialized(_this3), position);\n\n    vars.reversed && _this3.reverse();\n    vars.paused && _this3.paused(true);\n\n    if (immediateRender || !duration && !keyframes && _this3._start === _roundPrecise(parent._time) && _isNotFalse(immediateRender) && _hasNoPausedAncestors(_assertThisInitialized(_this3)) && parent.data !== \"nested\") {\n      _this3._tTime = -_tinyNum; //forces a render without having to set the render() \"force\" parameter to true because we want to allow lazying by default (using the \"force\" parameter always forces an immediate full render)\n\n      _this3.render(Math.max(0, -delay) || 0); //in case delay is negative\n\n    }\n\n    scrollTrigger && _scrollTrigger(_assertThisInitialized(_this3), scrollTrigger);\n    return _this3;\n  }\n\n  var _proto3 = Tween.prototype;\n\n  _proto3.render = function render(totalTime, suppressEvents, force) {\n    var prevTime = this._time,\n        tDur = this._tDur,\n        dur = this._dur,\n        isNegative = totalTime < 0,\n        tTime = totalTime > tDur - _tinyNum && !isNegative ? tDur : totalTime < _tinyNum ? 0 : totalTime,\n        time,\n        pt,\n        iteration,\n        cycleDuration,\n        prevIteration,\n        isYoyo,\n        ratio,\n        timeline,\n        yoyoEase;\n\n    if (!dur) {\n      _renderZeroDurationTween(this, totalTime, suppressEvents, force);\n    } else if (tTime !== this._tTime || !totalTime || force || !this._initted && this._tTime || this._startAt && this._zTime < 0 !== isNegative) {\n      //this senses if we're crossing over the start time, in which case we must record _zTime and force the render, but we do it in this lengthy conditional way for performance reasons (usually we can skip the calculations): this._initted && (this._zTime < 0) !== (totalTime < 0)\n      time = tTime;\n      timeline = this.timeline;\n\n      if (this._repeat) {\n        //adjust the time for repeats and yoyos\n        cycleDuration = dur + this._rDelay;\n\n        if (this._repeat < -1 && isNegative) {\n          return this.totalTime(cycleDuration * 100 + totalTime, suppressEvents, force);\n        }\n\n        time = _roundPrecise(tTime % cycleDuration); //round to avoid floating point errors. (4 % 0.8 should be 0 but some browsers report it as 0.79999999!)\n\n        if (tTime === tDur) {\n          // the tDur === tTime is for edge cases where there's a lengthy decimal on the duration and it may reach the very end but the time is rendered as not-quite-there (remember, tDur is rounded to 4 decimals whereas dur isn't)\n          iteration = this._repeat;\n          time = dur;\n        } else {\n          iteration = ~~(tTime / cycleDuration);\n\n          if (iteration && iteration === _roundPrecise(tTime / cycleDuration)) {\n            time = dur;\n            iteration--;\n          }\n\n          time > dur && (time = dur);\n        }\n\n        isYoyo = this._yoyo && iteration & 1;\n\n        if (isYoyo) {\n          yoyoEase = this._yEase;\n          time = dur - time;\n        }\n\n        prevIteration = _animationCycle(this._tTime, cycleDuration);\n\n        if (time === prevTime && !force && this._initted && iteration === prevIteration) {\n          //could be during the repeatDelay part. No need to render and fire callbacks.\n          this._tTime = tTime;\n          return this;\n        }\n\n        if (iteration !== prevIteration) {\n          timeline && this._yEase && _propagateYoyoEase(timeline, isYoyo); //repeatRefresh functionality\n\n          if (this.vars.repeatRefresh && !isYoyo && !this._lock && this._time !== cycleDuration && this._initted) {\n            // this._time will === cycleDuration when we render at EXACTLY the end of an iteration. Without this condition, it'd often do the repeatRefresh render TWICE (again on the very next tick).\n            this._lock = force = 1; //force, otherwise if lazy is true, the _attemptInitTween() will return and we'll jump out and get caught bouncing on each tick.\n\n            this.render(_roundPrecise(cycleDuration * iteration), true).invalidate()._lock = 0;\n          }\n        }\n      }\n\n      if (!this._initted) {\n        if (_attemptInitTween(this, isNegative ? totalTime : time, force, suppressEvents, tTime)) {\n          this._tTime = 0; // in constructor if immediateRender is true, we set _tTime to -_tinyNum to have the playhead cross the starting point but we can't leave _tTime as a negative number.\n\n          return this;\n        }\n\n        if (prevTime !== this._time && !(force && this.vars.repeatRefresh && iteration !== prevIteration)) {\n          // rare edge case - during initialization, an onUpdate in the _startAt (.fromTo()) might force this tween to render at a different spot in which case we should ditch this render() call so that it doesn't revert the values. But we also don't want to dump if we're doing a repeatRefresh render!\n          return this;\n        }\n\n        if (dur !== this._dur) {\n          // while initting, a plugin like InertiaPlugin might alter the duration, so rerun from the start to ensure everything renders as it should.\n          return this.render(totalTime, suppressEvents, force);\n        }\n      }\n\n      this._tTime = tTime;\n      this._time = time;\n\n      if (!this._act && this._ts) {\n        this._act = 1; //as long as it's not paused, force it to be active so that if the user renders independent of the parent timeline, it'll be forced to re-render on the next tick.\n\n        this._lazy = 0;\n      }\n\n      this.ratio = ratio = (yoyoEase || this._ease)(time / dur);\n\n      if (this._from) {\n        this.ratio = ratio = 1 - ratio;\n      }\n\n      if (time && !prevTime && !suppressEvents && !iteration) {\n        _callback(this, \"onStart\");\n\n        if (this._tTime !== tTime) {\n          // in case the onStart triggered a render at a different spot, eject. Like if someone did animation.pause(0.5) or something inside the onStart.\n          return this;\n        }\n      }\n\n      pt = this._pt;\n\n      while (pt) {\n        pt.r(ratio, pt.d);\n        pt = pt._next;\n      }\n\n      timeline && timeline.render(totalTime < 0 ? totalTime : timeline._dur * timeline._ease(time / this._dur), suppressEvents, force) || this._startAt && (this._zTime = totalTime);\n\n      if (this._onUpdate && !suppressEvents) {\n        isNegative && _rewindStartAt(this, totalTime, suppressEvents, force); //note: for performance reasons, we tuck this conditional logic inside less traveled areas (most tweens don't have an onUpdate). We'd just have it at the end before the onComplete, but the values should be updated before any onUpdate is called, so we ALSO put it here and then if it's not called, we do so later near the onComplete.\n\n        _callback(this, \"onUpdate\");\n      }\n\n      this._repeat && iteration !== prevIteration && this.vars.onRepeat && !suppressEvents && this.parent && _callback(this, \"onRepeat\");\n\n      if ((tTime === this._tDur || !tTime) && this._tTime === tTime) {\n        isNegative && !this._onUpdate && _rewindStartAt(this, totalTime, true, true);\n        (totalTime || !dur) && (tTime === this._tDur && this._ts > 0 || !tTime && this._ts < 0) && _removeFromParent(this, 1); // don't remove if we're rendering at exactly a time of 0, as there could be autoRevert values that should get set on the next tick (if the playhead goes backward beyond the startTime, negative totalTime). Don't remove if the timeline is reversed and the playhead isn't at 0, otherwise tl.progress(1).reverse() won't work. Only remove if the playhead is at the end and timeScale is positive, or if the playhead is at 0 and the timeScale is negative.\n\n        if (!suppressEvents && !(isNegative && !prevTime) && (tTime || prevTime || isYoyo)) {\n          // if prevTime and tTime are zero, we shouldn't fire the onReverseComplete. This could happen if you gsap.to(... {paused:true}).play();\n          _callback(this, tTime === tDur ? \"onComplete\" : \"onReverseComplete\", true);\n\n          this._prom && !(tTime < tDur && this.timeScale() > 0) && this._prom();\n        }\n      }\n    }\n\n    return this;\n  };\n\n  _proto3.targets = function targets() {\n    return this._targets;\n  };\n\n  _proto3.invalidate = function invalidate(soft) {\n    // \"soft\" gives us a way to clear out everything EXCEPT the recorded pre-\"from\" portion of from() tweens. Otherwise, for example, if you tween.progress(1).render(0, true true).invalidate(), the \"from\" values would persist and then on the next render, the from() tweens would initialize and the current value would match the \"from\" values, thus animate from the same value to the same value (no animation). We tap into this in ScrollTrigger's refresh() where we must push a tween to completion and then back again but honor its init state in case the tween is dependent on another tween further up on the page.\n    (!soft || !this.vars.runBackwards) && (this._startAt = 0);\n    this._pt = this._op = this._onUpdate = this._lazy = this.ratio = 0;\n    this._ptLookup = [];\n    this.timeline && this.timeline.invalidate(soft);\n    return _Animation2.prototype.invalidate.call(this, soft);\n  };\n\n  _proto3.resetTo = function resetTo(property, value, start, startIsRelative, skipRecursion) {\n    _tickerActive || _ticker.wake();\n    this._ts || this.play();\n    var time = Math.min(this._dur, (this._dp._time - this._start) * this._ts),\n        ratio;\n    this._initted || _initTween(this, time);\n    ratio = this._ease(time / this._dur); // don't just get tween.ratio because it may not have rendered yet.\n    // possible future addition to allow an object with multiple values to update, like tween.resetTo({x: 100, y: 200}); At this point, it doesn't seem worth the added kb given the fact that most users will likely opt for the convenient gsap.quickTo() way of interacting with this method.\n    // if (_isObject(property)) { // performance optimization\n    // \tfor (p in property) {\n    // \t\tif (_updatePropTweens(this, p, property[p], value ? value[p] : null, start, ratio, time)) {\n    // \t\t\treturn this.resetTo(property, value, start, startIsRelative); // if a PropTween wasn't found for the property, it'll get forced with a re-initialization so we need to jump out and start over again.\n    // \t\t}\n    // \t}\n    // } else {\n\n    if (_updatePropTweens(this, property, value, start, startIsRelative, ratio, time, skipRecursion)) {\n      return this.resetTo(property, value, start, startIsRelative, 1); // if a PropTween wasn't found for the property, it'll get forced with a re-initialization so we need to jump out and start over again.\n    } //}\n\n\n    _alignPlayhead(this, 0);\n\n    this.parent || _addLinkedListItem(this._dp, this, \"_first\", \"_last\", this._dp._sort ? \"_start\" : 0);\n    return this.render(0);\n  };\n\n  _proto3.kill = function kill(targets, vars) {\n    if (vars === void 0) {\n      vars = \"all\";\n    }\n\n    if (!targets && (!vars || vars === \"all\")) {\n      this._lazy = this._pt = 0;\n      return this.parent ? _interrupt(this) : this;\n    }\n\n    if (this.timeline) {\n      var tDur = this.timeline.totalDuration();\n      this.timeline.killTweensOf(targets, vars, _overwritingTween && _overwritingTween.vars.overwrite !== true)._first || _interrupt(this); // if nothing is left tweening, interrupt.\n\n      this.parent && tDur !== this.timeline.totalDuration() && _setDuration(this, this._dur * this.timeline._tDur / tDur, 0, 1); // if a nested tween is killed that changes the duration, it should affect this tween's duration. We must use the ratio, though, because sometimes the internal timeline is stretched like for keyframes where they don't all add up to whatever the parent tween's duration was set to.\n\n      return this;\n    }\n\n    var parsedTargets = this._targets,\n        killingTargets = targets ? toArray(targets) : parsedTargets,\n        propTweenLookup = this._ptLookup,\n        firstPT = this._pt,\n        overwrittenProps,\n        curLookup,\n        curOverwriteProps,\n        props,\n        p,\n        pt,\n        i;\n\n    if ((!vars || vars === \"all\") && _arraysMatch(parsedTargets, killingTargets)) {\n      vars === \"all\" && (this._pt = 0);\n      return _interrupt(this);\n    }\n\n    overwrittenProps = this._op = this._op || [];\n\n    if (vars !== \"all\") {\n      //so people can pass in a comma-delimited list of property names\n      if (_isString(vars)) {\n        p = {};\n\n        _forEachName(vars, function (name) {\n          return p[name] = 1;\n        });\n\n        vars = p;\n      }\n\n      vars = _addAliasesToVars(parsedTargets, vars);\n    }\n\n    i = parsedTargets.length;\n\n    while (i--) {\n      if (~killingTargets.indexOf(parsedTargets[i])) {\n        curLookup = propTweenLookup[i];\n\n        if (vars === \"all\") {\n          overwrittenProps[i] = vars;\n          props = curLookup;\n          curOverwriteProps = {};\n        } else {\n          curOverwriteProps = overwrittenProps[i] = overwrittenProps[i] || {};\n          props = vars;\n        }\n\n        for (p in props) {\n          pt = curLookup && curLookup[p];\n\n          if (pt) {\n            if (!(\"kill\" in pt.d) || pt.d.kill(p) === true) {\n              _removeLinkedListItem(this, pt, \"_pt\");\n            }\n\n            delete curLookup[p];\n          }\n\n          if (curOverwriteProps !== \"all\") {\n            curOverwriteProps[p] = 1;\n          }\n        }\n      }\n    }\n\n    this._initted && !this._pt && firstPT && _interrupt(this); //if all tweening properties are killed, kill the tween. Without this line, if there's a tween with multiple targets and then you killTweensOf() each target individually, the tween would technically still remain active and fire its onComplete even though there aren't any more properties tweening.\n\n    return this;\n  };\n\n  Tween.to = function to(targets, vars) {\n    return new Tween(targets, vars, arguments[2]);\n  };\n\n  Tween.from = function from(targets, vars) {\n    return _createTweenType(1, arguments);\n  };\n\n  Tween.delayedCall = function delayedCall(delay, callback, params, scope) {\n    return new Tween(callback, 0, {\n      immediateRender: false,\n      lazy: false,\n      overwrite: false,\n      delay: delay,\n      onComplete: callback,\n      onReverseComplete: callback,\n      onCompleteParams: params,\n      onReverseCompleteParams: params,\n      callbackScope: scope\n    }); // we must use onReverseComplete too for things like timeline.add(() => {...}) which should be triggered in BOTH directions (forward and reverse)\n  };\n\n  Tween.fromTo = function fromTo(targets, fromVars, toVars) {\n    return _createTweenType(2, arguments);\n  };\n\n  Tween.set = function set(targets, vars) {\n    vars.duration = 0;\n    vars.repeatDelay || (vars.repeat = 0);\n    return new Tween(targets, vars);\n  };\n\n  Tween.killTweensOf = function killTweensOf(targets, props, onlyActive) {\n    return _globalTimeline.killTweensOf(targets, props, onlyActive);\n  };\n\n  return Tween;\n}(Animation);\n\n_setDefaults(Tween.prototype, {\n  _targets: [],\n  _lazy: 0,\n  _startAt: 0,\n  _op: 0,\n  _onInit: 0\n}); //add the pertinent timeline methods to Tween instances so that users can chain conveniently and create a timeline automatically. (removed due to concerns that it'd ultimately add to more confusion especially for beginners)\n// _forEachName(\"to,from,fromTo,set,call,add,addLabel,addPause\", name => {\n// \tTween.prototype[name] = function() {\n// \t\tlet tl = new Timeline();\n// \t\treturn _addToTimeline(tl, this)[name].apply(tl, toArray(arguments));\n// \t}\n// });\n//for backward compatibility. Leverage the timeline calls.\n\n\n_forEachName(\"staggerTo,staggerFrom,staggerFromTo\", function (name) {\n  Tween[name] = function () {\n    var tl = new Timeline(),\n        params = _slice.call(arguments, 0);\n\n    params.splice(name === \"staggerFromTo\" ? 5 : 4, 0, 0);\n    return tl[name].apply(tl, params);\n  };\n});\n/*\n * --------------------------------------------------------------------------------------\n * PROPTWEEN\n * --------------------------------------------------------------------------------------\n */\n\n\nvar _setterPlain = function _setterPlain(target, property, value) {\n  return target[property] = value;\n},\n    _setterFunc = function _setterFunc(target, property, value) {\n  return target[property](value);\n},\n    _setterFuncWithParam = function _setterFuncWithParam(target, property, value, data) {\n  return target[property](data.fp, value);\n},\n    _setterAttribute = function _setterAttribute(target, property, value) {\n  return target.setAttribute(property, value);\n},\n    _getSetter = function _getSetter(target, property) {\n  return _isFunction(target[property]) ? _setterFunc : _isUndefined(target[property]) && target.setAttribute ? _setterAttribute : _setterPlain;\n},\n    _renderPlain = function _renderPlain(ratio, data) {\n  return data.set(data.t, data.p, Math.round((data.s + data.c * ratio) * 1000000) / 1000000, data);\n},\n    _renderBoolean = function _renderBoolean(ratio, data) {\n  return data.set(data.t, data.p, !!(data.s + data.c * ratio), data);\n},\n    _renderComplexString = function _renderComplexString(ratio, data) {\n  var pt = data._pt,\n      s = \"\";\n\n  if (!ratio && data.b) {\n    //b = beginning string\n    s = data.b;\n  } else if (ratio === 1 && data.e) {\n    //e = ending string\n    s = data.e;\n  } else {\n    while (pt) {\n      s = pt.p + (pt.m ? pt.m(pt.s + pt.c * ratio) : Math.round((pt.s + pt.c * ratio) * 10000) / 10000) + s; //we use the \"p\" property for the text inbetween (like a suffix). And in the context of a complex string, the modifier (m) is typically just Math.round(), like for RGB colors.\n\n      pt = pt._next;\n    }\n\n    s += data.c; //we use the \"c\" of the PropTween to store the final chunk of non-numeric text.\n  }\n\n  data.set(data.t, data.p, s, data);\n},\n    _renderPropTweens = function _renderPropTweens(ratio, data) {\n  var pt = data._pt;\n\n  while (pt) {\n    pt.r(ratio, pt.d);\n    pt = pt._next;\n  }\n},\n    _addPluginModifier = function _addPluginModifier(modifier, tween, target, property) {\n  var pt = this._pt,\n      next;\n\n  while (pt) {\n    next = pt._next;\n    pt.p === property && pt.modifier(modifier, tween, target);\n    pt = next;\n  }\n},\n    _killPropTweensOf = function _killPropTweensOf(property) {\n  var pt = this._pt,\n      hasNonDependentRemaining,\n      next;\n\n  while (pt) {\n    next = pt._next;\n\n    if (pt.p === property && !pt.op || pt.op === property) {\n      _removeLinkedListItem(this, pt, \"_pt\");\n    } else if (!pt.dep) {\n      hasNonDependentRemaining = 1;\n    }\n\n    pt = next;\n  }\n\n  return !hasNonDependentRemaining;\n},\n    _setterWithModifier = function _setterWithModifier(target, property, value, data) {\n  data.mSet(target, property, data.m.call(data.tween, value, data.mt), data);\n},\n    _sortPropTweensByPriority = function _sortPropTweensByPriority(parent) {\n  var pt = parent._pt,\n      next,\n      pt2,\n      first,\n      last; //sorts the PropTween linked list in order of priority because some plugins need to do their work after ALL of the PropTweens were created (like RoundPropsPlugin and ModifiersPlugin)\n\n  while (pt) {\n    next = pt._next;\n    pt2 = first;\n\n    while (pt2 && pt2.pr > pt.pr) {\n      pt2 = pt2._next;\n    }\n\n    if (pt._prev = pt2 ? pt2._prev : last) {\n      pt._prev._next = pt;\n    } else {\n      first = pt;\n    }\n\n    if (pt._next = pt2) {\n      pt2._prev = pt;\n    } else {\n      last = pt;\n    }\n\n    pt = next;\n  }\n\n  parent._pt = first;\n}; //PropTween key: t = target, p = prop, r = renderer, d = data, s = start, c = change, op = overwriteProperty (ONLY populated when it's different than p), pr = priority, _next/_prev for the linked list siblings, set = setter, m = modifier, mSet = modifierSetter (the original setter, before a modifier was added)\n\n\nexport var PropTween = /*#__PURE__*/function () {\n  function PropTween(next, target, prop, start, change, renderer, data, setter, priority) {\n    this.t = target;\n    this.s = start;\n    this.c = change;\n    this.p = prop;\n    this.r = renderer || _renderPlain;\n    this.d = data || this;\n    this.set = setter || _setterPlain;\n    this.pr = priority || 0;\n    this._next = next;\n\n    if (next) {\n      next._prev = this;\n    }\n  }\n\n  var _proto4 = PropTween.prototype;\n\n  _proto4.modifier = function modifier(func, tween, target) {\n    this.mSet = this.mSet || this.set; //in case it was already set (a PropTween can only have one modifier)\n\n    this.set = _setterWithModifier;\n    this.m = func;\n    this.mt = target; //modifier target\n\n    this.tween = tween;\n  };\n\n  return PropTween;\n}(); //Initialization tasks\n\n_forEachName(_callbackNames + \"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger\", function (name) {\n  return _reservedProps[name] = 1;\n});\n\n_globals.TweenMax = _globals.TweenLite = Tween;\n_globals.TimelineLite = _globals.TimelineMax = Timeline;\n_globalTimeline = new Timeline({\n  sortChildren: false,\n  defaults: _defaults,\n  autoRemoveChildren: true,\n  id: \"root\",\n  smoothChildTiming: true\n});\n_config.stringFilter = _colorStringFilter;\n\nvar _media = [],\n    _listeners = {},\n    _emptyArray = [],\n    _lastMediaTime = 0,\n    _contextID = 0,\n    _dispatch = function _dispatch(type) {\n  return (_listeners[type] || _emptyArray).map(function (f) {\n    return f();\n  });\n},\n    _onMediaChange = function _onMediaChange() {\n  var time = Date.now(),\n      matches = [];\n\n  if (time - _lastMediaTime > 2) {\n    _dispatch(\"matchMediaInit\");\n\n    _media.forEach(function (c) {\n      var queries = c.queries,\n          conditions = c.conditions,\n          match,\n          p,\n          anyMatch,\n          toggled;\n\n      for (p in queries) {\n        match = _win.matchMedia(queries[p]).matches; // Firefox doesn't update the \"matches\" property of the MediaQueryList object correctly - it only does so as it calls its change handler - so we must re-create a media query here to ensure it's accurate.\n\n        match && (anyMatch = 1);\n\n        if (match !== conditions[p]) {\n          conditions[p] = match;\n          toggled = 1;\n        }\n      }\n\n      if (toggled) {\n        c.revert();\n        anyMatch && matches.push(c);\n      }\n    });\n\n    _dispatch(\"matchMediaRevert\");\n\n    matches.forEach(function (c) {\n      return c.onMatch(c, function (func) {\n        return c.add(null, func);\n      });\n    });\n    _lastMediaTime = time;\n\n    _dispatch(\"matchMedia\");\n  }\n};\n\nvar Context = /*#__PURE__*/function () {\n  function Context(func, scope) {\n    this.selector = scope && selector(scope);\n    this.data = [];\n    this._r = []; // returned/cleanup functions\n\n    this.isReverted = false;\n    this.id = _contextID++; // to work around issues that frameworks like Vue cause by making things into Proxies which make it impossible to do something like _media.indexOf(this) because \"this\" would no longer refer to the Context instance itself - it'd refer to a Proxy! We needed a way to identify the context uniquely\n\n    func && this.add(func);\n  }\n\n  var _proto5 = Context.prototype;\n\n  _proto5.add = function add(name, func, scope) {\n    // possible future addition if we need the ability to add() an animation to a context and for whatever reason cannot create that animation inside of a context.add(() => {...}) function.\n    // if (name && _isFunction(name.revert)) {\n    // \tthis.data.push(name);\n    // \treturn (name._ctx = this);\n    // }\n    if (_isFunction(name)) {\n      scope = func;\n      func = name;\n      name = _isFunction;\n    }\n\n    var self = this,\n        f = function f() {\n      var prev = _context,\n          prevSelector = self.selector,\n          result;\n      prev && prev !== self && prev.data.push(self);\n      scope && (self.selector = selector(scope));\n      _context = self;\n      result = func.apply(self, arguments);\n      _isFunction(result) && self._r.push(result);\n      _context = prev;\n      self.selector = prevSelector;\n      self.isReverted = false;\n      return result;\n    };\n\n    self.last = f;\n    return name === _isFunction ? f(self, function (func) {\n      return self.add(null, func);\n    }) : name ? self[name] = f : f;\n  };\n\n  _proto5.ignore = function ignore(func) {\n    var prev = _context;\n    _context = null;\n    func(this);\n    _context = prev;\n  };\n\n  _proto5.getTweens = function getTweens() {\n    var a = [];\n    this.data.forEach(function (e) {\n      return e instanceof Context ? a.push.apply(a, e.getTweens()) : e instanceof Tween && !(e.parent && e.parent.data === \"nested\") && a.push(e);\n    });\n    return a;\n  };\n\n  _proto5.clear = function clear() {\n    this._r.length = this.data.length = 0;\n  };\n\n  _proto5.kill = function kill(revert, matchMedia) {\n    var _this4 = this;\n\n    if (revert) {\n      (function () {\n        var tweens = _this4.getTweens(),\n            i = _this4.data.length,\n            t;\n\n        while (i--) {\n          // Flip plugin tweens are very different in that they should actually be pushed to their end. The plugin replaces the timeline's .revert() method to do exactly that. But we also need to remove any of those nested tweens inside the flip timeline so that they don't get individually reverted.\n          t = _this4.data[i];\n\n          if (t.data === \"isFlip\") {\n            t.revert();\n            t.getChildren(true, true, false).forEach(function (tween) {\n              return tweens.splice(tweens.indexOf(tween), 1);\n            });\n          }\n        } // save as an object so that we can cache the globalTime for each tween to optimize performance during the sort\n\n\n        tweens.map(function (t) {\n          return {\n            g: t._dur || t._delay || t._sat && !t._sat.vars.immediateRender ? t.globalTime(0) : -Infinity,\n            t: t\n          };\n        }).sort(function (a, b) {\n          return b.g - a.g || -Infinity;\n        }).forEach(function (o) {\n          return o.t.revert(revert);\n        }); // note: all of the _startAt tweens should be reverted in reverse order that they were created, and they'll all have the same globalTime (-1) so the \" || -1\" in the sort keeps the order properly.\n\n        i = _this4.data.length;\n\n        while (i--) {\n          // make sure we loop backwards so that, for example, SplitTexts that were created later on the same element get reverted first\n          t = _this4.data[i];\n\n          if (t instanceof Timeline) {\n            if (t.data !== \"nested\") {\n              t.scrollTrigger && t.scrollTrigger.revert();\n              t.kill(); // don't revert() the timeline because that's duplicating efforts since we already reverted all the tweens\n            }\n          } else {\n            !(t instanceof Tween) && t.revert && t.revert(revert);\n          }\n        }\n\n        _this4._r.forEach(function (f) {\n          return f(revert, _this4);\n        });\n\n        _this4.isReverted = true;\n      })();\n    } else {\n      this.data.forEach(function (e) {\n        return e.kill && e.kill();\n      });\n    }\n\n    this.clear();\n\n    if (matchMedia) {\n      var i = _media.length;\n\n      while (i--) {\n        // previously, we checked _media.indexOf(this), but some frameworks like Vue enforce Proxy objects that make it impossible to get the proper result that way, so we must use a unique ID number instead.\n        _media[i].id === this.id && _media.splice(i, 1);\n      }\n    }\n  };\n\n  _proto5.revert = function revert(config) {\n    this.kill(config || {});\n  };\n\n  return Context;\n}();\n\nvar MatchMedia = /*#__PURE__*/function () {\n  function MatchMedia(scope) {\n    this.contexts = [];\n    this.scope = scope;\n    _context && _context.data.push(this);\n  }\n\n  var _proto6 = MatchMedia.prototype;\n\n  _proto6.add = function add(conditions, func, scope) {\n    _isObject(conditions) || (conditions = {\n      matches: conditions\n    });\n    var context = new Context(0, scope || this.scope),\n        cond = context.conditions = {},\n        mq,\n        p,\n        active;\n    _context && !context.selector && (context.selector = _context.selector); // in case a context is created inside a context. Like a gsap.matchMedia() that's inside a scoped gsap.context()\n\n    this.contexts.push(context);\n    func = context.add(\"onMatch\", func);\n    context.queries = conditions;\n\n    for (p in conditions) {\n      if (p === \"all\") {\n        active = 1;\n      } else {\n        mq = _win.matchMedia(conditions[p]);\n\n        if (mq) {\n          _media.indexOf(context) < 0 && _media.push(context);\n          (cond[p] = mq.matches) && (active = 1);\n          mq.addListener ? mq.addListener(_onMediaChange) : mq.addEventListener(\"change\", _onMediaChange);\n        }\n      }\n    }\n\n    active && func(context, function (f) {\n      return context.add(null, f);\n    });\n    return this;\n  } // refresh() {\n  // \tlet time = _lastMediaTime,\n  // \t\tmedia = _media;\n  // \t_lastMediaTime = -1;\n  // \t_media = this.contexts;\n  // \t_onMediaChange();\n  // \t_lastMediaTime = time;\n  // \t_media = media;\n  // }\n  ;\n\n  _proto6.revert = function revert(config) {\n    this.kill(config || {});\n  };\n\n  _proto6.kill = function kill(revert) {\n    this.contexts.forEach(function (c) {\n      return c.kill(revert, true);\n    });\n  };\n\n  return MatchMedia;\n}();\n/*\n * --------------------------------------------------------------------------------------\n * GSAP\n * --------------------------------------------------------------------------------------\n */\n\n\nvar _gsap = {\n  registerPlugin: function registerPlugin() {\n    for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n      args[_key2] = arguments[_key2];\n    }\n\n    args.forEach(function (config) {\n      return _createPlugin(config);\n    });\n  },\n  timeline: function timeline(vars) {\n    return new Timeline(vars);\n  },\n  getTweensOf: function getTweensOf(targets, onlyActive) {\n    return _globalTimeline.getTweensOf(targets, onlyActive);\n  },\n  getProperty: function getProperty(target, property, unit, uncache) {\n    _isString(target) && (target = toArray(target)[0]); //in case selector text or an array is passed in\n\n    var getter = _getCache(target || {}).get,\n        format = unit ? _passThrough : _numericIfPossible;\n\n    unit === \"native\" && (unit = \"\");\n    return !target ? target : !property ? function (property, unit, uncache) {\n      return format((_plugins[property] && _plugins[property].get || getter)(target, property, unit, uncache));\n    } : format((_plugins[property] && _plugins[property].get || getter)(target, property, unit, uncache));\n  },\n  quickSetter: function quickSetter(target, property, unit) {\n    target = toArray(target);\n\n    if (target.length > 1) {\n      var setters = target.map(function (t) {\n        return gsap.quickSetter(t, property, unit);\n      }),\n          l = setters.length;\n      return function (value) {\n        var i = l;\n\n        while (i--) {\n          setters[i](value);\n        }\n      };\n    }\n\n    target = target[0] || {};\n\n    var Plugin = _plugins[property],\n        cache = _getCache(target),\n        p = cache.harness && (cache.harness.aliases || {})[property] || property,\n        // in case it's an alias, like \"rotate\" for \"rotation\".\n    setter = Plugin ? function (value) {\n      var p = new Plugin();\n      _quickTween._pt = 0;\n      p.init(target, unit ? value + unit : value, _quickTween, 0, [target]);\n      p.render(1, p);\n      _quickTween._pt && _renderPropTweens(1, _quickTween);\n    } : cache.set(target, p);\n\n    return Plugin ? setter : function (value) {\n      return setter(target, p, unit ? value + unit : value, cache, 1);\n    };\n  },\n  quickTo: function quickTo(target, property, vars) {\n    var _merge2;\n\n    var tween = gsap.to(target, _merge((_merge2 = {}, _merge2[property] = \"+=0.1\", _merge2.paused = true, _merge2), vars || {})),\n        func = function func(value, start, startIsRelative) {\n      return tween.resetTo(property, value, start, startIsRelative);\n    };\n\n    func.tween = tween;\n    return func;\n  },\n  isTweening: function isTweening(targets) {\n    return _globalTimeline.getTweensOf(targets, true).length > 0;\n  },\n  defaults: function defaults(value) {\n    value && value.ease && (value.ease = _parseEase(value.ease, _defaults.ease));\n    return _mergeDeep(_defaults, value || {});\n  },\n  config: function config(value) {\n    return _mergeDeep(_config, value || {});\n  },\n  registerEffect: function registerEffect(_ref3) {\n    var name = _ref3.name,\n        effect = _ref3.effect,\n        plugins = _ref3.plugins,\n        defaults = _ref3.defaults,\n        extendTimeline = _ref3.extendTimeline;\n    (plugins || \"\").split(\",\").forEach(function (pluginName) {\n      return pluginName && !_plugins[pluginName] && !_globals[pluginName] && _warn(name + \" effect requires \" + pluginName + \" plugin.\");\n    });\n\n    _effects[name] = function (targets, vars, tl) {\n      return effect(toArray(targets), _setDefaults(vars || {}, defaults), tl);\n    };\n\n    if (extendTimeline) {\n      Timeline.prototype[name] = function (targets, vars, position) {\n        return this.add(_effects[name](targets, _isObject(vars) ? vars : (position = vars) && {}, this), position);\n      };\n    }\n  },\n  registerEase: function registerEase(name, ease) {\n    _easeMap[name] = _parseEase(ease);\n  },\n  parseEase: function parseEase(ease, defaultEase) {\n    return arguments.length ? _parseEase(ease, defaultEase) : _easeMap;\n  },\n  getById: function getById(id) {\n    return _globalTimeline.getById(id);\n  },\n  exportRoot: function exportRoot(vars, includeDelayedCalls) {\n    if (vars === void 0) {\n      vars = {};\n    }\n\n    var tl = new Timeline(vars),\n        child,\n        next;\n    tl.smoothChildTiming = _isNotFalse(vars.smoothChildTiming);\n\n    _globalTimeline.remove(tl);\n\n    tl._dp = 0; //otherwise it'll get re-activated when adding children and be re-introduced into _globalTimeline's linked list (then added to itself).\n\n    tl._time = tl._tTime = _globalTimeline._time;\n    child = _globalTimeline._first;\n\n    while (child) {\n      next = child._next;\n\n      if (includeDelayedCalls || !(!child._dur && child instanceof Tween && child.vars.onComplete === child._targets[0])) {\n        _addToTimeline(tl, child, child._start - child._delay);\n      }\n\n      child = next;\n    }\n\n    _addToTimeline(_globalTimeline, tl, 0);\n\n    return tl;\n  },\n  context: function context(func, scope) {\n    return func ? new Context(func, scope) : _context;\n  },\n  matchMedia: function matchMedia(scope) {\n    return new MatchMedia(scope);\n  },\n  matchMediaRefresh: function matchMediaRefresh() {\n    return _media.forEach(function (c) {\n      var cond = c.conditions,\n          found,\n          p;\n\n      for (p in cond) {\n        if (cond[p]) {\n          cond[p] = false;\n          found = 1;\n        }\n      }\n\n      found && c.revert();\n    }) || _onMediaChange();\n  },\n  addEventListener: function addEventListener(type, callback) {\n    var a = _listeners[type] || (_listeners[type] = []);\n    ~a.indexOf(callback) || a.push(callback);\n  },\n  removeEventListener: function removeEventListener(type, callback) {\n    var a = _listeners[type],\n        i = a && a.indexOf(callback);\n    i >= 0 && a.splice(i, 1);\n  },\n  utils: {\n    wrap: wrap,\n    wrapYoyo: wrapYoyo,\n    distribute: distribute,\n    random: random,\n    snap: snap,\n    normalize: normalize,\n    getUnit: getUnit,\n    clamp: clamp,\n    splitColor: splitColor,\n    toArray: toArray,\n    selector: selector,\n    mapRange: mapRange,\n    pipe: pipe,\n    unitize: unitize,\n    interpolate: interpolate,\n    shuffle: shuffle\n  },\n  install: _install,\n  effects: _effects,\n  ticker: _ticker,\n  updateRoot: Timeline.updateRoot,\n  plugins: _plugins,\n  globalTimeline: _globalTimeline,\n  core: {\n    PropTween: PropTween,\n    globals: _addGlobal,\n    Tween: Tween,\n    Timeline: Timeline,\n    Animation: Animation,\n    getCache: _getCache,\n    _removeLinkedListItem: _removeLinkedListItem,\n    reverting: function reverting() {\n      return _reverting;\n    },\n    context: function context(toAdd) {\n      if (toAdd && _context) {\n        _context.data.push(toAdd);\n\n        toAdd._ctx = _context;\n      }\n\n      return _context;\n    },\n    suppressOverwrites: function suppressOverwrites(value) {\n      return _suppressOverwrites = value;\n    }\n  }\n};\n\n_forEachName(\"to,from,fromTo,delayedCall,set,killTweensOf\", function (name) {\n  return _gsap[name] = Tween[name];\n});\n\n_ticker.add(Timeline.updateRoot);\n\n_quickTween = _gsap.to({}, {\n  duration: 0\n}); // ---- EXTRA PLUGINS --------------------------------------------------------\n\nvar _getPluginPropTween = function _getPluginPropTween(plugin, prop) {\n  var pt = plugin._pt;\n\n  while (pt && pt.p !== prop && pt.op !== prop && pt.fp !== prop) {\n    pt = pt._next;\n  }\n\n  return pt;\n},\n    _addModifiers = function _addModifiers(tween, modifiers) {\n  var targets = tween._targets,\n      p,\n      i,\n      pt;\n\n  for (p in modifiers) {\n    i = targets.length;\n\n    while (i--) {\n      pt = tween._ptLookup[i][p];\n\n      if (pt && (pt = pt.d)) {\n        if (pt._pt) {\n          // is a plugin\n          pt = _getPluginPropTween(pt, p);\n        }\n\n        pt && pt.modifier && pt.modifier(modifiers[p], tween, targets[i], p);\n      }\n    }\n  }\n},\n    _buildModifierPlugin = function _buildModifierPlugin(name, modifier) {\n  return {\n    name: name,\n    rawVars: 1,\n    //don't pre-process function-based values or \"random()\" strings.\n    init: function init(target, vars, tween) {\n      tween._onInit = function (tween) {\n        var temp, p;\n\n        if (_isString(vars)) {\n          temp = {};\n\n          _forEachName(vars, function (name) {\n            return temp[name] = 1;\n          }); //if the user passes in a comma-delimited list of property names to roundProps, like \"x,y\", we round to whole numbers.\n\n\n          vars = temp;\n        }\n\n        if (modifier) {\n          temp = {};\n\n          for (p in vars) {\n            temp[p] = modifier(vars[p]);\n          }\n\n          vars = temp;\n        }\n\n        _addModifiers(tween, vars);\n      };\n    }\n  };\n}; //register core plugins\n\n\nexport var gsap = _gsap.registerPlugin({\n  name: \"attr\",\n  init: function init(target, vars, tween, index, targets) {\n    var p, pt, v;\n    this.tween = tween;\n\n    for (p in vars) {\n      v = target.getAttribute(p) || \"\";\n      pt = this.add(target, \"setAttribute\", (v || 0) + \"\", vars[p], index, targets, 0, 0, p);\n      pt.op = p;\n      pt.b = v; // record the beginning value so we can revert()\n\n      this._props.push(p);\n    }\n  },\n  render: function render(ratio, data) {\n    var pt = data._pt;\n\n    while (pt) {\n      _reverting ? pt.set(pt.t, pt.p, pt.b, pt) : pt.r(ratio, pt.d); // if reverting, go back to the original (pt.b)\n\n      pt = pt._next;\n    }\n  }\n}, {\n  name: \"endArray\",\n  init: function init(target, value) {\n    var i = value.length;\n\n    while (i--) {\n      this.add(target, i, target[i] || 0, value[i], 0, 0, 0, 0, 0, 1);\n    }\n  }\n}, _buildModifierPlugin(\"roundProps\", _roundModifier), _buildModifierPlugin(\"modifiers\"), _buildModifierPlugin(\"snap\", snap)) || _gsap; //to prevent the core plugins from being dropped via aggressive tree shaking, we must include them in the variable declaration in this way.\n\nTween.version = Timeline.version = gsap.version = \"3.12.5\";\n_coreReady = 1;\n_windowExists() && _wake();\nvar Power0 = _easeMap.Power0,\n    Power1 = _easeMap.Power1,\n    Power2 = _easeMap.Power2,\n    Power3 = _easeMap.Power3,\n    Power4 = _easeMap.Power4,\n    Linear = _easeMap.Linear,\n    Quad = _easeMap.Quad,\n    Cubic = _easeMap.Cubic,\n    Quart = _easeMap.Quart,\n    Quint = _easeMap.Quint,\n    Strong = _easeMap.Strong,\n    Elastic = _easeMap.Elastic,\n    Back = _easeMap.Back,\n    SteppedEase = _easeMap.SteppedEase,\n    Bounce = _easeMap.Bounce,\n    Sine = _easeMap.Sine,\n    Expo = _easeMap.Expo,\n    Circ = _easeMap.Circ;\nexport { Power0, Power1, Power2, Power3, Power4, Linear, Quad, Cubic, Quart, Quint, Strong, Elastic, Back, SteppedEase, Bounce, Sine, Expo, Circ };\nexport { Tween as TweenMax, Tween as TweenLite, Timeline as TimelineMax, Timeline as TimelineLite, gsap as default, wrap, wrapYoyo, distribute, random, snap, normalize, getUnit, clamp, splitColor, toArray, selector, mapRange, pipe, unitize, interpolate, shuffle }; //export some internal methods/orojects for use in CSSPlugin so that we can externalize that file and allow custom builds that exclude it.\n\nexport { _getProperty, _numExp, _numWithUnitExp, _isString, _isUndefined, _renderComplexString, _relExp, _setDefaults, _removeLinkedListItem, _forEachName, _sortPropTweensByPriority, _colorStringFilter, _replaceRandom, _checkPlugin, _plugins, _ticker, _config, _roundModifier, _round, _missingPlugin, _getSetter, _getCache, _colorExp, _parseRelative };", "/*!\n * CSSPlugin 3.12.5\n * https://gsap.com\n *\n * Copyright 2008-2024, GreenSock. All rights reserved.\n * Subject to the terms at https://gsap.com/standard-license or for\n * Club GSAP members, the agreement issued with that membership.\n * @author: Jack Doyle, jack@greensock.com\n*/\n\n/* eslint-disable */\nimport { gsap, _getProperty, _numExp, _numWithUnitExp, getUnit, _isString, _isUndefined, _renderComplexString, _relExp, _forEachName, _sortPropTweensByPriority, _colorStringFilter, _checkPlugin, _replaceRandom, _plugins, GSCache, PropTween, _config, _ticker, _round, _missingPlugin, _getSetter, _getCache, _colorExp, _parseRelative, _setDefaults, _removeLinkedListItem //for the commented-out className feature.\n} from \"./gsap-core.js\";\n\nvar _win,\n    _doc,\n    _docElement,\n    _pluginInitted,\n    _tempDiv,\n    _tempDivStyler,\n    _recentSetterPlugin,\n    _reverting,\n    _windowExists = function _windowExists() {\n  return typeof window !== \"undefined\";\n},\n    _transformProps = {},\n    _RAD2DEG = 180 / Math.PI,\n    _DEG2RAD = Math.PI / 180,\n    _atan2 = Math.atan2,\n    _bigNum = 1e8,\n    _capsExp = /([A-Z])/g,\n    _horizontalExp = /(left|right|width|margin|padding|x)/i,\n    _complexExp = /[\\s,\\(]\\S/,\n    _propertyAliases = {\n  autoAlpha: \"opacity,visibility\",\n  scale: \"scaleX,scaleY\",\n  alpha: \"opacity\"\n},\n    _renderCSSProp = function _renderCSSProp(ratio, data) {\n  return data.set(data.t, data.p, Math.round((data.s + data.c * ratio) * 10000) / 10000 + data.u, data);\n},\n    _renderPropWithEnd = function _renderPropWithEnd(ratio, data) {\n  return data.set(data.t, data.p, ratio === 1 ? data.e : Math.round((data.s + data.c * ratio) * 10000) / 10000 + data.u, data);\n},\n    _renderCSSPropWithBeginning = function _renderCSSPropWithBeginning(ratio, data) {\n  return data.set(data.t, data.p, ratio ? Math.round((data.s + data.c * ratio) * 10000) / 10000 + data.u : data.b, data);\n},\n    //if units change, we need a way to render the original unit/value when the tween goes all the way back to the beginning (ratio:0)\n_renderRoundedCSSProp = function _renderRoundedCSSProp(ratio, data) {\n  var value = data.s + data.c * ratio;\n  data.set(data.t, data.p, ~~(value + (value < 0 ? -.5 : .5)) + data.u, data);\n},\n    _renderNonTweeningValue = function _renderNonTweeningValue(ratio, data) {\n  return data.set(data.t, data.p, ratio ? data.e : data.b, data);\n},\n    _renderNonTweeningValueOnlyAtEnd = function _renderNonTweeningValueOnlyAtEnd(ratio, data) {\n  return data.set(data.t, data.p, ratio !== 1 ? data.b : data.e, data);\n},\n    _setterCSSStyle = function _setterCSSStyle(target, property, value) {\n  return target.style[property] = value;\n},\n    _setterCSSProp = function _setterCSSProp(target, property, value) {\n  return target.style.setProperty(property, value);\n},\n    _setterTransform = function _setterTransform(target, property, value) {\n  return target._gsap[property] = value;\n},\n    _setterScale = function _setterScale(target, property, value) {\n  return target._gsap.scaleX = target._gsap.scaleY = value;\n},\n    _setterScaleWithRender = function _setterScaleWithRender(target, property, value, data, ratio) {\n  var cache = target._gsap;\n  cache.scaleX = cache.scaleY = value;\n  cache.renderTransform(ratio, cache);\n},\n    _setterTransformWithRender = function _setterTransformWithRender(target, property, value, data, ratio) {\n  var cache = target._gsap;\n  cache[property] = value;\n  cache.renderTransform(ratio, cache);\n},\n    _transformProp = \"transform\",\n    _transformOriginProp = _transformProp + \"Origin\",\n    _saveStyle = function _saveStyle(property, isNotCSS) {\n  var _this = this;\n\n  var target = this.target,\n      style = target.style,\n      cache = target._gsap;\n\n  if (property in _transformProps && style) {\n    this.tfm = this.tfm || {};\n\n    if (property !== \"transform\") {\n      property = _propertyAliases[property] || property;\n      ~property.indexOf(\",\") ? property.split(\",\").forEach(function (a) {\n        return _this.tfm[a] = _get(target, a);\n      }) : this.tfm[property] = cache.x ? cache[property] : _get(target, property); // note: scale would map to \"scaleX,scaleY\", thus we loop and apply them both.\n\n      property === _transformOriginProp && (this.tfm.zOrigin = cache.zOrigin);\n    } else {\n      return _propertyAliases.transform.split(\",\").forEach(function (p) {\n        return _saveStyle.call(_this, p, isNotCSS);\n      });\n    }\n\n    if (this.props.indexOf(_transformProp) >= 0) {\n      return;\n    }\n\n    if (cache.svg) {\n      this.svgo = target.getAttribute(\"data-svg-origin\");\n      this.props.push(_transformOriginProp, isNotCSS, \"\");\n    }\n\n    property = _transformProp;\n  }\n\n  (style || isNotCSS) && this.props.push(property, isNotCSS, style[property]);\n},\n    _removeIndependentTransforms = function _removeIndependentTransforms(style) {\n  if (style.translate) {\n    style.removeProperty(\"translate\");\n    style.removeProperty(\"scale\");\n    style.removeProperty(\"rotate\");\n  }\n},\n    _revertStyle = function _revertStyle() {\n  var props = this.props,\n      target = this.target,\n      style = target.style,\n      cache = target._gsap,\n      i,\n      p;\n\n  for (i = 0; i < props.length; i += 3) {\n    // stored like this: property, isNotCSS, value\n    props[i + 1] ? target[props[i]] = props[i + 2] : props[i + 2] ? style[props[i]] = props[i + 2] : style.removeProperty(props[i].substr(0, 2) === \"--\" ? props[i] : props[i].replace(_capsExp, \"-$1\").toLowerCase());\n  }\n\n  if (this.tfm) {\n    for (p in this.tfm) {\n      cache[p] = this.tfm[p];\n    }\n\n    if (cache.svg) {\n      cache.renderTransform();\n      target.setAttribute(\"data-svg-origin\", this.svgo || \"\");\n    }\n\n    i = _reverting();\n\n    if ((!i || !i.isStart) && !style[_transformProp]) {\n      _removeIndependentTransforms(style);\n\n      if (cache.zOrigin && style[_transformOriginProp]) {\n        style[_transformOriginProp] += \" \" + cache.zOrigin + \"px\"; // since we're uncaching, we must put the zOrigin back into the transformOrigin so that we can pull it out accurately when we parse again. Otherwise, we'd lose the z portion of the origin since we extract it to protect from Safari bugs.\n\n        cache.zOrigin = 0;\n        cache.renderTransform();\n      }\n\n      cache.uncache = 1; // if it's a startAt that's being reverted in the _initTween() of the core, we don't need to uncache transforms. This is purely a performance optimization.\n    }\n  }\n},\n    _getStyleSaver = function _getStyleSaver(target, properties) {\n  var saver = {\n    target: target,\n    props: [],\n    revert: _revertStyle,\n    save: _saveStyle\n  };\n  target._gsap || gsap.core.getCache(target); // just make sure there's a _gsap cache defined because we read from it in _saveStyle() and it's more efficient to just check it here once.\n\n  properties && properties.split(\",\").forEach(function (p) {\n    return saver.save(p);\n  });\n  return saver;\n},\n    _supports3D,\n    _createElement = function _createElement(type, ns) {\n  var e = _doc.createElementNS ? _doc.createElementNS((ns || \"http://www.w3.org/1999/xhtml\").replace(/^https/, \"http\"), type) : _doc.createElement(type); //some servers swap in https for http in the namespace which can break things, making \"style\" inaccessible.\n\n  return e && e.style ? e : _doc.createElement(type); //some environments won't allow access to the element's style when created with a namespace in which case we default to the standard createElement() to work around the issue. Also note that when GSAP is embedded directly inside an SVG file, createElement() won't allow access to the style object in Firefox (see https://gsap.com/forums/topic/20215-problem-using-tweenmax-in-standalone-self-containing-svg-file-err-cannot-set-property-csstext-of-undefined/).\n},\n    _getComputedProperty = function _getComputedProperty(target, property, skipPrefixFallback) {\n  var cs = getComputedStyle(target);\n  return cs[property] || cs.getPropertyValue(property.replace(_capsExp, \"-$1\").toLowerCase()) || cs.getPropertyValue(property) || !skipPrefixFallback && _getComputedProperty(target, _checkPropPrefix(property) || property, 1) || \"\"; //css variables may not need caps swapped out for dashes and lowercase.\n},\n    _prefixes = \"O,Moz,ms,Ms,Webkit\".split(\",\"),\n    _checkPropPrefix = function _checkPropPrefix(property, element, preferPrefix) {\n  var e = element || _tempDiv,\n      s = e.style,\n      i = 5;\n\n  if (property in s && !preferPrefix) {\n    return property;\n  }\n\n  property = property.charAt(0).toUpperCase() + property.substr(1);\n\n  while (i-- && !(_prefixes[i] + property in s)) {}\n\n  return i < 0 ? null : (i === 3 ? \"ms\" : i >= 0 ? _prefixes[i] : \"\") + property;\n},\n    _initCore = function _initCore() {\n  if (_windowExists() && window.document) {\n    _win = window;\n    _doc = _win.document;\n    _docElement = _doc.documentElement;\n    _tempDiv = _createElement(\"div\") || {\n      style: {}\n    };\n    _tempDivStyler = _createElement(\"div\");\n    _transformProp = _checkPropPrefix(_transformProp);\n    _transformOriginProp = _transformProp + \"Origin\";\n    _tempDiv.style.cssText = \"border-width:0;line-height:0;position:absolute;padding:0\"; //make sure to override certain properties that may contaminate measurements, in case the user has overreaching style sheets.\n\n    _supports3D = !!_checkPropPrefix(\"perspective\");\n    _reverting = gsap.core.reverting;\n    _pluginInitted = 1;\n  }\n},\n    _getBBoxHack = function _getBBoxHack(swapIfPossible) {\n  //works around issues in some browsers (like Firefox) that don't correctly report getBBox() on SVG elements inside a <defs> element and/or <mask>. We try creating an SVG, adding it to the documentElement and toss the element in there so that it's definitely part of the rendering tree, then grab the bbox and if it works, we actually swap out the original getBBox() method for our own that does these extra steps whenever getBBox is needed. This helps ensure that performance is optimal (only do all these extra steps when absolutely necessary...most elements don't need it).\n  var svg = _createElement(\"svg\", this.ownerSVGElement && this.ownerSVGElement.getAttribute(\"xmlns\") || \"http://www.w3.org/2000/svg\"),\n      oldParent = this.parentNode,\n      oldSibling = this.nextSibling,\n      oldCSS = this.style.cssText,\n      bbox;\n\n  _docElement.appendChild(svg);\n\n  svg.appendChild(this);\n  this.style.display = \"block\";\n\n  if (swapIfPossible) {\n    try {\n      bbox = this.getBBox();\n      this._gsapBBox = this.getBBox; //store the original\n\n      this.getBBox = _getBBoxHack;\n    } catch (e) {}\n  } else if (this._gsapBBox) {\n    bbox = this._gsapBBox();\n  }\n\n  if (oldParent) {\n    if (oldSibling) {\n      oldParent.insertBefore(this, oldSibling);\n    } else {\n      oldParent.appendChild(this);\n    }\n  }\n\n  _docElement.removeChild(svg);\n\n  this.style.cssText = oldCSS;\n  return bbox;\n},\n    _getAttributeFallbacks = function _getAttributeFallbacks(target, attributesArray) {\n  var i = attributesArray.length;\n\n  while (i--) {\n    if (target.hasAttribute(attributesArray[i])) {\n      return target.getAttribute(attributesArray[i]);\n    }\n  }\n},\n    _getBBox = function _getBBox(target) {\n  var bounds;\n\n  try {\n    bounds = target.getBBox(); //Firefox throws errors if you try calling getBBox() on an SVG element that's not rendered (like in a <symbol> or <defs>). https://bugzilla.mozilla.org/show_bug.cgi?id=612118\n  } catch (error) {\n    bounds = _getBBoxHack.call(target, true);\n  }\n\n  bounds && (bounds.width || bounds.height) || target.getBBox === _getBBoxHack || (bounds = _getBBoxHack.call(target, true)); //some browsers (like Firefox) misreport the bounds if the element has zero width and height (it just assumes it's at x:0, y:0), thus we need to manually grab the position in that case.\n\n  return bounds && !bounds.width && !bounds.x && !bounds.y ? {\n    x: +_getAttributeFallbacks(target, [\"x\", \"cx\", \"x1\"]) || 0,\n    y: +_getAttributeFallbacks(target, [\"y\", \"cy\", \"y1\"]) || 0,\n    width: 0,\n    height: 0\n  } : bounds;\n},\n    _isSVG = function _isSVG(e) {\n  return !!(e.getCTM && (!e.parentNode || e.ownerSVGElement) && _getBBox(e));\n},\n    //reports if the element is an SVG on which getBBox() actually works\n_removeProperty = function _removeProperty(target, property) {\n  if (property) {\n    var style = target.style,\n        first2Chars;\n\n    if (property in _transformProps && property !== _transformOriginProp) {\n      property = _transformProp;\n    }\n\n    if (style.removeProperty) {\n      first2Chars = property.substr(0, 2);\n\n      if (first2Chars === \"ms\" || property.substr(0, 6) === \"webkit\") {\n        //Microsoft and some Webkit browsers don't conform to the standard of capitalizing the first prefix character, so we adjust so that when we prefix the caps with a dash, it's correct (otherwise it'd be \"ms-transform\" instead of \"-ms-transform\" for IE9, for example)\n        property = \"-\" + property;\n      }\n\n      style.removeProperty(first2Chars === \"--\" ? property : property.replace(_capsExp, \"-$1\").toLowerCase());\n    } else {\n      //note: old versions of IE use \"removeAttribute()\" instead of \"removeProperty()\"\n      style.removeAttribute(property);\n    }\n  }\n},\n    _addNonTweeningPT = function _addNonTweeningPT(plugin, target, property, beginning, end, onlySetAtEnd) {\n  var pt = new PropTween(plugin._pt, target, property, 0, 1, onlySetAtEnd ? _renderNonTweeningValueOnlyAtEnd : _renderNonTweeningValue);\n  plugin._pt = pt;\n  pt.b = beginning;\n  pt.e = end;\n\n  plugin._props.push(property);\n\n  return pt;\n},\n    _nonConvertibleUnits = {\n  deg: 1,\n  rad: 1,\n  turn: 1\n},\n    _nonStandardLayouts = {\n  grid: 1,\n  flex: 1\n},\n    //takes a single value like 20px and converts it to the unit specified, like \"%\", returning only the numeric amount.\n_convertToUnit = function _convertToUnit(target, property, value, unit) {\n  var curValue = parseFloat(value) || 0,\n      curUnit = (value + \"\").trim().substr((curValue + \"\").length) || \"px\",\n      // some browsers leave extra whitespace at the beginning of CSS variables, hence the need to trim()\n  style = _tempDiv.style,\n      horizontal = _horizontalExp.test(property),\n      isRootSVG = target.tagName.toLowerCase() === \"svg\",\n      measureProperty = (isRootSVG ? \"client\" : \"offset\") + (horizontal ? \"Width\" : \"Height\"),\n      amount = 100,\n      toPixels = unit === \"px\",\n      toPercent = unit === \"%\",\n      px,\n      parent,\n      cache,\n      isSVG;\n\n  if (unit === curUnit || !curValue || _nonConvertibleUnits[unit] || _nonConvertibleUnits[curUnit]) {\n    return curValue;\n  }\n\n  curUnit !== \"px\" && !toPixels && (curValue = _convertToUnit(target, property, value, \"px\"));\n  isSVG = target.getCTM && _isSVG(target);\n\n  if ((toPercent || curUnit === \"%\") && (_transformProps[property] || ~property.indexOf(\"adius\"))) {\n    px = isSVG ? target.getBBox()[horizontal ? \"width\" : \"height\"] : target[measureProperty];\n    return _round(toPercent ? curValue / px * amount : curValue / 100 * px);\n  }\n\n  style[horizontal ? \"width\" : \"height\"] = amount + (toPixels ? curUnit : unit);\n  parent = ~property.indexOf(\"adius\") || unit === \"em\" && target.appendChild && !isRootSVG ? target : target.parentNode;\n\n  if (isSVG) {\n    parent = (target.ownerSVGElement || {}).parentNode;\n  }\n\n  if (!parent || parent === _doc || !parent.appendChild) {\n    parent = _doc.body;\n  }\n\n  cache = parent._gsap;\n\n  if (cache && toPercent && cache.width && horizontal && cache.time === _ticker.time && !cache.uncache) {\n    return _round(curValue / cache.width * amount);\n  } else {\n    if (toPercent && (property === \"height\" || property === \"width\")) {\n      // if we're dealing with width/height that's inside a container with padding and/or it's a flexbox/grid container, we must apply it to the target itself rather than the _tempDiv in order to ensure complete accuracy, factoring in the parent's padding.\n      var v = target.style[property];\n      target.style[property] = amount + unit;\n      px = target[measureProperty];\n      v ? target.style[property] = v : _removeProperty(target, property);\n    } else {\n      (toPercent || curUnit === \"%\") && !_nonStandardLayouts[_getComputedProperty(parent, \"display\")] && (style.position = _getComputedProperty(target, \"position\"));\n      parent === target && (style.position = \"static\"); // like for borderRadius, if it's a % we must have it relative to the target itself but that may not have position: relative or position: absolute in which case it'd go up the chain until it finds its offsetParent (bad). position: static protects against that.\n\n      parent.appendChild(_tempDiv);\n      px = _tempDiv[measureProperty];\n      parent.removeChild(_tempDiv);\n      style.position = \"absolute\";\n    }\n\n    if (horizontal && toPercent) {\n      cache = _getCache(parent);\n      cache.time = _ticker.time;\n      cache.width = parent[measureProperty];\n    }\n  }\n\n  return _round(toPixels ? px * curValue / amount : px && curValue ? amount / px * curValue : 0);\n},\n    _get = function _get(target, property, unit, uncache) {\n  var value;\n  _pluginInitted || _initCore();\n\n  if (property in _propertyAliases && property !== \"transform\") {\n    property = _propertyAliases[property];\n\n    if (~property.indexOf(\",\")) {\n      property = property.split(\",\")[0];\n    }\n  }\n\n  if (_transformProps[property] && property !== \"transform\") {\n    value = _parseTransform(target, uncache);\n    value = property !== \"transformOrigin\" ? value[property] : value.svg ? value.origin : _firstTwoOnly(_getComputedProperty(target, _transformOriginProp)) + \" \" + value.zOrigin + \"px\";\n  } else {\n    value = target.style[property];\n\n    if (!value || value === \"auto\" || uncache || ~(value + \"\").indexOf(\"calc(\")) {\n      value = _specialProps[property] && _specialProps[property](target, property, unit) || _getComputedProperty(target, property) || _getProperty(target, property) || (property === \"opacity\" ? 1 : 0); // note: some browsers, like Firefox, don't report borderRadius correctly! Instead, it only reports every corner like  borderTopLeftRadius\n    }\n  }\n\n  return unit && !~(value + \"\").trim().indexOf(\" \") ? _convertToUnit(target, property, value, unit) + unit : value;\n},\n    _tweenComplexCSSString = function _tweenComplexCSSString(target, prop, start, end) {\n  // note: we call _tweenComplexCSSString.call(pluginInstance...) to ensure that it's scoped properly. We may call it from within a plugin too, thus \"this\" would refer to the plugin.\n  if (!start || start === \"none\") {\n    // some browsers like Safari actually PREFER the prefixed property and mis-report the unprefixed value like clipPath (BUG). In other words, even though clipPath exists in the style (\"clipPath\" in target.style) and it's set in the CSS properly (along with -webkit-clip-path), Safari reports clipPath as \"none\" whereas WebkitClipPath reports accurately like \"ellipse(100% 0% at 50% 0%)\", so in this case we must SWITCH to using the prefixed property instead. See https://gsap.com/forums/topic/18310-clippath-doesnt-work-on-ios/\n    var p = _checkPropPrefix(prop, target, 1),\n        s = p && _getComputedProperty(target, p, 1);\n\n    if (s && s !== start) {\n      prop = p;\n      start = s;\n    } else if (prop === \"borderColor\") {\n      start = _getComputedProperty(target, \"borderTopColor\"); // Firefox bug: always reports \"borderColor\" as \"\", so we must fall back to borderTopColor. See https://gsap.com/forums/topic/24583-how-to-return-colors-that-i-had-after-reverse/\n    }\n  }\n\n  var pt = new PropTween(this._pt, target.style, prop, 0, 1, _renderComplexString),\n      index = 0,\n      matchIndex = 0,\n      a,\n      result,\n      startValues,\n      startNum,\n      color,\n      startValue,\n      endValue,\n      endNum,\n      chunk,\n      endUnit,\n      startUnit,\n      endValues;\n  pt.b = start;\n  pt.e = end;\n  start += \"\"; // ensure values are strings\n\n  end += \"\";\n\n  if (end === \"auto\") {\n    startValue = target.style[prop];\n    target.style[prop] = end;\n    end = _getComputedProperty(target, prop) || end;\n    startValue ? target.style[prop] = startValue : _removeProperty(target, prop);\n  }\n\n  a = [start, end];\n\n  _colorStringFilter(a); // pass an array with the starting and ending values and let the filter do whatever it needs to the values. If colors are found, it returns true and then we must match where the color shows up order-wise because for things like boxShadow, sometimes the browser provides the computed values with the color FIRST, but the user provides it with the color LAST, so flip them if necessary. Same for drop-shadow().\n\n\n  start = a[0];\n  end = a[1];\n  startValues = start.match(_numWithUnitExp) || [];\n  endValues = end.match(_numWithUnitExp) || [];\n\n  if (endValues.length) {\n    while (result = _numWithUnitExp.exec(end)) {\n      endValue = result[0];\n      chunk = end.substring(index, result.index);\n\n      if (color) {\n        color = (color + 1) % 5;\n      } else if (chunk.substr(-5) === \"rgba(\" || chunk.substr(-5) === \"hsla(\") {\n        color = 1;\n      }\n\n      if (endValue !== (startValue = startValues[matchIndex++] || \"\")) {\n        startNum = parseFloat(startValue) || 0;\n        startUnit = startValue.substr((startNum + \"\").length);\n        endValue.charAt(1) === \"=\" && (endValue = _parseRelative(startNum, endValue) + startUnit);\n        endNum = parseFloat(endValue);\n        endUnit = endValue.substr((endNum + \"\").length);\n        index = _numWithUnitExp.lastIndex - endUnit.length;\n\n        if (!endUnit) {\n          //if something like \"perspective:300\" is passed in and we must add a unit to the end\n          endUnit = endUnit || _config.units[prop] || startUnit;\n\n          if (index === end.length) {\n            end += endUnit;\n            pt.e += endUnit;\n          }\n        }\n\n        if (startUnit !== endUnit) {\n          startNum = _convertToUnit(target, prop, startValue, endUnit) || 0;\n        } // these nested PropTweens are handled in a special way - we'll never actually call a render or setter method on them. We'll just loop through them in the parent complex string PropTween's render method.\n\n\n        pt._pt = {\n          _next: pt._pt,\n          p: chunk || matchIndex === 1 ? chunk : \",\",\n          //note: SVG spec allows omission of comma/space when a negative sign is wedged between two numbers, like 2.5-5.3 instead of 2.5,-5.3 but when tweening, the negative value may switch to positive, so we insert the comma just in case.\n          s: startNum,\n          c: endNum - startNum,\n          m: color && color < 4 || prop === \"zIndex\" ? Math.round : 0\n        };\n      }\n    }\n\n    pt.c = index < end.length ? end.substring(index, end.length) : \"\"; //we use the \"c\" of the PropTween to store the final part of the string (after the last number)\n  } else {\n    pt.r = prop === \"display\" && end === \"none\" ? _renderNonTweeningValueOnlyAtEnd : _renderNonTweeningValue;\n  }\n\n  _relExp.test(end) && (pt.e = 0); //if the end string contains relative values or dynamic random(...) values, delete the end it so that on the final render we don't actually set it to the string with += or -= characters (forces it to use the calculated value).\n\n  this._pt = pt; //start the linked list with this new PropTween. Remember, we call _tweenComplexCSSString.call(pluginInstance...) to ensure that it's scoped properly. We may call it from within another plugin too, thus \"this\" would refer to the plugin.\n\n  return pt;\n},\n    _keywordToPercent = {\n  top: \"0%\",\n  bottom: \"100%\",\n  left: \"0%\",\n  right: \"100%\",\n  center: \"50%\"\n},\n    _convertKeywordsToPercentages = function _convertKeywordsToPercentages(value) {\n  var split = value.split(\" \"),\n      x = split[0],\n      y = split[1] || \"50%\";\n\n  if (x === \"top\" || x === \"bottom\" || y === \"left\" || y === \"right\") {\n    //the user provided them in the wrong order, so flip them\n    value = x;\n    x = y;\n    y = value;\n  }\n\n  split[0] = _keywordToPercent[x] || x;\n  split[1] = _keywordToPercent[y] || y;\n  return split.join(\" \");\n},\n    _renderClearProps = function _renderClearProps(ratio, data) {\n  if (data.tween && data.tween._time === data.tween._dur) {\n    var target = data.t,\n        style = target.style,\n        props = data.u,\n        cache = target._gsap,\n        prop,\n        clearTransforms,\n        i;\n\n    if (props === \"all\" || props === true) {\n      style.cssText = \"\";\n      clearTransforms = 1;\n    } else {\n      props = props.split(\",\");\n      i = props.length;\n\n      while (--i > -1) {\n        prop = props[i];\n\n        if (_transformProps[prop]) {\n          clearTransforms = 1;\n          prop = prop === \"transformOrigin\" ? _transformOriginProp : _transformProp;\n        }\n\n        _removeProperty(target, prop);\n      }\n    }\n\n    if (clearTransforms) {\n      _removeProperty(target, _transformProp);\n\n      if (cache) {\n        cache.svg && target.removeAttribute(\"transform\");\n\n        _parseTransform(target, 1); // force all the cached values back to \"normal\"/identity, otherwise if there's another tween that's already set to render transforms on this element, it could display the wrong values.\n\n\n        cache.uncache = 1;\n\n        _removeIndependentTransforms(style);\n      }\n    }\n  }\n},\n    // note: specialProps should return 1 if (and only if) they have a non-zero priority. It indicates we need to sort the linked list.\n_specialProps = {\n  clearProps: function clearProps(plugin, target, property, endValue, tween) {\n    if (tween.data !== \"isFromStart\") {\n      var pt = plugin._pt = new PropTween(plugin._pt, target, property, 0, 0, _renderClearProps);\n      pt.u = endValue;\n      pt.pr = -10;\n      pt.tween = tween;\n\n      plugin._props.push(property);\n\n      return 1;\n    }\n  }\n  /* className feature (about 0.4kb gzipped).\n  , className(plugin, target, property, endValue, tween) {\n  \tlet _renderClassName = (ratio, data) => {\n  \t\t\tdata.css.render(ratio, data.css);\n  \t\t\tif (!ratio || ratio === 1) {\n  \t\t\t\tlet inline = data.rmv,\n  \t\t\t\t\ttarget = data.t,\n  \t\t\t\t\tp;\n  \t\t\t\ttarget.setAttribute(\"class\", ratio ? data.e : data.b);\n  \t\t\t\tfor (p in inline) {\n  \t\t\t\t\t_removeProperty(target, p);\n  \t\t\t\t}\n  \t\t\t}\n  \t\t},\n  \t\t_getAllStyles = (target) => {\n  \t\t\tlet styles = {},\n  \t\t\t\tcomputed = getComputedStyle(target),\n  \t\t\t\tp;\n  \t\t\tfor (p in computed) {\n  \t\t\t\tif (isNaN(p) && p !== \"cssText\" && p !== \"length\") {\n  \t\t\t\t\tstyles[p] = computed[p];\n  \t\t\t\t}\n  \t\t\t}\n  \t\t\t_setDefaults(styles, _parseTransform(target, 1));\n  \t\t\treturn styles;\n  \t\t},\n  \t\tstartClassList = target.getAttribute(\"class\"),\n  \t\tstyle = target.style,\n  \t\tcssText = style.cssText,\n  \t\tcache = target._gsap,\n  \t\tclassPT = cache.classPT,\n  \t\tinlineToRemoveAtEnd = {},\n  \t\tdata = {t:target, plugin:plugin, rmv:inlineToRemoveAtEnd, b:startClassList, e:(endValue.charAt(1) !== \"=\") ? endValue : startClassList.replace(new RegExp(\"(?:\\\\s|^)\" + endValue.substr(2) + \"(?![\\\\w-])\"), \"\") + ((endValue.charAt(0) === \"+\") ? \" \" + endValue.substr(2) : \"\")},\n  \t\tchangingVars = {},\n  \t\tstartVars = _getAllStyles(target),\n  \t\ttransformRelated = /(transform|perspective)/i,\n  \t\tendVars, p;\n  \tif (classPT) {\n  \t\tclassPT.r(1, classPT.d);\n  \t\t_removeLinkedListItem(classPT.d.plugin, classPT, \"_pt\");\n  \t}\n  \ttarget.setAttribute(\"class\", data.e);\n  \tendVars = _getAllStyles(target, true);\n  \ttarget.setAttribute(\"class\", startClassList);\n  \tfor (p in endVars) {\n  \t\tif (endVars[p] !== startVars[p] && !transformRelated.test(p)) {\n  \t\t\tchangingVars[p] = endVars[p];\n  \t\t\tif (!style[p] && style[p] !== \"0\") {\n  \t\t\t\tinlineToRemoveAtEnd[p] = 1;\n  \t\t\t}\n  \t\t}\n  \t}\n  \tcache.classPT = plugin._pt = new PropTween(plugin._pt, target, \"className\", 0, 0, _renderClassName, data, 0, -11);\n  \tif (style.cssText !== cssText) { //only apply if things change. Otherwise, in cases like a background-image that's pulled dynamically, it could cause a refresh. See https://gsap.com/forums/topic/20368-possible-gsap-bug-switching-classnames-in-chrome/.\n  \t\tstyle.cssText = cssText; //we recorded cssText before we swapped classes and ran _getAllStyles() because in cases when a className tween is overwritten, we remove all the related tweening properties from that class change (otherwise class-specific stuff can't override properties we've directly set on the target's style object due to specificity).\n  \t}\n  \t_parseTransform(target, true); //to clear the caching of transforms\n  \tdata.css = new gsap.plugins.css();\n  \tdata.css.init(target, changingVars, tween);\n  \tplugin._props.push(...data.css._props);\n  \treturn 1;\n  }\n  */\n\n},\n\n/*\n * --------------------------------------------------------------------------------------\n * TRANSFORMS\n * --------------------------------------------------------------------------------------\n */\n_identity2DMatrix = [1, 0, 0, 1, 0, 0],\n    _rotationalProperties = {},\n    _isNullTransform = function _isNullTransform(value) {\n  return value === \"matrix(1, 0, 0, 1, 0, 0)\" || value === \"none\" || !value;\n},\n    _getComputedTransformMatrixAsArray = function _getComputedTransformMatrixAsArray(target) {\n  var matrixString = _getComputedProperty(target, _transformProp);\n\n  return _isNullTransform(matrixString) ? _identity2DMatrix : matrixString.substr(7).match(_numExp).map(_round);\n},\n    _getMatrix = function _getMatrix(target, force2D) {\n  var cache = target._gsap || _getCache(target),\n      style = target.style,\n      matrix = _getComputedTransformMatrixAsArray(target),\n      parent,\n      nextSibling,\n      temp,\n      addedToDOM;\n\n  if (cache.svg && target.getAttribute(\"transform\")) {\n    temp = target.transform.baseVal.consolidate().matrix; //ensures that even complex values like \"translate(50,60) rotate(135,0,0)\" are parsed because it mashes it into a matrix.\n\n    matrix = [temp.a, temp.b, temp.c, temp.d, temp.e, temp.f];\n    return matrix.join(\",\") === \"1,0,0,1,0,0\" ? _identity2DMatrix : matrix;\n  } else if (matrix === _identity2DMatrix && !target.offsetParent && target !== _docElement && !cache.svg) {\n    //note: if offsetParent is null, that means the element isn't in the normal document flow, like if it has display:none or one of its ancestors has display:none). Firefox returns null for getComputedStyle() if the element is in an iframe that has display:none. https://bugzilla.mozilla.org/show_bug.cgi?id=548397\n    //browsers don't report transforms accurately unless the element is in the DOM and has a display value that's not \"none\". Firefox and Microsoft browsers have a partial bug where they'll report transforms even if display:none BUT not any percentage-based values like translate(-50%, 8px) will be reported as if it's translate(0, 8px).\n    temp = style.display;\n    style.display = \"block\";\n    parent = target.parentNode;\n\n    if (!parent || !target.offsetParent) {\n      // note: in 3.3.0 we switched target.offsetParent to _doc.body.contains(target) to avoid [sometimes unnecessary] MutationObserver calls but that wasn't adequate because there are edge cases where nested position: fixed elements need to get reparented to accurately sense transforms. See https://github.com/greensock/GSAP/issues/388 and https://github.com/greensock/GSAP/issues/375\n      addedToDOM = 1; //flag\n\n      nextSibling = target.nextElementSibling;\n\n      _docElement.appendChild(target); //we must add it to the DOM in order to get values properly\n\n    }\n\n    matrix = _getComputedTransformMatrixAsArray(target);\n    temp ? style.display = temp : _removeProperty(target, \"display\");\n\n    if (addedToDOM) {\n      nextSibling ? parent.insertBefore(target, nextSibling) : parent ? parent.appendChild(target) : _docElement.removeChild(target);\n    }\n  }\n\n  return force2D && matrix.length > 6 ? [matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]] : matrix;\n},\n    _applySVGOrigin = function _applySVGOrigin(target, origin, originIsAbsolute, smooth, matrixArray, pluginToAddPropTweensTo) {\n  var cache = target._gsap,\n      matrix = matrixArray || _getMatrix(target, true),\n      xOriginOld = cache.xOrigin || 0,\n      yOriginOld = cache.yOrigin || 0,\n      xOffsetOld = cache.xOffset || 0,\n      yOffsetOld = cache.yOffset || 0,\n      a = matrix[0],\n      b = matrix[1],\n      c = matrix[2],\n      d = matrix[3],\n      tx = matrix[4],\n      ty = matrix[5],\n      originSplit = origin.split(\" \"),\n      xOrigin = parseFloat(originSplit[0]) || 0,\n      yOrigin = parseFloat(originSplit[1]) || 0,\n      bounds,\n      determinant,\n      x,\n      y;\n\n  if (!originIsAbsolute) {\n    bounds = _getBBox(target);\n    xOrigin = bounds.x + (~originSplit[0].indexOf(\"%\") ? xOrigin / 100 * bounds.width : xOrigin);\n    yOrigin = bounds.y + (~(originSplit[1] || originSplit[0]).indexOf(\"%\") ? yOrigin / 100 * bounds.height : yOrigin); // if (!(\"xOrigin\" in cache) && (xOrigin || yOrigin)) { // added in 3.12.3, reverted in 3.12.4; requires more exploration\n    // \txOrigin -= bounds.x;\n    // \tyOrigin -= bounds.y;\n    // }\n  } else if (matrix !== _identity2DMatrix && (determinant = a * d - b * c)) {\n    //if it's zero (like if scaleX and scaleY are zero), skip it to avoid errors with dividing by zero.\n    x = xOrigin * (d / determinant) + yOrigin * (-c / determinant) + (c * ty - d * tx) / determinant;\n    y = xOrigin * (-b / determinant) + yOrigin * (a / determinant) - (a * ty - b * tx) / determinant;\n    xOrigin = x;\n    yOrigin = y; // theory: we only had to do this for smoothing and it assumes that the previous one was not originIsAbsolute.\n  }\n\n  if (smooth || smooth !== false && cache.smooth) {\n    tx = xOrigin - xOriginOld;\n    ty = yOrigin - yOriginOld;\n    cache.xOffset = xOffsetOld + (tx * a + ty * c) - tx;\n    cache.yOffset = yOffsetOld + (tx * b + ty * d) - ty;\n  } else {\n    cache.xOffset = cache.yOffset = 0;\n  }\n\n  cache.xOrigin = xOrigin;\n  cache.yOrigin = yOrigin;\n  cache.smooth = !!smooth;\n  cache.origin = origin;\n  cache.originIsAbsolute = !!originIsAbsolute;\n  target.style[_transformOriginProp] = \"0px 0px\"; //otherwise, if someone sets  an origin via CSS, it will likely interfere with the SVG transform attribute ones (because remember, we're baking the origin into the matrix() value).\n\n  if (pluginToAddPropTweensTo) {\n    _addNonTweeningPT(pluginToAddPropTweensTo, cache, \"xOrigin\", xOriginOld, xOrigin);\n\n    _addNonTweeningPT(pluginToAddPropTweensTo, cache, \"yOrigin\", yOriginOld, yOrigin);\n\n    _addNonTweeningPT(pluginToAddPropTweensTo, cache, \"xOffset\", xOffsetOld, cache.xOffset);\n\n    _addNonTweeningPT(pluginToAddPropTweensTo, cache, \"yOffset\", yOffsetOld, cache.yOffset);\n  }\n\n  target.setAttribute(\"data-svg-origin\", xOrigin + \" \" + yOrigin);\n},\n    _parseTransform = function _parseTransform(target, uncache) {\n  var cache = target._gsap || new GSCache(target);\n\n  if (\"x\" in cache && !uncache && !cache.uncache) {\n    return cache;\n  }\n\n  var style = target.style,\n      invertedScaleX = cache.scaleX < 0,\n      px = \"px\",\n      deg = \"deg\",\n      cs = getComputedStyle(target),\n      origin = _getComputedProperty(target, _transformOriginProp) || \"0\",\n      x,\n      y,\n      z,\n      scaleX,\n      scaleY,\n      rotation,\n      rotationX,\n      rotationY,\n      skewX,\n      skewY,\n      perspective,\n      xOrigin,\n      yOrigin,\n      matrix,\n      angle,\n      cos,\n      sin,\n      a,\n      b,\n      c,\n      d,\n      a12,\n      a22,\n      t1,\n      t2,\n      t3,\n      a13,\n      a23,\n      a33,\n      a42,\n      a43,\n      a32;\n  x = y = z = rotation = rotationX = rotationY = skewX = skewY = perspective = 0;\n  scaleX = scaleY = 1;\n  cache.svg = !!(target.getCTM && _isSVG(target));\n\n  if (cs.translate) {\n    // accommodate independent transforms by combining them into normal ones.\n    if (cs.translate !== \"none\" || cs.scale !== \"none\" || cs.rotate !== \"none\") {\n      style[_transformProp] = (cs.translate !== \"none\" ? \"translate3d(\" + (cs.translate + \" 0 0\").split(\" \").slice(0, 3).join(\", \") + \") \" : \"\") + (cs.rotate !== \"none\" ? \"rotate(\" + cs.rotate + \") \" : \"\") + (cs.scale !== \"none\" ? \"scale(\" + cs.scale.split(\" \").join(\",\") + \") \" : \"\") + (cs[_transformProp] !== \"none\" ? cs[_transformProp] : \"\");\n    }\n\n    style.scale = style.rotate = style.translate = \"none\";\n  }\n\n  matrix = _getMatrix(target, cache.svg);\n\n  if (cache.svg) {\n    if (cache.uncache) {\n      // if cache.uncache is true (and maybe if origin is 0,0), we need to set element.style.transformOrigin = (cache.xOrigin - bbox.x) + \"px \" + (cache.yOrigin - bbox.y) + \"px\". Previously we let the data-svg-origin stay instead, but when introducing revert(), it complicated things.\n      t2 = target.getBBox();\n      origin = cache.xOrigin - t2.x + \"px \" + (cache.yOrigin - t2.y) + \"px\";\n      t1 = \"\";\n    } else {\n      t1 = !uncache && target.getAttribute(\"data-svg-origin\"); //  Remember, to work around browser inconsistencies we always force SVG elements' transformOrigin to 0,0 and offset the translation accordingly.\n    }\n\n    _applySVGOrigin(target, t1 || origin, !!t1 || cache.originIsAbsolute, cache.smooth !== false, matrix);\n  }\n\n  xOrigin = cache.xOrigin || 0;\n  yOrigin = cache.yOrigin || 0;\n\n  if (matrix !== _identity2DMatrix) {\n    a = matrix[0]; //a11\n\n    b = matrix[1]; //a21\n\n    c = matrix[2]; //a31\n\n    d = matrix[3]; //a41\n\n    x = a12 = matrix[4];\n    y = a22 = matrix[5]; //2D matrix\n\n    if (matrix.length === 6) {\n      scaleX = Math.sqrt(a * a + b * b);\n      scaleY = Math.sqrt(d * d + c * c);\n      rotation = a || b ? _atan2(b, a) * _RAD2DEG : 0; //note: if scaleX is 0, we cannot accurately measure rotation. Same for skewX with a scaleY of 0. Therefore, we default to the previously recorded value (or zero if that doesn't exist).\n\n      skewX = c || d ? _atan2(c, d) * _RAD2DEG + rotation : 0;\n      skewX && (scaleY *= Math.abs(Math.cos(skewX * _DEG2RAD)));\n\n      if (cache.svg) {\n        x -= xOrigin - (xOrigin * a + yOrigin * c);\n        y -= yOrigin - (xOrigin * b + yOrigin * d);\n      } //3D matrix\n\n    } else {\n      a32 = matrix[6];\n      a42 = matrix[7];\n      a13 = matrix[8];\n      a23 = matrix[9];\n      a33 = matrix[10];\n      a43 = matrix[11];\n      x = matrix[12];\n      y = matrix[13];\n      z = matrix[14];\n      angle = _atan2(a32, a33);\n      rotationX = angle * _RAD2DEG; //rotationX\n\n      if (angle) {\n        cos = Math.cos(-angle);\n        sin = Math.sin(-angle);\n        t1 = a12 * cos + a13 * sin;\n        t2 = a22 * cos + a23 * sin;\n        t3 = a32 * cos + a33 * sin;\n        a13 = a12 * -sin + a13 * cos;\n        a23 = a22 * -sin + a23 * cos;\n        a33 = a32 * -sin + a33 * cos;\n        a43 = a42 * -sin + a43 * cos;\n        a12 = t1;\n        a22 = t2;\n        a32 = t3;\n      } //rotationY\n\n\n      angle = _atan2(-c, a33);\n      rotationY = angle * _RAD2DEG;\n\n      if (angle) {\n        cos = Math.cos(-angle);\n        sin = Math.sin(-angle);\n        t1 = a * cos - a13 * sin;\n        t2 = b * cos - a23 * sin;\n        t3 = c * cos - a33 * sin;\n        a43 = d * sin + a43 * cos;\n        a = t1;\n        b = t2;\n        c = t3;\n      } //rotationZ\n\n\n      angle = _atan2(b, a);\n      rotation = angle * _RAD2DEG;\n\n      if (angle) {\n        cos = Math.cos(angle);\n        sin = Math.sin(angle);\n        t1 = a * cos + b * sin;\n        t2 = a12 * cos + a22 * sin;\n        b = b * cos - a * sin;\n        a22 = a22 * cos - a12 * sin;\n        a = t1;\n        a12 = t2;\n      }\n\n      if (rotationX && Math.abs(rotationX) + Math.abs(rotation) > 359.9) {\n        //when rotationY is set, it will often be parsed as 180 degrees different than it should be, and rotationX and rotation both being 180 (it looks the same), so we adjust for that here.\n        rotationX = rotation = 0;\n        rotationY = 180 - rotationY;\n      }\n\n      scaleX = _round(Math.sqrt(a * a + b * b + c * c));\n      scaleY = _round(Math.sqrt(a22 * a22 + a32 * a32));\n      angle = _atan2(a12, a22);\n      skewX = Math.abs(angle) > 0.0002 ? angle * _RAD2DEG : 0;\n      perspective = a43 ? 1 / (a43 < 0 ? -a43 : a43) : 0;\n    }\n\n    if (cache.svg) {\n      //sense if there are CSS transforms applied on an SVG element in which case we must overwrite them when rendering. The transform attribute is more reliable cross-browser, but we can't just remove the CSS ones because they may be applied in a CSS rule somewhere (not just inline).\n      t1 = target.getAttribute(\"transform\");\n      cache.forceCSS = target.setAttribute(\"transform\", \"\") || !_isNullTransform(_getComputedProperty(target, _transformProp));\n      t1 && target.setAttribute(\"transform\", t1);\n    }\n  }\n\n  if (Math.abs(skewX) > 90 && Math.abs(skewX) < 270) {\n    if (invertedScaleX) {\n      scaleX *= -1;\n      skewX += rotation <= 0 ? 180 : -180;\n      rotation += rotation <= 0 ? 180 : -180;\n    } else {\n      scaleY *= -1;\n      skewX += skewX <= 0 ? 180 : -180;\n    }\n  }\n\n  uncache = uncache || cache.uncache;\n  cache.x = x - ((cache.xPercent = x && (!uncache && cache.xPercent || (Math.round(target.offsetWidth / 2) === Math.round(-x) ? -50 : 0))) ? target.offsetWidth * cache.xPercent / 100 : 0) + px;\n  cache.y = y - ((cache.yPercent = y && (!uncache && cache.yPercent || (Math.round(target.offsetHeight / 2) === Math.round(-y) ? -50 : 0))) ? target.offsetHeight * cache.yPercent / 100 : 0) + px;\n  cache.z = z + px;\n  cache.scaleX = _round(scaleX);\n  cache.scaleY = _round(scaleY);\n  cache.rotation = _round(rotation) + deg;\n  cache.rotationX = _round(rotationX) + deg;\n  cache.rotationY = _round(rotationY) + deg;\n  cache.skewX = skewX + deg;\n  cache.skewY = skewY + deg;\n  cache.transformPerspective = perspective + px;\n\n  if (cache.zOrigin = parseFloat(origin.split(\" \")[2]) || !uncache && cache.zOrigin || 0) {\n    style[_transformOriginProp] = _firstTwoOnly(origin);\n  }\n\n  cache.xOffset = cache.yOffset = 0;\n  cache.force3D = _config.force3D;\n  cache.renderTransform = cache.svg ? _renderSVGTransforms : _supports3D ? _renderCSSTransforms : _renderNon3DTransforms;\n  cache.uncache = 0;\n  return cache;\n},\n    _firstTwoOnly = function _firstTwoOnly(value) {\n  return (value = value.split(\" \"))[0] + \" \" + value[1];\n},\n    //for handling transformOrigin values, stripping out the 3rd dimension\n_addPxTranslate = function _addPxTranslate(target, start, value) {\n  var unit = getUnit(start);\n  return _round(parseFloat(start) + parseFloat(_convertToUnit(target, \"x\", value + \"px\", unit))) + unit;\n},\n    _renderNon3DTransforms = function _renderNon3DTransforms(ratio, cache) {\n  cache.z = \"0px\";\n  cache.rotationY = cache.rotationX = \"0deg\";\n  cache.force3D = 0;\n\n  _renderCSSTransforms(ratio, cache);\n},\n    _zeroDeg = \"0deg\",\n    _zeroPx = \"0px\",\n    _endParenthesis = \") \",\n    _renderCSSTransforms = function _renderCSSTransforms(ratio, cache) {\n  var _ref = cache || this,\n      xPercent = _ref.xPercent,\n      yPercent = _ref.yPercent,\n      x = _ref.x,\n      y = _ref.y,\n      z = _ref.z,\n      rotation = _ref.rotation,\n      rotationY = _ref.rotationY,\n      rotationX = _ref.rotationX,\n      skewX = _ref.skewX,\n      skewY = _ref.skewY,\n      scaleX = _ref.scaleX,\n      scaleY = _ref.scaleY,\n      transformPerspective = _ref.transformPerspective,\n      force3D = _ref.force3D,\n      target = _ref.target,\n      zOrigin = _ref.zOrigin,\n      transforms = \"\",\n      use3D = force3D === \"auto\" && ratio && ratio !== 1 || force3D === true; // Safari has a bug that causes it not to render 3D transform-origin values properly, so we force the z origin to 0, record it in the cache, and then do the math here to offset the translate values accordingly (basically do the 3D transform-origin part manually)\n\n\n  if (zOrigin && (rotationX !== _zeroDeg || rotationY !== _zeroDeg)) {\n    var angle = parseFloat(rotationY) * _DEG2RAD,\n        a13 = Math.sin(angle),\n        a33 = Math.cos(angle),\n        cos;\n\n    angle = parseFloat(rotationX) * _DEG2RAD;\n    cos = Math.cos(angle);\n    x = _addPxTranslate(target, x, a13 * cos * -zOrigin);\n    y = _addPxTranslate(target, y, -Math.sin(angle) * -zOrigin);\n    z = _addPxTranslate(target, z, a33 * cos * -zOrigin + zOrigin);\n  }\n\n  if (transformPerspective !== _zeroPx) {\n    transforms += \"perspective(\" + transformPerspective + _endParenthesis;\n  }\n\n  if (xPercent || yPercent) {\n    transforms += \"translate(\" + xPercent + \"%, \" + yPercent + \"%) \";\n  }\n\n  if (use3D || x !== _zeroPx || y !== _zeroPx || z !== _zeroPx) {\n    transforms += z !== _zeroPx || use3D ? \"translate3d(\" + x + \", \" + y + \", \" + z + \") \" : \"translate(\" + x + \", \" + y + _endParenthesis;\n  }\n\n  if (rotation !== _zeroDeg) {\n    transforms += \"rotate(\" + rotation + _endParenthesis;\n  }\n\n  if (rotationY !== _zeroDeg) {\n    transforms += \"rotateY(\" + rotationY + _endParenthesis;\n  }\n\n  if (rotationX !== _zeroDeg) {\n    transforms += \"rotateX(\" + rotationX + _endParenthesis;\n  }\n\n  if (skewX !== _zeroDeg || skewY !== _zeroDeg) {\n    transforms += \"skew(\" + skewX + \", \" + skewY + _endParenthesis;\n  }\n\n  if (scaleX !== 1 || scaleY !== 1) {\n    transforms += \"scale(\" + scaleX + \", \" + scaleY + _endParenthesis;\n  }\n\n  target.style[_transformProp] = transforms || \"translate(0, 0)\";\n},\n    _renderSVGTransforms = function _renderSVGTransforms(ratio, cache) {\n  var _ref2 = cache || this,\n      xPercent = _ref2.xPercent,\n      yPercent = _ref2.yPercent,\n      x = _ref2.x,\n      y = _ref2.y,\n      rotation = _ref2.rotation,\n      skewX = _ref2.skewX,\n      skewY = _ref2.skewY,\n      scaleX = _ref2.scaleX,\n      scaleY = _ref2.scaleY,\n      target = _ref2.target,\n      xOrigin = _ref2.xOrigin,\n      yOrigin = _ref2.yOrigin,\n      xOffset = _ref2.xOffset,\n      yOffset = _ref2.yOffset,\n      forceCSS = _ref2.forceCSS,\n      tx = parseFloat(x),\n      ty = parseFloat(y),\n      a11,\n      a21,\n      a12,\n      a22,\n      temp;\n\n  rotation = parseFloat(rotation);\n  skewX = parseFloat(skewX);\n  skewY = parseFloat(skewY);\n\n  if (skewY) {\n    //for performance reasons, we combine all skewing into the skewX and rotation values. Remember, a skewY of 10 degrees looks the same as a rotation of 10 degrees plus a skewX of 10 degrees.\n    skewY = parseFloat(skewY);\n    skewX += skewY;\n    rotation += skewY;\n  }\n\n  if (rotation || skewX) {\n    rotation *= _DEG2RAD;\n    skewX *= _DEG2RAD;\n    a11 = Math.cos(rotation) * scaleX;\n    a21 = Math.sin(rotation) * scaleX;\n    a12 = Math.sin(rotation - skewX) * -scaleY;\n    a22 = Math.cos(rotation - skewX) * scaleY;\n\n    if (skewX) {\n      skewY *= _DEG2RAD;\n      temp = Math.tan(skewX - skewY);\n      temp = Math.sqrt(1 + temp * temp);\n      a12 *= temp;\n      a22 *= temp;\n\n      if (skewY) {\n        temp = Math.tan(skewY);\n        temp = Math.sqrt(1 + temp * temp);\n        a11 *= temp;\n        a21 *= temp;\n      }\n    }\n\n    a11 = _round(a11);\n    a21 = _round(a21);\n    a12 = _round(a12);\n    a22 = _round(a22);\n  } else {\n    a11 = scaleX;\n    a22 = scaleY;\n    a21 = a12 = 0;\n  }\n\n  if (tx && !~(x + \"\").indexOf(\"px\") || ty && !~(y + \"\").indexOf(\"px\")) {\n    tx = _convertToUnit(target, \"x\", x, \"px\");\n    ty = _convertToUnit(target, \"y\", y, \"px\");\n  }\n\n  if (xOrigin || yOrigin || xOffset || yOffset) {\n    tx = _round(tx + xOrigin - (xOrigin * a11 + yOrigin * a12) + xOffset);\n    ty = _round(ty + yOrigin - (xOrigin * a21 + yOrigin * a22) + yOffset);\n  }\n\n  if (xPercent || yPercent) {\n    //The SVG spec doesn't support percentage-based translation in the \"transform\" attribute, so we merge it into the translation to simulate it.\n    temp = target.getBBox();\n    tx = _round(tx + xPercent / 100 * temp.width);\n    ty = _round(ty + yPercent / 100 * temp.height);\n  }\n\n  temp = \"matrix(\" + a11 + \",\" + a21 + \",\" + a12 + \",\" + a22 + \",\" + tx + \",\" + ty + \")\";\n  target.setAttribute(\"transform\", temp);\n  forceCSS && (target.style[_transformProp] = temp); //some browsers prioritize CSS transforms over the transform attribute. When we sense that the user has CSS transforms applied, we must overwrite them this way (otherwise some browser simply won't render the transform attribute changes!)\n},\n    _addRotationalPropTween = function _addRotationalPropTween(plugin, target, property, startNum, endValue) {\n  var cap = 360,\n      isString = _isString(endValue),\n      endNum = parseFloat(endValue) * (isString && ~endValue.indexOf(\"rad\") ? _RAD2DEG : 1),\n      change = endNum - startNum,\n      finalValue = startNum + change + \"deg\",\n      direction,\n      pt;\n\n  if (isString) {\n    direction = endValue.split(\"_\")[1];\n\n    if (direction === \"short\") {\n      change %= cap;\n\n      if (change !== change % (cap / 2)) {\n        change += change < 0 ? cap : -cap;\n      }\n    }\n\n    if (direction === \"cw\" && change < 0) {\n      change = (change + cap * _bigNum) % cap - ~~(change / cap) * cap;\n    } else if (direction === \"ccw\" && change > 0) {\n      change = (change - cap * _bigNum) % cap - ~~(change / cap) * cap;\n    }\n  }\n\n  plugin._pt = pt = new PropTween(plugin._pt, target, property, startNum, change, _renderPropWithEnd);\n  pt.e = finalValue;\n  pt.u = \"deg\";\n\n  plugin._props.push(property);\n\n  return pt;\n},\n    _assign = function _assign(target, source) {\n  // Internet Explorer doesn't have Object.assign(), so we recreate it here.\n  for (var p in source) {\n    target[p] = source[p];\n  }\n\n  return target;\n},\n    _addRawTransformPTs = function _addRawTransformPTs(plugin, transforms, target) {\n  //for handling cases where someone passes in a whole transform string, like transform: \"scale(2, 3) rotate(20deg) translateY(30em)\"\n  var startCache = _assign({}, target._gsap),\n      exclude = \"perspective,force3D,transformOrigin,svgOrigin\",\n      style = target.style,\n      endCache,\n      p,\n      startValue,\n      endValue,\n      startNum,\n      endNum,\n      startUnit,\n      endUnit;\n\n  if (startCache.svg) {\n    startValue = target.getAttribute(\"transform\");\n    target.setAttribute(\"transform\", \"\");\n    style[_transformProp] = transforms;\n    endCache = _parseTransform(target, 1);\n\n    _removeProperty(target, _transformProp);\n\n    target.setAttribute(\"transform\", startValue);\n  } else {\n    startValue = getComputedStyle(target)[_transformProp];\n    style[_transformProp] = transforms;\n    endCache = _parseTransform(target, 1);\n    style[_transformProp] = startValue;\n  }\n\n  for (p in _transformProps) {\n    startValue = startCache[p];\n    endValue = endCache[p];\n\n    if (startValue !== endValue && exclude.indexOf(p) < 0) {\n      //tweening to no perspective gives very unintuitive results - just keep the same perspective in that case.\n      startUnit = getUnit(startValue);\n      endUnit = getUnit(endValue);\n      startNum = startUnit !== endUnit ? _convertToUnit(target, p, startValue, endUnit) : parseFloat(startValue);\n      endNum = parseFloat(endValue);\n      plugin._pt = new PropTween(plugin._pt, endCache, p, startNum, endNum - startNum, _renderCSSProp);\n      plugin._pt.u = endUnit || 0;\n\n      plugin._props.push(p);\n    }\n  }\n\n  _assign(endCache, startCache);\n}; // handle splitting apart padding, margin, borderWidth, and borderRadius into their 4 components. Firefox, for example, won't report borderRadius correctly - it will only do borderTopLeftRadius and the other corners. We also want to handle paddingTop, marginLeft, borderRightWidth, etc.\n\n\n_forEachName(\"padding,margin,Width,Radius\", function (name, index) {\n  var t = \"Top\",\n      r = \"Right\",\n      b = \"Bottom\",\n      l = \"Left\",\n      props = (index < 3 ? [t, r, b, l] : [t + l, t + r, b + r, b + l]).map(function (side) {\n    return index < 2 ? name + side : \"border\" + side + name;\n  });\n\n  _specialProps[index > 1 ? \"border\" + name : name] = function (plugin, target, property, endValue, tween) {\n    var a, vars;\n\n    if (arguments.length < 4) {\n      // getter, passed target, property, and unit (from _get())\n      a = props.map(function (prop) {\n        return _get(plugin, prop, property);\n      });\n      vars = a.join(\" \");\n      return vars.split(a[0]).length === 5 ? a[0] : vars;\n    }\n\n    a = (endValue + \"\").split(\" \");\n    vars = {};\n    props.forEach(function (prop, i) {\n      return vars[prop] = a[i] = a[i] || a[(i - 1) / 2 | 0];\n    });\n    plugin.init(target, vars, tween);\n  };\n});\n\nexport var CSSPlugin = {\n  name: \"css\",\n  register: _initCore,\n  targetTest: function targetTest(target) {\n    return target.style && target.nodeType;\n  },\n  init: function init(target, vars, tween, index, targets) {\n    var props = this._props,\n        style = target.style,\n        startAt = tween.vars.startAt,\n        startValue,\n        endValue,\n        endNum,\n        startNum,\n        type,\n        specialProp,\n        p,\n        startUnit,\n        endUnit,\n        relative,\n        isTransformRelated,\n        transformPropTween,\n        cache,\n        smooth,\n        hasPriority,\n        inlineProps;\n    _pluginInitted || _initCore(); // we may call init() multiple times on the same plugin instance, like when adding special properties, so make sure we don't overwrite the revert data or inlineProps\n\n    this.styles = this.styles || _getStyleSaver(target);\n    inlineProps = this.styles.props;\n    this.tween = tween;\n\n    for (p in vars) {\n      if (p === \"autoRound\") {\n        continue;\n      }\n\n      endValue = vars[p];\n\n      if (_plugins[p] && _checkPlugin(p, vars, tween, index, target, targets)) {\n        // plugins\n        continue;\n      }\n\n      type = typeof endValue;\n      specialProp = _specialProps[p];\n\n      if (type === \"function\") {\n        endValue = endValue.call(tween, index, target, targets);\n        type = typeof endValue;\n      }\n\n      if (type === \"string\" && ~endValue.indexOf(\"random(\")) {\n        endValue = _replaceRandom(endValue);\n      }\n\n      if (specialProp) {\n        specialProp(this, target, p, endValue, tween) && (hasPriority = 1);\n      } else if (p.substr(0, 2) === \"--\") {\n        //CSS variable\n        startValue = (getComputedStyle(target).getPropertyValue(p) + \"\").trim();\n        endValue += \"\";\n        _colorExp.lastIndex = 0;\n\n        if (!_colorExp.test(startValue)) {\n          // colors don't have units\n          startUnit = getUnit(startValue);\n          endUnit = getUnit(endValue);\n        }\n\n        endUnit ? startUnit !== endUnit && (startValue = _convertToUnit(target, p, startValue, endUnit) + endUnit) : startUnit && (endValue += startUnit);\n        this.add(style, \"setProperty\", startValue, endValue, index, targets, 0, 0, p);\n        props.push(p);\n        inlineProps.push(p, 0, style[p]);\n      } else if (type !== \"undefined\") {\n        if (startAt && p in startAt) {\n          // in case someone hard-codes a complex value as the start, like top: \"calc(2vh / 2)\". Without this, it'd use the computed value (always in px)\n          startValue = typeof startAt[p] === \"function\" ? startAt[p].call(tween, index, target, targets) : startAt[p];\n          _isString(startValue) && ~startValue.indexOf(\"random(\") && (startValue = _replaceRandom(startValue));\n          getUnit(startValue + \"\") || startValue === \"auto\" || (startValue += _config.units[p] || getUnit(_get(target, p)) || \"\"); // for cases when someone passes in a unitless value like {x: 100}; if we try setting translate(100, 0px) it won't work.\n\n          (startValue + \"\").charAt(1) === \"=\" && (startValue = _get(target, p)); // can't work with relative values\n        } else {\n          startValue = _get(target, p);\n        }\n\n        startNum = parseFloat(startValue);\n        relative = type === \"string\" && endValue.charAt(1) === \"=\" && endValue.substr(0, 2);\n        relative && (endValue = endValue.substr(2));\n        endNum = parseFloat(endValue);\n\n        if (p in _propertyAliases) {\n          if (p === \"autoAlpha\") {\n            //special case where we control the visibility along with opacity. We still allow the opacity value to pass through and get tweened.\n            if (startNum === 1 && _get(target, \"visibility\") === \"hidden\" && endNum) {\n              //if visibility is initially set to \"hidden\", we should interpret that as intent to make opacity 0 (a convenience)\n              startNum = 0;\n            }\n\n            inlineProps.push(\"visibility\", 0, style.visibility);\n\n            _addNonTweeningPT(this, style, \"visibility\", startNum ? \"inherit\" : \"hidden\", endNum ? \"inherit\" : \"hidden\", !endNum);\n          }\n\n          if (p !== \"scale\" && p !== \"transform\") {\n            p = _propertyAliases[p];\n            ~p.indexOf(\",\") && (p = p.split(\",\")[0]);\n          }\n        }\n\n        isTransformRelated = p in _transformProps; //--- TRANSFORM-RELATED ---\n\n        if (isTransformRelated) {\n          this.styles.save(p);\n\n          if (!transformPropTween) {\n            cache = target._gsap;\n            cache.renderTransform && !vars.parseTransform || _parseTransform(target, vars.parseTransform); // if, for example, gsap.set(... {transform:\"translateX(50vw)\"}), the _get() call doesn't parse the transform, thus cache.renderTransform won't be set yet so force the parsing of the transform here.\n\n            smooth = vars.smoothOrigin !== false && cache.smooth;\n            transformPropTween = this._pt = new PropTween(this._pt, style, _transformProp, 0, 1, cache.renderTransform, cache, 0, -1); //the first time through, create the rendering PropTween so that it runs LAST (in the linked list, we keep adding to the beginning)\n\n            transformPropTween.dep = 1; //flag it as dependent so that if things get killed/overwritten and this is the only PropTween left, we can safely kill the whole tween.\n          }\n\n          if (p === \"scale\") {\n            this._pt = new PropTween(this._pt, cache, \"scaleY\", cache.scaleY, (relative ? _parseRelative(cache.scaleY, relative + endNum) : endNum) - cache.scaleY || 0, _renderCSSProp);\n            this._pt.u = 0;\n            props.push(\"scaleY\", p);\n            p += \"X\";\n          } else if (p === \"transformOrigin\") {\n            inlineProps.push(_transformOriginProp, 0, style[_transformOriginProp]);\n            endValue = _convertKeywordsToPercentages(endValue); //in case something like \"left top\" or \"bottom right\" is passed in. Convert to percentages.\n\n            if (cache.svg) {\n              _applySVGOrigin(target, endValue, 0, smooth, 0, this);\n            } else {\n              endUnit = parseFloat(endValue.split(\" \")[2]) || 0; //handle the zOrigin separately!\n\n              endUnit !== cache.zOrigin && _addNonTweeningPT(this, cache, \"zOrigin\", cache.zOrigin, endUnit);\n\n              _addNonTweeningPT(this, style, p, _firstTwoOnly(startValue), _firstTwoOnly(endValue));\n            }\n\n            continue;\n          } else if (p === \"svgOrigin\") {\n            _applySVGOrigin(target, endValue, 1, smooth, 0, this);\n\n            continue;\n          } else if (p in _rotationalProperties) {\n            _addRotationalPropTween(this, cache, p, startNum, relative ? _parseRelative(startNum, relative + endValue) : endValue);\n\n            continue;\n          } else if (p === \"smoothOrigin\") {\n            _addNonTweeningPT(this, cache, \"smooth\", cache.smooth, endValue);\n\n            continue;\n          } else if (p === \"force3D\") {\n            cache[p] = endValue;\n            continue;\n          } else if (p === \"transform\") {\n            _addRawTransformPTs(this, endValue, target);\n\n            continue;\n          }\n        } else if (!(p in style)) {\n          p = _checkPropPrefix(p) || p;\n        }\n\n        if (isTransformRelated || (endNum || endNum === 0) && (startNum || startNum === 0) && !_complexExp.test(endValue) && p in style) {\n          startUnit = (startValue + \"\").substr((startNum + \"\").length);\n          endNum || (endNum = 0); // protect against NaN\n\n          endUnit = getUnit(endValue) || (p in _config.units ? _config.units[p] : startUnit);\n          startUnit !== endUnit && (startNum = _convertToUnit(target, p, startValue, endUnit));\n          this._pt = new PropTween(this._pt, isTransformRelated ? cache : style, p, startNum, (relative ? _parseRelative(startNum, relative + endNum) : endNum) - startNum, !isTransformRelated && (endUnit === \"px\" || p === \"zIndex\") && vars.autoRound !== false ? _renderRoundedCSSProp : _renderCSSProp);\n          this._pt.u = endUnit || 0;\n\n          if (startUnit !== endUnit && endUnit !== \"%\") {\n            //when the tween goes all the way back to the beginning, we need to revert it to the OLD/ORIGINAL value (with those units). We record that as a \"b\" (beginning) property and point to a render method that handles that. (performance optimization)\n            this._pt.b = startValue;\n            this._pt.r = _renderCSSPropWithBeginning;\n          }\n        } else if (!(p in style)) {\n          if (p in target) {\n            //maybe it's not a style - it could be a property added directly to an element in which case we'll try to animate that.\n            this.add(target, p, startValue || target[p], relative ? relative + endValue : endValue, index, targets);\n          } else if (p !== \"parseTransform\") {\n            _missingPlugin(p, endValue);\n\n            continue;\n          }\n        } else {\n          _tweenComplexCSSString.call(this, target, p, startValue, relative ? relative + endValue : endValue);\n        }\n\n        isTransformRelated || (p in style ? inlineProps.push(p, 0, style[p]) : inlineProps.push(p, 1, startValue || target[p]));\n        props.push(p);\n      }\n    }\n\n    hasPriority && _sortPropTweensByPriority(this);\n  },\n  render: function render(ratio, data) {\n    if (data.tween._time || !_reverting()) {\n      var pt = data._pt;\n\n      while (pt) {\n        pt.r(ratio, pt.d);\n        pt = pt._next;\n      }\n    } else {\n      data.styles.revert();\n    }\n  },\n  get: _get,\n  aliases: _propertyAliases,\n  getSetter: function getSetter(target, property, plugin) {\n    //returns a setter function that accepts target, property, value and applies it accordingly. Remember, properties like \"x\" aren't as simple as target.style.property = value because they've got to be applied to a proxy object and then merged into a transform string in a renderer.\n    var p = _propertyAliases[property];\n    p && p.indexOf(\",\") < 0 && (property = p);\n    return property in _transformProps && property !== _transformOriginProp && (target._gsap.x || _get(target, \"x\")) ? plugin && _recentSetterPlugin === plugin ? property === \"scale\" ? _setterScale : _setterTransform : (_recentSetterPlugin = plugin || {}) && (property === \"scale\" ? _setterScaleWithRender : _setterTransformWithRender) : target.style && !_isUndefined(target.style[property]) ? _setterCSSStyle : ~property.indexOf(\"-\") ? _setterCSSProp : _getSetter(target, property);\n  },\n  core: {\n    _removeProperty: _removeProperty,\n    _getMatrix: _getMatrix\n  }\n};\ngsap.utils.checkPrefix = _checkPropPrefix;\ngsap.core.getStyleSaver = _getStyleSaver;\n\n(function (positionAndScale, rotation, others, aliases) {\n  var all = _forEachName(positionAndScale + \",\" + rotation + \",\" + others, function (name) {\n    _transformProps[name] = 1;\n  });\n\n  _forEachName(rotation, function (name) {\n    _config.units[name] = \"deg\";\n    _rotationalProperties[name] = 1;\n  });\n\n  _propertyAliases[all[13]] = positionAndScale + \",\" + rotation;\n\n  _forEachName(aliases, function (name) {\n    var split = name.split(\":\");\n    _propertyAliases[split[1]] = all[split[0]];\n  });\n})(\"x,y,z,scale,scaleX,scaleY,xPercent,yPercent\", \"rotation,rotationX,rotationY,skewX,skewY\", \"transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective\", \"0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY\");\n\n_forEachName(\"x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective\", function (name) {\n  _config.units[name] = \"px\";\n});\n\ngsap.registerPlugin(CSSPlugin);\nexport { CSSPlugin as default, _getBBox, _createElement, _checkPropPrefix as checkPrefix };", "import { gsap, Power0, Power1, Power2, Power3, Power4, Linear, Quad, Cubic, Quart, Quint, Strong, Elastic, Back, SteppedEase, Bounce, Sine, Expo, Circ, TweenLite, TimelineLite, TimelineMax } from \"./gsap-core.js\";\nimport { CSSPlugin } from \"./CSSPlugin.js\";\nvar gsapWithCSS = gsap.registerPlugin(CSSPlugin) || gsap,\n    // to protect from tree shaking\nTweenMaxWithCSS = gsapWithCSS.core.Tween;\nexport { gsapWithCSS as gsap, gsapWithCSS as default, CSSPlugin, TweenMaxWithCSS as TweenMax, TweenLite, TimelineMax, TimelineLite, Power0, Power1, Power2, Power3, Power4, Linear, Quad, Cubic, Quart, Quint, Strong, Elastic, Back, SteppedEase, Bounce, Sine, Expo, Circ };", "import { Controller } from \"@hotwired/stimulus\"\n\n// Connects to data-controller=\"price-field\"\nexport default class extends Controller {\n  static targets = [\"originalPrice\", \"calculatedPrice\"]\n\n  connect() {\n    if (!this.hasOriginalPriceTarget) console.error(\"Missing originalPrice target.\")\n    if (!this.hasCalculatedPriceTarget) console.error(\"Missing calculatedPrice target.\")\n\n    this.originalPriceTarget.value = Math.round(this.calculatedPriceTarget.value / 100)\n  }\n\n  calculate() {\n    this.calculatedPriceTarget.value = Math.round(this.originalPriceTarget.value * 100)\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\n\n// Connects to data-controller=\"product-row\"\nexport default class extends Controller {\n  static values = {\n    productCount: {type: Number, default: 0},\n    productPrice: Number\n  }\n\n  static targets = [\n    \"summaryValue\"\n  ]\n\n  setProductCount(event){\n    this.productCountValue = parseInt(event.detail.count);\n  }\n\n  productCountValueChanged(){\n    // Format number for better readability\n    this.summaryValueTarget.textContent = new Intl.NumberFormat('sk-SK').format(this.productCountValue * this.productPriceValue);\n\n    // Trigger custom event, so that other controllers might react to it\n    dispatchEvent(new CustomEvent('productRowProductCountValueChanged', { detail: {count: this.productCountValue} }))\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n  static targets = [\"valueInput\", \"valueDisplay\", \"slider\"]\n  static values = { price: Number }\n\n  connect() {\n    this.initializeStyleProperties()\n    this.update()\n  }\n\n  initializeStyleProperties() {\n    this.sliderTarget.style.setProperty(\"--min\", this.min)\n    this.sliderTarget.style.setProperty(\"--max\", this.max)\n  }\n\n  update() {\n    // Update CSS variable --value to the current slider value\n    this.sliderTarget.style.setProperty(\"--value\", this.sliderValue)\n\n    // Update value display\n    if (this.sliderValue == this.max) {\n      this.valueDisplayTarget.innerText = `${this.sliderValue}+`\n    } else {\n      this.valueDisplayTarget.innerText = this.sliderValue\n    }\n\n    // Update main hidden field value\n    this.valueInputTarget.value = parseInt(this.sliderValue) * 100\n  }\n\n  stepUp() {\n    this.sliderTarget.stepUp()\n\n    this.update()\n  }\n\n  stepDown() {\n    this.sliderTarget.stepDown()\n\n    this.update()\n  }\n\n  get sliderValue() {\n    return this.sliderTarget.value\n  }\n\n  get min() {\n    return this.sliderTarget.min == \"\" ? \"0\" : this.sliderTarget.min\n  }\n\n  get max() {\n    return this.sliderTarget.max == \"\" ? \"100\" : this.sliderTarget.max\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nconst _ReadMore = class _ReadMore extends Controller {\n  connect() {\n    this.open = !1;\n  }\n  toggle(event) {\n    this.open === !1 ? this.show(event) : this.hide(event);\n  }\n  show(event) {\n    this.open = !0;\n    const target = event.target;\n    target.innerHTML = this.lessTextValue, this.contentTarget.style.setProperty(\"--read-more-line-clamp\", \"'unset'\");\n  }\n  hide(event) {\n    this.open = !1;\n    const target = event.target;\n    target.innerHTML = this.moreTextValue, this.contentTarget.style.removeProperty(\"--read-more-line-clamp\");\n  }\n};\n_ReadMore.targets = [\"content\"], _ReadMore.values = {\n  moreText: String,\n  lessText: String\n};\nlet ReadMore = _ReadMore;\nexport {\n  ReadMore as default\n};\n", "import ReadMore from \"@stimulus-components/read-more\"\n\n// Connects to data-controller=\"read-more\"\nexport default class extends ReadMore {\n  static targets = [\"readMore\"]\n\n  connect() {\n    super.connect()\n\n    const scrollHeight = this.contentTarget.scrollHeight\n    const clientHeight = this.contentTarget.clientHeight\n\n    if (scrollHeight > clientHeight) {\n      this.readMoreTarget.classList.remove(\"hidden\")\n    } else {\n      this.readMoreTarget.classList.add(\"hidden\")\n    }\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\n\n// Connects to data-controller=\"scroll-into-view\"\nexport default class extends Controller {\n  connect() {\n    // Timeout handles async requests, when data is loaded after the page is rendered\n    // 250ms is a good value for most cases\n    setTimeout(() => {\n      this.element.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'center' })\n    }, 250)\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\n\n// Connects to data-controller=\"scroll-to-bottom\"\nexport default class extends Controller {\n  connect() {\n    this.element.scrollTo(0, this.element.scrollHeight);\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\nimport _debounce from \"lodash/debounce\"\n\n// Connects to data-controller=\"search-in\"\nexport default class extends Controller {\n\n  static values = {\n    componentIsWorking: Boolean\n  }\n\n  static targets = [\n    \"searchField\",\n    \"searchItem\",\n    \"clearSearch\",\n    \"iconSearch\",\n    \"iconSpinner\"\n  ]\n\n  connect() {\n    // Debounced event func. expression - so that it can be used inside anonymous function and still be debounced\n    const debounceInputEvent = _debounce(this.searchIn , 300).bind(this);\n    // Event listener\n    this.searchFieldTarget.addEventListener('input', (evt) => {\n      // Switch on loading status\n      this.componentIsWorkingValue = true;\n      this.clearSearchTarget.classList.toggle('hidden', !this.searchFieldTarget.value != '')\n      return debounceInputEvent();\n    });\n\n    // Initial checks\n    this.componentIsWorkingValueChanged();\n    this.clearSearchTarget.classList.toggle('hidden', !this.searchFieldTarget.value != '')\n  }\n \n  searchIn(){\n    this.searchItemTargets.forEach(el => {\n      const searchTerm = this.searchFieldTarget.value;\n      const normalizedSearchTerm = searchTerm.toLowerCase().normalize('NFD').replace(/[\\u0300-\\u036f]/g, '');\n      \n      // If the target input is found in search toggle its 'hidden' class and its inputs disabled status\n      el.classList.toggle( 'hidden' , !el.dataset.searchId.toLowerCase().includes( normalizedSearchTerm ) );\n      el.querySelector('input').disabled = !el.dataset.searchId.toLowerCase().includes( normalizedSearchTerm );\n\n      // Trigger custom event, so that other controllers might react to it\n      dispatchEvent(new Event('searchInSearchFinished'))\n    });\n\n    // Turn off loading status\n    this.componentIsWorkingValue = false;\n  }\n\n  clearSearch(){\n    this.searchFieldTarget.value = '';\n    this.searchIn();\n  }\n\n  componentIsWorkingValueChanged(){\n    this.iconSearchTarget.classList.toggle('hidden', this.componentIsWorkingValue)\n    this.iconSpinnerTarget.classList.toggle('hidden', !this.componentIsWorkingValue)\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\n//import(\"@uppy/golden-retriever/lib/ServiceWorker\")\n\nexport default class extends Controller {\n  connect() {\n    if (navigator.serviceWorker) {\n      if (navigator.serviceWorker.controller) {\n        console.info(\"Service worker already running..\")\n        // If the service worker is already running, skip to state change\n        this.stateChange()\n      } else {\n        // Register the service worker, and wait for it to become active\n        navigator.serviceWorker.register(\"/service-worker.js\", { scope: \"./\" }).then(function (reg) {\n          console.log(\"[Companion]\", \"Service worker registered!\")\n        })\n        navigator.serviceWorker.addEventListener(\"controllerchange\", this.controllerChange.bind(this))\n      }\n    } else {\n      console.info(\"Service worker not supported.\")\n    }\n  }\n\n  controllerChange(event) {\n    navigator.serviceWorker.controller.addEventListener(\"statechange\", this.stateChange.bind(this))\n  }\n\n  stateChange() {\n    // perform any visual manipulations here\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\nimport debounce from \"lodash/debounce\"\nimport { post } from \"@rails/request.js\"\n\nexport default class extends Controller {\n  static targets = [\n    \"close\",\n    \"emptyState\",\n    \"loadingState\",\n    \"result\",\n    \"results\",\n    \"finstatName\",\n    \"finstatAddress\",\n    \"finstatCity\",\n    \"finstatZip\",\n    \"finstatCountry\",\n    \"finstatId\",\n    \"finstatTax\",\n    \"finstatVat\",\n    \"finstatVatCheckbox\",\n  ]\n\n  static values = {\n    autocompleteUrl: String,\n    detailUrl: String,\n  }\n\n  connect() {\n    if (!this.hasResultsTarget) console.error(\"Missing results target.\")\n    if (!this.autocompleteUrlValue) console.error(\"Missing autocomplete url value.\")\n    if (!this.detailUrlValue) console.error(\"Missing detail url value.\")\n\n    this.autocomplete = debounce(this.autocomplete, 200).bind(this)\n    this.detail = debounce(this.detail, 200).bind(this)\n  }\n\n  // Fetches autocompleted companies json\n  async autocomplete(e) {\n    const query = e.target.value\n\n    if (e.key === \"Escape\") return\n\n    if (query.length < 3) {\n      this.hideEverything()\n    } else {\n      this.showLoadingState()\n\n      const response = await post(this.autocompleteUrlValue, {\n        contentType: \"application/json\",\n        responseKind: \"json\",\n        body: {\n          q: query,\n        },\n      })\n\n      if (response.ok) {\n        const data = await response.json\n\n        console.info(data)\n\n        if (data && data[\"Results\"] && data[\"Results\"].length > 0) {\n          this.renderResults(data[\"Results\"])\n          this.showResults()\n        } else {\n          this.showEmptyState()\n        }\n      }\n    }\n  }\n\n  // Fetches company detail json\n  async detail(event) {\n    event.preventDefault()\n\n    if (typeof event.params.ico === \"undefined\") return\n\n    const response = await post(this.detailUrlValue, {\n      contentType: \"application/json\",\n      responseKind: \"json\",\n      body: {\n        q: event.params.ico,\n      },\n    })\n\n    if (response.ok) {\n      const data = await response.json\n\n      if (this.hasFinstatNameTarget && data[\"Name\"] !== null) {\n        this.finstatNameTargets.forEach((target) => {\n          target.value = data[\"Name\"]\n        })\n      }\n\n      if (this.hasFinstatAddressTarget) {\n        let addressArr = [data[\"Street\"], data[\"StreetNumber\"]].filter((item) => {\n          return item !== null && item.length > 0\n        })\n\n        this.finstatAddressTargets.forEach((target) => {\n          target.value = addressArr.join(\" \")\n        })\n      }\n\n      if (this.hasFinstatCityTarget) {\n        this.finstatCityTargets.forEach((target) => {\n          target.value = data[\"City\"]\n        })\n      }\n\n      if (this.hasFinstatZipTarget) {\n        this.finstatZipTargets.forEach((target) => {\n          target.value = data[\"ZipCode\"]\n        })\n      }\n\n      if (this.hasFinstatIdTarget) {\n        this.finstatIdTargets.forEach((target) => {\n          target.value = data[\"Ico\"]\n        })\n      }\n\n      if (this.hasFinstatTaxTarget) {\n        this.finstatTaxTargets.forEach((target) => {\n          target.value = data[\"Dic\"] || \"\";\n        })\n      }\n\n      if (this.hasFinstatCountryTarget) {\n        this.finstatCountryTargets.forEach((target) => {\n          target.value = data[\"Country\"]\n        })\n      }\n\n      if (this.hasFinstatVatTarget) {\n        const inputEvent = new Event(\"input\")\n\n        this.finstatVatTargets.forEach((target) => {\n          target.value = data[\"IcDPH\"]\n          target.dispatchEvent(inputEvent)\n        })\n      }\n\n      if (this.hasFinstatVatCheckboxTarget) {\n        const changeEvent = new Event(\"change\")\n\n        if (data[\"IcDPH\"] !== null) {\n          this.finstatVatCheckboxTarget.checked = true\n        } else {\n          this.finstatVatCheckboxTarget.checked = false\n        }\n\n        this.finstatVatCheckboxTarget.dispatchEvent(changeEvent)\n      }\n    }\n\n    this.hideEverything()\n  }\n\n  renderResults(results) {\n    this.resultsTarget.innerHTML = \"\"\n\n    let closeElement = this.closeTarget.content.firstElementChild.cloneNode(true)\n    this.resultsTarget.appendChild(closeElement)\n\n    results.forEach((result) => {\n      let element = this.resultTarget.content.firstElementChild.cloneNode(true)\n      let company = element.querySelector(\"[data-company]\")\n      let ico = element.querySelector(\"[data-ico]\")\n\n      // Set ICO as element param needed for detail() function\n      element.dataset[\"services-FinstatIcoParam\"] = result[\"Ico\"]\n\n      // Fill template with company details shown in dropdown\n      company.textContent = `${result[\"Name\"]}, ${result[\"City\"]}`\n      ico.textContent = `${result[\"Ico\"]}`\n\n      this.resultsTarget.appendChild(element)\n    })\n  }\n\n  showResults() {\n    this.resultsTarget.removeAttribute(\"hidden\")\n    this.emptyStateTarget.setAttribute(\"hidden\", true)\n    this.loadingStateTarget.setAttribute(\"hidden\", true)\n  }\n\n  showEmptyState() {\n    this.resultsTarget.setAttribute(\"hidden\", true)\n    this.emptyStateTarget.removeAttribute(\"hidden\")\n    this.loadingStateTarget.setAttribute(\"hidden\", true)\n  }\n\n  showLoadingState() {\n    this.resultsTarget.setAttribute(\"hidden\", true)\n    this.emptyStateTarget.setAttribute(\"hidden\", true)\n    this.loadingStateTarget.removeAttribute(\"hidden\")\n  }\n\n  hideEverything() {\n    this.resultsTarget.setAttribute(\"hidden\", true)\n    this.emptyStateTarget.setAttribute(\"hidden\", true)\n    this.loadingStateTarget.setAttribute(\"hidden\", true)\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n  static targets = [\"content\", \"button\"]\n  static values = {\n    initialHeight: Number,\n    originalHeight: Number,\n    step: Number,\n  }\n\n  connect() {\n    const contentTarget = this.contentTarget\n    const buttonTarget = this.buttonTarget\n\n    // Store original height\n    this.originalHeightValue = contentTarget.offsetHeight\n\n    // Make it small if needed\n    if (this.originalHeightValue > this.initialHeightValue) {\n      contentTarget.style.height = this.initialHeightValue + \"px\"\n    } else {\n      buttonTarget.style.display = \"none\"\n    }\n  }\n\n  expandContent(e) {\n    e.preventDefault()\n\n    const contentTarget = this.contentTarget\n    const buttonTarget = this.buttonTarget\n    const originalHeight = this.originalHeightValue\n    const step = this.stepValue\n\n    // Make it taller\n    if (contentTarget.offsetHeight + step > originalHeight) {\n      contentTarget.style.height = originalHeight + \"px\"\n      buttonTarget.style.display = \"none\"\n    } else {\n      contentTarget.style.height = contentTarget.offsetHeight + step + \"px\"\n    }\n  }\n}\n", "/**!\n * Sortable 1.15.2\n * @author\tRubaXa   <trash@rubaxa.org>\n * @author\towenm    <owen23355@gmail.com>\n * @license MIT\n */\nfunction ownKeys(object, enumerableOnly) {\n  var keys = Object.keys(object);\n  if (Object.getOwnPropertySymbols) {\n    var symbols = Object.getOwnPropertySymbols(object);\n    if (enumerableOnly) {\n      symbols = symbols.filter(function (sym) {\n        return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n      });\n    }\n    keys.push.apply(keys, symbols);\n  }\n  return keys;\n}\nfunction _objectSpread2(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i] != null ? arguments[i] : {};\n    if (i % 2) {\n      ownKeys(Object(source), true).forEach(function (key) {\n        _defineProperty(target, key, source[key]);\n      });\n    } else if (Object.getOwnPropertyDescriptors) {\n      Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n    } else {\n      ownKeys(Object(source)).forEach(function (key) {\n        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n      });\n    }\n  }\n  return target;\n}\nfunction _typeof(obj) {\n  \"@babel/helpers - typeof\";\n\n  if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n    _typeof = function (obj) {\n      return typeof obj;\n    };\n  } else {\n    _typeof = function (obj) {\n      return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n    };\n  }\n  return _typeof(obj);\n}\nfunction _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n  return obj;\n}\nfunction _extends() {\n  _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  return _extends.apply(this, arguments);\n}\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n  if (source == null) return {};\n  var target = {};\n  var sourceKeys = Object.keys(source);\n  var key, i;\n  for (i = 0; i < sourceKeys.length; i++) {\n    key = sourceKeys[i];\n    if (excluded.indexOf(key) >= 0) continue;\n    target[key] = source[key];\n  }\n  return target;\n}\nfunction _objectWithoutProperties(source, excluded) {\n  if (source == null) return {};\n  var target = _objectWithoutPropertiesLoose(source, excluded);\n  var key, i;\n  if (Object.getOwnPropertySymbols) {\n    var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n    for (i = 0; i < sourceSymbolKeys.length; i++) {\n      key = sourceSymbolKeys[i];\n      if (excluded.indexOf(key) >= 0) continue;\n      if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n      target[key] = source[key];\n    }\n  }\n  return target;\n}\nfunction _toConsumableArray(arr) {\n  return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\nfunction _arrayWithoutHoles(arr) {\n  if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\nfunction _iterableToArray(iter) {\n  if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\nfunction _unsupportedIterableToArray(o, minLen) {\n  if (!o) return;\n  if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n  var n = Object.prototype.toString.call(o).slice(8, -1);\n  if (n === \"Object\" && o.constructor) n = o.constructor.name;\n  if (n === \"Map\" || n === \"Set\") return Array.from(o);\n  if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\nfunction _arrayLikeToArray(arr, len) {\n  if (len == null || len > arr.length) len = arr.length;\n  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n  return arr2;\n}\nfunction _nonIterableSpread() {\n  throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nvar version = \"1.15.2\";\n\nfunction userAgent(pattern) {\n  if (typeof window !== 'undefined' && window.navigator) {\n    return !! /*@__PURE__*/navigator.userAgent.match(pattern);\n  }\n}\nvar IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\\.|msie|iemobile|Windows Phone)/i);\nvar Edge = userAgent(/Edge/i);\nvar FireFox = userAgent(/firefox/i);\nvar Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i);\nvar IOS = userAgent(/iP(ad|od|hone)/i);\nvar ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i);\n\nvar captureMode = {\n  capture: false,\n  passive: false\n};\nfunction on(el, event, fn) {\n  el.addEventListener(event, fn, !IE11OrLess && captureMode);\n}\nfunction off(el, event, fn) {\n  el.removeEventListener(event, fn, !IE11OrLess && captureMode);\n}\nfunction matches( /**HTMLElement*/el, /**String*/selector) {\n  if (!selector) return;\n  selector[0] === '>' && (selector = selector.substring(1));\n  if (el) {\n    try {\n      if (el.matches) {\n        return el.matches(selector);\n      } else if (el.msMatchesSelector) {\n        return el.msMatchesSelector(selector);\n      } else if (el.webkitMatchesSelector) {\n        return el.webkitMatchesSelector(selector);\n      }\n    } catch (_) {\n      return false;\n    }\n  }\n  return false;\n}\nfunction getParentOrHost(el) {\n  return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode;\n}\nfunction closest( /**HTMLElement*/el, /**String*/selector, /**HTMLElement*/ctx, includeCTX) {\n  if (el) {\n    ctx = ctx || document;\n    do {\n      if (selector != null && (selector[0] === '>' ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) {\n        return el;\n      }\n      if (el === ctx) break;\n      /* jshint boss:true */\n    } while (el = getParentOrHost(el));\n  }\n  return null;\n}\nvar R_SPACE = /\\s+/g;\nfunction toggleClass(el, name, state) {\n  if (el && name) {\n    if (el.classList) {\n      el.classList[state ? 'add' : 'remove'](name);\n    } else {\n      var className = (' ' + el.className + ' ').replace(R_SPACE, ' ').replace(' ' + name + ' ', ' ');\n      el.className = (className + (state ? ' ' + name : '')).replace(R_SPACE, ' ');\n    }\n  }\n}\nfunction css(el, prop, val) {\n  var style = el && el.style;\n  if (style) {\n    if (val === void 0) {\n      if (document.defaultView && document.defaultView.getComputedStyle) {\n        val = document.defaultView.getComputedStyle(el, '');\n      } else if (el.currentStyle) {\n        val = el.currentStyle;\n      }\n      return prop === void 0 ? val : val[prop];\n    } else {\n      if (!(prop in style) && prop.indexOf('webkit') === -1) {\n        prop = '-webkit-' + prop;\n      }\n      style[prop] = val + (typeof val === 'string' ? '' : 'px');\n    }\n  }\n}\nfunction matrix(el, selfOnly) {\n  var appliedTransforms = '';\n  if (typeof el === 'string') {\n    appliedTransforms = el;\n  } else {\n    do {\n      var transform = css(el, 'transform');\n      if (transform && transform !== 'none') {\n        appliedTransforms = transform + ' ' + appliedTransforms;\n      }\n      /* jshint boss:true */\n    } while (!selfOnly && (el = el.parentNode));\n  }\n  var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;\n  /*jshint -W056 */\n  return matrixFn && new matrixFn(appliedTransforms);\n}\nfunction find(ctx, tagName, iterator) {\n  if (ctx) {\n    var list = ctx.getElementsByTagName(tagName),\n      i = 0,\n      n = list.length;\n    if (iterator) {\n      for (; i < n; i++) {\n        iterator(list[i], i);\n      }\n    }\n    return list;\n  }\n  return [];\n}\nfunction getWindowScrollingElement() {\n  var scrollingElement = document.scrollingElement;\n  if (scrollingElement) {\n    return scrollingElement;\n  } else {\n    return document.documentElement;\n  }\n}\n\n/**\r\n * Returns the \"bounding client rect\" of given element\r\n * @param  {HTMLElement} el                       The element whose boundingClientRect is wanted\r\n * @param  {[Boolean]} relativeToContainingBlock  Whether the rect should be relative to the containing block of (including) the container\r\n * @param  {[Boolean]} relativeToNonStaticParent  Whether the rect should be relative to the relative parent of (including) the contaienr\r\n * @param  {[Boolean]} undoScale                  Whether the container's scale() should be undone\r\n * @param  {[HTMLElement]} container              The parent the element will be placed in\r\n * @return {Object}                               The boundingClientRect of el, with specified adjustments\r\n */\nfunction getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) {\n  if (!el.getBoundingClientRect && el !== window) return;\n  var elRect, top, left, bottom, right, height, width;\n  if (el !== window && el.parentNode && el !== getWindowScrollingElement()) {\n    elRect = el.getBoundingClientRect();\n    top = elRect.top;\n    left = elRect.left;\n    bottom = elRect.bottom;\n    right = elRect.right;\n    height = elRect.height;\n    width = elRect.width;\n  } else {\n    top = 0;\n    left = 0;\n    bottom = window.innerHeight;\n    right = window.innerWidth;\n    height = window.innerHeight;\n    width = window.innerWidth;\n  }\n  if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) {\n    // Adjust for translate()\n    container = container || el.parentNode;\n\n    // solves #1123 (see: https://stackoverflow.com/a/37953806/6088312)\n    // Not needed on <= IE11\n    if (!IE11OrLess) {\n      do {\n        if (container && container.getBoundingClientRect && (css(container, 'transform') !== 'none' || relativeToNonStaticParent && css(container, 'position') !== 'static')) {\n          var containerRect = container.getBoundingClientRect();\n\n          // Set relative to edges of padding box of container\n          top -= containerRect.top + parseInt(css(container, 'border-top-width'));\n          left -= containerRect.left + parseInt(css(container, 'border-left-width'));\n          bottom = top + elRect.height;\n          right = left + elRect.width;\n          break;\n        }\n        /* jshint boss:true */\n      } while (container = container.parentNode);\n    }\n  }\n  if (undoScale && el !== window) {\n    // Adjust for scale()\n    var elMatrix = matrix(container || el),\n      scaleX = elMatrix && elMatrix.a,\n      scaleY = elMatrix && elMatrix.d;\n    if (elMatrix) {\n      top /= scaleY;\n      left /= scaleX;\n      width /= scaleX;\n      height /= scaleY;\n      bottom = top + height;\n      right = left + width;\n    }\n  }\n  return {\n    top: top,\n    left: left,\n    bottom: bottom,\n    right: right,\n    width: width,\n    height: height\n  };\n}\n\n/**\r\n * Checks if a side of an element is scrolled past a side of its parents\r\n * @param  {HTMLElement}  el           The element who's side being scrolled out of view is in question\r\n * @param  {String}       elSide       Side of the element in question ('top', 'left', 'right', 'bottom')\r\n * @param  {String}       parentSide   Side of the parent in question ('top', 'left', 'right', 'bottom')\r\n * @return {HTMLElement}               The parent scroll element that the el's side is scrolled past, or null if there is no such element\r\n */\nfunction isScrolledPast(el, elSide, parentSide) {\n  var parent = getParentAutoScrollElement(el, true),\n    elSideVal = getRect(el)[elSide];\n\n  /* jshint boss:true */\n  while (parent) {\n    var parentSideVal = getRect(parent)[parentSide],\n      visible = void 0;\n    if (parentSide === 'top' || parentSide === 'left') {\n      visible = elSideVal >= parentSideVal;\n    } else {\n      visible = elSideVal <= parentSideVal;\n    }\n    if (!visible) return parent;\n    if (parent === getWindowScrollingElement()) break;\n    parent = getParentAutoScrollElement(parent, false);\n  }\n  return false;\n}\n\n/**\r\n * Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible)\r\n * and non-draggable elements\r\n * @param  {HTMLElement} el       The parent element\r\n * @param  {Number} childNum      The index of the child\r\n * @param  {Object} options       Parent Sortable's options\r\n * @return {HTMLElement}          The child at index childNum, or null if not found\r\n */\nfunction getChild(el, childNum, options, includeDragEl) {\n  var currentChild = 0,\n    i = 0,\n    children = el.children;\n  while (i < children.length) {\n    if (children[i].style.display !== 'none' && children[i] !== Sortable.ghost && (includeDragEl || children[i] !== Sortable.dragged) && closest(children[i], options.draggable, el, false)) {\n      if (currentChild === childNum) {\n        return children[i];\n      }\n      currentChild++;\n    }\n    i++;\n  }\n  return null;\n}\n\n/**\r\n * Gets the last child in the el, ignoring ghostEl or invisible elements (clones)\r\n * @param  {HTMLElement} el       Parent element\r\n * @param  {selector} selector    Any other elements that should be ignored\r\n * @return {HTMLElement}          The last child, ignoring ghostEl\r\n */\nfunction lastChild(el, selector) {\n  var last = el.lastElementChild;\n  while (last && (last === Sortable.ghost || css(last, 'display') === 'none' || selector && !matches(last, selector))) {\n    last = last.previousElementSibling;\n  }\n  return last || null;\n}\n\n/**\r\n * Returns the index of an element within its parent for a selected set of\r\n * elements\r\n * @param  {HTMLElement} el\r\n * @param  {selector} selector\r\n * @return {number}\r\n */\nfunction index(el, selector) {\n  var index = 0;\n  if (!el || !el.parentNode) {\n    return -1;\n  }\n\n  /* jshint boss:true */\n  while (el = el.previousElementSibling) {\n    if (el.nodeName.toUpperCase() !== 'TEMPLATE' && el !== Sortable.clone && (!selector || matches(el, selector))) {\n      index++;\n    }\n  }\n  return index;\n}\n\n/**\r\n * Returns the scroll offset of the given element, added with all the scroll offsets of parent elements.\r\n * The value is returned in real pixels.\r\n * @param  {HTMLElement} el\r\n * @return {Array}             Offsets in the format of [left, top]\r\n */\nfunction getRelativeScrollOffset(el) {\n  var offsetLeft = 0,\n    offsetTop = 0,\n    winScroller = getWindowScrollingElement();\n  if (el) {\n    do {\n      var elMatrix = matrix(el),\n        scaleX = elMatrix.a,\n        scaleY = elMatrix.d;\n      offsetLeft += el.scrollLeft * scaleX;\n      offsetTop += el.scrollTop * scaleY;\n    } while (el !== winScroller && (el = el.parentNode));\n  }\n  return [offsetLeft, offsetTop];\n}\n\n/**\r\n * Returns the index of the object within the given array\r\n * @param  {Array} arr   Array that may or may not hold the object\r\n * @param  {Object} obj  An object that has a key-value pair unique to and identical to a key-value pair in the object you want to find\r\n * @return {Number}      The index of the object in the array, or -1\r\n */\nfunction indexOfObject(arr, obj) {\n  for (var i in arr) {\n    if (!arr.hasOwnProperty(i)) continue;\n    for (var key in obj) {\n      if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i);\n    }\n  }\n  return -1;\n}\nfunction getParentAutoScrollElement(el, includeSelf) {\n  // skip to window\n  if (!el || !el.getBoundingClientRect) return getWindowScrollingElement();\n  var elem = el;\n  var gotSelf = false;\n  do {\n    // we don't need to get elem css if it isn't even overflowing in the first place (performance)\n    if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) {\n      var elemCSS = css(elem);\n      if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == 'auto' || elemCSS.overflowX == 'scroll') || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == 'auto' || elemCSS.overflowY == 'scroll')) {\n        if (!elem.getBoundingClientRect || elem === document.body) return getWindowScrollingElement();\n        if (gotSelf || includeSelf) return elem;\n        gotSelf = true;\n      }\n    }\n    /* jshint boss:true */\n  } while (elem = elem.parentNode);\n  return getWindowScrollingElement();\n}\nfunction extend(dst, src) {\n  if (dst && src) {\n    for (var key in src) {\n      if (src.hasOwnProperty(key)) {\n        dst[key] = src[key];\n      }\n    }\n  }\n  return dst;\n}\nfunction isRectEqual(rect1, rect2) {\n  return Math.round(rect1.top) === Math.round(rect2.top) && Math.round(rect1.left) === Math.round(rect2.left) && Math.round(rect1.height) === Math.round(rect2.height) && Math.round(rect1.width) === Math.round(rect2.width);\n}\nvar _throttleTimeout;\nfunction throttle(callback, ms) {\n  return function () {\n    if (!_throttleTimeout) {\n      var args = arguments,\n        _this = this;\n      if (args.length === 1) {\n        callback.call(_this, args[0]);\n      } else {\n        callback.apply(_this, args);\n      }\n      _throttleTimeout = setTimeout(function () {\n        _throttleTimeout = void 0;\n      }, ms);\n    }\n  };\n}\nfunction cancelThrottle() {\n  clearTimeout(_throttleTimeout);\n  _throttleTimeout = void 0;\n}\nfunction scrollBy(el, x, y) {\n  el.scrollLeft += x;\n  el.scrollTop += y;\n}\nfunction clone(el) {\n  var Polymer = window.Polymer;\n  var $ = window.jQuery || window.Zepto;\n  if (Polymer && Polymer.dom) {\n    return Polymer.dom(el).cloneNode(true);\n  } else if ($) {\n    return $(el).clone(true)[0];\n  } else {\n    return el.cloneNode(true);\n  }\n}\nfunction setRect(el, rect) {\n  css(el, 'position', 'absolute');\n  css(el, 'top', rect.top);\n  css(el, 'left', rect.left);\n  css(el, 'width', rect.width);\n  css(el, 'height', rect.height);\n}\nfunction unsetRect(el) {\n  css(el, 'position', '');\n  css(el, 'top', '');\n  css(el, 'left', '');\n  css(el, 'width', '');\n  css(el, 'height', '');\n}\nfunction getChildContainingRectFromElement(container, options, ghostEl) {\n  var rect = {};\n  Array.from(container.children).forEach(function (child) {\n    var _rect$left, _rect$top, _rect$right, _rect$bottom;\n    if (!closest(child, options.draggable, container, false) || child.animated || child === ghostEl) return;\n    var childRect = getRect(child);\n    rect.left = Math.min((_rect$left = rect.left) !== null && _rect$left !== void 0 ? _rect$left : Infinity, childRect.left);\n    rect.top = Math.min((_rect$top = rect.top) !== null && _rect$top !== void 0 ? _rect$top : Infinity, childRect.top);\n    rect.right = Math.max((_rect$right = rect.right) !== null && _rect$right !== void 0 ? _rect$right : -Infinity, childRect.right);\n    rect.bottom = Math.max((_rect$bottom = rect.bottom) !== null && _rect$bottom !== void 0 ? _rect$bottom : -Infinity, childRect.bottom);\n  });\n  rect.width = rect.right - rect.left;\n  rect.height = rect.bottom - rect.top;\n  rect.x = rect.left;\n  rect.y = rect.top;\n  return rect;\n}\nvar expando = 'Sortable' + new Date().getTime();\n\nfunction AnimationStateManager() {\n  var animationStates = [],\n    animationCallbackId;\n  return {\n    captureAnimationState: function captureAnimationState() {\n      animationStates = [];\n      if (!this.options.animation) return;\n      var children = [].slice.call(this.el.children);\n      children.forEach(function (child) {\n        if (css(child, 'display') === 'none' || child === Sortable.ghost) return;\n        animationStates.push({\n          target: child,\n          rect: getRect(child)\n        });\n        var fromRect = _objectSpread2({}, animationStates[animationStates.length - 1].rect);\n\n        // If animating: compensate for current animation\n        if (child.thisAnimationDuration) {\n          var childMatrix = matrix(child, true);\n          if (childMatrix) {\n            fromRect.top -= childMatrix.f;\n            fromRect.left -= childMatrix.e;\n          }\n        }\n        child.fromRect = fromRect;\n      });\n    },\n    addAnimationState: function addAnimationState(state) {\n      animationStates.push(state);\n    },\n    removeAnimationState: function removeAnimationState(target) {\n      animationStates.splice(indexOfObject(animationStates, {\n        target: target\n      }), 1);\n    },\n    animateAll: function animateAll(callback) {\n      var _this = this;\n      if (!this.options.animation) {\n        clearTimeout(animationCallbackId);\n        if (typeof callback === 'function') callback();\n        return;\n      }\n      var animating = false,\n        animationTime = 0;\n      animationStates.forEach(function (state) {\n        var time = 0,\n          target = state.target,\n          fromRect = target.fromRect,\n          toRect = getRect(target),\n          prevFromRect = target.prevFromRect,\n          prevToRect = target.prevToRect,\n          animatingRect = state.rect,\n          targetMatrix = matrix(target, true);\n        if (targetMatrix) {\n          // Compensate for current animation\n          toRect.top -= targetMatrix.f;\n          toRect.left -= targetMatrix.e;\n        }\n        target.toRect = toRect;\n        if (target.thisAnimationDuration) {\n          // Could also check if animatingRect is between fromRect and toRect\n          if (isRectEqual(prevFromRect, toRect) && !isRectEqual(fromRect, toRect) &&\n          // Make sure animatingRect is on line between toRect & fromRect\n          (animatingRect.top - toRect.top) / (animatingRect.left - toRect.left) === (fromRect.top - toRect.top) / (fromRect.left - toRect.left)) {\n            // If returning to same place as started from animation and on same axis\n            time = calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options);\n          }\n        }\n\n        // if fromRect != toRect: animate\n        if (!isRectEqual(toRect, fromRect)) {\n          target.prevFromRect = fromRect;\n          target.prevToRect = toRect;\n          if (!time) {\n            time = _this.options.animation;\n          }\n          _this.animate(target, animatingRect, toRect, time);\n        }\n        if (time) {\n          animating = true;\n          animationTime = Math.max(animationTime, time);\n          clearTimeout(target.animationResetTimer);\n          target.animationResetTimer = setTimeout(function () {\n            target.animationTime = 0;\n            target.prevFromRect = null;\n            target.fromRect = null;\n            target.prevToRect = null;\n            target.thisAnimationDuration = null;\n          }, time);\n          target.thisAnimationDuration = time;\n        }\n      });\n      clearTimeout(animationCallbackId);\n      if (!animating) {\n        if (typeof callback === 'function') callback();\n      } else {\n        animationCallbackId = setTimeout(function () {\n          if (typeof callback === 'function') callback();\n        }, animationTime);\n      }\n      animationStates = [];\n    },\n    animate: function animate(target, currentRect, toRect, duration) {\n      if (duration) {\n        css(target, 'transition', '');\n        css(target, 'transform', '');\n        var elMatrix = matrix(this.el),\n          scaleX = elMatrix && elMatrix.a,\n          scaleY = elMatrix && elMatrix.d,\n          translateX = (currentRect.left - toRect.left) / (scaleX || 1),\n          translateY = (currentRect.top - toRect.top) / (scaleY || 1);\n        target.animatingX = !!translateX;\n        target.animatingY = !!translateY;\n        css(target, 'transform', 'translate3d(' + translateX + 'px,' + translateY + 'px,0)');\n        this.forRepaintDummy = repaint(target); // repaint\n\n        css(target, 'transition', 'transform ' + duration + 'ms' + (this.options.easing ? ' ' + this.options.easing : ''));\n        css(target, 'transform', 'translate3d(0,0,0)');\n        typeof target.animated === 'number' && clearTimeout(target.animated);\n        target.animated = setTimeout(function () {\n          css(target, 'transition', '');\n          css(target, 'transform', '');\n          target.animated = false;\n          target.animatingX = false;\n          target.animatingY = false;\n        }, duration);\n      }\n    }\n  };\n}\nfunction repaint(target) {\n  return target.offsetWidth;\n}\nfunction calculateRealTime(animatingRect, fromRect, toRect, options) {\n  return Math.sqrt(Math.pow(fromRect.top - animatingRect.top, 2) + Math.pow(fromRect.left - animatingRect.left, 2)) / Math.sqrt(Math.pow(fromRect.top - toRect.top, 2) + Math.pow(fromRect.left - toRect.left, 2)) * options.animation;\n}\n\nvar plugins = [];\nvar defaults = {\n  initializeByDefault: true\n};\nvar PluginManager = {\n  mount: function mount(plugin) {\n    // Set default static properties\n    for (var option in defaults) {\n      if (defaults.hasOwnProperty(option) && !(option in plugin)) {\n        plugin[option] = defaults[option];\n      }\n    }\n    plugins.forEach(function (p) {\n      if (p.pluginName === plugin.pluginName) {\n        throw \"Sortable: Cannot mount plugin \".concat(plugin.pluginName, \" more than once\");\n      }\n    });\n    plugins.push(plugin);\n  },\n  pluginEvent: function pluginEvent(eventName, sortable, evt) {\n    var _this = this;\n    this.eventCanceled = false;\n    evt.cancel = function () {\n      _this.eventCanceled = true;\n    };\n    var eventNameGlobal = eventName + 'Global';\n    plugins.forEach(function (plugin) {\n      if (!sortable[plugin.pluginName]) return;\n      // Fire global events if it exists in this sortable\n      if (sortable[plugin.pluginName][eventNameGlobal]) {\n        sortable[plugin.pluginName][eventNameGlobal](_objectSpread2({\n          sortable: sortable\n        }, evt));\n      }\n\n      // Only fire plugin event if plugin is enabled in this sortable,\n      // and plugin has event defined\n      if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) {\n        sortable[plugin.pluginName][eventName](_objectSpread2({\n          sortable: sortable\n        }, evt));\n      }\n    });\n  },\n  initializePlugins: function initializePlugins(sortable, el, defaults, options) {\n    plugins.forEach(function (plugin) {\n      var pluginName = plugin.pluginName;\n      if (!sortable.options[pluginName] && !plugin.initializeByDefault) return;\n      var initialized = new plugin(sortable, el, sortable.options);\n      initialized.sortable = sortable;\n      initialized.options = sortable.options;\n      sortable[pluginName] = initialized;\n\n      // Add default options from plugin\n      _extends(defaults, initialized.defaults);\n    });\n    for (var option in sortable.options) {\n      if (!sortable.options.hasOwnProperty(option)) continue;\n      var modified = this.modifyOption(sortable, option, sortable.options[option]);\n      if (typeof modified !== 'undefined') {\n        sortable.options[option] = modified;\n      }\n    }\n  },\n  getEventProperties: function getEventProperties(name, sortable) {\n    var eventProperties = {};\n    plugins.forEach(function (plugin) {\n      if (typeof plugin.eventProperties !== 'function') return;\n      _extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name));\n    });\n    return eventProperties;\n  },\n  modifyOption: function modifyOption(sortable, name, value) {\n    var modifiedValue;\n    plugins.forEach(function (plugin) {\n      // Plugin must exist on the Sortable\n      if (!sortable[plugin.pluginName]) return;\n\n      // If static option listener exists for this option, call in the context of the Sortable's instance of this plugin\n      if (plugin.optionListeners && typeof plugin.optionListeners[name] === 'function') {\n        modifiedValue = plugin.optionListeners[name].call(sortable[plugin.pluginName], value);\n      }\n    });\n    return modifiedValue;\n  }\n};\n\nfunction dispatchEvent(_ref) {\n  var sortable = _ref.sortable,\n    rootEl = _ref.rootEl,\n    name = _ref.name,\n    targetEl = _ref.targetEl,\n    cloneEl = _ref.cloneEl,\n    toEl = _ref.toEl,\n    fromEl = _ref.fromEl,\n    oldIndex = _ref.oldIndex,\n    newIndex = _ref.newIndex,\n    oldDraggableIndex = _ref.oldDraggableIndex,\n    newDraggableIndex = _ref.newDraggableIndex,\n    originalEvent = _ref.originalEvent,\n    putSortable = _ref.putSortable,\n    extraEventProperties = _ref.extraEventProperties;\n  sortable = sortable || rootEl && rootEl[expando];\n  if (!sortable) return;\n  var evt,\n    options = sortable.options,\n    onName = 'on' + name.charAt(0).toUpperCase() + name.substr(1);\n  // Support for new CustomEvent feature\n  if (window.CustomEvent && !IE11OrLess && !Edge) {\n    evt = new CustomEvent(name, {\n      bubbles: true,\n      cancelable: true\n    });\n  } else {\n    evt = document.createEvent('Event');\n    evt.initEvent(name, true, true);\n  }\n  evt.to = toEl || rootEl;\n  evt.from = fromEl || rootEl;\n  evt.item = targetEl || rootEl;\n  evt.clone = cloneEl;\n  evt.oldIndex = oldIndex;\n  evt.newIndex = newIndex;\n  evt.oldDraggableIndex = oldDraggableIndex;\n  evt.newDraggableIndex = newDraggableIndex;\n  evt.originalEvent = originalEvent;\n  evt.pullMode = putSortable ? putSortable.lastPutMode : undefined;\n  var allEventProperties = _objectSpread2(_objectSpread2({}, extraEventProperties), PluginManager.getEventProperties(name, sortable));\n  for (var option in allEventProperties) {\n    evt[option] = allEventProperties[option];\n  }\n  if (rootEl) {\n    rootEl.dispatchEvent(evt);\n  }\n  if (options[onName]) {\n    options[onName].call(sortable, evt);\n  }\n}\n\nvar _excluded = [\"evt\"];\nvar pluginEvent = function pluginEvent(eventName, sortable) {\n  var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n    originalEvent = _ref.evt,\n    data = _objectWithoutProperties(_ref, _excluded);\n  PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread2({\n    dragEl: dragEl,\n    parentEl: parentEl,\n    ghostEl: ghostEl,\n    rootEl: rootEl,\n    nextEl: nextEl,\n    lastDownEl: lastDownEl,\n    cloneEl: cloneEl,\n    cloneHidden: cloneHidden,\n    dragStarted: moved,\n    putSortable: putSortable,\n    activeSortable: Sortable.active,\n    originalEvent: originalEvent,\n    oldIndex: oldIndex,\n    oldDraggableIndex: oldDraggableIndex,\n    newIndex: newIndex,\n    newDraggableIndex: newDraggableIndex,\n    hideGhostForTarget: _hideGhostForTarget,\n    unhideGhostForTarget: _unhideGhostForTarget,\n    cloneNowHidden: function cloneNowHidden() {\n      cloneHidden = true;\n    },\n    cloneNowShown: function cloneNowShown() {\n      cloneHidden = false;\n    },\n    dispatchSortableEvent: function dispatchSortableEvent(name) {\n      _dispatchEvent({\n        sortable: sortable,\n        name: name,\n        originalEvent: originalEvent\n      });\n    }\n  }, data));\n};\nfunction _dispatchEvent(info) {\n  dispatchEvent(_objectSpread2({\n    putSortable: putSortable,\n    cloneEl: cloneEl,\n    targetEl: dragEl,\n    rootEl: rootEl,\n    oldIndex: oldIndex,\n    oldDraggableIndex: oldDraggableIndex,\n    newIndex: newIndex,\n    newDraggableIndex: newDraggableIndex\n  }, info));\n}\nvar dragEl,\n  parentEl,\n  ghostEl,\n  rootEl,\n  nextEl,\n  lastDownEl,\n  cloneEl,\n  cloneHidden,\n  oldIndex,\n  newIndex,\n  oldDraggableIndex,\n  newDraggableIndex,\n  activeGroup,\n  putSortable,\n  awaitingDragStarted = false,\n  ignoreNextClick = false,\n  sortables = [],\n  tapEvt,\n  touchEvt,\n  lastDx,\n  lastDy,\n  tapDistanceLeft,\n  tapDistanceTop,\n  moved,\n  lastTarget,\n  lastDirection,\n  pastFirstInvertThresh = false,\n  isCircumstantialInvert = false,\n  targetMoveDistance,\n  // For positioning ghost absolutely\n  ghostRelativeParent,\n  ghostRelativeParentInitialScroll = [],\n  // (left, top)\n\n  _silent = false,\n  savedInputChecked = [];\n\n/** @const */\nvar documentExists = typeof document !== 'undefined',\n  PositionGhostAbsolutely = IOS,\n  CSSFloatProperty = Edge || IE11OrLess ? 'cssFloat' : 'float',\n  // This will not pass for IE9, because IE9 DnD only works on anchors\n  supportDraggable = documentExists && !ChromeForAndroid && !IOS && 'draggable' in document.createElement('div'),\n  supportCssPointerEvents = function () {\n    if (!documentExists) return;\n    // false when <= IE11\n    if (IE11OrLess) {\n      return false;\n    }\n    var el = document.createElement('x');\n    el.style.cssText = 'pointer-events:auto';\n    return el.style.pointerEvents === 'auto';\n  }(),\n  _detectDirection = function _detectDirection(el, options) {\n    var elCSS = css(el),\n      elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth),\n      child1 = getChild(el, 0, options),\n      child2 = getChild(el, 1, options),\n      firstChildCSS = child1 && css(child1),\n      secondChildCSS = child2 && css(child2),\n      firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width,\n      secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width;\n    if (elCSS.display === 'flex') {\n      return elCSS.flexDirection === 'column' || elCSS.flexDirection === 'column-reverse' ? 'vertical' : 'horizontal';\n    }\n    if (elCSS.display === 'grid') {\n      return elCSS.gridTemplateColumns.split(' ').length <= 1 ? 'vertical' : 'horizontal';\n    }\n    if (child1 && firstChildCSS[\"float\"] && firstChildCSS[\"float\"] !== 'none') {\n      var touchingSideChild2 = firstChildCSS[\"float\"] === 'left' ? 'left' : 'right';\n      return child2 && (secondChildCSS.clear === 'both' || secondChildCSS.clear === touchingSideChild2) ? 'vertical' : 'horizontal';\n    }\n    return child1 && (firstChildCSS.display === 'block' || firstChildCSS.display === 'flex' || firstChildCSS.display === 'table' || firstChildCSS.display === 'grid' || firstChildWidth >= elWidth && elCSS[CSSFloatProperty] === 'none' || child2 && elCSS[CSSFloatProperty] === 'none' && firstChildWidth + secondChildWidth > elWidth) ? 'vertical' : 'horizontal';\n  },\n  _dragElInRowColumn = function _dragElInRowColumn(dragRect, targetRect, vertical) {\n    var dragElS1Opp = vertical ? dragRect.left : dragRect.top,\n      dragElS2Opp = vertical ? dragRect.right : dragRect.bottom,\n      dragElOppLength = vertical ? dragRect.width : dragRect.height,\n      targetS1Opp = vertical ? targetRect.left : targetRect.top,\n      targetS2Opp = vertical ? targetRect.right : targetRect.bottom,\n      targetOppLength = vertical ? targetRect.width : targetRect.height;\n    return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2;\n  },\n  /**\r\n   * Detects first nearest empty sortable to X and Y position using emptyInsertThreshold.\r\n   * @param  {Number} x      X position\r\n   * @param  {Number} y      Y position\r\n   * @return {HTMLElement}   Element of the first found nearest Sortable\r\n   */\n  _detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) {\n    var ret;\n    sortables.some(function (sortable) {\n      var threshold = sortable[expando].options.emptyInsertThreshold;\n      if (!threshold || lastChild(sortable)) return;\n      var rect = getRect(sortable),\n        insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold,\n        insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold;\n      if (insideHorizontally && insideVertically) {\n        return ret = sortable;\n      }\n    });\n    return ret;\n  },\n  _prepareGroup = function _prepareGroup(options) {\n    function toFn(value, pull) {\n      return function (to, from, dragEl, evt) {\n        var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name;\n        if (value == null && (pull || sameGroup)) {\n          // Default pull value\n          // Default pull and put value if same group\n          return true;\n        } else if (value == null || value === false) {\n          return false;\n        } else if (pull && value === 'clone') {\n          return value;\n        } else if (typeof value === 'function') {\n          return toFn(value(to, from, dragEl, evt), pull)(to, from, dragEl, evt);\n        } else {\n          var otherGroup = (pull ? to : from).options.group.name;\n          return value === true || typeof value === 'string' && value === otherGroup || value.join && value.indexOf(otherGroup) > -1;\n        }\n      };\n    }\n    var group = {};\n    var originalGroup = options.group;\n    if (!originalGroup || _typeof(originalGroup) != 'object') {\n      originalGroup = {\n        name: originalGroup\n      };\n    }\n    group.name = originalGroup.name;\n    group.checkPull = toFn(originalGroup.pull, true);\n    group.checkPut = toFn(originalGroup.put);\n    group.revertClone = originalGroup.revertClone;\n    options.group = group;\n  },\n  _hideGhostForTarget = function _hideGhostForTarget() {\n    if (!supportCssPointerEvents && ghostEl) {\n      css(ghostEl, 'display', 'none');\n    }\n  },\n  _unhideGhostForTarget = function _unhideGhostForTarget() {\n    if (!supportCssPointerEvents && ghostEl) {\n      css(ghostEl, 'display', '');\n    }\n  };\n\n// #1184 fix - Prevent click event on fallback if dragged but item not changed position\nif (documentExists && !ChromeForAndroid) {\n  document.addEventListener('click', function (evt) {\n    if (ignoreNextClick) {\n      evt.preventDefault();\n      evt.stopPropagation && evt.stopPropagation();\n      evt.stopImmediatePropagation && evt.stopImmediatePropagation();\n      ignoreNextClick = false;\n      return false;\n    }\n  }, true);\n}\nvar nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent(evt) {\n  if (dragEl) {\n    evt = evt.touches ? evt.touches[0] : evt;\n    var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY);\n    if (nearest) {\n      // Create imitation event\n      var event = {};\n      for (var i in evt) {\n        if (evt.hasOwnProperty(i)) {\n          event[i] = evt[i];\n        }\n      }\n      event.target = event.rootEl = nearest;\n      event.preventDefault = void 0;\n      event.stopPropagation = void 0;\n      nearest[expando]._onDragOver(event);\n    }\n  }\n};\nvar _checkOutsideTargetEl = function _checkOutsideTargetEl(evt) {\n  if (dragEl) {\n    dragEl.parentNode[expando]._isOutsideThisEl(evt.target);\n  }\n};\n\n/**\r\n * @class  Sortable\r\n * @param  {HTMLElement}  el\r\n * @param  {Object}       [options]\r\n */\nfunction Sortable(el, options) {\n  if (!(el && el.nodeType && el.nodeType === 1)) {\n    throw \"Sortable: `el` must be an HTMLElement, not \".concat({}.toString.call(el));\n  }\n  this.el = el; // root element\n  this.options = options = _extends({}, options);\n\n  // Export instance\n  el[expando] = this;\n  var defaults = {\n    group: null,\n    sort: true,\n    disabled: false,\n    store: null,\n    handle: null,\n    draggable: /^[uo]l$/i.test(el.nodeName) ? '>li' : '>*',\n    swapThreshold: 1,\n    // percentage; 0 <= x <= 1\n    invertSwap: false,\n    // invert always\n    invertedSwapThreshold: null,\n    // will be set to same as swapThreshold if default\n    removeCloneOnHide: true,\n    direction: function direction() {\n      return _detectDirection(el, this.options);\n    },\n    ghostClass: 'sortable-ghost',\n    chosenClass: 'sortable-chosen',\n    dragClass: 'sortable-drag',\n    ignore: 'a, img',\n    filter: null,\n    preventOnFilter: true,\n    animation: 0,\n    easing: null,\n    setData: function setData(dataTransfer, dragEl) {\n      dataTransfer.setData('Text', dragEl.textContent);\n    },\n    dropBubble: false,\n    dragoverBubble: false,\n    dataIdAttr: 'data-id',\n    delay: 0,\n    delayOnTouchOnly: false,\n    touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,\n    forceFallback: false,\n    fallbackClass: 'sortable-fallback',\n    fallbackOnBody: false,\n    fallbackTolerance: 0,\n    fallbackOffset: {\n      x: 0,\n      y: 0\n    },\n    supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window && !Safari,\n    emptyInsertThreshold: 5\n  };\n  PluginManager.initializePlugins(this, el, defaults);\n\n  // Set default options\n  for (var name in defaults) {\n    !(name in options) && (options[name] = defaults[name]);\n  }\n  _prepareGroup(options);\n\n  // Bind all private methods\n  for (var fn in this) {\n    if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n      this[fn] = this[fn].bind(this);\n    }\n  }\n\n  // Setup drag mode\n  this.nativeDraggable = options.forceFallback ? false : supportDraggable;\n  if (this.nativeDraggable) {\n    // Touch start threshold cannot be greater than the native dragstart threshold\n    this.options.touchStartThreshold = 1;\n  }\n\n  // Bind events\n  if (options.supportPointer) {\n    on(el, 'pointerdown', this._onTapStart);\n  } else {\n    on(el, 'mousedown', this._onTapStart);\n    on(el, 'touchstart', this._onTapStart);\n  }\n  if (this.nativeDraggable) {\n    on(el, 'dragover', this);\n    on(el, 'dragenter', this);\n  }\n  sortables.push(this.el);\n\n  // Restore sorting\n  options.store && options.store.get && this.sort(options.store.get(this) || []);\n\n  // Add animation state manager\n  _extends(this, AnimationStateManager());\n}\nSortable.prototype = /** @lends Sortable.prototype */{\n  constructor: Sortable,\n  _isOutsideThisEl: function _isOutsideThisEl(target) {\n    if (!this.el.contains(target) && target !== this.el) {\n      lastTarget = null;\n    }\n  },\n  _getDirection: function _getDirection(evt, target) {\n    return typeof this.options.direction === 'function' ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction;\n  },\n  _onTapStart: function _onTapStart( /** Event|TouchEvent */evt) {\n    if (!evt.cancelable) return;\n    var _this = this,\n      el = this.el,\n      options = this.options,\n      preventOnFilter = options.preventOnFilter,\n      type = evt.type,\n      touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === 'touch' && evt,\n      target = (touch || evt).target,\n      originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target,\n      filter = options.filter;\n    _saveInputCheckedState(el);\n\n    // Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group.\n    if (dragEl) {\n      return;\n    }\n    if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) {\n      return; // only left button and enabled\n    }\n\n    // cancel dnd if original target is content editable\n    if (originalTarget.isContentEditable) {\n      return;\n    }\n\n    // Safari ignores further event handling after mousedown\n    if (!this.nativeDraggable && Safari && target && target.tagName.toUpperCase() === 'SELECT') {\n      return;\n    }\n    target = closest(target, options.draggable, el, false);\n    if (target && target.animated) {\n      return;\n    }\n    if (lastDownEl === target) {\n      // Ignoring duplicate `down`\n      return;\n    }\n\n    // Get the index of the dragged element within its parent\n    oldIndex = index(target);\n    oldDraggableIndex = index(target, options.draggable);\n\n    // Check filter\n    if (typeof filter === 'function') {\n      if (filter.call(this, evt, target, this)) {\n        _dispatchEvent({\n          sortable: _this,\n          rootEl: originalTarget,\n          name: 'filter',\n          targetEl: target,\n          toEl: el,\n          fromEl: el\n        });\n        pluginEvent('filter', _this, {\n          evt: evt\n        });\n        preventOnFilter && evt.cancelable && evt.preventDefault();\n        return; // cancel dnd\n      }\n    } else if (filter) {\n      filter = filter.split(',').some(function (criteria) {\n        criteria = closest(originalTarget, criteria.trim(), el, false);\n        if (criteria) {\n          _dispatchEvent({\n            sortable: _this,\n            rootEl: criteria,\n            name: 'filter',\n            targetEl: target,\n            fromEl: el,\n            toEl: el\n          });\n          pluginEvent('filter', _this, {\n            evt: evt\n          });\n          return true;\n        }\n      });\n      if (filter) {\n        preventOnFilter && evt.cancelable && evt.preventDefault();\n        return; // cancel dnd\n      }\n    }\n    if (options.handle && !closest(originalTarget, options.handle, el, false)) {\n      return;\n    }\n\n    // Prepare `dragstart`\n    this._prepareDragStart(evt, touch, target);\n  },\n  _prepareDragStart: function _prepareDragStart( /** Event */evt, /** Touch */touch, /** HTMLElement */target) {\n    var _this = this,\n      el = _this.el,\n      options = _this.options,\n      ownerDocument = el.ownerDocument,\n      dragStartFn;\n    if (target && !dragEl && target.parentNode === el) {\n      var dragRect = getRect(target);\n      rootEl = el;\n      dragEl = target;\n      parentEl = dragEl.parentNode;\n      nextEl = dragEl.nextSibling;\n      lastDownEl = target;\n      activeGroup = options.group;\n      Sortable.dragged = dragEl;\n      tapEvt = {\n        target: dragEl,\n        clientX: (touch || evt).clientX,\n        clientY: (touch || evt).clientY\n      };\n      tapDistanceLeft = tapEvt.clientX - dragRect.left;\n      tapDistanceTop = tapEvt.clientY - dragRect.top;\n      this._lastX = (touch || evt).clientX;\n      this._lastY = (touch || evt).clientY;\n      dragEl.style['will-change'] = 'all';\n      dragStartFn = function dragStartFn() {\n        pluginEvent('delayEnded', _this, {\n          evt: evt\n        });\n        if (Sortable.eventCanceled) {\n          _this._onDrop();\n          return;\n        }\n        // Delayed drag has been triggered\n        // we can re-enable the events: touchmove/mousemove\n        _this._disableDelayedDragEvents();\n        if (!FireFox && _this.nativeDraggable) {\n          dragEl.draggable = true;\n        }\n\n        // Bind the events: dragstart/dragend\n        _this._triggerDragStart(evt, touch);\n\n        // Drag start event\n        _dispatchEvent({\n          sortable: _this,\n          name: 'choose',\n          originalEvent: evt\n        });\n\n        // Chosen item\n        toggleClass(dragEl, options.chosenClass, true);\n      };\n\n      // Disable \"draggable\"\n      options.ignore.split(',').forEach(function (criteria) {\n        find(dragEl, criteria.trim(), _disableDraggable);\n      });\n      on(ownerDocument, 'dragover', nearestEmptyInsertDetectEvent);\n      on(ownerDocument, 'mousemove', nearestEmptyInsertDetectEvent);\n      on(ownerDocument, 'touchmove', nearestEmptyInsertDetectEvent);\n      on(ownerDocument, 'mouseup', _this._onDrop);\n      on(ownerDocument, 'touchend', _this._onDrop);\n      on(ownerDocument, 'touchcancel', _this._onDrop);\n\n      // Make dragEl draggable (must be before delay for FireFox)\n      if (FireFox && this.nativeDraggable) {\n        this.options.touchStartThreshold = 4;\n        dragEl.draggable = true;\n      }\n      pluginEvent('delayStart', this, {\n        evt: evt\n      });\n\n      // Delay is impossible for native DnD in Edge or IE\n      if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) {\n        if (Sortable.eventCanceled) {\n          this._onDrop();\n          return;\n        }\n        // If the user moves the pointer or let go the click or touch\n        // before the delay has been reached:\n        // disable the delayed drag\n        on(ownerDocument, 'mouseup', _this._disableDelayedDrag);\n        on(ownerDocument, 'touchend', _this._disableDelayedDrag);\n        on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);\n        on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler);\n        on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler);\n        options.supportPointer && on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler);\n        _this._dragStartTimer = setTimeout(dragStartFn, options.delay);\n      } else {\n        dragStartFn();\n      }\n    }\n  },\n  _delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler( /** TouchEvent|PointerEvent **/e) {\n    var touch = e.touches ? e.touches[0] : e;\n    if (Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1))) {\n      this._disableDelayedDrag();\n    }\n  },\n  _disableDelayedDrag: function _disableDelayedDrag() {\n    dragEl && _disableDraggable(dragEl);\n    clearTimeout(this._dragStartTimer);\n    this._disableDelayedDragEvents();\n  },\n  _disableDelayedDragEvents: function _disableDelayedDragEvents() {\n    var ownerDocument = this.el.ownerDocument;\n    off(ownerDocument, 'mouseup', this._disableDelayedDrag);\n    off(ownerDocument, 'touchend', this._disableDelayedDrag);\n    off(ownerDocument, 'touchcancel', this._disableDelayedDrag);\n    off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler);\n    off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler);\n    off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler);\n  },\n  _triggerDragStart: function _triggerDragStart( /** Event */evt, /** Touch */touch) {\n    touch = touch || evt.pointerType == 'touch' && evt;\n    if (!this.nativeDraggable || touch) {\n      if (this.options.supportPointer) {\n        on(document, 'pointermove', this._onTouchMove);\n      } else if (touch) {\n        on(document, 'touchmove', this._onTouchMove);\n      } else {\n        on(document, 'mousemove', this._onTouchMove);\n      }\n    } else {\n      on(dragEl, 'dragend', this);\n      on(rootEl, 'dragstart', this._onDragStart);\n    }\n    try {\n      if (document.selection) {\n        // Timeout neccessary for IE9\n        _nextTick(function () {\n          document.selection.empty();\n        });\n      } else {\n        window.getSelection().removeAllRanges();\n      }\n    } catch (err) {}\n  },\n  _dragStarted: function _dragStarted(fallback, evt) {\n    awaitingDragStarted = false;\n    if (rootEl && dragEl) {\n      pluginEvent('dragStarted', this, {\n        evt: evt\n      });\n      if (this.nativeDraggable) {\n        on(document, 'dragover', _checkOutsideTargetEl);\n      }\n      var options = this.options;\n\n      // Apply effect\n      !fallback && toggleClass(dragEl, options.dragClass, false);\n      toggleClass(dragEl, options.ghostClass, true);\n      Sortable.active = this;\n      fallback && this._appendGhost();\n\n      // Drag start event\n      _dispatchEvent({\n        sortable: this,\n        name: 'start',\n        originalEvent: evt\n      });\n    } else {\n      this._nulling();\n    }\n  },\n  _emulateDragOver: function _emulateDragOver() {\n    if (touchEvt) {\n      this._lastX = touchEvt.clientX;\n      this._lastY = touchEvt.clientY;\n      _hideGhostForTarget();\n      var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY);\n      var parent = target;\n      while (target && target.shadowRoot) {\n        target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);\n        if (target === parent) break;\n        parent = target;\n      }\n      dragEl.parentNode[expando]._isOutsideThisEl(target);\n      if (parent) {\n        do {\n          if (parent[expando]) {\n            var inserted = void 0;\n            inserted = parent[expando]._onDragOver({\n              clientX: touchEvt.clientX,\n              clientY: touchEvt.clientY,\n              target: target,\n              rootEl: parent\n            });\n            if (inserted && !this.options.dragoverBubble) {\n              break;\n            }\n          }\n          target = parent; // store last element\n        }\n        /* jshint boss:true */ while (parent = parent.parentNode);\n      }\n      _unhideGhostForTarget();\n    }\n  },\n  _onTouchMove: function _onTouchMove( /**TouchEvent*/evt) {\n    if (tapEvt) {\n      var options = this.options,\n        fallbackTolerance = options.fallbackTolerance,\n        fallbackOffset = options.fallbackOffset,\n        touch = evt.touches ? evt.touches[0] : evt,\n        ghostMatrix = ghostEl && matrix(ghostEl, true),\n        scaleX = ghostEl && ghostMatrix && ghostMatrix.a,\n        scaleY = ghostEl && ghostMatrix && ghostMatrix.d,\n        relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent),\n        dx = (touch.clientX - tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1),\n        dy = (touch.clientY - tapEvt.clientY + fallbackOffset.y) / (scaleY || 1) + (relativeScrollOffset ? relativeScrollOffset[1] - ghostRelativeParentInitialScroll[1] : 0) / (scaleY || 1);\n\n      // only set the status to dragging, when we are actually dragging\n      if (!Sortable.active && !awaitingDragStarted) {\n        if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) {\n          return;\n        }\n        this._onDragStart(evt, true);\n      }\n      if (ghostEl) {\n        if (ghostMatrix) {\n          ghostMatrix.e += dx - (lastDx || 0);\n          ghostMatrix.f += dy - (lastDy || 0);\n        } else {\n          ghostMatrix = {\n            a: 1,\n            b: 0,\n            c: 0,\n            d: 1,\n            e: dx,\n            f: dy\n          };\n        }\n        var cssMatrix = \"matrix(\".concat(ghostMatrix.a, \",\").concat(ghostMatrix.b, \",\").concat(ghostMatrix.c, \",\").concat(ghostMatrix.d, \",\").concat(ghostMatrix.e, \",\").concat(ghostMatrix.f, \")\");\n        css(ghostEl, 'webkitTransform', cssMatrix);\n        css(ghostEl, 'mozTransform', cssMatrix);\n        css(ghostEl, 'msTransform', cssMatrix);\n        css(ghostEl, 'transform', cssMatrix);\n        lastDx = dx;\n        lastDy = dy;\n        touchEvt = touch;\n      }\n      evt.cancelable && evt.preventDefault();\n    }\n  },\n  _appendGhost: function _appendGhost() {\n    // Bug if using scale(): https://stackoverflow.com/questions/2637058\n    // Not being adjusted for\n    if (!ghostEl) {\n      var container = this.options.fallbackOnBody ? document.body : rootEl,\n        rect = getRect(dragEl, true, PositionGhostAbsolutely, true, container),\n        options = this.options;\n\n      // Position absolutely\n      if (PositionGhostAbsolutely) {\n        // Get relatively positioned parent\n        ghostRelativeParent = container;\n        while (css(ghostRelativeParent, 'position') === 'static' && css(ghostRelativeParent, 'transform') === 'none' && ghostRelativeParent !== document) {\n          ghostRelativeParent = ghostRelativeParent.parentNode;\n        }\n        if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) {\n          if (ghostRelativeParent === document) ghostRelativeParent = getWindowScrollingElement();\n          rect.top += ghostRelativeParent.scrollTop;\n          rect.left += ghostRelativeParent.scrollLeft;\n        } else {\n          ghostRelativeParent = getWindowScrollingElement();\n        }\n        ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent);\n      }\n      ghostEl = dragEl.cloneNode(true);\n      toggleClass(ghostEl, options.ghostClass, false);\n      toggleClass(ghostEl, options.fallbackClass, true);\n      toggleClass(ghostEl, options.dragClass, true);\n      css(ghostEl, 'transition', '');\n      css(ghostEl, 'transform', '');\n      css(ghostEl, 'box-sizing', 'border-box');\n      css(ghostEl, 'margin', 0);\n      css(ghostEl, 'top', rect.top);\n      css(ghostEl, 'left', rect.left);\n      css(ghostEl, 'width', rect.width);\n      css(ghostEl, 'height', rect.height);\n      css(ghostEl, 'opacity', '0.8');\n      css(ghostEl, 'position', PositionGhostAbsolutely ? 'absolute' : 'fixed');\n      css(ghostEl, 'zIndex', '100000');\n      css(ghostEl, 'pointerEvents', 'none');\n      Sortable.ghost = ghostEl;\n      container.appendChild(ghostEl);\n\n      // Set transform-origin\n      css(ghostEl, 'transform-origin', tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + '% ' + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + '%');\n    }\n  },\n  _onDragStart: function _onDragStart( /**Event*/evt, /**boolean*/fallback) {\n    var _this = this;\n    var dataTransfer = evt.dataTransfer;\n    var options = _this.options;\n    pluginEvent('dragStart', this, {\n      evt: evt\n    });\n    if (Sortable.eventCanceled) {\n      this._onDrop();\n      return;\n    }\n    pluginEvent('setupClone', this);\n    if (!Sortable.eventCanceled) {\n      cloneEl = clone(dragEl);\n      cloneEl.removeAttribute(\"id\");\n      cloneEl.draggable = false;\n      cloneEl.style['will-change'] = '';\n      this._hideClone();\n      toggleClass(cloneEl, this.options.chosenClass, false);\n      Sortable.clone = cloneEl;\n    }\n\n    // #1143: IFrame support workaround\n    _this.cloneId = _nextTick(function () {\n      pluginEvent('clone', _this);\n      if (Sortable.eventCanceled) return;\n      if (!_this.options.removeCloneOnHide) {\n        rootEl.insertBefore(cloneEl, dragEl);\n      }\n      _this._hideClone();\n      _dispatchEvent({\n        sortable: _this,\n        name: 'clone'\n      });\n    });\n    !fallback && toggleClass(dragEl, options.dragClass, true);\n\n    // Set proper drop events\n    if (fallback) {\n      ignoreNextClick = true;\n      _this._loopId = setInterval(_this._emulateDragOver, 50);\n    } else {\n      // Undo what was set in _prepareDragStart before drag started\n      off(document, 'mouseup', _this._onDrop);\n      off(document, 'touchend', _this._onDrop);\n      off(document, 'touchcancel', _this._onDrop);\n      if (dataTransfer) {\n        dataTransfer.effectAllowed = 'move';\n        options.setData && options.setData.call(_this, dataTransfer, dragEl);\n      }\n      on(document, 'drop', _this);\n\n      // #1276 fix:\n      css(dragEl, 'transform', 'translateZ(0)');\n    }\n    awaitingDragStarted = true;\n    _this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));\n    on(document, 'selectstart', _this);\n    moved = true;\n    if (Safari) {\n      css(document.body, 'user-select', 'none');\n    }\n  },\n  // Returns true - if no further action is needed (either inserted or another condition)\n  _onDragOver: function _onDragOver( /**Event*/evt) {\n    var el = this.el,\n      target = evt.target,\n      dragRect,\n      targetRect,\n      revert,\n      options = this.options,\n      group = options.group,\n      activeSortable = Sortable.active,\n      isOwner = activeGroup === group,\n      canSort = options.sort,\n      fromSortable = putSortable || activeSortable,\n      vertical,\n      _this = this,\n      completedFired = false;\n    if (_silent) return;\n    function dragOverEvent(name, extra) {\n      pluginEvent(name, _this, _objectSpread2({\n        evt: evt,\n        isOwner: isOwner,\n        axis: vertical ? 'vertical' : 'horizontal',\n        revert: revert,\n        dragRect: dragRect,\n        targetRect: targetRect,\n        canSort: canSort,\n        fromSortable: fromSortable,\n        target: target,\n        completed: completed,\n        onMove: function onMove(target, after) {\n          return _onMove(rootEl, el, dragEl, dragRect, target, getRect(target), evt, after);\n        },\n        changed: changed\n      }, extra));\n    }\n\n    // Capture animation state\n    function capture() {\n      dragOverEvent('dragOverAnimationCapture');\n      _this.captureAnimationState();\n      if (_this !== fromSortable) {\n        fromSortable.captureAnimationState();\n      }\n    }\n\n    // Return invocation when dragEl is inserted (or completed)\n    function completed(insertion) {\n      dragOverEvent('dragOverCompleted', {\n        insertion: insertion\n      });\n      if (insertion) {\n        // Clones must be hidden before folding animation to capture dragRectAbsolute properly\n        if (isOwner) {\n          activeSortable._hideClone();\n        } else {\n          activeSortable._showClone(_this);\n        }\n        if (_this !== fromSortable) {\n          // Set ghost class to new sortable's ghost class\n          toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false);\n          toggleClass(dragEl, options.ghostClass, true);\n        }\n        if (putSortable !== _this && _this !== Sortable.active) {\n          putSortable = _this;\n        } else if (_this === Sortable.active && putSortable) {\n          putSortable = null;\n        }\n\n        // Animation\n        if (fromSortable === _this) {\n          _this._ignoreWhileAnimating = target;\n        }\n        _this.animateAll(function () {\n          dragOverEvent('dragOverAnimationComplete');\n          _this._ignoreWhileAnimating = null;\n        });\n        if (_this !== fromSortable) {\n          fromSortable.animateAll();\n          fromSortable._ignoreWhileAnimating = null;\n        }\n      }\n\n      // Null lastTarget if it is not inside a previously swapped element\n      if (target === dragEl && !dragEl.animated || target === el && !target.animated) {\n        lastTarget = null;\n      }\n\n      // no bubbling and not fallback\n      if (!options.dragoverBubble && !evt.rootEl && target !== document) {\n        dragEl.parentNode[expando]._isOutsideThisEl(evt.target);\n\n        // Do not detect for empty insert if already inserted\n        !insertion && nearestEmptyInsertDetectEvent(evt);\n      }\n      !options.dragoverBubble && evt.stopPropagation && evt.stopPropagation();\n      return completedFired = true;\n    }\n\n    // Call when dragEl has been inserted\n    function changed() {\n      newIndex = index(dragEl);\n      newDraggableIndex = index(dragEl, options.draggable);\n      _dispatchEvent({\n        sortable: _this,\n        name: 'change',\n        toEl: el,\n        newIndex: newIndex,\n        newDraggableIndex: newDraggableIndex,\n        originalEvent: evt\n      });\n    }\n    if (evt.preventDefault !== void 0) {\n      evt.cancelable && evt.preventDefault();\n    }\n    target = closest(target, options.draggable, el, true);\n    dragOverEvent('dragOver');\n    if (Sortable.eventCanceled) return completedFired;\n    if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) {\n      return completed(false);\n    }\n    ignoreNextClick = false;\n    if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = parentEl !== rootEl) // Reverting item into the original list\n    : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) {\n      vertical = this._getDirection(evt, target) === 'vertical';\n      dragRect = getRect(dragEl);\n      dragOverEvent('dragOverValid');\n      if (Sortable.eventCanceled) return completedFired;\n      if (revert) {\n        parentEl = rootEl; // actualization\n        capture();\n        this._hideClone();\n        dragOverEvent('revert');\n        if (!Sortable.eventCanceled) {\n          if (nextEl) {\n            rootEl.insertBefore(dragEl, nextEl);\n          } else {\n            rootEl.appendChild(dragEl);\n          }\n        }\n        return completed(true);\n      }\n      var elLastChild = lastChild(el, options.draggable);\n      if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) {\n        // Insert to end of list\n\n        // If already at end of list: Do not insert\n        if (elLastChild === dragEl) {\n          return completed(false);\n        }\n\n        // if there is a last element, it is the target\n        if (elLastChild && el === evt.target) {\n          target = elLastChild;\n        }\n        if (target) {\n          targetRect = getRect(target);\n        }\n        if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {\n          capture();\n          if (elLastChild && elLastChild.nextSibling) {\n            // the last draggable element is not the last node\n            el.insertBefore(dragEl, elLastChild.nextSibling);\n          } else {\n            el.appendChild(dragEl);\n          }\n          parentEl = el; // actualization\n\n          changed();\n          return completed(true);\n        }\n      } else if (elLastChild && _ghostIsFirst(evt, vertical, this)) {\n        // Insert to start of list\n        var firstChild = getChild(el, 0, options, true);\n        if (firstChild === dragEl) {\n          return completed(false);\n        }\n        target = firstChild;\n        targetRect = getRect(target);\n        if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, false) !== false) {\n          capture();\n          el.insertBefore(dragEl, firstChild);\n          parentEl = el; // actualization\n\n          changed();\n          return completed(true);\n        }\n      } else if (target.parentNode === el) {\n        targetRect = getRect(target);\n        var direction = 0,\n          targetBeforeFirstSwap,\n          differentLevel = dragEl.parentNode !== el,\n          differentRowCol = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || dragRect, target.animated && target.toRect || targetRect, vertical),\n          side1 = vertical ? 'top' : 'left',\n          scrolledPastTop = isScrolledPast(target, 'top', 'top') || isScrolledPast(dragEl, 'top', 'top'),\n          scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0;\n        if (lastTarget !== target) {\n          targetBeforeFirstSwap = targetRect[side1];\n          pastFirstInvertThresh = false;\n          isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel;\n        }\n        direction = _getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target);\n        var sibling;\n        if (direction !== 0) {\n          // Check if target is beside dragEl in respective direction (ignoring hidden elements)\n          var dragIndex = index(dragEl);\n          do {\n            dragIndex -= direction;\n            sibling = parentEl.children[dragIndex];\n          } while (sibling && (css(sibling, 'display') === 'none' || sibling === ghostEl));\n        }\n        // If dragEl is already beside target: Do not insert\n        if (direction === 0 || sibling === target) {\n          return completed(false);\n        }\n        lastTarget = target;\n        lastDirection = direction;\n        var nextSibling = target.nextElementSibling,\n          after = false;\n        after = direction === 1;\n        var moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after);\n        if (moveVector !== false) {\n          if (moveVector === 1 || moveVector === -1) {\n            after = moveVector === 1;\n          }\n          _silent = true;\n          setTimeout(_unsilent, 30);\n          capture();\n          if (after && !nextSibling) {\n            el.appendChild(dragEl);\n          } else {\n            target.parentNode.insertBefore(dragEl, after ? nextSibling : target);\n          }\n\n          // Undo chrome's scroll adjustment (has no effect on other browsers)\n          if (scrolledPastTop) {\n            scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop);\n          }\n          parentEl = dragEl.parentNode; // actualization\n\n          // must be done before animation\n          if (targetBeforeFirstSwap !== undefined && !isCircumstantialInvert) {\n            targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target)[side1]);\n          }\n          changed();\n          return completed(true);\n        }\n      }\n      if (el.contains(dragEl)) {\n        return completed(false);\n      }\n    }\n    return false;\n  },\n  _ignoreWhileAnimating: null,\n  _offMoveEvents: function _offMoveEvents() {\n    off(document, 'mousemove', this._onTouchMove);\n    off(document, 'touchmove', this._onTouchMove);\n    off(document, 'pointermove', this._onTouchMove);\n    off(document, 'dragover', nearestEmptyInsertDetectEvent);\n    off(document, 'mousemove', nearestEmptyInsertDetectEvent);\n    off(document, 'touchmove', nearestEmptyInsertDetectEvent);\n  },\n  _offUpEvents: function _offUpEvents() {\n    var ownerDocument = this.el.ownerDocument;\n    off(ownerDocument, 'mouseup', this._onDrop);\n    off(ownerDocument, 'touchend', this._onDrop);\n    off(ownerDocument, 'pointerup', this._onDrop);\n    off(ownerDocument, 'touchcancel', this._onDrop);\n    off(document, 'selectstart', this);\n  },\n  _onDrop: function _onDrop( /**Event*/evt) {\n    var el = this.el,\n      options = this.options;\n\n    // Get the index of the dragged element within its parent\n    newIndex = index(dragEl);\n    newDraggableIndex = index(dragEl, options.draggable);\n    pluginEvent('drop', this, {\n      evt: evt\n    });\n    parentEl = dragEl && dragEl.parentNode;\n\n    // Get again after plugin event\n    newIndex = index(dragEl);\n    newDraggableIndex = index(dragEl, options.draggable);\n    if (Sortable.eventCanceled) {\n      this._nulling();\n      return;\n    }\n    awaitingDragStarted = false;\n    isCircumstantialInvert = false;\n    pastFirstInvertThresh = false;\n    clearInterval(this._loopId);\n    clearTimeout(this._dragStartTimer);\n    _cancelNextTick(this.cloneId);\n    _cancelNextTick(this._dragStartId);\n\n    // Unbind events\n    if (this.nativeDraggable) {\n      off(document, 'drop', this);\n      off(el, 'dragstart', this._onDragStart);\n    }\n    this._offMoveEvents();\n    this._offUpEvents();\n    if (Safari) {\n      css(document.body, 'user-select', '');\n    }\n    css(dragEl, 'transform', '');\n    if (evt) {\n      if (moved) {\n        evt.cancelable && evt.preventDefault();\n        !options.dropBubble && evt.stopPropagation();\n      }\n      ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl);\n      if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {\n        // Remove clone(s)\n        cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl);\n      }\n      if (dragEl) {\n        if (this.nativeDraggable) {\n          off(dragEl, 'dragend', this);\n        }\n        _disableDraggable(dragEl);\n        dragEl.style['will-change'] = '';\n\n        // Remove classes\n        // ghostClass is added in dragStarted\n        if (moved && !awaitingDragStarted) {\n          toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false);\n        }\n        toggleClass(dragEl, this.options.chosenClass, false);\n\n        // Drag stop event\n        _dispatchEvent({\n          sortable: this,\n          name: 'unchoose',\n          toEl: parentEl,\n          newIndex: null,\n          newDraggableIndex: null,\n          originalEvent: evt\n        });\n        if (rootEl !== parentEl) {\n          if (newIndex >= 0) {\n            // Add event\n            _dispatchEvent({\n              rootEl: parentEl,\n              name: 'add',\n              toEl: parentEl,\n              fromEl: rootEl,\n              originalEvent: evt\n            });\n\n            // Remove event\n            _dispatchEvent({\n              sortable: this,\n              name: 'remove',\n              toEl: parentEl,\n              originalEvent: evt\n            });\n\n            // drag from one list and drop into another\n            _dispatchEvent({\n              rootEl: parentEl,\n              name: 'sort',\n              toEl: parentEl,\n              fromEl: rootEl,\n              originalEvent: evt\n            });\n            _dispatchEvent({\n              sortable: this,\n              name: 'sort',\n              toEl: parentEl,\n              originalEvent: evt\n            });\n          }\n          putSortable && putSortable.save();\n        } else {\n          if (newIndex !== oldIndex) {\n            if (newIndex >= 0) {\n              // drag & drop within the same list\n              _dispatchEvent({\n                sortable: this,\n                name: 'update',\n                toEl: parentEl,\n                originalEvent: evt\n              });\n              _dispatchEvent({\n                sortable: this,\n                name: 'sort',\n                toEl: parentEl,\n                originalEvent: evt\n              });\n            }\n          }\n        }\n        if (Sortable.active) {\n          /* jshint eqnull:true */\n          if (newIndex == null || newIndex === -1) {\n            newIndex = oldIndex;\n            newDraggableIndex = oldDraggableIndex;\n          }\n          _dispatchEvent({\n            sortable: this,\n            name: 'end',\n            toEl: parentEl,\n            originalEvent: evt\n          });\n\n          // Save sorting\n          this.save();\n        }\n      }\n    }\n    this._nulling();\n  },\n  _nulling: function _nulling() {\n    pluginEvent('nulling', this);\n    rootEl = dragEl = parentEl = ghostEl = nextEl = cloneEl = lastDownEl = cloneHidden = tapEvt = touchEvt = moved = newIndex = newDraggableIndex = oldIndex = oldDraggableIndex = lastTarget = lastDirection = putSortable = activeGroup = Sortable.dragged = Sortable.ghost = Sortable.clone = Sortable.active = null;\n    savedInputChecked.forEach(function (el) {\n      el.checked = true;\n    });\n    savedInputChecked.length = lastDx = lastDy = 0;\n  },\n  handleEvent: function handleEvent( /**Event*/evt) {\n    switch (evt.type) {\n      case 'drop':\n      case 'dragend':\n        this._onDrop(evt);\n        break;\n      case 'dragenter':\n      case 'dragover':\n        if (dragEl) {\n          this._onDragOver(evt);\n          _globalDragOver(evt);\n        }\n        break;\n      case 'selectstart':\n        evt.preventDefault();\n        break;\n    }\n  },\n  /**\r\n   * Serializes the item into an array of string.\r\n   * @returns {String[]}\r\n   */\n  toArray: function toArray() {\n    var order = [],\n      el,\n      children = this.el.children,\n      i = 0,\n      n = children.length,\n      options = this.options;\n    for (; i < n; i++) {\n      el = children[i];\n      if (closest(el, options.draggable, this.el, false)) {\n        order.push(el.getAttribute(options.dataIdAttr) || _generateId(el));\n      }\n    }\n    return order;\n  },\n  /**\r\n   * Sorts the elements according to the array.\r\n   * @param  {String[]}  order  order of the items\r\n   */\n  sort: function sort(order, useAnimation) {\n    var items = {},\n      rootEl = this.el;\n    this.toArray().forEach(function (id, i) {\n      var el = rootEl.children[i];\n      if (closest(el, this.options.draggable, rootEl, false)) {\n        items[id] = el;\n      }\n    }, this);\n    useAnimation && this.captureAnimationState();\n    order.forEach(function (id) {\n      if (items[id]) {\n        rootEl.removeChild(items[id]);\n        rootEl.appendChild(items[id]);\n      }\n    });\n    useAnimation && this.animateAll();\n  },\n  /**\r\n   * Save the current sorting\r\n   */\n  save: function save() {\n    var store = this.options.store;\n    store && store.set && store.set(this);\n  },\n  /**\r\n   * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.\r\n   * @param   {HTMLElement}  el\r\n   * @param   {String}       [selector]  default: `options.draggable`\r\n   * @returns {HTMLElement|null}\r\n   */\n  closest: function closest$1(el, selector) {\n    return closest(el, selector || this.options.draggable, this.el, false);\n  },\n  /**\r\n   * Set/get option\r\n   * @param   {string} name\r\n   * @param   {*}      [value]\r\n   * @returns {*}\r\n   */\n  option: function option(name, value) {\n    var options = this.options;\n    if (value === void 0) {\n      return options[name];\n    } else {\n      var modifiedValue = PluginManager.modifyOption(this, name, value);\n      if (typeof modifiedValue !== 'undefined') {\n        options[name] = modifiedValue;\n      } else {\n        options[name] = value;\n      }\n      if (name === 'group') {\n        _prepareGroup(options);\n      }\n    }\n  },\n  /**\r\n   * Destroy\r\n   */\n  destroy: function destroy() {\n    pluginEvent('destroy', this);\n    var el = this.el;\n    el[expando] = null;\n    off(el, 'mousedown', this._onTapStart);\n    off(el, 'touchstart', this._onTapStart);\n    off(el, 'pointerdown', this._onTapStart);\n    if (this.nativeDraggable) {\n      off(el, 'dragover', this);\n      off(el, 'dragenter', this);\n    }\n    // Remove draggable attributes\n    Array.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) {\n      el.removeAttribute('draggable');\n    });\n    this._onDrop();\n    this._disableDelayedDragEvents();\n    sortables.splice(sortables.indexOf(this.el), 1);\n    this.el = el = null;\n  },\n  _hideClone: function _hideClone() {\n    if (!cloneHidden) {\n      pluginEvent('hideClone', this);\n      if (Sortable.eventCanceled) return;\n      css(cloneEl, 'display', 'none');\n      if (this.options.removeCloneOnHide && cloneEl.parentNode) {\n        cloneEl.parentNode.removeChild(cloneEl);\n      }\n      cloneHidden = true;\n    }\n  },\n  _showClone: function _showClone(putSortable) {\n    if (putSortable.lastPutMode !== 'clone') {\n      this._hideClone();\n      return;\n    }\n    if (cloneHidden) {\n      pluginEvent('showClone', this);\n      if (Sortable.eventCanceled) return;\n\n      // show clone at dragEl or original position\n      if (dragEl.parentNode == rootEl && !this.options.group.revertClone) {\n        rootEl.insertBefore(cloneEl, dragEl);\n      } else if (nextEl) {\n        rootEl.insertBefore(cloneEl, nextEl);\n      } else {\n        rootEl.appendChild(cloneEl);\n      }\n      if (this.options.group.revertClone) {\n        this.animate(dragEl, cloneEl);\n      }\n      css(cloneEl, 'display', '');\n      cloneHidden = false;\n    }\n  }\n};\nfunction _globalDragOver( /**Event*/evt) {\n  if (evt.dataTransfer) {\n    evt.dataTransfer.dropEffect = 'move';\n  }\n  evt.cancelable && evt.preventDefault();\n}\nfunction _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) {\n  var evt,\n    sortable = fromEl[expando],\n    onMoveFn = sortable.options.onMove,\n    retVal;\n  // Support for new CustomEvent feature\n  if (window.CustomEvent && !IE11OrLess && !Edge) {\n    evt = new CustomEvent('move', {\n      bubbles: true,\n      cancelable: true\n    });\n  } else {\n    evt = document.createEvent('Event');\n    evt.initEvent('move', true, true);\n  }\n  evt.to = toEl;\n  evt.from = fromEl;\n  evt.dragged = dragEl;\n  evt.draggedRect = dragRect;\n  evt.related = targetEl || toEl;\n  evt.relatedRect = targetRect || getRect(toEl);\n  evt.willInsertAfter = willInsertAfter;\n  evt.originalEvent = originalEvent;\n  fromEl.dispatchEvent(evt);\n  if (onMoveFn) {\n    retVal = onMoveFn.call(sortable, evt, originalEvent);\n  }\n  return retVal;\n}\nfunction _disableDraggable(el) {\n  el.draggable = false;\n}\nfunction _unsilent() {\n  _silent = false;\n}\nfunction _ghostIsFirst(evt, vertical, sortable) {\n  var firstElRect = getRect(getChild(sortable.el, 0, sortable.options, true));\n  var childContainingRect = getChildContainingRectFromElement(sortable.el, sortable.options, ghostEl);\n  var spacer = 10;\n  return vertical ? evt.clientX < childContainingRect.left - spacer || evt.clientY < firstElRect.top && evt.clientX < firstElRect.right : evt.clientY < childContainingRect.top - spacer || evt.clientY < firstElRect.bottom && evt.clientX < firstElRect.left;\n}\nfunction _ghostIsLast(evt, vertical, sortable) {\n  var lastElRect = getRect(lastChild(sortable.el, sortable.options.draggable));\n  var childContainingRect = getChildContainingRectFromElement(sortable.el, sortable.options, ghostEl);\n  var spacer = 10;\n  return vertical ? evt.clientX > childContainingRect.right + spacer || evt.clientY > lastElRect.bottom && evt.clientX > lastElRect.left : evt.clientY > childContainingRect.bottom + spacer || evt.clientX > lastElRect.right && evt.clientY > lastElRect.top;\n}\nfunction _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) {\n  var mouseOnAxis = vertical ? evt.clientY : evt.clientX,\n    targetLength = vertical ? targetRect.height : targetRect.width,\n    targetS1 = vertical ? targetRect.top : targetRect.left,\n    targetS2 = vertical ? targetRect.bottom : targetRect.right,\n    invert = false;\n  if (!invertSwap) {\n    // Never invert or create dragEl shadow when target movemenet causes mouse to move past the end of regular swapThreshold\n    if (isLastTarget && targetMoveDistance < targetLength * swapThreshold) {\n      // multiplied only by swapThreshold because mouse will already be inside target by (1 - threshold) * targetLength / 2\n      // check if past first invert threshold on side opposite of lastDirection\n      if (!pastFirstInvertThresh && (lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) {\n        // past first invert threshold, do not restrict inverted threshold to dragEl shadow\n        pastFirstInvertThresh = true;\n      }\n      if (!pastFirstInvertThresh) {\n        // dragEl shadow (target move distance shadow)\n        if (lastDirection === 1 ? mouseOnAxis < targetS1 + targetMoveDistance // over dragEl shadow\n        : mouseOnAxis > targetS2 - targetMoveDistance) {\n          return -lastDirection;\n        }\n      } else {\n        invert = true;\n      }\n    } else {\n      // Regular\n      if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) {\n        return _getInsertDirection(target);\n      }\n    }\n  }\n  invert = invert || invertSwap;\n  if (invert) {\n    // Invert of regular\n    if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) {\n      return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1;\n    }\n  }\n  return 0;\n}\n\n/**\r\n * Gets the direction dragEl must be swapped relative to target in order to make it\r\n * seem that dragEl has been \"inserted\" into that element's position\r\n * @param  {HTMLElement} target       The target whose position dragEl is being inserted at\r\n * @return {Number}                   Direction dragEl must be swapped\r\n */\nfunction _getInsertDirection(target) {\n  if (index(dragEl) < index(target)) {\n    return 1;\n  } else {\n    return -1;\n  }\n}\n\n/**\r\n * Generate id\r\n * @param   {HTMLElement} el\r\n * @returns {String}\r\n * @private\r\n */\nfunction _generateId(el) {\n  var str = el.tagName + el.className + el.src + el.href + el.textContent,\n    i = str.length,\n    sum = 0;\n  while (i--) {\n    sum += str.charCodeAt(i);\n  }\n  return sum.toString(36);\n}\nfunction _saveInputCheckedState(root) {\n  savedInputChecked.length = 0;\n  var inputs = root.getElementsByTagName('input');\n  var idx = inputs.length;\n  while (idx--) {\n    var el = inputs[idx];\n    el.checked && savedInputChecked.push(el);\n  }\n}\nfunction _nextTick(fn) {\n  return setTimeout(fn, 0);\n}\nfunction _cancelNextTick(id) {\n  return clearTimeout(id);\n}\n\n// Fixed #973:\nif (documentExists) {\n  on(document, 'touchmove', function (evt) {\n    if ((Sortable.active || awaitingDragStarted) && evt.cancelable) {\n      evt.preventDefault();\n    }\n  });\n}\n\n// Export utils\nSortable.utils = {\n  on: on,\n  off: off,\n  css: css,\n  find: find,\n  is: function is(el, selector) {\n    return !!closest(el, selector, el, false);\n  },\n  extend: extend,\n  throttle: throttle,\n  closest: closest,\n  toggleClass: toggleClass,\n  clone: clone,\n  index: index,\n  nextTick: _nextTick,\n  cancelNextTick: _cancelNextTick,\n  detectDirection: _detectDirection,\n  getChild: getChild\n};\n\n/**\r\n * Get the Sortable instance of an element\r\n * @param  {HTMLElement} element The element\r\n * @return {Sortable|undefined}         The instance of Sortable\r\n */\nSortable.get = function (element) {\n  return element[expando];\n};\n\n/**\r\n * Mount a plugin to Sortable\r\n * @param  {...SortablePlugin|SortablePlugin[]} plugins       Plugins being mounted\r\n */\nSortable.mount = function () {\n  for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {\n    plugins[_key] = arguments[_key];\n  }\n  if (plugins[0].constructor === Array) plugins = plugins[0];\n  plugins.forEach(function (plugin) {\n    if (!plugin.prototype || !plugin.prototype.constructor) {\n      throw \"Sortable: Mounted plugin must be a constructor function, not \".concat({}.toString.call(plugin));\n    }\n    if (plugin.utils) Sortable.utils = _objectSpread2(_objectSpread2({}, Sortable.utils), plugin.utils);\n    PluginManager.mount(plugin);\n  });\n};\n\n/**\r\n * Create sortable instance\r\n * @param {HTMLElement}  el\r\n * @param {Object}      [options]\r\n */\nSortable.create = function (el, options) {\n  return new Sortable(el, options);\n};\n\n// Export\nSortable.version = version;\n\nvar autoScrolls = [],\n  scrollEl,\n  scrollRootEl,\n  scrolling = false,\n  lastAutoScrollX,\n  lastAutoScrollY,\n  touchEvt$1,\n  pointerElemChangedInterval;\nfunction AutoScrollPlugin() {\n  function AutoScroll() {\n    this.defaults = {\n      scroll: true,\n      forceAutoScrollFallback: false,\n      scrollSensitivity: 30,\n      scrollSpeed: 10,\n      bubbleScroll: true\n    };\n\n    // Bind all private methods\n    for (var fn in this) {\n      if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n        this[fn] = this[fn].bind(this);\n      }\n    }\n  }\n  AutoScroll.prototype = {\n    dragStarted: function dragStarted(_ref) {\n      var originalEvent = _ref.originalEvent;\n      if (this.sortable.nativeDraggable) {\n        on(document, 'dragover', this._handleAutoScroll);\n      } else {\n        if (this.options.supportPointer) {\n          on(document, 'pointermove', this._handleFallbackAutoScroll);\n        } else if (originalEvent.touches) {\n          on(document, 'touchmove', this._handleFallbackAutoScroll);\n        } else {\n          on(document, 'mousemove', this._handleFallbackAutoScroll);\n        }\n      }\n    },\n    dragOverCompleted: function dragOverCompleted(_ref2) {\n      var originalEvent = _ref2.originalEvent;\n      // For when bubbling is canceled and using fallback (fallback 'touchmove' always reached)\n      if (!this.options.dragOverBubble && !originalEvent.rootEl) {\n        this._handleAutoScroll(originalEvent);\n      }\n    },\n    drop: function drop() {\n      if (this.sortable.nativeDraggable) {\n        off(document, 'dragover', this._handleAutoScroll);\n      } else {\n        off(document, 'pointermove', this._handleFallbackAutoScroll);\n        off(document, 'touchmove', this._handleFallbackAutoScroll);\n        off(document, 'mousemove', this._handleFallbackAutoScroll);\n      }\n      clearPointerElemChangedInterval();\n      clearAutoScrolls();\n      cancelThrottle();\n    },\n    nulling: function nulling() {\n      touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null;\n      autoScrolls.length = 0;\n    },\n    _handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) {\n      this._handleAutoScroll(evt, true);\n    },\n    _handleAutoScroll: function _handleAutoScroll(evt, fallback) {\n      var _this = this;\n      var x = (evt.touches ? evt.touches[0] : evt).clientX,\n        y = (evt.touches ? evt.touches[0] : evt).clientY,\n        elem = document.elementFromPoint(x, y);\n      touchEvt$1 = evt;\n\n      // IE does not seem to have native autoscroll,\n      // Edge's autoscroll seems too conditional,\n      // MACOS Safari does not have autoscroll,\n      // Firefox and Chrome are good\n      if (fallback || this.options.forceAutoScrollFallback || Edge || IE11OrLess || Safari) {\n        autoScroll(evt, this.options, elem, fallback);\n\n        // Listener for pointer element change\n        var ogElemScroller = getParentAutoScrollElement(elem, true);\n        if (scrolling && (!pointerElemChangedInterval || x !== lastAutoScrollX || y !== lastAutoScrollY)) {\n          pointerElemChangedInterval && clearPointerElemChangedInterval();\n          // Detect for pointer elem change, emulating native DnD behaviour\n          pointerElemChangedInterval = setInterval(function () {\n            var newElem = getParentAutoScrollElement(document.elementFromPoint(x, y), true);\n            if (newElem !== ogElemScroller) {\n              ogElemScroller = newElem;\n              clearAutoScrolls();\n            }\n            autoScroll(evt, _this.options, newElem, fallback);\n          }, 10);\n          lastAutoScrollX = x;\n          lastAutoScrollY = y;\n        }\n      } else {\n        // if DnD is enabled (and browser has good autoscrolling), first autoscroll will already scroll, so get parent autoscroll of first autoscroll\n        if (!this.options.bubbleScroll || getParentAutoScrollElement(elem, true) === getWindowScrollingElement()) {\n          clearAutoScrolls();\n          return;\n        }\n        autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false);\n      }\n    }\n  };\n  return _extends(AutoScroll, {\n    pluginName: 'scroll',\n    initializeByDefault: true\n  });\n}\nfunction clearAutoScrolls() {\n  autoScrolls.forEach(function (autoScroll) {\n    clearInterval(autoScroll.pid);\n  });\n  autoScrolls = [];\n}\nfunction clearPointerElemChangedInterval() {\n  clearInterval(pointerElemChangedInterval);\n}\nvar autoScroll = throttle(function (evt, options, rootEl, isFallback) {\n  // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521\n  if (!options.scroll) return;\n  var x = (evt.touches ? evt.touches[0] : evt).clientX,\n    y = (evt.touches ? evt.touches[0] : evt).clientY,\n    sens = options.scrollSensitivity,\n    speed = options.scrollSpeed,\n    winScroller = getWindowScrollingElement();\n  var scrollThisInstance = false,\n    scrollCustomFn;\n\n  // New scroll root, set scrollEl\n  if (scrollRootEl !== rootEl) {\n    scrollRootEl = rootEl;\n    clearAutoScrolls();\n    scrollEl = options.scroll;\n    scrollCustomFn = options.scrollFn;\n    if (scrollEl === true) {\n      scrollEl = getParentAutoScrollElement(rootEl, true);\n    }\n  }\n  var layersOut = 0;\n  var currentParent = scrollEl;\n  do {\n    var el = currentParent,\n      rect = getRect(el),\n      top = rect.top,\n      bottom = rect.bottom,\n      left = rect.left,\n      right = rect.right,\n      width = rect.width,\n      height = rect.height,\n      canScrollX = void 0,\n      canScrollY = void 0,\n      scrollWidth = el.scrollWidth,\n      scrollHeight = el.scrollHeight,\n      elCSS = css(el),\n      scrollPosX = el.scrollLeft,\n      scrollPosY = el.scrollTop;\n    if (el === winScroller) {\n      canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll' || elCSS.overflowX === 'visible');\n      canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll' || elCSS.overflowY === 'visible');\n    } else {\n      canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll');\n      canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll');\n    }\n    var vx = canScrollX && (Math.abs(right - x) <= sens && scrollPosX + width < scrollWidth) - (Math.abs(left - x) <= sens && !!scrollPosX);\n    var vy = canScrollY && (Math.abs(bottom - y) <= sens && scrollPosY + height < scrollHeight) - (Math.abs(top - y) <= sens && !!scrollPosY);\n    if (!autoScrolls[layersOut]) {\n      for (var i = 0; i <= layersOut; i++) {\n        if (!autoScrolls[i]) {\n          autoScrolls[i] = {};\n        }\n      }\n    }\n    if (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) {\n      autoScrolls[layersOut].el = el;\n      autoScrolls[layersOut].vx = vx;\n      autoScrolls[layersOut].vy = vy;\n      clearInterval(autoScrolls[layersOut].pid);\n      if (vx != 0 || vy != 0) {\n        scrollThisInstance = true;\n        /* jshint loopfunc:true */\n        autoScrolls[layersOut].pid = setInterval(function () {\n          // emulate drag over during autoscroll (fallback), emulating native DnD behaviour\n          if (isFallback && this.layer === 0) {\n            Sortable.active._onTouchMove(touchEvt$1); // To move ghost if it is positioned absolutely\n          }\n          var scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0;\n          var scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0;\n          if (typeof scrollCustomFn === 'function') {\n            if (scrollCustomFn.call(Sortable.dragged.parentNode[expando], scrollOffsetX, scrollOffsetY, evt, touchEvt$1, autoScrolls[this.layer].el) !== 'continue') {\n              return;\n            }\n          }\n          scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY);\n        }.bind({\n          layer: layersOut\n        }), 24);\n      }\n    }\n    layersOut++;\n  } while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false)));\n  scrolling = scrollThisInstance; // in case another function catches scrolling as false in between when it is not\n}, 30);\n\nvar drop = function drop(_ref) {\n  var originalEvent = _ref.originalEvent,\n    putSortable = _ref.putSortable,\n    dragEl = _ref.dragEl,\n    activeSortable = _ref.activeSortable,\n    dispatchSortableEvent = _ref.dispatchSortableEvent,\n    hideGhostForTarget = _ref.hideGhostForTarget,\n    unhideGhostForTarget = _ref.unhideGhostForTarget;\n  if (!originalEvent) return;\n  var toSortable = putSortable || activeSortable;\n  hideGhostForTarget();\n  var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent;\n  var target = document.elementFromPoint(touch.clientX, touch.clientY);\n  unhideGhostForTarget();\n  if (toSortable && !toSortable.el.contains(target)) {\n    dispatchSortableEvent('spill');\n    this.onSpill({\n      dragEl: dragEl,\n      putSortable: putSortable\n    });\n  }\n};\nfunction Revert() {}\nRevert.prototype = {\n  startIndex: null,\n  dragStart: function dragStart(_ref2) {\n    var oldDraggableIndex = _ref2.oldDraggableIndex;\n    this.startIndex = oldDraggableIndex;\n  },\n  onSpill: function onSpill(_ref3) {\n    var dragEl = _ref3.dragEl,\n      putSortable = _ref3.putSortable;\n    this.sortable.captureAnimationState();\n    if (putSortable) {\n      putSortable.captureAnimationState();\n    }\n    var nextSibling = getChild(this.sortable.el, this.startIndex, this.options);\n    if (nextSibling) {\n      this.sortable.el.insertBefore(dragEl, nextSibling);\n    } else {\n      this.sortable.el.appendChild(dragEl);\n    }\n    this.sortable.animateAll();\n    if (putSortable) {\n      putSortable.animateAll();\n    }\n  },\n  drop: drop\n};\n_extends(Revert, {\n  pluginName: 'revertOnSpill'\n});\nfunction Remove() {}\nRemove.prototype = {\n  onSpill: function onSpill(_ref4) {\n    var dragEl = _ref4.dragEl,\n      putSortable = _ref4.putSortable;\n    var parentSortable = putSortable || this.sortable;\n    parentSortable.captureAnimationState();\n    dragEl.parentNode && dragEl.parentNode.removeChild(dragEl);\n    parentSortable.animateAll();\n  },\n  drop: drop\n};\n_extends(Remove, {\n  pluginName: 'removeOnSpill'\n});\n\nvar lastSwapEl;\nfunction SwapPlugin() {\n  function Swap() {\n    this.defaults = {\n      swapClass: 'sortable-swap-highlight'\n    };\n  }\n  Swap.prototype = {\n    dragStart: function dragStart(_ref) {\n      var dragEl = _ref.dragEl;\n      lastSwapEl = dragEl;\n    },\n    dragOverValid: function dragOverValid(_ref2) {\n      var completed = _ref2.completed,\n        target = _ref2.target,\n        onMove = _ref2.onMove,\n        activeSortable = _ref2.activeSortable,\n        changed = _ref2.changed,\n        cancel = _ref2.cancel;\n      if (!activeSortable.options.swap) return;\n      var el = this.sortable.el,\n        options = this.options;\n      if (target && target !== el) {\n        var prevSwapEl = lastSwapEl;\n        if (onMove(target) !== false) {\n          toggleClass(target, options.swapClass, true);\n          lastSwapEl = target;\n        } else {\n          lastSwapEl = null;\n        }\n        if (prevSwapEl && prevSwapEl !== lastSwapEl) {\n          toggleClass(prevSwapEl, options.swapClass, false);\n        }\n      }\n      changed();\n      completed(true);\n      cancel();\n    },\n    drop: function drop(_ref3) {\n      var activeSortable = _ref3.activeSortable,\n        putSortable = _ref3.putSortable,\n        dragEl = _ref3.dragEl;\n      var toSortable = putSortable || this.sortable;\n      var options = this.options;\n      lastSwapEl && toggleClass(lastSwapEl, options.swapClass, false);\n      if (lastSwapEl && (options.swap || putSortable && putSortable.options.swap)) {\n        if (dragEl !== lastSwapEl) {\n          toSortable.captureAnimationState();\n          if (toSortable !== activeSortable) activeSortable.captureAnimationState();\n          swapNodes(dragEl, lastSwapEl);\n          toSortable.animateAll();\n          if (toSortable !== activeSortable) activeSortable.animateAll();\n        }\n      }\n    },\n    nulling: function nulling() {\n      lastSwapEl = null;\n    }\n  };\n  return _extends(Swap, {\n    pluginName: 'swap',\n    eventProperties: function eventProperties() {\n      return {\n        swapItem: lastSwapEl\n      };\n    }\n  });\n}\nfunction swapNodes(n1, n2) {\n  var p1 = n1.parentNode,\n    p2 = n2.parentNode,\n    i1,\n    i2;\n  if (!p1 || !p2 || p1.isEqualNode(n2) || p2.isEqualNode(n1)) return;\n  i1 = index(n1);\n  i2 = index(n2);\n  if (p1.isEqualNode(p2) && i1 < i2) {\n    i2++;\n  }\n  p1.insertBefore(n2, p1.children[i1]);\n  p2.insertBefore(n1, p2.children[i2]);\n}\n\nvar multiDragElements = [],\n  multiDragClones = [],\n  lastMultiDragSelect,\n  // for selection with modifier key down (SHIFT)\n  multiDragSortable,\n  initialFolding = false,\n  // Initial multi-drag fold when drag started\n  folding = false,\n  // Folding any other time\n  dragStarted = false,\n  dragEl$1,\n  clonesFromRect,\n  clonesHidden;\nfunction MultiDragPlugin() {\n  function MultiDrag(sortable) {\n    // Bind all private methods\n    for (var fn in this) {\n      if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n        this[fn] = this[fn].bind(this);\n      }\n    }\n    if (!sortable.options.avoidImplicitDeselect) {\n      if (sortable.options.supportPointer) {\n        on(document, 'pointerup', this._deselectMultiDrag);\n      } else {\n        on(document, 'mouseup', this._deselectMultiDrag);\n        on(document, 'touchend', this._deselectMultiDrag);\n      }\n    }\n    on(document, 'keydown', this._checkKeyDown);\n    on(document, 'keyup', this._checkKeyUp);\n    this.defaults = {\n      selectedClass: 'sortable-selected',\n      multiDragKey: null,\n      avoidImplicitDeselect: false,\n      setData: function setData(dataTransfer, dragEl) {\n        var data = '';\n        if (multiDragElements.length && multiDragSortable === sortable) {\n          multiDragElements.forEach(function (multiDragElement, i) {\n            data += (!i ? '' : ', ') + multiDragElement.textContent;\n          });\n        } else {\n          data = dragEl.textContent;\n        }\n        dataTransfer.setData('Text', data);\n      }\n    };\n  }\n  MultiDrag.prototype = {\n    multiDragKeyDown: false,\n    isMultiDrag: false,\n    delayStartGlobal: function delayStartGlobal(_ref) {\n      var dragged = _ref.dragEl;\n      dragEl$1 = dragged;\n    },\n    delayEnded: function delayEnded() {\n      this.isMultiDrag = ~multiDragElements.indexOf(dragEl$1);\n    },\n    setupClone: function setupClone(_ref2) {\n      var sortable = _ref2.sortable,\n        cancel = _ref2.cancel;\n      if (!this.isMultiDrag) return;\n      for (var i = 0; i < multiDragElements.length; i++) {\n        multiDragClones.push(clone(multiDragElements[i]));\n        multiDragClones[i].sortableIndex = multiDragElements[i].sortableIndex;\n        multiDragClones[i].draggable = false;\n        multiDragClones[i].style['will-change'] = '';\n        toggleClass(multiDragClones[i], this.options.selectedClass, false);\n        multiDragElements[i] === dragEl$1 && toggleClass(multiDragClones[i], this.options.chosenClass, false);\n      }\n      sortable._hideClone();\n      cancel();\n    },\n    clone: function clone(_ref3) {\n      var sortable = _ref3.sortable,\n        rootEl = _ref3.rootEl,\n        dispatchSortableEvent = _ref3.dispatchSortableEvent,\n        cancel = _ref3.cancel;\n      if (!this.isMultiDrag) return;\n      if (!this.options.removeCloneOnHide) {\n        if (multiDragElements.length && multiDragSortable === sortable) {\n          insertMultiDragClones(true, rootEl);\n          dispatchSortableEvent('clone');\n          cancel();\n        }\n      }\n    },\n    showClone: function showClone(_ref4) {\n      var cloneNowShown = _ref4.cloneNowShown,\n        rootEl = _ref4.rootEl,\n        cancel = _ref4.cancel;\n      if (!this.isMultiDrag) return;\n      insertMultiDragClones(false, rootEl);\n      multiDragClones.forEach(function (clone) {\n        css(clone, 'display', '');\n      });\n      cloneNowShown();\n      clonesHidden = false;\n      cancel();\n    },\n    hideClone: function hideClone(_ref5) {\n      var _this = this;\n      var sortable = _ref5.sortable,\n        cloneNowHidden = _ref5.cloneNowHidden,\n        cancel = _ref5.cancel;\n      if (!this.isMultiDrag) return;\n      multiDragClones.forEach(function (clone) {\n        css(clone, 'display', 'none');\n        if (_this.options.removeCloneOnHide && clone.parentNode) {\n          clone.parentNode.removeChild(clone);\n        }\n      });\n      cloneNowHidden();\n      clonesHidden = true;\n      cancel();\n    },\n    dragStartGlobal: function dragStartGlobal(_ref6) {\n      var sortable = _ref6.sortable;\n      if (!this.isMultiDrag && multiDragSortable) {\n        multiDragSortable.multiDrag._deselectMultiDrag();\n      }\n      multiDragElements.forEach(function (multiDragElement) {\n        multiDragElement.sortableIndex = index(multiDragElement);\n      });\n\n      // Sort multi-drag elements\n      multiDragElements = multiDragElements.sort(function (a, b) {\n        return a.sortableIndex - b.sortableIndex;\n      });\n      dragStarted = true;\n    },\n    dragStarted: function dragStarted(_ref7) {\n      var _this2 = this;\n      var sortable = _ref7.sortable;\n      if (!this.isMultiDrag) return;\n      if (this.options.sort) {\n        // Capture rects,\n        // hide multi drag elements (by positioning them absolute),\n        // set multi drag elements rects to dragRect,\n        // show multi drag elements,\n        // animate to rects,\n        // unset rects & remove from DOM\n\n        sortable.captureAnimationState();\n        if (this.options.animation) {\n          multiDragElements.forEach(function (multiDragElement) {\n            if (multiDragElement === dragEl$1) return;\n            css(multiDragElement, 'position', 'absolute');\n          });\n          var dragRect = getRect(dragEl$1, false, true, true);\n          multiDragElements.forEach(function (multiDragElement) {\n            if (multiDragElement === dragEl$1) return;\n            setRect(multiDragElement, dragRect);\n          });\n          folding = true;\n          initialFolding = true;\n        }\n      }\n      sortable.animateAll(function () {\n        folding = false;\n        initialFolding = false;\n        if (_this2.options.animation) {\n          multiDragElements.forEach(function (multiDragElement) {\n            unsetRect(multiDragElement);\n          });\n        }\n\n        // Remove all auxiliary multidrag items from el, if sorting enabled\n        if (_this2.options.sort) {\n          removeMultiDragElements();\n        }\n      });\n    },\n    dragOver: function dragOver(_ref8) {\n      var target = _ref8.target,\n        completed = _ref8.completed,\n        cancel = _ref8.cancel;\n      if (folding && ~multiDragElements.indexOf(target)) {\n        completed(false);\n        cancel();\n      }\n    },\n    revert: function revert(_ref9) {\n      var fromSortable = _ref9.fromSortable,\n        rootEl = _ref9.rootEl,\n        sortable = _ref9.sortable,\n        dragRect = _ref9.dragRect;\n      if (multiDragElements.length > 1) {\n        // Setup unfold animation\n        multiDragElements.forEach(function (multiDragElement) {\n          sortable.addAnimationState({\n            target: multiDragElement,\n            rect: folding ? getRect(multiDragElement) : dragRect\n          });\n          unsetRect(multiDragElement);\n          multiDragElement.fromRect = dragRect;\n          fromSortable.removeAnimationState(multiDragElement);\n        });\n        folding = false;\n        insertMultiDragElements(!this.options.removeCloneOnHide, rootEl);\n      }\n    },\n    dragOverCompleted: function dragOverCompleted(_ref10) {\n      var sortable = _ref10.sortable,\n        isOwner = _ref10.isOwner,\n        insertion = _ref10.insertion,\n        activeSortable = _ref10.activeSortable,\n        parentEl = _ref10.parentEl,\n        putSortable = _ref10.putSortable;\n      var options = this.options;\n      if (insertion) {\n        // Clones must be hidden before folding animation to capture dragRectAbsolute properly\n        if (isOwner) {\n          activeSortable._hideClone();\n        }\n        initialFolding = false;\n        // If leaving sort:false root, or already folding - Fold to new location\n        if (options.animation && multiDragElements.length > 1 && (folding || !isOwner && !activeSortable.options.sort && !putSortable)) {\n          // Fold: Set all multi drag elements's rects to dragEl's rect when multi-drag elements are invisible\n          var dragRectAbsolute = getRect(dragEl$1, false, true, true);\n          multiDragElements.forEach(function (multiDragElement) {\n            if (multiDragElement === dragEl$1) return;\n            setRect(multiDragElement, dragRectAbsolute);\n\n            // Move element(s) to end of parentEl so that it does not interfere with multi-drag clones insertion if they are inserted\n            // while folding, and so that we can capture them again because old sortable will no longer be fromSortable\n            parentEl.appendChild(multiDragElement);\n          });\n          folding = true;\n        }\n\n        // Clones must be shown (and check to remove multi drags) after folding when interfering multiDragElements are moved out\n        if (!isOwner) {\n          // Only remove if not folding (folding will remove them anyways)\n          if (!folding) {\n            removeMultiDragElements();\n          }\n          if (multiDragElements.length > 1) {\n            var clonesHiddenBefore = clonesHidden;\n            activeSortable._showClone(sortable);\n\n            // Unfold animation for clones if showing from hidden\n            if (activeSortable.options.animation && !clonesHidden && clonesHiddenBefore) {\n              multiDragClones.forEach(function (clone) {\n                activeSortable.addAnimationState({\n                  target: clone,\n                  rect: clonesFromRect\n                });\n                clone.fromRect = clonesFromRect;\n                clone.thisAnimationDuration = null;\n              });\n            }\n          } else {\n            activeSortable._showClone(sortable);\n          }\n        }\n      }\n    },\n    dragOverAnimationCapture: function dragOverAnimationCapture(_ref11) {\n      var dragRect = _ref11.dragRect,\n        isOwner = _ref11.isOwner,\n        activeSortable = _ref11.activeSortable;\n      multiDragElements.forEach(function (multiDragElement) {\n        multiDragElement.thisAnimationDuration = null;\n      });\n      if (activeSortable.options.animation && !isOwner && activeSortable.multiDrag.isMultiDrag) {\n        clonesFromRect = _extends({}, dragRect);\n        var dragMatrix = matrix(dragEl$1, true);\n        clonesFromRect.top -= dragMatrix.f;\n        clonesFromRect.left -= dragMatrix.e;\n      }\n    },\n    dragOverAnimationComplete: function dragOverAnimationComplete() {\n      if (folding) {\n        folding = false;\n        removeMultiDragElements();\n      }\n    },\n    drop: function drop(_ref12) {\n      var evt = _ref12.originalEvent,\n        rootEl = _ref12.rootEl,\n        parentEl = _ref12.parentEl,\n        sortable = _ref12.sortable,\n        dispatchSortableEvent = _ref12.dispatchSortableEvent,\n        oldIndex = _ref12.oldIndex,\n        putSortable = _ref12.putSortable;\n      var toSortable = putSortable || this.sortable;\n      if (!evt) return;\n      var options = this.options,\n        children = parentEl.children;\n\n      // Multi-drag selection\n      if (!dragStarted) {\n        if (options.multiDragKey && !this.multiDragKeyDown) {\n          this._deselectMultiDrag();\n        }\n        toggleClass(dragEl$1, options.selectedClass, !~multiDragElements.indexOf(dragEl$1));\n        if (!~multiDragElements.indexOf(dragEl$1)) {\n          multiDragElements.push(dragEl$1);\n          dispatchEvent({\n            sortable: sortable,\n            rootEl: rootEl,\n            name: 'select',\n            targetEl: dragEl$1,\n            originalEvent: evt\n          });\n\n          // Modifier activated, select from last to dragEl\n          if (evt.shiftKey && lastMultiDragSelect && sortable.el.contains(lastMultiDragSelect)) {\n            var lastIndex = index(lastMultiDragSelect),\n              currentIndex = index(dragEl$1);\n            if (~lastIndex && ~currentIndex && lastIndex !== currentIndex) {\n              // Must include lastMultiDragSelect (select it), in case modified selection from no selection\n              // (but previous selection existed)\n              var n, i;\n              if (currentIndex > lastIndex) {\n                i = lastIndex;\n                n = currentIndex;\n              } else {\n                i = currentIndex;\n                n = lastIndex + 1;\n              }\n              for (; i < n; i++) {\n                if (~multiDragElements.indexOf(children[i])) continue;\n                toggleClass(children[i], options.selectedClass, true);\n                multiDragElements.push(children[i]);\n                dispatchEvent({\n                  sortable: sortable,\n                  rootEl: rootEl,\n                  name: 'select',\n                  targetEl: children[i],\n                  originalEvent: evt\n                });\n              }\n            }\n          } else {\n            lastMultiDragSelect = dragEl$1;\n          }\n          multiDragSortable = toSortable;\n        } else {\n          multiDragElements.splice(multiDragElements.indexOf(dragEl$1), 1);\n          lastMultiDragSelect = null;\n          dispatchEvent({\n            sortable: sortable,\n            rootEl: rootEl,\n            name: 'deselect',\n            targetEl: dragEl$1,\n            originalEvent: evt\n          });\n        }\n      }\n\n      // Multi-drag drop\n      if (dragStarted && this.isMultiDrag) {\n        folding = false;\n        // Do not \"unfold\" after around dragEl if reverted\n        if ((parentEl[expando].options.sort || parentEl !== rootEl) && multiDragElements.length > 1) {\n          var dragRect = getRect(dragEl$1),\n            multiDragIndex = index(dragEl$1, ':not(.' + this.options.selectedClass + ')');\n          if (!initialFolding && options.animation) dragEl$1.thisAnimationDuration = null;\n          toSortable.captureAnimationState();\n          if (!initialFolding) {\n            if (options.animation) {\n              dragEl$1.fromRect = dragRect;\n              multiDragElements.forEach(function (multiDragElement) {\n                multiDragElement.thisAnimationDuration = null;\n                if (multiDragElement !== dragEl$1) {\n                  var rect = folding ? getRect(multiDragElement) : dragRect;\n                  multiDragElement.fromRect = rect;\n\n                  // Prepare unfold animation\n                  toSortable.addAnimationState({\n                    target: multiDragElement,\n                    rect: rect\n                  });\n                }\n              });\n            }\n\n            // Multi drag elements are not necessarily removed from the DOM on drop, so to reinsert\n            // properly they must all be removed\n            removeMultiDragElements();\n            multiDragElements.forEach(function (multiDragElement) {\n              if (children[multiDragIndex]) {\n                parentEl.insertBefore(multiDragElement, children[multiDragIndex]);\n              } else {\n                parentEl.appendChild(multiDragElement);\n              }\n              multiDragIndex++;\n            });\n\n            // If initial folding is done, the elements may have changed position because they are now\n            // unfolding around dragEl, even though dragEl may not have his index changed, so update event\n            // must be fired here as Sortable will not.\n            if (oldIndex === index(dragEl$1)) {\n              var update = false;\n              multiDragElements.forEach(function (multiDragElement) {\n                if (multiDragElement.sortableIndex !== index(multiDragElement)) {\n                  update = true;\n                  return;\n                }\n              });\n              if (update) {\n                dispatchSortableEvent('update');\n                dispatchSortableEvent('sort');\n              }\n            }\n          }\n\n          // Must be done after capturing individual rects (scroll bar)\n          multiDragElements.forEach(function (multiDragElement) {\n            unsetRect(multiDragElement);\n          });\n          toSortable.animateAll();\n        }\n        multiDragSortable = toSortable;\n      }\n\n      // Remove clones if necessary\n      if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {\n        multiDragClones.forEach(function (clone) {\n          clone.parentNode && clone.parentNode.removeChild(clone);\n        });\n      }\n    },\n    nullingGlobal: function nullingGlobal() {\n      this.isMultiDrag = dragStarted = false;\n      multiDragClones.length = 0;\n    },\n    destroyGlobal: function destroyGlobal() {\n      this._deselectMultiDrag();\n      off(document, 'pointerup', this._deselectMultiDrag);\n      off(document, 'mouseup', this._deselectMultiDrag);\n      off(document, 'touchend', this._deselectMultiDrag);\n      off(document, 'keydown', this._checkKeyDown);\n      off(document, 'keyup', this._checkKeyUp);\n    },\n    _deselectMultiDrag: function _deselectMultiDrag(evt) {\n      if (typeof dragStarted !== \"undefined\" && dragStarted) return;\n\n      // Only deselect if selection is in this sortable\n      if (multiDragSortable !== this.sortable) return;\n\n      // Only deselect if target is not item in this sortable\n      if (evt && closest(evt.target, this.options.draggable, this.sortable.el, false)) return;\n\n      // Only deselect if left click\n      if (evt && evt.button !== 0) return;\n      while (multiDragElements.length) {\n        var el = multiDragElements[0];\n        toggleClass(el, this.options.selectedClass, false);\n        multiDragElements.shift();\n        dispatchEvent({\n          sortable: this.sortable,\n          rootEl: this.sortable.el,\n          name: 'deselect',\n          targetEl: el,\n          originalEvent: evt\n        });\n      }\n    },\n    _checkKeyDown: function _checkKeyDown(evt) {\n      if (evt.key === this.options.multiDragKey) {\n        this.multiDragKeyDown = true;\n      }\n    },\n    _checkKeyUp: function _checkKeyUp(evt) {\n      if (evt.key === this.options.multiDragKey) {\n        this.multiDragKeyDown = false;\n      }\n    }\n  };\n  return _extends(MultiDrag, {\n    // Static methods & properties\n    pluginName: 'multiDrag',\n    utils: {\n      /**\r\n       * Selects the provided multi-drag item\r\n       * @param  {HTMLElement} el    The element to be selected\r\n       */\n      select: function select(el) {\n        var sortable = el.parentNode[expando];\n        if (!sortable || !sortable.options.multiDrag || ~multiDragElements.indexOf(el)) return;\n        if (multiDragSortable && multiDragSortable !== sortable) {\n          multiDragSortable.multiDrag._deselectMultiDrag();\n          multiDragSortable = sortable;\n        }\n        toggleClass(el, sortable.options.selectedClass, true);\n        multiDragElements.push(el);\n      },\n      /**\r\n       * Deselects the provided multi-drag item\r\n       * @param  {HTMLElement} el    The element to be deselected\r\n       */\n      deselect: function deselect(el) {\n        var sortable = el.parentNode[expando],\n          index = multiDragElements.indexOf(el);\n        if (!sortable || !sortable.options.multiDrag || !~index) return;\n        toggleClass(el, sortable.options.selectedClass, false);\n        multiDragElements.splice(index, 1);\n      }\n    },\n    eventProperties: function eventProperties() {\n      var _this3 = this;\n      var oldIndicies = [],\n        newIndicies = [];\n      multiDragElements.forEach(function (multiDragElement) {\n        oldIndicies.push({\n          multiDragElement: multiDragElement,\n          index: multiDragElement.sortableIndex\n        });\n\n        // multiDragElements will already be sorted if folding\n        var newIndex;\n        if (folding && multiDragElement !== dragEl$1) {\n          newIndex = -1;\n        } else if (folding) {\n          newIndex = index(multiDragElement, ':not(.' + _this3.options.selectedClass + ')');\n        } else {\n          newIndex = index(multiDragElement);\n        }\n        newIndicies.push({\n          multiDragElement: multiDragElement,\n          index: newIndex\n        });\n      });\n      return {\n        items: _toConsumableArray(multiDragElements),\n        clones: [].concat(multiDragClones),\n        oldIndicies: oldIndicies,\n        newIndicies: newIndicies\n      };\n    },\n    optionListeners: {\n      multiDragKey: function multiDragKey(key) {\n        key = key.toLowerCase();\n        if (key === 'ctrl') {\n          key = 'Control';\n        } else if (key.length > 1) {\n          key = key.charAt(0).toUpperCase() + key.substr(1);\n        }\n        return key;\n      }\n    }\n  });\n}\nfunction insertMultiDragElements(clonesInserted, rootEl) {\n  multiDragElements.forEach(function (multiDragElement, i) {\n    var target = rootEl.children[multiDragElement.sortableIndex + (clonesInserted ? Number(i) : 0)];\n    if (target) {\n      rootEl.insertBefore(multiDragElement, target);\n    } else {\n      rootEl.appendChild(multiDragElement);\n    }\n  });\n}\n\n/**\r\n * Insert multi-drag clones\r\n * @param  {[Boolean]} elementsInserted  Whether the multi-drag elements are inserted\r\n * @param  {HTMLElement} rootEl\r\n */\nfunction insertMultiDragClones(elementsInserted, rootEl) {\n  multiDragClones.forEach(function (clone, i) {\n    var target = rootEl.children[clone.sortableIndex + (elementsInserted ? Number(i) : 0)];\n    if (target) {\n      rootEl.insertBefore(clone, target);\n    } else {\n      rootEl.appendChild(clone);\n    }\n  });\n}\nfunction removeMultiDragElements() {\n  multiDragElements.forEach(function (multiDragElement) {\n    if (multiDragElement === dragEl$1) return;\n    multiDragElement.parentNode && multiDragElement.parentNode.removeChild(multiDragElement);\n  });\n}\n\nSortable.mount(new AutoScrollPlugin());\nSortable.mount(Remove, Revert);\n\nexport default Sortable;\nexport { MultiDragPlugin as MultiDrag, Sortable, SwapPlugin as Swap };\n", "import { Controller } from \"@hotwired/stimulus\"\nimport { patch } from \"@rails/request.js\"\nimport Sortable from \"sortablejs\"\n\nexport default class extends Controller {\n  static values = {\n    group: String,\n  }\n\n  connect() {\n    Sortable.create(this.element, {\n      group: this.groupValue,\n      handle: \".sortable-handle\",\n      onEnd: async function (event) {\n        let requestBody\n\n        const position = event.newIndex\n        const path = event.item.dataset.resourceUpdatePath\n        const resourceType = event.item.dataset.resourceType\n        const resourceId = event.to.dataset.resourceId\n\n        if (resourceType === \"section\") {\n          requestBody = {\n            section: {\n              row_order_position: position,\n            },\n          }\n        } else if (resourceType === \"chapter\") {\n          requestBody = {\n            chapter: {\n              row_order_position: position - 1,\n              section_id: resourceId,\n            },\n          }\n        } else if (resourceType === \"course_recommendation\") {\n          requestBody = {\n            course_recommendation: {\n              row_order_position: position,\n            },\n          }\n        } else if (resourceType === \"featured_course\") {\n          requestBody = {\n            featured_course: {\n              row_order_position: position,\n            },\n          }\n        } else if (resourceType === \"category\") {\n          requestBody = {\n            category: {\n              row_order_position: position,\n            },\n          }\n        } else if (resourceType === \"subcategory\") {\n          requestBody = {\n            category: {\n              subcategory_order_position: position,\n            },\n          }\n        } else if (resourceType === \"study_path_course\") {\n          requestBody = {\n            study_path_course: {\n              row_order_position: position,\n              study_path_id: resourceId,\n            },\n          }\n        } else if (resourceType === \"question\") {\n          requestBody = {\n            question: {\n              row_order_position: position,\n              quiz_id: resourceId,\n            },\n          }\n        }\n\n        await patch(path, {\n          body: JSON.stringify(requestBody),\n          contentType: \"application/json; charset=UTF-8\",\n          responseKind: \"turbo-stream\",\n        })\n      },\n    })\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n  connect() {\n    this.element.addEventListener('keydown', (event) => {\n      if (event.key === 'Enter') {\n        event.preventDefault();\n        return false;\n      }\n    });\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\n\n// Connects to data-controller=\"student--chapter-navigation\"\nexport default class extends Controller {\n  static targets = [\"tabNavLink\"]\n\n  handleClick(e) {\n    this.tabNavLinkTargets.forEach((linkEl) => {\n      linkEl.classList.remove(\"active\")\n    })\n\n    e.currentTarget.classList.add(\"active\")\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\nimport debounce from \"lodash/debounce\"\n\nexport default class extends Controller {\n  static targets = [\"form\", \"query\", \"searchResults\", \"sections\"]\n\n  initialize() {\n    this.filter = debounce(this.filterChapters, 200).bind(this)\n  }\n\n  filterChapters() {\n    if (this.queryTarget.value) {\n      this.formTarget.requestSubmit()\n      this.showFilter()\n    } else {\n      this.hideFilter()\n    }\n  }\n\n  showFilter() {\n    this.searchResultsTarget.hidden = false\n    this.sectionsTarget.hidden = true\n  }\n\n  hideFilter() {\n    this.searchResultsTarget.hidden = true\n    this.sectionsTarget.hidden = false\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\n\n// Connects to data-controller=\"tab-section\"\nexport default class extends Controller {\n  // Array of available tab ids - used in numbered navigation\n  tabIds = [];\n\n  static values = {\n    activeTab: { type: Number, default: 0 },\n  }\n\n  static targets = [\n    \"navigationDesktop\",\n    \"navigationMobile\",\n    \"tab\"\n  ]\n\n  initialize() {\n    // Get list of all tabs IDs\n    this.tabTargets.forEach(el => {\n      this.tabIds.push(el.dataset.tab)\n    })\n\n    // If provided active tab # (activeTabValue) is higher than number of tabs, set active tab to max value\n    if(this.activeTabValue > this.tabIds.length-1){\n      this.activeTabValue = this.tabIds.length-1\n    }\n\n    // Add Event Listeners - desktop switch\n    this.navigationDesktopTargets.forEach( el => {\n      el.addEventListener(\"change\", (evt) => {\n        // Set active tab to chosen navigation\n        this.activeTabValue = this.tabIds.indexOf(evt.target.dataset.tab)\n      })\n    })\n\n    // Add Event Listener - mobile switch\n    this.navigationMobileTarget.addEventListener(\"change\", (evt) => {\n      // Set active tab to chosen navigation\n      this.activeTabValue = this.tabIds.indexOf(evt.target.value)\n    })\n  }\n\n  activeTabValueChanged(){\n    // Change active tab content\n    this.tabTargets.forEach( el => {\n      // Hide all tabs that don't match the selected tab\n      el.classList.toggle('hidden', el.dataset.tab != this.tabIds[this.activeTabValue])\n    })\n\n    // Change active navigation - desktop\n    this.navigationDesktopTargets.forEach( el => {\n      el.checked = el.dataset.tab == this.tabIds[this.activeTabValue]\n    })\n\n    // Change active navigation - mobile\n    this.navigationMobileTarget.value = this.tabIds[this.activeTabValue]\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\nimport fx from \"money\"\n\nexport default class extends Controller {\n  static values = {\n    baseCurrency: String,\n  }\n\n  static targets = [\n    \"price\",\n    \"priceEur\",\n    \"priceEurInt\",\n    \"priceCzk\",\n    \"priceCzkInt\",\n  ]\n\n  initialize() {\n    this.setupPriceFields(this.baseCurrencyValue)\n    this.setupConversion(this.baseCurrencyValue)\n    this.setupPrices()\n  }\n\n  updatePrices(event) {\n    this.priceTargets.forEach((target) => {\n      // Strip invalid characters, commas and whitespaces out\n      this.ensureValidNumberValue(target)\n\n      // We want to update only the readonly field, since read/write field takes value from user\n      if (!target.readOnly) return\n\n      target.value = Math.round(fx.convert(event.target.value))\n    })\n\n    this.priceEurIntTarget.value = this.priceEurTarget.value * 100\n    this.priceCzkIntTarget.value = this.priceCzkTarget.value * 100\n  }\n\n  setupPriceFields(baseCurrency) {\n    if (baseCurrency == \"EUR\") {\n      this.priceCzkTarget.setAttribute(\"readonly\", true)\n    } else {\n      this.priceEurTarget.setAttribute(\"readonly\", true)\n    }\n  }\n\n  setupPrices() {\n    this.priceEurTarget.value = this.priceEurIntTarget.value / 100.0\n    this.priceCzkTarget.value = this.priceCzkIntTarget.value / 100.0\n  }\n\n  setupConversion(baseCurrency) {\n    fx.base = baseCurrency\n\n    if (baseCurrency == \"EUR\") {\n      fx.settings = {\n        from: \"EUR\",\n        to: \"CZK\",\n      }\n\n      fx.rates = {\n        EUR: 1,\n        CZK: 25.4,\n      }\n    } else {\n      fx.settings = {\n        from: \"CZK\",\n        to: \"EUR\",\n      }\n\n      fx.rates = {\n        CZK: 1,\n        EUR: 0.039,\n      }\n    }\n  }\n\n  ensureIntegerValues() {\n    this.priceTargets.forEach((target) => {\n      if (target.value.indexOf(\".\")) {\n        target.value = Math.round(target.value * 100)\n      }\n    })\n  }\n\n  ensureValidNumberValue(target) {\n    target.value = target.value.replace(\n      /[`~!@#$%^&*()_|+\\-=?;:'\",<>\\{\\}\\[\\]\\\\\\/a-z\\s]/gi,\n      \"\"\n    )\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n  static targets = [\"logoPreview\"]\n\n  updateLogoPreview(evt) {\n    if (this.hasLogoPreviewTarget) {\n      const reader = new FileReader()\n\n      reader.onload = (e) => {\n        this.logoPreviewTarget.setAttribute(\"src\", e.target.result)\n      }\n\n      reader.readAsDataURL(evt.target.files[0])\n    } else {\n      throw new Error(\"Element logoPreview could not be found in the DOM.\")\n    }\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\nimport { get } from \"@rails/request.js\"\n\n// Connects to data-controller=\"teacher-channel--course-attachment\"\nexport default class extends Controller {\n  static values = {\n    previewUrl: String,\n  }\n\n  connect() {}\n\n  updatePreview(e) {\n    const id = e.target.value\n\n    get(`${this.previewUrlValue}?course_id=${id}`, {\n      responseKind: \"turbo-stream\",\n    })\n  }\n\n  findSelectedCourse(id) {\n    return this.availableCoursesValue.find((course) => course.id === id)\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\nimport { Turbo } from \"@hotwired/turbo-rails\"\n\nexport default class extends Controller {\n  static values = {\n    url: String,\n    duration: Number,\n  }\n\n  connect() {\n    setTimeout(() => {\n      Turbo.visit(this.urlValue)\n    }, this.durationValue || 7000)\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\nimport tippy from \"tippy.js\"\n\nexport default class extends Controller {\n  static values = {\n    text: String,\n    placement: String,\n  }\n\n  connect() {\n    tippy(this.element, {\n      content: this.textValue,\n      placement: this.placementValue,\n      animation: \"fade\",\n      allowHTML: true,\n    })\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n  static targets = [\"modal\"]\n\n  // hide modal\n  // action: \"turbo-modal#hideModal\"\n  hideModal(e) {\n    this.element.parentElement.removeAttribute(\"src\")\n    // Remove src reference from parent frame element\n    // Without this, turbo won't re-open the modal on subsequent click\n    this.modalTarget.remove()\n  }\n\n  // hide modal on successful form submission\n  // action: \"turbo:submit-end->turbo-modal#submitEnd\"\n  submitEnd(e) {\n    if (e.detail.success) {\n      this.hideModal()\n    }\n  }\n\n  // hide modal when clicking ESC\n  // action: \"keyup@window->turbo-modal#closeWithKeyboard\"\n  closeWithKeyboard(e) {\n    if (e.code == \"Escape\") {\n      this.hideModal()\n    }\n  }\n\n  // hide modal when clicking outside of modal\n  // action: \"click@window->turbo-modal#closeBackground\"\n  closeBackground(e) {\n    if (e && this.modalTarget.contains(e.target)) {\n      return\n    }\n    this.hideModal()\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\nimport { Turbo } from \"@hotwired/turbo-rails\"\n\nexport default class extends Controller {\n  static values = {\n    updateBrowserHistory: Boolean,\n    href: String,\n  }\n\n  forceTurboStream(e) {\n    e.preventDefault()\n\n    const href = this.hrefValue\n\n    fetch(href, {\n      headers: {\n        Accept: \"text/vnd.turbo-stream.html\",\n      },\n    })\n      .then((r) => r.text())\n      .then((html) => Turbo.renderStreamMessage(html))\n      .then(() => {\n        if (this.updateBrowserHistoryValue) {\n          history.replaceState(history.state, \"\", href)\n        }\n      })\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\nimport Uppy from \"@uppy/core\"\nimport Dashboard from \"@uppy/dashboard\"\nimport Tus from \"@uppy/tus\"\nimport GoldenRetriever from \"@uppy/golden-retriever\"\nimport Czech from \"@uppy/locales/lib/cs_CZ\"\nimport Slovak from \"@uppy/locales/lib/sk_SK\"\n\nimport Vimeo from \"../plugins/uppy-vimeo-plugin\"\n\nexport default class extends Controller {\n  static values = {\n    debug: Boolean,\n    prepareVideoUrl: String,\n    processVideoUrl: String,\n    maxNumberOfFiles: Number,\n    singleFileMode: Boolean,\n    courseId: String,\n    locale: String,\n  }\n\n  static targets = [\"dashboard\", \"vimeoId\", \"vimeoStatus\", \"button\", \"trigger\"]\n\n  connect() {\n    this.uppy = new Uppy({\n      debug: this.debugValue,\n      autoProceed: true,\n      locale: this.localeValue == \"sk\" ? Slovak : Czech,\n      restrictions: {\n        minNumberOfFiles: 1,\n        maxNumberOfFiles: this.singleFileModeValue ? 1 : undefined,\n        allowedFileTypes: [\"video/*\"],\n      },\n    })\n      .use(Tus, {})\n      .use(GoldenRetriever, { serviceWorker: true })\n      .use(Vimeo, {\n        prepareVideoUrl: this.prepareVideoUrlValue,\n        processVideoUrl: this.processVideoUrlValue,\n        courseId: this.courseIdValue,\n      })\n\n    // Used with chapter update, where we are replacing old vimeo_id with newly uploaded one\n    if (this.hasVimeoIdTarget) {\n      this.uppy.on(\"complete\", (result) => {\n        // Extract vimeoId from vimeo.uri\n        const vimeoId = result.successful[0].vimeo.uri.split(\"/\").pop()\n\n        // Set vimeo_id hidden field value\n        this.vimeoIdTarget.value = vimeoId\n        this.vimeoStatusTarget.value = \"uploaded\"\n      })\n    }\n\n    if (this.hasDashboardTarget) {\n      this.uppy.use(Dashboard, {\n        target: this.dashboardTarget,\n        disableThumbnailGenerator: true,\n        proudlyDisplayPoweredByUppy: false,\n        showLinkToFileUploadResult: false,\n        trigger: this.triggerTarget,\n      })\n\n      this.uppy.on(\"dashboard:modal-closed\", () => {\n        if (this.element.tagName === \"FORM\") {\n          this.element.requestSubmit()\n        } else {\n          location.reload()\n        }\n      })\n    }\n  }\n}\n", "\"use strict\"\n\nimport BasePlugin from \"@uppy/core/lib/BasePlugin\"\n\nexport default class Vimeo extends BasePlugin {\n  constructor(uppy, opts) {\n    super(uppy, opts)\n\n    this.id = \"Vimeo\"\n    this.type = \"uploader\"\n\n    this.preUpload = this.preUpload.bind(this)\n    this.postUpload = this.postUpload.bind(this)\n\n    this.csrfToken = document\n      .querySelector('meta[name=\"csrf-token\"]')\n      .getAttribute(\"content\")\n\n    uppy.on(\"upload-success\", async (file) => {\n      const fileVimeoId = file.vimeo.uri.split(\"/\").pop()\n\n      const response = await fetch(opts.processVideoUrl, {\n        method: \"post\",\n        headers: {\n          \"X-CSRF-TOKEN\": this.csrfToken,\n          \"Content-Type\": \"application/json\",\n          \"Accept\": \"application/json\",\n        },\n        body: JSON.stringify({\n          video: {\n            title: file.name,\n            vimeo_id: fileVimeoId,\n          },\n        }),\n      })\n\n      const result = await response.json()\n\n      if (result && result.message === \"Success\") {\n        console.info(\"File processed successfully.\")\n      } else {\n        console.error(\"File was not processed.\")\n      }\n    })\n  }\n\n  preUpload(fileIds) {\n    const promises = fileIds.map(async (fileId) => {\n      const file = this.uppy.getFile(fileId)\n\n      this.uppy.emit(\"preprocess-progress\", file, {\n        mode: \"indeterminate\",\n        message: \"Moment..\",\n      })\n\n      const response = await fetch(this.opts.prepareVideoUrl, {\n        method: \"post\",\n        headers: {\n          \"X-CSRF-TOKEN\": this.csrfToken,\n          \"Content-Type\": \"application/json\",\n          \"Accept\": \"application/json\",\n        },\n        body: JSON.stringify({\n          file_name: file.name,\n          file_size: file.size,\n        }),\n      })\n\n      const { upload, uri } = await response.json()\n\n      this.uppy.setFileState(fileId, {\n        tus: Object.assign({}, file.tus, {\n          uploadUrl: upload.upload_link,\n          chunkSize: 5 * 1024 * 1024,\n        }),\n        vimeo: {\n          uri: uri,\n        },\n        remote: Object.assign({}, file.remote, {\n          body: Object.assign({}, file.remote.body, {\n            uploadUrl: upload.upload_link,\n          }),\n        }),\n      })\n    })\n\n    const emitPreprocessCompleteForAllFiles = () => {\n      fileIds.forEach((fileId) => {\n        const file = this.uppy.getFile(fileId)\n\n        this.uppy.emit(\"preprocess-complete\", file)\n      })\n    }\n\n    return Promise.all(promises).then(emitPreprocessCompleteForAllFiles)\n  }\n\n  postUpload() {\n    console.info(\"Post upload complete!\")\n  }\n\n  install() {\n    this.uppy.addPreProcessor(this.preUpload)\n    this.uppy.addPostProcessor(this.postUpload)\n  }\n\n  uninstall() {\n    this.uppy.removePreProcessor(this.preUpload)\n    this.uppy.removePostProcessor(this.postUpload)\n  }\n}\n", "/**\n * @license\n * Video.js 8.19.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$1 from 'global/document';\nimport XHR from '@videojs/xhr';\nimport vtt from 'videojs-vtt.js';\nimport _extends from '@babel/runtime/helpers/extends';\nimport _resolveUrl from '@videojs/vhs-utils/es/resolve-url.js';\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';\n\nvar version$6 = \"8.19.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 */\nconst 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 */\nconst hooks = function (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 */\nconst hook = function (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 */\nconst removeHook = function (type, fn) {\n  const 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 */\nconst hookOnce = function (type, fn) {\n  hooks(type, [].concat(fn).map(original => {\n    const wrapper = (...args) => {\n      removeHook(type, wrapper);\n      return original(...args);\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 */\nconst FullscreenApi = {\n  prefixed: true\n};\n\n// browser API methods\nconst apiMap = [['requestFullscreen', 'exitFullscreen', 'fullscreenElement', 'fullscreenEnabled', 'fullscreenchange', 'fullscreenerror', 'fullscreen'],\n// WebKit\n['webkitRequestFullscreen', 'webkitExitFullscreen', 'webkitFullscreenElement', 'webkitFullscreenEnabled', 'webkitfullscreenchange', 'webkitfullscreenerror', '-webkit-full-screen']];\nconst specApi = apiMap[0];\nlet browserApi;\n\n// determine the supported set of functions\nfor (let i = 0; i < apiMap.length; i++) {\n  // check for exitFullscreen function\n  if (apiMap[i][1] in document$1) {\n    browserApi = apiMap[i];\n    break;\n  }\n}\n\n// map the browser API names to the spec API names\nif (browserApi) {\n  for (let i = 0; i < browserApi.length; i++) {\n    FullscreenApi[specApi[i]] = browserApi[i];\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.\nlet 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 */\nconst LogByTypeFactory = (name, log, styles) => (type, level, args) => {\n  const lvl = log.levels[level];\n  const lvlRegExp = new RegExp(`^(${lvl})$`);\n  let 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${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    const 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  let 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};\nfunction createLogger$1(name, delimiter = ':', styles = '') {\n  // This is the private tracking variable for logging level.\n  let level = 'info';\n\n  // the curried logByType bound to the specific log and history\n  let 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  function log(...args) {\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 `mylogger = 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 = (subName, subDelimiter, subStyles) => {\n    const resultDelimiter = subDelimiter !== undefined ? subDelimiter : delimiter;\n    const resultStyles = subStyles !== undefined ? subStyles : styles;\n    const resultName = `${name} ${resultDelimiter} ${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 = (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 = lvl => {\n    if (typeof lvl === 'string') {\n      if (!log.levels.hasOwnProperty(lvl)) {\n        throw new Error(`\"${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 = () => history ? [].concat(history) : [];\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 = fname => {\n    return (history || []).filter(historyItem => {\n      // if the first item in each historyItem includes `fname`, then it's a match\n      return new RegExp(`.*${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 = () => {\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 = () => {\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 = () => {\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 = (...args) => logByType('error', level, args);\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 = (...args) => logByType('warn', level, args);\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 = (...args) => logByType('debug', level, args);\n  return log;\n}\n\n/**\n * @file log.js\n * @module log\n */\nconst log$1 = createLogger$1('VIDEOJS');\nconst 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 */\nconst 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 */\nconst keys = function (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(key => fn(object[key], key));\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, initial = 0) {\n  return keys(object).reduce((accum, key) => fn(accum, object[key], key), 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(...sources) {\n  const result = {};\n  sources.forEach(source => {\n    if (!source) {\n      return;\n    }\n    each(source, (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(source = {}) {\n  const result = [];\n  for (const key in source) {\n    if (source.hasOwnProperty(key)) {\n      const 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, setter = true) {\n  const set = value => Object.defineProperty(obj, key, {\n    value,\n    enumerable: true,\n    writable: true\n  });\n  const options = {\n    configurable: true,\n    enumerable: true,\n    get() {\n      const 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}\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 */\nlet IS_IPOD = false;\n\n/**\n * The detected iOS version - or `null`.\n *\n * @static\n * @type {string|null}\n */\nlet IOS_VERSION = null;\n\n/**\n * Whether or not this is an Android device.\n *\n * @static\n * @type {Boolean}\n */\nlet 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 */\nlet ANDROID_VERSION;\n\n/**\n * Whether or not this is Mozilla Firefox.\n *\n * @static\n * @type {Boolean}\n */\nlet IS_FIREFOX = false;\n\n/**\n * Whether or not this is Microsoft Edge.\n *\n * @static\n * @type {Boolean}\n */\nlet IS_EDGE = false;\n\n/**\n * Whether or not this is any Chromium Browser\n *\n * @static\n * @type {Boolean}\n */\nlet 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 */\nlet IS_CHROME = false;\n\n/**\n * The detected Chromium version - or `null`.\n *\n * @static\n * @type {number|null}\n */\nlet 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 */\nlet CHROME_VERSION = null;\n\n/**\n * Whether or not this is a Chromecast receiver application.\n *\n * @static\n * @type {Boolean}\n */\nconst IS_CHROMECAST_RECEIVER = Boolean(window$1.cast && window$1.cast.framework && window$1.cast.framework.CastReceiverContext);\n\n/**\n * The detected Internet Explorer version - or `null`.\n *\n * @static\n * @deprecated\n * @type {number|null}\n */\nlet IE_VERSION = null;\n\n/**\n * Whether or not this is desktop Safari.\n *\n * @static\n * @type {Boolean}\n */\nlet IS_SAFARI = false;\n\n/**\n * Whether or not this is a Windows machine.\n *\n * @static\n * @type {Boolean}\n */\nlet IS_WINDOWS = false;\n\n/**\n * Whether or not this device is an iPad.\n *\n * @static\n * @type {Boolean}\n */\nlet 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/\nlet IS_IPHONE = false;\n\n/**\n * Whether or not this is a Tizen device.\n *\n * @static\n * @type {Boolean}\n */\nlet IS_TIZEN = false;\n\n/**\n * Whether or not this is a WebOS device.\n *\n * @static\n * @type {Boolean}\n */\nlet IS_WEBOS = false;\n\n/**\n * Whether or not this is a Smart TV (Tizen or WebOS) device.\n *\n * @static\n * @type {Boolean}\n */\nlet IS_SMART_TV = false;\n\n/**\n * Whether or not this device is touch-enabled.\n *\n * @static\n * @const\n * @type {Boolean}\n */\nconst TOUCH_ENABLED = Boolean(isReal() && ('ontouchstart' in window$1 || window$1.navigator.maxTouchPoints || window$1.DocumentTouch && window$1.document instanceof window$1.DocumentTouch));\nconst UAD = window$1.navigator && window$1.navigator.userAgentData;\nif (UAD && UAD.platform && UAD.brands) {\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(b => b.brand === 'Microsoft Edge'));\n  IS_CHROMIUM = Boolean(UAD.brands.find(b => b.brand === 'Chromium'));\n  IS_CHROME = !IS_EDGE && IS_CHROMIUM;\n  CHROMIUM_VERSION = CHROME_VERSION = (UAD.brands.find(b => b.brand === 'Chromium') || {}).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  const USER_AGENT = window$1.navigator && window$1.navigator.userAgent || '';\n  IS_IPOD = /iPod/i.test(USER_AGENT);\n  IOS_VERSION = function () {\n    const 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    const match = USER_AGENT.match(/Android (\\d+)(?:\\.(\\d+))?(?:\\.(\\d+))*/i);\n    if (!match) {\n      return null;\n    }\n    const major = match[1] && parseFloat(match[1]);\n    const 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    const 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    const result = /MSIE\\s(\\d+)\\.\\d/.exec(USER_AGENT);\n    let 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_TIZEN = /Tizen/i.test(USER_AGENT);\n  IS_WEBOS = /Web0S/i.test(USER_AGENT);\n  IS_SMART_TV = IS_TIZEN || IS_WEBOS;\n  IS_SAFARI = /Safari/i.test(USER_AGENT) && !IS_CHROME && !IS_ANDROID && !IS_EDGE && !IS_SMART_TV;\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 */\nconst 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 */\nconst IS_ANY_SAFARI = (IS_SAFARI || IS_IOS) && !IS_CHROME;\n\nvar browser = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  get IS_IPOD () { return IS_IPOD; },\n  get IOS_VERSION () { return IOS_VERSION; },\n  get IS_ANDROID () { return IS_ANDROID; },\n  get ANDROID_VERSION () { return ANDROID_VERSION; },\n  get IS_FIREFOX () { return IS_FIREFOX; },\n  get IS_EDGE () { return IS_EDGE; },\n  get IS_CHROMIUM () { return IS_CHROMIUM; },\n  get IS_CHROME () { return IS_CHROME; },\n  get CHROMIUM_VERSION () { return CHROMIUM_VERSION; },\n  get CHROME_VERSION () { return CHROME_VERSION; },\n  IS_CHROMECAST_RECEIVER: IS_CHROMECAST_RECEIVER,\n  get IE_VERSION () { return IE_VERSION; },\n  get IS_SAFARI () { return IS_SAFARI; },\n  get IS_WINDOWS () { return IS_WINDOWS; },\n  get IS_IPAD () { return IS_IPAD; },\n  get IS_IPHONE () { return IS_IPHONE; },\n  get IS_TIZEN () { return IS_TIZEN; },\n  get IS_WEBOS () { return IS_WEBOS; },\n  get IS_SMART_TV () { return IS_SMART_TV; },\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$1 === 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$1[method](null);\n    }\n    if (isNonBlankString(context)) {\n      context = document$1.querySelector(context);\n    }\n    const ctx = isEl(context) ? context : document$1;\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(tagName = 'div', properties = {}, attributes = {}, content) {\n  const el = document$1.createElement(tagName);\n  Object.getOwnPropertyNames(properties).forEach(function (propName) {\n    const 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, ...classesToAdd) {\n  element.classList.add(...classesToAdd.reduce((prev, current) => prev.concat(current.split(/\\s+/)), []));\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, ...classesToRemove) {\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  element.classList.remove(...classesToRemove.reduce((prev, current) => prev.concat(current.split(/\\s+/)), []));\n  return element;\n}\n\n/**\n * The callback definition for toggleClass.\n *\n * @callback 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`, but not removed. If `false`, the `classToToggle` will be removed from\n *           the `element`, but not added. If `undefined`, the callback will be ignored.\n *\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|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(className => element.classList.toggle(className, predicate));\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    const 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  const 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  const knownBooleans = ['autoplay', 'controls', 'playsinline', 'loop', 'muted', 'default', 'defaultMuted'];\n  if (tag && tag.attributes && tag.attributes.length > 0) {\n    const attrs = tag.attributes;\n    for (let i = attrs.length - 1; i >= 0; i--) {\n      const attrName = attrs[i].name;\n      /** @type {boolean|string} */\n      let attrVal = attrs[i].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$1.body.focus();\n  document$1.onselectstart = function () {\n    return false;\n  };\n}\n\n/**\n * Turn off text selection blocking.\n */\nfunction unblockTextSelection() {\n  document$1.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    const rect = el.getBoundingClientRect();\n    const result = {};\n    ['bottom', 'height', 'left', 'right', 'top', 'width'].forEach(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  const width = el.offsetWidth;\n  const height = el.offsetHeight;\n  let left = 0;\n  let top = 0;\n  while (el.offsetParent && el !== document$1[FullscreenApi.fullscreenElement]) {\n    left += el.offsetLeft;\n    top += el.offsetTop;\n    el = el.offsetParent;\n  }\n  return {\n    left,\n    top,\n    width,\n    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  const translated = {\n    x: 0,\n    y: 0\n  };\n  if (IS_IOS) {\n    let item = el;\n    while (item && item.nodeName.toLowerCase() !== 'html') {\n      const transform = computedStyle(item, 'transform');\n      if (/^matrix/.test(transform)) {\n        const 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        const values = transform.slice(9, -1).split(/,\\s/).map(Number);\n        translated.x += values[12];\n        translated.y += values[13];\n      }\n      if (item.assignedSlot && item.assignedSlot.parentElement && window$1.WebKitCSSMatrix) {\n        const transformValue = window$1.getComputedStyle(item.assignedSlot.parentElement).transform;\n        const matrix = new window$1.WebKitCSSMatrix(transformValue);\n        translated.x += matrix.m41;\n        translated.y += matrix.m42;\n      }\n      item = item.parentNode || item.host;\n    }\n  }\n  const position = {};\n  const boxTarget = findPosition(event.target);\n  const box = findPosition(el);\n  const boxW = box.width;\n  const boxH = box.height;\n  let offsetY = event.offsetY - (box.top - boxTarget.top);\n  let 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(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$1.createTextNode(value);\n    }\n  }).filter(value => value);\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(node => el.appendChild(node));\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\n  // MacOS Sonoma trackpad when \"tap to click enabled\"\n  if (event.type === 'mousedown' && 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 */\nconst $ = 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 */\nconst $$ = 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    let 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  [...document$1.styleSheets].forEach(styleSheet => {\n    try {\n      const cssRules = [...styleSheet.cssRules].map(rule => rule.cssText).join('');\n      const style = document$1.createElement('style');\n      style.textContent = cssRules;\n      win.document.head.appendChild(style);\n    } catch (e) {\n      const link = document$1.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}\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 */\nlet _windowLoaded = false;\nlet videojs$1;\n\n/**\n * Set up any tags that have a data-setup `attribute` when the player is started.\n */\nconst autoSetup = function () {\n  if (videojs$1.options.autoSetup === false) {\n    return;\n  }\n  const vids = Array.prototype.slice.call(document$1.getElementsByTagName('video'));\n  const audios = Array.prototype.slice.call(document$1.getElementsByTagName('audio'));\n  const divs = Array.prototype.slice.call(document$1.getElementsByTagName('video-js'));\n  const mediaEls = vids.concat(audios, divs);\n\n  // Check if any media elements exist\n  if (mediaEls && mediaEls.length > 0) {\n    for (let i = 0, e = mediaEls.length; i < e; i++) {\n      const mediaEl = mediaEls[i];\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          const 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$1.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 */\nconst createStyleElement = function (className) {\n  const style = document$1.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 */\nconst setTextContent = function (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\nconst _initialGuid = 3;\n\n/**\n * Unique ID for an element or function\n *\n * @type {Number}\n */\nlet _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  const 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    const 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\n    // TODO: Probably best to create an allowlist of event props\n    const deprecatedProps = ['layerX', 'layerY', 'keyLocation', 'path', 'webkitMovementX', 'webkitMovementY', 'mozPressure', 'mozInputSource'];\n    for (const 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 (!deprecatedProps.includes(key)) {\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$1;\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      const doc = document$1.documentElement;\n      const body = document$1.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 */\nlet _supportsPassive;\nconst supportsPassive = function () {\n  if (typeof _supportsPassive !== 'boolean') {\n    _supportsPassive = false;\n    try {\n      const opts = Object.defineProperty({}, 'passive', {\n        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 */\nconst 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  const 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      const 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        const handlersCopy = handlers.slice(0);\n        for (let 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      let 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  const 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  const removeType = function (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 (const t in data.handlers) {\n      if (Object.prototype.hasOwnProperty.call(data.handlers || {}, t)) {\n        removeType(elem, t);\n      }\n    }\n    return;\n  }\n  const 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 (let 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  const elemData = DomData.has(elem) ? DomData.get(elem) : {};\n  const 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    const 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  const func = function () {\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  const func = function () {\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}\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 */\nconst 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 */\nconst bind_ = function (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  const 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 */\nconst throttle = function (fn, wait) {\n  let last = window$1.performance.now();\n  const throttled = function (...args) {\n    const now = window$1.performance.now();\n    if (now - last >= wait) {\n      fn(...args);\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 */\nconst debounce = function (func, wait, immediate, context = window$1) {\n  let timeout;\n  const cancel = () => {\n    context.clearTimeout(timeout);\n    timeout = null;\n  };\n\n  /* eslint-disable consistent-this */\n  const debounced = function () {\n    const self = this;\n    const args = arguments;\n    let later = function () {\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};\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 */\nlet 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 */\nclass EventTarget$2 {\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  on(type, fn) {\n    // Remove the addEventListener alias before calling Events.on\n    // so we don't get into an infinite type loop\n    const ael = this.addEventListener;\n    this.addEventListener = () => {};\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  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  one(type, fn) {\n    // Remove the addEventListener aliasing Events.on\n    // so we don't get into an infinite type loop\n    const ael = this.addEventListener;\n    this.addEventListener = () => {};\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  any(type, fn) {\n    // Remove the addEventListener aliasing Events.on\n    // so we don't get into an infinite type loop\n    const ael = this.addEventListener;\n    this.addEventListener = () => {};\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  trigger(event) {\n    const 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\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  queueTrigger(event) {\n    // only set up EVENT_MAP if it'll be used\n    if (!EVENT_MAP) {\n      EVENT_MAP = new Map();\n    }\n    const type = event.type || event;\n    let map = EVENT_MAP.get(this);\n    if (!map) {\n      map = new Map();\n      EVENT_MAP.set(this, map);\n    }\n    const oldTimeout = map.get(type);\n    map.delete(type);\n    window$1.clearTimeout(oldTimeout);\n    const timeout = window$1.setTimeout(() => {\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\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/**\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/**\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 */\nconst 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 */\nconst isEvented = object => object instanceof EventTarget$2 || !!object.eventBusEl_ && ['on', 'one', 'off', 'trigger'].every(k => typeof object[k] === 'function');\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 */\nconst 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 */\nconst isValidEventType = type =>\n// The regex here verifies that the `type` contains at least one non-\n// whitespace character.\ntypeof type === 'string' && /\\S/.test(type) || Array.isArray(type) && !!type.length;\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 */\nconst validateTarget = (target, obj, fnName) => {\n  if (!target || !target.nodeName && !isEvented(target)) {\n    throw new Error(`Invalid target for ${objName(obj)}#${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 */\nconst validateEventType = (type, obj, fnName) => {\n  if (!isValidEventType(type)) {\n    throw new Error(`Invalid event type for ${objName(obj)}#${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 */\nconst validateListener = (listener, obj, fnName) => {\n  if (typeof listener !== 'function') {\n    throw new Error(`Invalid listener for ${objName(obj)}#${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 */\nconst normalizeListenArgs = (self, args, fnName) => {\n  // If the number of arguments is less than 3, the target is always the\n  // evented object itself.\n  const isTargetingSelf = args.length < 3 || args[0] === self || args[0] === self.eventBusEl_;\n  let target;\n  let type;\n  let 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    [type, listener] = args;\n  } else {\n    // This was `[target, type, listener] = args;` but this block needs more than\n    // one statement to produce minified output compatible with Chrome 53.\n    // See https://github.com/videojs/video.js/pull/8810\n    target = args[0];\n    type = args[1];\n    listener = args[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,\n    target,\n    type,\n    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 */\nconst 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 */\nconst 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(...args) {\n    const {\n      isTargetingSelf,\n      target,\n      type,\n      listener\n    } = normalizeListenArgs(this, args, 'on');\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      const removeListenerOnDispose = () => this.off(target, type, listener);\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      const removeRemoverOnTargetDispose = () => this.off('dispose', removeListenerOnDispose);\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(...args) {\n    const {\n      isTargetingSelf,\n      target,\n      type,\n      listener\n    } = normalizeListenArgs(this, args, 'one');\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      const wrapper = (...largs) => {\n        this.off(target, type, wrapper);\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(...args) {\n    const {\n      isTargetingSelf,\n      target,\n      type,\n      listener\n    } = normalizeListenArgs(this, args, 'any');\n\n    // Targeting this evented object.\n    if (isTargetingSelf) {\n      listen(target, 'any', type, listener);\n\n      // Targeting another evented object.\n    } else {\n      const wrapper = (...largs) => {\n        this.off(target, type, wrapper);\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(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      const target = targetOrType;\n      const 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(event, hash) {\n    validateTarget(this.eventBusEl_, this, 'trigger');\n    const type = event && typeof event !== 'string' ? event.type : event;\n    if (!isValidEventType(type)) {\n      throw new Error(`Invalid event type for ${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, options = {}) {\n  const {\n    eventBusKey\n  } = options;\n\n  // Set or create the eventBusEl_.\n  if (eventBusKey) {\n    if (!target[eventBusKey].nodeName) {\n      throw new Error(`The eventBusKey \"${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(callback => {\n      callback();\n    });\n  }\n\n  // When any evented object is disposed, it removes all its listeners.\n  target.on('dispose', () => {\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(() => {\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 */\nconst 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(stateUpdates) {\n    // Support providing the `stateUpdates` state as a function.\n    if (typeof stateUpdates === 'function') {\n      stateUpdates = stateUpdates();\n    }\n    let changes;\n    each(stateUpdates, (value, key) => {\n      // Record the change if the value is different from what's in the\n      // current state.\n      if (this.state[key] !== value) {\n        changes = changes || {};\n        changes[key] = {\n          from: this.state[key],\n          to: value\n        };\n      }\n      this.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,\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 */\nconst toLowerCase = function (string) {\n  if (typeof string !== 'string') {\n    return string;\n  }\n  return string.replace(/./, w => w.toLowerCase());\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 */\nconst toTitleCase$1 = function (string) {\n  if (typeof string !== 'string') {\n    return string;\n  }\n  return string.replace(/./, w => w.toUpperCase());\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 */\nconst titleCaseEquals = function (str1, str2) {\n  return toTitleCase$1(str1) === toTitleCase$1(str2);\n};\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/** @import Player from './player' */\n\n/**\n * A callback to be called if and when the component is ready.\n * `this` will be the Component instance.\n *\n * @callback ReadyCallback\n * @returns  {void}\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 */\nclass Component$1 {\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 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  constructor(player, options, ready) {\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      const id = player && player.id && player.id() || 'no_player';\n      this.id_ = `${id}_component_${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(c => this.addClass(c));\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(fn => {\n      this[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\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. If not specified, all listeners managed by Video.js will be removed.\n   */\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  /**\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  /**\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  /**\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  dispose(options = {}) {\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 (let i = this.children_.length - 1; i >= 0; i--) {\n        if (this.children_[i].dispose) {\n          this.children_[i].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  isDisposed() {\n    return Boolean(this.isDisposed_);\n  }\n\n  /**\n   * Return the {@link Player} that the `Component` has attached to.\n   *\n   * @return {Player}\n   *         The player that this `Component` has attached to.\n   */\n  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  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  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  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  localize(string, tokens, defaultValue = string) {\n    const code = this.player_.language && this.player_.language();\n    const languages = this.player_.languages && this.player_.languages();\n    const language = languages && languages[code];\n    const primaryCode = code && code.split('-')[0];\n    const primaryLang = languages && languages[primaryCode];\n    let 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        const value = tokens[index - 1];\n        let 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  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  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  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  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  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  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  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  getDescendant(...names) {\n    // flatten array argument into the main array\n    names = names.reduce((acc, n) => acc.concat(n), []);\n    let currentChild = this;\n    for (let i = 0; i < names.length; i++) {\n      currentChild = currentChild.getChild(names[i]);\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  setIcon(iconName, el = 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    const 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    const iconContainer = createEl('span', {\n      className: 'vjs-icon-placeholder vjs-svg-icon'\n    }, {\n      'aria-hidden': 'true'\n    });\n    const svgEl = document$1.createElementNS(xmlnsURL, 'svg');\n    svgEl.setAttributeNS(null, 'viewBox', '0 0 512 512');\n    const useEl = document$1.createElementNS(xmlnsURL, 'use');\n    svgEl.appendChild(useEl);\n    useEl.setAttributeNS(null, 'href', `#vjs-icon-${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  addChild(child, options = {}, index = this.children_.length) {\n    let component;\n    let componentName;\n\n    // If child is a string, create component with options\n    if (typeof child === 'string') {\n      componentName = toTitleCase$1(child);\n      const 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      const ComponentClass = Component$1.getComponent(componentClassName);\n      if (!ComponentClass) {\n        throw new Error(`Component ${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      let 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  removeChild(component) {\n    if (typeof component === 'string') {\n      component = this.getChild(component);\n    }\n    if (!component || !this.children_) {\n      return;\n    }\n    let childFound = false;\n    for (let i = this.children_.length - 1; i >= 0; i--) {\n      if (this.children_[i] === component) {\n        childFound = true;\n        this.children_.splice(i, 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    const 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  initChildren() {\n    const children = this.options_.children;\n    if (children) {\n      // `this` is `parent`\n      const parentOptions = this.options_;\n      const handleAdd = child => {\n        const name = child.name;\n        let 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 = this.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        const newChild = this.addChild(name, opts);\n        if (newChild) {\n          this[name] = newChild;\n        }\n      };\n\n      // Allow for an array of children details to passed in the options\n      let workingChildren;\n      const Tech = 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(child => {\n        let name;\n        let opts;\n        if (typeof child === 'string') {\n          name = child;\n          opts = children[name] || this.options_[name] || {};\n        } else {\n          name = child.name;\n          opts = child;\n        }\n        return {\n          name,\n          opts\n        };\n      }).filter(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        const c = Component$1.getComponent(child.opts.componentClass || toTitleCase$1(child.name));\n        return c && !Tech.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  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  ready(fn, sync = 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  triggerReady() {\n    this.isReady_ = true;\n\n    // Ensure ready is triggered asynchronously\n    this.setTimeout(function () {\n      const 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  $(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  $$(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  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  addClass(...classesToAdd) {\n    addClass(this.el_, ...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  removeClass(...classesToRemove) {\n    removeClass(this.el_, ...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. Passed to DOMTokenList's toggle()\n   *\n   * @param  {boolean|Dom.PredicateCallback} [predicate]\n   *         A boolean or function that returns a boolean. Passed to DOMTokenList's toggle().\n   */\n  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  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  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  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  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  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  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  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  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  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  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  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    const val = this.el_.style[widthOrHeight];\n    const 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  currentDimension(widthOrHeight) {\n    let 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      const rule = `offset${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  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  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  currentHeight() {\n    return this.currentDimension('height');\n  }\n\n  /**\n   * Retrieves the position and size information of the component's element.\n   *\n   * @return {Object} An object with `boundingClientRect` and `center` properties.\n   *         - `boundingClientRect`: An object with properties `x`, `y`, `width`,\n   *           `height`, `top`, `right`, `bottom`, and `left`, representing\n   *           the bounding rectangle of the element.\n   *         - `center`: An object with properties `x` and `y`, representing\n   *           the center point of the element. `width` and `height` are set to 0.\n   */\n  getPositions() {\n    const rect = this.el_.getBoundingClientRect();\n\n    // Creating objects that mirror DOMRectReadOnly for boundingClientRect and center\n    const boundingClientRect = {\n      x: rect.x,\n      y: rect.y,\n      width: rect.width,\n      height: rect.height,\n      top: rect.top,\n      right: rect.right,\n      bottom: rect.bottom,\n      left: rect.left\n    };\n\n    // Calculating the center position\n    const center = {\n      x: rect.left + rect.width / 2,\n      y: rect.top + rect.height / 2,\n      width: 0,\n      height: 0,\n      top: rect.top + rect.height / 2,\n      right: rect.left + rect.width / 2,\n      bottom: rect.top + rect.height / 2,\n      left: rect.left + rect.width / 2\n    };\n    return {\n      boundingClientRect,\n      center\n    };\n  }\n\n  /**\n   * Set the focus to this component\n   */\n  focus() {\n    this.el_.focus();\n  }\n\n  /**\n   * Remove the focus from this component\n   */\n  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  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, exclude also when spatialNavigation is enabled.\n      if (event.key !== 'Tab' && !(this.player_.options_.playerOptions.spatialNavigation && this.player_.options_.playerOptions.spatialNavigation.enabled)) {\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  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  emitTapEvents() {\n    // Track the start time so we can determine how long the touch lasted\n    let touchStart = 0;\n    let 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    const tapMovementThreshold = 10;\n\n    // The maximum length a touch can be while still being considered a tap\n    const touchTimeThreshold = 200;\n    let 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        const xdiff = event.touches[0].pageX - firstTouch.pageX;\n        const ydiff = event.touches[0].pageY - firstTouch.pageY;\n        const touchDistance = Math.sqrt(xdiff * xdiff + ydiff * ydiff);\n        if (touchDistance > tapMovementThreshold) {\n          couldBeTap = false;\n        }\n      }\n    });\n    const noTap = function () {\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        const 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  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    const report = bind_(this.player(), this.player().reportUserActivity);\n    let 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    const touchEnd = function (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  setTimeout(fn, timeout) {\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(() => {\n      if (this.setTimeoutIds_.has(timeoutId)) {\n        this.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  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  setInterval(fn, interval) {\n    fn = bind_(this, fn);\n    this.clearTimersOnDispose_();\n    const 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  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  requestAnimationFrame(fn) {\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(() => {\n      if (this.rafIds_.has(id)) {\n        this.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  requestNamedAnimationFrame(name, fn) {\n    if (this.namedRafs_.has(name)) {\n      this.cancelNamedAnimationFrame(name);\n    }\n    this.clearTimersOnDispose_();\n    fn = bind_(this, fn);\n    const id = this.requestAnimationFrame(() => {\n      fn();\n      if (this.namedRafs_.has(name)) {\n        this.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  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  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  clearTimersOnDispose_() {\n    if (this.clearingTimersOnDispose_) {\n      return;\n    }\n    this.clearingTimersOnDispose_ = true;\n    this.one('dispose', () => {\n      [['namedRafs_', 'cancelNamedAnimationFrame'], ['rafIds_', 'cancelAnimationFrame'], ['setTimeoutIds_', 'clearTimeout'], ['setIntervalIds_', 'clearInterval']].forEach(([idName, cancelName]) => {\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        this[idName].forEach((val, key) => this[cancelName](key));\n      });\n      this.clearingTimersOnDispose_ = false;\n    });\n  }\n\n  /**\n    * Decide whether an element is actually disabled or not.\n    *\n    * @function isActuallyDisabled\n    * @param element {Node}\n    * @return {boolean}\n    *\n    * @see {@link https://html.spec.whatwg.org/multipage/semantics-other.html#concept-element-disabled}\n    */\n  getIsDisabled() {\n    return Boolean(this.el_.disabled);\n  }\n\n  /**\n    * Decide whether the element is expressly inert or not.\n    *\n    * @see {@link https://html.spec.whatwg.org/multipage/interaction.html#expressly-inert}\n    * @function isExpresslyInert\n    * @param element {Node}\n    * @return {boolean}\n    */\n  getIsExpresslyInert() {\n    return this.el_.inert && !this.el_.ownerDocument.documentElement.inert;\n  }\n\n  /**\n   * Determine whether or not this component can be considered as focusable component.\n   *\n   * @param {HTMLElement} el - The HTML element representing the component.\n   * @return {boolean}\n   *         If the component can be focused, will be `true`. Otherwise, `false`.\n   */\n  getIsFocusable(el) {\n    const element = el || this.el_;\n    return element.tabIndex >= 0 && !(this.getIsDisabled() || this.getIsExpresslyInert());\n  }\n\n  /**\n   * Determine whether or not this component is currently visible/enabled/etc...\n   *\n   * @param {HTMLElement} el - The HTML element representing the component.\n   * @return {boolean}\n   *         If the component can is currently visible & enabled, will be `true`. Otherwise, `false`.\n   */\n  getIsAvailableToBeFocused(el) {\n    /**\n     * Decide the style property of this element is specified whether it's visible or not.\n     *\n     * @function isVisibleStyleProperty\n     * @param element {CSSStyleDeclaration}\n     * @return {boolean}\n     */\n    function isVisibleStyleProperty(element) {\n      const elementStyle = window$1.getComputedStyle(element, null);\n      const thisVisibility = elementStyle.getPropertyValue('visibility');\n      const thisDisplay = elementStyle.getPropertyValue('display');\n      const invisibleStyle = ['hidden', 'collapse'];\n      return thisDisplay !== 'none' && !invisibleStyle.includes(thisVisibility);\n    }\n\n    /**\n     * Decide whether the element is being rendered or not.\n     * 1. If an element has the style as \"visibility: hidden | collapse\" or \"display: none\", it is not being rendered.\n     * 2. If an element has the style as \"opacity: 0\", it is not being rendered.(that is, invisible).\n     * 3. If width and height of an element are explicitly set to 0, it is not being rendered.\n     * 4. If a parent element is hidden, an element itself is not being rendered.\n     * (CSS visibility property and display property are inherited.)\n     *\n     * @see {@link https://html.spec.whatwg.org/multipage/rendering.html#being-rendered}\n     * @function isBeingRendered\n     * @param element {Node}\n     * @return {boolean}\n     */\n    function isBeingRendered(element) {\n      if (!isVisibleStyleProperty(element.parentElement)) {\n        return false;\n      }\n      if (!isVisibleStyleProperty(element) || element.style.opacity === '0' || window$1.getComputedStyle(element).height === '0px' || window$1.getComputedStyle(element).width === '0px') {\n        return false;\n      }\n      return true;\n    }\n\n    /**\n     * Determine if the element is visible for the user or not.\n     * 1. If an element sum of its offsetWidth, offsetHeight, height and width is less than 1 is not visible.\n     * 2. If elementCenter.x is less than is not visible.\n     * 3. If elementCenter.x is more than the document's width is not visible.\n     * 4. If elementCenter.y is less than 0 is not visible.\n     * 5. If elementCenter.y is the document's height is not visible.\n     *\n     * @function isVisible\n     * @param element {Node}\n     * @return {boolean}\n     */\n    function isVisible(element) {\n      if (element.offsetWidth + element.offsetHeight + element.getBoundingClientRect().height + element.getBoundingClientRect().width === 0) {\n        return false;\n      }\n\n      // Define elementCenter object with props of x and y\n      // x: Left position relative to the viewport plus element's width (no margin) divided between 2.\n      // y: Top position relative to the viewport plus element's height (no margin) divided between 2.\n      const elementCenter = {\n        x: element.getBoundingClientRect().left + element.offsetWidth / 2,\n        y: element.getBoundingClientRect().top + element.offsetHeight / 2\n      };\n      if (elementCenter.x < 0) {\n        return false;\n      }\n      if (elementCenter.x > (document$1.documentElement.clientWidth || window$1.innerWidth)) {\n        return false;\n      }\n      if (elementCenter.y < 0) {\n        return false;\n      }\n      if (elementCenter.y > (document$1.documentElement.clientHeight || window$1.innerHeight)) {\n        return false;\n      }\n      let pointContainer = document$1.elementFromPoint(elementCenter.x, elementCenter.y);\n      while (pointContainer) {\n        if (pointContainer === element) {\n          return true;\n        }\n        if (pointContainer.parentNode) {\n          pointContainer = pointContainer.parentNode;\n        } else {\n          return false;\n        }\n      }\n    }\n\n    // If no DOM element was passed as argument use this component's element.\n    if (!el) {\n      el = this.el();\n    }\n\n    // If element is visible, is being rendered & either does not have a parent element or its tabIndex is not negative.\n    if (isVisible(el) && isBeingRendered(el) && (!el.parentElement || el.tabIndex >= 0)) {\n      return true;\n    }\n    return false;\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  static registerComponent(name, ComponentToRegister) {\n    if (typeof name !== 'string' || !name) {\n      throw new Error(`Illegal component name, \"${name}\"; must be a non-empty string.`);\n    }\n    const Tech = Component$1.getComponent('Tech');\n\n    // We need to make sure this check is only done if Tech has been registered.\n    const isTech = Tech && Tech.isTech(ComponentToRegister);\n    const isComp = Component$1 === ComponentToRegister || Component$1.prototype.isPrototypeOf(ComponentToRegister.prototype);\n    if (isTech || !isComp) {\n      let 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, \"${name}\"; ${reason}.`);\n    }\n    name = toTitleCase$1(name);\n    if (!Component$1.components_) {\n      Component$1.components_ = {};\n    }\n    const Player = Component$1.getComponent('Player');\n    if (name === 'Player' && Player && Player.players) {\n      const players = Player.players;\n      const 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(pname => players[pname]).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 {typeof Component}\n   *         The `Component` that got registered under the given name.\n   */\n  static getComponent(name) {\n    if (!name || !Component$1.components_) {\n      return;\n    }\n    return Component$1.components_[name];\n  }\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 '${fnName}' on 'TimeRanges': The index provided (${index}) is non-numeric or out of bounds (0-${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  let timeRangesObj;\n  if (ranges === undefined || ranges.length === 0) {\n    timeRangesObj = {\n      length: 0,\n      start() {\n        throw new Error('This TimeRanges object is empty');\n      },\n      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] = () => (ranges || []).values();\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 */\nconst defaultImplementation = function (seconds, guide) {\n  seconds = seconds < 0 ? 0 : seconds;\n  let s = Math.floor(seconds % 60);\n  let m = Math.floor(seconds / 60 % 60);\n  let h = Math.floor(seconds / 3600);\n  const gm = Math.floor(guide / 60 % 60);\n  const 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.\nlet 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, guide = seconds) {\n  return implementation(seconds, guide);\n}\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/** @import { TimeRange } from './time' */\n\n/**\n * Compute the percentage of the media that has been buffered.\n *\n * @param {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  let bufferedDuration = 0;\n  let start;\n  let end;\n  if (!duration) {\n    return 0;\n  }\n  if (!buffered || !buffered.length) {\n    buffered = createTimeRanges$1(0, 0);\n  }\n  for (let i = 0; i < buffered.length; i++) {\n    start = buffered.start(i);\n    end = buffered.end(i);\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 * An object containing an error type, as well as other information regarding the error.\n *\n * @typedef {{errorType: string, [key: string]: any}} ErrorMetadata\n */\n\n/**\n * An optional object to give more detail about the error. This can be used to give\n * a higher level of specificity to an error versus the more generic MediaError codes.\n * `metadata` expects an `errorType` string that should align with the values from videojs.Error.\n *\n * @type {ErrorMetadata}\n */\nMediaError.prototype.metadata = 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/**\n * W3C error code for any custom error.\n *\n * @member MediaError#MEDIA_ERR_CUSTOM\n * @constant {number}\n * @default 0\n */\nMediaError.MEDIA_ERR_CUSTOM = 0;\n\n/**\n * W3C error code for any custom error.\n *\n * @member MediaError.MEDIA_ERR_CUSTOM\n * @constant {number}\n * @default 0\n */\nMediaError.prototype.MEDIA_ERR_CUSTOM = 0;\n\n/**\n * W3C error code for media error aborted.\n *\n * @member MediaError#MEDIA_ERR_ABORTED\n * @constant {number}\n * @default 1\n */\nMediaError.MEDIA_ERR_ABORTED = 1;\n\n/**\n * W3C error code for media error aborted.\n *\n * @member MediaError.MEDIA_ERR_ABORTED\n * @constant {number}\n * @default 1\n */\nMediaError.prototype.MEDIA_ERR_ABORTED = 1;\n\n/**\n * W3C error code for any network error.\n *\n * @member MediaError#MEDIA_ERR_NETWORK\n * @constant {number}\n * @default 2\n */\nMediaError.MEDIA_ERR_NETWORK = 2;\n\n/**\n * W3C error code for any network error.\n *\n * @member MediaError.MEDIA_ERR_NETWORK\n * @constant {number}\n * @default 2\n */\nMediaError.prototype.MEDIA_ERR_NETWORK = 2;\n\n/**\n * W3C error code for any decoding error.\n *\n * @member MediaError#MEDIA_ERR_DECODE\n * @constant {number}\n * @default 3\n */\nMediaError.MEDIA_ERR_DECODE = 3;\n\n/**\n * W3C error code for any decoding error.\n *\n * @member MediaError.MEDIA_ERR_DECODE\n * @constant {number}\n * @default 3\n */\nMediaError.prototype.MEDIA_ERR_DECODE = 3;\n\n/**\n * W3C error code for any time that a source is not supported.\n *\n * @member MediaError#MEDIA_ERR_SRC_NOT_SUPPORTED\n * @constant {number}\n * @default 4\n */\nMediaError.MEDIA_ERR_SRC_NOT_SUPPORTED = 4;\n\n/**\n * W3C error code for any time that a source is not supported.\n *\n * @member MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED\n * @constant {number}\n * @default 4\n */\nMediaError.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED = 4;\n\n/**\n * W3C error code for any time that a source is encrypted.\n *\n * @member MediaError#MEDIA_ERR_ENCRYPTED\n * @constant {number}\n * @default 5\n */\nMediaError.MEDIA_ERR_ENCRYPTED = 5;\n\n/**\n * W3C error code for any time that a source is encrypted.\n *\n * @member MediaError.MEDIA_ERR_ENCRYPTED\n * @constant {number}\n * @default 5\n */\nMediaError.prototype.MEDIA_ERR_ENCRYPTED = 5;\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, 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/** @import Tech from '../tech/tech' */\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 */\nconst trackToJson_ = function (track) {\n  const ret = ['kind', 'label', 'language', 'id', 'inBandMetadataTrackDispatchType', 'mode', 'src'].reduce((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 {Tech} 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 */\nconst textTracksToJson = function (tech) {\n  const trackEls = tech.$$('track');\n  const trackObjs = Array.prototype.map.call(trackEls, t => t.track);\n  const tracks = Array.prototype.map.call(trackEls, function (trackEl) {\n    const 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 */\nconst jsonToTextTracks = function (json, tech) {\n  json.forEach(function (track) {\n    const addedTrack = tech.addRemoteTextTrack(track).track;\n    if (!track.src && track.cues) {\n      track.cues.forEach(cue => addedTrack.addCue(cue));\n    }\n  });\n  return tech.textTracks();\n};\nvar textTrackConverter = {\n  textTracksToJson,\n  jsonToTextTracks,\n  trackToJson_\n};\n\n/**\n * @file modal-dialog.js\n */\n\n/** @import Player from './player' */\n/** @import { ContentDescriptor } from './utils/dom' */\n\nconst 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 */\nclass ModalDialog extends Component$1 {\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   * @param {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  constructor(player, options) {\n    super(player, options);\n    this.handleKeyDown_ = e => this.handleKeyDown(e);\n    this.close_ = e => this.close(e);\n    this.opened_ = this.hasBeenOpened_ = this.hasBeenFilled_ = false;\n    this.closeable(!this.options_.uncloseable);\n    this.content(this.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    this.contentEl_ = createEl('div', {\n      className: `${MODAL_CLASS_NAME}-content`\n    }, {\n      role: 'document'\n    });\n    this.descEl_ = createEl('p', {\n      className: `${MODAL_CLASS_NAME}-description vjs-control-text`,\n      id: this.el().getAttribute('aria-describedby')\n    });\n    textContent(this.descEl_, this.description());\n    this.el_.appendChild(this.descEl_);\n    this.el_.appendChild(this.contentEl_);\n  }\n\n  /**\n   * Create the `ModalDialog`'s DOM element\n   *\n   * @return {Element}\n   *         The DOM element that gets created.\n   */\n  createEl() {\n    return super.createEl('div', {\n      className: this.buildCSSClass(),\n      tabIndex: -1\n    }, {\n      'aria-describedby': `${this.id()}_description`,\n      'aria-hidden': 'true',\n      'aria-label': this.label(),\n      'role': 'dialog',\n      'aria-live': 'polite'\n    });\n  }\n  dispose() {\n    this.contentEl_ = null;\n    this.descEl_ = null;\n    this.previouslyActiveEl_ = null;\n    super.dispose();\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  buildCSSClass() {\n    return `${MODAL_CLASS_NAME} vjs-hidden ${super.buildCSSClass()}`;\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  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  description() {\n    let 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  open() {\n    if (this.opened_) {\n      if (this.options_.fillAlways) {\n        this.fill();\n      }\n      return;\n    }\n    const 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   * 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  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  close() {\n    if (!this.opened_) {\n      return;\n    }\n    const 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      * @property {boolean} [bubbles=true]\n      */\n    this.trigger({\n      type: 'modalclose',\n      bubbles: true\n    });\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  closeable(value) {\n    if (typeof value === 'boolean') {\n      const closeable = this.closeable_ = !!value;\n      let 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        const 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  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 {ContentDescriptor} [content]\n   *        The same rules apply to this as apply to the `content` option.\n   */\n  fillWith(content) {\n    const contentEl = this.contentEl();\n    const parentEl = contentEl.parentNode;\n    const 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    const closeButton = this.getChild('closeButton');\n    if (closeButton) {\n      parentEl.appendChild(closeButton.el_);\n    }\n\n    /**\n     * Fired after `ModalDialog` is re-filled with content & close button is appended.\n     *\n     * @event ModalDialog#aftermodalfill\n     * @type {Event}\n     */\n    this.trigger('aftermodalfill');\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  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  {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 {ContentDescriptor}\n   *         The current content of the modal dialog\n   */\n  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  conditionalFocus_() {\n    const activeEl = document$1.activeElement;\n    const 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  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  handleKeyDown(event) {\n    /**\n     * Fired a custom keyDown event that bubbles.\n     *\n     * @event ModalDialog#modalKeydown\n     * @type {Event}\n     */\n    this.trigger({\n      type: 'modalKeydown',\n      originalEvent: event,\n      target: this,\n      bubbles: true\n    });\n    // Do not allow keydowns to reach out of the modal dialog.\n    event.stopPropagation();\n    if (event.key === '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 (event.key !== 'Tab') {\n      return;\n    }\n    const focusableEls = this.focusableEls_();\n    const activeEl = this.el_.querySelector(':focus');\n    let focusIndex;\n    for (let i = 0; i < focusableEls.length; i++) {\n      if (activeEl === focusableEls[i]) {\n        focusIndex = i;\n        break;\n      }\n    }\n    if (document$1.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  focusableEls_() {\n    const allChildren = this.el_.querySelectorAll('*');\n    return Array.prototype.filter.call(allChildren, 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\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/** @import Track from './track' */\n\n/**\n * Common functionaliy between {@link TextTrackList}, {@link AudioTrackList}, and\n * {@link VideoTrackList}\n *\n * @extends EventTarget\n */\nclass TrackList extends EventTarget$2 {\n  /**\n   * Create an instance of this class\n   *\n   * @param { Track[] } tracks\n   *        A list of tracks to initialize the list with.\n   *\n   * @abstract\n   */\n  constructor(tracks = []) {\n    super();\n    this.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(this, 'length', {\n      get() {\n        return this.tracks_.length;\n      }\n    });\n    for (let i = 0; i < tracks.length; i++) {\n      this.addTrack(tracks[i]);\n    }\n  }\n\n  /**\n   * Add a {@link Track} to the `TrackList`\n   *\n   * @param {Track} track\n   *        The audio, video, or text track to add to the list.\n   *\n   * @fires TrackList#addtrack\n   */\n  addTrack(track) {\n    const index = this.tracks_.length;\n    if (!('' + index in this)) {\n      Object.defineProperty(this, index, {\n        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,\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_ = () => {\n      this.trigger({\n        track,\n        type: 'labelchange',\n        target: this\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 {Track} rtrack\n   *        The audio, video, or text track to remove from the list.\n   *\n   * @fires TrackList#removetrack\n   */\n  removeTrack(rtrack) {\n    let track;\n    for (let i = 0, l = this.length; i < l; i++) {\n      if (this[i] === rtrack) {\n        track = this[i];\n        if (track.off) {\n          track.off();\n        }\n        this.tracks_.splice(i, 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,\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 {Track}\n   * @private\n   */\n  getTrackById(id) {\n    let result = null;\n    for (let i = 0, l = this.length; i < l; i++) {\n      const track = this[i];\n      if (track.id === id) {\n        result = track;\n        break;\n      }\n    }\n    return result;\n  }\n}\n\n/**\n * Triggered when a different track is selected/enabled.\n *\n * @event TrackList#change\n * @type {Event}\n */\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 (const event in TrackList.prototype.allowedEvents_) {\n  TrackList.prototype['on' + event] = null;\n}\n\n/**\n * @file audio-track-list.js\n */\n\n/** @import AudioTrack from './audio-track' */\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 {AudioTrack} track\n *        The track to skip\n *\n * @private\n */\nconst disableOthers$1 = function (list, track) {\n  for (let i = 0; i < list.length; i++) {\n    if (!Object.keys(list[i]).length || track.id === list[i].id) {\n      continue;\n    }\n    // another audio track is enabled, disable it\n    list[i].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 */\nclass AudioTrackList extends TrackList {\n  /**\n   * Create an instance of this class.\n   *\n   * @param {AudioTrack[]} [tracks=[]]\n   *        A list of `AudioTrack` to instantiate the list with.\n   */\n  constructor(tracks = []) {\n    // make sure only 1 track is enabled\n    // sorted from last index to first index\n    for (let i = tracks.length - 1; i >= 0; i--) {\n      if (tracks[i].enabled) {\n        disableOthers$1(tracks, tracks[i]);\n        break;\n      }\n    }\n    super(tracks);\n    this.changing_ = false;\n  }\n\n  /**\n   * Add an {@link AudioTrack} to the `AudioTrackList`.\n   *\n   * @param {AudioTrack} track\n   *        The AudioTrack to add to the list\n   *\n   * @fires TrackList#addtrack\n   */\n  addTrack(track) {\n    if (track.enabled) {\n      disableOthers$1(this, track);\n    }\n    super.addTrack(track);\n    // native tracks don't have this\n    if (!track.addEventListener) {\n      return;\n    }\n    track.enabledChange_ = () => {\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 (this.changing_) {\n        return;\n      }\n      this.changing_ = true;\n      disableOthers$1(this, track);\n      this.changing_ = false;\n      this.trigger('change');\n    };\n\n    /**\n     * @listens AudioTrack#enabledchange\n     * @fires TrackList#change\n     */\n    track.addEventListener('enabledchange', track.enabledChange_);\n  }\n  removeTrack(rtrack) {\n    super.removeTrack(rtrack);\n    if (rtrack.removeEventListener && rtrack.enabledChange_) {\n      rtrack.removeEventListener('enabledchange', rtrack.enabledChange_);\n      rtrack.enabledChange_ = null;\n    }\n  }\n}\n\n/**\n * @file video-track-list.js\n */\n\n/** @import VideoTrack from './video-track' */\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 {VideoTrack} track\n *        The track to skip\n *\n * @private\n */\nconst disableOthers = function (list, track) {\n  for (let i = 0; i < list.length; i++) {\n    if (!Object.keys(list[i]).length || track.id === list[i].id) {\n      continue;\n    }\n    // another video track is enabled, disable it\n    list[i].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 */\nclass VideoTrackList extends TrackList {\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  constructor(tracks = []) {\n    // make sure only 1 track is enabled\n    // sorted from last index to first index\n    for (let i = tracks.length - 1; i >= 0; i--) {\n      if (tracks[i].selected) {\n        disableOthers(tracks, tracks[i]);\n        break;\n      }\n    }\n    super(tracks);\n    this.changing_ = false;\n\n    /**\n     * @member {number} VideoTrackList#selectedIndex\n     *         The current index of the selected {@link VideoTrack`}.\n     */\n    Object.defineProperty(this, 'selectedIndex', {\n      get() {\n        for (let i = 0; i < this.length; i++) {\n          if (this[i].selected) {\n            return i;\n          }\n        }\n        return -1;\n      },\n      set() {}\n    });\n  }\n\n  /**\n   * Add a {@link VideoTrack} to the `VideoTrackList`.\n   *\n   * @param {VideoTrack} track\n   *        The VideoTrack to add to the list\n   *\n   * @fires TrackList#addtrack\n   */\n  addTrack(track) {\n    if (track.selected) {\n      disableOthers(this, track);\n    }\n    super.addTrack(track);\n    // native tracks don't have this\n    if (!track.addEventListener) {\n      return;\n    }\n    track.selectedChange_ = () => {\n      if (this.changing_) {\n        return;\n      }\n      this.changing_ = true;\n      disableOthers(this, track);\n      this.changing_ = false;\n      this.trigger('change');\n    };\n\n    /**\n     * @listens VideoTrack#selectedchange\n     * @fires TrackList#change\n     */\n    track.addEventListener('selectedchange', track.selectedChange_);\n  }\n  removeTrack(rtrack) {\n    super.removeTrack(rtrack);\n    if (rtrack.removeEventListener && rtrack.selectedChange_) {\n      rtrack.removeEventListener('selectedchange', rtrack.selectedChange_);\n      rtrack.selectedChange_ = null;\n    }\n  }\n}\n\n/**\n * @file text-track-list.js\n */\n\n/** @import TextTrack from './text-track' */\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 */\nclass TextTrackList extends TrackList {\n  /**\n   * Add a {@link TextTrack} to the `TextTrackList`\n   *\n   * @param {TextTrack} track\n   *        The text track to add to the list.\n   *\n   * @fires TrackList#addtrack\n   */\n  addTrack(track) {\n    super.addTrack(track);\n    if (!this.queueChange_) {\n      this.queueChange_ = () => this.queueTrigger('change');\n    }\n    if (!this.triggerSelectedlanguagechange) {\n      this.triggerSelectedlanguagechange_ = () => this.trigger('selectedlanguagechange');\n    }\n\n    /**\n     * @listens TextTrack#modechange\n     * @fires TrackList#change\n     */\n    track.addEventListener('modechange', this.queueChange_);\n    const nonLanguageTextTrackKind = ['metadata', 'chapters'];\n    if (nonLanguageTextTrackKind.indexOf(track.kind) === -1) {\n      track.addEventListener('modechange', this.triggerSelectedlanguagechange_);\n    }\n  }\n  removeTrack(rtrack) {\n    super.removeTrack(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\n/**\n * @file html-track-element-list.js\n */\n\n/**\n * The current list of {@link HtmlTrackElement}s.\n */\nclass HtmlTrackElementList {\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  constructor(trackElements = []) {\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() {\n        return this.trackElements_.length;\n      }\n    });\n    for (let i = 0, length = trackElements.length; i < length; i++) {\n      this.addTrackElement_(trackElements[i]);\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  addTrackElement_(trackElement) {\n    const index = this.trackElements_.length;\n    if (!('' + index in this)) {\n      Object.defineProperty(this, index, {\n        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  getTrackElementByTrack_(track) {\n    let trackElement_;\n    for (let i = 0, length = this.trackElements_.length; i < length; i++) {\n      if (track === this.trackElements_[i].track) {\n        trackElement_ = this.trackElements_[i];\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  removeTrackElement_(trackElement) {\n    for (let i = 0, length = this.trackElements_.length; i < length; i++) {\n      if (trackElement === this.trackElements_[i]) {\n        if (this.trackElements_[i].track && typeof this.trackElements_[i].track.off === 'function') {\n          this.trackElements_[i].track.off();\n        }\n        if (typeof this.trackElements_[i].off === 'function') {\n          this.trackElements_[i].off();\n        }\n        this.trackElements_.splice(i, 1);\n        break;\n      }\n    }\n  }\n}\n\n/**\n * @file text-track-cue-list.js\n */\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/**\n * A List of TextTrackCues.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackcuelist}\n */\nclass TextTrackCueList {\n  /**\n   * Create an instance of this class..\n   *\n   * @param {Array} cues\n   *        A list of cues to be initialized with\n   */\n  constructor(cues) {\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() {\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  setCues_(cues) {\n    const oldLength = this.length || 0;\n    let i = 0;\n    const l = cues.length;\n    this.cues_ = cues;\n    this.length_ = cues.length;\n    const defineProp = function (index) {\n      if (!('' + index in this)) {\n        Object.defineProperty(this, '' + index, {\n          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  getCueById(id) {\n    let result = null;\n    for (let i = 0, l = this.length; i < l; i++) {\n      const cue = this[i];\n      if (cue.id === id) {\n        result = cue;\n        break;\n      }\n    }\n    return result;\n  }\n}\n\n/**\n * @file track-kinds.js\n */\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 */\nconst 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 */\nconst 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 */\nconst 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 */\nconst 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 */\nclass Track extends EventTarget$2 {\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  constructor(options = {}) {\n    super();\n    const trackProps = {\n      id: options.id || 'vjs_track_' + newGUID(),\n      kind: options.kind || '',\n      language: options.language || ''\n    };\n    let 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\n    for (const key in trackProps) {\n      Object.defineProperty(this, key, {\n        get() {\n          return trackProps[key];\n        },\n        set() {}\n      });\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(this, 'label', {\n      get() {\n        return label;\n      },\n      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  }\n}\n\n/**\n * @file url.js\n * @module url\n */\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}\n *           An object of url details\n */\nconst parseUrl = function (url) {\n  return new URL(url, document$1.baseURI);\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 */\nconst getAbsoluteURL = function (url) {\n  return new URL(url, document$1.baseURI).href;\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 */\nconst getFileExtension = function (path) {\n  if (typeof path === 'string') {\n    const splitPathRe = /^(\\/?)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?)(\\.([^\\.\\/\\?]+)))(?:[\\/]*|[\\?].*)$/;\n    const 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    {URL} [winLoc]\n *           the domain to check the url against, defaults to window.location\n *\n * @return   {boolean}\n *           Whether it is a cross domain request or not.\n */\nconst isCrossOrigin = function (url, winLoc = window$1.location) {\n  return parseUrl(url).origin !== winLoc.origin;\n};\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/** @import Tech from '../tech/tech' */\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 */\nconst parseCues = function (srcContent, track) {\n  const parser = new window$1.WebVTT.Parser(window$1, window$1.vttjs, window$1.WebVTT.StringDecoder());\n  const 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 ${track.src}`);\n    }\n    errors.forEach(error => log$1.error(error));\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 */\nconst loadTrack = function (src, track) {\n  const opts = {\n    uri: src\n  };\n  const crossOrigin = isCrossOrigin(src);\n  if (crossOrigin) {\n    opts.cors = crossOrigin;\n  }\n  const 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'], event => {\n          if (event.type === 'vttjserror') {\n            log$1.error(`vttjs failed to load, stopping trying to process ${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 */\nclass TextTrack extends Track {\n  /**\n   * Create an instance of this class.\n   *\n   * @param {Object} options={}\n   *        Object of option names and values\n   *\n   * @param {Tech} 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  constructor(options = {}) {\n    if (!options.tech) {\n      throw new Error('A tech was not provided.');\n    }\n    const settings = merge$1(options, {\n      kind: TextTrackKind[options.kind] || 'subtitles',\n      language: options.language || options.srclang || ''\n    });\n    let mode = TextTrackMode[settings.mode] || 'disabled';\n    const default_ = settings.default;\n    if (settings.kind === 'metadata' || settings.kind === 'chapters') {\n      mode = 'hidden';\n    }\n    super(settings);\n    this.tech_ = settings.tech;\n    this.cues_ = [];\n    this.activeCues_ = [];\n    this.preload_ = this.tech_.preloadTextTracks !== false;\n    const cues = new TextTrackCueList(this.cues_);\n    const activeCues = new TextTrackCueList(this.activeCues_);\n    let changed = false;\n    this.timeupdateHandler = bind_(this, function (event = {}) {\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    const disposeHandler = () => {\n      this.stopTracking();\n    };\n    this.tech_.one('dispose', disposeHandler);\n    if (mode !== 'disabled') {\n      this.startTracking();\n    }\n    Object.defineProperties(this, {\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() {\n          return default_;\n        },\n        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() {\n          return mode;\n        },\n        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() {\n          if (!this.loaded_) {\n            return null;\n          }\n          return cues;\n        },\n        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() {\n          if (!this.loaded_) {\n            return null;\n          }\n\n          // nothing to do\n          if (this.cues.length === 0) {\n            return activeCues;\n          }\n          const ct = this.tech_.currentTime();\n          const active = [];\n          for (let i = 0, l = this.cues.length; i < l; i++) {\n            const cue = this.cues[i];\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 (let i = 0; i < active.length; i++) {\n              if (this.activeCues_.indexOf(active[i]) === -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() {}\n      }\n    });\n    if (settings.src) {\n      this.src = settings.src;\n      if (!this.preload_) {\n        // Tracks will load on-demand.\n        // Act like we're loaded for other purposes.\n        this.loaded_ = true;\n      }\n      if (this.preload_ || settings.kind !== 'subtitles' && settings.kind !== 'captions') {\n        loadTrack(this.src, this);\n      }\n    } else {\n      this.loaded_ = true;\n    }\n  }\n  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  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  addCue(originalCue) {\n    let 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 (const 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    const tracks = this.tech_.textTracks();\n    for (let i = 0; i < tracks.length; i++) {\n      if (tracks[i] !== this) {\n        tracks[i].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  removeCue(removeCue) {\n    let i = this.cues_.length;\n    while (i--) {\n      const 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\n/**\n * cuechange - One or more cues in the track have become active or stopped being active.\n *\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 */\nclass AudioTrack extends Track {\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  constructor(options = {}) {\n    const settings = merge$1(options, {\n      kind: AudioTrackKind[options.kind] || ''\n    });\n    super(settings);\n    let 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(this, 'enabled', {\n      get() {\n        return enabled;\n      },\n      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      this.enabled = settings.enabled;\n    }\n    this.loaded_ = true;\n  }\n}\n\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 */\nclass VideoTrack extends 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 {@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  constructor(options = {}) {\n    const settings = merge$1(options, {\n      kind: VideoTrackKind[options.kind] || ''\n    });\n    super(settings);\n    let 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(this, 'selected', {\n      get() {\n        return selected;\n      },\n      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      this.selected = settings.selected;\n    }\n  }\n}\n\n/**\n * @file html-track-element.js\n */\n\n/** @import Tech from '../tech/tech' */\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 */\nclass HTMLTrackElement extends EventTarget$2 {\n  /**\n   * Create an instance of this class.\n   *\n   * @param {Object} options={}\n   *        Object of option names and values\n   *\n   * @param {Tech} 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  constructor(options = {}) {\n    super();\n    let readyState;\n    const track = new TextTrack(options);\n    this.kind = track.kind;\n    this.src = track.src;\n    this.srclang = track.language;\n    this.label = track.label;\n    this.default = track.default;\n    Object.defineProperties(this, {\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() {\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() {\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', () => {\n      readyState = HTMLTrackElement.LOADED;\n      this.trigger({\n        type: 'load',\n        target: this\n      });\n    });\n  }\n}\n\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\nconst 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 = `${type}Tracks`;\n  NORMAL[type].privateName = `${type}Tracks_`;\n});\nconst 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};\nconst 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/** @import { TimeRange } from '../utils/time' */\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, options = {}) {\n  const 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  const 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 */\nclass Tech extends Component$1 {\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  constructor(options = {}, ready = function () {}) {\n    // we don't want the tech to report user activity automatically.\n    // This is done manually in addControlsListeners\n    options.reportTouchActivity = false;\n    super(null, options, ready);\n    this.onDurationChange_ = e => this.onDurationChange(e);\n    this.trackProgress_ = e => this.trackProgress(e);\n    this.trackCurrentTime_ = e => this.trackCurrentTime(e);\n    this.stopTrackingCurrentTime_ = e => this.stopTrackingCurrentTime(e);\n    this.disposeSourceHandler_ = e => this.disposeSourceHandler(e);\n    this.queuedHanders_ = new Set();\n\n    // keep track of whether the current source has played at all to\n    // implement a very limited played()\n    this.hasStarted_ = false;\n    this.on('playing', function () {\n      this.hasStarted_ = true;\n    });\n    this.on('loadstart', function () {\n      this.hasStarted_ = false;\n    });\n    ALL.names.forEach(name => {\n      const props = ALL[name];\n      if (options && options[props.getterName]) {\n        this[props.privateName] = options[props.getterName];\n      }\n    });\n\n    // Manually track progress in cases where the browser/tech doesn't report it.\n    if (!this.featuresProgressEvents) {\n      this.manualProgressOn();\n    }\n\n    // Manually track timeupdates in cases where the browser/tech doesn't report it.\n    if (!this.featuresTimeupdateEvents) {\n      this.manualTimeUpdatesOn();\n    }\n    ['Text', 'Audio', 'Video'].forEach(track => {\n      if (options[`native${track}Tracks`] === false) {\n        this[`featuresNative${track}Tracks`] = false;\n      }\n    });\n    if (options.nativeCaptions === false || options.nativeTextTracks === false) {\n      this.featuresNativeTextTracks = false;\n    } else if (options.nativeCaptions === true || options.nativeTextTracks === true) {\n      this.featuresNativeTextTracks = true;\n    }\n    if (!this.featuresNativeTextTracks) {\n      this.emulateTextTracks();\n    }\n    this.preloadTextTracks = options.preloadTextTracks !== false;\n    this.autoRemoteTextTracks_ = new ALL.text.ListClass();\n    this.initTrackListeners();\n\n    // Turn on component tap events only if not using native controls\n    if (!options.nativeControlsForTouch) {\n      this.emitTapEvents();\n    }\n    if (this.constructor) {\n      this.name_ = this.constructor.name || 'Unknown Tech';\n    }\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  triggerSourceset(src) {\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', () => this.setTimeout(() => this.triggerSourceset(src), 1));\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,\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  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  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  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      const 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  onDurationChange(event) {\n    this.duration_ = this.duration();\n  }\n\n  /**\n   * Get and create a `TimeRange` object for buffering.\n   *\n   * @return {TimeRange}\n   *         The time range object that was created.\n   */\n  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  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  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  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  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  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  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  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    super.dispose();\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  clearTracks(types) {\n    types = [].concat(types);\n    // clear out all tracks because we can't reuse them between techs\n    types.forEach(type => {\n      const list = this[`${type}Tracks`]() || [];\n      let i = list.length;\n      while (i--) {\n        const track = list[i];\n        if (type === 'text') {\n          this.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  cleanupAutoTextTracks() {\n    const list = this.autoRemoteTextTracks_ || [];\n    let i = list.length;\n    while (i--) {\n      const 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  reset() {}\n\n  /**\n   * Get the value of `crossOrigin` from the tech.\n   *\n   * @abstract\n   *\n   * @see {Html5#crossOrigin}\n   */\n  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  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  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 {TimeRange}\n   *         - A single time range if this video has played\n   *         - An empty set of ranges if not.\n   */\n  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  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  setScrubbing(_isScrubbing) {}\n\n  /**\n   * Get whether we are scrubbing or not\n   *\n   * @abstract\n   *\n   * @see {Html5#scrubbing}\n   */\n  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  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  initTrackListeners() {\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(name => {\n      const props = NORMAL[name];\n      const trackListChanges = () => {\n        this.trigger(`${name}trackchange`);\n      };\n      const tracks = this[props.getterName]();\n      tracks.addEventListener('removetrack', trackListChanges);\n      tracks.addEventListener('addtrack', trackListChanges);\n      this.on('dispose', () => {\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  addWebVttScript_() {\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$1.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      const script = document$1.createElement('script');\n      script.src = this.options_['vtt.js'] || 'https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js';\n      script.onload = () => {\n        /**\n         * Fired when vtt.js is loaded.\n         *\n         * @event Tech#vttjsloaded\n         * @type {Event}\n         */\n        this.trigger('vttjsloaded');\n      };\n      script.onerror = () => {\n        /**\n         * Fired when vtt.js was not loaded due to an error\n         *\n         * @event Tech#vttjsloaded\n         * @type {Event}\n         */\n        this.trigger('vttjserror');\n      };\n      this.on('dispose', () => {\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  emulateTextTracks() {\n    const tracks = this.textTracks();\n    const remoteTracks = this.remoteTextTracks();\n    const handleAddTrack = e => tracks.addTrack(e.track);\n    const handleRemoveTrack = e => tracks.removeTrack(e.track);\n    remoteTracks.on('addtrack', handleAddTrack);\n    remoteTracks.on('removetrack', handleRemoveTrack);\n    this.addWebVttScript_();\n    const updateDisplay = () => this.trigger('texttrackchange');\n    const textTracksChanges = () => {\n      updateDisplay();\n      for (let i = 0; i < tracks.length; i++) {\n        const track = tracks[i];\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 (let i = 0; i < tracks.length; i++) {\n        const track = tracks[i];\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  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  createRemoteTextTrack(options) {\n    const 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  addRemoteTextTrack(options = {}, manualCleanup) {\n    const 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(() => this.autoRemoteTextTracks_.addTrack(htmlTrackElement.track));\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  removeRemoteTextTrack(track) {\n    const 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  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  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  disablePictureInPicture() {\n    return true;\n  }\n\n  /**\n   * A method to set or unset the 'disablePictureInPicture' <video> property.\n   *\n   * @abstract\n   */\n  setDisablePictureInPicture() {}\n\n  /**\n   * A fallback implementation of requestVideoFrameCallback using requestAnimationFrame\n   *\n   * @param {function} cb\n   * @return {number} request id\n   */\n  requestVideoFrameCallback(cb) {\n    const id = newGUID();\n    if (!this.isReady_ || this.paused()) {\n      this.queuedHanders_.add(id);\n      this.one('playing', () => {\n        if (this.queuedHanders_.has(id)) {\n          this.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  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  setPoster() {}\n\n  /**\n   * A method to check for the presence of the 'playsinline' <video> attribute.\n   *\n   * @abstract\n   */\n  playsinline() {}\n\n  /**\n   * A method to set or unset the 'playsinline' <video> attribute.\n   *\n   * @abstract\n   */\n  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  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  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  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  static 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  static 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  static 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  static registerTech(name, tech) {\n    if (!Tech.techs_) {\n      Tech.techs_ = {};\n    }\n    if (!Tech.isTech(tech)) {\n      throw new Error(`Tech ${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  static 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 ${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\n/**\n * Get the {@link VideoTrackList}\n *\n * @returns {VideoTrackList}\n * @method Tech.prototype.videoTracks\n */\n\n/**\n * Get the {@link AudioTrackList}\n *\n * @returns {AudioTrackList}\n * @method Tech.prototype.audioTracks\n */\n\n/**\n * Get the {@link TextTrackList}\n *\n * @returns {TextTrackList}\n * @method Tech.prototype.textTracks\n */\n\n/**\n * Get the remote element {@link TextTrackList}\n *\n * @returns {TextTrackList}\n * @method Tech.prototype.remoteTextTracks\n */\n\n/**\n * Get the remote element {@link HtmlTrackElementList}\n *\n * @returns {HtmlTrackElementList}\n * @method Tech.prototype.remoteTextTrackEls\n */\n\nALL.names.forEach(function (name) {\n  const 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    let 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    const handlers = _Tech.sourceHandlers || [];\n    let can;\n    for (let i = 0; i < handlers.length; i++) {\n      can = handlers[i].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    const handlers = _Tech.sourceHandlers || [];\n    let can;\n    for (let i = 0; i < handlers.length; i++) {\n      can = handlers[i].canHandleSource(source, options);\n      if (can) {\n        return handlers[i];\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    const 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  const 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    const 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    let 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 */\n\n/** @import Player from '../player' */\n/** @import Tech from '../tech/tech' */\n\nconst middlewares = {};\nconst middlewareInstances = {};\nconst 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 {Player} 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  {Player} 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(() => setSourceHelper(src, middlewares[src.type], next, player), 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 {Tech} tech\n *        A Video.js tech.\n */\nfunction setTech(middleware, tech) {\n  middleware.forEach(mw => mw.setTech && mw.setTech(tech));\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  {Tech} 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  {Tech} 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  {Tech} 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, arg = null) {\n  const callMethod = 'call' + toTitleCase$1(method);\n  const middlewareValue = middleware.reduce(middlewareIterator(callMethod), arg);\n  const 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  const 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 */\nconst 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 */\nconst 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 */\nconst allowedMediators = {\n  play: 1,\n  pause: 1\n};\nfunction middlewareIterator(method) {\n  return (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 (let i = mws.length - 1; i >= 0; i--) {\n    const mw = mws[i];\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  {Player} player\n *         A {@link Player} instance.\n */\nfunction clearCacheForPlayer(player) {\n  if (middlewareInstances.hasOwnProperty(player.id())) {\n    delete middlewareInstances[player.id()];\n  }\n}\n\n/**\n * {\n *  [playerId]: [[mwFactory, mwInstance], ...]\n * }\n *\n * @private\n */\nfunction getOrCreateFactory(player, mwFactory) {\n  const mws = middlewareInstances[player.id()];\n  let mw = null;\n  if (mws === undefined || mws === null) {\n    mw = mwFactory(player);\n    middlewareInstances[player.id()] = [[mwFactory, mw]];\n    return mw;\n  }\n  for (let i = 0; i < mws.length; i++) {\n    const [mwf, mwi] = mws[i];\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(src = {}, middleware = [], next, player, acc = [], lastRun = false) {\n  const [mwFactory, ...mwrest] = middleware;\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    const 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/** @import Player from '../player' */\n\n/**\n * Mimetypes\n *\n * @see https://www.iana.org/assignments/media-types/media-types.xhtml\n * @typedef Mimetypes~Kind\n * @enum\n */\nconst 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 */\nconst getMimetype = function (src = '') {\n  const ext = getFileExtension(src);\n  const 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 {Player} 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 */\nconst 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  const matchingSources = player.cache_.sources.filter(s => s.src === src);\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  const sources = player.$$('source');\n  for (let i = 0; i < sources.length; i++) {\n    const s = sources[i];\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 */\nconst filterSource = function (src) {\n  // traverse array\n  if (Array.isArray(src)) {\n    let 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\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    const mimetype = getMimetype(src.src);\n    if (mimetype) {\n      src.type = mimetype;\n    }\n  }\n  return src;\n}\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 1200 1227\\\" id=\\\"vjs-icon-twitter\\\">\\n      <path d=\\\"M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z\\\"/>\\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\n// Determine the keycode for the 'back' key based on the platform\nconst backKeyCode = IS_TIZEN ? 10009 : IS_WEBOS ? 461 : 8;\nconst SpatialNavKeyCodes = {\n  codes: {\n    play: 415,\n    pause: 19,\n    ff: 417,\n    rw: 412,\n    back: backKeyCode\n  },\n  names: {\n    415: 'play',\n    19: 'pause',\n    417: 'ff',\n    412: 'rw',\n    [backKeyCode]: 'back'\n  },\n  isEventKey(event, keyName) {\n    keyName = keyName.toLowerCase();\n    if (this.names[event.keyCode] && this.names[event.keyCode] === keyName) {\n      return true;\n    }\n    return false;\n  },\n  getEventName(event) {\n    if (this.names[event.keyCode]) {\n      return this.names[event.keyCode];\n    } else if (this.codes[event.code]) {\n      const code = this.codes[event.code];\n      return this.names[code];\n    }\n    return null;\n  }\n};\n\n/**\n * @file spatial-navigation.js\n */\n\n/** @import Component from './component' */\n/** @import Player from './player' */\n\n// The number of seconds the `step*` functions move the timeline.\nconst STEP_SECONDS$1 = 5;\n\n/**\n * Spatial Navigation in Video.js enhances user experience and accessibility on smartTV devices,\n * enabling seamless navigation through interactive elements within the player using remote control arrow keys.\n * This functionality allows users to effortlessly navigate through focusable components.\n *\n * @extends EventTarget\n */\nclass SpatialNavigation extends EventTarget$2 {\n  /**\n   * Constructs a SpatialNavigation instance with initial settings.\n   * Sets up the player instance, and prepares the spatial navigation system.\n   *\n   * @class\n   * @param {Player} player - The Video.js player instance to which the spatial navigation is attached.\n   */\n  constructor(player) {\n    super();\n    this.player_ = player;\n    this.focusableComponents = [];\n    this.isListening_ = false;\n    this.isPaused_ = false;\n    this.onKeyDown_ = this.onKeyDown_.bind(this);\n    this.lastFocusedComponent_ = null;\n  }\n\n  /**\n   * Starts the spatial navigation by adding a keydown event listener to the video container.\n   * This method ensures that the event listener is added only once.\n   */\n  start() {\n    // If the listener is already active, exit early.\n    if (this.isListening_) {\n      return;\n    }\n\n    // Add the event listener since the listener is not yet active.\n    this.player_.on('keydown', this.onKeyDown_);\n    this.player_.on('modalKeydown', this.onKeyDown_);\n    // Listen for source change events\n    this.player_.on('loadedmetadata', () => {\n      this.focus(this.updateFocusableComponents()[0]);\n    });\n    this.player_.on('modalclose', () => {\n      this.refocusComponent();\n    });\n    this.player_.on('focusin', this.handlePlayerFocus_.bind(this));\n    this.player_.on('focusout', this.handlePlayerBlur_.bind(this));\n    this.isListening_ = true;\n    if (this.player_.errorDisplay) {\n      this.player_.errorDisplay.on('aftermodalfill', () => {\n        this.updateFocusableComponents();\n        if (this.focusableComponents.length) {\n          // The modal has focusable components:\n\n          if (this.focusableComponents.length > 1) {\n            // The modal has close button + some additional buttons.\n            // Focusing first additional button:\n\n            this.focusableComponents[1].focus();\n          } else {\n            // The modal has only close button,\n            // Focusing it:\n\n            this.focusableComponents[0].focus();\n          }\n        }\n      });\n    }\n  }\n\n  /**\n   * Stops the spatial navigation by removing the keydown event listener from the video container.\n   * Also sets the `isListening_` flag to false.\n   */\n  stop() {\n    this.player_.off('keydown', this.onKeyDown_);\n    this.isListening_ = false;\n  }\n\n  /**\n   * Responds to keydown events for spatial navigation and media control.\n   *\n   * Determines if spatial navigation or media control is active and handles key inputs accordingly.\n   *\n   * @param {KeyboardEvent} event - The keydown event to be handled.\n   */\n  onKeyDown_(event) {\n    // Determine if the event is a custom modalKeydown event\n    const actualEvent = event.originalEvent ? event.originalEvent : event;\n    if (['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown'].includes(actualEvent.key)) {\n      // Handle directional navigation\n      if (this.isPaused_) {\n        return;\n      }\n      actualEvent.preventDefault();\n\n      // \"ArrowLeft\" => \"left\" etc\n      const direction = actualEvent.key.substring(5).toLowerCase();\n      this.move(direction);\n    } else if (SpatialNavKeyCodes.isEventKey(actualEvent, 'play') || SpatialNavKeyCodes.isEventKey(actualEvent, 'pause') || SpatialNavKeyCodes.isEventKey(actualEvent, 'ff') || SpatialNavKeyCodes.isEventKey(actualEvent, 'rw')) {\n      // Handle media actions\n      actualEvent.preventDefault();\n      const action = SpatialNavKeyCodes.getEventName(actualEvent);\n      this.performMediaAction_(action);\n    } else if (SpatialNavKeyCodes.isEventKey(actualEvent, 'Back') && event.target && typeof event.target.closeable === 'function' && event.target.closeable()) {\n      actualEvent.preventDefault();\n      event.target.close();\n    }\n  }\n\n  /**\n   * Performs media control actions based on the given key input.\n   *\n   * Controls the playback and seeking functionalities of the media player.\n   *\n   * @param {string} key - The key representing the media action to be performed.\n   *   Accepted keys: 'play', 'pause', 'ff' (fast-forward), 'rw' (rewind).\n   */\n  performMediaAction_(key) {\n    if (this.player_) {\n      switch (key) {\n        case 'play':\n          if (this.player_.paused()) {\n            this.player_.play();\n          }\n          break;\n        case 'pause':\n          if (!this.player_.paused()) {\n            this.player_.pause();\n          }\n          break;\n        case 'ff':\n          this.userSeek_(this.player_.currentTime() + STEP_SECONDS$1);\n          break;\n        case 'rw':\n          this.userSeek_(this.player_.currentTime() - STEP_SECONDS$1);\n          break;\n      }\n    }\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  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   * Pauses the spatial navigation functionality.\n   * This method sets a flag that can be used to temporarily disable the navigation logic.\n   */\n  pause() {\n    this.isPaused_ = true;\n  }\n\n  /**\n   * Resumes the spatial navigation functionality if it has been paused.\n   * This method resets the pause flag, re-enabling the navigation logic.\n   */\n  resume() {\n    this.isPaused_ = false;\n  }\n\n  /**\n   * Handles Player Blur.\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   * Calls for handling of the Player Blur if:\n   * *The next focused element is not a child of current focused element &\n   * The next focused element is not a child of the Player.\n   * *There is no next focused element\n   */\n  handlePlayerBlur_(event) {\n    const nextFocusedElement = event.relatedTarget;\n    let isChildrenOfPlayer = null;\n    const currentComponent = this.getCurrentComponent(event.target);\n    if (nextFocusedElement) {\n      isChildrenOfPlayer = Boolean(nextFocusedElement.closest('.video-js'));\n\n      // If nextFocusedElement is the 'TextTrackSettings' component\n      if (nextFocusedElement.classList.contains('vjs-text-track-settings') && !this.isPaused_) {\n        this.searchForTrackSelect_();\n      }\n    }\n    if (!event.currentTarget.contains(event.relatedTarget) && !isChildrenOfPlayer || !nextFocusedElement) {\n      if (currentComponent && currentComponent.name() === 'CloseButton') {\n        this.refocusComponent();\n      } else {\n        this.pause();\n        if (currentComponent && currentComponent.el()) {\n          // Store last focused component\n          this.lastFocusedComponent_ = currentComponent;\n        }\n      }\n    }\n  }\n\n  /**\n   * Handles the Player focus event.\n   *\n   * Calls for handling of the Player Focus if current element is focusable.\n   */\n  handlePlayerFocus_() {\n    if (this.getCurrentComponent() && this.getCurrentComponent().getIsFocusable()) {\n      this.resume();\n    }\n  }\n\n  /**\n   * Gets a set of focusable components.\n   *\n   * @return {Array}\n   *         Returns an array of focusable components.\n   */\n  updateFocusableComponents() {\n    const player = this.player_;\n    const focusableComponents = [];\n\n    /**\n     * Searches for children candidates.\n     *\n     * Pushes Components to array of 'focusableComponents'.\n     * Calls itself if there is children elements inside iterated component.\n     *\n     * @param {Array} componentsArray - The array of components to search for focusable children.\n     */\n    function searchForChildrenCandidates(componentsArray) {\n      for (const i of componentsArray) {\n        if (i.hasOwnProperty('el_') && i.getIsFocusable() && i.getIsAvailableToBeFocused(i.el())) {\n          focusableComponents.push(i);\n        }\n        if (i.hasOwnProperty('children_') && i.children_.length > 0) {\n          searchForChildrenCandidates(i.children_);\n        }\n      }\n    }\n\n    // Iterate inside all children components of the player.\n    player.children_.forEach(value => {\n      if (value.hasOwnProperty('el_')) {\n        // If component has required functions 'getIsFocusable' & 'getIsAvailableToBeFocused', is focusable & available to be focused.\n        if (value.getIsFocusable && value.getIsAvailableToBeFocused && value.getIsFocusable() && value.getIsAvailableToBeFocused(value.el())) {\n          focusableComponents.push(value);\n          return;\n          // If component has posible children components as candidates.\n        } else if (value.hasOwnProperty('children_') && value.children_.length > 0) {\n          searchForChildrenCandidates(value.children_);\n          // If component has posible item components as candidates.\n        } else if (value.hasOwnProperty('items') && value.items.length > 0) {\n          searchForChildrenCandidates(value.items);\n          // If there is a suitable child element within the component's DOM element.\n        } else if (this.findSuitableDOMChild(value)) {\n          focusableComponents.push(value);\n        }\n      }\n\n      // TODO - Refactor the following logic after refactor of videojs-errors elements to be components is done.\n      if (value.name_ === 'ErrorDisplay' && value.opened_) {\n        const buttonContainer = value.el_.querySelector('.vjs-errors-ok-button-container');\n        if (buttonContainer) {\n          const modalButtons = buttonContainer.querySelectorAll('button');\n          modalButtons.forEach((element, index) => {\n            // Add elements as objects to be handled by the spatial navigation\n            focusableComponents.push({\n              name: () => {\n                return 'ModalButton' + (index + 1);\n              },\n              el: () => element,\n              getPositions: () => {\n                const rect = element.getBoundingClientRect();\n\n                // Creating objects that mirror DOMRectReadOnly for boundingClientRect and center\n                const boundingClientRect = {\n                  x: rect.x,\n                  y: rect.y,\n                  width: rect.width,\n                  height: rect.height,\n                  top: rect.top,\n                  right: rect.right,\n                  bottom: rect.bottom,\n                  left: rect.left\n                };\n\n                // Calculating the center position\n                const center = {\n                  x: rect.left + rect.width / 2,\n                  y: rect.top + rect.height / 2,\n                  width: 0,\n                  height: 0,\n                  top: rect.top + rect.height / 2,\n                  right: rect.left + rect.width / 2,\n                  bottom: rect.top + rect.height / 2,\n                  left: rect.left + rect.width / 2\n                };\n                return {\n                  boundingClientRect,\n                  center\n                };\n              },\n              // Asume that the following are always focusable\n              getIsAvailableToBeFocused: () => true,\n              getIsFocusable: el => true,\n              focus: () => element.focus()\n            });\n          });\n        }\n      }\n    });\n    this.focusableComponents = focusableComponents;\n    return this.focusableComponents;\n  }\n\n  /**\n   * Finds a suitable child element within the provided component's DOM element.\n   *\n   * @param {Object} component - The component containing the DOM element to search within.\n   * @return {HTMLElement|null} Returns the suitable child element if found, or null if not found.\n   */\n  findSuitableDOMChild(component) {\n    /**\n     * Recursively searches for a suitable child node that can be focused within a given component.\n     * It first checks if the provided node itself can be focused according to the component's\n     * `getIsFocusable` and `getIsAvailableToBeFocused` methods. If not, it recursively searches\n     * through the node's children to find a suitable child node that meets the focusability criteria.\n     *\n     * @param {HTMLElement} node - The DOM node to start the search from.\n     * @return {HTMLElement|null} The first child node that is focusable and available to be focused,\n     * or `null` if no suitable child is found.\n     */\n    function searchForSuitableChild(node) {\n      if (component.getIsFocusable(node) && component.getIsAvailableToBeFocused(node)) {\n        return node;\n      }\n      for (let i = 0; i < node.children.length; i++) {\n        const child = node.children[i];\n        const suitableChild = searchForSuitableChild(child);\n        if (suitableChild) {\n          return suitableChild;\n        }\n      }\n      return null;\n    }\n    if (component.el()) {\n      return searchForSuitableChild(component.el());\n    }\n    return null;\n  }\n\n  /**\n   * Gets the currently focused component from the list of focusable components.\n   * If a target element is provided, it uses that element to find the corresponding\n   * component. If no target is provided, it defaults to using the document's currently\n   * active element.\n   *\n   * @param {HTMLElement} [target] - The DOM element to check against the focusable components.\n   *                                 If not provided, `document.activeElement` is used.\n   * @return {Component|null} - Returns the focused component if found among the focusable components,\n   *                            otherwise returns null if no matching component is found.\n   */\n  getCurrentComponent(target) {\n    this.updateFocusableComponents();\n    // eslint-disable-next-line\n    const curComp = target || document.activeElement;\n    if (this.focusableComponents.length) {\n      for (const i of this.focusableComponents) {\n        // If component Node is equal to the current active element.\n        if (i.el() === curComp) {\n          return i;\n        }\n      }\n    }\n  }\n\n  /**\n   * Adds a component to the array of focusable components.\n   *\n   * @param {Component} component\n   *        The `Component` to be added.\n   */\n  add(component) {\n    const focusableComponents = [...this.focusableComponents];\n    if (component.hasOwnProperty('el_') && component.getIsFocusable() && component.getIsAvailableToBeFocused(component.el())) {\n      focusableComponents.push(component);\n    }\n    this.focusableComponents = focusableComponents;\n    // Trigger the notification manually\n    this.trigger({\n      type: 'focusableComponentsChanged',\n      focusableComponents: this.focusableComponents\n    });\n  }\n\n  /**\n   * Removes component from the array of focusable components.\n   *\n   * @param {Component} component - The component to be removed from the focusable components array.\n   */\n  remove(component) {\n    for (let i = 0; i < this.focusableComponents.length; i++) {\n      if (this.focusableComponents[i].name() === component.name()) {\n        this.focusableComponents.splice(i, 1);\n        // Trigger the notification manually\n        this.trigger({\n          type: 'focusableComponentsChanged',\n          focusableComponents: this.focusableComponents\n        });\n        return;\n      }\n    }\n  }\n\n  /**\n   * Clears array of focusable components.\n   */\n  clear() {\n    // Check if the array is already empty to avoid unnecessary event triggering\n    if (this.focusableComponents.length > 0) {\n      // Clear the array\n      this.focusableComponents = [];\n\n      // Trigger the notification manually\n      this.trigger({\n        type: 'focusableComponentsChanged',\n        focusableComponents: this.focusableComponents\n      });\n    }\n  }\n\n  /**\n   * Navigates to the next focusable component based on the specified direction.\n   *\n   * @param {string} direction 'up', 'down', 'left', 'right'\n   */\n  move(direction) {\n    const currentFocusedComponent = this.getCurrentComponent();\n    if (!currentFocusedComponent) {\n      return;\n    }\n    const currentPositions = currentFocusedComponent.getPositions();\n    const candidates = this.focusableComponents.filter(component => component !== currentFocusedComponent && this.isInDirection_(currentPositions.boundingClientRect, component.getPositions().boundingClientRect, direction));\n    const bestCandidate = this.findBestCandidate_(currentPositions.center, candidates, direction);\n    if (bestCandidate) {\n      this.focus(bestCandidate);\n    } else {\n      this.trigger({\n        type: 'endOfFocusableComponents',\n        direction,\n        focusedComponent: currentFocusedComponent\n      });\n    }\n  }\n\n  /**\n   * Finds the best candidate on the current center position,\n   * the list of candidates, and the specified navigation direction.\n   *\n   * @param {Object} currentCenter The center position of the current focused component element.\n   * @param {Array} candidates An array of candidate components to receive focus.\n   * @param {string} direction The direction of navigation ('up', 'down', 'left', 'right').\n   * @return {Object|null} The component that is the best candidate for receiving focus.\n   */\n  findBestCandidate_(currentCenter, candidates, direction) {\n    let minDistance = Infinity;\n    let bestCandidate = null;\n    for (const candidate of candidates) {\n      const candidateCenter = candidate.getPositions().center;\n      const distance = this.calculateDistance_(currentCenter, candidateCenter, direction);\n      if (distance < minDistance) {\n        minDistance = distance;\n        bestCandidate = candidate;\n      }\n    }\n    return bestCandidate;\n  }\n\n  /**\n   * Determines if a target rectangle is in the specified navigation direction\n   * relative to a source rectangle.\n   *\n   * @param {Object} srcRect The bounding rectangle of the source element.\n   * @param {Object} targetRect The bounding rectangle of the target element.\n   * @param {string} direction The navigation direction ('up', 'down', 'left', 'right').\n   * @return {boolean} True if the target is in the specified direction relative to the source.\n   */\n  isInDirection_(srcRect, targetRect, direction) {\n    switch (direction) {\n      case 'right':\n        return targetRect.left >= srcRect.right;\n      case 'left':\n        return targetRect.right <= srcRect.left;\n      case 'down':\n        return targetRect.top >= srcRect.bottom;\n      case 'up':\n        return targetRect.bottom <= srcRect.top;\n      default:\n        return false;\n    }\n  }\n\n  /**\n   * Focus the last focused component saved before blur on player.\n   */\n  refocusComponent() {\n    if (this.lastFocusedComponent_) {\n      // If user is not active, set it to active.\n      if (!this.player_.userActive()) {\n        this.player_.userActive(true);\n      }\n      this.updateFocusableComponents();\n\n      // Search inside array of 'focusableComponents' for a match of name of\n      // the last focused component.\n      for (let i = 0; i < this.focusableComponents.length; i++) {\n        if (this.focusableComponents[i].name() === this.lastFocusedComponent_.name()) {\n          this.focus(this.focusableComponents[i]);\n          return;\n        }\n      }\n    } else {\n      this.focus(this.updateFocusableComponents()[0]);\n    }\n  }\n\n  /**\n   * Focuses on a given component.\n   * If the component is available to be focused, it focuses on the component.\n   * If not, it attempts to find a suitable DOM child within the component and focuses on it.\n   *\n   * @param {Component} component - The component to be focused.\n   */\n  focus(component) {\n    if (typeof component !== 'object') {\n      return;\n    }\n    if (component.getIsAvailableToBeFocused(component.el())) {\n      component.focus();\n    } else if (this.findSuitableDOMChild(component)) {\n      this.findSuitableDOMChild(component).focus();\n    }\n  }\n\n  /**\n   * Calculates the distance between two points, adjusting the calculation based on\n   * the specified navigation direction.\n   *\n   * @param {Object} center1 The center point of the first element.\n   * @param {Object} center2 The center point of the second element.\n   * @param {string} direction The direction of navigation ('up', 'down', 'left', 'right').\n   * @return {number} The calculated distance between the two centers.\n   */\n  calculateDistance_(center1, center2, direction) {\n    const dx = Math.abs(center1.x - center2.x);\n    const dy = Math.abs(center1.y - center2.y);\n    let distance;\n    switch (direction) {\n      case 'right':\n      case 'left':\n        // Higher weight for vertical distance in horizontal navigation.\n        distance = dx + dy * 100;\n        break;\n      case 'up':\n        // Strongly prioritize vertical proximity for UP navigation.\n        // Adjust the weight to ensure that elements directly above are favored.\n        distance = dy * 2 + dx * 0.5;\n        break;\n      case 'down':\n        // More balanced weight for vertical and horizontal distances.\n        // Adjust the weights here to find the best balance.\n        distance = dy * 5 + dx;\n        break;\n      default:\n        distance = dx + dy;\n    }\n    return distance;\n  }\n\n  /**\n   * This gets called by 'handlePlayerBlur_' if 'spatialNavigation' is enabled.\n   * Searches for the first 'TextTrackSelect' inside of modal to focus.\n   *\n   * @private\n   */\n  searchForTrackSelect_() {\n    const spatialNavigation = this;\n    for (const component of spatialNavigation.updateFocusableComponents()) {\n      if (component.constructor.name === 'TextTrackSelect') {\n        spatialNavigation.focus(component);\n        break;\n      }\n    }\n  }\n}\n\n/**\n * @file loader.js\n */\n\n/** @import Player from '../player' */\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 */\nclass MediaLoader extends Component$1 {\n  /**\n   * Create an instance of this class.\n   *\n   * @param {Player} 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  constructor(player, options, ready) {\n    // MediaLoader has no element\n    const options_ = merge$1({\n      createEl: false\n    }, options);\n    super(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 (let i = 0, j = options.playerOptions.techOrder; i < j.length; i++) {\n        const techName = toTitleCase$1(j[i]);\n        let 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  }\n}\nComponent$1.registerComponent('MediaLoader', MediaLoader);\n\n/**\n * @file clickable-component.js\n */\n\n/** @import Player from './player' */\n\n/**\n * Component which is clickable or keyboard actionable, but is not a\n * native HTML button.\n *\n * @extends Component\n */\nclass ClickableComponent extends Component$1 {\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 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  constructor(player, options) {\n    super(player, options);\n    if (this.options_.controlText) {\n      this.controlText(this.options_.controlText);\n    }\n    this.handleMouseOver_ = e => this.handleMouseOver(e);\n    this.handleMouseOut_ = e => this.handleMouseOut(e);\n    this.handleClick_ = e => this.handleClick(e);\n    this.handleKeyDown_ = e => this.handleKeyDown(e);\n    this.emitTapEvents();\n    this.enable();\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  createEl(tag = 'div', props = {}, attributes = {}) {\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 ${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    const 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  dispose() {\n    // remove controlTextEl_ on dispose\n    this.controlTextEl_ = null;\n    super.dispose();\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  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  controlText(text, el = this.el()) {\n    if (text === undefined) {\n      return this.controlText_ || 'Need Text';\n    }\n    const 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  buildCSSClass() {\n    return `vjs-control vjs-button ${super.buildCSSClass()}`;\n  }\n\n  /**\n   * Enable this `ClickableComponent`\n   */\n  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  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  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  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  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 (event.key === ' ' || event.key === 'Enter') {\n      event.preventDefault();\n      event.stopPropagation();\n      this.trigger('click');\n    } else {\n      // Pass keypress handling up for unsupported keys\n      super.handleKeyDown(event);\n    }\n  }\n}\nComponent$1.registerComponent('ClickableComponent', ClickableComponent);\n\n/**\n * @file poster-image.js\n */\n\n/** @import Player from './player' */\n\n/**\n * A `ClickableComponent` that handles showing the poster image for the player.\n *\n * @extends ClickableComponent\n */\nclass PosterImage extends ClickableComponent {\n  /**\n   * Create an instance of this class.\n   *\n   * @param {Player} 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  constructor(player, options) {\n    super(player, options);\n    this.update();\n    this.update_ = e => this.update(e);\n    player.on('posterchange', this.update_);\n  }\n\n  /**\n   * Clean up and dispose of the `PosterImage`.\n   */\n  dispose() {\n    this.player().off('posterchange', this.update_);\n    super.dispose();\n  }\n\n  /**\n   * Create the `PosterImage`s DOM element.\n   *\n   * @return {Element}\n   *         The element that gets created.\n   */\n  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  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 \"${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  update(event) {\n    const 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  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  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\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 */\n\n/** @import Player from '../player' */\n\nconst darkGray = '#222';\nconst lightGray = '#ccc';\nconst 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  let 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 ? `${position}px` : '';\n}\n\n/**\n * The component for displaying text track cues.\n *\n * @extends Component\n */\nclass TextTrackDisplay extends Component$1 {\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   * @param {Function} [ready]\n   *        The function to call when `TextTrackDisplay` is ready.\n   */\n  constructor(player, options, ready) {\n    super(player, options, ready);\n    const updateDisplayTextHandler = e => this.updateDisplay(e);\n    const updateDisplayHandler = e => {\n      this.updateDisplayOverlay();\n      this.updateDisplay(e);\n    };\n    player.on('loadstart', e => this.toggleDisplay(e));\n    player.on('texttrackchange', updateDisplayTextHandler);\n    player.on('loadedmetadata', e => {\n      this.updateDisplayOverlay();\n      this.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_(this, 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      const screenOrientation = window$1.screen.orientation || window$1;\n      const changeOrientationEvent = window$1.screen.orientation ? 'change' : 'orientationchange';\n      screenOrientation.addEventListener(changeOrientationEvent, updateDisplayHandler);\n      player.on('dispose', () => screenOrientation.removeEventListener(changeOrientationEvent, updateDisplayHandler));\n      const tracks = this.options_.playerOptions.tracks || [];\n      for (let i = 0; i < tracks.length; i++) {\n        this.player_.addRemoteTextTrack(tracks[i], true);\n      }\n      this.preselectTrack();\n    }));\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  preselectTrack() {\n    const modes = {\n      captions: 1,\n      subtitles: 1\n    };\n    const trackList = this.player_.textTracks();\n    const userPref = this.player_.cache_.selectedLanguage;\n    let firstDesc;\n    let firstCaptions;\n    let preferredTrack;\n    for (let i = 0; i < trackList.length; i++) {\n      const track = trackList[i];\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  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  createEl() {\n    return super.createEl('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  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  updateDisplay() {\n    const tracks = this.player_.textTracks();\n    const allowMultipleShowingTracks = this.options_.allowMultipleShowingTracks;\n    this.clearDisplay();\n    if (allowMultipleShowingTracks) {\n      const showingTracks = [];\n      for (let i = 0; i < tracks.length; ++i) {\n        const track = tracks[i];\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    let descriptionsTrack = null;\n    let captionsSubtitlesTrack = null;\n    let i = tracks.length;\n    while (i--) {\n      const 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    if (!window$1.CSS.supports('inset', '10px')) {\n      const textTrackDisplay = this.el_;\n      const vjsTextTrackCues = textTrackDisplay.querySelectorAll('.vjs-text-track-cue');\n      const controlBarHeight = this.player_.controlBar.el_.getBoundingClientRect().height;\n      const playerHeight = this.player_.el_.getBoundingClientRect().height;\n\n      // Clear inline style before getting actual height of textTrackDisplay\n      textTrackDisplay.style = '';\n\n      // textrack style updates, this styles are required to be inline\n      tryUpdateStyle(textTrackDisplay, 'position', 'relative');\n      tryUpdateStyle(textTrackDisplay, 'height', playerHeight - controlBarHeight + 'px');\n      tryUpdateStyle(textTrackDisplay, 'top', 'unset');\n      if (IS_SMART_TV) {\n        tryUpdateStyle(textTrackDisplay, 'bottom', playerHeight + 'px');\n      } else {\n        tryUpdateStyle(textTrackDisplay, 'bottom', '0px');\n      }\n\n      // vjsTextTrackCue style updates\n      if (vjsTextTrackCues.length > 0) {\n        vjsTextTrackCues.forEach(vjsTextTrackCue => {\n          // verify if inset styles are inline\n          if (vjsTextTrackCue.style.inset) {\n            const insetStyles = vjsTextTrackCue.style.inset.split(' ');\n\n            // expected value is always 3\n            if (insetStyles.length === 3) {\n              Object.assign(vjsTextTrackCue.style, {\n                top: insetStyles[0],\n                right: insetStyles[1],\n                bottom: insetStyles[2],\n                left: 'unset'\n              });\n            }\n          }\n        });\n      }\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  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    const playerWidth = this.player_.currentWidth();\n    const playerHeight = this.player_.currentHeight();\n    const playerAspectRatio = playerWidth / playerHeight;\n    const videoAspectRatio = this.player_.videoWidth() / this.player_.videoHeight();\n    let insetInlineMatch = 0;\n    let 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  updateDisplayState(track) {\n    const overrides = this.player_.textTrackSettings.getValues();\n    const cues = track.activeCues;\n    let i = cues.length;\n    while (i--) {\n      const cue = cues[i];\n      if (!cue) {\n        continue;\n      }\n      const 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 ${darkGray}, 2px 2px 4px ${darkGray}, 2px 2px 5px ${darkGray}`;\n        } else if (overrides.edgeStyle === 'raised') {\n          cueDiv.firstChild.style.textShadow = `1px 1px ${darkGray}, 2px 2px ${darkGray}, 3px 3px ${darkGray}`;\n        } else if (overrides.edgeStyle === 'depressed') {\n          cueDiv.firstChild.style.textShadow = `1px 1px ${lightGray}, 0 1px ${lightGray}, -1px -1px ${darkGray}, 0 -1px ${darkGray}`;\n        } else if (overrides.edgeStyle === 'uniform') {\n          cueDiv.firstChild.style.textShadow = `0 0 4px ${darkGray}, 0 0 4px ${darkGray}, 0 0 4px ${darkGray}, 0 0 4px ${darkGray}`;\n        }\n      }\n      if (overrides.fontPercent && overrides.fontPercent !== 1) {\n        const 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  updateForTrack(tracks) {\n    if (!Array.isArray(tracks)) {\n      tracks = [tracks];\n    }\n    if (typeof window$1.WebVTT !== 'function' || tracks.every(track => {\n      return !track.activeCues;\n    })) {\n      return;\n    }\n    const cues = [];\n\n    // push all active track cues\n    for (let i = 0; i < tracks.length; ++i) {\n      const track = tracks[i];\n      for (let 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 (let i = 0; i < tracks.length; ++i) {\n      const track = tracks[i];\n      for (let j = 0; j < track.activeCues.length; ++j) {\n        const cueEl = track.activeCues[j].displayState;\n        addClass(cueEl, 'vjs-text-track-cue', 'vjs-text-track-cue-' + (track.language ? track.language : i));\n        if (track.language) {\n          setAttribute(cueEl, 'lang', track.language);\n        }\n      }\n      if (this.player_.textTrackSettings) {\n        this.updateDisplayState(track);\n      }\n    }\n  }\n}\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 */\nclass LoadingSpinner extends Component$1 {\n  /**\n   * Create the `LoadingSpinner`s DOM element.\n   *\n   * @return {Element}\n   *         The dom element that gets created.\n   */\n  createEl() {\n    const isAudio = this.player_.isAudio();\n    const playerType = this.localize(isAudio ? 'Audio Player' : 'Video Player');\n    const controlText = createEl('span', {\n      className: 'vjs-control-text',\n      textContent: this.localize('{1} is loading.', [playerType])\n    });\n    const el = super.createEl('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  handleLanguagechange() {\n    this.$('.vjs-control-text').textContent = this.localize('{1} is loading.', [this.player_.isAudio() ? 'Audio Player' : 'Video Player']);\n  }\n}\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 */\nclass Button extends ClickableComponent {\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  createEl(tag, props = {}, attributes = {}) {\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    const 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  addChild(child, options = {}) {\n    const className = this.constructor.name;\n    log$1.warn(`Adding an actionable (user controllable) child to a Button (${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  enable() {\n    super.enable();\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  disable() {\n    super.disable();\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  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 (event.key === ' ' || event.key === 'Enter') {\n      event.stopPropagation();\n      return;\n    }\n\n    // Pass keypress handling up for unsupported keys\n    super.handleKeyDown(event);\n  }\n}\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 */\nclass BigPlayButton extends Button {\n  constructor(player, options) {\n    super(player, options);\n    this.mouseused_ = false;\n    this.setIcon('play');\n    this.on('mousedown', e => this.handleMouseDown(e));\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  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  handleClick(event) {\n    const 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    const cb = this.player_.getChild('controlBar');\n    const playToggle = cb && cb.getChild('playToggle');\n    if (!playToggle) {\n      this.player_.tech(true).focus();\n      return;\n    }\n    const playFocus = () => playToggle.focus();\n    if (isPromise(playPromise)) {\n      playPromise.then(playFocus, () => {});\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  handleKeyDown(event) {\n    this.mouseused_ = false;\n    super.handleKeyDown(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  handleMouseDown(event) {\n    this.mouseused_ = true;\n  }\n}\n\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/** @import Player from './player' */\n\n/**\n * The `CloseButton` is a `{@link Button}` that fires a `close` event when\n * it gets clicked.\n *\n * @extends Button\n */\nclass CloseButton extends Button {\n  /**\n  * Creates an instance of the 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  constructor(player, options) {\n    super(player, options);\n    this.setIcon('cancel');\n    this.controlText(options && options.controlText || this.localize('Close'));\n  }\n\n  /**\n  * Builds the default DOM `className`.\n  *\n  * @return {string}\n  *         The DOM `className` for this object.\n  */\n  buildCSSClass() {\n    return `vjs-close-button ${super.buildCSSClass()}`;\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  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  handleKeyDown(event) {\n    // Esc button will trigger `click` event\n    if (event.key === 'Escape') {\n      event.preventDefault();\n      event.stopPropagation();\n      this.trigger('click');\n    } else {\n      // Pass keypress handling up for unsupported keys\n      super.handleKeyDown(event);\n    }\n  }\n}\nComponent$1.registerComponent('CloseButton', CloseButton);\n\n/**\n * @file play-toggle.js\n */\n\n/** @import Player from './player' */\n\n/**\n * Button to toggle between play and pause.\n *\n * @extends Button\n */\nclass PlayToggle extends Button {\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  constructor(player, options = {}) {\n    super(player, options);\n\n    // show or hide replay icon\n    options.replay = options.replay === undefined || options.replay;\n    this.setIcon('play');\n    this.on(player, 'play', e => this.handlePlay(e));\n    this.on(player, 'pause', e => this.handlePause(e));\n    if (options.replay) {\n      this.on(player, 'ended', e => this.handleEnded(e));\n    }\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  buildCSSClass() {\n    return `vjs-play-control ${super.buildCSSClass()}`;\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  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  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  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  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  handleEnded(event) {\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', e => this.handleSeeked(e));\n  }\n}\n\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/** @import Player from '../../player' */\n\n/**\n * Displays time information about the video\n *\n * @extends Component\n */\nclass TimeDisplay extends Component$1 {\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  constructor(player, options) {\n    super(player, options);\n    this.on(player, ['timeupdate', 'ended', 'seeking'], e => this.update(e));\n    this.updateTextNode_();\n  }\n\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    const className = this.buildCSSClass();\n    const el = super.createEl('div', {\n      className: `${className} vjs-time-control vjs-control`\n    });\n    const span = createEl('span', {\n      className: 'vjs-control-text',\n      textContent: `${this.localize(this.labelText_)}\\u00a0`\n    }, {\n      role: 'presentation'\n    });\n    el.appendChild(span);\n    this.contentEl_ = createEl('span', {\n      className: `${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  dispose() {\n    this.contentEl_ = null;\n    this.textNode_ = null;\n    super.dispose();\n  }\n\n  /**\n   * Updates the displayed time according to the `updateContent` function which is defined in the child class.\n   *\n   * @param {Event} [event]\n   *          The `timeupdate`, `ended` or `seeking` (if enableSmoothSeeking is true) event that caused this function to be called.\n   */\n  update(event) {\n    if (!this.player_.options_.enableSmoothSeeking && event.type === 'seeking') {\n      return;\n    }\n    this.updateContent(event);\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  updateTextNode_(time = 0) {\n    time = formatTime(time);\n    if (this.formattedTime_ === time) {\n      return;\n    }\n    this.formattedTime_ = time;\n    this.requestNamedAnimationFrame('TimeDisplay#updateTextNode_', () => {\n      if (!this.contentEl_) {\n        return;\n      }\n      let oldNode = this.textNode_;\n      if (oldNode && this.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      this.textNode_ = document$1.createTextNode(this.formattedTime_);\n      if (!this.textNode_) {\n        return;\n      }\n      if (oldNode) {\n        this.contentEl_.replaceChild(this.textNode_, oldNode);\n      } else {\n        this.contentEl_.appendChild(this.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  updateContent(event) {}\n}\n\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 */\nclass CurrentTimeDisplay extends TimeDisplay {\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  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  updateContent(event) {\n    // Allows for smooth scrubbing, when player can't keep up.\n    let 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\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/** @import Player from '../../player' */\n\n/**\n * Displays the duration\n *\n * @extends Component\n */\nclass DurationDisplay extends TimeDisplay {\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  constructor(player, options) {\n    super(player, options);\n    const updateContent = e => this.updateContent(e);\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    this.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    this.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    this.on(player, 'loadedmetadata', updateContent);\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  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  updateContent(event) {\n    const duration = this.player_.duration();\n    this.updateTextNode_(duration);\n  }\n}\n\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 */\nclass TimeDivider extends Component$1 {\n  /**\n   * Create the component's DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    const el = super.createEl('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    const div = super.createEl('div');\n    const span = super.createEl('span', {\n      textContent: '/'\n    });\n    div.appendChild(span);\n    el.appendChild(div);\n    return el;\n  }\n}\nComponent$1.registerComponent('TimeDivider', TimeDivider);\n\n/**\n * @file remaining-time-display.js\n */\n\n/** @import Player from '../../player' */\n\n/**\n * Displays the time left in the video\n *\n * @extends Component\n */\nclass RemainingTimeDisplay extends TimeDisplay {\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  constructor(player, options) {\n    super(player, options);\n    this.on(player, 'durationchange', e => this.updateContent(e));\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  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  createEl() {\n    const el = super.createEl();\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  updateContent(event) {\n    if (typeof this.player_.duration() !== 'number') {\n      return;\n    }\n    let 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\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/** @import Player from './player' */\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 */\nclass LiveDisplay extends Component$1 {\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  constructor(player, options) {\n    super(player, options);\n    this.updateShowing();\n    this.on(this.player(), 'durationchange', e => this.updateShowing(e));\n  }\n\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    const el = super.createEl('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: `${this.localize('Stream Type')}\\u00a0`\n    }));\n    this.contentEl_.appendChild(document$1.createTextNode(this.localize('LIVE')));\n    el.appendChild(this.contentEl_);\n    return el;\n  }\n  dispose() {\n    this.contentEl_ = null;\n    super.dispose();\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  updateShowing(event) {\n    if (this.player().duration() === Infinity) {\n      this.show();\n    } else {\n      this.hide();\n    }\n  }\n}\nComponent$1.registerComponent('LiveDisplay', LiveDisplay);\n\n/**\n * @file seek-to-live.js\n */\n\n/** @import Player from './player' */\n\n/**\n * Displays the live indicator when duration is Infinity.\n *\n * @extends Component\n */\nclass SeekToLive extends Button {\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  constructor(player, options) {\n    super(player, options);\n    this.updateLiveEdgeStatus();\n    if (this.player_.liveTracker) {\n      this.updateLiveEdgeStatusHandler_ = e => this.updateLiveEdgeStatus(e);\n      this.on(this.player_.liveTracker, 'liveedgechange', this.updateLiveEdgeStatusHandler_);\n    }\n  }\n\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    const el = super.createEl('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  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  handleClick() {\n    this.player_.liveTracker.seekToLiveEdge();\n  }\n\n  /**\n   * Dispose of the element and stop tracking\n   */\n  dispose() {\n    if (this.player_.liveTracker) {\n      this.off(this.player_.liveTracker, 'liveedgechange', this.updateLiveEdgeStatusHandler_);\n    }\n    this.textEl_ = null;\n    super.dispose();\n  }\n}\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}\n\nvar Num = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  clamp: clamp\n});\n\n/**\n * @file slider.js\n */\n\n/** @import Player from '../player' */\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 */\nclass Slider extends Component$1 {\n  /**\n  * Create 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  constructor(player, options) {\n    super(player, options);\n    this.handleMouseDown_ = e => this.handleMouseDown(e);\n    this.handleMouseUp_ = e => this.handleMouseUp(e);\n    this.handleKeyDown_ = e => this.handleKeyDown(e);\n    this.handleClick_ = e => this.handleClick(e);\n    this.handleMouseMove_ = e => this.handleMouseMove(e);\n    this.update_ = e => this.update(e);\n\n    // Set property names to bar to match with the child Slider class is looking for\n    this.bar = this.getChild(this.options_.barName);\n\n    // Set a horizontal or vertical class on the slider depending on the slider type\n    this.vertical(!!this.options_.vertical);\n    this.enable();\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  enabled() {\n    return this.enabled_;\n  }\n\n  /**\n   * Enable controls for this slider if they are disabled\n   */\n  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  disable() {\n    if (!this.enabled()) {\n      return;\n    }\n    const 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  createEl(type, props = {}, attributes = {}) {\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 super.createEl(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  handleMouseDown(event) {\n    const 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  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  handleMouseUp(event) {\n    const 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  update() {\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    const progress = this.getProgress();\n    if (progress === this.progress_) {\n      return progress;\n    }\n    this.progress_ = progress;\n    this.requestNamedAnimationFrame('Slider#update', () => {\n      // Set the new bar width or height\n      const sizeKey = this.vertical() ? 'height' : 'width';\n\n      // Convert to a percentage for css value\n      this.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  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  calculateDistance(event) {\n    const 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  handleKeyDown(event) {\n    const spatialNavOptions = this.options_.playerOptions.spatialNavigation;\n    const spatialNavEnabled = spatialNavOptions && spatialNavOptions.enabled;\n    const horizontalSeek = spatialNavOptions && spatialNavOptions.horizontalSeek;\n    if (spatialNavEnabled) {\n      if (horizontalSeek && event.key === 'ArrowLeft' || !horizontalSeek && event.key === 'ArrowDown') {\n        event.preventDefault();\n        event.stopPropagation();\n        this.stepBack();\n      } else if (horizontalSeek && event.key === 'ArrowRight' || !horizontalSeek && event.key === 'ArrowUp') {\n        event.preventDefault();\n        event.stopPropagation();\n        this.stepForward();\n      } else {\n        super.handleKeyDown(event);\n      }\n\n      // Left and Down Arrows\n    } else if (event.key === 'ArrowLeft' || event.key === 'ArrowDown') {\n      event.preventDefault();\n      event.stopPropagation();\n      this.stepBack();\n\n      // Up and Right Arrows\n    } else if (event.key === 'ArrowUp' || event.key === 'ArrowRight') {\n      event.preventDefault();\n      event.stopPropagation();\n      this.stepForward();\n    } else {\n      // Pass keydown handling up for unsupported keys\n      super.handleKeyDown(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  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  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}\nComponent$1.registerComponent('Slider', Slider);\n\n/**\n * @file load-progress-bar.js\n */\n\n/** @import Player from '../../player' */\n\n// get the percent width of a time compared to the total end\nconst percentify = (time, end) => clamp(time / end * 100, 0, 100).toFixed(2) + '%';\n\n/**\n * Shows loading progress\n *\n * @extends Component\n */\nclass LoadProgressBar extends Component$1 {\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  constructor(player, options) {\n    super(player, options);\n    this.partEls_ = [];\n    this.on(player, 'progress', e => this.update(e));\n  }\n\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    const el = super.createEl('div', {\n      className: 'vjs-load-progress'\n    });\n    const wrapper = createEl('span', {\n      className: 'vjs-control-text'\n    });\n    const loadedText = createEl('span', {\n      textContent: this.localize('Loaded')\n    });\n    const separator = document$1.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  dispose() {\n    this.partEls_ = null;\n    this.percentageEl_ = null;\n    super.dispose();\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  update(event) {\n    this.requestNamedAnimationFrame('LoadProgressBar#update', () => {\n      const liveTracker = this.player_.liveTracker;\n      const buffered = this.player_.buffered();\n      const duration = liveTracker && liveTracker.isLive() ? liveTracker.seekableEnd() : this.player_.duration();\n      const bufferedEnd = this.player_.bufferedEnd();\n      const children = this.partEls_;\n      const percent = percentify(bufferedEnd, duration);\n      if (this.percent_ !== percent) {\n        // update the width of the progress bar\n        this.el_.style.width = percent;\n        // update the control-text\n        textContent(this.percentageEl_, percent);\n        this.percent_ = percent;\n      }\n\n      // add child elements to represent the individual buffered time ranges\n      for (let i = 0; i < buffered.length; i++) {\n        const start = buffered.start(i);\n        const end = buffered.end(i);\n        let part = children[i];\n        if (!part) {\n          part = this.el_.appendChild(createEl());\n          children[i] = 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 (let i = children.length; i > buffered.length; i--) {\n        this.el_.removeChild(children[i - 1]);\n      }\n      children.length = buffered.length;\n    });\n  }\n}\nComponent$1.registerComponent('LoadProgressBar', LoadProgressBar);\n\n/**\n * @file time-tooltip.js\n */\n\n/** @import Player from '../../player' */\n\n/**\n * Time tooltips display a time above the progress bar.\n *\n * @extends Component\n */\nclass TimeTooltip extends Component$1 {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} 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  constructor(player, options) {\n    super(player, options);\n    this.update = throttle(bind_(this, this.update), UPDATE_REFRESH_INTERVAL);\n  }\n\n  /**\n   * Create the time tooltip DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    return super.createEl('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  update(seekBarRect, seekBarPoint, content) {\n    const tooltipRect = findPosition(this.el_);\n    const playerRect = getBoundingClientRect(this.player_.el());\n    const 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    let 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    let spaceRightOfPoint = seekBarRect.width - seekBarPointPx + (playerRect.right - seekBarRect.right);\n\n    // spaceRightOfPoint is always NaN for mouse time display\n    // because the seekbarRect does not have a right property. This causes\n    // the mouse tool tip to be truncated when it's close to the right edge of the player.\n    // In such cases, we ignore the `playerRect.right - seekBarRect.right` value when calculating.\n    // For the sake of consistency, we ignore seekBarRect.left - playerRect.left for the left edge.\n    if (!spaceRightOfPoint) {\n      spaceRightOfPoint = seekBarRect.width - seekBarPointPx;\n      spaceLeftOfPoint = seekBarPointPx;\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    let 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 = `-${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  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  updateTime(seekBarRect, seekBarPoint, time, cb) {\n    this.requestNamedAnimationFrame('TimeTooltip#updateTime', () => {\n      let content;\n      const duration = this.player_.duration();\n      if (this.player_.liveTracker && this.player_.liveTracker.isLive()) {\n        const liveWindow = this.player_.liveTracker.liveWindow();\n        const secondsBehind = liveWindow - seekBarPoint * liveWindow;\n        content = (secondsBehind < 1 ? '' : '-') + formatTime(secondsBehind, liveWindow);\n      } else {\n        content = formatTime(time, duration);\n      }\n      this.update(seekBarRect, seekBarPoint, content);\n      if (cb) {\n        cb();\n      }\n    });\n  }\n}\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 */\nclass PlayProgressBar extends Component$1 {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} 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  constructor(player, options) {\n    super(player, options);\n    this.setIcon('circle');\n    this.update = throttle(bind_(this, this.update), UPDATE_REFRESH_INTERVAL);\n  }\n\n  /**\n   * Create the the DOM element for this class.\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    return super.createEl('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  update(seekBarRect, seekBarPoint) {\n    const timeTooltip = this.getChild('timeTooltip');\n    if (!timeTooltip) {\n      return;\n    }\n    const time = this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime();\n    timeTooltip.updateTime(seekBarRect, seekBarPoint, time);\n  }\n}\n\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 */\nclass MouseTimeDisplay extends Component$1 {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} 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  constructor(player, options) {\n    super(player, options);\n    this.update = throttle(bind_(this, this.update), UPDATE_REFRESH_INTERVAL);\n  }\n\n  /**\n   * Create the DOM element for this class.\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    return super.createEl('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  update(seekBarRect, seekBarPoint) {\n    const time = seekBarPoint * this.player_.duration();\n    this.getChild('timeTooltip').updateTime(seekBarRect, seekBarPoint, time, () => {\n      this.el_.style.left = `${seekBarRect.width * seekBarPoint}px`;\n    });\n  }\n}\n\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.\nconst STEP_SECONDS = 5;\n\n// The multiplier of STEP_SECONDS that PgUp/PgDown move the timeline.\nconst 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 */\nclass SeekBar extends Slider {\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  constructor(player, options) {\n    super(player, options);\n    this.setEventHandlers_();\n  }\n\n  /**\n   * Sets the event handlers\n   *\n   * @private\n   */\n  setEventHandlers_() {\n    this.update_ = bind_(this, this.update);\n    this.update = throttle(this.update_, UPDATE_REFRESH_INTERVAL);\n    this.on(this.player_, ['durationchange', 'timeupdate'], this.update);\n    this.on(this.player_, ['ended'], 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_ = e => this.enableInterval_(e);\n    this.disableIntervalHandler_ = e => this.disableInterval_(e);\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$1 && 'visibilityState' in document$1) {\n      this.on(document$1, 'visibilitychange', this.toggleVisibility_);\n    }\n  }\n  toggleVisibility_(e) {\n    if (document$1.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  enableInterval_() {\n    if (this.updateInterval) {\n      return;\n    }\n    this.updateInterval = this.setInterval(this.update, UPDATE_REFRESH_INTERVAL);\n  }\n  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  createEl() {\n    return super.createEl('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  update(event) {\n    // ignore updates while the tab is hidden\n    if (document$1.visibilityState === 'hidden') {\n      return;\n    }\n    const percent = super.update();\n    this.requestNamedAnimationFrame('SeekBar#update', () => {\n      const currentTime = this.player_.ended() ? this.player_.duration() : this.getCurrentTime_();\n      const liveTracker = this.player_.liveTracker;\n      let duration = this.player_.duration();\n      if (liveTracker && liveTracker.isLive()) {\n        duration = this.player_.liveTracker.liveCurrentTime();\n      }\n      if (this.percent_ !== percent) {\n        // machine readable value of progress bar (percentage complete)\n        this.el_.setAttribute('aria-valuenow', (percent * 100).toFixed(2));\n        this.percent_ = percent;\n      }\n      if (this.currentTime_ !== currentTime || this.duration_ !== duration) {\n        // human readable value of progress bar (time complete)\n        this.el_.setAttribute('aria-valuetext', this.localize('progress bar timing: currentTime={1} duration={2}', [formatTime(currentTime, duration), formatTime(duration, duration)], '{1} of {2}'));\n        this.currentTime_ = currentTime;\n        this.duration_ = duration;\n      }\n\n      // update the progress bar time tooltip with the current time\n      if (this.bar) {\n        this.bar.update(getBoundingClientRect(this.el()), this.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  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  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  getPercent() {\n    const currentTime = this.getCurrentTime_();\n    let percent;\n    const 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  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    super.handleMouseDown(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  handleMouseMove(event, mouseDown = 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    let newTime;\n    const distance = this.calculateDistance(event);\n    const 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      const seekableStart = liveTracker.seekableStart();\n      const 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    if (this.player_.options_.enableSmoothSeeking) {\n      this.update();\n    }\n  }\n  enable() {\n    super.enable();\n    const mouseTimeDisplay = this.getChild('mouseTimeDisplay');\n    if (!mouseTimeDisplay) {\n      return;\n    }\n    mouseTimeDisplay.show();\n  }\n  disable() {\n    super.disable();\n    const 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  handleMouseUp(event) {\n    super.handleMouseUp(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  stepForward() {\n    this.userSeek_(this.player_.currentTime() + STEP_SECONDS);\n  }\n\n  /**\n   * Move more quickly rewind for keyboard-only users\n   */\n  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  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  handleKeyDown(event) {\n    const liveTracker = this.player_.liveTracker;\n    if (event.key === ' ' || event.key === 'Enter') {\n      event.preventDefault();\n      event.stopPropagation();\n      this.handleAction(event);\n    } else if (event.key === 'Home') {\n      event.preventDefault();\n      event.stopPropagation();\n      this.userSeek_(0);\n    } else if (event.key === '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(event.key)) {\n      event.preventDefault();\n      event.stopPropagation();\n      const gotoFraction = parseInt(event.key, 10) * 0.1;\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 (event.key === 'PageDown') {\n      event.preventDefault();\n      event.stopPropagation();\n      this.userSeek_(this.player_.currentTime() - STEP_SECONDS * PAGE_KEY_MULTIPLIER);\n    } else if (event.key === 'PageUp') {\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      super.handleKeyDown(event);\n    }\n  }\n  dispose() {\n    this.disableInterval_();\n    this.off(this.player_, ['durationchange', 'timeupdate'], this.update);\n    this.off(this.player_, ['ended'], 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$1 && 'visibilityState' in document$1) {\n      this.off(document$1, 'visibilitychange', this.toggleVisibility_);\n    }\n    super.dispose();\n  }\n}\n\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 */\nclass ProgressControl extends Component$1 {\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  constructor(player, options) {\n    super(player, options);\n    this.handleMouseMove = throttle(bind_(this, this.handleMouseMove), UPDATE_REFRESH_INTERVAL);\n    this.throttledHandleMouseSeek = throttle(bind_(this, this.handleMouseSeek), UPDATE_REFRESH_INTERVAL);\n    this.handleMouseUpHandler_ = e => this.handleMouseUp(e);\n    this.handleMouseDownHandler_ = e => this.handleMouseDown(e);\n    this.enable();\n  }\n\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    return super.createEl('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  handleMouseMove(event) {\n    const seekBar = this.getChild('seekBar');\n    if (!seekBar) {\n      return;\n    }\n    const playProgressBar = seekBar.getChild('playProgressBar');\n    const mouseTimeDisplay = seekBar.getChild('mouseTimeDisplay');\n    if (!playProgressBar && !mouseTimeDisplay) {\n      return;\n    }\n    const seekBarEl = seekBar.el();\n    const seekBarRect = findPosition(seekBarEl);\n    let 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  handleMouseSeek(event) {\n    const 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  enabled() {\n    return this.enabled_;\n  }\n\n  /**\n   * Disable all controls on the progress control and its children\n   */\n  disable() {\n    this.children().forEach(child => child.disable && child.disable());\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      const 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  enable() {\n    this.children().forEach(child => child.enable && child.enable());\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  removeListenersAddedOnMousedownAndTouchstart() {\n    const 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  handleMouseDown(event) {\n    const doc = this.el_.ownerDocument;\n    const 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  handleMouseUp(event) {\n    const seekBar = this.getChild('seekBar');\n    if (seekBar) {\n      seekBar.handleMouseUp(event);\n    }\n    this.removeListenersAddedOnMousedownAndTouchstart();\n  }\n}\n\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/** @import Player from './player' */\n\n/**\n * Toggle Picture-in-Picture mode\n *\n * @extends Button\n */\nclass PictureInPictureToggle extends Button {\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   * @listens Player#enterpictureinpicture\n   * @listens Player#leavepictureinpicture\n   */\n  constructor(player, options) {\n    super(player, options);\n    this.setIcon('picture-in-picture-enter');\n    this.on(player, ['enterpictureinpicture', 'leavepictureinpicture'], e => this.handlePictureInPictureChange(e));\n    this.on(player, ['disablepictureinpicturechanged', 'loadedmetadata'], e => this.handlePictureInPictureEnabledChange(e));\n    this.on(player, ['loadedmetadata', 'audioonlymodechange', 'audiopostermodechange'], () => this.handlePictureInPictureAudioModeChange());\n\n    // TODO: Deactivate button on player emptied event.\n    this.disable();\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  buildCSSClass() {\n    return `vjs-picture-in-picture-control vjs-hidden ${super.buildCSSClass()}`;\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  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    const isSourceAudio = this.player_.currentType().substring(0, 5) === 'audio';\n    const 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  handlePictureInPictureEnabledChange() {\n    if (document$1.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  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  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  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$1.exitPictureInPicture !== 'function') {\n      return;\n    }\n    super.show();\n  }\n}\n\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/** @import Player from './player' */\n\n/**\n * Toggle fullscreen video\n *\n * @extends Button\n */\nclass FullscreenToggle extends Button {\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  constructor(player, options) {\n    super(player, options);\n    this.setIcon('fullscreen-enter');\n    this.on(player, 'fullscreenchange', e => this.handleFullscreenChange(e));\n    if (document$1[player.fsApi_.fullscreenEnabled] === false) {\n      this.disable();\n    }\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  buildCSSClass() {\n    return `vjs-fullscreen-control ${super.buildCSSClass()}`;\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  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  handleClick(event) {\n    if (!this.player_.isFullscreen()) {\n      this.player_.requestFullscreen();\n    } else {\n      this.player_.exitFullscreen();\n    }\n  }\n}\n\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/** @import Component from '../../component' */\n/** @import Player from '../../player' */\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 {Component} self\n *        The component that should be hidden if volume is unsupported\n *\n * @param {Player} player\n *        A reference to the player\n *\n * @private\n */\nconst checkVolumeSupport = function (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 */\nclass VolumeLevel extends Component$1 {\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    const el = super.createEl('div', {\n      className: 'vjs-volume-level'\n    });\n    this.setIcon('circle', el);\n    el.appendChild(super.createEl('span', {\n      className: 'vjs-control-text'\n    }));\n    return el;\n  }\n}\nComponent$1.registerComponent('VolumeLevel', VolumeLevel);\n\n/**\n * @file volume-level-tooltip.js\n */\n\n/** @import Player from '../../player' */\n\n/**\n * Volume level tooltips display a volume above or side by side the volume bar.\n *\n * @extends Component\n */\nclass VolumeLevelTooltip extends Component$1 {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} 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  constructor(player, options) {\n    super(player, options);\n    this.update = throttle(bind_(this, this.update), UPDATE_REFRESH_INTERVAL);\n  }\n\n  /**\n   * Create the volume tooltip DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    return super.createEl('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  update(rangeBarRect, rangeBarPoint, vertical, content) {\n    if (!vertical) {\n      const tooltipRect = getBoundingClientRect(this.el_);\n      const playerRect = getBoundingClientRect(this.player_.el());\n      const volumeBarPointPx = rangeBarRect.width * rangeBarPoint;\n      if (!playerRect || !tooltipRect) {\n        return;\n      }\n      const spaceLeftOfPoint = rangeBarRect.left - playerRect.left + volumeBarPointPx;\n      const spaceRightOfPoint = rangeBarRect.width - volumeBarPointPx + (playerRect.right - rangeBarRect.right);\n      let 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 = `-${pullTooltipBy}px`;\n    }\n    this.write(`${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  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  updateVolume(rangeBarRect, rangeBarPoint, vertical, volume, cb) {\n    this.requestNamedAnimationFrame('VolumeLevelTooltip#updateVolume', () => {\n      this.update(rangeBarRect, rangeBarPoint, vertical, volume.toFixed(0));\n      if (cb) {\n        cb();\n      }\n    });\n  }\n}\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 */\nclass MouseVolumeLevelDisplay extends Component$1 {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} 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  constructor(player, options) {\n    super(player, options);\n    this.update = throttle(bind_(this, this.update), UPDATE_REFRESH_INTERVAL);\n  }\n\n  /**\n   * Create the DOM element for this class.\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    return super.createEl('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  update(rangeBarRect, rangeBarPoint, vertical) {\n    const volume = 100 * rangeBarPoint;\n    this.getChild('volumeLevelTooltip').updateVolume(rangeBarRect, rangeBarPoint, vertical, volume, () => {\n      if (vertical) {\n        this.el_.style.bottom = `${rangeBarRect.height * rangeBarPoint}px`;\n      } else {\n        this.el_.style.left = `${rangeBarRect.width * rangeBarPoint}px`;\n      }\n    });\n  }\n}\n\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 */\nclass VolumeBar extends Slider {\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  constructor(player, options) {\n    super(player, options);\n    this.on('slideractive', e => this.updateLastVolume_(e));\n    this.on(player, 'volumechange', e => this.updateARIAAttributes(e));\n    player.ready(() => this.updateARIAAttributes());\n  }\n\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    return super.createEl('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  handleMouseDown(event) {\n    if (!isSingleLeftClick(event)) {\n      return;\n    }\n    super.handleMouseDown(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  handleMouseMove(event) {\n    const mouseVolumeLevelDisplay = this.getChild('mouseVolumeLevelDisplay');\n    if (mouseVolumeLevelDisplay) {\n      const volumeBarEl = this.el();\n      const volumeBarRect = getBoundingClientRect(volumeBarEl);\n      const vertical = this.vertical();\n      let 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  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  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  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  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  updateARIAAttributes(event) {\n    const 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  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  updateLastVolume_() {\n    const volumeBeforeDrag = this.player_.volume();\n    this.one('sliderinactive', () => {\n      if (this.player_.volume() === 0) {\n        this.player_.lastVolume_(volumeBeforeDrag);\n      }\n    });\n  }\n}\n\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 */\nclass VolumeControl extends Component$1 {\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  constructor(player, options = {}) {\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    super(player, options);\n\n    // hide this control if volume support is missing\n    checkVolumeSupport(this, player);\n    this.throttledHandleMouseMove = throttle(bind_(this, this.handleMouseMove), UPDATE_REFRESH_INTERVAL);\n    this.handleMouseUpHandler_ = e => this.handleMouseUp(e);\n    this.on('mousedown', e => this.handleMouseDown(e));\n    this.on('touchstart', e => this.handleMouseDown(e));\n    this.on('mousemove', e => this.handleMouseMove(e));\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    this.on(this.volumeBar, ['focus', 'slideractive'], () => {\n      this.volumeBar.addClass('vjs-slider-active');\n      this.addClass('vjs-slider-active');\n      this.trigger('slideractive');\n    });\n    this.on(this.volumeBar, ['blur', 'sliderinactive'], () => {\n      this.volumeBar.removeClass('vjs-slider-active');\n      this.removeClass('vjs-slider-active');\n      this.trigger('sliderinactive');\n    });\n  }\n\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    let orientationClass = 'vjs-volume-horizontal';\n    if (this.options_.vertical) {\n      orientationClass = 'vjs-volume-vertical';\n    }\n    return super.createEl('div', {\n      className: `vjs-volume-control vjs-control ${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  handleMouseDown(event) {\n    const 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  handleMouseUp(event) {\n    const 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  handleMouseMove(event) {\n    this.volumeBar.handleMouseMove(event);\n  }\n}\n\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/** @import Component from '../../component' */\n/** @import Player from '../../player' */\n\n/**\n * Check if muting volume is supported and if it isn't hide the mute toggle\n * button.\n *\n * @param {Component} self\n *        A reference to the mute toggle button\n *\n * @param {Player} player\n *        A reference to the player\n *\n * @private\n */\nconst checkMuteSupport = function (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/** @import Player from './player' */\n\n/**\n * A button component for muting the audio.\n *\n * @extends Button\n */\nclass MuteToggle extends Button {\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  constructor(player, options) {\n    super(player, options);\n\n    // hide this control if volume support is missing\n    checkMuteSupport(this, player);\n    this.on(player, ['loadstart', 'volumechange'], e => this.update(e));\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  buildCSSClass() {\n    return `vjs-mute-control ${super.buildCSSClass()}`;\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  handleClick(event) {\n    const vol = this.player_.volume();\n    const lastVolume = this.player_.lastVolume_();\n    if (vol === 0) {\n      const 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  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  updateIcon_() {\n    const vol = this.player_.volume();\n    let 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((str, i) => str + `${i ? ' ' : ''}vjs-vol-${i}`, ''));\n    addClass(this.el_, `vjs-vol-${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  updateControlText_() {\n    const soundOff = this.player_.muted() || this.player_.volume() === 0;\n    const text = soundOff ? 'Unmute' : 'Mute';\n    if (this.controlText() !== text) {\n      this.controlText(text);\n    }\n  }\n}\n\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 */\nclass VolumePanel extends Component$1 {\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  constructor(player, options = {}) {\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    super(player, options);\n\n    // this handler is used by mouse handler methods below\n    this.handleKeyPressHandler_ = e => this.handleKeyPress(e);\n    this.on(player, ['loadstart'], e => this.volumePanelState_(e));\n    this.on(this.muteToggle, 'keyup', e => this.handleKeyPress(e));\n    this.on(this.volumeControl, 'keyup', e => this.handleVolumeControlKeyUp(e));\n    this.on('keydown', e => this.handleKeyPress(e));\n    this.on('mouseover', e => this.handleMouseOver(e));\n    this.on('mouseout', e => this.handleMouseOut(e));\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    this.on(this.volumeControl, ['slideractive'], this.sliderActive_);\n    this.on(this.volumeControl, ['sliderinactive'], this.sliderInactive_);\n  }\n\n  /**\n   * Add vjs-slider-active class to the VolumePanel\n   *\n   * @listens VolumeControl#slideractive\n   * @private\n   */\n  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  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  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  createEl() {\n    let orientationClass = 'vjs-volume-panel-horizontal';\n    if (!this.options_.inline) {\n      orientationClass = 'vjs-volume-panel-vertical';\n    }\n    return super.createEl('div', {\n      className: `vjs-volume-panel vjs-control ${orientationClass}`\n    });\n  }\n\n  /**\n   * Dispose of the `volume-panel` and all child components.\n   */\n  dispose() {\n    this.handleMouseOut();\n    super.dispose();\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  handleVolumeControlKeyUp(event) {\n    if (event.key === 'Escape') {\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  handleMouseOver(event) {\n    this.addClass('vjs-hover');\n    on(document$1, '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  handleMouseOut(event) {\n    this.removeClass('vjs-hover');\n    off(document$1, '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  handleKeyPress(event) {\n    if (event.key === 'Escape') {\n      this.handleMouseOut();\n    }\n  }\n}\n\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 */\nclass SkipForward extends Button {\n  constructor(player, options) {\n    super(player, options);\n    this.validOptions = [5, 10, 30];\n    this.skipTime = this.getSkipForwardTime();\n    if (this.skipTime && this.validOptions.includes(this.skipTime)) {\n      this.setIcon(`forward-${this.skipTime}`);\n      this.controlText(this.localize('Skip forward {1} seconds', [this.skipTime.toLocaleString(player.language())]));\n      this.show();\n    } else {\n      this.hide();\n    }\n  }\n  getSkipForwardTime() {\n    const playerOptions = this.options_.playerOptions;\n    return playerOptions.controlBar && playerOptions.controlBar.skipButtons && playerOptions.controlBar.skipButtons.forward;\n  }\n  buildCSSClass() {\n    return `vjs-skip-forward-${this.getSkipForwardTime()} ${super.buildCSSClass()}`;\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  handleClick(event) {\n    if (isNaN(this.player_.duration())) {\n      return;\n    }\n    const currentVideoTime = this.player_.currentTime();\n    const liveTracker = this.player_.liveTracker;\n    const duration = liveTracker && liveTracker.isLive() ? liveTracker.seekableEnd() : this.player_.duration();\n    let 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  handleLanguagechange() {\n    this.controlText(this.localize('Skip forward {1} seconds', [this.skipTime]));\n  }\n}\nSkipForward.prototype.controlText_ = 'Skip Forward';\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 */\nclass SkipBackward extends Button {\n  constructor(player, options) {\n    super(player, options);\n    this.validOptions = [5, 10, 30];\n    this.skipTime = this.getSkipBackwardTime();\n    if (this.skipTime && this.validOptions.includes(this.skipTime)) {\n      this.setIcon(`replay-${this.skipTime}`);\n      this.controlText(this.localize('Skip backward {1} seconds', [this.skipTime.toLocaleString(player.language())]));\n      this.show();\n    } else {\n      this.hide();\n    }\n  }\n  getSkipBackwardTime() {\n    const playerOptions = this.options_.playerOptions;\n    return playerOptions.controlBar && playerOptions.controlBar.skipButtons && playerOptions.controlBar.skipButtons.backward;\n  }\n  buildCSSClass() {\n    return `vjs-skip-backward-${this.getSkipBackwardTime()} ${super.buildCSSClass()}`;\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  handleClick(event) {\n    const currentVideoTime = this.player_.currentTime();\n    const liveTracker = this.player_.liveTracker;\n    const seekableStart = liveTracker && liveTracker.isLive() && liveTracker.seekableStart();\n    let 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  handleLanguagechange() {\n    this.controlText(this.localize('Skip backward {1} seconds', [this.skipTime]));\n  }\n}\nSkipBackward.prototype.controlText_ = 'Skip Backward';\nComponent$1.registerComponent('SkipBackward', SkipBackward);\n\n/**\n * @file menu.js\n */\n\n/** @import Player from '../player' */\n\n/**\n * The Menu component is used to build popup menus, including subtitle and\n * captions selection menus.\n *\n * @extends Component\n */\nclass Menu extends Component$1 {\n  /**\n   * Create an instance of this class.\n   *\n   * @param {Player} 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  constructor(player, options) {\n    super(player, options);\n    if (options) {\n      this.menuButton_ = options.menuButton;\n    }\n    this.focusedChild_ = -1;\n    this.on('keydown', e => this.handleKeyDown(e));\n\n    // All the menu item instances share the same blur handler provided by the menu container.\n    this.boundHandleBlur_ = e => this.handleBlur(e);\n    this.boundHandleTapClick_ = e => this.handleTapClick(e);\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  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  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  removeChild(component) {\n    if (typeof component === 'string') {\n      component = this.getChild(component);\n    }\n    this.removeEventListenerForItem(component);\n    super.removeChild(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  addItem(component) {\n    const 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  createEl() {\n    const contentElType = this.options_.contentElType || 'ul';\n    this.contentEl_ = createEl(contentElType, {\n      className: 'vjs-menu-content'\n    });\n    this.contentEl_.setAttribute('role', 'menu');\n    const el = super.createEl('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  dispose() {\n    this.contentEl_ = null;\n    this.boundHandleBlur_ = null;\n    this.boundHandleTapClick_ = null;\n    super.dispose();\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  handleBlur(event) {\n    const relatedTarget = event.relatedTarget || document$1.activeElement;\n\n    // Close menu popup when a user clicks outside the menu\n    if (!this.children().some(element => {\n      return element.el() === relatedTarget;\n    })) {\n      const 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  handleTapClick(event) {\n    // Unpress the associated MenuButton, and move focus back to it\n    if (this.menuButton_) {\n      this.menuButton_.unpressButton();\n      const childComponents = this.children();\n      if (!Array.isArray(childComponents)) {\n        return;\n      }\n      const foundComponent = childComponents.filter(component => component.el() === event.target)[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  handleKeyDown(event) {\n    // Left and Down Arrows\n    if (event.key === 'ArrowLeft' || event.key === 'ArrowDown') {\n      event.preventDefault();\n      event.stopPropagation();\n      this.stepForward();\n\n      // Up and Right Arrows\n    } else if (event.key === 'ArrowRight' || event.key === 'ArrowUp') {\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  stepForward() {\n    let 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  stepBack() {\n    let 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  focus(item = 0) {\n    const children = this.children().slice();\n    const 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}\nComponent$1.registerComponent('Menu', Menu);\n\n/**\n * @file menu-button.js\n */\n\n/** @import Player from '../player' */\n\n/**\n * A `MenuButton` class for any popup {@link Menu}.\n *\n * @extends Component\n */\nclass MenuButton extends Component$1 {\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  constructor(player, options = {}) {\n    super(player, options);\n    this.menuButton_ = new Button(player, options);\n    this.menuButton_.controlText(this.controlText_);\n    this.menuButton_.el_.setAttribute('aria-haspopup', 'true');\n\n    // Add buildCSSClass values to the button, not the wrapper\n    const buttonClass = Button.prototype.buildCSSClass();\n    this.menuButton_.el_.className = this.buildCSSClass() + ' ' + buttonClass;\n    this.menuButton_.removeClass('vjs-control');\n    this.addChild(this.menuButton_);\n    this.update();\n    this.enabled_ = true;\n    const handleClick = e => this.handleClick(e);\n    this.handleMenuKeyUp_ = e => this.handleMenuKeyUp(e);\n    this.on(this.menuButton_, 'tap', handleClick);\n    this.on(this.menuButton_, 'click', handleClick);\n    this.on(this.menuButton_, 'keydown', e => this.handleKeyDown(e));\n    this.on(this.menuButton_, 'mouseenter', () => {\n      this.addClass('vjs-hover');\n      this.menu.show();\n      on(document$1, 'keyup', this.handleMenuKeyUp_);\n    });\n    this.on('mouseleave', e => this.handleMouseLeave(e));\n    this.on('keydown', e => this.handleSubmenuKeyDown(e));\n  }\n\n  /**\n   * Update the menu based on the current state of its items.\n   */\n  update() {\n    const 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  createMenu() {\n    const 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      const titleEl = createEl('li', {\n        className: 'vjs-menu-title',\n        textContent: toTitleCase$1(this.options_.title),\n        tabIndex: -1\n      });\n      const 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 (let i = 0; i < this.items.length; i++) {\n        menu.addItem(this.items[i]);\n      }\n    }\n    return menu;\n  }\n\n  /**\n   * Create the list of menu items. Specific to each subclass.\n   *\n   * @abstract\n   */\n  createItems() {}\n\n  /**\n   * Create the `MenuButtons`s DOM element.\n   *\n   * @return {Element}\n   *         The element that gets created.\n   */\n  createEl() {\n    return super.createEl('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  setIcon(name) {\n    super.setIcon(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  buildWrapperCSSClass() {\n    let 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    const buttonClass = Button.prototype.buildCSSClass();\n    return `vjs-menu-button ${menuButtonClass} ${buttonClass} ${super.buildCSSClass()}`;\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  buildCSSClass() {\n    let 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 ${menuButtonClass} ${super.buildCSSClass()}`;\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  controlText(text, el = 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  dispose() {\n    this.handleMouseLeave();\n    super.dispose();\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  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  handleMouseLeave(event) {\n    this.removeClass('vjs-hover');\n    off(document$1, 'keyup', this.handleMenuKeyUp_);\n  }\n\n  /**\n   * Set the focus to the actual button, not to this element\n   */\n  focus() {\n    this.menuButton_.focus();\n  }\n\n  /**\n   * Remove the focus from the actual button, not this element\n   */\n  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  handleKeyDown(event) {\n    // Escape or Tab unpress the 'button'\n    if (event.key === 'Esc' || event.key === '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 (!event.key === '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 (event.key === 'Up' || event.key === 'Down' && !(this.player_.options_.playerOptions.spatialNavigation && this.player_.options_.playerOptions.spatialNavigation.enabled)) {\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  handleMenuKeyUp(event) {\n    // Escape hides popup menu\n    if (event.key === 'Esc' || event.key === '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  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  handleSubmenuKeyDown(event) {\n    // Escape or Tab unpress the 'button'\n    if (event.key === 'Esc' || event.key === 'Tab') {\n      if (this.buttonPressed_) {\n        this.unpressButton();\n      }\n      // Don't preventDefault for Tab key - we still want to lose focus\n      if (!event.key === '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  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  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  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  enable() {\n    this.enabled_ = true;\n    this.removeClass('vjs-disabled');\n    this.menuButton_.enable();\n  }\n}\nComponent$1.registerComponent('MenuButton', MenuButton);\n\n/**\n * @file track-button.js\n */\n\n/** @import Player from './player' */\n\n/**\n * The base class for buttons that toggle specific  track types (e.g. subtitles).\n *\n * @extends MenuButton\n */\nclass TrackButton extends MenuButton {\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  constructor(player, options) {\n    const tracks = options.tracks;\n    super(player, options);\n    if (this.items.length <= 1) {\n      this.hide();\n    }\n    if (!tracks) {\n      return;\n    }\n    const updateHandler = bind_(this, this.update);\n    tracks.addEventListener('removetrack', updateHandler);\n    tracks.addEventListener('addtrack', updateHandler);\n    tracks.addEventListener('labelchange', updateHandler);\n    this.player_.on('ready', updateHandler);\n    this.player_.on('dispose', function () {\n      tracks.removeEventListener('removetrack', updateHandler);\n      tracks.removeEventListener('addtrack', updateHandler);\n      tracks.removeEventListener('labelchange', updateHandler);\n    });\n  }\n}\nComponent$1.registerComponent('TrackButton', TrackButton);\n\n/**\n * @file menu-item.js\n */\n\n/** @import Player from '../player' */\n\n/**\n * The component for a menu item. `<li>`\n *\n * @extends ClickableComponent\n */\nclass MenuItem extends ClickableComponent {\n  /**\n   * Creates an instance of the 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   */\n  constructor(player, options) {\n    super(player, options);\n    this.selectable = options.selectable;\n    this.isSelected_ = options.selected || false;\n    this.multiSelectable = options.multiSelectable;\n    this.selected(this.isSelected_);\n    if (this.selectable) {\n      if (this.multiSelectable) {\n        this.el_.setAttribute('role', 'menuitemcheckbox');\n      } else {\n        this.el_.setAttribute('role', 'menuitemradio');\n      }\n    } else {\n      this.el_.setAttribute('role', 'menuitem');\n    }\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  createEl(type, props, attrs) {\n    // The control is textual, not just an icon\n    this.nonIconControl = true;\n    const el = super.createEl('li', Object.assign({\n      className: 'vjs-menu-item',\n      tabIndex: -1\n    }, props), attrs);\n\n    // swap icon with menu item text.\n    const 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  handleKeyDown(event) {\n    if (!['Tab', 'Escape', 'ArrowUp', 'ArrowLeft', 'ArrowRight', 'ArrowDown'].includes(event.key)) {\n      // Pass keydown handling up for unused keys\n      super.handleKeyDown(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  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  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}\nComponent$1.registerComponent('MenuItem', MenuItem);\n\n/**\n * @file text-track-menu-item.js\n */\n\n/** @import Player from '../../player' */\n\n/**\n * The specific menu item type for selecting a language within a text track kind\n *\n * @extends MenuItem\n */\nclass TextTrackMenuItem extends MenuItem {\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  constructor(player, options) {\n    const track = options.track;\n    const 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    super(player, options);\n    this.track = track;\n    // Determine the relevant kind(s) of tracks for this component and filter\n    // out empty kinds.\n    this.kinds = (options.kinds || [options.kind || this.track.kind]).filter(Boolean);\n    const changeHandler = (...args) => {\n      this.handleTracksChange.apply(this, args);\n    };\n    const selectedLanguageChangeHandler = (...args) => {\n      this.handleSelectedLanguageChange.apply(this, args);\n    };\n    player.on(['loadstart', 'texttrackchange'], changeHandler);\n    tracks.addEventListener('change', changeHandler);\n    tracks.addEventListener('selectedlanguagechange', selectedLanguageChangeHandler);\n    this.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      let event;\n      this.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$1.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    this.handleTracksChange();\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  handleClick(event) {\n    const referenceTrack = this.track;\n    const tracks = this.player_.textTracks();\n    super.handleClick(event);\n    if (!tracks) {\n      return;\n    }\n    for (let i = 0; i < tracks.length; i++) {\n      const track = tracks[i];\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  handleTracksChange(event) {\n    const 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  handleSelectedLanguageChange(event) {\n    if (this.track.mode === 'showing') {\n      const 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  dispose() {\n    // remove reference to track object on dispose\n    this.track = null;\n    super.dispose();\n  }\n}\nComponent$1.registerComponent('TextTrackMenuItem', TextTrackMenuItem);\n\n/**\n * @file off-text-track-menu-item.js\n */\n\n/** @import Player from '../../player' */\n\n/**\n * A special menu item for turning off a specific type of text track\n *\n * @extends TextTrackMenuItem\n */\nclass OffTextTrackMenuItem extends TextTrackMenuItem {\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  constructor(player, options) {\n    // Create pseudo track info\n    // Requires options['kind']\n    options.track = {\n      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    super(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  handleTracksChange(event) {\n    const tracks = this.player().textTracks();\n    let shouldBeSelected = true;\n    for (let i = 0, l = tracks.length; i < l; i++) {\n      const track = tracks[i];\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  handleSelectedLanguageChange(event) {\n    const tracks = this.player().textTracks();\n    let allHidden = true;\n    for (let i = 0, l = tracks.length; i < l; i++) {\n      const track = tracks[i];\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  handleLanguagechange() {\n    this.$('.vjs-menu-item-text').textContent = this.player_.localize(this.options_.label);\n    super.handleLanguagechange();\n  }\n}\nComponent$1.registerComponent('OffTextTrackMenuItem', OffTextTrackMenuItem);\n\n/**\n * @file text-track-button.js\n */\n\n/** @import Player from '../../player' */\n\n/**\n * The base class for buttons that toggle specific text track types (e.g. subtitles)\n *\n * @extends MenuButton\n */\nclass TextTrackButton extends TrackButton {\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  constructor(player, options = {}) {\n    options.tracks = player.textTracks();\n    super(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  createItems(items = [], TrackMenuItem = TextTrackMenuItem) {\n    // Label is an override for the [track] off label\n    // USed to localise captions/subtitles\n    let label;\n    if (this.label_) {\n      label = `${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\n    }));\n    this.hideThreshold_ += 1;\n    const tracks = this.player_.textTracks();\n    if (!Array.isArray(this.kinds_)) {\n      this.kinds_ = [this.kind_];\n    }\n    for (let i = 0; i < tracks.length; i++) {\n      const track = tracks[i];\n\n      // only add tracks that are of an appropriate kind and have a label\n      if (this.kinds_.indexOf(track.kind) > -1) {\n        const item = new TrackMenuItem(this.player_, {\n          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-${track.kind}-menu-item`);\n        items.push(item);\n      }\n    }\n    return items;\n  }\n}\nComponent$1.registerComponent('TextTrackButton', TextTrackButton);\n\n/**\n * @file chapters-track-menu-item.js\n */\n\n/** @import Player from '../../player' */\n\n/**\n * The chapter track menu item\n *\n * @extends MenuItem\n */\nclass ChaptersTrackMenuItem extends MenuItem {\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  constructor(player, options) {\n    const track = options.track;\n    const cue = options.cue;\n    const 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    super(player, options);\n    this.track = track;\n    this.cue = cue;\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  handleClick(event) {\n    super.handleClick();\n    this.player_.currentTime(this.cue.startTime);\n  }\n}\nComponent$1.registerComponent('ChaptersTrackMenuItem', ChaptersTrackMenuItem);\n\n/**\n * @file chapters-button.js\n */\n\n/** @import Player from '../../player' */\n/** @import Menu from '../../menu/menu' */\n/** @import TextTrack from '../../tracks/text-track' */\n/** @import TextTrackMenuItem from '../text-track-controls/text-track-menu-item' */\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 */\nclass ChaptersButton extends TextTrackButton {\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   * @param {Function} [ready]\n   *        The function to call when this function is ready.\n   */\n  constructor(player, options, ready) {\n    super(player, options, ready);\n    this.setIcon('chapters');\n    this.selectCurrentItem_ = () => {\n      this.items.forEach(item => {\n        item.selected(this.track_.activeCues[0] === item.cue);\n      });\n    };\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  buildCSSClass() {\n    return `vjs-chapters-button ${super.buildCSSClass()}`;\n  }\n  buildWrapperCSSClass() {\n    return `vjs-chapters-button ${super.buildWrapperCSSClass()}`;\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  update(event) {\n    if (event && event.track && event.track.kind !== 'chapters') {\n      return;\n    }\n    const track = this.findChaptersTrack();\n    if (track !== this.track_) {\n      this.setTrack(track);\n      super.update();\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      super.update();\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  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      const 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      const 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  findChaptersTrack() {\n    const tracks = this.player_.textTracks() || [];\n    for (let i = tracks.length - 1; i >= 0; i--) {\n      // We will always choose the last track as our chaptersTrack\n      const track = tracks[i];\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  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 {Menu}\n   *         New menu for the chapter buttons\n   */\n  createMenu() {\n    this.options_.title = this.getMenuCaption();\n    return super.createMenu();\n  }\n\n  /**\n   * Create a menu item for each text track\n   *\n   * @return  {TextTrackMenuItem[]}\n   *         Array of menu items\n   */\n  createItems() {\n    const items = [];\n    if (!this.track_) {\n      return items;\n    }\n    const cues = this.track_.cues;\n    if (!cues) {\n      return items;\n    }\n    for (let i = 0, l = cues.length; i < l; i++) {\n      const cue = cues[i];\n      const mi = new ChaptersTrackMenuItem(this.player_, {\n        track: this.track_,\n        cue\n      });\n      items.push(mi);\n    }\n    return items;\n  }\n}\n\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/** @import Player from '../../player' */\n\n/**\n * The button component for toggling and selecting descriptions\n *\n * @extends TextTrackButton\n */\nclass DescriptionsButton extends TextTrackButton {\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   * @param {Function} [ready]\n   *        The function to call when this component is ready.\n   */\n  constructor(player, options, ready) {\n    super(player, options, ready);\n    this.setIcon('audio-description');\n    const tracks = player.textTracks();\n    const changeHandler = bind_(this, this.handleTracksChange);\n    tracks.addEventListener('change', changeHandler);\n    this.on('dispose', function () {\n      tracks.removeEventListener('change', changeHandler);\n    });\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  handleTracksChange(event) {\n    const tracks = this.player().textTracks();\n    let disabled = false;\n\n    // Check whether a track of a different kind is showing\n    for (let i = 0, l = tracks.length; i < l; i++) {\n      const track = tracks[i];\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  buildCSSClass() {\n    return `vjs-descriptions-button ${super.buildCSSClass()}`;\n  }\n  buildWrapperCSSClass() {\n    return `vjs-descriptions-button ${super.buildWrapperCSSClass()}`;\n  }\n}\n\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/** @import Player from '../../player' */\n\n/**\n * The button component for toggling and selecting subtitles\n *\n * @extends TextTrackButton\n */\nclass SubtitlesButton extends TextTrackButton {\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   * @param {Function} [ready]\n   *        The function to call when this component is ready.\n   */\n  constructor(player, options, ready) {\n    super(player, options, ready);\n    this.setIcon('subtitles');\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  buildCSSClass() {\n    return `vjs-subtitles-button ${super.buildCSSClass()}`;\n  }\n  buildWrapperCSSClass() {\n    return `vjs-subtitles-button ${super.buildWrapperCSSClass()}`;\n  }\n}\n\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/** @import Player from '../../player' */\n\n/**\n * The menu item for caption track settings menu\n *\n * @extends TextTrackMenuItem\n */\nclass CaptionSettingsMenuItem extends TextTrackMenuItem {\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  constructor(player, options) {\n    options.track = {\n      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    super(player, options);\n    this.addClass('vjs-texttrack-settings');\n    this.controlText(', opens ' + options.kind + ' settings dialog');\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  handleClick(event) {\n    this.player().getChild('textTrackSettings').open();\n  }\n\n  /**\n   * Update control text and label on languagechange\n   */\n  handleLanguagechange() {\n    this.$('.vjs-menu-item-text').textContent = this.player_.localize(this.options_.kind + ' settings');\n    super.handleLanguagechange();\n  }\n}\nComponent$1.registerComponent('CaptionSettingsMenuItem', CaptionSettingsMenuItem);\n\n/**\n * @file captions-button.js\n */\n\n/** @import Player from '../../player' */\n\n/**\n * The button component for toggling and selecting captions\n *\n * @extends TextTrackButton\n */\nclass CaptionsButton extends TextTrackButton {\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   * @param {Function} [ready]\n   *        The function to call when this component is ready.\n   */\n  constructor(player, options, ready) {\n    super(player, options, ready);\n    this.setIcon('captions');\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  buildCSSClass() {\n    return `vjs-captions-button ${super.buildCSSClass()}`;\n  }\n  buildWrapperCSSClass() {\n    return `vjs-captions-button ${super.buildWrapperCSSClass()}`;\n  }\n\n  /**\n   * Create caption menu items\n   *\n   * @return {CaptionSettingsMenuItem[]}\n   *         The array of current menu items.\n   */\n  createItems() {\n    const 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 super.createItems(items);\n  }\n}\n\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 */\nclass SubsCapsMenuItem extends TextTrackMenuItem {\n  createEl(type, props, attrs) {\n    const el = super.createEl(type, props, attrs);\n    const 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: ` ${this.localize('Captions')}`\n      }));\n    }\n    return el;\n  }\n}\nComponent$1.registerComponent('SubsCapsMenuItem', SubsCapsMenuItem);\n\n/**\n * @file sub-caps-button.js\n */\n\n/** @import Player from '../../player' */\n\n/**\n * The button component for toggling and selecting captions and/or subtitles\n *\n * @extends TextTrackButton\n */\nclass SubsCapsButton extends TextTrackButton {\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   * @param {Function} [ready]\n   *        The function to call when this component is ready.\n   */\n  constructor(player, options = {}) {\n    super(player, options);\n\n    // Although North America uses \"captions\" in most cases for\n    // \"captions and subtitles\" other locales use \"subtitles\"\n    this.label_ = 'subtitles';\n    this.setIcon('subtitles');\n    if (['en', 'en-us', 'en-ca', 'fr-ca'].indexOf(this.player_.language_) > -1) {\n      this.label_ = 'captions';\n      this.setIcon('captions');\n    }\n    this.menuButton_.controlText(toTitleCase$1(this.label_));\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  buildCSSClass() {\n    return `vjs-subs-caps-button ${super.buildCSSClass()}`;\n  }\n  buildWrapperCSSClass() {\n    return `vjs-subs-caps-button ${super.buildWrapperCSSClass()}`;\n  }\n\n  /**\n   * Create caption/subtitles menu items\n   *\n   * @return {CaptionSettingsMenuItem[]}\n   *         The array of current menu items.\n   */\n  createItems() {\n    let 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 = super.createItems(items, SubsCapsMenuItem);\n    return items;\n  }\n}\n\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/** @import Player from '../../player' */\n\n/**\n * An {@link AudioTrack} {@link MenuItem}\n *\n * @extends MenuItem\n */\nclass AudioTrackMenuItem extends MenuItem {\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  constructor(player, options) {\n    const track = options.track;\n    const 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    super(player, options);\n    this.track = track;\n    this.addClass(`vjs-${track.kind}-menu-item`);\n    const changeHandler = (...args) => {\n      this.handleTracksChange.apply(this, args);\n    };\n    tracks.addEventListener('change', changeHandler);\n    this.on('dispose', () => {\n      tracks.removeEventListener('change', changeHandler);\n    });\n  }\n  createEl(type, props, attrs) {\n    const el = super.createEl(type, props, attrs);\n    const parentSpan = el.querySelector('.vjs-menu-item-text');\n    if (['main-desc', 'descriptions'].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  handleClick(event) {\n    super.handleClick(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      const tracks = this.player_.audioTracks();\n      for (let i = 0; i < tracks.length; i++) {\n        const track = tracks[i];\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  handleTracksChange(event) {\n    this.selected(this.track.enabled);\n  }\n}\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 */\nclass AudioTrackButton extends TrackButton {\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  constructor(player, options = {}) {\n    options.tracks = player.audioTracks();\n    super(player, options);\n    this.setIcon('audio');\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  buildCSSClass() {\n    return `vjs-audio-button ${super.buildCSSClass()}`;\n  }\n  buildWrapperCSSClass() {\n    return `vjs-audio-button ${super.buildWrapperCSSClass()}`;\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  createItems(items = []) {\n    // if there's only one audio track, there no point in showing it\n    this.hideThreshold_ = 1;\n    const tracks = this.player_.audioTracks();\n    for (let i = 0; i < tracks.length; i++) {\n      const track = tracks[i];\n      items.push(new AudioTrackMenuItem(this.player_, {\n        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\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/** @import Player from '../../player' */\n\n/**\n * The specific menu item type for selecting a playback rate.\n *\n * @extends MenuItem\n */\nclass PlaybackRateMenuItem extends MenuItem {\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  constructor(player, options) {\n    const label = options.rate;\n    const 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    super(player, options);\n    this.label = label;\n    this.rate = rate;\n    this.on(player, 'ratechange', e => this.update(e));\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  handleClick(event) {\n    super.handleClick();\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  update(event) {\n    this.selected(this.player().playbackRate() === this.rate);\n  }\n}\n\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/** @import Player from '../../player' */\n\n/**\n * The component for controlling the playback rate.\n *\n * @extends MenuButton\n */\nclass PlaybackRateMenuButton extends MenuButton {\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  constructor(player, options) {\n    super(player, options);\n    this.menuButton_.el_.setAttribute('aria-describedby', this.labelElId_);\n    this.updateVisibility();\n    this.updateLabel();\n    this.on(player, 'loadstart', e => this.updateVisibility(e));\n    this.on(player, 'ratechange', e => this.updateLabel(e));\n    this.on(player, 'playbackrateschange', e => this.handlePlaybackRateschange(e));\n  }\n\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    const el = super.createEl();\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  dispose() {\n    this.labelEl_ = null;\n    super.dispose();\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  buildCSSClass() {\n    return `vjs-playback-rate ${super.buildCSSClass()}`;\n  }\n  buildWrapperCSSClass() {\n    return `vjs-playback-rate ${super.buildWrapperCSSClass()}`;\n  }\n\n  /**\n   * Create the list of menu items. Specific to each subclass.\n   *\n   */\n  createItems() {\n    const rates = this.playbackRates();\n    const items = [];\n    for (let i = rates.length - 1; i >= 0; i--) {\n      items.push(new PlaybackRateMenuItem(this.player(), {\n        rate: rates[i] + '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  handlePlaybackRateschange(event) {\n    this.update();\n  }\n\n  /**\n   * Get possible playback rates\n   *\n   * @return {Array}\n   *         All possible playback rates\n   */\n  playbackRates() {\n    const 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  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  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  updateLabel(event) {\n    if (this.playbackRateSupported()) {\n      this.labelEl_.textContent = this.player().playbackRate() + 'x';\n    }\n  }\n}\n\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 */\nclass Spacer extends Component$1 {\n  /**\n  * Builds the default DOM `className`.\n  *\n  * @return {string}\n  *         The DOM `className` for this object.\n  */\n  buildCSSClass() {\n    return `vjs-spacer ${super.buildCSSClass()}`;\n  }\n\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl(tag = 'div', props = {}, attributes = {}) {\n    if (!props.className) {\n      props.className = this.buildCSSClass();\n    }\n    return super.createEl(tag, props, attributes);\n  }\n}\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 */\nclass CustomControlSpacer extends Spacer {\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  buildCSSClass() {\n    return `vjs-custom-control-spacer ${super.buildCSSClass()}`;\n  }\n\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    return super.createEl('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: '\\u00a0'\n    });\n  }\n}\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 */\nclass ControlBar extends Component$1 {\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    return super.createEl('div', {\n      className: 'vjs-control-bar',\n      dir: 'ltr'\n    });\n  }\n}\n\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/** @import Player from './player' */\n\n/**\n * A display that indicates an error has occurred. This means that the video\n * is unplayable.\n *\n * @extends ModalDialog\n */\nclass ErrorDisplay extends ModalDialog {\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  constructor(player, options) {\n    super(player, options);\n    this.on(player, 'error', e => {\n      this.open(e);\n    });\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  buildCSSClass() {\n    return `vjs-error-display ${super.buildCSSClass()}`;\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  content() {\n    const error = this.player().error();\n    return error ? this.localize(error.message) : '';\n  }\n}\n\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/** @import Player from './player' */\n/** @import { ContentDescriptor } from  '../utils/dom' */\n\n/**\n * Creates DOM element of 'select' & its options.\n *\n * @extends Component\n */\nclass TextTrackSelect extends Component$1 {\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   * @param {ContentDescriptor} [options.content=undefined]\n   *        Provide customized content for this modal.\n   *\n   * @param {string} [options.legendId]\n   *        A text with part of an string to create atribute of aria-labelledby.\n   *\n   * @param {string} [options.id]\n   *        A text with part of an string to create atribute of aria-labelledby.\n   *\n   * @param {Array} [options.SelectOptions]\n   *        Array that contains the value & textContent of for each of the\n   *        options elements.\n   */\n  constructor(player, options = {}) {\n    super(player, options);\n    this.el_.setAttribute('aria-labelledby', this.selectLabelledbyIds);\n  }\n\n  /**\n   * Create the `TextTrackSelect`'s DOM element\n   *\n   * @return {Element}\n   *         The DOM element that gets created.\n   */\n  createEl() {\n    this.selectLabelledbyIds = [this.options_.legendId, this.options_.labelId].join(' ').trim();\n\n    // Create select & inner options\n    const selectoptions = createEl('select', {\n      id: this.options_.id\n    }, {}, this.options_.SelectOptions.map(optionText => {\n      // Constructs an id for the <option>.\n      // For the colour settings that have two <selects> with a <label> each, generates an id based off the label value\n      // For font size/family and edge style with one <select> and no <label>, generates an id with a guid\n      const optionId = (this.options_.labelId ? this.options_.labelId : `vjs-track-option-${newGUID()}`) + '-' + optionText[1].replace(/\\W+/g, '');\n      const option = createEl('option', {\n        id: optionId,\n        value: this.localize(optionText[0]),\n        textContent: optionText[1]\n      });\n      option.setAttribute('aria-labelledby', `${this.selectLabelledbyIds} ${optionId}`);\n      return option;\n    }));\n    return selectoptions;\n  }\n}\nComponent$1.registerComponent('TextTrackSelect', TextTrackSelect);\n\n/** @import Player from './player' */\n/** @import { ContentDescriptor } from '../utils/dom' */\n\n/**\n * Creates fieldset section of 'TextTrackSettings'.\n * Manganes two versions of fieldsets, one for type of 'colors'\n * & the other for 'font', Component adds diferent DOM elements\n * to that fieldset  depending on the type.\n *\n * @extends Component\n */\nclass TextTrackFieldset extends Component$1 {\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   * @param {ContentDescriptor} [options.content=undefined]\n   *        Provide customized content for this modal.\n   *\n   * @param {string} [options.legendId]\n   *        A text with part of an string to create atribute of aria-labelledby.\n   *        It passes to 'TextTrackSelect'.\n   *\n   * @param {string} [options.id]\n   *        A text with part of an string to create atribute of aria-labelledby.\n   *        It passes to 'TextTrackSelect'.\n   *\n   * @param {string} [options.legendText]\n   *        A text to use as the text content of the legend element.\n   *\n   * @param {Array} [options.selects]\n   *        Array that contains the selects that are use to create 'selects'\n   *        components.\n   *\n   * @param {Array} [options.SelectOptions]\n   *        Array that contains the value & textContent of for each of the\n   *        options elements, it passes to 'TextTrackSelect'.\n   *\n   * @param {string} [options.type]\n   *        Conditions if some DOM elements will be added to the fieldset\n   *        component.\n   *\n   * @param {Object} [options.selectConfigs]\n   *        Object with the following properties that are the selects configurations:\n   *        backgroundColor, backgroundOpacity, color, edgeStyle, fontFamily,\n   *        fontPercent, textOpacity, windowColor, windowOpacity.\n   *        These properties are use to configure the 'TextTrackSelect' Component.\n   */\n  constructor(player, options = {}) {\n    super(player, options);\n\n    // Add Components & DOM Elements\n    const legendElement = createEl('legend', {\n      textContent: this.localize(this.options_.legendText),\n      id: this.options_.legendId\n    });\n    this.el().appendChild(legendElement);\n    const selects = this.options_.selects;\n\n    // Iterate array of selects to create 'selects' components\n    for (const i of selects) {\n      const selectConfig = this.options_.selectConfigs[i];\n      const selectClassName = selectConfig.className;\n      const id = selectConfig.id.replace('%s', this.options_.id_);\n      let span = null;\n      const guid = `vjs_select_${newGUID()}`;\n\n      // Conditionally create span to add on the component\n      if (this.options_.type === 'colors') {\n        span = createEl('span', {\n          className: selectClassName\n        });\n        const label = createEl('label', {\n          id,\n          className: 'vjs-label',\n          textContent: selectConfig.label\n        });\n        label.setAttribute('for', guid);\n        span.appendChild(label);\n      }\n      const textTrackSelect = new TextTrackSelect(player, {\n        SelectOptions: selectConfig.options,\n        legendId: this.options_.legendId,\n        id: guid,\n        labelId: id\n      });\n      this.addChild(textTrackSelect);\n\n      // Conditionally append to 'select' component to conditionally created span\n      if (this.options_.type === 'colors') {\n        span.appendChild(textTrackSelect.el());\n        this.el().appendChild(span);\n      }\n    }\n  }\n\n  /**\n   * Create the `TextTrackFieldset`'s DOM element\n   *\n   * @return {Element}\n   *         The DOM element that gets created.\n   */\n  createEl() {\n    const el = createEl('fieldset', {\n      // Prefixing classes of elements within a player with \"vjs-\"\n      // is a convention used in Video.js.\n      className: this.options_.className\n    });\n    return el;\n  }\n}\nComponent$1.registerComponent('TextTrackFieldset', TextTrackFieldset);\n\n/** @import Player from './player' */\n/** @import { ContentDescriptor } from  '../utils/dom' */\n\n/**\n * The component 'TextTrackSettingsColors' displays a set of 'fieldsets'\n * using the component 'TextTrackFieldset'.\n *\n * @extends Component\n */\nclass TextTrackSettingsColors extends Component$1 {\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   * @param {ContentDescriptor} [options.content=undefined]\n   *        Provide customized content for this modal.\n   *\n   * @param {Array} [options.fieldSets]\n   *        Array that contains the configurations for the selects.\n   *\n   * @param {Object} [options.selectConfigs]\n   *        Object with the following properties that are the select confugations:\n   *        backgroundColor, backgroundOpacity, color, edgeStyle, fontFamily,\n   *        fontPercent, textOpacity, windowColor, windowOpacity.\n   *        it passes to 'TextTrackFieldset'.\n   */\n  constructor(player, options = {}) {\n    super(player, options);\n    const id_ = this.options_.textTrackComponentid;\n\n    // createElFgColor_\n    const ElFgColorFieldset = new TextTrackFieldset(player, {\n      id_,\n      legendId: `captions-text-legend-${id_}`,\n      legendText: this.localize('Text'),\n      className: 'vjs-fg vjs-track-setting',\n      selects: this.options_.fieldSets[0],\n      selectConfigs: this.options_.selectConfigs,\n      type: 'colors'\n    });\n    this.addChild(ElFgColorFieldset);\n\n    // createElBgColor_\n    const ElBgColorFieldset = new TextTrackFieldset(player, {\n      id_,\n      legendId: `captions-background-${id_}`,\n      legendText: this.localize('Text Background'),\n      className: 'vjs-bg vjs-track-setting',\n      selects: this.options_.fieldSets[1],\n      selectConfigs: this.options_.selectConfigs,\n      type: 'colors'\n    });\n    this.addChild(ElBgColorFieldset);\n\n    // createElWinColor_\n    const ElWinColorFieldset = new TextTrackFieldset(player, {\n      id_,\n      legendId: `captions-window-${id_}`,\n      legendText: this.localize('Caption Area Background'),\n      className: 'vjs-window vjs-track-setting',\n      selects: this.options_.fieldSets[2],\n      selectConfigs: this.options_.selectConfigs,\n      type: 'colors'\n    });\n    this.addChild(ElWinColorFieldset);\n  }\n\n  /**\n   * Create the `TextTrackSettingsColors`'s DOM element\n   *\n   * @return {Element}\n   *         The DOM element that gets created.\n   */\n  createEl() {\n    const el = createEl('div', {\n      className: 'vjs-track-settings-colors'\n    });\n    return el;\n  }\n}\nComponent$1.registerComponent('TextTrackSettingsColors', TextTrackSettingsColors);\n\n/** @import Player from './player' */\n/** @import { ContentDescriptor } from  '../utils/dom' */\n\n/**\n * The component 'TextTrackSettingsFont' displays a set of 'fieldsets'\n * using the component 'TextTrackFieldset'.\n *\n * @extends Component\n */\nclass TextTrackSettingsFont extends Component$1 {\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   * @param {ContentDescriptor} [options.content=undefined]\n   *        Provide customized content for this modal.\n   *\n   * @param {Array} [options.fieldSets]\n   *        Array that contains the configurations for the selects.\n   *\n   * @param {Object} [options.selectConfigs]\n   *        Object with the following properties that are the select confugations:\n   *        backgroundColor, backgroundOpacity, color, edgeStyle, fontFamily,\n   *        fontPercent, textOpacity, windowColor, windowOpacity.\n   *        it passes to 'TextTrackFieldset'.\n   */\n  constructor(player, options = {}) {\n    super(player, options);\n    const id_ = this.options_.textTrackComponentid;\n    const ElFgColorFieldset = new TextTrackFieldset(player, {\n      id_,\n      legendId: `captions-font-size-${id_}`,\n      legendText: 'Font Size',\n      className: 'vjs-font-percent vjs-track-setting',\n      selects: this.options_.fieldSets[0],\n      selectConfigs: this.options_.selectConfigs,\n      type: 'font'\n    });\n    this.addChild(ElFgColorFieldset);\n    const ElBgColorFieldset = new TextTrackFieldset(player, {\n      id_,\n      legendId: `captions-edge-style-${id_}`,\n      legendText: this.localize('Text Edge Style'),\n      className: 'vjs-edge-style vjs-track-setting',\n      selects: this.options_.fieldSets[1],\n      selectConfigs: this.options_.selectConfigs,\n      type: 'font'\n    });\n    this.addChild(ElBgColorFieldset);\n    const ElWinColorFieldset = new TextTrackFieldset(player, {\n      id_,\n      legendId: `captions-font-family-${id_}`,\n      legendText: this.localize('Font Family'),\n      className: 'vjs-font-family vjs-track-setting',\n      selects: this.options_.fieldSets[2],\n      selectConfigs: this.options_.selectConfigs,\n      type: 'font'\n    });\n    this.addChild(ElWinColorFieldset);\n  }\n\n  /**\n   * Create the `TextTrackSettingsFont`'s DOM element\n   *\n   * @return {Element}\n   *         The DOM element that gets created.\n   */\n  createEl() {\n    const el = createEl('div', {\n      className: 'vjs-track-settings-font'\n    });\n    return el;\n  }\n}\nComponent$1.registerComponent('TextTrackSettingsFont', TextTrackSettingsFont);\n\n/**\n * Buttons of reset & done that modal 'TextTrackSettings'\n * uses as part of its content.\n *\n * 'Reset': Resets all settings on 'TextTrackSettings'.\n * 'Done': Closes 'TextTrackSettings' modal.\n *\n * @extends Component\n */\nclass TrackSettingsControls extends Component$1 {\n  constructor(player, options = {}) {\n    super(player, options);\n\n    // Create DOM elements\n    const defaultsDescription = this.localize('restore all settings to the default values');\n    const resetButton = new Button(player, {\n      controlText: defaultsDescription,\n      className: 'vjs-default-button'\n    });\n    resetButton.el().classList.remove('vjs-control', 'vjs-button');\n    resetButton.el().textContent = this.localize('Reset');\n    this.addChild(resetButton);\n    const doneButton = new Button(player, {\n      controlText: defaultsDescription,\n      className: 'vjs-done-button'\n    });\n\n    // Remove unrequired style classes\n    doneButton.el().classList.remove('vjs-control', 'vjs-button');\n    doneButton.el().textContent = this.localize('Done');\n    this.addChild(doneButton);\n  }\n\n  /**\n   * Create the `TrackSettingsControls`'s DOM element\n   *\n   * @return {Element}\n   *         The DOM element that gets created.\n   */\n  createEl() {\n    const el = createEl('div', {\n      className: 'vjs-track-settings-controls'\n    });\n    return el;\n  }\n}\nComponent$1.registerComponent('TrackSettingsControls', TrackSettingsControls);\n\n/**\n * @file text-track-settings.js\n */\n\n/** @import Player from '../player' */\n\nconst LOCAL_STORAGE_KEY$1 = 'vjs-text-track-settings';\nconst COLOR_BLACK = ['#000', 'Black'];\nconst COLOR_BLUE = ['#00F', 'Blue'];\nconst COLOR_CYAN = ['#0FF', 'Cyan'];\nconst COLOR_GREEN = ['#0F0', 'Green'];\nconst COLOR_MAGENTA = ['#F0F', 'Magenta'];\nconst COLOR_RED = ['#F00', 'Red'];\nconst COLOR_WHITE = ['#FFF', 'White'];\nconst COLOR_YELLOW = ['#FF0', 'Yellow'];\nconst OPACITY_OPAQUE = ['1', 'Opaque'];\nconst OPACITY_SEMI = ['0.5', 'Semi-Transparent'];\nconst 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.\nconst 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    className: 'vjs-bg-color'\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    className: 'vjs-bg-opacity vjs-opacity'\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    className: 'vjs-text-color'\n  },\n  edgeStyle: {\n    selector: '.vjs-edge-style > select',\n    id: '',\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: '',\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: '',\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: v => v === '1.00' ? null : Number(v)\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    className: 'vjs-text-opacity vjs-opacity'\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    className: 'vjs-window-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    className: 'vjs-window-opacity vjs-opacity'\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  const 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 (let i = 0; i < el.options.length; i++) {\n    if (parseOptionValue(el.options[i].value, parser) === value) {\n      el.selectedIndex = i;\n      break;\n    }\n  }\n}\n\n/**\n * Manipulate Text Tracks settings.\n *\n * @extends ModalDialog\n */\nclass TextTrackSettings extends ModalDialog {\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  constructor(player, options) {\n    options.temporary = false;\n    super(player, options);\n    this.updateDisplay = this.updateDisplay.bind(this);\n\n    // fill the modal and pretend we have opened it\n    this.fill();\n    this.hasBeenOpened_ = this.hasBeenFilled_ = true;\n    this.renderModalComponents(player);\n    this.endDialog = createEl('p', {\n      className: 'vjs-control-text',\n      textContent: this.localize('End of dialog window.')\n    });\n    this.el().appendChild(this.endDialog);\n    this.setDefaults();\n\n    // Grab `persistTextTrackSettings` from the player options if not passed in child options\n    if (options.persistTextTrackSettings === undefined) {\n      this.options_.persistTextTrackSettings = this.options_.playerOptions.persistTextTrackSettings;\n    }\n    this.bindFunctionsToSelectsAndButtons();\n    if (this.options_.persistTextTrackSettings) {\n      this.restoreSettings();\n    }\n  }\n  renderModalComponents(player) {\n    const textTrackSettingsColors = new TextTrackSettingsColors(player, {\n      textTrackComponentid: this.id_,\n      selectConfigs,\n      fieldSets: [['color', 'textOpacity'], ['backgroundColor', 'backgroundOpacity'], ['windowColor', 'windowOpacity']]\n    });\n    this.addChild(textTrackSettingsColors);\n    const textTrackSettingsFont = new TextTrackSettingsFont(player, {\n      textTrackComponentid: this.id_,\n      selectConfigs,\n      fieldSets: [['fontPercent'], ['edgeStyle'], ['fontFamily']]\n    });\n    this.addChild(textTrackSettingsFont);\n    const trackSettingsControls = new TrackSettingsControls(player);\n    this.addChild(trackSettingsControls);\n  }\n  bindFunctionsToSelectsAndButtons() {\n    this.on(this.$('.vjs-done-button'), ['click', 'tap'], () => {\n      this.saveSettings();\n      this.close();\n    });\n    this.on(this.$('.vjs-default-button'), ['click', 'tap'], () => {\n      this.setDefaults();\n      this.updateDisplay();\n    });\n    each(selectConfigs, config => {\n      this.on(this.$(config.selector), 'change', this.updateDisplay);\n    });\n  }\n  dispose() {\n    this.endDialog = null;\n    super.dispose();\n  }\n  label() {\n    return this.localize('Caption Settings Dialog');\n  }\n  description() {\n    return this.localize('Beginning of dialog window. Escape will cancel and close the window.');\n  }\n  buildCSSClass() {\n    return super.buildCSSClass() + ' 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  getValues() {\n    return reduce(selectConfigs, (accum, config, key) => {\n      const value = getSelectedOptionValue(this.$(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  setValues(values) {\n    each(selectConfigs, (config, key) => {\n      setSelectedOption(this.$(config.selector), values[key], config.parser);\n    });\n  }\n\n  /**\n   * Sets all `<select>` elements to their default values.\n   */\n  setDefaults() {\n    each(selectConfigs, config => {\n      const index = config.hasOwnProperty('default') ? config.default : 0;\n      this.$(config.selector).selectedIndex = index;\n    });\n  }\n\n  /**\n   * Restore texttrack settings from localStorage\n   */\n  restoreSettings() {\n    let 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  saveSettings() {\n    if (!this.options_.persistTextTrackSettings) {\n      return;\n    }\n    const 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  updateDisplay() {\n    const ttDisplay = this.player_.getChild('textTrackDisplay');\n    if (ttDisplay) {\n      ttDisplay.updateDisplay();\n    }\n  }\n\n  /**\n   * Repopulate dialog with new localizations on languagechange\n   */\n  handleLanguagechange() {\n    this.fill();\n    this.renderModalComponents(this.player_);\n    this.bindFunctionsToSelectsAndButtons();\n  }\n}\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 */\nclass ResizeManager extends Component$1 {\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  constructor(player, options) {\n    let 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    const options_ = merge$1({\n      createEl: !RESIZE_OBSERVER_AVAILABLE,\n      reportTouchActivity: false\n    }, options);\n    super(player, options_);\n    this.ResizeObserver = options.ResizeObserver || window$1.ResizeObserver;\n    this.loadListener_ = null;\n    this.resizeObserver_ = null;\n    this.debouncedHandler_ = debounce(() => {\n      this.resizeHandler();\n    }, 100, false, this);\n    if (RESIZE_OBSERVER_AVAILABLE) {\n      this.resizeObserver_ = new this.ResizeObserver(this.debouncedHandler_);\n      this.resizeObserver_.observe(player.el());\n    } else {\n      this.loadListener_ = () => {\n        if (!this.el_ || !this.el_.contentWindow) {\n          return;\n        }\n        const debouncedHandler_ = this.debouncedHandler_;\n        let unloadListener_ = this.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(this.el_.contentWindow, 'unload', unloadListener_);\n        on(this.el_.contentWindow, 'resize', debouncedHandler_);\n      };\n      this.one('load', this.loadListener_);\n    }\n  }\n  createEl() {\n    return super.createEl('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  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  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    super.dispose();\n  }\n}\nComponent$1.registerComponent('ResizeManager', ResizeManager);\n\n/** @import Player from './player' */\n\nconst defaults$1 = {\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 */\nclass LiveTracker extends Component$1 {\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   * @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  constructor(player, options) {\n    // LiveTracker does not need an element\n    const options_ = merge$1(defaults$1, options, {\n      createEl: false\n    });\n    super(player, options_);\n    this.trackLiveHandler_ = () => this.trackLive_();\n    this.handlePlay_ = e => this.handlePlay(e);\n    this.handleFirstTimeupdate_ = e => this.handleFirstTimeupdate(e);\n    this.handleSeeked_ = e => this.handleSeeked(e);\n    this.seekToLiveEdge_ = e => this.seekToLiveEdge(e);\n    this.reset_();\n    this.on(this.player_, 'durationchange', e => this.handleDurationchange(e));\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    this.on(this.player_, 'canplay', () => this.toggleTracking());\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  trackLive_() {\n    const seekable = this.player_.seekable();\n\n    // skip undefined seekable\n    if (!seekable || !seekable.length) {\n      return;\n    }\n    const newTime = Number(window$1.performance.now().toFixed(4));\n    const deltaTime = this.lastTime_ === -1 ? 0 : (newTime - this.lastTime_) / 1000;\n    this.lastTime_ = newTime;\n    this.pastSeekEnd_ = this.pastSeekEnd() + deltaTime;\n    const liveCurrentTime = this.liveCurrentTime();\n    const 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    let 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  handleDurationchange() {\n    this.toggleTracking();\n  }\n\n  /**\n   * start/stop tracking\n   */\n  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  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  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  handleSeeked() {\n    const 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  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  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  nextSeekedFromUser() {\n    this.nextSeekedFromUser_ = true;\n  }\n\n  /**\n   * stop tracking live playback\n   */\n  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  seekableEnd() {\n    const seekable = this.player_.seekable();\n    const seekableEnds = [];\n    let 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  seekableStart() {\n    const seekable = this.player_.seekable();\n    const seekableStarts = [];\n    let 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  liveWindow() {\n    const 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  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  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  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  pastSeekEnd() {\n    const 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  behindLiveEdge() {\n    return this.behindLiveEdge_;\n  }\n\n  /**\n   * Whether live tracker is currently tracking or not.\n   */\n  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  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  dispose() {\n    this.stopTracking();\n    super.dispose();\n  }\n}\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 */\nclass TitleBar extends Component$1 {\n  constructor(player, options) {\n    super(player, options);\n    this.on('statechanged', e => this.updateDom_());\n    this.updateDom_();\n  }\n\n  /**\n   * Create the `TitleBar`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    this.els = {\n      title: createEl('div', {\n        className: 'vjs-title-bar-title',\n        id: `vjs-title-bar-title-${newGUID()}`\n      }),\n      description: createEl('div', {\n        className: 'vjs-title-bar-description',\n        id: `vjs-title-bar-description-${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  updateDom_() {\n    const tech = this.player_.tech_;\n    const techEl = tech && tech.el_;\n    const techAriaAttrs = {\n      title: 'aria-labelledby',\n      description: 'aria-describedby'\n    };\n    ['title', 'description'].forEach(k => {\n      const value = this.state[k];\n      const el = this.els[k];\n      const 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  update(options) {\n    this.setState(options);\n  }\n\n  /**\n   * Dispose the component.\n   */\n  dispose() {\n    const tech = this.player_.tech_;\n    const techEl = tech && tech.el_;\n    if (techEl) {\n      techEl.removeAttribute('aria-labelledby');\n      techEl.removeAttribute('aria-describedby');\n    }\n    super.dispose();\n    this.els = null;\n  }\n}\nComponent$1.registerComponent('TitleBar', TitleBar);\n\n/** @import Player from './player' */\n\n/**\n * @typedef {object} TransientButtonOptions\n * @property {string} [controlText] Control text, usually visible for these buttons\n * @property {number} [initialDisplay=4000] Time in ms that button should initially remain visible\n * @property {Array<'top'|'neartop'|'bottom'|'left'|'right'>} [position] Array of position strings to add basic styles for positioning\n * @property {string} [className] Class(es) to add\n * @property {boolean} [takeFocus=false] Whether element sohuld take focus when shown\n * @property {Function} [clickHandler] Function called on button activation\n */\n\n/** @type {TransientButtonOptions} */\nconst defaults = {\n  initialDisplay: 4000,\n  position: [],\n  takeFocus: false\n};\n\n/**\n * A floating transient button.\n * It's recommended to insert these buttons _before_ the control bar with the this argument to `addChild`\n * for a logical tab order.\n *\n * @example\n * ```\n * player.addChild(\n *   'TransientButton',\n *   options,\n *   player.children().indexOf(player.getChild(\"ControlBar\"))\n * )\n * ```\n *\n * @extends Button\n */\nclass TransientButton extends Button {\n  /**\n   * TransientButton constructor\n   *\n   * @param {Player} player The button's player\n   * @param {TransientButtonOptions} options Options for the transient button\n   */\n  constructor(player, options) {\n    options = merge$1(defaults, options);\n    super(player, options);\n    this.controlText(options.controlText);\n    this.hide();\n\n    // When shown, the float button will be visible even if the user is inactive.\n    // Clear this if there is any interaction.\n    this.on(this.player_, ['useractive', 'userinactive'], e => {\n      this.removeClass('force-display');\n    });\n  }\n\n  /**\n   * Return CSS class including position classes\n   *\n   * @return {string} CSS class list\n   */\n  buildCSSClass() {\n    return `vjs-transient-button focus-visible ${this.options_.position.map(c => `vjs-${c}`).join(' ')}`;\n  }\n\n  /**\n   * Create the button element\n   *\n   * @return {HTMLButtonElement} The button element\n   */\n  createEl() {\n    /** @type HTMLButtonElement */\n    const el = createEl('button', {}, {\n      type: 'button',\n      class: this.buildCSSClass()\n    }, createEl('span'));\n    this.controlTextEl_ = el.querySelector('span');\n    return el;\n  }\n\n  /**\n   * Show the button. The button will remain visible for the `initialDisplay` time, default 4s,\n   * and when there is user activity.\n   */\n  show() {\n    super.show();\n    this.addClass('force-display');\n    if (this.options_.takeFocus) {\n      this.el().focus({\n        preventScroll: true\n      });\n    }\n    this.forceDisplayTimeout = this.player_.setTimeout(() => {\n      this.removeClass('force-display');\n    }, this.options_.initialDisplay);\n  }\n\n  /**\n   * Hide the display, even if during the `initialDisplay` time.\n   */\n  hide() {\n    this.removeClass('force-display');\n    super.hide();\n  }\n\n  /**\n   * Dispose the component\n   */\n  dispose() {\n    this.player_.clearTimeout(this.forceDisplayTimeout);\n    super.dispose();\n  }\n}\nComponent$1.registerComponent('TransientButton', TransientButton);\n\n/** @import Html5 from './html5' */\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 {Html5} 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 */\nconst sourcesetLoad = tech => {\n  const 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  const sources = tech.$$('source');\n  const srcUrls = [];\n  let 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 (let i = 0; i < sources.length; i++) {\n    const url = sources[i].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 */\nconst innerHTMLDescriptorPolyfill = Object.defineProperty({}, 'innerHTML', {\n  get() {\n    return this.cloneNode(true).innerHTML;\n  },\n  set(v) {\n    // make a dummy node to use innerHTML on\n    const dummy = document$1.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    const docFrag = document$1.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 */\nconst getDescriptor = (priority, prop) => {\n  let descriptor = {};\n  for (let i = 0; i < priority.length; i++) {\n    descriptor = Object.getOwnPropertyDescriptor(priority[i], prop);\n    if (descriptor && descriptor.set && descriptor.get) {\n      break;\n    }\n  }\n  descriptor.enumerable = true;\n  descriptor.configurable = true;\n  return descriptor;\n};\nconst getInnerHTMLDescriptor = tech => getDescriptor([tech.el(), window$1.HTMLMediaElement.prototype, window$1.Element.prototype, innerHTMLDescriptorPolyfill], 'innerHTML');\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 */\nconst firstSourceWatch = function (tech) {\n  const el = tech.el();\n\n  // make sure firstSourceWatch isn't setup twice.\n  if (el.resetSourceWatch_) {\n    return;\n  }\n  const old = {};\n  const innerDescriptor = getInnerHTMLDescriptor(tech);\n  const appendWrapper = appendFn => (...args) => {\n    const retval = appendFn.apply(el, args);\n    sourcesetLoad(tech);\n    return retval;\n  };\n  ['append', 'appendChild', 'insertAdjacentHTML'].forEach(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_ = () => {\n    el.resetSourceWatch_ = null;\n    Object.keys(old).forEach(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 */\nconst srcDescriptorPolyfill = Object.defineProperty({}, 'src', {\n  get() {\n    if (this.hasAttribute('src')) {\n      return getAbsoluteURL(window$1.Element.prototype.getAttribute.call(this, 'src'));\n    }\n    return '';\n  },\n  set(v) {\n    window$1.Element.prototype.setAttribute.call(this, 'src', v);\n    return v;\n  }\n});\nconst getSrcDescriptor = tech => getDescriptor([tech.el(), window$1.HTMLMediaElement.prototype, srcDescriptorPolyfill], 'src');\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 */\nconst setupSourceset = function (tech) {\n  if (!tech.featuresSourceset) {\n    return;\n  }\n  const el = tech.el();\n\n  // make sure sourceset isn't setup twice.\n  if (el.resetSourceset_) {\n    return;\n  }\n  const srcDescriptor = getSrcDescriptor(tech);\n  const oldSetAttribute = el.setAttribute;\n  const oldLoad = el.load;\n  Object.defineProperty(el, 'src', merge$1(srcDescriptor, {\n    set: v => {\n      const 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 = (n, v) => {\n    const 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 = () => {\n    const 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_ = () => {\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 */\nclass Html5 extends 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  constructor(options, ready) {\n    super(options, ready);\n    const source = options.source;\n    let crossoriginTracks = false;\n    this.featuresVideoFrameCallback = this.featuresVideoFrameCallback && this.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 && (this.el_.currentSrc !== source.src || options.tag && options.tag.initNetworkState_ === 3)) {\n      this.setSource(source);\n    } else {\n      this.handleLateInit_(this.el_);\n    }\n\n    // setup sourceset after late sourceset/init\n    if (options.enableSourceset) {\n      this.setupSourcesetHandling_();\n    }\n    this.isScrubbing_ = false;\n    if (this.el_.hasChildNodes()) {\n      const nodes = this.el_.childNodes;\n      let nodesLength = nodes.length;\n      const removeNodes = [];\n      while (nodesLength--) {\n        const node = nodes[nodesLength];\n        const nodeName = node.nodeName.toLowerCase();\n        if (nodeName === 'track') {\n          if (!this.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            this.remoteTextTrackEls().addTrackElement_(node);\n            this.remoteTextTracks().addTrack(node.track);\n            this.textTracks().addTrack(node.track);\n            if (!crossoriginTracks && !this.el_.hasAttribute('crossorigin') && isCrossOrigin(node.src)) {\n              crossoriginTracks = true;\n            }\n          }\n        }\n      }\n      for (let i = 0; i < removeNodes.length; i++) {\n        this.el_.removeChild(removeNodes[i]);\n      }\n    }\n    this.proxyNativeTracks_();\n    if (this.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    this.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      this.setControls(true);\n    }\n\n    // on iOS, we want to proxy `webkitbeginfullscreen` and `webkitendfullscreen`\n    // into a `fullscreenchange` event\n    this.proxyWebkitFullscreen_();\n    this.triggerReady();\n  }\n\n  /**\n   * Dispose of `HTML5` media element and remove all tracks.\n   */\n  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    super.dispose();\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  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  restoreMetadataTracksInIOSNativePlayer_() {\n    const textTracks = this.textTracks();\n    let metadataTracksPreFullscreenState;\n\n    // captures a snapshot of every metadata track's current state\n    const takeMetadataTrackSnapshot = () => {\n      metadataTracksPreFullscreenState = [];\n      for (let i = 0; i < textTracks.length; i++) {\n        const track = textTracks[i];\n        if (track.kind === 'metadata') {\n          metadataTracksPreFullscreenState.push({\n            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', () => textTracks.removeEventListener('change', takeMetadataTrackSnapshot));\n    const restoreTrackMode = () => {\n      for (let i = 0; i < metadataTracksPreFullscreenState.length; i++) {\n        const storedTrack = metadataTracksPreFullscreenState[i];\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', () => {\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', () => {\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  overrideNative_(type, override) {\n    // If there is no behavioral change don't add/remove listeners\n    if (override !== this[`featuresNative${type}Tracks`]) {\n      return;\n    }\n    const lowerCaseType = type.toLowerCase();\n    if (this[`${lowerCaseType}TracksListeners_`]) {\n      Object.keys(this[`${lowerCaseType}TracksListeners_`]).forEach(eventName => {\n        const elTracks = this.el()[`${lowerCaseType}Tracks`];\n        elTracks.removeEventListener(eventName, this[`${lowerCaseType}TracksListeners_`][eventName]);\n      });\n    }\n    this[`featuresNative${type}Tracks`] = !override;\n    this[`${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  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  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  proxyNativeTracksForType_(name) {\n    const props = NORMAL[name];\n    const elTracks = this.el()[props.getterName];\n    const techTracks = this[props.getterName]();\n    if (!this[`featuresNative${props.capitalName}Tracks`] || !elTracks || !elTracks.addEventListener) {\n      return;\n    }\n    const listeners = {\n      change: e => {\n        const 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          this[REMOTE.remoteText.getterName]().trigger(event);\n        }\n      },\n      addtrack(e) {\n        techTracks.addTrack(e.track);\n      },\n      removetrack(e) {\n        techTracks.removeTrack(e.track);\n      }\n    };\n    const removeOldTracks = function () {\n      const removeTracks = [];\n      for (let i = 0; i < techTracks.length; i++) {\n        let found = false;\n        for (let j = 0; j < elTracks.length; j++) {\n          if (elTracks[j] === techTracks[i]) {\n            found = true;\n            break;\n          }\n        }\n        if (!found) {\n          removeTracks.push(techTracks[i]);\n        }\n      }\n      while (removeTracks.length) {\n        techTracks.removeTrack(removeTracks.shift());\n      }\n    };\n    this[props.getterName + 'Listeners_'] = listeners;\n    Object.keys(listeners).forEach(eventName => {\n      const listener = listeners[eventName];\n      elTracks.addEventListener(eventName, listener);\n      this.on('dispose', e => elTracks.removeEventListener(eventName, listener));\n    });\n\n    // Remove (native) tracks that are not used anymore\n    this.on('loadstart', removeOldTracks);\n    this.on('dispose', e => this.off('loadstart', removeOldTracks));\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  proxyNativeTracks_() {\n    NORMAL.names.forEach(name => {\n      this.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  createEl() {\n    let 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        const 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$1.createElement('video');\n\n        // determine if native controls should be used\n        const tagAttributes = this.options_.tag && getAttributes(this.options_.tag);\n        const 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    const settingsAttrs = ['loop', 'muted', 'playsinline', 'autoplay'];\n    for (let i = 0; i < settingsAttrs.length; i++) {\n      const attr = settingsAttrs[i];\n      const 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  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      let loadstartFired = false;\n      const setLoadstartFired = function () {\n        loadstartFired = true;\n      };\n      this.on('loadstart', setLoadstartFired);\n      const triggerLoadstart = function () {\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    const 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  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  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  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  duration() {\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      const checkProgress = () => {\n        if (this.el_.currentTime > 0) {\n          // Trigger durationchange for genuinely live video\n          if (this.el_.duration === Infinity) {\n            this.trigger('durationchange');\n          }\n          this.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  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  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  proxyWebkitFullscreen_() {\n    if (!('webkitDisplayingFullscreen' in this.el_)) {\n      return;\n    }\n    const endFn = function () {\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    const beginFn = function () {\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', () => {\n      this.off('webkitbeginfullscreen', beginFn);\n      this.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  supportsFullScreen() {\n    return typeof this.el_.webkitEnterFullScreen === 'function';\n  }\n\n  /**\n   * Request that the `HTML5` Tech enter fullscreen.\n   */\n  enterFullScreen() {\n    const 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  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  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  requestVideoFrameCallback(cb) {\n    if (this.featuresVideoFrameCallback && !this.el_.webkitKeys) {\n      return this.el_.requestVideoFrameCallback(cb);\n    }\n    return super.requestVideoFrameCallback(cb);\n  }\n\n  /**\n   * Native or fallback requestVideoFrameCallback\n   *\n   * @param {number} id request id to cancel\n   */\n  cancelVideoFrameCallback(id) {\n    if (this.featuresVideoFrameCallback && !this.el_.webkitKeys) {\n      this.el_.cancelVideoFrameCallback(id);\n    } else {\n      super.cancelVideoFrameCallback(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  src(src) {\n    if (src === undefined) {\n      return this.el_.src;\n    }\n\n    // Setting src through `src` instead of `setSrc` will be deprecated\n    this.setSrc(src);\n  }\n\n  /**\n   * Add a <source> element to the <video> element.\n   *\n   * @param {string} srcUrl\n   *        The URL of the video source.\n   *\n   * @param {string} [mimeType]\n   *        The MIME type of the video source. Optional but recommended.\n   *\n   * @return {boolean}\n   *         Returns true if the source element was successfully added, false otherwise.\n   */\n  addSourceElement(srcUrl, mimeType) {\n    if (!srcUrl) {\n      log$1.error('Invalid source URL.');\n      return false;\n    }\n    const sourceAttributes = {\n      src: srcUrl\n    };\n    if (mimeType) {\n      sourceAttributes.type = mimeType;\n    }\n    const sourceElement = createEl('source', {}, sourceAttributes);\n    this.el_.appendChild(sourceElement);\n    return true;\n  }\n\n  /**\n   * Remove a <source> element from the <video> element by its URL.\n   *\n   * @param {string} srcUrl\n   *        The URL of the source to remove.\n   *\n   * @return {boolean}\n   *         Returns true if the source element was successfully removed, false otherwise.\n   */\n  removeSourceElement(srcUrl) {\n    if (!srcUrl) {\n      log$1.error('Source URL is required to remove the source element.');\n      return false;\n    }\n    const sourceElements = this.el_.querySelectorAll('source');\n    for (const sourceElement of sourceElements) {\n      if (sourceElement.src === srcUrl) {\n        this.el_.removeChild(sourceElement);\n        return true;\n      }\n    }\n    log$1.warn(`No matching source element found with src: ${srcUrl}`);\n    return false;\n  }\n\n  /**\n   * Reset the tech by removing all sources and then calling\n   * {@link Html5.resetMediaElement}.\n   */\n  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  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  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  addTextTrack(kind, label, language) {\n    if (!this.featuresNativeTextTracks) {\n      return super.addTextTrack(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  createRemoteTextTrack(options) {\n    if (!this.featuresNativeTextTracks) {\n      return super.createRemoteTextTrack(options);\n    }\n    const htmlTrackElement = document$1.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  addRemoteTextTrack(options, manualCleanup) {\n    const htmlTrackElement = super.addRemoteTextTrack(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  removeRemoteTextTrack(track) {\n    super.removeRemoteTextTrack(track);\n    if (this.featuresNativeTextTracks) {\n      const tracks = this.$$('track');\n      let i = tracks.length;\n      while (i--) {\n        if (track === tracks[i] || track === tracks[i].track) {\n          this.el().removeChild(tracks[i]);\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  getVideoPlaybackQuality() {\n    if (typeof this.el().getVideoPlaybackQuality === 'function') {\n      return this.el().getVideoPlaybackQuality();\n    }\n    const 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\n/* HTML5 Support Testing ---------------------------------------------------- */\n\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  const video = document$1.createElement('video');\n  const track = document$1.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    const volume = Html5.TEST_VID.volume;\n    Html5.TEST_VID.volume = volume / 2 + 0.1;\n    const 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(() => {\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    const 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    const 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    const noop = () => {};\n    Object.defineProperty(document$1.createElement('video'), 'src', {\n      get: noop,\n      set: noop\n    });\n    Object.defineProperty(document$1.createElement('audio'), 'src', {\n      get: noop,\n      set: noop\n    });\n    Object.defineProperty(document$1.createElement('video'), 'innerHTML', {\n      get: noop,\n      set: noop\n    });\n    Object.defineProperty(document$1.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 ([key, fn]) {\n  defineLazyProperty(Html5.prototype, key, () => Html5[fn](), 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  const sources = el.querySelectorAll('source');\n  let 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    const ext = getFileExtension(source.src);\n    return Html5.nativeSourceHandler.canPlayType(`video/${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/** @import { TimeRange } from './utils/time' */\n/** @import HtmlTrackElement from './tracks/html-track-element' */\n\n/**\n * @callback PlayerReadyCallback\n * @this     {Player}\n * @returns  {void}\n */\n\n// The following tech events are simply re-triggered\n// on the player when they happen\nconst 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\nconst TECH_EVENTS_QUEUE = {\n  canplay: 'CanPlay',\n  canplaythrough: 'CanPlayThrough',\n  playing: 'Playing',\n  seeked: 'Seeked'\n};\nconst BREAKPOINT_ORDER = ['tiny', 'xsmall', 'small', 'medium', 'large', 'xlarge', 'huge'];\nconst 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(k => {\n  const v = k.charAt(0) === 'x' ? `x-${k.substring(1)}` : k;\n  BREAKPOINT_CLASSES[k] = `vjs-layout-${v}`;\n});\nconst 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 */\nclass Player extends Component$1 {\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 {PlayerReadyCallback} [ready]\n   *        Ready callback function.\n   */\n  constructor(tag, options, ready) {\n    // Make sure tag ID exists\n    // also here.. probably better\n    tag.id = tag.id || options.id || `vjs_video_${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      const 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    super(null, options, ready);\n\n    // Create bound methods for document listeners.\n    this.boundDocumentFullscreenChange_ = e => this.documentFullscreenChange_(e);\n    this.boundFullWindowOnEscKey_ = e => this.fullWindowOnEscKey(e);\n    this.boundUpdateStyleEl_ = e => this.updateStyleEl_(e);\n    this.boundApplyInitTime_ = e => this.applyInitTime_(e);\n    this.boundUpdateCurrentBreakpoint_ = e => this.updateCurrentBreakpoint_(e);\n    this.boundHandleTechClick_ = e => this.handleTechClick_(e);\n    this.boundHandleTechDoubleClick_ = e => this.handleTechDoubleClick_(e);\n    this.boundHandleTechTouchStart_ = e => this.handleTechTouchStart_(e);\n    this.boundHandleTechTouchMove_ = e => this.handleTechTouchMove_(e);\n    this.boundHandleTechTouchEnd_ = e => this.handleTechTouchEnd_(e);\n    this.boundHandleTechTap_ = e => this.handleTechTap_(e);\n    this.boundUpdatePlayerHeightOnAudioOnlyMode_ = e => this.updatePlayerHeightOnAudioOnlyMode_(e);\n\n    // default isFullscreen_ to false\n    this.isFullscreen_ = false;\n\n    // create logger\n    this.log = createLogger(this.id_);\n\n    // Hold our own reference to fullscreen api so it can be mocked in tests\n    this.fsApi_ = FullscreenApi;\n\n    // Tracks when a tech changes the poster\n    this.isPosterFromTech_ = false;\n\n    // Holds callback info that gets queued when playback rate is zero\n    // and a seek is happening\n    this.queuedCallbacks_ = [];\n\n    // Turn off API access because we're loading a new tech that might load asynchronously\n    this.isReady_ = false;\n\n    // Init state hasStarted_\n    this.hasStarted_ = false;\n\n    // Init state userActive_\n    this.userActive_ = false;\n\n    // Init debugEnabled_\n    this.debugEnabled_ = false;\n\n    // Init state audioOnlyMode_\n    this.audioOnlyMode_ = false;\n\n    // Init state audioPosterMode_\n    this.audioPosterMode_ = false;\n\n    // Init state audioOnlyCache_\n    this.audioOnlyCache_ = {\n      controlBarHeight: null,\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 (!this.options_ || !this.options_.techOrder || !this.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    this.tag = tag;\n\n    // Store the tag attributes used to restore html5 element\n    this.tagAttributes = tag && getAttributes(tag);\n\n    // Update current language\n    this.language(this.options_.language);\n\n    // Update Supported Languages\n    if (options.languages) {\n      // Normalise player option languages to lowercase\n      const languagesToLower = {};\n      Object.getOwnPropertyNames(options.languages).forEach(function (name) {\n        languagesToLower[name.toLowerCase()] = options.languages[name];\n      });\n      this.languages_ = languagesToLower;\n    } else {\n      this.languages_ = Player.prototype.options_.languages;\n    }\n    this.resetCache_();\n\n    // Set poster\n    /** @type string */\n    this.poster_ = options.poster || '';\n\n    // Set controls\n    /** @type {boolean} */\n    this.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    this.changingSrc_ = false;\n    this.playCallbacks_ = [];\n    this.playTerminatedQueue_ = [];\n\n    // the attribute overrides the option\n    if (tag.hasAttribute('autoplay')) {\n      this.autoplay(true);\n    } else {\n      // otherwise use the setter to validate and\n      // set the correct value.\n      this.autoplay(this.options_.autoplay);\n    }\n\n    // check plugins\n    if (options.plugins) {\n      Object.keys(options.plugins).forEach(name => {\n        if (typeof this[name] !== 'function') {\n          throw new Error(`plugin \"${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    this.scrubbing_ = false;\n    this.el_ = this.createEl();\n\n    // Make this an evented object and use `el_` as its event bus.\n    evented(this, {\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 (this.fsApi_.requestFullscreen) {\n      on(document$1, this.fsApi_.fullscreenchange, this.boundDocumentFullscreenChange_);\n      this.on(this.fsApi_.fullscreenchange, this.boundDocumentFullscreenChange_);\n    }\n    if (this.fluid_) {\n      this.on(['playerreset', 'resize'], this.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    const playerOptionsCopy = merge$1(this.options_);\n\n    // Load plugins\n    if (options.plugins) {\n      Object.keys(options.plugins).forEach(name => {\n        this[name](options.plugins[name]);\n      });\n    }\n\n    // Enable debug mode to fire debugon event for all plugins.\n    if (options.debug) {\n      this.debug(true);\n    }\n    this.options_.playerOptions = playerOptionsCopy;\n    this.middleware_ = [];\n    this.playbackRates(options.playbackRates);\n    if (options.experimentalSvgIcons) {\n      // Add SVG Sprite to the DOM\n      const parser = new window$1.DOMParser();\n      const parsedSVG = parser.parseFromString(icons, 'image/svg+xml');\n      const errorNode = parsedSVG.querySelector('parsererror');\n      if (errorNode) {\n        log$1.warn('Failed to load SVG Icons. Falling back to Font Icons.');\n        this.options_.experimentalSvgIcons = null;\n      } else {\n        const sprite = parsedSVG.documentElement;\n        sprite.style.display = 'none';\n        this.el_.appendChild(sprite);\n        this.addClass('vjs-svg-icons-enabled');\n      }\n    }\n    this.initChildren();\n\n    // Set isAudio based on whether or not an audio tag was used\n    this.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 (this.controls()) {\n      this.addClass('vjs-controls-enabled');\n    } else {\n      this.addClass('vjs-controls-disabled');\n    }\n\n    // Set ARIA label and region role depending on player type\n    this.el_.setAttribute('role', 'region');\n    if (this.isAudio()) {\n      this.el_.setAttribute('aria-label', this.localize('Audio Player'));\n    } else {\n      this.el_.setAttribute('aria-label', this.localize('Video Player'));\n    }\n    if (this.isAudio()) {\n      this.addClass('vjs-audio');\n    }\n\n    // Check if spatial navigation is enabled in the options.\n    // If enabled, instantiate the SpatialNavigation class.\n    if (options.spatialNavigation && options.spatialNavigation.enabled) {\n      this.spatialNavigation = new SpatialNavigation(this);\n      this.addClass('vjs-spatial-navigation-enabled');\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      this.addClass('vjs-touch-enabled');\n    }\n\n    // iOS Safari has broken hover handling\n    if (!IS_IOS) {\n      this.addClass('vjs-workinghover');\n    }\n\n    // Make player easily findable by ID\n    Player.players[this.id_] = this;\n\n    // Add a major version class to aid css in plugins\n    const majorVersion = version$6.split('.')[0];\n    this.addClass(`vjs-v${majorVersion}`);\n\n    // When the player is first initialized, trigger activity so components\n    // like the control bar show themselves if needed\n    this.userActive(true);\n    this.reportUserActivity();\n    this.one('play', e => this.listenForUserActivity_(e));\n    this.on('keydown', e => this.handleKeyDown(e));\n    this.on('languagechange', e => this.handleLanguagechange(e));\n    this.breakpoints(this.options_.breakpoints);\n    this.responsive(this.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    this.on('ready', () => {\n      // Calling the audioPosterMode method first so that\n      // the audioOnlyMode can take precedence when both options are set to true\n      this.audioPosterMode(this.options_.audioPosterMode);\n      this.audioOnlyMode(this.options_.audioOnlyMode);\n    });\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  dispose() {\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$1, this.fsApi_.fullscreenchange, this.boundDocumentFullscreenChange_);\n    off(document$1, '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(name => {\n      const props = ALL[name];\n      const list = this[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    super.dispose({\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  createEl() {\n    let tag = this.tag;\n    let el;\n    let playerElIngest = this.playerElIngest_ = tag.parentNode && tag.parentNode.hasAttribute && tag.parentNode.hasAttribute('data-vjs-player');\n    const divEmbed = this.tag.tagName.toLowerCase() === 'video-js';\n    if (playerElIngest) {\n      el = this.el_ = tag.parentNode;\n    } else if (!divEmbed) {\n      el = this.el_ = super.createEl('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    const attrs = getAttributes(tag);\n    if (divEmbed) {\n      el = this.el_ = tag;\n      tag = this.tag = document$1.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(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    const deviceClassNames = ['IS_SMART_TV', 'IS_TIZEN', 'IS_WEBOS', 'IS_ANDROID', 'IS_IPAD', 'IS_IPHONE', 'IS_CHROMECAST_RECEIVER'].filter(key => browser[key]).map(key => {\n      return 'vjs-device-' + key.substring(3).toLowerCase().replace(/\\_/g, '-');\n    });\n    this.addClass(...deviceClassNames);\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      const defaultsStyleEl = $('.vjs-styles-defaults');\n      const 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    const links = tag.getElementsByTagName('a');\n    for (let i = 0; i < links.length; i++) {\n      const linkEl = links.item(i);\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  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 \"${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  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  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  dimension(dimension, value) {\n    const 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    const parsedVal = parseFloat(value);\n    if (isNaN(parsedVal)) {\n      log$1.error(`Improper value \"${value}\" supplied for for ${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  fluid(bool) {\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, () => {\n        this.on(['playerreset', 'resize'], this.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  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  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  updateStyleEl_() {\n    if (window$1.VIDEOJS_NO_DYNAMIC_STYLE === true) {\n      const width = typeof this.width_ === 'number' ? this.width_ : this.options_.width;\n      const height = typeof this.height_ === 'number' ? this.height_ : this.options_.height;\n      const 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    let width;\n    let height;\n    let aspectRatio;\n    let 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    const ratioParts = aspectRatio.split(':');\n    const 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      .${idClass} {\n        width: ${width}px;\n        height: ${height}px;\n      }\n\n      .${idClass}.vjs-fluid:not(.vjs-audio-only-mode) {\n        padding-top: ${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  loadTech_(techName, source) {\n    // Pause and remove current playback technology\n    if (this.tech_) {\n      this.unloadTech_();\n    }\n    const titleTechName = toTitleCase$1(techName);\n    const 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    let 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    const techOptions = {\n      source,\n      autoplay,\n      'nativeControlsForTouch': this.options_.nativeControlsForTouch,\n      'playerId': this.id(),\n      'techId': `${this.id()}_${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(name => {\n      const props = ALL[name];\n      techOptions[props.getterName] = this[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    const TechClass = Tech.getTech(techName);\n    if (!TechClass) {\n      throw new Error(`No Tech named '${titleTechName}' exists! '${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(event => {\n      this.on(this.tech_, event, e => this[`handleTech${toTitleCase$1(event)}_`](e));\n    });\n    Object.keys(TECH_EVENTS_QUEUE).forEach(event => {\n      this.on(this.tech_, event, eventObj => {\n        if (this.tech_.playbackRate() === 0 && this.tech_.seeking()) {\n          this.queuedCallbacks_.push({\n            callback: this[`handleTech${TECH_EVENTS_QUEUE[event]}_`].bind(this),\n            event: eventObj\n          });\n          return;\n        }\n        this[`handleTech${TECH_EVENTS_QUEUE[event]}_`](eventObj);\n      });\n    });\n    this.on(this.tech_, 'loadstart', e => this.handleTechLoadStart_(e));\n    this.on(this.tech_, 'sourceset', e => this.handleTechSourceset_(e));\n    this.on(this.tech_, 'waiting', e => this.handleTechWaiting_(e));\n    this.on(this.tech_, 'ended', e => this.handleTechEnded_(e));\n    this.on(this.tech_, 'seeking', e => this.handleTechSeeking_(e));\n    this.on(this.tech_, 'play', e => this.handleTechPlay_(e));\n    this.on(this.tech_, 'pause', e => this.handleTechPause_(e));\n    this.on(this.tech_, 'durationchange', e => this.handleTechDurationChange_(e));\n    this.on(this.tech_, 'fullscreenchange', (e, data) => this.handleTechFullscreenChange_(e, data));\n    this.on(this.tech_, 'fullscreenerror', (e, err) => this.handleTechFullscreenError_(e, err));\n    this.on(this.tech_, 'enterpictureinpicture', e => this.handleTechEnterPictureInPicture_(e));\n    this.on(this.tech_, 'leavepictureinpicture', e => this.handleTechLeavePictureInPicture_(e));\n    this.on(this.tech_, 'error', e => this.handleTechError_(e));\n    this.on(this.tech_, 'posterchange', e => this.handleTechPosterChange_(e));\n    this.on(this.tech_, 'textdata', e => this.handleTechTextData_(e));\n    this.on(this.tech_, 'ratechange', e => this.handleTechRateChange_(e));\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  unloadTech_() {\n    // Save the current text tracks so that we can reuse the same text tracks with the next tech\n    ALL.names.forEach(name => {\n      const props = ALL[name];\n      this[props.privateName] = this[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  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   * An object that contains Video.js version.\n   *\n   * @typedef {Object} PlayerVersion\n   *\n   * @property {string} 'video.js' - Video.js version\n   */\n\n  /**\n   * Returns an object with Video.js version.\n   *\n   * @return {PlayerVersion}\n   *          An object with Video.js version.\n   */\n  version() {\n    return {\n      'video.js': version$6\n    };\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  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  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  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  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  manualAutoplay_(type) {\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    const resolveMuted = () => {\n      const previouslyMuted = this.muted();\n      this.muted(true);\n      const restoreMuted = () => {\n        this.muted(previouslyMuted);\n      };\n\n      // restore muted on play terminatation\n      this.playTerminatedQueue_.push(restoreMuted);\n      const mutedPromise = this.play();\n      if (!isPromise(mutedPromise)) {\n        return;\n      }\n      return mutedPromise.catch(err => {\n        restoreMuted();\n        throw new Error(`Rejection at manualAutoplay. Restoring muted value. ${err ? err : ''}`);\n      });\n    };\n    let 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(() => {\n      this.trigger({\n        type: 'autoplay-success',\n        autoplay: type\n      });\n    }).catch(() => {\n      this.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  updateSourceCaches_(srcObj = '') {\n    let src = srcObj;\n    let 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,\n      type\n    });\n    const matchingSources = this.cache_.sources.filter(s => s.src && s.src === src);\n    const sourceElSources = [];\n    const sourceEls = this.$$('source');\n    const matchingSourceEls = [];\n    for (let i = 0; i < sourceEls.length; i++) {\n      const sourceObj = getAttributes(sourceEls[i]);\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  handleTechSourceset_(event) {\n    // only update the source cache when the source\n    // was not updated using the player api\n    if (!this.changingSrc_) {\n      let updateSourceCaches = src => this.updateSourceCaches_(src);\n      const playerSrc = this.currentSource().src;\n      const 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 = () => {};\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'], 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          const techSrc = this.techGet_('currentSrc');\n          this.lastSource_.tech = techSrc;\n          this.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  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  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  handleTechRateChange_() {\n    if (this.tech_.playbackRate() > 0 && this.cache_.lastPlaybackRate === 0) {\n      this.queuedCallbacks_.forEach(queued => queued.callback(queued.event));\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  handleTechWaiting_() {\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    const timeWhenWaiting = this.currentTime();\n    const timeUpdateListener = () => {\n      if (timeWhenWaiting !== this.currentTime()) {\n        this.removeClass('vjs-waiting');\n        this.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  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  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  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  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  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  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  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  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  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   * or exit documentPictureInPicture mode\n   *\n   * @param {Event} event\n   *        the event that caused this function to trigger\n   *\n   * @listens Tech#dblclick\n   * @private\n   */\n  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    const inAllowedEls = Array.prototype.some.call(this.$$('.vjs-control-bar, .vjs-modal-dialog'), el => el.contains(event.target));\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.isInPictureInPicture() && !document$1.pictureInPictureElement) {\n          // Checking the presence of `window.documentPictureInPicture.window` complicates\n          // tests, checking `document.pictureInPictureElement` also works. It wouldn't\n          // be null in regular picture in picture.\n          // Exit picture in picture mode. This gesture can't trigger pip on the main window.\n          this.exitPictureInPicture();\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  handleTechTap_() {\n    this.userActive(!this.userActive());\n  }\n\n  /**\n   * Handle touch to start\n   *\n   * @listens Tech#touchstart\n   * @private\n   */\n  handleTechTouchStart_() {\n    this.userWasActive = this.userActive();\n  }\n\n  /**\n   * Handle touch to move\n   *\n   * @listens Tech#touchmove\n   * @private\n   */\n  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  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  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  documentFullscreenChange_(e) {\n    const 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    const el = this.el();\n    let isFs = document$1[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  handleTechFullscreenChange_(event, data) {\n    if (data) {\n      if (data.nativeIOSFullscreen) {\n        this.addClass('vjs-ios-native-fs');\n        this.tech_.one('webkitendfullscreen', () => {\n          this.removeClass('vjs-ios-native-fs');\n        });\n      }\n      this.isFullscreen(data.isFullscreen);\n    }\n  }\n  handleTechFullscreenError_(event, err) {\n    this.trigger('fullscreenerror', err);\n  }\n\n  /**\n   * @private\n   */\n  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  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  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  handleTechError_() {\n    const 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  handleTechTextData_() {\n    let 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  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  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  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  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: ${method} method not defined for ${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: ${method} unavailable on ${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  play() {\n    return new Promise(resolve => {\n      this.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  play_(callback = silencePromise) {\n    this.playCallbacks_.push(callback);\n    const isSrcReady = Boolean(!this.changingSrc_ && (this.src() || this.currentSrc()));\n    const 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_ = e => {\n        this.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    const val = this.techGet_('play');\n\n    // For native playback, reset the progress bar if we get a play call from a replay.\n    const 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  runPlayTerminatedQueue_() {\n    const 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  runPlayCallbacks_(val) {\n    const 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  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  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 {TimeRange}\n   *         A time range object that represents all the increments of time that have\n   *         been played.\n   */\n  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  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  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  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  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  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  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 {TimeRange}\n   *         A mock {@link TimeRanges} object (following HTML spec)\n   */\n  buffered() {\n    let 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 TimeRanges of the media that are currently available\n   * for seeking to.\n   *\n   * @see [Seekable Spec]{@link https://html.spec.whatwg.org/multipage/media.html#dom-media-seekable}\n   *\n   * @return {TimeRange}\n   *         A mock {@link TimeRanges} object (following HTML spec)\n   */\n  seekable() {\n    let seekable = this.techGet_('seekable');\n    if (!seekable || !seekable.length) {\n      seekable = createTimeRanges$1(0, 0);\n    }\n    return seekable;\n  }\n\n  /**\n   * Returns whether the player is in the \"seeking\" state.\n   *\n   * @return {boolean} True if the player is in the seeking state, false if not.\n   */\n  seeking() {\n    return this.techGet_('seeking');\n  }\n\n  /**\n   * Returns whether the player is in the \"ended\" state.\n   *\n   * @return {boolean} True if the player is in the ended state, false if not.\n   */\n  ended() {\n    return this.techGet_('ended');\n  }\n\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   */\n  networkState() {\n    return this.techGet_('networkState');\n  }\n\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   */\n  readyState() {\n    return this.techGet_('readyState');\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  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  bufferedEnd() {\n    const buffered = this.buffered();\n    const duration = this.duration();\n    let 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  volume(percentAsDecimal) {\n    let 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  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  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  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  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  isFullscreen(isFS) {\n    if (isFS !== undefined) {\n      const 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  requestFullscreen(fullscreenOptions) {\n    if (this.isInPictureInPicture()) {\n      this.exitPictureInPicture();\n    }\n    const self = this;\n    return new Promise((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      const promise = self.requestFullscreenHelper_(fullscreenOptions);\n      if (promise) {\n        promise.then(offHandler, offHandler);\n        promise.then(resolve, reject);\n      }\n    });\n  }\n  requestFullscreenHelper_(fullscreenOptions) {\n    let 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      const 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(() => this.isFullscreen(true), () => this.isFullscreen(false));\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  exitFullscreen() {\n    const self = this;\n    return new Promise((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      const 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  exitFullscreenHelper_() {\n    if (this.fsApi_.requestFullscreen) {\n      const promise = document$1[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(() => this.isFullscreen(false)));\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  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$1.documentElement.style.overflow;\n\n    // Add listener for esc key to exit fullscreen\n    on(document$1, 'keydown', this.boundFullWindowOnEscKey_);\n\n    // Hide any scroll bars\n    document$1.documentElement.style.overflow = 'hidden';\n\n    // Apply fullscreen styles\n    addClass(document$1.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  fullWindowOnEscKey(event) {\n    if (event.key === 'Escape') {\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  exitFullWindow() {\n    this.isFullscreen(false);\n    this.isFullWindow = false;\n    off(document$1, 'keydown', this.boundFullWindowOnEscKey_);\n\n    // Unhide scroll bars.\n    document$1.documentElement.style.overflow = this.docOrigOverflow;\n\n    // Remove fullscreen styles\n    removeClass(document$1.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  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  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  requestPictureInPicture() {\n    if (this.options_.enableDocumentPictureInPicture && window$1.documentPictureInPicture) {\n      const pipContainer = document$1.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(pipWindow => {\n        copyStyleSheetsToWindow(pipWindow);\n        this.el_.parentNode.insertBefore(pipContainer, this.el_);\n        pipWindow.document.body.appendChild(this.el_);\n        pipWindow.document.body.classList.add('vjs-pip-window');\n        this.player_.isInPictureInPicture(true);\n        this.player_.trigger({\n          type: 'enterpictureinpicture',\n          pipWindow\n        });\n\n        // Listen for the PiP closing event to move the video back.\n        pipWindow.addEventListener('pagehide', event => {\n          const pipVideo = event.target.querySelector('.video-js');\n          pipContainer.parentNode.replaceChild(pipVideo, pipContainer);\n          this.player_.isInPictureInPicture(false);\n          this.player_.trigger('leavepictureinpicture');\n        });\n        return pipWindow;\n      });\n    }\n    if ('pictureInPictureEnabled' in document$1 && 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  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$1) {\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$1.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  handleKeyDown(event) {\n    const {\n      userActions\n    } = this.options_;\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    const excludeElement = el => {\n      const 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      const 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      const 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  handleHotkeys(event) {\n    const hotkeys = this.options_.userActions ? this.options_.userActions.hotkeys : {};\n\n    // set fullscreenKey, muteKey, playPauseKey from `hotkeys`, use defaults if not set\n    const {\n      fullscreenKey = keydownEvent => event.key.toLowerCase() === 'f',\n      muteKey = keydownEvent => event.key.toLowerCase() === 'm',\n      playPauseKey = keydownEvent => event.key.toLowerCase() === 'k' || event.key.toLowerCase() === ' '\n    } = hotkeys;\n    if (fullscreenKey.call(this, event)) {\n      event.preventDefault();\n      event.stopPropagation();\n      const FSToggle = Component$1.getComponent('FullscreenToggle');\n      if (document$1[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      const 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      const 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  canPlayType(type) {\n    let can;\n\n    // Loop through each playback technology in the options order\n    for (let i = 0, j = this.options_.techOrder; i < j.length; i++) {\n      const techName = j[i];\n      let 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 \"${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  selectSource(sources) {\n    // Get only the techs specified in `techOrder` that exist and are supported by the\n    // current platform\n    const techs = this.options_.techOrder.map(techName => {\n      return [techName, Tech.getTech(techName)];\n    }).filter(([techName, tech]) => {\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 \"${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    const findFirstPassingTechSourcePair = function (outerArray, innerArray, tester) {\n      let found;\n      outerArray.some(outerChoice => {\n        return innerArray.some(innerChoice => {\n          found = tester(outerChoice, innerChoice);\n          if (found) {\n            return true;\n          }\n        });\n      });\n      return found;\n    };\n    let foundSourceAndTech;\n    const flip = fn => (a, b) => fn(b, a);\n    const finder = ([techName, tech], source) => {\n      if (tech.canPlaySource(source, this.options_[techName.toLowerCase()])) {\n        return {\n          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  handleSrc_(source, isRetry) {\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    const 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], (middlewareSource, mws) => {\n      this.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        this.cache_.sources = sources;\n      }\n      this.updateSourceCaches_(middlewareSource);\n      const err = this.src_(middlewareSource);\n      if (err) {\n        if (sources.length > 1) {\n          return this.handleSrc_(sources.slice(1));\n        }\n        this.changingSrc_ = false;\n\n        // We need to wrap this in a timeout to give folks a chance to add error event handlers\n        this.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        this.triggerReady();\n        return;\n      }\n      setTech(mws, this.tech_);\n    });\n\n    // Try another available source if this one fails before playback.\n    if (sources.length > 1) {\n      const retry = () => {\n        // Remove the error modal\n        this.error(null);\n        this.handleSrc_(sources.slice(1), true);\n      };\n      const stopListeningForErrors = () => {\n        this.off('error', retry);\n      };\n      this.one('error', retry);\n      this.one('playing', stopListeningForErrors);\n      this.resetRetryOnError_ = () => {\n        this.off('error', retry);\n        this.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  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  src_(source) {\n    const 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(() => {\n        this.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   * Add a <source> element to the <video> element.\n   *\n   * @param {string} srcUrl\n   *        The URL of the video source.\n   *\n   * @param {string} [mimeType]\n   *        The MIME type of the video source. Optional but recommended.\n   *\n   * @return {boolean}\n   *         Returns true if the source element was successfully added, false otherwise.\n   */\n  addSourceElement(srcUrl, mimeType) {\n    if (!this.tech_) {\n      return false;\n    }\n    return this.tech_.addSourceElement(srcUrl, mimeType);\n  }\n\n  /**\n   * Remove a <source> element from the <video> element by its URL.\n   *\n   * @param {string} srcUrl\n   *        The URL of the source to remove.\n   *\n   * @return {boolean}\n   *         Returns true if the source element was successfully removed, false otherwise.\n   */\n  removeSourceElement(srcUrl) {\n    if (!this.tech_) {\n      return false;\n    }\n    return this.tech_.removeSourceElement(srcUrl);\n  }\n\n  /**\n   * Begin loading the src data.\n   */\n  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  reset() {\n    if (this.paused()) {\n      this.doReset_();\n    } else {\n      const playPromise = this.play();\n      silencePromise(playPromise.then(() => this.doReset_()));\n    }\n  }\n  doReset_() {\n    if (this.tech_) {\n      this.tech_.clearTracks('text');\n    }\n    this.removeClass('vjs-playing');\n    this.addClass('vjs-paused');\n    this.resetCache_();\n    this.poster('');\n    this.loadTech_(this.options_.techOrder[0], null);\n    this.techCall_('reset');\n    this.resetControlBarUI_();\n    this.error(null);\n    if (this.titleBar) {\n      this.titleBar.update({\n        title: undefined,\n        description: undefined\n      });\n    }\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  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  resetProgressBar_() {\n    this.currentTime(0);\n    const {\n      currentTimeDisplay,\n      durationDisplay,\n      progressControl,\n      remainingTimeDisplay\n    } = this.controlBar || {};\n    const {\n      seekBar\n    } = progressControl || {};\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  resetPlaybackRate_() {\n    this.playbackRate(this.defaultPlaybackRate());\n    this.handleTechRateChange_();\n  }\n\n  /**\n   * Reset Volume bar\n   */\n  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  currentSources() {\n    const source = this.currentSource();\n    const 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  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  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  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  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  autoplay(value) {\n    // getter usage\n    if (value === undefined) {\n      return this.options_.autoplay || false;\n    }\n    let 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  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  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  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  handleTechPosterChange_() {\n    if ((!this.poster_ || this.options_.techCanOverridePoster) && this.tech_ && this.tech_.poster) {\n      const 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  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  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  error(err) {\n    if (err === undefined) {\n      return this.error_ || null;\n    }\n\n    // allow hooks to modify error object\n    hooks('beforeerror').forEach(hookFunction => {\n      const newErr = hookFunction(this, err);\n      if (!(isObject(newErr) && !Array.isArray(newErr) || typeof newErr === 'string' || typeof newErr === 'number' || newErr === null)) {\n        this.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      const triggerSuppressedError = function () {\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:${this.error_.code} ${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(hookFunction => hookFunction(this, this.error_));\n    return;\n  }\n\n  /**\n   * Report user activity\n   *\n   * @param {Object} event\n   *        Event object\n   */\n  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  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  listenForUserActivity_() {\n    let mouseInProgress;\n    let lastMoveX;\n    let lastMoveY;\n    const handleActivity = bind_(this, this.reportUserActivity);\n    const handleMouseMove = function (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    const handleMouseDown = function () {\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    const handleMouseUpAndMouseLeave = function (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    const 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    let inactivityTimeout;\n\n    /** @this Player */\n    const activityCheck = function () {\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      const 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  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  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  isAudio(bool) {\n    if (bool !== undefined) {\n      this.isAudio_ = !!bool;\n      return;\n    }\n    return !!this.isAudio_;\n  }\n  updatePlayerHeightOnAudioOnlyMode_() {\n    const controlBar = this.getChild('ControlBar');\n    if (!controlBar || this.audioOnlyCache_.controlBarHeight === controlBar.currentHeight()) {\n      return;\n    }\n    this.audioOnlyCache_.controlBarHeight = controlBar.currentHeight();\n    this.height(this.audioOnlyCache_.controlBarHeight);\n  }\n  enableAudioOnlyUI_() {\n    // Update styling immediately to show the control bar so we can get its height\n    this.addClass('vjs-audio-only-mode');\n    const playerChildren = this.children();\n    const controlBar = this.getChild('ControlBar');\n    const 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(child => {\n      if (child === controlBar) {\n        return;\n      }\n      if (child.el_ && !child.hasClass('vjs-hidden')) {\n        child.hide();\n        this.audioOnlyCache_.hiddenChildren.push(child);\n      }\n    });\n    this.audioOnlyCache_.playerHeight = this.currentHeight();\n    this.audioOnlyCache_.controlBarHeight = controlBarHeight;\n    this.on('playerresize', this.boundUpdatePlayerHeightOnAudioOnlyMode_);\n\n    // Set the player height the same as the control bar\n    this.height(controlBarHeight);\n    this.trigger('audioonlymodechange');\n  }\n  disableAudioOnlyUI_() {\n    this.removeClass('vjs-audio-only-mode');\n    this.off('playerresize', this.boundUpdatePlayerHeightOnAudioOnlyMode_);\n\n    // Show player components that were previously hidden\n    this.audioOnlyCache_.hiddenChildren.forEach(child => child.show());\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  audioOnlyMode(value) {\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      const 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(() => this.enableAudioOnlyUI_());\n    }\n\n    // Disable Audio Only Mode\n    return Promise.resolve().then(() => this.disableAudioOnlyUI_());\n  }\n  enablePosterModeUI_() {\n    // Hide the video element and show the poster image to enable posterModeUI\n    const tech = this.tech_ && this.tech_;\n    tech.hide();\n    this.addClass('vjs-audio-poster-mode');\n    this.trigger('audiopostermodechange');\n  }\n  disablePosterModeUI_() {\n    // Show the video element and hide the poster image to disable posterModeUI\n    const 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  audioPosterMode(value) {\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        const audioOnlyModePromise = this.audioOnlyMode(false);\n        return audioOnlyModePromise.then(() => {\n          // enable audio poster mode after audio only mode is disabled\n          this.enablePosterModeUI_();\n        });\n      }\n      return Promise.resolve().then(() => {\n        // enable audio poster mode\n        this.enablePosterModeUI_();\n      });\n    }\n    return Promise.resolve().then(() => {\n      // disable audio poster mode\n      this.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  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 {HtmlTrackElement}\n   *         the HTMLTrackElement that was created and added\n   *         to the HtmlTrackElementList and the remote\n   *         TextTrackList\n   *\n   */\n  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  removeRemoteTextTrack(obj = {}) {\n    let {\n      track\n    } = obj;\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  getVideoPlaybackQuality() {\n    return this.techGet_('getVideoPlaybackQuality');\n  }\n\n  /**\n   * Get video width\n   *\n   * @return {number}\n   *         current video width\n   */\n  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  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  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  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  toJSON() {\n    const options = merge$1(this.options_);\n    const tracks = options.tracks;\n    options.tracks = [];\n    for (let i = 0; i < tracks.length; i++) {\n      let track = tracks[i];\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[i] = 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  createModal(content, options) {\n    options = options || {};\n    options.content = content || '';\n    const modal = new ModalDialog(this, options);\n    this.addChild(modal);\n    modal.on('dispose', () => {\n      this.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  updateCurrentBreakpoint_() {\n    if (!this.responsive()) {\n      return;\n    }\n    const currentBreakpoint = this.currentBreakpoint();\n    const currentWidth = this.currentWidth();\n    for (let i = 0; i < BREAKPOINT_ORDER.length; i++) {\n      const candidateBreakpoint = BREAKPOINT_ORDER[i];\n      const 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  removeCurrentBreakpoint_() {\n    const 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  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  responsive(value) {\n    // Used as a getter.\n    if (value === undefined) {\n      return this.responsive_;\n    }\n    value = Boolean(value);\n    const 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  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  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  loadMedia(media, ready) {\n    if (!media || typeof media !== 'object') {\n      return;\n    }\n    const 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    const {\n      artist,\n      artwork,\n      description,\n      poster,\n      src,\n      textTracks,\n      title\n    } = this.cache_.media;\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(tt => this.addRemoteTextTrack(tt, false));\n    }\n    if (this.titleBar) {\n      this.titleBar.update({\n        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  getMedia() {\n    if (!this.cache_.media) {\n      const poster = this.poster();\n      const src = this.currentSources();\n      const textTracks = Array.prototype.map.call(this.remoteTextTracks(), tt => ({\n        kind: tt.kind,\n        label: tt.label,\n        language: tt.language,\n        src: tt.src\n      }));\n      const media = {\n        src,\n        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  static getTagSettings(tag) {\n    const baseOptions = {\n      sources: [],\n      tracks: []\n    };\n    const tagOptions = getAttributes(tag);\n    const 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      try {\n        // If empty string, make it a parsable json object.\n        Object.assign(tagOptions, JSON.parse(dataSetup || '{}'));\n      } catch (e) {\n        log$1.error('data-setup', e);\n      }\n    }\n    Object.assign(baseOptions, tagOptions);\n\n    // Get tag children settings\n    if (tag.hasChildNodes()) {\n      const children = tag.childNodes;\n      for (let i = 0, j = children.length; i < j; i++) {\n        const child = children[i];\n        // Change case needed: http://ejohn.org/blog/nodename-case-sensitivity/\n        const 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  /**\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  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  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(rate => typeof rate === 'number')) {\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  /**\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 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}\n\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/**\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/**\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/**\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/**\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 */\n\nALL.names.forEach(function (name) {\n  const 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 = {};\nconst 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  spatialNavigation: {\n    enabled: false,\n    horizontalSeek: false\n  },\n  // Default smooth seeking to false\n  enableSmoothSeeking: false\n};\nTECH_EVENTS_RETRIGGER.forEach(function (event) {\n  Player.prototype[`handleTech${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\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 */\nconst 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 */\nconst PLUGIN_CACHE_KEY = 'activePlugins_';\n\n/**\n * Stores registered plugins in a private space.\n *\n * @private\n * @type    {Object}\n */\nconst 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 */\nconst pluginExists = name => pluginStorage.hasOwnProperty(name);\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 */\nconst getPlugin = name => pluginExists(name) ? pluginStorage[name] : undefined;\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 */\nconst 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 */\nconst triggerSetupEvent = (player, hash, before) => {\n  const 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 */\nconst createBasicPlugin = function (name, plugin) {\n  const basicPluginWrapper = function () {\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,\n      plugin,\n      instance: null\n    }, true);\n    const instance = plugin.apply(this, arguments);\n    markPluginAsActive(this, name);\n    triggerSetupEvent(this, {\n      name,\n      plugin,\n      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 */\nconst 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 (...args) {\n    triggerSetupEvent(this, {\n      name,\n      plugin: PluginSubClass,\n      instance: null\n    }, true);\n    const instance = new PluginSubClass(...[this, ...args]);\n\n    // The plugin is replaced by a function that returns the current instance.\n    this[name] = () => instance;\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 */\nclass Plugin {\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  constructor(player) {\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  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  getEventHash(hash = {}) {\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  trigger(event, hash = {}) {\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  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  dispose() {\n    const {\n      name,\n      player\n    } = this;\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  static isBasic(plugin) {\n    const 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  static registerPlugin(name, plugin) {\n    if (typeof name !== 'string') {\n      throw new Error(`Illegal plugin name, \"${name}\", must be a string, was ${typeof name}.`);\n    }\n    if (pluginExists(name)) {\n      log$1.warn(`A plugin named \"${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, \"${name}\", cannot share a name with an existing player method!`);\n    }\n    if (typeof plugin !== 'function') {\n      throw new Error(`Illegal plugin for \"${name}\", must be a function, was ${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  static 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  static getPlugins(names = Object.keys(pluginStorage)) {\n    let result;\n    names.forEach(name => {\n      const 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  static getPluginVersion(name) {\n    const plugin = getPlugin(name);\n    return plugin && plugin.VERSION || '';\n  }\n}\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  let warned = false;\n  return function (...args) {\n    if (!warned) {\n      log$1.warn(message);\n    }\n    warned = true;\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(`${oldName} is deprecated and will be removed in ${major}.0; please use ${newName} instead.`, fn);\n}\n\nvar VjsErrors = {\n  NetworkBadStatus: 'networkbadstatus',\n  NetworkRequestFailed: 'networkrequestfailed',\n  NetworkRequestAborted: 'networkrequestaborted',\n  NetworkRequestTimeout: 'networkrequesttimeout',\n  NetworkBodyParserFailed: 'networkbodyparserfailed',\n  StreamingHlsPlaylistParserError: 'streaminghlsplaylistparsererror',\n  StreamingDashManifestParserError: 'streamingdashmanifestparsererror',\n  StreamingContentSteeringParserError: 'streamingcontentsteeringparsererror',\n  StreamingVttParserError: 'streamingvttparsererror',\n  StreamingFailedToSelectNextSegment: 'streamingfailedtoselectnextsegment',\n  StreamingFailedToDecryptSegment: 'streamingfailedtodecryptsegment',\n  StreamingFailedToTransmuxSegment: 'streamingfailedtotransmuxsegment',\n  StreamingFailedToAppendSegment: 'streamingfailedtoappendsegment',\n  StreamingCodecsChangeError: 'streamingcodecschangeerror'\n};\n\n/**\n * @file video.js\n * @module videojs\n */\n\n/** @import { PlayerReadyCallback } from './player' */\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 */\nconst normalizeId = id => id.indexOf('#') === 0 ? id.slice(1) : id;\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  {PlayerReadyCallback} [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  let player = videojs.getPlayer(id);\n  if (player) {\n    if (options) {\n      log$1.warn(`Player \"${id}\" is already initialised. Options will not be applied.`);\n    }\n    if (ready) {\n      player.ready(ready);\n    }\n    return player;\n  }\n  const 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  const inShadowDom = 'getRootNode' in el ? el.getRootNode() instanceof window$1.ShadowRoot : false;\n  const 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 && el.parentNode.hasAttribute('data-vjs-player') ? el.parentNode : el).cloneNode(true);\n  }\n  hooks('beforesetup').forEach(hookFunction => {\n    const 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  const PlayerComponent = Component$1.getComponent('Player');\n  player = new PlayerComponent(el, options, ready);\n  hooks('setup').forEach(hookFunction => hookFunction(player));\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  let style = $('.vjs-styles-defaults');\n  if (!style) {\n    style = createStyleElement('vjs-styles-defaults');\n    const 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 = () => Player.players;\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 = id => {\n  const players = Player.players;\n  let tag;\n  if (typeof id === 'string') {\n    const nId = normalizeId(id);\n    const player = players[nId];\n    if (player) {\n      return player;\n    }\n    tag = $('#' + nId);\n  } else {\n    tag = id;\n  }\n  if (isEl(tag)) {\n    const {\n      player,\n      playerId\n    } = tag;\n\n    // Element may have a `player` property referring to an already created\n    // player instance. If so, return that.\n    if (player || players[playerId]) {\n      return player || 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 = () =>\n// Disposed players leave a key with a `null` value, so we need to make sure\n// we filter those out.\nObject.keys(Player.players).map(k => Player.players[k]).filter(Boolean);\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 = (name, comp) => {\n  if (Tech.isTech(comp)) {\n    log$1.warn(`The ${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 = (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, {\n    [code]: data\n  });\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(k => {\n  videojs[k] = function () {\n    log$1.warn(`videojs.${k}() is deprecated; use videojs.dom.${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// The list of possible error types to occur in video.js\nvideojs.Error = VjsErrors;\n\n/*! @name videojs-contrib-quality-levels @version 4.1.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 */\nclass QualityLevel {\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   */\n  constructor(representation) {\n    let 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() {\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(enable) {\n        level.enabled_(enable);\n      }\n    });\n    return level;\n  }\n}\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 */\nclass QualityLevelList extends videojs.EventTarget {\n  /**\n   * Creates a QualityLevelList.\n   */\n  constructor() {\n    super();\n    let list = this; // eslint-disable-line\n\n    list.levels_ = [];\n    list.selectedIndex_ = -1;\n\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    Object.defineProperty(list, 'selectedIndex', {\n      get() {\n        return list.selectedIndex_;\n      }\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    Object.defineProperty(list, 'length', {\n      get() {\n        return list.levels_.length;\n      }\n    });\n    list[Symbol.iterator] = () => list.levels_.values();\n    return list;\n  }\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  addQualityLevel(representation) {\n    let qualityLevel = this.getQualityLevelById(representation.id);\n\n    // Do not add duplicate quality levels\n    if (qualityLevel) {\n      return qualityLevel;\n    }\n    const index = this.levels_.length;\n    qualityLevel = new QualityLevel(representation);\n    if (!('' + index in this)) {\n      Object.defineProperty(this, index, {\n        get() {\n          return this.levels_[index];\n        }\n      });\n    }\n    this.levels_.push(qualityLevel);\n    this.trigger({\n      qualityLevel,\n      type: 'addqualitylevel'\n    });\n    return qualityLevel;\n  }\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  removeQualityLevel(qualityLevel) {\n    let removed = null;\n    for (let i = 0, l = this.length; i < l; i++) {\n      if (this[i] === qualityLevel) {\n        removed = this.levels_.splice(i, 1)[0];\n        if (this.selectedIndex_ === i) {\n          this.selectedIndex_ = -1;\n        } else if (this.selectedIndex_ > i) {\n          this.selectedIndex_--;\n        }\n        break;\n      }\n    }\n    if (removed) {\n      this.trigger({\n        qualityLevel,\n        type: 'removequalitylevel'\n      });\n    }\n    return removed;\n  }\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  getQualityLevelById(id) {\n    for (let i = 0, l = this.length; i < l; i++) {\n      const level = this[i];\n      if (level.id === id) {\n        return level;\n      }\n    }\n    return null;\n  }\n\n  /**\n   * Resets the list of QualityLevels to empty\n   *\n   * @method dispose\n   */\n  dispose() {\n    this.selectedIndex_ = -1;\n    this.levels_.length = 0;\n  }\n}\n\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};\n\n// emulate attribute EventHandler support to allow for feature detection\nfor (const event in QualityLevelList.prototype.allowedEvents_) {\n  QualityLevelList.prototype['on' + event] = null;\n}\nvar version$5 = \"4.1.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 */\nconst initPlugin$1 = function (player, options) {\n  const originalPluginFn = player.qualityLevels;\n  const qualityLevelList = new QualityLevelList();\n  const disposeHandler = function () {\n    qualityLevelList.dispose();\n    player.qualityLevels = originalPluginFn;\n    player.off('dispose', disposeHandler);\n  };\n  player.on('dispose', disposeHandler);\n  player.qualityLevels = () => qualityLevelList;\n  player.qualityLevels.VERSION = version$5;\n  return qualityLevelList;\n};\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 */\nconst qualityLevels = function (options) {\n  return initPlugin$1(this, videojs.obj.merge({}, options));\n};\n\n// Register the plugin with video.js.\nvideojs.registerPlugin('qualityLevels', qualityLevels);\n\n// Include the version number.\nqualityLevels.VERSION = version$5;\n\n/*! @name @videojs/http-streaming @version 3.15.0 @license Apache-2.0 */\n\n/**\n * @file resolve-url.js - Handling how URLs are resolved and manipulated\n */\nconst 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\nconst 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};\nconst logger = source => {\n  if (videojs.log.debug) {\n    return videojs.log.debug.bind(videojs, 'VHS:', `${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(...args) {\n  const context = videojs.obj || videojs;\n  const fn = context.merge || context.mergeOptions;\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(...args) {\n  const context = videojs.time || videojs;\n  const fn = context.createTimeRanges || context.createTimeRanges;\n  return fn.apply(context, args);\n}\n/**\n * Converts provided buffered ranges to a descriptive string\n *\n * @param {TimeRanges} buffered - received buffered time ranges\n *\n * @return {string} - descriptive string\n */\n\nfunction bufferedRangesToString(buffered) {\n  if (buffered.length === 0) {\n    return 'Buffered Ranges are empty';\n  }\n  let bufferedRangesStr = 'Buffered Ranges: \\n';\n  for (let i = 0; i < buffered.length; i++) {\n    const start = buffered.start(i);\n    const end = buffered.end(i);\n    bufferedRangesStr += `${start} --> ${end}. Duration (${end - start})\\n`;\n  }\n  return bufferedRangesStr;\n}\n\n/**\n * ranges\n *\n * Utilities for working with TimeRanges.\n *\n */\n\nconst 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\nconst SAFE_TIME_DELTA = TIME_FUDGE_FACTOR * 3;\nconst filterRanges = function (timeRanges, predicate) {\n  const results = [];\n  let 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\nconst findRange = function (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\nconst findNextRange = function (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\nconst findGaps = function (buffered) {\n  if (buffered.length < 2) {\n    return createTimeRanges();\n  }\n  const ranges = [];\n  for (let i = 1; i < buffered.length; i++) {\n    const start = buffered.end(i - 1);\n    const end = buffered.start(i);\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\nconst bufferIntersection = function (bufferA, bufferB) {\n  let start = null;\n  let end = null;\n  let arity = 0;\n  const extents = [];\n  const 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  let 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\nconst printableRange = range => {\n  const strArr = [];\n  if (!range || !range.length) {\n    return '';\n  }\n  for (let i = 0; i < range.length; i++) {\n    strArr.push(range.start(i) + ' => ' + range.end(i));\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\nconst timeUntilRebuffer = function (buffered, currentTime, playbackRate = 1) {\n  const 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\nconst timeRangesToArray = timeRanges => {\n  const timeRangesList = [];\n  for (let i = 0; i < timeRanges.length; i++) {\n    timeRangesList.push({\n      start: timeRanges.start(i),\n      end: timeRanges.end(i)\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\nconst isRangeDifferent = function (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 (let i = 0; i < a.length; i++) {\n    if (a.start(i) !== b.start(i) || a.end(i) !== b.end(i)) {\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};\nconst lastBufferedEnd = function (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\nconst timeAheadOf = function (range, startTime) {\n  let time = 0;\n  if (!range || !range.length) {\n    return time;\n  }\n  for (let i = 0; i < range.length; i++) {\n    const start = range.start(i);\n    const end = range.end(i); // 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\nconst 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  let 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\nconst getPartsAndSegments = playlist => (playlist.segments || []).reduce((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,\n        segment\n      });\n    });\n  } else {\n    acc.push({\n      duration: segment.duration,\n      segmentIndex: si,\n      partIndex: null,\n      segment,\n      part: null\n    });\n  }\n  return acc;\n}, []);\nconst getLastParts = media => {\n  const lastSegment = media.segments && media.segments.length && media.segments[media.segments.length - 1];\n  return lastSegment && lastSegment.parts || [];\n};\nconst getKnownPartCount = ({\n  preloadSegment\n}) => {\n  if (!preloadSegment) {\n    return;\n  }\n  const {\n    parts,\n    preloadHints\n  } = preloadSegment;\n  let partCount = (preloadHints || []).reduce((count, hint) => count + (hint.type === 'PART' ? 1 : 0), 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\nconst 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  const 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\nconst backwardDuration = function (playlist, endSequence) {\n  let result = 0;\n  let i = endSequence - playlist.mediaSequence; // if a start time is available for segment immediately following\n  // the interval, use it\n\n  let 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,\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\nconst forwardDuration = function (playlist, endSequence) {\n  let result = 0;\n  let segment;\n  let 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\nconst intervalDuration = function (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  const 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  const 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\nconst duration = function (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\nconst sumDurations = function ({\n  defaultDuration,\n  durationList,\n  startIndex,\n  endIndex\n}) {\n  let durations = 0;\n  if (startIndex > endIndex) {\n    [startIndex, endIndex] = [endIndex, startIndex];\n  }\n  if (startIndex < 0) {\n    for (let i = startIndex; i < Math.min(0, endIndex); i++) {\n      durations += defaultDuration;\n    }\n    startIndex = 0;\n  }\n  for (let i = startIndex; i < endIndex; i++) {\n    durations += durationList[i].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\nconst playlistEnd = function (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  let 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\nconst seekable = function (playlist, expired, liveEdgePadding) {\n  const useSafeLiveEnd = true;\n  const seekableStart = expired || 0;\n  let 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\nconst getMediaInfoForTime = function ({\n  playlist,\n  currentTime,\n  startingSegmentIndex,\n  startingPartIndex,\n  startTime,\n  exactManifestTimings\n}) {\n  let time = currentTime - startTime;\n  const partsAndSegments = getPartsAndSegments(playlist);\n  let startIndex = 0;\n  for (let i = 0; i < partsAndSegments.length; i++) {\n    const partAndSegment = partsAndSegments[i];\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 = i;\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 (let i = startIndex - 1; i >= 0; i--) {\n        const partAndSegment = partsAndSegments[i];\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,\n            endIndex: i\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 (let i = startIndex; i < 0; i++) {\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 (let i = startIndex; i < partsAndSegments.length; i++) {\n    const partAndSegment = partsAndSegments[i];\n    time -= partAndSegment.duration;\n    const canUseFudgeFactor = partAndSegment.duration > TIME_FUDGE_FACTOR;\n    const isExactlyAtTheEnd = time === 0;\n    const isExtremelyCloseToTheEnd = canUseFudgeFactor && time + TIME_FUDGE_FACTOR >= 0;\n    if (isExactlyAtTheEnd || isExtremelyCloseToTheEnd) {\n      // 1) We are exactly at the end of the current segment.\n      // 2) We are extremely close to the end of the current segment (The difference is less than  1 / 30).\n      //    We may encounter this situation when\n      //    we don't have exact match between segment duration info in the manifest and the actual duration of the segment\n      //    For example:\n      //    We appended 3 segments 10 seconds each, meaning we should have 30 sec buffered,\n      //    but we the actual buffered is 29.99999\n      //\n      // In both cases:\n      // if we passed current time -> it means that we already played current segment\n      // if we passed buffered.end -> it means that this segment is already loaded and buffered\n      // we should select the next segment if we have one:\n      if (i !== partsAndSegments.length - 1) {\n        continue;\n      }\n    }\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,\n        endIndex: i\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\nconst isExcluded = function (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\nconst isIncompatible = function (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\nconst isEnabled = function (playlist) {\n  const 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\nconst isDisabled = function (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\nconst isAes = function (media) {\n  for (let i = 0; i < media.segments.length; i++) {\n    if (media.segments[i].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\nconst hasAttribute = function (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\nconst estimateSegmentRequestTime = function (segmentDuration, bandwidth, playlist, bytesReceived = 0) {\n  if (!hasAttribute('BANDWIDTH', playlist)) {\n    return NaN;\n  }\n  const 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\nconst isLowestEnabledRendition = (main, media) => {\n  if (main.playlists.length === 1) {\n    return true;\n  }\n  const currentBandwidth = media.attributes.BANDWIDTH || Number.MAX_VALUE;\n  return main.playlists.filter(playlist => {\n    if (!isEnabled(playlist)) {\n      return false;\n    }\n    return (playlist.attributes.BANDWIDTH || 0) < currentBandwidth;\n  }).length === 0;\n};\nconst 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};\nconst someAudioVariant = function (main, callback) {\n  const AUDIO = main && main.mediaGroups && main.mediaGroups.AUDIO || {};\n  let found = false;\n  for (const groupName in AUDIO) {\n    for (const 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};\nconst 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    const found = someAudioVariant(main, variant => variant.playlists && variant.playlists.length || variant.uri);\n    return found;\n  } // if every playlist has only an audio codec it is audio only\n\n  for (let i = 0; i < main.playlists.length; i++) {\n    const playlist = main.playlists[i];\n    const CODECS = playlist.attributes && playlist.attributes.CODECS; // all codecs are audio, this is an audio playlist.\n\n    if (CODECS && CODECS.split(',').every(c => isAudioCodec(c))) {\n      continue;\n    } // playlist is in an audio group it is audio only\n\n    const found = someAudioVariant(main, variant => playlistMatch(playlist, variant));\n    if (found) {\n      continue;\n    } // if we make it here this playlist isn't audio and we\n    // are not audio only\n\n    return false;\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,\n  duration,\n  seekable,\n  getMediaInfoForTime,\n  isEnabled,\n  isDisabled,\n  isExcluded,\n  isIncompatible,\n  playlistEnd,\n  isAes,\n  hasAttribute,\n  estimateSegmentRequestTime,\n  isLowestEnabledRendition,\n  isAudioOnly,\n  playlistMatch,\n  segmentDurationWithParts\n};\nconst {\n  log\n} = videojs;\nconst createPlaylistID = (index, uri) => {\n  return `${index}-${uri}`;\n}; // default function for creating a group id\n\nconst groupID = (type, group, label) => {\n  return `placeholder-uri-${type}-${group}-${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\nconst parseManifest = ({\n  onwarn,\n  oninfo,\n  manifestString,\n  customTagParsers = [],\n  customTagMappers = [],\n  llhls\n}) => {\n  const parser = new Parser();\n  if (onwarn) {\n    parser.on('warn', onwarn);\n  }\n  if (oninfo) {\n    parser.on('info', oninfo);\n  }\n  customTagParsers.forEach(customParser => parser.addParser(customParser));\n  customTagMappers.forEach(mapper => parser.addTagMapper(mapper));\n  parser.push(manifestString);\n  parser.end();\n  const 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    let targetDuration = 10;\n    if (manifest.segments && manifest.segments.length) {\n      targetDuration = manifest.segments.reduce((acc, s) => Math.max(acc, s.duration), 0);\n    }\n    if (onwarn) {\n      onwarn({\n        message: `manifest has no targetDuration defaulting to ${targetDuration}`\n      });\n    }\n    manifest.targetDuration = targetDuration;\n  }\n  const parts = getLastParts(manifest);\n  if (parts.length && !manifest.partTargetDuration) {\n    const partTargetDuration = parts.reduce((acc, p) => Math.max(acc, p.duration), 0);\n    if (onwarn) {\n      onwarn({\n        message: `manifest has no partTargetDuration defaulting to ${partTargetDuration}`\n      });\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\nconst forEachMediaGroup = (main, callback) => {\n  if (!main.mediaGroups) {\n    return;\n  }\n  ['AUDIO', 'SUBTITLES'].forEach(mediaType => {\n    if (!main.mediaGroups[mediaType]) {\n      return;\n    }\n    for (const groupKey in main.mediaGroups[mediaType]) {\n      for (const labelKey in main.mediaGroups[mediaType][groupKey]) {\n        const 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\nconst setupMediaPlaylist = ({\n  playlist,\n  uri,\n  id\n}) => {\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\nconst setupMediaPlaylists = main => {\n  let i = main.playlists.length;\n  while (i--) {\n    const playlist = main.playlists[i];\n    setupMediaPlaylist({\n      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\nconst resolveMediaGroupUris = main => {\n  forEachMediaGroup(main, 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\nconst mainForMedia = (media, uri) => {\n  const id = createPlaylistID(0, uri);\n  const 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,\n      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\nconst addPropertiesToMain = (main, uri, createGroupID = groupID) => {\n  main.uri = uri;\n  for (let i = 0; i < main.playlists.length; i++) {\n    if (!main.playlists[i].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      const phonyUri = `placeholder-uri-${i}`;\n      main.playlists[i].uri = phonyUri;\n    }\n  }\n  const audioOnlyMain = isAudioOnly(main);\n  forEachMediaGroup(main, (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 (let i = 0; i < main.playlists.length; i++) {\n          const p = main.playlists[i];\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      const groupId = createGroupID(mediaType, groupKey, labelKey, p);\n      const 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};\nclass DateRangesStorage {\n  constructor() {\n    this.offset_ = null;\n    this.pendingDateRanges_ = new Map();\n    this.processedDateRanges_ = new Map();\n  }\n  setOffset(segments = []) {\n    // already set\n    if (this.offset_ !== null) {\n      return;\n    } // no segment to process\n\n    if (!segments.length) {\n      return;\n    }\n    const [firstSegment] = segments; // 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  setPendingDateRanges(dateRanges = []) {\n    if (!dateRanges.length) {\n      return;\n    }\n    const [dateRange] = dateRanges;\n    const startTime = dateRange.startDate.getTime();\n    this.trimProcessedDateRanges_(startTime);\n    this.pendingDateRanges_ = dateRanges.reduce((map, pendingDateRange) => {\n      map.set(pendingDateRange.id, pendingDateRange);\n      return map;\n    }, new Map());\n  }\n  processDateRange(dateRange) {\n    this.pendingDateRanges_.delete(dateRange.id);\n    this.processedDateRanges_.set(dateRange.id, dateRange);\n  }\n  getDateRangesToProcess() {\n    if (this.offset_ === null) {\n      return [];\n    }\n    const dateRangeClasses = {};\n    const dateRangesToProcess = [];\n    this.pendingDateRanges_.forEach((dateRange, id) => {\n      if (this.processedDateRanges_.has(id)) {\n        return;\n      }\n      dateRange.startTime = dateRange.startDate.getTime() / 1000 - this.offset_;\n      dateRange.processDateRange = () => this.processDateRange(dateRange);\n      dateRangesToProcess.push(dateRange);\n      if (!dateRange.class) {\n        return;\n      }\n      if (dateRangeClasses[dateRange.class]) {\n        const 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 (const dateRange of dateRangesToProcess) {\n      const 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  trimProcessedDateRanges_(startTime) {\n    const copy = new Map(this.processedDateRanges_);\n    copy.forEach((dateRange, id) => {\n      if (dateRange.startDate.getTime() < startTime) {\n        this.processedDateRanges_.delete(id);\n      }\n    });\n  }\n}\nconst QUOTA_EXCEEDED_ERR = 22;\nconst getStreamingNetworkErrorMetadata = ({\n  requestType,\n  request,\n  error,\n  parseFailure\n}) => {\n  const isBadStatus = request.status < 200 || request.status > 299;\n  const isFailure = request.status >= 400 && request.status <= 499;\n  const errorMetadata = {\n    uri: request.uri,\n    requestType\n  };\n  const isBadStatusOrParseFailure = isBadStatus && !isFailure || parseFailure;\n  if (error && isFailure) {\n    // copy original error and add to the metadata.\n    errorMetadata.error = _extends({}, error);\n    errorMetadata.errorType = videojs.Error.NetworkRequestFailed;\n  } else if (request.aborted) {\n    errorMetadata.errorType = videojs.Error.NetworkRequestAborted;\n  } else if (request.timedout) {\n    errorMetadata.erroType = videojs.Error.NetworkRequestTimeout;\n  } else if (isBadStatusOrParseFailure) {\n    const errorType = parseFailure ? videojs.Error.NetworkBodyParserFailed : videojs.Error.NetworkBadStatus;\n    errorMetadata.errorType = errorType;\n    errorMetadata.status = request.status;\n    errorMetadata.headers = request.headers;\n  }\n  return errorMetadata;\n};\nconst {\n  EventTarget: EventTarget$1\n} = videojs;\nconst addLLHLSQueryDirectives = (uri, media) => {\n  if (media.endList || !media.serverControl) {\n    return uri;\n  }\n  const parameters = {};\n  if (media.serverControl.canBlockReload) {\n    const {\n      preloadSegment\n    } = media; // next msn is a zero based value, length is not.\n\n    let 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      const parts = preloadSegment.parts || []; // _HLS_part is a zero based index\n\n      const 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    const 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\nconst updateSegment = (a, b) => {\n  if (!a) {\n    return b;\n  }\n  const 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 (let i = 0; i < b.parts.length; i++) {\n      if (a.parts && a.parts[i]) {\n        result.parts[i] = merge(a.parts[i], b.parts[i]);\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\nconst updateSegments = (original, update, offset) => {\n  const oldSegments = original.slice();\n  const newSegments = update.slice();\n  offset = offset || 0;\n  const result = [];\n  let currentMap;\n  for (let newIndex = 0; newIndex < newSegments.length; newIndex++) {\n    const oldSegment = oldSegments[newIndex + offset];\n    const 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};\nconst 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(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(p => {\n      if (p.resolvedUri) {\n        return;\n      }\n      p.resolvedUri = resolveUrl(baseUri, p.uri);\n    });\n  }\n};\nconst getAllSegments = function (media) {\n  const segments = media.segments || [];\n  const 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 (let i = 0; i < preloadSegment.preloadHints.length; i++) {\n        if (preloadSegment.preloadHints[i].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\nconst isPlaylistUnchanged = (a, b) => 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  * 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\nconst updateMain$1 = (main, newMedia, unchangedCheck = isPlaylistUnchanged) => {\n  const result = merge(main, {});\n  const 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  const 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 (let i = 0; i < newMedia.skip.skippedSegments; i++) {\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(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 (let i = 0; i < result.playlists.length; i++) {\n    if (result.playlists[i].id === newMedia.id) {\n      result.playlists[i] = 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, (properties, mediaType, groupKey, labelKey) => {\n    if (!properties.playlists) {\n      return;\n    }\n    for (let i = 0; i < properties.playlists.length; i++) {\n      if (newMedia.id === properties.playlists[i].id) {\n        properties.playlists[i] = 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\nconst refreshDelay = (media, update) => {\n  const segments = media.segments || [];\n  const lastSegment = segments[segments.length - 1];\n  const lastPart = lastSegment && lastSegment.parts && lastSegment.parts[lastSegment.parts.length - 1];\n  const 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};\nconst playlistMetadataPayload = (playlists, type, isLive) => {\n  if (!playlists) {\n    return;\n  }\n  const renditions = [];\n  playlists.forEach(playlist => {\n    // we need attributes to populate rendition data.\n    if (!playlist.attributes) {\n      return;\n    }\n    const {\n      BANDWIDTH,\n      RESOLUTION,\n      CODECS\n    } = playlist.attributes;\n    renditions.push({\n      id: playlist.id,\n      bandwidth: BANDWIDTH,\n      resolution: RESOLUTION,\n      codecs: CODECS\n    });\n  });\n  return {\n    type,\n    isLive,\n    renditions\n  };\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 */\n\nclass PlaylistLoader extends EventTarget$1 {\n  constructor(src, vhs, options = {}) {\n    super();\n    if (!src) {\n      throw new Error('A non-empty playlist URL or object is required');\n    }\n    this.logger_ = logger('PlaylistLoader');\n    const {\n      withCredentials = false\n    } = options;\n    this.src = src;\n    this.vhs_ = vhs;\n    this.withCredentials = withCredentials;\n    this.addDateRangesToTextTrack_ = options.addDateRangesToTextTrack;\n    const vhsOptions = vhs.options_;\n    this.customTagParsers = vhsOptions && vhsOptions.customTagParsers || [];\n    this.customTagMappers = vhsOptions && vhsOptions.customTagMappers || [];\n    this.llhls = vhsOptions && vhsOptions.llhls;\n    this.dateRangesStorage_ = new DateRangesStorage(); // initialize the loader state\n\n    this.state = 'HAVE_NOTHING'; // live playlist staleness timeout\n\n    this.handleMediaupdatetimeout_ = this.handleMediaupdatetimeout_.bind(this);\n    this.on('mediaupdatetimeout', this.handleMediaupdatetimeout_);\n    this.on('loadedplaylist', this.handleLoadedPlaylist_.bind(this));\n  }\n  handleLoadedPlaylist_() {\n    const mediaPlaylist = this.media();\n    if (!mediaPlaylist) {\n      return;\n    }\n    this.dateRangesStorage_.setOffset(mediaPlaylist.segments);\n    this.dateRangesStorage_.setPendingDateRanges(mediaPlaylist.dateRanges);\n    const availableDateRanges = this.dateRangesStorage_.getDateRangesToProcess();\n    if (!availableDateRanges.length || !this.addDateRangesToTextTrack_) {\n      return;\n    }\n    this.addDateRangesToTextTrack_(availableDateRanges);\n  }\n  handleMediaupdatetimeout_() {\n    if (this.state !== 'HAVE_METADATA') {\n      // only refresh the media playlist if no other activity is going on\n      return;\n    }\n    const media = this.media();\n    let 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,\n      withCredentials: this.withCredentials,\n      requestType: 'hls-playlist'\n    }, (error, req) => {\n      // disposed\n      if (!this.request) {\n        return;\n      }\n      if (error) {\n        return this.playlistRequestError(this.request, this.media(), 'HAVE_METADATA');\n      }\n      this.haveMetadata({\n        playlistString: this.request.responseText,\n        url: this.media().uri,\n        id: this.media().id\n      });\n    });\n  }\n  playlistRequestError(xhr, playlist, startingState) {\n    const {\n      uri,\n      id\n    } = playlist; // 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: ${uri}.`,\n      responseText: xhr.responseText,\n      code: xhr.status >= 500 ? 4 : 2,\n      metadata: getStreamingNetworkErrorMetadata({\n        requestType: xhr.requestType,\n        request: xhr,\n        error: xhr.error\n      })\n    };\n    this.trigger('error');\n  }\n  parseManifest_({\n    url,\n    manifestString\n  }) {\n    try {\n      return parseManifest({\n        onwarn: ({\n          message\n        }) => this.logger_(`m3u8-parser warn for ${url}: ${message}`),\n        oninfo: ({\n          message\n        }) => this.logger_(`m3u8-parser info for ${url}: ${message}`),\n        manifestString,\n        customTagParsers: this.customTagParsers,\n        customTagMappers: this.customTagMappers,\n        llhls: this.llhls\n      });\n    } catch (error) {\n      this.error = error;\n      this.error.metadata = {\n        errorType: videojs.Error.StreamingHlsPlaylistParserError,\n        error\n      };\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  haveMetadata({\n    playlistString,\n    playlistObject,\n    url,\n    id\n  }) {\n    // any in-flight request is now finished\n    this.request = null;\n    this.state = 'HAVE_METADATA';\n    const metadata = {\n      playlistInfo: {\n        type: 'media',\n        uri: url\n      }\n    };\n    this.trigger({\n      type: 'playlistparsestart',\n      metadata\n    });\n    const playlist = playlistObject || this.parseManifest_({\n      url,\n      manifestString: playlistString\n    });\n    playlist.lastRequest = Date.now();\n    setupMediaPlaylist({\n      playlist,\n      uri: url,\n      id\n    }); // merge this playlist into the main manifest\n\n    const 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    metadata.parsedPlaylist = playlistMetadataPayload(this.main.playlists, metadata.playlistInfo.type, !this.media_.endList);\n    this.trigger({\n      type: 'playlistparsecomplete',\n      metadata\n    });\n    this.trigger('loadedplaylist');\n  }\n  /**\n    * Abort any outstanding work and clean up.\n    */\n\n  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  stopRequest() {\n    if (this.request) {\n      const 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  media(playlist, shouldDelay) {\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      const 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    const startingState = this.state;\n    const mediaChange = !this.media_ || playlist.id !== this.media_.id;\n    const 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    const metadata = {\n      playlistInfo: {\n        type: 'media',\n        uri: playlist.uri\n      }\n    };\n    this.trigger({\n      type: 'playlistrequeststart',\n      metadata\n    });\n    this.request = this.vhs_.xhr({\n      uri: playlist.resolvedUri,\n      withCredentials: this.withCredentials,\n      requestType: 'hls-playlist'\n    }, (error, req) => {\n      // disposed\n      if (!this.request) {\n        return;\n      }\n      playlist.lastRequest = Date.now();\n      playlist.resolvedUri = resolveManifestRedirect(playlist.resolvedUri, req);\n      if (error) {\n        return this.playlistRequestError(this.request, playlist, startingState);\n      }\n      this.trigger({\n        type: 'playlistrequestcomplete',\n        metadata\n      });\n      this.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        this.trigger('loadedmetadata');\n      } else {\n        this.trigger('mediachange');\n      }\n    });\n  }\n  /**\n   * pause loading of the playlist\n   */\n\n  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  load(shouldDelay) {\n    if (this.mediaUpdateTimeout) {\n      window$1.clearTimeout(this.mediaUpdateTimeout);\n      this.mediaUpdateTimeout = null;\n    }\n    const media = this.media();\n    if (shouldDelay) {\n      const delay = media ? (media.partTargetDuration || media.targetDuration) / 2 * 1000 : 5 * 1000;\n      this.mediaUpdateTimeout = window$1.setTimeout(() => {\n        this.mediaUpdateTimeout = null;\n        this.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  updateMediaUpdateTimeout_(delay) {\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(() => {\n      this.mediaUpdateTimeout = null;\n      this.trigger('mediaupdatetimeout');\n      this.updateMediaUpdateTimeout_(delay);\n    }, delay);\n  }\n  /**\n   * start loading of the playlist\n   */\n\n  start() {\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(() => {\n        this.setupInitialPlaylist(this.src);\n      }, 0);\n      return;\n    }\n    const metadata = {\n      playlistInfo: {\n        type: 'multivariant',\n        uri: this.src\n      }\n    };\n    this.trigger({\n      type: 'playlistrequeststart',\n      metadata\n    }); // request the specified URL\n\n    this.request = this.vhs_.xhr({\n      uri: this.src,\n      withCredentials: this.withCredentials,\n      requestType: 'hls-playlist'\n    }, (error, req) => {\n      // disposed\n      if (!this.request) {\n        return;\n      } // clear the loader's request reference\n\n      this.request = null;\n      if (error) {\n        this.error = {\n          status: req.status,\n          message: `HLS playlist request error at URL: ${this.src}.`,\n          responseText: req.responseText,\n          // MEDIA_ERR_NETWORK\n          code: 2,\n          metadata: getStreamingNetworkErrorMetadata({\n            requestType: req.requestType,\n            request: req,\n            error\n          })\n        };\n        if (this.state === 'HAVE_NOTHING') {\n          this.started = false;\n        }\n        return this.trigger('error');\n      }\n      this.trigger({\n        type: 'playlistrequestcomplete',\n        metadata\n      });\n      this.src = resolveManifestRedirect(this.src, req);\n      this.trigger({\n        type: 'playlistparsestart',\n        metadata\n      });\n      const manifest = this.parseManifest_({\n        manifestString: req.responseText,\n        url: this.src\n      }); // we haven't loaded any variant playlists here so we default to false for isLive.\n\n      metadata.parsedPlaylist = playlistMetadataPayload(manifest.playlists, metadata.playlistInfo.type, false);\n      this.trigger({\n        type: 'playlistparsecomplete',\n        metadata\n      });\n      this.setupInitialPlaylist(manifest);\n    });\n  }\n  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  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(playlist => {\n        playlist.segments = getAllSegments(playlist);\n        playlist.segments.forEach(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    const 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   * Updates or deletes a preexisting pathway clone.\n   * Ensures that all playlists related to the old pathway clone are\n   * either updated or deleted.\n   *\n   * @param {Object} clone On update, the pathway clone object for the newly updated pathway clone.\n   *        On delete, the old pathway clone object to be deleted.\n   * @param {boolean} isUpdate True if the pathway is to be updated,\n   *        false if it is meant to be deleted.\n   */\n\n  updateOrDeleteClone(clone, isUpdate) {\n    const main = this.main;\n    const pathway = clone.ID;\n    let i = main.playlists.length; // Iterate backwards through the playlist so we can remove playlists if necessary.\n\n    while (i--) {\n      const p = main.playlists[i];\n      if (p.attributes['PATHWAY-ID'] === pathway) {\n        const oldPlaylistUri = p.resolvedUri;\n        const oldPlaylistId = p.id; // update the indexed playlist and add new playlists by ID and URI\n\n        if (isUpdate) {\n          const newPlaylistUri = this.createCloneURI_(p.resolvedUri, clone);\n          const newPlaylistId = createPlaylistID(pathway, newPlaylistUri);\n          const attributes = this.createCloneAttributes_(pathway, p.attributes);\n          const updatedPlaylist = this.createClonePlaylist_(p, newPlaylistId, clone, attributes);\n          main.playlists[i] = updatedPlaylist;\n          main.playlists[newPlaylistId] = updatedPlaylist;\n          main.playlists[newPlaylistUri] = updatedPlaylist;\n        } else {\n          // Remove the indexed playlist.\n          main.playlists.splice(i, 1);\n        } // Remove playlists by the old ID and URI.\n\n        delete main.playlists[oldPlaylistId];\n        delete main.playlists[oldPlaylistUri];\n      }\n    }\n    this.updateOrDeleteCloneMedia(clone, isUpdate);\n  }\n  /**\n   * Updates or deletes media data based on the pathway clone object.\n   * Due to the complexity of the media groups and playlists, in all cases\n   * we remove all of the old media groups and playlists.\n   * On updates, we then create new media groups and playlists based on the\n   * new pathway clone object.\n   *\n   * @param {Object} clone The pathway clone object for the newly updated pathway clone.\n   * @param {boolean} isUpdate True if the pathway is to be updated,\n   *        false if it is meant to be deleted.\n   */\n\n  updateOrDeleteCloneMedia(clone, isUpdate) {\n    const main = this.main;\n    const id = clone.ID;\n    ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(mediaType => {\n      if (!main.mediaGroups[mediaType] || !main.mediaGroups[mediaType][id]) {\n        return;\n      }\n      for (const groupKey in main.mediaGroups[mediaType]) {\n        // Remove all media playlists for the media group for this pathway clone.\n        if (groupKey === id) {\n          for (const labelKey in main.mediaGroups[mediaType][groupKey]) {\n            const oldMedia = main.mediaGroups[mediaType][groupKey][labelKey];\n            oldMedia.playlists.forEach((p, i) => {\n              const oldMediaPlaylist = main.playlists[p.id];\n              const oldPlaylistId = oldMediaPlaylist.id;\n              const oldPlaylistUri = oldMediaPlaylist.resolvedUri;\n              delete main.playlists[oldPlaylistId];\n              delete main.playlists[oldPlaylistUri];\n            });\n          } // Delete the old media group.\n\n          delete main.mediaGroups[mediaType][groupKey];\n        }\n      }\n    }); // Create the new media groups and playlists if there is an update.\n\n    if (isUpdate) {\n      this.createClonedMediaGroups_(clone);\n    }\n  }\n  /**\n   * Given a pathway clone object, clones all necessary playlists.\n   *\n   * @param {Object} clone The pathway clone object.\n   * @param {Object} basePlaylist The original playlist to clone from.\n   */\n\n  addClonePathway(clone, basePlaylist = {}) {\n    const main = this.main;\n    const index = main.playlists.length;\n    const uri = this.createCloneURI_(basePlaylist.resolvedUri, clone);\n    const playlistId = createPlaylistID(clone.ID, uri);\n    const attributes = this.createCloneAttributes_(clone.ID, basePlaylist.attributes);\n    const playlist = this.createClonePlaylist_(basePlaylist, playlistId, clone, attributes);\n    main.playlists[index] = playlist; // add playlist by ID and URI\n\n    main.playlists[playlistId] = playlist;\n    main.playlists[uri] = playlist;\n    this.createClonedMediaGroups_(clone);\n  }\n  /**\n   * Given a pathway clone object we create clones of all media.\n   * In this function, all necessary information and updated playlists\n   * are added to the `mediaGroup` object.\n   * Playlists are also added to the `playlists` array so the media groups\n   * will be properly linked.\n   *\n   * @param {Object} clone The pathway clone object.\n   */\n\n  createClonedMediaGroups_(clone) {\n    const id = clone.ID;\n    const baseID = clone['BASE-ID'];\n    const main = this.main;\n    ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(mediaType => {\n      // If the media type doesn't exist, or there is already a clone, skip\n      // to the next media type.\n      if (!main.mediaGroups[mediaType] || main.mediaGroups[mediaType][id]) {\n        return;\n      }\n      for (const groupKey in main.mediaGroups[mediaType]) {\n        if (groupKey === baseID) {\n          // Create the group.\n          main.mediaGroups[mediaType][id] = {};\n        } else {\n          // There is no need to iterate over label keys in this case.\n          continue;\n        }\n        for (const labelKey in main.mediaGroups[mediaType][groupKey]) {\n          const oldMedia = main.mediaGroups[mediaType][groupKey][labelKey];\n          main.mediaGroups[mediaType][id][labelKey] = _extends({}, oldMedia);\n          const newMedia = main.mediaGroups[mediaType][id][labelKey]; // update URIs on the media\n\n          const newUri = this.createCloneURI_(oldMedia.resolvedUri, clone);\n          newMedia.resolvedUri = newUri;\n          newMedia.uri = newUri; // Reset playlists in the new media group.\n\n          newMedia.playlists = []; // Create new playlists in the newly cloned media group.\n\n          oldMedia.playlists.forEach((p, i) => {\n            const oldMediaPlaylist = main.playlists[p.id];\n            const group = groupID(mediaType, id, labelKey);\n            const newPlaylistID = createPlaylistID(id, group); // Check to see if it already exists\n\n            if (oldMediaPlaylist && !main.playlists[newPlaylistID]) {\n              const newMediaPlaylist = this.createClonePlaylist_(oldMediaPlaylist, newPlaylistID, clone);\n              const newPlaylistUri = newMediaPlaylist.resolvedUri;\n              main.playlists[newPlaylistID] = newMediaPlaylist;\n              main.playlists[newPlaylistUri] = newMediaPlaylist;\n            }\n            newMedia.playlists[i] = this.createClonePlaylist_(p, newPlaylistID, clone);\n          });\n        }\n      }\n    });\n  }\n  /**\n   * Using the original playlist to be cloned, and the pathway clone object\n   * information, we create a new playlist.\n   *\n   * @param {Object} basePlaylist  The original playlist to be cloned from.\n   * @param {string} id The desired id of the newly cloned playlist.\n   * @param {Object} clone The pathway clone object.\n   * @param {Object} attributes An optional object to populate the `attributes` property in the playlist.\n   *\n   * @return {Object} The combined cloned playlist.\n   */\n\n  createClonePlaylist_(basePlaylist, id, clone, attributes) {\n    const uri = this.createCloneURI_(basePlaylist.resolvedUri, clone);\n    const newProps = {\n      resolvedUri: uri,\n      uri,\n      id\n    }; // Remove all segments from previous playlist in the clone.\n\n    if (basePlaylist.segments) {\n      newProps.segments = [];\n    }\n    if (attributes) {\n      newProps.attributes = attributes;\n    }\n    return merge(basePlaylist, newProps);\n  }\n  /**\n   * Generates an updated URI for a cloned pathway based on the original\n   * pathway's URI and the paramaters from the pathway clone object in the\n   * content steering server response.\n   *\n   * @param {string} baseUri URI to be updated in the cloned pathway.\n   * @param {Object} clone The pathway clone object.\n   *\n   * @return {string} The updated URI for the cloned pathway.\n   */\n\n  createCloneURI_(baseURI, clone) {\n    const uri = new URL(baseURI);\n    uri.hostname = clone['URI-REPLACEMENT'].HOST;\n    const params = clone['URI-REPLACEMENT'].PARAMS; // Add params to the cloned URL.\n\n    for (const key of Object.keys(params)) {\n      uri.searchParams.set(key, params[key]);\n    }\n    return uri.href;\n  }\n  /**\n   * Helper function to create the attributes needed for the new clone.\n   * This mainly adds the necessary media attributes.\n   *\n   * @param {string} id The pathway clone object ID.\n   * @param {Object} oldAttributes The old attributes to compare to.\n   * @return {Object} The new attributes to add to the playlist.\n   */\n\n  createCloneAttributes_(id, oldAttributes) {\n    const attributes = {\n      ['PATHWAY-ID']: id\n    };\n    ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(mediaType => {\n      if (oldAttributes[mediaType]) {\n        attributes[mediaType] = id;\n      }\n    });\n    return attributes;\n  }\n  /**\n   * Returns the key ID set from a playlist\n   *\n   * @param {playlist} playlist to fetch the key ID set from.\n   * @return a Set of 32 digit hex strings that represent the unique keyIds for that playlist.\n   */\n\n  getKeyIdSet(playlist) {\n    if (playlist.contentProtection) {\n      const keyIds = new Set();\n      for (const keysystem in playlist.contentProtection) {\n        const keyId = playlist.contentProtection[keysystem].attributes.keyId;\n        if (keyId) {\n          keyIds.add(keyId.toLowerCase());\n        }\n      }\n      return keyIds;\n    }\n  }\n}\n\n/**\n * @file xhr.js\n */\n\nconst callbackWrapper = function (request, error, response, callback) {\n  const 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\nconst callAllRequestHooks = (requestSet, options) => {\n  if (!requestSet || !requestSet.size) {\n    return;\n  }\n  let newOptions = options;\n  requestSet.forEach(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\nconst callAllResponseHooks = (responseSet, request, error, response) => {\n  if (!responseSet || !responseSet.size) {\n    return;\n  }\n  responseSet.forEach(responseCallback => {\n    responseCallback(request, error, response);\n  });\n};\nconst xhrFactory = function () {\n  const 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    const 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    const _requestCallbackSet = XhrFunction._requestCallbackSet || videojs.Vhs.xhr._requestCallbackSet || new Set();\n    const _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    const xhrMethod = videojs.Vhs.xhr.original === true ? videojs.xhr : videojs.Vhs.xhr; // call all registered onRequest hooks, assign new options.\n\n    const 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    const 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    const 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.requestType = options.requestType;\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\nconst byterangeStr = function (byterange) {\n  // `byterangeEnd` is one less than `offset + length` because the HTTP range\n  // header uses inclusive ranges\n  let byterangeEnd;\n  const 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\nconst segmentXhrHeaders = function (segment) {\n  const 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\nconst textRange = function (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\nconst formatHexString = function (e, i) {\n  const value = e.toString(16);\n  return '00'.substring(0, 2 - value.length) + value + (i % 2 ? ' ' : '');\n};\nconst formatAsciiString = function (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\nconst createTransferableMessage = function (message) {\n  const transferable = {};\n  Object.keys(message).forEach(key => {\n    const 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\nconst initSegmentId = function (initSegment) {\n  const 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\nconst segmentKeyId = function (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\nconst hexDump = data => {\n  const bytes = Array.prototype.slice.call(data);\n  const step = 16;\n  let result = '';\n  let hex;\n  let ascii;\n  for (let 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};\nconst tagDump = ({\n  bytes\n}) => hexDump(bytes);\nconst textRanges = ranges => {\n  let result = '';\n  let 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\nconst 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\nconst 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  const transmuxerPrependedSeconds = segment.videoTimingInfo.transmuxerPrependedSeconds;\n  const transmuxedStart = segment.videoTimingInfo.transmuxedPresentationStart; // get the start of the content from before old content is prepended\n\n  const startOfSegment = transmuxedStart + transmuxerPrependedSeconds;\n  const offsetFromSegmentStart = playerTime - startOfSegment;\n  return new Date(segment.dateTimeObject.getTime() + offsetFromSegmentStart * 1000);\n};\nconst 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\nconst findSegmentForProgramTime = (programTime, playlist) => {\n  // Assumptions:\n  //  - verifyProgramDateTimeTags has already been run\n  //  - live streams have been started\n  let 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  let segment = playlist.segments[0];\n  if (dateTimeObject < new Date(segment.dateTimeObject)) {\n    // Requested time is before stream start.\n    return null;\n  }\n  for (let i = 0; i < playlist.segments.length - 1; i++) {\n    segment = playlist.segments[i];\n    const nextSegmentStart = new Date(playlist.segments[i + 1].dateTimeObject);\n    if (dateTimeObject < nextSegmentStart) {\n      break;\n    }\n  }\n  const lastSegment = playlist.segments[playlist.segments.length - 1];\n  const lastSegmentStart = lastSegment.dateTimeObject;\n  const lastSegmentDuration = lastSegment.videoTimingInfo ? originalSegmentVideoDuration(lastSegment.videoTimingInfo) : lastSegment.duration + lastSegment.duration * SEGMENT_END_FUDGE_PERCENT;\n  const 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,\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\nconst 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  let segmentEnd = 0;\n  let segment;\n  for (let i = 0; i < playlist.segments.length; i++) {\n    segment = playlist.segments[i]; // 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  const 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,\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\nconst getOffsetFromTimestamp = (comparisonTimeStamp, programTime) => {\n  let segmentDateTime;\n  let programDateTime;\n  try {\n    segmentDateTime = new Date(comparisonTimeStamp);\n    programDateTime = new Date(programTime);\n  } catch (e) {// TODO handle error\n  }\n  const segmentTimeEpoch = segmentDateTime.getTime();\n  const 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\nconst verifyProgramDateTimeTags = playlist => {\n  if (!playlist.segments || playlist.segments.length === 0) {\n    return false;\n  }\n  for (let i = 0; i < playlist.segments.length; i++) {\n    const segment = playlist.segments[i];\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\nconst getProgramTime = ({\n  playlist,\n  time = undefined,\n  callback\n}) => {\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  const 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  const programTimeObject = {\n    mediaSeconds: time\n  };\n  const 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\nconst seekToProgramTime = ({\n  programTime,\n  playlist,\n  retryCount = 2,\n  seekTo,\n  pauseAfterSeek = true,\n  tech,\n  callback\n}) => {\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  const matchedSegment = findSegmentForProgramTime(programTime, playlist); // no match\n\n  if (!matchedSegment) {\n    return callback({\n      message: `${programTime} was not found in the stream`\n    });\n  }\n  const segment = matchedSegment.segment;\n  const 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: `${programTime} is not buffered yet. Try again`\n      });\n    }\n    seekTo(matchedSegment.estimatedStart + mediaOffset);\n    tech.one('seeked', () => {\n      seekToProgramTime({\n        programTime,\n        playlist,\n        retryCount: retryCount - 1,\n        seekTo,\n        pauseAfterSeek,\n        tech,\n        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  const seekToTime = segment.start + mediaOffset;\n  const 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\nconst callbackOnCompleted = (request, cb) => {\n  if (request.readyState === 4) {\n    return cb();\n  }\n  return;\n};\nconst containerRequest = (uri, xhr, cb, requestType) => {\n  let bytes = [];\n  let id3Offset;\n  let finished = false;\n  const endRequestAndCallback = function (err, req, type, _bytes) {\n    req.abort();\n    finished = true;\n    return cb(err, req, type, _bytes);\n  };\n  const progressListener = function (error, request) {\n    if (finished) {\n      return;\n    }\n    if (error) {\n      error.metadata = getStreamingNetworkErrorMetadata({\n        requestType,\n        request,\n        error\n      });\n      return endRequestAndCallback(error, request, '', bytes);\n    } // grap the new part of content that was just downloaded\n\n    const 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, () => endRequestAndCallback(error, request, '', bytes));\n    }\n    const 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, () => endRequestAndCallback(error, request, '', bytes));\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, () => endRequestAndCallback(error, request, '', bytes));\n    }\n    return endRequestAndCallback(null, request, type, bytes);\n  };\n  const options = {\n    uri,\n    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 ({\n        total,\n        loaded\n      }) {\n        return callbackWrapper(request, null, {\n          statusCode: request.status\n        }, progressListener);\n      });\n    }\n  };\n  const request = xhr(options, function (error, response) {\n    return callbackWrapper(request, error, response, progressListener);\n  });\n  return request;\n};\nconst {\n  EventTarget\n} = videojs;\nconst dashPlaylistUnchanged = function (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 (let i = 0; i < a.segments.length; i++) {\n    const aSegment = a.segments[i];\n    const bSegment = b.segments[i]; // 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    const aByterange = aSegment.byterange;\n    const 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\nconst dashGroupId = (type, group, label, playlist) => {\n  // If the manifest somehow does not have an ID (non-dash compliant), use the label.\n  const playlistId = playlist.attributes.NAME || label;\n  return `placeholder-uri-${type}-${group}-${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\nconst parseMainXml = ({\n  mainXml,\n  srcUrl,\n  clientOffset,\n  sidxMapping,\n  previousManifest\n}) => {\n  const manifest = parse(mainXml, {\n    manifestUri: srcUrl,\n    clientOffset,\n    sidxMapping,\n    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\nconst removeOldMediaGroupLabels = (update, newMain) => {\n  forEachMediaGroup(update, (properties, type, group, label) => {\n    if (!newMain.mediaGroups[type][group] || !(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\nconst updateMain = (oldMain, newMain, sidxMapping) => {\n  let noChanges = true;\n  let 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 (let i = 0; i < newMain.playlists.length; i++) {\n    const playlist = newMain.playlists[i];\n    if (playlist.sidx) {\n      const 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    const 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, (properties, type, group, label) => {\n    if (properties.playlists && properties.playlists.length) {\n      const id = properties.playlists[0].id;\n      const 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\nconst equivalentSidx = (a, b) => {\n  const neitherMap = Boolean(!a.map && !b.map);\n  const 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\nconst compareSidxEntry = (playlists, oldSidxMapping) => {\n  const newSidxMapping = {};\n  for (const id in playlists) {\n    const playlist = playlists[id];\n    const currentSidxInfo = playlist.sidx;\n    if (currentSidxInfo) {\n      const key = generateSidxKey(currentSidxInfo);\n      if (!oldSidxMapping[key]) {\n        break;\n      }\n      const 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\nconst filterChangedSidxMappings = (main, oldSidxMapping) => {\n  const videoSidx = compareSidxEntry(main.playlists, oldSidxMapping);\n  let mediaGroupSidx = videoSidx;\n  forEachMediaGroup(main, (properties, mediaType, groupKey, labelKey) => {\n    if (properties.playlists && properties.playlists.length) {\n      const playlists = properties.playlists;\n      mediaGroupSidx = merge(mediaGroupSidx, compareSidxEntry(playlists, oldSidxMapping));\n    }\n  });\n  return mediaGroupSidx;\n};\nclass DashPlaylistLoader extends EventTarget {\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  constructor(srcUrlOrPlaylist, vhs, options = {}, mainPlaylistLoader) {\n    super();\n    this.mainPlaylistLoader_ = mainPlaylistLoader || this;\n    if (!mainPlaylistLoader) {\n      this.isMain_ = true;\n    }\n    const {\n      withCredentials = false\n    } = options;\n    this.vhs_ = vhs;\n    this.withCredentials = withCredentials;\n    this.addMetadataToTextTrack = options.addMetadataToTextTrack;\n    if (!srcUrlOrPlaylist) {\n      throw new Error('A non-empty playlist URL or object is required');\n    } // event naming?\n\n    this.on('minimumUpdatePeriod', () => {\n      this.refreshXml_();\n    }); // live playlist staleness timeout\n\n    this.on('mediaupdatetimeout', () => {\n      this.refreshMedia_(this.media().id);\n    });\n    this.state = 'HAVE_NOTHING';\n    this.loadedPlaylists_ = {};\n    this.logger_ = logger('DashPlaylistLoader'); // initialize the loader state\n    // The mainPlaylistLoader will be created with a string\n\n    if (this.isMain_) {\n      this.mainPlaylistLoader_.srcUrl = srcUrlOrPlaylist; // TODO: reset sidxMapping between period changes\n      // once multi-period is refactored\n\n      this.mainPlaylistLoader_.sidxMapping_ = {};\n    } else {\n      this.childPlaylist_ = srcUrlOrPlaylist;\n    }\n  }\n  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        metadata: err.metadata\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  addSidxSegments_(playlist, startingState, cb) {\n    const 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(() => cb(false), 0);\n      return;\n    } // resolve the segment URL relative to the playlist\n\n    const uri = resolveManifestRedirect(playlist.sidx.resolvedUri);\n    const fin = (err, request) => {\n      if (this.requestErrored_(err, request, startingState)) {\n        return;\n      }\n      const sidxMapping = this.mainPlaylistLoader_.sidxMapping_;\n      const {\n        requestType\n      } = request;\n      let sidx;\n      try {\n        sidx = parseSidx(toUint8(request.response).subarray(8));\n      } catch (e) {\n        e.metadata = getStreamingNetworkErrorMetadata({\n          requestType,\n          request,\n          parseFailure: true\n        }); // sidx parsing failed.\n\n        this.requestErrored_(e, request, startingState);\n        return;\n      }\n      sidxMapping[sidxKey] = {\n        sidxInfo: playlist.sidx,\n        sidx\n      };\n      addSidxSegmentsToPlaylist(playlist, sidx, playlist.sidx.resolvedUri);\n      return cb(true);\n    };\n    const REQUEST_TYPE = 'dash-sidx';\n    this.request = containerRequest(uri, this.vhs_.xhr, (err, request, container, bytes) => {\n      if (err) {\n        return fin(err, request);\n      }\n      if (!container || container !== 'mp4') {\n        const sidxContainer = container || 'unknown';\n        return fin({\n          status: request.status,\n          message: `Unsupported ${sidxContainer} container type for sidx segment at URL: ${uri}`,\n          // response is just bytes in this case\n          // but we really don't want to return that.\n          response: '',\n          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      const {\n        offset,\n        length\n      } = playlist.sidx.byterange;\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      this.request = this.vhs_.xhr({\n        uri,\n        responseType: 'arraybuffer',\n        requestType: 'dash-sidx',\n        headers: segmentXhrHeaders({\n          byterange: playlist.sidx.byterange\n        })\n      }, fin);\n    }, REQUEST_TYPE);\n  }\n  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  hasPendingRequest() {\n    return this.request || this.mediaRequest_;\n  }\n  stopRequest() {\n    if (this.request) {\n      const oldRequest = this.request;\n      this.request = null;\n      oldRequest.onreadystatechange = null;\n      oldRequest.abort();\n    }\n  }\n  media(playlist) {\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    const 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    const 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, sidxChanged => {\n      // everything is ready just continue to haveMetadata\n      this.haveMetadata({\n        startingState,\n        playlist\n      });\n    });\n  }\n  haveMetadata({\n    startingState,\n    playlist\n  }) {\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  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  load(isFinalRendition) {\n    window$1.clearTimeout(this.mediaUpdateTimeout);\n    this.mediaUpdateTimeout = null;\n    const media = this.media();\n    if (isFinalRendition) {\n      const delay = media ? media.targetDuration / 2 * 1000 : 5 * 1000;\n      this.mediaUpdateTimeout = window$1.setTimeout(() => this.load(), 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  start() {\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(() => this.haveMain_(), 0);\n      return;\n    }\n    this.requestMain_((req, mainChanged) => {\n      this.haveMain_();\n      if (!this.hasPendingRequest() && !this.media_) {\n        this.media(this.mainPlaylistLoader_.main.playlists[0]);\n      }\n    });\n  }\n  requestMain_(cb) {\n    const metadata = {\n      manifestInfo: {\n        uri: this.mainPlaylistLoader_.srcUrl\n      }\n    };\n    this.trigger({\n      type: 'manifestrequeststart',\n      metadata\n    });\n    this.request = this.vhs_.xhr({\n      uri: this.mainPlaylistLoader_.srcUrl,\n      withCredentials: this.withCredentials,\n      requestType: 'dash-manifest'\n    }, (error, req) => {\n      if (error) {\n        const {\n          requestType\n        } = req;\n        error.metadata = getStreamingNetworkErrorMetadata({\n          requestType,\n          request: req,\n          error\n        });\n      }\n      if (this.requestErrored_(error, req)) {\n        if (this.state === 'HAVE_NOTHING') {\n          this.started = false;\n        }\n        return;\n      }\n      this.trigger({\n        type: 'manifestrequestcomplete',\n        metadata\n      });\n      const mainChanged = req.responseText !== this.mainPlaylistLoader_.mainXml_;\n      this.mainPlaylistLoader_.mainXml_ = req.responseText;\n      if (req.responseHeaders && req.responseHeaders.date) {\n        this.mainLoaded_ = Date.parse(req.responseHeaders.date);\n      } else {\n        this.mainLoaded_ = Date.now();\n      }\n      this.mainPlaylistLoader_.srcUrl = resolveManifestRedirect(this.mainPlaylistLoader_.srcUrl, req);\n      if (mainChanged) {\n        this.handleMain_();\n        this.syncClientServerClock_(() => {\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  syncClientServerClock_(done) {\n    const 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      requestType: 'dash-clock-sync'\n    }, (error, req) => {\n      // disposed\n      if (!this.request) {\n        return;\n      }\n      if (error) {\n        const {\n          requestType\n        } = req;\n        this.error.metadata = getStreamingNetworkErrorMetadata({\n          requestType,\n          request: req,\n          error\n        }); // sync request failed, fall back to using date header from mpd\n        // TODO: log warning\n\n        this.mainPlaylistLoader_.clientOffset_ = this.mainLoaded_ - Date.now();\n        return done();\n      }\n      let 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 = this.mainLoaded_;\n        } else {\n          serverTime = Date.parse(req.responseHeaders.date);\n        }\n      } else {\n        serverTime = Date.parse(req.responseText);\n      }\n      this.mainPlaylistLoader_.clientOffset_ = serverTime - Date.now();\n      done();\n    });\n  }\n  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  handleMain_() {\n    // clear media request\n    this.mediaRequest_ = null;\n    const oldMain = this.mainPlaylistLoader_.main;\n    const metadata = {\n      manifestInfo: {\n        uri: this.mainPlaylistLoader_.srcUrl\n      }\n    };\n    this.trigger({\n      type: 'manifestparsestart',\n      metadata\n    });\n    let newMain;\n    try {\n      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      });\n    } catch (error) {\n      this.error = error;\n      this.error.metadata = {\n        errorType: videojs.Error.StreamingDashManifestParserError,\n        error\n      };\n      this.trigger('error');\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    const 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    if (newMain) {\n      const {\n        duration,\n        endList\n      } = newMain;\n      const renditions = [];\n      newMain.playlists.forEach(playlist => {\n        renditions.push({\n          id: playlist.id,\n          bandwidth: playlist.attributes.BANDWIDTH,\n          resolution: playlist.attributes.RESOLUTION,\n          codecs: playlist.attributes.CODECS\n        });\n      });\n      const parsedManifest = {\n        duration,\n        isLive: !endList,\n        renditions\n      };\n      metadata.parsedManifest = parsedManifest;\n      this.trigger({\n        type: 'manifestparsecomplete',\n        metadata\n      });\n    }\n    return Boolean(newMain);\n  }\n  updateMinimumUpdatePeriodTimeout_() {\n    const 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    let 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 ${mup}, not setting a timeout`);\n      }\n      return;\n    }\n    this.createMUPTimeout_(mup);\n  }\n  createMUPTimeout_(mup) {\n    const mpl = this.mainPlaylistLoader_;\n    mpl.minimumUpdatePeriodTimeout_ = window$1.setTimeout(() => {\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  refreshXml_() {\n    this.requestMain_((req, mainChanged) => {\n      if (!mainChanged) {\n        return;\n      }\n      if (this.media_) {\n        this.media_ = this.mainPlaylistLoader_.main.playlists[this.media_.id];\n      } // This will filter out updated sidx info from the mapping\n\n      this.mainPlaylistLoader_.sidxMapping_ = filterChangedSidxMappings(this.mainPlaylistLoader_.main, this.mainPlaylistLoader_.sidxMapping_);\n      this.addSidxSegments_(this.media(), this.state, sidxChanged => {\n        // TODO: do we need to reload the current playlist?\n        this.refreshMedia_(this.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  refreshMedia_(mediaID) {\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    const playlists = this.mainPlaylistLoader_.main.playlists;\n    const 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      const createMediaUpdateTimeout = () => {\n        if (this.media().endList) {\n          return;\n        }\n        this.mediaUpdateTimeout = window$1.setTimeout(() => {\n          this.trigger('mediaupdatetimeout');\n          createMediaUpdateTimeout();\n        }, refreshDelay(this.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  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      const metadataArray = this.mainPlaylistLoader_.main.eventStream.map(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   * Returns the key ID set from a playlist\n   *\n   * @param {playlist} playlist to fetch the key ID set from.\n   * @return a Set of 32 digit hex strings that represent the unique keyIds for that playlist.\n   */\n\n  getKeyIdSet(playlist) {\n    if (playlist.contentProtection) {\n      const keyIds = new Set();\n      for (const keysystem in playlist.contentProtection) {\n        const defaultKID = playlist.contentProtection[keysystem].attributes['cenc:default_KID'];\n        if (defaultKID) {\n          // DASH keyIds are separated by dashes.\n          keyIds.add(defaultKID.replace(/-/g, '').toLowerCase());\n        }\n      }\n      return keyIds;\n    }\n  }\n}\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};\nconst stringToArrayBuffer = string => {\n  const view = new Uint8Array(new ArrayBuffer(string.length));\n  for (let i = 0; i < string.length; i++) {\n    view[i] = string.charCodeAt(i);\n  }\n  return view.buffer;\n};\n\n/* global Blob, BlobBuilder, Worker */\n// unify worker interface\nconst browserWorkerPolyFill = function (workerObj) {\n  // node only supports on/off\n  workerObj.on = workerObj.addEventListener;\n  workerObj.off = workerObj.removeEventListener;\n  return workerObj;\n};\nconst createObjectURL = function (str) {\n  try {\n    return URL.createObjectURL(new Blob([str], {\n      type: 'application/javascript'\n    }));\n  } catch (e) {\n    const blob = new BlobBuilder();\n    blob.append(str);\n    return URL.createObjectURL(blob.getBlob());\n  }\n};\nconst factory = function (code) {\n  return function () {\n    const objectUrl = createObjectURL(code);\n    const worker = browserWorkerPolyFill(new Worker(objectUrl));\n    worker.objURL = objectUrl;\n    const 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};\nconst transform = function (code) {\n  return `var browserWorkerPolyFill = ${browserWorkerPolyFill.toString()};\\n` + 'browserWorkerPolyFill(self);\\n' + code;\n};\nconst getWorkerString = function (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 */\nconst 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 () {\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 (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 (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 () {\n    return box(types.dinf, box(types.dref, DREF));\n  };\n  esds = function (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 () {\n    return box(types.ftyp, MAJOR_BRAND, MINOR_VERSION, MAJOR_BRAND, AVC1_BRAND);\n  };\n  hdlr = function (type) {\n    return box(types.hdlr, HDLR_TYPES[type]);\n  };\n  mdat = function (data) {\n    return box(types.mdat, data);\n  };\n  mdhd = function (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 (track) {\n    return box(types.mdia, mdhd(track), hdlr(track.type), minf(track));\n  };\n  mfhd = function (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 (track) {\n    return box(types.minf, track.type === 'video' ? box(types.vmhd, VMHD) : box(types.smhd, SMHD), dinf(), stbl(track));\n  };\n  moof = function (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (track) {\n    track.duration = track.duration || 0xffffffff;\n    return box(types.trak, tkhd(track), mdia(track));\n  };\n  trex = function (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 (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 (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 (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 (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 (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 (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 (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 (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 () {\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 (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 (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 (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 (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 (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 (count) {\n    var a = [];\n    while (count--) {\n      a.push(0);\n    }\n    return a;\n  };\n  var makeTable = function (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 () {\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 (seconds) {\n    return seconds * ONE_SECOND_IN_TS$4;\n  };\n  secondsToAudioTs = function (seconds, sampleRate) {\n    return seconds * sampleRate;\n  };\n  videoTsToSeconds = function (timestamp) {\n    return timestamp / ONE_SECOND_IN_TS$4;\n  };\n  audioTsToSeconds = function (timestamp, sampleRate) {\n    return timestamp / sampleRate;\n  };\n  audioTsToVideoTs = function (timestamp, sampleRate) {\n    return secondsToVideoTs(audioTsToSeconds(timestamp, sampleRate));\n  };\n  videoTsToAudioTs = function (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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    // \u266A\n    0x1020: 0x20,\n    // Transparent Space\n    0x1021: 0xa0,\n    // Nob-breaking Transparent Space\n    0x1025: 0x2026,\n    // \u2026\n    0x102a: 0x0160,\n    // \u0160\n    0x102c: 0x0152,\n    // \u0152\n    0x1030: 0x2588,\n    // \u2588\n    0x1031: 0x2018,\n    // \u2018\n    0x1032: 0x2019,\n    // \u2019\n    0x1033: 0x201c,\n    // \u201C\n    0x1034: 0x201d,\n    // \u201D\n    0x1035: 0x2022,\n    // \u2022\n    0x1039: 0x2122,\n    // \u2122\n    0x103a: 0x0161,\n    // \u0161\n    0x103c: 0x0153,\n    // \u0153\n    0x103d: 0x2120,\n    // \u2120\n    0x103f: 0x0178,\n    // \u0178\n    0x1076: 0x215b,\n    // \u215B\n    0x1077: 0x215c,\n    // \u215C\n    0x1078: 0x215d,\n    // \u215D\n    0x1079: 0x215e,\n    // \u215E\n    0x107a: 0x23d0,\n    // \u23D0\n    0x107b: 0x23a4,\n    // \u23A4\n    0x107c: 0x23a3,\n    // \u23A3\n    0x107d: 0x23af,\n    // \u23AF\n    0x107e: 0x23a6,\n    // \u23A6\n    0x107f: 0x23a1,\n    // \u23A1\n    0x10a0: 0x3138 // \u3138 (CC char)\n  };\n  var get708CharFromCode = function (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 (b) {\n    return 0x20 <= b && b <= 0x7f || 0xa0 <= b && b <= 0xff;\n  };\n  var Cea708Window = function (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 (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 (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(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(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        const 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    // \u00E1\n    0x5c: 0xe9,\n    // \u00E9\n    0x5e: 0xed,\n    // \u00ED\n    0x5f: 0xf3,\n    // \u00F3\n    0x60: 0xfa,\n    // \u00FA\n    0x7b: 0xe7,\n    // \u00E7\n    0x7c: 0xf7,\n    // \u00F7\n    0x7d: 0xd1,\n    // \u00D1\n    0x7e: 0xf1,\n    // \u00F1\n    0x7f: 0x2588,\n    // \u2588\n    0x0130: 0xae,\n    // \u00AE\n    0x0131: 0xb0,\n    // \u00B0\n    0x0132: 0xbd,\n    // \u00BD\n    0x0133: 0xbf,\n    // \u00BF\n    0x0134: 0x2122,\n    // \u2122\n    0x0135: 0xa2,\n    // \u00A2\n    0x0136: 0xa3,\n    // \u00A3\n    0x0137: 0x266a,\n    // \u266A\n    0x0138: 0xe0,\n    // \u00E0\n    0x0139: 0xa0,\n    //\n    0x013a: 0xe8,\n    // \u00E8\n    0x013b: 0xe2,\n    // \u00E2\n    0x013c: 0xea,\n    // \u00EA\n    0x013d: 0xee,\n    // \u00EE\n    0x013e: 0xf4,\n    // \u00F4\n    0x013f: 0xfb,\n    // \u00FB\n    0x0220: 0xc1,\n    // \u00C1\n    0x0221: 0xc9,\n    // \u00C9\n    0x0222: 0xd3,\n    // \u00D3\n    0x0223: 0xda,\n    // \u00DA\n    0x0224: 0xdc,\n    // \u00DC\n    0x0225: 0xfc,\n    // \u00FC\n    0x0226: 0x2018,\n    // \u2018\n    0x0227: 0xa1,\n    // \u00A1\n    0x0228: 0x2a,\n    // *\n    0x0229: 0x27,\n    // '\n    0x022a: 0x2014,\n    // \u2014\n    0x022b: 0xa9,\n    // \u00A9\n    0x022c: 0x2120,\n    // \u2120\n    0x022d: 0x2022,\n    // \u2022\n    0x022e: 0x201c,\n    // \u201C\n    0x022f: 0x201d,\n    // \u201D\n    0x0230: 0xc0,\n    // \u00C0\n    0x0231: 0xc2,\n    // \u00C2\n    0x0232: 0xc7,\n    // \u00C7\n    0x0233: 0xc8,\n    // \u00C8\n    0x0234: 0xca,\n    // \u00CA\n    0x0235: 0xcb,\n    // \u00CB\n    0x0236: 0xeb,\n    // \u00EB\n    0x0237: 0xce,\n    // \u00CE\n    0x0238: 0xcf,\n    // \u00CF\n    0x0239: 0xef,\n    // \u00EF\n    0x023a: 0xd4,\n    // \u00D4\n    0x023b: 0xd9,\n    // \u00D9\n    0x023c: 0xf9,\n    // \u00F9\n    0x023d: 0xdb,\n    // \u00DB\n    0x023e: 0xab,\n    // \u00AB\n    0x023f: 0xbb,\n    // \u00BB\n    0x0320: 0xc3,\n    // \u00C3\n    0x0321: 0xe3,\n    // \u00E3\n    0x0322: 0xcd,\n    // \u00CD\n    0x0323: 0xcc,\n    // \u00CC\n    0x0324: 0xec,\n    // \u00EC\n    0x0325: 0xd2,\n    // \u00D2\n    0x0326: 0xf2,\n    // \u00F2\n    0x0327: 0xd5,\n    // \u00D5\n    0x0328: 0xf5,\n    // \u00F5\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    // \u00C4\n    0x0331: 0xe4,\n    // \u00E4\n    0x0332: 0xd6,\n    // \u00D6\n    0x0333: 0xf6,\n    // \u00F6\n    0x0334: 0xdf,\n    // \u00DF\n    0x0335: 0xa5,\n    // \u00A5\n    0x0336: 0xa4,\n    // \u00A4\n    0x0337: 0x2502,\n    // \u2502\n    0x0338: 0xc5,\n    // \u00C5\n    0x0339: 0xe5,\n    // \u00E5\n    0x033a: 0xd8,\n    // \u00D8\n    0x033b: 0xf8,\n    // \u00F8\n    0x033c: 0x250c,\n    // \u250C\n    0x033d: 0x2510,\n    // \u2510\n    0x033e: 0x2514,\n    // \u2514\n    0x033f: 0x2518 // \u2518\n  };\n  var getCharFromCode = function (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 () {\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 (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 \"\u00E8\" is desired, you'll always receive \"e\u00E8\"; non-compliant\n        // decoders are supposed to drop the \"\u00E8\", while compliant decoders\n        // backspace the \"e\" and insert \"\u00E8\".\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        const 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        } // Ensure the row is between 0 and 14, otherwise use the most\n        // recent or default row.\n\n        if (row !== this.row_ && row >= 0 && row <= 14) {\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          const 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    const logWarning = index => {\n      this.trigger('log', {\n        level: 'warn',\n        message: 'Skipping a malformed 608 caption at index ' + index + '.'\n      });\n    };\n    const content = [];\n    this.displayed_.forEach((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,\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 (char) {\n    return char >= 0x20 && char <= 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 (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 (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      /**\n       * Rollover stream expects data from elementary stream.\n       * Elementary stream can push forward 2 types of data\n       * - Parsed Video/Audio/Timed-metadata PES (packetized elementary stream) packets\n       * - Tracks metadata from PMT (Program Map Table)\n       * Rollover stream expects pts/dts info to be available, since it stores lastDTS\n       * We should ignore non-PES packets since they may override lastDTS to undefined.\n       * lastDTS is important to signal the next segments\n       * about rollover from the previous segments.\n       */\n      if (data.type === 'metadata') {\n        this.trigger('data', data);\n        return;\n      } // Any \"shared\" rollover streams will accept _all_ data. Otherwise,\n      // streams will only accept data that matches their type.\n\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 = (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 (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 (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 (bytes, start, end) {\n      return unescape(percentEncode$1(bytes, start, end)); // jshint ignore:line\n    },\n    parseSyncSafeInteger$1 = function (data) {\n      return data[0] << 21 | data[1] << 14 | data[2] << 7 | data[3];\n    },\n    frameParsers = {\n      'APIC': function (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 (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 (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 (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 (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 (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 (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 (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 () {\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 () {\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 (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 (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 (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 () {\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 (payload, pes) {\n        var ptsDtsFlags;\n        const 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 (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 () {// we have to wait for the PMT to arrive as well before we\n          // have any meaningful metadata\n        },\n        pes: function () {\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 () {\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$1;\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$1 = function (handlePartialSegments) {\n    var buffer,\n      frameNum = 0;\n    AdtsStream$1.prototype.init.call(this);\n    this.skipWarn_ = function (start, end) {\n      this.trigger('log', {\n        level: 'warn',\n        message: `adts skiping bytes ${start} to ${end} in frame ${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$1.prototype = new Stream$3();\n  var adts = AdtsStream$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 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 (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$1, 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 () {\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$1 = function () {\n    var nalByteStream = new NalByteStream(),\n      self,\n      trackId,\n      currentPts,\n      currentDts,\n      discardEmulationPreventionBytes,\n      readSequenceParameterSet,\n      skipScalingList;\n    H264Stream$1.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 (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 (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 (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$1.prototype = new Stream$2();\n  var h264 = {\n    H264Stream: H264Stream$1,\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 (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 (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 (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 (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 (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 (bytes, start, end) {\n    return unescape(percentEncode(bytes, start, end)); // jshint ignore:line\n  };\n  var parseAdtsSize = function (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 (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 (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 (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$1;\n  /**\n   * Splits an incoming stream of binary data into ADTS and ID3 Frames.\n   */\n\n  AacStream$1 = function () {\n    var everything = new Uint8Array(),\n      timeStamp = 0;\n    AacStream$1.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$1.prototype = new Stream$1();\n  var aac = AacStream$1;\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 (key, event) {\n    event.stream = key;\n    this.trigger('log', event);\n  };\n  var addPipelineLogRetriggers = function (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 (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 (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 (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 (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 (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 (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 (value) {\n    return value >>> 0;\n  };\n  var toHexString$1 = function (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 () {\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 (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 (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,\n      value,\n      // if timescale is undefined or 0 set to 1 \n      timescale: timescale ? timescale : 1,\n      presentation_time,\n      presentation_time_delta,\n      event_duration,\n      id,\n      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 (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 (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 (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 (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 (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      let 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 (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 (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 (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 (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 (segmentData, offset = 0) {\n    var emsgBoxes = findBox(segmentData, ['emsg']);\n    return emsgBoxes.map(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 (packet) {\n    var pid = packet[1] & 0x1f;\n    pid <<= 8;\n    pid |= packet[2];\n    return pid;\n  };\n  var parsePayloadUnitStartIndicator = function (packet) {\n    return !!(packet[1] & 0x40);\n  };\n  var parseAdaptionField = function (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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  const wireTransmuxerEvents = function (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      const initArray = segment.initSegment;\n      segment.initSegment = {\n        data: initArray.buffer,\n        byteOffset: initArray.byteOffset,\n        byteLength: initArray.byteLength\n      };\n      const typedArray = segment.data;\n      segment.data = typedArray.buffer;\n      self.postMessage({\n        action: 'data',\n        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\n      });\n    });\n    transmuxer.on('videoSegmentTimingInfo', function (timingInfo) {\n      const 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\n      });\n    });\n    transmuxer.on('audioSegmentTimingInfo', function (timingInfo) {\n      // Note that all times for [audio/video]SegmentTimingInfo events are in video clock\n      const 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\n      });\n    });\n    transmuxer.on('id3Frame', function (id3Frame) {\n      self.postMessage({\n        action: 'id3Frame',\n        id3Frame\n      });\n    });\n    transmuxer.on('caption', function (caption) {\n      self.postMessage({\n        action: 'caption',\n        caption\n      });\n    });\n    transmuxer.on('trackinfo', function (trackInfo) {\n      self.postMessage({\n        action: 'trackinfo',\n        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\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\n  class MessageHandlers {\n    constructor(self, options) {\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\n    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    pushMp4Captions(data) {\n      if (!this.captionParser) {\n        this.captionParser = new captionParser();\n        this.captionParser.init();\n      }\n      const segment = new Uint8Array(data.data, data.byteOffset, data.byteLength);\n      const 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    probeMp4StartTime({\n      timescales,\n      data\n    }) {\n      const startTime = probe$2.startTime(timescales, data);\n      this.self.postMessage({\n        action: 'probeMp4StartTime',\n        startTime,\n        data\n      }, [data.buffer]);\n    }\n    probeMp4Tracks({\n      data\n    }) {\n      const tracks = probe$2.tracks(data);\n      this.self.postMessage({\n        action: 'probeMp4Tracks',\n        tracks,\n        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    probeEmsgID3({\n      data,\n      offset\n    }) {\n      const id3Frames = probe$2.getEmsgID3(data, offset);\n      this.self.postMessage({\n        action: 'probeEmsgID3',\n        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    probeTs({\n      data,\n      baseStartTime\n    }) {\n      const tsStartTime = typeof baseStartTime === 'number' && !isNaN(baseStartTime) ? baseStartTime * clock$2.ONE_SECOND_IN_TS : void 0;\n      const timeInfo = tsInspector.inspect(data, tsStartTime);\n      let 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,\n        data\n      }, [data.buffer]);\n    }\n    clearAllMp4Captions() {\n      if (this.captionParser) {\n        this.captionParser.clearAllCaptions();\n      }\n    }\n    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    push(data) {\n      // Cast array buffer to correct type for transmuxer\n      const 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    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    setTimestampOffset(data) {\n      const timestampOffset = data.timestampOffset || 0;\n      this.transmuxer.setBaseMediaDecodeTime(Math.round(clock$2.secondsToVideoTs(timestampOffset)));\n    }\n    setAudioAppendStart(data) {\n      this.transmuxer.setAudioAppendStart(Math.ceil(clock$2.secondsToVideoTs(data.appendStart)));\n    }\n    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    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    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    alignGopsWith(data) {\n      this.transmuxer.alignGopsWith(data.gopsToAlignWith.slice());\n    }\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\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\nconst handleData_ = (event, transmuxedData, callback) => {\n  const {\n    type,\n    initSegment,\n    captions,\n    captionStreams,\n    metadata,\n    videoFrameDtsTime,\n    videoFramePtsTime\n  } = event.data.segment;\n  transmuxedData.buffer.push({\n    captions,\n    captionStreams,\n    metadata\n  });\n  const boxes = event.data.segment.boxes || {\n    data: event.data.segment.data\n  };\n  const result = {\n    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};\nconst handleDone_ = ({\n  transmuxedData,\n  callback\n}) => {\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};\nconst handleGopInfo_ = (event, transmuxedData) => {\n  transmuxedData.gopInfo = event.data.gopInfo;\n};\nconst processTransmux = options => {\n  const {\n    transmuxer,\n    bytes,\n    audioAppendStart,\n    gopsToAlignWith,\n    remux,\n    onData,\n    onTrackInfo,\n    onAudioTimingInfo,\n    onVideoTimingInfo,\n    onVideoSegmentTimingInfo,\n    onAudioSegmentTimingInfo,\n    onId3,\n    onCaptions,\n    onDone,\n    onEndedTimeline,\n    onTransmuxerLog,\n    isEndOfTimeline,\n    segment,\n    triggerSegmentEventFn\n  } = options;\n  const transmuxedData = {\n    buffer: []\n  };\n  let waitForEndedTimelineEvent = isEndOfTimeline;\n  const 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,\n      callback: onDone\n    });\n    /* eslint-disable no-use-before-define */\n\n    dequeue(transmuxer);\n    /* eslint-enable */\n  };\n  const handleError = () => {\n    const error = {\n      message: 'Received an error message from the transmuxer worker',\n      metadata: {\n        errorType: videojs.Error.StreamingFailedToTransmuxSegment,\n        segmentInfo: segmentInfoPayload({\n          segment\n        })\n      }\n    };\n    onDone(null, error);\n  };\n  transmuxer.onmessage = handleMessage;\n  transmuxer.onerror = handleError;\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\n    });\n  }\n  if (typeof remux !== 'undefined') {\n    transmuxer.postMessage({\n      action: 'setRemux',\n      remux\n    });\n  }\n  if (bytes.byteLength) {\n    const buffer = bytes instanceof ArrayBuffer ? bytes : bytes.buffer;\n    const byteOffset = bytes instanceof ArrayBuffer ? 0 : bytes.byteOffset;\n    triggerSegmentEventFn({\n      type: 'segmenttransmuxingstart',\n      segment\n    });\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,\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};\nconst 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};\nconst processAction = (transmuxer, action) => {\n  transmuxer.postMessage({\n    action\n  });\n  dequeue(transmuxer);\n};\nconst 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};\nconst reset = transmuxer => {\n  enqueueAction('reset', transmuxer);\n};\nconst endTimeline = transmuxer => {\n  enqueueAction('endTimeline', transmuxer);\n};\nconst 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};\nconst createTransmuxer = options => {\n  const transmuxer = new TransmuxWorker();\n  transmuxer.currentTransmux = null;\n  transmuxer.transmuxQueue = [];\n  const term = transmuxer.terminate;\n  transmuxer.terminate = () => {\n    transmuxer.currentTransmux = null;\n    transmuxer.transmuxQueue.length = 0;\n    return term.call(transmuxer);\n  };\n  transmuxer.postMessage({\n    action: 'init',\n    options\n  });\n  return transmuxer;\n};\nvar segmentTransmuxer = {\n  reset,\n  endTimeline,\n  transmux,\n  createTransmuxer\n};\nconst workerCallback = function (options) {\n  const transmuxer = options.transmuxer;\n  const endAction = options.endAction || options.action;\n  const callback = options.callback;\n  const message = _extends({}, options, {\n    endAction: null,\n    transmuxer: null,\n    callback: null\n  });\n  const 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    const isArrayBuffer = options.data instanceof ArrayBuffer;\n    message.byteOffset = isArrayBuffer ? 0 : options.data.byteOffset;\n    message.byteLength = options.data.byteLength;\n    const transfers = [isArrayBuffer ? options.data : options.data.buffer];\n    transmuxer.postMessage(message, transfers);\n  } else {\n    transmuxer.postMessage(message);\n  }\n};\nconst 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\nconst abortAll = activeXhrs => {\n  activeXhrs.forEach(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\nconst 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\nconst getProgressStats = progressEvent => {\n  const request = progressEvent.target;\n  const roundTripTime = Date.now() - request.requestTime;\n  const 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\nconst handleErrors = (error, request) => {\n  const {\n    requestType\n  } = request;\n  const metadata = getStreamingNetworkErrorMetadata({\n    requestType,\n    request,\n    error\n  });\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      metadata\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      metadata\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      metadata\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      metadata\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\nconst handleKeyResponse = (segment, objects, finishProcessingFn, triggerSegmentEventFn) => (error, request) => {\n  const response = request.response;\n  const 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  const view = new DataView(response);\n  const bytes = new Uint32Array([view.getUint32(0), view.getUint32(4), view.getUint32(8), view.getUint32(12)]);\n  for (let i = 0; i < objects.length; i++) {\n    objects[i].bytes = bytes;\n  }\n  const keyInfo = {\n    uri: request.uri\n  };\n  triggerSegmentEventFn({\n    type: 'segmentkeyloadcomplete',\n    segment,\n    keyInfo\n  });\n  return finishProcessingFn(null, segment);\n};\nconst parseInitSegment = (segment, callback) => {\n  const 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    const uri = segment.map.resolvedUri || segment.map.uri;\n    const mediaType = type || 'unknown';\n    return callback({\n      internal: true,\n      message: `Found unsupported ${mediaType} container for initialization segment at URL: ${uri}`,\n      code: REQUEST_ERRORS.FAILURE,\n      metadata: {\n        mediaType\n      }\n    });\n  }\n  workerCallback({\n    action: 'probeMp4Tracks',\n    data: segment.map.bytes,\n    transmuxer: segment.transmuxer,\n    callback: ({\n      tracks,\n      data\n    }) => {\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\nconst handleInitSegmentResponse = ({\n  segment,\n  finishProcessingFn,\n  triggerSegmentEventFn\n}) => (error, request) => {\n  const errorObj = handleErrors(error, request);\n  if (errorObj) {\n    return finishProcessingFn(errorObj, segment);\n  }\n  const bytes = new Uint8Array(request.response);\n  triggerSegmentEventFn({\n    type: 'segmentloaded',\n    segment\n  }); // 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 * 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\nconst handleSegmentResponse = ({\n  segment,\n  finishProcessingFn,\n  responseType,\n  triggerSegmentEventFn\n}) => (error, request) => {\n  const errorObj = handleErrors(error, request);\n  if (errorObj) {\n    return finishProcessingFn(errorObj, segment);\n  }\n  triggerSegmentEventFn({\n    type: 'segmentloaded',\n    segment\n  });\n  const 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};\nconst transmuxAndNotify = ({\n  segment,\n  bytes,\n  trackInfoFn,\n  timingInfoFn,\n  videoSegmentTimingInfoFn,\n  audioSegmentTimingInfoFn,\n  id3Fn,\n  captionsFn,\n  isEndOfTimeline,\n  endedTimelineFn,\n  dataFn,\n  doneFn,\n  onTransmuxerLog,\n  triggerSegmentEventFn\n}) => {\n  const fmp4Tracks = segment.map && segment.map.tracks || {};\n  const 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  let audioStartFn = timingInfoFn.bind(null, segment, 'audio', 'start');\n  const audioEndFn = timingInfoFn.bind(null, segment, 'audio', 'end');\n  let videoStartFn = timingInfoFn.bind(null, segment, 'video', 'start');\n  const videoEndFn = timingInfoFn.bind(null, segment, 'video', 'end');\n  const finish = () => transmux({\n    bytes,\n    transmuxer: segment.transmuxer,\n    audioAppendStart: segment.audioAppendStart,\n    gopsToAlignWith: segment.gopsToAlignWith,\n    remux: isMuxed,\n    onData: result => {\n      result.type = result.type === 'combined' ? 'video' : result.type;\n      dataFn(segment, result);\n    },\n    onTrackInfo: trackInfo => {\n      if (trackInfoFn) {\n        if (isMuxed) {\n          trackInfo.isMuxed = true;\n        }\n        trackInfoFn(segment, trackInfo);\n      }\n    },\n    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: 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: videoSegmentTimingInfo => {\n      const timingInfo = {\n        pts: {\n          start: videoSegmentTimingInfo.start.presentation,\n          end: videoSegmentTimingInfo.end.presentation\n        },\n        dts: {\n          start: videoSegmentTimingInfo.start.decode,\n          end: videoSegmentTimingInfo.end.decode\n        }\n      };\n      triggerSegmentEventFn({\n        type: 'segmenttransmuxingtiminginfoavailable',\n        segment,\n        timingInfo\n      });\n      videoSegmentTimingInfoFn(videoSegmentTimingInfo);\n    },\n    onAudioSegmentTimingInfo: audioSegmentTimingInfo => {\n      const timingInfo = {\n        pts: {\n          start: audioSegmentTimingInfo.start.pts,\n          end: audioSegmentTimingInfo.end.pts\n        },\n        dts: {\n          start: audioSegmentTimingInfo.start.dts,\n          end: audioSegmentTimingInfo.end.dts\n        }\n      };\n      triggerSegmentEventFn({\n        type: 'segmenttransmuxingtiminginfoavailable',\n        segment,\n        timingInfo\n      });\n      audioSegmentTimingInfoFn(audioSegmentTimingInfo);\n    },\n    onId3: (id3Frames, dispatchType) => {\n      id3Fn(segment, id3Frames, dispatchType);\n    },\n    onCaptions: captions => {\n      captionsFn(segment, [captions]);\n    },\n    isEndOfTimeline,\n    onEndedTimeline: () => {\n      endedTimelineFn();\n    },\n    onTransmuxerLog,\n    onDone: (result, error) => {\n      if (!doneFn) {\n        return;\n      }\n      result.type = result.type === 'combined' ? 'video' : result.type;\n      triggerSegmentEventFn({\n        type: 'segmenttransmuxingcomplete',\n        segment\n      });\n      doneFn(error, segment, result);\n    },\n    segment,\n    triggerSegmentEventFn\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: data => {\n      segment.bytes = bytes = data.data;\n      const probeResult = data.result;\n      if (probeResult) {\n        trackInfoFn(segment, {\n          hasAudio: probeResult.hasAudio,\n          hasVideo: probeResult.hasVideo,\n          isMuxed\n        });\n        trackInfoFn = null;\n      }\n      finish();\n    }\n  });\n};\nconst handleSegmentBytes = ({\n  segment,\n  bytes,\n  trackInfoFn,\n  timingInfoFn,\n  videoSegmentTimingInfoFn,\n  audioSegmentTimingInfoFn,\n  id3Fn,\n  captionsFn,\n  isEndOfTimeline,\n  endedTimelineFn,\n  dataFn,\n  doneFn,\n  onTransmuxerLog,\n  triggerSegmentEventFn\n}) => {\n  let 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    const {\n      tracks\n    } = segment.map;\n    const 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    const 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: ({\n        data,\n        startTime\n      }) => {\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: ({\n            emsgData,\n            id3Frames\n          }) => {\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: 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,\n    bytes,\n    trackInfoFn,\n    timingInfoFn,\n    videoSegmentTimingInfoFn,\n    audioSegmentTimingInfoFn,\n    id3Fn,\n    captionsFn,\n    isEndOfTimeline,\n    endedTimelineFn,\n    dataFn,\n    doneFn,\n    onTransmuxerLog,\n    triggerSegmentEventFn\n  });\n};\nconst decrypt = function ({\n  id,\n  key,\n  encryptedBytes,\n  decryptionWorker,\n  segment,\n  doneFn\n}, callback) {\n  const decryptionHandler = event => {\n    if (event.data.source === id) {\n      decryptionWorker.removeEventListener('message', decryptionHandler);\n      const decrypted = event.data.decrypted;\n      callback(new Uint8Array(decrypted.bytes, decrypted.byteOffset, decrypted.byteLength));\n    }\n  };\n  decryptionWorker.onerror = () => {\n    const message = 'An error occurred in the decryption worker';\n    const segmentInfo = segmentInfoPayload({\n      segment\n    });\n    const decryptError = {\n      message,\n      metadata: {\n        error: new Error(message),\n        errorType: videojs.Error.StreamingFailedToDecryptSegment,\n        segmentInfo,\n        keyInfo: {\n          uri: segment.key.resolvedUri || segment.map.key.resolvedUri\n        }\n      }\n    };\n    doneFn(decryptError, segment);\n  };\n  decryptionWorker.addEventListener('message', decryptionHandler);\n  let 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\nconst decryptSegment = ({\n  decryptionWorker,\n  segment,\n  trackInfoFn,\n  timingInfoFn,\n  videoSegmentTimingInfoFn,\n  audioSegmentTimingInfoFn,\n  id3Fn,\n  captionsFn,\n  isEndOfTimeline,\n  endedTimelineFn,\n  dataFn,\n  doneFn,\n  onTransmuxerLog,\n  triggerSegmentEventFn\n}) => {\n  triggerSegmentEventFn({\n    type: 'segmentdecryptionstart'\n  });\n  decrypt({\n    id: segment.requestId,\n    key: segment.key,\n    encryptedBytes: segment.encryptedBytes,\n    decryptionWorker,\n    segment,\n    doneFn\n  }, decryptedBytes => {\n    segment.bytes = decryptedBytes;\n    triggerSegmentEventFn({\n      type: 'segmentdecryptioncomplete',\n      segment\n    });\n    handleSegmentBytes({\n      segment,\n      bytes: segment.bytes,\n      trackInfoFn,\n      timingInfoFn,\n      videoSegmentTimingInfoFn,\n      audioSegmentTimingInfoFn,\n      id3Fn,\n      captionsFn,\n      isEndOfTimeline,\n      endedTimelineFn,\n      dataFn,\n      doneFn,\n      onTransmuxerLog,\n      triggerSegmentEventFn\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\nconst waitForCompletion = ({\n  activeXhrs,\n  decryptionWorker,\n  trackInfoFn,\n  timingInfoFn,\n  videoSegmentTimingInfoFn,\n  audioSegmentTimingInfoFn,\n  id3Fn,\n  captionsFn,\n  isEndOfTimeline,\n  endedTimelineFn,\n  dataFn,\n  doneFn,\n  onTransmuxerLog,\n  triggerSegmentEventFn\n}) => {\n  let count = 0;\n  let didError = false;\n  return (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      const segmentFinish = function () {\n        if (segment.encryptedBytes) {\n          return decryptSegment({\n            decryptionWorker,\n            segment,\n            trackInfoFn,\n            timingInfoFn,\n            videoSegmentTimingInfoFn,\n            audioSegmentTimingInfoFn,\n            id3Fn,\n            captionsFn,\n            isEndOfTimeline,\n            endedTimelineFn,\n            dataFn,\n            doneFn,\n            onTransmuxerLog,\n            triggerSegmentEventFn\n          });\n        } // Otherwise, everything is ready just continue\n\n        handleSegmentBytes({\n          segment,\n          bytes: segment.bytes,\n          trackInfoFn,\n          timingInfoFn,\n          videoSegmentTimingInfoFn,\n          audioSegmentTimingInfoFn,\n          id3Fn,\n          captionsFn,\n          isEndOfTimeline,\n          endedTimelineFn,\n          dataFn,\n          doneFn,\n          onTransmuxerLog,\n          triggerSegmentEventFn\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        triggerSegmentEventFn({\n          type: 'segmentdecryptionstart',\n          segment\n        });\n        return decrypt({\n          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          segment,\n          doneFn\n        }, decryptedBytes => {\n          segment.map.bytes = decryptedBytes;\n          triggerSegmentEventFn({\n            type: 'segmentdecryptioncomplete',\n            segment\n          });\n          parseInitSegment(segment, 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\nconst handleLoadEnd = ({\n  loadendState,\n  abortFn\n}) => event => {\n  const request = event.target;\n  if (request.aborted && abortFn && !loadendState.calledAbortFn) {\n    abortFn();\n    loadendState.calledAbortFn = true;\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\nconst handleProgress = ({\n  segment,\n  progressFn,\n  trackInfoFn,\n  timingInfoFn,\n  videoSegmentTimingInfoFn,\n  audioSegmentTimingInfoFn,\n  id3Fn,\n  captionsFn,\n  isEndOfTimeline,\n  endedTimelineFn,\n  dataFn\n}) => event => {\n  const 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 * 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\nconst mediaSegmentRequest = ({\n  xhr,\n  xhrOptions,\n  decryptionWorker,\n  segment,\n  abortFn,\n  progressFn,\n  trackInfoFn,\n  timingInfoFn,\n  videoSegmentTimingInfoFn,\n  audioSegmentTimingInfoFn,\n  id3Fn,\n  captionsFn,\n  isEndOfTimeline,\n  endedTimelineFn,\n  dataFn,\n  doneFn,\n  onTransmuxerLog,\n  triggerSegmentEventFn\n}) => {\n  const activeXhrs = [];\n  const finishProcessingFn = waitForCompletion({\n    activeXhrs,\n    decryptionWorker,\n    trackInfoFn,\n    timingInfoFn,\n    videoSegmentTimingInfoFn,\n    audioSegmentTimingInfoFn,\n    id3Fn,\n    captionsFn,\n    isEndOfTimeline,\n    endedTimelineFn,\n    dataFn,\n    doneFn,\n    onTransmuxerLog,\n    triggerSegmentEventFn\n  }); // optionally, request the decryption key\n\n  if (segment.key && !segment.key.bytes) {\n    const 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    const keyRequestOptions = merge(xhrOptions, {\n      uri: segment.key.resolvedUri,\n      responseType: 'arraybuffer',\n      requestType: 'segment-key'\n    });\n    const keyRequestCallback = handleKeyResponse(segment, objects, finishProcessingFn, triggerSegmentEventFn);\n    const keyInfo = {\n      uri: segment.key.resolvedUri\n    };\n    triggerSegmentEventFn({\n      type: 'segmentkeyloadstart',\n      segment,\n      keyInfo\n    });\n    const 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    const differentMapKey = segment.map.key && (!segment.key || segment.key.resolvedUri !== segment.map.key.resolvedUri);\n    if (differentMapKey) {\n      const mapKeyRequestOptions = merge(xhrOptions, {\n        uri: segment.map.key.resolvedUri,\n        responseType: 'arraybuffer',\n        requestType: 'segment-key'\n      });\n      const mapKeyRequestCallback = handleKeyResponse(segment, [segment.map.key], finishProcessingFn, triggerSegmentEventFn);\n      const keyInfo = {\n        uri: segment.map.key.resolvedUri\n      };\n      triggerSegmentEventFn({\n        type: 'segmentkeyloadstart',\n        segment,\n        keyInfo\n      });\n      const mapKeyXhr = xhr(mapKeyRequestOptions, mapKeyRequestCallback);\n      activeXhrs.push(mapKeyXhr);\n    }\n    const initSegmentOptions = merge(xhrOptions, {\n      uri: segment.map.resolvedUri,\n      responseType: 'arraybuffer',\n      headers: segmentXhrHeaders(segment.map),\n      requestType: 'segment-media-initialization'\n    });\n    const initSegmentRequestCallback = handleInitSegmentResponse({\n      segment,\n      finishProcessingFn,\n      triggerSegmentEventFn\n    });\n    triggerSegmentEventFn({\n      type: 'segmentloadstart',\n      segment\n    });\n    const initSegmentXhr = xhr(initSegmentOptions, initSegmentRequestCallback);\n    activeXhrs.push(initSegmentXhr);\n  }\n  const segmentRequestOptions = merge(xhrOptions, {\n    uri: segment.part && segment.part.resolvedUri || segment.resolvedUri,\n    responseType: 'arraybuffer',\n    headers: segmentXhrHeaders(segment),\n    requestType: 'segment'\n  });\n  const segmentRequestCallback = handleSegmentResponse({\n    segment,\n    finishProcessingFn,\n    responseType: segmentRequestOptions.responseType,\n    triggerSegmentEventFn\n  });\n  triggerSegmentEventFn({\n    type: 'segmentloadstart',\n    segment\n  });\n  const segmentXhr = xhr(segmentRequestOptions, segmentRequestCallback);\n  segmentXhr.addEventListener('progress', handleProgress({\n    segment,\n    progressFn,\n    trackInfoFn,\n    timingInfoFn,\n    videoSegmentTimingInfoFn,\n    audioSegmentTimingInfoFn,\n    id3Fn,\n    captionsFn,\n    isEndOfTimeline,\n    endedTimelineFn,\n    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  const loadendState = {};\n  activeXhrs.forEach(activeXhr => {\n    activeXhr.addEventListener('loadend', handleLoadEnd({\n      loadendState,\n      abortFn\n    }));\n  });\n  return () => abortAll(activeXhrs);\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 */\nconst 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\nconst getCodecs = function (media) {\n  // if the codecs were explicitly specified, use them instead of the\n  // defaults\n  const mediaAttributes = media.attributes || {};\n  if (mediaAttributes.CODECS) {\n    return parseCodecs(mediaAttributes.CODECS);\n  }\n};\nconst isMaat = (main, media) => {\n  const mediaAttributes = media.attributes || {};\n  return main && main.mediaGroups && main.mediaGroups.AUDIO && mediaAttributes.AUDIO && main.mediaGroups.AUDIO[mediaAttributes.AUDIO];\n};\nconst isMuxed = (main, media) => {\n  if (!isMaat(main, media)) {\n    return true;\n  }\n  const mediaAttributes = media.attributes || {};\n  const audioGroup = main.mediaGroups.AUDIO[mediaAttributes.AUDIO];\n  for (const 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};\nconst unwrapCodecList = function (codecList) {\n  const codecs = {};\n  codecList.forEach(({\n    mediaType,\n    type,\n    details\n  }) => {\n    codecs[mediaType] = codecs[mediaType] || [];\n    codecs[mediaType].push(translateLegacyCodec(`${type}${details}`));\n  });\n  Object.keys(codecs).forEach(function (mediaType) {\n    if (codecs[mediaType].length > 1) {\n      logFn$1(`multiple ${mediaType} codecs found as attributes: ${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};\nconst codecCount = function (codecObj) {\n  let 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\nconst codecsForPlaylist = function (main, media) {\n  const mediaAttributes = media.attributes || {};\n  const 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      const defaultCodecs = unwrapCodecList(codecsFromDefault(main, mediaAttributes.AUDIO) || []);\n      if (defaultCodecs.audio) {\n        codecInfo.audio = defaultCodecs.audio;\n      }\n    }\n  }\n  return codecInfo;\n};\nconst logFn = logger('PlaylistSelector');\nconst representationToString = function (representation) {\n  if (!representation || !representation.playlist) {\n    return;\n  }\n  const 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\nconst safeGetComputedStyle = function (el, property) {\n  if (!el) {\n    return '';\n  }\n  const 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\nconst stableSort = function (array, sortFn) {\n  const newArray = array.slice();\n  array.sort(function (left, right) {\n    const 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\nconst comparePlaylistBandwidth = function (left, right) {\n  let leftBandwidth;\n  let 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\nconst comparePlaylistResolution = function (left, right) {\n  let leftWidth;\n  let 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\nlet simpleSelector = function (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  const options = {\n    bandwidth: playerBandwidth,\n    width: playerWidth,\n    height: playerHeight,\n    limitRenditionByPlayerDimensions\n  };\n  let 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  let sortedPlaylistReps = playlists.map(playlist => {\n    let bandwidth;\n    const width = playlist.attributes && playlist.attributes.RESOLUTION && playlist.attributes.RESOLUTION.width;\n    const 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,\n      width,\n      height,\n      playlist\n    };\n  });\n  stableSort(sortedPlaylistReps, (left, right) => left.bandwidth - right.bandwidth); // filter out any playlists that have been excluded due to\n  // incompatible configurations\n\n  sortedPlaylistReps = sortedPlaylistReps.filter(rep => !Playlist.isIncompatible(rep.playlist)); // filter out any playlists that have been disabled manually through the representations\n  // api or excluded temporarily due to playback errors.\n\n  let enabledPlaylistReps = sortedPlaylistReps.filter(rep => Playlist.isEnabled(rep.playlist));\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(rep => !Playlist.isDisabled(rep.playlist));\n  } // filter out any variant that has greater effective bitrate\n  // than the current estimated bandwidth\n\n  const bandwidthPlaylistReps = enabledPlaylistReps.filter(rep => rep.bandwidth * Config.BANDWIDTH_VARIANCE < playerBandwidth);\n  let 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  const bandwidthBestRep = bandwidthPlaylistReps.filter(rep => rep.bandwidth === highestRemainingBandwidthRep.bandwidth)[0]; // if we're not going to limit renditions by player size, make an early decision.\n\n  if (limitRenditionByPlayerDimensions === false) {\n    const chosenRep = bandwidthBestRep || enabledPlaylistReps[0] || sortedPlaylistReps[0];\n    if (chosenRep && chosenRep.playlist) {\n      let type = 'sortedPlaylistReps';\n      if (bandwidthBestRep) {\n        type = 'bandwidthBestRep';\n      }\n      if (enabledPlaylistReps[0]) {\n        type = 'enabledPlaylistReps';\n      }\n      logFn(`choosing ${representationToString(chosenRep)} using ${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  const haveResolution = bandwidthPlaylistReps.filter(rep => rep.width && rep.height); // sort variants by resolution\n\n  stableSort(haveResolution, (left, right) => left.width - right.width); // if we have the exact resolution as the player use it\n\n  const resolutionBestRepList = haveResolution.filter(rep => rep.width === playerWidth && rep.height === playerHeight);\n  highestRemainingBandwidthRep = resolutionBestRepList[resolutionBestRepList.length - 1]; // ensure that we pick the highest bandwidth variant that have exact resolution\n\n  const resolutionBestRep = resolutionBestRepList.filter(rep => rep.bandwidth === highestRemainingBandwidthRep.bandwidth)[0];\n  let resolutionPlusOneList;\n  let resolutionPlusOneSmallest;\n  let 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(rep => rep.width > playerWidth || rep.height > playerHeight); // find all the variants have the same smallest resolution\n\n    resolutionPlusOneSmallest = resolutionPlusOneList.filter(rep => rep.width === resolutionPlusOneList[0].width && rep.height === resolutionPlusOneList[0].height); // 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(rep => rep.bandwidth === highestRemainingBandwidthRep.bandwidth)[0];\n  }\n  let 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    const leastPixelDiffList = haveResolution.map(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, (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  const chosenRep = leastPixelDiffRep || resolutionPlusOneRep || resolutionBestRep || bandwidthBestRep || enabledPlaylistReps[0] || sortedPlaylistReps[0];\n  if (chosenRep && chosenRep.playlist) {\n    let type = 'sortedPlaylistReps';\n    if (leastPixelDiffRep) {\n      type = 'leastPixelDiffRep';\n    } else if (resolutionPlusOneRep) {\n      type = 'resolutionPlusOneRep';\n    } else if (resolutionBestRep) {\n      type = 'resolutionBestRep';\n    } else if (bandwidthBestRep) {\n      type = 'bandwidthBestRep';\n    } else if (enabledPlaylistReps[0]) {\n      type = 'enabledPlaylistReps';\n    }\n    logFn(`choosing ${representationToString(chosenRep)} using ${type} 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\nconst lastBandwidthSelector = function () {\n  let pixelRatio = this.useDevicePixelRatio ? window$1.devicePixelRatio || 1 : 1;\n  if (!isNaN(this.customPixelRatio)) {\n    pixelRatio = this.customPixelRatio;\n  }\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\nconst movingAverageBandwidthSelector = function (decay) {\n  let average = -1;\n  let 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    let pixelRatio = this.useDevicePixelRatio ? window$1.devicePixelRatio || 1 : 1;\n    if (!isNaN(this.customPixelRatio)) {\n      pixelRatio = this.customPixelRatio;\n    }\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\nconst minRebufferMaxBandwidthSelector = function (settings) {\n  const {\n    main,\n    currentTime,\n    bandwidth,\n    duration,\n    segmentDuration,\n    timeUntilRebuffer,\n    currentTimeline,\n    syncController\n  } = settings; // filter out any playlists that have been excluded due to\n  // incompatible configurations\n\n  const compatiblePlaylists = main.playlists.filter(playlist => !Playlist.isIncompatible(playlist)); // filter out any playlists that have been disabled manually through the representations\n  // api or excluded temporarily due to playback errors.\n\n  let 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(playlist => !Playlist.isDisabled(playlist));\n  }\n  const bandwidthPlaylists = enabledPlaylists.filter(Playlist.hasAttribute.bind(null, 'BANDWIDTH'));\n  const rebufferingEstimates = bandwidthPlaylists.map(playlist => {\n    const 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    const numRequests = syncPoint ? 1 : 2;\n    const requestTimeEstimate = Playlist.estimateSegmentRequestTime(segmentDuration, bandwidth, playlist);\n    const rebufferingImpact = requestTimeEstimate * numRequests - timeUntilRebuffer;\n    return {\n      playlist,\n      rebufferingImpact\n    };\n  });\n  const noRebufferingPlaylists = rebufferingEstimates.filter(estimate => estimate.rebufferingImpact <= 0); // Sort by bandwidth DESC\n\n  stableSort(noRebufferingPlaylists, (a, b) => comparePlaylistBandwidth(b.playlist, a.playlist));\n  if (noRebufferingPlaylists.length) {\n    return noRebufferingPlaylists[0];\n  }\n  stableSort(rebufferingEstimates, (a, b) => a.rebufferingImpact - b.rebufferingImpact);\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\nconst lowestBitrateCompatibleVariantSelector = function () {\n  // filter out any playlists that have been excluded due to\n  // incompatible configurations or playback errors\n  const playlists = this.playlists.main.playlists.filter(Playlist.isEnabled); // Sort ascending by bitrate\n\n  stableSort(playlists, (a, b) => comparePlaylistBandwidth(a, b)); // 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  const playlistsWithVideo = playlists.filter(playlist => !!codecsForPlaylist(this.playlists.main, playlist).video);\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 */\nconst concatSegments = segmentObj => {\n  let offset = 0;\n  let 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(segment => {\n      tempBuffer.set(segment, offset);\n      offset += segment.byteLength;\n    });\n  }\n  return tempBuffer;\n};\n/**\n * Example:\n * https://host.com/path1/path2/path3/segment.ts?arg1=val1\n * -->\n * path3/segment.ts\n *\n * @param resolvedUri\n * @return {string}\n */\n\nfunction compactSegmentUrlDescription(resolvedUri) {\n  try {\n    return new URL(resolvedUri).pathname.split('/').slice(-2).join('/');\n  } catch (e) {\n    return '';\n  }\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\nconst createCaptionsTrackIfNotExists = function (inbandTextTracks, tech, captionStream) {\n  if (!inbandTextTracks[captionStream]) {\n    tech.trigger({\n      type: 'usage',\n      name: 'vhs-608'\n    });\n    let 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    const 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      const captionServices = tech.options_.vhs && tech.options_.vhs.captionServices || {};\n      let label = captionStream;\n      let language = captionStream;\n      let def = false;\n      const 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,\n        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\nconst addCaptionData = function ({\n  inbandTextTracks,\n  captionArray,\n  timestampOffset\n}) {\n  if (!captionArray) {\n    return;\n  }\n  const Cue = window$1.WebKitDataCue || window$1.VTTCue;\n  captionArray.forEach(caption => {\n    const 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(value => {\n        const 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\nconst deprecateOldCue = function (cue) {\n  Object.defineProperties(cue.frame, {\n    id: {\n      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() {\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() {\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\nconst addMetadata = ({\n  inbandTextTracks,\n  metadataArray,\n  timestampOffset,\n  videoDuration\n}) => {\n  if (!metadataArray) {\n    return;\n  }\n  const Cue = window$1.WebKitDataCue || window$1.VTTCue;\n  const metadataTrack = inbandTextTracks.metadataTrack_;\n  if (!metadataTrack) {\n    return;\n  }\n  metadataArray.forEach(metadata => {\n    const 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(frame => {\n      const 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  const cues = metadataTrack.cues;\n  const cuesArray = []; // Create a copy of the TextTrackCueList...\n  // ...disregarding cues with a falsey value\n\n  for (let i = 0; i < cues.length; i++) {\n    if (cues[i]) {\n      cuesArray.push(cues[i]);\n    }\n  } // Group cues by their startTime value\n\n  const cuesGroupedByStartTime = cuesArray.reduce((obj, cue) => {\n    const timeSlot = obj[cue.startTime] || [];\n    timeSlot.push(cue);\n    obj[cue.startTime] = timeSlot;\n    return obj;\n  }, {}); // Sort startTimes by ascending order\n\n  const sortedStartTimes = Object.keys(cuesGroupedByStartTime).sort((a, b) => Number(a) - Number(b)); // Map each cue group's endTime to the next group's startTime\n\n  sortedStartTimes.forEach((startTime, idx) => {\n    const cueGroup = cuesGroupedByStartTime[startTime];\n    const finiteDuration = isFinite(videoDuration) ? videoDuration : startTime;\n    const nextTime = Number(sortedStartTimes[idx + 1]) || finiteDuration; // Map each cue's endTime the next group's startTime\n\n    cueGroup.forEach(cue => {\n      cue.endTime = nextTime;\n    });\n  });\n}; // object for mapping daterange attributes\n\nconst 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};\nconst 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\nconst addDateRangeMetadata = ({\n  inbandTextTracks,\n  dateRanges\n}) => {\n  const metadataTrack = inbandTextTracks.metadataTrack_;\n  if (!metadataTrack) {\n    return;\n  }\n  const Cue = window$1.WebKitDataCue || window$1.VTTCue;\n  dateRanges.forEach(dateRange => {\n    // we generate multiple cues for each date range with different attributes\n    for (const key of Object.keys(dateRange)) {\n      if (dateRangeKeysToOmit.has(key)) {\n        continue;\n      }\n      const 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\nconst 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\nconst removeCuesFromTrack = function (start, end, track) {\n  let i;\n  let 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\nconst removeDuplicateCuesFromTrack = function (track) {\n  const cues = track.cues;\n  if (!cues) {\n    return;\n  }\n  const uniqueCues = {};\n  for (let i = cues.length - 1; i >= 0; i--) {\n    const cue = cues[i];\n    const cueKey = `${cue.startTime}-${cue.endTime}-${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\nconst 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  const currentTimePts = Math.ceil((currentTime - mapping + 3) * ONE_SECOND_IN_TS);\n  let 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\nconst 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  const start = gops[0].pts;\n  let 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\nconst removeGopBuffer = (buffer, start, end, mapping) => {\n  const startPts = Math.ceil((start - mapping) * ONE_SECOND_IN_TS);\n  const endPts = Math.ceil((end - mapping) * ONE_SECOND_IN_TS);\n  const updatedBuffer = buffer.slice();\n  let 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  let 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};\nconst shallowEqual = function (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  const akeys = Object.keys(a).sort();\n  const bkeys = Object.keys(b).sort(); // different number of keys, not equal\n\n  if (akeys.length !== bkeys.length) {\n    return false;\n  }\n  for (let i = 0; i < akeys.length; i++) {\n    const key = akeys[i]; // different sorted keys, not equal\n\n    if (key !== bkeys[i]) {\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/**\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\nconst getSyncSegmentCandidate = function (currentTimeline, segments, targetTime) {\n  segments = segments || [];\n  const timelineSegments = [];\n  let time = 0;\n  for (let i = 0; i < segments.length; i++) {\n    const segment = segments[i];\n    if (currentTimeline === segment.timeline) {\n      timelineSegments.push(i);\n      time += segment.duration;\n      if (time > targetTime) {\n        return i;\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\nconst MIN_BACK_BUFFER = 1; // in ms\n\nconst CHECK_BUFFER_DELAY = 500;\nconst finite = num => typeof num === 'number' && isFinite(num); // 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\nconst MIN_SEGMENT_DURATION_TO_SAVE_STATS = 1 / 60;\nconst 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\nconst 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  let 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  const maxTrimTime = currentTime - targetDuration;\n  return Math.min(maxTrimTime, trimTime);\n};\nconst segmentInfoString = segmentInfo => {\n  const {\n    startOfSegment,\n    duration,\n    segment,\n    part,\n    playlist: {\n      mediaSequence: seq,\n      id,\n      segments = []\n    },\n    mediaIndex: index,\n    partIndex,\n    timeline\n  } = segmentInfo;\n  const segmentLen = segments.length - 1;\n  let selection = 'mediaIndex/partIndex increment';\n  if (segmentInfo.getMediaInfoForTime) {\n    selection = `getMediaInfoForTime (${segmentInfo.getMediaInfoForTime})`;\n  } else if (segmentInfo.isSyncRequest) {\n    selection = 'getSyncSegmentCandidate (isSyncRequest)';\n  }\n  if (segmentInfo.independent) {\n    selection += ` with independent ${segmentInfo.independent}`;\n  }\n  const hasPartIndex = typeof partIndex === 'number';\n  const name = segmentInfo.segment.uri ? 'segment' : 'pre-segment';\n  const zeroBasedPartCount = hasPartIndex ? getKnownPartCount({\n    preloadSegment: segment\n  }) - 1 : 0;\n  return `${name} [${seq + index}/${seq + segmentLen}]` + (hasPartIndex ? ` part [${partIndex}/${zeroBasedPartCount}]` : '') + ` segment start/end [${segment.start} => ${segment.end}]` + (hasPartIndex ? ` part start/end [${part.start} => ${part.end}]` : '') + ` startOfSegment [${startOfSegment}]` + ` duration [${duration}]` + ` timeline [${timeline}]` + ` selected by [${selection}]` + ` playlist [${id}]`;\n};\nconst timingInfoPropertyForMedia = mediaType => `${mediaType}TimingInfo`;\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} 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\nconst timestampOffsetForSegment = ({\n  segmentTimeline,\n  currentTimeline,\n  startOfSegment,\n  buffered,\n  overrideCheck\n}) => {\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  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 buffered.length ? buffered.end(buffered.length - 1) : 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\nconst shouldWaitForTimelineChange = ({\n  timelineChangeController,\n  currentTimeline,\n  segmentTimeline,\n  loaderType,\n  audioDisabled\n}) => {\n  if (currentTimeline === segmentTimeline) {\n    return false;\n  }\n  if (loaderType === 'audio') {\n    const 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    const 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};\nconst shouldFixBadTimelineChanges = timelineChangeController => {\n  if (!timelineChangeController) {\n    return false;\n  }\n  const pendingAudioTimelineChange = timelineChangeController.pendingTimelineChange({\n    type: 'audio'\n  });\n  const pendingMainTimelineChange = timelineChangeController.pendingTimelineChange({\n    type: 'main'\n  });\n  const hasPendingTimelineChanges = pendingAudioTimelineChange && pendingMainTimelineChange;\n  const differentPendingChanges = hasPendingTimelineChanges && pendingAudioTimelineChange.to !== pendingMainTimelineChange.to;\n  const isNotInitialPendingTimelineChange = hasPendingTimelineChanges && pendingAudioTimelineChange.from !== -1 && pendingMainTimelineChange.from !== -1;\n  if (isNotInitialPendingTimelineChange && differentPendingChanges) {\n    return true;\n  }\n  return false;\n};\n/**\n * Fixes certain bad timeline scenarios by resetting the loader.\n *\n * @param {SegmentLoader} segmentLoader\n */\n\nconst fixBadTimelineChange = segmentLoader => {\n  if (!segmentLoader) {\n    return;\n  }\n  segmentLoader.pause();\n  segmentLoader.resetEverything();\n  segmentLoader.load();\n};\n/**\n * Check if the pending audio timeline change is behind the\n * pending main timeline change.\n *\n * @param {SegmentLoader} segmentLoader\n * @return {boolean}\n */\n\nconst isAudioTimelineBehind = segmentLoader => {\n  const pendingAudioTimelineChange = segmentLoader.timelineChangeController_.pendingTimelineChange({\n    type: 'audio'\n  });\n  const pendingMainTimelineChange = segmentLoader.timelineChangeController_.pendingTimelineChange({\n    type: 'main'\n  });\n  const hasPendingTimelineChanges = pendingAudioTimelineChange && pendingMainTimelineChange;\n  return hasPendingTimelineChanges && pendingAudioTimelineChange.to < pendingMainTimelineChange.to;\n};\n/**\n * A method to check if the player is waiting for a timeline change, and fixes\n * certain scenarios where the timelines need to be updated.\n *\n * @param {SegmentLoader} segmentLoader\n */\n\nconst checkAndFixTimelines = segmentLoader => {\n  const segmentInfo = segmentLoader.pendingSegment_;\n  if (!segmentInfo) {\n    return;\n  }\n  const waitingForTimelineChange = shouldWaitForTimelineChange({\n    timelineChangeController: segmentLoader.timelineChangeController_,\n    currentTimeline: segmentLoader.currentTimeline_,\n    segmentTimeline: segmentInfo.timeline,\n    loaderType: segmentLoader.loaderType_,\n    audioDisabled: segmentLoader.audioDisabled_\n  });\n  if (waitingForTimelineChange && shouldFixBadTimelineChanges(segmentLoader.timelineChangeController_)) {\n    if (isAudioTimelineBehind(segmentLoader)) {\n      segmentLoader.timelineChangeController_.trigger('audioTimelineBehind');\n      return;\n    }\n    fixBadTimelineChange(segmentLoader);\n  }\n};\nconst mediaDuration = timingInfos => {\n  let maxDuration = 0;\n  ['video', 'audio'].forEach(function (type) {\n    const typeTimingInfo = timingInfos[`${type}TimingInfo`];\n    if (!typeTimingInfo) {\n      return;\n    }\n    const {\n      start,\n      end\n    } = typeTimingInfo;\n    let 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};\nconst segmentTooLong = ({\n  segmentDuration,\n  maxDuration\n}) => {\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};\nconst 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  const 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  const targetDuration = segmentInfo.playlist.targetDuration;\n  const isSegmentWayTooLong = segmentTooLong({\n    segmentDuration,\n    maxDuration: targetDuration * 2\n  });\n  const isSegmentSlightlyTooLong = segmentTooLong({\n    segmentDuration,\n    maxDuration: targetDuration\n  });\n  const segmentTooLongMessage = `Segment with index ${segmentInfo.mediaIndex} ` + `from playlist ${segmentInfo.playlist.id} ` + `has a duration of ${segmentDuration} ` + `when the reported duration is ${segmentInfo.duration} ` + `and the target duration is ${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 *\n * @param {Object} options type of segment loader and segment either segmentInfo or simple segment\n * @return a segmentInfo payload for events or errors.\n */\n\nconst segmentInfoPayload = ({\n  type,\n  segment\n}) => {\n  if (!segment) {\n    return;\n  }\n  const isEncrypted = Boolean(segment.key || segment.map && segment.map.ke);\n  const isMediaInitialization = Boolean(segment.map && !segment.map.bytes);\n  const start = segment.startOfSegment === undefined ? segment.start : segment.startOfSegment;\n  return {\n    type: type || segment.type,\n    uri: segment.resolvedUri || segment.uri,\n    start,\n    duration: segment.duration,\n    isEncrypted,\n    isMediaInitialization\n  };\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 */\n\nclass SegmentLoader extends videojs.EventTarget {\n  constructor(settings, options = {}) {\n    super(); // 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    this.bandwidth = settings.bandwidth;\n    this.throughput = {\n      rate: 0,\n      count: 0\n    };\n    this.roundTrip = NaN;\n    this.resetStats_();\n    this.mediaIndex = null;\n    this.partIndex = null; // private settings\n\n    this.hasPlayed_ = settings.hasPlayed;\n    this.currentTime_ = settings.currentTime;\n    this.seekable_ = settings.seekable;\n    this.seeking_ = settings.seeking;\n    this.duration_ = settings.duration;\n    this.mediaSource_ = settings.mediaSource;\n    this.vhs_ = settings.vhs;\n    this.loaderType_ = settings.loaderType;\n    this.currentMediaInfo_ = void 0;\n    this.startingMediaInfo_ = void 0;\n    this.segmentMetadataTrack_ = settings.segmentMetadataTrack;\n    this.goalBufferLength_ = settings.goalBufferLength;\n    this.sourceType_ = settings.sourceType;\n    this.sourceUpdater_ = settings.sourceUpdater;\n    this.inbandTextTracks_ = settings.inbandTextTracks;\n    this.state_ = 'INIT';\n    this.timelineChangeController_ = settings.timelineChangeController;\n    this.shouldSaveSegmentTimingInfo_ = true;\n    this.parse708captions_ = settings.parse708captions;\n    this.useDtsForTimestampOffset_ = settings.useDtsForTimestampOffset;\n    this.captionServices_ = settings.captionServices;\n    this.exactManifestTimings = settings.exactManifestTimings;\n    this.addMetadataToTextTrack = settings.addMetadataToTextTrack; // private instance variables\n\n    this.checkBufferTimeout_ = null;\n    this.error_ = void 0;\n    this.currentTimeline_ = -1;\n    this.shouldForceTimestampOffsetAfterResync_ = false;\n    this.pendingSegment_ = null;\n    this.xhrOptions_ = null;\n    this.pendingSegments_ = [];\n    this.audioDisabled_ = false;\n    this.isPendingTimestampOffset_ = false; // TODO possibly move gopBuffer and timeMapping info to a separate controller\n\n    this.gopBuffer_ = [];\n    this.timeMapping_ = 0;\n    this.safeAppend_ = false;\n    this.appendInitSegment_ = {\n      audio: true,\n      video: true\n    };\n    this.playlistOfLastInitSegment_ = {\n      audio: null,\n      video: null\n    };\n    this.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    this.loadQueue_ = [];\n    this.metadataQueue_ = {\n      id3: [],\n      caption: []\n    };\n    this.waitingOnRemove_ = false;\n    this.quotaExceededErrorRetryTimeout_ = null; // Fragmented mp4 playback\n\n    this.activeInitSegmentId_ = null;\n    this.initSegments_ = {}; // HLSe playback\n\n    this.cacheEncryptionKeys_ = settings.cacheEncryptionKeys;\n    this.keyCache_ = {};\n    this.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    this.syncController_ = settings.syncController;\n    this.syncPoint_ = {\n      segmentIndex: 0,\n      time: 0\n    };\n    this.transmuxer_ = this.createTransmuxer_();\n    this.triggerSyncInfoUpdate_ = () => this.trigger('syncinfoupdate');\n    this.syncController_.on('syncinfoupdate', this.triggerSyncInfoUpdate_);\n    this.mediaSource_.addEventListener('sourceopen', () => {\n      if (!this.isEndOfStream_()) {\n        this.ended_ = false;\n      }\n    }); // ...for determining the fetch location\n\n    this.fetchAtBuffer_ = false;\n    this.logger_ = logger(`SegmentLoader[${this.loaderType_}]`);\n    Object.defineProperty(this, 'state', {\n      get() {\n        return this.state_;\n      },\n      set(newState) {\n        if (newState !== this.state_) {\n          this.logger_(`${this.state_} -> ${newState}`);\n          this.state_ = newState;\n          this.trigger('statechange');\n        }\n      }\n    });\n    this.sourceUpdater_.on('ready', () => {\n      if (this.hasEnoughInfoToAppend_()) {\n        this.processCallQueue_();\n      } else {\n        checkAndFixTimelines(this);\n      }\n    });\n    this.sourceUpdater_.on('codecschange', metadata => {\n      this.trigger(_extends({\n        type: 'codecschange'\n      }, metadata));\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 (this.loaderType_ === 'main') {\n      this.timelineChangeController_.on('pendingtimelinechange', () => {\n        if (this.hasEnoughInfoToAppend_()) {\n          this.processCallQueue_();\n        } else {\n          checkAndFixTimelines(this);\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 (this.loaderType_ === 'audio') {\n      this.timelineChangeController_.on('timelinechange', metadata => {\n        this.trigger(_extends({\n          type: 'timelinechange'\n        }, metadata));\n        if (this.hasEnoughInfoToLoad_()) {\n          this.processLoadQueue_();\n        } else {\n          checkAndFixTimelines(this);\n        }\n        if (this.hasEnoughInfoToAppend_()) {\n          this.processCallQueue_();\n        } else {\n          checkAndFixTimelines(this);\n        }\n      });\n    }\n  }\n  /**\n   * TODO: Current sync controller consists of many hls-specific strategies\n   * media sequence sync is also hls-specific, and we would like to be protocol-agnostic on this level\n   * this should be a part of the sync-controller and sync controller should expect different strategy list based on the protocol.\n   *\n   * @return {MediaSequenceSync|null}\n   * @private\n   */\n\n  get mediaSequenceSync_() {\n    return this.syncController_.getMediaSequenceSync(this.loaderType_);\n  }\n  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  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  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  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  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  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  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  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  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  buffered_() {\n    const trackInfo = this.getMediaInfo_();\n    if (!this.sourceUpdater_ || !trackInfo) {\n      return createTimeRanges();\n    }\n    if (this.loaderType_ === 'main') {\n      const {\n        hasAudio,\n        hasVideo,\n        isMuxed\n      } = trackInfo;\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  initSegmentForMap(map, set = false) {\n    if (!map) {\n      return null;\n    }\n    const id = initSegmentId(map);\n    let 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  segmentKey(key, set = false) {\n    if (!key) {\n      return null;\n    }\n    const id = segmentKeyId(key);\n    let 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    const 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  couldBeginLoading_() {\n    return this.playlist_ && !this.paused();\n  }\n  /**\n   * load a playlist and start to fill the buffer\n   */\n\n  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  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  playlist(newPlaylist, options = {}) {\n    if (!newPlaylist) {\n      return;\n    }\n    const oldPlaylist = this.playlist_;\n    const 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    let 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 [${oldId} => ${newPlaylist.id || newPlaylist.uri}]`);\n    if (this.mediaSequenceSync_) {\n      this.mediaSequenceSync_.update(newPlaylist, this.currentTime_());\n      this.logger_(`Playlist update:\ncurrentTime: ${this.currentTime_()}\nbufferedEnd: ${lastBufferedEnd(this.buffered_())}\n`, this.mediaSequenceSync_.diagnostics);\n    } // 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        const 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    const mediaSequenceDiff = newPlaylist.mediaSequence - oldPlaylist.mediaSequence;\n    this.logger_(`live window shift [${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        const 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          const mediaIndex = this.mediaIndex;\n          this.logger_(`currently processing part (index ${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  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  paused() {\n    return this.checkBufferTimeout_ === null;\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  resetEverything(done) {\n    this.ended_ = false;\n    this.activeInitSegmentId_ = null;\n    this.appendInitSegment_ = {\n      audio: true,\n      video: true\n    };\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  resetLoader() {\n    this.fetchAtBuffer_ = false;\n    if (this.mediaSequenceSync_) {\n      this.mediaSequenceSync_.resetAppendedStatus();\n    }\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  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; // this is mainly to sync timing-info when switching between renditions with and without timestamp-rollover,\n    // so we don't want it for DASH or fragmented mp4 segments.\n\n    const isFmp4 = this.currentMediaInfo_ && this.currentMediaInfo_.isFmp4;\n    const isHlsTs = this.sourceType_ === 'hls' && !isFmp4;\n    if (isHlsTs) {\n      this.shouldForceTimestampOffsetAfterResync_ = true;\n    }\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  remove(start, end, done = () => {}, force = 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    let removesRemaining = 1;\n    const 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 (const 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  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  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  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    const segmentInfo = this.chooseNextRequest_();\n    if (!segmentInfo) {\n      return;\n    }\n    const metadata = {\n      segmentInfo: segmentInfoPayload({\n        type: this.loaderType_,\n        segment: segmentInfo\n      })\n    };\n    this.trigger({\n      type: 'segmentselected',\n      metadata\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  isEndOfStream_(mediaIndex = this.mediaIndex, playlist = this.playlist_, partIndex = this.partIndex) {\n    if (!playlist || !this.mediaSource_) {\n      return false;\n    }\n    const segment = typeof mediaIndex === 'number' && playlist.segments[mediaIndex]; // mediaIndex is zero based but length is 1 based\n\n    const appendedLastSegment = mediaIndex + 1 === playlist.segments.length; // true if there are no parts, or this is the last part.\n\n    const 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  chooseNextRequest_() {\n    const buffered = this.buffered_();\n    const bufferedEnd = lastBufferedEnd(buffered) || 0;\n    const bufferedTime = timeAheadOf(buffered, this.currentTime_());\n    const preloaded = !this.hasPlayed_() && bufferedTime >= 1;\n    const haveEnoughBuffer = bufferedTime >= this.goalBufferLength_();\n    const 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_(), this.loaderType_);\n    const 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      this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${next.mediaIndex}`);\n    } else if (this.mediaIndex !== null) {\n      const segment = segments[this.mediaIndex];\n      const 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      let segmentIndex;\n      let partIndex;\n      let startTime;\n      const targetTime = this.fetchAtBuffer_ ? bufferedEnd : this.currentTime_();\n      if (this.mediaSequenceSync_) {\n        this.logger_(`chooseNextRequest_ request after Quality Switch:\nFor TargetTime: ${targetTime}.\nCurrentTime: ${this.currentTime_()}\nBufferedEnd: ${bufferedEnd}\nFetch At Buffer: ${this.fetchAtBuffer_}\n`, this.mediaSequenceSync_.diagnostics);\n      }\n      if (this.mediaSequenceSync_ && this.mediaSequenceSync_.isReliable) {\n        const syncInfo = this.getSyncInfoFromMediaSequenceSync_(targetTime);\n        if (!syncInfo) {\n          const message = 'No sync info found while using media sequence sync';\n          this.error({\n            message,\n            metadata: {\n              errorType: videojs.Error.StreamingFailedToSelectNextSegment,\n              error: new Error(message)\n            }\n          });\n          this.logger_('chooseNextRequest_ - no sync info found using media sequence sync'); // no match\n\n          return null;\n        }\n        this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${syncInfo.start} --> ${syncInfo.end})`);\n        segmentIndex = syncInfo.segmentIndex;\n        partIndex = syncInfo.partIndex;\n        startTime = syncInfo.start;\n      } else {\n        this.logger_('chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.'); // fallback\n\n        const mediaInfoForTime = Playlist.getMediaInfoForTime({\n          exactManifestTimings: this.exactManifestTimings,\n          playlist: this.playlist_,\n          currentTime: targetTime,\n          startingPartIndex: this.syncPoint_.partIndex,\n          startingSegmentIndex: this.syncPoint_.segmentIndex,\n          startTime: this.syncPoint_.time\n        });\n        segmentIndex = mediaInfoForTime.segmentIndex;\n        partIndex = mediaInfoForTime.partIndex;\n        startTime = mediaInfoForTime.startTime;\n      }\n      next.getMediaInfoForTime = this.fetchAtBuffer_ ? `bufferedEnd ${targetTime}` : `currentTime ${targetTime}`;\n      next.mediaIndex = segmentIndex;\n      next.startOfSegment = startTime;\n      next.partIndex = partIndex;\n      this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${next.mediaIndex} `);\n    }\n    const nextSegment = segments[next.mediaIndex];\n    let 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    const 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        const lastSegment = segments[next.mediaIndex - 1];\n        const 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    const 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    if (this.shouldForceTimestampOffsetAfterResync_) {\n      this.shouldForceTimestampOffsetAfterResync_ = false;\n      next.forceTimestampOffset = true;\n      this.logger_('choose next request. Force timestamp offset after loader resync');\n    }\n    return this.generateSegmentInfo_(next);\n  }\n  getSyncInfoFromMediaSequenceSync_(targetTime) {\n    if (!this.mediaSequenceSync_) {\n      return null;\n    } // we should pull the target time to the least available time if we drop out of sync for any reason\n\n    const finalTargetTime = Math.max(targetTime, this.mediaSequenceSync_.start);\n    if (targetTime !== finalTargetTime) {\n      this.logger_(`getSyncInfoFromMediaSequenceSync_. Pulled target time from ${targetTime} to ${finalTargetTime}`);\n    }\n    const mediaSequenceSyncInfo = this.mediaSequenceSync_.getSyncInfoForTime(finalTargetTime);\n    if (!mediaSequenceSyncInfo) {\n      // no match at all\n      return null;\n    }\n    if (!mediaSequenceSyncInfo.isAppended) {\n      // has a perfect match\n      return mediaSequenceSyncInfo;\n    } // has match, but segment was already appended.\n    // attempt to auto-advance to the nearest next segment:\n\n    const nextMediaSequenceSyncInfo = this.mediaSequenceSync_.getSyncInfoForTime(mediaSequenceSyncInfo.end);\n    if (!nextMediaSequenceSyncInfo) {\n      // no match at all\n      return null;\n    }\n    if (nextMediaSequenceSyncInfo.isAppended) {\n      this.logger_('getSyncInfoFromMediaSequenceSync_: We encounter unexpected scenario where next media sequence sync info is also appended!');\n    } // got match with the nearest next segment\n\n    return nextMediaSequenceSyncInfo;\n  }\n  generateSegmentInfo_(options) {\n    const {\n      independent,\n      playlist,\n      mediaIndex,\n      startOfSegment,\n      isSyncRequest,\n      partIndex,\n      forceTimestampOffset,\n      getMediaInfoForTime\n    } = options;\n    const segment = playlist.segments[mediaIndex];\n    const part = typeof partIndex === 'number' && segment.parts[partIndex];\n    const 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,\n      partIndex: part ? partIndex : null,\n      // whether or not to update the SegmentLoader's state with this\n      // segment's mediaIndex\n      isSyncRequest,\n      startOfSegment,\n      // the segment's playlist\n      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,\n      part,\n      byteLength: 0,\n      transmuxer: this.transmuxer_,\n      // type of getMediaInfoForTime that was used to get this segment\n      getMediaInfoForTime,\n      independent\n    };\n    const overrideCheck = typeof forceTimestampOffset !== 'undefined' ? forceTimestampOffset : this.isPendingTimestampOffset_;\n    segmentInfo.timestampOffset = this.timestampOffsetForSegment_({\n      segmentTimeline: segment.timeline,\n      currentTimeline: this.currentTimeline_,\n      startOfSegment,\n      buffered: this.buffered_(),\n      overrideCheck\n    });\n    const 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  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  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    const currentTime = this.currentTime_();\n    const measuredBandwidth = stats.bandwidth;\n    const segmentDuration = this.pendingSegment_.duration;\n    const 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    const 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    const switchCandidate = minRebufferMaxBandwidthSelector({\n      main: this.vhs_.playlists.main,\n      currentTime,\n      bandwidth: measuredBandwidth,\n      duration: this.duration_(),\n      segmentDuration,\n      timeUntilRebuffer: timeUntilRebuffer$1,\n      currentTimeline: this.currentTimeline_,\n      syncController: this.syncController_\n    });\n    if (!switchCandidate) {\n      return;\n    }\n    const rebufferingImpact = requestTimeRemaining - timeUntilRebuffer$1;\n    const timeSavedBySwitching = rebufferingImpact - switchCandidate.rebufferingImpact;\n    let 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  handleAbort_(segmentInfo) {\n    this.logger_(`Aborting ${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  handleProgress_(event, simpleSegment) {\n    this.earlyAbortWhenNeeded_(simpleSegment.stats);\n    if (this.checkForAbort_(simpleSegment.requestId)) {\n      return;\n    }\n    this.trigger('progress');\n  }\n  handleTrackInfo_(simpleSegment, trackInfo) {\n    const {\n      hasAudio,\n      hasVideo\n    } = trackInfo;\n    const metadata = {\n      segmentInfo: segmentInfoPayload({\n        type: this.loaderType_,\n        segment: simpleSegment\n      }),\n      trackInfo: {\n        hasAudio,\n        hasVideo\n      }\n    };\n    this.trigger({\n      type: 'segmenttransmuxingtrackinfoavailable',\n      metadata\n    });\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    } else {\n      checkAndFixTimelines(this);\n    }\n  }\n  handleTimingInfo_(simpleSegment, mediaType, timeType, time) {\n    this.earlyAbortWhenNeeded_(simpleSegment.stats);\n    if (this.checkForAbort_(simpleSegment.requestId)) {\n      return;\n    }\n    const segmentInfo = this.pendingSegment_;\n    const timingInfoProperty = timingInfoPropertyForMedia(mediaType);\n    segmentInfo[timingInfoProperty] = segmentInfo[timingInfoProperty] || {};\n    segmentInfo[timingInfoProperty][timeType] = time;\n    this.logger_(`timinginfo: ${mediaType} - ${timeType} - ${time}`); // check if any calls were waiting on the timing info\n\n    if (this.hasEnoughInfoToAppend_()) {\n      this.processCallQueue_();\n    } else {\n      checkAndFixTimelines(this);\n    }\n  }\n  handleCaptions_(simpleSegment, captionData) {\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    const 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    const timestampOffset = this.sourceUpdater_.videoTimestampOffset() === null ? this.sourceUpdater_.audioTimestampOffset() : this.sourceUpdater_.videoTimestampOffset();\n    const captionTracks = {}; // get total start/end and captions for each track/stream\n\n    captionData.forEach(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      const 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(trackName => {\n      const {\n        startTime,\n        endTime,\n        captions\n      } = captionTracks[trackName];\n      const inbandTextTracks = this.inbandTextTracks_;\n      this.logger_(`adding cues from ${startTime} -> ${endTime} for ${trackName}`);\n      createCaptionsTrackIfNotExists(inbandTextTracks, this.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,\n        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  handleId3_(simpleSegment, id3Frames, dispatchType) {\n    this.earlyAbortWhenNeeded_(simpleSegment.stats);\n    if (this.checkForAbort_(simpleSegment.requestId)) {\n      return;\n    }\n    const 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  processMetadataQueue_() {\n    this.metadataQueue_.id3.forEach(fn => fn());\n    this.metadataQueue_.caption.forEach(fn => fn());\n    this.metadataQueue_.id3 = [];\n    this.metadataQueue_.caption = [];\n  }\n  processCallQueue_() {\n    const 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(fun => fun());\n  }\n  processLoadQueue_() {\n    const 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(fun => fun());\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  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    const 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  getCurrentMediaInfo_(segmentInfo = this.pendingSegment_) {\n    return segmentInfo && segmentInfo.trackInfo || this.currentMediaInfo_;\n  }\n  getMediaInfo_(segmentInfo = this.pendingSegment_) {\n    return this.getCurrentMediaInfo_(segmentInfo) || this.startingMediaInfo_;\n  }\n  getPendingSegmentPlaylist() {\n    return this.pendingSegment_ ? this.pendingSegment_.playlist : null;\n  }\n  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    const segmentInfo = this.pendingSegment_;\n    const 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    const {\n      hasAudio,\n      hasVideo,\n      isMuxed\n    } = trackInfo;\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    } // we need to allow an append here even if we're moving to different timelines.\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  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      checkAndFixTimelines(this);\n      this.callQueue_.push(this.handleData_.bind(this, simpleSegment, result));\n      return;\n    }\n    const 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      const trackInfo = this.getCurrentMediaInfo_();\n      const useVideoTimingInfo = this.loaderType_ === 'main' && trackInfo && trackInfo.hasVideo;\n      let 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,\n        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,\n        shouldSaveTimelineMapping: this.loaderType_ === 'main'\n      });\n      const 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  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  getInitSegmentAndUpdateState_({\n    type,\n    initSegment,\n    map,\n    playlist\n  }) {\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      const 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  handleQuotaExceededError_({\n    segmentInfo,\n    type,\n    bytes\n  }, error) {\n    const audioBuffered = this.sourceUpdater_.audioBuffered();\n    const 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    const audioBufferStart = audioBuffered.length ? audioBuffered.start(0) : 0;\n    const audioBufferEnd = audioBuffered.length ? audioBuffered.end(audioBuffered.length - 1) : 0;\n    const videoBufferStart = videoBuffered.length ? videoBuffered.start(0) : 0;\n    const 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: ${bytes.byteLength}, ` + `audio buffer: ${timeRangesToArray(audioBuffered).join(', ')}, ` + `video buffer: ${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,\n      type,\n      bytes\n    }));\n    const currentTime = this.currentTime_(); // Try to remove as much audio and video as possible to make room for new content\n    // before retrying.\n\n    const timeToRemoveUntil = currentTime - MIN_BACK_BUFFER;\n    this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${timeToRemoveUntil}`);\n    this.remove(0, timeToRemoveUntil, () => {\n      this.logger_(`On QUOTA_EXCEEDED_ERR, retrying append in ${MIN_BACK_BUFFER}s`);\n      this.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      this.quotaExceededErrorRetryTimeout_ = window$1.setTimeout(() => {\n        this.logger_('On QUOTA_EXCEEDED_ERR, re-processing call queue');\n        this.quotaExceededErrorRetryTimeout_ = null;\n        this.processCallQueue_();\n      }, MIN_BACK_BUFFER * 1000);\n    }, true);\n  }\n  handleAppendError_({\n    segmentInfo,\n    type,\n    bytes\n  }, error) {\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,\n        type,\n        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); // 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.error({\n      message: `${type} append of ${bytes.length}b failed for segment ` + `#${segmentInfo.mediaIndex} in playlist ${segmentInfo.playlist.id}`,\n      metadata: {\n        errorType: videojs.Error.StreamingFailedToAppendSegment\n      }\n    });\n    this.trigger('appenderror');\n  }\n  appendToSourceBuffer_({\n    segmentInfo,\n    type,\n    initSegment,\n    data,\n    bytes\n  }) {\n    // If this is a re-append, bytes were already created and don't need to be recreated\n    if (!bytes) {\n      const segments = [data];\n      let 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\n      });\n    }\n    const metadata = {\n      segmentInfo: segmentInfoPayload({\n        type: this.loaderType_,\n        segment: segmentInfo\n      })\n    };\n    this.trigger({\n      type: 'segmentappendstart',\n      metadata\n    });\n    this.sourceUpdater_.appendBuffer({\n      segmentInfo,\n      type,\n      bytes\n    }, this.handleAppendError_.bind(this, {\n      segmentInfo,\n      type,\n      bytes\n    }));\n  }\n  handleSegmentTimingInfo_(type, requestId, segmentTimingInfo) {\n    if (!this.pendingSegment_ || requestId !== this.pendingSegment_.requestId) {\n      return;\n    }\n    const segment = this.pendingSegment_.segment;\n    const timingInfoProperty = `${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  appendData_(segmentInfo, result) {\n    const {\n      type,\n      data\n    } = result;\n    if (!data || !data.byteLength) {\n      return;\n    }\n    if (type === 'audio' && this.audioDisabled_) {\n      return;\n    }\n    const initSegment = this.getInitSegmentAndUpdateState_({\n      type,\n      initSegment: result.initSegment,\n      playlist: segmentInfo.playlist,\n      map: segmentInfo.isFmp4 ? segmentInfo.segment.map : null\n    });\n    this.appendToSourceBuffer_({\n      segmentInfo,\n      type,\n      initSegment,\n      data\n    });\n  }\n  /**\n   * load a specific segment from a request into the buffer\n   *\n   * @private\n   */\n\n  loadSegment_(segmentInfo) {\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      checkAndFixTimelines(this);\n      this.loadQueue_.push(() => {\n        // regenerate the audioAppendStart, timestampOffset, etc as they\n        // may have changed since this function was added to the queue.\n        const options = _extends({}, segmentInfo, {\n          forceTimestampOffset: true\n        });\n        _extends(segmentInfo, this.generateSegmentInfo_(options));\n        this.isPendingTimestampOffset_ = false;\n        this.updateTransmuxerAndRequestSegment_(segmentInfo);\n      });\n      return;\n    }\n    this.updateTransmuxerAndRequestSegment_(segmentInfo);\n  }\n  updateTransmuxerAndRequestSegment_(segmentInfo) {\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    const simpleSegment = this.createSimplifiedSegmentObj_(segmentInfo);\n    const isEndOfStream = this.isEndOfStream_(segmentInfo.mediaIndex, segmentInfo.playlist, segmentInfo.partIndex);\n    const isWalkingForward = this.mediaIndex !== null;\n    const 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    const isEndOfTimeline = isEndOfStream || isWalkingForward && isDiscontinuity;\n    this.logger_(`Requesting\n${compactSegmentUrlDescription(segmentInfo.uri)}\n${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,\n      endedTimelineFn: () => {\n        this.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: ({\n        message,\n        level,\n        stream\n      }) => {\n        this.logger_(`${segmentInfoString(segmentInfo)} logged from transmuxer stream ${stream} as a ${level}: ${message}`);\n      },\n      triggerSegmentEventFn: ({\n        type,\n        segment,\n        keyInfo,\n        trackInfo,\n        timingInfo\n      }) => {\n        const segInfo = segmentInfoPayload({\n          segment\n        });\n        const metadata = {\n          segmentInfo: segInfo\n        }; // add other properties if necessary.\n\n        if (keyInfo) {\n          metadata.keyInfo = keyInfo;\n        }\n        if (trackInfo) {\n          metadata.trackInfo = trackInfo;\n        }\n        if (timingInfo) {\n          metadata.timingInfo = timingInfo;\n        }\n        this.trigger({\n          type,\n          metadata\n        });\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  trimBackBuffer_(segmentInfo) {\n    const 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  createSimplifiedSegmentObj_(segmentInfo) {\n    const segment = segmentInfo.segment;\n    const part = segmentInfo.part;\n    const isEncrypted = segmentInfo.segment.key || segmentInfo.segment.map && segmentInfo.segment.map.key;\n    const isMediaInitialization = segmentInfo.segment.map && !segmentInfo.segment.map.bytes;\n    const 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      type: this.loaderType_,\n      start: segmentInfo.startOfSegment,\n      duration: segmentInfo.duration,\n      isEncrypted,\n      isMediaInitialization\n    };\n    const 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      const 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  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  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 ${duration}` + ` is less than the min to record ${MIN_SEGMENT_DURATION_TO_SAVE_STATS}`);\n      return;\n    }\n    const metadata = {\n      bandwidthInfo: {\n        from: this.bandwidth,\n        to: stats.bandwidth\n      }\n    }; // player event with payload\n\n    this.trigger({\n      type: 'bandwidthupdated',\n      metadata\n    });\n    this.bandwidth = stats.bandwidth;\n    this.roundTrip = stats.roundTripTime;\n  }\n  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  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    const 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  setTimeMapping_(timeline) {\n    const timelineMapping = this.syncController_.mappingForTimeline(timeline);\n    if (timelineMapping !== null) {\n      this.timeMapping_ = timelineMapping;\n    }\n  }\n  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  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  trueSegmentStart_({\n    currentStart,\n    playlist,\n    mediaIndex,\n    firstVideoFrameTimeForData,\n    currentVideoTimestampOffset,\n    useVideoTimingInfo,\n    videoTimingInfo,\n    audioTimingInfo\n  }) {\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    const 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  waitForAppendsToComplete_(segmentInfo) {\n    const 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    const {\n      hasAudio,\n      hasVideo,\n      isMuxed\n    } = trackInfo;\n    const waitForVideo = this.loaderType_ === 'main' && hasVideo;\n    const 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  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  checkForIllegalMediaSwitch(trackInfo) {\n    const 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  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    let 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  getSegmentStartTimeForTimestampOffsetCalculation_({\n    videoTimingInfo,\n    audioTimingInfo,\n    timingInfo\n  }) {\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  updateTimingInfoEnd_(segmentInfo) {\n    segmentInfo.timingInfo = segmentInfo.timingInfo || {};\n    const trackInfo = this.getMediaInfo_();\n    const useVideoTimingInfo = this.loaderType_ === 'main' && trackInfo && trackInfo.hasVideo;\n    const 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  handleAppendsDone_() {\n    // appendsdone can cause an abort\n    if (this.pendingSegment_) {\n      const metadata = {\n        segmentInfo: segmentInfoPayload({\n          type: this.loaderType_,\n          segment: this.pendingSegment_\n        })\n      };\n      this.trigger({\n        type: 'appendsdone',\n        metadata\n      });\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    const segmentInfo = this.pendingSegment_;\n    if (segmentInfo.part && segmentInfo.part.syncInfo) {\n      // low-latency flow\n      segmentInfo.part.syncInfo.markAppended();\n    } else if (segmentInfo.segment.syncInfo) {\n      // normal flow\n      segmentInfo.segment.syncInfo.markAppended();\n    } // 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,\n        shouldSaveTimelineMapping: this.loaderType_ === 'main'\n      });\n    }\n    const 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 ${segmentInfoString(segmentInfo)}`);\n        return;\n      }\n    }\n    this.logger_(`Appended ${segmentInfoString(segmentInfo)}`);\n    this.addSegmentMetadataCue_(segmentInfo);\n    this.fetchAtBuffer_ = true;\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    const segment = segmentInfo.segment;\n    const part = segmentInfo.part;\n    const badSegmentGuess = segment.end && this.currentTime_() - segment.end > segmentInfo.playlist.targetDuration * 3;\n    const 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 ${badSegmentGuess ? 'segment' : 'part'} ${segmentInfoString(segmentInfo)}`);\n      this.resetEverything();\n      return;\n    }\n    const 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  recordThroughput_(segmentInfo) {\n    if (segmentInfo.duration < MIN_SEGMENT_DURATION_TO_SAVE_STATS) {\n      this.logger_(`Ignoring segment's throughput because its duration of ${segmentInfo.duration}` + ` is less than the min to record ${MIN_SEGMENT_DURATION_TO_SAVE_STATS}`);\n      return;\n    }\n    const 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    const segmentProcessingTime = Date.now() - segmentInfo.endOfAllRequests + 1; // Multiply by 8000 to convert from bytes/millisecond to bits/second\n\n    const 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  addSegmentMetadataCue_(segmentInfo) {\n    if (!this.segmentMetadataTrack_) {\n      return;\n    }\n    const segment = segmentInfo.segment;\n    const start = segment.start;\n    const 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    const Cue = window$1.WebKitDataCue || window$1.VTTCue;\n    const 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,\n      end\n    };\n    const data = JSON.stringify(value);\n    const 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}\nfunction noop() {}\nconst toTitleCase = function (string) {\n  if (typeof string !== 'string') {\n    return string;\n  }\n  return string.replace(/./, w => w.toUpperCase());\n};\n\n/**\n * @file source-updater.js\n */\nconst bufferTypes = ['video', 'audio'];\nconst updating = (type, sourceUpdater) => {\n  const sourceBuffer = sourceUpdater[`${type}Buffer`];\n  return sourceBuffer && sourceBuffer.updating || sourceUpdater.queuePending[type];\n};\nconst nextQueueIndexOfType = (type, queue) => {\n  for (let i = 0; i < queue.length; i++) {\n    const queueEntry = queue[i];\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 i;\n    }\n  }\n  return null;\n};\nconst shiftQueue = (type, sourceUpdater) => {\n  if (sourceUpdater.queue.length === 0) {\n    return;\n  }\n  let queueIndex = 0;\n  let 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};\nconst cleanupBuffer = (type, sourceUpdater) => {\n  const buffer = sourceUpdater[`${type}Buffer`];\n  const titleType = toTitleCase(type);\n  if (!buffer) {\n    return;\n  }\n  buffer.removeEventListener('updateend', sourceUpdater[`on${titleType}UpdateEnd_`]);\n  buffer.removeEventListener('error', sourceUpdater[`on${titleType}Error_`]);\n  sourceUpdater.codecs[type] = null;\n  sourceUpdater[`${type}Buffer`] = null;\n};\nconst inSourceBuffers = (mediaSource, sourceBuffer) => mediaSource && sourceBuffer && Array.prototype.indexOf.call(mediaSource.sourceBuffers, sourceBuffer) !== -1;\nconst actions = {\n  appendBuffer: (bytes, segmentInfo, onError) => (type, sourceUpdater) => {\n    const sourceBuffer = sourceUpdater[`${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 ${segmentInfo.mediaIndex}'s ${bytes.length} bytes to ${type}Buffer`);\n    try {\n      sourceBuffer.appendBuffer(bytes);\n    } catch (e) {\n      sourceUpdater.logger_(`Error with code ${e.code} ` + (e.code === QUOTA_EXCEEDED_ERR ? '(QUOTA_EXCEEDED_ERR) ' : '') + `when appending segment ${segmentInfo.mediaIndex} to ${type}Buffer`);\n      sourceUpdater.queuePending[type] = null;\n      onError(e);\n    }\n  },\n  remove: (start, end) => (type, sourceUpdater) => {\n    const sourceBuffer = sourceUpdater[`${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 ${start} to ${end} from ${type}Buffer`);\n    try {\n      sourceBuffer.remove(start, end);\n    } catch (e) {\n      sourceUpdater.logger_(`Remove ${start} to ${end} from ${type}Buffer failed`);\n    }\n  },\n  timestampOffset: offset => (type, sourceUpdater) => {\n    const sourceBuffer = sourceUpdater[`${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 ${type}timestampOffset to ${offset}`);\n    sourceBuffer.timestampOffset = offset;\n  },\n  callback: callback => (type, sourceUpdater) => {\n    callback();\n  },\n  endOfStream: error => sourceUpdater => {\n    if (sourceUpdater.mediaSource.readyState !== 'open') {\n      return;\n    }\n    sourceUpdater.logger_(`Calling mediaSource endOfStream(${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  duration: duration => sourceUpdater => {\n    sourceUpdater.logger_(`Setting mediaSource duration to ${duration}`);\n    try {\n      sourceUpdater.mediaSource.duration = duration;\n    } catch (e) {\n      videojs.log.warn('Failed to set media source duration', e);\n    }\n  },\n  abort: () => (type, sourceUpdater) => {\n    if (sourceUpdater.mediaSource.readyState !== 'open') {\n      return;\n    }\n    const sourceBuffer = sourceUpdater[`${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 ${type}Buffer`);\n    try {\n      sourceBuffer.abort();\n    } catch (e) {\n      videojs.log.warn(`Failed to abort on ${type}Buffer`, e);\n    }\n  },\n  addSourceBuffer: (type, codec) => sourceUpdater => {\n    const titleType = toTitleCase(type);\n    const mime = getMimeForCodec(codec);\n    sourceUpdater.logger_(`Adding ${type}Buffer with codec ${codec} to mediaSource`);\n    const sourceBuffer = sourceUpdater.mediaSource.addSourceBuffer(mime);\n    sourceBuffer.addEventListener('updateend', sourceUpdater[`on${titleType}UpdateEnd_`]);\n    sourceBuffer.addEventListener('error', sourceUpdater[`on${titleType}Error_`]);\n    sourceUpdater.codecs[type] = codec;\n    sourceUpdater[`${type}Buffer`] = sourceBuffer;\n  },\n  removeSourceBuffer: type => sourceUpdater => {\n    const sourceBuffer = sourceUpdater[`${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 ${type}Buffer with codec ${sourceUpdater.codecs[type]} from mediaSource`);\n    try {\n      sourceUpdater.mediaSource.removeSourceBuffer(sourceBuffer);\n    } catch (e) {\n      videojs.log.warn(`Failed to removeSourceBuffer ${type}Buffer`, e);\n    }\n  },\n  changeType: codec => (type, sourceUpdater) => {\n    const sourceBuffer = sourceUpdater[`${type}Buffer`];\n    const 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    // Only update if we change the codec base.\n    // For example, going from avc1.640028 to avc1.64001f does not require a changeType call.\n\n    const newCodecBase = codec.substring(0, codec.indexOf('.'));\n    const oldCodec = sourceUpdater.codecs[type];\n    const oldCodecBase = oldCodec.substring(0, oldCodec.indexOf('.'));\n    if (oldCodecBase === newCodecBase) {\n      return;\n    }\n    const metadata = {\n      codecsChangeInfo: {\n        from: oldCodec,\n        to: codec\n      }\n    };\n    sourceUpdater.trigger({\n      type: 'codecschange',\n      metadata\n    });\n    sourceUpdater.logger_(`changing ${type}Buffer codec from ${oldCodec} to ${codec}`); // check if change to the provided type is supported\n\n    try {\n      sourceBuffer.changeType(mime);\n      sourceUpdater.codecs[type] = codec;\n    } catch (e) {\n      metadata.errorType = videojs.Error.StreamingCodecsChangeError;\n      metadata.error = e;\n      e.metadata = metadata;\n      sourceUpdater.error_ = e;\n      sourceUpdater.trigger('error');\n      videojs.log.warn(`Failed to changeType on ${type}Buffer`, e);\n    }\n  }\n};\nconst pushQueue = ({\n  type,\n  sourceUpdater,\n  action,\n  doneFn,\n  name\n}) => {\n  sourceUpdater.queue.push({\n    type,\n    action,\n    doneFn,\n    name\n  });\n  shiftQueue(type, sourceUpdater);\n};\nconst onUpdateend = (type, sourceUpdater) => e => {\n  // 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  const bufferedRangesForType = sourceUpdater[`${type}Buffered`]();\n  const descriptiveString = bufferedRangesToString(bufferedRangesForType);\n  sourceUpdater.logger_(`received \"updateend\" event for ${type} Source Buffer: `, descriptiveString);\n  if (sourceUpdater.queuePending[type]) {\n    const doneFn = sourceUpdater.queuePending[type].doneFn;\n    sourceUpdater.queuePending[type] = null;\n    if (doneFn) {\n      // if there's an error, report it\n      doneFn(sourceUpdater[`${type}Error_`]);\n    }\n  }\n  shiftQueue(type, sourceUpdater);\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 */\n\nclass SourceUpdater extends videojs.EventTarget {\n  constructor(mediaSource) {\n    super();\n    this.mediaSource = mediaSource;\n    this.sourceopenListener_ = () => shiftQueue('mediaSource', this);\n    this.mediaSource.addEventListener('sourceopen', this.sourceopenListener_);\n    this.logger_ = logger('SourceUpdater'); // initial timestamp offset is 0\n\n    this.audioTimestampOffset_ = 0;\n    this.videoTimestampOffset_ = 0;\n    this.queue = [];\n    this.queuePending = {\n      audio: null,\n      video: null\n    };\n    this.delayedAudioAppendQueue_ = [];\n    this.videoAppendQueued_ = false;\n    this.codecs = {};\n    this.onVideoUpdateEnd_ = onUpdateend('video', this);\n    this.onAudioUpdateEnd_ = onUpdateend('audio', this);\n    this.onVideoError_ = e => {\n      // used for debugging\n      this.videoError_ = e;\n    };\n    this.onAudioError_ = e => {\n      // used for debugging\n      this.audioError_ = e;\n    };\n    this.createdSourceBuffers_ = false;\n    this.initializedEme_ = false;\n    this.triggeredReady_ = false;\n  }\n  initializedEme() {\n    this.initializedEme_ = true;\n    this.triggerReady();\n  }\n  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  hasInitializedAnyEme() {\n    return this.initializedEme_;\n  }\n  ready() {\n    return this.hasCreatedSourceBuffers() && this.hasInitializedAnyEme();\n  }\n  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  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  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  abort(type) {\n    pushQueue({\n      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  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  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  static canChangeType() {\n    return window$1.SourceBuffer && window$1.SourceBuffer.prototype && typeof window$1.SourceBuffer.prototype.changeType === '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  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  changeType(type, codec) {\n    if (!this.canChangeType()) {\n      videojs.log.error('changeType is not supported!');\n      return;\n    }\n    pushQueue({\n      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  addOrChangeSourceBuffers(codecs) {\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(type => {\n      const codec = codecs[type];\n      if (!this.hasCreatedSourceBuffers()) {\n        return this.addSourceBuffer(type, codec);\n      }\n      if (this.canChangeType()) {\n        this.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  appendBuffer(options, doneFn) {\n    const {\n      segmentInfo,\n      type,\n      bytes\n    } = options;\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 ${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    const onError = doneFn;\n    pushQueue({\n      type,\n      sourceUpdater: this,\n      action: actions.appendBuffer(bytes, segmentInfo || {\n        mediaIndex: -1\n      }, onError),\n      doneFn,\n      name: 'appendBuffer'\n    });\n    if (type === 'video') {\n      this.videoAppendQueued_ = true;\n      if (!this.delayedAudioAppendQueue_.length) {\n        return;\n      }\n      const queue = this.delayedAudioAppendQueue_.slice();\n      this.logger_(`queuing delayed audio ${queue.length} appendBuffers`);\n      this.delayedAudioAppendQueue_.length = 0;\n      queue.forEach(que => {\n        this.appendBuffer.apply(this, 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  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  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  buffered() {\n    const video = inSourceBuffers(this.mediaSource, this.videoBuffer) ? this.videoBuffer : null;\n    const 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  setDuration(duration, doneFn = 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\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  endOfStream(error = null, doneFn = 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\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  removeAudio(start, end, done = 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  removeVideo(start, end, done = 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  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  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  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  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  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  dispose() {\n    this.trigger('dispose');\n    bufferTypes.forEach(type => {\n      this.abort(type);\n      if (this.canRemoveSourceBuffer()) {\n        this.removeSourceBuffer(type);\n      } else {\n        this[`${type}QueueCallback`](() => cleanupBuffer(type, this));\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}\nconst uint8ToUtf8 = uintArray => decodeURIComponent(escape(String.fromCharCode.apply(null, uintArray)));\nconst bufferToHexString = buffer => {\n  const uInt8Buffer = new Uint8Array(buffer);\n  return Array.from(uInt8Buffer).map(byte => byte.toString(16).padStart(2, '0')).join('');\n};\n\n/**\n * @file vtt-segment-loader.js\n */\nconst VTT_LINE_TERMINATORS = new Uint8Array('\\n\\n'.split('').map(char => char.charCodeAt(0)));\nclass NoVttJsError extends Error {\n  constructor() {\n    super('Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.');\n  }\n}\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 */\n\nclass VTTSegmentLoader extends SegmentLoader {\n  constructor(settings, options = {}) {\n    super(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    this.mediaSource_ = null;\n    this.subtitlesTrack_ = null;\n    this.featuresNativeTextTracks_ = settings.featuresNativeTextTracks;\n    this.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    this.shouldSaveSegmentTimingInfo_ = false;\n  }\n  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  buffered_() {\n    if (!this.subtitlesTrack_ || !this.subtitlesTrack_.cues || !this.subtitlesTrack_.cues.length) {\n      return createTimeRanges();\n    }\n    const cues = this.subtitlesTrack_.cues;\n    const start = cues[0].startTime;\n    const 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  initSegmentForMap(map, set = false) {\n    if (!map) {\n      return null;\n    }\n    const id = initSegmentId(map);\n    let 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      const combinedByteLength = VTT_LINE_TERMINATORS.byteLength + map.bytes.byteLength;\n      const 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  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  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  track(track) {\n    if (typeof track === 'undefined') {\n      return this.subtitlesTrack_;\n    }\n    this.subtitlesTrack_ = track; // 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  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  fillBuffer_() {\n    // see if we need to begin loading immediately\n    const 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      const checkTimestampOffset = () => {\n        this.state = 'READY';\n        if (!this.paused()) {\n          // if not paused, queue a buffer check as soon as possible\n          this.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  timestampOffsetForSegment_() {\n    return null;\n  }\n  chooseNextRequest_() {\n    return this.skipEmptySegments_(super.chooseNextRequest_());\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  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  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  segmentRequestFinished_(error, simpleSegment, result) {\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    const 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    const 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(() => this.segmentRequestFinished_(error, simpleSegment, result), () => this.stopForError({\n        message: 'Error loading vtt.js'\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        metadata: {\n          errorType: videojs.Error.StreamingVttParserError,\n          error: e\n        }\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(cue => {\n      this.subtitlesTrack_.addCue(this.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  handleData_() {// noop as we shouldn't be getting video/audio data captions\n    // that we do not support here.\n  }\n  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  parseVTTCues_(segmentInfo) {\n    let decoder;\n    let 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    const 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 = map => {\n      segmentInfo.timestampmap = map;\n    };\n    parser.onparsingerror = error => {\n      videojs.log.warn('Error encountered when parsing cues: ' + error.message);\n    };\n    if (segmentInfo.segment.map) {\n      let mapData = segmentInfo.segment.map.bytes;\n      if (decodeBytesToString) {\n        mapData = uint8ToUtf8(mapData);\n      }\n      parser.parse(mapData);\n    }\n    let 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  updateTimeMapping_(segmentInfo, mappingObj, playlist) {\n    const 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    const {\n      MPEGTS,\n      LOCAL\n    } = segmentInfo.timestampmap;\n    /**\n     * From the spec:\n     * The MPEGTS media timestamp MUST use a 90KHz timescale,\n     * even when non-WebVTT Media Segments use a different timescale.\n     */\n\n    const mpegTsInSeconds = MPEGTS / ONE_SECOND_IN_TS;\n    const diff = mpegTsInSeconds - LOCAL + mappingObj.mapping;\n    segmentInfo.cues.forEach(cue => {\n      const duration = cue.endTime - cue.startTime;\n      const startTime = this.handleRollover_(cue.startTime + diff, mappingObj.time);\n      cue.startTime = Math.max(startTime, 0);\n      cue.endTime = Math.max(startTime + duration, 0);\n    });\n    if (!playlist.syncInfo) {\n      const firstStart = segmentInfo.cues[0].startTime;\n      const 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   * MPEG-TS PES timestamps are limited to 2^33.\n   * Once they reach 2^33, they roll over to 0.\n   * mux.js handles PES timestamp rollover for the following scenarios:\n   * [forward rollover(right)] ->\n   *    PES timestamps monotonically increase, and once they reach 2^33, they roll over to 0\n   * [backward rollover(left)] -->\n   *    we seek back to position before rollover.\n   *\n   * According to the HLS SPEC:\n   * When synchronizing WebVTT with PES timestamps, clients SHOULD account\n   * for cases where the 33-bit PES timestamps have wrapped and the WebVTT\n   * cue times have not.  When the PES timestamp wraps, the WebVTT Segment\n   * SHOULD have a X-TIMESTAMP-MAP header that maps the current WebVTT\n   * time to the new (low valued) PES timestamp.\n   *\n   * So we want to handle rollover here and align VTT Cue start/end time to the player's time.\n   */\n\n  handleRollover_(value, reference) {\n    if (reference === null) {\n      return value;\n    }\n    let valueIn90khz = value * ONE_SECOND_IN_TS;\n    const referenceIn90khz = reference * ONE_SECOND_IN_TS;\n    let offset;\n    if (referenceIn90khz < valueIn90khz) {\n      // - 2^33\n      offset = -8589934592;\n    } else {\n      // + 2^33\n      offset = 8589934592;\n    } // distance(value - reference) > 2^32\n\n    while (Math.abs(valueIn90khz - referenceIn90khz) > 4294967296) {\n      valueIn90khz += offset;\n    }\n    return valueIn90khz / ONE_SECOND_IN_TS;\n  }\n}\n\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 */\n\nconst findAdCue = function (track, mediaTime) {\n  const cues = track.cues;\n  for (let i = 0; i < cues.length; i++) {\n    const cue = cues[i];\n    if (mediaTime >= cue.adStartTime && mediaTime <= cue.adEndTime) {\n      return cue;\n    }\n  }\n  return null;\n};\nconst updateAdCues = function (media, track, offset = 0) {\n  if (!media.segments) {\n    return;\n  }\n  let mediaTime = offset;\n  let cue;\n  for (let i = 0; i < media.segments.length; i++) {\n    const segment = media.segments[i];\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        const [adOffset, adTotal] = segment.cueOutCont.split('/').map(parseFloat);\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};\nclass SyncInfo {\n  /**\n   * @param {number} start - media sequence start\n   * @param {number} end - media sequence end\n   * @param {number} segmentIndex - index for associated segment\n   * @param {number|null} [partIndex] - index for associated part\n   * @param {boolean} [appended] - appended indicator\n   *\n   */\n  constructor({\n    start,\n    end,\n    segmentIndex,\n    partIndex = null,\n    appended = false\n  }) {\n    this.start_ = start;\n    this.end_ = end;\n    this.segmentIndex_ = segmentIndex;\n    this.partIndex_ = partIndex;\n    this.appended_ = appended;\n  }\n  isInRange(targetTime) {\n    return targetTime >= this.start && targetTime < this.end;\n  }\n  markAppended() {\n    this.appended_ = true;\n  }\n  resetAppendedStatus() {\n    this.appended_ = false;\n  }\n  get isAppended() {\n    return this.appended_;\n  }\n  get start() {\n    return this.start_;\n  }\n  get end() {\n    return this.end_;\n  }\n  get segmentIndex() {\n    return this.segmentIndex_;\n  }\n  get partIndex() {\n    return this.partIndex_;\n  }\n}\nclass SyncInfoData {\n  /**\n   *\n   * @param {SyncInfo} segmentSyncInfo - sync info for a given segment\n   * @param {Array<SyncInfo>} [partsSyncInfo] - sync infos for a list of parts for a given segment\n   */\n  constructor(segmentSyncInfo, partsSyncInfo = []) {\n    this.segmentSyncInfo_ = segmentSyncInfo;\n    this.partsSyncInfo_ = partsSyncInfo;\n  }\n  get segmentSyncInfo() {\n    return this.segmentSyncInfo_;\n  }\n  get partsSyncInfo() {\n    return this.partsSyncInfo_;\n  }\n  get hasPartsSyncInfo() {\n    return this.partsSyncInfo_.length > 0;\n  }\n  resetAppendStatus() {\n    this.segmentSyncInfo_.resetAppendedStatus();\n    this.partsSyncInfo_.forEach(partSyncInfo => partSyncInfo.resetAppendedStatus());\n  }\n}\nclass MediaSequenceSync {\n  constructor() {\n    /**\n     * @type {Map<number, SyncInfoData>}\n     * @protected\n     */\n    this.storage_ = new Map();\n    this.diagnostics_ = '';\n    this.isReliable_ = false;\n    this.start_ = -Infinity;\n    this.end_ = Infinity;\n  }\n  get start() {\n    return this.start_;\n  }\n  get end() {\n    return this.end_;\n  }\n  get diagnostics() {\n    return this.diagnostics_;\n  }\n  get isReliable() {\n    return this.isReliable_;\n  }\n  resetAppendedStatus() {\n    this.storage_.forEach(syncInfoData => syncInfoData.resetAppendStatus());\n  }\n  /**\n   * update sync storage\n   *\n   * @param {Object} playlist\n   * @param {number} currentTime\n   *\n   * @return {void}\n   */\n\n  update(playlist, currentTime) {\n    const {\n      mediaSequence,\n      segments\n    } = playlist;\n    this.isReliable_ = this.isReliablePlaylist_(mediaSequence, segments);\n    if (!this.isReliable_) {\n      return;\n    }\n    return this.updateStorage_(segments, mediaSequence, this.calculateBaseTime_(mediaSequence, currentTime));\n  }\n  /**\n   * @param {number} targetTime\n   * @return {SyncInfo|null}\n   */\n\n  getSyncInfoForTime(targetTime) {\n    for (const {\n      segmentSyncInfo,\n      partsSyncInfo\n    } of this.storage_.values()) {\n      // Normal segment flow:\n      if (!partsSyncInfo.length) {\n        if (segmentSyncInfo.isInRange(targetTime)) {\n          return segmentSyncInfo;\n        }\n      } else {\n        // Low latency flow:\n        for (const partSyncInfo of partsSyncInfo) {\n          if (partSyncInfo.isInRange(targetTime)) {\n            return partSyncInfo;\n          }\n        }\n      }\n    }\n    return null;\n  }\n  getSyncInfoForMediaSequence(mediaSequence) {\n    return this.storage_.get(mediaSequence);\n  }\n  updateStorage_(segments, startingMediaSequence, startingTime) {\n    const newStorage = new Map();\n    let newDiagnostics = '\\n';\n    let currentStart = startingTime;\n    let currentMediaSequence = startingMediaSequence;\n    this.start_ = currentStart;\n    segments.forEach((segment, segmentIndex) => {\n      const prevSyncInfoData = this.storage_.get(currentMediaSequence);\n      const segmentStart = currentStart;\n      const segmentEnd = segmentStart + segment.duration;\n      const segmentIsAppended = Boolean(prevSyncInfoData && prevSyncInfoData.segmentSyncInfo && prevSyncInfoData.segmentSyncInfo.isAppended);\n      const segmentSyncInfo = new SyncInfo({\n        start: segmentStart,\n        end: segmentEnd,\n        appended: segmentIsAppended,\n        segmentIndex\n      });\n      segment.syncInfo = segmentSyncInfo;\n      let currentPartStart = currentStart;\n      const partsSyncInfo = (segment.parts || []).map((part, partIndex) => {\n        const partStart = currentPartStart;\n        const partEnd = currentPartStart + part.duration;\n        const partIsAppended = Boolean(prevSyncInfoData && prevSyncInfoData.partsSyncInfo && prevSyncInfoData.partsSyncInfo[partIndex] && prevSyncInfoData.partsSyncInfo[partIndex].isAppended);\n        const partSyncInfo = new SyncInfo({\n          start: partStart,\n          end: partEnd,\n          appended: partIsAppended,\n          segmentIndex,\n          partIndex\n        });\n        currentPartStart = partEnd;\n        newDiagnostics += `Media Sequence: ${currentMediaSequence}.${partIndex} | Range: ${partStart} --> ${partEnd} | Appended: ${partIsAppended}\\n`;\n        part.syncInfo = partSyncInfo;\n        return partSyncInfo;\n      });\n      newStorage.set(currentMediaSequence, new SyncInfoData(segmentSyncInfo, partsSyncInfo));\n      newDiagnostics += `${compactSegmentUrlDescription(segment.resolvedUri)} | Media Sequence: ${currentMediaSequence} | Range: ${segmentStart} --> ${segmentEnd} | Appended: ${segmentIsAppended}\\n`;\n      currentMediaSequence++;\n      currentStart = segmentEnd;\n    });\n    this.end_ = currentStart;\n    this.storage_ = newStorage;\n    this.diagnostics_ = newDiagnostics;\n  }\n  calculateBaseTime_(mediaSequence, fallback) {\n    if (!this.storage_.size) {\n      // Initial setup flow.\n      return 0;\n    }\n    if (this.storage_.has(mediaSequence)) {\n      // Normal flow.\n      return this.storage_.get(mediaSequence).segmentSyncInfo.start;\n    } // Fallback flow.\n    // There is a gap between last recorded playlist and a new one received.\n\n    return fallback;\n  }\n  isReliablePlaylist_(mediaSequence, segments) {\n    return mediaSequence !== undefined && mediaSequence !== null && Array.isArray(segments) && segments.length;\n  }\n}\nclass DependantMediaSequenceSync extends MediaSequenceSync {\n  constructor(parent) {\n    super();\n    this.parent_ = parent;\n  }\n  calculateBaseTime_(mediaSequence, fallback) {\n    if (!this.storage_.size) {\n      const info = this.parent_.getSyncInfoForMediaSequence(mediaSequence);\n      if (info) {\n        return info.segmentSyncInfo.start;\n      }\n      return 0;\n    }\n    return super.calculateBaseTime_(mediaSequence, fallback);\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\nconst MAX_MEDIA_SEQUENCE_DIFF_FOR_SYNC = 86400;\nconst 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: (syncController, playlist, duration, currentTimeline, currentTime) => {\n    if (duration !== Infinity) {\n      const syncPoint = {\n        time: 0,\n        segmentIndex: 0,\n        partIndex: null\n      };\n      return syncPoint;\n    }\n    return null;\n  }\n}, {\n  name: 'MediaSequence',\n  /**\n   * run media sequence strategy\n   *\n   * @param {SyncController} syncController\n   * @param {Object} playlist\n   * @param {number} duration\n   * @param {number} currentTimeline\n   * @param {number} currentTime\n   * @param {string} type\n   */\n  run: (syncController, playlist, duration, currentTimeline, currentTime, type) => {\n    const mediaSequenceSync = syncController.getMediaSequenceSync(type);\n    if (!mediaSequenceSync) {\n      return null;\n    }\n    if (!mediaSequenceSync.isReliable) {\n      return null;\n    }\n    const syncInfo = mediaSequenceSync.getSyncInfoForTime(currentTime);\n    if (!syncInfo) {\n      return null;\n    }\n    return {\n      time: syncInfo.start,\n      partIndex: syncInfo.partIndex,\n      segmentIndex: syncInfo.segmentIndex\n    };\n  }\n},\n// Stategy \"ProgramDateTime\": We have a program-date-time tag in this playlist\n{\n  name: 'ProgramDateTime',\n  run: (syncController, playlist, duration, currentTimeline, currentTime) => {\n    if (!Object.keys(syncController.timelineToDatetimeMappings).length) {\n      return null;\n    }\n    let syncPoint = null;\n    let lastDistance = null;\n    const partsAndSegments = getPartsAndSegments(playlist);\n    currentTime = currentTime || 0;\n    for (let i = 0; i < partsAndSegments.length; i++) {\n      // start from the end and loop backwards for live\n      // or start from the front and loop forwards for non-live\n      const index = playlist.endList || currentTime === 0 ? i : partsAndSegments.length - (i + 1);\n      const partAndSegment = partsAndSegments[index];\n      const segment = partAndSegment.segment;\n      const datetimeMapping = syncController.timelineToDatetimeMappings[segment.timeline];\n      if (!datetimeMapping || !segment.dateTimeObject) {\n        continue;\n      }\n      const segmentTime = segment.dateTimeObject.getTime() / 1000;\n      let start = segmentTime + datetimeMapping; // take part duration into account.\n\n      if (segment.parts && typeof partAndSegment.partIndex === 'number') {\n        for (let z = 0; z < partAndSegment.partIndex; z++) {\n          start += segment.parts[z].duration;\n        }\n      }\n      const 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: (syncController, playlist, duration, currentTimeline, currentTime) => {\n    let syncPoint = null;\n    let lastDistance = null;\n    currentTime = currentTime || 0;\n    const partsAndSegments = getPartsAndSegments(playlist);\n    for (let i = 0; i < partsAndSegments.length; i++) {\n      // start from the end and loop backwards for live\n      // or start from the front and loop forwards for non-live\n      const index = playlist.endList || currentTime === 0 ? i : partsAndSegments.length - (i + 1);\n      const partAndSegment = partsAndSegments[index];\n      const segment = partAndSegment.segment;\n      const start = partAndSegment.part && partAndSegment.part.start || segment && segment.start;\n      if (segment.timeline === currentTimeline && typeof start !== 'undefined') {\n        const 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: (syncController, playlist, duration, currentTimeline, currentTime) => {\n    let syncPoint = null;\n    currentTime = currentTime || 0;\n    if (playlist.discontinuityStarts && playlist.discontinuityStarts.length) {\n      let lastDistance = null;\n      for (let i = 0; i < playlist.discontinuityStarts.length; i++) {\n        const segmentIndex = playlist.discontinuityStarts[i];\n        const discontinuity = playlist.discontinuitySequence + i + 1;\n        const discontinuitySync = syncController.discontinuities[discontinuity];\n        if (discontinuitySync) {\n          const 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,\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: (syncController, playlist, duration, currentTimeline, currentTime) => {\n    if (playlist.syncInfo) {\n      const 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}];\nclass SyncController extends videojs.EventTarget {\n  constructor(options = {}) {\n    super(); // ...for synching across variants\n\n    this.timelines = [];\n    this.discontinuities = [];\n    this.timelineToDatetimeMappings = {}; // TODO: this map should be only available for HLS. Since only HLS has MediaSequence.\n    //  For some reason this map helps with syncing between quality switch for MPEG-DASH as well.\n    //  Moreover if we disable this map for MPEG-DASH - quality switch will be broken.\n    //  MPEG-DASH should have its own separate sync strategy\n\n    const main = new MediaSequenceSync();\n    const audio = new DependantMediaSequenceSync(main);\n    const vtt = new DependantMediaSequenceSync(main);\n    this.mediaSequenceStorage_ = {\n      main,\n      audio,\n      vtt\n    };\n    this.logger_ = logger('SyncController');\n  }\n  /**\n   *\n   * @param {string} loaderType\n   * @return {MediaSequenceSync|null}\n   */\n\n  getMediaSequenceSync(loaderType) {\n    return this.mediaSequenceStorage_[loaderType] || null;\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   * @param {number} currentTime\n   *        Current player's time\n   * @param {string} type\n   *        Segment loader type\n   * @return {Object}\n   *          A sync-point object\n   */\n\n  getSyncPoint(playlist, duration, currentTimeline, currentTime, type) {\n    // Always use VOD sync point for VOD\n    if (duration !== Infinity) {\n      const vodSyncPointStrategy = syncPointStrategies.find(({\n        name\n      }) => name === 'VOD');\n      return vodSyncPointStrategy.run(this, playlist, duration);\n    }\n    const syncPoints = this.runStrategies_(playlist, duration, currentTimeline, currentTime, type);\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    } // If we have exact match just return it instead of finding the nearest distance\n\n    for (const syncPointInfo of syncPoints) {\n      const {\n        syncPoint,\n        strategy\n      } = syncPointInfo;\n      const {\n        segmentIndex,\n        time\n      } = syncPoint;\n      if (segmentIndex < 0) {\n        continue;\n      }\n      const selectedSegment = playlist.segments[segmentIndex];\n      const start = time;\n      const end = start + selectedSegment.duration;\n      this.logger_(`Strategy: ${strategy}. Current time: ${currentTime}. selected segment: ${segmentIndex}. Time: [${start} -> ${end}]}`);\n      if (currentTime >= start && currentTime < end) {\n        this.logger_('Found sync point with exact match: ', syncPoint);\n        return syncPoint;\n      }\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  getExpiredTime(playlist, duration) {\n    if (!playlist || !playlist.segments) {\n      return null;\n    }\n    const 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    const 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   * @param {number} currentTime\n   *        Current player's time\n   * @param {string} type\n   *        Segment loader type\n   * @return {Array}\n   *          A list of sync-point objects\n   */\n\n  runStrategies_(playlist, duration, currentTimeline, currentTime, type) {\n    const syncPoints = []; // Try to find a sync-point in by utilizing various strategies...\n\n    for (let i = 0; i < syncPointStrategies.length; i++) {\n      const strategy = syncPointStrategies[i];\n      const syncPoint = strategy.run(this, playlist, duration, currentTimeline, currentTime, type);\n      if (syncPoint) {\n        syncPoint.strategy = strategy.name;\n        syncPoints.push({\n          strategy: strategy.name,\n          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  selectSyncPoint_(syncPoints, target) {\n    let bestSyncPoint = syncPoints[0].syncPoint;\n    let bestDistance = Math.abs(syncPoints[0].syncPoint[target.key] - target.value);\n    let bestStrategy = syncPoints[0].strategy;\n    for (let i = 1; i < syncPoints.length; i++) {\n      const newDistance = Math.abs(syncPoints[i].syncPoint[target.key] - target.value);\n      if (newDistance < bestDistance) {\n        bestDistance = newDistance;\n        bestSyncPoint = syncPoints[i].syncPoint;\n        bestStrategy = syncPoints[i].strategy;\n      }\n    }\n    this.logger_(`syncPoint for [${target.key}: ${target.value}] chosen with strategy` + ` [${bestStrategy}]: [time:${bestSyncPoint.time},` + ` segmentIndex:${bestSyncPoint.segmentIndex}` + (typeof bestSyncPoint.partIndex === 'number' ? `,partIndex:${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  saveExpiredSegmentInfo(oldPlaylist, newPlaylist) {\n    const 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 ${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 (let i = mediaSequenceDiff - 1; i >= 0; i--) {\n      const lastRemovedSegment = oldPlaylist.segments[i];\n      if (lastRemovedSegment && typeof lastRemovedSegment.start !== 'undefined') {\n        newPlaylist.syncInfo = {\n          mediaSequence: oldPlaylist.mediaSequence + i,\n          time: lastRemovedSegment.start\n        };\n        this.logger_(`playlist refresh sync: [time:${newPlaylist.syncInfo.time},` + ` mediaSequence: ${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  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      const firstSegment = playlist.segments[0];\n      const 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  saveSegmentTimingInfo({\n    segmentInfo,\n    shouldSaveTimelineMapping\n  }) {\n    const didCalculateSegmentTimeMapping = this.calculateSegmentTimeMapping_(segmentInfo, segmentInfo.timingInfo, shouldSaveTimelineMapping);\n    const 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    const dateTime = segment.dateTimeObject;\n    if (segment.discontinuity && shouldSaveTimelineMapping && dateTime) {\n      this.timelineToDatetimeMappings[segment.timeline] = -(dateTime.getTime() / 1000);\n    }\n  }\n  timestampOffsetForTimeline(timeline) {\n    if (typeof this.timelines[timeline] === 'undefined') {\n      return null;\n    }\n    return this.timelines[timeline].time;\n  }\n  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  calculateSegmentTimeMapping_(segmentInfo, timingInfo, shouldSaveTimelineMapping) {\n    // TODO: remove side effects\n    const segment = segmentInfo.segment;\n    const part = segmentInfo.part;\n    let mappingObj = this.timelines[segmentInfo.timeline];\n    let start;\n    let 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 ${segmentInfo.timeline}: ` + `[time: ${mappingObj.time}] [mapping: ${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  saveDiscontinuitySyncInfo_(segmentInfo) {\n    const playlist = segmentInfo.playlist;\n    const 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 (let i = 0; i < playlist.discontinuityStarts.length; i++) {\n        const segmentIndex = playlist.discontinuityStarts[i];\n        const discontinuity = playlist.discontinuitySequence + i + 1;\n        const mediaIndexDiff = segmentIndex - segmentInfo.mediaIndex;\n        const accuracy = Math.abs(mediaIndexDiff);\n        if (!this.discontinuities[discontinuity] || this.discontinuities[discontinuity].accuracy > accuracy) {\n          let time;\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,\n            accuracy\n          };\n        }\n      }\n    }\n  }\n  dispose() {\n    this.trigger('dispose');\n    this.off();\n  }\n}\n\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 */\n\nclass TimelineChangeController extends videojs.EventTarget {\n  constructor() {\n    super();\n    this.pendingTimelineChanges_ = {};\n    this.lastTimelineChanges_ = {};\n  }\n  clearPendingTimelineChange(type) {\n    this.pendingTimelineChanges_[type] = null;\n    this.trigger('pendingtimelinechange');\n  }\n  pendingTimelineChange({\n    type,\n    from,\n    to\n  }) {\n    if (typeof from === 'number' && typeof to === 'number') {\n      this.pendingTimelineChanges_[type] = {\n        type,\n        from,\n        to\n      };\n      this.trigger('pendingtimelinechange');\n    }\n    return this.pendingTimelineChanges_[type];\n  }\n  lastTimelineChange({\n    type,\n    from,\n    to\n  }) {\n    if (typeof from === 'number' && typeof to === 'number') {\n      this.lastTimelineChanges_[type] = {\n        type,\n        from,\n        to\n      };\n      delete this.pendingTimelineChanges_[type];\n      const metadata = {\n        timelineChangeInfo: {\n          from,\n          to\n        }\n      };\n      this.trigger({\n        type: 'timelinechange',\n        metadata\n      });\n    }\n    return this.lastTimelineChanges_[type];\n  }\n  dispose() {\n    this.trigger('dispose');\n    this.pendingTimelineChanges_ = {};\n    this.lastTimelineChanges_ = {};\n    this.off();\n  }\n}\n\n/* rollup-plugin-worker-factory start for worker!/home/runner/work/http-streaming/http-streaming/src/decrypter-worker.js */\nconst 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.2 @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  const precompute = function () {\n    const tables = [[[], [], [], [], []], [[], [], [], [], []]];\n    const encTable = tables[0];\n    const decTable = tables[1];\n    const sbox = encTable[4];\n    const sboxInv = decTable[4];\n    let i;\n    let x;\n    let xInv;\n    const d = [];\n    const th = [];\n    let x2;\n    let x4;\n    let x8;\n    let s;\n    let tEnc;\n    let 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  let 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\n  class AES {\n    constructor(key) {\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      let i;\n      let j;\n      let tmp;\n      const sbox = this._tables[0][4];\n      const decTable = this._tables[1];\n      const keyLen = key.length;\n      let rcon = 1;\n      if (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n        throw new Error('Invalid aes key size');\n      }\n      const encKey = key.slice(0);\n      const 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\n    decrypt(encrypted0, encrypted1, encrypted2, encrypted3, out, offset) {\n      const key = this._key[1]; // state variables a,b,c,d are loaded with pre-whitened data\n\n      let a = encrypted0 ^ key[0];\n      let b = encrypted3 ^ key[1];\n      let c = encrypted2 ^ key[2];\n      let d = encrypted1 ^ key[3];\n      let a2;\n      let b2;\n      let c2; // key.length === 2 ?\n\n      const nInnerRounds = key.length / 4 - 2;\n      let i;\n      let kIndex = 4;\n      const table = this._tables[1]; // load up the tables\n\n      const table0 = table[0];\n      const table1 = table[1];\n      const table2 = table[2];\n      const table3 = table[3];\n      const 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  /**\n   * @file async-stream.js\n   */\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\n  class AsyncStream extends Stream {\n    constructor() {\n      super(Stream);\n      this.jobs = [];\n      this.delay = 1;\n      this.timeout_ = null;\n    }\n    /**\n     * process an async job\n     *\n     * @private\n     */\n\n    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    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  /**\n   * @file decrypter.js\n   *\n   * An asynchronous implementation of AES-128 CBC decryption with\n   * PKCS#7 padding.\n   */\n\n  /**\n   * Convert network-order (big-endian) bytes into their little-endian\n   * representation.\n   */\n\n  const ntoh = function (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  const decrypt = function (encrypted, key, initVector) {\n    // word-level access to the encrypted bytes\n    const encrypted32 = new Int32Array(encrypted.buffer, encrypted.byteOffset, encrypted.byteLength >> 2);\n    const decipher = new AES(Array.prototype.slice.call(key)); // byte and word-level access for the decrypted output\n\n    const decrypted = new Uint8Array(encrypted.byteLength);\n    const decrypted32 = new Int32Array(decrypted.buffer); // temporary variables for working with the IV, encrypted, and\n    // decrypted data\n\n    let init0;\n    let init1;\n    let init2;\n    let init3;\n    let encrypted0;\n    let encrypted1;\n    let encrypted2;\n    let encrypted3; // iteration variable\n\n    let 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\n  class Decrypter {\n    constructor(encrypted, key, initVector, done) {\n      const step = Decrypter.STEP;\n      const encrypted32 = new Int32Array(encrypted.buffer);\n      const decrypted = new Uint8Array(encrypted.byteLength);\n      let 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\n    static get STEP() {\n      // 4 * 8000;\n      return 32000;\n    }\n    /**\n     * @private\n     */\n\n    decryptChunk_(encrypted, key, initVector, decrypted) {\n      return function () {\n        const bytes = decrypt(encrypted, key, initVector);\n        decrypted.set(bytes, encrypted.byteOffset);\n      };\n    }\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  const createTransferableMessage = function (message) {\n    const transferable = {};\n    Object.keys(message).forEach(key => {\n      const 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    const data = event.data;\n    const encrypted = new Uint8Array(data.encrypted.bytes, data.encrypted.byteOffset, data.encrypted.byteLength);\n    const key = new Uint32Array(data.key.bytes, data.key.byteOffset, data.key.byteLength / 4);\n    const 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\nconst audioTrackKind_ = properties => {\n  let 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\nconst 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\nconst 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\nconst onGroupChanged = (type, settings) => () => {\n  const {\n    segmentLoaders: {\n      [type]: segmentLoader,\n      main: mainSegmentLoader\n    },\n    mediaTypes: {\n      [type]: mediaType\n    }\n  } = settings;\n  const activeTrack = mediaType.activeTrack();\n  const activeGroup = mediaType.getActiveGroup();\n  const previousActiveLoader = mediaType.activePlaylistLoader;\n  const 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};\nconst onGroupChanging = (type, settings) => () => {\n  const {\n    segmentLoaders: {\n      [type]: segmentLoader\n    },\n    mediaTypes: {\n      [type]: mediaType\n    }\n  } = settings;\n  mediaType.lastGroup_ = null;\n  segmentLoader.abort();\n  segmentLoader.pause();\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\nconst onTrackChanged = (type, settings) => () => {\n  const {\n    mainPlaylistLoader,\n    segmentLoaders: {\n      [type]: segmentLoader,\n      main: mainSegmentLoader\n    },\n    mediaTypes: {\n      [type]: mediaType\n    }\n  } = settings;\n  const activeTrack = mediaType.activeTrack();\n  const activeGroup = mediaType.getActiveGroup();\n  const previousActiveLoader = mediaType.activePlaylistLoader;\n  const 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    const pc = settings.vhs.playlistController_;\n    const 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 ${lastTrack.id} to ${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};\nconst 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: (type, settings) => () => {\n    const {\n      mediaTypes: {\n        [type]: mediaType\n      },\n      excludePlaylist\n    } = settings; // switch back to default audio track\n\n    const activeTrack = mediaType.activeTrack();\n    const activeGroup = mediaType.activeGroup();\n    const id = (activeGroup.filter(group => group.default)[0] || activeGroup[0]).id;\n    const 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 (const trackId in mediaType.tracks) {\n      mediaType.tracks[trackId].enabled = mediaType.tracks[trackId] === defaultTrack;\n    }\n    mediaType.onTrackChanged();\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: (type, settings) => () => {\n    const {\n      mediaTypes: {\n        [type]: mediaType\n      }\n    } = settings;\n    videojs.log.warn('Problem encountered loading the subtitle track.' + 'Disabling subtitle track.');\n    const track = mediaType.activeTrack();\n    if (track) {\n      track.mode = 'disabled';\n    }\n    mediaType.onTrackChanged();\n  }\n};\nconst 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: (type, playlistLoader, settings) => {\n    if (!playlistLoader) {\n      // no playlist loader means audio will be muxed with the video\n      return;\n    }\n    const {\n      tech,\n      requestOptions,\n      segmentLoaders: {\n        [type]: segmentLoader\n      }\n    } = settings;\n    playlistLoader.on('loadedmetadata', () => {\n      const 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', () => {\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: (type, playlistLoader, settings) => {\n    const {\n      tech,\n      requestOptions,\n      segmentLoaders: {\n        [type]: segmentLoader\n      },\n      mediaTypes: {\n        [type]: mediaType\n      }\n    } = settings;\n    playlistLoader.on('loadedmetadata', () => {\n      const 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', () => {\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};\nconst 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': (type, settings) => {\n    const {\n      vhs,\n      sourceType,\n      segmentLoaders: {\n        [type]: segmentLoader\n      },\n      requestOptions,\n      main: {\n        mediaGroups\n      },\n      mediaTypes: {\n        [type]: {\n          groups,\n          tracks,\n          logger_\n        }\n      },\n      mainPlaylistLoader\n    } = settings;\n    const 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 (const groupId in mediaGroups[type]) {\n      if (!groups[groupId]) {\n        groups[groupId] = [];\n      }\n      for (const variantLabel in mediaGroups[type][groupId]) {\n        let properties = mediaGroups[type][groupId][variantLabel];\n        let playlistLoader;\n        if (audioOnlyMain) {\n          logger_(`AUDIO group '${groupId}' label '${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\n        }, properties);\n        setupListeners[type](type, properties.playlistLoader, settings);\n        groups[groupId].push(properties);\n        if (typeof tracks[variantLabel] === 'undefined') {\n          const 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': (type, settings) => {\n    const {\n      tech,\n      vhs,\n      sourceType,\n      segmentLoaders: {\n        [type]: segmentLoader\n      },\n      requestOptions,\n      main: {\n        mediaGroups\n      },\n      mediaTypes: {\n        [type]: {\n          groups,\n          tracks\n        }\n      },\n      mainPlaylistLoader\n    } = settings;\n    for (const groupId in mediaGroups[type]) {\n      if (!groups[groupId]) {\n        groups[groupId] = [];\n      }\n      for (const 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        let properties = mediaGroups[type][groupId][variantLabel];\n        let playlistLoader;\n        if (sourceType === 'hls') {\n          playlistLoader = new PlaylistLoader(properties.resolvedUri, vhs, requestOptions);\n        } else if (sourceType === 'dash') {\n          const playlists = properties.playlists.filter(p => p.excludeUntil !== Infinity);\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\n        }, properties);\n        setupListeners[type](type, properties.playlistLoader, settings);\n        groups[groupId].push(properties);\n        if (typeof tracks[variantLabel] === 'undefined') {\n          const 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': (type, settings) => {\n    const {\n      tech,\n      main: {\n        mediaGroups\n      },\n      mediaTypes: {\n        [type]: {\n          groups,\n          tracks\n        }\n      }\n    } = settings;\n    for (const groupId in mediaGroups[type]) {\n      if (!groups[groupId]) {\n        groups[groupId] = [];\n      }\n      for (const variantLabel in mediaGroups[type][groupId]) {\n        const 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        const captionServices = tech.options_.vhs && tech.options_.vhs.captionServices || {};\n        let 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          const 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};\nconst groupMatch = (list, media) => {\n  for (let i = 0; i < list.length; i++) {\n    if (playlistMatch(media, list[i])) {\n      return true;\n    }\n    if (list[i].playlists && groupMatch(list[i].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\nconst activeGroup = (type, settings) => track => {\n  const {\n    mainPlaylistLoader,\n    mediaTypes: {\n      [type]: {\n        groups\n      }\n    }\n  } = settings;\n  const media = mainPlaylistLoader.media();\n  if (!media) {\n    return null;\n  }\n  let variants = null; // set to variants to main media active group\n\n  if (media.attributes[type]) {\n    variants = groups[media.attributes[type]];\n  }\n  const 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 (let i = 0; i < groupKeys.length; i++) {\n        const groupPropertyList = groups[groupKeys[i]];\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(props => props.id === track.id)[0] || null;\n};\nconst 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: (type, settings) => () => {\n    const {\n      mediaTypes: {\n        [type]: {\n          tracks\n        }\n      }\n    } = settings;\n    for (const id in tracks) {\n      if (tracks[id].enabled) {\n        return tracks[id];\n      }\n    }\n    return null;\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: (type, settings) => () => {\n    const {\n      mediaTypes: {\n        [type]: {\n          tracks\n        }\n      }\n    } = settings;\n    for (const id in tracks) {\n      if (tracks[id].mode === 'showing' || tracks[id].mode === 'hidden') {\n        return tracks[id];\n      }\n    }\n    return null;\n  }\n};\nconst getActiveGroup = (type, {\n  mediaTypes\n}) => () => {\n  const activeTrack_ = mediaTypes[type].activeTrack();\n  if (!activeTrack_) {\n    return null;\n  }\n  return mediaTypes[type].activeGroup(activeTrack_);\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\nconst setupMediaGroups = settings => {\n  ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(type => {\n    initialize[type](type, settings);\n  });\n  const {\n    mediaTypes,\n    mainPlaylistLoader,\n    tech,\n    vhs,\n    segmentLoaders: {\n      ['AUDIO']: audioSegmentLoader,\n      main: mainSegmentLoader\n    }\n  } = settings; // setup active group and track getters and change event handlers\n\n  ['AUDIO', 'SUBTITLES'].forEach(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  const audioGroup = mediaTypes.AUDIO.activeGroup();\n  if (audioGroup) {\n    const groupId = (audioGroup.filter(group => group.default)[0] || audioGroup[0]).id;\n    mediaTypes.AUDIO.tracks[groupId].enabled = true;\n    mediaTypes.AUDIO.onGroupChanged();\n    mediaTypes.AUDIO.onTrackChanged();\n    const 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', () => {\n    ['AUDIO', 'SUBTITLES'].forEach(type => mediaTypes[type].onGroupChanged());\n  });\n  mainPlaylistLoader.on('mediachanging', () => {\n    ['AUDIO', 'SUBTITLES'].forEach(type => mediaTypes[type].onGroupChanging());\n  }); // custom audio track change event handler for usage event\n\n  const 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', () => {\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 (const 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\nconst createMediaTypes = () => {\n  const mediaTypes = {};\n  ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(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[${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 * PATHWAY-CLONES: array (optional) (HLS only) pathway clone objects to copy from other playlists.\n */\n\nclass SteeringManifest {\n  constructor() {\n    this.priority_ = [];\n    this.pathwayClones_ = new Map();\n  }\n  set version(number) {\n    // Only version 1 is currently supported for both DASH and HLS.\n    if (number === 1) {\n      this.version_ = number;\n    }\n  }\n  set ttl(seconds) {\n    // TTL = time-to-live, default = 300 seconds.\n    this.ttl_ = seconds || 300;\n  }\n  set reloadUri(uri) {\n    if (uri) {\n      // reload URI can be relative to the previous reloadUri.\n      this.reloadUri_ = resolveUrl(this.reloadUri_, uri);\n    }\n  }\n  set priority(array) {\n    // priority must be non-empty and unique values.\n    if (array && array.length) {\n      this.priority_ = array;\n    }\n  }\n  set pathwayClones(array) {\n    // pathwayClones must be non-empty.\n    if (array && array.length) {\n      this.pathwayClones_ = new Map(array.map(clone => [clone.ID, clone]));\n    }\n  }\n  get version() {\n    return this.version_;\n  }\n  get ttl() {\n    return this.ttl_;\n  }\n  get reloadUri() {\n    return this.reloadUri_;\n  }\n  get priority() {\n    return this.priority_;\n  }\n  get pathwayClones() {\n    return this.pathwayClones_;\n  }\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 */\n\nclass ContentSteeringController extends videojs.EventTarget {\n  constructor(xhr, bandwidth) {\n    super();\n    this.currentPathway = null;\n    this.defaultPathway = null;\n    this.queryBeforeStart = false;\n    this.availablePathways_ = new Set();\n    this.steeringManifest = new SteeringManifest();\n    this.proxyServerUrl_ = null;\n    this.manifestType_ = null;\n    this.ttlTimeout_ = null;\n    this.request_ = null;\n    this.currentPathwayClones = new Map();\n    this.nextPathwayClones = new Map();\n    this.excludedSteeringManifestURLs = new Set();\n    this.logger_ = logger('Content Steering');\n    this.xhr_ = xhr;\n    this.getBandwidth_ = bandwidth;\n  }\n  /**\n   * Assigns the content steering tag properties to the steering controller\n   *\n   * @param {string} baseUrl the baseURL from the main manifest for resolving the steering manifest url\n   * @param {Object} steeringTag the content steering tag from the main manifest\n   */\n\n  assignTagProperties(baseUrl, steeringTag) {\n    this.manifestType_ = steeringTag.serverUri ? 'HLS' : 'DASH'; // serverUri is HLS serverURL is DASH\n\n    const steeringUri = steeringTag.serverUri || steeringTag.serverURL;\n    if (!steeringUri) {\n      this.logger_(`steering manifest URL is ${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    } // reloadUri is the resolution of the main manifest URL and steering URL.\n\n    this.steeringManifest.reloadUri = 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;\n    this.proxyServerUrl_ = steeringTag.proxyServerURL; // 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  }\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 should only happen once on initalization.\n   */\n\n  requestSteeringManifest(initial) {\n    const reloadUri = this.steeringManifest.reloadUri;\n    if (!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    const uri = initial ? reloadUri : 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    const metadata = {\n      contentSteeringInfo: {\n        uri\n      }\n    };\n    this.trigger({\n      type: 'contentsteeringloadstart',\n      metadata\n    });\n    this.request_ = this.xhr_({\n      uri,\n      requestType: 'content-steering-manifest'\n    }, (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          this.logger_(`manifest request 410 ${error}.`);\n          this.logger_(`There will be no more content steering requests to ${uri} this session.`);\n          this.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          const retrySeconds = errorInfo.responseHeaders['retry-after'];\n          this.logger_(`manifest request 429 ${error}.`);\n          this.logger_(`content steering will retry in ${retrySeconds} seconds.`);\n          this.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        this.logger_(`manifest failed to load ${error}.`);\n        this.startTTLTimeout_();\n        return;\n      }\n      this.trigger({\n        type: 'contentsteeringloadcomplete',\n        metadata\n      });\n      let steeringManifestJson;\n      try {\n        steeringManifestJson = JSON.parse(this.request_.responseText);\n      } catch (parseError) {\n        const errorMetadata = {\n          errorType: videojs.Error.StreamingContentSteeringParserError,\n          error: parseError\n        };\n        this.trigger({\n          type: 'error',\n          metadata: errorMetadata\n        });\n      }\n      this.assignSteeringProperties_(steeringManifestJson);\n      const parsedMetadata = {\n        contentSteeringInfo: metadata.contentSteeringInfo,\n        contentSteeringManifest: {\n          version: this.steeringManifest.version,\n          reloadUri: this.steeringManifest.reloadUri,\n          priority: this.steeringManifest.priority\n        }\n      };\n      this.trigger({\n        type: 'contentsteeringparsed',\n        metadata: parsedMetadata\n      });\n      this.startTTLTimeout_();\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  setProxyServerUrl_(steeringUrl) {\n    const steeringUrlObject = new window$1.URL(steeringUrl);\n    const 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  decodeDataUriManifest_(dataUri) {\n    const 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  setSteeringParams_(url) {\n    const urlObject = new window$1.URL(url);\n    const path = this.getPathway();\n    const networkThroughput = this.getBandwidth_();\n    if (path) {\n      const pathwayKey = `_${this.manifestType_}_pathway`;\n      urlObject.searchParams.set(pathwayKey, path);\n    }\n    if (networkThroughput) {\n      const throughputKey = `_${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  assignSteeringProperties_(steeringJson) {\n    this.steeringManifest.version = steeringJson.VERSION;\n    if (!this.steeringManifest.version) {\n      this.logger_(`manifest version is ${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']; // Pathway clones to be created/updated in HLS.\n    // See section 7.2 https://datatracker.ietf.org/doc/draft-pantos-hls-rfc8216bis/\n\n    this.steeringManifest.pathwayClones = steeringJson['PATHWAY-CLONES'];\n    this.nextPathwayClones = this.steeringManifest.pathwayClones; // 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    const chooseNextPathway = pathwaysByPriority => {\n      for (const path of pathwaysByPriority) {\n        if (this.availablePathways_.has(path)) {\n          return path;\n        }\n      } // If no pathway matches, ignore the manifest and choose the first available.\n\n      return [...this.availablePathways_][0];\n    };\n    const 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  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  getRequestURI(reloadUri) {\n    if (!reloadUri) {\n      return null;\n    }\n    const isExcluded = uri => this.excludedSteeringManifestURLs.has(uri);\n    if (this.proxyServerUrl_) {\n      const proxyURI = this.setProxyServerUrl_(reloadUri);\n      if (!isExcluded(proxyURI)) {\n        return proxyURI;\n      }\n    }\n    const 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  startTTLTimeout_(ttl = this.steeringManifest.ttl) {\n    // 300 (5 minutes) is the default value.\n    const ttlMS = ttl * 1000;\n    this.ttlTimeout_ = window$1.setTimeout(() => {\n      this.requestSteeringManifest();\n    }, ttlMS);\n  }\n  /**\n   * Clear the TTL timeout if necessary.\n   */\n\n  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  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  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.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  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  clearAvailablePathways() {\n    this.availablePathways_.clear();\n  }\n  /**\n   * Removes a pathway from the available pathways set.\n   */\n\n  excludePathway(pathway) {\n    return this.availablePathways_.delete(pathway);\n  }\n  /**\n   * Checks the refreshed DASH manifest content steering tag for changes.\n   *\n   * @param {string} baseURL new steering tag on DASH manifest refresh\n   * @param {Object} newTag the new tag to check for changes\n   * @return a true or false whether the new tag has different values\n   */\n\n  didDASHTagChange(baseURL, newTag) {\n    return !newTag && this.steeringManifest.reloadUri || newTag && (resolveUrl(baseURL, newTag.serverURL) !== this.steeringManifest.reloadUri || newTag.defaultServiceLocation !== this.defaultPathway || newTag.queryBeforeStart !== this.queryBeforeStart || newTag.proxyServerURL !== this.proxyServerUrl_);\n  }\n  getAvailablePathways() {\n    return this.availablePathways_;\n  }\n}\nconst ABORT_EARLY_EXCLUSION_SECONDS = 10;\nlet Vhs$1; // SegmentLoader stats that need to have each loader's\n// values summed to calculate the final value\n\nconst loaderStats = ['mediaRequests', 'mediaRequestsAborted', 'mediaRequestsTimedout', 'mediaRequestsErrored', 'mediaTransferDuration', 'mediaBytesTransferred', 'mediaAppends'];\nconst sumLoaderStat = function (stat) {\n  return this.audioSegmentLoader_[stat] + this.mainSegmentLoader_[stat];\n};\nconst shouldSwitchToMedia = function ({\n  currentPlaylist,\n  buffered,\n  currentTime,\n  nextPlaylist,\n  bufferLowWaterLine,\n  bufferHighWaterLine,\n  duration,\n  bufferBasedABR,\n  log\n}) {\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  const sharedLogLine = `allowing switch ${currentPlaylist && currentPlaylist.id || 'null'} -> ${nextPlaylist.id}`;\n  if (!currentPlaylist) {\n    log(`${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  const 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 ${sharedLogLine} as current playlist is live llhls, but currentTime isn't in buffered.`);\n      return false;\n    }\n    log(`${sharedLogLine} as current playlist is live`);\n    return true;\n  }\n  const forwardBuffer = timeAheadOf(buffered, currentTime);\n  const 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(`${sharedLogLine} as duration < max low water line (${duration} < ${maxBufferLowWaterLine})`);\n    return true;\n  }\n  const nextBandwidth = nextPlaylist.attributes.BANDWIDTH;\n  const 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    let logLine = `${sharedLogLine} as next bandwidth < current bandwidth (${nextBandwidth} < ${currBandwidth})`;\n    if (bufferBasedABR) {\n      logLine += ` and forwardBuffer < bufferHighWaterLine (${forwardBuffer} < ${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    let logLine = `${sharedLogLine} as forwardBuffer >= bufferLowWaterLine (${forwardBuffer} >= ${bufferLowWaterLine})`;\n    if (bufferBasedABR) {\n      logLine += ` and next bandwidth > current bandwidth (${nextBandwidth} > ${currBandwidth})`;\n    }\n    log(logLine);\n    return true;\n  }\n  log(`not ${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 */\n\nclass PlaylistController extends videojs.EventTarget {\n  constructor(options) {\n    super();\n    const {\n      src,\n      withCredentials,\n      tech,\n      bandwidth,\n      externVhs,\n      useCueTags,\n      playlistExclusionDuration,\n      enableLowInitialPlaylist,\n      sourceType,\n      cacheEncryptionKeys,\n      bufferBasedABR,\n      leastPixelDiffSelector,\n      captionServices,\n      experimentalUseMMS\n    } = options;\n    if (!src) {\n      throw new Error('A non-empty playlist URL or JSON manifest string is required');\n    }\n    let {\n      maxPlaylistRetries\n    } = options;\n    if (maxPlaylistRetries === null || typeof maxPlaylistRetries === 'undefined') {\n      maxPlaylistRetries = Infinity;\n    }\n    Vhs$1 = externVhs;\n    this.bufferBasedABR = Boolean(bufferBasedABR);\n    this.leastPixelDiffSelector = Boolean(leastPixelDiffSelector);\n    this.withCredentials = withCredentials;\n    this.tech_ = tech;\n    this.vhs_ = tech.vhs;\n    this.player_ = options.player_;\n    this.sourceType_ = sourceType;\n    this.useCueTags_ = useCueTags;\n    this.playlistExclusionDuration = playlistExclusionDuration;\n    this.maxPlaylistRetries = maxPlaylistRetries;\n    this.enableLowInitialPlaylist = enableLowInitialPlaylist;\n    if (this.useCueTags_) {\n      this.cueTagsTrack_ = this.tech_.addTextTrack('metadata', 'ad-cues');\n      this.cueTagsTrack_.inBandMetadataTrackDispatchType = '';\n    }\n    this.requestOptions_ = {\n      withCredentials,\n      maxPlaylistRetries,\n      timeout: null\n    };\n    this.on('error', this.pauseLoading);\n    this.mediaTypes_ = createMediaTypes();\n    if (experimentalUseMMS && window$1.ManagedMediaSource) {\n      // Airplay source not yet implemented. Remote playback must be disabled.\n      this.tech_.el_.disableRemotePlayback = true;\n      this.mediaSource = new window$1.ManagedMediaSource();\n      videojs.log('Using ManagedMediaSource');\n    } else if (window$1.MediaSource) {\n      this.mediaSource = new window$1.MediaSource();\n    }\n    this.handleDurationChange_ = this.handleDurationChange_.bind(this);\n    this.handleSourceOpen_ = this.handleSourceOpen_.bind(this);\n    this.handleSourceEnded_ = this.handleSourceEnded_.bind(this);\n    this.load = this.load.bind(this);\n    this.pause = this.pause.bind(this);\n    this.mediaSource.addEventListener('durationchange', this.handleDurationChange_); // load the media source into the player\n\n    this.mediaSource.addEventListener('sourceopen', this.handleSourceOpen_);\n    this.mediaSource.addEventListener('sourceended', this.handleSourceEnded_);\n    this.mediaSource.addEventListener('startstreaming', this.load);\n    this.mediaSource.addEventListener('endstreaming', this.pause); // 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    this.seekable_ = createTimeRanges();\n    this.hasPlayed_ = false;\n    this.syncController_ = new SyncController(options);\n    this.segmentMetadataTrack_ = tech.addRemoteTextTrack({\n      kind: 'metadata',\n      label: 'segment-metadata'\n    }, false).track;\n    this.decrypter_ = new Decrypter();\n    this.sourceUpdater_ = new SourceUpdater(this.mediaSource);\n    this.inbandTextTracks_ = {};\n    this.timelineChangeController_ = new TimelineChangeController();\n    this.keyStatusMap_ = new Map();\n    const segmentLoaderSettings = {\n      vhs: this.vhs_,\n      parse708captions: options.parse708captions,\n      useDtsForTimestampOffset: options.useDtsForTimestampOffset,\n      captionServices,\n      mediaSource: this.mediaSource,\n      currentTime: this.tech_.currentTime.bind(this.tech_),\n      seekable: () => this.seekable(),\n      seeking: () => this.tech_.seeking(),\n      duration: () => this.duration(),\n      hasPlayed: () => this.hasPlayed_,\n      goalBufferLength: () => this.goalBufferLength(),\n      bandwidth,\n      syncController: this.syncController_,\n      decrypter: this.decrypter_,\n      sourceType: this.sourceType_,\n      inbandTextTracks: this.inbandTextTracks_,\n      cacheEncryptionKeys,\n      sourceUpdater: this.sourceUpdater_,\n      timelineChangeController: this.timelineChangeController_,\n      exactManifestTimings: options.exactManifestTimings,\n      addMetadataToTextTrack: this.addMetadataToTextTrack.bind(this)\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    this.mainPlaylistLoader_ = this.sourceType_ === 'dash' ? new DashPlaylistLoader(src, this.vhs_, merge(this.requestOptions_, {\n      addMetadataToTextTrack: this.addMetadataToTextTrack.bind(this)\n    })) : new PlaylistLoader(src, this.vhs_, merge(this.requestOptions_, {\n      addDateRangesToTextTrack: this.addDateRangesToTextTrack_.bind(this)\n    }));\n    this.setupMainPlaylistLoaderListeners_(); // setup segment loaders\n    // combined audio/video or just video when alternate audio track is selected\n\n    this.mainSegmentLoader_ = new SegmentLoader(merge(segmentLoaderSettings, {\n      segmentMetadataTrack: this.segmentMetadataTrack_,\n      loaderType: 'main'\n    }), options); // alternate audio track\n\n    this.audioSegmentLoader_ = new SegmentLoader(merge(segmentLoaderSettings, {\n      loaderType: 'audio'\n    }), options);\n    this.subtitleSegmentLoader_ = new VTTSegmentLoader(merge(segmentLoaderSettings, {\n      loaderType: 'vtt',\n      featuresNativeTextTracks: this.tech_.featuresNativeTextTracks,\n      loadVttJs: () => new Promise((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    }), options);\n    const getBandwidth = () => {\n      return this.mainSegmentLoader_.bandwidth;\n    };\n    this.contentSteeringController_ = new ContentSteeringController(this.vhs_.xhr, getBandwidth);\n    this.setupSegmentLoaderListeners_();\n    if (this.bufferBasedABR) {\n      this.mainPlaylistLoader_.one('loadedplaylist', () => this.startABRTimer_());\n      this.tech_.on('pause', () => this.stopABRTimer_());\n      this.tech_.on('play', () => this.startABRTimer_());\n    } // Create SegmentLoader stat-getters\n    // mediaRequests_\n    // mediaRequestsAborted_\n    // mediaRequestsTimedout_\n    // mediaRequestsErrored_\n    // mediaTransferDuration_\n    // mediaBytesTransferred_\n    // mediaAppends_\n\n    loaderStats.forEach(stat => {\n      this[stat + '_'] = sumLoaderStat.bind(this, stat);\n    });\n    this.logger_ = logger('pc');\n    this.triggeredFmp4Usage = false;\n    if (this.tech_.preload() === 'none') {\n      this.loadOnPlay_ = () => {\n        this.loadOnPlay_ = null;\n        this.mainPlaylistLoader_.load();\n      };\n      this.tech_.one('play', this.loadOnPlay_);\n    } else {\n      this.mainPlaylistLoader_.load();\n    }\n    this.timeToLoadedData__ = -1;\n    this.mainAppendsToLoadedData__ = -1;\n    this.audioAppendsToLoadedData__ = -1;\n    const event = this.tech_.preload() === 'none' ? 'play' : 'loadstart'; // start the first frame timer on loadstart or play (for preload none)\n\n    this.tech_.one(event, () => {\n      const timeToLoadedDataStart = Date.now();\n      this.tech_.one('loadeddata', () => {\n        this.timeToLoadedData__ = Date.now() - timeToLoadedDataStart;\n        this.mainAppendsToLoadedData__ = this.mainSegmentLoader_.mediaAppends;\n        this.audioAppendsToLoadedData__ = this.audioSegmentLoader_.mediaAppends;\n      });\n    });\n  }\n  mainAppendsToLoadedData_() {\n    return this.mainAppendsToLoadedData__;\n  }\n  audioAppendsToLoadedData_() {\n    return this.audioAppendsToLoadedData__;\n  }\n  appendsToLoadedData_() {\n    const main = this.mainAppendsToLoadedData_();\n    const audio = this.audioAppendsToLoadedData_();\n    if (main === -1 || audio === -1) {\n      return -1;\n    }\n    return main + audio;\n  }\n  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  checkABR_(reason = 'abr') {\n    const nextPlaylist = this.selectPlaylist();\n    if (nextPlaylist && this.shouldSwitchToMedia_(nextPlaylist)) {\n      this.switchMedia_(nextPlaylist, reason);\n    }\n  }\n  switchMedia_(playlist, cause, delay) {\n    const oldMedia = this.media();\n    const oldId = oldMedia && (oldMedia.id || oldMedia.uri);\n    const newId = playlist && (playlist.id || playlist.uri);\n    if (oldId && oldId !== newId) {\n      this.logger_(`switch media ${oldId} -> ${newId} from ${cause}`);\n      const metadata = {\n        renditionInfo: {\n          id: newId,\n          bandwidth: playlist.attributes.BANDWIDTH,\n          resolution: playlist.attributes.RESOLUTION,\n          codecs: playlist.attributes.CODECS\n        },\n        cause\n      };\n      this.trigger({\n        type: 'renditionselected',\n        metadata\n      });\n      this.tech_.trigger({\n        type: 'usage',\n        name: `vhs-rendition-change-${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  switchMediaForDASHContentSteering_() {\n    ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(type => {\n      const mediaType = this.mediaTypes_[type];\n      const activeGroup = mediaType ? mediaType.activeGroup() : null;\n      const pathway = this.contentSteeringController_.getPathway();\n      if (activeGroup && pathway) {\n        // activeGroup can be an array or a single group\n        const mediaPlaylists = activeGroup.length ? activeGroup[0].playlists : activeGroup.playlists;\n        const dashMediaPlaylists = mediaPlaylists.filter(p => p.attributes.serviceLocation === pathway); // Switch the current active playlist to the correct CDN\n\n        if (dashMediaPlaylists.length) {\n          this.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  startABRTimer_() {\n    this.stopABRTimer_();\n    this.abrTimer_ = window$1.setInterval(() => this.checkABR_(), 250);\n  }\n  /**\n   * Stop the timer that periodically calls checkABR_\n   *\n   * @private\n   */\n\n  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  getAudioTrackPlaylists_() {\n    const main = this.main();\n    const 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    const AUDIO = main.mediaGroups.AUDIO;\n    const groupKeys = Object.keys(AUDIO);\n    let 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      const defaultGroup = AUDIO.main || groupKeys.length && AUDIO[groupKeys[0]];\n      for (const label in defaultGroup) {\n        if (defaultGroup[label].default) {\n          track = {\n            label\n          };\n          break;\n        }\n      }\n    } // no active track no playlists.\n\n    if (!track) {\n      return defaultPlaylists;\n    }\n    const playlists = []; // get all of the playlists that are possible for the\n    // active track.\n\n    for (const group in AUDIO) {\n      if (AUDIO[group][track.label]) {\n        const 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 (let i = 0; i < main.playlists.length; i++) {\n            const playlist = main.playlists[i];\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  setupMainPlaylistLoaderListeners_() {\n    this.mainPlaylistLoader_.on('loadedmetadata', () => {\n      const media = this.mainPlaylistLoader_.media();\n      const 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(this.mainPlaylistLoader_.main, this.mainPlaylistLoader_.media())) {\n        this.requestOptions_.timeout = 0;\n      } else {\n        this.requestOptions_.timeout = requestTimeout;\n      } // if this isn't a live video and preload permits, start\n      // downloading segments\n\n      if (media.endList && this.tech_.preload() !== 'none') {\n        this.mainSegmentLoader_.playlist(media, this.requestOptions_);\n        this.mainSegmentLoader_.load();\n      }\n      setupMediaGroups({\n        sourceType: this.sourceType_,\n        segmentLoaders: {\n          AUDIO: this.audioSegmentLoader_,\n          SUBTITLES: this.subtitleSegmentLoader_,\n          main: this.mainSegmentLoader_\n        },\n        tech: this.tech_,\n        requestOptions: this.requestOptions_,\n        mainPlaylistLoader: this.mainPlaylistLoader_,\n        vhs: this.vhs_,\n        main: this.main(),\n        mediaTypes: this.mediaTypes_,\n        excludePlaylist: this.excludePlaylist.bind(this)\n      });\n      this.triggerPresenceUsage_(this.main(), media);\n      this.setupFirstPlay();\n      if (!this.mediaTypes_.AUDIO.activePlaylistLoader || this.mediaTypes_.AUDIO.activePlaylistLoader.media()) {\n        this.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        this.mediaTypes_.AUDIO.activePlaylistLoader.one('loadedmetadata', () => {\n          this.trigger('selectedinitialmedia');\n        });\n      }\n    });\n    this.mainPlaylistLoader_.on('loadedplaylist', () => {\n      if (this.loadOnPlay_) {\n        this.tech_.off('play', this.loadOnPlay_);\n      }\n      let updatedPlaylist = this.mainPlaylistLoader_.media();\n      if (!updatedPlaylist) {\n        // Add content steering listeners on first load and init.\n        this.attachContentSteeringListeners_();\n        this.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        this.excludeUnsupportedVariants_();\n        let selectedMedia;\n        if (this.enableLowInitialPlaylist) {\n          selectedMedia = this.selectInitialPlaylist();\n        }\n        if (!selectedMedia) {\n          selectedMedia = this.selectPlaylist();\n        }\n        if (!selectedMedia || !this.shouldSwitchToMedia_(selectedMedia)) {\n          return;\n        }\n        this.initialMedia_ = selectedMedia;\n        this.switchMedia_(this.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        const haveJsonSource = this.sourceType_ === 'vhs-json' && this.initialMedia_.segments;\n        if (!haveJsonSource) {\n          return;\n        }\n        updatedPlaylist = this.initialMedia_;\n      }\n      this.handleUpdatedMediaPlaylist(updatedPlaylist);\n    });\n    this.mainPlaylistLoader_.on('error', () => {\n      const error = this.mainPlaylistLoader_.error;\n      this.excludePlaylist({\n        playlistToExclude: error.playlist,\n        error\n      });\n    });\n    this.mainPlaylistLoader_.on('mediachanging', () => {\n      this.mainSegmentLoader_.abort();\n      this.mainSegmentLoader_.pause();\n    });\n    this.mainPlaylistLoader_.on('mediachange', () => {\n      const media = this.mainPlaylistLoader_.media();\n      const 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(this.mainPlaylistLoader_.main, this.mainPlaylistLoader_.media())) {\n        this.requestOptions_.timeout = 0;\n      } else {\n        this.requestOptions_.timeout = requestTimeout;\n      }\n      if (this.sourceType_ === 'dash') {\n        // we don't want to re-request the same hls playlist right after it was changed\n        this.mainPlaylistLoader_.load();\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 `loadedplaylist`\n\n      this.mainSegmentLoader_.pause();\n      this.mainSegmentLoader_.playlist(media, this.requestOptions_);\n      if (this.waitingForFastQualityPlaylistReceived_) {\n        this.runFastQualitySwitch_();\n      } else {\n        this.mainSegmentLoader_.load();\n      }\n      this.tech_.trigger({\n        type: 'mediachange',\n        bubbles: true\n      });\n    });\n    this.mainPlaylistLoader_.on('playlistunchanged', () => {\n      const updatedPlaylist = this.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      const playlistOutdated = this.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        this.excludePlaylist({\n          error: {\n            message: 'Playlist no longer updating.',\n            reason: 'playlist-unchanged'\n          }\n        }); // useful for monitoring QoS\n\n        this.tech_.trigger('playliststuck');\n      }\n    });\n    this.mainPlaylistLoader_.on('renditiondisabled', () => {\n      this.tech_.trigger({\n        type: 'usage',\n        name: 'vhs-rendition-disabled'\n      });\n    });\n    this.mainPlaylistLoader_.on('renditionenabled', () => {\n      this.tech_.trigger({\n        type: 'usage',\n        name: 'vhs-rendition-enabled'\n      });\n    });\n    const playlistLoaderEvents = ['manifestrequeststart', 'manifestrequestcomplete', 'manifestparsestart', 'manifestparsecomplete', 'playlistrequeststart', 'playlistrequestcomplete', 'playlistparsestart', 'playlistparsecomplete', 'renditiondisabled', 'renditionenabled'];\n    playlistLoaderEvents.forEach(eventName => {\n      this.mainPlaylistLoader_.on(eventName, metadata => {\n        // trigger directly on the player to ensure early events are fired.\n        this.player_.trigger(_extends({}, metadata));\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  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_.pause();\n    this.mainSegmentLoader_.playlist(updatedPlaylist, this.requestOptions_);\n    if (this.waitingForFastQualityPlaylistReceived_) {\n      this.runFastQualitySwitch_();\n    }\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  triggerPresenceUsage_(main, media) {\n    const mediaGroups = main.mediaGroups || {};\n    let defaultDemuxed = true;\n    const audioGroupKeys = Object.keys(mediaGroups.AUDIO);\n    for (const mediaGroup in mediaGroups.AUDIO) {\n      for (const label in mediaGroups.AUDIO[mediaGroup]) {\n        const 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  shouldSwitchToMedia_(nextPlaylist) {\n    const currentPlaylist = this.mainPlaylistLoader_.media() || this.mainPlaylistLoader_.pendingMedia_;\n    const currentTime = this.tech_.currentTime();\n    const bufferLowWaterLine = this.bufferLowWaterLine();\n    const bufferHighWaterLine = this.bufferHighWaterLine();\n    const buffered = this.tech_.buffered();\n    return shouldSwitchToMedia({\n      buffered,\n      currentTime,\n      currentPlaylist,\n      nextPlaylist,\n      bufferLowWaterLine,\n      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  setupSegmentLoaderListeners_() {\n    this.mainSegmentLoader_.on('bandwidthupdate', () => {\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      this.checkABR_('bandwidthupdate');\n      this.tech_.trigger('bandwidthupdate');\n    });\n    this.mainSegmentLoader_.on('timeout', () => {\n      if (this.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        this.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', () => {\n        this.trigger('progress');\n      });\n    }\n    this.mainSegmentLoader_.on('error', () => {\n      const error = this.mainSegmentLoader_.error();\n      this.excludePlaylist({\n        playlistToExclude: error.playlist,\n        error\n      });\n    });\n    this.mainSegmentLoader_.on('appenderror', () => {\n      this.error = this.mainSegmentLoader_.error_;\n      this.trigger('error');\n    });\n    this.mainSegmentLoader_.on('syncinfoupdate', () => {\n      this.onSyncInfoUpdate_();\n    });\n    this.mainSegmentLoader_.on('timestampoffset', () => {\n      this.tech_.trigger({\n        type: 'usage',\n        name: 'vhs-timestamp-offset'\n      });\n    });\n    this.audioSegmentLoader_.on('syncinfoupdate', () => {\n      this.onSyncInfoUpdate_();\n    });\n    this.audioSegmentLoader_.on('appenderror', () => {\n      this.error = this.audioSegmentLoader_.error_;\n      this.trigger('error');\n    });\n    this.mainSegmentLoader_.on('ended', () => {\n      this.logger_('main segment loader ended');\n      this.onEndOfStream();\n    }); // There is the possibility of the video segment and the audio segment\n    // at a current time to be on different timelines. When this occurs, the player\n    // forwards playback to a point where these two segment types are back on the same\n    // timeline. This time will be just after the end of the audio segment that is on\n    // a previous timeline.\n\n    this.timelineChangeController_.on('audioTimelineBehind', () => {\n      const segmentInfo = this.audioSegmentLoader_.pendingSegment_;\n      if (!segmentInfo || !segmentInfo.segment || !segmentInfo.segment.syncInfo) {\n        return;\n      } // Update the current time to just after the faulty audio segment.\n      // This moves playback to a spot where both audio and video segments\n      // are on the same timeline.\n\n      const newTime = segmentInfo.segment.syncInfo.end + 0.01;\n      this.tech_.setCurrentTime(newTime);\n    });\n    this.mainSegmentLoader_.on('earlyabort', event => {\n      // never try to early abort with the new ABR algorithm\n      if (this.bufferBasedABR) {\n        return;\n      }\n      this.delegateLoaders_('all', ['abort']);\n      this.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    const updateCodecs = () => {\n      if (!this.sourceUpdater_.hasCreatedSourceBuffers()) {\n        return this.tryToCreateSourceBuffers_();\n      }\n      const codecs = this.getCodecsOrExclude_(); // no codecs means that the playlist was excluded\n\n      if (!codecs) {\n        return;\n      }\n      this.sourceUpdater_.addOrChangeSourceBuffers(codecs);\n    };\n    this.mainSegmentLoader_.on('trackinfo', updateCodecs);\n    this.audioSegmentLoader_.on('trackinfo', updateCodecs);\n    this.mainSegmentLoader_.on('fmp4', () => {\n      if (!this.triggeredFmp4Usage) {\n        this.tech_.trigger({\n          type: 'usage',\n          name: 'vhs-fmp4'\n        });\n        this.triggeredFmp4Usage = true;\n      }\n    });\n    this.audioSegmentLoader_.on('fmp4', () => {\n      if (!this.triggeredFmp4Usage) {\n        this.tech_.trigger({\n          type: 'usage',\n          name: 'vhs-fmp4'\n        });\n        this.triggeredFmp4Usage = true;\n      }\n    });\n    this.audioSegmentLoader_.on('ended', () => {\n      this.logger_('audioSegmentLoader ended');\n      this.onEndOfStream();\n    });\n    const segmentLoaderEvents = ['segmentselected', 'segmentloadstart', 'segmentloaded', 'segmentkeyloadstart', 'segmentkeyloadcomplete', 'segmentdecryptionstart', 'segmentdecryptioncomplete', 'segmenttransmuxingstart', 'segmenttransmuxingcomplete', 'segmenttransmuxingtrackinfoavailable', 'segmenttransmuxingtiminginfoavailable', 'segmentappendstart', 'appendsdone', 'bandwidthupdated', 'timelinechange', 'codecschange'];\n    segmentLoaderEvents.forEach(eventName => {\n      this.mainSegmentLoader_.on(eventName, metadata => {\n        this.player_.trigger(_extends({}, metadata));\n      });\n      this.audioSegmentLoader_.on(eventName, metadata => {\n        this.player_.trigger(_extends({}, metadata));\n      });\n      this.subtitleSegmentLoader_.on(eventName, metadata => {\n        this.player_.trigger(_extends({}, metadata));\n      });\n    });\n  }\n  mediaSecondsLoaded_() {\n    return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded + this.mainSegmentLoader_.mediaSecondsLoaded);\n  }\n  /**\n   * Call load on our SegmentLoaders\n   */\n\n  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   * Call pause on our SegmentLoaders\n   */\n\n  pause() {\n    this.mainSegmentLoader_.pause();\n    if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n      this.audioSegmentLoader_.pause();\n    }\n    if (this.mediaTypes_.SUBTITLES.activePlaylistLoader) {\n      this.subtitleSegmentLoader_.pause();\n    }\n  }\n  /**\n   * Re-tune playback quality level for the current player\n   * conditions. This method will perform destructive actions like removing\n   * already buffered content in order to readjust the currently active\n   * playlist quickly. This is good for manual quality changes\n   *\n   * @private\n   */\n\n  fastQualityChange_(media = this.selectPlaylist()) {\n    if (media && 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'); // we would like to avoid race condition when we call fastQuality,\n    // reset everything and start loading segments from prev segments instead of new because new playlist is not received yet\n\n    this.waitingForFastQualityPlaylistReceived_ = true;\n  }\n  runFastQualitySwitch_() {\n    this.waitingForFastQualityPlaylistReceived_ = false; // Delete all buffered data to allow an immediate quality switch.\n\n    this.mainSegmentLoader_.pause();\n    this.mainSegmentLoader_.resetEverything(() => {\n      this.mainSegmentLoader_.load();\n    }); // don't need to reset audio as it is reset when media changes\n  }\n  /**\n   * Begin playback.\n   */\n\n  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    const 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  setupFirstPlay() {\n    const 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      const 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      const seekableEnd = seekable.end(0);\n      let startPoint = seekableEnd;\n      if (media.start) {\n        const 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  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      const 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, e => {});\n      }\n    }\n    this.trigger('sourceopen');\n  }\n  /**\n   * handle the sourceended event on the MediaSource\n   *\n   * @private\n   */\n\n  handleSourceEnded_() {\n    if (!this.inbandTextTracks_.metadataTrack_) {\n      return;\n    }\n    const cues = this.inbandTextTracks_.metadataTrack_.cues;\n    if (!cues || !cues.length) {\n      return;\n    }\n    const 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  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  onEndOfStream() {\n    let isEndOfStream = this.mainSegmentLoader_.ended_;\n    if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n      const 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  stuckAtPlaylistEnd_(playlist) {\n    const 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    const 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    const absolutePlaylistEnd = Vhs$1.Playlist.playlistEnd(playlist, expired);\n    const currentTime = this.tech_.currentTime();\n    const 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    const 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  excludePlaylist({\n    playlistToExclude = this.mainPlaylistLoader_.media(),\n    error = {},\n    playlistExclusionDuration\n  }) {\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    const playlists = this.mainPlaylistLoader_.main.playlists;\n    const enabledPlaylists = playlists.filter(isEnabled);\n    const 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 ${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        const pathway = this.pathwayAttribute_(playlistToExclude); // Ignore at least 1 steering manifest refresh.\n\n        const reIncludeDelay = this.contentSteeringController_.steeringManifest.ttl * 1000;\n        this.contentSteeringController_.excludePathway(pathway);\n        this.excludeThenChangePathway_();\n        setTimeout(() => {\n          this.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      let reincluded = false;\n      playlists.forEach(playlist => {\n        // skip current playlist which is about to be excluded\n        if (playlist === playlistToExclude) {\n          return;\n        }\n        const 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    let 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    const 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    const logFn = error.internal ? this.logger_ : videojs.log.warn;\n    const errorMessage = error.message ? ' ' + error.message : '';\n    logFn(`${error.internal ? 'Internal problem' : 'Problem'} encountered with playlist ${playlistToExclude.id}.` + `${errorMessage} Switching to playlist ${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    const delayDuration = nextPlaylist.targetDuration / 2 * 1000 || 5 * 1000;\n    const 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  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  delegateLoaders_(filter, fnNames) {\n    const loaders = [];\n    const dontFilterPlaylist = filter === 'all';\n    if (dontFilterPlaylist || filter === 'main') {\n      loaders.push(this.mainPlaylistLoader_);\n    }\n    const 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(mediaType => {\n      const loader = this.mediaTypes_[mediaType] && this.mediaTypes_[mediaType].activePlaylistLoader;\n      if (loader) {\n        loaders.push(loader);\n      }\n    });\n    ['main', 'audio', 'subtitle'].forEach(name => {\n      const loader = this[`${name}SegmentLoader_`];\n      if (loader && (filter === name || filter === 'all')) {\n        loaders.push(loader);\n      }\n    });\n    loaders.forEach(loader => fnNames.forEach(fnName => {\n      if (typeof loader[fnName] === 'function') {\n        loader[fnName]();\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  setCurrentTime(currentTime) {\n    const 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_.pause();\n    this.mainSegmentLoader_.resetEverything();\n    if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n      this.audioSegmentLoader_.pause();\n      this.audioSegmentLoader_.resetEverything();\n    }\n    if (this.mediaTypes_.SUBTITLES.activePlaylistLoader) {\n      this.subtitleSegmentLoader_.pause();\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  duration() {\n    if (!this.mainPlaylistLoader_) {\n      return 0;\n    }\n    const 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  seekable() {\n    return this.seekable_;\n  }\n  onSyncInfoUpdate_() {\n    let 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    let media = this.mainPlaylistLoader_.media();\n    if (!media) {\n      return;\n    }\n    let expired = this.syncController_.getExpiredTime(media, this.duration());\n    if (expired === null) {\n      // not enough information to update seekable\n      return;\n    }\n    const main = this.mainPlaylistLoader_.main;\n    const 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    let oldEnd;\n    let 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 [${printableRange(this.seekable_)}]`);\n    const metadata = {\n      seekableRanges: this.seekable_\n    };\n    this.trigger({\n      type: 'seekablerangeschanged',\n      metadata\n    });\n    this.tech_.trigger('seekablechanged');\n  }\n  /**\n   * Update the player duration\n   */\n\n  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      const seekable = this.seekable();\n      if (!seekable.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 < seekable.end(seekable.length - 1)) {\n        this.sourceUpdater_.setDuration(seekable.end(seekable.length - 1));\n      }\n      return;\n    }\n    const buffered = this.tech_.buffered();\n    let 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  dispose() {\n    this.trigger('dispose');\n    this.decrypter_.terminate();\n    this.mainPlaylistLoader_.dispose();\n    this.mainSegmentLoader_.dispose();\n    this.contentSteeringController_.dispose();\n    this.keyStatusMap_.clear();\n    if (this.loadOnPlay_) {\n      this.tech_.off('play', this.loadOnPlay_);\n    }\n    ['AUDIO', 'SUBTITLES'].forEach(type => {\n      const groups = this.mediaTypes_[type].groups;\n      for (const id in groups) {\n        groups[id].forEach(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  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  media() {\n    // playlist loader will not return media if it has not been fully loaded\n    return this.mainPlaylistLoader_.media() || this.initialMedia_;\n  }\n  areMediaTypesKnown_() {\n    const usingAudioLoader = !!this.mediaTypes_.AUDIO.activePlaylistLoader;\n    const 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    const 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  } // find from and to for codec switch event\n\n  getCodecsOrExclude_() {\n    const media = {\n      main: this.mainSegmentLoader_.getCurrentMediaInfo_() || {},\n      audio: this.audioSegmentLoader_.getCurrentMediaInfo_() || {}\n    };\n    const playlist = this.mainSegmentLoader_.getPendingSegmentPlaylist() || this.media(); // set \"main\" media equal to video\n\n    media.video = media.main;\n    const playlistCodecs = codecsForPlaylist(this.main(), playlist);\n    const codecs = {};\n    const 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 += `,${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    const supportFunction = (isFmp4, codec) => isFmp4 ? browserSupportsCodec(codec) : muxerSupportsCodec(codec);\n    const unsupportedCodecs = {};\n    let unsupportedAudio;\n    ['video', 'audio'].forEach(function (type) {\n      if (codecs.hasOwnProperty(type) && !supportFunction(media[type].isFmp4, codecs[type])) {\n        const 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      const audioGroup = playlist.attributes.AUDIO;\n      this.main().playlists.forEach(variant => {\n        const variantAudioGroup = variant.attributes && variant.attributes.AUDIO;\n        if (variantAudioGroup === audioGroup && variant !== playlist) {\n          variant.excludeUntil = Infinity;\n        }\n      });\n      this.logger_(`excluding audio group ${audioGroup} as ${unsupportedAudio} does not support codec(s): \"${codecs.audio}\"`);\n    } // if we have any unsupported codecs exclude this playlist.\n\n    if (Object.keys(unsupportedCodecs).length) {\n      const message = Object.keys(unsupportedCodecs).reduce((acc, supporter) => {\n        if (acc) {\n          acc += ', ';\n        }\n        acc += `${supporter} does not support codec(s): \"${unsupportedCodecs[supporter].join(',')}\"`;\n        return acc;\n      }, '') + '.';\n      this.excludePlaylist({\n        playlistToExclude: playlist,\n        error: {\n          internal: true,\n          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      const switchMessages = [];\n      ['video', 'audio'].forEach(type => {\n        const newCodec = (parseCodecs(this.sourceUpdater_.codecs[type] || '')[0] || {}).type;\n        const oldCodec = (parseCodecs(codecs[type] || '')[0] || {}).type;\n        if (newCodec && oldCodec && newCodec.toLowerCase() !== oldCodec.toLowerCase()) {\n          switchMessages.push(`\"${this.sourceUpdater_.codecs[type]}\" -> \"${codecs[type]}\"`);\n        }\n      });\n      if (switchMessages.length) {\n        this.excludePlaylist({\n          playlistToExclude: playlist,\n          error: {\n            message: `Codec switching not supported: ${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  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    const codecs = this.getCodecsOrExclude_(); // no codecs means that the playlist was excluded\n\n    if (!codecs) {\n      return;\n    }\n    this.sourceUpdater_.createSourceBuffers(codecs);\n    const 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  excludeUnsupportedVariants_() {\n    const playlists = this.main().playlists;\n    const 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(key => {\n      const 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      const codecs = codecsForPlaylist(this.main, variant);\n      const unsupported = [];\n      if (codecs.audio && !muxerSupportsCodec(codecs.audio) && !browserSupportsCodec(codecs.audio)) {\n        unsupported.push(`audio codec ${codecs.audio}`);\n      }\n      if (codecs.video && !muxerSupportsCodec(codecs.video) && !browserSupportsCodec(codecs.video)) {\n        unsupported.push(`video codec ${codecs.video}`);\n      }\n      if (codecs.text && codecs.text === 'stpp.ttml.im1t') {\n        unsupported.push(`text codec ${codecs.text}`);\n      }\n      if (unsupported.length) {\n        variant.excludeUntil = Infinity;\n        this.logger_(`excluding ${variant.id} for unsupported: ${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  excludeIncompatibleVariants_(codecString) {\n    const ids = [];\n    const playlists = this.main().playlists;\n    const codecs = unwrapCodecList(parseCodecs(codecString));\n    const codecCount_ = codecCount(codecs);\n    const videoDetails = codecs.video && parseCodecs(codecs.video)[0] || null;\n    const audioDetails = codecs.audio && parseCodecs(codecs.audio)[0] || null;\n    Object.keys(playlists).forEach(key => {\n      const 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      const exclusionReasons = []; // get codecs from the playlist for this variant\n\n      const variantCodecs = codecsForPlaylist(this.mainPlaylistLoader_.main, variant);\n      const 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 \"${variantCodecCount}\" !== \"${codecCount_}\"`);\n      } // only exclude playlists by codec change, if codecs cannot switch\n      // during playback.\n\n      if (!this.sourceUpdater_.canChangeType()) {\n        const variantVideoDetails = variantCodecs.video && parseCodecs(variantCodecs.video)[0] || null;\n        const 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 \"${variantVideoDetails.type}\" !== \"${videoDetails.type}\"`);\n        } // the audio codec cannot change\n\n        if (variantAudioDetails && audioDetails && variantAudioDetails.type.toLowerCase() !== audioDetails.type.toLowerCase()) {\n          exclusionReasons.push(`audio codec \"${variantAudioDetails.type}\" !== \"${audioDetails.type}\"`);\n        }\n      }\n      if (exclusionReasons.length) {\n        variant.excludeUntil = Infinity;\n        this.logger_(`excluding ${variant.id}: ${exclusionReasons.join(' && ')}`);\n      }\n    });\n  }\n  updateAdCues_(media) {\n    let offset = 0;\n    const 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  goalBufferLength() {\n    const currentTime = this.tech_.currentTime();\n    const initial = Config.GOAL_BUFFER_LENGTH;\n    const rate = Config.GOAL_BUFFER_LENGTH_RATE;\n    const 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  bufferLowWaterLine() {\n    const currentTime = this.tech_.currentTime();\n    const initial = Config.BUFFER_LOW_WATER_LINE;\n    const rate = Config.BUFFER_LOW_WATER_LINE_RATE;\n    const max = Math.max(initial, Config.MAX_BUFFER_LOW_WATER_LINE);\n    const newMax = Math.max(initial, Config.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);\n    return Math.min(initial + currentTime * rate, this.bufferBasedABR ? newMax : max);\n  }\n  bufferHighWaterLine() {\n    return Config.BUFFER_HIGH_WATER_LINE;\n  }\n  addDateRangesToTextTrack_(dateRanges) {\n    createMetadataTrackIfNotExists(this.inbandTextTracks_, 'com.apple.streaming', this.tech_);\n    addDateRangeMetadata({\n      inbandTextTracks: this.inbandTextTracks_,\n      dateRanges\n    });\n  }\n  addMetadataToTextTrack(dispatchType, metadataArray, videoDuration) {\n    const 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,\n      timestampOffset,\n      videoDuration\n    });\n  }\n  /**\n   * Utility for getting the pathway or service location from an HLS or DASH playlist.\n   *\n   * @param {Object} playlist for getting pathway from.\n   * @return the pathway attribute of a playlist\n   */\n\n  pathwayAttribute_(playlist) {\n    return playlist.attributes['PATHWAY-ID'] || playlist.attributes.serviceLocation;\n  }\n  /**\n   * Initialize available pathways and apply the tag properties.\n   */\n\n  initContentSteeringController_() {\n    const main = this.main();\n    if (!main.contentSteering) {\n      return;\n    }\n    for (const playlist of main.playlists) {\n      this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(playlist));\n    }\n    this.contentSteeringController_.assignTagProperties(main.uri, main.contentSteering); // request the steering manifest immediately if queryBeforeStart is set.\n\n    if (this.contentSteeringController_.queryBeforeStart) {\n      // When queryBeforeStart is true, initial request should omit steering parameters.\n      this.contentSteeringController_.requestSteeringManifest(true);\n      return;\n    } // otherwise start content steering after playback starts\n\n    this.tech_.one('canplay', () => {\n      this.contentSteeringController_.requestSteeringManifest();\n    });\n  }\n  /**\n   * Reset the content steering controller and re-init.\n   */\n\n  resetContentSteeringController_() {\n    this.contentSteeringController_.clearAvailablePathways();\n    this.contentSteeringController_.dispose();\n    this.initContentSteeringController_();\n  }\n  /**\n   * Attaches the listeners for content steering.\n   */\n\n  attachContentSteeringListeners_() {\n    this.contentSteeringController_.on('content-steering', this.excludeThenChangePathway_.bind(this));\n    const contentSteeringEvents = ['contentsteeringloadstart', 'contentsteeringloadcomplete', 'contentsteeringparsed'];\n    contentSteeringEvents.forEach(eventName => {\n      this.contentSteeringController_.on(eventName, metadata => {\n        this.trigger(_extends({}, metadata));\n      });\n    });\n    if (this.sourceType_ === 'dash') {\n      this.mainPlaylistLoader_.on('loadedplaylist', () => {\n        const main = this.main(); // check if steering tag or pathways changed.\n\n        const didDashTagChange = this.contentSteeringController_.didDASHTagChange(main.uri, main.contentSteering);\n        const didPathwaysChange = () => {\n          const availablePathways = this.contentSteeringController_.getAvailablePathways();\n          const newPathways = [];\n          for (const playlist of main.playlists) {\n            const serviceLocation = playlist.attributes.serviceLocation;\n            if (serviceLocation) {\n              newPathways.push(serviceLocation);\n              if (!availablePathways.has(serviceLocation)) {\n                return true;\n              }\n            }\n          } // If we have no new serviceLocations and previously had availablePathways\n\n          if (!newPathways.length && availablePathways.size) {\n            return true;\n          }\n          return false;\n        };\n        if (didDashTagChange || didPathwaysChange()) {\n          this.resetContentSteeringController_();\n        }\n      });\n    }\n  }\n  /**\n   * Simple exclude and change playlist logic for content steering.\n   */\n\n  excludeThenChangePathway_() {\n    const currentPathway = this.contentSteeringController_.getPathway();\n    if (!currentPathway) {\n      return;\n    }\n    this.handlePathwayClones_();\n    const main = this.main();\n    const playlists = main.playlists;\n    const ids = new Set();\n    let didEnablePlaylists = false;\n    Object.keys(playlists).forEach(key => {\n      const variant = playlists[key];\n      const pathwayId = this.pathwayAttribute_(variant);\n      const differentPathwayId = pathwayId && currentPathway !== pathwayId;\n      const 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      const noExcludeUntil = !variant.excludeUntil && variant.excludeUntil !== Infinity;\n      const 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      this.logger_(`excluding ${variant.id} for ${variant.lastExcludeReason_}`);\n    });\n    if (this.contentSteeringController_.manifestType_ === 'DASH') {\n      Object.keys(this.mediaTypes_).forEach(key => {\n        const type = this.mediaTypes_[key];\n        if (type.activePlaylistLoader) {\n          const 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   * Add, update, or delete playlists and media groups for\n   * the pathway clones for HLS Content Steering.\n   *\n   * See https://datatracker.ietf.org/doc/draft-pantos-hls-rfc8216bis/\n   *\n   * NOTE: Pathway cloning does not currently support the `PER_VARIANT_URIS` and\n   * `PER_RENDITION_URIS` as we do not handle `STABLE-VARIANT-ID` or\n   * `STABLE-RENDITION-ID` values.\n   */\n\n  handlePathwayClones_() {\n    const main = this.main();\n    const playlists = main.playlists;\n    const currentPathwayClones = this.contentSteeringController_.currentPathwayClones;\n    const nextPathwayClones = this.contentSteeringController_.nextPathwayClones;\n    const hasClones = currentPathwayClones && currentPathwayClones.size || nextPathwayClones && nextPathwayClones.size;\n    if (!hasClones) {\n      return;\n    }\n    for (const [id, clone] of currentPathwayClones.entries()) {\n      const newClone = nextPathwayClones.get(id); // Delete the old pathway clone.\n\n      if (!newClone) {\n        this.mainPlaylistLoader_.updateOrDeleteClone(clone);\n        this.contentSteeringController_.excludePathway(id);\n      }\n    }\n    for (const [id, clone] of nextPathwayClones.entries()) {\n      const oldClone = currentPathwayClones.get(id); // Create a new pathway if it is a new pathway clone object.\n\n      if (!oldClone) {\n        const playlistsToClone = playlists.filter(p => {\n          return p.attributes['PATHWAY-ID'] === clone['BASE-ID'];\n        });\n        playlistsToClone.forEach(p => {\n          this.mainPlaylistLoader_.addClonePathway(clone, p);\n        });\n        this.contentSteeringController_.addAvailablePathway(id);\n        continue;\n      } // There have not been changes to the pathway clone object, so skip.\n\n      if (this.equalPathwayClones_(oldClone, clone)) {\n        continue;\n      } // Update a preexisting cloned pathway.\n      // True is set for the update flag.\n\n      this.mainPlaylistLoader_.updateOrDeleteClone(clone, true);\n      this.contentSteeringController_.addAvailablePathway(id);\n    } // Deep copy contents of next to current pathways.\n\n    this.contentSteeringController_.currentPathwayClones = new Map(JSON.parse(JSON.stringify([...nextPathwayClones])));\n  }\n  /**\n   * Determines whether two pathway clone objects are equivalent.\n   *\n   * @param {Object} a The first pathway clone object.\n   * @param {Object} b The second pathway clone object.\n   * @return {boolean} True if the pathway clone objects are equal, false otherwise.\n   */\n\n  equalPathwayClones_(a, b) {\n    if (a['BASE-ID'] !== b['BASE-ID'] || a.ID !== b.ID || a['URI-REPLACEMENT'].HOST !== b['URI-REPLACEMENT'].HOST) {\n      return false;\n    }\n    const aParams = a['URI-REPLACEMENT'].PARAMS;\n    const bParams = b['URI-REPLACEMENT'].PARAMS; // We need to iterate through both lists of params because one could be\n    // missing a parameter that the other has.\n\n    for (const p in aParams) {\n      if (aParams[p] !== bParams[p]) {\n        return false;\n      }\n    }\n    for (const p in bParams) {\n      if (aParams[p] !== bParams[p]) {\n        return false;\n      }\n    }\n    return true;\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  changeSegmentPathway_() {\n    const 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   * Iterates through playlists and check their keyId set and compare with the\n   * keyStatusMap, only enable playlists that have a usable key. If the playlist\n   * has no keyId leave it enabled by default.\n   */\n\n  excludeNonUsablePlaylistsByKeyId_() {\n    if (!this.mainPlaylistLoader_ || !this.mainPlaylistLoader_.main) {\n      return;\n    }\n    let nonUsableKeyStatusCount = 0;\n    const NON_USABLE = 'non-usable';\n    this.mainPlaylistLoader_.main.playlists.forEach(playlist => {\n      const keyIdSet = this.mainPlaylistLoader_.getKeyIdSet(playlist); // If the playlist doesn't have keyIDs lets not exclude it.\n\n      if (!keyIdSet || !keyIdSet.size) {\n        return;\n      }\n      keyIdSet.forEach(key => {\n        const USABLE = 'usable';\n        const hasUsableKeyStatus = this.keyStatusMap_.has(key) && this.keyStatusMap_.get(key) === USABLE;\n        const nonUsableExclusion = playlist.lastExcludeReason_ === NON_USABLE && playlist.excludeUntil === Infinity;\n        if (!hasUsableKeyStatus) {\n          // Only exclude playlists that haven't already been excluded as non-usable.\n          if (playlist.excludeUntil !== Infinity && playlist.lastExcludeReason_ !== NON_USABLE) {\n            playlist.excludeUntil = Infinity;\n            playlist.lastExcludeReason_ = NON_USABLE;\n            this.logger_(`excluding playlist ${playlist.id} because the key ID ${key} doesn't exist in the keyStatusMap or is not ${USABLE}`);\n          } // count all nonUsableKeyStatus\n\n          nonUsableKeyStatusCount++;\n        } else if (hasUsableKeyStatus && nonUsableExclusion) {\n          delete playlist.excludeUntil;\n          delete playlist.lastExcludeReason_;\n          this.logger_(`enabling playlist ${playlist.id} because key ID ${key} is ${USABLE}`);\n        }\n      });\n    }); // If for whatever reason every playlist has a non usable key status. Lets try re-including the SD renditions as a failsafe.\n\n    if (nonUsableKeyStatusCount >= this.mainPlaylistLoader_.main.playlists.length) {\n      this.mainPlaylistLoader_.main.playlists.forEach(playlist => {\n        const isNonHD = playlist && playlist.attributes && playlist.attributes.RESOLUTION && playlist.attributes.RESOLUTION.height < 720;\n        const excludedForNonUsableKey = playlist.excludeUntil === Infinity && playlist.lastExcludeReason_ === NON_USABLE;\n        if (isNonHD && excludedForNonUsableKey) {\n          // Only delete the excludeUntil so we don't try and re-exclude these playlists.\n          delete playlist.excludeUntil;\n          videojs.log.warn(`enabling non-HD playlist ${playlist.id} because all playlists were excluded due to ${NON_USABLE} key IDs`);\n        }\n      });\n    }\n  }\n  /**\n   * Adds a keystatus to the keystatus map, tries to convert to string if necessary.\n   *\n   * @param {any} keyId the keyId to add a status for\n   * @param {string} status the status of the keyId\n   */\n\n  addKeyStatus_(keyId, status) {\n    const isString = typeof keyId === 'string';\n    const keyIdHexString = isString ? keyId : bufferToHexString(keyId);\n    const formattedKeyIdString = keyIdHexString.slice(0, 32).toLowerCase();\n    this.logger_(`KeyStatus '${status}' with key ID ${formattedKeyIdString} added to the keyStatusMap`);\n    this.keyStatusMap_.set(formattedKeyIdString, status);\n  }\n  /**\n   * Utility function for adding key status to the keyStatusMap and filtering usable encrypted playlists.\n   *\n   * @param {any} keyId the keyId from the keystatuschange event\n   * @param {string} status the key status string\n   */\n\n  updatePlaylistByKeyStatus(keyId, status) {\n    this.addKeyStatus_(keyId, status);\n    if (!this.waitingForFastQualityPlaylistReceived_) {\n      this.excludeNonUsableThenChangePlaylist_();\n    } // Listen to loadedplaylist with a single listener and check for new contentProtection elements when a playlist is updated.\n\n    this.mainPlaylistLoader_.off('loadedplaylist', this.excludeNonUsableThenChangePlaylist_.bind(this));\n    this.mainPlaylistLoader_.on('loadedplaylist', this.excludeNonUsableThenChangePlaylist_.bind(this));\n  }\n  excludeNonUsableThenChangePlaylist_() {\n    this.excludeNonUsablePlaylistsByKeyId_();\n    this.fastQualityChange_();\n  }\n}\n\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 */\n\nconst enableFunction = (loader, playlistID, changePlaylistFn) => enable => {\n  const playlist = loader.main.playlists[playlistID];\n  const incompatible = isIncompatible(playlist);\n  const 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  const metadata = {\n    renditionInfo: {\n      id: playlistID,\n      bandwidth: playlist.attributes.BANDWIDTH,\n      resolution: playlist.attributes.RESOLUTION,\n      codecs: playlist.attributes.CODECS\n    },\n    cause: 'fast-quality'\n  };\n  if (enable !== currentlyEnabled && !incompatible) {\n    // Ensure the outside world knows about our changes\n    changePlaylistFn(playlist);\n    if (enable) {\n      loader.trigger({\n        type: 'renditionenabled',\n        metadata\n      });\n    } else {\n      loader.trigger({\n        type: 'renditiondisabled',\n        metadata\n      });\n    }\n  }\n  return enable;\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 */\n\nclass Representation {\n  constructor(vhsHandler, playlist, id) {\n    const {\n      playlistController_: pc\n    } = vhsHandler;\n    const qualityChangeFunction = pc.fastQualityChange_.bind(pc); // some playlist attributes are optional\n\n    if (playlist.attributes) {\n      const 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/**\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 */\n\nconst renditionSelectionMixin = function (vhsHandler) {\n  // Add a single API-specific function to the VhsHandler instance\n  vhsHandler.representations = () => {\n    const main = vhsHandler.playlistController_.main();\n    const playlists = isAudioOnly(main) ? vhsHandler.playlistController_.getAudioTrackPlaylists_() : main.playlists;\n    if (!playlists) {\n      return [];\n    }\n    return playlists.filter(media => !isIncompatible(media)).map((e, i) => new Representation(vhsHandler, e, e.id));\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\nconst timerCancelEvents = ['seeking', 'seeked', 'pause', 'playing', 'error'];\n/**\n * @class PlaybackWatcher\n */\n\nclass PlaybackWatcher extends videojs.EventTarget {\n  /**\n   * Represents an PlaybackWatcher object.\n   *\n   * @class\n   * @param {Object} options an object that includes the tech and settings\n   */\n  constructor(options) {\n    super();\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.playedRanges_ = [];\n    this.consecutiveUpdates = 0;\n    this.lastRecordedTime = null;\n    this.checkCurrentTimeTimeout_ = null;\n    this.logger_ = logger('PlaybackWatcher');\n    this.logger_('initialize');\n    const playHandler = () => this.monitorCurrentTime_();\n    const canPlayHandler = () => this.monitorCurrentTime_();\n    const waitingHandler = () => this.techWaiting_();\n    const cancelTimerHandler = () => this.resetTimeUpdate_();\n    const pc = this.playlistController_;\n    const loaderTypes = ['main', 'subtitle', 'audio'];\n    const loaderChecks = {};\n    loaderTypes.forEach(type => {\n      loaderChecks[type] = {\n        reset: () => this.resetSegmentDownloads_(type),\n        updateend: () => this.checkSegmentDownloads_(type)\n      };\n      pc[`${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[`${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      this.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    const setSeekingHandlers = fn => {\n      ['main', 'audio'].forEach(type => {\n        pc[`${type}SegmentLoader_`][fn]('appended', this.seekingAppendCheck_);\n      });\n    };\n    this.seekingAppendCheck_ = () => {\n      if (this.fixesBadSeeks_()) {\n        this.consecutiveUpdates = 0;\n        this.lastRecordedTime = this.tech_.currentTime();\n        setSeekingHandlers('off');\n      }\n    };\n    this.clearSeekingAppendCheck_ = () => setSeekingHandlers('off');\n    this.watchForBadSeeking_ = () => {\n      this.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 = () => {\n      this.clearSeekingAppendCheck_();\n      this.logger_('dispose');\n      this.tech_.off('waiting', waitingHandler);\n      this.tech_.off(timerCancelEvents, cancelTimerHandler);\n      this.tech_.off('canplay', canPlayHandler);\n      this.tech_.off('play', playHandler);\n      this.tech_.off('seeking', this.watchForBadSeeking_);\n      this.tech_.off('seeked', this.clearSeekingAppendCheck_);\n      loaderTypes.forEach(type => {\n        pc[`${type}SegmentLoader_`].off('appendsdone', loaderChecks[type].updateend);\n        pc[`${type}SegmentLoader_`].off('playlistupdate', loaderChecks[type].reset);\n        this.tech_.off(['seeked', 'seeking'], loaderChecks[type].reset);\n      });\n      if (this.checkCurrentTimeTimeout_) {\n        window$1.clearTimeout(this.checkCurrentTimeTimeout_);\n      }\n      this.resetTimeUpdate_();\n    };\n  }\n  /**\n   * Periodically check current time to see if playback stopped\n   *\n   * @private\n   */\n\n  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  resetSegmentDownloads_(type) {\n    const loader = this.playlistController_[`${type}SegmentLoader_`];\n    if (this[`${type}StalledDownloads_`] > 0) {\n      this.logger_(`resetting possible stalled download count for ${type} loader`);\n    }\n    this[`${type}StalledDownloads_`] = 0;\n    this[`${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  checkSegmentDownloads_(type) {\n    const pc = this.playlistController_;\n    const loader = pc[`${type}SegmentLoader_`];\n    const buffered = loader.buffered_();\n    const isBufferedDifferent = isRangeDifferent(this[`${type}Buffered_`], buffered);\n    this[`${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      const metadata = {\n        bufferedRanges: buffered\n      };\n      pc.trigger({\n        type: 'bufferedrangeschanged',\n        metadata\n      });\n      this.resetSegmentDownloads_(type);\n      return;\n    }\n    this[`${type}StalledDownloads_`]++;\n    this.logger_(`found #${this[`${type}StalledDownloads_`]} ${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[`${type}StalledDownloads_`] < 10) {\n      return;\n    }\n    this.logger_(`${type} loader stalled download exclusion`);\n    this.resetSegmentDownloads_(type);\n    this.tech_.trigger({\n      type: 'usage',\n      name: `vhs-${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 ${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  checkCurrentTime_() {\n    if (this.tech_.paused() || this.tech_.seeking()) {\n      return;\n    }\n    const currentTime = this.tech_.currentTime();\n    const 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.playedRanges_.push(createTimeRanges([this.lastRecordedTime, currentTime]));\n      const metadata = {\n        playedRanges: this.playedRanges_\n      };\n      this.playlistController_.trigger({\n        type: 'playedrangeschanged',\n        metadata\n      });\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  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  fixesBadSeeks_() {\n    const 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    const seekable = this.seekable();\n    const currentTime = this.tech_.currentTime();\n    const isAfterSeekableRange = this.afterSeekableWindow_(seekable, currentTime, this.media(), this.allowSeeksWithinUnsafeLiveWindow);\n    let seekTo;\n    if (isAfterSeekableRange) {\n      const 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      const 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 ${currentTime} with ` + `seekable range ${printableRange(seekable)}. Seeking to ` + `${seekTo}.`);\n      this.tech_.setCurrentTime(seekTo);\n      return true;\n    }\n    const sourceUpdater = this.playlistController_.sourceUpdater_;\n    const buffered = this.tech_.buffered();\n    const audioBuffered = sourceUpdater.audioBuffer ? sourceUpdater.audioBuffered() : null;\n    const videoBuffered = sourceUpdater.videoBuffer ? sourceUpdater.videoBuffered() : null;\n    const 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    const 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    const bufferedToCheck = [audioBuffered, videoBuffered];\n    for (let i = 0; i < bufferedToCheck.length; i++) {\n      // skip null buffered\n      if (!bufferedToCheck[i]) {\n        continue;\n      }\n      const timeAhead = timeAheadOf(bufferedToCheck[i], 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    const 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 (${nextRange.start(0)}) ` + ` just beyond seek point (${currentTime}). Seeking to ${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  waiting_() {\n    if (this.techWaiting_()) {\n      return;\n    } // All tech waiting checks failed. Use last resort correction\n\n    const currentTime = this.tech_.currentTime();\n    const buffered = this.tech_.buffered();\n    const 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 ${currentTime} while inside a buffered region ` + `[${currentRange.start(0)} -> ${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  techWaiting_() {\n    const seekable = this.seekable();\n    const 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      const livePoint = seekable.end(seekable.length - 1);\n      this.logger_(`Fell out of live window at time ${currentTime}. Seeking to ` + `live point (seekable end) ${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    const sourceUpdater = this.tech_.vhs.playlistController_.sourceUpdater_;\n    const buffered = this.tech_.buffered();\n    const videoUnderflow = this.videoUnderflow_({\n      audioBuffered: sourceUpdater.audioBuffered(),\n      videoBuffered: sourceUpdater.videoBuffered(),\n      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    const nextRange = findNextRange(buffered, currentTime); // check for gap\n\n    if (nextRange.length > 0) {\n      this.logger_(`Stopped at ${currentTime} and seeking to ${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  afterSeekableWindow_(seekable, currentTime, playlist, allowSeeksWithinUnsafeLiveWindow = 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    let allowedEnd = seekable.end(seekable.length - 1) + SAFE_TIME_DELTA;\n    const isLive = !playlist.endList;\n    const 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  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  videoUnderflow_({\n    videoBuffered,\n    audioBuffered,\n    currentTime\n  }) {\n    // audio only content will not have video underflow :)\n    if (!videoBuffered) {\n      return;\n    }\n    let 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      const lastVideoRange = findRange(videoBuffered, currentTime - 3);\n      const videoRange = findRange(videoBuffered, currentTime);\n      const 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      const 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 ${gap.start} to ${gap.end}. ` + `Seeking to current time ${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  skipTheGap_(scheduledCurrentTime) {\n    const buffered = this.tech_.buffered();\n    const currentTime = this.tech_.currentTime();\n    const 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    const metadata = {\n      gapInfo: {\n        from: currentTime,\n        to: nextRange.start(0)\n      }\n    };\n    this.playlistController_.trigger({\n      type: 'gapjumped',\n      metadata\n    });\n    this.tech_.trigger({\n      type: 'usage',\n      name: 'vhs-gap-skip'\n    });\n  }\n  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    const gaps = findGaps(buffered);\n    for (let i = 0; i < gaps.length; i++) {\n      const start = gaps.start(i);\n      const end = gaps.end(i); // gap is starts no more than 4 seconds back\n\n      if (currentTime - start < 4 && currentTime - start > 2) {\n        return {\n          start,\n          end\n        };\n      }\n    }\n    return null;\n  }\n}\nconst defaultOptions = {\n  errorInterval: 30,\n  getSource(next) {\n    const tech = this.tech({\n      IWillNotUseThisInPlugins: true\n    });\n    const 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\nconst initPlugin = function (player, options) {\n  let lastCalled = 0;\n  let seekTo = 0;\n  const localOptions = merge(defaultOptions, options);\n  player.ready(() => {\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  const loadedMetadataHandler = function () {\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  const setSource = function (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  const errorHandler = function () {\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  const cleanupEvents = function () {\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  const reinitPlugin = function (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\nconst reloadSourceOnError = function (options) {\n  initPlugin(this, options);\n};\nvar version$4 = \"3.15.0\";\nvar version$3 = \"7.0.3\";\nvar version$2 = \"1.3.1\";\nvar version$1 = \"7.2.0\";\nvar version = \"4.0.2\";\nconst Vhs = {\n  PlaylistLoader,\n  Playlist,\n  utils,\n  STANDARD_PLAYLIST_SELECTOR: lastBandwidthSelector,\n  INITIAL_PLAYLIST_SELECTOR: lowestBitrateCompatibleVariantSelector,\n  lastBandwidthSelector,\n  movingAverageBandwidthSelector,\n  comparePlaylistBandwidth,\n  comparePlaylistResolution,\n  xhr: xhrFactory()\n}; // Define getter/setters for config properties\n\nObject.keys(Config).forEach(prop => {\n  Object.defineProperty(Vhs, prop, {\n    get() {\n      videojs.log.warn(`using Vhs.${prop} is UNSAFE be sure you know what you are doing`);\n      return Config[prop];\n    },\n    set(value) {\n      videojs.log.warn(`using Vhs.${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.${prop} must be greater than or equal to 0`);\n        return;\n      }\n      Config[prop] = value;\n    }\n  });\n});\nconst 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\nconst handleVhsMediaChange = function (qualityLevels, playlistLoader) {\n  const newPlaylist = playlistLoader.media();\n  let selectedIndex = -1;\n  for (let i = 0; i < qualityLevels.length; i++) {\n    if (qualityLevels[i].id === newPlaylist.id) {\n      selectedIndex = i;\n      break;\n    }\n  }\n  qualityLevels.selectedIndex_ = selectedIndex;\n  qualityLevels.trigger({\n    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\nconst handleVhsLoadedMetadata = function (qualityLevels, vhs) {\n  vhs.representations().forEach(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};\nconst emeKeySystems = (keySystemOptions, mainPlaylist, audioPlaylist) => {\n  if (!keySystemOptions) {\n    return keySystemOptions;\n  }\n  let 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  const videoContentType = getMimeForCodec(codecs.video);\n  const audioContentType = getMimeForCodec(codecs.audio); // upsert the content types based on the selected playlist\n\n  const keySystemContentTypes = {};\n  for (const 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\nconst getAllPsshKeySystemsOptions = (playlists, keySystems) => {\n  return playlists.reduce((keySystemsArr, playlist) => {\n    if (!playlist.contentProtection) {\n      return keySystemsArr;\n    }\n    const keySystemsOptions = keySystems.reduce((keySystemsObj, keySystem) => {\n      const 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\nconst waitForKeySessionCreation = ({\n  player,\n  sourceKeySystems,\n  audioMedia,\n  mainPlaylists\n}) => {\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  const playlists = audioMedia ? mainPlaylists.concat([audioMedia]) : mainPlaylists;\n  const keySystemsOptionsArr = getAllPsshKeySystemsOptions(playlists, Object.keys(sourceKeySystems));\n  const initializationFinishedPromises = [];\n  const 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(keySystemsOptions => {\n    keySessionCreatedPromises.push(new Promise((resolve, reject) => {\n      player.tech_.one('keysessioncreated', resolve);\n    }));\n    initializationFinishedPromises.push(new Promise((resolve, reject) => {\n      player.eme.initializeMediaKeys({\n        keySystems: keySystemsOptions\n      }, 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\nconst setupEmeOptions = ({\n  player,\n  sourceKeySystems,\n  media,\n  audioMedia\n}) => {\n  const 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};\nconst getVhsLocalStorage = () => {\n  if (!window$1.localStorage) {\n    return null;\n  }\n  const 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};\nconst updateVhsLocalStorage = options => {\n  if (!window$1.localStorage) {\n    return false;\n  }\n  let 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\nconst 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\nconst 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\nconst 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\nconst 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\nconst 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$1 || !document$1.createElement) {\n    return false;\n  }\n  const video = document$1.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  const 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$1 || !document$1.createElement || !videojs.getTech('Html5').isSupported()) {\n    return false;\n  }\n  return /maybe|probably/i.test(document$1.createElement('video').canPlayType('application/dash+xml'));\n}();\nVhs.supportsTypeNatively = 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};\nconst 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 */\n\nclass VhsHandler extends Component {\n  constructor(source, tech, options) {\n    super(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      this.options_.bandwidth = options.initialBandwidth;\n    }\n    this.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      const _player = videojs.getPlayer(tech.options_.playerId);\n      this.player_ = _player;\n    }\n    this.tech_ = tech;\n    this.source_ = source;\n    this.stats = {};\n    this.ignoreNextSeekingEvent_ = false;\n    this.setOptions_();\n    if (this.options_.overrideNative && tech.overrideNativeAudioTracks && tech.overrideNativeVideoTracks) {\n      tech.overrideNativeAudioTracks(true);\n      tech.overrideNativeVideoTracks(true);\n    } else if (this.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    this.on(document$1, ['fullscreenchange', 'webkitfullscreenchange', 'mozfullscreenchange', 'MSFullscreenChange'], event => {\n      const fullscreenElement = document$1.fullscreenElement || document$1.webkitFullscreenElement || document$1.mozFullScreenElement || document$1.msFullscreenElement;\n      if (fullscreenElement && fullscreenElement.contains(this.tech_.el())) {\n        this.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        this.playlistController_.checkABR_();\n      }\n    });\n    this.on(this.tech_, 'seeking', function () {\n      if (this.ignoreNextSeekingEvent_) {\n        this.ignoreNextSeekingEvent_ = false;\n        return;\n      }\n      this.setCurrentTime(this.tech_.currentTime());\n    });\n    this.on(this.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    this.on(this.tech_, 'play', this.play);\n  }\n  /**\n   * Set VHS options based on options from configuration, as well as partial\n   * options to be passed at a later time.\n   *\n   * @param {Object} options A partial chunk of config options\n   */\n\n  setOptions_(options = {}) {\n    this.options_ = merge(this.options_, options); // defaults\n\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_.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        const 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', 'customPixelRatio', 'limitRenditionByPlayerDimensions', 'bandwidth', 'customTagParsers', 'customTagMappers', 'cacheEncryptionKeys', 'playlistSelector', 'initialPlaylistSelector', 'bufferBasedABR', 'liveRangeSafeTimeDelta', 'llhls', 'useForcedSubtitles', 'useNetworkInformationApi', 'useDtsForTimestampOffset', 'exactManifestTimings', 'leastPixelDiffSelector'].forEach(option => {\n      if (typeof this.source_[option] !== 'undefined') {\n        this.options_[option] = this.source_[option];\n      }\n    });\n    this.limitRenditionByPlayerDimensions = this.options_.limitRenditionByPlayerDimensions;\n    this.useDevicePixelRatio = this.options_.useDevicePixelRatio;\n    const customPixelRatio = this.options_.customPixelRatio; // Ensure the custom pixel ratio is a number greater than or equal to 0\n\n    if (typeof customPixelRatio === 'number' && customPixelRatio >= 0) {\n      this.customPixelRatio = customPixelRatio;\n    }\n  } // alias for public method to set options\n\n  setOptions(options = {}) {\n    this.setOptions_(options);\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  src(src, type) {\n    // do nothing if the src is falsey\n    if (!src) {\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 = time => {\n      this.tech_.setCurrentTime(time);\n    }; // pass player to allow for player level eventing on construction.\n\n    this.options_.player_ = this.player_;\n    this.playlistController_ = new PlaylistController(this.options_);\n    const playbackWatcherOptions = merge({\n      liveRangeSafeTimeDelta: SAFE_TIME_DELTA\n    }, this.options_, {\n      seekable: () => this.seekable(),\n      media: () => this.playlistController_.media(),\n      playlistController: this.playlistController_\n    });\n    this.playbackWatcher_ = new PlaybackWatcher(playbackWatcherOptions);\n    this.attachStreamingEventListeners_();\n    this.playlistController_.on('error', () => {\n      const player = videojs.players[this.tech_.options_.playerId];\n      let error = this.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    const 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() {\n          return this.playlistController_.selectPlaylist;\n        },\n        set(selectPlaylist) {\n          this.playlistController_.selectPlaylist = selectPlaylist.bind(this);\n        }\n      },\n      throughput: {\n        get() {\n          return this.playlistController_.mainSegmentLoader_.throughput.rate;\n        },\n        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() {\n          let playerBandwidthEst = this.playlistController_.mainSegmentLoader_.bandwidth;\n          const networkInformation = window$1.navigator.connection || window$1.navigator.mozConnection || window$1.navigator.webkitConnection;\n          const 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            const 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(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() {\n          const invBandwidth = 1 / (this.bandwidth || 1);\n          let invThroughput;\n          if (this.throughput > 0) {\n            invThroughput = 1 / this.throughput;\n          } else {\n            invThroughput = 0;\n          }\n          const systemBitrate = Math.floor(1 / (invBandwidth + invThroughput));\n          return systemBitrate;\n        },\n        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: () => this.bandwidth || 0,\n        enumerable: true\n      },\n      mediaRequests: {\n        get: () => this.playlistController_.mediaRequests_() || 0,\n        enumerable: true\n      },\n      mediaRequestsAborted: {\n        get: () => this.playlistController_.mediaRequestsAborted_() || 0,\n        enumerable: true\n      },\n      mediaRequestsTimedout: {\n        get: () => this.playlistController_.mediaRequestsTimedout_() || 0,\n        enumerable: true\n      },\n      mediaRequestsErrored: {\n        get: () => this.playlistController_.mediaRequestsErrored_() || 0,\n        enumerable: true\n      },\n      mediaTransferDuration: {\n        get: () => this.playlistController_.mediaTransferDuration_() || 0,\n        enumerable: true\n      },\n      mediaBytesTransferred: {\n        get: () => this.playlistController_.mediaBytesTransferred_() || 0,\n        enumerable: true\n      },\n      mediaSecondsLoaded: {\n        get: () => this.playlistController_.mediaSecondsLoaded_() || 0,\n        enumerable: true\n      },\n      mediaAppends: {\n        get: () => this.playlistController_.mediaAppends_() || 0,\n        enumerable: true\n      },\n      mainAppendsToLoadedData: {\n        get: () => this.playlistController_.mainAppendsToLoadedData_() || 0,\n        enumerable: true\n      },\n      audioAppendsToLoadedData: {\n        get: () => this.playlistController_.audioAppendsToLoadedData_() || 0,\n        enumerable: true\n      },\n      appendsToLoadedData: {\n        get: () => this.playlistController_.appendsToLoadedData_() || 0,\n        enumerable: true\n      },\n      timeToLoadedData: {\n        get: () => this.playlistController_.timeToLoadedData_() || 0,\n        enumerable: true\n      },\n      buffered: {\n        get: () => timeRangesToArray(this.tech_.buffered()),\n        enumerable: true\n      },\n      currentTime: {\n        get: () => this.tech_.currentTime(),\n        enumerable: true\n      },\n      currentSource: {\n        get: () => this.tech_.currentSource_,\n        enumerable: true\n      },\n      currentTech: {\n        get: () => this.tech_.name_,\n        enumerable: true\n      },\n      duration: {\n        get: () => this.tech_.duration(),\n        enumerable: true\n      },\n      main: {\n        get: () => this.playlists.main,\n        enumerable: true\n      },\n      playerDimensions: {\n        get: () => this.tech_.currentDimensions(),\n        enumerable: true\n      },\n      seekable: {\n        get: () => timeRangesToArray(this.tech_.seekable()),\n        enumerable: true\n      },\n      timestamp: {\n        get: () => Date.now(),\n        enumerable: true\n      },\n      videoPlaybackQuality: {\n        get: () => this.tech_.getVideoPlaybackQuality(),\n        enumerable: true\n      }\n    });\n    this.tech_.one('canplay', this.playlistController_.setupFirstPlay.bind(this.playlistController_));\n    this.tech_.on('bandwidthupdate', () => {\n      if (this.options_.useBandwidthFromLocalStorage) {\n        updateVhsLocalStorage({\n          bandwidth: this.bandwidth,\n          throughput: Math.round(this.throughput)\n        });\n      }\n    });\n    this.playlistController_.on('selectedinitialmedia', () => {\n      // Add the manual rendition mix-in to VhsHandler\n      renditionSelectionMixin(this);\n    });\n    this.playlistController_.sourceUpdater_.on('createdsourcebuffers', () => {\n      this.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); // If we are playing HLS with MSE in Safari, add source elements for both the blob and manifest URLs.\n    // The latter will enable Airplay playback on receiver devices.\n\n    if ((videojs.browser.IS_ANY_SAFARI || videojs.browser.IS_IOS) && this.options_.overrideNative && this.options_.sourceType === 'hls' && typeof this.tech_.addSourceElement === 'function') {\n      this.tech_.addSourceElement(this.mediaSourceUrl_);\n      this.tech_.addSourceElement(this.source_.src);\n    } else {\n      this.tech_.src(this.mediaSourceUrl_);\n    }\n  }\n  createKeySessions_() {\n    const 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(() => {\n      this.logger_('created EME key session');\n      this.playlistController_.sourceUpdater_.initializedEme();\n    }).catch(err => {\n      this.logger_('error while creating EME key session', err);\n      this.player_.error({\n        message: 'Failed to initialize media keys for EME',\n        code: 3\n      });\n    });\n  }\n  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  setupEme_() {\n    const audioPlaylistLoader = this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;\n    const 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', e => {\n      this.playlistController_.updatePlaylistByKeyStatus(e.keyId, e.status);\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  setupQualityLevels_() {\n    const 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', () => {\n      handleVhsLoadedMetadata(this.qualityLevels_, this);\n    });\n    this.playlists.on('mediachange', () => {\n      handleVhsMediaChange(this.qualityLevels_, this.playlists);\n    });\n  }\n  /**\n   * return the version\n   */\n\n  static 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 the version\n   */\n\n  version() {\n    return this.constructor.version();\n  }\n  canChangeType() {\n    return SourceUpdater.canChangeType();\n  }\n  /**\n   * Begin playing the video.\n   */\n\n  play() {\n    this.playlistController_.play();\n  }\n  /**\n   * a wrapper around the function in PlaylistController\n   */\n\n  setCurrentTime(currentTime) {\n    this.playlistController_.setCurrentTime(currentTime);\n  }\n  /**\n   * a wrapper around the function in PlaylistController\n   */\n\n  duration() {\n    return this.playlistController_.duration();\n  }\n  /**\n   * a wrapper around the function in PlaylistController\n   */\n\n  seekable() {\n    return this.playlistController_.seekable();\n  }\n  /**\n   * Abort all outstanding work and cleanup.\n   */\n\n  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    super.dispose();\n  }\n  convertToProgramTime(time, callback) {\n    return getProgramTime({\n      playlist: this.playlistController_.media(),\n      time,\n      callback\n    });\n  } // the player must be playing before calling this\n\n  seekToProgramTime(programTime, callback, pauseAfterSeek = true, retryCount = 2) {\n    return seekToProgramTime({\n      programTime,\n      playlist: this.playlistController_.media(),\n      retryCount,\n      pauseAfterSeek,\n      seekTo: this.options_.seekTo,\n      tech: this.options_.tech,\n      callback\n    });\n  }\n  /**\n   * Adds the onRequest, onResponse, offRequest and offResponse functions\n   * to the VhsHandler xhr Object.\n   */\n\n  setupXhrHooks_() {\n    /**\n     * A player function for setting an onRequest hook\n     *\n     * @param {function} callback for request modifiction\n     */\n    this.xhr.onRequest = callback => {\n      addOnRequestHook(this.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 = callback => {\n      addOnResponseHook(this.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 = callback => {\n      removeOnRequestHook(this.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 = callback => {\n      removeOnResponseHook(this.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  attachStreamingEventListeners_() {\n    const playlistControllerEvents = ['seekablerangeschanged', 'bufferedrangeschanged', 'contentsteeringloadstart', 'contentsteeringloadcomplete', 'contentsteeringparsed'];\n    const playbackWatcher = ['gapjumped', 'playedrangeschanged']; // re-emit streaming events and payloads on the player.\n\n    playlistControllerEvents.forEach(eventName => {\n      this.playlistController_.on(eventName, metadata => {\n        this.player_.trigger(_extends({}, metadata));\n      });\n    });\n    playbackWatcher.forEach(eventName => {\n      this.playbackWatcher_.on(eventName, metadata => {\n        this.player_.trigger(_extends({}, metadata));\n      });\n    });\n  }\n}\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 */\n\nconst VhsSourceHandler = {\n  name: 'videojs-http-streaming',\n  VERSION: version$4,\n  canHandleSource(srcObj, options = {}) {\n    const localOptions = merge(videojs.options, options); // If not opting to experimentalUseMMS, and playback is only supported with MediaSource, cannot handle source\n\n    if (!localOptions.vhs.experimentalUseMMS && !browserSupportsCodec('avc1.4d400d,mp4a.40.2', false)) {\n      return false;\n    }\n    return VhsSourceHandler.canPlayType(srcObj.type, localOptions);\n  },\n  handleSource(source, tech, options = {}) {\n    const 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(type, options) {\n    const simpleType = simpleTypeFromSourceType(type);\n    if (!simpleType) {\n      return '';\n    }\n    const overrideNative = VhsSourceHandler.getOverrideNative(options);\n    const supportsTypeNatively = Vhs.supportsTypeNatively(simpleType);\n    const canUseMsePlayback = !supportsTypeNatively || overrideNative;\n    return canUseMsePlayback ? 'maybe' : '';\n  },\n  getOverrideNative(options = {}) {\n    const {\n      vhs = {}\n    } = options;\n    const defaultOverrideNative = !(videojs.browser.IS_ANY_SAFARI || videojs.browser.IS_IOS);\n    const {\n      overrideNative = defaultOverrideNative\n    } = vhs;\n    return overrideNative;\n  }\n};\n/**\n * Check to see if either the native MediaSource or ManagedMediaSource\n * objectx exist and support an MP4 container with both H.264 video\n * and AAC-LC audio.\n *\n * @return {boolean} if  native media sources are supported\n */\n\nconst supportsNativeMediaSources = () => {\n  return browserSupportsCodec('avc1.4d400d,mp4a.40.2', true);\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}\n\nexport { videojs as default };\n", "export default function _extends() {\n  _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  };\n  return _extends.apply(this, arguments);\n}", "import window from 'global/window';\nvar DEFAULT_LOCATION = 'https://example.com';\n\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\n  if (/^data:/.test(baseUrl)) {\n    baseUrl = window.location && window.location.href || '';\n  }\n\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  baseUrl = new window.URL(baseUrl, window.location || DEFAULT_LOCATION);\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\n  return newUrl.href;\n};\n\nexport default resolveUrl;", "/**\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\n  var _proto = Stream.prototype;\n\n  _proto.on = function on(type, listener) {\n    if (!this.listeners[type]) {\n      this.listeners[type] = [];\n    }\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  ;\n\n  _proto.off = function off(type, listener) {\n    if (!this.listeners[type]) {\n      return false;\n    }\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  ;\n\n  _proto.trigger = function trigger(type) {\n    var callbacks = this.listeners[type];\n\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\n    if (arguments.length === 2) {\n      var length = callbacks.length;\n\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\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  ;\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  ;\n\n  _proto.pipe = function pipe(destination) {\n    this.on('data', function (data) {\n      destination.push(data);\n    });\n  };\n\n  return Stream;\n}();\n\nexport { Stream as default };", "import window from 'global/window';\n\nvar atob = function atob(s) {\n  return window.atob ? window.atob(s) : Buffer.from(s, 'base64').toString('binary');\n};\n\nexport default function decodeB64ToUint8Array(b64Text) {\n  var decodedString = atob(b64Text);\n  var array = new Uint8Array(decodedString.length);\n\n  for (var i = 0; i < decodedString.length; i++) {\n    array[i] = decodedString.charCodeAt(i);\n  }\n\n  return array;\n}", "/*! @name m3u8-parser @version 7.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 */\n\nclass LineStream extends Stream {\n  constructor() {\n    super();\n    this.buffer = '';\n  }\n  /**\n   * Add new data to be parsed.\n   *\n   * @param {string} data the text to process\n   */\n\n\n  push(data) {\n    let nextNewline;\n    this.buffer += data;\n    nextNewline = this.buffer.indexOf('\\n');\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}\n\nconst TAB = String.fromCharCode(0x09);\n\nconst parseByterange = function (byterangeString) {\n  // optionally match and capture 0+ digits before `@`\n  // optionally match and capture 0+ digits after `@`\n  const match = /([0-9.]*)?@?([0-9.]*)?/.exec(byterangeString || '');\n  const result = {};\n\n  if (match[1]) {\n    result.length = parseInt(match[1], 10);\n  }\n\n  if (match[2]) {\n    result.offset = parseInt(match[2], 10);\n  }\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\n\nconst attributeSeparator = function () {\n  const key = '[^=]*';\n  const value = '\"[^\"]*\"|[^,]*';\n  const 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\n\nconst parseAttributes = function (attributes) {\n  const result = {};\n\n  if (!attributes) {\n    return result;\n  } // split the string using attributes as the separator\n\n\n  const attrs = attributes.split(attributeSeparator());\n  let i = attrs.length;\n  let attr;\n\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\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\n  return result;\n};\n/**\n * Converts a string into a resolution object\n *\n * @param {string} resolution a string such as 3840x2160\n *\n * @return {Object} An object representing the resolution\n *\n */\n\n\nconst parseResolution = resolution => {\n  const split = resolution.split('x');\n  const result = {};\n\n  if (split[0]) {\n    result.width = parseInt(split[0], 10);\n  }\n\n  if (split[1]) {\n    result.height = parseInt(split[1], 10);\n  }\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 */\n\n\nclass ParseStream extends Stream {\n  constructor() {\n    super();\n    this.customParsers = [];\n    this.tagMappers = [];\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\n\n  push(line) {\n    let match;\n    let event; // strip whitespace\n\n    line = line.trim();\n\n    if (line.length === 0) {\n      // ignore empty lines\n      return;\n    } // URIs\n\n\n    if (line[0] !== '#') {\n      this.trigger('data', {\n        type: 'uri',\n        uri: line\n      });\n      return;\n    } // map tags\n\n\n    const newLines = this.tagMappers.reduce((acc, mapper) => {\n      const mappedLine = mapper(line); // skip if unchanged\n\n      if (mappedLine === line) {\n        return acc;\n      }\n\n      return acc.concat([mappedLine]);\n    }, [line]);\n    newLines.forEach(newLine => {\n      for (let i = 0; i < this.customParsers.length; i++) {\n        if (this.customParsers[i].call(this, newLine)) {\n          return;\n        }\n      } // Comments\n\n\n      if (newLine.indexOf('#EXT') !== 0) {\n        this.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\n      newLine = newLine.replace('\\r', ''); // Tags\n\n      match = /^#EXTM3U/.exec(newLine);\n\n      if (match) {\n        this.trigger('data', {\n          type: 'tag',\n          tagType: 'm3u'\n        });\n        return;\n      }\n\n      match = /^#EXTINF:([0-9\\.]*)?,?(.*)?$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'inf'\n        };\n\n        if (match[1]) {\n          event.duration = parseFloat(match[1]);\n        }\n\n        if (match[2]) {\n          event.title = match[2];\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'targetduration'\n        };\n\n        if (match[1]) {\n          event.duration = parseInt(match[1], 10);\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-VERSION:([0-9.]*)?/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'version'\n        };\n\n        if (match[1]) {\n          event.version = parseInt(match[1], 10);\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-MEDIA-SEQUENCE:(\\-?[0-9.]*)?/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'media-sequence'\n        };\n\n        if (match[1]) {\n          event.number = parseInt(match[1], 10);\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-DISCONTINUITY-SEQUENCE:(\\-?[0-9.]*)?/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'discontinuity-sequence'\n        };\n\n        if (match[1]) {\n          event.number = parseInt(match[1], 10);\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'playlist-type'\n        };\n\n        if (match[1]) {\n          event.playlistType = match[1];\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-BYTERANGE:(.*)?$/.exec(newLine);\n\n      if (match) {\n        event = _extends(parseByterange(match[1]), {\n          type: 'tag',\n          tagType: 'byterange'\n        });\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'allow-cache'\n        };\n\n        if (match[1]) {\n          event.allowed = !/NO/.test(match[1]);\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-MAP:(.*)$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'map'\n        };\n\n        if (match[1]) {\n          const attributes = parseAttributes(match[1]);\n\n          if (attributes.URI) {\n            event.uri = attributes.URI;\n          }\n\n          if (attributes.BYTERANGE) {\n            event.byterange = parseByterange(attributes.BYTERANGE);\n          }\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-STREAM-INF:(.*)$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'stream-inf'\n        };\n\n        if (match[1]) {\n          event.attributes = parseAttributes(match[1]);\n\n          if (event.attributes.RESOLUTION) {\n            event.attributes.RESOLUTION = parseResolution(event.attributes.RESOLUTION);\n          }\n\n          if (event.attributes.BANDWIDTH) {\n            event.attributes.BANDWIDTH = parseInt(event.attributes.BANDWIDTH, 10);\n          }\n\n          if (event.attributes['FRAME-RATE']) {\n            event.attributes['FRAME-RATE'] = parseFloat(event.attributes['FRAME-RATE']);\n          }\n\n          if (event.attributes['PROGRAM-ID']) {\n            event.attributes['PROGRAM-ID'] = parseInt(event.attributes['PROGRAM-ID'], 10);\n          }\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-MEDIA:(.*)$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'media'\n        };\n\n        if (match[1]) {\n          event.attributes = parseAttributes(match[1]);\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-ENDLIST/.exec(newLine);\n\n      if (match) {\n        this.trigger('data', {\n          type: 'tag',\n          tagType: 'endlist'\n        });\n        return;\n      }\n\n      match = /^#EXT-X-DISCONTINUITY/.exec(newLine);\n\n      if (match) {\n        this.trigger('data', {\n          type: 'tag',\n          tagType: 'discontinuity'\n        });\n        return;\n      }\n\n      match = /^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'program-date-time'\n        };\n\n        if (match[1]) {\n          event.dateTimeString = match[1];\n          event.dateTimeObject = new Date(match[1]);\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-KEY:(.*)$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'key'\n        };\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\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\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-START:(.*)$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'start'\n        };\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\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'cue-out-cont'\n        };\n\n        if (match[1]) {\n          event.data = match[1];\n        } else {\n          event.data = '';\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-CUE-OUT:(.*)?$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'cue-out'\n        };\n\n        if (match[1]) {\n          event.data = match[1];\n        } else {\n          event.data = '';\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-CUE-IN:?(.*)?$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'cue-in'\n        };\n\n        if (match[1]) {\n          event.data = match[1];\n        } else {\n          event.data = '';\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-SKIP:(.*)$/.exec(newLine);\n\n      if (match && match[1]) {\n        event = {\n          type: 'tag',\n          tagType: 'skip'\n        };\n        event.attributes = parseAttributes(match[1]);\n\n        if (event.attributes.hasOwnProperty('SKIPPED-SEGMENTS')) {\n          event.attributes['SKIPPED-SEGMENTS'] = parseInt(event.attributes['SKIPPED-SEGMENTS'], 10);\n        }\n\n        if (event.attributes.hasOwnProperty('RECENTLY-REMOVED-DATERANGES')) {\n          event.attributes['RECENTLY-REMOVED-DATERANGES'] = event.attributes['RECENTLY-REMOVED-DATERANGES'].split(TAB);\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-PART:(.*)$/.exec(newLine);\n\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\n        if (event.attributes.hasOwnProperty('BYTERANGE')) {\n          event.attributes.byterange = parseByterange(event.attributes.BYTERANGE);\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-SERVER-CONTROL:(.*)$/.exec(newLine);\n\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        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-PART-INF:(.*)$/.exec(newLine);\n\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        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-PRELOAD-HINT:(.*)$/.exec(newLine);\n\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            const 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        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-RENDITION-REPORT:(.*)$/.exec(newLine);\n\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        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-DATERANGE:(.*)$/.exec(newLine);\n\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        const clientAttributePattern = /^X-([A-Z]+-)+[A-Z]+$/;\n\n        for (const key in event.attributes) {\n          if (!clientAttributePattern.test(key)) {\n            continue;\n          }\n\n          const isHexaDecimal = /[0-9A-Fa-f]{6}/g.test(event.attributes[key]);\n          const 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\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-INDEPENDENT-SEGMENTS/.exec(newLine);\n\n      if (match) {\n        this.trigger('data', {\n          type: 'tag',\n          tagType: 'independent-segments'\n        });\n        return;\n      }\n\n      match = /^#EXT-X-I-FRAMES-ONLY/.exec(newLine);\n\n      if (match) {\n        this.trigger('data', {\n          type: 'tag',\n          tagType: 'i-frames-only'\n        });\n        return;\n      }\n\n      match = /^#EXT-X-CONTENT-STEERING:(.*)$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'content-steering'\n        };\n        event.attributes = parseAttributes(match[1]);\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'i-frame-playlist'\n        };\n        event.attributes = parseAttributes(match[1]);\n\n        if (event.attributes.URI) {\n          event.uri = event.attributes.URI;\n        }\n\n        if (event.attributes.BANDWIDTH) {\n          event.attributes.BANDWIDTH = parseInt(event.attributes.BANDWIDTH, 10);\n        }\n\n        if (event.attributes.RESOLUTION) {\n          event.attributes.RESOLUTION = parseResolution(event.attributes.RESOLUTION);\n        }\n\n        if (event.attributes['AVERAGE-BANDWIDTH']) {\n          event.attributes['AVERAGE-BANDWIDTH'] = parseInt(event.attributes['AVERAGE-BANDWIDTH'], 10);\n        }\n\n        if (event.attributes['FRAME-RATE']) {\n          event.attributes['FRAME-RATE'] = parseFloat(event.attributes['FRAME-RATE']);\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-DEFINE:(.*)$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'define'\n        };\n        event.attributes = parseAttributes(match[1]);\n        this.trigger('data', event);\n        return;\n      } // unknown tag type\n\n\n      this.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\n  addParser({\n    expression,\n    customType,\n    dataParser,\n    segment\n  }) {\n    if (typeof dataParser !== 'function') {\n      dataParser = line => line;\n    }\n\n    this.customParsers.push(line => {\n      const match = expression.exec(line);\n\n      if (match) {\n        this.trigger('data', {\n          type: 'custom',\n          data: dataParser(line),\n          customType,\n          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\n  addTagMapper({\n    expression,\n    map\n  }) {\n    const mapFn = line => {\n      if (expression.test(line)) {\n        return map(line);\n      }\n\n      return line;\n    };\n\n    this.tagMappers.push(mapFn);\n  }\n\n}\n\nconst camelCase = str => str.toLowerCase().replace(/-(\\w)/g, a => a[1].toUpperCase());\n\nconst camelCaseKeys = function (attributes) {\n  const 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\n\nconst setHoldBack = function (manifest) {\n  const {\n    serverControl,\n    targetDuration,\n    partTargetDuration\n  } = manifest;\n\n  if (!serverControl) {\n    return;\n  }\n\n  const tag = '#EXT-X-SERVER-CONTROL';\n  const hb = 'holdBack';\n  const phb = 'partHoldBack';\n  const minTargetDuration = targetDuration && targetDuration * 3;\n  const minPartDuration = partTargetDuration && partTargetDuration * 2;\n\n  if (targetDuration && !serverControl.hasOwnProperty(hb)) {\n    serverControl[hb] = minTargetDuration;\n    this.trigger('info', {\n      message: `${tag} defaulting HOLD-BACK to targetDuration * 3 (${minTargetDuration}).`\n    });\n  }\n\n  if (minTargetDuration && serverControl[hb] < minTargetDuration) {\n    this.trigger('warn', {\n      message: `${tag} clamping HOLD-BACK (${serverControl[hb]}) to targetDuration * 3 (${minTargetDuration})`\n    });\n    serverControl[hb] = minTargetDuration;\n  } // default no part hold back to part target duration * 3\n\n\n  if (partTargetDuration && !serverControl.hasOwnProperty(phb)) {\n    serverControl[phb] = partTargetDuration * 3;\n    this.trigger('info', {\n      message: `${tag} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${serverControl[phb]}).`\n    });\n  } // if part hold back is too small default it to part target duration * 2\n\n\n  if (partTargetDuration && serverControl[phb] < minPartDuration) {\n    this.trigger('warn', {\n      message: `${tag} clamping PART-HOLD-BACK (${serverControl[phb]}) to partTargetDuration * 2 (${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 * @param {Object} [opts] Options for the constructor, needed for substitutions\n * @param {string} [opts.uri] URL to check for query params\n * @param {Object} [opts.mainDefinitions] Definitions on main playlist that can be imported\n * @extends Stream\n */\n\n\nclass Parser extends Stream {\n  constructor(opts = {}) {\n    super();\n    this.lineStream = new LineStream();\n    this.parseStream = new ParseStream();\n    this.lineStream.pipe(this.parseStream);\n    this.mainDefinitions = opts.mainDefinitions || {};\n    this.params = new URL(opts.uri, 'https://a.com').searchParams;\n    this.lastProgramDateTime = null;\n    /* eslint-disable consistent-this */\n\n    const self = this;\n    /* eslint-enable consistent-this */\n\n    const uris = [];\n    let currentUri = {}; // if specified, the active EXT-X-MAP definition\n\n    let currentMap; // if specified, the active decryption key\n\n    let key;\n    let hasParts = false;\n\n    const noop = function () {};\n\n    const 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    const widevineUuid = 'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed'; // group segments into numbered timelines delineated by discontinuities\n\n    let currentTimeline = 0; // the manifest is empty until the parse stream begins delivering data\n\n    this.manifest = {\n      allowCache: true,\n      discontinuityStarts: [],\n      dateRanges: [],\n      iFramePlaylists: [],\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    let lastByterangeEnd = 0; // keep track of the last seen part's byte range end.\n\n    let lastPartByterangeEnd = 0;\n    const dateRangeTags = {};\n    this.on('end', () => {\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\n      if (!currentUri.map && currentMap) {\n        currentUri.map = currentMap;\n      }\n\n      if (!currentUri.key && key) {\n        currentUri.key = key;\n      }\n\n      if (!currentUri.timeline && typeof currentTimeline === 'number') {\n        currentUri.timeline = currentTimeline;\n      }\n\n      this.manifest.preloadSegment = currentUri;\n    }); // update the manifest with the m3u8 entry from the parse stream\n\n    this.parseStream.on('data', function (entry) {\n      let mediaGroup;\n      let rendition; // Replace variables in uris and attributes as defined in #EXT-X-DEFINE tags\n\n      if (self.manifest.definitions) {\n        for (const def in self.manifest.definitions) {\n          if (entry.uri) {\n            entry.uri = entry.uri.replace(`{$${def}}`, self.manifest.definitions[def]);\n          }\n\n          if (entry.attributes) {\n            for (const attr in entry.attributes) {\n              if (typeof entry.attributes[attr] === 'string') {\n                entry.attributes[attr] = entry.attributes[attr].replace(`{$${def}}`, self.manifest.definitions[def]);\n              }\n            }\n          }\n        }\n      }\n\n      ({\n        tag() {\n          // switch based on the tag type\n          (({\n            version() {\n              if (entry.version) {\n                this.manifest.version = entry.version;\n              }\n            },\n\n            'allow-cache'() {\n              this.manifest.allowCache = entry.allowed;\n\n              if (!('allowed' in entry)) {\n                this.trigger('info', {\n                  message: 'defaulting allowCache to YES'\n                });\n                this.manifest.allowCache = true;\n              }\n            },\n\n            byterange() {\n              const byterange = {};\n\n              if ('length' in entry) {\n                currentUri.byterange = byterange;\n                byterange.length = entry.length;\n\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\n              if ('offset' in entry) {\n                currentUri.byterange = byterange;\n                byterange.offset = entry.offset;\n              }\n\n              lastByterangeEnd = byterange.offset + byterange.length;\n            },\n\n            endlist() {\n              this.manifest.endList = true;\n            },\n\n            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\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\n              if (entry.title) {\n                currentUri.title = entry.title;\n              }\n\n              if (entry.duration > 0) {\n                currentUri.duration = entry.duration;\n              }\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\n              this.manifest.segments = uris;\n            },\n\n            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\n              if (entry.attributes.METHOD === 'NONE') {\n                key = null;\n                return;\n              }\n\n              if (!entry.attributes.URI) {\n                this.trigger('warn', {\n                  message: 'ignoring key declaration without URI'\n                });\n                return;\n              }\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\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\n              if (entry.attributes.KEYFORMAT === widevineUuid) {\n                const VALID_METHODS = ['SAMPLE-AES', 'SAMPLE-AES-CTR', 'SAMPLE-AES-CENC'];\n\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\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\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\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\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\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\n              key = {\n                method: entry.attributes.METHOD || 'AES-128',\n                uri: entry.attributes.URI\n              };\n\n              if (typeof entry.attributes.IV !== 'undefined') {\n                key.iv = entry.attributes.IV;\n              }\n            },\n\n            'media-sequence'() {\n              if (!isFinite(entry.number)) {\n                this.trigger('warn', {\n                  message: 'ignoring invalid media sequence: ' + entry.number\n                });\n                return;\n              }\n\n              this.manifest.mediaSequence = entry.number;\n            },\n\n            'discontinuity-sequence'() {\n              if (!isFinite(entry.number)) {\n                this.trigger('warn', {\n                  message: 'ignoring invalid discontinuity sequence: ' + entry.number\n                });\n                return;\n              }\n\n              this.manifest.discontinuitySequence = entry.number;\n              currentTimeline = entry.number;\n            },\n\n            'playlist-type'() {\n              if (!/VOD|EVENT/.test(entry.playlistType)) {\n                this.trigger('warn', {\n                  message: 'ignoring unknown playlist type: ' + entry.playlist\n                });\n                return;\n              }\n\n              this.manifest.playlistType = entry.playlistType;\n            },\n\n            map() {\n              currentMap = {};\n\n              if (entry.uri) {\n                currentMap.uri = entry.uri;\n              }\n\n              if (entry.byterange) {\n                currentMap.byterange = entry.byterange;\n              }\n\n              if (key) {\n                currentMap.key = key;\n              }\n            },\n\n            'stream-inf'() {\n              this.manifest.playlists = uris;\n              this.manifest.mediaGroups = this.manifest.mediaGroups || defaultMediaGroups;\n\n              if (!entry.attributes) {\n                this.trigger('warn', {\n                  message: 'ignoring empty stream-inf attributes'\n                });\n                return;\n              }\n\n              if (!currentUri.attributes) {\n                currentUri.attributes = {};\n              }\n\n              _extends(currentUri.attributes, entry.attributes);\n            },\n\n            media() {\n              this.manifest.mediaGroups = this.manifest.mediaGroups || defaultMediaGroups;\n\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\n              const 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\n              if (rendition.default) {\n                rendition.autoselect = true;\n              } else {\n                rendition.autoselect = /yes/i.test(entry.attributes.AUTOSELECT);\n              }\n\n              if (entry.attributes.LANGUAGE) {\n                rendition.language = entry.attributes.LANGUAGE;\n              }\n\n              if (entry.attributes.URI) {\n                rendition.uri = entry.attributes.URI;\n              }\n\n              if (entry.attributes['INSTREAM-ID']) {\n                rendition.instreamId = entry.attributes['INSTREAM-ID'];\n              }\n\n              if (entry.attributes.CHARACTERISTICS) {\n                rendition.characteristics = entry.attributes.CHARACTERISTICS;\n              }\n\n              if (entry.attributes.FORCED) {\n                rendition.forced = /yes/i.test(entry.attributes.FORCED);\n              } // insert the new rendition\n\n\n              mediaGroup[entry.attributes.NAME] = rendition;\n            },\n\n            discontinuity() {\n              currentTimeline += 1;\n              currentUri.discontinuity = true;\n              this.manifest.discontinuityStarts.push(uris.length);\n            },\n\n            'program-date-time'() {\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\n              currentUri.dateTimeString = entry.dateTimeString;\n              currentUri.dateTimeObject = entry.dateTimeObject;\n              const {\n                lastProgramDateTime\n              } = this;\n              this.lastProgramDateTime = new Date(entry.dateTimeString).getTime(); // We should extrapolate Program Date Time backward only during first program date time occurrence.\n              // Once we have at least one program date time point, we can always extrapolate it forward using lastProgramDateTime reference.\n\n              if (lastProgramDateTime === null) {\n                // Extrapolate Program Date Time backward\n                // Since it is first program date time occurrence we're assuming that\n                // all this.manifest.segments have no program date time info\n                this.manifest.segments.reduceRight((programDateTime, segment) => {\n                  segment.programDateTime = programDateTime - segment.duration * 1000;\n                  return segment.programDateTime;\n                }, this.lastProgramDateTime);\n              }\n            },\n\n            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\n              this.manifest.targetDuration = entry.duration;\n              setHoldBack.call(this, this.manifest);\n            },\n\n            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\n              this.manifest.start = {\n                timeOffset: entry.attributes['TIME-OFFSET'],\n                precise: entry.attributes.PRECISE\n              };\n            },\n\n            'cue-out'() {\n              currentUri.cueOut = entry.data;\n            },\n\n            'cue-out-cont'() {\n              currentUri.cueOutCont = entry.data;\n            },\n\n            'cue-in'() {\n              currentUri.cueIn = entry.data;\n            },\n\n            'skip'() {\n              this.manifest.skip = camelCaseKeys(entry.attributes);\n              this.warnOnMissingAttributes_('#EXT-X-SKIP', entry.attributes, ['SKIPPED-SEGMENTS']);\n            },\n\n            'part'() {\n              hasParts = true; // parts are always specifed before a segment\n\n              const segmentIndex = this.manifest.segments.length;\n              const part = camelCaseKeys(entry.attributes);\n              currentUri.parts = currentUri.parts || [];\n              currentUri.parts.push(part);\n\n              if (part.byterange) {\n                if (!part.byterange.hasOwnProperty('offset')) {\n                  part.byterange.offset = lastPartByterangeEnd;\n                }\n\n                lastPartByterangeEnd = part.byterange.offset + part.byterange.length;\n              }\n\n              const partIndex = currentUri.parts.length - 1;\n              this.warnOnMissingAttributes_(`#EXT-X-PART #${partIndex} for segment #${segmentIndex}`, entry.attributes, ['URI', 'DURATION']);\n\n              if (this.manifest.renditionReports) {\n                this.manifest.renditionReports.forEach((r, i) => {\n                  if (!r.hasOwnProperty('lastPart')) {\n                    this.trigger('warn', {\n                      message: `#EXT-X-RENDITION-REPORT #${i} lacks required attribute(s): LAST-PART`\n                    });\n                  }\n                });\n              }\n            },\n\n            'server-control'() {\n              const attrs = this.manifest.serverControl = camelCaseKeys(entry.attributes);\n\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\n              setHoldBack.call(this, this.manifest);\n\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\n            'preload-hint'() {\n              // parts are always specifed before a segment\n              const segmentIndex = this.manifest.segments.length;\n              const hint = camelCaseKeys(entry.attributes);\n              const isPart = hint.type && hint.type === 'PART';\n              currentUri.preloadHints = currentUri.preloadHints || [];\n              currentUri.preloadHints.push(hint);\n\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\n                  if (isPart) {\n                    lastPartByterangeEnd = hint.byterange.offset + hint.byterange.length;\n                  }\n                }\n              }\n\n              const index = currentUri.preloadHints.length - 1;\n              this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${index} for segment #${segmentIndex}`, entry.attributes, ['TYPE', 'URI']);\n\n              if (!hint.type) {\n                return;\n              } // search through all preload hints except for the current one for\n              // a duplicate type.\n\n\n              for (let i = 0; i < currentUri.preloadHints.length - 1; i++) {\n                const otherHint = currentUri.preloadHints[i];\n\n                if (!otherHint.type) {\n                  continue;\n                }\n\n                if (otherHint.type === hint.type) {\n                  this.trigger('warn', {\n                    message: `#EXT-X-PRELOAD-HINT #${index} for segment #${segmentIndex} has the same TYPE ${hint.type} as preload hint #${i}`\n                  });\n                }\n              }\n            },\n\n            'rendition-report'() {\n              const report = camelCaseKeys(entry.attributes);\n              this.manifest.renditionReports = this.manifest.renditionReports || [];\n              this.manifest.renditionReports.push(report);\n              const index = this.manifest.renditionReports.length - 1;\n              const required = ['LAST-MSN', 'URI'];\n\n              if (hasParts) {\n                required.push('LAST-PART');\n              }\n\n              this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${index}`, entry.attributes, required);\n            },\n\n            'part-inf'() {\n              this.manifest.partInf = camelCaseKeys(entry.attributes);\n              this.warnOnMissingAttributes_('#EXT-X-PART-INF', entry.attributes, ['PART-TARGET']);\n\n              if (this.manifest.partInf.partTarget) {\n                this.manifest.partTargetDuration = this.manifest.partInf.partTarget;\n              }\n\n              setHoldBack.call(this, this.manifest);\n            },\n\n            'daterange'() {\n              this.manifest.dateRanges.push(camelCaseKeys(entry.attributes));\n              const index = this.manifest.dateRanges.length - 1;\n              this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${index}`, entry.attributes, ['ID', 'START-DATE']);\n              const dateRange = this.manifest.dateRanges[index];\n\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\n              if (dateRange.duration && dateRange.duration < 0) {\n                this.trigger('warn', {\n                  message: 'EXT-X-DATERANGE DURATION must not be negative'\n                });\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\n              const endOnNextYes = !!dateRange.endOnNext;\n\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\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\n              if (dateRange.duration && dateRange.endDate) {\n                const startDate = dateRange.startDate;\n                const newDateInSeconds = startDate.getTime() + dateRange.duration * 1000;\n                this.manifest.dateRanges[index].endDate = new Date(newDateInSeconds);\n              }\n\n              if (!dateRangeTags[dateRange.id]) {\n                dateRangeTags[dateRange.id] = dateRange;\n              } else {\n                for (const attribute in dateRangeTags[dateRange.id]) {\n                  if (!!dateRange[attribute] && JSON.stringify(dateRangeTags[dateRange.id][attribute]) !== JSON.stringify(dateRange[attribute])) {\n                    this.trigger('warn', {\n                      message: 'EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values'\n                    });\n                    break;\n                  }\n                } // if tags with the same ID do not have conflicting attributes, merge them\n\n\n                const dateRangeWithSameId = this.manifest.dateRanges.findIndex(dateRangeToFind => dateRangeToFind.id === dateRange.id);\n                this.manifest.dateRanges[dateRangeWithSameId] = _extends(this.manifest.dateRanges[dateRangeWithSameId], dateRange);\n                dateRangeTags[dateRange.id] = _extends(dateRangeTags[dateRange.id], dateRange); // after merging, delete the duplicate dateRange that was added last\n\n                this.manifest.dateRanges.pop();\n              }\n            },\n\n            'independent-segments'() {\n              this.manifest.independentSegments = true;\n            },\n\n            'i-frames-only'() {\n              this.manifest.iFramesOnly = true;\n              this.requiredCompatibilityversion(this.manifest.version, 4);\n            },\n\n            'content-steering'() {\n              this.manifest.contentSteering = camelCaseKeys(entry.attributes);\n              this.warnOnMissingAttributes_('#EXT-X-CONTENT-STEERING', entry.attributes, ['SERVER-URI']);\n            },\n\n            /** @this {Parser} */\n            define() {\n              this.manifest.definitions = this.manifest.definitions || {};\n\n              const addDef = (n, v) => {\n                if (n in this.manifest.definitions) {\n                  // An EXT-X-DEFINE tag MUST NOT specify the same Variable Name as any other\n                  // EXT-X-DEFINE tag in the same Playlist.  Parsers that encounter duplicate\n                  // Variable Name declarations MUST fail to parse the Playlist.\n                  this.trigger('error', {\n                    message: `EXT-X-DEFINE: Duplicate name ${n}`\n                  });\n                  return;\n                }\n\n                this.manifest.definitions[n] = v;\n              };\n\n              if ('QUERYPARAM' in entry.attributes) {\n                if ('NAME' in entry.attributes || 'IMPORT' in entry.attributes) {\n                  // An EXT-X-DEFINE tag MUST contain either a NAME, an IMPORT, or a\n                  // QUERYPARAM attribute, but only one of the three.  Otherwise, the\n                  // client MUST fail to parse the Playlist.\n                  this.trigger('error', {\n                    message: 'EXT-X-DEFINE: Invalid attributes'\n                  });\n                  return;\n                }\n\n                const val = this.params.get(entry.attributes.QUERYPARAM);\n\n                if (!val) {\n                  // If the QUERYPARAM attribute value does not match any query parameter in\n                  // the URI or the matching parameter has no associated value, the parser\n                  // MUST fail to parse the Playlist.  If more than one parameter matches,\n                  // any of the associated values MAY be used.\n                  this.trigger('error', {\n                    message: `EXT-X-DEFINE: No query param ${entry.attributes.QUERYPARAM}`\n                  });\n                  return;\n                }\n\n                addDef(entry.attributes.QUERYPARAM, decodeURIComponent(val));\n                return;\n              }\n\n              if ('NAME' in entry.attributes) {\n                if ('IMPORT' in entry.attributes) {\n                  // An EXT-X-DEFINE tag MUST contain either a NAME, an IMPORT, or a\n                  // QUERYPARAM attribute, but only one of the three.  Otherwise, the\n                  // client MUST fail to parse the Playlist.\n                  this.trigger('error', {\n                    message: 'EXT-X-DEFINE: Invalid attributes'\n                  });\n                  return;\n                }\n\n                if (!('VALUE' in entry.attributes) || typeof entry.attributes.VALUE !== 'string') {\n                  // This attribute is REQUIRED if the EXT-X-DEFINE tag has a NAME attribute.\n                  // The quoted-string MAY be empty.\n                  this.trigger('error', {\n                    message: `EXT-X-DEFINE: No value for ${entry.attributes.NAME}`\n                  });\n                  return;\n                }\n\n                addDef(entry.attributes.NAME, entry.attributes.VALUE);\n                return;\n              }\n\n              if ('IMPORT' in entry.attributes) {\n                if (!this.mainDefinitions[entry.attributes.IMPORT]) {\n                  // Covers two conditions, as mainDefinitions will always be empty on main\n                  //\n                  // EXT-X-DEFINE tags containing the IMPORT attribute MUST NOT occur in\n                  // Multivariant Playlists; they are only allowed in Media Playlists.\n                  //\n                  // If the IMPORT attribute value does not match any Variable Name in the\n                  // Multivariant Playlist, or if the Media Playlist loaded from a\n                  // Multivariant Playlist, the parser MUST fail the Playlist.\n                  this.trigger('error', {\n                    message: `EXT-X-DEFINE: No value ${entry.attributes.IMPORT} to import, or IMPORT used on main playlist`\n                  });\n                  return;\n                }\n\n                addDef(entry.attributes.IMPORT, this.mainDefinitions[entry.attributes.IMPORT]);\n                return;\n              } // An EXT-X-DEFINE tag MUST contain either a NAME, an IMPORT, or a QUERYPARAM\n              // attribute, but only one of the three.  Otherwise, the client MUST fail to\n              // parse the Playlist.\n\n\n              this.trigger('error', {\n                message: 'EXT-X-DEFINE: No attribute'\n              });\n            },\n\n            'i-frame-playlist'() {\n              this.manifest.iFramePlaylists.push({\n                attributes: entry.attributes,\n                uri: entry.uri,\n                timeline: currentTimeline\n              });\n              this.warnOnMissingAttributes_('#EXT-X-I-FRAME-STREAM-INF', entry.attributes, ['BANDWIDTH', 'URI']);\n            }\n\n          })[entry.tagType] || noop).call(self);\n        },\n\n        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\n          if (key) {\n            currentUri.key = key;\n          }\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\n          lastPartByterangeEnd = 0; // Once we have at least one program date time we can always extrapolate it forward\n\n          if (this.lastProgramDateTime !== null) {\n            currentUri.programDateTime = this.lastProgramDateTime;\n            this.lastProgramDateTime += currentUri.duration * 1000;\n          } // prepare for the next URI\n\n\n          currentUri = {};\n        },\n\n        comment() {// comments are not important for playback\n        },\n\n        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\n      })[entry.type].call(self);\n    });\n  }\n\n  requiredCompatibilityversion(currentVersion, targetVersion) {\n    if (currentVersion < targetVersion || !currentVersion) {\n      this.trigger('warn', {\n        message: `manifest must be at least version ${targetVersion}`\n      });\n    }\n  }\n\n  warnOnMissingAttributes_(identifier, attributes, required) {\n    const missing = [];\n    required.forEach(function (key) {\n      if (!attributes.hasOwnProperty(key)) {\n        missing.push(key);\n      }\n    });\n\n    if (missing.length) {\n      this.trigger('warn', {\n        message: `${identifier} lacks required attribute(s): ${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\n  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\n  end() {\n    // flush any buffered input\n    this.lineStream.push('\\n');\n\n    if (this.manifest.dateRanges.length && this.lastProgramDateTime === null) {\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\n    this.lastProgramDateTime = null;\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.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\n  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\n  addTagMapper(options) {\n    this.parseStream.addTagMapper(options);\n  }\n\n}\n\nexport { LineStream, ParseStream, Parser };\n", "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.<dd>.<dd>` codec string with the standard\n * `avc1.<hhhhhh>`\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\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.<dd>.<dd>` codec strings with the standard\n * `avc1.<hhhhhh>`\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.<dd>.<dd>` to the\n * standard `avc1.<hhhhhh>`.\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\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\n      if (!match || match.length <= 1) {\n        return;\n      }\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\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\n  var audioGroup = master.mediaGroups.AUDIO[audioGroupId];\n\n  if (!audioGroup) {\n    return null;\n  }\n\n  for (var name in audioGroup) {\n    var audioType = audioGroup[name];\n\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\n  return null;\n};\nexport var isVideoCodec = function isVideoCodec(codec) {\n  if (codec === void 0) {\n    codec = '';\n  }\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\n  return regexs.audio.test(codec.trim().toLowerCase());\n};\nexport var isTextCodec = function isTextCodec(codec) {\n  if (codec === void 0) {\n    codec = '';\n  }\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\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/<container> for now\n    type = 'application';\n  } // default the container to mp4\n\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\n  return type + \"/\" + container + \";codecs=\\\"\" + codecString + \"\\\"\";\n};\n/**\n * Tests whether the codec is supported by MediaSource. Optionally also tests ManagedMediaSource.\n *\n * @param {string} codecString\n *        Codec to test\n * @param {boolean} [withMMS]\n *        Whether to check if ManagedMediaSource supports it\n * @return {boolean}\n *          Codec is supported\n */\n\nexport var browserSupportsCodec = function browserSupportsCodec(codecString, withMMS) {\n  if (codecString === void 0) {\n    codecString = '';\n  }\n\n  if (withMMS === void 0) {\n    withMMS = false;\n  }\n\n  return window.MediaSource && window.MediaSource.isTypeSupported && window.MediaSource.isTypeSupported(getMimeForCodec(codecString)) || withMMS && window.ManagedMediaSource && window.ManagedMediaSource.isTypeSupported && window.ManagedMediaSource.isTypeSupported(getMimeForCodec(codecString)) || false;\n};\nexport var muxerSupportsCodec = function muxerSupportsCodec(codecString) {\n  if (codecString === void 0) {\n    codecString = '';\n  }\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\n      if (regexs[\"muxer\" + type].test(codec)) {\n        return true;\n      }\n    }\n\n    return false;\n  });\n};\nexport var DEFAULT_AUDIO_CODEC = 'mp4a.40.2';\nexport var DEFAULT_VIDEO_CODEC = 'avc1.4d400d';", "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\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\n  if (type === 'application/vnd.videojs.vhs+json') {\n    return 'vhs-json';\n  }\n\n  return null;\n};", "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\n  while (len--) {\n    acc += str;\n  }\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\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\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\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\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\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\n  for (var i = 0; i < bytes.length; i++) {\n    str += padStart(bytes[i].toString(16), 2, '0');\n  }\n\n  return str;\n};\nexport var toBinaryString = function toBinaryString(bytes) {\n  bytes = toUint8(bytes);\n  var str = '';\n\n  for (var i = 0; i < bytes.length; i++) {\n    str += padStart(bytes[i].toString(2), 8, '0');\n  }\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\n  if (b[0] === 0xFF) {\n    return 'big';\n  }\n\n  if (b[0] === 0xCC) {\n    return 'little';\n  }\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\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\n  if (signed) {\n    var max = BYTE_TABLE[bytes.length] / BigInt(2) - BigInt(1);\n    number = BigInt(number);\n\n    if (number > max) {\n      number -= max;\n      number -= max;\n      number -= BigInt(2);\n    }\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\n  number = BigInt(number);\n  var byteCount = countBytes(number);\n  var bytes = new Uint8Array(new ArrayBuffer(byteCount));\n\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\n    if (number < 0) {\n      bytes[byteIndex] = Math.abs(~bytes[byteIndex]);\n      bytes[byteIndex] -= i === 0 ? 1 : 2;\n    }\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\n  bytes = Array.prototype.slice.call(bytes);\n  var string = String.fromCharCode.apply(null, toUint8(bytes));\n\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\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\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\n  if (!stringIsBytes) {\n    string = unescape(encodeURIComponent(string));\n  }\n\n  var view = new Uint8Array(string.length);\n\n  for (var i = 0; i < string.length; i++) {\n    view[i] = string.charCodeAt(i);\n  }\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\n  buffers = buffers.filter(function (b) {\n    return b && (b.byteLength || b.length) && typeof b !== 'string';\n  });\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\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\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 && // 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\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\n  return Array.prototype.reverse.call(src);\n};", "import URLToolkit from 'url-toolkit';\nimport window from 'global/window';\nvar DEFAULT_LOCATION = 'http://example.com';\n\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\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\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\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\n    return newUrl.href;\n  }\n\n  return URLToolkit.buildAbsoluteURL(baseUrl, relativeUrl);\n};\n\nexport default resolveUrl;", "/*! @name mpd-parser @version 1.3.1 @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';\n\nvar version = \"1.3.1\";\n\nconst isObject = obj => {\n  return !!obj && typeof obj === 'object';\n};\n\nconst merge = (...objects) => {\n  return objects.reduce((result, source) => {\n    if (typeof source !== 'object') {\n      return result;\n    }\n\n    Object.keys(source).forEach(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};\nconst values = o => Object.keys(o).map(k => o[k]);\n\nconst range = (start, end) => {\n  const result = [];\n\n  for (let i = start; i < end; i++) {\n    result.push(i);\n  }\n\n  return result;\n};\nconst flatten = lists => lists.reduce((x, y) => x.concat(y), []);\nconst from = list => {\n  if (!list.length) {\n    return [];\n  }\n\n  const result = [];\n\n  for (let i = 0; i < list.length; i++) {\n    result.push(list[i]);\n  }\n\n  return result;\n};\nconst findIndexes = (l, key) => l.reduce((a, e, i) => {\n  if (e[key]) {\n    a.push(i);\n  }\n\n  return a;\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\nconst union = (lists, keyFunction) => {\n  return values(lists.reduce((acc, list) => {\n    list.forEach(el => {\n      acc[keyFunction(el)] = el;\n    });\n    return acc;\n  }, {}));\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 <BaseUrl> 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\nconst urlTypeToSegment = ({\n  baseUrl = '',\n  source = '',\n  range = '',\n  indexRange = ''\n}) => {\n  const segment = {\n    uri: source,\n    resolvedUri: resolveUrl(baseUrl || '', source)\n  };\n\n  if (range || indexRange) {\n    const rangeStr = range ? range : indexRange;\n    const ranges = rangeStr.split('-'); // default to parsing this as a BigInt if possible\n\n    let startRange = window.BigInt ? window.BigInt(ranges[0]) : parseInt(ranges[0], 10);\n    let 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\n    if (endRange < Number.MAX_SAFE_INTEGER && typeof endRange === 'bigint') {\n      endRange = Number(endRange);\n    }\n\n    let length;\n\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\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\n    segment.byterange = {\n      length,\n      offset: startRange\n    };\n  }\n\n  return segment;\n};\nconst byteRangeToString = byterange => {\n  // `endRange` is one less than `offset + length` because the HTTP range\n  // header uses inclusive ranges\n  let endRange;\n\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\n  return `${byterange.offset}-${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\nconst parseEndNumber = endNumber => {\n  if (endNumber && typeof endNumber !== 'number') {\n    endNumber = parseInt(endNumber, 10);\n  }\n\n  if (isNaN(endNumber)) {\n    return null;\n  }\n\n  return endNumber;\n};\n/**\n * Functions for calculating the range of available segments in static and dynamic\n * manifests.\n */\n\n\nconst 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(attributes) {\n    const {\n      duration,\n      timescale = 1,\n      sourceDuration,\n      periodDuration\n    } = attributes;\n    const endNumber = parseEndNumber(attributes.endNumber);\n    const segmentDuration = duration / timescale;\n\n    if (typeof endNumber === 'number') {\n      return {\n        start: 0,\n        end: endNumber\n      };\n    }\n\n    if (typeof periodDuration === 'number') {\n      return {\n        start: 0,\n        end: periodDuration / segmentDuration\n      };\n    }\n\n    return {\n      start: 0,\n      end: sourceDuration / segmentDuration\n    };\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(attributes) {\n    const {\n      NOW,\n      clientOffset,\n      availabilityStartTime,\n      timescale = 1,\n      duration,\n      periodStart = 0,\n      minimumUpdatePeriod = 0,\n      timeShiftBufferDepth = Infinity\n    } = attributes;\n    const 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    const now = (NOW + clientOffset) / 1000; // WC stands for Wall Clock.\n    // Convert the period start time to EPOCH.\n\n    const periodStartWC = availabilityStartTime + periodStart; // Period end in EPOCH is manifest's retrieval time + time until next update.\n\n    const periodEndWC = now + minimumUpdatePeriod;\n    const periodDuration = periodEndWC - periodStartWC;\n    const segmentCount = Math.ceil(periodDuration * timescale / duration);\n    const availableStart = Math.floor((now - periodStartWC - timeShiftBufferDepth) * timescale / duration);\n    const 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/**\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\nconst toSegments = attributes => number => {\n  const {\n    duration,\n    timescale = 1,\n    periodStart,\n    startNumber = 1\n  } = attributes;\n  return {\n    number: startNumber + number,\n    duration: duration / timescale,\n    timeline: periodStart,\n    time: number * duration\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\nconst parseByDuration = attributes => {\n  const {\n    type,\n    duration,\n    timescale = 1,\n    periodDuration,\n    sourceDuration\n  } = attributes;\n  const {\n    start,\n    end\n  } = segmentRange[type](attributes);\n  const segments = range(start, end).map(toSegments(attributes));\n\n  if (type === 'static') {\n    const index = segments.length - 1; // section is either a period or the full source\n\n    const 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\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 <SegmentURL> 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.<Array>} list of segments\n */\n\nconst segmentsFromBase = attributes => {\n  const {\n    baseUrl,\n    initialization = {},\n    sourceDuration,\n    indexRange = '',\n    periodStart,\n    presentationTime,\n    number = 0,\n    duration\n  } = attributes; // 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\n  const initSegment = urlTypeToSegment({\n    baseUrl,\n    source: initialization.sourceURL,\n    range: initialization.range\n  });\n  const segment = urlTypeToSegment({\n    baseUrl,\n    source: baseUrl,\n    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    const segmentTimeInfo = parseByDuration(attributes);\n\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\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\nconst addSidxSegmentsToPlaylist$1 = (playlist, sidx, baseUrl) => {\n  // Retain init segment information\n  const initSegment = playlist.sidx.map ? playlist.sidx.map : null; // Retain source duration from initial main manifest parsing\n\n  const sourceDuration = playlist.sidx.duration; // Retain source timeline\n\n  const timeline = playlist.timeline || 0;\n  const sidxByteRange = playlist.sidx.byterange;\n  const sidxEnd = sidxByteRange.offset + sidxByteRange.length; // Retain timescale of the parsed sidx\n\n  const timescale = sidx.timescale; // referenceType 1 refers to other sidx boxes\n\n  const mediaReferences = sidx.references.filter(r => r.referenceType !== 1);\n  const segments = [];\n  const type = playlist.endList ? 'static' : 'dynamic';\n  const periodStart = playlist.sidx.timeline;\n  let presentationTime = periodStart;\n  let number = playlist.mediaSequence || 0; // firstOffset is the offset from the end of the sidx box\n\n  let 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\n  for (let i = 0; i < mediaReferences.length; i++) {\n    const reference = sidx.references[i]; // size of the referenced (sub)segment\n\n    const size = reference.referencedSize; // duration of the referenced (sub)segment, in  the  timescale\n    // this will be converted to seconds when generating segments\n\n    const duration = reference.subsegmentDuration; // should be an inclusive range\n\n    let endIndex; // 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\n    const indexRange = `${startIndex}-${endIndex}`;\n    const attributes = {\n      baseUrl,\n      timescale,\n      timeline,\n      periodStart,\n      presentationTime,\n      number,\n      duration,\n      sourceDuration,\n      indexRange,\n      type\n    };\n    const segment = segmentsFromBase(attributes)[0];\n\n    if (initSegment) {\n      segment.map = initSegment;\n    }\n\n    segments.push(segment);\n\n    if (typeof startIndex === 'bigint') {\n      startIndex += window.BigInt(size);\n    } else {\n      startIndex += size;\n    }\n\n    presentationTime += duration / timescale;\n    number++;\n  }\n\n  playlist.segments = segments;\n  return playlist;\n};\n\nconst SUPPORTED_MEDIA_TYPES = ['AUDIO', 'SUBTITLES']; // allow one 60fps frame as leniency (arbitrarily chosen)\n\nconst 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\nconst getUniqueTimelineStarts = timelineStarts => {\n  return union(timelineStarts, ({\n    timeline\n  }) => timeline).sort((a, b) => a.timeline > b.timeline ? 1 : -1);\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\nconst findPlaylistWithName = (playlists, name) => {\n  for (let i = 0; i < playlists.length; i++) {\n    if (playlists[i].attributes.NAME === name) {\n      return playlists[i];\n    }\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\nconst getMediaGroupPlaylists = manifest => {\n  let mediaGroupPlaylists = [];\n  forEachMediaGroup(manifest, SUPPORTED_MEDIA_TYPES, (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\nconst updateMediaSequenceForPlaylist = ({\n  playlist,\n  mediaSequence\n}) => {\n  playlist.mediaSequence = mediaSequence;\n  playlist.segments.forEach((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\nconst updateSequenceNumbers = ({\n  oldPlaylists,\n  newPlaylists,\n  timelineStarts\n}) => {\n  newPlaylists.forEach(playlist => {\n    playlist.discontinuitySequence = timelineStarts.findIndex(function ({\n      timeline\n    }) {\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    const oldPlaylist = findPlaylistWithName(oldPlaylists, playlist.attributes.NAME);\n\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\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\n    const firstNewSegment = playlist.segments[0];\n    const 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,\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\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\n    const oldMatchingSegment = oldPlaylist.segments[oldMatchingSegmentIndex];\n\n    if (oldMatchingSegment.discontinuity && !firstNewSegment.discontinuity) {\n      firstNewSegment.discontinuity = true;\n      playlist.discontinuityStarts.unshift(0);\n      playlist.discontinuitySequence--;\n    }\n\n    updateMediaSequenceForPlaylist({\n      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\nconst positionManifestOnTimeline = ({\n  oldManifest,\n  newManifest\n}) => {\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  const oldPlaylists = oldManifest.playlists.concat(getMediaGroupPlaylists(oldManifest));\n  const 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,\n    newPlaylists,\n    timelineStarts: newManifest.timelineStarts\n  });\n  return newManifest;\n};\n\nconst generateSidxKey = sidx => sidx && sidx.uri + '-' + byteRangeToString(sidx.byterange);\n\nconst mergeDiscontiguousPlaylists = playlists => {\n  // Break out playlists into groups based on their baseUrl\n  const playlistsByBaseUrl = playlists.reduce(function (acc, cur) {\n    if (!acc[cur.attributes.baseUrl]) {\n      acc[cur.attributes.baseUrl] = [];\n    }\n\n    acc[cur.attributes.baseUrl].push(cur);\n    return acc;\n  }, {});\n  let allPlaylists = [];\n  Object.values(playlistsByBaseUrl).forEach(playlistGroup => {\n    const mergedPlaylists = values(playlistGroup.reduce((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      const name = playlist.attributes.id + (playlist.attributes.lang || '');\n\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          // first segment of subsequent periods signal a discontinuity\n          if (playlist.segments[0]) {\n            playlist.segments[0].discontinuity = true;\n          }\n\n          acc[name].segments.push(...playlist.segments);\n        } // bubble up contentProtection, this assumes all DRM content\n        // has the same contentProtection\n\n\n        if (playlist.attributes.contentProtection) {\n          acc[name].attributes.contentProtection = playlist.attributes.contentProtection;\n        }\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(playlist => {\n    playlist.discontinuityStarts = findIndexes(playlist.segments || [], 'discontinuity');\n    return playlist;\n  });\n};\n\nconst addSidxSegmentsToPlaylist = (playlist, sidxMapping) => {\n  const sidxKey = generateSidxKey(playlist.sidx);\n  const sidxMatch = sidxKey && sidxMapping[sidxKey] && sidxMapping[sidxKey].sidx;\n\n  if (sidxMatch) {\n    addSidxSegmentsToPlaylist$1(playlist, sidxMatch, playlist.sidx.resolvedUri);\n  }\n\n  return playlist;\n};\nconst addSidxSegmentsToPlaylists = (playlists, sidxMapping = {}) => {\n  if (!Object.keys(sidxMapping).length) {\n    return playlists;\n  }\n\n  for (const i in playlists) {\n    playlists[i] = addSidxSegmentsToPlaylist(playlists[i], sidxMapping);\n  }\n\n  return playlists;\n};\nconst formatAudioPlaylist = ({\n  attributes,\n  segments,\n  sidx,\n  mediaSequence,\n  discontinuitySequence,\n  discontinuityStarts\n}, isAudioOnly) => {\n  const playlist = {\n    attributes: {\n      NAME: attributes.id,\n      BANDWIDTH: attributes.bandwidth,\n      CODECS: attributes.codecs,\n      ['PROGRAM-ID']: 1\n    },\n    uri: '',\n    endList: attributes.type === 'static',\n    timeline: attributes.periodStart,\n    resolvedUri: attributes.baseUrl || '',\n    targetDuration: attributes.duration,\n    discontinuitySequence,\n    discontinuityStarts,\n    timelineStarts: attributes.timelineStarts,\n    mediaSequence,\n    segments\n  };\n\n  if (attributes.contentProtection) {\n    playlist.contentProtection = attributes.contentProtection;\n  }\n\n  if (attributes.serviceLocation) {\n    playlist.attributes.serviceLocation = attributes.serviceLocation;\n  }\n\n  if (sidx) {\n    playlist.sidx = sidx;\n  }\n\n  if (isAudioOnly) {\n    playlist.attributes.AUDIO = 'audio';\n    playlist.attributes.SUBTITLES = 'subs';\n  }\n\n  return playlist;\n};\nconst formatVttPlaylist = ({\n  attributes,\n  segments,\n  mediaSequence,\n  discontinuityStarts,\n  discontinuitySequence\n}) => {\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\n  const m3u8Attributes = {\n    NAME: attributes.id,\n    BANDWIDTH: attributes.bandwidth,\n    ['PROGRAM-ID']: 1\n  };\n\n  if (attributes.codecs) {\n    m3u8Attributes.CODECS = attributes.codecs;\n  }\n\n  const 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,\n    discontinuitySequence,\n    mediaSequence,\n    segments\n  };\n\n  if (attributes.serviceLocation) {\n    vttPlaylist.attributes.serviceLocation = attributes.serviceLocation;\n  }\n\n  return vttPlaylist;\n};\nconst organizeAudioPlaylists = (playlists, sidxMapping = {}, isAudioOnly = false) => {\n  let mainPlaylist;\n  const formattedPlaylists = playlists.reduce((a, playlist) => {\n    const role = playlist.attributes.role && playlist.attributes.role.value || '';\n    const language = playlist.attributes.lang || '';\n    let label = playlist.attributes.label || 'main';\n\n    if (language && !playlist.attributes.label) {\n      const roleLabel = role ? ` (${role})` : '';\n      label = `${playlist.attributes.lang}${roleLabel}`;\n    }\n\n    if (!a[label]) {\n      a[label] = {\n        language,\n        autoselect: true,\n        default: role === 'main',\n        playlists: [],\n        uri: ''\n      };\n    }\n\n    const formatted = addSidxSegmentsToPlaylist(formatAudioPlaylist(playlist, isAudioOnly), sidxMapping);\n    a[label].playlists.push(formatted);\n\n    if (typeof mainPlaylist === 'undefined' && role === 'main') {\n      mainPlaylist = playlist;\n      mainPlaylist.default = true;\n    }\n\n    return a;\n  }, {}); // if no playlists have role \"main\", mark the first as main\n\n  if (!mainPlaylist) {\n    const firstLabel = Object.keys(formattedPlaylists)[0];\n    formattedPlaylists[firstLabel].default = true;\n  }\n\n  return formattedPlaylists;\n};\nconst organizeVttPlaylists = (playlists, sidxMapping = {}) => {\n  return playlists.reduce((a, playlist) => {\n    const label = playlist.attributes.label || playlist.attributes.lang || 'text';\n    const language = playlist.attributes.lang || 'und';\n\n    if (!a[label]) {\n      a[label] = {\n        language,\n        default: false,\n        autoselect: false,\n        playlists: [],\n        uri: ''\n      };\n    }\n\n    a[label].playlists.push(addSidxSegmentsToPlaylist(formatVttPlaylist(playlist), sidxMapping));\n    return a;\n  }, {});\n};\n\nconst organizeCaptionServices = captionServices => captionServices.reduce((svcObj, svc) => {\n  if (!svc) {\n    return svcObj;\n  }\n\n  svc.forEach(service => {\n    const {\n      channel,\n      language\n    } = service;\n    svcObj[language] = {\n      autoselect: false,\n      default: false,\n      instreamId: channel,\n      language\n    };\n\n    if (service.hasOwnProperty('aspectRatio')) {\n      svcObj[language].aspectRatio = service.aspectRatio;\n    }\n\n    if (service.hasOwnProperty('easyReader')) {\n      svcObj[language].easyReader = service.easyReader;\n    }\n\n    if (service.hasOwnProperty('3D')) {\n      svcObj[language]['3D'] = service['3D'];\n    }\n  });\n  return svcObj;\n}, {});\n\nconst formatVideoPlaylist = ({\n  attributes,\n  segments,\n  sidx,\n  discontinuityStarts\n}) => {\n  const playlist = {\n    attributes: {\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    },\n    uri: '',\n    endList: attributes.type === 'static',\n    timeline: attributes.periodStart,\n    resolvedUri: attributes.baseUrl || '',\n    targetDuration: attributes.duration,\n    discontinuityStarts,\n    timelineStarts: attributes.timelineStarts,\n    segments\n  };\n\n  if (attributes.frameRate) {\n    playlist.attributes['FRAME-RATE'] = attributes.frameRate;\n  }\n\n  if (attributes.contentProtection) {\n    playlist.contentProtection = attributes.contentProtection;\n  }\n\n  if (attributes.serviceLocation) {\n    playlist.attributes.serviceLocation = attributes.serviceLocation;\n  }\n\n  if (sidx) {\n    playlist.sidx = sidx;\n  }\n\n  return playlist;\n};\n\nconst videoOnly = ({\n  attributes\n}) => attributes.mimeType === 'video/mp4' || attributes.mimeType === 'video/webm' || attributes.contentType === 'video';\n\nconst audioOnly = ({\n  attributes\n}) => attributes.mimeType === 'audio/mp4' || attributes.mimeType === 'audio/webm' || attributes.contentType === 'audio';\n\nconst vttOnly = ({\n  attributes\n}) => attributes.mimeType === 'text/vtt' || attributes.contentType === 'text';\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\n\nconst addMediaSequenceValues = (playlists, timelineStarts) => {\n  // increment all segments sequentially\n  playlists.forEach(playlist => {\n    playlist.mediaSequence = 0;\n    playlist.discontinuitySequence = timelineStarts.findIndex(function ({\n      timeline\n    }) {\n      return timeline === playlist.timeline;\n    });\n\n    if (!playlist.segments) {\n      return;\n    }\n\n    playlist.segments.forEach((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\nconst flattenMediaGroupPlaylists = mediaGroupObject => {\n  if (!mediaGroupObject) {\n    return [];\n  }\n\n  return Object.keys(mediaGroupObject).reduce((acc, label) => {\n    const labelContents = mediaGroupObject[label];\n    return acc.concat(labelContents.playlists);\n  }, []);\n};\nconst toM3u8 = ({\n  dashPlaylists,\n  locations,\n  contentSteering,\n  sidxMapping = {},\n  previousManifest,\n  eventStream\n}) => {\n  if (!dashPlaylists.length) {\n    return {};\n  } // grab all main manifest attributes\n\n\n  const {\n    sourceDuration: duration,\n    type,\n    suggestedPresentationDelay,\n    minimumUpdatePeriod\n  } = dashPlaylists[0].attributes;\n  const videoPlaylists = mergeDiscontiguousPlaylists(dashPlaylists.filter(videoOnly)).map(formatVideoPlaylist);\n  const audioPlaylists = mergeDiscontiguousPlaylists(dashPlaylists.filter(audioOnly));\n  const vttPlaylists = mergeDiscontiguousPlaylists(dashPlaylists.filter(vttOnly));\n  const captions = dashPlaylists.map(playlist => playlist.attributes.captionServices).filter(Boolean);\n  const manifest = {\n    allowCache: true,\n    discontinuityStarts: [],\n    segments: [],\n    endList: true,\n    mediaGroups: {\n      AUDIO: {},\n      VIDEO: {},\n      ['CLOSED-CAPTIONS']: {},\n      SUBTITLES: {}\n    },\n    uri: '',\n    duration,\n    playlists: addSidxSegmentsToPlaylists(videoPlaylists, sidxMapping)\n  };\n\n  if (minimumUpdatePeriod >= 0) {\n    manifest.minimumUpdatePeriod = minimumUpdatePeriod * 1000;\n  }\n\n  if (locations) {\n    manifest.locations = locations;\n  }\n\n  if (contentSteering) {\n    manifest.contentSteering = contentSteering;\n  }\n\n  if (type === 'dynamic') {\n    manifest.suggestedPresentationDelay = suggestedPresentationDelay;\n  }\n\n  if (eventStream && eventStream.length > 0) {\n    manifest.eventStream = eventStream;\n  }\n\n  const isAudioOnly = manifest.playlists.length === 0;\n  const organizedAudioGroup = audioPlaylists.length ? organizeAudioPlaylists(audioPlaylists, sidxMapping, isAudioOnly) : null;\n  const organizedVttGroup = vttPlaylists.length ? organizeVttPlaylists(vttPlaylists, sidxMapping) : null;\n  const formattedPlaylists = videoPlaylists.concat(flattenMediaGroupPlaylists(organizedAudioGroup), flattenMediaGroupPlaylists(organizedVttGroup));\n  const playlistTimelineStarts = formattedPlaylists.map(({\n    timelineStarts\n  }) => timelineStarts);\n  manifest.timelineStarts = getUniqueTimelineStarts(playlistTimelineStarts);\n  addMediaSequenceValues(formattedPlaylists, manifest.timelineStarts);\n\n  if (organizedAudioGroup) {\n    manifest.mediaGroups.AUDIO.audio = organizedAudioGroup;\n  }\n\n  if (organizedVttGroup) {\n    manifest.mediaGroups.SUBTITLES.subs = organizedVttGroup;\n  }\n\n  if (captions.length) {\n    manifest.mediaGroups['CLOSED-CAPTIONS'].cc = organizeCaptionServices(captions);\n  }\n\n  if (previousManifest) {\n    return positionManifestOnTimeline({\n      oldManifest: previousManifest,\n      newManifest: manifest\n    });\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 <S />\n *\n * @return {number}\n *        R value to reach the end of the given period\n */\nconst getLiveRValue = (attributes, time, duration) => {\n  const {\n    NOW,\n    clientOffset,\n    availabilityStartTime,\n    timescale = 1,\n    periodStart = 0,\n    minimumUpdatePeriod = 0\n  } = attributes;\n  const now = (NOW + clientOffset) / 1000;\n  const periodStartWC = availabilityStartTime + periodStart;\n  const periodEndWC = now + minimumUpdatePeriod;\n  const 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\n\nconst parseByTimeline = (attributes, segmentTimeline) => {\n  const {\n    type,\n    minimumUpdatePeriod = 0,\n    media = '',\n    sourceDuration,\n    timescale = 1,\n    startNumber = 1,\n    periodStart: timeline\n  } = attributes;\n  const segments = [];\n  let time = -1;\n\n  for (let sIndex = 0; sIndex < segmentTimeline.length; sIndex++) {\n    const S = segmentTimeline[sIndex];\n    const duration = S.d;\n    const repeat = S.r || 0;\n    const segmentTime = S.t || 0;\n\n    if (time < 0) {\n      // first segment\n      time = segmentTime;\n    }\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      //  <S t=\"0\" d=\"1\" />\n      //  <S d=\"1\" />\n      //  <S d=\"1\" />\n      //  <S t=\"5\" d=\"1\" />\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      //  <S d=\"1\" r=\"-1\" />\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\n    let count;\n\n    if (repeat < 0) {\n      const nextS = sIndex + 1;\n\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\n    const end = startNumber + segments.length + count;\n    let number = startNumber + segments.length;\n\n    while (number < end) {\n      segments.push({\n        number,\n        duration: duration / timescale,\n        time,\n        timeline\n      });\n      time += duration;\n      number++;\n    }\n  }\n\n  return segments;\n};\n\nconst 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\nconst identifierReplacement = values => (match, identifier, format, width) => {\n  if (match === '$$') {\n    // escape sequence\n    return '$';\n  }\n\n  if (typeof values[identifier] === 'undefined') {\n    return match;\n  }\n\n  const value = '' + values[identifier];\n\n  if (identifier === 'RepresentationID') {\n    // Format tag shall not be present with RepresentationID\n    return value;\n  }\n\n  if (!format) {\n    width = 1;\n  } else {\n    width = parseInt(width, 10);\n  }\n\n  if (value.length >= width) {\n    return value;\n  }\n\n  return `${new Array(width - value.length + 1).join('0')}${value}`;\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\nconst constructTemplateUrl = (url, values) => url.replace(identifierPattern, identifierReplacement(values));\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\nconst 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\n  if (attributes.duration) {\n    return parseByDuration(attributes);\n  }\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\nconst segmentsFromTemplate = (attributes, segmentTimeline) => {\n  const templateValues = {\n    RepresentationID: attributes.id,\n    Bandwidth: attributes.bandwidth || 0\n  };\n  const {\n    initialization = {\n      sourceURL: '',\n      range: ''\n    }\n  } = attributes;\n  const mapSegment = urlTypeToSegment({\n    baseUrl: attributes.baseUrl,\n    source: constructTemplateUrl(initialization.sourceURL, templateValues),\n    range: initialization.range\n  });\n  const segments = parseTemplateInfo(attributes, segmentTimeline);\n  return segments.map(segment => {\n    templateValues.Number = segment.number;\n    templateValues.Time = segment.time;\n    const 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    const timescale = attributes.timescale || 1; // - if presentationTimeOffset isn't present on any level, default to 0\n\n    const presentationTimeOffset = attributes.presentationTimeOffset || 0;\n    const presentationTime = // 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    const map = {\n      uri,\n      timeline: segment.timeline,\n      duration: segment.duration,\n      resolvedUri: resolveUrl(attributes.baseUrl || '', uri),\n      map: mapSegment,\n      number: segment.number,\n      presentationTime\n    };\n    return map;\n  });\n};\n\n/**\n * Converts a <SegmentUrl> (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 *   <SegmentURL> node to translate into a segment object\n * @return {Object} translated segment object\n */\n\nconst SegmentURLToSegmentObject = (attributes, segmentUrl) => {\n  const {\n    baseUrl,\n    initialization = {}\n  } = attributes;\n  const initSegment = urlTypeToSegment({\n    baseUrl,\n    source: initialization.sourceURL,\n    range: initialization.range\n  });\n  const segment = urlTypeToSegment({\n    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 <SegmentURL> 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.<Array>} list of segments\n */\n\n\nconst segmentsFromList = (attributes, segmentTimeline) => {\n  const {\n    duration,\n    segmentUrls = [],\n    periodStart\n  } = attributes; // 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\n  const segmentUrlMap = segmentUrls.map(segmentUrlObject => SegmentURLToSegmentObject(attributes, segmentUrlObject));\n  let segmentTimeInfo;\n\n  if (duration) {\n    segmentTimeInfo = parseByDuration(attributes);\n  }\n\n  if (segmentTimeline) {\n    segmentTimeInfo = parseByTimeline(attributes, segmentTimeline);\n  }\n\n  const segments = segmentTimeInfo.map((segmentTime, index) => {\n    if (segmentUrlMap[index]) {\n      const 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      const timescale = attributes.timescale || 1; // - if presentationTimeOffset isn't present on any level, default to 0\n\n      const 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\n  }).filter(segment => segment);\n  return segments;\n};\n\nconst generateSegments = ({\n  attributes,\n  segmentInfo\n}) => {\n  let segmentAttributes;\n  let segmentsFn;\n\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\n  const segmentsInfo = {\n    attributes\n  };\n\n  if (!segmentsFn) {\n    return segmentsInfo;\n  }\n\n  const 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    const {\n      duration,\n      timescale = 1\n    } = segmentAttributes;\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((max, segment) => {\n      return Math.max(max, Math.ceil(segment.duration));\n    }, 0);\n  } else {\n    segmentAttributes.duration = 0;\n  }\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\n  return segmentsInfo;\n};\nconst toPlaylists = representations => representations.map(generateSegments);\n\nconst findChildren = (element, name) => from(element.childNodes).filter(({\n  tagName\n}) => tagName === name);\nconst getContent = element => element.textContent.trim();\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 */\nconst parseDivisionValue = value => {\n  return parseFloat(value.split('/').reduce((prev, current) => prev / current));\n};\n\nconst parseDuration = str => {\n  const SECONDS_IN_YEAR = 365 * 24 * 60 * 60;\n  const SECONDS_IN_MONTH = 30 * 24 * 60 * 60;\n  const SECONDS_IN_DAY = 24 * 60 * 60;\n  const SECONDS_IN_HOUR = 60 * 60;\n  const SECONDS_IN_MIN = 60; // P10Y10M10DT10H10M10.1S\n\n  const durationRegex = /P(?:(\\d*)Y)?(?:(\\d*)M)?(?:(\\d*)D)?(?:T(?:(\\d*)H)?(?:(\\d*)M)?(?:([\\d.]*)S)?)?/;\n  const match = durationRegex.exec(str);\n\n  if (!match) {\n    return 0;\n  }\n\n  const [year, month, day, hour, minute, second] = match.slice(1);\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};\nconst parseDate = str => {\n  // Date format without timezone according to ISO 8601\n  // YYY-MM-DDThh:mm:ss.ssssss\n  const 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\n  return Date.parse(str);\n};\n\nconst 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(value) {\n    return parseDuration(value);\n  },\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(value) {\n    return parseDate(value) / 1000;\n  },\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(value) {\n    return parseDuration(value);\n  },\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(value) {\n    return parseDuration(value);\n  },\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(value) {\n    return value;\n  },\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(value) {\n    return parseDuration(value);\n  },\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(value) {\n    return parseDuration(value);\n  },\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(value) {\n    return parseInt(value, 10);\n  },\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(value) {\n    return parseInt(value, 10);\n  },\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(value) {\n    return parseInt(value, 10);\n  },\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(value) {\n    return parseDivisionValue(value);\n  },\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(value) {\n    return parseInt(value, 10);\n  },\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(value) {\n    return parseInt(value, 10);\n  },\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(value) {\n    return parseInt(value, 10);\n  },\n\n  /**\n   * Specifies the constant approximate Segment duration\n   * NOTE: The <Period> 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(value) {\n    const parsedValue = parseInt(value, 10);\n\n    if (isNaN(parsedValue)) {\n      return parseDuration(value);\n    }\n\n    return parsedValue;\n  },\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(value) {\n    return parseInt(value, 10);\n  },\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(value) {\n    return parseInt(value, 10);\n  },\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(value) {\n    return parseInt(value, 10);\n  },\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(value) {\n    return parseInt(value, 10);\n  },\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(value) {\n    return value;\n  }\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\nconst parseAttributes = el => {\n  if (!(el && el.attributes)) {\n    return {};\n  }\n\n  return from(el.attributes).reduce((a, e) => {\n    const parseFn = parsers[e.name] || parsers.DEFAULT;\n    a[e.name] = parseFn(e.value);\n    return a;\n  }, {});\n};\n\nconst 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\nconst buildBaseUrls = (references, baseUrlElements) => {\n  if (!baseUrlElements.length) {\n    return references;\n  }\n\n  return flatten(references.map(function (reference) {\n    return baseUrlElements.map(function (baseUrlElement) {\n      const initialBaseUrl = getContent(baseUrlElement);\n      const resolvedBaseUrl = resolveUrl(reference.baseUrl, initialBaseUrl);\n      const 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\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\nconst getSegmentInformation = adaptationSet => {\n  const segmentTemplate = findChildren(adaptationSet, 'SegmentTemplate')[0];\n  const segmentList = findChildren(adaptationSet, 'SegmentList')[0];\n  const segmentUrls = segmentList && findChildren(segmentList, 'SegmentURL').map(s => merge({\n    tag: 'SegmentURL'\n  }, parseAttributes(s)));\n  const segmentBase = findChildren(adaptationSet, 'SegmentBase')[0];\n  const segmentTimelineParentNode = segmentList || segmentTemplate;\n  const segmentTimeline = segmentTimelineParentNode && findChildren(segmentTimelineParentNode, 'SegmentTimeline')[0];\n  const segmentInitializationParentNode = segmentList || segmentBase || segmentTemplate;\n  const segmentInitialization = segmentInitializationParentNode && findChildren(segmentInitializationParentNode, 'Initialization')[0]; // SegmentTemplate is handled slightly differently, since it can have both\n  // @initialization and an <Initialization> node.  @initialization can be templated,\n  // while the node can have a url and range specified.  If the <SegmentTemplate> has\n  // both @initialization and an <Initialization> subelement we opt to override with\n  // the node, as this interaction is not defined in the spec.\n\n  const template = segmentTemplate && parseAttributes(segmentTemplate);\n\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 <SegmentTemplate>\n    template.initialization = {\n      sourceURL: template.initialization\n    };\n  }\n\n  const segmentInfo = {\n    template,\n    segmentTimeline: segmentTimeline && findChildren(segmentTimeline, 'S').map(s => parseAttributes(s)),\n    list: segmentList && merge(parseAttributes(segmentList), {\n      segmentUrls,\n      initialization: parseAttributes(segmentInitialization)\n    }),\n    base: segmentBase && merge(parseAttributes(segmentBase), {\n      initialization: parseAttributes(segmentInitialization)\n    })\n  };\n  Object.keys(segmentInfo).forEach(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\nconst inheritBaseUrls = (adaptationSetAttributes, adaptationSetBaseUrls, adaptationSetSegmentInfo) => representation => {\n  const repBaseUrlElements = findChildren(representation, 'BaseURL');\n  const repBaseUrls = buildBaseUrls(adaptationSetBaseUrls, repBaseUrlElements);\n  const attributes = merge(adaptationSetAttributes, parseAttributes(representation));\n  const representationSegmentInfo = getSegmentInformation(representation);\n  return repBaseUrls.map(baseUrl => {\n    return {\n      segmentInfo: merge(adaptationSetSegmentInfo, representationSegmentInfo),\n      attributes: merge(attributes, baseUrl)\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\nconst generateKeySystemInformation = contentProtectionNodes => {\n  return contentProtectionNodes.reduce((acc, node) => {\n    const 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\n    const keySystem = keySystemsMap[attributes.schemeIdUri];\n\n    if (keySystem) {\n      acc[keySystem] = {\n        attributes\n      };\n      const psshNode = findChildren(node, 'cenc:pssh')[0];\n\n      if (psshNode) {\n        const pssh = getContent(psshNode);\n        acc[keySystem].pssh = pssh && decodeB64ToUint8Array(pssh);\n      }\n    }\n\n    return acc;\n  }, {});\n}; // defined in ANSI_SCTE 214-1 2016\n\n\nconst parseCaptionServiceMetadata = service => {\n  // 608 captions\n  if (service.schemeIdUri === 'urn:scte:dash:cc:cea-608:2015') {\n    const values = typeof service.value !== 'string' ? [] : service.value.split(';');\n    return values.map(value => {\n      let channel;\n      let language; // default language to value\n\n      language = value;\n\n      if (/^CC\\d=/.test(value)) {\n        [channel, language] = value.split('=');\n      } else if (/^CC\\d$/.test(value)) {\n        channel = value;\n      }\n\n      return {\n        channel,\n        language\n      };\n    });\n  } else if (service.schemeIdUri === 'urn:scte:dash:cc:cea-708:2015') {\n    const values = typeof service.value !== 'string' ? [] : service.value.split(';');\n    return values.map(value => {\n      const 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\n      if (/=/.test(value)) {\n        const [channel, opts = ''] = value.split('=');\n        flags.channel = channel;\n        flags.language = value;\n        opts.split(',').forEach(opt => {\n          const [name, val] = opt.split(':');\n\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\n      if (flags.channel) {\n        flags.channel = 'SERVICE' + flags.channel;\n      }\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\nconst toEventStream = period => {\n  // get and flatten all EventStreams tags and parse attributes and children\n  return flatten(findChildren(period.node, 'EventStream').map(eventStream => {\n    const eventStreamAttributes = parseAttributes(eventStream);\n    const schemeIdUri = eventStreamAttributes.schemeIdUri; // find all Events per EventStream tag and map to return objects\n\n    return findChildren(eventStream, 'Event').map(event => {\n      const eventAttributes = parseAttributes(event);\n      const presentationTime = eventAttributes.presentationTime || 0;\n      const timescale = eventStreamAttributes.timescale || 1;\n      const duration = eventAttributes.duration || 0;\n      const start = presentationTime / timescale + period.attributes.start;\n      return {\n        schemeIdUri,\n        value: eventStreamAttributes.value,\n        id: eventAttributes.id,\n        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\nconst toRepresentations = (periodAttributes, periodBaseUrls, periodSegmentInfo) => adaptationSet => {\n  const adaptationSetAttributes = parseAttributes(adaptationSet);\n  const adaptationSetBaseUrls = buildBaseUrls(periodBaseUrls, findChildren(adaptationSet, 'BaseURL'));\n  const role = findChildren(adaptationSet, 'Role')[0];\n  const roleAttributes = {\n    role: parseAttributes(role)\n  };\n  let attrs = merge(periodAttributes, adaptationSetAttributes, roleAttributes);\n  const accessibility = findChildren(adaptationSet, 'Accessibility')[0];\n  const captionServices = parseCaptionServiceMetadata(parseAttributes(accessibility));\n\n  if (captionServices) {\n    attrs = merge(attrs, {\n      captionServices\n    });\n  }\n\n  const label = findChildren(adaptationSet, 'Label')[0];\n\n  if (label && label.childNodes.length) {\n    const labelVal = label.childNodes[0].nodeValue.trim();\n    attrs = merge(attrs, {\n      label: labelVal\n    });\n  }\n\n  const contentProtection = generateKeySystemInformation(findChildren(adaptationSet, 'ContentProtection'));\n\n  if (Object.keys(contentProtection).length) {\n    attrs = merge(attrs, {\n      contentProtection\n    });\n  }\n\n  const segmentInfo = getSegmentInformation(adaptationSet);\n  const representations = findChildren(adaptationSet, 'Representation');\n  const adaptationSetSegmentInfo = merge(periodSegmentInfo, segmentInfo);\n  return flatten(representations.map(inheritBaseUrls(attrs, adaptationSetBaseUrls, adaptationSetSegmentInfo)));\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\nconst toAdaptationSets = (mpdAttributes, mpdBaseUrls) => (period, index) => {\n  const periodBaseUrls = buildBaseUrls(mpdBaseUrls, findChildren(period.node, 'BaseURL'));\n  const periodAttributes = merge(mpdAttributes, {\n    periodStart: period.attributes.start\n  });\n\n  if (typeof period.attributes.duration === 'number') {\n    periodAttributes.periodDuration = period.attributes.duration;\n  }\n\n  const adaptationSets = findChildren(period.node, 'AdaptationSet');\n  const periodSegmentInfo = getSegmentInformation(period.node);\n  return flatten(adaptationSets.map(toRepresentations(periodAttributes, periodBaseUrls, periodSegmentInfo)));\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\nconst 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\n  if (!contentSteeringNodes.length) {\n    return null;\n  }\n\n  const 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\nconst getPeriodStart = ({\n  attributes,\n  priorPeriodAttributes,\n  mpdType\n}) => {\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\n  if (priorPeriodAttributes && typeof priorPeriodAttributes.start === 'number' && typeof priorPeriodAttributes.duration === 'number') {\n    return priorPeriodAttributes.start + priorPeriodAttributes.duration;\n  } // (3)\n\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\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\nconst inheritAttributes = (mpd, options = {}) => {\n  const {\n    manifestUri = '',\n    NOW = Date.now(),\n    clientOffset = 0,\n    // TODO: For now, we are expecting an eventHandler callback function\n    // to be passed into the mpd parser as an option.\n    // In the future, we should enable stream parsing by using the Stream class from vhs-utils.\n    // This will support new features including a standardized event handler.\n    // See the m3u8 parser for examples of how stream parsing is currently used for HLS parsing.\n    // https://github.com/videojs/vhs-utils/blob/88d6e10c631e57a5af02c5a62bc7376cd456b4f5/src/stream.js#L9\n    eventHandler = function () {}\n  } = options;\n  const periodNodes = findChildren(mpd, 'Period');\n\n  if (!periodNodes.length) {\n    throw new Error(errors.INVALID_NUMBER_OF_PERIOD);\n  }\n\n  const locations = findChildren(mpd, 'Location');\n  const mpdAttributes = parseAttributes(mpd);\n  const mpdBaseUrls = buildBaseUrls([{\n    baseUrl: manifestUri\n  }], findChildren(mpd, 'BaseURL'));\n  const 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\n  if (locations.length) {\n    mpdAttributes.locations = locations.map(getContent);\n  }\n\n  const 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((node, index) => {\n    const attributes = parseAttributes(node); // Use the last modified prior period, as it may contain added information necessary\n    // for this period.\n\n    const priorPeriod = periods[index - 1];\n    attributes.start = getPeriodStart({\n      attributes,\n      priorPeriodAttributes: priorPeriod ? priorPeriod.attributes : null,\n      mpdType: mpdAttributes.type\n    });\n    periods.push({\n      node,\n      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};\n\nconst stringToMpdXml = manifestString => {\n  if (manifestString === '') {\n    throw new Error(errors.DASH_EMPTY_MANIFEST);\n  }\n\n  const parser = new DOMParser();\n  let xml;\n  let mpd;\n\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\n  if (!mpd || mpd && mpd.getElementsByTagName('parsererror').length > 0) {\n    throw new Error(errors.DASH_INVALID_XML);\n  }\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\nconst parseUTCTimingScheme = mpd => {\n  const UTCTimingNode = findChildren(mpd, 'UTCTiming')[0];\n\n  if (!UTCTimingNode) {\n    return null;\n  }\n\n  const attributes = parseAttributes(UTCTimingNode);\n\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\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\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\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\n  return attributes;\n};\n\nconst 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\nconst parse = (manifestString, options = {}) => {\n  const parsedManifestInfo = inheritAttributes(stringToMpdXml(manifestString), options);\n  const 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\n\nconst parseUTCTiming = manifestString => parseUTCTimingScheme(stringToMpdXml(manifestString));\n\nexport { VERSION, addSidxSegmentsToPlaylist$1 as addSidxSegmentsToPlaylist, generateSidxKey, inheritAttributes, parse, parseUTCTiming, stringToMpdXml, toM3u8, toPlaylists };\n", "/**\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};", "import window from 'global/window';\n\nvar atob = function atob(s) {\n  return window.atob ? window.atob(s) : Buffer.from(s, 'base64').toString('binary');\n};\n\nexport default function decodeB64ToUint8Array(b64Text) {\n  var decodedString = atob(b64Text);\n  var array = new Uint8Array(decodedString.length);\n\n  for (var i = 0; i < decodedString.length; i++) {\n    array[i] = decodedString.charCodeAt(i);\n  }\n\n  return array;\n}", "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\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\n  if (footerPresent) {\n    return returnSize + 20;\n  }\n\n  return returnSize + 10;\n};\nexport var getId3Offset = function getId3Offset(bytes, offset) {\n  if (offset === void 0) {\n    offset = 0;\n  }\n\n  bytes = toUint8(bytes);\n\n  if (bytes.length - offset < 10 || !bytesMatch(bytes, ID3, {\n    offset: offset\n  })) {\n    return offset;\n  }\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};", "export var OPUS_HEAD = new Uint8Array([// O, p, u, s\n0x4f, 0x70, 0x75, 0x73, // 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\n  if (config.channelMappingFamily > 0 && bytes.length > 10) {\n    config.streamCount = view.getUint8(11);\n    config.twoChannelStreamCount = view.getUint8(12);\n    config.channelMapping = [];\n\n    for (var c = 0; c < config.channels; c++) {\n      config.channelMapping.push(view.getUint8(13 + c));\n    }\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\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\n  return new Uint8Array(view.buffer);\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';\n\nvar normalizePath = function normalizePath(path) {\n  if (typeof path === 'string') {\n    return stringToBytes(path);\n  }\n\n  if (typeof path === 'number') {\n    return path;\n  }\n\n  return path;\n};\n\nvar normalizePaths = function normalizePaths(paths) {\n  if (!Array.isArray(paths)) {\n    return [normalizePath(paths)];\n  }\n\n  return paths.map(function (p) {\n    return normalizePath(p);\n  });\n};\n\nvar DESCRIPTORS;\nexport var parseDescriptors = function parseDescriptors(bytes) {\n  bytes = toUint8(bytes);\n  var results = [];\n  var i = 0;\n\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\n    while (byte & 0x80) {\n      size = (byte & 0x7F) << 7;\n      byte = bytes[headerSize];\n      headerSize++;\n    }\n\n    size += byte & 0x7F;\n\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\n      if (tag === id) {\n        results.push(parser(bytes.subarray(headerSize, headerSize + size)));\n        break;\n      }\n    }\n\n    i += size + headerSize;\n  }\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\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\n    if (desc.flags & 0x20) {\n      desc.ocrEsId = bytes[desc.size] << 8 | bytes[desc.size + 1];\n      desc.size += 2;\n    }\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\n  paths = normalizePaths(paths);\n  bytes = toUint8(bytes);\n  var results = [];\n\n  if (!paths.length) {\n    // short-circuit the search for empty paths\n    return results;\n  }\n\n  var i = 0;\n\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\n    var end = i + size;\n\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\n      end = bytes.length;\n    }\n\n    var data = bytes.subarray(i + 8, end);\n\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\n    i = end;\n  } // we've finished searching all of bytes\n\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\n  if (!name.length) {\n    // short-circuit the search for empty paths\n    return bytes.subarray(bytes.length);\n  }\n\n  var i = 0;\n\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\n    i++;\n  } // we've finished searching all of bytes\n\n\n  return bytes.subarray(bytes.length);\n};\n\nvar parseSamples = function parseSamples(data, entrySize, parseEntry) {\n  if (entrySize === void 0) {\n    entrySize = 4;\n  }\n\n  if (parseEntry === void 0) {\n    parseEntry = function parseEntry(d) {\n      return bytesToNumber(d);\n    };\n  }\n\n  var entries = [];\n\n  if (!data || !data.length) {\n    return entries;\n  }\n\n  var entryCount = bytesToNumber(data.subarray(4, 8));\n\n  for (var i = 8; entryCount; i += entrySize, entryCount--) {\n    entries.push(parseEntry(data.subarray(i, i + entrySize)));\n  }\n\n  return entries;\n};\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\n  for (var chunkIndex = 0; chunkIndex < chunkOffsets.length; chunkIndex++) {\n    var samplesInChunk = void 0;\n\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\n      if (isThisOne) {\n        samplesInChunk = sampleToChunk.samplesPerChunk;\n        break;\n      }\n    }\n\n    var chunkOffset = chunkOffsets[chunkIndex];\n\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\n      if (keySamples.length && keySamples.indexOf(frames.length + 1) !== -1) {\n        keyframe = true;\n      }\n\n      var frame = {\n        keyframe: keyframe,\n        start: chunkOffset,\n        end: chunkOffset + frameEnd\n      };\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\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\n      frames.push(frame);\n      chunkOffset += frameEnd;\n    }\n  }\n\n  return frames;\n};\nexport var addSampleDescription = function addSampleDescription(track, bytes) {\n  var codec = bytesToString(bytes.subarray(0, 4));\n\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\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\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\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\n  track.codec = codec;\n};\nexport var parseTracks = function parseTracks(bytes, frameTable) {\n  if (frameTable === void 0) {\n    frameTable = true;\n  }\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\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\n    var tkhd = findBox(trak, ['tkhd'])[0];\n\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\n    var mdhd = findBox(mdia, ['mdhd'])[0];\n\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\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\n    if (frameTable) {\n      track.frameTable = buildFrameTable(stbl, track.timescale);\n    } // codec has no sub parameters\n\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\n  if (!mvhd || !mvhd.length) {\n    return;\n  }\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\n  info.bytes = mvhd;\n  return info;\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];\n\nvar getLength = function getLength(byte) {\n  var len = 1;\n\n  for (var i = 0; i < LENGTH_TABLE.length; i++) {\n    if (byte & LENGTH_TABLE[i]) {\n      break;\n    }\n\n    len++;\n  }\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\n\nvar getvint = function getvint(bytes, offset, removeLength, signed) {\n  if (removeLength === void 0) {\n    removeLength = true;\n  }\n\n  if (signed === void 0) {\n    signed = false;\n  }\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\n  return {\n    length: length,\n    value: bytesToNumber(valueBytes, {\n      signed: signed\n    }),\n    bytes: valueBytes\n  };\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\n  if (typeof path === 'number') {\n    return numberToBytes(path);\n  }\n\n  return path;\n};\n\nvar normalizePaths = function normalizePaths(paths) {\n  if (!Array.isArray(paths)) {\n    return [normalizePath(paths)];\n  }\n\n  return paths.map(function (p) {\n    return normalizePath(p);\n  });\n};\n\nvar getInfinityDataSize = function getInfinityDataSize(id, bytes, offset) {\n  if (offset >= bytes.length) {\n    return bytes.length;\n  }\n\n  var innerid = getvint(bytes, offset, false);\n\n  if (bytesMatch(id.bytes, innerid.bytes)) {\n    return offset;\n  }\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\n\nexport var findEbml = function findEbml(bytes, paths) {\n  paths = normalizePaths(paths);\n  bytes = toUint8(bytes);\n  var results = [];\n\n  if (!paths.length) {\n    return results;\n  }\n\n  var i = 0;\n\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\n      if (dataHeader.value !== bytes.length) {\n        dataHeader.value -= dataStart;\n      }\n    }\n\n    var dataEnd = dataStart + dataHeader.value > bytes.length ? bytes.length : dataStart + dataHeader.value;\n    var data = bytes.subarray(dataStart, dataEnd);\n\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\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\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\n  if (type === 'group') {\n    duration = findEbml(block, [EBML_TAGS.BlockDuration])[0];\n\n    if (duration) {\n      duration = bytesToNumber(duration);\n      duration = 1 / timestampScale * duration * timestampScale / 1000;\n    }\n\n    block = findEbml(block, [EBML_TAGS.Block])[0];\n    type = 'block'; // treat data as a block after this point\n  }\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\n  if (!parsed.lacing) {\n    parsed.frames.push(data);\n    return parsed;\n  }\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\n    for (var i = 0; i < numberOfFrames; i++) {\n      frameSizes.push(sizeOfFrame);\n    }\n  } // xiph\n\n\n  if (parsed.lacing === 1) {\n    for (var _i = 0; _i < numberOfFrames - 1; _i++) {\n      var size = 0;\n\n      do {\n        size += data[offset];\n        offset++;\n      } while (data[offset - 1] === 0xFF);\n\n      frameSizes.push(size);\n    }\n  } // ebml\n\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\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\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\n  while (i < bytes.length) {\n    var id = bytes[i] & 0x7f;\n    var len = bytes[i + 1];\n    var val = void 0;\n\n    if (len === 1) {\n      val = bytes[i + 2];\n    } else {\n      val = bytes.subarray(i + 2, i + 2 + len);\n    }\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\n    i += 2 + len;\n  }\n\n  return params;\n};\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\n  if (!tracks.length) {\n    tracks = findEbml(bytes, [EBML_TAGS.Tracks, EBML_TAGS.Track]);\n  }\n\n  if (!tracks.length) {\n    tracks = findEbml(bytes, [EBML_TAGS.Track]);\n  }\n\n  if (!tracks.length) {\n    return decodedTracks;\n  }\n\n  tracks.forEach(function (track) {\n    var trackType = findEbml(track, EBML_TAGS.TrackType)[0];\n\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\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\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\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\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\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\n  var clusters = findEbml(segment, [EBML_TAGS.Cluster]);\n\n  if (!tracks) {\n    tracks = parseTracks(segment);\n  }\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\n    if (timestamp && timestamp.length) {\n      timestamp = bytesToNumber(timestamp);\n    } // get all blocks then sort them into the correct order\n\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\n    i++;\n  } // If no Emulation Prevention Bytes were found just return the original\n  // array\n\n\n  if (positions.length === 0) {\n    return bytes;\n  } // Create a new array to hold the NAL unit data\n\n\n  var newLength = bytes.length - positions.length;\n  var newData = new Uint8Array(newLength);\n  var sourceIndex = 0;\n\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\n    newData[i] = bytes[sourceIndex];\n  }\n\n  return newData;\n};\nexport var findNal = function findNal(bytes, dataType, types, nalLimit) {\n  if (nalLimit === void 0) {\n    nalLimit = Infinity;\n  }\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\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\n    if (!nalOffset) {\n      i++;\n      continue;\n    }\n\n    nalsFound++;\n\n    if (nalStart) {\n      return discardEmulationPreventionBytes(bytes.subarray(nalStart, i));\n    }\n\n    var nalType = void 0;\n\n    if (dataType === 'h264') {\n      nalType = bytes[i + nalOffset] & 0x1f;\n    } else if (dataType === 'h265') {\n      nalType = bytes[i + nalOffset] >> 1 & 0x3f;\n    }\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\n    i += nalOffset + (dataType === 'h264' ? 1 : 2);\n  }\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\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\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\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\n      i += 1;\n    }\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\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\n  for (var i = 0; i < isLikelyTypes.length; i++) {\n    var type = isLikelyTypes[i];\n\n    if (isLikely[type](bytes)) {\n      return type;\n    }\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};", "/*! @name @videojs/http-streaming @version 3.10.0 @license Apache-2.0 */\nimport document from 'global/document';\nimport window$1 from 'global/window';\nimport _extends from '@babel/runtime/helpers/extends';\nimport _resolveUrl from '@videojs/vhs-utils/es/resolve-url.js';\nimport videojs from 'video.js';\nimport { Parser } from 'm3u8-parser';\nimport { isAudioCodec, translateLegacyCodec, codecsFromDefault, parseCodecs, getMimeForCodec, DEFAULT_VIDEO_CODEC, DEFAULT_AUDIO_CODEC, browserSupportsCodec, muxerSupportsCodec } from '@videojs/vhs-utils/es/codecs.js';\nimport { simpleTypeFromSourceType } from '@videojs/vhs-utils/es/media-types.js';\nexport { 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';\n\n/**\n * @file resolve-url.js - Handling how URLs are resolved and manipulated\n */\nconst 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\nconst 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\n  return url;\n};\n\nconst logger = source => {\n  if (videojs.log.debug) {\n    return videojs.log.debug.bind(videojs, 'VHS:', `${source} >`);\n  }\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(...args) {\n  const context = videojs.obj || videojs;\n  const fn = context.merge || context.mergeOptions;\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(...args) {\n  const context = videojs.time || videojs;\n  const fn = context.createTimeRanges || context.createTimeRanges;\n  return fn.apply(context, args);\n}\n\n/**\n * ranges\n *\n * Utilities for working with TimeRanges.\n *\n */\n\nconst 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\nconst SAFE_TIME_DELTA = TIME_FUDGE_FACTOR * 3;\n\nconst filterRanges = function (timeRanges, predicate) {\n  const results = [];\n  let i;\n\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\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\n\nconst findRange = function (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\nconst findNextRange = function (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\nconst findGaps = function (buffered) {\n  if (buffered.length < 2) {\n    return createTimeRanges();\n  }\n\n  const ranges = [];\n\n  for (let i = 1; i < buffered.length; i++) {\n    const start = buffered.end(i - 1);\n    const end = buffered.start(i);\n    ranges.push([start, end]);\n  }\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\nconst bufferIntersection = function (bufferA, bufferB) {\n  let start = null;\n  let end = null;\n  let arity = 0;\n  const extents = [];\n  const ranges = [];\n\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\n  let 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\n  count = bufferB.length;\n\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\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\n    if (start !== null && end !== null) {\n      ranges.push([start, end]);\n      start = null;\n      end = null;\n    }\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\nconst printableRange = range => {\n  const strArr = [];\n\n  if (!range || !range.length) {\n    return '';\n  }\n\n  for (let i = 0; i < range.length; i++) {\n    strArr.push(range.start(i) + ' => ' + range.end(i));\n  }\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\nconst timeUntilRebuffer = function (buffered, currentTime, playbackRate = 1) {\n  const 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\nconst timeRangesToArray = timeRanges => {\n  const timeRangesList = [];\n\n  for (let i = 0; i < timeRanges.length; i++) {\n    timeRangesList.push({\n      start: timeRanges.start(i),\n      end: timeRanges.end(i)\n    });\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\nconst isRangeDifferent = function (a, b) {\n  // same object\n  if (a === b) {\n    return false;\n  } // one or the other is undefined\n\n\n  if (!a && b || !b && a) {\n    return true;\n  } // length is different\n\n\n  if (a.length !== b.length) {\n    return true;\n  } // see if any start/end pair is different\n\n\n  for (let i = 0; i < a.length; i++) {\n    if (a.start(i) !== b.start(i) || a.end(i) !== b.end(i)) {\n      return true;\n    }\n  } // if the length and every pair is the same\n  // this is the same time range\n\n\n  return false;\n};\nconst lastBufferedEnd = function (a) {\n  if (!a || !a.length || !a.end) {\n    return;\n  }\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\nconst timeAheadOf = function (range, startTime) {\n  let time = 0;\n\n  if (!range || !range.length) {\n    return time;\n  }\n\n  for (let i = 0; i < range.length; i++) {\n    const start = range.start(i);\n    const end = range.end(i); // startTime is after this range entirely\n\n    if (startTime > end) {\n      continue;\n    } // startTime is within this range\n\n\n    if (startTime > start && startTime <= end) {\n      time += end - startTime;\n      continue;\n    } // startTime is before this range.\n\n\n    time += end - start;\n  }\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\nconst 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\n  let 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\nconst getPartsAndSegments = playlist => (playlist.segments || []).reduce((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,\n        segment\n      });\n    });\n  } else {\n    acc.push({\n      duration: segment.duration,\n      segmentIndex: si,\n      partIndex: null,\n      segment,\n      part: null\n    });\n  }\n\n  return acc;\n}, []);\nconst getLastParts = media => {\n  const lastSegment = media.segments && media.segments.length && media.segments[media.segments.length - 1];\n  return lastSegment && lastSegment.parts || [];\n};\nconst getKnownPartCount = ({\n  preloadSegment\n}) => {\n  if (!preloadSegment) {\n    return;\n  }\n\n  const {\n    parts,\n    preloadHints\n  } = preloadSegment;\n  let partCount = (preloadHints || []).reduce((count, hint) => count + (hint.type === 'PART' ? 1 : 0), 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\nconst liveEdgeDelay = (main, media) => {\n  if (media.endList) {\n    return 0;\n  } // dash suggestedPresentationDelay trumps everything\n\n\n  if (main && main.suggestedPresentationDelay) {\n    return main.suggestedPresentationDelay;\n  }\n\n  const 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\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\nconst backwardDuration = function (playlist, endSequence) {\n  let result = 0;\n  let i = endSequence - playlist.mediaSequence; // if a start time is available for segment immediately following\n  // the interval, use it\n\n  let 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\n    if (typeof segment.end !== 'undefined') {\n      return {\n        result: segment.end - segment.duration,\n        precise: true\n      };\n    }\n  }\n\n  while (i--) {\n    segment = playlist.segments[i];\n\n    if (typeof segment.end !== 'undefined') {\n      return {\n        result: result + segment.end,\n        precise: true\n      };\n    }\n\n    result += segmentDurationWithParts(playlist, segment);\n\n    if (typeof segment.start !== 'undefined') {\n      return {\n        result: result + segment.start,\n        precise: true\n      };\n    }\n  }\n\n  return {\n    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\n\nconst forwardDuration = function (playlist, endSequence) {\n  let result = 0;\n  let segment;\n  let 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\n    if (typeof segment.start !== 'undefined') {\n      return {\n        result: segment.start - result,\n        precise: true\n      };\n    }\n\n    result += segmentDurationWithParts(playlist, segment);\n\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\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\n\nconst intervalDuration = function (playlist, endSequence, expired) {\n  if (typeof endSequence === 'undefined') {\n    endSequence = playlist.mediaSequence + playlist.segments.length;\n  }\n\n  if (endSequence < playlist.mediaSequence) {\n    return 0;\n  } // do a backward walk to estimate the duration\n\n\n  const backward = backwardDuration(playlist, endSequence);\n\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\n  const forward = forwardDuration(playlist, endSequence);\n\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\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\n\nconst duration = function (playlist, endSequence, expired) {\n  if (!playlist) {\n    return 0;\n  }\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\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\n    if (!playlist.endList) {\n      return window$1.Infinity;\n    }\n  } // calculate the total duration based on the segment durations\n\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\nconst sumDurations = function ({\n  defaultDuration,\n  durationList,\n  startIndex,\n  endIndex\n}) {\n  let durations = 0;\n\n  if (startIndex > endIndex) {\n    [startIndex, endIndex] = [endIndex, startIndex];\n  }\n\n  if (startIndex < 0) {\n    for (let i = startIndex; i < Math.min(0, endIndex); i++) {\n      durations += defaultDuration;\n    }\n\n    startIndex = 0;\n  }\n\n  for (let i = startIndex; i < endIndex; i++) {\n    durations += durationList[i].duration;\n  }\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\nconst playlistEnd = function (playlist, expired, useSafeLiveEnd, liveEdgePadding) {\n  if (!playlist || !playlist.segments) {\n    return null;\n  }\n\n  if (playlist.endList) {\n    return duration(playlist);\n  }\n\n  if (expired === null) {\n    return null;\n  }\n\n  expired = expired || 0;\n  let lastSegmentEndTime = intervalDuration(playlist, playlist.mediaSequence + playlist.segments.length, expired);\n\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\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\nconst seekable = function (playlist, expired, liveEdgePadding) {\n  const useSafeLiveEnd = true;\n  const seekableStart = expired || 0;\n  let seekableEnd = playlistEnd(playlist, expired, useSafeLiveEnd, liveEdgePadding);\n\n  if (seekableEnd === null) {\n    return createTimeRanges();\n  } // Clamp seekable end since it can not be less than the seekable start\n\n\n  if (seekableEnd < seekableStart) {\n    seekableEnd = seekableStart;\n  }\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\nconst getMediaInfoForTime = function ({\n  playlist,\n  currentTime,\n  startingSegmentIndex,\n  startingPartIndex,\n  startTime,\n  exactManifestTimings\n}) {\n  let time = currentTime - startTime;\n  const partsAndSegments = getPartsAndSegments(playlist);\n  let startIndex = 0;\n\n  for (let i = 0; i < partsAndSegments.length; i++) {\n    const partAndSegment = partsAndSegments[i];\n\n    if (startingSegmentIndex !== partAndSegment.segmentIndex) {\n      continue;\n    } // skip this if part index does not match.\n\n\n    if (typeof startingPartIndex === 'number' && typeof partAndSegment.partIndex === 'number' && startingPartIndex !== partAndSegment.partIndex) {\n      continue;\n    }\n\n    startIndex = i;\n    break;\n  }\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 (let i = startIndex - 1; i >= 0; i--) {\n        const partAndSegment = partsAndSegments[i];\n        time += partAndSegment.duration;\n\n        if (exactManifestTimings) {\n          if (time < 0) {\n            continue;\n          }\n        } else if (time + TIME_FUDGE_FACTOR <= 0) {\n          continue;\n        }\n\n        return {\n          partIndex: partAndSegment.partIndex,\n          segmentIndex: partAndSegment.segmentIndex,\n          startTime: startTime - sumDurations({\n            defaultDuration: playlist.targetDuration,\n            durationList: partsAndSegments,\n            startIndex,\n            endIndex: i\n          })\n        };\n      }\n    } // We were unable to find a good segment within the playlist\n    // so select the first segment\n\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\n  if (startIndex < 0) {\n    for (let i = startIndex; i < 0; i++) {\n      time -= playlist.targetDuration;\n\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\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\n  for (let i = startIndex; i < partsAndSegments.length; i++) {\n    const partAndSegment = partsAndSegments[i];\n    time -= partAndSegment.duration;\n    const canUseFudgeFactor = partAndSegment.duration > TIME_FUDGE_FACTOR;\n    const isExactlyAtTheEnd = time === 0;\n    const isExtremelyCloseToTheEnd = canUseFudgeFactor && time + TIME_FUDGE_FACTOR >= 0;\n\n    if (isExactlyAtTheEnd || isExtremelyCloseToTheEnd) {\n      // 1) We are exactly at the end of the current segment.\n      // 2) We are extremely close to the end of the current segment (The difference is less than  1 / 30).\n      //    We may encounter this situation when\n      //    we don't have exact match between segment duration info in the manifest and the actual duration of the segment\n      //    For example:\n      //    We appended 3 segments 10 seconds each, meaning we should have 30 sec buffered,\n      //    but we the actual buffered is 29.99999\n      //\n      // In both cases:\n      // if we passed current time -> it means that we already played current segment\n      // if we passed buffered.end -> it means that this segment is already loaded and buffered\n      // we should select the next segment if we have one:\n      if (i !== partsAndSegments.length - 1) {\n        continue;\n      }\n    }\n\n    if (exactManifestTimings) {\n      if (time > 0) {\n        continue;\n      }\n    } else if (time - TIME_FUDGE_FACTOR >= 0) {\n      continue;\n    }\n\n    return {\n      partIndex: partAndSegment.partIndex,\n      segmentIndex: partAndSegment.segmentIndex,\n      startTime: startTime + sumDurations({\n        defaultDuration: playlist.targetDuration,\n        durationList: partsAndSegments,\n        startIndex,\n        endIndex: i\n      })\n    };\n  } // We are out of possible candidates so load the last one...\n\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\nconst isExcluded = function (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\nconst isIncompatible = function (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\nconst isEnabled = function (playlist) {\n  const 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\nconst isDisabled = function (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\nconst isAes = function (media) {\n  for (let i = 0; i < media.segments.length; i++) {\n    if (media.segments[i].key) {\n      return true;\n    }\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\nconst hasAttribute = function (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\nconst estimateSegmentRequestTime = function (segmentDuration, bandwidth, playlist, bytesReceived = 0) {\n  if (!hasAttribute('BANDWIDTH', playlist)) {\n    return NaN;\n  }\n\n  const 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\nconst isLowestEnabledRendition = (main, media) => {\n  if (main.playlists.length === 1) {\n    return true;\n  }\n\n  const currentBandwidth = media.attributes.BANDWIDTH || Number.MAX_VALUE;\n  return main.playlists.filter(playlist => {\n    if (!isEnabled(playlist)) {\n      return false;\n    }\n\n    return (playlist.attributes.BANDWIDTH || 0) < currentBandwidth;\n  }).length === 0;\n};\nconst 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\n  if (a === b) {\n    return true;\n  } // first try to use id as it should be the most\n  // accurate\n\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\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\n  if (a.uri && b.uri && a.uri === b.uri) {\n    return true;\n  }\n\n  return false;\n};\n\nconst someAudioVariant = function (main, callback) {\n  const AUDIO = main && main.mediaGroups && main.mediaGroups.AUDIO || {};\n  let found = false;\n\n  for (const groupName in AUDIO) {\n    for (const label in AUDIO[groupName]) {\n      found = callback(AUDIO[groupName][label]);\n\n      if (found) {\n        break;\n      }\n    }\n\n    if (found) {\n      break;\n    }\n  }\n\n  return !!found;\n};\n\nconst 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    const found = someAudioVariant(main, variant => variant.playlists && variant.playlists.length || variant.uri);\n    return found;\n  } // if every playlist has only an audio codec it is audio only\n\n\n  for (let i = 0; i < main.playlists.length; i++) {\n    const playlist = main.playlists[i];\n    const CODECS = playlist.attributes && playlist.attributes.CODECS; // all codecs are audio, this is an audio playlist.\n\n    if (CODECS && CODECS.split(',').every(c => isAudioCodec(c))) {\n      continue;\n    } // playlist is in an audio group it is audio only\n\n\n    const found = someAudioVariant(main, variant => playlistMatch(playlist, variant));\n\n    if (found) {\n      continue;\n    } // if we make it here this playlist isn't audio and we\n    // are not audio only\n\n\n    return false;\n  } // if we make it past every playlist without returning, then\n  // this is an audio only playlist.\n\n\n  return true;\n}; // exports\n\nvar Playlist = {\n  liveEdgeDelay,\n  duration,\n  seekable,\n  getMediaInfoForTime,\n  isEnabled,\n  isDisabled,\n  isExcluded,\n  isIncompatible,\n  playlistEnd,\n  isAes,\n  hasAttribute,\n  estimateSegmentRequestTime,\n  isLowestEnabledRendition,\n  isAudioOnly,\n  playlistMatch,\n  segmentDurationWithParts\n};\n\nconst {\n  log\n} = videojs;\nconst createPlaylistID = (index, uri) => {\n  return `${index}-${uri}`;\n}; // default function for creating a group id\n\nconst groupID = (type, group, label) => {\n  return `placeholder-uri-${type}-${group}-${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\nconst parseManifest = ({\n  onwarn,\n  oninfo,\n  manifestString,\n  customTagParsers = [],\n  customTagMappers = [],\n  llhls\n}) => {\n  const parser = new Parser();\n\n  if (onwarn) {\n    parser.on('warn', onwarn);\n  }\n\n  if (oninfo) {\n    parser.on('info', oninfo);\n  }\n\n  customTagParsers.forEach(customParser => parser.addParser(customParser));\n  customTagMappers.forEach(mapper => parser.addTagMapper(mapper));\n  parser.push(manifestString);\n  parser.end();\n  const 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\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\n  if (!manifest.targetDuration) {\n    let targetDuration = 10;\n\n    if (manifest.segments && manifest.segments.length) {\n      targetDuration = manifest.segments.reduce((acc, s) => Math.max(acc, s.duration), 0);\n    }\n\n    if (onwarn) {\n      onwarn({\n        message: `manifest has no targetDuration defaulting to ${targetDuration}`\n      });\n    }\n\n    manifest.targetDuration = targetDuration;\n  }\n\n  const parts = getLastParts(manifest);\n\n  if (parts.length && !manifest.partTargetDuration) {\n    const partTargetDuration = parts.reduce((acc, p) => Math.max(acc, p.duration), 0);\n\n    if (onwarn) {\n      onwarn({\n        message: `manifest has no partTargetDuration defaulting to ${partTargetDuration}`\n      });\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\n    manifest.partTargetDuration = partTargetDuration;\n  }\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\nconst forEachMediaGroup = (main, callback) => {\n  if (!main.mediaGroups) {\n    return;\n  }\n\n  ['AUDIO', 'SUBTITLES'].forEach(mediaType => {\n    if (!main.mediaGroups[mediaType]) {\n      return;\n    }\n\n    for (const groupKey in main.mediaGroups[mediaType]) {\n      for (const labelKey in main.mediaGroups[mediaType][groupKey]) {\n        const 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\nconst setupMediaPlaylist = ({\n  playlist,\n  uri,\n  id\n}) => {\n  playlist.id = id;\n  playlist.playlistErrors_ = 0;\n\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\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\nconst setupMediaPlaylists = main => {\n  let i = main.playlists.length;\n\n  while (i--) {\n    const playlist = main.playlists[i];\n    setupMediaPlaylist({\n      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\nconst resolveMediaGroupUris = main => {\n  forEachMediaGroup(main, 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\nconst mainForMedia = (media, uri) => {\n  const id = createPlaylistID(0, uri);\n  const 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,\n      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\nconst addPropertiesToMain = (main, uri, createGroupID = groupID) => {\n  main.uri = uri;\n\n  for (let i = 0; i < main.playlists.length; i++) {\n    if (!main.playlists[i].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      const phonyUri = `placeholder-uri-${i}`;\n      main.playlists[i].uri = phonyUri;\n    }\n  }\n\n  const audioOnlyMain = isAudioOnly(main);\n  forEachMediaGroup(main, (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 (let i = 0; i < main.playlists.length; i++) {\n          const p = main.playlists[i];\n\n          if (p.attributes && p.attributes.AUDIO && p.attributes.AUDIO === groupKey) {\n            return;\n          }\n        }\n      }\n\n      properties.playlists = [_extends({}, properties)];\n    }\n\n    properties.playlists.forEach(function (p, i) {\n      const groupId = createGroupID(mediaType, groupKey, labelKey, p);\n      const id = createPlaylistID(i, groupId);\n\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\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};\n\nclass DateRangesStorage {\n  constructor() {\n    this.offset_ = null;\n    this.pendingDateRanges_ = new Map();\n    this.processedDateRanges_ = new Map();\n  }\n\n  setOffset(segments = []) {\n    // already set\n    if (this.offset_ !== null) {\n      return;\n    } // no segment to process\n\n\n    if (!segments.length) {\n      return;\n    }\n\n    const [firstSegment] = segments; // 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\n    this.offset_ = firstSegment.programDateTime / 1000;\n  }\n\n  setPendingDateRanges(dateRanges = []) {\n    if (!dateRanges.length) {\n      return;\n    }\n\n    const [dateRange] = dateRanges;\n    const startTime = dateRange.startDate.getTime();\n    this.trimProcessedDateRanges_(startTime);\n    this.pendingDateRanges_ = dateRanges.reduce((map, pendingDateRange) => {\n      map.set(pendingDateRange.id, pendingDateRange);\n      return map;\n    }, new Map());\n  }\n\n  processDateRange(dateRange) {\n    this.pendingDateRanges_.delete(dateRange.id);\n    this.processedDateRanges_.set(dateRange.id, dateRange);\n  }\n\n  getDateRangesToProcess() {\n    if (this.offset_ === null) {\n      return [];\n    }\n\n    const dateRangeClasses = {};\n    const dateRangesToProcess = [];\n    this.pendingDateRanges_.forEach((dateRange, id) => {\n      if (this.processedDateRanges_.has(id)) {\n        return;\n      }\n\n      dateRange.startTime = dateRange.startDate.getTime() / 1000 - this.offset_;\n\n      dateRange.processDateRange = () => this.processDateRange(dateRange);\n\n      dateRangesToProcess.push(dateRange);\n\n      if (!dateRange.class) {\n        return;\n      }\n\n      if (dateRangeClasses[dateRange.class]) {\n        const 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\n    for (const dateRange of dateRangesToProcess) {\n      const classList = dateRangeClasses[dateRange.class] || [];\n\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\n    return dateRangesToProcess;\n  }\n\n  trimProcessedDateRanges_(startTime) {\n    const copy = new Map(this.processedDateRanges_);\n    copy.forEach((dateRange, id) => {\n      if (dateRange.startDate.getTime() < startTime) {\n        this.processedDateRanges_.delete(id);\n      }\n    });\n  }\n\n}\n\nconst {\n  EventTarget: EventTarget$1\n} = videojs;\n\nconst addLLHLSQueryDirectives = (uri, media) => {\n  if (media.endList || !media.serverControl) {\n    return uri;\n  }\n\n  const parameters = {};\n\n  if (media.serverControl.canBlockReload) {\n    const {\n      preloadSegment\n    } = media; // next msn is a zero based value, length is not.\n\n    let 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      const parts = preloadSegment.parts || []; // _HLS_part is a zero based index\n\n      const 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\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\n    parameters._HLS_msn = nextMSN;\n  }\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\n  if (Object.keys(parameters).length) {\n    const 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\n      parsedUri.searchParams.set(name, parameters[name]);\n    });\n    uri = parsedUri.toString();\n  }\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\n\nconst updateSegment = (a, b) => {\n  if (!a) {\n    return b;\n  }\n\n  const 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\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 (let i = 0; i < b.parts.length; i++) {\n      if (a.parts && a.parts[i]) {\n        result.parts[i] = merge(a.parts[i], b.parts[i]);\n      }\n    }\n  } // set skipped to false for segments that have\n  // have had information merged from the old segment.\n\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\n  if (a.preload && !b.preload) {\n    result.preload = false;\n  }\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\nconst updateSegments = (original, update, offset) => {\n  const oldSegments = original.slice();\n  const newSegments = update.slice();\n  offset = offset || 0;\n  const result = [];\n  let currentMap;\n\n  for (let newIndex = 0; newIndex < newSegments.length; newIndex++) {\n    const oldSegment = oldSegments[newIndex + offset];\n    const newSegment = newSegments[newIndex];\n\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\n      result.push(newSegment);\n    }\n  }\n\n  return result;\n};\nconst 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\n  if (segment.key && !segment.key.resolvedUri) {\n    segment.key.resolvedUri = resolveUrl(baseUri, segment.key.uri);\n  }\n\n  if (segment.map && !segment.map.resolvedUri) {\n    segment.map.resolvedUri = resolveUrl(baseUri, segment.map.uri);\n  }\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\n  if (segment.parts && segment.parts.length) {\n    segment.parts.forEach(p => {\n      if (p.resolvedUri) {\n        return;\n      }\n\n      p.resolvedUri = resolveUrl(baseUri, p.uri);\n    });\n  }\n\n  if (segment.preloadHints && segment.preloadHints.length) {\n    segment.preloadHints.forEach(p => {\n      if (p.resolvedUri) {\n        return;\n      }\n\n      p.resolvedUri = resolveUrl(baseUri, p.uri);\n    });\n  }\n};\n\nconst getAllSegments = function (media) {\n  const segments = media.segments || [];\n  const 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 (let i = 0; i < preloadSegment.preloadHints.length; i++) {\n        if (preloadSegment.preloadHints[i].type === 'MAP') {\n          return segments;\n        }\n      }\n    } // set the duration for our preload segment to target duration.\n\n\n    preloadSegment.duration = media.targetDuration;\n    preloadSegment.preload = true;\n    segments.push(preloadSegment);\n  }\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\n\nconst isPlaylistUnchanged = (a, b) => 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  * 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\nconst updateMain$1 = (main, newMedia, unchangedCheck = isPlaylistUnchanged) => {\n  const result = merge(main, {});\n  const oldMedia = result.playlists[newMedia.id];\n\n  if (!oldMedia) {\n    return null;\n  }\n\n  if (unchangedCheck(oldMedia, newMedia)) {\n    return null;\n  }\n\n  newMedia.segments = getAllSegments(newMedia);\n  const 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\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 (let i = 0; i < newMedia.skip.skippedSegments; i++) {\n        newMedia.segments.unshift({\n          skipped: true\n        });\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\n  mergedPlaylist.segments.forEach(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 (let i = 0; i < result.playlists.length; i++) {\n    if (result.playlists[i].id === newMedia.id) {\n      result.playlists[i] = mergedPlaylist;\n    }\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, (properties, mediaType, groupKey, labelKey) => {\n    if (!properties.playlists) {\n      return;\n    }\n\n    for (let i = 0; i < properties.playlists.length; i++) {\n      if (newMedia.id === properties.playlists[i].id) {\n        properties.playlists[i] = 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\nconst refreshDelay = (media, update) => {\n  const segments = media.segments || [];\n  const lastSegment = segments[segments.length - 1];\n  const lastPart = lastSegment && lastSegment.parts && lastSegment.parts[lastSegment.parts.length - 1];\n  const lastDuration = lastPart && lastPart.duration || lastSegment && lastSegment.duration;\n\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\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 */\n\nclass PlaylistLoader extends EventTarget$1 {\n  constructor(src, vhs, options = {}) {\n    super();\n\n    if (!src) {\n      throw new Error('A non-empty playlist URL or object is required');\n    }\n\n    this.logger_ = logger('PlaylistLoader');\n    const {\n      withCredentials = false\n    } = options;\n    this.src = src;\n    this.vhs_ = vhs;\n    this.withCredentials = withCredentials;\n    this.addDateRangesToTextTrack_ = options.addDateRangesToTextTrack;\n    const vhsOptions = vhs.options_;\n    this.customTagParsers = vhsOptions && vhsOptions.customTagParsers || [];\n    this.customTagMappers = vhsOptions && vhsOptions.customTagMappers || [];\n    this.llhls = vhsOptions && vhsOptions.llhls;\n    this.dateRangesStorage_ = new DateRangesStorage(); // initialize the loader state\n\n    this.state = 'HAVE_NOTHING'; // live playlist staleness timeout\n\n    this.handleMediaupdatetimeout_ = this.handleMediaupdatetimeout_.bind(this);\n    this.on('mediaupdatetimeout', this.handleMediaupdatetimeout_);\n    this.on('loadedplaylist', this.handleLoadedPlaylist_.bind(this));\n  }\n\n  handleLoadedPlaylist_() {\n    const mediaPlaylist = this.media();\n\n    if (!mediaPlaylist) {\n      return;\n    }\n\n    this.dateRangesStorage_.setOffset(mediaPlaylist.segments);\n    this.dateRangesStorage_.setPendingDateRanges(mediaPlaylist.dateRanges);\n    const availableDateRanges = this.dateRangesStorage_.getDateRangesToProcess();\n\n    if (!availableDateRanges.length || !this.addDateRangesToTextTrack_) {\n      return;\n    }\n\n    this.addDateRangesToTextTrack_(availableDateRanges);\n  }\n\n  handleMediaupdatetimeout_() {\n    if (this.state !== 'HAVE_METADATA') {\n      // only refresh the media playlist if no other activity is going on\n      return;\n    }\n\n    const media = this.media();\n    let uri = resolveUrl(this.main.uri, media.uri);\n\n    if (this.llhls) {\n      uri = addLLHLSQueryDirectives(uri, media);\n    }\n\n    this.state = 'HAVE_CURRENT_METADATA';\n    this.request = this.vhs_.xhr({\n      uri,\n      withCredentials: this.withCredentials\n    }, (error, req) => {\n      // disposed\n      if (!this.request) {\n        return;\n      }\n\n      if (error) {\n        return this.playlistRequestError(this.request, this.media(), 'HAVE_METADATA');\n      }\n\n      this.haveMetadata({\n        playlistString: this.request.responseText,\n        url: this.media().uri,\n        id: this.media().id\n      });\n    });\n  }\n\n  playlistRequestError(xhr, playlist, startingState) {\n    const {\n      uri,\n      id\n    } = playlist; // any in-flight request is now finished\n\n    this.request = null;\n\n    if (startingState) {\n      this.state = startingState;\n    }\n\n    this.error = {\n      playlist: this.main.playlists[id],\n      status: xhr.status,\n      message: `HLS playlist request error at URL: ${uri}.`,\n      responseText: xhr.responseText,\n      code: xhr.status >= 500 ? 4 : 2\n    };\n    this.trigger('error');\n  }\n\n  parseManifest_({\n    url,\n    manifestString\n  }) {\n    return parseManifest({\n      onwarn: ({\n        message\n      }) => this.logger_(`m3u8-parser warn for ${url}: ${message}`),\n      oninfo: ({\n        message\n      }) => this.logger_(`m3u8-parser info for ${url}: ${message}`),\n      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\n  haveMetadata({\n    playlistString,\n    playlistObject,\n    url,\n    id\n  }) {\n    // any in-flight request is now finished\n    this.request = null;\n    this.state = 'HAVE_METADATA';\n    const playlist = playlistObject || this.parseManifest_({\n      url,\n      manifestString: playlistString\n    });\n    playlist.lastRequest = Date.now();\n    setupMediaPlaylist({\n      playlist,\n      uri: url,\n      id\n    }); // merge this playlist into the main manifest\n\n    const update = updateMain$1(this.main, playlist);\n    this.targetDuration = playlist.partTargetDuration || playlist.targetDuration;\n    this.pendingMedia_ = null;\n\n    if (update) {\n      this.main = update;\n      this.media_ = this.main.playlists[id];\n    } else {\n      this.trigger('playlistunchanged');\n    }\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\n  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  stopRequest() {\n    if (this.request) {\n      const 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\n  media(playlist, shouldDelay) {\n    // getter\n    if (!playlist) {\n      return this.media_;\n    } // setter\n\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\n    if (typeof playlist === 'string') {\n      if (!this.main.playlists[playlist]) {\n        throw new Error('Unknown playlist URI: ' + playlist);\n      }\n\n      playlist = this.main.playlists[playlist];\n    }\n\n    window$1.clearTimeout(this.finalRenditionTimeout);\n\n    if (shouldDelay) {\n      const 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\n    const startingState = this.state;\n    const mediaChange = !this.media_ || playlist.id !== this.media_.id;\n    const mainPlaylistRef = this.main.playlists[playlist.id]; // switch to fully loaded playlists immediately\n\n    if (mainPlaylistRef && mainPlaylistRef.endList || // 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\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\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\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\n    this.updateMediaUpdateTimeout_(refreshDelay(playlist, true)); // switching to the active playlist is a no-op\n\n    if (!mediaChange) {\n      return;\n    }\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\n      this.request.onreadystatechange = null;\n      this.request.abort();\n      this.request = null;\n    } // request the new playlist\n\n\n    if (this.media_) {\n      this.trigger('mediachanging');\n    }\n\n    this.pendingMedia_ = playlist;\n    this.request = this.vhs_.xhr({\n      uri: playlist.resolvedUri,\n      withCredentials: this.withCredentials\n    }, (error, req) => {\n      // disposed\n      if (!this.request) {\n        return;\n      }\n\n      playlist.lastRequest = Date.now();\n      playlist.resolvedUri = resolveManifestRedirect(playlist.resolvedUri, req);\n\n      if (error) {\n        return this.playlistRequestError(this.request, playlist, startingState);\n      }\n\n      this.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        this.trigger('loadedmetadata');\n      } else {\n        this.trigger('mediachange');\n      }\n    });\n  }\n  /**\n   * pause loading of the playlist\n   */\n\n\n  pause() {\n    if (this.mediaUpdateTimeout) {\n      window$1.clearTimeout(this.mediaUpdateTimeout);\n      this.mediaUpdateTimeout = null;\n    }\n\n    this.stopRequest();\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    } // Need to restore state now that no activity is happening\n\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\n  load(shouldDelay) {\n    if (this.mediaUpdateTimeout) {\n      window$1.clearTimeout(this.mediaUpdateTimeout);\n      this.mediaUpdateTimeout = null;\n    }\n\n    const media = this.media();\n\n    if (shouldDelay) {\n      const delay = media ? (media.partTargetDuration || media.targetDuration) / 2 * 1000 : 5 * 1000;\n      this.mediaUpdateTimeout = window$1.setTimeout(() => {\n        this.mediaUpdateTimeout = null;\n        this.load();\n      }, delay);\n      return;\n    }\n\n    if (!this.started) {\n      this.start();\n      return;\n    }\n\n    if (media && !media.endList) {\n      this.trigger('mediaupdatetimeout');\n    } else {\n      this.trigger('loadedplaylist');\n    }\n  }\n\n  updateMediaUpdateTimeout_(delay) {\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\n    if (!this.media() || this.media().endList) {\n      return;\n    }\n\n    this.mediaUpdateTimeout = window$1.setTimeout(() => {\n      this.mediaUpdateTimeout = null;\n      this.trigger('mediaupdatetimeout');\n      this.updateMediaUpdateTimeout_(delay);\n    }, delay);\n  }\n  /**\n   * start loading of the playlist\n   */\n\n\n  start() {\n    this.started = true;\n\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\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(() => {\n        this.setupInitialPlaylist(this.src);\n      }, 0);\n      return;\n    } // request the specified URL\n\n\n    this.request = this.vhs_.xhr({\n      uri: this.src,\n      withCredentials: this.withCredentials\n    }, (error, req) => {\n      // disposed\n      if (!this.request) {\n        return;\n      } // clear the loader's request reference\n\n\n      this.request = null;\n\n      if (error) {\n        this.error = {\n          status: req.status,\n          message: `HLS playlist request error at URL: ${this.src}.`,\n          responseText: req.responseText,\n          // MEDIA_ERR_NETWORK\n          code: 2\n        };\n\n        if (this.state === 'HAVE_NOTHING') {\n          this.started = false;\n        }\n\n        return this.trigger('error');\n      }\n\n      this.src = resolveManifestRedirect(this.src, req);\n      const manifest = this.parseManifest_({\n        manifestString: req.responseText,\n        url: this.src\n      });\n      this.setupInitialPlaylist(manifest);\n    });\n  }\n\n  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\n  setupInitialPlaylist(manifest) {\n    this.state = 'HAVE_MAIN_MANIFEST';\n\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(playlist => {\n        playlist.segments = getAllSegments(playlist);\n        playlist.segments.forEach(segment => {\n          resolveSegmentUris(segment, playlist.resolvedUri);\n        });\n      });\n      this.trigger('loadedplaylist');\n\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\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\n    const 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   * Updates or deletes a preexisting pathway clone.\n   * Ensures that all playlists related to the old pathway clone are\n   * either updated or deleted.\n   *\n   * @param {Object} clone On update, the pathway clone object for the newly updated pathway clone.\n   *        On delete, the old pathway clone object to be deleted.\n   * @param {boolean} isUpdate True if the pathway is to be updated,\n   *        false if it is meant to be deleted.\n   */\n\n\n  updateOrDeleteClone(clone, isUpdate) {\n    const main = this.main;\n    const pathway = clone.ID;\n    let i = main.playlists.length; // Iterate backwards through the playlist so we can remove playlists if necessary.\n\n    while (i--) {\n      const p = main.playlists[i];\n\n      if (p.attributes['PATHWAY-ID'] === pathway) {\n        const oldPlaylistUri = p.resolvedUri;\n        const oldPlaylistId = p.id; // update the indexed playlist and add new playlists by ID and URI\n\n        if (isUpdate) {\n          const newPlaylistUri = this.createCloneURI_(p.resolvedUri, clone);\n          const newPlaylistId = createPlaylistID(pathway, newPlaylistUri);\n          const attributes = this.createCloneAttributes_(pathway, p.attributes);\n          const updatedPlaylist = this.createClonePlaylist_(p, newPlaylistId, clone, attributes);\n          main.playlists[i] = updatedPlaylist;\n          main.playlists[newPlaylistId] = updatedPlaylist;\n          main.playlists[newPlaylistUri] = updatedPlaylist;\n        } else {\n          // Remove the indexed playlist.\n          main.playlists.splice(i, 1);\n        } // Remove playlists by the old ID and URI.\n\n\n        delete main.playlists[oldPlaylistId];\n        delete main.playlists[oldPlaylistUri];\n      }\n    }\n\n    this.updateOrDeleteCloneMedia(clone, isUpdate);\n  }\n  /**\n   * Updates or deletes media data based on the pathway clone object.\n   * Due to the complexity of the media groups and playlists, in all cases\n   * we remove all of the old media groups and playlists.\n   * On updates, we then create new media groups and playlists based on the\n   * new pathway clone object.\n   *\n   * @param {Object} clone The pathway clone object for the newly updated pathway clone.\n   * @param {boolean} isUpdate True if the pathway is to be updated,\n   *        false if it is meant to be deleted.\n   */\n\n\n  updateOrDeleteCloneMedia(clone, isUpdate) {\n    const main = this.main;\n    const id = clone.ID;\n    ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(mediaType => {\n      if (!main.mediaGroups[mediaType] || !main.mediaGroups[mediaType][id]) {\n        return;\n      }\n\n      for (const groupKey in main.mediaGroups[mediaType]) {\n        // Remove all media playlists for the media group for this pathway clone.\n        if (groupKey === id) {\n          for (const labelKey in main.mediaGroups[mediaType][groupKey]) {\n            const oldMedia = main.mediaGroups[mediaType][groupKey][labelKey];\n            oldMedia.playlists.forEach((p, i) => {\n              const oldMediaPlaylist = main.playlists[p.id];\n              const oldPlaylistId = oldMediaPlaylist.id;\n              const oldPlaylistUri = oldMediaPlaylist.resolvedUri;\n              delete main.playlists[oldPlaylistId];\n              delete main.playlists[oldPlaylistUri];\n            });\n          } // Delete the old media group.\n\n\n          delete main.mediaGroups[mediaType][groupKey];\n        }\n      }\n    }); // Create the new media groups and playlists if there is an update.\n\n    if (isUpdate) {\n      this.createClonedMediaGroups_(clone);\n    }\n  }\n  /**\n   * Given a pathway clone object, clones all necessary playlists.\n   *\n   * @param {Object} clone The pathway clone object.\n   * @param {Object} basePlaylist The original playlist to clone from.\n   */\n\n\n  addClonePathway(clone, basePlaylist = {}) {\n    const main = this.main;\n    const index = main.playlists.length;\n    const uri = this.createCloneURI_(basePlaylist.resolvedUri, clone);\n    const playlistId = createPlaylistID(clone.ID, uri);\n    const attributes = this.createCloneAttributes_(clone.ID, basePlaylist.attributes);\n    const playlist = this.createClonePlaylist_(basePlaylist, playlistId, clone, attributes);\n    main.playlists[index] = playlist; // add playlist by ID and URI\n\n    main.playlists[playlistId] = playlist;\n    main.playlists[uri] = playlist;\n    this.createClonedMediaGroups_(clone);\n  }\n  /**\n   * Given a pathway clone object we create clones of all media.\n   * In this function, all necessary information and updated playlists\n   * are added to the `mediaGroup` object.\n   * Playlists are also added to the `playlists` array so the media groups\n   * will be properly linked.\n   *\n   * @param {Object} clone The pathway clone object.\n   */\n\n\n  createClonedMediaGroups_(clone) {\n    const id = clone.ID;\n    const baseID = clone['BASE-ID'];\n    const main = this.main;\n    ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(mediaType => {\n      // If the media type doesn't exist, or there is already a clone, skip\n      // to the next media type.\n      if (!main.mediaGroups[mediaType] || main.mediaGroups[mediaType][id]) {\n        return;\n      }\n\n      for (const groupKey in main.mediaGroups[mediaType]) {\n        if (groupKey === baseID) {\n          // Create the group.\n          main.mediaGroups[mediaType][id] = {};\n        } else {\n          // There is no need to iterate over label keys in this case.\n          continue;\n        }\n\n        for (const labelKey in main.mediaGroups[mediaType][groupKey]) {\n          const oldMedia = main.mediaGroups[mediaType][groupKey][labelKey];\n          main.mediaGroups[mediaType][id][labelKey] = _extends({}, oldMedia);\n          const newMedia = main.mediaGroups[mediaType][id][labelKey]; // update URIs on the media\n\n          const newUri = this.createCloneURI_(oldMedia.resolvedUri, clone);\n          newMedia.resolvedUri = newUri;\n          newMedia.uri = newUri; // Reset playlists in the new media group.\n\n          newMedia.playlists = []; // Create new playlists in the newly cloned media group.\n\n          oldMedia.playlists.forEach((p, i) => {\n            const oldMediaPlaylist = main.playlists[p.id];\n            const group = groupID(mediaType, id, labelKey);\n            const newPlaylistID = createPlaylistID(id, group); // Check to see if it already exists\n\n            if (oldMediaPlaylist && !main.playlists[newPlaylistID]) {\n              const newMediaPlaylist = this.createClonePlaylist_(oldMediaPlaylist, newPlaylistID, clone);\n              const newPlaylistUri = newMediaPlaylist.resolvedUri;\n              main.playlists[newPlaylistID] = newMediaPlaylist;\n              main.playlists[newPlaylistUri] = newMediaPlaylist;\n            }\n\n            newMedia.playlists[i] = this.createClonePlaylist_(p, newPlaylistID, clone);\n          });\n        }\n      }\n    });\n  }\n  /**\n   * Using the original playlist to be cloned, and the pathway clone object\n   * information, we create a new playlist.\n   *\n   * @param {Object} basePlaylist  The original playlist to be cloned from.\n   * @param {string} id The desired id of the newly cloned playlist.\n   * @param {Object} clone The pathway clone object.\n   * @param {Object} attributes An optional object to populate the `attributes` property in the playlist.\n   *\n   * @return {Object} The combined cloned playlist.\n   */\n\n\n  createClonePlaylist_(basePlaylist, id, clone, attributes) {\n    const uri = this.createCloneURI_(basePlaylist.resolvedUri, clone);\n    const newProps = {\n      resolvedUri: uri,\n      uri,\n      id\n    }; // Remove all segments from previous playlist in the clone.\n\n    if (basePlaylist.segments) {\n      newProps.segments = [];\n    }\n\n    if (attributes) {\n      newProps.attributes = attributes;\n    }\n\n    return merge(basePlaylist, newProps);\n  }\n  /**\n   * Generates an updated URI for a cloned pathway based on the original\n   * pathway's URI and the paramaters from the pathway clone object in the\n   * content steering server response.\n   *\n   * @param {string} baseUri URI to be updated in the cloned pathway.\n   * @param {Object} clone The pathway clone object.\n   *\n   * @return {string} The updated URI for the cloned pathway.\n   */\n\n\n  createCloneURI_(baseURI, clone) {\n    const uri = new URL(baseURI);\n    uri.hostname = clone['URI-REPLACEMENT'].HOST;\n    const params = clone['URI-REPLACEMENT'].PARAMS; // Add params to the cloned URL.\n\n    for (const key of Object.keys(params)) {\n      uri.searchParams.set(key, params[key]);\n    }\n\n    return uri.href;\n  }\n  /**\n   * Helper function to create the attributes needed for the new clone.\n   * This mainly adds the necessary media attributes.\n   *\n   * @param {string} id The pathway clone object ID.\n   * @param {Object} oldAttributes The old attributes to compare to.\n   * @return {Object} The new attributes to add to the playlist.\n   */\n\n\n  createCloneAttributes_(id, oldAttributes) {\n    const attributes = {\n      ['PATHWAY-ID']: id\n    };\n    ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(mediaType => {\n      if (oldAttributes[mediaType]) {\n        attributes[mediaType] = id;\n      }\n    });\n    return attributes;\n  }\n  /**\n   * Returns the key ID set from a playlist\n   *\n   * @param {playlist} playlist to fetch the key ID set from.\n   * @return a Set of 32 digit hex strings that represent the unique keyIds for that playlist.\n   */\n\n\n  getKeyIdSet(playlist) {\n    if (playlist.contentProtection) {\n      const keyIds = new Set();\n\n      for (const keysystem in playlist.contentProtection) {\n        const keyId = playlist.contentProtection[keysystem].attributes.keyId;\n\n        if (keyId) {\n          keyIds.add(keyId.toLowerCase());\n        }\n      }\n\n      return keyIds;\n    }\n  }\n\n}\n\n/**\n * @file xhr.js\n */\nconst {\n  xhr: videojsXHR\n} = videojs;\n\nconst callbackWrapper = function (request, error, response, callback) {\n  const reqResponse = request.responseType === 'arraybuffer' ? request.response : request.responseText;\n\n  if (!error && reqResponse) {\n    request.responseTime = Date.now();\n    request.roundTripTime = request.responseTime - request.requestTime;\n    request.bytesReceived = reqResponse.byteLength || reqResponse.length;\n\n    if (!request.bandwidth) {\n      request.bandwidth = Math.floor(request.bytesReceived / request.roundTripTime * 8 * 1000);\n    }\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\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\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\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\n\nconst callAllRequestHooks = (requestSet, options) => {\n  if (!requestSet || !requestSet.size) {\n    return;\n  }\n\n  let newOptions = options;\n  requestSet.forEach(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\n\nconst callAllResponseHooks = (responseSet, request, error, response) => {\n  if (!responseSet || !responseSet.size) {\n    return;\n  }\n\n  responseSet.forEach(responseCallback => {\n    responseCallback(request, error, response);\n  });\n};\n\nconst xhrFactory = function () {\n  const 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    const 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    const _requestCallbackSet = XhrFunction._requestCallbackSet || videojs.Vhs.xhr._requestCallbackSet || new Set();\n\n    const _responseCallbackSet = XhrFunction._responseCallbackSet || videojs.Vhs.xhr._responseCallbackSet;\n\n    if (beforeRequest && typeof beforeRequest === 'function') {\n      videojs.log.warn('beforeRequest is deprecated, use onRequest instead.');\n\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\n    const xhrMethod = videojs.Vhs.xhr.original === true ? videojsXHR : videojs.Vhs.xhr; // call all registered onRequest hooks, assign new options.\n\n    const 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\n    const 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    const originalAbort = request.abort;\n\n    request.abort = function () {\n      request.aborted = true;\n      return originalAbort.apply(request, arguments);\n    };\n\n    request.uri = options.uri;\n    request.requestTime = Date.now();\n    return request;\n  };\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\n\nconst byterangeStr = function (byterange) {\n  // `byterangeEnd` is one less than `offset + length` because the HTTP range\n  // header uses inclusive ranges\n  let byterangeEnd;\n  const byterangeStart = byterange.offset;\n\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\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\nconst segmentXhrHeaders = function (segment) {\n  const headers = {};\n\n  if (segment.byterange) {\n    headers.Range = byterangeStr(segment.byterange);\n  }\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\nconst textRange = function (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\n\nconst formatHexString = function (e, i) {\n  const value = e.toString(16);\n  return '00'.substring(0, 2 - value.length) + value + (i % 2 ? ' ' : '');\n};\n\nconst formatAsciiString = function (e) {\n  if (e >= 0x20 && e < 0x7e) {\n    return String.fromCharCode(e);\n  }\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\n\nconst createTransferableMessage = function (message) {\n  const transferable = {};\n  Object.keys(message).forEach(key => {\n    const value = message[key];\n\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\nconst initSegmentId = function (initSegment) {\n  const 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\nconst segmentKeyId = function (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\nconst hexDump = data => {\n  const bytes = Array.prototype.slice.call(data);\n  const step = 16;\n  let result = '';\n  let hex;\n  let ascii;\n\n  for (let 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\n  return result;\n};\nconst tagDump = ({\n  bytes\n}) => hexDump(bytes);\nconst textRanges = ranges => {\n  let result = '';\n  let i;\n\n  for (i = 0; i < ranges.length; i++) {\n    result += textRange(ranges, i) + ' ';\n  }\n\n  return result;\n};\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\nconst 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\nconst 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\n  const transmuxerPrependedSeconds = segment.videoTimingInfo.transmuxerPrependedSeconds;\n  const transmuxedStart = segment.videoTimingInfo.transmuxedPresentationStart; // get the start of the content from before old content is prepended\n\n  const startOfSegment = transmuxedStart + transmuxerPrependedSeconds;\n  const offsetFromSegmentStart = playerTime - startOfSegment;\n  return new Date(segment.dateTimeObject.getTime() + offsetFromSegmentStart * 1000);\n};\nconst 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\nconst findSegmentForProgramTime = (programTime, playlist) => {\n  // Assumptions:\n  //  - verifyProgramDateTimeTags has already been run\n  //  - live streams have been started\n  let dateTimeObject;\n\n  try {\n    dateTimeObject = new Date(programTime);\n  } catch (e) {\n    return null;\n  }\n\n  if (!playlist || !playlist.segments || playlist.segments.length === 0) {\n    return null;\n  }\n\n  let segment = playlist.segments[0];\n\n  if (dateTimeObject < new Date(segment.dateTimeObject)) {\n    // Requested time is before stream start.\n    return null;\n  }\n\n  for (let i = 0; i < playlist.segments.length - 1; i++) {\n    segment = playlist.segments[i];\n    const nextSegmentStart = new Date(playlist.segments[i + 1].dateTimeObject);\n\n    if (dateTimeObject < nextSegmentStart) {\n      break;\n    }\n  }\n\n  const lastSegment = playlist.segments[playlist.segments.length - 1];\n  const lastSegmentStart = lastSegment.dateTimeObject;\n  const lastSegmentDuration = lastSegment.videoTimingInfo ? originalSegmentVideoDuration(lastSegment.videoTimingInfo) : lastSegment.duration + lastSegment.duration * SEGMENT_END_FUDGE_PERCENT;\n  const lastSegmentEnd = new Date(lastSegmentStart.getTime() + lastSegmentDuration * 1000);\n\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\n  if (dateTimeObject > new Date(lastSegmentStart)) {\n    segment = lastSegment;\n  }\n\n  return {\n    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\nconst 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\n  let segmentEnd = 0;\n  let segment;\n\n  for (let i = 0; i < playlist.segments.length; i++) {\n    segment = playlist.segments[i]; // 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\n    if (time <= segmentEnd) {\n      break;\n    }\n  }\n\n  const lastSegment = playlist.segments[playlist.segments.length - 1];\n\n  if (lastSegment.videoTimingInfo && lastSegment.videoTimingInfo.transmuxedPresentationEnd < time) {\n    // The time requested is beyond the stream end.\n    return null;\n  }\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\n    segment = lastSegment;\n  }\n\n  return {\n    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\nconst getOffsetFromTimestamp = (comparisonTimeStamp, programTime) => {\n  let segmentDateTime;\n  let programDateTime;\n\n  try {\n    segmentDateTime = new Date(comparisonTimeStamp);\n    programDateTime = new Date(programTime);\n  } catch (e) {// TODO handle error\n  }\n\n  const segmentTimeEpoch = segmentDateTime.getTime();\n  const 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\nconst verifyProgramDateTimeTags = playlist => {\n  if (!playlist.segments || playlist.segments.length === 0) {\n    return false;\n  }\n\n  for (let i = 0; i < playlist.segments.length; i++) {\n    const segment = playlist.segments[i];\n\n    if (!segment.dateTimeObject) {\n      return false;\n    }\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\nconst getProgramTime = ({\n  playlist,\n  time = undefined,\n  callback\n}) => {\n  if (!callback) {\n    throw new Error('getProgramTime: callback must be provided');\n  }\n\n  if (!playlist || time === undefined) {\n    return callback({\n      message: 'getProgramTime: playlist and time must be provided'\n    });\n  }\n\n  const matchedSegment = findSegmentForPlayerTime(time, playlist);\n\n  if (!matchedSegment) {\n    return callback({\n      message: 'valid programTime was not found'\n    });\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\n  const programTimeObject = {\n    mediaSeconds: time\n  };\n  const programTime = playerTimeToProgramTime(time, matchedSegment.segment);\n\n  if (programTime) {\n    programTimeObject.programDateTime = programTime.toISOString();\n  }\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\nconst seekToProgramTime = ({\n  programTime,\n  playlist,\n  retryCount = 2,\n  seekTo,\n  pauseAfterSeek = true,\n  tech,\n  callback\n}) => {\n  if (!callback) {\n    throw new Error('seekToProgramTime: callback must be provided');\n  }\n\n  if (typeof programTime === 'undefined' || !playlist || !seekTo) {\n    return callback({\n      message: 'seekToProgramTime: programTime, seekTo and playlist must be provided'\n    });\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\n  if (!verifyProgramDateTimeTags(playlist)) {\n    return callback({\n      message: 'programDateTime tags must be provided in the manifest ' + playlist.resolvedUri\n    });\n  }\n\n  const matchedSegment = findSegmentForProgramTime(programTime, playlist); // no match\n\n  if (!matchedSegment) {\n    return callback({\n      message: `${programTime} was not found in the stream`\n    });\n  }\n\n  const segment = matchedSegment.segment;\n  const mediaOffset = getOffsetFromTimestamp(segment.dateTimeObject, programTime);\n\n  if (matchedSegment.type === 'estimate') {\n    // we've run out of retries\n    if (retryCount === 0) {\n      return callback({\n        message: `${programTime} is not buffered yet. Try again`\n      });\n    }\n\n    seekTo(matchedSegment.estimatedStart + mediaOffset);\n    tech.one('seeked', () => {\n      seekToProgramTime({\n        programTime,\n        playlist,\n        retryCount: retryCount - 1,\n        seekTo,\n        pauseAfterSeek,\n        tech,\n        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\n  const seekToTime = segment.start + mediaOffset;\n\n  const seekedCallback = () => {\n    return callback(null, tech.currentTime());\n  }; // listen for seeked event\n\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\n  seekTo(seekToTime);\n};\n\n// which will only happen if the request is complete.\n\nconst callbackOnCompleted = (request, cb) => {\n  if (request.readyState === 4) {\n    return cb();\n  }\n\n  return;\n};\n\nconst containerRequest = (uri, xhr, cb) => {\n  let bytes = [];\n  let id3Offset;\n  let finished = false;\n\n  const endRequestAndCallback = function (err, req, type, _bytes) {\n    req.abort();\n    finished = true;\n    return cb(err, req, type, _bytes);\n  };\n\n  const progressListener = function (error, request) {\n    if (finished) {\n      return;\n    }\n\n    if (error) {\n      return endRequestAndCallback(error, request, '', bytes);\n    } // grap the new part of content that was just downloaded\n\n\n    const 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, () => endRequestAndCallback(error, request, '', bytes));\n    }\n\n    const 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, () => endRequestAndCallback(error, request, '', bytes));\n    } // this may be an unsynced ts segment\n    // wait for 376 bytes before detecting no container\n\n\n    if (!type && bytes.length < 376) {\n      return callbackOnCompleted(request, () => endRequestAndCallback(error, request, '', bytes));\n    }\n\n    return endRequestAndCallback(null, request, type, bytes);\n  };\n\n  const options = {\n    uri,\n\n    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 ({\n        total,\n        loaded\n      }) {\n        return callbackWrapper(request, null, {\n          statusCode: request.status\n        }, progressListener);\n      });\n    }\n\n  };\n  const request = xhr(options, function (error, response) {\n    return callbackWrapper(request, error, response, progressListener);\n  });\n  return request;\n};\n\nconst {\n  EventTarget\n} = videojs;\n\nconst dashPlaylistUnchanged = function (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\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\n  if (a.segments && !b.segments || !a.segments && b.segments) {\n    return false;\n  } // neither has segments nothing changed\n\n\n  if (!a.segments && !b.segments) {\n    return true;\n  } // check segments themselves\n\n\n  for (let i = 0; i < a.segments.length; i++) {\n    const aSegment = a.segments[i];\n    const bSegment = b.segments[i]; // 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\n    if (!aSegment.byterange && !bSegment.byterange) {\n      continue;\n    }\n\n    const aByterange = aSegment.byterange;\n    const 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\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\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\n\nconst dashGroupId = (type, group, label, playlist) => {\n  // If the manifest somehow does not have an ID (non-dash compliant), use the label.\n  const playlistId = playlist.attributes.NAME || label;\n  return `placeholder-uri-${type}-${group}-${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\n\nconst parseMainXml = ({\n  mainXml,\n  srcUrl,\n  clientOffset,\n  sidxMapping,\n  previousManifest\n}) => {\n  const manifest = parse(mainXml, {\n    manifestUri: srcUrl,\n    clientOffset,\n    sidxMapping,\n    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\nconst removeOldMediaGroupLabels = (update, newMain) => {\n  forEachMediaGroup(update, (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\n\nconst updateMain = (oldMain, newMain, sidxMapping) => {\n  let noChanges = true;\n  let 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 (let i = 0; i < newMain.playlists.length; i++) {\n    const playlist = newMain.playlists[i];\n\n    if (playlist.sidx) {\n      const 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\n    const playlistUpdate = updateMain$1(update, playlist, dashPlaylistUnchanged);\n\n    if (playlistUpdate) {\n      update = playlistUpdate;\n      noChanges = false;\n    }\n  } // Then update media group playlists\n\n\n  forEachMediaGroup(newMain, (properties, type, group, label) => {\n    if (properties.playlists && properties.playlists.length) {\n      const id = properties.playlists[0].id;\n      const playlistUpdate = updateMain$1(update, properties.playlists[0], dashPlaylistUnchanged);\n\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\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\n  if (newMain.minimumUpdatePeriod !== oldMain.minimumUpdatePeriod) {\n    noChanges = false;\n  }\n\n  if (noChanges) {\n    return null;\n  }\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\nconst equivalentSidx = (a, b) => {\n  const neitherMap = Boolean(!a.map && !b.map);\n  const 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\n\nconst compareSidxEntry = (playlists, oldSidxMapping) => {\n  const newSidxMapping = {};\n\n  for (const id in playlists) {\n    const playlist = playlists[id];\n    const currentSidxInfo = playlist.sidx;\n\n    if (currentSidxInfo) {\n      const key = generateSidxKey(currentSidxInfo);\n\n      if (!oldSidxMapping[key]) {\n        break;\n      }\n\n      const savedSidxInfo = oldSidxMapping[key].sidxInfo;\n\n      if (equivalentSidx(savedSidxInfo, currentSidxInfo)) {\n        newSidxMapping[key] = oldSidxMapping[key];\n      }\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\nconst filterChangedSidxMappings = (main, oldSidxMapping) => {\n  const videoSidx = compareSidxEntry(main.playlists, oldSidxMapping);\n  let mediaGroupSidx = videoSidx;\n  forEachMediaGroup(main, (properties, mediaType, groupKey, labelKey) => {\n    if (properties.playlists && properties.playlists.length) {\n      const playlists = properties.playlists;\n      mediaGroupSidx = merge(mediaGroupSidx, compareSidxEntry(playlists, oldSidxMapping));\n    }\n  });\n  return mediaGroupSidx;\n};\nclass DashPlaylistLoader extends EventTarget {\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  constructor(srcUrlOrPlaylist, vhs, options = {}, mainPlaylistLoader) {\n    super();\n    this.mainPlaylistLoader_ = mainPlaylistLoader || this;\n\n    if (!mainPlaylistLoader) {\n      this.isMain_ = true;\n    }\n\n    const {\n      withCredentials = false\n    } = options;\n    this.vhs_ = vhs;\n    this.withCredentials = withCredentials;\n    this.addMetadataToTextTrack = options.addMetadataToTextTrack;\n\n    if (!srcUrlOrPlaylist) {\n      throw new Error('A non-empty playlist URL or object is required');\n    } // event naming?\n\n\n    this.on('minimumUpdatePeriod', () => {\n      this.refreshXml_();\n    }); // live playlist staleness timeout\n\n    this.on('mediaupdatetimeout', () => {\n      this.refreshMedia_(this.media().id);\n    });\n    this.state = 'HAVE_NOTHING';\n    this.loadedPlaylists_ = {};\n    this.logger_ = logger('DashPlaylistLoader'); // initialize the loader state\n    // The mainPlaylistLoader will be created with a string\n\n    if (this.isMain_) {\n      this.mainPlaylistLoader_.srcUrl = srcUrlOrPlaylist; // TODO: reset sidxMapping between period changes\n      // once multi-period is refactored\n\n      this.mainPlaylistLoader_.sidxMapping_ = {};\n    } else {\n      this.childPlaylist_ = srcUrlOrPlaylist;\n    }\n  }\n\n  requestErrored_(err, request, startingState) {\n    // disposed\n    if (!this.request) {\n      return true;\n    } // pending request is cleared\n\n\n    this.request = null;\n\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\n      if (startingState) {\n        this.state = startingState;\n      }\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\n  addSidxSegments_(playlist, startingState, cb) {\n    const 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(() => cb(false), 0);\n      return;\n    } // resolve the segment URL relative to the playlist\n\n\n    const uri = resolveManifestRedirect(playlist.sidx.resolvedUri);\n\n    const fin = (err, request) => {\n      if (this.requestErrored_(err, request, startingState)) {\n        return;\n      }\n\n      const sidxMapping = this.mainPlaylistLoader_.sidxMapping_;\n      let sidx;\n\n      try {\n        sidx = parseSidx(toUint8(request.response).subarray(8));\n      } catch (e) {\n        // sidx parsing failed.\n        this.requestErrored_(e, request, startingState);\n        return;\n      }\n\n      sidxMapping[sidxKey] = {\n        sidxInfo: playlist.sidx,\n        sidx\n      };\n      addSidxSegmentsToPlaylist(playlist, sidx, playlist.sidx.resolvedUri);\n      return cb(true);\n    };\n\n    this.request = containerRequest(uri, this.vhs_.xhr, (err, request, container, bytes) => {\n      if (err) {\n        return fin(err, request);\n      }\n\n      if (!container || container !== 'mp4') {\n        return fin({\n          status: request.status,\n          message: `Unsupported ${container || 'unknown'} container type for sidx segment at URL: ${uri}`,\n          // response is just bytes in this case\n          // but we really don't want to return that.\n          response: '',\n          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\n      const {\n        offset,\n        length\n      } = playlist.sidx.byterange;\n\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\n      this.request = this.vhs_.xhr({\n        uri,\n        responseType: 'arraybuffer',\n        headers: segmentXhrHeaders({\n          byterange: playlist.sidx.byterange\n        })\n      }, fin);\n    });\n  }\n\n  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\n    if (this.mainPlaylistLoader_.createMupOnMedia_) {\n      this.off('loadedmetadata', this.mainPlaylistLoader_.createMupOnMedia_);\n      this.mainPlaylistLoader_.createMupOnMedia_ = null;\n    }\n\n    this.off();\n  }\n\n  hasPendingRequest() {\n    return this.request || this.mediaRequest_;\n  }\n\n  stopRequest() {\n    if (this.request) {\n      const oldRequest = this.request;\n      this.request = null;\n      oldRequest.onreadystatechange = null;\n      oldRequest.abort();\n    }\n  }\n\n  media(playlist) {\n    // getter\n    if (!playlist) {\n      return this.media_;\n    } // setter\n\n\n    if (this.state === 'HAVE_NOTHING') {\n      throw new Error('Cannot switch media playlist from ' + this.state);\n    }\n\n    const 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\n      playlist = this.mainPlaylistLoader_.main.playlists[playlist];\n    }\n\n    const 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\n      return;\n    } // switching to the active playlist is a no-op\n\n\n    if (!mediaChange) {\n      return;\n    } // switching from an already loaded playlist\n\n\n    if (this.media_) {\n      this.trigger('mediachanging');\n    }\n\n    this.addSidxSegments_(playlist, startingState, sidxChanged => {\n      // everything is ready just continue to haveMetadata\n      this.haveMetadata({\n        startingState,\n        playlist\n      });\n    });\n  }\n\n  haveMetadata({\n    startingState,\n    playlist\n  }) {\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  pause() {\n    if (this.mainPlaylistLoader_.createMupOnMedia_) {\n      this.off('loadedmetadata', this.mainPlaylistLoader_.createMupOnMedia_);\n      this.mainPlaylistLoader_.createMupOnMedia_ = null;\n    }\n\n    this.stopRequest();\n    window$1.clearTimeout(this.mediaUpdateTimeout);\n    this.mediaUpdateTimeout = null;\n\n    if (this.isMain_) {\n      window$1.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_);\n      this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_ = null;\n    }\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  load(isFinalRendition) {\n    window$1.clearTimeout(this.mediaUpdateTimeout);\n    this.mediaUpdateTimeout = null;\n    const media = this.media();\n\n    if (isFinalRendition) {\n      const delay = media ? media.targetDuration / 2 * 1000 : 5 * 1000;\n      this.mediaUpdateTimeout = window$1.setTimeout(() => this.load(), 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\n    if (!this.started) {\n      this.start();\n      return;\n    }\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\n      this.trigger('mediaupdatetimeout');\n    } else {\n      this.trigger('loadedplaylist');\n    }\n  }\n\n  start() {\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(() => this.haveMain_(), 0);\n      return;\n    }\n\n    this.requestMain_((req, mainChanged) => {\n      this.haveMain_();\n\n      if (!this.hasPendingRequest() && !this.media_) {\n        this.media(this.mainPlaylistLoader_.main.playlists[0]);\n      }\n    });\n  }\n\n  requestMain_(cb) {\n    this.request = this.vhs_.xhr({\n      uri: this.mainPlaylistLoader_.srcUrl,\n      withCredentials: this.withCredentials\n    }, (error, req) => {\n      if (this.requestErrored_(error, req)) {\n        if (this.state === 'HAVE_NOTHING') {\n          this.started = false;\n        }\n\n        return;\n      }\n\n      const mainChanged = req.responseText !== this.mainPlaylistLoader_.mainXml_;\n      this.mainPlaylistLoader_.mainXml_ = req.responseText;\n\n      if (req.responseHeaders && req.responseHeaders.date) {\n        this.mainLoaded_ = Date.parse(req.responseHeaders.date);\n      } else {\n        this.mainLoaded_ = Date.now();\n      }\n\n      this.mainPlaylistLoader_.srcUrl = resolveManifestRedirect(this.mainPlaylistLoader_.srcUrl, req);\n\n      if (mainChanged) {\n        this.handleMain_();\n        this.syncClientServerClock_(() => {\n          return cb(req, mainChanged);\n        });\n        return;\n      }\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\n  syncClientServerClock_(done) {\n    const 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\n    if (utcTiming.method === 'DIRECT') {\n      this.mainPlaylistLoader_.clientOffset_ = utcTiming.value - Date.now();\n      return done();\n    }\n\n    this.request = this.vhs_.xhr({\n      uri: resolveUrl(this.mainPlaylistLoader_.srcUrl, utcTiming.value),\n      method: utcTiming.method,\n      withCredentials: this.withCredentials\n    }, (error, req) => {\n      // disposed\n      if (!this.request) {\n        return;\n      }\n\n      if (error) {\n        // sync request failed, fall back to using date header from mpd\n        // TODO: log warning\n        this.mainPlaylistLoader_.clientOffset_ = this.mainLoaded_ - Date.now();\n        return done();\n      }\n\n      let serverTime;\n\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 = this.mainLoaded_;\n        } else {\n          serverTime = Date.parse(req.responseHeaders.date);\n        }\n      } else {\n        serverTime = Date.parse(req.responseText);\n      }\n\n      this.mainPlaylistLoader_.clientOffset_ = serverTime - Date.now();\n      done();\n    });\n  }\n\n  haveMain_() {\n    this.state = 'HAVE_MAIN_MANIFEST';\n\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  handleMain_() {\n    // clear media request\n    this.mediaRequest_ = null;\n    const oldMain = this.mainPlaylistLoader_.main;\n    let 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\n    this.mainPlaylistLoader_.main = newMain ? newMain : oldMain;\n    const location = this.mainPlaylistLoader_.main.locations && this.mainPlaylistLoader_.main.locations[0];\n\n    if (location && location !== this.mainPlaylistLoader_.srcUrl) {\n      this.mainPlaylistLoader_.srcUrl = location;\n    }\n\n    if (!oldMain || newMain && newMain.minimumUpdatePeriod !== oldMain.minimumUpdatePeriod) {\n      this.updateMinimumUpdatePeriodTimeout_();\n    }\n\n    this.addEventStreamToMetadataTrack_(newMain);\n    return Boolean(newMain);\n  }\n\n  updateMinimumUpdatePeriodTimeout_() {\n    const 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\n    if (mpl.minimumUpdatePeriodTimeout_) {\n      window$1.clearTimeout(mpl.minimumUpdatePeriodTimeout_);\n      mpl.minimumUpdatePeriodTimeout_ = null;\n    }\n\n    let 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\n    if (typeof mup !== 'number' || mup <= 0) {\n      if (mup < 0) {\n        this.logger_(`found invalid minimumUpdatePeriod of ${mup}, not setting a timeout`);\n      }\n\n      return;\n    }\n\n    this.createMUPTimeout_(mup);\n  }\n\n  createMUPTimeout_(mup) {\n    const mpl = this.mainPlaylistLoader_;\n    mpl.minimumUpdatePeriodTimeout_ = window$1.setTimeout(() => {\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\n  refreshXml_() {\n    this.requestMain_((req, mainChanged) => {\n      if (!mainChanged) {\n        return;\n      }\n\n      if (this.media_) {\n        this.media_ = this.mainPlaylistLoader_.main.playlists[this.media_.id];\n      } // This will filter out updated sidx info from the mapping\n\n\n      this.mainPlaylistLoader_.sidxMapping_ = filterChangedSidxMappings(this.mainPlaylistLoader_.main, this.mainPlaylistLoader_.sidxMapping_);\n      this.addSidxSegments_(this.media(), this.state, sidxChanged => {\n        // TODO: do we need to reload the current playlist?\n        this.refreshMedia_(this.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\n  refreshMedia_(mediaID) {\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\n    if (this.media_ && this.isMain_) {\n      this.handleMain_();\n    }\n\n    const playlists = this.mainPlaylistLoader_.main.playlists;\n    const mediaChanged = !this.media_ || this.media_ !== playlists[mediaID];\n\n    if (mediaChanged) {\n      this.media_ = playlists[mediaID];\n    } else {\n      this.trigger('playlistunchanged');\n    }\n\n    if (!this.mediaUpdateTimeout) {\n      const createMediaUpdateTimeout = () => {\n        if (this.media().endList) {\n          return;\n        }\n\n        this.mediaUpdateTimeout = window$1.setTimeout(() => {\n          this.trigger('mediaupdatetimeout');\n          createMediaUpdateTimeout();\n        }, refreshDelay(this.media(), Boolean(mediaChanged)));\n      };\n\n      createMediaUpdateTimeout();\n    }\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\n  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      const metadataArray = this.mainPlaylistLoader_.main.eventStream.map(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   * Returns the key ID set from a playlist\n   *\n   * @param {playlist} playlist to fetch the key ID set from.\n   * @return a Set of 32 digit hex strings that represent the unique keyIds for that playlist.\n   */\n\n\n  getKeyIdSet(playlist) {\n    if (playlist.contentProtection) {\n      const keyIds = new Set();\n\n      for (const keysystem in playlist.contentProtection) {\n        const defaultKID = playlist.contentProtection[keysystem].attributes['cenc:default_KID'];\n\n        if (defaultKID) {\n          // DASH keyIds are separated by dashes.\n          keyIds.add(defaultKID.replace(/-/g, '').toLowerCase());\n        }\n      }\n\n      return keyIds;\n    }\n  }\n\n}\n\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};\n\nconst stringToArrayBuffer = string => {\n  const view = new Uint8Array(new ArrayBuffer(string.length));\n\n  for (let i = 0; i < string.length; i++) {\n    view[i] = string.charCodeAt(i);\n  }\n\n  return view.buffer;\n};\n\n/* global Blob, BlobBuilder, Worker */\n// unify worker interface\nconst browserWorkerPolyFill = function (workerObj) {\n  // node only supports on/off\n  workerObj.on = workerObj.addEventListener;\n  workerObj.off = workerObj.removeEventListener;\n  return workerObj;\n};\n\nconst createObjectURL = function (str) {\n  try {\n    return URL.createObjectURL(new Blob([str], {\n      type: 'application/javascript'\n    }));\n  } catch (e) {\n    const blob = new BlobBuilder();\n    blob.append(str);\n    return URL.createObjectURL(blob.getBlob());\n  }\n};\n\nconst factory = function (code) {\n  return function () {\n    const objectUrl = createObjectURL(code);\n    const worker = browserWorkerPolyFill(new Worker(objectUrl));\n    worker.objURL = objectUrl;\n    const terminate = worker.terminate;\n    worker.on = worker.addEventListener;\n    worker.off = worker.removeEventListener;\n\n    worker.terminate = function () {\n      URL.revokeObjectURL(objectUrl);\n      return terminate.call(this);\n    };\n\n    return worker;\n  };\n};\nconst transform = function (code) {\n  return `var browserWorkerPolyFill = ${browserWorkerPolyFill.toString()};\\n` + 'browserWorkerPolyFill(self);\\n' + code;\n};\n\nconst getWorkerString = function (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 */\nconst workerCode$1 = transform(getWorkerString(function () {\n\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 () {\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\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\n      this.off = function (type, listener) {\n        var index;\n\n        if (!listeners[type]) {\n          return false;\n        }\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\n      this.trigger = function (type) {\n        var callbacks, i, length, args;\n        callbacks = listeners[type];\n\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\n        if (arguments.length === 2) {\n          length = callbacks.length;\n\n          for (i = 0; i < length; ++i) {\n            callbacks[i].call(this, arguments[1]);\n          }\n        } else {\n          args = [];\n          i = arguments.length;\n\n          for (i = 1; i < arguments.length; ++i) {\n            args.push(arguments[i]);\n          }\n\n          length = callbacks.length;\n\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\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\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\n  Stream$8.prototype.push = function (data) {\n    this.trigger('data', data);\n  };\n\n  Stream$8.prototype.flush = function (flushSource) {\n    this.trigger('done', flushSource);\n  };\n\n  Stream$8.prototype.partialFlush = function (flushSource) {\n    this.trigger('partialdone', flushSource);\n  };\n\n  Stream$8.prototype.endTimeline = function (flushSource) {\n    this.trigger('endedtimeline', flushSource);\n  };\n\n  Stream$8.prototype.reset = function (flushSource) {\n    this.trigger('reset', flushSource);\n  };\n\n  var stream = Stream$8;\n  var MAX_UINT32$1 = Math.pow(2, 32);\n\n  var getUint64$3 = function (uint8) {\n    var dv = new DataView(uint8.buffer, uint8.byteOffset, uint8.byteLength);\n    var value;\n\n    if (dv.getBigUint64) {\n      value = dv.getBigUint64(0);\n\n      if (value < Number.MAX_SAFE_INTEGER) {\n        return Number(value);\n      }\n\n      return value;\n    }\n\n    return dv.getUint32(0) * MAX_UINT32$1 + dv.getUint32(4);\n  };\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\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\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, // version 0\n    0x00, 0x00, 0x00, // flags\n    0x00, 0x00, 0x00, 0x00, // pre_defined\n    0x76, 0x69, 0x64, 0x65, // handler_type: 'vide'\n    0x00, 0x00, 0x00, 0x00, // reserved\n    0x00, 0x00, 0x00, 0x00, // reserved\n    0x00, 0x00, 0x00, 0x00, // reserved\n    0x56, 0x69, 0x64, 0x65, 0x6f, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x00 // name: 'VideoHandler'\n    ]);\n    AUDIO_HDLR = new Uint8Array([0x00, // version 0\n    0x00, 0x00, 0x00, // flags\n    0x00, 0x00, 0x00, 0x00, // pre_defined\n    0x73, 0x6f, 0x75, 0x6e, // handler_type: 'soun'\n    0x00, 0x00, 0x00, 0x00, // reserved\n    0x00, 0x00, 0x00, 0x00, // reserved\n    0x00, 0x00, 0x00, 0x00, // 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, // version 0\n    0x00, 0x00, 0x00, // flags\n    0x00, 0x00, 0x00, 0x01, // entry_count\n    0x00, 0x00, 0x00, 0x0c, // entry_size\n    0x75, 0x72, 0x6c, 0x20, // 'url' type\n    0x00, // version 0\n    0x00, 0x00, 0x01 // entry_flags\n    ]);\n    SMHD = new Uint8Array([0x00, // version\n    0x00, 0x00, 0x00, // flags\n    0x00, 0x00, // balance, 0 means centered\n    0x00, 0x00 // reserved\n    ]);\n    STCO = new Uint8Array([0x00, // version\n    0x00, 0x00, 0x00, // flags\n    0x00, 0x00, 0x00, 0x00 // entry_count\n    ]);\n    STSC = STCO;\n    STSZ = new Uint8Array([0x00, // version\n    0x00, 0x00, 0x00, // flags\n    0x00, 0x00, 0x00, 0x00, // sample_size\n    0x00, 0x00, 0x00, 0x00 // sample_count\n    ]);\n    STTS = STCO;\n    VMHD = new Uint8Array([0x00, // version\n    0x00, 0x00, 0x01, // flags\n    0x00, 0x00, // graphicsmode\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // opcolor\n    ]);\n  })();\n\n  box = function (type) {\n    var payload = [],\n        size = 0,\n        i,\n        result,\n        view;\n\n    for (i = 1; i < arguments.length; i++) {\n      payload.push(arguments[i]);\n    }\n\n    i = payload.length; // calculate the total size we need to allocate\n\n    while (i--) {\n      size += payload[i].byteLength;\n    }\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\n    return result;\n  };\n\n  dinf = function () {\n    return box(types.dinf, box(types.dref, DREF));\n  };\n\n  esds = function (track) {\n    return box(types.esds, new Uint8Array([0x00, // version\n    0x00, 0x00, 0x00, // flags\n    // ES_Descriptor\n    0x03, // tag, ES_DescrTag\n    0x19, // length\n    0x00, 0x00, // ES_ID\n    0x00, // streamDependenceFlag, URL_flag, reserved, streamPriority\n    // DecoderConfigDescriptor\n    0x04, // tag, DecoderConfigDescrTag\n    0x11, // length\n    0x40, // object type\n    0x15, // streamType\n    0x00, 0x06, 0x00, // bufferSizeDB\n    0x00, 0x00, 0xda, 0xc0, // maxBitrate\n    0x00, 0x00, 0xda, 0xc0, // avgBitrate\n    // DecoderSpecificInfo\n    0x05, // tag, DecoderSpecificInfoTag\n    0x02, // 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\n  ftyp = function () {\n    return box(types.ftyp, MAJOR_BRAND, MINOR_VERSION, MAJOR_BRAND, AVC1_BRAND);\n  };\n\n  hdlr = function (type) {\n    return box(types.hdlr, HDLR_TYPES[type]);\n  };\n\n  mdat = function (data) {\n    return box(types.mdat, data);\n  };\n\n  mdhd = function (track) {\n    var result = new Uint8Array([0x00, // version 0\n    0x00, 0x00, 0x00, // flags\n    0x00, 0x00, 0x00, 0x02, // creation_time\n    0x00, 0x00, 0x00, 0x03, // modification_time\n    0x00, 0x01, 0x5f, 0x90, // timescale, 90,000 \"ticks\" per second\n    track.duration >>> 24 & 0xFF, track.duration >>> 16 & 0xFF, track.duration >>> 8 & 0xFF, track.duration & 0xFF, // duration\n    0x55, 0xc4, // '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\n    return box(types.mdhd, result);\n  };\n\n  mdia = function (track) {\n    return box(types.mdia, mdhd(track), hdlr(track.type), minf(track));\n  };\n\n  mfhd = function (sequenceNumber) {\n    return box(types.mfhd, new Uint8Array([0x00, 0x00, 0x00, 0x00, // flags\n    (sequenceNumber & 0xFF000000) >> 24, (sequenceNumber & 0xFF0000) >> 16, (sequenceNumber & 0xFF00) >> 8, sequenceNumber & 0xFF // sequence_number\n    ]));\n  };\n\n  minf = function (track) {\n    return box(types.minf, track.type === 'video' ? box(types.vmhd, VMHD) : box(types.smhd, SMHD), dinf(), stbl(track));\n  };\n\n  moof = function (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\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\n  moov = function (tracks) {\n    var i = tracks.length,\n        boxes = [];\n\n    while (i--) {\n      boxes[i] = trak(tracks[i]);\n    }\n\n    return box.apply(null, [types.moov, mvhd(0xffffffff)].concat(boxes).concat(mvex(tracks)));\n  };\n\n  mvex = function (tracks) {\n    var i = tracks.length,\n        boxes = [];\n\n    while (i--) {\n      boxes[i] = trex(tracks[i]);\n    }\n\n    return box.apply(null, [types.mvex].concat(boxes));\n  };\n\n  mvhd = function (duration) {\n    var bytes = new Uint8Array([0x00, // version 0\n    0x00, 0x00, 0x00, // flags\n    0x00, 0x00, 0x00, 0x01, // creation_time\n    0x00, 0x00, 0x00, 0x02, // modification_time\n    0x00, 0x01, 0x5f, 0x90, // timescale, 90,000 \"ticks\" per second\n    (duration & 0xFF000000) >> 24, (duration & 0xFF0000) >> 16, (duration & 0xFF00) >> 8, duration & 0xFF, // duration\n    0x00, 0x01, 0x00, 0x00, // 1.0 rate\n    0x01, 0x00, // 1.0 volume\n    0x00, 0x00, // reserved\n    0x00, 0x00, 0x00, 0x00, // reserved\n    0x00, 0x00, 0x00, 0x00, // 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, // 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, // pre_defined\n    0xff, 0xff, 0xff, 0xff // next_track_ID\n    ]);\n    return box(types.mvhd, bytes);\n  };\n\n  sdtp = function (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\n    return box(types.sdtp, bytes);\n  };\n\n  stbl = function (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\n  (function () {\n    var videoSample, audioSample;\n\n    stsd = function (track) {\n      return box(types.stsd, new Uint8Array([0x00, // version 0\n      0x00, 0x00, 0x00, // flags\n      0x00, 0x00, 0x00, 0x01]), track.type === 'video' ? videoSample(track) : audioSample(track));\n    };\n\n    videoSample = function (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\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\n      avc1Box = [types.avc1, new Uint8Array([0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // reserved\n      0x00, 0x01, // data_reference_index\n      0x00, 0x00, // pre_defined\n      0x00, 0x00, // reserved\n      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // pre_defined\n      (track.width & 0xff00) >> 8, track.width & 0xff, // width\n      (track.height & 0xff00) >> 8, track.height & 0xff, // height\n      0x00, 0x48, 0x00, 0x00, // horizresolution\n      0x00, 0x48, 0x00, 0x00, // vertresolution\n      0x00, 0x00, 0x00, 0x00, // reserved\n      0x00, 0x01, // 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, // compressorname\n      0x00, 0x18, // depth = 24\n      0x11, 0x11 // pre_defined = -1\n      ]), box(types.avcC, new Uint8Array([0x01, // configurationVersion\n      track.profileIdc, // AVCProfileIndication\n      track.profileCompatibility, // profile_compatibility\n      track.levelIdc, // AVCLevelIndication\n      0xff // lengthSizeMinusOne, hard-coded to 4 bytes\n      ].concat([sps.length], // numOfSequenceParameterSets\n      sequenceParameterSets, // \"SPS\"\n      [pps.length], // numOfPictureParameterSets\n      pictureParameterSets // \"PPS\"\n      ))), box(types.btrt, new Uint8Array([0x00, 0x1c, 0x9c, 0x80, // bufferSizeDB\n      0x00, 0x2d, 0xc6, 0xc0, // maxBitrate\n      0x00, 0x2d, 0xc6, 0xc0 // avgBitrate\n      ]))];\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\n      return box.apply(null, avc1Box);\n    };\n\n    audioSample = function (track) {\n      return box(types.mp4a, new Uint8Array([// SampleEntry, ISO/IEC 14496-12\n      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // reserved\n      0x00, 0x01, // data_reference_index\n      // AudioSampleEntry, ISO/IEC 14496-12\n      0x00, 0x00, 0x00, 0x00, // reserved\n      0x00, 0x00, 0x00, 0x00, // reserved\n      (track.channelcount & 0xff00) >> 8, track.channelcount & 0xff, // channelcount\n      (track.samplesize & 0xff00) >> 8, track.samplesize & 0xff, // samplesize\n      0x00, 0x00, // pre_defined\n      0x00, 0x00, // 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\n  tkhd = function (track) {\n    var result = new Uint8Array([0x00, // version 0\n    0x00, 0x00, 0x07, // flags\n    0x00, 0x00, 0x00, 0x00, // creation_time\n    0x00, 0x00, 0x00, 0x00, // modification_time\n    (track.id & 0xFF000000) >> 24, (track.id & 0xFF0000) >> 16, (track.id & 0xFF00) >> 8, track.id & 0xFF, // track_ID\n    0x00, 0x00, 0x00, 0x00, // reserved\n    (track.duration & 0xFF000000) >> 24, (track.duration & 0xFF0000) >> 16, (track.duration & 0xFF00) >> 8, track.duration & 0xFF, // duration\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // reserved\n    0x00, 0x00, // layer\n    0x00, 0x00, // alternate_group\n    0x01, 0x00, // non-audio track volume\n    0x00, 0x00, // 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, // transformation: unity matrix\n    (track.width & 0xFF00) >> 8, track.width & 0xFF, 0x00, 0x00, // 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\n  traf = function (track) {\n    var trackFragmentHeader, trackFragmentDecodeTime, trackFragmentRun, sampleDependencyTable, dataOffset, upperWordBaseMediaDecodeTime, lowerWordBaseMediaDecodeTime;\n    trackFragmentHeader = box(types.tfhd, new Uint8Array([0x00, // version 0\n    0x00, 0x00, 0x3a, // flags\n    (track.id & 0xFF000000) >> 24, (track.id & 0xFF0000) >> 16, (track.id & 0xFF00) >> 8, track.id & 0xFF, // track_ID\n    0x00, 0x00, 0x00, 0x01, // sample_description_index\n    0x00, 0x00, 0x00, 0x00, // default_sample_duration\n    0x00, 0x00, 0x00, 0x00, // 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, // version 1\n    0x00, 0x00, 0x00, // 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 + // tfhd\n    20 + // tfdt\n    8 + // traf header\n    16 + // mfhd\n    8 + // 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\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\n  trak = function (track) {\n    track.duration = track.duration || 0xffffffff;\n    return box(types.trak, tkhd(track), mdia(track));\n  };\n\n  trex = function (track) {\n    var result = new Uint8Array([0x00, // version 0\n    0x00, 0x00, 0x00, // flags\n    (track.id & 0xFF000000) >> 24, (track.id & 0xFF0000) >> 16, (track.id & 0xFF00) >> 8, track.id & 0xFF, // track_ID\n    0x00, 0x00, 0x00, 0x01, // default_sample_description_index\n    0x00, 0x00, 0x00, 0x00, // default_sample_duration\n    0x00, 0x00, 0x00, 0x00, // 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\n    return box(types.trex, result);\n  };\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 (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\n        if (samples[0].size !== undefined) {\n          sizePresent = 0x2;\n        }\n\n        if (samples[0].flags !== undefined) {\n          flagsPresent = 0x4;\n        }\n\n        if (samples[0].compositionTimeOffset !== undefined) {\n          compositionTimeOffset = 0x8;\n        }\n      }\n\n      return [0x00, // version 0\n      0x00, durationPresent | sizePresent | flagsPresent | compositionTimeOffset, 0x01, // flags\n      (samples.length & 0xFF000000) >>> 24, (samples.length & 0xFF0000) >>> 16, (samples.length & 0xFF00) >>> 8, samples.length & 0xFF, // sample_count\n      (offset & 0xFF000000) >>> 24, (offset & 0xFF0000) >>> 16, (offset & 0xFF00) >>> 8, offset & 0xFF // data_offset\n      ];\n    };\n\n    videoTrun = function (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\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\n      return box(types.trun, bytes);\n    };\n\n    audioTrun = function (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\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\n      return box(types.trun, bytes);\n    };\n\n    trun$1 = function (track, offset) {\n      if (track.type === 'audio') {\n        return audioTrun(track, offset);\n      }\n\n      return videoTrun(track, offset);\n    };\n  })();\n\n  var mp4Generator = {\n    ftyp: ftyp,\n    mdat: mdat,\n    moof: moof,\n    moov: moov,\n    initSegment: function (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 (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\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\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\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\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\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\n  var groupFramesIntoGops = function (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\n    for (i = 0; i < frames.length; i++) {\n      currentFrame = frames[i];\n\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\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\n    if (gops.length && currentGop.duration <= 0) {\n      currentGop.duration = gops[gops.length - 1].duration;\n    }\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\n  var extendFirstKeyFrame = function (gops) {\n    var currentGop;\n\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\n    return gops;\n  };\n  /**\n   * Default sample object\n   * see ISO/IEC 14496-12:2012, section 8.6.4.3\n   */\n\n\n  var createDefaultSample = function () {\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\n  var sampleForFrame = function (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\n    if (frame.keyFrame) {\n      sample.flags.dependsOn = 2;\n      sample.flags.isNonSyncSample = 0;\n    }\n\n    return sample;\n  }; // generate the track's sample table from an array of gops\n\n\n  var generateSampleTable$1 = function (gops, baseDataOffset) {\n    var h,\n        i,\n        sample,\n        currentGop,\n        currentFrame,\n        dataOffset = baseDataOffset || 0,\n        samples = [];\n\n    for (h = 0; h < gops.length; h++) {\n      currentGop = gops[h];\n\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\n    return samples;\n  }; // generate the track's raw mdat data from an array of gops\n\n\n  var concatenateNalData = function (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\n    return data;\n  }; // generate the track's sample table from a frame\n\n\n  var generateSampleTableForFrame = function (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\n  var concatenateNalDataForFrame = function (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\n    return data;\n  };\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\n  var zeroFill = function (count) {\n    var a = [];\n\n    while (count--) {\n      a.push(0);\n    }\n\n    return a;\n  };\n\n  var makeTable = function (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\n  var silence;\n\n  var silence_1 = function () {\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\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\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\n  secondsToVideoTs = function (seconds) {\n    return seconds * ONE_SECOND_IN_TS$4;\n  };\n\n  secondsToAudioTs = function (seconds, sampleRate) {\n    return seconds * sampleRate;\n  };\n\n  videoTsToSeconds = function (timestamp) {\n    return timestamp / ONE_SECOND_IN_TS$4;\n  };\n\n  audioTsToSeconds = function (timestamp, sampleRate) {\n    return timestamp / sampleRate;\n  };\n\n  audioTsToVideoTs = function (timestamp, sampleRate) {\n    return secondsToVideoTs(audioTsToSeconds(timestamp, sampleRate));\n  };\n\n  videoTsToAudioTs = function (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\n  metadataTsToSeconds = function (timestamp, timelineStartPts, keepOriginalTimestamps) {\n    return videoTsToSeconds(keepOriginalTimestamps ? timestamp : timestamp - timelineStartPts);\n  };\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 (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\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\n  var prefixWithSilence = function (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\n    if (!frames.length) {\n      return;\n    }\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\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\n    if (audioFillFrameCount < 1 || audioFillDuration > clock$1.ONE_SECOND_IN_TS / 2) {\n      return;\n    }\n\n    silentFrame = coneOfSilence()[track.samplerate];\n\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\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\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\n  var trimAdtsFramesByEarliestDts = function (adtsFrames, track, earliestAllowedDts) {\n    if (track.minSegmentDts >= earliestAllowedDts) {\n      return adtsFrames;\n    } // We will need to recalculate the earliest segment Dts\n\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\n      return false;\n    });\n  }; // generate the track's raw mdat data from an array of frames\n\n\n  var generateSampleTable = function (frames) {\n    var i,\n        currentFrame,\n        samples = [];\n\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    }\n\n    return samples;\n  }; // generate the track's sample table from an array of frames\n\n\n  var concatenateFrameData = function (frames) {\n    var i,\n        currentFrame,\n        dataOffset = 0,\n        data = new Uint8Array(sumFrameByteLengths(frames));\n\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\n    return data;\n  };\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 (track, data) {\n    if (typeof data.pts === 'number') {\n      if (track.timelineStartInfo.pts === undefined) {\n        track.timelineStartInfo.pts = data.pts;\n      }\n\n      if (track.minSegmentPts === undefined) {\n        track.minSegmentPts = data.pts;\n      } else {\n        track.minSegmentPts = Math.min(track.minSegmentPts, data.pts);\n      }\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\n    if (typeof data.dts === 'number') {\n      if (track.timelineStartInfo.dts === undefined) {\n        track.timelineStartInfo.dts = data.dts;\n      }\n\n      if (track.minSegmentDts === undefined) {\n        track.minSegmentDts = data.dts;\n      } else {\n        track.minSegmentDts = Math.min(track.minSegmentDts, data.dts);\n      }\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\n  var clearDtsInfo = function (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\n  var calculateTrackBaseMediaDecodeTime = function (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\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\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\n    return baseMediaDecodeTime;\n  };\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 (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\n      while (bytes[i] === 0xFF) {\n        payloadType += 255;\n        i++;\n      }\n\n      payloadType += bytes[i++]; // Parse payload size\n\n      while (bytes[i] === 0xFF) {\n        payloadSize += 255;\n        i++;\n      }\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\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\n      i += payloadSize;\n      payloadType = 0;\n      payloadSize = 0;\n    }\n\n    return result;\n  }; // see ANSI/SCTE 128-1 (2013), section 8.1\n\n\n  var parseUserData = function (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\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\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\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\n    return sei.payload.subarray(8, sei.payload.length - 1);\n  }; // see CEA-708-D, section 4.4\n\n\n  var parseCaptionPackets = function (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\n    count = userData[0] & 0x1f;\n\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\n    return results;\n  };\n\n  var discardEmulationPreventionBytes$1 = function (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\n    if (emulationPreventionBytesPositions.length === 0) {\n      return data;\n    } // Create a new array to hold the NAL unit data\n\n\n    newLength = length - emulationPreventionBytesPositions.length;\n    newData = new Uint8Array(newLength);\n    var sourceIndex = 0;\n\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\n      newData[i] = data[sourceIndex];\n    }\n\n    return newData;\n  }; // exports\n\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\n  var CaptionStream$2 = function (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), // eslint-disable-line no-use-before-define\n    new Cea608Stream(0, 1), // eslint-disable-line no-use-before-define\n    new Cea608Stream(1, 0), // eslint-disable-line no-use-before-define\n    new Cea608Stream(1, 1) // eslint-disable-line no-use-before-define\n    ];\n\n    if (this.parse708captions_) {\n      this.cc708Stream_ = new Cea708Stream({\n        captionServices: options.captionServices\n      }); // eslint-disable-line no-use-before-define\n    }\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\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\n  CaptionStream$2.prototype = new Stream$7();\n\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\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\n    if (sei.payloadType !== cea708Parser.USER_DATA_REGISTERED_ITU_T_T35) {\n      return;\n    } // parse out the user data payload\n\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\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\n      if (!this.numSameDts_) {\n        // We've received the last duplicate packet, time to start processing again\n        this.ignoreNextEqualDts_ = false;\n      }\n\n      return;\n    } // parse out CC data packets and save them for later\n\n\n    newCaptionPackets = cea708Parser.parseCaptionPackets(event.pts, userData);\n    this.captionPackets_ = this.captionPackets_.concat(newCaptionPackets);\n\n    if (this.latestDts_ !== event.dts) {\n      this.numSameDts_ = 0;\n    }\n\n    this.numSameDts_++;\n    this.latestDts_ = event.dts;\n  };\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\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\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\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\n  CaptionStream$2.prototype.flush = function () {\n    return this.flushStream('flush');\n  }; // Only called if handling partial data\n\n\n  CaptionStream$2.prototype.partialFlush = function () {\n    return this.flushStream('partialFlush');\n  };\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\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\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\n    this.ccStreams_[(packet.type << 1) + this.activeCea608Channel_[packet.type]].push(packet);\n  };\n\n  CaptionStream$2.prototype.setsChannel1Active = function (packet) {\n    return (packet.ccData & 0x7800) === 0x1000;\n  };\n\n  CaptionStream$2.prototype.setsChannel2Active = function (packet) {\n    return (packet.ccData & 0x7800) === 0x1800;\n  };\n\n  CaptionStream$2.prototype.setsTextOrXDSActive = function (packet) {\n    return (packet.ccData & 0x7100) === 0x0100 || (packet.ccData & 0x78fe) === 0x102a || (packet.ccData & 0x78fe) === 0x182a;\n  };\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\n  var CHARACTER_TRANSLATION_708 = {\n    0x7f: 0x266a,\n    // \u266A\n    0x1020: 0x20,\n    // Transparent Space\n    0x1021: 0xa0,\n    // Nob-breaking Transparent Space\n    0x1025: 0x2026,\n    // \u2026\n    0x102a: 0x0160,\n    // \u0160\n    0x102c: 0x0152,\n    // \u0152\n    0x1030: 0x2588,\n    // \u2588\n    0x1031: 0x2018,\n    // \u2018\n    0x1032: 0x2019,\n    // \u2019\n    0x1033: 0x201c,\n    // \u201C\n    0x1034: 0x201d,\n    // \u201D\n    0x1035: 0x2022,\n    // \u2022\n    0x1039: 0x2122,\n    // \u2122\n    0x103a: 0x0161,\n    // \u0161\n    0x103c: 0x0153,\n    // \u0153\n    0x103d: 0x2120,\n    // \u2120\n    0x103f: 0x0178,\n    // \u0178\n    0x1076: 0x215b,\n    // \u215B\n    0x1077: 0x215c,\n    // \u215C\n    0x1078: 0x215d,\n    // \u215D\n    0x1079: 0x215e,\n    // \u215E\n    0x107a: 0x23d0,\n    // \u23D0\n    0x107b: 0x23a4,\n    // \u23A4\n    0x107c: 0x23a3,\n    // \u23A3\n    0x107d: 0x23af,\n    // \u23AF\n    0x107e: 0x23a6,\n    // \u23A6\n    0x107f: 0x23a1,\n    // \u23A1\n    0x10a0: 0x3138 // \u3138 (CC char)\n\n  };\n\n  var get708CharFromCode = function (code) {\n    var newCode = CHARACTER_TRANSLATION_708[code] || code;\n\n    if (code & 0x1000 && code === newCode) {\n      // Invalid extended code\n      return '';\n    }\n\n    return String.fromCharCode(newCode);\n  };\n\n  var within708TextBlock = function (b) {\n    return 0x20 <= b && b <= 0x7f || 0xa0 <= b && b <= 0xff;\n  };\n\n  var Cea708Window = function (windowNum) {\n    this.windowNum = windowNum;\n    this.reset();\n  };\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\n  Cea708Window.prototype.getText = function () {\n    return this.rows.join('\\n');\n  };\n\n  Cea708Window.prototype.clearText = function () {\n    this.rows = [''];\n    this.rowIdx = 0;\n  };\n\n  Cea708Window.prototype.newLine = function (pts) {\n    if (this.rows.length >= this.virtualRowCount && typeof this.beforeRowOverflow === 'function') {\n      this.beforeRowOverflow(pts);\n    }\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\n    while (this.rows.length > this.virtualRowCount) {\n      this.rows.shift();\n      this.rowIdx--;\n    }\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\n    return false;\n  };\n\n  Cea708Window.prototype.addText = function (text) {\n    this.rows[this.rowIdx] += text;\n  };\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\n  var Cea708Service = function (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\n  Cea708Service.prototype.init = function (pts, beforeRowOverflow) {\n    this.startPts = pts;\n\n    for (var win = 0; win < 8; win++) {\n      this.windows[win] = new Cea708Window(win);\n\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\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\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\n  var Cea708Stream = function (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(serviceName => {\n      serviceProps = captionServices[serviceName];\n\n      if (/^SERVICE/.test(serviceName)) {\n        captionServiceEncodings[serviceName] = serviceProps.encoding;\n      }\n    });\n    this.serviceEncodings = captionServiceEncodings;\n    this.current708Packet = null;\n    this.services = {};\n\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\n        self.add708Bytes(packet);\n      }\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\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\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\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\n      this.pushServiceBlock(serviceNum, i, blockSize);\n\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\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\n    if (!service) {\n      service = this.initService(serviceNum, i);\n    }\n\n    for (; i < start + size && i < packetData.length; i++) {\n      b = packetData[i];\n\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\n  Cea708Stream.prototype.extendedCommands = function (i, service) {\n    var packetData = this.current708Packet.data;\n    var b = packetData[++i];\n\n    if (within708TextBlock(b)) {\n      i = this.handleText(i, service, {\n        isExtended: true\n      });\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\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\n  Cea708Stream.prototype.initService = function (serviceNum, i) {\n    var serviceName = 'SERVICE' + serviceNum;\n    var self = this;\n    var serviceName;\n    var encoding;\n\n    if (serviceName in this.serviceEncodings) {\n      encoding = this.serviceEncodings[serviceName];\n    }\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\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(byte => {\n        return ('0' + (byte & 0xFF).toString(16)).slice(-2);\n      }).join('');\n    }\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\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        const 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\n    if (win.pendingNewLine && !win.isEmpty()) {\n      win.newLine(this.getPts(i));\n    }\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\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\n    if (within708TextBlock(firstByte) && within708TextBlock(secondByte)) {\n      i = this.handleText(++i, service, {\n        isMultiByte: true\n      });\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\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\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\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\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\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\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\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\n    for (var winId = 0; winId < 8; winId++) {\n      if (b & 0x01 << winId) {\n        service.windows[winId].visible = 1;\n      }\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\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\n    for (var winId = 0; winId < 8; winId++) {\n      if (b & 0x01 << winId) {\n        service.windows[winId].visible = 0;\n      }\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\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\n    for (var winId = 0; winId < 8; winId++) {\n      if (b & 0x01 << winId) {\n        service.windows[winId].visible ^= 1;\n      }\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\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\n    for (var winId = 0; winId < 8; winId++) {\n      if (b & 0x01 << winId) {\n        service.windows[winId].clearText();\n      }\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\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\n    for (var winId = 0; winId < 8; winId++) {\n      if (b & 0x01 << winId) {\n        service.windows[winId].reset();\n      }\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\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\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\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\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\n  var CHARACTER_TRANSLATION = {\n    0x2a: 0xe1,\n    // \u00E1\n    0x5c: 0xe9,\n    // \u00E9\n    0x5e: 0xed,\n    // \u00ED\n    0x5f: 0xf3,\n    // \u00F3\n    0x60: 0xfa,\n    // \u00FA\n    0x7b: 0xe7,\n    // \u00E7\n    0x7c: 0xf7,\n    // \u00F7\n    0x7d: 0xd1,\n    // \u00D1\n    0x7e: 0xf1,\n    // \u00F1\n    0x7f: 0x2588,\n    // \u2588\n    0x0130: 0xae,\n    // \u00AE\n    0x0131: 0xb0,\n    // \u00B0\n    0x0132: 0xbd,\n    // \u00BD\n    0x0133: 0xbf,\n    // \u00BF\n    0x0134: 0x2122,\n    // \u2122\n    0x0135: 0xa2,\n    // \u00A2\n    0x0136: 0xa3,\n    // \u00A3\n    0x0137: 0x266a,\n    // \u266A\n    0x0138: 0xe0,\n    // \u00E0\n    0x0139: 0xa0,\n    //\n    0x013a: 0xe8,\n    // \u00E8\n    0x013b: 0xe2,\n    // \u00E2\n    0x013c: 0xea,\n    // \u00EA\n    0x013d: 0xee,\n    // \u00EE\n    0x013e: 0xf4,\n    // \u00F4\n    0x013f: 0xfb,\n    // \u00FB\n    0x0220: 0xc1,\n    // \u00C1\n    0x0221: 0xc9,\n    // \u00C9\n    0x0222: 0xd3,\n    // \u00D3\n    0x0223: 0xda,\n    // \u00DA\n    0x0224: 0xdc,\n    // \u00DC\n    0x0225: 0xfc,\n    // \u00FC\n    0x0226: 0x2018,\n    // \u2018\n    0x0227: 0xa1,\n    // \u00A1\n    0x0228: 0x2a,\n    // *\n    0x0229: 0x27,\n    // '\n    0x022a: 0x2014,\n    // \u2014\n    0x022b: 0xa9,\n    // \u00A9\n    0x022c: 0x2120,\n    // \u2120\n    0x022d: 0x2022,\n    // \u2022\n    0x022e: 0x201c,\n    // \u201C\n    0x022f: 0x201d,\n    // \u201D\n    0x0230: 0xc0,\n    // \u00C0\n    0x0231: 0xc2,\n    // \u00C2\n    0x0232: 0xc7,\n    // \u00C7\n    0x0233: 0xc8,\n    // \u00C8\n    0x0234: 0xca,\n    // \u00CA\n    0x0235: 0xcb,\n    // \u00CB\n    0x0236: 0xeb,\n    // \u00EB\n    0x0237: 0xce,\n    // \u00CE\n    0x0238: 0xcf,\n    // \u00CF\n    0x0239: 0xef,\n    // \u00EF\n    0x023a: 0xd4,\n    // \u00D4\n    0x023b: 0xd9,\n    // \u00D9\n    0x023c: 0xf9,\n    // \u00F9\n    0x023d: 0xdb,\n    // \u00DB\n    0x023e: 0xab,\n    // \u00AB\n    0x023f: 0xbb,\n    // \u00BB\n    0x0320: 0xc3,\n    // \u00C3\n    0x0321: 0xe3,\n    // \u00E3\n    0x0322: 0xcd,\n    // \u00CD\n    0x0323: 0xcc,\n    // \u00CC\n    0x0324: 0xec,\n    // \u00EC\n    0x0325: 0xd2,\n    // \u00D2\n    0x0326: 0xf2,\n    // \u00F2\n    0x0327: 0xd5,\n    // \u00D5\n    0x0328: 0xf5,\n    // \u00F5\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    // \u00C4\n    0x0331: 0xe4,\n    // \u00E4\n    0x0332: 0xd6,\n    // \u00D6\n    0x0333: 0xf6,\n    // \u00F6\n    0x0334: 0xdf,\n    // \u00DF\n    0x0335: 0xa5,\n    // \u00A5\n    0x0336: 0xa4,\n    // \u00A4\n    0x0337: 0x2502,\n    // \u2502\n    0x0338: 0xc5,\n    // \u00C5\n    0x0339: 0xe5,\n    // \u00E5\n    0x033a: 0xd8,\n    // \u00D8\n    0x033b: 0xf8,\n    // \u00F8\n    0x033c: 0x250c,\n    // \u250C\n    0x033d: 0x2510,\n    // \u2510\n    0x033e: 0x2514,\n    // \u2514\n    0x033f: 0x2518 // \u2518\n\n  };\n\n  var getCharFromCode = function (code) {\n    if (code === null) {\n      return '';\n    }\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\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 () {\n    var result = [],\n        i = BOTTOM_ROW + 1;\n\n    while (i--) {\n      result.push({\n        text: '',\n        indent: 0,\n        offset: 0\n      });\n    }\n\n    return result;\n  };\n\n  var Cea608Stream = function (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\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\n      if ((data & 0xf000) === 0x1000) {\n        this.lastControlCode_ = data;\n      } else if (data !== this.PADDING_) {\n        this.lastControlCode_ = null;\n      }\n\n      char0 = data >>> 8;\n      char1 = data & 0xff;\n\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\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 \"\u00E8\" is desired, you'll always receive \"e\u00E8\"; non-compliant\n        // decoders are supposed to drop the \"\u00E8\", while compliant decoders\n        // backspace the \"e\" and insert \"\u00E8\".\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\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\n        if ((char1 & 0xe) === 0xe) {\n          this.addFormatting(packet.pts, ['i']);\n        }\n\n        if ((char1 & 0x1) === 0x1) {\n          this.addFormatting(packet.pts, ['u']);\n        } // Detect offset control codes and adjust cursor\n\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        const 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\n          this.setRollUp(packet.pts, row);\n        }\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\n        if (char1 & 0x1 && this.formatting_.indexOf('u') === -1) {\n          this.addFormatting(packet.pts, ['u']);\n        }\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          const 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\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\n      } else if (this.isNormalChar(char0)) {\n        if (char1 === 0x00) {\n          char1 = null;\n        }\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  };\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    const logWarning = index => {\n      this.trigger('log', {\n        level: 'warn',\n        message: 'Skipping a malformed 608 caption at index ' + index + '.'\n      });\n    };\n\n    const content = [];\n    this.displayed_.forEach((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\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\n    if (content.length) {\n      this.trigger('data', {\n        startPts: this.startPts_,\n        endPts: pts,\n        content,\n        stream: this.name_\n      });\n    }\n  };\n  /**\n   * Zero out the data, used for startup and on seek\n   */\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\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\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\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\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\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\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\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\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\n  Cea608Stream.prototype.isNormalChar = function (char) {\n    return char >= 0x20 && char <= 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\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\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\n    if (newBaseRow === undefined) {\n      newBaseRow = this.row_;\n    }\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\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\n  Cea608Stream.prototype.clearFormatting = function (pts) {\n    if (!this.formatting_.length) {\n      return;\n    }\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\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\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\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\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\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\n    this.displayed_[this.row_] = {\n      text: '',\n      indent: 0,\n      offset: 0\n    };\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\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\n  var handleRollover$1 = function (value, reference) {\n    var direction = 1;\n\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\n    while (Math.abs(reference - value) > RO_THRESH) {\n      value += direction * MAX_TS;\n    }\n\n    return value;\n  };\n\n  var TimestampRolloverStream$1 = function (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\n    this.push = function (data) {\n      /**\n       * Rollover stream expects data from elementary stream.\n       * Elementary stream can push forward 2 types of data\n       * - Parsed Video/Audio/Timed-metadata PES (packetized elementary stream) packets\n       * - Tracks metadata from PMT (Program Map Table)\n       * Rollover stream expects pts/dts info to be available, since it stores lastDTS\n       * We should ignore non-PES packets since they may override lastDTS to undefined.\n       * lastDTS is important to signal the next segments\n       * about rollover from the previous segments.\n       */\n      if (data.type === 'metadata') {\n        this.trigger('data', data);\n        return;\n      } // Any \"shared\" rollover streams will accept _all_ data. Otherwise,\n      // streams will only accept data that matches their type.\n\n\n      if (this.type_ !== TYPE_SHARED && data.type !== this.type_) {\n        return;\n      }\n\n      if (referenceDTS === undefined) {\n        referenceDTS = data.dts;\n      }\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\n    this.flush = function () {\n      referenceDTS = lastDTS;\n      this.trigger('done');\n    };\n\n    this.endTimeline = function () {\n      this.flush();\n      this.trigger('endedtimeline');\n    };\n\n    this.discontinuity = function () {\n      referenceDTS = void 0;\n      lastDTS = void 0;\n    };\n\n    this.reset = function () {\n      this.discontinuity();\n      this.trigger('reset');\n    };\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 = (typedArray, element, fromIndex) => {\n    if (!typedArray) {\n      return -1;\n    }\n\n    var currentIndex = fromIndex;\n\n    for (; currentIndex < typedArray.length; currentIndex++) {\n      if (typedArray[currentIndex] === element) {\n        return currentIndex;\n      }\n    }\n\n    return -1;\n  };\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  },\n      // return a percent-encoded representation of the specified byte range\n  // @see http://en.wikipedia.org/wiki/Percent-encoding \n  percentEncode$1 = function (bytes, start, end) {\n    var i,\n        result = '';\n\n    for (i = start; i < end; i++) {\n      result += '%' + ('00' + bytes[i].toString(16)).slice(-2);\n    }\n\n    return result;\n  },\n      // return the string representation of the specified byte range,\n  // interpreted as UTf-8.\n  parseUtf8 = function (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 (bytes, start, end) {\n    return unescape(percentEncode$1(bytes, start, end)); // jshint ignore:line\n  },\n      parseSyncSafeInteger$1 = function (data) {\n    return data[0] << 21 | data[1] << 14 | data[2] << 7 | data[3];\n  },\n      frameParsers = {\n    'APIC': function (frame) {\n      var i = 1,\n          mimeTypeEndIndex,\n          descriptionEndIndex,\n          LINK_MIME_TYPE = '-->';\n\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\n      mimeTypeEndIndex = typedArrayIndexOf(frame.data, 0, i);\n\n      if (mimeTypeEndIndex < 0) {\n        // malformed frame\n        return;\n      } // parsing Mime type field (terminated with \\0)\n\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\n      if (descriptionEndIndex < 0) {\n        // malformed frame\n        return;\n      } // parsing Description field (terminated with \\0)\n\n\n      frame.description = parseUtf8(frame.data, i, descriptionEndIndex);\n      i = descriptionEndIndex + 1;\n\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 (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\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 (frame) {\n      var descriptionEndIndex;\n\n      if (frame.data[0] !== textEncodingDescriptionByte.Utf8) {\n        // ignore frames with unrecognized character encodings\n        return;\n      }\n\n      descriptionEndIndex = typedArrayIndexOf(frame.data, 0, 1);\n\n      if (descriptionEndIndex === -1) {\n        return;\n      } // parse the text fields\n\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 (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 (frame) {\n      var descriptionEndIndex;\n\n      if (frame.data[0] !== textEncodingDescriptionByte.Utf8) {\n        // ignore frames with unrecognized character encodings\n        return;\n      }\n\n      descriptionEndIndex = typedArrayIndexOf(frame.data, 0, 1);\n\n      if (descriptionEndIndex === -1) {\n        return;\n      } // parse the description and URL fields\n\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 (frame) {\n      var i;\n\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\n      frame.privateData = frame.data.subarray(i + 1);\n      frame.data = frame.privateData;\n    }\n  };\n\n  var parseId3Frames$1 = function (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\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\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\n    do {\n      // determine the number of bytes in this frame\n      frameSize = parseSyncSafeInteger$1(data.subarray(frameStart + 4, frameStart + 8));\n\n      if (frameSize < 1) {\n        break;\n      }\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\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\n    return frames;\n  };\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\n  MetadataStream = function (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\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\n    this.push = function (chunk) {\n      var tag, frameStart, frameSize, frame, i, frameHeader;\n\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\n      if (chunk.dataAlignmentIndicator) {\n        bufferSize = 0;\n        buffer.length = 0;\n      } // ignore events that don't look like ID3 data\n\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\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\n      if (bufferSize < tagSize) {\n        return;\n      } // collect the entire frame so it can be parsed\n\n\n      tag = {\n        data: new Uint8Array(tagSize),\n        frames: [],\n        pts: buffer[0].pts,\n        dts: buffer[0].dts\n      };\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\n      frameStart = 10;\n\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\n      do {\n        // determine the number of bytes in this frame\n        frameSize = id3.parseSyncSafeInteger(tag.data.subarray(frameStart + 4, frameStart + 8));\n\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\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\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\n          this.trigger('timestamp', frame);\n        }\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\n      this.trigger('data', tag);\n    };\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 () {\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\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\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\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\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\n      this.trigger('done');\n    };\n\n    this.endTimeline = function () {\n      this.flush();\n      this.trigger('endedtimeline');\n    };\n\n    this.reset = function () {\n      bytesInBuffer = 0;\n      this.trigger('reset');\n    };\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 () {\n    var parsePsi, parsePat, parsePmt, self;\n    TransportParseStream.prototype.init.call(this);\n    self = this;\n    this.packetsWaitingForPmt = [];\n    this.programMapTable = undefined;\n\n    parsePsi = function (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\n      if (psi.type === 'pat') {\n        parsePat(payload.subarray(offset), psi);\n      } else {\n        parsePmt(payload.subarray(offset), psi);\n      }\n    };\n\n    parsePat = function (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\n    parsePmt = function (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\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\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\n        offset += ((payload[offset + 3] & 0x0F) << 8 | payload[offset + 4]) + 5;\n      } // record the map on the packet as well\n\n\n      pmt.programMapTable = self.programMapTable;\n    };\n    /**\n     * Deliver a new MP2T packet to the next stream in the pipeline.\n     */\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\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\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\n      result.type = 'pes';\n      result.data = packet.subarray(offset);\n      this.trigger('data', result);\n    };\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 () {\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 (payload, pes) {\n      var ptsDtsFlags;\n      const 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\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\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\n      pes.data = payload.subarray(9 + payload[8]);\n    },\n\n    /**\n      * Pass completely parsed PES packets to the next stream in the pipeline\n     **/\n    flushStream = function (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\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\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\n      if (packetFlushable) {\n        self.trigger('data', event);\n      }\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 () {// we have to wait for the PMT to arrive as well before we\n          // have any meaningful metadata\n        },\n        pes: function () {\n          var stream, streamType;\n\n          switch (data.streamType) {\n            case StreamTypes$2.H264_STREAM_TYPE:\n              stream = video;\n              streamType = 'video';\n              break;\n\n            case StreamTypes$2.ADTS_STREAM_TYPE:\n              stream = audio;\n              streamType = 'audio';\n              break;\n\n            case StreamTypes$2.METADATA_STREAM_TYPE:\n              stream = timedMetadata;\n              streamType = 'timed-metadata';\n              break;\n\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\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\n          stream.data.push(data);\n          stream.size += data.data.byteLength;\n        },\n        pmt: function () {\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\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\n          segmentHadPmt = true;\n          self.trigger('data', event);\n        }\n      })[data.type]();\n    };\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\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\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\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\n        self.trigger('data', pmt);\n      }\n\n      segmentHadPmt = false;\n      this.flushStreams_();\n      this.trigger('done');\n    };\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\n  for (var type in StreamTypes$2) {\n    if (StreamTypes$2.hasOwnProperty(type)) {\n      m2ts$1[type] = StreamTypes$2[type];\n    }\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$1;\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$1 = function (handlePartialSegments) {\n    var buffer,\n        frameNum = 0;\n    AdtsStream$1.prototype.init.call(this);\n\n    this.skipWarn_ = function (start, end) {\n      this.trigger('log', {\n        level: 'warn',\n        message: `adts skiping bytes ${start} to ${end} in frame ${frameNum} outside syncword`\n      });\n    };\n\n    this.push = function (packet) {\n      var i = 0,\n          frameLength,\n          protectionSkipBytes,\n          oldBuffer,\n          sampleCount,\n          adtsFrameDuration;\n\n      if (!handlePartialSegments) {\n        frameNum = 0;\n      }\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\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\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\n          i++;\n          continue;\n        }\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\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\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\n      if (typeof skip === 'number') {\n        this.skipWarn_(skip, i);\n        skip = null;\n      } // remove processed bytes from the buffer.\n\n\n      buffer = buffer.subarray(i);\n    };\n\n    this.flush = function () {\n      frameNum = 0;\n      this.trigger('done');\n    };\n\n    this.reset = function () {\n      buffer = void 0;\n      this.trigger('reset');\n    };\n\n    this.endTimeline = function () {\n      buffer = void 0;\n      this.trigger('endedtimeline');\n    };\n  };\n\n  AdtsStream$1.prototype = new Stream$3();\n  var adts = AdtsStream$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 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 (workingData) {\n    var // 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\n    this.bitsAvailable = function () {\n      return 8 * workingBytesAvailable + workingBitsAvailable;\n    }; // ():void\n\n\n    this.loadWord = function () {\n      var position = workingData.byteLength - workingBytesAvailable,\n          workingBytes = new Uint8Array(4),\n          availableBytes = Math.min(4, workingBytesAvailable);\n\n      if (availableBytes === 0) {\n        throw new Error('no bytes available');\n      }\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\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\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\n      if (workingBitsAvailable > 0) {\n        workingWord <<= bits;\n      } else if (workingBytesAvailable > 0) {\n        this.loadWord();\n      }\n\n      bits = size - bits;\n\n      if (bits > 0) {\n        return valu << bits | this.readBits(bits);\n      }\n\n      return valu;\n    }; // ():uint\n\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\n      this.loadWord();\n      return leadingZeroCount + this.skipLeadingZeros();\n    }; // ():void\n\n\n    this.skipUnsignedExpGolomb = function () {\n      this.skipBits(1 + this.skipLeadingZeros());\n    }; // ():void\n\n\n    this.skipExpGolomb = function () {\n      this.skipBits(1 + this.skipLeadingZeros());\n    }; // ():uint\n\n\n    this.readUnsignedExpGolomb = function () {\n      var clz = this.skipLeadingZeros(); // :uint\n\n      return this.readBits(clz + 1) - 1;\n    }; // ():int\n\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\n      return -1 * (valu >>> 1); // divide by two then make it negative\n    }; // Some convenience functions\n    // :Boolean\n\n\n    this.readBoolean = function () {\n      return this.readBits(1) === 1;\n    }; // ():int\n\n\n    this.readUnsignedByte = function () {\n      return this.readBits(8);\n    };\n\n    this.loadWord();\n  };\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$1, 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 () {\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\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\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\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\n            if (syncPoint + 3 !== i - 2) {\n              this.trigger('data', buffer.subarray(syncPoint + 3, i - 2));\n            } // drop trailing zeroes\n\n\n            do {\n              i++;\n            } while (buffer[i] !== 1 && i < len);\n\n            syncPoint = i - 2;\n            i += 3;\n            break;\n\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\n            this.trigger('data', buffer.subarray(syncPoint + 3, i - 2));\n            syncPoint = i - 2;\n            i += 3;\n            break;\n\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\n      buffer = buffer.subarray(syncPoint);\n      i -= syncPoint;\n      syncPoint = 0;\n    };\n\n    this.reset = function () {\n      buffer = null;\n      syncPoint = 0;\n      this.trigger('reset');\n    };\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\n      buffer = null;\n      syncPoint = 0;\n      this.trigger('done');\n    };\n\n    this.endTimeline = function () {\n      this.flush();\n      this.trigger('endedtimeline');\n    };\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$1 = function () {\n    var nalByteStream = new NalByteStream(),\n        self,\n        trackId,\n        currentPts,\n        currentDts,\n        discardEmulationPreventionBytes,\n        readSequenceParameterSet,\n        skipScalingList;\n    H264Stream$1.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\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\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\n      switch (event.nalUnitTypeCode) {\n        case 0x05:\n          event.nalUnitType = 'slice_layer_without_partitioning_rbsp_idr';\n          break;\n\n        case 0x06:\n          event.nalUnitType = 'sei_rbsp';\n          event.escapedRBSP = discardEmulationPreventionBytes(data.subarray(1));\n          break;\n\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\n        case 0x08:\n          event.nalUnitType = 'pic_parameter_set_rbsp';\n          break;\n\n        case 0x09:\n          event.nalUnitType = 'access_unit_delimiter_rbsp';\n          break;\n      } // This triggers data on the H264Stream\n\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\n    this.flush = function () {\n      nalByteStream.flush();\n    };\n\n    this.partialFlush = function () {\n      nalByteStream.partialFlush();\n    };\n\n    this.reset = function () {\n      nalByteStream.reset();\n    };\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\n    skipScalingList = function (count, expGolombDecoder) {\n      var lastScale = 8,\n          nextScale = 8,\n          j,\n          deltaScale;\n\n      for (j = 0; j < count; j++) {\n        if (nextScale !== 0) {\n          deltaScale = expGolombDecoder.readExpGolomb();\n          nextScale = (lastScale + deltaScale + 256) % 256;\n        }\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\n    discardEmulationPreventionBytes = function (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\n      if (emulationPreventionBytesPositions.length === 0) {\n        return data;\n      } // Create a new array to hold the NAL unit data\n\n\n      newLength = length - emulationPreventionBytesPositions.length;\n      newData = new Uint8Array(newLength);\n      var sourceIndex = 0;\n\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\n        newData[i] = data[sourceIndex];\n      }\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\n    readSequenceParameterSet = function (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\n        if (chromaFormatIdc === 3) {\n          expGolombDecoder.skipBits(1); // separate_colour_plane_flag\n        }\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\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\n      expGolombDecoder.skipUnsignedExpGolomb(); // log2_max_frame_num_minus4\n\n      picOrderCntType = expGolombDecoder.readUnsignedExpGolomb();\n\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\n        for (i = 0; i < numRefFramesInPicOrderCntCycle; i++) {\n          expGolombDecoder.skipExpGolomb(); // offset_for_ref_frame[ i ]\n        }\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\n      if (frameMbsOnlyFlag === 0) {\n        expGolombDecoder.skipBits(1); // mb_adaptive_frame_field_flag\n      }\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\n      if (expGolombDecoder.readBoolean()) {\n        // vui_parameters_present_flag\n        if (expGolombDecoder.readBoolean()) {\n          // aspect_ratio_info_present_flag\n          aspectRatioIdc = expGolombDecoder.readUnsignedByte();\n\n          switch (aspectRatioIdc) {\n            case 1:\n              sarRatio = [1, 1];\n              break;\n\n            case 2:\n              sarRatio = [12, 11];\n              break;\n\n            case 3:\n              sarRatio = [10, 11];\n              break;\n\n            case 4:\n              sarRatio = [16, 11];\n              break;\n\n            case 5:\n              sarRatio = [40, 33];\n              break;\n\n            case 6:\n              sarRatio = [24, 11];\n              break;\n\n            case 7:\n              sarRatio = [20, 11];\n              break;\n\n            case 8:\n              sarRatio = [32, 11];\n              break;\n\n            case 9:\n              sarRatio = [80, 33];\n              break;\n\n            case 10:\n              sarRatio = [18, 11];\n              break;\n\n            case 11:\n              sarRatio = [15, 11];\n              break;\n\n            case 12:\n              sarRatio = [64, 33];\n              break;\n\n            case 13:\n              sarRatio = [160, 99];\n              break;\n\n            case 14:\n              sarRatio = [4, 3];\n              break;\n\n            case 15:\n              sarRatio = [3, 2];\n              break;\n\n            case 16:\n              sarRatio = [2, 1];\n              break;\n\n            case 255:\n              {\n                sarRatio = [expGolombDecoder.readUnsignedByte() << 8 | expGolombDecoder.readUnsignedByte(), expGolombDecoder.readUnsignedByte() << 8 | expGolombDecoder.readUnsignedByte()];\n                break;\n              }\n          }\n\n          if (sarRatio) {\n            sarRatio[0] / sarRatio[1];\n          }\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\n  H264Stream$1.prototype = new Stream$2();\n  var h264 = {\n    H264Stream: H264Stream$1,\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\n  var parseId3TagSize = function (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\n    if (footerPresent) {\n      return returnSize + 20;\n    }\n\n    return returnSize + 10;\n  };\n\n  var getId3Offset = function (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\n    offset += parseId3TagSize(data, offset);\n    return getId3Offset(data, offset);\n  }; // TODO: use vhs-utils\n\n\n  var isLikelyAacData$1 = function (data) {\n    var offset = getId3Offset(data, 0);\n    return data.length >= offset + 2 && (data[offset] & 0xFF) === 0xFF && (data[offset + 1] & 0xF0) === 0xF0 && // 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\n  var parseSyncSafeInteger = function (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\n  var percentEncode = function (bytes, start, end) {\n    var i,\n        result = '';\n\n    for (i = start; i < end; i++) {\n      result += '%' + ('00' + bytes[i].toString(16)).slice(-2);\n    }\n\n    return result;\n  }; // return the string representation of the specified byte range,\n  // interpreted as ISO-8859-1.\n\n\n  var parseIso88591 = function (bytes, start, end) {\n    return unescape(percentEncode(bytes, start, end)); // jshint ignore:line\n  };\n\n  var parseAdtsSize = function (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\n  var parseType$4 = function (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\n    return null;\n  };\n\n  var parseSampleRate = function (packet) {\n    var i = 0;\n\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\n      return ADTS_SAMPLING_FREQUENCIES[(packet[i + 2] & 0x3c) >>> 2];\n    }\n\n    return null;\n  };\n\n  var parseAacTimestamp = function (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\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\n    do {\n      // determine the number of bytes in this frame\n      frameSize = parseSyncSafeInteger(packet.subarray(frameStart + 4, frameStart + 8));\n\n      if (frameSize < 1) {\n        return null;\n      }\n\n      frameHeader = String.fromCharCode(packet[frameStart], packet[frameStart + 1], packet[frameStart + 2], packet[frameStart + 3]);\n\n      if (frameHeader === 'PRIV') {\n        frame = packet.subarray(frameStart + 10, frameStart + frameSize + 10);\n\n        for (var i = 0; i < frame.byteLength; i++) {\n          if (frame[i] === 0) {\n            var owner = parseIso88591(frame, 0, i);\n\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\n            break;\n          }\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\n    return null;\n  };\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$1;\n  /**\n   * Splits an incoming stream of binary data into ADTS and ID3 Frames.\n   */\n\n  AacStream$1 = function () {\n    var everything = new Uint8Array(),\n        timeStamp = 0;\n    AacStream$1.prototype.init.call(this);\n\n    this.setTimestamp = function (timestamp) {\n      timeStamp = timestamp;\n    };\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\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\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\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\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\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\n        byteIndex++;\n      }\n\n      bytesLeft = everything.length - byteIndex;\n\n      if (bytesLeft > 0) {\n        everything = everything.subarray(byteIndex);\n      } else {\n        everything = new Uint8Array();\n      }\n    };\n\n    this.reset = function () {\n      everything = new Uint8Array();\n      this.trigger('reset');\n    };\n\n    this.endTimeline = function () {\n      everything = new Uint8Array();\n      this.trigger('endedtimeline');\n    };\n  };\n\n  AacStream$1.prototype = new Stream$1();\n  var aac = AacStream$1;\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\n  var retriggerForStream = function (key, event) {\n    event.stream = key;\n    this.trigger('log', event);\n  };\n\n  var addPipelineLogRetriggers = function (transmuxer, pipeline) {\n    var keys = Object.keys(pipeline);\n\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\n      pipeline[key].on('log', retriggerForStream.bind(transmuxer, key));\n    }\n  };\n  /**\n   * Compare two arrays (even typed) for same-ness\n   */\n\n\n  var arrayEquals = function (a, b) {\n    var i;\n\n    if (a.length !== b.length) {\n      return false;\n    } // compare the value of each element in the array\n\n\n    for (i = 0; i < a.length; i++) {\n      if (a[i] !== b[i]) {\n        return false;\n      }\n    }\n\n    return true;\n  };\n\n  var generateSegmentTimingInfo = function (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\n  AudioSegmentStream = function (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\n    this.push = function (data) {\n      trackDecodeInfo.collectDtsInfo(track, data);\n\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\n      adtsFrames.push(data);\n    };\n\n    this.setEarliestDts = function (earliestDts) {\n      earliestAllowedDts = earliestDts;\n    };\n\n    this.setVideoBaseMediaDecodeTime = function (baseMediaDecodeTime) {\n      videoBaseMediaDecodeTime = baseMediaDecodeTime;\n    };\n\n    this.setAudioAppendStart = function (timestamp) {\n      audioAppendStartTs = timestamp;\n    };\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\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( // 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), // 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\n      this.trigger('data', {\n        track: track,\n        boxes: boxes\n      });\n      this.trigger('done', 'AudioSegmentStream');\n    };\n\n    this.reset = function () {\n      trackDecodeInfo.clearDtsInfo(track);\n      adtsFrames = [];\n      this.trigger('reset');\n    };\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 (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\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\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\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\n        nalUnits.shift();\n      } // Return early if no video data has been observed\n\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\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\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\n      if (gopsToAlignWith.length) {\n        var alignedGops;\n\n        if (options.alignGopsAtEnd) {\n          alignedGops = this.alignGopsAtEnd_(gops);\n        } else {\n          alignedGops = this.alignGopsAtStart_(gops);\n        }\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\n        trackDecodeInfo.clearDtsInfo(track);\n        gops = alignedGops;\n      }\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\n    this.reset = function () {\n      this.resetStream_();\n      nalUnits = [];\n      this.gopCache_.length = 0;\n      gopsToAlignWith.length = 0;\n      this.trigger('reset');\n    };\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\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\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\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\n      if (nearestGopObj) {\n        return nearestGopObj.gop;\n      }\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\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\n      while (alignIndex < gopsToAlignWith.length && gopIndex < gops.length) {\n        align = gopsToAlignWith[alignIndex];\n        gop = gops[gopIndex];\n\n        if (align.pts === gop.pts) {\n          break;\n        }\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\n        gopIndex++;\n        byteLength -= gop.byteLength;\n        nalCount -= gop.nalCount;\n        duration -= gop.duration;\n      }\n\n      if (gopIndex === 0) {\n        // no gops to trim\n        return gops;\n      }\n\n      if (gopIndex === gops.length) {\n        // all gops trimmed, skip appending all gops\n        return null;\n      }\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\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\n      while (alignIndex >= 0 && gopIndex >= 0) {\n        align = gopsToAlignWith[alignIndex];\n        gop = gops[gopIndex];\n\n        if (align.pts === gop.pts) {\n          matchFound = true;\n          break;\n        }\n\n        if (align.pts > gop.pts) {\n          alignIndex--;\n          continue;\n        }\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\n        gopIndex--;\n      }\n\n      if (!matchFound && alignEndIndex === null) {\n        return null;\n      }\n\n      var trimIndex;\n\n      if (matchFound) {\n        trimIndex = gopIndex;\n      } else {\n        trimIndex = alignEndIndex;\n      }\n\n      if (trimIndex === 0) {\n        return gops;\n      }\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\n    this.alignGopsWith = function (newGopsToAlignWith) {\n      gopsToAlignWith = newGopsToAlignWith;\n    };\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 (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\n    if (typeof options.remux !== 'undefined') {\n      this.remuxTracks = !!options.remux;\n    } else {\n      this.remuxTracks = true;\n    }\n\n    if (typeof options.keepOriginalTimestamps === 'boolean') {\n      this.keepOriginalTimestamps = options.keepOriginalTimestamps;\n    } else {\n      this.keepOriginalTimestamps = false;\n    }\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\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\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\n      if (output.track.type === 'audio') {\n        this.audioTrack = output.track;\n        this.pendingBoxes.unshift(output.boxes);\n      }\n    };\n  };\n\n  CoalesceStream.prototype = new Stream();\n\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\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\n        if (this.emittedTracks >= this.numberOfTracks) {\n          this.trigger('done');\n          this.emittedTracks = 0;\n        }\n\n        return;\n      }\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\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\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\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\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\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\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\n    if (this.emittedTracks >= this.numberOfTracks) {\n      this.trigger('done');\n      this.emittedTracks = 0;\n    }\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\n  Transmuxer = function (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\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\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\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\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\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\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\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\n    this.setBaseMediaDecodeTime = function (baseMediaDecodeTime) {\n      var pipeline = this.transmuxPipeline_;\n\n      if (!options.keepOriginalTimestamps) {\n        this.baseMediaDecodeTime = baseMediaDecodeTime;\n      }\n\n      if (audioTrack) {\n        audioTrack.timelineStartInfo.dts = undefined;\n        audioTrack.timelineStartInfo.pts = undefined;\n        trackDecodeInfo.clearDtsInfo(audioTrack);\n\n        if (pipeline.audioTimestampRolloverStream) {\n          pipeline.audioTimestampRolloverStream.discontinuity();\n        }\n      }\n\n      if (videoTrack) {\n        if (pipeline.videoSegmentStream) {\n          pipeline.videoSegmentStream.gopCache_ = [];\n        }\n\n        videoTrack.timelineStartInfo.dts = undefined;\n        videoTrack.timelineStartInfo.pts = undefined;\n        trackDecodeInfo.clearDtsInfo(videoTrack);\n        pipeline.captionStream.reset();\n      }\n\n      if (pipeline.timestampRolloverStream) {\n        pipeline.timestampRolloverStream.discontinuity();\n      }\n    };\n\n    this.setAudioAppendStart = function (timestamp) {\n      if (audioTrack) {\n        this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(timestamp);\n      }\n    };\n\n    this.setRemux = function (val) {\n      var pipeline = this.transmuxPipeline_;\n      options.remux = val;\n\n      if (pipeline && pipeline.coalesceStream) {\n        pipeline.coalesceStream.setRemux(val);\n      }\n    };\n\n    this.alignGopsWith = function (gopsToAlignWith) {\n      if (videoTrack && this.transmuxPipeline_.videoSegmentStream) {\n        this.transmuxPipeline_.videoSegmentStream.alignGopsWith(gopsToAlignWith);\n      }\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\n    this.push = function (data) {\n      if (hasFlushed) {\n        var isAac = isLikelyAacData(data);\n\n        if (isAac && this.transmuxPipeline_.type !== 'aac') {\n          this.setupAacPipeline();\n        } else if (!isAac && this.transmuxPipeline_.type !== 'ts') {\n          this.setupTsPipeline();\n        }\n\n        hasFlushed = false;\n      }\n\n      this.transmuxPipeline_.headOfPipeline.push(data);\n    }; // flush any buffered data\n\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\n    this.endTimeline = function () {\n      this.transmuxPipeline_.headOfPipeline.endTimeline();\n    };\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\n    this.resetCaptions = function () {\n      if (this.transmuxPipeline_.captionStream) {\n        this.transmuxPipeline_.captionStream.reset();\n      }\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 (value) {\n    return value >>> 0;\n  };\n\n  var toHexString$1 = function (value) {\n    return ('00' + value.toString(16)).slice(-2);\n  };\n\n  var bin = {\n    toUnsigned: toUnsigned$3,\n    toHexString: toHexString$1\n  };\n\n  var parseType$3 = function (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\n  var parseType_1 = parseType$3;\n  var toUnsigned$2 = bin.toUnsigned;\n  var parseType$2 = parseType_1;\n\n  var findBox$2 = function (data, path) {\n    var results = [],\n        i,\n        size,\n        type,\n        end,\n        subresults;\n\n    if (!path.length) {\n      // short-circuit the search for empty paths\n      return null;\n    }\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\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\n          if (subresults.length) {\n            results = results.concat(subresults);\n          }\n        }\n      }\n\n      i = end;\n    } // we've finished searching all of data\n\n\n    return results;\n  };\n\n  var findBox_1 = findBox$2;\n  var toUnsigned$1 = bin.toUnsigned;\n  var getUint64$2 = numbers.getUint64;\n\n  var tfdt = function (data) {\n    var result = {\n      version: data[0],\n      flags: new Uint8Array(data.subarray(1, 4))\n    };\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\n    return result;\n  };\n\n  var parseTfdt$2 = tfdt;\n\n  var parseSampleFlags$1 = function (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\n  var parseSampleFlags_1 = parseSampleFlags$1;\n  var parseSampleFlags = parseSampleFlags_1;\n\n  var trun = function (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\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\n    if (firstSampleFlagsPresent && sampleCount) {\n      sample = {\n        flags: parseSampleFlags(data.subarray(offset, offset + 4))\n      };\n      offset += 4;\n\n      if (sampleDurationPresent) {\n        sample.duration = view.getUint32(offset);\n        offset += 4;\n      }\n\n      if (sampleSizePresent) {\n        sample.size = view.getUint32(offset);\n        offset += 4;\n      }\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\n        offset += 4;\n      }\n\n      result.samples.push(sample);\n      sampleCount--;\n    }\n\n    while (sampleCount--) {\n      sample = {};\n\n      if (sampleDurationPresent) {\n        sample.duration = view.getUint32(offset);\n        offset += 4;\n      }\n\n      if (sampleSizePresent) {\n        sample.size = view.getUint32(offset);\n        offset += 4;\n      }\n\n      if (sampleFlagsPresent) {\n        sample.flags = parseSampleFlags(data.subarray(offset, offset + 4));\n        offset += 4;\n      }\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\n        offset += 4;\n      }\n\n      result.samples.push(sample);\n    }\n\n    return result;\n  };\n\n  var parseTrun$2 = trun;\n\n  var tfhd = function (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\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\n    if (sampleDescriptionIndexPresent) {\n      result.sampleDescriptionIndex = view.getUint32(i);\n      i += 4;\n    }\n\n    if (defaultSampleDurationPresent) {\n      result.defaultSampleDuration = view.getUint32(i);\n      i += 4;\n    }\n\n    if (defaultSampleSizePresent) {\n      result.defaultSampleSize = view.getUint32(i);\n      i += 4;\n    }\n\n    if (defaultSampleFlagsPresent) {\n      result.defaultSampleFlags = view.getUint32(i);\n    }\n\n    if (durationIsEmpty) {\n      result.durationIsEmpty = true;\n    }\n\n    if (!baseDataOffsetPresent && defaultBaseIsMoof) {\n      result.baseDataOffsetIsMoof = true;\n    }\n\n    return result;\n  };\n\n  var parseTfhd$2 = tfhd;\n  var win;\n\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\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 (offset, samples) {\n    var approximateOffset = offset;\n\n    for (var i = 0; i < samples.length; i++) {\n      var sample = samples[i];\n\n      if (approximateOffset < sample.size) {\n        return sample;\n      }\n\n      approximateOffset -= sample.size;\n    }\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\n  var findSeiNals = function (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\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\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\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\n          result.seiNals.push(seiNal);\n          break;\n      }\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\n  var parseSamples = function (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\n        if (sample.size === undefined) {\n          sample.size = defaultSampleSize;\n        }\n\n        sample.trackId = trackId;\n        sample.dts = currentDts;\n\n        if (sample.compositionTimeOffset === undefined) {\n          sample.compositionTimeOffset = 0;\n        }\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\n  var parseCaptionNals = function (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\n        if (!captionNals[trackId]) {\n          captionNals[trackId] = {\n            seiNals: [],\n            logs: []\n          };\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\n  var parseEmbeddedCaptions = function (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\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\n  var CaptionParser = function () {\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\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\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\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\n    this.parse = function (segment, videoTrackIds, timescales) {\n      var parsedData;\n\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\n      while (segmentCache.length > 0) {\n        var cachedSegment = segmentCache.shift();\n        this.parse(cachedSegment, videoTrackIds, timescales);\n      }\n\n      parsedData = parseEmbeddedCaptions(segment, trackId, timescale);\n\n      if (parsedData && parsedData.logs) {\n        parsedCaptions.logs = parsedCaptions.logs.concat(parsedData.logs);\n      }\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\n        return null;\n      }\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\n    this.pushNals = function (nals) {\n      if (!this.isInitialized() || !nals || nals.length === 0) {\n        return null;\n      }\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\n    this.flushStream = function () {\n      if (!this.isInitialized()) {\n        return null;\n      }\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\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\n    this.resetCaptionStream = function () {\n      if (!this.isInitialized()) {\n        return null;\n      }\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\n    this.clearAllCaptions = function () {\n      this.clearParsedCaptions();\n      this.resetCaptionStream();\n    };\n    /**\n      * Reset caption parser\n     **/\n\n\n    this.reset = function () {\n      segmentCache = [];\n      trackId = null;\n      timescale = null;\n\n      if (!parsedCaptions) {\n        parsedCaptions = {\n          captions: [],\n          // CC1, CC2, CC3, CC4\n          captionStreams: {},\n          logs: []\n        };\n      } else {\n        this.clearParsedCaptions();\n      }\n\n      this.resetCaptionStream();\n    };\n\n    this.reset();\n  };\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 (data) {\n    var index = 0;\n    var curChar = String.fromCharCode(data[index]);\n    var retString = '';\n\n    while (curChar !== '\\0') {\n      retString += curChar;\n      index++;\n      curChar = String.fromCharCode(data[index]);\n    } // Add nullChar\n\n\n    retString += curChar;\n    return retString;\n  };\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 (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\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\n    message_data = new Uint8Array(boxData.subarray(offset, boxData.byteLength));\n    var emsgBox = {\n      scheme_id_uri,\n      value,\n      // if timescale is undefined or 0 set to 1 \n      timescale: timescale ? timescale : 1,\n      presentation_time,\n      presentation_time_delta,\n      event_duration,\n      id,\n      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\n  var scaleTime = function (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\n  var isValidEmsgBox = function (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\n  var isDefined = function (data) {\n    return data !== undefined || data !== null;\n  };\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 (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\n      if (!tkhd) {\n        return null;\n      }\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\n      if (!mdhd) {\n        return null;\n      }\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\n  startTime = function (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\n      let seconds;\n\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\n      if (seconds < Number.MAX_SAFE_INTEGER) {\n        seconds = Number(seconds);\n      }\n\n      if (seconds < acc) {\n        acc = seconds;\n      }\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\n  compositionStartTime = function (timescales, fragment) {\n    var trafBoxes = findBox(fragment, ['moof', 'traf']);\n    var baseMediaDecodeTime = 0;\n    var compositionTimeOffset = 0;\n    var trackId;\n\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\n      if (tfhd) {\n        var parsedTfhd = parseTfhd(tfhd);\n        trackId = parsedTfhd.trackId;\n      }\n\n      if (tfdt) {\n        var parsedTfdt = parseTfdt(tfdt);\n        baseMediaDecodeTime = parsedTfdt.baseMediaDecodeTime;\n      }\n\n      if (trun) {\n        var parsedTrun = parseTrun(trun);\n\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\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\n    var result = (baseMediaDecodeTime + compositionTimeOffset) / timescale;\n\n    if (typeof result === 'bigint' && result < Number.MAX_SAFE_INTEGER) {\n      result = Number(result);\n    }\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\n  getVideoTrackIds = function (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\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\n  getTimescaleFromMediaHeader = function (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\n  getTracks = function (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\n      var hdlr = findBox(trak, ['mdia', 'hdlr'])[0]; // type\n\n      if (hdlr) {\n        var type = parseType$1(hdlr.subarray(8, 12));\n\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\n      var stsd = findBox(trak, ['mdia', 'minf', 'stbl', 'stsd'])[0];\n\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\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\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\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\n      var mdhd = findBox(trak, ['mdia', 'mdhd'])[0];\n\n      if (mdhd) {\n        track.timescale = getTimescaleFromMediaHeader(mdhd);\n      }\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\n  getEmsgID3 = function (segmentData, offset = 0) {\n    var emsgBoxes = findBox(segmentData, ['emsg']);\n    return emsgBoxes.map(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\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\n  var parsePid = function (packet) {\n    var pid = packet[1] & 0x1f;\n    pid <<= 8;\n    pid |= packet[2];\n    return pid;\n  };\n\n  var parsePayloadUnitStartIndicator = function (packet) {\n    return !!(packet[1] & 0x40);\n  };\n\n  var parseAdaptionField = function (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\n    return offset;\n  };\n\n  var parseType = function (packet, pmtPid) {\n    var pid = parsePid(packet);\n\n    if (pid === 0) {\n      return 'pat';\n    } else if (pid === pmtPid) {\n      return 'pmt';\n    } else if (pmtPid) {\n      return 'pes';\n    }\n\n    return null;\n  };\n\n  var parsePat = function (packet) {\n    var pusi = parsePayloadUnitStartIndicator(packet);\n    var offset = 4 + parseAdaptionField(packet);\n\n    if (pusi) {\n      offset += packet[offset] + 1;\n    }\n\n    return (packet[offset + 10] & 0x1f) << 8 | packet[offset + 11];\n  };\n\n  var parsePmt = function (packet) {\n    var programMapTable = {};\n    var pusi = parsePayloadUnitStartIndicator(packet);\n    var payloadOffset = 4 + parseAdaptionField(packet);\n\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\n    if (!(packet[payloadOffset + 5] & 0x01)) {\n      return;\n    }\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\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\n    return programMapTable;\n  };\n\n  var parsePesType = function (packet, programMapTable) {\n    var pid = parsePid(packet);\n    var type = programMapTable[pid];\n\n    switch (type) {\n      case StreamTypes$1.H264_STREAM_TYPE:\n        return 'video';\n\n      case StreamTypes$1.ADTS_STREAM_TYPE:\n        return 'audio';\n\n      case StreamTypes$1.METADATA_STREAM_TYPE:\n        return 'timed-metadata';\n\n      default:\n        return null;\n    }\n  };\n\n  var parsePesTime = function (packet) {\n    var pusi = parsePayloadUnitStartIndicator(packet);\n\n    if (!pusi) {\n      return null;\n    }\n\n    var offset = 4 + parseAdaptionField(packet);\n\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\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\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\n    return pes;\n  };\n\n  var parseNalUnitType = function (type) {\n    switch (type) {\n      case 0x05:\n        return 'slice_layer_without_partitioning_rbsp_idr';\n\n      case 0x06:\n        return 'sei_rbsp';\n\n      case 0x07:\n        return 'seq_parameter_set_rbsp';\n\n      case 0x08:\n        return 'pic_parameter_set_rbsp';\n\n      case 0x09:\n        return 'access_unit_delimiter_rbsp';\n\n      default:\n        return null;\n    }\n  };\n\n  var videoPacketContainsKeyFrame = function (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\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\n          if (frameSyncPoint + 3 !== frameI - 2) {\n            nalType = parseNalUnitType(frameBuffer[frameSyncPoint + 3] & 0x1f);\n\n            if (nalType === 'slice_layer_without_partitioning_rbsp_idr') {\n              foundKeyFrame = true;\n            }\n          } // drop trailing zeroes\n\n\n          do {\n            frameI++;\n          } while (frameBuffer[frameI] !== 1 && frameI < frameBuffer.length);\n\n          frameSyncPoint = frameI - 2;\n          frameI += 3;\n          break;\n\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\n          nalType = parseNalUnitType(frameBuffer[frameSyncPoint + 3] & 0x1f);\n\n          if (nalType === 'slice_layer_without_partitioning_rbsp_idr') {\n            foundKeyFrame = true;\n          }\n\n          frameSyncPoint = frameI - 2;\n          frameI += 3;\n          break;\n\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\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\n      if (nalType === 'slice_layer_without_partitioning_rbsp_idr') {\n        foundKeyFrame = true;\n      }\n    }\n\n    return foundKeyFrame;\n  };\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 (bytes, pmt) {\n    var startIndex = 0,\n        endIndex = MP2T_PACKET_LENGTH,\n        packet,\n        type;\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\n        switch (type) {\n          case 'pat':\n            pmt.pid = probe.ts.parsePat(packet);\n            break;\n\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\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\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\n  var parseAudioPes_ = function (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\n        switch (type) {\n          case 'pes':\n            pesType = probe.ts.parsePesType(packet, pmt.table);\n            pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\n\n            if (pesType === 'audio' && pusi) {\n              parsed = probe.ts.parsePesTime(packet);\n\n              if (parsed) {\n                parsed.type = 'audio';\n                result.audio.push(parsed);\n                endLoop = true;\n              }\n            }\n\n            break;\n        }\n\n        if (endLoop) {\n          break;\n        }\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\n      startIndex++;\n      endIndex++;\n    } // Start walking from end of segment to get last audio packet\n\n\n    endIndex = bytes.byteLength;\n    startIndex = endIndex - MP2T_PACKET_LENGTH;\n    endLoop = false;\n\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\n        switch (type) {\n          case 'pes':\n            pesType = probe.ts.parsePesType(packet, pmt.table);\n            pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\n\n            if (pesType === 'audio' && pusi) {\n              parsed = probe.ts.parsePesTime(packet);\n\n              if (parsed) {\n                parsed.type = 'audio';\n                result.audio.push(parsed);\n                endLoop = true;\n              }\n            }\n\n            break;\n        }\n\n        if (endLoop) {\n          break;\n        }\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\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\n  var parseVideoPes_ = function (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\n        switch (type) {\n          case 'pes':\n            pesType = probe.ts.parsePesType(packet, pmt.table);\n            pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\n\n            if (pesType === 'video') {\n              if (pusi && !endLoop) {\n                parsed = probe.ts.parsePesTime(packet);\n\n                if (parsed) {\n                  parsed.type = 'video';\n                  result.video.push(parsed);\n                  endLoop = true;\n                }\n              }\n\n              if (!result.firstKeyFrame) {\n                if (pusi) {\n                  if (currentFrame.size !== 0) {\n                    frame = new Uint8Array(currentFrame.size);\n                    i = 0;\n\n                    while (currentFrame.data.length) {\n                      pes = currentFrame.data.shift();\n                      frame.set(pes, i);\n                      i += pes.byteLength;\n                    }\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\n                    currentFrame.size = 0;\n                  }\n                }\n\n                currentFrame.data.push(packet);\n                currentFrame.size += packet.byteLength;\n              }\n            }\n\n            break;\n        }\n\n        if (endLoop && result.firstKeyFrame) {\n          break;\n        }\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\n      startIndex++;\n      endIndex++;\n    } // Start walking from end of segment to get last video packet\n\n\n    endIndex = bytes.byteLength;\n    startIndex = endIndex - MP2T_PACKET_LENGTH;\n    endLoop = false;\n\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\n        switch (type) {\n          case 'pes':\n            pesType = probe.ts.parsePesType(packet, pmt.table);\n            pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\n\n            if (pesType === 'video' && pusi) {\n              parsed = probe.ts.parsePesTime(packet);\n\n              if (parsed) {\n                parsed.type = 'video';\n                result.video.push(parsed);\n                endLoop = true;\n              }\n            }\n\n            break;\n        }\n\n        if (endLoop) {\n          break;\n        }\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\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\n  var adjustTimestamp_ = function (segmentInfo, baseTimestamp) {\n    if (segmentInfo.audio && segmentInfo.audio.length) {\n      var audioBaseTimestamp = baseTimestamp;\n\n      if (typeof audioBaseTimestamp === 'undefined' || isNaN(audioBaseTimestamp)) {\n        audioBaseTimestamp = segmentInfo.audio[0].dts;\n      }\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\n    if (segmentInfo.video && segmentInfo.video.length) {\n      var videoBaseTimestamp = baseTimestamp;\n\n      if (typeof videoBaseTimestamp === 'undefined' || isNaN(videoBaseTimestamp)) {\n        videoBaseTimestamp = segmentInfo.video[0].dts;\n      }\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\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\n  var inspectAac_ = function (bytes) {\n    var endLoop = false,\n        audioCount = 0,\n        sampleRate = null,\n        timestamp = null,\n        frameSize = 0,\n        byteIndex = 0,\n        packet;\n\n    while (bytes.length - byteIndex >= 3) {\n      var type = probe.aac.parseType(bytes, byteIndex);\n\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\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\n          if (timestamp === null) {\n            packet = bytes.subarray(byteIndex, byteIndex + frameSize);\n            timestamp = probe.aac.parseAacTimestamp(packet);\n          }\n\n          byteIndex += frameSize;\n          break;\n\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\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\n          if (sampleRate === null) {\n            packet = bytes.subarray(byteIndex, byteIndex + frameSize);\n            sampleRate = probe.aac.parseSampleRate(packet);\n          }\n\n          audioCount++;\n          byteIndex += frameSize;\n          break;\n\n        default:\n          byteIndex++;\n          break;\n      }\n\n      if (endLoop) {\n        return null;\n      }\n    }\n\n    if (sampleRate === null || timestamp === null) {\n      return null;\n    }\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\n  var inspectTs_ = function (bytes) {\n    var pmt = {\n      pid: null,\n      table: null\n    };\n    var result = {};\n    parsePsi_(bytes, pmt);\n\n    for (var pid in pmt.table) {\n      if (pmt.table.hasOwnProperty(pid)) {\n        var type = pmt.table[pid];\n\n        switch (type) {\n          case StreamTypes.H264_STREAM_TYPE:\n            result.video = [];\n            parseVideoPes_(bytes, pmt, result);\n\n            if (result.video.length === 0) {\n              delete result.video;\n            }\n\n            break;\n\n          case StreamTypes.ADTS_STREAM_TYPE:\n            result.audio = [];\n            parseAudioPes_(bytes, pmt, result);\n\n            if (result.audio.length === 0) {\n              delete result.audio;\n            }\n\n            break;\n        }\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\n  var inspect = function (bytes, baseTimestamp) {\n    var isAacData = probe.aac.isLikelyAacData(bytes);\n    var result;\n\n    if (isAacData) {\n      result = inspectAac_(bytes);\n    } else {\n      result = inspectTs_(bytes);\n    }\n\n    if (!result || !result.audio && !result.video) {\n      return null;\n    }\n\n    adjustTimestamp_(result, baseTimestamp);\n    return result;\n  };\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  const wireTransmuxerEvents = function (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      const initArray = segment.initSegment;\n      segment.initSegment = {\n        data: initArray.buffer,\n        byteOffset: initArray.byteOffset,\n        byteLength: initArray.byteLength\n      };\n      const typedArray = segment.data;\n      segment.data = typedArray.buffer;\n      self.postMessage({\n        action: 'data',\n        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\n      });\n    });\n    transmuxer.on('videoSegmentTimingInfo', function (timingInfo) {\n      const 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\n      if (timingInfo.prependedContentDuration) {\n        videoSegmentTimingInfo.prependedContentDuration = clock$2.videoTsToSeconds(timingInfo.prependedContentDuration);\n      }\n\n      self.postMessage({\n        action: 'videoSegmentTimingInfo',\n        videoSegmentTimingInfo\n      });\n    });\n    transmuxer.on('audioSegmentTimingInfo', function (timingInfo) {\n      // Note that all times for [audio/video]SegmentTimingInfo events are in video clock\n      const 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\n      if (timingInfo.prependedContentDuration) {\n        audioSegmentTimingInfo.prependedContentDuration = clock$2.videoTsToSeconds(timingInfo.prependedContentDuration);\n      }\n\n      self.postMessage({\n        action: 'audioSegmentTimingInfo',\n        audioSegmentTimingInfo\n      });\n    });\n    transmuxer.on('id3Frame', function (id3Frame) {\n      self.postMessage({\n        action: 'id3Frame',\n        id3Frame\n      });\n    });\n    transmuxer.on('caption', function (caption) {\n      self.postMessage({\n        action: 'caption',\n        caption\n      });\n    });\n    transmuxer.on('trackinfo', function (trackInfo) {\n      self.postMessage({\n        action: 'trackinfo',\n        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\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\n\n  class MessageHandlers {\n    constructor(self, options) {\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\n\n    init() {\n      if (this.transmuxer) {\n        this.transmuxer.dispose();\n      }\n\n      this.transmuxer = new transmuxer.Transmuxer(this.options);\n      wireTransmuxerEvents(this.self, this.transmuxer);\n    }\n\n    pushMp4Captions(data) {\n      if (!this.captionParser) {\n        this.captionParser = new captionParser();\n        this.captionParser.init();\n      }\n\n      const segment = new Uint8Array(data.data, data.byteOffset, data.byteLength);\n      const 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    probeMp4StartTime({\n      timescales,\n      data\n    }) {\n      const startTime = probe$2.startTime(timescales, data);\n      this.self.postMessage({\n        action: 'probeMp4StartTime',\n        startTime,\n        data\n      }, [data.buffer]);\n    }\n\n    probeMp4Tracks({\n      data\n    }) {\n      const tracks = probe$2.tracks(data);\n      this.self.postMessage({\n        action: 'probeMp4Tracks',\n        tracks,\n        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\n    probeEmsgID3({\n      data,\n      offset\n    }) {\n      const id3Frames = probe$2.getEmsgID3(data, offset);\n      this.self.postMessage({\n        action: 'probeEmsgID3',\n        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\n    probeTs({\n      data,\n      baseStartTime\n    }) {\n      const tsStartTime = typeof baseStartTime === 'number' && !isNaN(baseStartTime) ? baseStartTime * clock$2.ONE_SECOND_IN_TS : void 0;\n      const timeInfo = tsInspector.inspect(data, tsStartTime);\n      let result = null;\n\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\n        if (result.hasVideo) {\n          result.videoStart = timeInfo.video[0].ptsTime;\n        }\n\n        if (result.hasAudio) {\n          result.audioStart = timeInfo.audio[0].ptsTime;\n        }\n      }\n\n      this.self.postMessage({\n        action: 'probeTs',\n        result,\n        data\n      }, [data.buffer]);\n    }\n\n    clearAllMp4Captions() {\n      if (this.captionParser) {\n        this.captionParser.clearAllCaptions();\n      }\n    }\n\n    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\n    push(data) {\n      // Cast array buffer to correct type for transmuxer\n      const 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\n    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\n    setTimestampOffset(data) {\n      const timestampOffset = data.timestampOffset || 0;\n      this.transmuxer.setBaseMediaDecodeTime(Math.round(clock$2.secondsToVideoTs(timestampOffset)));\n    }\n\n    setAudioAppendStart(data) {\n      this.transmuxer.setAudioAppendStart(Math.ceil(clock$2.secondsToVideoTs(data.appendStart)));\n    }\n\n    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\n    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    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    alignGopsWith(data) {\n      this.transmuxer.alignGopsWith(data.gopsToAlignWith.slice());\n    }\n\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\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\n    if (!this.messageHandlers) {\n      this.messageHandlers = new MessageHandlers(self);\n    }\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\nconst handleData_ = (event, transmuxedData, callback) => {\n  const {\n    type,\n    initSegment,\n    captions,\n    captionStreams,\n    metadata,\n    videoFrameDtsTime,\n    videoFramePtsTime\n  } = event.data.segment;\n  transmuxedData.buffer.push({\n    captions,\n    captionStreams,\n    metadata\n  });\n  const boxes = event.data.segment.boxes || {\n    data: event.data.segment.data\n  };\n  const result = {\n    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\n  if (typeof videoFrameDtsTime !== 'undefined') {\n    result.videoFrameDtsTime = videoFrameDtsTime;\n  }\n\n  if (typeof videoFramePtsTime !== 'undefined') {\n    result.videoFramePtsTime = videoFramePtsTime;\n  }\n\n  callback(result);\n};\nconst handleDone_ = ({\n  transmuxedData,\n  callback\n}) => {\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};\nconst handleGopInfo_ = (event, transmuxedData) => {\n  transmuxedData.gopInfo = event.data.gopInfo;\n};\nconst processTransmux = options => {\n  const {\n    transmuxer,\n    bytes,\n    audioAppendStart,\n    gopsToAlignWith,\n    remux,\n    onData,\n    onTrackInfo,\n    onAudioTimingInfo,\n    onVideoTimingInfo,\n    onVideoSegmentTimingInfo,\n    onAudioSegmentTimingInfo,\n    onId3,\n    onCaptions,\n    onDone,\n    onEndedTimeline,\n    onTransmuxerLog,\n    isEndOfTimeline\n  } = options;\n  const transmuxedData = {\n    buffer: []\n  };\n  let waitForEndedTimelineEvent = isEndOfTimeline;\n\n  const handleMessage = event => {\n    if (transmuxer.currentTransmux !== options) {\n      // disposed\n      return;\n    }\n\n    if (event.data.action === 'data') {\n      handleData_(event, transmuxedData, onData);\n    }\n\n    if (event.data.action === 'trackinfo') {\n      onTrackInfo(event.data.trackInfo);\n    }\n\n    if (event.data.action === 'gopInfo') {\n      handleGopInfo_(event, transmuxedData);\n    }\n\n    if (event.data.action === 'audioTimingInfo') {\n      onAudioTimingInfo(event.data.audioTimingInfo);\n    }\n\n    if (event.data.action === 'videoTimingInfo') {\n      onVideoTimingInfo(event.data.videoTimingInfo);\n    }\n\n    if (event.data.action === 'videoSegmentTimingInfo') {\n      onVideoSegmentTimingInfo(event.data.videoSegmentTimingInfo);\n    }\n\n    if (event.data.action === 'audioSegmentTimingInfo') {\n      onAudioSegmentTimingInfo(event.data.audioSegmentTimingInfo);\n    }\n\n    if (event.data.action === 'id3Frame') {\n      onId3([event.data.id3Frame], event.data.id3Frame.dispatchType);\n    }\n\n    if (event.data.action === 'caption') {\n      onCaptions(event.data.caption);\n    }\n\n    if (event.data.action === 'endedtimeline') {\n      waitForEndedTimelineEvent = false;\n      onEndedTimeline();\n    }\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\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\n    if (waitForEndedTimelineEvent) {\n      return;\n    }\n\n    transmuxer.onmessage = null;\n    handleDone_({\n      transmuxedData,\n      callback: onDone\n    });\n    /* eslint-disable no-use-before-define */\n\n    dequeue(transmuxer);\n    /* eslint-enable */\n  };\n\n  transmuxer.onmessage = handleMessage;\n\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\n  if (Array.isArray(gopsToAlignWith)) {\n    transmuxer.postMessage({\n      action: 'alignGopsWith',\n      gopsToAlignWith\n    });\n  }\n\n  if (typeof remux !== 'undefined') {\n    transmuxer.postMessage({\n      action: 'setRemux',\n      remux\n    });\n  }\n\n  if (bytes.byteLength) {\n    const buffer = bytes instanceof ArrayBuffer ? bytes : bytes.buffer;\n    const 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,\n      byteLength: bytes.byteLength\n    }, [buffer]);\n  }\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\n  transmuxer.postMessage({\n    action: 'flush'\n  });\n};\nconst dequeue = transmuxer => {\n  transmuxer.currentTransmux = null;\n\n  if (transmuxer.transmuxQueue.length) {\n    transmuxer.currentTransmux = transmuxer.transmuxQueue.shift();\n\n    if (typeof transmuxer.currentTransmux === 'function') {\n      transmuxer.currentTransmux();\n    } else {\n      processTransmux(transmuxer.currentTransmux);\n    }\n  }\n};\nconst processAction = (transmuxer, action) => {\n  transmuxer.postMessage({\n    action\n  });\n  dequeue(transmuxer);\n};\nconst enqueueAction = (action, transmuxer) => {\n  if (!transmuxer.currentTransmux) {\n    transmuxer.currentTransmux = action;\n    processAction(transmuxer, action);\n    return;\n  }\n\n  transmuxer.transmuxQueue.push(processAction.bind(null, transmuxer, action));\n};\nconst reset = transmuxer => {\n  enqueueAction('reset', transmuxer);\n};\nconst endTimeline = transmuxer => {\n  enqueueAction('endTimeline', transmuxer);\n};\nconst transmux = options => {\n  if (!options.transmuxer.currentTransmux) {\n    options.transmuxer.currentTransmux = options;\n    processTransmux(options);\n    return;\n  }\n\n  options.transmuxer.transmuxQueue.push(options);\n};\nconst createTransmuxer = options => {\n  const transmuxer = new TransmuxWorker();\n  transmuxer.currentTransmux = null;\n  transmuxer.transmuxQueue = [];\n  const term = transmuxer.terminate;\n\n  transmuxer.terminate = () => {\n    transmuxer.currentTransmux = null;\n    transmuxer.transmuxQueue.length = 0;\n    return term.call(transmuxer);\n  };\n\n  transmuxer.postMessage({\n    action: 'init',\n    options\n  });\n  return transmuxer;\n};\nvar segmentTransmuxer = {\n  reset,\n  endTimeline,\n  transmux,\n  createTransmuxer\n};\n\nconst workerCallback = function (options) {\n  const transmuxer = options.transmuxer;\n  const endAction = options.endAction || options.action;\n  const callback = options.callback;\n\n  const message = _extends({}, options, {\n    endAction: null,\n    transmuxer: null,\n    callback: null\n  });\n\n  const listenForEndEvent = event => {\n    if (event.data.action !== endAction) {\n      return;\n    }\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\n      if (options.data) {\n        options.data = event.data.data;\n      }\n    }\n\n    callback(event.data);\n  };\n\n  transmuxer.addEventListener('message', listenForEndEvent);\n\n  if (options.data) {\n    const isArrayBuffer = options.data instanceof ArrayBuffer;\n    message.byteOffset = isArrayBuffer ? 0 : options.data.byteOffset;\n    message.byteLength = options.data.byteLength;\n    const transfers = [isArrayBuffer ? options.data : options.data.buffer];\n    transmuxer.postMessage(message, transfers);\n  } else {\n    transmuxer.postMessage(message);\n  }\n};\n\nconst 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\nconst abortAll = activeXhrs => {\n  activeXhrs.forEach(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\n\nconst 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\n\nconst getProgressStats = progressEvent => {\n  const request = progressEvent.target;\n  const roundTripTime = Date.now() - request.requestTime;\n  const 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\n\nconst 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\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\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\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\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\n\nconst handleKeyResponse = (segment, objects, finishProcessingFn) => (error, request) => {\n  const response = request.response;\n  const errorObj = handleErrors(error, request);\n\n  if (errorObj) {\n    return finishProcessingFn(errorObj, segment);\n  }\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\n  const view = new DataView(response);\n  const bytes = new Uint32Array([view.getUint32(0), view.getUint32(4), view.getUint32(8), view.getUint32(12)]);\n\n  for (let i = 0; i < objects.length; i++) {\n    objects[i].bytes = bytes;\n  }\n\n  return finishProcessingFn(null, segment);\n};\n\nconst parseInitSegment = (segment, callback) => {\n  const 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    const uri = segment.map.resolvedUri || segment.map.uri;\n    return callback({\n      internal: true,\n      message: `Found unsupported ${type || 'unknown'} container for initialization segment at URL: ${uri}`,\n      code: REQUEST_ERRORS.FAILURE\n    });\n  }\n\n  workerCallback({\n    action: 'probeMp4Tracks',\n    data: segment.map.bytes,\n    transmuxer: segment.transmuxer,\n    callback: ({\n      tracks,\n      data\n    }) => {\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\n        segment.map.tracks[track.type] = track;\n\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\n\nconst handleInitSegmentResponse = ({\n  segment,\n  finishProcessingFn\n}) => (error, request) => {\n  const errorObj = handleErrors(error, request);\n\n  if (errorObj) {\n    return finishProcessingFn(errorObj, segment);\n  }\n\n  const 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\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\n    finishProcessingFn(null, segment);\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\n\nconst handleSegmentResponse = ({\n  segment,\n  finishProcessingFn,\n  responseType\n}) => (error, request) => {\n  const errorObj = handleErrors(error, request);\n\n  if (errorObj) {\n    return finishProcessingFn(errorObj, segment);\n  }\n\n  const newBytes = // 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\n  if (segment.key) {\n    segment.encryptedBytes = new Uint8Array(newBytes);\n  } else {\n    segment.bytes = new Uint8Array(newBytes);\n  }\n\n  return finishProcessingFn(null, segment);\n};\n\nconst transmuxAndNotify = ({\n  segment,\n  bytes,\n  trackInfoFn,\n  timingInfoFn,\n  videoSegmentTimingInfoFn,\n  audioSegmentTimingInfoFn,\n  id3Fn,\n  captionsFn,\n  isEndOfTimeline,\n  endedTimelineFn,\n  dataFn,\n  doneFn,\n  onTransmuxerLog\n}) => {\n  const fmp4Tracks = segment.map && segment.map.tracks || {};\n  const 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  let audioStartFn = timingInfoFn.bind(null, segment, 'audio', 'start');\n  const audioEndFn = timingInfoFn.bind(null, segment, 'audio', 'end');\n  let videoStartFn = timingInfoFn.bind(null, segment, 'video', 'start');\n  const videoEndFn = timingInfoFn.bind(null, segment, 'video', 'end');\n\n  const finish = () => transmux({\n    bytes,\n    transmuxer: segment.transmuxer,\n    audioAppendStart: segment.audioAppendStart,\n    gopsToAlignWith: segment.gopsToAlignWith,\n    remux: isMuxed,\n    onData: result => {\n      result.type = result.type === 'combined' ? 'video' : result.type;\n      dataFn(segment, result);\n    },\n    onTrackInfo: trackInfo => {\n      if (trackInfoFn) {\n        if (isMuxed) {\n          trackInfo.isMuxed = true;\n        }\n\n        trackInfoFn(segment, trackInfo);\n      }\n    },\n    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\n      if (audioEndFn && typeof audioTimingInfo.end !== 'undefined') {\n        audioEndFn(audioTimingInfo.end);\n      }\n    },\n    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\n      if (videoEndFn && typeof videoTimingInfo.end !== 'undefined') {\n        videoEndFn(videoTimingInfo.end);\n      }\n    },\n    onVideoSegmentTimingInfo: videoSegmentTimingInfo => {\n      videoSegmentTimingInfoFn(videoSegmentTimingInfo);\n    },\n    onAudioSegmentTimingInfo: audioSegmentTimingInfo => {\n      audioSegmentTimingInfoFn(audioSegmentTimingInfo);\n    },\n    onId3: (id3Frames, dispatchType) => {\n      id3Fn(segment, id3Frames, dispatchType);\n    },\n    onCaptions: captions => {\n      captionsFn(segment, [captions]);\n    },\n    isEndOfTimeline,\n    onEndedTimeline: () => {\n      endedTimelineFn();\n    },\n    onTransmuxerLog,\n    onDone: result => {\n      if (!doneFn) {\n        return;\n      }\n\n      result.type = result.type === 'combined' ? 'video' : result.type;\n      doneFn(null, segment, result);\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\n  workerCallback({\n    action: 'probeTs',\n    transmuxer: segment.transmuxer,\n    data: bytes,\n    baseStartTime: segment.baseStartTime,\n    callback: data => {\n      segment.bytes = bytes = data.data;\n      const probeResult = data.result;\n\n      if (probeResult) {\n        trackInfoFn(segment, {\n          hasAudio: probeResult.hasAudio,\n          hasVideo: probeResult.hasVideo,\n          isMuxed\n        });\n        trackInfoFn = null;\n      }\n\n      finish();\n    }\n  });\n};\n\nconst handleSegmentBytes = ({\n  segment,\n  bytes,\n  trackInfoFn,\n  timingInfoFn,\n  videoSegmentTimingInfoFn,\n  audioSegmentTimingInfoFn,\n  id3Fn,\n  captionsFn,\n  isEndOfTimeline,\n  endedTimelineFn,\n  dataFn,\n  doneFn,\n  onTransmuxerLog\n}) => {\n  let 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    const {\n      tracks\n    } = segment.map;\n    const 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\n    if (tracks.video && tracks.video.codec && tracks.video.codec !== 'encv') {\n      trackInfo.videoCodec = tracks.video.codec;\n    }\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\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    const 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\n      if (id3Frames && id3Frames.length) {\n        id3Fn(segment, id3Frames);\n      }\n\n      if (captions && captions.length) {\n        captionsFn(segment, captions);\n      }\n\n      doneFn(null, segment, {});\n    };\n\n    workerCallback({\n      action: 'probeMp4StartTime',\n      timescales: segment.map.timescales,\n      data: bytesAsUint8Array,\n      transmuxer: segment.transmuxer,\n      callback: ({\n        data,\n        startTime\n      }) => {\n        // transfer bytes back to us\n        bytes = data.buffer;\n        segment.bytes = bytesAsUint8Array = data;\n\n        if (trackInfo.hasAudio && !trackInfo.isMuxed) {\n          timingInfoFn(segment, 'audio', 'start', startTime);\n        }\n\n        if (trackInfo.hasVideo) {\n          timingInfoFn(segment, 'video', 'start', startTime);\n        }\n\n        workerCallback({\n          action: 'probeEmsgID3',\n          data: bytesAsUint8Array,\n          transmuxer: segment.transmuxer,\n          offset: startTime,\n          callback: ({\n            emsgData,\n            id3Frames\n          }) => {\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\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: 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\n  if (!segment.transmuxer) {\n    doneFn(null, segment, {});\n    return;\n  }\n\n  if (typeof segment.container === 'undefined') {\n    segment.container = detectContainerForBytes(bytesAsUint8Array);\n  }\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\n  transmuxAndNotify({\n    segment,\n    bytes,\n    trackInfoFn,\n    timingInfoFn,\n    videoSegmentTimingInfoFn,\n    audioSegmentTimingInfoFn,\n    id3Fn,\n    captionsFn,\n    isEndOfTimeline,\n    endedTimelineFn,\n    dataFn,\n    doneFn,\n    onTransmuxerLog\n  });\n};\n\nconst decrypt = function ({\n  id,\n  key,\n  encryptedBytes,\n  decryptionWorker\n}, callback) {\n  const decryptionHandler = event => {\n    if (event.data.source === id) {\n      decryptionWorker.removeEventListener('message', decryptionHandler);\n      const decrypted = event.data.decrypted;\n      callback(new Uint8Array(decrypted.bytes, decrypted.byteOffset, decrypted.byteLength));\n    }\n  };\n\n  decryptionWorker.addEventListener('message', decryptionHandler);\n  let keyBytes;\n\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\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\n\nconst decryptSegment = ({\n  decryptionWorker,\n  segment,\n  trackInfoFn,\n  timingInfoFn,\n  videoSegmentTimingInfoFn,\n  audioSegmentTimingInfoFn,\n  id3Fn,\n  captionsFn,\n  isEndOfTimeline,\n  endedTimelineFn,\n  dataFn,\n  doneFn,\n  onTransmuxerLog\n}) => {\n  decrypt({\n    id: segment.requestId,\n    key: segment.key,\n    encryptedBytes: segment.encryptedBytes,\n    decryptionWorker\n  }, decryptedBytes => {\n    segment.bytes = decryptedBytes;\n    handleSegmentBytes({\n      segment,\n      bytes: segment.bytes,\n      trackInfoFn,\n      timingInfoFn,\n      videoSegmentTimingInfoFn,\n      audioSegmentTimingInfoFn,\n      id3Fn,\n      captionsFn,\n      isEndOfTimeline,\n      endedTimelineFn,\n      dataFn,\n      doneFn,\n      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\n\nconst waitForCompletion = ({\n  activeXhrs,\n  decryptionWorker,\n  trackInfoFn,\n  timingInfoFn,\n  videoSegmentTimingInfoFn,\n  audioSegmentTimingInfoFn,\n  id3Fn,\n  captionsFn,\n  isEndOfTimeline,\n  endedTimelineFn,\n  dataFn,\n  doneFn,\n  onTransmuxerLog\n}) => {\n  let count = 0;\n  let didError = false;\n  return (error, segment) => {\n    if (didError) {\n      return;\n    }\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\n    count += 1;\n\n    if (count === activeXhrs.length) {\n      const segmentFinish = function () {\n        if (segment.encryptedBytes) {\n          return decryptSegment({\n            decryptionWorker,\n            segment,\n            trackInfoFn,\n            timingInfoFn,\n            videoSegmentTimingInfoFn,\n            audioSegmentTimingInfoFn,\n            id3Fn,\n            captionsFn,\n            isEndOfTimeline,\n            endedTimelineFn,\n            dataFn,\n            doneFn,\n            onTransmuxerLog\n          });\n        } // Otherwise, everything is ready just continue\n\n\n        handleSegmentBytes({\n          segment,\n          bytes: segment.bytes,\n          trackInfoFn,\n          timingInfoFn,\n          videoSegmentTimingInfoFn,\n          audioSegmentTimingInfoFn,\n          id3Fn,\n          captionsFn,\n          isEndOfTimeline,\n          endedTimelineFn,\n          dataFn,\n          doneFn,\n          onTransmuxerLog\n        });\n      }; // Keep track of when *all* of the requests have completed\n\n\n      segment.endOfAllRequests = Date.now();\n\n      if (segment.map && segment.map.encryptedBytes && !segment.map.bytes) {\n        return decrypt({\n          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        }, decryptedBytes => {\n          segment.map.bytes = decryptedBytes;\n          parseInitSegment(segment, parseError => {\n            if (parseError) {\n              abortAll(activeXhrs);\n              return doneFn(parseError, segment);\n            }\n\n            segmentFinish();\n          });\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\n\nconst handleLoadEnd = ({\n  loadendState,\n  abortFn\n}) => event => {\n  const request = event.target;\n\n  if (request.aborted && abortFn && !loadendState.calledAbortFn) {\n    abortFn();\n    loadendState.calledAbortFn = true;\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\n\nconst handleProgress = ({\n  segment,\n  progressFn,\n  trackInfoFn,\n  timingInfoFn,\n  videoSegmentTimingInfoFn,\n  audioSegmentTimingInfoFn,\n  id3Fn,\n  captionsFn,\n  isEndOfTimeline,\n  endedTimelineFn,\n  dataFn\n}) => event => {\n  const request = event.target;\n\n  if (request.aborted) {\n    return;\n  }\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\n  return progressFn(event, segment);\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\n\nconst mediaSegmentRequest = ({\n  xhr,\n  xhrOptions,\n  decryptionWorker,\n  segment,\n  abortFn,\n  progressFn,\n  trackInfoFn,\n  timingInfoFn,\n  videoSegmentTimingInfoFn,\n  audioSegmentTimingInfoFn,\n  id3Fn,\n  captionsFn,\n  isEndOfTimeline,\n  endedTimelineFn,\n  dataFn,\n  doneFn,\n  onTransmuxerLog\n}) => {\n  const activeXhrs = [];\n  const finishProcessingFn = waitForCompletion({\n    activeXhrs,\n    decryptionWorker,\n    trackInfoFn,\n    timingInfoFn,\n    videoSegmentTimingInfoFn,\n    audioSegmentTimingInfoFn,\n    id3Fn,\n    captionsFn,\n    isEndOfTimeline,\n    endedTimelineFn,\n    dataFn,\n    doneFn,\n    onTransmuxerLog\n  }); // optionally, request the decryption key\n\n  if (segment.key && !segment.key.bytes) {\n    const objects = [segment.key];\n\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\n    const keyRequestOptions = merge(xhrOptions, {\n      uri: segment.key.resolvedUri,\n      responseType: 'arraybuffer'\n    });\n    const keyRequestCallback = handleKeyResponse(segment, objects, finishProcessingFn);\n    const keyXhr = xhr(keyRequestOptions, keyRequestCallback);\n    activeXhrs.push(keyXhr);\n  } // optionally, request the associated media init segment\n\n\n  if (segment.map && !segment.map.bytes) {\n    const differentMapKey = segment.map.key && (!segment.key || segment.key.resolvedUri !== segment.map.key.resolvedUri);\n\n    if (differentMapKey) {\n      const mapKeyRequestOptions = merge(xhrOptions, {\n        uri: segment.map.key.resolvedUri,\n        responseType: 'arraybuffer'\n      });\n      const mapKeyRequestCallback = handleKeyResponse(segment, [segment.map.key], finishProcessingFn);\n      const mapKeyXhr = xhr(mapKeyRequestOptions, mapKeyRequestCallback);\n      activeXhrs.push(mapKeyXhr);\n    }\n\n    const initSegmentOptions = merge(xhrOptions, {\n      uri: segment.map.resolvedUri,\n      responseType: 'arraybuffer',\n      headers: segmentXhrHeaders(segment.map)\n    });\n    const initSegmentRequestCallback = handleInitSegmentResponse({\n      segment,\n      finishProcessingFn\n    });\n    const initSegmentXhr = xhr(initSegmentOptions, initSegmentRequestCallback);\n    activeXhrs.push(initSegmentXhr);\n  }\n\n  const segmentRequestOptions = merge(xhrOptions, {\n    uri: segment.part && segment.part.resolvedUri || segment.resolvedUri,\n    responseType: 'arraybuffer',\n    headers: segmentXhrHeaders(segment)\n  });\n  const segmentRequestCallback = handleSegmentResponse({\n    segment,\n    finishProcessingFn,\n    responseType: segmentRequestOptions.responseType\n  });\n  const segmentXhr = xhr(segmentRequestOptions, segmentRequestCallback);\n  segmentXhr.addEventListener('progress', handleProgress({\n    segment,\n    progressFn,\n    trackInfoFn,\n    timingInfoFn,\n    videoSegmentTimingInfoFn,\n    audioSegmentTimingInfoFn,\n    id3Fn,\n    captionsFn,\n    isEndOfTimeline,\n    endedTimelineFn,\n    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  const loadendState = {};\n  activeXhrs.forEach(activeXhr => {\n    activeXhr.addEventListener('loadend', handleLoadEnd({\n      loadendState,\n      abortFn\n    }));\n  });\n  return () => abortAll(activeXhrs);\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 */\nconst 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\nconst getCodecs = function (media) {\n  // if the codecs were explicitly specified, use them instead of the\n  // defaults\n  const mediaAttributes = media.attributes || {};\n\n  if (mediaAttributes.CODECS) {\n    return parseCodecs(mediaAttributes.CODECS);\n  }\n};\n\nconst isMaat = (main, media) => {\n  const mediaAttributes = media.attributes || {};\n  return main && main.mediaGroups && main.mediaGroups.AUDIO && mediaAttributes.AUDIO && main.mediaGroups.AUDIO[mediaAttributes.AUDIO];\n};\nconst isMuxed = (main, media) => {\n  if (!isMaat(main, media)) {\n    return true;\n  }\n\n  const mediaAttributes = media.attributes || {};\n  const audioGroup = main.mediaGroups.AUDIO[mediaAttributes.AUDIO];\n\n  for (const 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\n  return false;\n};\nconst unwrapCodecList = function (codecList) {\n  const codecs = {};\n  codecList.forEach(({\n    mediaType,\n    type,\n    details\n  }) => {\n    codecs[mediaType] = codecs[mediaType] || [];\n    codecs[mediaType].push(translateLegacyCodec(`${type}${details}`));\n  });\n  Object.keys(codecs).forEach(function (mediaType) {\n    if (codecs[mediaType].length > 1) {\n      logFn$1(`multiple ${mediaType} codecs found as attributes: ${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\n    codecs[mediaType] = codecs[mediaType][0];\n  });\n  return codecs;\n};\nconst codecCount = function (codecObj) {\n  let count = 0;\n\n  if (codecObj.audio) {\n    count++;\n  }\n\n  if (codecObj.video) {\n    count++;\n  }\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\nconst codecsForPlaylist = function (main, media) {\n  const mediaAttributes = media.attributes || {};\n  const 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      const defaultCodecs = unwrapCodecList(codecsFromDefault(main, mediaAttributes.AUDIO) || []);\n\n      if (defaultCodecs.audio) {\n        codecInfo.audio = defaultCodecs.audio;\n      }\n    }\n  }\n\n  return codecInfo;\n};\n\nconst logFn = logger('PlaylistSelector');\n\nconst representationToString = function (representation) {\n  if (!representation || !representation.playlist) {\n    return;\n  }\n\n  const 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\n\nconst safeGetComputedStyle = function (el, property) {\n  if (!el) {\n    return '';\n  }\n\n  const result = window$1.getComputedStyle(el);\n\n  if (!result) {\n    return '';\n  }\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\n\nconst stableSort = function (array, sortFn) {\n  const newArray = array.slice();\n  array.sort(function (left, right) {\n    const cmp = sortFn(left, right);\n\n    if (cmp === 0) {\n      return newArray.indexOf(left) - newArray.indexOf(right);\n    }\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\n\nconst comparePlaylistBandwidth = function (left, right) {\n  let leftBandwidth;\n  let rightBandwidth;\n\n  if (left.attributes.BANDWIDTH) {\n    leftBandwidth = left.attributes.BANDWIDTH;\n  }\n\n  leftBandwidth = leftBandwidth || window$1.Number.MAX_VALUE;\n\n  if (right.attributes.BANDWIDTH) {\n    rightBandwidth = right.attributes.BANDWIDTH;\n  }\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\nconst comparePlaylistResolution = function (left, right) {\n  let leftWidth;\n  let rightWidth;\n\n  if (left.attributes.RESOLUTION && left.attributes.RESOLUTION.width) {\n    leftWidth = left.attributes.RESOLUTION.width;\n  }\n\n  leftWidth = leftWidth || window$1.Number.MAX_VALUE;\n\n  if (right.attributes.RESOLUTION && right.attributes.RESOLUTION.width) {\n    rightWidth = right.attributes.RESOLUTION.width;\n  }\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\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\nlet simpleSelector = function (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\n  const options = {\n    bandwidth: playerBandwidth,\n    width: playerWidth,\n    height: playerHeight,\n    limitRenditionByPlayerDimensions\n  };\n  let 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\n  let sortedPlaylistReps = playlists.map(playlist => {\n    let bandwidth;\n    const width = playlist.attributes && playlist.attributes.RESOLUTION && playlist.attributes.RESOLUTION.width;\n    const 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,\n      width,\n      height,\n      playlist\n    };\n  });\n  stableSort(sortedPlaylistReps, (left, right) => left.bandwidth - right.bandwidth); // filter out any playlists that have been excluded due to\n  // incompatible configurations\n\n  sortedPlaylistReps = sortedPlaylistReps.filter(rep => !Playlist.isIncompatible(rep.playlist)); // filter out any playlists that have been disabled manually through the representations\n  // api or excluded temporarily due to playback errors.\n\n  let enabledPlaylistReps = sortedPlaylistReps.filter(rep => 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(rep => !Playlist.isDisabled(rep.playlist));\n  } // filter out any variant that has greater effective bitrate\n  // than the current estimated bandwidth\n\n\n  const bandwidthPlaylistReps = enabledPlaylistReps.filter(rep => rep.bandwidth * Config.BANDWIDTH_VARIANCE < playerBandwidth);\n  let 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  const bandwidthBestRep = bandwidthPlaylistReps.filter(rep => rep.bandwidth === highestRemainingBandwidthRep.bandwidth)[0]; // if we're not going to limit renditions by player size, make an early decision.\n\n  if (limitRenditionByPlayerDimensions === false) {\n    const chosenRep = bandwidthBestRep || enabledPlaylistReps[0] || sortedPlaylistReps[0];\n\n    if (chosenRep && chosenRep.playlist) {\n      let type = 'sortedPlaylistReps';\n\n      if (bandwidthBestRep) {\n        type = 'bandwidthBestRep';\n      }\n\n      if (enabledPlaylistReps[0]) {\n        type = 'enabledPlaylistReps';\n      }\n\n      logFn(`choosing ${representationToString(chosenRep)} using ${type} with options`, options);\n      return chosenRep.playlist;\n    }\n\n    logFn('could not choose a playlist with options', options);\n    return null;\n  } // filter out playlists without resolution information\n\n\n  const haveResolution = bandwidthPlaylistReps.filter(rep => rep.width && rep.height); // sort variants by resolution\n\n  stableSort(haveResolution, (left, right) => left.width - right.width); // if we have the exact resolution as the player use it\n\n  const resolutionBestRepList = haveResolution.filter(rep => rep.width === playerWidth && rep.height === playerHeight);\n  highestRemainingBandwidthRep = resolutionBestRepList[resolutionBestRepList.length - 1]; // ensure that we pick the highest bandwidth variant that have exact resolution\n\n  const resolutionBestRep = resolutionBestRepList.filter(rep => rep.bandwidth === highestRemainingBandwidthRep.bandwidth)[0];\n  let resolutionPlusOneList;\n  let resolutionPlusOneSmallest;\n  let 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(rep => rep.width > playerWidth || rep.height > playerHeight); // find all the variants have the same smallest resolution\n\n    resolutionPlusOneSmallest = resolutionPlusOneList.filter(rep => rep.width === resolutionPlusOneList[0].width && rep.height === resolutionPlusOneList[0].height); // 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(rep => rep.bandwidth === highestRemainingBandwidthRep.bandwidth)[0];\n  }\n\n  let 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    const leastPixelDiffList = haveResolution.map(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, (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\n      return left.pixelDiff - right.pixelDiff;\n    });\n    leastPixelDiffRep = leastPixelDiffList[0];\n  } // fallback chain of variants\n\n\n  const chosenRep = leastPixelDiffRep || resolutionPlusOneRep || resolutionBestRep || bandwidthBestRep || enabledPlaylistReps[0] || sortedPlaylistReps[0];\n\n  if (chosenRep && chosenRep.playlist) {\n    let type = 'sortedPlaylistReps';\n\n    if (leastPixelDiffRep) {\n      type = 'leastPixelDiffRep';\n    } else if (resolutionPlusOneRep) {\n      type = 'resolutionPlusOneRep';\n    } else if (resolutionBestRep) {\n      type = 'resolutionBestRep';\n    } else if (bandwidthBestRep) {\n      type = 'bandwidthBestRep';\n    } else if (enabledPlaylistReps[0]) {\n      type = 'enabledPlaylistReps';\n    }\n\n    logFn(`choosing ${representationToString(chosenRep)} using ${type} with options`, options);\n    return chosenRep.playlist;\n  }\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\nconst lastBandwidthSelector = function () {\n  const 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\nconst movingAverageBandwidthSelector = function (decay) {\n  let average = -1;\n  let lastSystemBandwidth = -1;\n\n  if (decay < 0 || decay > 1) {\n    throw new Error('Moving average bandwidth decay must be between 0 and 1.');\n  }\n\n  return function () {\n    const pixelRatio = this.useDevicePixelRatio ? window$1.devicePixelRatio || 1 : 1;\n\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\n    if (this.systemBandwidth > 0 && this.systemBandwidth !== lastSystemBandwidth) {\n      average = decay * this.systemBandwidth + (1 - decay) * average;\n      lastSystemBandwidth = this.systemBandwidth;\n    }\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\nconst minRebufferMaxBandwidthSelector = function (settings) {\n  const {\n    main,\n    currentTime,\n    bandwidth,\n    duration,\n    segmentDuration,\n    timeUntilRebuffer,\n    currentTimeline,\n    syncController\n  } = settings; // filter out any playlists that have been excluded due to\n  // incompatible configurations\n\n  const compatiblePlaylists = main.playlists.filter(playlist => !Playlist.isIncompatible(playlist)); // filter out any playlists that have been disabled manually through the representations\n  // api or excluded temporarily due to playback errors.\n\n  let enabledPlaylists = compatiblePlaylists.filter(Playlist.isEnabled);\n\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(playlist => !Playlist.isDisabled(playlist));\n  }\n\n  const bandwidthPlaylists = enabledPlaylists.filter(Playlist.hasAttribute.bind(null, 'BANDWIDTH'));\n  const rebufferingEstimates = bandwidthPlaylists.map(playlist => {\n    const 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    const numRequests = syncPoint ? 1 : 2;\n    const requestTimeEstimate = Playlist.estimateSegmentRequestTime(segmentDuration, bandwidth, playlist);\n    const rebufferingImpact = requestTimeEstimate * numRequests - timeUntilRebuffer;\n    return {\n      playlist,\n      rebufferingImpact\n    };\n  });\n  const noRebufferingPlaylists = rebufferingEstimates.filter(estimate => estimate.rebufferingImpact <= 0); // Sort by bandwidth DESC\n\n  stableSort(noRebufferingPlaylists, (a, b) => comparePlaylistBandwidth(b.playlist, a.playlist));\n\n  if (noRebufferingPlaylists.length) {\n    return noRebufferingPlaylists[0];\n  }\n\n  stableSort(rebufferingEstimates, (a, b) => a.rebufferingImpact - b.rebufferingImpact);\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\nconst lowestBitrateCompatibleVariantSelector = function () {\n  // filter out any playlists that have been excluded due to\n  // incompatible configurations or playback errors\n  const playlists = this.playlists.main.playlists.filter(Playlist.isEnabled); // Sort ascending by bitrate\n\n  stableSort(playlists, (a, b) => comparePlaylistBandwidth(a, b)); // 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  const playlistsWithVideo = playlists.filter(playlist => !!codecsForPlaylist(this.playlists.main, playlist).video);\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 */\nconst concatSegments = segmentObj => {\n  let offset = 0;\n  let tempBuffer;\n\n  if (segmentObj.bytes) {\n    tempBuffer = new Uint8Array(segmentObj.bytes); // combine the individual segments into one large typed-array\n\n    segmentObj.segments.forEach(segment => {\n      tempBuffer.set(segment, offset);\n      offset += segment.byteLength;\n    });\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\nconst createCaptionsTrackIfNotExists = function (inbandTextTracks, tech, captionStream) {\n  if (!inbandTextTracks[captionStream]) {\n    tech.trigger({\n      type: 'usage',\n      name: 'vhs-608'\n    });\n    let 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\n    const track = tech.textTracks().getTrackById(instreamId);\n\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      const captionServices = tech.options_.vhs && tech.options_.vhs.captionServices || {};\n      let label = captionStream;\n      let language = captionStream;\n      let def = false;\n      const captionService = captionServices[instreamId];\n\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\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,\n        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\nconst addCaptionData = function ({\n  inbandTextTracks,\n  captionArray,\n  timestampOffset\n}) {\n  if (!captionArray) {\n    return;\n  }\n\n  const Cue = window$1.WebKitDataCue || window$1.VTTCue;\n  captionArray.forEach(caption => {\n    const 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(value => {\n        const 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\nconst deprecateOldCue = function (cue) {\n  Object.defineProperties(cue.frame, {\n    id: {\n      get() {\n        videojs.log.warn('cue.frame.id is deprecated. Use cue.value.key instead.');\n        return cue.value.key;\n      }\n\n    },\n    value: {\n      get() {\n        videojs.log.warn('cue.frame.value is deprecated. Use cue.value.data instead.');\n        return cue.value.data;\n      }\n\n    },\n    privateData: {\n      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/**\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\n\nconst addMetadata = ({\n  inbandTextTracks,\n  metadataArray,\n  timestampOffset,\n  videoDuration\n}) => {\n  if (!metadataArray) {\n    return;\n  }\n\n  const Cue = window$1.WebKitDataCue || window$1.VTTCue;\n  const metadataTrack = inbandTextTracks.metadataTrack_;\n\n  if (!metadataTrack) {\n    return;\n  }\n\n  metadataArray.forEach(metadata => {\n    const 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\n    if (!metadata.frames || !metadata.frames.length) {\n      return;\n    }\n\n    metadata.frames.forEach(frame => {\n      const 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\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\n  const cues = metadataTrack.cues;\n  const cuesArray = []; // Create a copy of the TextTrackCueList...\n  // ...disregarding cues with a falsey value\n\n  for (let i = 0; i < cues.length; i++) {\n    if (cues[i]) {\n      cuesArray.push(cues[i]);\n    }\n  } // Group cues by their startTime value\n\n\n  const cuesGroupedByStartTime = cuesArray.reduce((obj, cue) => {\n    const timeSlot = obj[cue.startTime] || [];\n    timeSlot.push(cue);\n    obj[cue.startTime] = timeSlot;\n    return obj;\n  }, {}); // Sort startTimes by ascending order\n\n  const sortedStartTimes = Object.keys(cuesGroupedByStartTime).sort((a, b) => Number(a) - Number(b)); // Map each cue group's endTime to the next group's startTime\n\n  sortedStartTimes.forEach((startTime, idx) => {\n    const cueGroup = cuesGroupedByStartTime[startTime];\n    const finiteDuration = isFinite(videoDuration) ? videoDuration : startTime;\n    const nextTime = Number(sortedStartTimes[idx + 1]) || finiteDuration; // Map each cue's endTime the next group's startTime\n\n    cueGroup.forEach(cue => {\n      cue.endTime = nextTime;\n    });\n  });\n}; // object for mapping daterange attributes\n\nconst 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};\nconst 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\nconst addDateRangeMetadata = ({\n  inbandTextTracks,\n  dateRanges\n}) => {\n  const metadataTrack = inbandTextTracks.metadataTrack_;\n\n  if (!metadataTrack) {\n    return;\n  }\n\n  const Cue = window$1.WebKitDataCue || window$1.VTTCue;\n  dateRanges.forEach(dateRange => {\n    // we generate multiple cues for each date range with different attributes\n    for (const key of Object.keys(dateRange)) {\n      if (dateRangeKeysToOmit.has(key)) {\n        continue;\n      }\n\n      const 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\n      if (key === 'scte35Out' || key === 'scte35In') {\n        cue.value.data = new Uint8Array(cue.value.data.match(/[\\da-f]{2}/gi)).buffer;\n      }\n\n      metadataTrack.addCue(cue);\n    }\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\nconst createMetadataTrackIfNotExists = (inbandTextTracks, dispatchType, tech) => {\n  if (inbandTextTracks.metadataTrack_) {\n    return;\n  }\n\n  inbandTextTracks.metadataTrack_ = tech.addRemoteTextTrack({\n    kind: 'metadata',\n    label: 'Timed Metadata'\n  }, false).track;\n\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\nconst removeCuesFromTrack = function (start, end, track) {\n  let i;\n  let cue;\n\n  if (!track) {\n    return;\n  }\n\n  if (!track.cues) {\n    return;\n  }\n\n  i = track.cues.length;\n\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\nconst removeDuplicateCuesFromTrack = function (track) {\n  const cues = track.cues;\n\n  if (!cues) {\n    return;\n  }\n\n  const uniqueCues = {};\n\n  for (let i = cues.length - 1; i >= 0; i--) {\n    const cue = cues[i];\n    const cueKey = `${cue.startTime}-${cue.endTime}-${cue.text}`;\n\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\nconst 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\n  const currentTimePts = Math.ceil((currentTime - mapping + 3) * ONE_SECOND_IN_TS);\n  let i;\n\n  for (i = 0; i < buffer.length; i++) {\n    if (buffer[i].pts > currentTimePts) {\n      break;\n    }\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\nconst updateGopBuffer = (buffer, gops, replace) => {\n  if (!gops.length) {\n    return buffer;\n  }\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\n  const start = gops[0].pts;\n  let i = 0;\n\n  for (i; i < buffer.length; i++) {\n    if (buffer[i].pts >= start) {\n      break;\n    }\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\nconst removeGopBuffer = (buffer, start, end, mapping) => {\n  const startPts = Math.ceil((start - mapping) * ONE_SECOND_IN_TS);\n  const endPts = Math.ceil((end - mapping) * ONE_SECOND_IN_TS);\n  const updatedBuffer = buffer.slice();\n  let i = buffer.length;\n\n  while (i--) {\n    if (buffer[i].pts <= endPts) {\n      break;\n    }\n  }\n\n  if (i === -1) {\n    // no removal because end of remove range is before start of buffer\n    return updatedBuffer;\n  }\n\n  let j = i + 1;\n\n  while (j--) {\n    if (buffer[j].pts <= startPts) {\n      break;\n    }\n  } // clamp remove range start to 0 index\n\n\n  j = Math.max(j, 0);\n  updatedBuffer.splice(j, i - j + 1);\n  return updatedBuffer;\n};\n\nconst shallowEqual = function (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\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\n  const akeys = Object.keys(a).sort();\n  const bkeys = Object.keys(b).sort(); // different number of keys, not equal\n\n  if (akeys.length !== bkeys.length) {\n    return false;\n  }\n\n  for (let i = 0; i < akeys.length; i++) {\n    const key = akeys[i]; // different sorted keys, not equal\n\n    if (key !== bkeys[i]) {\n      return false;\n    } // different values, not equal\n\n\n    if (a[key] !== b[key]) {\n      return false;\n    }\n  }\n\n  return true;\n};\n\n// https://www.w3.org/TR/WebIDL-1/#quotaexceedederror\nconst 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\nconst getSyncSegmentCandidate = function (currentTimeline, segments, targetTime) {\n  segments = segments || [];\n  const timelineSegments = [];\n  let time = 0;\n\n  for (let i = 0; i < segments.length; i++) {\n    const segment = segments[i];\n\n    if (currentTimeline === segment.timeline) {\n      timelineSegments.push(i);\n      time += segment.duration;\n\n      if (time > targetTime) {\n        return i;\n      }\n    }\n  }\n\n  if (timelineSegments.length === 0) {\n    return 0;\n  } // default to the last timeline segment\n\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\nconst MIN_BACK_BUFFER = 1; // in ms\n\nconst CHECK_BUFFER_DELAY = 500;\n\nconst finite = num => typeof num === 'number' && isFinite(num); // 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\n\nconst MIN_SEGMENT_DURATION_TO_SAVE_STATS = 1 / 60;\nconst 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\n  if (!trackInfo.hasAudio && !trackInfo.hasVideo) {\n    return 'Neither audio nor video found in segment.';\n  }\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\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\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\nconst 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  let trimTime = currentTime - Config.BACK_BUFFER_LENGTH;\n\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\n  const maxTrimTime = currentTime - targetDuration;\n  return Math.min(maxTrimTime, trimTime);\n};\nconst segmentInfoString = segmentInfo => {\n  const {\n    startOfSegment,\n    duration,\n    segment,\n    part,\n    playlist: {\n      mediaSequence: seq,\n      id,\n      segments = []\n    },\n    mediaIndex: index,\n    partIndex,\n    timeline\n  } = segmentInfo;\n  const segmentLen = segments.length - 1;\n  let selection = 'mediaIndex/partIndex increment';\n\n  if (segmentInfo.getMediaInfoForTime) {\n    selection = `getMediaInfoForTime (${segmentInfo.getMediaInfoForTime})`;\n  } else if (segmentInfo.isSyncRequest) {\n    selection = 'getSyncSegmentCandidate (isSyncRequest)';\n  }\n\n  if (segmentInfo.independent) {\n    selection += ` with independent ${segmentInfo.independent}`;\n  }\n\n  const hasPartIndex = typeof partIndex === 'number';\n  const name = segmentInfo.segment.uri ? 'segment' : 'pre-segment';\n  const zeroBasedPartCount = hasPartIndex ? getKnownPartCount({\n    preloadSegment: segment\n  }) - 1 : 0;\n  return `${name} [${seq + index}/${seq + segmentLen}]` + (hasPartIndex ? ` part [${partIndex}/${zeroBasedPartCount}]` : '') + ` segment start/end [${segment.start} => ${segment.end}]` + (hasPartIndex ? ` part start/end [${part.start} => ${part.end}]` : '') + ` startOfSegment [${startOfSegment}]` + ` duration [${duration}]` + ` timeline [${timeline}]` + ` selected by [${selection}]` + ` playlist [${id}]`;\n};\n\nconst timingInfoPropertyForMedia = mediaType => `${mediaType}TimingInfo`;\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} 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\n\nconst timestampOffsetForSegment = ({\n  segmentTimeline,\n  currentTimeline,\n  startOfSegment,\n  buffered,\n  overrideCheck\n}) => {\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  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\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\n  return buffered.length ? buffered.end(buffered.length - 1) : 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\nconst shouldWaitForTimelineChange = ({\n  timelineChangeController,\n  currentTimeline,\n  segmentTimeline,\n  loaderType,\n  audioDisabled\n}) => {\n  if (currentTimeline === segmentTimeline) {\n    return false;\n  }\n\n  if (loaderType === 'audio') {\n    const 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\n  if (loaderType === 'main' && audioDisabled) {\n    const 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\n    return true;\n  }\n\n  return false;\n};\nconst mediaDuration = timingInfos => {\n  let maxDuration = 0;\n  ['video', 'audio'].forEach(function (type) {\n    const typeTimingInfo = timingInfos[`${type}TimingInfo`];\n\n    if (!typeTimingInfo) {\n      return;\n    }\n\n    const {\n      start,\n      end\n    } = typeTimingInfo;\n    let duration;\n\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\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\n  return maxDuration;\n};\nconst segmentTooLong = ({\n  segmentDuration,\n  maxDuration\n}) => {\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\n  return Math.round(segmentDuration) > maxDuration + TIME_FUDGE_FACTOR;\n};\nconst 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\n  const 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\n  const targetDuration = segmentInfo.playlist.targetDuration;\n  const isSegmentWayTooLong = segmentTooLong({\n    segmentDuration,\n    maxDuration: targetDuration * 2\n  });\n  const isSegmentSlightlyTooLong = segmentTooLong({\n    segmentDuration,\n    maxDuration: targetDuration\n  });\n  const segmentTooLongMessage = `Segment with index ${segmentInfo.mediaIndex} ` + `from playlist ${segmentInfo.playlist.id} ` + `has a duration of ${segmentDuration} ` + `when the reported duration is ${segmentInfo.duration} ` + `and the target duration is ${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\n  if (isSegmentWayTooLong || isSegmentSlightlyTooLong) {\n    return {\n      severity: isSegmentWayTooLong ? 'warn' : 'info',\n      message: segmentTooLongMessage\n    };\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 */\n\nclass SegmentLoader extends videojs.EventTarget {\n  constructor(settings, options = {}) {\n    super(); // check pre-conditions\n\n    if (!settings) {\n      throw new TypeError('Initialization settings are required');\n    }\n\n    if (typeof settings.currentTime !== 'function') {\n      throw new TypeError('No currentTime getter specified');\n    }\n\n    if (!settings.mediaSource) {\n      throw new TypeError('No MediaSource specified');\n    } // public properties\n\n\n    this.bandwidth = settings.bandwidth;\n    this.throughput = {\n      rate: 0,\n      count: 0\n    };\n    this.roundTrip = NaN;\n    this.resetStats_();\n    this.mediaIndex = null;\n    this.partIndex = null; // private settings\n\n    this.hasPlayed_ = settings.hasPlayed;\n    this.currentTime_ = settings.currentTime;\n    this.seekable_ = settings.seekable;\n    this.seeking_ = settings.seeking;\n    this.duration_ = settings.duration;\n    this.mediaSource_ = settings.mediaSource;\n    this.vhs_ = settings.vhs;\n    this.loaderType_ = settings.loaderType;\n    this.currentMediaInfo_ = void 0;\n    this.startingMediaInfo_ = void 0;\n    this.segmentMetadataTrack_ = settings.segmentMetadataTrack;\n    this.goalBufferLength_ = settings.goalBufferLength;\n    this.sourceType_ = settings.sourceType;\n    this.sourceUpdater_ = settings.sourceUpdater;\n    this.inbandTextTracks_ = settings.inbandTextTracks;\n    this.state_ = 'INIT';\n    this.timelineChangeController_ = settings.timelineChangeController;\n    this.shouldSaveSegmentTimingInfo_ = true;\n    this.parse708captions_ = settings.parse708captions;\n    this.useDtsForTimestampOffset_ = settings.useDtsForTimestampOffset;\n    this.captionServices_ = settings.captionServices;\n    this.exactManifestTimings = settings.exactManifestTimings;\n    this.addMetadataToTextTrack = settings.addMetadataToTextTrack; // private instance variables\n\n    this.checkBufferTimeout_ = null;\n    this.error_ = void 0;\n    this.currentTimeline_ = -1;\n    this.shouldForceTimestampOffsetAfterResync_ = false;\n    this.pendingSegment_ = null;\n    this.xhrOptions_ = null;\n    this.pendingSegments_ = [];\n    this.audioDisabled_ = false;\n    this.isPendingTimestampOffset_ = false; // TODO possibly move gopBuffer and timeMapping info to a separate controller\n\n    this.gopBuffer_ = [];\n    this.timeMapping_ = 0;\n    this.safeAppend_ = false;\n    this.appendInitSegment_ = {\n      audio: true,\n      video: true\n    };\n    this.playlistOfLastInitSegment_ = {\n      audio: null,\n      video: null\n    };\n    this.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    this.loadQueue_ = [];\n    this.metadataQueue_ = {\n      id3: [],\n      caption: []\n    };\n    this.waitingOnRemove_ = false;\n    this.quotaExceededErrorRetryTimeout_ = null; // Fragmented mp4 playback\n\n    this.activeInitSegmentId_ = null;\n    this.initSegments_ = {}; // HLSe playback\n\n    this.cacheEncryptionKeys_ = settings.cacheEncryptionKeys;\n    this.keyCache_ = {};\n    this.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    this.syncController_ = settings.syncController;\n    this.syncPoint_ = {\n      segmentIndex: 0,\n      time: 0\n    };\n    this.transmuxer_ = this.createTransmuxer_();\n\n    this.triggerSyncInfoUpdate_ = () => this.trigger('syncinfoupdate');\n\n    this.syncController_.on('syncinfoupdate', this.triggerSyncInfoUpdate_);\n    this.mediaSource_.addEventListener('sourceopen', () => {\n      if (!this.isEndOfStream_()) {\n        this.ended_ = false;\n      }\n    }); // ...for determining the fetch location\n\n    this.fetchAtBuffer_ = false;\n    this.logger_ = logger(`SegmentLoader[${this.loaderType_}]`);\n    Object.defineProperty(this, 'state', {\n      get() {\n        return this.state_;\n      },\n\n      set(newState) {\n        if (newState !== this.state_) {\n          this.logger_(`${this.state_} -> ${newState}`);\n          this.state_ = newState;\n          this.trigger('statechange');\n        }\n      }\n\n    });\n    this.sourceUpdater_.on('ready', () => {\n      if (this.hasEnoughInfoToAppend_()) {\n        this.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 (this.loaderType_ === 'main') {\n      this.timelineChangeController_.on('pendingtimelinechange', () => {\n        if (this.hasEnoughInfoToAppend_()) {\n          this.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\n    if (this.loaderType_ === 'audio') {\n      this.timelineChangeController_.on('timelinechange', () => {\n        if (this.hasEnoughInfoToLoad_()) {\n          this.processLoadQueue_();\n        }\n\n        if (this.hasEnoughInfoToAppend_()) {\n          this.processCallQueue_();\n        }\n      });\n    }\n  }\n\n  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\n  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\n  dispose() {\n    this.trigger('dispose');\n    this.state = 'DISPOSED';\n    this.pause();\n    this.abort_();\n\n    if (this.transmuxer_) {\n      this.transmuxer_.terminate();\n    }\n\n    this.resetStats_();\n\n    if (this.checkBufferTimeout_) {\n      window$1.clearTimeout(this.checkBufferTimeout_);\n    }\n\n    if (this.syncController_ && this.triggerSyncInfoUpdate_) {\n      this.syncController_.off('syncinfoupdate', this.triggerSyncInfoUpdate_);\n    }\n\n    this.off();\n  }\n\n  setAudio(enable) {\n    this.audioDisabled_ = !enable;\n\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\n  abort() {\n    if (this.state !== 'WAITING') {\n      if (this.pendingSegment_) {\n        this.pendingSegment_ = null;\n      }\n\n      return;\n    }\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\n  abort_() {\n    if (this.pendingSegment_ && this.pendingSegment_.abortRequests) {\n      this.pendingSegment_.abortRequests();\n    } // clear out the segment being processed\n\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  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\n    if (!this.pendingSegment_ || this.pendingSegment_.requestId !== requestId) {\n      return true;\n    }\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\n  error(error) {\n    if (typeof error !== 'undefined') {\n      this.logger_('error occurred:', error);\n      this.error_ = error;\n    }\n\n    this.pendingSegment_ = null;\n    return this.error_;\n  }\n\n  endOfStream() {\n    this.ended_ = true;\n\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\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\n  buffered_() {\n    const trackInfo = this.getMediaInfo_();\n\n    if (!this.sourceUpdater_ || !trackInfo) {\n      return createTimeRanges();\n    }\n\n    if (this.loaderType_ === 'main') {\n      const {\n        hasAudio,\n        hasVideo,\n        isMuxed\n      } = trackInfo;\n\n      if (hasVideo && hasAudio && !this.audioDisabled_ && !isMuxed) {\n        return this.sourceUpdater_.buffered();\n      }\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\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\n  initSegmentForMap(map, set = false) {\n    if (!map) {\n      return null;\n    }\n\n    const id = initSegmentId(map);\n    let storedMap = this.initSegments_[id];\n\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\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\n  segmentKey(key, set = false) {\n    if (!key) {\n      return null;\n    }\n\n    const id = segmentKeyId(key);\n    let 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\n    const result = {\n      resolvedUri: (storedKey || key).resolvedUri\n    };\n\n    if (storedKey) {\n      result.bytes = storedKey.bytes;\n    }\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\n  couldBeginLoading_() {\n    return this.playlist_ && !this.paused();\n  }\n  /**\n   * load a playlist and start to fill the buffer\n   */\n\n\n  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\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\n    if (!this.couldBeginLoading_() || this.state !== 'READY' && this.state !== 'INIT') {\n      return;\n    }\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\n  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\n  playlist(newPlaylist, options = {}) {\n    if (!newPlaylist) {\n      return;\n    }\n\n    const oldPlaylist = this.playlist_;\n    const 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\n    let oldId = null;\n\n    if (oldPlaylist) {\n      if (oldPlaylist.id) {\n        oldId = oldPlaylist.id;\n      } else if (oldPlaylist.uri) {\n        oldId = oldPlaylist.uri;\n      }\n    }\n\n    this.logger_(`playlist update [${oldId} => ${newPlaylist.id || newPlaylist.uri}]`);\n    this.syncController_.updateMediaSequenceMap(newPlaylist, this.currentTime_(), this.loaderType_); // 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\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        const isLLHLS = !newPlaylist.endList && typeof newPlaylist.partTargetDuration === 'number';\n\n        if (isLLHLS) {\n          this.resetLoader();\n        } else {\n          this.resyncLoader();\n        }\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\n    const mediaSequenceDiff = newPlaylist.mediaSequence - oldPlaylist.mediaSequence;\n    this.logger_(`live window shift [${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        const 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          const mediaIndex = this.mediaIndex;\n          this.logger_(`currently processing part (index ${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\n    if (segmentInfo) {\n      segmentInfo.mediaIndex -= mediaSequenceDiff;\n\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\n        if (segmentInfo.partIndex >= 0 && segmentInfo.segment.parts) {\n          segmentInfo.part = segmentInfo.segment.parts[segmentInfo.partIndex];\n        }\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\n  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\n  paused() {\n    return this.checkBufferTimeout_ === null;\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\n  resetEverything(done) {\n    this.ended_ = false;\n    this.activeInitSegmentId_ = null;\n    this.appendInitSegment_ = {\n      audio: true,\n      video: true\n    };\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\n  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\n  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\n    this.mediaIndex = null;\n    this.partIndex = null;\n    this.syncPoint_ = null;\n    this.isPendingTimestampOffset_ = false;\n    this.shouldForceTimestampOffsetAfterResync_ = true;\n    this.callQueue_ = [];\n    this.loadQueue_ = [];\n    this.metadataQueue_.id3 = [];\n    this.metadataQueue_.caption = [];\n    this.abort();\n\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\n  remove(start, end, done = () => {}, force = 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\n    if (end <= start) {\n      this.logger_('skipping remove because end ${end} is <= start ${start}');\n      return;\n    }\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\n    let removesRemaining = 1;\n\n    const removeFinished = () => {\n      removesRemaining--;\n\n      if (removesRemaining === 0) {\n        done();\n      }\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\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\n    for (const track in this.inbandTextTracks_) {\n      removeCuesFromTrack(start, end, this.inbandTextTracks_[track]);\n    }\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\n  monitorBuffer_() {\n    if (this.checkBufferTimeout_) {\n      window$1.clearTimeout(this.checkBufferTimeout_);\n    }\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\n  monitorBufferTick_() {\n    if (this.state === 'READY') {\n      this.fillBuffer_();\n    }\n\n    if (this.checkBufferTimeout_) {\n      window$1.clearTimeout(this.checkBufferTimeout_);\n    }\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\n  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\n    const segmentInfo = this.chooseNextRequest_();\n\n    if (!segmentInfo) {\n      return;\n    }\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\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\n  isEndOfStream_(mediaIndex = this.mediaIndex, playlist = this.playlist_, partIndex = this.partIndex) {\n    if (!playlist || !this.mediaSource_) {\n      return false;\n    }\n\n    const segment = typeof mediaIndex === 'number' && playlist.segments[mediaIndex]; // mediaIndex is zero based but length is 1 based\n\n    const appendedLastSegment = mediaIndex + 1 === playlist.segments.length; // true if there are no parts, or this is the last part.\n\n    const 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\n  chooseNextRequest_() {\n    const buffered = this.buffered_();\n    const bufferedEnd = lastBufferedEnd(buffered) || 0;\n    const bufferedTime = timeAheadOf(buffered, this.currentTime_());\n    const preloaded = !this.hasPlayed_() && bufferedTime >= 1;\n    const haveEnoughBuffer = bufferedTime >= this.goalBufferLength_();\n    const 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\n    this.syncPoint_ = this.syncPoint_ || this.syncController_.getSyncPoint(this.playlist_, this.duration_(), this.currentTimeline_, this.currentTime_(), this.loaderType_);\n    const next = {\n      partIndex: null,\n      mediaIndex: null,\n      startOfSegment: null,\n      playlist: this.playlist_,\n      isSyncRequest: Boolean(!this.syncPoint_)\n    };\n\n    if (next.isSyncRequest) {\n      next.mediaIndex = getSyncSegmentCandidate(this.currentTimeline_, segments, bufferedEnd);\n      this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${next.mediaIndex}`);\n    } else if (this.mediaIndex !== null) {\n      const segment = segments[this.mediaIndex];\n      const partIndex = typeof this.partIndex === 'number' ? this.partIndex : -1;\n      next.startOfSegment = segment.end ? segment.end : bufferedEnd;\n\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      const {\n        segmentIndex,\n        startTime,\n        partIndex\n      } = 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      next.getMediaInfoForTime = this.fetchAtBuffer_ ? `bufferedEnd ${bufferedEnd}` : `currentTime ${this.currentTime_()}`;\n      next.mediaIndex = segmentIndex;\n      next.startOfSegment = startTime;\n      next.partIndex = partIndex;\n      this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${next.mediaIndex} `);\n    }\n\n    const nextSegment = segments[next.mediaIndex];\n    let 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\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\n    const 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        const lastSegment = segments[next.mediaIndex - 1];\n        const lastSegmentLastPart = lastSegment.parts && lastSegment.parts.length && lastSegment.parts[lastSegment.parts.length - 1];\n\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\n    const 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\n    if (this.shouldForceTimestampOffsetAfterResync_) {\n      this.shouldForceTimestampOffsetAfterResync_ = false;\n      next.forceTimestampOffset = true;\n      this.logger_('choose next request. Force timestamp offset after loader resync');\n    }\n\n    return this.generateSegmentInfo_(next);\n  }\n\n  generateSegmentInfo_(options) {\n    const {\n      independent,\n      playlist,\n      mediaIndex,\n      startOfSegment,\n      isSyncRequest,\n      partIndex,\n      forceTimestampOffset,\n      getMediaInfoForTime\n    } = options;\n    const segment = playlist.segments[mediaIndex];\n    const part = typeof partIndex === 'number' && segment.parts[partIndex];\n    const 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,\n      partIndex: part ? partIndex : null,\n      // whether or not to update the SegmentLoader's state with this\n      // segment's mediaIndex\n      isSyncRequest,\n      startOfSegment,\n      // the segment's playlist\n      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,\n      part,\n      byteLength: 0,\n      transmuxer: this.transmuxer_,\n      // type of getMediaInfoForTime that was used to get this segment\n      getMediaInfoForTime,\n      independent\n    };\n    const overrideCheck = typeof forceTimestampOffset !== 'undefined' ? forceTimestampOffset : this.isPendingTimestampOffset_;\n    segmentInfo.timestampOffset = this.timestampOffsetForSegment_({\n      segmentTimeline: segment.timeline,\n      currentTimeline: this.currentTimeline_,\n      startOfSegment,\n      buffered: this.buffered_(),\n      overrideCheck\n    });\n    const audioBufferedEnd = lastBufferedEnd(this.sourceUpdater_.audioBuffered());\n\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\n    if (this.sourceUpdater_.videoBuffered().length) {\n      segmentInfo.gopsToAlignWith = gopsSafeToAlignWith(this.gopBuffer_, // 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\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\n  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\n  earlyAbortWhenNeeded_(stats) {\n    if (this.vhs_.tech_.paused() || // 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 || // 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\n    if (Date.now() - (stats.firstBytesReceivedAt || Date.now()) < 1000) {\n      return;\n    }\n\n    const currentTime = this.currentTime_();\n    const measuredBandwidth = stats.bandwidth;\n    const segmentDuration = this.pendingSegment_.duration;\n    const 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    const 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\n    const switchCandidate = minRebufferMaxBandwidthSelector({\n      main: this.vhs_.playlists.main,\n      currentTime,\n      bandwidth: measuredBandwidth,\n      duration: this.duration_(),\n      segmentDuration,\n      timeUntilRebuffer: timeUntilRebuffer$1,\n      currentTimeline: this.currentTimeline_,\n      syncController: this.syncController_\n    });\n\n    if (!switchCandidate) {\n      return;\n    }\n\n    const rebufferingImpact = requestTimeRemaining - timeUntilRebuffer$1;\n    const timeSavedBySwitching = rebufferingImpact - switchCandidate.rebufferingImpact;\n    let 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\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\n    this.bandwidth = switchCandidate.playlist.attributes.BANDWIDTH * Config.BANDWIDTH_VARIANCE + 1;\n    this.trigger('earlyabort');\n  }\n\n  handleAbort_(segmentInfo) {\n    this.logger_(`Aborting ${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\n  handleProgress_(event, simpleSegment) {\n    this.earlyAbortWhenNeeded_(simpleSegment.stats);\n\n    if (this.checkForAbort_(simpleSegment.requestId)) {\n      return;\n    }\n\n    this.trigger('progress');\n  }\n\n  handleTrackInfo_(simpleSegment, trackInfo) {\n    this.earlyAbortWhenNeeded_(simpleSegment.stats);\n\n    if (this.checkForAbort_(simpleSegment.requestId)) {\n      return;\n    }\n\n    if (this.checkForIllegalMediaSwitch(trackInfo)) {\n      return;\n    }\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\n    if (this.checkForAbort_(simpleSegment.requestId)) {\n      return;\n    } // set trackinfo on the pending segment so that\n    // it can append.\n\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  handleTimingInfo_(simpleSegment, mediaType, timeType, time) {\n    this.earlyAbortWhenNeeded_(simpleSegment.stats);\n\n    if (this.checkForAbort_(simpleSegment.requestId)) {\n      return;\n    }\n\n    const segmentInfo = this.pendingSegment_;\n    const timingInfoProperty = timingInfoPropertyForMedia(mediaType);\n    segmentInfo[timingInfoProperty] = segmentInfo[timingInfoProperty] || {};\n    segmentInfo[timingInfoProperty][timeType] = time;\n    this.logger_(`timinginfo: ${mediaType} - ${timeType} - ${time}`); // check if any calls were waiting on the timing info\n\n    if (this.hasEnoughInfoToAppend_()) {\n      this.processCallQueue_();\n    }\n  }\n\n  handleCaptions_(simpleSegment, captionData) {\n    this.earlyAbortWhenNeeded_(simpleSegment.stats);\n\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\n    if (captionData.length === 0) {\n      this.logger_('SegmentLoader received no captions from a caption event');\n      return;\n    }\n\n    const 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\n    const timestampOffset = this.sourceUpdater_.videoTimestampOffset() === null ? this.sourceUpdater_.audioTimestampOffset() : this.sourceUpdater_.videoTimestampOffset();\n    const captionTracks = {}; // get total start/end and captions for each track/stream\n\n    captionData.forEach(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      const 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(trackName => {\n      const {\n        startTime,\n        endTime,\n        captions\n      } = captionTracks[trackName];\n      const inbandTextTracks = this.inbandTextTracks_;\n      this.logger_(`adding cues from ${startTime} -> ${endTime} for ${trackName}`);\n      createCaptionsTrackIfNotExists(inbandTextTracks, this.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,\n        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  handleId3_(simpleSegment, id3Frames, dispatchType) {\n    this.earlyAbortWhenNeeded_(simpleSegment.stats);\n\n    if (this.checkForAbort_(simpleSegment.requestId)) {\n      return;\n    }\n\n    const 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\n    this.addMetadataToTextTrack(dispatchType, id3Frames, this.duration_());\n  }\n\n  processMetadataQueue_() {\n    this.metadataQueue_.id3.forEach(fn => fn());\n    this.metadataQueue_.caption.forEach(fn => fn());\n    this.metadataQueue_.id3 = [];\n    this.metadataQueue_.caption = [];\n  }\n\n  processCallQueue_() {\n    const 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(fun => fun());\n  }\n\n  processLoadQueue_() {\n    const 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(fun => fun());\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\n  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\n    const 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\n    if (!this.getCurrentMediaInfo_()) {\n      return true;\n    }\n\n    if ( // 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\n    return true;\n  }\n\n  getCurrentMediaInfo_(segmentInfo = this.pendingSegment_) {\n    return segmentInfo && segmentInfo.trackInfo || this.currentMediaInfo_;\n  }\n\n  getMediaInfo_(segmentInfo = this.pendingSegment_) {\n    return this.getCurrentMediaInfo_(segmentInfo) || this.startingMediaInfo_;\n  }\n\n  getPendingSegmentPlaylist() {\n    return this.pendingSegment_ ? this.pendingSegment_.playlist : null;\n  }\n\n  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\n    if (this.waitingOnRemove_ || this.quotaExceededErrorRetryTimeout_) {\n      return false;\n    }\n\n    const segmentInfo = this.pendingSegment_;\n    const 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\n    const {\n      hasAudio,\n      hasVideo,\n      isMuxed\n    } = trackInfo;\n\n    if (hasVideo && !segmentInfo.videoTimingInfo) {\n      return false;\n    } // muxed content only relies on video timing information for now.\n\n\n    if (hasAudio && !this.audioDisabled_ && !isMuxed && !segmentInfo.audioTimingInfo) {\n      return false;\n    }\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\n    return true;\n  }\n\n  handleData_(simpleSegment, result) {\n    this.earlyAbortWhenNeeded_(simpleSegment.stats);\n\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\n    if (this.callQueue_.length || !this.hasEnoughInfoToAppend_()) {\n      this.callQueue_.push(this.handleData_.bind(this, simpleSegment, result));\n      return;\n    }\n\n    const 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\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\n    if (simpleSegment.key) {\n      this.segmentKey(simpleSegment.key, true);\n    }\n\n    segmentInfo.isFmp4 = simpleSegment.isFmp4;\n    segmentInfo.timingInfo = segmentInfo.timingInfo || {};\n\n    if (segmentInfo.isFmp4) {\n      this.trigger('fmp4');\n      segmentInfo.timingInfo.start = segmentInfo[timingInfoPropertyForMedia(result.type)].start;\n    } else {\n      const trackInfo = this.getCurrentMediaInfo_();\n      const useVideoTimingInfo = this.loaderType_ === 'main' && trackInfo && trackInfo.hasVideo;\n      let firstVideoFrameTimeForData;\n\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\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,\n        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\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,\n        shouldSaveTimelineMapping: this.loaderType_ === 'main'\n      });\n      const 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\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\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  updateAppendInitSegmentStatus(segmentInfo, type) {\n    // alt audio doesn't manage timestamp offset\n    if (this.loaderType_ === 'main' && typeof segmentInfo.timestampOffset === 'number' && // 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\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  getInitSegmentAndUpdateState_({\n    type,\n    initSegment,\n    map,\n    playlist\n  }) {\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      const id = initSegmentId(map);\n\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\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\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\n    return null;\n  }\n\n  handleQuotaExceededError_({\n    segmentInfo,\n    type,\n    bytes\n  }, error) {\n    const audioBuffered = this.sourceUpdater_.audioBuffered();\n    const 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\n    if (videoBuffered.length > 1) {\n      this.logger_('On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: ' + timeRangesToArray(videoBuffered).join(', '));\n    }\n\n    const audioBufferStart = audioBuffered.length ? audioBuffered.start(0) : 0;\n    const audioBufferEnd = audioBuffered.length ? audioBuffered.end(audioBuffered.length - 1) : 0;\n    const videoBufferStart = videoBuffered.length ? videoBuffered.start(0) : 0;\n    const videoBufferEnd = videoBuffered.length ? videoBuffered.end(videoBuffered.length - 1) : 0;\n\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: ${bytes.byteLength}, ` + `audio buffer: ${timeRangesToArray(audioBuffered).join(', ')}, ` + `video buffer: ${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\n    this.waitingOnRemove_ = true;\n    this.callQueue_.push(this.appendToSourceBuffer_.bind(this, {\n      segmentInfo,\n      type,\n      bytes\n    }));\n    const currentTime = this.currentTime_(); // Try to remove as much audio and video as possible to make room for new content\n    // before retrying.\n\n    const timeToRemoveUntil = currentTime - MIN_BACK_BUFFER;\n    this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${timeToRemoveUntil}`);\n    this.remove(0, timeToRemoveUntil, () => {\n      this.logger_(`On QUOTA_EXCEEDED_ERR, retrying append in ${MIN_BACK_BUFFER}s`);\n      this.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      this.quotaExceededErrorRetryTimeout_ = window$1.setTimeout(() => {\n        this.logger_('On QUOTA_EXCEEDED_ERR, re-processing call queue');\n        this.quotaExceededErrorRetryTimeout_ = null;\n        this.processCallQueue_();\n      }, MIN_BACK_BUFFER * 1000);\n    }, true);\n  }\n\n  handleAppendError_({\n    segmentInfo,\n    type,\n    bytes\n  }, error) {\n    // if there's no error, nothing to do\n    if (!error) {\n      return;\n    }\n\n    if (error.code === QUOTA_EXCEEDED_ERR) {\n      this.handleQuotaExceededError_({\n        segmentInfo,\n        type,\n        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\n    this.logger_('Received non QUOTA_EXCEEDED_ERR on append', error);\n    this.error(`${type} append of ${bytes.length}b failed for segment ` + `#${segmentInfo.mediaIndex} in playlist ${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  appendToSourceBuffer_({\n    segmentInfo,\n    type,\n    initSegment,\n    data,\n    bytes\n  }) {\n    // If this is a re-append, bytes were already created and don't need to be recreated\n    if (!bytes) {\n      const segments = [data];\n      let byteLength = data.byteLength;\n\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\n      bytes = concatSegments({\n        bytes: byteLength,\n        segments\n      });\n    }\n\n    this.sourceUpdater_.appendBuffer({\n      segmentInfo,\n      type,\n      bytes\n    }, this.handleAppendError_.bind(this, {\n      segmentInfo,\n      type,\n      bytes\n    }));\n  }\n\n  handleSegmentTimingInfo_(type, requestId, segmentTimingInfo) {\n    if (!this.pendingSegment_ || requestId !== this.pendingSegment_.requestId) {\n      return;\n    }\n\n    const segment = this.pendingSegment_.segment;\n    const timingInfoProperty = `${type}TimingInfo`;\n\n    if (!segment[timingInfoProperty]) {\n      segment[timingInfoProperty] = {};\n    }\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  appendData_(segmentInfo, result) {\n    const {\n      type,\n      data\n    } = result;\n\n    if (!data || !data.byteLength) {\n      return;\n    }\n\n    if (type === 'audio' && this.audioDisabled_) {\n      return;\n    }\n\n    const initSegment = this.getInitSegmentAndUpdateState_({\n      type,\n      initSegment: result.initSegment,\n      playlist: segmentInfo.playlist,\n      map: segmentInfo.isFmp4 ? segmentInfo.segment.map : null\n    });\n    this.appendToSourceBuffer_({\n      segmentInfo,\n      type,\n      initSegment,\n      data\n    });\n  }\n  /**\n   * load a specific segment from a request into the buffer\n   *\n   * @private\n   */\n\n\n  loadSegment_(segmentInfo) {\n    this.state = 'WAITING';\n    this.pendingSegment_ = segmentInfo;\n    this.trimBackBuffer_(segmentInfo);\n\n    if (typeof segmentInfo.timestampOffset === 'number') {\n      if (this.transmuxer_) {\n        this.transmuxer_.postMessage({\n          action: 'clearAllMp4Captions'\n        });\n      }\n    }\n\n    if (!this.hasEnoughInfoToLoad_()) {\n      this.loadQueue_.push(() => {\n        // regenerate the audioAppendStart, timestampOffset, etc as they\n        // may have changed since this function was added to the queue.\n        const options = _extends({}, segmentInfo, {\n          forceTimestampOffset: true\n        });\n\n        _extends(segmentInfo, this.generateSegmentInfo_(options));\n\n        this.isPendingTimestampOffset_ = false;\n        this.updateTransmuxerAndRequestSegment_(segmentInfo);\n      });\n      return;\n    }\n\n    this.updateTransmuxerAndRequestSegment_(segmentInfo);\n  }\n\n  updateTransmuxerAndRequestSegment_(segmentInfo) {\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\n    const simpleSegment = this.createSimplifiedSegmentObj_(segmentInfo);\n    const isEndOfStream = this.isEndOfStream_(segmentInfo.mediaIndex, segmentInfo.playlist, segmentInfo.partIndex);\n    const isWalkingForward = this.mediaIndex !== null;\n    const isDiscontinuity = segmentInfo.timeline !== this.currentTimeline_ && // currentTimeline starts at -1, so we shouldn't end the timeline switching to 0,\n    // the first timeline\n    segmentInfo.timeline > 0;\n    const isEndOfTimeline = isEndOfStream || isWalkingForward && isDiscontinuity;\n    this.logger_(`Requesting ${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\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,\n      endedTimelineFn: () => {\n        this.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: ({\n        message,\n        level,\n        stream\n      }) => {\n        this.logger_(`${segmentInfoString(segmentInfo)} logged from transmuxer stream ${stream} as a ${level}: ${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\n  trimBackBuffer_(segmentInfo) {\n    const 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\n  createSimplifiedSegmentObj_(segmentInfo) {\n    const segment = segmentInfo.segment;\n    const part = segmentInfo.part;\n    const 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    const previousSegment = segmentInfo.playlist.segments[segmentInfo.mediaIndex - 1];\n\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\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      const 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\n    if (segment.map) {\n      simpleSegment.map = this.initSegmentForMap(segment.map);\n    }\n\n    return simpleSegment;\n  }\n\n  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\n    if (stats) {\n      this.mediaBytesTransferred += stats.bytesReceived;\n      this.mediaTransferDuration += stats.roundTripTime;\n    }\n  }\n\n  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\n    if (duration < MIN_SEGMENT_DURATION_TO_SAVE_STATS) {\n      this.logger_(`Ignoring segment's bandwidth because its duration of ${duration}` + ` is less than the min to record ${MIN_SEGMENT_DURATION_TO_SAVE_STATS}`);\n      return;\n    }\n\n    this.bandwidth = stats.bandwidth;\n    this.roundTrip = stats.roundTripTime;\n  }\n\n  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\n  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\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\n    if (simpleSegment.requestId !== this.pendingSegment_.requestId) {\n      return;\n    } // an error occurred from the active pendingSegment_ so reset everything\n\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\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\n      this.mediaRequestsErrored += 1;\n      this.error(error);\n      this.trigger('error');\n      return;\n    }\n\n    const 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\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\n    this.state = 'APPENDING'; // used for testing\n\n    this.trigger('appending');\n    this.waitForAppendsToComplete_(segmentInfo);\n  }\n\n  setTimeMapping_(timeline) {\n    const timelineMapping = this.syncController_.mappingForTimeline(timeline);\n\n    if (timelineMapping !== null) {\n      this.timeMapping_ = timelineMapping;\n    }\n  }\n\n  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  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\n    if (this.loaderType_ === 'main' && timestampOffset !== this.sourceUpdater_.videoTimestampOffset()) {\n      return true;\n    }\n\n    if (!this.audioDisabled_ && timestampOffset !== this.sourceUpdater_.audioTimestampOffset()) {\n      return true;\n    }\n\n    return false;\n  }\n\n  trueSegmentStart_({\n    currentStart,\n    playlist,\n    mediaIndex,\n    firstVideoFrameTimeForData,\n    currentVideoTimestampOffset,\n    useVideoTimingInfo,\n    videoTimingInfo,\n    audioTimingInfo\n  }) {\n    if (typeof currentStart !== 'undefined') {\n      // if start was set once, keep using it\n      return currentStart;\n    }\n\n    if (!useVideoTimingInfo) {\n      return audioTimingInfo.start;\n    }\n\n    const 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\n    return videoTimingInfo.start;\n  }\n\n  waitForAppendsToComplete_(segmentInfo) {\n    const trackInfo = this.getCurrentMediaInfo_(segmentInfo);\n\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\n    const {\n      hasAudio,\n      hasVideo,\n      isMuxed\n    } = trackInfo;\n    const waitForVideo = this.loaderType_ === 'main' && hasVideo;\n    const 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\n      segmentInfo.timingInfo = {\n        start: 0\n      };\n      segmentInfo.waitingOnAppends++;\n\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\n      this.checkAppendsDone_(segmentInfo);\n      return;\n    } // Since source updater could call back synchronously, do the increments first.\n\n\n    if (waitForVideo) {\n      segmentInfo.waitingOnAppends++;\n    }\n\n    if (waitForAudio) {\n      segmentInfo.waitingOnAppends++;\n    }\n\n    if (waitForVideo) {\n      this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this, segmentInfo));\n    }\n\n    if (waitForAudio) {\n      this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this, segmentInfo));\n    }\n  }\n\n  checkAppendsDone_(segmentInfo) {\n    if (this.checkForAbort_(segmentInfo.requestId)) {\n      return;\n    }\n\n    segmentInfo.waitingOnAppends--;\n\n    if (segmentInfo.waitingOnAppends === 0) {\n      this.handleAppendsDone_();\n    }\n  }\n\n  checkForIllegalMediaSwitch(trackInfo) {\n    const illegalMediaSwitchError = illegalMediaSwitch(this.loaderType_, this.getCurrentMediaInfo_(), trackInfo);\n\n    if (illegalMediaSwitchError) {\n      this.error({\n        message: illegalMediaSwitchError,\n        playlistExclusionDuration: Infinity\n      });\n      this.trigger('error');\n      return true;\n    }\n\n    return false;\n  }\n\n  updateSourceBufferTimestampOffset_(segmentInfo) {\n    if (segmentInfo.timestampOffset === null || // 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' || // already updated the timestamp offset for this segment\n    segmentInfo.changedTimestampOffset || // the alt audio loader should not be responsible for setting the timestamp offset\n    this.loaderType_ !== 'main') {\n      return;\n    }\n\n    let 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\n    if (segmentInfo.timestampOffset !== this.sourceUpdater_.videoTimestampOffset()) {\n      this.sourceUpdater_.videoTimestampOffset(segmentInfo.timestampOffset);\n      didChange = true;\n    }\n\n    if (segmentInfo.timestampOffset !== this.sourceUpdater_.audioTimestampOffset()) {\n      this.sourceUpdater_.audioTimestampOffset(segmentInfo.timestampOffset);\n      didChange = true;\n    }\n\n    if (didChange) {\n      this.trigger('timestampoffset');\n    }\n  }\n\n  getSegmentStartTimeForTimestampOffsetCalculation_({\n    videoTimingInfo,\n    audioTimingInfo,\n    timingInfo\n  }) {\n    if (!this.useDtsForTimestampOffset_) {\n      return timingInfo.start;\n    }\n\n    if (videoTimingInfo && typeof videoTimingInfo.transmuxedDecodeStart === 'number') {\n      return videoTimingInfo.transmuxedDecodeStart;\n    } // handle audio only\n\n\n    if (audioTimingInfo && typeof audioTimingInfo.transmuxedDecodeStart === 'number') {\n      return audioTimingInfo.transmuxedDecodeStart;\n    } // handle content not transmuxed (e.g., MP4)\n\n\n    return timingInfo.start;\n  }\n\n  updateTimingInfoEnd_(segmentInfo) {\n    segmentInfo.timingInfo = segmentInfo.timingInfo || {};\n    const trackInfo = this.getMediaInfo_();\n    const useVideoTimingInfo = this.loaderType_ === 'main' && trackInfo && trackInfo.hasVideo;\n    const prioritizedTimingInfo = useVideoTimingInfo && segmentInfo.videoTimingInfo ? segmentInfo.videoTimingInfo : segmentInfo.audioTimingInfo;\n\n    if (!prioritizedTimingInfo) {\n      return;\n    }\n\n    segmentInfo.timingInfo.end = typeof prioritizedTimingInfo.end === 'number' ? // 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\n  handleAppendsDone_() {\n    // appendsdone can cause an abort\n    if (this.pendingSegment_) {\n      this.trigger('appendsdone');\n    }\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\n      return;\n    }\n\n    const 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\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,\n        shouldSaveTimelineMapping: this.loaderType_ === 'main'\n      });\n    }\n\n    const segmentDurationMessage = getTroublesomeSegmentDurationMessage(segmentInfo, this.sourceType_);\n\n    if (segmentDurationMessage) {\n      if (segmentDurationMessage.severity === 'warn') {\n        videojs.log.warn(segmentDurationMessage.message);\n      } else {\n        this.logger_(segmentDurationMessage.message);\n      }\n    }\n\n    this.recordThroughput_(segmentInfo);\n    this.pendingSegment_ = null;\n    this.state = 'READY';\n\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 ${segmentInfoString(segmentInfo)}`);\n        return;\n      }\n    }\n\n    this.logger_(`Appended ${segmentInfoString(segmentInfo)}`);\n    this.addSegmentMetadataCue_(segmentInfo);\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\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    const segment = segmentInfo.segment;\n    const part = segmentInfo.part;\n    const badSegmentGuess = segment.end && this.currentTime_() - segment.end > segmentInfo.playlist.targetDuration * 3;\n    const 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 ${badSegmentGuess ? 'segment' : 'part'} ${segmentInfoString(segmentInfo)}`);\n      this.resetEverything();\n      return;\n    }\n\n    const 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\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\n    this.trigger('appended');\n\n    if (segmentInfo.hasAppendedData_) {\n      this.mediaAppends++;\n    }\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\n  recordThroughput_(segmentInfo) {\n    if (segmentInfo.duration < MIN_SEGMENT_DURATION_TO_SAVE_STATS) {\n      this.logger_(`Ignoring segment's throughput because its duration of ${segmentInfo.duration}` + ` is less than the min to record ${MIN_SEGMENT_DURATION_TO_SAVE_STATS}`);\n      return;\n    }\n\n    const 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    const segmentProcessingTime = Date.now() - segmentInfo.endOfAllRequests + 1; // Multiply by 8000 to convert from bytes/millisecond to bits/second\n\n    const 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\n  addSegmentMetadataCue_(segmentInfo) {\n    if (!this.segmentMetadataTrack_) {\n      return;\n    }\n\n    const segment = segmentInfo.segment;\n    const start = segment.start;\n    const 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\n    removeCuesFromTrack(start, end, this.segmentMetadataTrack_);\n    const Cue = window$1.WebKitDataCue || window$1.VTTCue;\n    const 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,\n      end\n    };\n    const data = JSON.stringify(value);\n    const 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}\n\nfunction noop() {}\n\nconst toTitleCase = function (string) {\n  if (typeof string !== 'string') {\n    return string;\n  }\n\n  return string.replace(/./, w => w.toUpperCase());\n};\n\n/**\n * @file source-updater.js\n */\nconst bufferTypes = ['video', 'audio'];\n\nconst updating = (type, sourceUpdater) => {\n  const sourceBuffer = sourceUpdater[`${type}Buffer`];\n  return sourceBuffer && sourceBuffer.updating || sourceUpdater.queuePending[type];\n};\n\nconst nextQueueIndexOfType = (type, queue) => {\n  for (let i = 0; i < queue.length; i++) {\n    const queueEntry = queue[i];\n\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\n    if (queueEntry.type === type) {\n      return i;\n    }\n  }\n\n  return null;\n};\n\nconst shiftQueue = (type, sourceUpdater) => {\n  if (sourceUpdater.queue.length === 0) {\n    return;\n  }\n\n  let queueIndex = 0;\n  let queueEntry = sourceUpdater.queue[queueIndex];\n\n  if (queueEntry.type === 'mediaSource') {\n    if (!sourceUpdater.updating() && sourceUpdater.mediaSource.readyState !== 'closed') {\n      sourceUpdater.queue.shift();\n      queueEntry.action(sourceUpdater);\n\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\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\n    return;\n  }\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\n  if (!sourceUpdater.ready() || sourceUpdater.mediaSource.readyState === 'closed' || updating(type, sourceUpdater)) {\n    return;\n  }\n\n  if (queueEntry.type !== type) {\n    queueIndex = nextQueueIndexOfType(type, sourceUpdater.queue);\n\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\n    queueEntry = sourceUpdater.queue[queueIndex];\n  }\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\n  if (!queueEntry.doneFn) {\n    // synchronous operation, process next entry\n    sourceUpdater.queuePending[type] = null;\n    shiftQueue(type, sourceUpdater);\n    return;\n  }\n};\n\nconst cleanupBuffer = (type, sourceUpdater) => {\n  const buffer = sourceUpdater[`${type}Buffer`];\n  const titleType = toTitleCase(type);\n\n  if (!buffer) {\n    return;\n  }\n\n  buffer.removeEventListener('updateend', sourceUpdater[`on${titleType}UpdateEnd_`]);\n  buffer.removeEventListener('error', sourceUpdater[`on${titleType}Error_`]);\n  sourceUpdater.codecs[type] = null;\n  sourceUpdater[`${type}Buffer`] = null;\n};\n\nconst inSourceBuffers = (mediaSource, sourceBuffer) => mediaSource && sourceBuffer && Array.prototype.indexOf.call(mediaSource.sourceBuffers, sourceBuffer) !== -1;\n\nconst actions = {\n  appendBuffer: (bytes, segmentInfo, onError) => (type, sourceUpdater) => {\n    const sourceBuffer = sourceUpdater[`${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\n    sourceUpdater.logger_(`Appending segment ${segmentInfo.mediaIndex}'s ${bytes.length} bytes to ${type}Buffer`);\n\n    try {\n      sourceBuffer.appendBuffer(bytes);\n    } catch (e) {\n      sourceUpdater.logger_(`Error with code ${e.code} ` + (e.code === QUOTA_EXCEEDED_ERR ? '(QUOTA_EXCEEDED_ERR) ' : '') + `when appending segment ${segmentInfo.mediaIndex} to ${type}Buffer`);\n      sourceUpdater.queuePending[type] = null;\n      onError(e);\n    }\n  },\n  remove: (start, end) => (type, sourceUpdater) => {\n    const sourceBuffer = sourceUpdater[`${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\n    sourceUpdater.logger_(`Removing ${start} to ${end} from ${type}Buffer`);\n\n    try {\n      sourceBuffer.remove(start, end);\n    } catch (e) {\n      sourceUpdater.logger_(`Remove ${start} to ${end} from ${type}Buffer failed`);\n    }\n  },\n  timestampOffset: offset => (type, sourceUpdater) => {\n    const sourceBuffer = sourceUpdater[`${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\n    sourceUpdater.logger_(`Setting ${type}timestampOffset to ${offset}`);\n    sourceBuffer.timestampOffset = offset;\n  },\n  callback: callback => (type, sourceUpdater) => {\n    callback();\n  },\n  endOfStream: error => sourceUpdater => {\n    if (sourceUpdater.mediaSource.readyState !== 'open') {\n      return;\n    }\n\n    sourceUpdater.logger_(`Calling mediaSource endOfStream(${error || ''})`);\n\n    try {\n      sourceUpdater.mediaSource.endOfStream(error);\n    } catch (e) {\n      videojs.log.warn('Failed to call media source endOfStream', e);\n    }\n  },\n  duration: duration => sourceUpdater => {\n    sourceUpdater.logger_(`Setting mediaSource duration to ${duration}`);\n\n    try {\n      sourceUpdater.mediaSource.duration = duration;\n    } catch (e) {\n      videojs.log.warn('Failed to set media source duration', e);\n    }\n  },\n  abort: () => (type, sourceUpdater) => {\n    if (sourceUpdater.mediaSource.readyState !== 'open') {\n      return;\n    }\n\n    const sourceBuffer = sourceUpdater[`${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\n    sourceUpdater.logger_(`calling abort on ${type}Buffer`);\n\n    try {\n      sourceBuffer.abort();\n    } catch (e) {\n      videojs.log.warn(`Failed to abort on ${type}Buffer`, e);\n    }\n  },\n  addSourceBuffer: (type, codec) => sourceUpdater => {\n    const titleType = toTitleCase(type);\n    const mime = getMimeForCodec(codec);\n    sourceUpdater.logger_(`Adding ${type}Buffer with codec ${codec} to mediaSource`);\n    const sourceBuffer = sourceUpdater.mediaSource.addSourceBuffer(mime);\n    sourceBuffer.addEventListener('updateend', sourceUpdater[`on${titleType}UpdateEnd_`]);\n    sourceBuffer.addEventListener('error', sourceUpdater[`on${titleType}Error_`]);\n    sourceUpdater.codecs[type] = codec;\n    sourceUpdater[`${type}Buffer`] = sourceBuffer;\n  },\n  removeSourceBuffer: type => sourceUpdater => {\n    const sourceBuffer = sourceUpdater[`${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\n    sourceUpdater.logger_(`Removing ${type}Buffer with codec ${sourceUpdater.codecs[type]} from mediaSource`);\n\n    try {\n      sourceUpdater.mediaSource.removeSourceBuffer(sourceBuffer);\n    } catch (e) {\n      videojs.log.warn(`Failed to removeSourceBuffer ${type}Buffer`, e);\n    }\n  },\n  changeType: codec => (type, sourceUpdater) => {\n    const sourceBuffer = sourceUpdater[`${type}Buffer`];\n    const 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\n    if (sourceUpdater.codecs[type] === codec) {\n      return;\n    }\n\n    sourceUpdater.logger_(`changing ${type}Buffer codec from ${sourceUpdater.codecs[type]} to ${codec}`); // check if change to the provided type is supported\n\n    try {\n      sourceBuffer.changeType(mime);\n      sourceUpdater.codecs[type] = codec;\n    } catch (e) {\n      videojs.log.warn(`Failed to changeType on ${type}Buffer`, e);\n    }\n  }\n};\n\nconst pushQueue = ({\n  type,\n  sourceUpdater,\n  action,\n  doneFn,\n  name\n}) => {\n  sourceUpdater.queue.push({\n    type,\n    action,\n    doneFn,\n    name\n  });\n  shiftQueue(type, sourceUpdater);\n};\n\nconst onUpdateend = (type, sourceUpdater) => e => {\n  // 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  if (sourceUpdater.queuePending[type]) {\n    const doneFn = sourceUpdater.queuePending[type].doneFn;\n    sourceUpdater.queuePending[type] = null;\n\n    if (doneFn) {\n      // if there's an error, report it\n      doneFn(sourceUpdater[`${type}Error_`]);\n    }\n  }\n\n  shiftQueue(type, sourceUpdater);\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 */\n\n\nclass SourceUpdater extends videojs.EventTarget {\n  constructor(mediaSource) {\n    super();\n    this.mediaSource = mediaSource;\n\n    this.sourceopenListener_ = () => shiftQueue('mediaSource', this);\n\n    this.mediaSource.addEventListener('sourceopen', this.sourceopenListener_);\n    this.logger_ = logger('SourceUpdater'); // initial timestamp offset is 0\n\n    this.audioTimestampOffset_ = 0;\n    this.videoTimestampOffset_ = 0;\n    this.queue = [];\n    this.queuePending = {\n      audio: null,\n      video: null\n    };\n    this.delayedAudioAppendQueue_ = [];\n    this.videoAppendQueued_ = false;\n    this.codecs = {};\n    this.onVideoUpdateEnd_ = onUpdateend('video', this);\n    this.onAudioUpdateEnd_ = onUpdateend('audio', this);\n\n    this.onVideoError_ = e => {\n      // used for debugging\n      this.videoError_ = e;\n    };\n\n    this.onAudioError_ = e => {\n      // used for debugging\n      this.audioError_ = e;\n    };\n\n    this.createdSourceBuffers_ = false;\n    this.initializedEme_ = false;\n    this.triggeredReady_ = false;\n  }\n\n  initializedEme() {\n    this.initializedEme_ = true;\n    this.triggerReady();\n  }\n\n  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  hasInitializedAnyEme() {\n    return this.initializedEme_;\n  }\n\n  ready() {\n    return this.hasCreatedSourceBuffers() && this.hasInitializedAnyEme();\n  }\n\n  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\n    this.addOrChangeSourceBuffers(codecs);\n    this.createdSourceBuffers_ = true;\n    this.trigger('createdsourcebuffers');\n    this.triggerReady();\n  }\n\n  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\n  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\n  abort(type) {\n    pushQueue({\n      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\n  removeSourceBuffer(type) {\n    if (!this.canRemoveSourceBuffer()) {\n      videojs.log.error('removeSourceBuffer is not supported!');\n      return;\n    }\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\n  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\n  static canChangeType() {\n    return window$1.SourceBuffer && window$1.SourceBuffer.prototype && typeof window$1.SourceBuffer.prototype.changeType === '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\n  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\n  changeType(type, codec) {\n    if (!this.canChangeType()) {\n      videojs.log.error('changeType is not supported!');\n      return;\n    }\n\n    pushQueue({\n      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\n  addOrChangeSourceBuffers(codecs) {\n    if (!codecs || typeof codecs !== 'object' || Object.keys(codecs).length === 0) {\n      throw new Error('Cannot addOrChangeSourceBuffers to undefined codecs');\n    }\n\n    Object.keys(codecs).forEach(type => {\n      const codec = codecs[type];\n\n      if (!this.hasCreatedSourceBuffers()) {\n        return this.addSourceBuffer(type, codec);\n      }\n\n      if (this.canChangeType()) {\n        this.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\n  appendBuffer(options, doneFn) {\n    const {\n      segmentInfo,\n      type,\n      bytes\n    } = options;\n    this.processedAppend_ = true;\n\n    if (type === 'audio' && this.videoBuffer && !this.videoAppendQueued_) {\n      this.delayedAudioAppendQueue_.push([options, doneFn]);\n      this.logger_(`delayed audio append of ${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\n    const onError = doneFn;\n    pushQueue({\n      type,\n      sourceUpdater: this,\n      action: actions.appendBuffer(bytes, segmentInfo || {\n        mediaIndex: -1\n      }, onError),\n      doneFn,\n      name: 'appendBuffer'\n    });\n\n    if (type === 'video') {\n      this.videoAppendQueued_ = true;\n\n      if (!this.delayedAudioAppendQueue_.length) {\n        return;\n      }\n\n      const queue = this.delayedAudioAppendQueue_.slice();\n      this.logger_(`queuing delayed audio ${queue.length} appendBuffers`);\n      this.delayedAudioAppendQueue_.length = 0;\n      queue.forEach(que => {\n        this.appendBuffer.apply(this, 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\n  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\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\n  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\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\n  buffered() {\n    const video = inSourceBuffers(this.mediaSource, this.videoBuffer) ? this.videoBuffer : null;\n    const audio = inSourceBuffers(this.mediaSource, this.audioBuffer) ? this.audioBuffer : null;\n\n    if (audio && !video) {\n      return this.audioBuffered();\n    }\n\n    if (video && !audio) {\n      return this.videoBuffered();\n    }\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\n  setDuration(duration, doneFn = 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\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\n  endOfStream(error = null, doneFn = 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\n    pushQueue({\n      type: 'mediaSource',\n      sourceUpdater: this,\n      action: actions.endOfStream(error),\n      name: 'endOfStream',\n      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\n  removeAudio(start, end, done = noop) {\n    if (!this.audioBuffered().length || this.audioBuffered().end(0) === 0) {\n      done();\n      return;\n    }\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\n  removeVideo(start, end, done = noop) {\n    if (!this.videoBuffered().length || this.videoBuffered().end(0) === 0) {\n      done();\n      return;\n    }\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\n  updating() {\n    // the audio/video source buffer is updating\n    if (updating('audio', this) || updating('video', this)) {\n      return true;\n    }\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\n  audioTimestampOffset(offset) {\n    if (typeof offset !== 'undefined' && this.audioBuffer && // 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\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\n  videoTimestampOffset(offset) {\n    if (typeof offset !== 'undefined' && this.videoBuffer && // 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\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\n  audioQueueCallback(callback) {\n    if (!this.audioBuffer) {\n      return;\n    }\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\n  videoQueueCallback(callback) {\n    if (!this.videoBuffer) {\n      return;\n    }\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\n  dispose() {\n    this.trigger('dispose');\n    bufferTypes.forEach(type => {\n      this.abort(type);\n\n      if (this.canRemoveSourceBuffer()) {\n        this.removeSourceBuffer(type);\n      } else {\n        this[`${type}QueueCallback`](() => cleanupBuffer(type, this));\n      }\n    });\n    this.videoAppendQueued_ = false;\n    this.delayedAudioAppendQueue_.length = 0;\n\n    if (this.sourceopenListener_) {\n      this.mediaSource.removeEventListener('sourceopen', this.sourceopenListener_);\n    }\n\n    this.off();\n  }\n\n}\n\nconst uint8ToUtf8 = uintArray => decodeURIComponent(escape(String.fromCharCode.apply(null, uintArray)));\nconst bufferToHexString = buffer => {\n  const uInt8Buffer = new Uint8Array(buffer);\n  return Array.from(uInt8Buffer).map(byte => byte.toString(16).padStart(2, '0')).join('');\n};\n\n/**\n * @file vtt-segment-loader.js\n */\nconst VTT_LINE_TERMINATORS = new Uint8Array('\\n\\n'.split('').map(char => char.charCodeAt(0)));\n\nclass NoVttJsError extends Error {\n  constructor() {\n    super('Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.');\n  }\n\n}\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 */\n\n\nclass VTTSegmentLoader extends SegmentLoader {\n  constructor(settings, options = {}) {\n    super(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    this.mediaSource_ = null;\n    this.subtitlesTrack_ = null;\n    this.loaderType_ = 'subtitle';\n    this.featuresNativeTextTracks_ = settings.featuresNativeTextTracks;\n    this.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    this.shouldSaveSegmentTimingInfo_ = false;\n  }\n\n  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\n  buffered_() {\n    if (!this.subtitlesTrack_ || !this.subtitlesTrack_.cues || !this.subtitlesTrack_.cues.length) {\n      return createTimeRanges();\n    }\n\n    const cues = this.subtitlesTrack_.cues;\n    const start = cues[0].startTime;\n    const 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\n  initSegmentForMap(map, set = false) {\n    if (!map) {\n      return null;\n    }\n\n    const id = initSegmentId(map);\n    let storedMap = this.initSegments_[id];\n\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      const combinedByteLength = VTT_LINE_TERMINATORS.byteLength + map.bytes.byteLength;\n      const 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\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\n  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\n  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\n  track(track) {\n    if (typeof track === 'undefined') {\n      return this.subtitlesTrack_;\n    }\n\n    this.subtitlesTrack_ = track; // 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\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\n  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\n  fillBuffer_() {\n    // see if we need to begin loading immediately\n    const segmentInfo = this.chooseNextRequest_();\n\n    if (!segmentInfo) {\n      return;\n    }\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      const checkTimestampOffset = () => {\n        this.state = 'READY';\n\n        if (!this.paused()) {\n          // if not paused, queue a buffer check as soon as possible\n          this.monitorBuffer_();\n        }\n      };\n\n      this.syncController_.one('timestampoffset', checkTimestampOffset);\n      this.state = 'WAITING_ON_TIMELINE';\n      return;\n    }\n\n    this.loadSegment_(segmentInfo);\n  } // never set a timestamp offset for vtt segments.\n\n\n  timestampOffsetForSegment_() {\n    return null;\n  }\n\n  chooseNextRequest_() {\n    return this.skipEmptySegments_(super.chooseNextRequest_());\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\n  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\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\n    return segmentInfo;\n  }\n\n  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\n  segmentRequestFinished_(error, simpleSegment, result) {\n    if (!this.subtitlesTrack_) {\n      this.state = 'READY';\n      return;\n    }\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\n    if (error) {\n      if (error.code === REQUEST_ERRORS.TIMEOUT) {\n        this.handleTimeout_();\n      }\n\n      if (error.code === REQUEST_ERRORS.ABORTED) {\n        this.mediaRequestsAborted += 1;\n      } else {\n        this.mediaRequestsErrored += 1;\n      }\n\n      this.stopForError(error);\n      return;\n    }\n\n    const 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\n    this.state = 'APPENDING'; // used for tests\n\n    this.trigger('appending');\n    const segment = segmentInfo.segment;\n\n    if (segment.map) {\n      segment.map.bytes = simpleSegment.map.bytes;\n    }\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(() => this.segmentRequestFinished_(error, simpleSegment, result), () => this.stopForError({\n        message: 'Error loading vtt.js'\n      }));\n      return;\n    }\n\n    segment.requested = true;\n\n    try {\n      this.parseVTTCues_(segmentInfo);\n    } catch (e) {\n      this.stopForError({\n        message: e.message\n      });\n      return;\n    }\n\n    this.updateTimeMapping_(segmentInfo, this.syncController_.timelines[segmentInfo.timeline], this.playlist_);\n\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\n    if (segmentInfo.isSyncRequest) {\n      this.trigger('syncinfoupdate');\n      this.pendingSegment_ = null;\n      this.state = 'READY';\n      return;\n    }\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(cue => {\n      this.subtitlesTrack_.addCue(this.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  handleData_() {// noop as we shouldn't be getting video/audio data captions\n    // that we do not support here.\n  }\n\n  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\n  parseVTTCues_(segmentInfo) {\n    let decoder;\n    let decodeBytesToString = false;\n\n    if (typeof window$1.WebVTT !== 'function') {\n      // caller is responsible for exception handling.\n      throw new NoVttJsError();\n    }\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\n    const 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\n    parser.ontimestampmap = map => {\n      segmentInfo.timestampmap = map;\n    };\n\n    parser.onparsingerror = error => {\n      videojs.log.warn('Error encountered when parsing cues: ' + error.message);\n    };\n\n    if (segmentInfo.segment.map) {\n      let mapData = segmentInfo.segment.map.bytes;\n\n      if (decodeBytesToString) {\n        mapData = uint8ToUtf8(mapData);\n      }\n\n      parser.parse(mapData);\n    }\n\n    let segmentData = segmentInfo.bytes;\n\n    if (decodeBytesToString) {\n      segmentData = uint8ToUtf8(segmentData);\n    }\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\n  updateTimeMapping_(segmentInfo, mappingObj, playlist) {\n    const segment = segmentInfo.segment;\n\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\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\n    const {\n      MPEGTS,\n      LOCAL\n    } = segmentInfo.timestampmap;\n    /**\n     * From the spec:\n     * The MPEGTS media timestamp MUST use a 90KHz timescale,\n     * even when non-WebVTT Media Segments use a different timescale.\n     */\n\n    const mpegTsInSeconds = MPEGTS / ONE_SECOND_IN_TS;\n    const diff = mpegTsInSeconds - LOCAL + mappingObj.mapping;\n    segmentInfo.cues.forEach(cue => {\n      const duration = cue.endTime - cue.startTime;\n      const startTime = MPEGTS === 0 ? cue.startTime + diff : this.handleRollover_(cue.startTime + diff, mappingObj.time);\n      cue.startTime = Math.max(startTime, 0);\n      cue.endTime = Math.max(startTime + duration, 0);\n    });\n\n    if (!playlist.syncInfo) {\n      const firstStart = segmentInfo.cues[0].startTime;\n      const 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   * MPEG-TS PES timestamps are limited to 2^33.\n   * Once they reach 2^33, they roll over to 0.\n   * mux.js handles PES timestamp rollover for the following scenarios:\n   * [forward rollover(right)] ->\n   *    PES timestamps monotonically increase, and once they reach 2^33, they roll over to 0\n   * [backward rollover(left)] -->\n   *    we seek back to position before rollover.\n   *\n   * According to the HLS SPEC:\n   * When synchronizing WebVTT with PES timestamps, clients SHOULD account\n   * for cases where the 33-bit PES timestamps have wrapped and the WebVTT\n   * cue times have not.  When the PES timestamp wraps, the WebVTT Segment\n   * SHOULD have a X-TIMESTAMP-MAP header that maps the current WebVTT\n   * time to the new (low valued) PES timestamp.\n   *\n   * So we want to handle rollover here and align VTT Cue start/end time to the player's time.\n   */\n\n\n  handleRollover_(value, reference) {\n    if (reference === null) {\n      return value;\n    }\n\n    let valueIn90khz = value * ONE_SECOND_IN_TS;\n    const referenceIn90khz = reference * ONE_SECOND_IN_TS;\n    let offset;\n\n    if (referenceIn90khz < valueIn90khz) {\n      // - 2^33\n      offset = -8589934592;\n    } else {\n      // + 2^33\n      offset = 8589934592;\n    } // distance(value - reference) > 2^32\n\n\n    while (Math.abs(valueIn90khz - referenceIn90khz) > 4294967296) {\n      valueIn90khz += offset;\n    }\n\n    return valueIn90khz / ONE_SECOND_IN_TS;\n  }\n\n}\n\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 */\n\nconst findAdCue = function (track, mediaTime) {\n  const cues = track.cues;\n\n  for (let i = 0; i < cues.length; i++) {\n    const cue = cues[i];\n\n    if (mediaTime >= cue.adStartTime && mediaTime <= cue.adEndTime) {\n      return cue;\n    }\n  }\n\n  return null;\n};\nconst updateAdCues = function (media, track, offset = 0) {\n  if (!media.segments) {\n    return;\n  }\n\n  let mediaTime = offset;\n  let cue;\n\n  for (let i = 0; i < media.segments.length; i++) {\n    const segment = media.segments[i];\n\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\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\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\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\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        const [adOffset, adTotal] = segment.cueOutCont.split('/').map(parseFloat);\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\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\nconst MAX_MEDIA_SEQUENCE_DIFF_FOR_SYNC = 86400;\nconst syncPointStrategies = [// 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: (syncController, playlist, duration, currentTimeline, currentTime) => {\n    if (duration !== Infinity) {\n      const syncPoint = {\n        time: 0,\n        segmentIndex: 0,\n        partIndex: null\n      };\n      return syncPoint;\n    }\n\n    return null;\n  }\n}, {\n  name: 'MediaSequence',\n\n  /**\n   * run media sequence strategy\n   *\n   * @param {SyncController} syncController\n   * @param {Object} playlist\n   * @param {number} duration\n   * @param {number} currentTimeline\n   * @param {number} currentTime\n   * @param {string} type\n   */\n  run: (syncController, playlist, duration, currentTimeline, currentTime, type) => {\n    if (!type) {\n      return null;\n    }\n\n    const mediaSequenceMap = syncController.getMediaSequenceMap(type);\n\n    if (!mediaSequenceMap || mediaSequenceMap.size === 0) {\n      return null;\n    }\n\n    if (playlist.mediaSequence === undefined || !Array.isArray(playlist.segments) || !playlist.segments.length) {\n      return null;\n    }\n\n    let currentMediaSequence = playlist.mediaSequence;\n    let segmentIndex = 0;\n\n    for (const segment of playlist.segments) {\n      const range = mediaSequenceMap.get(currentMediaSequence);\n\n      if (!range) {\n        // unexpected case\n        // we expect this playlist to be the same playlist in the map\n        // just break from the loop and move forward to the next strategy\n        break;\n      }\n\n      if (currentTime >= range.start && currentTime < range.end) {\n        // we found segment\n        if (Array.isArray(segment.parts) && segment.parts.length) {\n          let currentPartStart = range.start;\n          let partIndex = 0;\n\n          for (const part of segment.parts) {\n            const start = currentPartStart;\n            const end = start + part.duration;\n\n            if (currentTime >= start && currentTime < end) {\n              return {\n                time: range.start,\n                segmentIndex,\n                partIndex\n              };\n            }\n\n            partIndex++;\n            currentPartStart = end;\n          }\n        } // no parts found, return sync point for segment\n\n\n        return {\n          time: range.start,\n          segmentIndex,\n          partIndex: null\n        };\n      }\n\n      segmentIndex++;\n      currentMediaSequence++;\n    } // we didn't find any segments for provided current time\n\n\n    return null;\n  }\n}, // Stategy \"ProgramDateTime\": We have a program-date-time tag in this playlist\n{\n  name: 'ProgramDateTime',\n  run: (syncController, playlist, duration, currentTimeline, currentTime) => {\n    if (!Object.keys(syncController.timelineToDatetimeMappings).length) {\n      return null;\n    }\n\n    let syncPoint = null;\n    let lastDistance = null;\n    const partsAndSegments = getPartsAndSegments(playlist);\n    currentTime = currentTime || 0;\n\n    for (let i = 0; i < partsAndSegments.length; i++) {\n      // start from the end and loop backwards for live\n      // or start from the front and loop forwards for non-live\n      const index = playlist.endList || currentTime === 0 ? i : partsAndSegments.length - (i + 1);\n      const partAndSegment = partsAndSegments[index];\n      const segment = partAndSegment.segment;\n      const datetimeMapping = syncController.timelineToDatetimeMappings[segment.timeline];\n\n      if (!datetimeMapping || !segment.dateTimeObject) {\n        continue;\n      }\n\n      const segmentTime = segment.dateTimeObject.getTime() / 1000;\n      let start = segmentTime + datetimeMapping; // take part duration into account.\n\n      if (segment.parts && typeof partAndSegment.partIndex === 'number') {\n        for (let z = 0; z < partAndSegment.partIndex; z++) {\n          start += segment.parts[z].duration;\n        }\n      }\n\n      const 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\n      lastDistance = distance;\n      syncPoint = {\n        time: start,\n        segmentIndex: partAndSegment.segmentIndex,\n        partIndex: partAndSegment.partIndex\n      };\n    }\n\n    return syncPoint;\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: (syncController, playlist, duration, currentTimeline, currentTime) => {\n    let syncPoint = null;\n    let lastDistance = null;\n    currentTime = currentTime || 0;\n    const partsAndSegments = getPartsAndSegments(playlist);\n\n    for (let i = 0; i < partsAndSegments.length; i++) {\n      // start from the end and loop backwards for live\n      // or start from the front and loop forwards for non-live\n      const index = playlist.endList || currentTime === 0 ? i : partsAndSegments.length - (i + 1);\n      const partAndSegment = partsAndSegments[index];\n      const segment = partAndSegment.segment;\n      const start = partAndSegment.part && partAndSegment.part.start || segment && segment.start;\n\n      if (segment.timeline === currentTimeline && typeof start !== 'undefined') {\n        const 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\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\n    return syncPoint;\n  }\n}, // Stategy \"Discontinuity\": We have a discontinuity with a known\n//                          display-time\n{\n  name: 'Discontinuity',\n  run: (syncController, playlist, duration, currentTimeline, currentTime) => {\n    let syncPoint = null;\n    currentTime = currentTime || 0;\n\n    if (playlist.discontinuityStarts && playlist.discontinuityStarts.length) {\n      let lastDistance = null;\n\n      for (let i = 0; i < playlist.discontinuityStarts.length; i++) {\n        const segmentIndex = playlist.discontinuityStarts[i];\n        const discontinuity = playlist.discontinuitySequence + i + 1;\n        const discontinuitySync = syncController.discontinuities[discontinuity];\n\n        if (discontinuitySync) {\n          const 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\n          if (!syncPoint || lastDistance === null || lastDistance >= distance) {\n            lastDistance = distance;\n            syncPoint = {\n              time: discontinuitySync.time,\n              segmentIndex,\n              partIndex: null\n            };\n          }\n        }\n      }\n    }\n\n    return syncPoint;\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: (syncController, playlist, duration, currentTimeline, currentTime) => {\n    if (playlist.syncInfo) {\n      const syncPoint = {\n        time: playlist.syncInfo.time,\n        segmentIndex: playlist.syncInfo.mediaSequence - playlist.mediaSequence,\n        partIndex: null\n      };\n      return syncPoint;\n    }\n\n    return null;\n  }\n}];\nclass SyncController extends videojs.EventTarget {\n  constructor(options = {}) {\n    super(); // ...for synching across variants\n\n    this.timelines = [];\n    this.discontinuities = [];\n    this.timelineToDatetimeMappings = {};\n    /**\n     * @type {Map<string, Map<number, { start: number, end: number }>>}\n     * @private\n     */\n\n    this.mediaSequenceStorage_ = new Map();\n    this.logger_ = logger('SyncController');\n  }\n  /**\n   * Get media sequence map by type\n   *\n   * @param {string} type - segment loader type\n   * @return {Map<number, { start: number, end: number }> | undefined}\n   */\n\n\n  getMediaSequenceMap(type) {\n    return this.mediaSequenceStorage_.get(type);\n  }\n  /**\n   * Update Media Sequence Map -> <MediaSequence, Range>\n   *\n   * @param {Object} playlist - parsed playlist\n   * @param {number} currentTime - current player's time\n   * @param {string} type - segment loader type\n   * @return {void}\n   */\n\n\n  updateMediaSequenceMap(playlist, currentTime, type) {\n    // we should not process this playlist if it does not have mediaSequence or segments\n    if (playlist.mediaSequence === undefined || !Array.isArray(playlist.segments) || !playlist.segments.length) {\n      return;\n    }\n\n    const currentMap = this.getMediaSequenceMap(type);\n    const result = new Map();\n    let currentMediaSequence = playlist.mediaSequence;\n    let currentBaseTime;\n\n    if (!currentMap) {\n      // first playlist setup:\n      currentBaseTime = 0;\n    } else if (currentMap.has(playlist.mediaSequence)) {\n      // further playlists setup:\n      currentBaseTime = currentMap.get(playlist.mediaSequence).start;\n    } else {\n      // it seems like we have a gap between playlists, use current time as a fallback:\n      this.logger_(`MediaSequence sync for ${type} segment loader - received a gap between playlists.\nFallback base time to: ${currentTime}.\nReceived media sequence: ${currentMediaSequence}.\nCurrent map: `, currentMap);\n      currentBaseTime = currentTime;\n    }\n\n    this.logger_(`MediaSequence sync for ${type} segment loader.\nReceived media sequence: ${currentMediaSequence}.\nbase time is ${currentBaseTime}\nCurrent map: `, currentMap);\n    playlist.segments.forEach(segment => {\n      const start = currentBaseTime;\n      const end = start + segment.duration;\n      const range = {\n        start,\n        end\n      };\n      result.set(currentMediaSequence, range);\n      currentMediaSequence++;\n      currentBaseTime = end;\n    });\n    this.mediaSequenceStorage_.set(type, result);\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   * @param {number} currentTime\n   *        Current player's time\n   * @param {string} type\n   *        Segment loader type\n   * @return {Object}\n   *          A sync-point object\n   */\n\n\n  getSyncPoint(playlist, duration, currentTimeline, currentTime, type) {\n    // Always use VOD sync point for VOD\n    if (duration !== Infinity) {\n      const vodSyncPointStrategy = syncPointStrategies.find(({\n        name\n      }) => name === 'VOD');\n      return vodSyncPointStrategy.run(this, playlist, duration);\n    }\n\n    const syncPoints = this.runStrategies_(playlist, duration, currentTimeline, currentTime, type);\n\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    } // If we have exact match just return it instead of finding the nearest distance\n\n\n    for (const syncPointInfo of syncPoints) {\n      const {\n        syncPoint,\n        strategy\n      } = syncPointInfo;\n      const {\n        segmentIndex,\n        time\n      } = syncPoint;\n\n      if (segmentIndex < 0) {\n        continue;\n      }\n\n      const selectedSegment = playlist.segments[segmentIndex];\n      const start = time;\n      const end = start + selectedSegment.duration;\n      this.logger_(`Strategy: ${strategy}. Current time: ${currentTime}. selected segment: ${segmentIndex}. Time: [${start} -> ${end}]}`);\n\n      if (currentTime >= start && currentTime < end) {\n        this.logger_('Found sync point with exact match: ', syncPoint);\n        return syncPoint;\n      }\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\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\n  getExpiredTime(playlist, duration) {\n    if (!playlist || !playlist.segments) {\n      return null;\n    }\n\n    const syncPoints = this.runStrategies_(playlist, duration, playlist.discontinuitySequence, 0, 'main'); // Without sync-points, there is not enough information to determine the expired time\n\n    if (!syncPoints.length) {\n      return null;\n    }\n\n    const 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\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   * @param {number} currentTime\n   *        Current player's time\n   * @param {string} type\n   *        Segment loader type\n   * @return {Array}\n   *          A list of sync-point objects\n   */\n\n\n  runStrategies_(playlist, duration, currentTimeline, currentTime, type) {\n    const syncPoints = []; // Try to find a sync-point in by utilizing various strategies...\n\n    for (let i = 0; i < syncPointStrategies.length; i++) {\n      const strategy = syncPointStrategies[i];\n      const syncPoint = strategy.run(this, playlist, duration, currentTimeline, currentTime, type);\n\n      if (syncPoint) {\n        syncPoint.strategy = strategy.name;\n        syncPoints.push({\n          strategy: strategy.name,\n          syncPoint\n        });\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\n  selectSyncPoint_(syncPoints, target) {\n    let bestSyncPoint = syncPoints[0].syncPoint;\n    let bestDistance = Math.abs(syncPoints[0].syncPoint[target.key] - target.value);\n    let bestStrategy = syncPoints[0].strategy;\n\n    for (let i = 1; i < syncPoints.length; i++) {\n      const newDistance = Math.abs(syncPoints[i].syncPoint[target.key] - target.value);\n\n      if (newDistance < bestDistance) {\n        bestDistance = newDistance;\n        bestSyncPoint = syncPoints[i].syncPoint;\n        bestStrategy = syncPoints[i].strategy;\n      }\n    }\n\n    this.logger_(`syncPoint for [${target.key}: ${target.value}] chosen with strategy` + ` [${bestStrategy}]: [time:${bestSyncPoint.time},` + ` segmentIndex:${bestSyncPoint.segmentIndex}` + (typeof bestSyncPoint.partIndex === 'number' ? `,partIndex:${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\n  saveExpiredSegmentInfo(oldPlaylist, newPlaylist) {\n    const 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 ${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\n    for (let i = mediaSequenceDiff - 1; i >= 0; i--) {\n      const lastRemovedSegment = oldPlaylist.segments[i];\n\n      if (lastRemovedSegment && typeof lastRemovedSegment.start !== 'undefined') {\n        newPlaylist.syncInfo = {\n          mediaSequence: oldPlaylist.mediaSequence + i,\n          time: lastRemovedSegment.start\n        };\n        this.logger_(`playlist refresh sync: [time:${newPlaylist.syncInfo.time},` + ` mediaSequence: ${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\n  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\n    if (playlist.segments && playlist.segments.length && playlist.segments[0].dateTimeObject) {\n      const firstSegment = playlist.segments[0];\n      const 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\n  saveSegmentTimingInfo({\n    segmentInfo,\n    shouldSaveTimelineMapping\n  }) {\n    const didCalculateSegmentTimeMapping = this.calculateSegmentTimeMapping_(segmentInfo, segmentInfo.timingInfo, shouldSaveTimelineMapping);\n    const segment = segmentInfo.segment;\n\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\n    const dateTime = segment.dateTimeObject;\n\n    if (segment.discontinuity && shouldSaveTimelineMapping && dateTime) {\n      this.timelineToDatetimeMappings[segment.timeline] = -(dateTime.getTime() / 1000);\n    }\n  }\n\n  timestampOffsetForTimeline(timeline) {\n    if (typeof this.timelines[timeline] === 'undefined') {\n      return null;\n    }\n\n    return this.timelines[timeline].time;\n  }\n\n  mappingForTimeline(timeline) {\n    if (typeof this.timelines[timeline] === 'undefined') {\n      return null;\n    }\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\n  calculateSegmentTimeMapping_(segmentInfo, timingInfo, shouldSaveTimelineMapping) {\n    // TODO: remove side effects\n    const segment = segmentInfo.segment;\n    const part = segmentInfo.part;\n    let mappingObj = this.timelines[segmentInfo.timeline];\n    let start;\n    let end;\n\n    if (typeof segmentInfo.timestampOffset === 'number') {\n      mappingObj = {\n        time: segmentInfo.startOfSegment,\n        mapping: segmentInfo.startOfSegment - timingInfo.start\n      };\n\n      if (shouldSaveTimelineMapping) {\n        this.timelines[segmentInfo.timeline] = mappingObj;\n        this.trigger('timestampoffset');\n        this.logger_(`time mapping for timeline ${segmentInfo.timeline}: ` + `[time: ${mappingObj.time}] [mapping: ${mappingObj.mapping}]`);\n      }\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\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\n    if (!segment.start || start < segment.start) {\n      segment.start = start;\n    }\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\n  saveDiscontinuitySyncInfo_(segmentInfo) {\n    const playlist = segmentInfo.playlist;\n    const 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 (let i = 0; i < playlist.discontinuityStarts.length; i++) {\n        const segmentIndex = playlist.discontinuityStarts[i];\n        const discontinuity = playlist.discontinuitySequence + i + 1;\n        const mediaIndexDiff = segmentIndex - segmentInfo.mediaIndex;\n        const accuracy = Math.abs(mediaIndexDiff);\n\n        if (!this.discontinuities[discontinuity] || this.discontinuities[discontinuity].accuracy > accuracy) {\n          let time;\n\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\n          this.discontinuities[discontinuity] = {\n            time,\n            accuracy\n          };\n        }\n      }\n    }\n  }\n\n  dispose() {\n    this.trigger('dispose');\n    this.off();\n  }\n\n}\n\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 */\n\nclass TimelineChangeController extends videojs.EventTarget {\n  constructor() {\n    super();\n    this.pendingTimelineChanges_ = {};\n    this.lastTimelineChanges_ = {};\n  }\n\n  clearPendingTimelineChange(type) {\n    this.pendingTimelineChanges_[type] = null;\n    this.trigger('pendingtimelinechange');\n  }\n\n  pendingTimelineChange({\n    type,\n    from,\n    to\n  }) {\n    if (typeof from === 'number' && typeof to === 'number') {\n      this.pendingTimelineChanges_[type] = {\n        type,\n        from,\n        to\n      };\n      this.trigger('pendingtimelinechange');\n    }\n\n    return this.pendingTimelineChanges_[type];\n  }\n\n  lastTimelineChange({\n    type,\n    from,\n    to\n  }) {\n    if (typeof from === 'number' && typeof to === 'number') {\n      this.lastTimelineChanges_[type] = {\n        type,\n        from,\n        to\n      };\n      delete this.pendingTimelineChanges_[type];\n      this.trigger('timelinechange');\n    }\n\n    return this.lastTimelineChanges_[type];\n  }\n\n  dispose() {\n    this.trigger('dispose');\n    this.pendingTimelineChanges_ = {};\n    this.lastTimelineChanges_ = {};\n    this.off();\n  }\n\n}\n\n/* rollup-plugin-worker-factory start for worker!/home/runner/work/http-streaming/http-streaming/src/decrypter-worker.js */\nconst 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\n    var _proto = Stream.prototype;\n\n    _proto.on = function on(type, listener) {\n      if (!this.listeners[type]) {\n        this.listeners[type] = [];\n      }\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    ;\n\n    _proto.off = function off(type, listener) {\n      if (!this.listeners[type]) {\n        return false;\n      }\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    ;\n\n    _proto.trigger = function trigger(type) {\n      var callbacks = this.listeners[type];\n\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\n      if (arguments.length === 2) {\n        var length = callbacks.length;\n\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\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    ;\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    ;\n\n    _proto.pipe = function pipe(destination) {\n      this.on('data', function (data) {\n        destination.push(data);\n      });\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\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\n  const precompute = function () {\n    const tables = [[[], [], [], [], []], [[], [], [], [], []]];\n    const encTable = tables[0];\n    const decTable = tables[1];\n    const sbox = encTable[4];\n    const sboxInv = decTable[4];\n    let i;\n    let x;\n    let xInv;\n    const d = [];\n    const th = [];\n    let x2;\n    let x4;\n    let x8;\n    let s;\n    let tEnc;\n    let 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\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\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\n    for (i = 0; i < 5; i++) {\n      encTable[i] = encTable[i].slice(0);\n      decTable[i] = decTable[i].slice(0);\n    }\n\n    return tables;\n  };\n\n  let 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\n  class AES {\n    constructor(key) {\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\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      let i;\n      let j;\n      let tmp;\n      const sbox = this._tables[0][4];\n      const decTable = this._tables[1];\n      const keyLen = key.length;\n      let rcon = 1;\n\n      if (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n        throw new Error('Invalid aes key size');\n      }\n\n      const encKey = key.slice(0);\n      const 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\n        encKey[i] = encKey[i - keyLen] ^ tmp;\n      } // schedule decryption keys\n\n\n      for (j = 0; i; j++, i--) {\n        tmp = encKey[j & 3 ? i : i - 4];\n\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\n\n    decrypt(encrypted0, encrypted1, encrypted2, encrypted3, out, offset) {\n      const key = this._key[1]; // state variables a,b,c,d are loaded with pre-whitened data\n\n      let a = encrypted0 ^ key[0];\n      let b = encrypted3 ^ key[1];\n      let c = encrypted2 ^ key[2];\n      let d = encrypted1 ^ key[3];\n      let a2;\n      let b2;\n      let c2; // key.length === 2 ?\n\n      const nInnerRounds = key.length / 4 - 2;\n      let i;\n      let kIndex = 4;\n      const table = this._tables[1]; // load up the tables\n\n      const table0 = table[0];\n      const table1 = table[1];\n      const table2 = table[2];\n      const table3 = table[3];\n      const 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\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  }\n  /**\n   * @file async-stream.js\n   */\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\n\n  class AsyncStream extends Stream {\n    constructor() {\n      super(Stream);\n      this.jobs = [];\n      this.delay = 1;\n      this.timeout_ = null;\n    }\n    /**\n     * process an async job\n     *\n     * @private\n     */\n\n\n    processJob_() {\n      this.jobs.shift()();\n\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\n    push(job) {\n      this.jobs.push(job);\n\n      if (!this.timeout_) {\n        this.timeout_ = setTimeout(this.processJob_.bind(this), this.delay);\n      }\n    }\n\n  }\n  /**\n   * @file decrypter.js\n   *\n   * An asynchronous implementation of AES-128 CBC decryption with\n   * PKCS#7 padding.\n   */\n\n  /**\n   * Convert network-order (big-endian) bytes into their little-endian\n   * representation.\n   */\n\n\n  const ntoh = function (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\n  const decrypt = function (encrypted, key, initVector) {\n    // word-level access to the encrypted bytes\n    const encrypted32 = new Int32Array(encrypted.buffer, encrypted.byteOffset, encrypted.byteLength >> 2);\n    const decipher = new AES(Array.prototype.slice.call(key)); // byte and word-level access for the decrypted output\n\n    const decrypted = new Uint8Array(encrypted.byteLength);\n    const decrypted32 = new Int32Array(decrypted.buffer); // temporary variables for working with the IV, encrypted, and\n    // decrypted data\n\n    let init0;\n    let init1;\n    let init2;\n    let init3;\n    let encrypted0;\n    let encrypted1;\n    let encrypted2;\n    let encrypted3; // iteration variable\n\n    let 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\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\n\n  class Decrypter {\n    constructor(encrypted, key, initVector, done) {\n      const step = Decrypter.STEP;\n      const encrypted32 = new Int32Array(encrypted.buffer);\n      const decrypted = new Uint8Array(encrypted.byteLength);\n      let 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\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\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\n\n    static get STEP() {\n      // 4 * 8000;\n      return 32000;\n    }\n    /**\n     * @private\n     */\n\n\n    decryptChunk_(encrypted, key, initVector, decrypted) {\n      return function () {\n        const bytes = decrypt(encrypted, key, initVector);\n        decrypted.set(bytes, encrypted.byteOffset);\n      };\n    }\n\n  }\n\n  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n  var win;\n\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\n  var window_1 = win;\n\n  var isArrayBufferView = function isArrayBufferView(obj) {\n    if (ArrayBuffer.isView === 'function') {\n      return ArrayBuffer.isView(obj);\n    }\n\n    return obj && obj.buffer instanceof ArrayBuffer;\n  };\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\n  (function () {\n    var a = new Uint16Array([0xFFCC]);\n    var b = new Uint8Array(a.buffer, a.byteOffset, a.byteLength);\n\n    if (b[0] === 0xFF) {\n      return 'big';\n    }\n\n    if (b[0] === 0xCC) {\n      return 'little';\n    }\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\n  const createTransferableMessage = function (message) {\n    const transferable = {};\n    Object.keys(message).forEach(key => {\n      const value = message[key];\n\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\n  self.onmessage = function (event) {\n    const data = event.data;\n    const encrypted = new Uint8Array(data.encrypted.bytes, data.encrypted.byteOffset, data.encrypted.byteLength);\n    const key = new Uint32Array(data.key.bytes, data.key.byteOffset, data.key.byteLength / 4);\n    const 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\nconst audioTrackKind_ = properties => {\n  let kind = properties.default ? 'main' : 'alternative';\n\n  if (properties.characteristics && properties.characteristics.indexOf('public.accessibility.describes-video') >= 0) {\n    kind = 'main-desc';\n  }\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\n\nconst stopLoaders = (segmentLoader, mediaType) => {\n  segmentLoader.abort();\n  segmentLoader.pause();\n\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\nconst 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\nconst onGroupChanged = (type, settings) => () => {\n  const {\n    segmentLoaders: {\n      [type]: segmentLoader,\n      main: mainSegmentLoader\n    },\n    mediaTypes: {\n      [type]: mediaType\n    }\n  } = settings;\n  const activeTrack = mediaType.activeTrack();\n  const activeGroup = mediaType.getActiveGroup();\n  const previousActiveLoader = mediaType.activePlaylistLoader;\n  const lastGroup = mediaType.lastGroup_; // the group did not change do nothing\n\n  if (activeGroup && lastGroup && activeGroup.id === lastGroup.id) {\n    return;\n  }\n\n  mediaType.lastGroup_ = activeGroup;\n  mediaType.lastTrack_ = activeTrack;\n  stopLoaders(segmentLoader, mediaType);\n\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\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\n    return;\n  } // Non-destructive resync\n\n\n  segmentLoader.resyncLoader();\n  startLoaders(activeGroup.playlistLoader, mediaType);\n};\nconst onGroupChanging = (type, settings) => () => {\n  const {\n    segmentLoaders: {\n      [type]: segmentLoader\n    },\n    mediaTypes: {\n      [type]: mediaType\n    }\n  } = settings;\n  mediaType.lastGroup_ = null;\n  segmentLoader.abort();\n  segmentLoader.pause();\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\nconst onTrackChanged = (type, settings) => () => {\n  const {\n    mainPlaylistLoader,\n    segmentLoaders: {\n      [type]: segmentLoader,\n      main: mainSegmentLoader\n    },\n    mediaTypes: {\n      [type]: mediaType\n    }\n  } = settings;\n  const activeTrack = mediaType.activeTrack();\n  const activeGroup = mediaType.getActiveGroup();\n  const previousActiveLoader = mediaType.activePlaylistLoader;\n  const lastTrack = mediaType.lastTrack_; // track did not change, do nothing\n\n  if (lastTrack && activeTrack && lastTrack.id === activeTrack.id) {\n    return;\n  }\n\n  mediaType.lastGroup_ = activeGroup;\n  mediaType.lastTrack_ = activeTrack;\n  stopLoaders(segmentLoader, mediaType);\n\n  if (!activeGroup) {\n    // there is no group active so we do not want to restart loaders\n    return;\n  }\n\n  if (activeGroup.isMainPlaylist) {\n    // track did not change, do nothing\n    if (!activeTrack || !lastTrack || activeTrack.id === lastTrack.id) {\n      return;\n    }\n\n    const pc = settings.vhs.playlistController_;\n    const newPlaylist = pc.selectPlaylist(); // media will not change do nothing\n\n    if (pc.media() === newPlaylist) {\n      return;\n    }\n\n    mediaType.logger_(`track change. Switching main audio from ${lastTrack.id} to ${activeTrack.id}`);\n    mainPlaylistLoader.pause();\n    mainSegmentLoader.resetEverything();\n    pc.fastQualityChange_(newPlaylist);\n    return;\n  }\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\n    segmentLoader.setAudio(true);\n    mainSegmentLoader.setAudio(false);\n  }\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\n  if (segmentLoader.track) {\n    // For WebVTT, set the new text track in the segmentloader\n    segmentLoader.track(activeTrack);\n  } // destructive reset\n\n\n  segmentLoader.resetEverything();\n  startLoaders(activeGroup.playlistLoader, mediaType);\n};\nconst 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: (type, settings) => () => {\n    const {\n      mediaTypes: {\n        [type]: mediaType\n      },\n      excludePlaylist\n    } = settings; // switch back to default audio track\n\n    const activeTrack = mediaType.activeTrack();\n    const activeGroup = mediaType.activeGroup();\n    const id = (activeGroup.filter(group => group.default)[0] || activeGroup[0]).id;\n    const defaultTrack = mediaType.tracks[id];\n\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\n    videojs.log.warn('Problem encountered loading the alternate audio track.' + 'Switching back to default.');\n\n    for (const trackId in mediaType.tracks) {\n      mediaType.tracks[trackId].enabled = mediaType.tracks[trackId] === defaultTrack;\n    }\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: (type, settings) => () => {\n    const {\n      mediaTypes: {\n        [type]: mediaType\n      }\n    } = settings;\n    videojs.log.warn('Problem encountered loading the subtitle track.' + 'Disabling subtitle track.');\n    const track = mediaType.activeTrack();\n\n    if (track) {\n      track.mode = 'disabled';\n    }\n\n    mediaType.onTrackChanged();\n  }\n};\nconst 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: (type, playlistLoader, settings) => {\n    if (!playlistLoader) {\n      // no playlist loader means audio will be muxed with the video\n      return;\n    }\n\n    const {\n      tech,\n      requestOptions,\n      segmentLoaders: {\n        [type]: segmentLoader\n      }\n    } = settings;\n    playlistLoader.on('loadedmetadata', () => {\n      const 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', () => {\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  /**\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: (type, playlistLoader, settings) => {\n    const {\n      tech,\n      requestOptions,\n      segmentLoaders: {\n        [type]: segmentLoader\n      },\n      mediaTypes: {\n        [type]: mediaType\n      }\n    } = settings;\n    playlistLoader.on('loadedmetadata', () => {\n      const 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', () => {\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};\nconst 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': (type, settings) => {\n    const {\n      vhs,\n      sourceType,\n      segmentLoaders: {\n        [type]: segmentLoader\n      },\n      requestOptions,\n      main: {\n        mediaGroups\n      },\n      mediaTypes: {\n        [type]: {\n          groups,\n          tracks,\n          logger_\n        }\n      },\n      mainPlaylistLoader\n    } = settings;\n    const 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\n      if (audioOnlyMain) {\n        mediaGroups[type].main.default.playlists = mainPlaylistLoader.main.playlists;\n      }\n    }\n\n    for (const groupId in mediaGroups[type]) {\n      if (!groups[groupId]) {\n        groups[groupId] = [];\n      }\n\n      for (const variantLabel in mediaGroups[type][groupId]) {\n        let properties = mediaGroups[type][groupId][variantLabel];\n        let playlistLoader;\n\n        if (audioOnlyMain) {\n          logger_(`AUDIO group '${groupId}' label '${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\n        properties = merge({\n          id: variantLabel,\n          playlistLoader\n        }, properties);\n        setupListeners[type](type, properties.playlistLoader, settings);\n        groups[groupId].push(properties);\n\n        if (typeof tracks[variantLabel] === 'undefined') {\n          const 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\n    segmentLoader.on('error', onError[type](type, settings));\n  },\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': (type, settings) => {\n    const {\n      tech,\n      vhs,\n      sourceType,\n      segmentLoaders: {\n        [type]: segmentLoader\n      },\n      requestOptions,\n      main: {\n        mediaGroups\n      },\n      mediaTypes: {\n        [type]: {\n          groups,\n          tracks\n        }\n      },\n      mainPlaylistLoader\n    } = settings;\n\n    for (const groupId in mediaGroups[type]) {\n      if (!groups[groupId]) {\n        groups[groupId] = [];\n      }\n\n      for (const 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\n        let properties = mediaGroups[type][groupId][variantLabel];\n        let playlistLoader;\n\n        if (sourceType === 'hls') {\n          playlistLoader = new PlaylistLoader(properties.resolvedUri, vhs, requestOptions);\n        } else if (sourceType === 'dash') {\n          const playlists = properties.playlists.filter(p => p.excludeUntil !== Infinity);\n\n          if (!playlists.length) {\n            return;\n          }\n\n          playlistLoader = new DashPlaylistLoader(properties.playlists[0], vhs, requestOptions, mainPlaylistLoader);\n        } else if (sourceType === 'vhs-json') {\n          playlistLoader = new PlaylistLoader( // 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\n        properties = merge({\n          id: variantLabel,\n          playlistLoader\n        }, properties);\n        setupListeners[type](type, properties.playlistLoader, settings);\n        groups[groupId].push(properties);\n\n        if (typeof tracks[variantLabel] === 'undefined') {\n          const 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\n    segmentLoader.on('error', onError[type](type, settings));\n  },\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': (type, settings) => {\n    const {\n      tech,\n      main: {\n        mediaGroups\n      },\n      mediaTypes: {\n        [type]: {\n          groups,\n          tracks\n        }\n      }\n    } = settings;\n\n    for (const groupId in mediaGroups[type]) {\n      if (!groups[groupId]) {\n        groups[groupId] = [];\n      }\n\n      for (const variantLabel in mediaGroups[type][groupId]) {\n        const 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\n        const captionServices = tech.options_.vhs && tech.options_.vhs.captionServices || {};\n        let newProps = {\n          label: variantLabel,\n          language: properties.language,\n          instreamId: properties.instreamId,\n          default: properties.default && properties.autoselect\n        };\n\n        if (captionServices[newProps.instreamId]) {\n          newProps = merge(newProps, captionServices[newProps.instreamId]);\n        }\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\n        groups[groupId].push(merge({\n          id: variantLabel\n        }, properties));\n\n        if (typeof tracks[variantLabel] === 'undefined') {\n          const 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};\n\nconst groupMatch = (list, media) => {\n  for (let i = 0; i < list.length; i++) {\n    if (playlistMatch(media, list[i])) {\n      return true;\n    }\n\n    if (list[i].playlists && groupMatch(list[i].playlists, media)) {\n      return true;\n    }\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\n\nconst activeGroup = (type, settings) => track => {\n  const {\n    mainPlaylistLoader,\n    mediaTypes: {\n      [type]: {\n        groups\n      }\n    }\n  } = settings;\n  const media = mainPlaylistLoader.media();\n\n  if (!media) {\n    return null;\n  }\n\n  let variants = null; // set to variants to main media active group\n\n  if (media.attributes[type]) {\n    variants = groups[media.attributes[type]];\n  }\n\n  const groupKeys = Object.keys(groups);\n\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 (let i = 0; i < groupKeys.length; i++) {\n        const groupPropertyList = groups[groupKeys[i]];\n\n        if (groupMatch(groupPropertyList, media)) {\n          variants = groupPropertyList;\n          break;\n        }\n      } // use the main group if it exists\n\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\n  if (typeof track === 'undefined') {\n    return variants;\n  }\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\n  return variants.filter(props => props.id === track.id)[0] || null;\n};\nconst 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: (type, settings) => () => {\n    const {\n      mediaTypes: {\n        [type]: {\n          tracks\n        }\n      }\n    } = settings;\n\n    for (const id in tracks) {\n      if (tracks[id].enabled) {\n        return tracks[id];\n      }\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: (type, settings) => () => {\n    const {\n      mediaTypes: {\n        [type]: {\n          tracks\n        }\n      }\n    } = settings;\n\n    for (const id in tracks) {\n      if (tracks[id].mode === 'showing' || tracks[id].mode === 'hidden') {\n        return tracks[id];\n      }\n    }\n\n    return null;\n  }\n};\nconst getActiveGroup = (type, {\n  mediaTypes\n}) => () => {\n  const activeTrack_ = mediaTypes[type].activeTrack();\n\n  if (!activeTrack_) {\n    return null;\n  }\n\n  return mediaTypes[type].activeGroup(activeTrack_);\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\nconst setupMediaGroups = settings => {\n  ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(type => {\n    initialize[type](type, settings);\n  });\n  const {\n    mediaTypes,\n    mainPlaylistLoader,\n    tech,\n    vhs,\n    segmentLoaders: {\n      ['AUDIO']: audioSegmentLoader,\n      main: mainSegmentLoader\n    }\n  } = settings; // setup active group and track getters and change event handlers\n\n  ['AUDIO', 'SUBTITLES'].forEach(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  const audioGroup = mediaTypes.AUDIO.activeGroup();\n\n  if (audioGroup) {\n    const groupId = (audioGroup.filter(group => group.default)[0] || audioGroup[0]).id;\n    mediaTypes.AUDIO.tracks[groupId].enabled = true;\n    mediaTypes.AUDIO.onGroupChanged();\n    mediaTypes.AUDIO.onTrackChanged();\n    const 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\n  mainPlaylistLoader.on('mediachange', () => {\n    ['AUDIO', 'SUBTITLES'].forEach(type => mediaTypes[type].onGroupChanged());\n  });\n  mainPlaylistLoader.on('mediachanging', () => {\n    ['AUDIO', 'SUBTITLES'].forEach(type => mediaTypes[type].onGroupChanging());\n  }); // custom audio track change event handler for usage event\n\n  const onAudioTrackChanged = () => {\n    mediaTypes.AUDIO.onTrackChanged();\n    tech.trigger({\n      type: 'usage',\n      name: 'vhs-audio-change'\n    });\n  };\n\n  tech.audioTracks().addEventListener('change', onAudioTrackChanged);\n  tech.remoteTextTracks().addEventListener('change', mediaTypes.SUBTITLES.onTrackChanged);\n  vhs.on('dispose', () => {\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\n  for (const 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\nconst createMediaTypes = () => {\n  const mediaTypes = {};\n  ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(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[${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 * PATHWAY-CLONES: array (optional) (HLS only) pathway clone objects to copy from other playlists.\n */\n\nclass SteeringManifest {\n  constructor() {\n    this.priority_ = [];\n    this.pathwayClones_ = new Map();\n  }\n\n  set version(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  set ttl(seconds) {\n    // TTL = time-to-live, default = 300 seconds.\n    this.ttl_ = seconds || 300;\n  }\n\n  set reloadUri(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  set priority(array) {\n    // priority must be non-empty and unique values.\n    if (array && array.length) {\n      this.priority_ = array;\n    }\n  }\n\n  set pathwayClones(array) {\n    // pathwayClones must be non-empty.\n    if (array && array.length) {\n      this.pathwayClones_ = new Map(array.map(clone => [clone.ID, clone]));\n    }\n  }\n\n  get version() {\n    return this.version_;\n  }\n\n  get ttl() {\n    return this.ttl_;\n  }\n\n  get reloadUri() {\n    return this.reloadUri_;\n  }\n\n  get priority() {\n    return this.priority_;\n  }\n\n  get pathwayClones() {\n    return this.pathwayClones_;\n  }\n\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 */\n\n\nclass ContentSteeringController extends videojs.EventTarget {\n  constructor(xhr, bandwidth) {\n    super();\n    this.currentPathway = null;\n    this.defaultPathway = null;\n    this.queryBeforeStart = false;\n    this.availablePathways_ = new Set();\n    this.steeringManifest = new SteeringManifest();\n    this.proxyServerUrl_ = null;\n    this.manifestType_ = null;\n    this.ttlTimeout_ = null;\n    this.request_ = null;\n    this.currentPathwayClones = new Map();\n    this.nextPathwayClones = new Map();\n    this.excludedSteeringManifestURLs = new Set();\n    this.logger_ = logger('Content Steering');\n    this.xhr_ = xhr;\n    this.getBandwidth_ = bandwidth;\n  }\n  /**\n   * Assigns the content steering tag properties to the steering controller\n   *\n   * @param {string} baseUrl the baseURL from the main manifest for resolving the steering manifest url\n   * @param {Object} steeringTag the content steering tag from the main manifest\n   */\n\n\n  assignTagProperties(baseUrl, steeringTag) {\n    this.manifestType_ = steeringTag.serverUri ? 'HLS' : 'DASH'; // serverUri is HLS serverURL is DASH\n\n    const steeringUri = steeringTag.serverUri || steeringTag.serverURL;\n\n    if (!steeringUri) {\n      this.logger_(`steering manifest URL is ${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\n    if (steeringUri.startsWith('data:')) {\n      this.decodeDataUriManifest_(steeringUri.substring(steeringUri.indexOf(',') + 1));\n      return;\n    } // reloadUri is the resolution of the main manifest URL and steering URL.\n\n\n    this.steeringManifest.reloadUri = 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;\n    this.proxyServerUrl_ = steeringTag.proxyServerURL; // 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  }\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 should only happen once on initalization.\n   */\n\n\n  requestSteeringManifest(initial) {\n    const reloadUri = this.steeringManifest.reloadUri;\n\n    if (!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\n    const uri = initial ? reloadUri : 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\n    this.request_ = this.xhr_({\n      uri\n    }, (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          this.logger_(`manifest request 410 ${error}.`);\n          this.logger_(`There will be no more content steering requests to ${uri} this session.`);\n          this.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\n        if (errorInfo.status === 429) {\n          const retrySeconds = errorInfo.responseHeaders['retry-after'];\n          this.logger_(`manifest request 429 ${error}.`);\n          this.logger_(`content steering will retry in ${retrySeconds} seconds.`);\n          this.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\n        this.logger_(`manifest failed to load ${error}.`);\n        this.startTTLTimeout_();\n        return;\n      }\n\n      const steeringManifestJson = JSON.parse(this.request_.responseText);\n      this.assignSteeringProperties_(steeringManifestJson);\n      this.startTTLTimeout_();\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\n  setProxyServerUrl_(steeringUrl) {\n    const steeringUrlObject = new window$1.URL(steeringUrl);\n    const 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\n  decodeDataUriManifest_(dataUri) {\n    const 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\n  setSteeringParams_(url) {\n    const urlObject = new window$1.URL(url);\n    const path = this.getPathway();\n    const networkThroughput = this.getBandwidth_();\n\n    if (path) {\n      const pathwayKey = `_${this.manifestType_}_pathway`;\n      urlObject.searchParams.set(pathwayKey, path);\n    }\n\n    if (networkThroughput) {\n      const throughputKey = `_${this.manifestType_}_throughput`;\n      urlObject.searchParams.set(throughputKey, networkThroughput);\n    }\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\n  assignSteeringProperties_(steeringJson) {\n    this.steeringManifest.version = steeringJson.VERSION;\n\n    if (!this.steeringManifest.version) {\n      this.logger_(`manifest version is ${steeringJson.VERSION}, which is not supported.`);\n      this.trigger('error');\n      return;\n    }\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']; // Pathway clones to be created/updated in HLS.\n    // See section 7.2 https://datatracker.ietf.org/doc/draft-pantos-hls-rfc8216bis/\n\n    this.steeringManifest.pathwayClones = steeringJson['PATHWAY-CLONES'];\n    this.nextPathwayClones = this.steeringManifest.pathwayClones; // 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\n    const chooseNextPathway = pathwaysByPriority => {\n      for (const path of pathwaysByPriority) {\n        if (this.availablePathways_.has(path)) {\n          return path;\n        }\n      } // If no pathway matches, ignore the manifest and choose the first available.\n\n\n      return [...this.availablePathways_][0];\n    };\n\n    const nextPathway = chooseNextPathway(this.steeringManifest.priority);\n\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\n  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\n  getRequestURI(reloadUri) {\n    if (!reloadUri) {\n      return null;\n    }\n\n    const isExcluded = uri => this.excludedSteeringManifestURLs.has(uri);\n\n    if (this.proxyServerUrl_) {\n      const proxyURI = this.setProxyServerUrl_(reloadUri);\n\n      if (!isExcluded(proxyURI)) {\n        return proxyURI;\n      }\n    }\n\n    const steeringURI = this.setSteeringParams_(reloadUri);\n\n    if (!isExcluded(steeringURI)) {\n      return steeringURI;\n    } // Return nothing if all valid manifest URIs are excluded.\n\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\n  startTTLTimeout_(ttl = this.steeringManifest.ttl) {\n    // 300 (5 minutes) is the default value.\n    const ttlMS = ttl * 1000;\n    this.ttlTimeout_ = window$1.setTimeout(() => {\n      this.requestSteeringManifest();\n    }, ttlMS);\n  }\n  /**\n   * Clear the TTL timeout if necessary.\n   */\n\n\n  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\n  abort() {\n    if (this.request_) {\n      this.request_.abort();\n    }\n\n    this.request_ = null;\n  }\n  /**\n   * aborts steering requests clears the ttl timeout and resets all properties.\n   */\n\n\n  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.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\n  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\n  clearAvailablePathways() {\n    this.availablePathways_.clear();\n  }\n  /**\n   * Removes a pathway from the available pathways set.\n   */\n\n\n  excludePathway(pathway) {\n    return this.availablePathways_.delete(pathway);\n  }\n  /**\n   * Checks the refreshed DASH manifest content steering tag for changes.\n   *\n   * @param {string} baseURL new steering tag on DASH manifest refresh\n   * @param {Object} newTag the new tag to check for changes\n   * @return a true or false whether the new tag has different values\n   */\n\n\n  didDASHTagChange(baseURL, newTag) {\n    return !newTag && this.steeringManifest.reloadUri || newTag && (resolveUrl(baseURL, newTag.serverURL) !== this.steeringManifest.reloadUri || newTag.defaultServiceLocation !== this.defaultPathway || newTag.queryBeforeStart !== this.queryBeforeStart || newTag.proxyServerURL !== this.proxyServerUrl_);\n  }\n\n  getAvailablePathways() {\n    return this.availablePathways_;\n  }\n\n}\n\n/**\n * @file playlist-controller.js\n */\nconst ABORT_EARLY_EXCLUSION_SECONDS = 10;\nlet Vhs$1; // SegmentLoader stats that need to have each loader's\n// values summed to calculate the final value\n\nconst loaderStats = ['mediaRequests', 'mediaRequestsAborted', 'mediaRequestsTimedout', 'mediaRequestsErrored', 'mediaTransferDuration', 'mediaBytesTransferred', 'mediaAppends'];\n\nconst sumLoaderStat = function (stat) {\n  return this.audioSegmentLoader_[stat] + this.mainSegmentLoader_[stat];\n};\n\nconst shouldSwitchToMedia = function ({\n  currentPlaylist,\n  buffered,\n  currentTime,\n  nextPlaylist,\n  bufferLowWaterLine,\n  bufferHighWaterLine,\n  duration,\n  bufferBasedABR,\n  log\n}) {\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\n  const sharedLogLine = `allowing switch ${currentPlaylist && currentPlaylist.id || 'null'} -> ${nextPlaylist.id}`;\n\n  if (!currentPlaylist) {\n    log(`${sharedLogLine} as current playlist is not set`);\n    return true;\n  } // no need to switch if playlist is the same\n\n\n  if (nextPlaylist.id === currentPlaylist.id) {\n    return false;\n  } // determine if current time is in a buffered range.\n\n\n  const 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 ${sharedLogLine} as current playlist is live llhls, but currentTime isn't in buffered.`);\n      return false;\n    }\n\n    log(`${sharedLogLine} as current playlist is live`);\n    return true;\n  }\n\n  const forwardBuffer = timeAheadOf(buffered, currentTime);\n  const 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(`${sharedLogLine} as duration < max low water line (${duration} < ${maxBufferLowWaterLine})`);\n    return true;\n  }\n\n  const nextBandwidth = nextPlaylist.attributes.BANDWIDTH;\n  const 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    let logLine = `${sharedLogLine} as next bandwidth < current bandwidth (${nextBandwidth} < ${currBandwidth})`;\n\n    if (bufferBasedABR) {\n      logLine += ` and forwardBuffer < bufferHighWaterLine (${forwardBuffer} < ${bufferHighWaterLine})`;\n    }\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\n  if ((!bufferBasedABR || nextBandwidth > currBandwidth) && forwardBuffer >= bufferLowWaterLine) {\n    let logLine = `${sharedLogLine} as forwardBuffer >= bufferLowWaterLine (${forwardBuffer} >= ${bufferLowWaterLine})`;\n\n    if (bufferBasedABR) {\n      logLine += ` and next bandwidth > current bandwidth (${nextBandwidth} > ${currBandwidth})`;\n    }\n\n    log(logLine);\n    return true;\n  }\n\n  log(`not ${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 */\n\n\nclass PlaylistController extends videojs.EventTarget {\n  constructor(options) {\n    super();\n    const {\n      src,\n      withCredentials,\n      tech,\n      bandwidth,\n      externVhs,\n      useCueTags,\n      playlistExclusionDuration,\n      enableLowInitialPlaylist,\n      sourceType,\n      cacheEncryptionKeys,\n      bufferBasedABR,\n      leastPixelDiffSelector,\n      captionServices\n    } = options;\n\n    if (!src) {\n      throw new Error('A non-empty playlist URL or JSON manifest string is required');\n    }\n\n    let {\n      maxPlaylistRetries\n    } = options;\n\n    if (maxPlaylistRetries === null || typeof maxPlaylistRetries === 'undefined') {\n      maxPlaylistRetries = Infinity;\n    }\n\n    Vhs$1 = externVhs;\n    this.bufferBasedABR = Boolean(bufferBasedABR);\n    this.leastPixelDiffSelector = Boolean(leastPixelDiffSelector);\n    this.withCredentials = withCredentials;\n    this.tech_ = tech;\n    this.vhs_ = tech.vhs;\n    this.sourceType_ = sourceType;\n    this.useCueTags_ = useCueTags;\n    this.playlistExclusionDuration = playlistExclusionDuration;\n    this.maxPlaylistRetries = maxPlaylistRetries;\n    this.enableLowInitialPlaylist = enableLowInitialPlaylist;\n\n    if (this.useCueTags_) {\n      this.cueTagsTrack_ = this.tech_.addTextTrack('metadata', 'ad-cues');\n      this.cueTagsTrack_.inBandMetadataTrackDispatchType = '';\n    }\n\n    this.requestOptions_ = {\n      withCredentials,\n      maxPlaylistRetries,\n      timeout: null\n    };\n    this.on('error', this.pauseLoading);\n    this.mediaTypes_ = createMediaTypes();\n    this.mediaSource = new window$1.MediaSource();\n    this.handleDurationChange_ = this.handleDurationChange_.bind(this);\n    this.handleSourceOpen_ = this.handleSourceOpen_.bind(this);\n    this.handleSourceEnded_ = this.handleSourceEnded_.bind(this);\n    this.mediaSource.addEventListener('durationchange', this.handleDurationChange_); // load the media source into the player\n\n    this.mediaSource.addEventListener('sourceopen', this.handleSourceOpen_);\n    this.mediaSource.addEventListener('sourceended', this.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    this.seekable_ = createTimeRanges();\n    this.hasPlayed_ = false;\n    this.syncController_ = new SyncController(options);\n    this.segmentMetadataTrack_ = tech.addRemoteTextTrack({\n      kind: 'metadata',\n      label: 'segment-metadata'\n    }, false).track;\n    this.decrypter_ = new Decrypter();\n    this.sourceUpdater_ = new SourceUpdater(this.mediaSource);\n    this.inbandTextTracks_ = {};\n    this.timelineChangeController_ = new TimelineChangeController();\n    this.keyStatusMap_ = new Map();\n    const segmentLoaderSettings = {\n      vhs: this.vhs_,\n      parse708captions: options.parse708captions,\n      useDtsForTimestampOffset: options.useDtsForTimestampOffset,\n      captionServices,\n      mediaSource: this.mediaSource,\n      currentTime: this.tech_.currentTime.bind(this.tech_),\n      seekable: () => this.seekable(),\n      seeking: () => this.tech_.seeking(),\n      duration: () => this.duration(),\n      hasPlayed: () => this.hasPlayed_,\n      goalBufferLength: () => this.goalBufferLength(),\n      bandwidth,\n      syncController: this.syncController_,\n      decrypter: this.decrypter_,\n      sourceType: this.sourceType_,\n      inbandTextTracks: this.inbandTextTracks_,\n      cacheEncryptionKeys,\n      sourceUpdater: this.sourceUpdater_,\n      timelineChangeController: this.timelineChangeController_,\n      exactManifestTimings: options.exactManifestTimings,\n      addMetadataToTextTrack: this.addMetadataToTextTrack.bind(this)\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    this.mainPlaylistLoader_ = this.sourceType_ === 'dash' ? new DashPlaylistLoader(src, this.vhs_, merge(this.requestOptions_, {\n      addMetadataToTextTrack: this.addMetadataToTextTrack.bind(this)\n    })) : new PlaylistLoader(src, this.vhs_, merge(this.requestOptions_, {\n      addDateRangesToTextTrack: this.addDateRangesToTextTrack_.bind(this)\n    }));\n    this.setupMainPlaylistLoaderListeners_(); // setup segment loaders\n    // combined audio/video or just video when alternate audio track is selected\n\n    this.mainSegmentLoader_ = new SegmentLoader(merge(segmentLoaderSettings, {\n      segmentMetadataTrack: this.segmentMetadataTrack_,\n      loaderType: 'main'\n    }), options); // alternate audio track\n\n    this.audioSegmentLoader_ = new SegmentLoader(merge(segmentLoaderSettings, {\n      loaderType: 'audio'\n    }), options);\n    this.subtitleSegmentLoader_ = new VTTSegmentLoader(merge(segmentLoaderSettings, {\n      loaderType: 'vtt',\n      featuresNativeTextTracks: this.tech_.featuresNativeTextTracks,\n      loadVttJs: () => new Promise((resolve, reject) => {\n        function onLoad() {\n          tech.off('vttjserror', onError);\n          resolve();\n        }\n\n        function onError() {\n          tech.off('vttjsloaded', onLoad);\n          reject();\n        }\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    }), options);\n\n    const getBandwidth = () => {\n      return this.mainSegmentLoader_.bandwidth;\n    };\n\n    this.contentSteeringController_ = new ContentSteeringController(this.vhs_.xhr, getBandwidth);\n    this.setupSegmentLoaderListeners_();\n\n    if (this.bufferBasedABR) {\n      this.mainPlaylistLoader_.one('loadedplaylist', () => this.startABRTimer_());\n      this.tech_.on('pause', () => this.stopABRTimer_());\n      this.tech_.on('play', () => this.startABRTimer_());\n    } // Create SegmentLoader stat-getters\n    // mediaRequests_\n    // mediaRequestsAborted_\n    // mediaRequestsTimedout_\n    // mediaRequestsErrored_\n    // mediaTransferDuration_\n    // mediaBytesTransferred_\n    // mediaAppends_\n\n\n    loaderStats.forEach(stat => {\n      this[stat + '_'] = sumLoaderStat.bind(this, stat);\n    });\n    this.logger_ = logger('pc');\n    this.triggeredFmp4Usage = false;\n\n    if (this.tech_.preload() === 'none') {\n      this.loadOnPlay_ = () => {\n        this.loadOnPlay_ = null;\n        this.mainPlaylistLoader_.load();\n      };\n\n      this.tech_.one('play', this.loadOnPlay_);\n    } else {\n      this.mainPlaylistLoader_.load();\n    }\n\n    this.timeToLoadedData__ = -1;\n    this.mainAppendsToLoadedData__ = -1;\n    this.audioAppendsToLoadedData__ = -1;\n    const event = this.tech_.preload() === 'none' ? 'play' : 'loadstart'; // start the first frame timer on loadstart or play (for preload none)\n\n    this.tech_.one(event, () => {\n      const timeToLoadedDataStart = Date.now();\n      this.tech_.one('loadeddata', () => {\n        this.timeToLoadedData__ = Date.now() - timeToLoadedDataStart;\n        this.mainAppendsToLoadedData__ = this.mainSegmentLoader_.mediaAppends;\n        this.audioAppendsToLoadedData__ = this.audioSegmentLoader_.mediaAppends;\n      });\n    });\n  }\n\n  mainAppendsToLoadedData_() {\n    return this.mainAppendsToLoadedData__;\n  }\n\n  audioAppendsToLoadedData_() {\n    return this.audioAppendsToLoadedData__;\n  }\n\n  appendsToLoadedData_() {\n    const main = this.mainAppendsToLoadedData_();\n    const audio = this.audioAppendsToLoadedData_();\n\n    if (main === -1 || audio === -1) {\n      return -1;\n    }\n\n    return main + audio;\n  }\n\n  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\n  checkABR_(reason = 'abr') {\n    const nextPlaylist = this.selectPlaylist();\n\n    if (nextPlaylist && this.shouldSwitchToMedia_(nextPlaylist)) {\n      this.switchMedia_(nextPlaylist, reason);\n    }\n  }\n\n  switchMedia_(playlist, cause, delay) {\n    const oldMedia = this.media();\n    const oldId = oldMedia && (oldMedia.id || oldMedia.uri);\n    const newId = playlist && (playlist.id || playlist.uri);\n\n    if (oldId && oldId !== newId) {\n      this.logger_(`switch media ${oldId} -> ${newId} from ${cause}`);\n      this.tech_.trigger({\n        type: 'usage',\n        name: `vhs-rendition-change-${cause}`\n      });\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\n  switchMediaForDASHContentSteering_() {\n    ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(type => {\n      const mediaType = this.mediaTypes_[type];\n      const activeGroup = mediaType ? mediaType.activeGroup() : null;\n      const pathway = this.contentSteeringController_.getPathway();\n\n      if (activeGroup && pathway) {\n        // activeGroup can be an array or a single group\n        const mediaPlaylists = activeGroup.length ? activeGroup[0].playlists : activeGroup.playlists;\n        const dashMediaPlaylists = mediaPlaylists.filter(p => p.attributes.serviceLocation === pathway); // Switch the current active playlist to the correct CDN\n\n        if (dashMediaPlaylists.length) {\n          this.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\n  startABRTimer_() {\n    this.stopABRTimer_();\n    this.abrTimer_ = window$1.setInterval(() => this.checkABR_(), 250);\n  }\n  /**\n   * Stop the timer that periodically calls checkABR_\n   *\n   * @private\n   */\n\n\n  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\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\n  getAudioTrackPlaylists_() {\n    const main = this.main();\n    const 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\n    const AUDIO = main.mediaGroups.AUDIO;\n    const groupKeys = Object.keys(AUDIO);\n    let 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      const defaultGroup = AUDIO.main || groupKeys.length && AUDIO[groupKeys[0]];\n\n      for (const label in defaultGroup) {\n        if (defaultGroup[label].default) {\n          track = {\n            label\n          };\n          break;\n        }\n      }\n    } // no active track no playlists.\n\n\n    if (!track) {\n      return defaultPlaylists;\n    }\n\n    const playlists = []; // get all of the playlists that are possible for the\n    // active track.\n\n    for (const group in AUDIO) {\n      if (AUDIO[group][track.label]) {\n        const properties = AUDIO[group][track.label];\n\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 (let i = 0; i < main.playlists.length; i++) {\n            const playlist = main.playlists[i];\n\n            if (playlist.attributes && playlist.attributes.AUDIO && playlist.attributes.AUDIO === group) {\n              playlists.push(playlist);\n            }\n          }\n        }\n      }\n    }\n\n    if (!playlists.length) {\n      return defaultPlaylists;\n    }\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\n  setupMainPlaylistLoaderListeners_() {\n    this.mainPlaylistLoader_.on('loadedmetadata', () => {\n      const media = this.mainPlaylistLoader_.media();\n      const 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(this.mainPlaylistLoader_.main, this.mainPlaylistLoader_.media())) {\n        this.requestOptions_.timeout = 0;\n      } else {\n        this.requestOptions_.timeout = requestTimeout;\n      } // if this isn't a live video and preload permits, start\n      // downloading segments\n\n\n      if (media.endList && this.tech_.preload() !== 'none') {\n        this.mainSegmentLoader_.playlist(media, this.requestOptions_);\n        this.mainSegmentLoader_.load();\n      }\n\n      setupMediaGroups({\n        sourceType: this.sourceType_,\n        segmentLoaders: {\n          AUDIO: this.audioSegmentLoader_,\n          SUBTITLES: this.subtitleSegmentLoader_,\n          main: this.mainSegmentLoader_\n        },\n        tech: this.tech_,\n        requestOptions: this.requestOptions_,\n        mainPlaylistLoader: this.mainPlaylistLoader_,\n        vhs: this.vhs_,\n        main: this.main(),\n        mediaTypes: this.mediaTypes_,\n        excludePlaylist: this.excludePlaylist.bind(this)\n      });\n      this.triggerPresenceUsage_(this.main(), media);\n      this.setupFirstPlay();\n\n      if (!this.mediaTypes_.AUDIO.activePlaylistLoader || this.mediaTypes_.AUDIO.activePlaylistLoader.media()) {\n        this.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        this.mediaTypes_.AUDIO.activePlaylistLoader.one('loadedmetadata', () => {\n          this.trigger('selectedinitialmedia');\n        });\n      }\n    });\n    this.mainPlaylistLoader_.on('loadedplaylist', () => {\n      if (this.loadOnPlay_) {\n        this.tech_.off('play', this.loadOnPlay_);\n      }\n\n      let updatedPlaylist = this.mainPlaylistLoader_.media();\n\n      if (!updatedPlaylist) {\n        // Add content steering listeners on first load and init.\n        this.attachContentSteeringListeners_();\n        this.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        this.excludeUnsupportedVariants_();\n        let selectedMedia;\n\n        if (this.enableLowInitialPlaylist) {\n          selectedMedia = this.selectInitialPlaylist();\n        }\n\n        if (!selectedMedia) {\n          selectedMedia = this.selectPlaylist();\n        }\n\n        if (!selectedMedia || !this.shouldSwitchToMedia_(selectedMedia)) {\n          return;\n        }\n\n        this.initialMedia_ = selectedMedia;\n        this.switchMedia_(this.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        const haveJsonSource = this.sourceType_ === 'vhs-json' && this.initialMedia_.segments;\n\n        if (!haveJsonSource) {\n          return;\n        }\n\n        updatedPlaylist = this.initialMedia_;\n      }\n\n      this.handleUpdatedMediaPlaylist(updatedPlaylist);\n    });\n    this.mainPlaylistLoader_.on('error', () => {\n      const error = this.mainPlaylistLoader_.error;\n      this.excludePlaylist({\n        playlistToExclude: error.playlist,\n        error\n      });\n    });\n    this.mainPlaylistLoader_.on('mediachanging', () => {\n      this.mainSegmentLoader_.abort();\n      this.mainSegmentLoader_.pause();\n    });\n    this.mainPlaylistLoader_.on('mediachange', () => {\n      const media = this.mainPlaylistLoader_.media();\n      const 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(this.mainPlaylistLoader_.main, this.mainPlaylistLoader_.media())) {\n        this.requestOptions_.timeout = 0;\n      } else {\n        this.requestOptions_.timeout = requestTimeout;\n      }\n\n      if (this.sourceType_ === 'dash') {\n        // we don't want to re-request the same hls playlist right after it was changed\n        this.mainPlaylistLoader_.load();\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 `loadedplaylist`\n\n\n      this.mainSegmentLoader_.pause();\n      this.mainSegmentLoader_.playlist(media, this.requestOptions_);\n\n      if (this.waitingForFastQualityPlaylistReceived_) {\n        this.runFastQualitySwitch_();\n      } else {\n        this.mainSegmentLoader_.load();\n      }\n\n      this.tech_.trigger({\n        type: 'mediachange',\n        bubbles: true\n      });\n    });\n    this.mainPlaylistLoader_.on('playlistunchanged', () => {\n      const updatedPlaylist = this.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\n      const playlistOutdated = this.stuckAtPlaylistEnd_(updatedPlaylist);\n\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        this.excludePlaylist({\n          error: {\n            message: 'Playlist no longer updating.',\n            reason: 'playlist-unchanged'\n          }\n        }); // useful for monitoring QoS\n\n        this.tech_.trigger('playliststuck');\n      }\n    });\n    this.mainPlaylistLoader_.on('renditiondisabled', () => {\n      this.tech_.trigger({\n        type: 'usage',\n        name: 'vhs-rendition-disabled'\n      });\n    });\n    this.mainPlaylistLoader_.on('renditionenabled', () => {\n      this.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\n  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\n    this.mainSegmentLoader_.pause();\n    this.mainSegmentLoader_.playlist(updatedPlaylist, this.requestOptions_);\n\n    if (this.waitingForFastQualityPlaylistReceived_) {\n      this.runFastQualitySwitch_();\n    }\n\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\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\n  triggerPresenceUsage_(main, media) {\n    const mediaGroups = main.mediaGroups || {};\n    let defaultDemuxed = true;\n    const audioGroupKeys = Object.keys(mediaGroups.AUDIO);\n\n    for (const mediaGroup in mediaGroups.AUDIO) {\n      for (const label in mediaGroups.AUDIO[mediaGroup]) {\n        const properties = mediaGroups.AUDIO[mediaGroup][label];\n\n        if (!properties.uri) {\n          defaultDemuxed = false;\n        }\n      }\n    }\n\n    if (defaultDemuxed) {\n      this.tech_.trigger({\n        type: 'usage',\n        name: 'vhs-demuxed'\n      });\n    }\n\n    if (Object.keys(mediaGroups.SUBTITLES).length) {\n      this.tech_.trigger({\n        type: 'usage',\n        name: 'vhs-webvtt'\n      });\n    }\n\n    if (Vhs$1.Playlist.isAes(media)) {\n      this.tech_.trigger({\n        type: 'usage',\n        name: 'vhs-aes'\n      });\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\n    if (this.useCueTags_) {\n      this.tech_.trigger({\n        type: 'usage',\n        name: 'vhs-playlist-cue-tags'\n      });\n    }\n  }\n\n  shouldSwitchToMedia_(nextPlaylist) {\n    const currentPlaylist = this.mainPlaylistLoader_.media() || this.mainPlaylistLoader_.pendingMedia_;\n    const currentTime = this.tech_.currentTime();\n    const bufferLowWaterLine = this.bufferLowWaterLine();\n    const bufferHighWaterLine = this.bufferHighWaterLine();\n    const buffered = this.tech_.buffered();\n    return shouldSwitchToMedia({\n      buffered,\n      currentTime,\n      currentPlaylist,\n      nextPlaylist,\n      bufferLowWaterLine,\n      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\n  setupSegmentLoaderListeners_() {\n    this.mainSegmentLoader_.on('bandwidthupdate', () => {\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      this.checkABR_('bandwidthupdate');\n      this.tech_.trigger('bandwidthupdate');\n    });\n    this.mainSegmentLoader_.on('timeout', () => {\n      if (this.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        this.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', () => {\n        this.trigger('progress');\n      });\n    }\n\n    this.mainSegmentLoader_.on('error', () => {\n      const error = this.mainSegmentLoader_.error();\n      this.excludePlaylist({\n        playlistToExclude: error.playlist,\n        error\n      });\n    });\n    this.mainSegmentLoader_.on('appenderror', () => {\n      this.error = this.mainSegmentLoader_.error_;\n      this.trigger('error');\n    });\n    this.mainSegmentLoader_.on('syncinfoupdate', () => {\n      this.onSyncInfoUpdate_();\n    });\n    this.mainSegmentLoader_.on('timestampoffset', () => {\n      this.tech_.trigger({\n        type: 'usage',\n        name: 'vhs-timestamp-offset'\n      });\n    });\n    this.audioSegmentLoader_.on('syncinfoupdate', () => {\n      this.onSyncInfoUpdate_();\n    });\n    this.audioSegmentLoader_.on('appenderror', () => {\n      this.error = this.audioSegmentLoader_.error_;\n      this.trigger('error');\n    });\n    this.mainSegmentLoader_.on('ended', () => {\n      this.logger_('main segment loader ended');\n      this.onEndOfStream();\n    });\n    this.mainSegmentLoader_.on('earlyabort', event => {\n      // never try to early abort with the new ABR algorithm\n      if (this.bufferBasedABR) {\n        return;\n      }\n\n      this.delegateLoaders_('all', ['abort']);\n      this.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\n    const updateCodecs = () => {\n      if (!this.sourceUpdater_.hasCreatedSourceBuffers()) {\n        return this.tryToCreateSourceBuffers_();\n      }\n\n      const codecs = this.getCodecsOrExclude_(); // no codecs means that the playlist was excluded\n\n      if (!codecs) {\n        return;\n      }\n\n      this.sourceUpdater_.addOrChangeSourceBuffers(codecs);\n    };\n\n    this.mainSegmentLoader_.on('trackinfo', updateCodecs);\n    this.audioSegmentLoader_.on('trackinfo', updateCodecs);\n    this.mainSegmentLoader_.on('fmp4', () => {\n      if (!this.triggeredFmp4Usage) {\n        this.tech_.trigger({\n          type: 'usage',\n          name: 'vhs-fmp4'\n        });\n        this.triggeredFmp4Usage = true;\n      }\n    });\n    this.audioSegmentLoader_.on('fmp4', () => {\n      if (!this.triggeredFmp4Usage) {\n        this.tech_.trigger({\n          type: 'usage',\n          name: 'vhs-fmp4'\n        });\n        this.triggeredFmp4Usage = true;\n      }\n    });\n    this.audioSegmentLoader_.on('ended', () => {\n      this.logger_('audioSegmentLoader ended');\n      this.onEndOfStream();\n    });\n  }\n\n  mediaSecondsLoaded_() {\n    return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded + this.mainSegmentLoader_.mediaSecondsLoaded);\n  }\n  /**\n   * Call load on our SegmentLoaders\n   */\n\n\n  load() {\n    this.mainSegmentLoader_.load();\n\n    if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n      this.audioSegmentLoader_.load();\n    }\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 method will perform destructive actions like removing\n   * already buffered content in order to readjust the currently active\n   * playlist quickly. This is good for manual quality changes\n   *\n   * @private\n   */\n\n\n  fastQualityChange_(media = this.selectPlaylist()) {\n    if (media && media === this.mainPlaylistLoader_.media()) {\n      this.logger_('skipping fastQualityChange because new media is same as old');\n      return;\n    }\n\n    this.switchMedia_(media, 'fast-quality'); // we would like to avoid race condition when we call fastQuality,\n    // reset everything and start loading segments from prev segments instead of new because new playlist is not received yet\n\n    this.waitingForFastQualityPlaylistReceived_ = true;\n  }\n\n  runFastQualitySwitch_() {\n    this.waitingForFastQualityPlaylistReceived_ = false; // Delete all buffered data to allow an immediate quality switch, then seek to give\n    // the browser a kick to remove any cached frames from the previous rendtion (.04 seconds\n    // ahead was roughly the minimum that will accomplish this across a variety of content\n    // in IE and Edge, but seeking in place is sufficient on all other browsers)\n    // Edge/IE bug: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/14600375/\n    // Chrome bug: https://bugs.chromium.org/p/chromium/issues/detail?id=651904\n\n    this.mainSegmentLoader_.pause();\n    this.mainSegmentLoader_.resetEverything(() => {\n      this.tech_.setCurrentTime(this.tech_.currentTime());\n    }); // don't need to reset audio as it is reset when media changes\n  }\n  /**\n   * Begin playback.\n   */\n\n\n  play() {\n    if (this.setupFirstPlay()) {\n      return;\n    }\n\n    if (this.tech_.ended()) {\n      this.tech_.setCurrentTime(0);\n    }\n\n    if (this.hasPlayed_) {\n      this.load();\n    }\n\n    const 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\n  setupFirstPlay() {\n    const 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\n    if (!media.endList || media.start) {\n      const seekable = this.seekable();\n\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\n      const seekableEnd = seekable.end(0);\n      let startPoint = seekableEnd;\n\n      if (media.start) {\n        const offset = media.start.timeOffset;\n\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\n      this.trigger('firstplay'); // seek to the live point\n\n      this.tech_.setCurrentTime(startPoint);\n    }\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\n  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      const 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, e => {});\n      }\n    }\n\n    this.trigger('sourceopen');\n  }\n  /**\n   * handle the sourceended event on the MediaSource\n   *\n   * @private\n   */\n\n\n  handleSourceEnded_() {\n    if (!this.inbandTextTracks_.metadataTrack_) {\n      return;\n    }\n\n    const cues = this.inbandTextTracks_.metadataTrack_.cues;\n\n    if (!cues || !cues.length) {\n      return;\n    }\n\n    const 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\n  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\n  onEndOfStream() {\n    let isEndOfStream = this.mainSegmentLoader_.ended_;\n\n    if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n      const 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\n    if (!isEndOfStream) {\n      return;\n    }\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\n  stuckAtPlaylistEnd_(playlist) {\n    const seekable = this.seekable();\n\n    if (!seekable.length) {\n      // playlist doesn't have enough information to determine whether we are stuck\n      return false;\n    }\n\n    const expired = this.syncController_.getExpiredTime(playlist, this.duration());\n\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\n    const absolutePlaylistEnd = Vhs$1.Playlist.playlistEnd(playlist, expired);\n    const currentTime = this.tech_.currentTime();\n    const buffered = this.tech_.buffered();\n\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\n    const 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\n  excludePlaylist({\n    playlistToExclude = this.mainPlaylistLoader_.media(),\n    error = {},\n    playlistExclusionDuration\n  }) {\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\n      if (this.mediaSource.readyState !== 'open') {\n        this.trigger('error');\n      } else {\n        this.sourceUpdater_.endOfStream('network');\n      }\n\n      return;\n    }\n\n    playlistToExclude.playlistErrors_++;\n    const playlists = this.mainPlaylistLoader_.main.playlists;\n    const enabledPlaylists = playlists.filter(isEnabled);\n    const 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 ${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\n    if (isFinalRendition) {\n      // If we're content steering, try other pathways.\n      if (this.main().contentSteering) {\n        const pathway = this.pathwayAttribute_(playlistToExclude); // Ignore at least 1 steering manifest refresh.\n\n        const reIncludeDelay = this.contentSteeringController_.steeringManifest.ttl * 1000;\n        this.contentSteeringController_.excludePathway(pathway);\n        this.excludeThenChangePathway_();\n        setTimeout(() => {\n          this.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\n      let reincluded = false;\n      playlists.forEach(playlist => {\n        // skip current playlist which is about to be excluded\n        if (playlist === playlistToExclude) {\n          return;\n        }\n\n        const 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\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\n    let excludeUntil;\n\n    if (playlistToExclude.playlistErrors_ > this.maxPlaylistRetries) {\n      excludeUntil = Infinity;\n    } else {\n      excludeUntil = Date.now() + playlistExclusionDuration * 1000;\n    }\n\n    playlistToExclude.excludeUntil = excludeUntil;\n\n    if (error.reason) {\n      playlistToExclude.lastExcludeReason_ = error.reason;\n    }\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    const nextPlaylist = this.selectPlaylist();\n\n    if (!nextPlaylist) {\n      this.error = 'Playback cannot continue. No available working or supported playlists.';\n      this.trigger('error');\n      return;\n    }\n\n    const logFn = error.internal ? this.logger_ : videojs.log.warn;\n    const errorMessage = error.message ? ' ' + error.message : '';\n    logFn(`${error.internal ? 'Internal problem' : 'Problem'} encountered with playlist ${playlistToExclude.id}.` + `${errorMessage} Switching to playlist ${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\n    if (nextPlaylist.attributes.SUBTITLES !== playlistToExclude.attributes.SUBTITLES) {\n      this.delegateLoaders_('subtitle', ['abort', 'pause']);\n    }\n\n    this.delegateLoaders_('main', ['abort', 'pause']);\n    const delayDuration = nextPlaylist.targetDuration / 2 * 1000 || 5 * 1000;\n    const 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\n  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\n  delegateLoaders_(filter, fnNames) {\n    const loaders = [];\n    const dontFilterPlaylist = filter === 'all';\n\n    if (dontFilterPlaylist || filter === 'main') {\n      loaders.push(this.mainPlaylistLoader_);\n    }\n\n    const mediaTypes = [];\n\n    if (dontFilterPlaylist || filter === 'audio') {\n      mediaTypes.push('AUDIO');\n    }\n\n    if (dontFilterPlaylist || filter === 'subtitle') {\n      mediaTypes.push('CLOSED-CAPTIONS');\n      mediaTypes.push('SUBTITLES');\n    }\n\n    mediaTypes.forEach(mediaType => {\n      const loader = this.mediaTypes_[mediaType] && this.mediaTypes_[mediaType].activePlaylistLoader;\n\n      if (loader) {\n        loaders.push(loader);\n      }\n    });\n    ['main', 'audio', 'subtitle'].forEach(name => {\n      const loader = this[`${name}SegmentLoader_`];\n\n      if (loader && (filter === name || filter === 'all')) {\n        loaders.push(loader);\n      }\n    });\n    loaders.forEach(loader => fnNames.forEach(fnName => {\n      if (typeof loader[fnName] === 'function') {\n        loader[fnName]();\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\n  setCurrentTime(currentTime) {\n    const buffered = findRange(this.tech_.buffered(), currentTime);\n\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\n    if (!this.mainPlaylistLoader_.media().segments) {\n      return 0;\n    } // if the seek location is already buffered, continue buffering as usual\n\n\n    if (buffered && buffered.length) {\n      return currentTime;\n    } // cancel outstanding requests so we begin buffering at the new\n    // location\n\n\n    this.mainSegmentLoader_.pause();\n    this.mainSegmentLoader_.resetEverything();\n\n    if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n      this.audioSegmentLoader_.pause();\n      this.audioSegmentLoader_.resetEverything();\n    }\n\n    if (this.mediaTypes_.SUBTITLES.activePlaylistLoader) {\n      this.subtitleSegmentLoader_.pause();\n      this.subtitleSegmentLoader_.resetEverything();\n    } // start segment loader loading in case they are paused\n\n\n    this.load();\n  }\n  /**\n   * get the current duration\n   *\n   * @return {TimeRange} the duration\n   */\n\n\n  duration() {\n    if (!this.mainPlaylistLoader_) {\n      return 0;\n    }\n\n    const media = this.mainPlaylistLoader_.media();\n\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\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\n    if (this.mediaSource) {\n      return this.mediaSource.duration;\n    }\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\n  seekable() {\n    return this.seekable_;\n  }\n\n  onSyncInfoUpdate_() {\n    let 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\n    let media = this.mainPlaylistLoader_.media();\n\n    if (!media) {\n      return;\n    }\n\n    let expired = this.syncController_.getExpiredTime(media, this.duration());\n\n    if (expired === null) {\n      // not enough information to update seekable\n      return;\n    }\n\n    const main = this.mainPlaylistLoader_.main;\n    const mainSeekable = Vhs$1.Playlist.seekable(media, expired, Vhs$1.Playlist.liveEdgeDelay(main, media));\n\n    if (mainSeekable.length === 0) {\n      return;\n    }\n\n    if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n      media = this.mediaTypes_.AUDIO.activePlaylistLoader.media();\n      expired = this.syncController_.getExpiredTime(media, this.duration());\n\n      if (expired === null) {\n        return;\n      }\n\n      audioSeekable = Vhs$1.Playlist.seekable(media, expired, Vhs$1.Playlist.liveEdgeDelay(main, media));\n\n      if (audioSeekable.length === 0) {\n        return;\n      }\n    }\n\n    let oldEnd;\n    let oldStart;\n\n    if (this.seekable_ && this.seekable_.length) {\n      oldEnd = this.seekable_.end(0);\n      oldStart = this.seekable_.start(0);\n    }\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\n    if (this.seekable_ && this.seekable_.length) {\n      if (this.seekable_.end(0) === oldEnd && this.seekable_.start(0) === oldStart) {\n        return;\n      }\n    }\n\n    this.logger_(`seekable updated [${printableRange(this.seekable_)}]`);\n    this.tech_.trigger('seekablechanged');\n  }\n  /**\n   * Update the player duration\n   */\n\n\n  updateDuration(isLive) {\n    if (this.updateDuration_) {\n      this.mediaSource.removeEventListener('sourceopen', this.updateDuration_);\n      this.updateDuration_ = null;\n    }\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\n    if (isLive) {\n      const seekable = this.seekable();\n\n      if (!seekable.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\n      if (isNaN(this.mediaSource.duration) || this.mediaSource.duration < seekable.end(seekable.length - 1)) {\n        this.sourceUpdater_.setDuration(seekable.end(seekable.length - 1));\n      }\n\n      return;\n    }\n\n    const buffered = this.tech_.buffered();\n    let duration = Vhs$1.Playlist.duration(this.mainPlaylistLoader_.media());\n\n    if (buffered.length > 0) {\n      duration = Math.max(duration, buffered.end(buffered.length - 1));\n    }\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\n  dispose() {\n    this.trigger('dispose');\n    this.decrypter_.terminate();\n    this.mainPlaylistLoader_.dispose();\n    this.mainSegmentLoader_.dispose();\n    this.contentSteeringController_.dispose();\n    this.keyStatusMap_.clear();\n\n    if (this.loadOnPlay_) {\n      this.tech_.off('play', this.loadOnPlay_);\n    }\n\n    ['AUDIO', 'SUBTITLES'].forEach(type => {\n      const groups = this.mediaTypes_[type].groups;\n\n      for (const id in groups) {\n        groups[id].forEach(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\n    if (this.updateDuration_) {\n      this.mediaSource.removeEventListener('sourceopen', this.updateDuration_);\n    }\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\n  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\n  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  areMediaTypesKnown_() {\n    const usingAudioLoader = !!this.mediaTypes_.AUDIO.activePlaylistLoader;\n    const 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    const 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\n    return true;\n  }\n\n  getCodecsOrExclude_() {\n    const media = {\n      main: this.mainSegmentLoader_.getCurrentMediaInfo_() || {},\n      audio: this.audioSegmentLoader_.getCurrentMediaInfo_() || {}\n    };\n    const playlist = this.mainSegmentLoader_.getPendingSegmentPlaylist() || this.media(); // set \"main\" media equal to video\n\n    media.video = media.main;\n    const playlistCodecs = codecsForPlaylist(this.main(), playlist);\n    const codecs = {};\n    const usingAudioLoader = !!this.mediaTypes_.AUDIO.activePlaylistLoader;\n\n    if (media.main.hasVideo) {\n      codecs.video = playlistCodecs.video || media.main.videoCodec || DEFAULT_VIDEO_CODEC;\n    }\n\n    if (media.main.isMuxed) {\n      codecs.video += `,${playlistCodecs.audio || media.main.audioCodec || DEFAULT_AUDIO_CODEC}`;\n    }\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\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\n    const supportFunction = (isFmp4, codec) => isFmp4 ? browserSupportsCodec(codec) : muxerSupportsCodec(codec);\n\n    const unsupportedCodecs = {};\n    let unsupportedAudio;\n    ['video', 'audio'].forEach(function (type) {\n      if (codecs.hasOwnProperty(type) && !supportFunction(media[type].isFmp4, codecs[type])) {\n        const supporter = media[type].isFmp4 ? 'browser' : 'muxer';\n        unsupportedCodecs[supporter] = unsupportedCodecs[supporter] || [];\n        unsupportedCodecs[supporter].push(codecs[type]);\n\n        if (type === 'audio') {\n          unsupportedAudio = supporter;\n        }\n      }\n    });\n\n    if (usingAudioLoader && unsupportedAudio && playlist.attributes.AUDIO) {\n      const audioGroup = playlist.attributes.AUDIO;\n      this.main().playlists.forEach(variant => {\n        const variantAudioGroup = variant.attributes && variant.attributes.AUDIO;\n\n        if (variantAudioGroup === audioGroup && variant !== playlist) {\n          variant.excludeUntil = Infinity;\n        }\n      });\n      this.logger_(`excluding audio group ${audioGroup} as ${unsupportedAudio} does not support codec(s): \"${codecs.audio}\"`);\n    } // if we have any unsupported codecs exclude this playlist.\n\n\n    if (Object.keys(unsupportedCodecs).length) {\n      const message = Object.keys(unsupportedCodecs).reduce((acc, supporter) => {\n        if (acc) {\n          acc += ', ';\n        }\n\n        acc += `${supporter} does not support codec(s): \"${unsupportedCodecs[supporter].join(',')}\"`;\n        return acc;\n      }, '') + '.';\n      this.excludePlaylist({\n        playlistToExclude: playlist,\n        error: {\n          internal: true,\n          message\n        },\n        playlistExclusionDuration: Infinity\n      });\n      return;\n    } // check if codec switching is happening\n\n\n    if (this.sourceUpdater_.hasCreatedSourceBuffers() && !this.sourceUpdater_.canChangeType()) {\n      const switchMessages = [];\n      ['video', 'audio'].forEach(type => {\n        const newCodec = (parseCodecs(this.sourceUpdater_.codecs[type] || '')[0] || {}).type;\n        const oldCodec = (parseCodecs(codecs[type] || '')[0] || {}).type;\n\n        if (newCodec && oldCodec && newCodec.toLowerCase() !== oldCodec.toLowerCase()) {\n          switchMessages.push(`\"${this.sourceUpdater_.codecs[type]}\" -> \"${codecs[type]}\"`);\n        }\n      });\n\n      if (switchMessages.length) {\n        this.excludePlaylist({\n          playlistToExclude: playlist,\n          error: {\n            message: `Codec switching not supported: ${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\n    return codecs;\n  }\n  /**\n   * Create source buffers and exlude any incompatible renditions.\n   *\n   * @private\n   */\n\n\n  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\n    if (!this.areMediaTypesKnown_()) {\n      return;\n    }\n\n    const codecs = this.getCodecsOrExclude_(); // no codecs means that the playlist was excluded\n\n    if (!codecs) {\n      return;\n    }\n\n    this.sourceUpdater_.createSourceBuffers(codecs);\n    const 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\n  excludeUnsupportedVariants_() {\n    const playlists = this.main().playlists;\n    const 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(key => {\n      const variant = playlists[key]; // check if we already processed this playlist.\n\n      if (ids.indexOf(variant.id) !== -1) {\n        return;\n      }\n\n      ids.push(variant.id);\n      const codecs = codecsForPlaylist(this.main, variant);\n      const unsupported = [];\n\n      if (codecs.audio && !muxerSupportsCodec(codecs.audio) && !browserSupportsCodec(codecs.audio)) {\n        unsupported.push(`audio codec ${codecs.audio}`);\n      }\n\n      if (codecs.video && !muxerSupportsCodec(codecs.video) && !browserSupportsCodec(codecs.video)) {\n        unsupported.push(`video codec ${codecs.video}`);\n      }\n\n      if (codecs.text && codecs.text === 'stpp.ttml.im1t') {\n        unsupported.push(`text codec ${codecs.text}`);\n      }\n\n      if (unsupported.length) {\n        variant.excludeUntil = Infinity;\n        this.logger_(`excluding ${variant.id} for unsupported: ${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\n  excludeIncompatibleVariants_(codecString) {\n    const ids = [];\n    const playlists = this.main().playlists;\n    const codecs = unwrapCodecList(parseCodecs(codecString));\n    const codecCount_ = codecCount(codecs);\n    const videoDetails = codecs.video && parseCodecs(codecs.video)[0] || null;\n    const audioDetails = codecs.audio && parseCodecs(codecs.audio)[0] || null;\n    Object.keys(playlists).forEach(key => {\n      const 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\n      ids.push(variant.id);\n      const exclusionReasons = []; // get codecs from the playlist for this variant\n\n      const variantCodecs = codecsForPlaylist(this.mainPlaylistLoader_.main, variant);\n      const 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\n      if (variantCodecCount !== codecCount_) {\n        exclusionReasons.push(`codec count \"${variantCodecCount}\" !== \"${codecCount_}\"`);\n      } // only exclude playlists by codec change, if codecs cannot switch\n      // during playback.\n\n\n      if (!this.sourceUpdater_.canChangeType()) {\n        const variantVideoDetails = variantCodecs.video && parseCodecs(variantCodecs.video)[0] || null;\n        const 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 \"${variantVideoDetails.type}\" !== \"${videoDetails.type}\"`);\n        } // the audio codec cannot change\n\n\n        if (variantAudioDetails && audioDetails && variantAudioDetails.type.toLowerCase() !== audioDetails.type.toLowerCase()) {\n          exclusionReasons.push(`audio codec \"${variantAudioDetails.type}\" !== \"${audioDetails.type}\"`);\n        }\n      }\n\n      if (exclusionReasons.length) {\n        variant.excludeUntil = Infinity;\n        this.logger_(`excluding ${variant.id}: ${exclusionReasons.join(' && ')}`);\n      }\n    });\n  }\n\n  updateAdCues_(media) {\n    let offset = 0;\n    const seekable = this.seekable();\n\n    if (seekable.length) {\n      offset = seekable.start(0);\n    }\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\n  goalBufferLength() {\n    const currentTime = this.tech_.currentTime();\n    const initial = Config.GOAL_BUFFER_LENGTH;\n    const rate = Config.GOAL_BUFFER_LENGTH_RATE;\n    const 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\n  bufferLowWaterLine() {\n    const currentTime = this.tech_.currentTime();\n    const initial = Config.BUFFER_LOW_WATER_LINE;\n    const rate = Config.BUFFER_LOW_WATER_LINE_RATE;\n    const max = Math.max(initial, Config.MAX_BUFFER_LOW_WATER_LINE);\n    const 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  bufferHighWaterLine() {\n    return Config.BUFFER_HIGH_WATER_LINE;\n  }\n\n  addDateRangesToTextTrack_(dateRanges) {\n    createMetadataTrackIfNotExists(this.inbandTextTracks_, 'com.apple.streaming', this.tech_);\n    addDateRangeMetadata({\n      inbandTextTracks: this.inbandTextTracks_,\n      dateRanges\n    });\n  }\n\n  addMetadataToTextTrack(dispatchType, metadataArray, videoDuration) {\n    const 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,\n      timestampOffset,\n      videoDuration\n    });\n  }\n  /**\n   * Utility for getting the pathway or service location from an HLS or DASH playlist.\n   *\n   * @param {Object} playlist for getting pathway from.\n   * @return the pathway attribute of a playlist\n   */\n\n\n  pathwayAttribute_(playlist) {\n    return playlist.attributes['PATHWAY-ID'] || playlist.attributes.serviceLocation;\n  }\n  /**\n   * Initialize available pathways and apply the tag properties.\n   */\n\n\n  initContentSteeringController_() {\n    const main = this.main();\n\n    if (!main.contentSteering) {\n      return;\n    }\n\n    for (const playlist of main.playlists) {\n      this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(playlist));\n    }\n\n    this.contentSteeringController_.assignTagProperties(main.uri, main.contentSteering); // request the steering manifest immediately if queryBeforeStart is set.\n\n    if (this.contentSteeringController_.queryBeforeStart) {\n      // When queryBeforeStart is true, initial request should omit steering parameters.\n      this.contentSteeringController_.requestSteeringManifest(true);\n      return;\n    } // otherwise start content steering after playback starts\n\n\n    this.tech_.one('canplay', () => {\n      this.contentSteeringController_.requestSteeringManifest();\n    });\n  }\n  /**\n   * Reset the content steering controller and re-init.\n   */\n\n\n  resetContentSteeringController_() {\n    this.contentSteeringController_.clearAvailablePathways();\n    this.contentSteeringController_.dispose();\n    this.initContentSteeringController_();\n  }\n  /**\n   * Attaches the listeners for content steering.\n   */\n\n\n  attachContentSteeringListeners_() {\n    this.contentSteeringController_.on('content-steering', this.excludeThenChangePathway_.bind(this));\n\n    if (this.sourceType_ === 'dash') {\n      this.mainPlaylistLoader_.on('loadedplaylist', () => {\n        const main = this.main(); // check if steering tag or pathways changed.\n\n        const didDashTagChange = this.contentSteeringController_.didDASHTagChange(main.uri, main.contentSteering);\n\n        const didPathwaysChange = () => {\n          const availablePathways = this.contentSteeringController_.getAvailablePathways();\n          const newPathways = [];\n\n          for (const playlist of main.playlists) {\n            const serviceLocation = playlist.attributes.serviceLocation;\n\n            if (serviceLocation) {\n              newPathways.push(serviceLocation);\n\n              if (!availablePathways.has(serviceLocation)) {\n                return true;\n              }\n            }\n          } // If we have no new serviceLocations and previously had availablePathways\n\n\n          if (!newPathways.length && availablePathways.size) {\n            return true;\n          }\n\n          return false;\n        };\n\n        if (didDashTagChange || didPathwaysChange()) {\n          this.resetContentSteeringController_();\n        }\n      });\n    }\n  }\n  /**\n   * Simple exclude and change playlist logic for content steering.\n   */\n\n\n  excludeThenChangePathway_() {\n    const currentPathway = this.contentSteeringController_.getPathway();\n\n    if (!currentPathway) {\n      return;\n    }\n\n    this.handlePathwayClones_();\n    const main = this.main();\n    const playlists = main.playlists;\n    const ids = new Set();\n    let didEnablePlaylists = false;\n    Object.keys(playlists).forEach(key => {\n      const variant = playlists[key];\n      const pathwayId = this.pathwayAttribute_(variant);\n      const differentPathwayId = pathwayId && currentPathway !== pathwayId;\n      const steeringExclusion = variant.excludeUntil === Infinity && variant.lastExcludeReason_ === 'content-steering';\n\n      if (steeringExclusion && !differentPathwayId) {\n        delete variant.excludeUntil;\n        delete variant.lastExcludeReason_;\n        didEnablePlaylists = true;\n      }\n\n      const noExcludeUntil = !variant.excludeUntil && variant.excludeUntil !== Infinity;\n      const shouldExclude = !ids.has(variant.id) && differentPathwayId && noExcludeUntil;\n\n      if (!shouldExclude) {\n        return;\n      }\n\n      ids.add(variant.id);\n      variant.excludeUntil = Infinity;\n      variant.lastExcludeReason_ = 'content-steering'; // TODO: kind of spammy, maybe move this.\n\n      this.logger_(`excluding ${variant.id} for ${variant.lastExcludeReason_}`);\n    });\n\n    if (this.contentSteeringController_.manifestType_ === 'DASH') {\n      Object.keys(this.mediaTypes_).forEach(key => {\n        const type = this.mediaTypes_[key];\n\n        if (type.activePlaylistLoader) {\n          const 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\n    if (didEnablePlaylists) {\n      this.changeSegmentPathway_();\n    }\n  }\n  /**\n   * Add, update, or delete playlists and media groups for\n   * the pathway clones for HLS Content Steering.\n   *\n   * See https://datatracker.ietf.org/doc/draft-pantos-hls-rfc8216bis/\n   *\n   * NOTE: Pathway cloning does not currently support the `PER_VARIANT_URIS` and\n   * `PER_RENDITION_URIS` as we do not handle `STABLE-VARIANT-ID` or\n   * `STABLE-RENDITION-ID` values.\n   */\n\n\n  handlePathwayClones_() {\n    const main = this.main();\n    const playlists = main.playlists;\n    const currentPathwayClones = this.contentSteeringController_.currentPathwayClones;\n    const nextPathwayClones = this.contentSteeringController_.nextPathwayClones;\n    const hasClones = currentPathwayClones && currentPathwayClones.size || nextPathwayClones && nextPathwayClones.size;\n\n    if (!hasClones) {\n      return;\n    }\n\n    for (const [id, clone] of currentPathwayClones.entries()) {\n      const newClone = nextPathwayClones.get(id); // Delete the old pathway clone.\n\n      if (!newClone) {\n        this.mainPlaylistLoader_.updateOrDeleteClone(clone);\n        this.contentSteeringController_.excludePathway(id);\n      }\n    }\n\n    for (const [id, clone] of nextPathwayClones.entries()) {\n      const oldClone = currentPathwayClones.get(id); // Create a new pathway if it is a new pathway clone object.\n\n      if (!oldClone) {\n        const playlistsToClone = playlists.filter(p => {\n          return p.attributes['PATHWAY-ID'] === clone['BASE-ID'];\n        });\n        playlistsToClone.forEach(p => {\n          this.mainPlaylistLoader_.addClonePathway(clone, p);\n        });\n        this.contentSteeringController_.addAvailablePathway(id);\n        continue;\n      } // There have not been changes to the pathway clone object, so skip.\n\n\n      if (this.equalPathwayClones_(oldClone, clone)) {\n        continue;\n      } // Update a preexisting cloned pathway.\n      // True is set for the update flag.\n\n\n      this.mainPlaylistLoader_.updateOrDeleteClone(clone, true);\n      this.contentSteeringController_.addAvailablePathway(id);\n    } // Deep copy contents of next to current pathways.\n\n\n    this.contentSteeringController_.currentPathwayClones = new Map(JSON.parse(JSON.stringify([...nextPathwayClones])));\n  }\n  /**\n   * Determines whether two pathway clone objects are equivalent.\n   *\n   * @param {Object} a The first pathway clone object.\n   * @param {Object} b The second pathway clone object.\n   * @return {boolean} True if the pathway clone objects are equal, false otherwise.\n   */\n\n\n  equalPathwayClones_(a, b) {\n    if (a['BASE-ID'] !== b['BASE-ID'] || a.ID !== b.ID || a['URI-REPLACEMENT'].HOST !== b['URI-REPLACEMENT'].HOST) {\n      return false;\n    }\n\n    const aParams = a['URI-REPLACEMENT'].PARAMS;\n    const bParams = b['URI-REPLACEMENT'].PARAMS; // We need to iterate through both lists of params because one could be\n    // missing a parameter that the other has.\n\n    for (const p in aParams) {\n      if (aParams[p] !== bParams[p]) {\n        return false;\n      }\n    }\n\n    for (const p in bParams) {\n      if (aParams[p] !== bParams[p]) {\n        return false;\n      }\n    }\n\n    return true;\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\n  changeSegmentPathway_() {\n    const 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\n    this.switchMedia_(nextPlaylist, 'content-steering');\n  }\n  /**\n   * Iterates through playlists and check their keyId set and compare with the\n   * keyStatusMap, only enable playlists that have a usable key. If the playlist\n   * has no keyId leave it enabled by default.\n   */\n\n\n  excludeNonUsablePlaylistsByKeyId_() {\n    if (!this.mainPlaylistLoader_ || !this.mainPlaylistLoader_.main) {\n      return;\n    }\n\n    let nonUsableKeyStatusCount = 0;\n    const NON_USABLE = 'non-usable';\n    this.mainPlaylistLoader_.main.playlists.forEach(playlist => {\n      const keyIdSet = this.mainPlaylistLoader_.getKeyIdSet(playlist); // If the playlist doesn't have keyIDs lets not exclude it.\n\n      if (!keyIdSet || !keyIdSet.size) {\n        return;\n      }\n\n      keyIdSet.forEach(key => {\n        const USABLE = 'usable';\n        const hasUsableKeyStatus = this.keyStatusMap_.has(key) && this.keyStatusMap_.get(key) === USABLE;\n        const nonUsableExclusion = playlist.lastExcludeReason_ === NON_USABLE && playlist.excludeUntil === Infinity;\n\n        if (!hasUsableKeyStatus) {\n          // Only exclude playlists that haven't already been excluded as non-usable.\n          if (playlist.excludeUntil !== Infinity && playlist.lastExcludeReason_ !== NON_USABLE) {\n            playlist.excludeUntil = Infinity;\n            playlist.lastExcludeReason_ = NON_USABLE;\n            this.logger_(`excluding playlist ${playlist.id} because the key ID ${key} doesn't exist in the keyStatusMap or is not ${USABLE}`);\n          } // count all nonUsableKeyStatus\n\n\n          nonUsableKeyStatusCount++;\n        } else if (hasUsableKeyStatus && nonUsableExclusion) {\n          delete playlist.excludeUntil;\n          delete playlist.lastExcludeReason_;\n          this.logger_(`enabling playlist ${playlist.id} because key ID ${key} is ${USABLE}`);\n        }\n      });\n    }); // If for whatever reason every playlist has a non usable key status. Lets try re-including the SD renditions as a failsafe.\n\n    if (nonUsableKeyStatusCount >= this.mainPlaylistLoader_.main.playlists.length) {\n      this.mainPlaylistLoader_.main.playlists.forEach(playlist => {\n        const isNonHD = playlist && playlist.attributes && playlist.attributes.RESOLUTION && playlist.attributes.RESOLUTION.height < 720;\n        const excludedForNonUsableKey = playlist.excludeUntil === Infinity && playlist.lastExcludeReason_ === NON_USABLE;\n\n        if (isNonHD && excludedForNonUsableKey) {\n          // Only delete the excludeUntil so we don't try and re-exclude these playlists.\n          delete playlist.excludeUntil;\n          videojs.log.warn(`enabling non-HD playlist ${playlist.id} because all playlists were excluded due to ${NON_USABLE} key IDs`);\n        }\n      });\n    }\n  }\n  /**\n   * Adds a keystatus to the keystatus map, tries to convert to string if necessary.\n   *\n   * @param {any} keyId the keyId to add a status for\n   * @param {string} status the status of the keyId\n   */\n\n\n  addKeyStatus_(keyId, status) {\n    const isString = typeof keyId === 'string';\n    const keyIdHexString = isString ? keyId : bufferToHexString(keyId);\n    const formattedKeyIdString = keyIdHexString.slice(0, 32).toLowerCase();\n    this.logger_(`KeyStatus '${status}' with key ID ${formattedKeyIdString} added to the keyStatusMap`);\n    this.keyStatusMap_.set(formattedKeyIdString, status);\n  }\n  /**\n   * Utility function for adding key status to the keyStatusMap and filtering usable encrypted playlists.\n   *\n   * @param {any} keyId the keyId from the keystatuschange event\n   * @param {string} status the key status string\n   */\n\n\n  updatePlaylistByKeyStatus(keyId, status) {\n    this.addKeyStatus_(keyId, status);\n\n    if (!this.waitingForFastQualityPlaylistReceived_) {\n      this.excludeNonUsableThenChangePlaylist_();\n    } // Listen to loadedplaylist with a single listener and check for new contentProtection elements when a playlist is updated.\n\n\n    this.mainPlaylistLoader_.off('loadedplaylist', this.excludeNonUsableThenChangePlaylist_.bind(this));\n    this.mainPlaylistLoader_.on('loadedplaylist', this.excludeNonUsableThenChangePlaylist_.bind(this));\n  }\n\n  excludeNonUsableThenChangePlaylist_() {\n    this.excludeNonUsablePlaylistsByKeyId_();\n    this.fastQualityChange_();\n  }\n\n}\n\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 */\n\nconst enableFunction = (loader, playlistID, changePlaylistFn) => enable => {\n  const playlist = loader.main.playlists[playlistID];\n  const incompatible = isIncompatible(playlist);\n  const currentlyEnabled = isEnabled(playlist);\n\n  if (typeof enable === 'undefined') {\n    return currentlyEnabled;\n  }\n\n  if (enable) {\n    delete playlist.disabled;\n  } else {\n    playlist.disabled = true;\n  }\n\n  if (enable !== currentlyEnabled && !incompatible) {\n    // Ensure the outside world knows about our changes\n    changePlaylistFn();\n\n    if (enable) {\n      loader.trigger('renditionenabled');\n    } else {\n      loader.trigger('renditiondisabled');\n    }\n  }\n\n  return enable;\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 */\n\n\nclass Representation {\n  constructor(vhsHandler, playlist, id) {\n    const {\n      playlistController_: pc\n    } = vhsHandler;\n    const qualityChangeFunction = pc.fastQualityChange_.bind(pc); // some playlist attributes are optional\n\n    if (playlist.attributes) {\n      const 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\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}\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 */\n\n\nconst renditionSelectionMixin = function (vhsHandler) {\n  // Add a single API-specific function to the VhsHandler instance\n  vhsHandler.representations = () => {\n    const main = vhsHandler.playlistController_.main();\n    const playlists = isAudioOnly(main) ? vhsHandler.playlistController_.getAudioTrackPlaylists_() : main.playlists;\n\n    if (!playlists) {\n      return [];\n    }\n\n    return playlists.filter(media => !isIncompatible(media)).map((e, i) => new Representation(vhsHandler, e, e.id));\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\nconst timerCancelEvents = ['seeking', 'seeked', 'pause', 'playing', 'error'];\n/**\n * @class PlaybackWatcher\n */\n\nclass PlaybackWatcher {\n  /**\n   * Represents an PlaybackWatcher object.\n   *\n   * @class\n   * @param {Object} options an object that includes the tech and settings\n   */\n  constructor(options) {\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\n    const playHandler = () => this.monitorCurrentTime_();\n\n    const canPlayHandler = () => this.monitorCurrentTime_();\n\n    const waitingHandler = () => this.techWaiting_();\n\n    const cancelTimerHandler = () => this.resetTimeUpdate_();\n\n    const pc = this.playlistController_;\n    const loaderTypes = ['main', 'subtitle', 'audio'];\n    const loaderChecks = {};\n    loaderTypes.forEach(type => {\n      loaderChecks[type] = {\n        reset: () => this.resetSegmentDownloads_(type),\n        updateend: () => this.checkSegmentDownloads_(type)\n      };\n      pc[`${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[`${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      this.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    const setSeekingHandlers = fn => {\n      ['main', 'audio'].forEach(type => {\n        pc[`${type}SegmentLoader_`][fn]('appended', this.seekingAppendCheck_);\n      });\n    };\n\n    this.seekingAppendCheck_ = () => {\n      if (this.fixesBadSeeks_()) {\n        this.consecutiveUpdates = 0;\n        this.lastRecordedTime = this.tech_.currentTime();\n        setSeekingHandlers('off');\n      }\n    };\n\n    this.clearSeekingAppendCheck_ = () => setSeekingHandlers('off');\n\n    this.watchForBadSeeking_ = () => {\n      this.clearSeekingAppendCheck_();\n      setSeekingHandlers('on');\n    };\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 = () => {\n      this.clearSeekingAppendCheck_();\n      this.logger_('dispose');\n      this.tech_.off('waiting', waitingHandler);\n      this.tech_.off(timerCancelEvents, cancelTimerHandler);\n      this.tech_.off('canplay', canPlayHandler);\n      this.tech_.off('play', playHandler);\n      this.tech_.off('seeking', this.watchForBadSeeking_);\n      this.tech_.off('seeked', this.clearSeekingAppendCheck_);\n      loaderTypes.forEach(type => {\n        pc[`${type}SegmentLoader_`].off('appendsdone', loaderChecks[type].updateend);\n        pc[`${type}SegmentLoader_`].off('playlistupdate', loaderChecks[type].reset);\n        this.tech_.off(['seeked', 'seeking'], loaderChecks[type].reset);\n      });\n\n      if (this.checkCurrentTimeTimeout_) {\n        window$1.clearTimeout(this.checkCurrentTimeTimeout_);\n      }\n\n      this.resetTimeUpdate_();\n    };\n  }\n  /**\n   * Periodically check current time to see if playback stopped\n   *\n   * @private\n   */\n\n\n  monitorCurrentTime_() {\n    this.checkCurrentTime_();\n\n    if (this.checkCurrentTimeTimeout_) {\n      window$1.clearTimeout(this.checkCurrentTimeTimeout_);\n    } // 42 = 24 fps // 250 is what Webkit uses // FF uses 15\n\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\n  resetSegmentDownloads_(type) {\n    const loader = this.playlistController_[`${type}SegmentLoader_`];\n\n    if (this[`${type}StalledDownloads_`] > 0) {\n      this.logger_(`resetting possible stalled download count for ${type} loader`);\n    }\n\n    this[`${type}StalledDownloads_`] = 0;\n    this[`${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\n  checkSegmentDownloads_(type) {\n    const pc = this.playlistController_;\n    const loader = pc[`${type}SegmentLoader_`];\n    const buffered = loader.buffered_();\n    const isBufferedDifferent = isRangeDifferent(this[`${type}Buffered_`], buffered);\n    this[`${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\n    this[`${type}StalledDownloads_`]++;\n    this.logger_(`found #${this[`${type}StalledDownloads_`]} ${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[`${type}StalledDownloads_`] < 10) {\n      return;\n    }\n\n    this.logger_(`${type} loader stalled download exclusion`);\n    this.resetSegmentDownloads_(type);\n    this.tech_.trigger({\n      type: 'usage',\n      name: `vhs-${type}-download-exclusion`\n    });\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\n    pc.excludePlaylist({\n      error: {\n        message: `Excessive ${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\n  checkCurrentTime_() {\n    if (this.tech_.paused() || this.tech_.seeking()) {\n      return;\n    }\n\n    const currentTime = this.tech_.currentTime();\n    const buffered = this.tech_.buffered();\n\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\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\n  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\n  fixesBadSeeks_() {\n    const seeking = this.tech_.seeking();\n\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\n    const seekable = this.seekable();\n    const currentTime = this.tech_.currentTime();\n    const isAfterSeekableRange = this.afterSeekableWindow_(seekable, currentTime, this.media(), this.allowSeeksWithinUnsafeLiveWindow);\n    let seekTo;\n\n    if (isAfterSeekableRange) {\n      const 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\n    if (this.beforeSeekableWindow_(seekable, currentTime)) {\n      const 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 + ( // 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\n    if (typeof seekTo !== 'undefined') {\n      this.logger_(`Trying to seek outside of seekable at time ${currentTime} with ` + `seekable range ${printableRange(seekable)}. Seeking to ` + `${seekTo}.`);\n      this.tech_.setCurrentTime(seekTo);\n      return true;\n    }\n\n    const sourceUpdater = this.playlistController_.sourceUpdater_;\n    const buffered = this.tech_.buffered();\n    const audioBuffered = sourceUpdater.audioBuffer ? sourceUpdater.audioBuffered() : null;\n    const videoBuffered = sourceUpdater.videoBuffer ? sourceUpdater.videoBuffered() : null;\n    const 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    const 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    const bufferedToCheck = [audioBuffered, videoBuffered];\n\n    for (let i = 0; i < bufferedToCheck.length; i++) {\n      // skip null buffered\n      if (!bufferedToCheck[i]) {\n        continue;\n      }\n\n      const timeAhead = timeAheadOf(bufferedToCheck[i], 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\n    const 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\n    seekTo = nextRange.start(0) + SAFE_TIME_DELTA;\n    this.logger_(`Buffered region starts (${nextRange.start(0)}) ` + ` just beyond seek point (${currentTime}). Seeking to ${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\n  waiting_() {\n    if (this.techWaiting_()) {\n      return;\n    } // All tech waiting checks failed. Use last resort correction\n\n\n    const currentTime = this.tech_.currentTime();\n    const buffered = this.tech_.buffered();\n    const 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 ${currentTime} while inside a buffered region ` + `[${currentRange.start(0)} -> ${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\n  techWaiting_() {\n    const seekable = this.seekable();\n    const currentTime = this.tech_.currentTime();\n\n    if (this.tech_.seeking()) {\n      // Tech is seeking or already waiting on another action, no action needed\n      return true;\n    }\n\n    if (this.beforeSeekableWindow_(seekable, currentTime)) {\n      const livePoint = seekable.end(seekable.length - 1);\n      this.logger_(`Fell out of live window at time ${currentTime}. Seeking to ` + `live point (seekable end) ${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\n    const sourceUpdater = this.tech_.vhs.playlistController_.sourceUpdater_;\n    const buffered = this.tech_.buffered();\n    const videoUnderflow = this.videoUnderflow_({\n      audioBuffered: sourceUpdater.audioBuffered(),\n      videoBuffered: sourceUpdater.videoBuffered(),\n      currentTime\n    });\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\n    const nextRange = findNextRange(buffered, currentTime); // check for gap\n\n    if (nextRange.length > 0) {\n      this.logger_(`Stopped at ${currentTime} and seeking to ${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\n    return false;\n  }\n\n  afterSeekableWindow_(seekable, currentTime, playlist, allowSeeksWithinUnsafeLiveWindow = 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\n    let allowedEnd = seekable.end(seekable.length - 1) + SAFE_TIME_DELTA;\n    const isLive = !playlist.endList;\n    const isLLHLS = typeof playlist.partTargetDuration === 'number';\n\n    if (isLive && (isLLHLS || allowSeeksWithinUnsafeLiveWindow)) {\n      allowedEnd = seekable.end(seekable.length - 1) + playlist.targetDuration * 3;\n    }\n\n    if (currentTime > allowedEnd) {\n      return true;\n    }\n\n    return false;\n  }\n\n  beforeSeekableWindow_(seekable, currentTime) {\n    if (seekable.length && // 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\n    return false;\n  }\n\n  videoUnderflow_({\n    videoBuffered,\n    audioBuffered,\n    currentTime\n  }) {\n    // audio only content will not have video underflow :)\n    if (!videoBuffered) {\n      return;\n    }\n\n    let 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      const lastVideoRange = findRange(videoBuffered, currentTime - 3);\n      const videoRange = findRange(videoBuffered, currentTime);\n      const audioRange = findRange(audioBuffered, currentTime);\n\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\n    } else {\n      const 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\n    if (gap) {\n      this.logger_(`Encountered a gap in video from ${gap.start} to ${gap.end}. ` + `Seeking to current time ${currentTime}`);\n      return true;\n    }\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\n  skipTheGap_(scheduledCurrentTime) {\n    const buffered = this.tech_.buffered();\n    const currentTime = this.tech_.currentTime();\n    const nextRange = findNextRange(buffered, currentTime);\n    this.resetTimeUpdate_();\n\n    if (nextRange.length === 0 || currentTime !== scheduledCurrentTime) {\n      return;\n    }\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  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    const gaps = findGaps(buffered);\n\n    for (let i = 0; i < gaps.length; i++) {\n      const start = gaps.start(i);\n      const end = gaps.end(i); // gap is starts no more than 4 seconds back\n\n      if (currentTime - start < 4 && currentTime - start > 2) {\n        return {\n          start,\n          end\n        };\n      }\n    }\n\n    return null;\n  }\n\n}\n\nconst defaultOptions = {\n  errorInterval: 30,\n\n  getSource(next) {\n    const tech = this.tech({\n      IWillNotUseThisInPlugins: true\n    });\n    const sourceObj = tech.currentSource_ || this.currentSource();\n    return next(sourceObj);\n  }\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\nconst initPlugin = function (player, options) {\n  let lastCalled = 0;\n  let seekTo = 0;\n  const localOptions = merge(defaultOptions, options);\n  player.ready(() => {\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  const loadedMetadataHandler = function () {\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\n  const setSource = function (sourceObj) {\n    if (sourceObj === null || sourceObj === undefined) {\n      return;\n    }\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\n  const errorHandler = function () {\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\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\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\n  const cleanupEvents = function () {\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\n  const reinitPlugin = function (newOptions) {\n    cleanupEvents();\n    initPlugin(player, newOptions);\n  };\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\n\nconst reloadSourceOnError = function (options) {\n  initPlugin(this, options);\n};\n\nvar version$4 = \"3.10.0\";\n\nvar version$3 = \"7.0.2\";\n\nvar version$2 = \"1.3.0\";\n\nvar version$1 = \"7.1.0\";\n\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 */\nconst Vhs = {\n  PlaylistLoader,\n  Playlist,\n  utils,\n  STANDARD_PLAYLIST_SELECTOR: lastBandwidthSelector,\n  INITIAL_PLAYLIST_SELECTOR: lowestBitrateCompatibleVariantSelector,\n  lastBandwidthSelector,\n  movingAverageBandwidthSelector,\n  comparePlaylistBandwidth,\n  comparePlaylistResolution,\n  xhr: xhrFactory()\n}; // Define getter/setters for config properties\n\nObject.keys(Config).forEach(prop => {\n  Object.defineProperty(Vhs, prop, {\n    get() {\n      videojs.log.warn(`using Vhs.${prop} is UNSAFE be sure you know what you are doing`);\n      return Config[prop];\n    },\n\n    set(value) {\n      videojs.log.warn(`using Vhs.${prop} is UNSAFE be sure you know what you are doing`);\n\n      if (typeof value !== 'number' || value < 0) {\n        videojs.log.warn(`value of Vhs.${prop} must be greater than or equal to 0`);\n        return;\n      }\n\n      Config[prop] = value;\n    }\n\n  });\n});\nconst 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\nconst handleVhsMediaChange = function (qualityLevels, playlistLoader) {\n  const newPlaylist = playlistLoader.media();\n  let selectedIndex = -1;\n\n  for (let i = 0; i < qualityLevels.length; i++) {\n    if (qualityLevels[i].id === newPlaylist.id) {\n      selectedIndex = i;\n      break;\n    }\n  }\n\n  qualityLevels.selectedIndex_ = selectedIndex;\n  qualityLevels.trigger({\n    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\n\nconst handleVhsLoadedMetadata = function (qualityLevels, vhs) {\n  vhs.representations().forEach(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\n\nVhs.canPlaySource = function () {\n  return videojs.log.warn('VHS is no longer a tech. Please remove it from ' + 'your player\\'s techOrder.');\n};\n\nconst emeKeySystems = (keySystemOptions, mainPlaylist, audioPlaylist) => {\n  if (!keySystemOptions) {\n    return keySystemOptions;\n  }\n\n  let codecs = {};\n\n  if (mainPlaylist && mainPlaylist.attributes && mainPlaylist.attributes.CODECS) {\n    codecs = unwrapCodecList(parseCodecs(mainPlaylist.attributes.CODECS));\n  }\n\n  if (audioPlaylist && audioPlaylist.attributes && audioPlaylist.attributes.CODECS) {\n    codecs.audio = audioPlaylist.attributes.CODECS;\n  }\n\n  const videoContentType = getMimeForCodec(codecs.video);\n  const audioContentType = getMimeForCodec(codecs.audio); // upsert the content types based on the selected playlist\n\n  const keySystemContentTypes = {};\n\n  for (const keySystem in keySystemOptions) {\n    keySystemContentTypes[keySystem] = {};\n\n    if (audioContentType) {\n      keySystemContentTypes[keySystem].audioContentType = audioContentType;\n    }\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\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\n    if (typeof keySystemOptions[keySystem] === 'string') {\n      keySystemContentTypes[keySystem].url = keySystemOptions[keySystem];\n    }\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\n\nconst getAllPsshKeySystemsOptions = (playlists, keySystems) => {\n  return playlists.reduce((keySystemsArr, playlist) => {\n    if (!playlist.contentProtection) {\n      return keySystemsArr;\n    }\n\n    const keySystemsOptions = keySystems.reduce((keySystemsObj, keySystem) => {\n      const keySystemOptions = playlist.contentProtection[keySystem];\n\n      if (keySystemOptions && keySystemOptions.pssh) {\n        keySystemsObj[keySystem] = {\n          pssh: keySystemOptions.pssh\n        };\n      }\n\n      return keySystemsObj;\n    }, {});\n\n    if (Object.keys(keySystemsOptions).length) {\n      keySystemsArr.push(keySystemsOptions);\n    }\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\n\nconst waitForKeySessionCreation = ({\n  player,\n  sourceKeySystems,\n  audioMedia,\n  mainPlaylists\n}) => {\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\n  const playlists = audioMedia ? mainPlaylists.concat([audioMedia]) : mainPlaylists;\n  const keySystemsOptionsArr = getAllPsshKeySystemsOptions(playlists, Object.keys(sourceKeySystems));\n  const initializationFinishedPromises = [];\n  const 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(keySystemsOptions => {\n    keySessionCreatedPromises.push(new Promise((resolve, reject) => {\n      player.tech_.one('keysessioncreated', resolve);\n    }));\n    initializationFinishedPromises.push(new Promise((resolve, reject) => {\n      player.eme.initializeMediaKeys({\n        keySystems: keySystemsOptions\n      }, err => {\n        if (err) {\n          reject(err);\n          return;\n        }\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([// 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), // 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\nconst setupEmeOptions = ({\n  player,\n  sourceKeySystems,\n  media,\n  audioMedia\n}) => {\n  const sourceOptions = emeKeySystems(sourceKeySystems, media, audioMedia);\n\n  if (!sourceOptions) {\n    return false;\n  }\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\n  return true;\n};\n\nconst getVhsLocalStorage = () => {\n  if (!window$1.localStorage) {\n    return null;\n  }\n\n  const storedObject = window$1.localStorage.getItem(LOCAL_STORAGE_KEY);\n\n  if (!storedObject) {\n    return null;\n  }\n\n  try {\n    return JSON.parse(storedObject);\n  } catch (e) {\n    // someone may have tampered with the value\n    return null;\n  }\n};\n\nconst updateVhsLocalStorage = options => {\n  if (!window$1.localStorage) {\n    return false;\n  }\n\n  let objectToStore = getVhsLocalStorage();\n  objectToStore = objectToStore ? merge(objectToStore, options) : options;\n\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\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\n\nconst 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\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\n\nconst addOnRequestHook = (xhr, callback) => {\n  if (!xhr._requestCallbackSet) {\n    xhr._requestCallbackSet = new Set();\n  }\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\n\nconst addOnResponseHook = (xhr, callback) => {\n  if (!xhr._responseCallbackSet) {\n    xhr._responseCallbackSet = new Set();\n  }\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\n\nconst removeOnRequestHook = (xhr, callback) => {\n  if (!xhr._requestCallbackSet) {\n    return;\n  }\n\n  xhr._requestCallbackSet.delete(callback);\n\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\n\nconst removeOnResponseHook = (xhr, callback) => {\n  if (!xhr._responseCallbackSet) {\n    return;\n  }\n\n  xhr._responseCallbackSet.delete(callback);\n\n  if (!xhr._responseCallbackSet.size) {\n    delete xhr._responseCallbackSet;\n  }\n};\n/**\n * Whether the browser has built-in HLS support.\n */\n\n\nVhs.supportsNativeHls = function () {\n  if (!document || !document.createElement) {\n    return false;\n  }\n\n  const 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\n  const canPlay = [// Apple santioned\n  'application/vnd.apple.mpegurl', // Apple sanctioned for backwards compatibility\n  'audio/mpegurl', // Very common\n  'audio/x-mpegurl', // Very common\n  'application/x-mpegurl', // 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}();\n\nVhs.supportsNativeDash = function () {\n  if (!document || !document.createElement || !videojs.getTech('Html5').isSupported()) {\n    return false;\n  }\n\n  return /maybe|probably/i.test(document.createElement('video').canPlayType('application/dash+xml'));\n}();\n\nVhs.supportsTypeNatively = type => {\n  if (type === 'hls') {\n    return Vhs.supportsNativeHls;\n  }\n\n  if (type === 'dash') {\n    return Vhs.supportsNativeDash;\n  }\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\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\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\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\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\n\nVhs.xhr.offResponse = function (callback) {\n  removeOnResponseHook(Vhs.xhr, callback);\n};\n\nconst 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 */\n\nclass VhsHandler extends Component {\n  constructor(source, tech, options) {\n    super(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      this.options_.bandwidth = options.initialBandwidth;\n    }\n\n    this.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      const _player = videojs.getPlayer(tech.options_.playerId);\n\n      this.player_ = _player;\n    }\n\n    this.tech_ = tech;\n    this.source_ = source;\n    this.stats = {};\n    this.ignoreNextSeekingEvent_ = false;\n    this.setOptions_();\n\n    if (this.options_.overrideNative && tech.overrideNativeAudioTracks && tech.overrideNativeVideoTracks) {\n      tech.overrideNativeAudioTracks(true);\n      tech.overrideNativeVideoTracks(true);\n    } else if (this.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\n    this.on(document, ['fullscreenchange', 'webkitfullscreenchange', 'mozfullscreenchange', 'MSFullscreenChange'], event => {\n      const fullscreenElement = document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement;\n\n      if (fullscreenElement && fullscreenElement.contains(this.tech_.el())) {\n        this.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        this.playlistController_.checkABR_();\n      }\n    });\n    this.on(this.tech_, 'seeking', function () {\n      if (this.ignoreNextSeekingEvent_) {\n        this.ignoreNextSeekingEvent_ = false;\n        return;\n      }\n\n      this.setCurrentTime(this.tech_.currentTime());\n    });\n    this.on(this.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    this.on(this.tech_, 'play', this.play);\n  }\n  /**\n   * Set VHS options based on options from configuration, as well as partial\n   * options to be passed at a later time.\n   *\n   * @param {Object} options A partial chunk of config options\n   */\n\n\n  setOptions_(options = {}) {\n    this.options_ = merge(this.options_, options); // defaults\n\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_.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\n    if (typeof this.options_.playlistExclusionDuration !== 'number') {\n      this.options_.playlistExclusionDuration = 60;\n    }\n\n    if (typeof this.options_.bandwidth !== 'number') {\n      if (this.options_.useBandwidthFromLocalStorage) {\n        const storedObject = getVhsLocalStorage();\n\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\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\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\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', 'exactManifestTimings', 'leastPixelDiffSelector'].forEach(option => {\n      if (typeof this.source_[option] !== 'undefined') {\n        this.options_[option] = this.source_[option];\n      }\n    });\n    this.limitRenditionByPlayerDimensions = this.options_.limitRenditionByPlayerDimensions;\n    this.useDevicePixelRatio = this.options_.useDevicePixelRatio;\n  } // alias for public method to set options\n\n\n  setOptions(options = {}) {\n    this.setOptions_(options);\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\n  src(src, type) {\n    // do nothing if the src is falsey\n    if (!src) {\n      return;\n    }\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 = time => {\n      this.tech_.setCurrentTime(time);\n    };\n\n    this.playlistController_ = new PlaylistController(this.options_);\n    const playbackWatcherOptions = merge({\n      liveRangeSafeTimeDelta: SAFE_TIME_DELTA\n    }, this.options_, {\n      seekable: () => this.seekable(),\n      media: () => this.playlistController_.media(),\n      playlistController: this.playlistController_\n    });\n    this.playbackWatcher_ = new PlaybackWatcher(playbackWatcherOptions);\n    this.playlistController_.on('error', () => {\n      const player = videojs.players[this.tech_.options_.playerId];\n      let error = this.playlistController_.error;\n\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\n      player.error(error);\n    });\n    const 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() {\n          return this.playlistController_.selectPlaylist;\n        },\n\n        set(selectPlaylist) {\n          this.playlistController_.selectPlaylist = selectPlaylist.bind(this);\n        }\n\n      },\n      throughput: {\n        get() {\n          return this.playlistController_.mainSegmentLoader_.throughput.rate;\n        },\n\n        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      },\n      bandwidth: {\n        get() {\n          let playerBandwidthEst = this.playlistController_.mainSegmentLoader_.bandwidth;\n          const networkInformation = window$1.navigator.connection || window$1.navigator.mozConnection || window$1.navigator.webkitConnection;\n          const tenMbpsAsBitsPerSecond = 10e6;\n\n          if (this.options_.useNetworkInformationApi && networkInformation) {\n            // downlink returns Mbps\n            // https://developer.mozilla.org/en-US/docs/Web/API/NetworkInformation/downlink\n            const 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\n          return playerBandwidthEst;\n        },\n\n        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\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() {\n          const invBandwidth = 1 / (this.bandwidth || 1);\n          let invThroughput;\n\n          if (this.throughput > 0) {\n            invThroughput = 1 / this.throughput;\n          } else {\n            invThroughput = 0;\n          }\n\n          const systemBitrate = Math.floor(1 / (invBandwidth + invThroughput));\n          return systemBitrate;\n        },\n\n        set() {\n          videojs.log.error('The \"systemBandwidth\" property is read-only');\n        }\n\n      }\n    });\n\n    if (this.options_.bandwidth) {\n      this.bandwidth = this.options_.bandwidth;\n    }\n\n    if (this.options_.throughput) {\n      this.throughput = this.options_.throughput;\n    }\n\n    Object.defineProperties(this.stats, {\n      bandwidth: {\n        get: () => this.bandwidth || 0,\n        enumerable: true\n      },\n      mediaRequests: {\n        get: () => this.playlistController_.mediaRequests_() || 0,\n        enumerable: true\n      },\n      mediaRequestsAborted: {\n        get: () => this.playlistController_.mediaRequestsAborted_() || 0,\n        enumerable: true\n      },\n      mediaRequestsTimedout: {\n        get: () => this.playlistController_.mediaRequestsTimedout_() || 0,\n        enumerable: true\n      },\n      mediaRequestsErrored: {\n        get: () => this.playlistController_.mediaRequestsErrored_() || 0,\n        enumerable: true\n      },\n      mediaTransferDuration: {\n        get: () => this.playlistController_.mediaTransferDuration_() || 0,\n        enumerable: true\n      },\n      mediaBytesTransferred: {\n        get: () => this.playlistController_.mediaBytesTransferred_() || 0,\n        enumerable: true\n      },\n      mediaSecondsLoaded: {\n        get: () => this.playlistController_.mediaSecondsLoaded_() || 0,\n        enumerable: true\n      },\n      mediaAppends: {\n        get: () => this.playlistController_.mediaAppends_() || 0,\n        enumerable: true\n      },\n      mainAppendsToLoadedData: {\n        get: () => this.playlistController_.mainAppendsToLoadedData_() || 0,\n        enumerable: true\n      },\n      audioAppendsToLoadedData: {\n        get: () => this.playlistController_.audioAppendsToLoadedData_() || 0,\n        enumerable: true\n      },\n      appendsToLoadedData: {\n        get: () => this.playlistController_.appendsToLoadedData_() || 0,\n        enumerable: true\n      },\n      timeToLoadedData: {\n        get: () => this.playlistController_.timeToLoadedData_() || 0,\n        enumerable: true\n      },\n      buffered: {\n        get: () => timeRangesToArray(this.tech_.buffered()),\n        enumerable: true\n      },\n      currentTime: {\n        get: () => this.tech_.currentTime(),\n        enumerable: true\n      },\n      currentSource: {\n        get: () => this.tech_.currentSource_,\n        enumerable: true\n      },\n      currentTech: {\n        get: () => this.tech_.name_,\n        enumerable: true\n      },\n      duration: {\n        get: () => this.tech_.duration(),\n        enumerable: true\n      },\n      main: {\n        get: () => this.playlists.main,\n        enumerable: true\n      },\n      playerDimensions: {\n        get: () => this.tech_.currentDimensions(),\n        enumerable: true\n      },\n      seekable: {\n        get: () => timeRangesToArray(this.tech_.seekable()),\n        enumerable: true\n      },\n      timestamp: {\n        get: () => Date.now(),\n        enumerable: true\n      },\n      videoPlaybackQuality: {\n        get: () => this.tech_.getVideoPlaybackQuality(),\n        enumerable: true\n      }\n    });\n    this.tech_.one('canplay', this.playlistController_.setupFirstPlay.bind(this.playlistController_));\n    this.tech_.on('bandwidthupdate', () => {\n      if (this.options_.useBandwidthFromLocalStorage) {\n        updateVhsLocalStorage({\n          bandwidth: this.bandwidth,\n          throughput: Math.round(this.throughput)\n        });\n      }\n    });\n    this.playlistController_.on('selectedinitialmedia', () => {\n      // Add the manual rendition mix-in to VhsHandler\n      renditionSelectionMixin(this);\n    });\n    this.playlistController_.sourceUpdater_.on('createdsourcebuffers', () => {\n      this.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\n    this.mediaSourceUrl_ = window$1.URL.createObjectURL(this.playlistController_.mediaSource);\n    this.tech_.src(this.mediaSourceUrl_);\n  }\n\n  createKeySessions_() {\n    const 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(() => {\n      this.logger_('created EME key session');\n      this.playlistController_.sourceUpdater_.initializedEme();\n    }).catch(err => {\n      this.logger_('error while creating EME key session', err);\n      this.player_.error({\n        message: 'Failed to initialize media keys for EME',\n        code: 3\n      });\n    });\n  }\n\n  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\n  setupEme_() {\n    const audioPlaylistLoader = this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;\n    const 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', e => {\n      this.playlistController_.updatePlaylistByKeyStatus(e.keyId, e.status);\n    });\n    this.handleWaitingForKey_ = this.handleWaitingForKey_.bind(this);\n    this.player_.tech_.on('waitingforkey', this.handleWaitingForKey_);\n\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\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\n  setupQualityLevels_() {\n    const 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\n    this.qualityLevels_ = player.qualityLevels();\n    this.playlistController_.on('selectedinitialmedia', () => {\n      handleVhsLoadedMetadata(this.qualityLevels_, this);\n    });\n    this.playlists.on('mediachange', () => {\n      handleVhsMediaChange(this.qualityLevels_, this.playlists);\n    });\n  }\n  /**\n   * return the version\n   */\n\n\n  static 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 the version\n   */\n\n\n  version() {\n    return this.constructor.version();\n  }\n\n  canChangeType() {\n    return SourceUpdater.canChangeType();\n  }\n  /**\n   * Begin playing the video.\n   */\n\n\n  play() {\n    this.playlistController_.play();\n  }\n  /**\n   * a wrapper around the function in PlaylistController\n   */\n\n\n  setCurrentTime(currentTime) {\n    this.playlistController_.setCurrentTime(currentTime);\n  }\n  /**\n   * a wrapper around the function in PlaylistController\n   */\n\n\n  duration() {\n    return this.playlistController_.duration();\n  }\n  /**\n   * a wrapper around the function in PlaylistController\n   */\n\n\n  seekable() {\n    return this.playlistController_.seekable();\n  }\n  /**\n   * Abort all outstanding work and cleanup.\n   */\n\n\n  dispose() {\n    if (this.playbackWatcher_) {\n      this.playbackWatcher_.dispose();\n    }\n\n    if (this.playlistController_) {\n      this.playlistController_.dispose();\n    }\n\n    if (this.qualityLevels_) {\n      this.qualityLevels_.dispose();\n    }\n\n    if (this.tech_ && this.tech_.vhs) {\n      delete this.tech_.vhs;\n    }\n\n    if (this.mediaSourceUrl_ && window$1.URL.revokeObjectURL) {\n      window$1.URL.revokeObjectURL(this.mediaSourceUrl_);\n      this.mediaSourceUrl_ = null;\n    }\n\n    if (this.tech_) {\n      this.tech_.off('waitingforkey', this.handleWaitingForKey_);\n    }\n\n    super.dispose();\n  }\n\n  convertToProgramTime(time, callback) {\n    return getProgramTime({\n      playlist: this.playlistController_.media(),\n      time,\n      callback\n    });\n  } // the player must be playing before calling this\n\n\n  seekToProgramTime(programTime, callback, pauseAfterSeek = true, retryCount = 2) {\n    return seekToProgramTime({\n      programTime,\n      playlist: this.playlistController_.media(),\n      retryCount,\n      pauseAfterSeek,\n      seekTo: this.options_.seekTo,\n      tech: this.options_.tech,\n      callback\n    });\n  }\n  /**\n   * Adds the onRequest, onResponse, offRequest and offResponse functions\n   * to the VhsHandler xhr Object.\n   */\n\n\n  setupXhrHooks_() {\n    /**\n     * A player function for setting an onRequest hook\n     *\n     * @param {function} callback for request modifiction\n     */\n    this.xhr.onRequest = callback => {\n      addOnRequestHook(this.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\n    this.xhr.onResponse = callback => {\n      addOnResponseHook(this.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\n    this.xhr.offRequest = callback => {\n      removeOnRequestHook(this.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\n    this.xhr.offResponse = callback => {\n      removeOnResponseHook(this.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\n    this.player_.trigger('xhr-hooks-ready');\n  }\n\n}\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 */\n\n\nconst VhsSourceHandler = {\n  name: 'videojs-http-streaming',\n  VERSION: version$4,\n\n  canHandleSource(srcObj, options = {}) {\n    const localOptions = merge(videojs.options, options);\n    return VhsSourceHandler.canPlayType(srcObj.type, localOptions);\n  },\n\n  handleSource(source, tech, options = {}) {\n    const 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\n  canPlayType(type, options) {\n    const simpleType = simpleTypeFromSourceType(type);\n\n    if (!simpleType) {\n      return '';\n    }\n\n    const overrideNative = VhsSourceHandler.getOverrideNative(options);\n    const supportsTypeNatively = Vhs.supportsTypeNatively(simpleType);\n    const canUseMsePlayback = !supportsTypeNatively || overrideNative;\n    return canUseMsePlayback ? 'maybe' : '';\n  },\n\n  getOverrideNative(options = {}) {\n    const {\n      vhs = {}\n    } = options;\n    const defaultOverrideNative = !(videojs.browser.IS_ANY_SAFARI || videojs.browser.IS_IOS);\n    const {\n      overrideNative = defaultOverrideNative\n    } = vhs;\n    return overrideNative;\n  }\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\nconst supportsNativeMediaSources = () => {\n  return browserSupportsCodec('avc1.4d400d,mp4a.40.2');\n}; // register source handlers with the appropriate techs\n\n\nif (supportsNativeMediaSources()) {\n  videojs.getTech('Html5').registerSourceHandler(VhsSourceHandler, 0);\n}\n\nvideojs.VhsHandler = VhsHandler;\nvideojs.VhsSourceHandler = VhsSourceHandler;\nvideojs.Vhs = Vhs;\n\nif (!videojs.use) {\n  videojs.registerComponent('Vhs', Vhs);\n}\n\nvideojs.options.vhs = videojs.options.vhs || {};\n\nif (!videojs.getPlugin || !videojs.getPlugin('reloadSourceOnError')) {\n  videojs.registerPlugin('reloadSourceOnError', reloadSourceOnError);\n}\n\nexport { LOCAL_STORAGE_KEY, Vhs, VhsHandler, VhsSourceHandler, emeKeySystems, expandDataUri, getAllPsshKeySystemsOptions, setupEmeOptions, waitForKeySessionCreation };\n", "import URLToolkit from 'url-toolkit';\nimport window from 'global/window';\nvar DEFAULT_LOCATION = 'http://example.com';\n\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\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\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\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\n    return newUrl.href;\n  }\n\n  return URLToolkit.buildAbsoluteURL(baseUrl, relativeUrl);\n};\n\nexport default resolveUrl;", "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.<dd>.<dd>` codec string with the standard\n * `avc1.<hhhhhh>`\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\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.<dd>.<dd>` codec strings with the standard\n * `avc1.<hhhhhh>`\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.<dd>.<dd>` to the\n * standard `avc1.<hhhhhh>`.\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\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\n      if (!match || match.length <= 1) {\n        return;\n      }\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\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\n  var audioGroup = master.mediaGroups.AUDIO[audioGroupId];\n\n  if (!audioGroup) {\n    return null;\n  }\n\n  for (var name in audioGroup) {\n    var audioType = audioGroup[name];\n\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\n  return null;\n};\nexport var isVideoCodec = function isVideoCodec(codec) {\n  if (codec === void 0) {\n    codec = '';\n  }\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\n  return regexs.audio.test(codec.trim().toLowerCase());\n};\nexport var isTextCodec = function isTextCodec(codec) {\n  if (codec === void 0) {\n    codec = '';\n  }\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\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/<container> for now\n    type = 'application';\n  } // default the container to mp4\n\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\n  return type + \"/\" + container + \";codecs=\\\"\" + codecString + \"\\\"\";\n};\nexport var browserSupportsCodec = function browserSupportsCodec(codecString) {\n  if (codecString === void 0) {\n    codecString = '';\n  }\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\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\n      if (regexs[\"muxer\" + type].test(codec)) {\n        return true;\n      }\n    }\n\n    return false;\n  });\n};\nexport var DEFAULT_AUDIO_CODEC = 'mp4a.40.2';\nexport var DEFAULT_VIDEO_CODEC = 'avc1.4d400d';", "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\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\n  if (type === 'application/vnd.videojs.vhs+json') {\n    return 'vhs-json';\n  }\n\n  return null;\n};", "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\n  while (len--) {\n    acc += str;\n  }\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\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\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\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\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\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\n  for (var i = 0; i < bytes.length; i++) {\n    str += padStart(bytes[i].toString(16), 2, '0');\n  }\n\n  return str;\n};\nexport var toBinaryString = function toBinaryString(bytes) {\n  bytes = toUint8(bytes);\n  var str = '';\n\n  for (var i = 0; i < bytes.length; i++) {\n    str += padStart(bytes[i].toString(2), 8, '0');\n  }\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\n  if (b[0] === 0xFF) {\n    return 'big';\n  }\n\n  if (b[0] === 0xCC) {\n    return 'little';\n  }\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\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\n  if (signed) {\n    var max = BYTE_TABLE[bytes.length] / BigInt(2) - BigInt(1);\n    number = BigInt(number);\n\n    if (number > max) {\n      number -= max;\n      number -= max;\n      number -= BigInt(2);\n    }\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\n  number = BigInt(number);\n  var byteCount = countBytes(number);\n  var bytes = new Uint8Array(new ArrayBuffer(byteCount));\n\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\n    if (number < 0) {\n      bytes[byteIndex] = Math.abs(~bytes[byteIndex]);\n      bytes[byteIndex] -= i === 0 ? 1 : 2;\n    }\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\n  bytes = Array.prototype.slice.call(bytes);\n  var string = String.fromCharCode.apply(null, toUint8(bytes));\n\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\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\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\n  if (!stringIsBytes) {\n    string = unescape(encodeURIComponent(string));\n  }\n\n  var view = new Uint8Array(string.length);\n\n  for (var i = 0; i < string.length; i++) {\n    view[i] = string.charCodeAt(i);\n  }\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\n  buffers = buffers.filter(function (b) {\n    return b && (b.byteLength || b.length) && typeof b !== 'string';\n  });\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\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\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 && // 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\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\n  return Array.prototype.reverse.call(src);\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';\n\nvar version = \"1.3.0\";\n\nconst isObject = obj => {\n  return !!obj && typeof obj === 'object';\n};\n\nconst merge = (...objects) => {\n  return objects.reduce((result, source) => {\n    if (typeof source !== 'object') {\n      return result;\n    }\n\n    Object.keys(source).forEach(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};\nconst values = o => Object.keys(o).map(k => o[k]);\n\nconst range = (start, end) => {\n  const result = [];\n\n  for (let i = start; i < end; i++) {\n    result.push(i);\n  }\n\n  return result;\n};\nconst flatten = lists => lists.reduce((x, y) => x.concat(y), []);\nconst from = list => {\n  if (!list.length) {\n    return [];\n  }\n\n  const result = [];\n\n  for (let i = 0; i < list.length; i++) {\n    result.push(list[i]);\n  }\n\n  return result;\n};\nconst findIndexes = (l, key) => l.reduce((a, e, i) => {\n  if (e[key]) {\n    a.push(i);\n  }\n\n  return a;\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\nconst union = (lists, keyFunction) => {\n  return values(lists.reduce((acc, list) => {\n    list.forEach(el => {\n      acc[keyFunction(el)] = el;\n    });\n    return acc;\n  }, {}));\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 <BaseUrl> 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\nconst urlTypeToSegment = ({\n  baseUrl = '',\n  source = '',\n  range = '',\n  indexRange = ''\n}) => {\n  const segment = {\n    uri: source,\n    resolvedUri: resolveUrl(baseUrl || '', source)\n  };\n\n  if (range || indexRange) {\n    const rangeStr = range ? range : indexRange;\n    const ranges = rangeStr.split('-'); // default to parsing this as a BigInt if possible\n\n    let startRange = window.BigInt ? window.BigInt(ranges[0]) : parseInt(ranges[0], 10);\n    let 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\n    if (endRange < Number.MAX_SAFE_INTEGER && typeof endRange === 'bigint') {\n      endRange = Number(endRange);\n    }\n\n    let length;\n\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\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\n    segment.byterange = {\n      length,\n      offset: startRange\n    };\n  }\n\n  return segment;\n};\nconst byteRangeToString = byterange => {\n  // `endRange` is one less than `offset + length` because the HTTP range\n  // header uses inclusive ranges\n  let endRange;\n\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\n  return `${byterange.offset}-${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\nconst parseEndNumber = endNumber => {\n  if (endNumber && typeof endNumber !== 'number') {\n    endNumber = parseInt(endNumber, 10);\n  }\n\n  if (isNaN(endNumber)) {\n    return null;\n  }\n\n  return endNumber;\n};\n/**\n * Functions for calculating the range of available segments in static and dynamic\n * manifests.\n */\n\n\nconst 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(attributes) {\n    const {\n      duration,\n      timescale = 1,\n      sourceDuration,\n      periodDuration\n    } = attributes;\n    const endNumber = parseEndNumber(attributes.endNumber);\n    const segmentDuration = duration / timescale;\n\n    if (typeof endNumber === 'number') {\n      return {\n        start: 0,\n        end: endNumber\n      };\n    }\n\n    if (typeof periodDuration === 'number') {\n      return {\n        start: 0,\n        end: periodDuration / segmentDuration\n      };\n    }\n\n    return {\n      start: 0,\n      end: sourceDuration / segmentDuration\n    };\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(attributes) {\n    const {\n      NOW,\n      clientOffset,\n      availabilityStartTime,\n      timescale = 1,\n      duration,\n      periodStart = 0,\n      minimumUpdatePeriod = 0,\n      timeShiftBufferDepth = Infinity\n    } = attributes;\n    const 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    const now = (NOW + clientOffset) / 1000; // WC stands for Wall Clock.\n    // Convert the period start time to EPOCH.\n\n    const periodStartWC = availabilityStartTime + periodStart; // Period end in EPOCH is manifest's retrieval time + time until next update.\n\n    const periodEndWC = now + minimumUpdatePeriod;\n    const periodDuration = periodEndWC - periodStartWC;\n    const segmentCount = Math.ceil(periodDuration * timescale / duration);\n    const availableStart = Math.floor((now - periodStartWC - timeShiftBufferDepth) * timescale / duration);\n    const 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/**\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\nconst toSegments = attributes => number => {\n  const {\n    duration,\n    timescale = 1,\n    periodStart,\n    startNumber = 1\n  } = attributes;\n  return {\n    number: startNumber + number,\n    duration: duration / timescale,\n    timeline: periodStart,\n    time: number * duration\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\nconst parseByDuration = attributes => {\n  const {\n    type,\n    duration,\n    timescale = 1,\n    periodDuration,\n    sourceDuration\n  } = attributes;\n  const {\n    start,\n    end\n  } = segmentRange[type](attributes);\n  const segments = range(start, end).map(toSegments(attributes));\n\n  if (type === 'static') {\n    const index = segments.length - 1; // section is either a period or the full source\n\n    const 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\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 <SegmentURL> 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.<Array>} list of segments\n */\n\nconst segmentsFromBase = attributes => {\n  const {\n    baseUrl,\n    initialization = {},\n    sourceDuration,\n    indexRange = '',\n    periodStart,\n    presentationTime,\n    number = 0,\n    duration\n  } = attributes; // 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\n  const initSegment = urlTypeToSegment({\n    baseUrl,\n    source: initialization.sourceURL,\n    range: initialization.range\n  });\n  const segment = urlTypeToSegment({\n    baseUrl,\n    source: baseUrl,\n    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    const segmentTimeInfo = parseByDuration(attributes);\n\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\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\nconst addSidxSegmentsToPlaylist$1 = (playlist, sidx, baseUrl) => {\n  // Retain init segment information\n  const initSegment = playlist.sidx.map ? playlist.sidx.map : null; // Retain source duration from initial main manifest parsing\n\n  const sourceDuration = playlist.sidx.duration; // Retain source timeline\n\n  const timeline = playlist.timeline || 0;\n  const sidxByteRange = playlist.sidx.byterange;\n  const sidxEnd = sidxByteRange.offset + sidxByteRange.length; // Retain timescale of the parsed sidx\n\n  const timescale = sidx.timescale; // referenceType 1 refers to other sidx boxes\n\n  const mediaReferences = sidx.references.filter(r => r.referenceType !== 1);\n  const segments = [];\n  const type = playlist.endList ? 'static' : 'dynamic';\n  const periodStart = playlist.sidx.timeline;\n  let presentationTime = periodStart;\n  let number = playlist.mediaSequence || 0; // firstOffset is the offset from the end of the sidx box\n\n  let 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\n  for (let i = 0; i < mediaReferences.length; i++) {\n    const reference = sidx.references[i]; // size of the referenced (sub)segment\n\n    const size = reference.referencedSize; // duration of the referenced (sub)segment, in  the  timescale\n    // this will be converted to seconds when generating segments\n\n    const duration = reference.subsegmentDuration; // should be an inclusive range\n\n    let endIndex; // 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\n    const indexRange = `${startIndex}-${endIndex}`;\n    const attributes = {\n      baseUrl,\n      timescale,\n      timeline,\n      periodStart,\n      presentationTime,\n      number,\n      duration,\n      sourceDuration,\n      indexRange,\n      type\n    };\n    const segment = segmentsFromBase(attributes)[0];\n\n    if (initSegment) {\n      segment.map = initSegment;\n    }\n\n    segments.push(segment);\n\n    if (typeof startIndex === 'bigint') {\n      startIndex += window.BigInt(size);\n    } else {\n      startIndex += size;\n    }\n\n    presentationTime += duration / timescale;\n    number++;\n  }\n\n  playlist.segments = segments;\n  return playlist;\n};\n\nconst SUPPORTED_MEDIA_TYPES = ['AUDIO', 'SUBTITLES']; // allow one 60fps frame as leniency (arbitrarily chosen)\n\nconst 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\nconst getUniqueTimelineStarts = timelineStarts => {\n  return union(timelineStarts, ({\n    timeline\n  }) => timeline).sort((a, b) => a.timeline > b.timeline ? 1 : -1);\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\nconst findPlaylistWithName = (playlists, name) => {\n  for (let i = 0; i < playlists.length; i++) {\n    if (playlists[i].attributes.NAME === name) {\n      return playlists[i];\n    }\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\nconst getMediaGroupPlaylists = manifest => {\n  let mediaGroupPlaylists = [];\n  forEachMediaGroup(manifest, SUPPORTED_MEDIA_TYPES, (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\nconst updateMediaSequenceForPlaylist = ({\n  playlist,\n  mediaSequence\n}) => {\n  playlist.mediaSequence = mediaSequence;\n  playlist.segments.forEach((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\nconst updateSequenceNumbers = ({\n  oldPlaylists,\n  newPlaylists,\n  timelineStarts\n}) => {\n  newPlaylists.forEach(playlist => {\n    playlist.discontinuitySequence = timelineStarts.findIndex(function ({\n      timeline\n    }) {\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    const oldPlaylist = findPlaylistWithName(oldPlaylists, playlist.attributes.NAME);\n\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\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\n    const firstNewSegment = playlist.segments[0];\n    const 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,\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\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\n    const oldMatchingSegment = oldPlaylist.segments[oldMatchingSegmentIndex];\n\n    if (oldMatchingSegment.discontinuity && !firstNewSegment.discontinuity) {\n      firstNewSegment.discontinuity = true;\n      playlist.discontinuityStarts.unshift(0);\n      playlist.discontinuitySequence--;\n    }\n\n    updateMediaSequenceForPlaylist({\n      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\nconst positionManifestOnTimeline = ({\n  oldManifest,\n  newManifest\n}) => {\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  const oldPlaylists = oldManifest.playlists.concat(getMediaGroupPlaylists(oldManifest));\n  const 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,\n    newPlaylists,\n    timelineStarts: newManifest.timelineStarts\n  });\n  return newManifest;\n};\n\nconst generateSidxKey = sidx => sidx && sidx.uri + '-' + byteRangeToString(sidx.byterange);\n\nconst mergeDiscontiguousPlaylists = playlists => {\n  // Break out playlists into groups based on their baseUrl\n  const playlistsByBaseUrl = playlists.reduce(function (acc, cur) {\n    if (!acc[cur.attributes.baseUrl]) {\n      acc[cur.attributes.baseUrl] = [];\n    }\n\n    acc[cur.attributes.baseUrl].push(cur);\n    return acc;\n  }, {});\n  let allPlaylists = [];\n  Object.values(playlistsByBaseUrl).forEach(playlistGroup => {\n    const mergedPlaylists = values(playlistGroup.reduce((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      const name = playlist.attributes.id + (playlist.attributes.lang || '');\n\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          // first segment of subsequent periods signal a discontinuity\n          if (playlist.segments[0]) {\n            playlist.segments[0].discontinuity = true;\n          }\n\n          acc[name].segments.push(...playlist.segments);\n        } // bubble up contentProtection, this assumes all DRM content\n        // has the same contentProtection\n\n\n        if (playlist.attributes.contentProtection) {\n          acc[name].attributes.contentProtection = playlist.attributes.contentProtection;\n        }\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(playlist => {\n    playlist.discontinuityStarts = findIndexes(playlist.segments || [], 'discontinuity');\n    return playlist;\n  });\n};\n\nconst addSidxSegmentsToPlaylist = (playlist, sidxMapping) => {\n  const sidxKey = generateSidxKey(playlist.sidx);\n  const sidxMatch = sidxKey && sidxMapping[sidxKey] && sidxMapping[sidxKey].sidx;\n\n  if (sidxMatch) {\n    addSidxSegmentsToPlaylist$1(playlist, sidxMatch, playlist.sidx.resolvedUri);\n  }\n\n  return playlist;\n};\nconst addSidxSegmentsToPlaylists = (playlists, sidxMapping = {}) => {\n  if (!Object.keys(sidxMapping).length) {\n    return playlists;\n  }\n\n  for (const i in playlists) {\n    playlists[i] = addSidxSegmentsToPlaylist(playlists[i], sidxMapping);\n  }\n\n  return playlists;\n};\nconst formatAudioPlaylist = ({\n  attributes,\n  segments,\n  sidx,\n  mediaSequence,\n  discontinuitySequence,\n  discontinuityStarts\n}, isAudioOnly) => {\n  const playlist = {\n    attributes: {\n      NAME: attributes.id,\n      BANDWIDTH: attributes.bandwidth,\n      CODECS: attributes.codecs,\n      ['PROGRAM-ID']: 1\n    },\n    uri: '',\n    endList: attributes.type === 'static',\n    timeline: attributes.periodStart,\n    resolvedUri: attributes.baseUrl || '',\n    targetDuration: attributes.duration,\n    discontinuitySequence,\n    discontinuityStarts,\n    timelineStarts: attributes.timelineStarts,\n    mediaSequence,\n    segments\n  };\n\n  if (attributes.contentProtection) {\n    playlist.contentProtection = attributes.contentProtection;\n  }\n\n  if (attributes.serviceLocation) {\n    playlist.attributes.serviceLocation = attributes.serviceLocation;\n  }\n\n  if (sidx) {\n    playlist.sidx = sidx;\n  }\n\n  if (isAudioOnly) {\n    playlist.attributes.AUDIO = 'audio';\n    playlist.attributes.SUBTITLES = 'subs';\n  }\n\n  return playlist;\n};\nconst formatVttPlaylist = ({\n  attributes,\n  segments,\n  mediaSequence,\n  discontinuityStarts,\n  discontinuitySequence\n}) => {\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\n  const m3u8Attributes = {\n    NAME: attributes.id,\n    BANDWIDTH: attributes.bandwidth,\n    ['PROGRAM-ID']: 1\n  };\n\n  if (attributes.codecs) {\n    m3u8Attributes.CODECS = attributes.codecs;\n  }\n\n  const 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,\n    discontinuitySequence,\n    mediaSequence,\n    segments\n  };\n\n  if (attributes.serviceLocation) {\n    vttPlaylist.attributes.serviceLocation = attributes.serviceLocation;\n  }\n\n  return vttPlaylist;\n};\nconst organizeAudioPlaylists = (playlists, sidxMapping = {}, isAudioOnly = false) => {\n  let mainPlaylist;\n  const formattedPlaylists = playlists.reduce((a, playlist) => {\n    const role = playlist.attributes.role && playlist.attributes.role.value || '';\n    const language = playlist.attributes.lang || '';\n    let label = playlist.attributes.label || 'main';\n\n    if (language && !playlist.attributes.label) {\n      const roleLabel = role ? ` (${role})` : '';\n      label = `${playlist.attributes.lang}${roleLabel}`;\n    }\n\n    if (!a[label]) {\n      a[label] = {\n        language,\n        autoselect: true,\n        default: role === 'main',\n        playlists: [],\n        uri: ''\n      };\n    }\n\n    const formatted = addSidxSegmentsToPlaylist(formatAudioPlaylist(playlist, isAudioOnly), sidxMapping);\n    a[label].playlists.push(formatted);\n\n    if (typeof mainPlaylist === 'undefined' && role === 'main') {\n      mainPlaylist = playlist;\n      mainPlaylist.default = true;\n    }\n\n    return a;\n  }, {}); // if no playlists have role \"main\", mark the first as main\n\n  if (!mainPlaylist) {\n    const firstLabel = Object.keys(formattedPlaylists)[0];\n    formattedPlaylists[firstLabel].default = true;\n  }\n\n  return formattedPlaylists;\n};\nconst organizeVttPlaylists = (playlists, sidxMapping = {}) => {\n  return playlists.reduce((a, playlist) => {\n    const label = playlist.attributes.label || playlist.attributes.lang || 'text';\n\n    if (!a[label]) {\n      a[label] = {\n        language: label,\n        default: false,\n        autoselect: false,\n        playlists: [],\n        uri: ''\n      };\n    }\n\n    a[label].playlists.push(addSidxSegmentsToPlaylist(formatVttPlaylist(playlist), sidxMapping));\n    return a;\n  }, {});\n};\n\nconst organizeCaptionServices = captionServices => captionServices.reduce((svcObj, svc) => {\n  if (!svc) {\n    return svcObj;\n  }\n\n  svc.forEach(service => {\n    const {\n      channel,\n      language\n    } = service;\n    svcObj[language] = {\n      autoselect: false,\n      default: false,\n      instreamId: channel,\n      language\n    };\n\n    if (service.hasOwnProperty('aspectRatio')) {\n      svcObj[language].aspectRatio = service.aspectRatio;\n    }\n\n    if (service.hasOwnProperty('easyReader')) {\n      svcObj[language].easyReader = service.easyReader;\n    }\n\n    if (service.hasOwnProperty('3D')) {\n      svcObj[language]['3D'] = service['3D'];\n    }\n  });\n  return svcObj;\n}, {});\n\nconst formatVideoPlaylist = ({\n  attributes,\n  segments,\n  sidx,\n  discontinuityStarts\n}) => {\n  const playlist = {\n    attributes: {\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    },\n    uri: '',\n    endList: attributes.type === 'static',\n    timeline: attributes.periodStart,\n    resolvedUri: attributes.baseUrl || '',\n    targetDuration: attributes.duration,\n    discontinuityStarts,\n    timelineStarts: attributes.timelineStarts,\n    segments\n  };\n\n  if (attributes.frameRate) {\n    playlist.attributes['FRAME-RATE'] = attributes.frameRate;\n  }\n\n  if (attributes.contentProtection) {\n    playlist.contentProtection = attributes.contentProtection;\n  }\n\n  if (attributes.serviceLocation) {\n    playlist.attributes.serviceLocation = attributes.serviceLocation;\n  }\n\n  if (sidx) {\n    playlist.sidx = sidx;\n  }\n\n  return playlist;\n};\n\nconst videoOnly = ({\n  attributes\n}) => attributes.mimeType === 'video/mp4' || attributes.mimeType === 'video/webm' || attributes.contentType === 'video';\n\nconst audioOnly = ({\n  attributes\n}) => attributes.mimeType === 'audio/mp4' || attributes.mimeType === 'audio/webm' || attributes.contentType === 'audio';\n\nconst vttOnly = ({\n  attributes\n}) => attributes.mimeType === 'text/vtt' || attributes.contentType === 'text';\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\n\nconst addMediaSequenceValues = (playlists, timelineStarts) => {\n  // increment all segments sequentially\n  playlists.forEach(playlist => {\n    playlist.mediaSequence = 0;\n    playlist.discontinuitySequence = timelineStarts.findIndex(function ({\n      timeline\n    }) {\n      return timeline === playlist.timeline;\n    });\n\n    if (!playlist.segments) {\n      return;\n    }\n\n    playlist.segments.forEach((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\nconst flattenMediaGroupPlaylists = mediaGroupObject => {\n  if (!mediaGroupObject) {\n    return [];\n  }\n\n  return Object.keys(mediaGroupObject).reduce((acc, label) => {\n    const labelContents = mediaGroupObject[label];\n    return acc.concat(labelContents.playlists);\n  }, []);\n};\nconst toM3u8 = ({\n  dashPlaylists,\n  locations,\n  contentSteering,\n  sidxMapping = {},\n  previousManifest,\n  eventStream\n}) => {\n  if (!dashPlaylists.length) {\n    return {};\n  } // grab all main manifest attributes\n\n\n  const {\n    sourceDuration: duration,\n    type,\n    suggestedPresentationDelay,\n    minimumUpdatePeriod\n  } = dashPlaylists[0].attributes;\n  const videoPlaylists = mergeDiscontiguousPlaylists(dashPlaylists.filter(videoOnly)).map(formatVideoPlaylist);\n  const audioPlaylists = mergeDiscontiguousPlaylists(dashPlaylists.filter(audioOnly));\n  const vttPlaylists = mergeDiscontiguousPlaylists(dashPlaylists.filter(vttOnly));\n  const captions = dashPlaylists.map(playlist => playlist.attributes.captionServices).filter(Boolean);\n  const manifest = {\n    allowCache: true,\n    discontinuityStarts: [],\n    segments: [],\n    endList: true,\n    mediaGroups: {\n      AUDIO: {},\n      VIDEO: {},\n      ['CLOSED-CAPTIONS']: {},\n      SUBTITLES: {}\n    },\n    uri: '',\n    duration,\n    playlists: addSidxSegmentsToPlaylists(videoPlaylists, sidxMapping)\n  };\n\n  if (minimumUpdatePeriod >= 0) {\n    manifest.minimumUpdatePeriod = minimumUpdatePeriod * 1000;\n  }\n\n  if (locations) {\n    manifest.locations = locations;\n  }\n\n  if (contentSteering) {\n    manifest.contentSteering = contentSteering;\n  }\n\n  if (type === 'dynamic') {\n    manifest.suggestedPresentationDelay = suggestedPresentationDelay;\n  }\n\n  if (eventStream && eventStream.length > 0) {\n    manifest.eventStream = eventStream;\n  }\n\n  const isAudioOnly = manifest.playlists.length === 0;\n  const organizedAudioGroup = audioPlaylists.length ? organizeAudioPlaylists(audioPlaylists, sidxMapping, isAudioOnly) : null;\n  const organizedVttGroup = vttPlaylists.length ? organizeVttPlaylists(vttPlaylists, sidxMapping) : null;\n  const formattedPlaylists = videoPlaylists.concat(flattenMediaGroupPlaylists(organizedAudioGroup), flattenMediaGroupPlaylists(organizedVttGroup));\n  const playlistTimelineStarts = formattedPlaylists.map(({\n    timelineStarts\n  }) => timelineStarts);\n  manifest.timelineStarts = getUniqueTimelineStarts(playlistTimelineStarts);\n  addMediaSequenceValues(formattedPlaylists, manifest.timelineStarts);\n\n  if (organizedAudioGroup) {\n    manifest.mediaGroups.AUDIO.audio = organizedAudioGroup;\n  }\n\n  if (organizedVttGroup) {\n    manifest.mediaGroups.SUBTITLES.subs = organizedVttGroup;\n  }\n\n  if (captions.length) {\n    manifest.mediaGroups['CLOSED-CAPTIONS'].cc = organizeCaptionServices(captions);\n  }\n\n  if (previousManifest) {\n    return positionManifestOnTimeline({\n      oldManifest: previousManifest,\n      newManifest: manifest\n    });\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 <S />\n *\n * @return {number}\n *        R value to reach the end of the given period\n */\nconst getLiveRValue = (attributes, time, duration) => {\n  const {\n    NOW,\n    clientOffset,\n    availabilityStartTime,\n    timescale = 1,\n    periodStart = 0,\n    minimumUpdatePeriod = 0\n  } = attributes;\n  const now = (NOW + clientOffset) / 1000;\n  const periodStartWC = availabilityStartTime + periodStart;\n  const periodEndWC = now + minimumUpdatePeriod;\n  const 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\n\nconst parseByTimeline = (attributes, segmentTimeline) => {\n  const {\n    type,\n    minimumUpdatePeriod = 0,\n    media = '',\n    sourceDuration,\n    timescale = 1,\n    startNumber = 1,\n    periodStart: timeline\n  } = attributes;\n  const segments = [];\n  let time = -1;\n\n  for (let sIndex = 0; sIndex < segmentTimeline.length; sIndex++) {\n    const S = segmentTimeline[sIndex];\n    const duration = S.d;\n    const repeat = S.r || 0;\n    const segmentTime = S.t || 0;\n\n    if (time < 0) {\n      // first segment\n      time = segmentTime;\n    }\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      //  <S t=\"0\" d=\"1\" />\n      //  <S d=\"1\" />\n      //  <S d=\"1\" />\n      //  <S t=\"5\" d=\"1\" />\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      //  <S d=\"1\" r=\"-1\" />\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\n    let count;\n\n    if (repeat < 0) {\n      const nextS = sIndex + 1;\n\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\n    const end = startNumber + segments.length + count;\n    let number = startNumber + segments.length;\n\n    while (number < end) {\n      segments.push({\n        number,\n        duration: duration / timescale,\n        time,\n        timeline\n      });\n      time += duration;\n      number++;\n    }\n  }\n\n  return segments;\n};\n\nconst 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\nconst identifierReplacement = values => (match, identifier, format, width) => {\n  if (match === '$$') {\n    // escape sequence\n    return '$';\n  }\n\n  if (typeof values[identifier] === 'undefined') {\n    return match;\n  }\n\n  const value = '' + values[identifier];\n\n  if (identifier === 'RepresentationID') {\n    // Format tag shall not be present with RepresentationID\n    return value;\n  }\n\n  if (!format) {\n    width = 1;\n  } else {\n    width = parseInt(width, 10);\n  }\n\n  if (value.length >= width) {\n    return value;\n  }\n\n  return `${new Array(width - value.length + 1).join('0')}${value}`;\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\nconst constructTemplateUrl = (url, values) => url.replace(identifierPattern, identifierReplacement(values));\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\nconst 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\n  if (attributes.duration) {\n    return parseByDuration(attributes);\n  }\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\nconst segmentsFromTemplate = (attributes, segmentTimeline) => {\n  const templateValues = {\n    RepresentationID: attributes.id,\n    Bandwidth: attributes.bandwidth || 0\n  };\n  const {\n    initialization = {\n      sourceURL: '',\n      range: ''\n    }\n  } = attributes;\n  const mapSegment = urlTypeToSegment({\n    baseUrl: attributes.baseUrl,\n    source: constructTemplateUrl(initialization.sourceURL, templateValues),\n    range: initialization.range\n  });\n  const segments = parseTemplateInfo(attributes, segmentTimeline);\n  return segments.map(segment => {\n    templateValues.Number = segment.number;\n    templateValues.Time = segment.time;\n    const 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    const timescale = attributes.timescale || 1; // - if presentationTimeOffset isn't present on any level, default to 0\n\n    const presentationTimeOffset = attributes.presentationTimeOffset || 0;\n    const presentationTime = // 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    const map = {\n      uri,\n      timeline: segment.timeline,\n      duration: segment.duration,\n      resolvedUri: resolveUrl(attributes.baseUrl || '', uri),\n      map: mapSegment,\n      number: segment.number,\n      presentationTime\n    };\n    return map;\n  });\n};\n\n/**\n * Converts a <SegmentUrl> (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 *   <SegmentURL> node to translate into a segment object\n * @return {Object} translated segment object\n */\n\nconst SegmentURLToSegmentObject = (attributes, segmentUrl) => {\n  const {\n    baseUrl,\n    initialization = {}\n  } = attributes;\n  const initSegment = urlTypeToSegment({\n    baseUrl,\n    source: initialization.sourceURL,\n    range: initialization.range\n  });\n  const segment = urlTypeToSegment({\n    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 <SegmentURL> 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.<Array>} list of segments\n */\n\n\nconst segmentsFromList = (attributes, segmentTimeline) => {\n  const {\n    duration,\n    segmentUrls = [],\n    periodStart\n  } = attributes; // 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\n  const segmentUrlMap = segmentUrls.map(segmentUrlObject => SegmentURLToSegmentObject(attributes, segmentUrlObject));\n  let segmentTimeInfo;\n\n  if (duration) {\n    segmentTimeInfo = parseByDuration(attributes);\n  }\n\n  if (segmentTimeline) {\n    segmentTimeInfo = parseByTimeline(attributes, segmentTimeline);\n  }\n\n  const segments = segmentTimeInfo.map((segmentTime, index) => {\n    if (segmentUrlMap[index]) {\n      const 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      const timescale = attributes.timescale || 1; // - if presentationTimeOffset isn't present on any level, default to 0\n\n      const 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\n  }).filter(segment => segment);\n  return segments;\n};\n\nconst generateSegments = ({\n  attributes,\n  segmentInfo\n}) => {\n  let segmentAttributes;\n  let segmentsFn;\n\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\n  const segmentsInfo = {\n    attributes\n  };\n\n  if (!segmentsFn) {\n    return segmentsInfo;\n  }\n\n  const 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    const {\n      duration,\n      timescale = 1\n    } = segmentAttributes;\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((max, segment) => {\n      return Math.max(max, Math.ceil(segment.duration));\n    }, 0);\n  } else {\n    segmentAttributes.duration = 0;\n  }\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\n  return segmentsInfo;\n};\nconst toPlaylists = representations => representations.map(generateSegments);\n\nconst findChildren = (element, name) => from(element.childNodes).filter(({\n  tagName\n}) => tagName === name);\nconst getContent = element => element.textContent.trim();\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 */\nconst parseDivisionValue = value => {\n  return parseFloat(value.split('/').reduce((prev, current) => prev / current));\n};\n\nconst parseDuration = str => {\n  const SECONDS_IN_YEAR = 365 * 24 * 60 * 60;\n  const SECONDS_IN_MONTH = 30 * 24 * 60 * 60;\n  const SECONDS_IN_DAY = 24 * 60 * 60;\n  const SECONDS_IN_HOUR = 60 * 60;\n  const SECONDS_IN_MIN = 60; // P10Y10M10DT10H10M10.1S\n\n  const durationRegex = /P(?:(\\d*)Y)?(?:(\\d*)M)?(?:(\\d*)D)?(?:T(?:(\\d*)H)?(?:(\\d*)M)?(?:([\\d.]*)S)?)?/;\n  const match = durationRegex.exec(str);\n\n  if (!match) {\n    return 0;\n  }\n\n  const [year, month, day, hour, minute, second] = match.slice(1);\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};\nconst parseDate = str => {\n  // Date format without timezone according to ISO 8601\n  // YYY-MM-DDThh:mm:ss.ssssss\n  const 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\n  return Date.parse(str);\n};\n\nconst 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(value) {\n    return parseDuration(value);\n  },\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(value) {\n    return parseDate(value) / 1000;\n  },\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(value) {\n    return parseDuration(value);\n  },\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(value) {\n    return parseDuration(value);\n  },\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(value) {\n    return value;\n  },\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(value) {\n    return parseDuration(value);\n  },\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(value) {\n    return parseDuration(value);\n  },\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(value) {\n    return parseInt(value, 10);\n  },\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(value) {\n    return parseInt(value, 10);\n  },\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(value) {\n    return parseInt(value, 10);\n  },\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(value) {\n    return parseDivisionValue(value);\n  },\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(value) {\n    return parseInt(value, 10);\n  },\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(value) {\n    return parseInt(value, 10);\n  },\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(value) {\n    return parseInt(value, 10);\n  },\n\n  /**\n   * Specifies the constant approximate Segment duration\n   * NOTE: The <Period> 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(value) {\n    const parsedValue = parseInt(value, 10);\n\n    if (isNaN(parsedValue)) {\n      return parseDuration(value);\n    }\n\n    return parsedValue;\n  },\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(value) {\n    return parseInt(value, 10);\n  },\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(value) {\n    return parseInt(value, 10);\n  },\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(value) {\n    return parseInt(value, 10);\n  },\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(value) {\n    return parseInt(value, 10);\n  },\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(value) {\n    return value;\n  }\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\nconst parseAttributes = el => {\n  if (!(el && el.attributes)) {\n    return {};\n  }\n\n  return from(el.attributes).reduce((a, e) => {\n    const parseFn = parsers[e.name] || parsers.DEFAULT;\n    a[e.name] = parseFn(e.value);\n    return a;\n  }, {});\n};\n\nconst 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\nconst buildBaseUrls = (references, baseUrlElements) => {\n  if (!baseUrlElements.length) {\n    return references;\n  }\n\n  return flatten(references.map(function (reference) {\n    return baseUrlElements.map(function (baseUrlElement) {\n      const initialBaseUrl = getContent(baseUrlElement);\n      const resolvedBaseUrl = resolveUrl(reference.baseUrl, initialBaseUrl);\n      const 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\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\nconst getSegmentInformation = adaptationSet => {\n  const segmentTemplate = findChildren(adaptationSet, 'SegmentTemplate')[0];\n  const segmentList = findChildren(adaptationSet, 'SegmentList')[0];\n  const segmentUrls = segmentList && findChildren(segmentList, 'SegmentURL').map(s => merge({\n    tag: 'SegmentURL'\n  }, parseAttributes(s)));\n  const segmentBase = findChildren(adaptationSet, 'SegmentBase')[0];\n  const segmentTimelineParentNode = segmentList || segmentTemplate;\n  const segmentTimeline = segmentTimelineParentNode && findChildren(segmentTimelineParentNode, 'SegmentTimeline')[0];\n  const segmentInitializationParentNode = segmentList || segmentBase || segmentTemplate;\n  const segmentInitialization = segmentInitializationParentNode && findChildren(segmentInitializationParentNode, 'Initialization')[0]; // SegmentTemplate is handled slightly differently, since it can have both\n  // @initialization and an <Initialization> node.  @initialization can be templated,\n  // while the node can have a url and range specified.  If the <SegmentTemplate> has\n  // both @initialization and an <Initialization> subelement we opt to override with\n  // the node, as this interaction is not defined in the spec.\n\n  const template = segmentTemplate && parseAttributes(segmentTemplate);\n\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 <SegmentTemplate>\n    template.initialization = {\n      sourceURL: template.initialization\n    };\n  }\n\n  const segmentInfo = {\n    template,\n    segmentTimeline: segmentTimeline && findChildren(segmentTimeline, 'S').map(s => parseAttributes(s)),\n    list: segmentList && merge(parseAttributes(segmentList), {\n      segmentUrls,\n      initialization: parseAttributes(segmentInitialization)\n    }),\n    base: segmentBase && merge(parseAttributes(segmentBase), {\n      initialization: parseAttributes(segmentInitialization)\n    })\n  };\n  Object.keys(segmentInfo).forEach(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\nconst inheritBaseUrls = (adaptationSetAttributes, adaptationSetBaseUrls, adaptationSetSegmentInfo) => representation => {\n  const repBaseUrlElements = findChildren(representation, 'BaseURL');\n  const repBaseUrls = buildBaseUrls(adaptationSetBaseUrls, repBaseUrlElements);\n  const attributes = merge(adaptationSetAttributes, parseAttributes(representation));\n  const representationSegmentInfo = getSegmentInformation(representation);\n  return repBaseUrls.map(baseUrl => {\n    return {\n      segmentInfo: merge(adaptationSetSegmentInfo, representationSegmentInfo),\n      attributes: merge(attributes, baseUrl)\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\nconst generateKeySystemInformation = contentProtectionNodes => {\n  return contentProtectionNodes.reduce((acc, node) => {\n    const 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\n    const keySystem = keySystemsMap[attributes.schemeIdUri];\n\n    if (keySystem) {\n      acc[keySystem] = {\n        attributes\n      };\n      const psshNode = findChildren(node, 'cenc:pssh')[0];\n\n      if (psshNode) {\n        const pssh = getContent(psshNode);\n        acc[keySystem].pssh = pssh && decodeB64ToUint8Array(pssh);\n      }\n    }\n\n    return acc;\n  }, {});\n}; // defined in ANSI_SCTE 214-1 2016\n\n\nconst parseCaptionServiceMetadata = service => {\n  // 608 captions\n  if (service.schemeIdUri === 'urn:scte:dash:cc:cea-608:2015') {\n    const values = typeof service.value !== 'string' ? [] : service.value.split(';');\n    return values.map(value => {\n      let channel;\n      let language; // default language to value\n\n      language = value;\n\n      if (/^CC\\d=/.test(value)) {\n        [channel, language] = value.split('=');\n      } else if (/^CC\\d$/.test(value)) {\n        channel = value;\n      }\n\n      return {\n        channel,\n        language\n      };\n    });\n  } else if (service.schemeIdUri === 'urn:scte:dash:cc:cea-708:2015') {\n    const values = typeof service.value !== 'string' ? [] : service.value.split(';');\n    return values.map(value => {\n      const 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\n      if (/=/.test(value)) {\n        const [channel, opts = ''] = value.split('=');\n        flags.channel = channel;\n        flags.language = value;\n        opts.split(',').forEach(opt => {\n          const [name, val] = opt.split(':');\n\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\n      if (flags.channel) {\n        flags.channel = 'SERVICE' + flags.channel;\n      }\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\nconst toEventStream = period => {\n  // get and flatten all EventStreams tags and parse attributes and children\n  return flatten(findChildren(period.node, 'EventStream').map(eventStream => {\n    const eventStreamAttributes = parseAttributes(eventStream);\n    const schemeIdUri = eventStreamAttributes.schemeIdUri; // find all Events per EventStream tag and map to return objects\n\n    return findChildren(eventStream, 'Event').map(event => {\n      const eventAttributes = parseAttributes(event);\n      const presentationTime = eventAttributes.presentationTime || 0;\n      const timescale = eventStreamAttributes.timescale || 1;\n      const duration = eventAttributes.duration || 0;\n      const start = presentationTime / timescale + period.attributes.start;\n      return {\n        schemeIdUri,\n        value: eventStreamAttributes.value,\n        id: eventAttributes.id,\n        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\nconst toRepresentations = (periodAttributes, periodBaseUrls, periodSegmentInfo) => adaptationSet => {\n  const adaptationSetAttributes = parseAttributes(adaptationSet);\n  const adaptationSetBaseUrls = buildBaseUrls(periodBaseUrls, findChildren(adaptationSet, 'BaseURL'));\n  const role = findChildren(adaptationSet, 'Role')[0];\n  const roleAttributes = {\n    role: parseAttributes(role)\n  };\n  let attrs = merge(periodAttributes, adaptationSetAttributes, roleAttributes);\n  const accessibility = findChildren(adaptationSet, 'Accessibility')[0];\n  const captionServices = parseCaptionServiceMetadata(parseAttributes(accessibility));\n\n  if (captionServices) {\n    attrs = merge(attrs, {\n      captionServices\n    });\n  }\n\n  const label = findChildren(adaptationSet, 'Label')[0];\n\n  if (label && label.childNodes.length) {\n    const labelVal = label.childNodes[0].nodeValue.trim();\n    attrs = merge(attrs, {\n      label: labelVal\n    });\n  }\n\n  const contentProtection = generateKeySystemInformation(findChildren(adaptationSet, 'ContentProtection'));\n\n  if (Object.keys(contentProtection).length) {\n    attrs = merge(attrs, {\n      contentProtection\n    });\n  }\n\n  const segmentInfo = getSegmentInformation(adaptationSet);\n  const representations = findChildren(adaptationSet, 'Representation');\n  const adaptationSetSegmentInfo = merge(periodSegmentInfo, segmentInfo);\n  return flatten(representations.map(inheritBaseUrls(attrs, adaptationSetBaseUrls, adaptationSetSegmentInfo)));\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\nconst toAdaptationSets = (mpdAttributes, mpdBaseUrls) => (period, index) => {\n  const periodBaseUrls = buildBaseUrls(mpdBaseUrls, findChildren(period.node, 'BaseURL'));\n  const periodAttributes = merge(mpdAttributes, {\n    periodStart: period.attributes.start\n  });\n\n  if (typeof period.attributes.duration === 'number') {\n    periodAttributes.periodDuration = period.attributes.duration;\n  }\n\n  const adaptationSets = findChildren(period.node, 'AdaptationSet');\n  const periodSegmentInfo = getSegmentInformation(period.node);\n  return flatten(adaptationSets.map(toRepresentations(periodAttributes, periodBaseUrls, periodSegmentInfo)));\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\nconst 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\n  if (!contentSteeringNodes.length) {\n    return null;\n  }\n\n  const 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\nconst getPeriodStart = ({\n  attributes,\n  priorPeriodAttributes,\n  mpdType\n}) => {\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\n  if (priorPeriodAttributes && typeof priorPeriodAttributes.start === 'number' && typeof priorPeriodAttributes.duration === 'number') {\n    return priorPeriodAttributes.start + priorPeriodAttributes.duration;\n  } // (3)\n\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\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\nconst inheritAttributes = (mpd, options = {}) => {\n  const {\n    manifestUri = '',\n    NOW = Date.now(),\n    clientOffset = 0,\n    // TODO: For now, we are expecting an eventHandler callback function\n    // to be passed into the mpd parser as an option.\n    // In the future, we should enable stream parsing by using the Stream class from vhs-utils.\n    // This will support new features including a standardized event handler.\n    // See the m3u8 parser for examples of how stream parsing is currently used for HLS parsing.\n    // https://github.com/videojs/vhs-utils/blob/88d6e10c631e57a5af02c5a62bc7376cd456b4f5/src/stream.js#L9\n    eventHandler = function () {}\n  } = options;\n  const periodNodes = findChildren(mpd, 'Period');\n\n  if (!periodNodes.length) {\n    throw new Error(errors.INVALID_NUMBER_OF_PERIOD);\n  }\n\n  const locations = findChildren(mpd, 'Location');\n  const mpdAttributes = parseAttributes(mpd);\n  const mpdBaseUrls = buildBaseUrls([{\n    baseUrl: manifestUri\n  }], findChildren(mpd, 'BaseURL'));\n  const 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\n  if (locations.length) {\n    mpdAttributes.locations = locations.map(getContent);\n  }\n\n  const 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((node, index) => {\n    const attributes = parseAttributes(node); // Use the last modified prior period, as it may contain added information necessary\n    // for this period.\n\n    const priorPeriod = periods[index - 1];\n    attributes.start = getPeriodStart({\n      attributes,\n      priorPeriodAttributes: priorPeriod ? priorPeriod.attributes : null,\n      mpdType: mpdAttributes.type\n    });\n    periods.push({\n      node,\n      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};\n\nconst stringToMpdXml = manifestString => {\n  if (manifestString === '') {\n    throw new Error(errors.DASH_EMPTY_MANIFEST);\n  }\n\n  const parser = new DOMParser();\n  let xml;\n  let mpd;\n\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\n  if (!mpd || mpd && mpd.getElementsByTagName('parsererror').length > 0) {\n    throw new Error(errors.DASH_INVALID_XML);\n  }\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\nconst parseUTCTimingScheme = mpd => {\n  const UTCTimingNode = findChildren(mpd, 'UTCTiming')[0];\n\n  if (!UTCTimingNode) {\n    return null;\n  }\n\n  const attributes = parseAttributes(UTCTimingNode);\n\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\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\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\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\n  return attributes;\n};\n\nconst 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\nconst parse = (manifestString, options = {}) => {\n  const parsedManifestInfo = inheritAttributes(stringToMpdXml(manifestString), options);\n  const 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\n\nconst parseUTCTiming = manifestString => parseUTCTimingScheme(stringToMpdXml(manifestString));\n\nexport { VERSION, addSidxSegmentsToPlaylist$1 as addSidxSegmentsToPlaylist, generateSidxKey, inheritAttributes, parse, parseUTCTiming, stringToMpdXml, toM3u8, toPlaylists };\n", "/**\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};", "import window from 'global/window';\n\nvar atob = function atob(s) {\n  return window.atob ? window.atob(s) : Buffer.from(s, 'base64').toString('binary');\n};\n\nexport default function decodeB64ToUint8Array(b64Text) {\n  var decodedString = atob(b64Text);\n  var array = new Uint8Array(decodedString.length);\n\n  for (var i = 0; i < decodedString.length; i++) {\n    array[i] = decodedString.charCodeAt(i);\n  }\n\n  return array;\n}", "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\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\n  if (footerPresent) {\n    return returnSize + 20;\n  }\n\n  return returnSize + 10;\n};\nexport var getId3Offset = function getId3Offset(bytes, offset) {\n  if (offset === void 0) {\n    offset = 0;\n  }\n\n  bytes = toUint8(bytes);\n\n  if (bytes.length - offset < 10 || !bytesMatch(bytes, ID3, {\n    offset: offset\n  })) {\n    return offset;\n  }\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};", "export var OPUS_HEAD = new Uint8Array([// O, p, u, s\n0x4f, 0x70, 0x75, 0x73, // 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\n  if (config.channelMappingFamily > 0 && bytes.length > 10) {\n    config.streamCount = view.getUint8(11);\n    config.twoChannelStreamCount = view.getUint8(12);\n    config.channelMapping = [];\n\n    for (var c = 0; c < config.channels; c++) {\n      config.channelMapping.push(view.getUint8(13 + c));\n    }\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\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\n  return new Uint8Array(view.buffer);\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';\n\nvar normalizePath = function normalizePath(path) {\n  if (typeof path === 'string') {\n    return stringToBytes(path);\n  }\n\n  if (typeof path === 'number') {\n    return path;\n  }\n\n  return path;\n};\n\nvar normalizePaths = function normalizePaths(paths) {\n  if (!Array.isArray(paths)) {\n    return [normalizePath(paths)];\n  }\n\n  return paths.map(function (p) {\n    return normalizePath(p);\n  });\n};\n\nvar DESCRIPTORS;\nexport var parseDescriptors = function parseDescriptors(bytes) {\n  bytes = toUint8(bytes);\n  var results = [];\n  var i = 0;\n\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\n    while (byte & 0x80) {\n      size = (byte & 0x7F) << 7;\n      byte = bytes[headerSize];\n      headerSize++;\n    }\n\n    size += byte & 0x7F;\n\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\n      if (tag === id) {\n        results.push(parser(bytes.subarray(headerSize, headerSize + size)));\n        break;\n      }\n    }\n\n    i += size + headerSize;\n  }\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\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\n    if (desc.flags & 0x20) {\n      desc.ocrEsId = bytes[desc.size] << 8 | bytes[desc.size + 1];\n      desc.size += 2;\n    }\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\n  paths = normalizePaths(paths);\n  bytes = toUint8(bytes);\n  var results = [];\n\n  if (!paths.length) {\n    // short-circuit the search for empty paths\n    return results;\n  }\n\n  var i = 0;\n\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\n    var end = i + size;\n\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\n      end = bytes.length;\n    }\n\n    var data = bytes.subarray(i + 8, end);\n\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\n    i = end;\n  } // we've finished searching all of bytes\n\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\n  if (!name.length) {\n    // short-circuit the search for empty paths\n    return bytes.subarray(bytes.length);\n  }\n\n  var i = 0;\n\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\n    i++;\n  } // we've finished searching all of bytes\n\n\n  return bytes.subarray(bytes.length);\n};\n\nvar parseSamples = function parseSamples(data, entrySize, parseEntry) {\n  if (entrySize === void 0) {\n    entrySize = 4;\n  }\n\n  if (parseEntry === void 0) {\n    parseEntry = function parseEntry(d) {\n      return bytesToNumber(d);\n    };\n  }\n\n  var entries = [];\n\n  if (!data || !data.length) {\n    return entries;\n  }\n\n  var entryCount = bytesToNumber(data.subarray(4, 8));\n\n  for (var i = 8; entryCount; i += entrySize, entryCount--) {\n    entries.push(parseEntry(data.subarray(i, i + entrySize)));\n  }\n\n  return entries;\n};\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\n  for (var chunkIndex = 0; chunkIndex < chunkOffsets.length; chunkIndex++) {\n    var samplesInChunk = void 0;\n\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\n      if (isThisOne) {\n        samplesInChunk = sampleToChunk.samplesPerChunk;\n        break;\n      }\n    }\n\n    var chunkOffset = chunkOffsets[chunkIndex];\n\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\n      if (keySamples.length && keySamples.indexOf(frames.length + 1) !== -1) {\n        keyframe = true;\n      }\n\n      var frame = {\n        keyframe: keyframe,\n        start: chunkOffset,\n        end: chunkOffset + frameEnd\n      };\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\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\n      frames.push(frame);\n      chunkOffset += frameEnd;\n    }\n  }\n\n  return frames;\n};\nexport var addSampleDescription = function addSampleDescription(track, bytes) {\n  var codec = bytesToString(bytes.subarray(0, 4));\n\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\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\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\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\n  track.codec = codec;\n};\nexport var parseTracks = function parseTracks(bytes, frameTable) {\n  if (frameTable === void 0) {\n    frameTable = true;\n  }\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\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\n    var tkhd = findBox(trak, ['tkhd'])[0];\n\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\n    var mdhd = findBox(mdia, ['mdhd'])[0];\n\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\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\n    if (frameTable) {\n      track.frameTable = buildFrameTable(stbl, track.timescale);\n    } // codec has no sub parameters\n\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\n  if (!mvhd || !mvhd.length) {\n    return;\n  }\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\n  info.bytes = mvhd;\n  return info;\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];\n\nvar getLength = function getLength(byte) {\n  var len = 1;\n\n  for (var i = 0; i < LENGTH_TABLE.length; i++) {\n    if (byte & LENGTH_TABLE[i]) {\n      break;\n    }\n\n    len++;\n  }\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\n\nvar getvint = function getvint(bytes, offset, removeLength, signed) {\n  if (removeLength === void 0) {\n    removeLength = true;\n  }\n\n  if (signed === void 0) {\n    signed = false;\n  }\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\n  return {\n    length: length,\n    value: bytesToNumber(valueBytes, {\n      signed: signed\n    }),\n    bytes: valueBytes\n  };\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\n  if (typeof path === 'number') {\n    return numberToBytes(path);\n  }\n\n  return path;\n};\n\nvar normalizePaths = function normalizePaths(paths) {\n  if (!Array.isArray(paths)) {\n    return [normalizePath(paths)];\n  }\n\n  return paths.map(function (p) {\n    return normalizePath(p);\n  });\n};\n\nvar getInfinityDataSize = function getInfinityDataSize(id, bytes, offset) {\n  if (offset >= bytes.length) {\n    return bytes.length;\n  }\n\n  var innerid = getvint(bytes, offset, false);\n\n  if (bytesMatch(id.bytes, innerid.bytes)) {\n    return offset;\n  }\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\n\nexport var findEbml = function findEbml(bytes, paths) {\n  paths = normalizePaths(paths);\n  bytes = toUint8(bytes);\n  var results = [];\n\n  if (!paths.length) {\n    return results;\n  }\n\n  var i = 0;\n\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\n      if (dataHeader.value !== bytes.length) {\n        dataHeader.value -= dataStart;\n      }\n    }\n\n    var dataEnd = dataStart + dataHeader.value > bytes.length ? bytes.length : dataStart + dataHeader.value;\n    var data = bytes.subarray(dataStart, dataEnd);\n\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\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\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\n  if (type === 'group') {\n    duration = findEbml(block, [EBML_TAGS.BlockDuration])[0];\n\n    if (duration) {\n      duration = bytesToNumber(duration);\n      duration = 1 / timestampScale * duration * timestampScale / 1000;\n    }\n\n    block = findEbml(block, [EBML_TAGS.Block])[0];\n    type = 'block'; // treat data as a block after this point\n  }\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\n  if (!parsed.lacing) {\n    parsed.frames.push(data);\n    return parsed;\n  }\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\n    for (var i = 0; i < numberOfFrames; i++) {\n      frameSizes.push(sizeOfFrame);\n    }\n  } // xiph\n\n\n  if (parsed.lacing === 1) {\n    for (var _i = 0; _i < numberOfFrames - 1; _i++) {\n      var size = 0;\n\n      do {\n        size += data[offset];\n        offset++;\n      } while (data[offset - 1] === 0xFF);\n\n      frameSizes.push(size);\n    }\n  } // ebml\n\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\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\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\n  while (i < bytes.length) {\n    var id = bytes[i] & 0x7f;\n    var len = bytes[i + 1];\n    var val = void 0;\n\n    if (len === 1) {\n      val = bytes[i + 2];\n    } else {\n      val = bytes.subarray(i + 2, i + 2 + len);\n    }\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\n    i += 2 + len;\n  }\n\n  return params;\n};\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\n  if (!tracks.length) {\n    tracks = findEbml(bytes, [EBML_TAGS.Tracks, EBML_TAGS.Track]);\n  }\n\n  if (!tracks.length) {\n    tracks = findEbml(bytes, [EBML_TAGS.Track]);\n  }\n\n  if (!tracks.length) {\n    return decodedTracks;\n  }\n\n  tracks.forEach(function (track) {\n    var trackType = findEbml(track, EBML_TAGS.TrackType)[0];\n\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\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\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\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\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\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\n  var clusters = findEbml(segment, [EBML_TAGS.Cluster]);\n\n  if (!tracks) {\n    tracks = parseTracks(segment);\n  }\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\n    if (timestamp && timestamp.length) {\n      timestamp = bytesToNumber(timestamp);\n    } // get all blocks then sort them into the correct order\n\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\n    i++;\n  } // If no Emulation Prevention Bytes were found just return the original\n  // array\n\n\n  if (positions.length === 0) {\n    return bytes;\n  } // Create a new array to hold the NAL unit data\n\n\n  var newLength = bytes.length - positions.length;\n  var newData = new Uint8Array(newLength);\n  var sourceIndex = 0;\n\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\n    newData[i] = bytes[sourceIndex];\n  }\n\n  return newData;\n};\nexport var findNal = function findNal(bytes, dataType, types, nalLimit) {\n  if (nalLimit === void 0) {\n    nalLimit = Infinity;\n  }\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\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\n    if (!nalOffset) {\n      i++;\n      continue;\n    }\n\n    nalsFound++;\n\n    if (nalStart) {\n      return discardEmulationPreventionBytes(bytes.subarray(nalStart, i));\n    }\n\n    var nalType = void 0;\n\n    if (dataType === 'h264') {\n      nalType = bytes[i + nalOffset] & 0x1f;\n    } else if (dataType === 'h265') {\n      nalType = bytes[i + nalOffset] >> 1 & 0x3f;\n    }\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\n    i += nalOffset + (dataType === 'h264' ? 1 : 2);\n  }\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\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\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\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\n      i += 1;\n    }\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\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\n  for (var i = 0; i < isLikelyTypes.length; i++) {\n    var type = isLikelyTypes[i];\n\n    if (isLikely[type](bytes)) {\n      return type;\n    }\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};", "import { Controller } from \"@hotwired/stimulus\"\nimport { get } from \"@rails/request.js\"\nimport videojs from \"video.js\"\nimport \"@videojs/http-streaming\"\nimport hlsQualitySelector from \"jb-videojs-hls-quality-selector\"\n\nvideojs.registerPlugin(\"hlsQualitySelector\", hlsQualitySelector)\n\nexport default class extends Controller {\n  static targets = [\"player\"]\n  static outlets = [\"vimeo-player\"]\n  static values = {\n    vimeoId: String,\n    thumbnailUrl: String,\n    autoplay: Boolean,\n    nextChapterUrl: String,\n  }\n\n  connect() {\n    this.setupPlayer()\n    this.setupEventHandlers()\n    this.fetchAndLoadVideoData()\n\n    if (this.autoplayValue) {\n      this.play()\n    }\n  }\n\n  setupPlayer() {\n    this.player = videojs(this.playerTarget, {\n      controls: true,\n      fluid: true,\n      playbackRates: [0.5, 0.75, 1, 1.25, 1.5, 2],\n      poster: this.thumbnailUrlValue,\n      html5: {\n        vhs: { overrideNative: true },\n        nativeVideoTracks: false,\n        nativeAudioTracks: false,\n        nativeTextTracks: false,\n      },\n    })\n\n    this.player.ready(() => {\n      if (videojs.getPlugin(\"hlsQualitySelector\")) {\n        this.player.hlsQualitySelector({ displayCurrentQuality: true })\n      } else {\n        console.error(\"HLS Quality Selector plugin is not available.\")\n      }\n    })\n\n    this.player.on(\"canplay\", () => {\n      this.restorePlaybackRate()\n      this.restoreVolume()\n      this.selectStoredTextTrack()\n    })\n  }\n\n  setupEventHandlers() {\n    this.player.on(\"ended\", this.handleVideoEnded.bind(this))\n    this.player.on(\"ratechange\", this.storePlaybackRate.bind(this))\n    this.player.on(\"volumechange\", this.storeVolumeSettings.bind(this))\n    this.player.audioTracks().addEventListener(\"change\", this.storeAudioTrack.bind(this))\n    this.player.textTracks().addEventListener(\"change\", this.storeTextTrack.bind(this))\n  }\n\n  async fetchAndLoadVideoData() {\n    try {\n      const response = await fetch(`/api/v1/videos/${this.vimeoIdValue}`)\n      if (!response.ok) throw new Error(`HTTP error! status: ${response.status}`)\n\n      const data = await response.json()\n      this.loadVideoDataIntoPlayer(data)\n\n      this.player.one(\"loadedmetadata\", () => {\n        this.selectAudioTrack(data)\n      })\n\n      this.removeVimeoPlayer()\n    } catch (error) {\n      console.error(\"Error fetching video data:\", error)\n      this.showVimeoPlayerFallback()\n    }\n  }\n\n  loadVideoDataIntoPlayer(data) {\n    this.player.src({ type: \"application/x-mpegURL\", src: data.hls_playlist_url })\n    this.player.load()\n  }\n\n  selectAudioTrack(data) {\n    const audioTracks = this.player.audioTracks()\n    const storedLanguage = localStorage.getItem(\"audioTrackLanguage\")\n    const languageToSelect = storedLanguage || data.language_code\n\n    let trackFound = false\n\n    if (languageToSelect) {\n      Array.from(audioTracks).forEach((track) => {\n        track.enabled = track.language === languageToSelect\n        if (track.enabled) trackFound = true\n      })\n    }\n\n    if (!trackFound && audioTracks.length > 0) {\n      audioTracks[audioTracks.length - 1].enabled = true\n    }\n  }\n\n  removeVimeoPlayer() {\n    this.vimeoPlayerOutletElement.remove()\n  }\n\n  showVimeoPlayerFallback() {\n    this.vimeoPlayerOutletElement.classList.remove(\"hidden\")\n    this.element.remove()\n  }\n\n  async handleVideoEnded() {\n    if (!this.nextChapterUrlValue || !this.autoplayValue) return\n\n    try {\n      const response = await get(this.nextChapterUrlValue, { responseKind: \"turbo-stream\" })\n      if (!response.ok) {\n        throw new Error(`HTTP error! status: ${response.status}`)\n      }\n    } catch (error) {\n      console.error(\"Error loading next chapter:\", error)\n    }\n  }\n\n  storePlaybackRate() {\n    localStorage.setItem(\"playbackRate\", this.player.playbackRate())\n  }\n\n  restorePlaybackRate() {\n    const playbackRate = parseFloat(localStorage.getItem(\"playbackRate\"))\n    if (!isNaN(playbackRate)) {\n      this.player.playbackRate(playbackRate)\n    }\n  }\n\n  storeVolumeSettings() {\n    localStorage.setItem(\"volume\", this.player.volume())\n    localStorage.setItem(\"muted\", this.player.muted())\n  }\n\n  restoreVolume() {\n    const volume = parseFloat(localStorage.getItem(\"volume\"))\n    if (!isNaN(volume)) {\n      this.player.volume(volume)\n    }\n    const muted = localStorage.getItem(\"muted\")\n    if (muted !== null) {\n      this.player.muted(muted === \"true\")\n    }\n  }\n\n  storeAudioTrack() {\n    const audioTracks = this.player.audioTracks()\n    const enabledTrack = Array.from(audioTracks).find((track) => track.enabled)\n    if (enabledTrack) {\n      localStorage.setItem(\"audioTrackLanguage\", enabledTrack.language)\n    }\n  }\n\n  storeTextTrack() {\n    const textTracks = this.player.textTracks()\n    const showingTrack = Array.from(textTracks).find((track) => track.mode === \"showing\")\n    if (showingTrack) {\n      localStorage.setItem(\"textTrackLanguage\", showingTrack.language)\n    } else {\n      localStorage.removeItem(\"textTrackLanguage\")\n    }\n  }\n\n  selectStoredTextTrack() {\n    const textTracks = this.player.textTracks()\n    const storedLanguage = localStorage.getItem(\"textTrackLanguage\")\n\n    Array.from(textTracks).forEach((track) => (track.mode = \"disabled\"))\n\n    if (storedLanguage) {\n      const matchingTrack = Array.from(textTracks).find((track) => track.language === storedLanguage)\n      if (matchingTrack) {\n        matchingTrack.mode = \"showing\"\n      }\n    }\n  }\n\n  play() {\n    this.player.play().catch((error) => {\n      switch (error.name) {\n        case \"PasswordError\":\n          console.warn(\"Cannot play password protected video.\")\n          break\n        case \"PrivacyError\":\n          console.warn(\"Cannot play this video due to privacy error.\")\n          break\n        case \"NotAllowedError\":\n          this.handleNotAllowedError()\n          break\n        default:\n          console.warn(\"Error playing video.\", error)\n          break\n      }\n    })\n  }\n\n  handleNotAllowedError() {\n    console.warn(\"Autoplay prevented by browser policy, waiting for user interaction.\")\n    const play = () => {\n      this.play()\n      document.body.removeEventListener(\"click\", play)\n    }\n    document.body.addEventListener(\"click\", play)\n  }\n\n  disconnect() {\n    if (this.player) {\n      this.player.dispose()\n    }\n  }\n}\n", "/*! @vimeo/player v2.17.1 | (c) 2022 Vimeo | MIT License | https://github.com/vimeo/player.js */\nfunction _classCallCheck(instance, Constructor) {\n  if (!(instance instanceof Constructor)) {\n    throw new TypeError(\"Cannot call a class as a function\");\n  }\n}\n\nfunction _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\nfunction _createClass(Constructor, protoProps, staticProps) {\n  if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n  if (staticProps) _defineProperties(Constructor, staticProps);\n  return Constructor;\n}\n\n/**\n * @module lib/functions\n */\n\n/**\n * Check to see this is a node environment.\n * @type {Boolean}\n */\n\n/* global global */\nvar isNode = typeof global !== 'undefined' && {}.toString.call(global) === '[object global]';\n/**\n * Get the name of the method for a given getter or setter.\n *\n * @param {string} prop The name of the property.\n * @param {string} type Either \u201Cget\u201D or \u201Cset\u201D.\n * @return {string}\n */\n\nfunction getMethodName(prop, type) {\n  if (prop.indexOf(type.toLowerCase()) === 0) {\n    return prop;\n  }\n\n  return \"\".concat(type.toLowerCase()).concat(prop.substr(0, 1).toUpperCase()).concat(prop.substr(1));\n}\n/**\n * Check to see if the object is a DOM Element.\n *\n * @param {*} element The object to check.\n * @return {boolean}\n */\n\nfunction isDomElement(element) {\n  return Boolean(element && element.nodeType === 1 && 'nodeName' in element && element.ownerDocument && element.ownerDocument.defaultView);\n}\n/**\n * Check to see whether the value is a number.\n *\n * @see http://dl.dropboxusercontent.com/u/35146/js/tests/isNumber.html\n * @param {*} value The value to check.\n * @param {boolean} integer Check if the value is an integer.\n * @return {boolean}\n */\n\nfunction isInteger(value) {\n  // eslint-disable-next-line eqeqeq\n  return !isNaN(parseFloat(value)) && isFinite(value) && Math.floor(value) == value;\n}\n/**\n * Check to see if the URL is a Vimeo url.\n *\n * @param {string} url The url string.\n * @return {boolean}\n */\n\nfunction isVimeoUrl(url) {\n  return /^(https?:)?\\/\\/((player|www)\\.)?vimeo\\.com(?=$|\\/)/.test(url);\n}\n/**\n * Check to see if the URL is for a Vimeo embed.\n *\n * @param {string} url The url string.\n * @return {boolean}\n */\n\nfunction isVimeoEmbed(url) {\n  var expr = /^https:\\/\\/player\\.vimeo\\.com\\/video\\/\\d+/;\n  return expr.test(url);\n}\n/**\n * Get the Vimeo URL from an element.\n * The element must have either a data-vimeo-id or data-vimeo-url attribute.\n *\n * @param {object} oEmbedParameters The oEmbed parameters.\n * @return {string}\n */\n\nfunction getVimeoUrl() {\n  var oEmbedParameters = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  var id = oEmbedParameters.id;\n  var url = oEmbedParameters.url;\n  var idOrUrl = id || url;\n\n  if (!idOrUrl) {\n    throw new Error('An id or url must be passed, either in an options object or as a data-vimeo-id or data-vimeo-url attribute.');\n  }\n\n  if (isInteger(idOrUrl)) {\n    return \"https://vimeo.com/\".concat(idOrUrl);\n  }\n\n  if (isVimeoUrl(idOrUrl)) {\n    return idOrUrl.replace('http:', 'https:');\n  }\n\n  if (id) {\n    throw new TypeError(\"\\u201C\".concat(id, \"\\u201D is not a valid video id.\"));\n  }\n\n  throw new TypeError(\"\\u201C\".concat(idOrUrl, \"\\u201D is not a vimeo.com url.\"));\n}\n\nvar arrayIndexOfSupport = typeof Array.prototype.indexOf !== 'undefined';\nvar postMessageSupport = typeof window !== 'undefined' && typeof window.postMessage !== 'undefined';\n\nif (!isNode && (!arrayIndexOfSupport || !postMessageSupport)) {\n  throw new Error('Sorry, the Vimeo Player API is not available in this browser.');\n}\n\nvar commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nfunction createCommonjsModule(fn, module) {\n\treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n}\n\n/*!\n * weakmap-polyfill v2.0.4 - ECMAScript6 WeakMap polyfill\n * https://github.com/polygonplanet/weakmap-polyfill\n * Copyright (c) 2015-2021 polygonplanet <polygon.planet.aqua@gmail.com>\n * @license MIT\n */\n(function (self) {\n\n  if (self.WeakMap) {\n    return;\n  }\n\n  var hasOwnProperty = Object.prototype.hasOwnProperty;\n\n  var hasDefine = Object.defineProperty && function () {\n    try {\n      // Avoid IE8's broken Object.defineProperty\n      return Object.defineProperty({}, 'x', {\n        value: 1\n      }).x === 1;\n    } catch (e) {}\n  }();\n\n  var defineProperty = function (object, name, value) {\n    if (hasDefine) {\n      Object.defineProperty(object, name, {\n        configurable: true,\n        writable: true,\n        value: value\n      });\n    } else {\n      object[name] = value;\n    }\n  };\n\n  self.WeakMap = function () {\n    // ECMA-262 23.3 WeakMap Objects\n    function WeakMap() {\n      if (this === void 0) {\n        throw new TypeError(\"Constructor WeakMap requires 'new'\");\n      }\n\n      defineProperty(this, '_id', genId('_WeakMap')); // ECMA-262 23.3.1.1 WeakMap([iterable])\n\n      if (arguments.length > 0) {\n        // Currently, WeakMap `iterable` argument is not supported\n        throw new TypeError('WeakMap iterable is not supported');\n      }\n    } // ECMA-262 23.3.3.2 WeakMap.prototype.delete(key)\n\n\n    defineProperty(WeakMap.prototype, 'delete', function (key) {\n      checkInstance(this, 'delete');\n\n      if (!isObject(key)) {\n        return false;\n      }\n\n      var entry = key[this._id];\n\n      if (entry && entry[0] === key) {\n        delete key[this._id];\n        return true;\n      }\n\n      return false;\n    }); // ECMA-262 23.3.3.3 WeakMap.prototype.get(key)\n\n    defineProperty(WeakMap.prototype, 'get', function (key) {\n      checkInstance(this, 'get');\n\n      if (!isObject(key)) {\n        return void 0;\n      }\n\n      var entry = key[this._id];\n\n      if (entry && entry[0] === key) {\n        return entry[1];\n      }\n\n      return void 0;\n    }); // ECMA-262 23.3.3.4 WeakMap.prototype.has(key)\n\n    defineProperty(WeakMap.prototype, 'has', function (key) {\n      checkInstance(this, 'has');\n\n      if (!isObject(key)) {\n        return false;\n      }\n\n      var entry = key[this._id];\n\n      if (entry && entry[0] === key) {\n        return true;\n      }\n\n      return false;\n    }); // ECMA-262 23.3.3.5 WeakMap.prototype.set(key, value)\n\n    defineProperty(WeakMap.prototype, 'set', function (key, value) {\n      checkInstance(this, 'set');\n\n      if (!isObject(key)) {\n        throw new TypeError('Invalid value used as weak map key');\n      }\n\n      var entry = key[this._id];\n\n      if (entry && entry[0] === key) {\n        entry[1] = value;\n        return this;\n      }\n\n      defineProperty(key, this._id, [key, value]);\n      return this;\n    });\n\n    function checkInstance(x, methodName) {\n      if (!isObject(x) || !hasOwnProperty.call(x, '_id')) {\n        throw new TypeError(methodName + ' method called on incompatible receiver ' + typeof x);\n      }\n    }\n\n    function genId(prefix) {\n      return prefix + '_' + rand() + '.' + rand();\n    }\n\n    function rand() {\n      return Math.random().toString().substring(2);\n    }\n\n    defineProperty(WeakMap, '_polyfill', true);\n    return WeakMap;\n  }();\n\n  function isObject(x) {\n    return Object(x) === x;\n  }\n})(typeof globalThis !== 'undefined' ? globalThis : typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : typeof commonjsGlobal !== 'undefined' ? commonjsGlobal : commonjsGlobal);\n\nvar npo_src = createCommonjsModule(function (module) {\n/*! Native Promise Only\n    v0.8.1 (c) Kyle Simpson\n    MIT License: http://getify.mit-license.org\n*/\n(function UMD(name, context, definition) {\n  // special form of UMD for polyfilling across evironments\n  context[name] = context[name] || definition();\n\n  if ( module.exports) {\n    module.exports = context[name];\n  }\n})(\"Promise\", typeof commonjsGlobal != \"undefined\" ? commonjsGlobal : commonjsGlobal, function DEF() {\n\n  var builtInProp,\n      cycle,\n      scheduling_queue,\n      ToString = Object.prototype.toString,\n      timer = typeof setImmediate != \"undefined\" ? function timer(fn) {\n    return setImmediate(fn);\n  } : setTimeout; // dammit, IE8.\n\n  try {\n    Object.defineProperty({}, \"x\", {});\n\n    builtInProp = function builtInProp(obj, name, val, config) {\n      return Object.defineProperty(obj, name, {\n        value: val,\n        writable: true,\n        configurable: config !== false\n      });\n    };\n  } catch (err) {\n    builtInProp = function builtInProp(obj, name, val) {\n      obj[name] = val;\n      return obj;\n    };\n  } // Note: using a queue instead of array for efficiency\n\n\n  scheduling_queue = function Queue() {\n    var first, last, item;\n\n    function Item(fn, self) {\n      this.fn = fn;\n      this.self = self;\n      this.next = void 0;\n    }\n\n    return {\n      add: function add(fn, self) {\n        item = new Item(fn, self);\n\n        if (last) {\n          last.next = item;\n        } else {\n          first = item;\n        }\n\n        last = item;\n        item = void 0;\n      },\n      drain: function drain() {\n        var f = first;\n        first = last = cycle = void 0;\n\n        while (f) {\n          f.fn.call(f.self);\n          f = f.next;\n        }\n      }\n    };\n  }();\n\n  function schedule(fn, self) {\n    scheduling_queue.add(fn, self);\n\n    if (!cycle) {\n      cycle = timer(scheduling_queue.drain);\n    }\n  } // promise duck typing\n\n\n  function isThenable(o) {\n    var _then,\n        o_type = typeof o;\n\n    if (o != null && (o_type == \"object\" || o_type == \"function\")) {\n      _then = o.then;\n    }\n\n    return typeof _then == \"function\" ? _then : false;\n  }\n\n  function notify() {\n    for (var i = 0; i < this.chain.length; i++) {\n      notifyIsolated(this, this.state === 1 ? this.chain[i].success : this.chain[i].failure, this.chain[i]);\n    }\n\n    this.chain.length = 0;\n  } // NOTE: This is a separate function to isolate\n  // the `try..catch` so that other code can be\n  // optimized better\n\n\n  function notifyIsolated(self, cb, chain) {\n    var ret, _then;\n\n    try {\n      if (cb === false) {\n        chain.reject(self.msg);\n      } else {\n        if (cb === true) {\n          ret = self.msg;\n        } else {\n          ret = cb.call(void 0, self.msg);\n        }\n\n        if (ret === chain.promise) {\n          chain.reject(TypeError(\"Promise-chain cycle\"));\n        } else if (_then = isThenable(ret)) {\n          _then.call(ret, chain.resolve, chain.reject);\n        } else {\n          chain.resolve(ret);\n        }\n      }\n    } catch (err) {\n      chain.reject(err);\n    }\n  }\n\n  function resolve(msg) {\n    var _then,\n        self = this; // already triggered?\n\n\n    if (self.triggered) {\n      return;\n    }\n\n    self.triggered = true; // unwrap\n\n    if (self.def) {\n      self = self.def;\n    }\n\n    try {\n      if (_then = isThenable(msg)) {\n        schedule(function () {\n          var def_wrapper = new MakeDefWrapper(self);\n\n          try {\n            _then.call(msg, function $resolve$() {\n              resolve.apply(def_wrapper, arguments);\n            }, function $reject$() {\n              reject.apply(def_wrapper, arguments);\n            });\n          } catch (err) {\n            reject.call(def_wrapper, err);\n          }\n        });\n      } else {\n        self.msg = msg;\n        self.state = 1;\n\n        if (self.chain.length > 0) {\n          schedule(notify, self);\n        }\n      }\n    } catch (err) {\n      reject.call(new MakeDefWrapper(self), err);\n    }\n  }\n\n  function reject(msg) {\n    var self = this; // already triggered?\n\n    if (self.triggered) {\n      return;\n    }\n\n    self.triggered = true; // unwrap\n\n    if (self.def) {\n      self = self.def;\n    }\n\n    self.msg = msg;\n    self.state = 2;\n\n    if (self.chain.length > 0) {\n      schedule(notify, self);\n    }\n  }\n\n  function iteratePromises(Constructor, arr, resolver, rejecter) {\n    for (var idx = 0; idx < arr.length; idx++) {\n      (function IIFE(idx) {\n        Constructor.resolve(arr[idx]).then(function $resolver$(msg) {\n          resolver(idx, msg);\n        }, rejecter);\n      })(idx);\n    }\n  }\n\n  function MakeDefWrapper(self) {\n    this.def = self;\n    this.triggered = false;\n  }\n\n  function MakeDef(self) {\n    this.promise = self;\n    this.state = 0;\n    this.triggered = false;\n    this.chain = [];\n    this.msg = void 0;\n  }\n\n  function Promise(executor) {\n    if (typeof executor != \"function\") {\n      throw TypeError(\"Not a function\");\n    }\n\n    if (this.__NPO__ !== 0) {\n      throw TypeError(\"Not a promise\");\n    } // instance shadowing the inherited \"brand\"\n    // to signal an already \"initialized\" promise\n\n\n    this.__NPO__ = 1;\n    var def = new MakeDef(this);\n\n    this[\"then\"] = function then(success, failure) {\n      var o = {\n        success: typeof success == \"function\" ? success : true,\n        failure: typeof failure == \"function\" ? failure : false\n      }; // Note: `then(..)` itself can be borrowed to be used against\n      // a different promise constructor for making the chained promise,\n      // by substituting a different `this` binding.\n\n      o.promise = new this.constructor(function extractChain(resolve, reject) {\n        if (typeof resolve != \"function\" || typeof reject != \"function\") {\n          throw TypeError(\"Not a function\");\n        }\n\n        o.resolve = resolve;\n        o.reject = reject;\n      });\n      def.chain.push(o);\n\n      if (def.state !== 0) {\n        schedule(notify, def);\n      }\n\n      return o.promise;\n    };\n\n    this[\"catch\"] = function $catch$(failure) {\n      return this.then(void 0, failure);\n    };\n\n    try {\n      executor.call(void 0, function publicResolve(msg) {\n        resolve.call(def, msg);\n      }, function publicReject(msg) {\n        reject.call(def, msg);\n      });\n    } catch (err) {\n      reject.call(def, err);\n    }\n  }\n\n  var PromisePrototype = builtInProp({}, \"constructor\", Promise,\n  /*configurable=*/\n  false); // Note: Android 4 cannot use `Object.defineProperty(..)` here\n\n  Promise.prototype = PromisePrototype; // built-in \"brand\" to signal an \"uninitialized\" promise\n\n  builtInProp(PromisePrototype, \"__NPO__\", 0,\n  /*configurable=*/\n  false);\n  builtInProp(Promise, \"resolve\", function Promise$resolve(msg) {\n    var Constructor = this; // spec mandated checks\n    // note: best \"isPromise\" check that's practical for now\n\n    if (msg && typeof msg == \"object\" && msg.__NPO__ === 1) {\n      return msg;\n    }\n\n    return new Constructor(function executor(resolve, reject) {\n      if (typeof resolve != \"function\" || typeof reject != \"function\") {\n        throw TypeError(\"Not a function\");\n      }\n\n      resolve(msg);\n    });\n  });\n  builtInProp(Promise, \"reject\", function Promise$reject(msg) {\n    return new this(function executor(resolve, reject) {\n      if (typeof resolve != \"function\" || typeof reject != \"function\") {\n        throw TypeError(\"Not a function\");\n      }\n\n      reject(msg);\n    });\n  });\n  builtInProp(Promise, \"all\", function Promise$all(arr) {\n    var Constructor = this; // spec mandated checks\n\n    if (ToString.call(arr) != \"[object Array]\") {\n      return Constructor.reject(TypeError(\"Not an array\"));\n    }\n\n    if (arr.length === 0) {\n      return Constructor.resolve([]);\n    }\n\n    return new Constructor(function executor(resolve, reject) {\n      if (typeof resolve != \"function\" || typeof reject != \"function\") {\n        throw TypeError(\"Not a function\");\n      }\n\n      var len = arr.length,\n          msgs = Array(len),\n          count = 0;\n      iteratePromises(Constructor, arr, function resolver(idx, msg) {\n        msgs[idx] = msg;\n\n        if (++count === len) {\n          resolve(msgs);\n        }\n      }, reject);\n    });\n  });\n  builtInProp(Promise, \"race\", function Promise$race(arr) {\n    var Constructor = this; // spec mandated checks\n\n    if (ToString.call(arr) != \"[object Array]\") {\n      return Constructor.reject(TypeError(\"Not an array\"));\n    }\n\n    return new Constructor(function executor(resolve, reject) {\n      if (typeof resolve != \"function\" || typeof reject != \"function\") {\n        throw TypeError(\"Not a function\");\n      }\n\n      iteratePromises(Constructor, arr, function resolver(idx, msg) {\n        resolve(msg);\n      }, reject);\n    });\n  });\n  return Promise;\n});\n});\n\n/**\n * @module lib/callbacks\n */\nvar callbackMap = new WeakMap();\n/**\n * Store a callback for a method or event for a player.\n *\n * @param {Player} player The player object.\n * @param {string} name The method or event name.\n * @param {(function(this:Player, *): void|{resolve: function, reject: function})} callback\n *        The callback to call or an object with resolve and reject functions for a promise.\n * @return {void}\n */\n\nfunction storeCallback(player, name, callback) {\n  var playerCallbacks = callbackMap.get(player.element) || {};\n\n  if (!(name in playerCallbacks)) {\n    playerCallbacks[name] = [];\n  }\n\n  playerCallbacks[name].push(callback);\n  callbackMap.set(player.element, playerCallbacks);\n}\n/**\n * Get the callbacks for a player and event or method.\n *\n * @param {Player} player The player object.\n * @param {string} name The method or event name\n * @return {function[]}\n */\n\nfunction getCallbacks(player, name) {\n  var playerCallbacks = callbackMap.get(player.element) || {};\n  return playerCallbacks[name] || [];\n}\n/**\n * Remove a stored callback for a method or event for a player.\n *\n * @param {Player} player The player object.\n * @param {string} name The method or event name\n * @param {function} [callback] The specific callback to remove.\n * @return {boolean} Was this the last callback?\n */\n\nfunction removeCallback(player, name, callback) {\n  var playerCallbacks = callbackMap.get(player.element) || {};\n\n  if (!playerCallbacks[name]) {\n    return true;\n  } // If no callback is passed, remove all callbacks for the event\n\n\n  if (!callback) {\n    playerCallbacks[name] = [];\n    callbackMap.set(player.element, playerCallbacks);\n    return true;\n  }\n\n  var index = playerCallbacks[name].indexOf(callback);\n\n  if (index !== -1) {\n    playerCallbacks[name].splice(index, 1);\n  }\n\n  callbackMap.set(player.element, playerCallbacks);\n  return playerCallbacks[name] && playerCallbacks[name].length === 0;\n}\n/**\n * Return the first stored callback for a player and event or method.\n *\n * @param {Player} player The player object.\n * @param {string} name The method or event name.\n * @return {function} The callback, or false if there were none\n */\n\nfunction shiftCallbacks(player, name) {\n  var playerCallbacks = getCallbacks(player, name);\n\n  if (playerCallbacks.length < 1) {\n    return false;\n  }\n\n  var callback = playerCallbacks.shift();\n  removeCallback(player, name, callback);\n  return callback;\n}\n/**\n * Move callbacks associated with an element to another element.\n *\n * @param {HTMLElement} oldElement The old element.\n * @param {HTMLElement} newElement The new element.\n * @return {void}\n */\n\nfunction swapCallbacks(oldElement, newElement) {\n  var playerCallbacks = callbackMap.get(oldElement);\n  callbackMap.set(newElement, playerCallbacks);\n  callbackMap.delete(oldElement);\n}\n\n/**\n * @module lib/postmessage\n */\n/**\n * Parse a message received from postMessage.\n *\n * @param {*} data The data received from postMessage.\n * @return {object}\n */\n\nfunction parseMessageData(data) {\n  if (typeof data === 'string') {\n    try {\n      data = JSON.parse(data);\n    } catch (error) {\n      // If the message cannot be parsed, throw the error as a warning\n      console.warn(error);\n      return {};\n    }\n  }\n\n  return data;\n}\n/**\n * Post a message to the specified target.\n *\n * @param {Player} player The player object to use.\n * @param {string} method The API method to call.\n * @param {object} params The parameters to send to the player.\n * @return {void}\n */\n\nfunction postMessage(player, method, params) {\n  if (!player.element.contentWindow || !player.element.contentWindow.postMessage) {\n    return;\n  }\n\n  var message = {\n    method: method\n  };\n\n  if (params !== undefined) {\n    message.value = params;\n  } // IE 8 and 9 do not support passing messages, so stringify them\n\n\n  var ieVersion = parseFloat(navigator.userAgent.toLowerCase().replace(/^.*msie (\\d+).*$/, '$1'));\n\n  if (ieVersion >= 8 && ieVersion < 10) {\n    message = JSON.stringify(message);\n  }\n\n  player.element.contentWindow.postMessage(message, player.origin);\n}\n/**\n * Parse the data received from a message event.\n *\n * @param {Player} player The player that received the message.\n * @param {(Object|string)} data The message data. Strings will be parsed into JSON.\n * @return {void}\n */\n\nfunction processData(player, data) {\n  data = parseMessageData(data);\n  var callbacks = [];\n  var param;\n\n  if (data.event) {\n    if (data.event === 'error') {\n      var promises = getCallbacks(player, data.data.method);\n      promises.forEach(function (promise) {\n        var error = new Error(data.data.message);\n        error.name = data.data.name;\n        promise.reject(error);\n        removeCallback(player, data.data.method, promise);\n      });\n    }\n\n    callbacks = getCallbacks(player, \"event:\".concat(data.event));\n    param = data.data;\n  } else if (data.method) {\n    var callback = shiftCallbacks(player, data.method);\n\n    if (callback) {\n      callbacks.push(callback);\n      param = data.value;\n    }\n  }\n\n  callbacks.forEach(function (callback) {\n    try {\n      if (typeof callback === 'function') {\n        callback.call(player, param);\n        return;\n      }\n\n      callback.resolve(param);\n    } catch (e) {// empty\n    }\n  });\n}\n\n/**\n * @module lib/embed\n */\nvar oEmbedParameters = ['autopause', 'autoplay', 'background', 'byline', 'color', 'controls', 'dnt', 'height', 'id', 'interactive_params', 'keyboard', 'loop', 'maxheight', 'maxwidth', 'muted', 'playsinline', 'portrait', 'responsive', 'speed', 'texttrack', 'title', 'transparent', 'url', 'width'];\n/**\n * Get the 'data-vimeo'-prefixed attributes from an element as an object.\n *\n * @param {HTMLElement} element The element.\n * @param {Object} [defaults={}] The default values to use.\n * @return {Object<string, string>}\n */\n\nfunction getOEmbedParameters(element) {\n  var defaults = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  return oEmbedParameters.reduce(function (params, param) {\n    var value = element.getAttribute(\"data-vimeo-\".concat(param));\n\n    if (value || value === '') {\n      params[param] = value === '' ? 1 : value;\n    }\n\n    return params;\n  }, defaults);\n}\n/**\n * Create an embed from oEmbed data inside an element.\n *\n * @param {object} data The oEmbed data.\n * @param {HTMLElement} element The element to put the iframe in.\n * @return {HTMLIFrameElement} The iframe embed.\n */\n\nfunction createEmbed(_ref, element) {\n  var html = _ref.html;\n\n  if (!element) {\n    throw new TypeError('An element must be provided');\n  }\n\n  if (element.getAttribute('data-vimeo-initialized') !== null) {\n    return element.querySelector('iframe');\n  }\n\n  var div = document.createElement('div');\n  div.innerHTML = html;\n  element.appendChild(div.firstChild);\n  element.setAttribute('data-vimeo-initialized', 'true');\n  return element.querySelector('iframe');\n}\n/**\n * Make an oEmbed call for the specified URL.\n *\n * @param {string} videoUrl The vimeo.com url for the video.\n * @param {Object} [params] Parameters to pass to oEmbed.\n * @param {HTMLElement} element The element.\n * @return {Promise}\n */\n\nfunction getOEmbedData(videoUrl) {\n  var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  var element = arguments.length > 2 ? arguments[2] : undefined;\n  return new Promise(function (resolve, reject) {\n    if (!isVimeoUrl(videoUrl)) {\n      throw new TypeError(\"\\u201C\".concat(videoUrl, \"\\u201D is not a vimeo.com url.\"));\n    }\n\n    var url = \"https://vimeo.com/api/oembed.json?url=\".concat(encodeURIComponent(videoUrl));\n\n    for (var param in params) {\n      if (params.hasOwnProperty(param)) {\n        url += \"&\".concat(param, \"=\").concat(encodeURIComponent(params[param]));\n      }\n    }\n\n    var xhr = 'XDomainRequest' in window ? new XDomainRequest() : new XMLHttpRequest();\n    xhr.open('GET', url, true);\n\n    xhr.onload = function () {\n      if (xhr.status === 404) {\n        reject(new Error(\"\\u201C\".concat(videoUrl, \"\\u201D was not found.\")));\n        return;\n      }\n\n      if (xhr.status === 403) {\n        reject(new Error(\"\\u201C\".concat(videoUrl, \"\\u201D is not embeddable.\")));\n        return;\n      }\n\n      try {\n        var json = JSON.parse(xhr.responseText); // Check api response for 403 on oembed\n\n        if (json.domain_status_code === 403) {\n          // We still want to create the embed to give users visual feedback\n          createEmbed(json, element);\n          reject(new Error(\"\\u201C\".concat(videoUrl, \"\\u201D is not embeddable.\")));\n          return;\n        }\n\n        resolve(json);\n      } catch (error) {\n        reject(error);\n      }\n    };\n\n    xhr.onerror = function () {\n      var status = xhr.status ? \" (\".concat(xhr.status, \")\") : '';\n      reject(new Error(\"There was an error fetching the embed code from Vimeo\".concat(status, \".\")));\n    };\n\n    xhr.send();\n  });\n}\n/**\n * Initialize all embeds within a specific element\n *\n * @param {HTMLElement} [parent=document] The parent element.\n * @return {void}\n */\n\nfunction initializeEmbeds() {\n  var parent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document;\n  var elements = [].slice.call(parent.querySelectorAll('[data-vimeo-id], [data-vimeo-url]'));\n\n  var handleError = function handleError(error) {\n    if ('console' in window && console.error) {\n      console.error(\"There was an error creating an embed: \".concat(error));\n    }\n  };\n\n  elements.forEach(function (element) {\n    try {\n      // Skip any that have data-vimeo-defer\n      if (element.getAttribute('data-vimeo-defer') !== null) {\n        return;\n      }\n\n      var params = getOEmbedParameters(element);\n      var url = getVimeoUrl(params);\n      getOEmbedData(url, params, element).then(function (data) {\n        return createEmbed(data, element);\n      }).catch(handleError);\n    } catch (error) {\n      handleError(error);\n    }\n  });\n}\n/**\n * Resize embeds when messaged by the player.\n *\n * @param {HTMLElement} [parent=document] The parent element.\n * @return {void}\n */\n\nfunction resizeEmbeds() {\n  var parent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document;\n\n  // Prevent execution if users include the player.js script multiple times.\n  if (window.VimeoPlayerResizeEmbeds_) {\n    return;\n  }\n\n  window.VimeoPlayerResizeEmbeds_ = true;\n\n  var onMessage = function onMessage(event) {\n    if (!isVimeoUrl(event.origin)) {\n      return;\n    } // 'spacechange' is fired only on embeds with cards\n\n\n    if (!event.data || event.data.event !== 'spacechange') {\n      return;\n    }\n\n    var iframes = parent.querySelectorAll('iframe');\n\n    for (var i = 0; i < iframes.length; i++) {\n      if (iframes[i].contentWindow !== event.source) {\n        continue;\n      } // Change padding-bottom of the enclosing div to accommodate\n      // card carousel without distorting aspect ratio\n\n\n      var space = iframes[i].parentElement;\n      space.style.paddingBottom = \"\".concat(event.data.data[0].bottom, \"px\");\n      break;\n    }\n  };\n\n  window.addEventListener('message', onMessage);\n}\n/**\n * Add chapters to existing metadata for Google SEO\n *\n * @param {HTMLElement} [parent=document] The parent element.\n * @return {void}\n */\n\nfunction initAppendVideoMetadata() {\n  var parent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document;\n\n  //  Prevent execution if users include the player.js script multiple times.\n  if (window.VimeoSeoMetadataAppended) {\n    return;\n  }\n\n  window.VimeoSeoMetadataAppended = true;\n\n  var onMessage = function onMessage(event) {\n    if (!isVimeoUrl(event.origin)) {\n      return;\n    }\n\n    var data = parseMessageData(event.data);\n\n    if (!data || data.event !== 'ready') {\n      return;\n    }\n\n    var iframes = parent.querySelectorAll('iframe');\n\n    for (var i = 0; i < iframes.length; i++) {\n      var iframe = iframes[i]; // Initiate appendVideoMetadata if iframe is a Vimeo embed\n\n      var isValidMessageSource = iframe.contentWindow === event.source;\n\n      if (isVimeoEmbed(iframe.src) && isValidMessageSource) {\n        var player = new Player(iframe);\n        player.callMethod('appendVideoMetadata', window.location.href);\n      }\n    }\n  };\n\n  window.addEventListener('message', onMessage);\n}\n\n/* MIT License\n\nCopyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\nTerms */\nfunction initializeScreenfull() {\n  var fn = function () {\n    var val;\n    var fnMap = [['requestFullscreen', 'exitFullscreen', 'fullscreenElement', 'fullscreenEnabled', 'fullscreenchange', 'fullscreenerror'], // New WebKit\n    ['webkitRequestFullscreen', 'webkitExitFullscreen', 'webkitFullscreenElement', 'webkitFullscreenEnabled', 'webkitfullscreenchange', 'webkitfullscreenerror'], // Old WebKit\n    ['webkitRequestFullScreen', 'webkitCancelFullScreen', 'webkitCurrentFullScreenElement', 'webkitCancelFullScreen', 'webkitfullscreenchange', 'webkitfullscreenerror'], ['mozRequestFullScreen', 'mozCancelFullScreen', 'mozFullScreenElement', 'mozFullScreenEnabled', 'mozfullscreenchange', 'mozfullscreenerror'], ['msRequestFullscreen', 'msExitFullscreen', 'msFullscreenElement', 'msFullscreenEnabled', 'MSFullscreenChange', 'MSFullscreenError']];\n    var i = 0;\n    var l = fnMap.length;\n    var ret = {};\n\n    for (; i < l; i++) {\n      val = fnMap[i];\n\n      if (val && val[1] in document) {\n        for (i = 0; i < val.length; i++) {\n          ret[fnMap[0][i]] = val[i];\n        }\n\n        return ret;\n      }\n    }\n\n    return false;\n  }();\n\n  var eventNameMap = {\n    fullscreenchange: fn.fullscreenchange,\n    fullscreenerror: fn.fullscreenerror\n  };\n  var screenfull = {\n    request: function request(element) {\n      return new Promise(function (resolve, reject) {\n        var onFullScreenEntered = function onFullScreenEntered() {\n          screenfull.off('fullscreenchange', onFullScreenEntered);\n          resolve();\n        };\n\n        screenfull.on('fullscreenchange', onFullScreenEntered);\n        element = element || document.documentElement;\n        var returnPromise = element[fn.requestFullscreen]();\n\n        if (returnPromise instanceof Promise) {\n          returnPromise.then(onFullScreenEntered).catch(reject);\n        }\n      });\n    },\n    exit: function exit() {\n      return new Promise(function (resolve, reject) {\n        if (!screenfull.isFullscreen) {\n          resolve();\n          return;\n        }\n\n        var onFullScreenExit = function onFullScreenExit() {\n          screenfull.off('fullscreenchange', onFullScreenExit);\n          resolve();\n        };\n\n        screenfull.on('fullscreenchange', onFullScreenExit);\n        var returnPromise = document[fn.exitFullscreen]();\n\n        if (returnPromise instanceof Promise) {\n          returnPromise.then(onFullScreenExit).catch(reject);\n        }\n      });\n    },\n    on: function on(event, callback) {\n      var eventName = eventNameMap[event];\n\n      if (eventName) {\n        document.addEventListener(eventName, callback);\n      }\n    },\n    off: function off(event, callback) {\n      var eventName = eventNameMap[event];\n\n      if (eventName) {\n        document.removeEventListener(eventName, callback);\n      }\n    }\n  };\n  Object.defineProperties(screenfull, {\n    isFullscreen: {\n      get: function get() {\n        return Boolean(document[fn.fullscreenElement]);\n      }\n    },\n    element: {\n      enumerable: true,\n      get: function get() {\n        return document[fn.fullscreenElement];\n      }\n    },\n    isEnabled: {\n      enumerable: true,\n      get: function get() {\n        // Coerce to boolean in case of old WebKit\n        return Boolean(document[fn.fullscreenEnabled]);\n      }\n    }\n  });\n  return screenfull;\n}\n\nvar playerMap = new WeakMap();\nvar readyMap = new WeakMap();\nvar screenfull = {};\n\nvar Player = /*#__PURE__*/function () {\n  /**\n   * Create a Player.\n   *\n   * @param {(HTMLIFrameElement|HTMLElement|string|jQuery)} element A reference to the Vimeo\n   *        player iframe, and id, or a jQuery object.\n   * @param {object} [options] oEmbed parameters to use when creating an embed in the element.\n   * @return {Player}\n   */\n  function Player(element) {\n    var _this = this;\n\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n    _classCallCheck(this, Player);\n\n    /* global jQuery */\n    if (window.jQuery && element instanceof jQuery) {\n      if (element.length > 1 && window.console && console.warn) {\n        console.warn('A jQuery object with multiple elements was passed, using the first element.');\n      }\n\n      element = element[0];\n    } // Find an element by ID\n\n\n    if (typeof document !== 'undefined' && typeof element === 'string') {\n      element = document.getElementById(element);\n    } // Not an element!\n\n\n    if (!isDomElement(element)) {\n      throw new TypeError('You must pass either a valid element or a valid id.');\n    } // Already initialized an embed in this div, so grab the iframe\n\n\n    if (element.nodeName !== 'IFRAME') {\n      var iframe = element.querySelector('iframe');\n\n      if (iframe) {\n        element = iframe;\n      }\n    } // iframe url is not a Vimeo url\n\n\n    if (element.nodeName === 'IFRAME' && !isVimeoUrl(element.getAttribute('src') || '')) {\n      throw new Error('The player element passed isn\u2019t a Vimeo embed.');\n    } // If there is already a player object in the map, return that\n\n\n    if (playerMap.has(element)) {\n      return playerMap.get(element);\n    }\n\n    this._window = element.ownerDocument.defaultView;\n    this.element = element;\n    this.origin = '*';\n    var readyPromise = new npo_src(function (resolve, reject) {\n      _this._onMessage = function (event) {\n        if (!isVimeoUrl(event.origin) || _this.element.contentWindow !== event.source) {\n          return;\n        }\n\n        if (_this.origin === '*') {\n          _this.origin = event.origin;\n        }\n\n        var data = parseMessageData(event.data);\n        var isError = data && data.event === 'error';\n        var isReadyError = isError && data.data && data.data.method === 'ready';\n\n        if (isReadyError) {\n          var error = new Error(data.data.message);\n          error.name = data.data.name;\n          reject(error);\n          return;\n        }\n\n        var isReadyEvent = data && data.event === 'ready';\n        var isPingResponse = data && data.method === 'ping';\n\n        if (isReadyEvent || isPingResponse) {\n          _this.element.setAttribute('data-ready', 'true');\n\n          resolve();\n          return;\n        }\n\n        processData(_this, data);\n      };\n\n      _this._window.addEventListener('message', _this._onMessage);\n\n      if (_this.element.nodeName !== 'IFRAME') {\n        var params = getOEmbedParameters(element, options);\n        var url = getVimeoUrl(params);\n        getOEmbedData(url, params, element).then(function (data) {\n          var iframe = createEmbed(data, element); // Overwrite element with the new iframe,\n          // but store reference to the original element\n\n          _this.element = iframe;\n          _this._originalElement = element;\n          swapCallbacks(element, iframe);\n          playerMap.set(_this.element, _this);\n          return data;\n        }).catch(reject);\n      }\n    }); // Store a copy of this Player in the map\n\n    readyMap.set(this, readyPromise);\n    playerMap.set(this.element, this); // Send a ping to the iframe so the ready promise will be resolved if\n    // the player is already ready.\n\n    if (this.element.nodeName === 'IFRAME') {\n      postMessage(this, 'ping');\n    }\n\n    if (screenfull.isEnabled) {\n      var exitFullscreen = function exitFullscreen() {\n        return screenfull.exit();\n      };\n\n      this.fullscreenchangeHandler = function () {\n        if (screenfull.isFullscreen) {\n          storeCallback(_this, 'event:exitFullscreen', exitFullscreen);\n        } else {\n          removeCallback(_this, 'event:exitFullscreen', exitFullscreen);\n        } // eslint-disable-next-line\n\n\n        _this.ready().then(function () {\n          postMessage(_this, 'fullscreenchange', screenfull.isFullscreen);\n        });\n      };\n\n      screenfull.on('fullscreenchange', this.fullscreenchangeHandler);\n    }\n\n    return this;\n  }\n  /**\n   * Get a promise for a method.\n   *\n   * @param {string} name The API method to call.\n   * @param {Object} [args={}] Arguments to send via postMessage.\n   * @return {Promise}\n   */\n\n\n  _createClass(Player, [{\n    key: \"callMethod\",\n    value: function callMethod(name) {\n      var _this2 = this;\n\n      var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      return new npo_src(function (resolve, reject) {\n        // We are storing the resolve/reject handlers to call later, so we\n        // can\u2019t return here.\n        // eslint-disable-next-line promise/always-return\n        return _this2.ready().then(function () {\n          storeCallback(_this2, name, {\n            resolve: resolve,\n            reject: reject\n          });\n          postMessage(_this2, name, args);\n        }).catch(reject);\n      });\n    }\n    /**\n     * Get a promise for the value of a player property.\n     *\n     * @param {string} name The property name\n     * @return {Promise}\n     */\n\n  }, {\n    key: \"get\",\n    value: function get(name) {\n      var _this3 = this;\n\n      return new npo_src(function (resolve, reject) {\n        name = getMethodName(name, 'get'); // We are storing the resolve/reject handlers to call later, so we\n        // can\u2019t return here.\n        // eslint-disable-next-line promise/always-return\n\n        return _this3.ready().then(function () {\n          storeCallback(_this3, name, {\n            resolve: resolve,\n            reject: reject\n          });\n          postMessage(_this3, name);\n        }).catch(reject);\n      });\n    }\n    /**\n     * Get a promise for setting the value of a player property.\n     *\n     * @param {string} name The API method to call.\n     * @param {mixed} value The value to set.\n     * @return {Promise}\n     */\n\n  }, {\n    key: \"set\",\n    value: function set(name, value) {\n      var _this4 = this;\n\n      return new npo_src(function (resolve, reject) {\n        name = getMethodName(name, 'set');\n\n        if (value === undefined || value === null) {\n          throw new TypeError('There must be a value to set.');\n        } // We are storing the resolve/reject handlers to call later, so we\n        // can\u2019t return here.\n        // eslint-disable-next-line promise/always-return\n\n\n        return _this4.ready().then(function () {\n          storeCallback(_this4, name, {\n            resolve: resolve,\n            reject: reject\n          });\n          postMessage(_this4, name, value);\n        }).catch(reject);\n      });\n    }\n    /**\n     * Add an event listener for the specified event. Will call the\n     * callback with a single parameter, `data`, that contains the data for\n     * that event.\n     *\n     * @param {string} eventName The name of the event.\n     * @param {function(*)} callback The function to call when the event fires.\n     * @return {void}\n     */\n\n  }, {\n    key: \"on\",\n    value: function on(eventName, callback) {\n      if (!eventName) {\n        throw new TypeError('You must pass an event name.');\n      }\n\n      if (!callback) {\n        throw new TypeError('You must pass a callback function.');\n      }\n\n      if (typeof callback !== 'function') {\n        throw new TypeError('The callback must be a function.');\n      }\n\n      var callbacks = getCallbacks(this, \"event:\".concat(eventName));\n\n      if (callbacks.length === 0) {\n        this.callMethod('addEventListener', eventName).catch(function () {// Ignore the error. There will be an error event fired that\n          // will trigger the error callback if they are listening.\n        });\n      }\n\n      storeCallback(this, \"event:\".concat(eventName), callback);\n    }\n    /**\n     * Remove an event listener for the specified event. Will remove all\n     * listeners for that event if a `callback` isn\u2019t passed, or only that\n     * specific callback if it is passed.\n     *\n     * @param {string} eventName The name of the event.\n     * @param {function} [callback] The specific callback to remove.\n     * @return {void}\n     */\n\n  }, {\n    key: \"off\",\n    value: function off(eventName, callback) {\n      if (!eventName) {\n        throw new TypeError('You must pass an event name.');\n      }\n\n      if (callback && typeof callback !== 'function') {\n        throw new TypeError('The callback must be a function.');\n      }\n\n      var lastCallback = removeCallback(this, \"event:\".concat(eventName), callback); // If there are no callbacks left, remove the listener\n\n      if (lastCallback) {\n        this.callMethod('removeEventListener', eventName).catch(function (e) {// Ignore the error. There will be an error event fired that\n          // will trigger the error callback if they are listening.\n        });\n      }\n    }\n    /**\n     * A promise to load a new video.\n     *\n     * @promise LoadVideoPromise\n     * @fulfill {number} The video with this id or url successfully loaded.\n     * @reject {TypeError} The id was not a number.\n     */\n\n    /**\n     * Load a new video into this embed. The promise will be resolved if\n     * the video is successfully loaded, or it will be rejected if it could\n     * not be loaded.\n     *\n     * @param {number|string|object} options The id of the video, the url of the video, or an object with embed options.\n     * @return {LoadVideoPromise}\n     */\n\n  }, {\n    key: \"loadVideo\",\n    value: function loadVideo(options) {\n      return this.callMethod('loadVideo', options);\n    }\n    /**\n     * A promise to perform an action when the Player is ready.\n     *\n     * @todo document errors\n     * @promise LoadVideoPromise\n     * @fulfill {void}\n     */\n\n    /**\n     * Trigger a function when the player iframe has initialized. You do not\n     * need to wait for `ready` to trigger to begin adding event listeners\n     * or calling other methods.\n     *\n     * @return {ReadyPromise}\n     */\n\n  }, {\n    key: \"ready\",\n    value: function ready() {\n      var readyPromise = readyMap.get(this) || new npo_src(function (resolve, reject) {\n        reject(new Error('Unknown player. Probably unloaded.'));\n      });\n      return npo_src.resolve(readyPromise);\n    }\n    /**\n     * A promise to add a cue point to the player.\n     *\n     * @promise AddCuePointPromise\n     * @fulfill {string} The id of the cue point to use for removeCuePoint.\n     * @reject {RangeError} the time was less than 0 or greater than the\n     *         video\u2019s duration.\n     * @reject {UnsupportedError} Cue points are not supported with the current\n     *         player or browser.\n     */\n\n    /**\n     * Add a cue point to the player.\n     *\n     * @param {number} time The time for the cue point.\n     * @param {object} [data] Arbitrary data to be returned with the cue point.\n     * @return {AddCuePointPromise}\n     */\n\n  }, {\n    key: \"addCuePoint\",\n    value: function addCuePoint(time) {\n      var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      return this.callMethod('addCuePoint', {\n        time: time,\n        data: data\n      });\n    }\n    /**\n     * A promise to remove a cue point from the player.\n     *\n     * @promise AddCuePointPromise\n     * @fulfill {string} The id of the cue point that was removed.\n     * @reject {InvalidCuePoint} The cue point with the specified id was not\n     *         found.\n     * @reject {UnsupportedError} Cue points are not supported with the current\n     *         player or browser.\n     */\n\n    /**\n     * Remove a cue point from the video.\n     *\n     * @param {string} id The id of the cue point to remove.\n     * @return {RemoveCuePointPromise}\n     */\n\n  }, {\n    key: \"removeCuePoint\",\n    value: function removeCuePoint(id) {\n      return this.callMethod('removeCuePoint', id);\n    }\n    /**\n     * A representation of a text track on a video.\n     *\n     * @typedef {Object} VimeoTextTrack\n     * @property {string} language The ISO language code.\n     * @property {string} kind The kind of track it is (captions or subtitles).\n     * @property {string} label The human\u2010readable label for the track.\n     */\n\n    /**\n     * A promise to enable a text track.\n     *\n     * @promise EnableTextTrackPromise\n     * @fulfill {VimeoTextTrack} The text track that was enabled.\n     * @reject {InvalidTrackLanguageError} No track was available with the\n     *         specified language.\n     * @reject {InvalidTrackError} No track was available with the specified\n     *         language and kind.\n     */\n\n    /**\n     * Enable the text track with the specified language, and optionally the\n     * specified kind (captions or subtitles).\n     *\n     * When set via the API, the track language will not change the viewer\u2019s\n     * stored preference.\n     *\n     * @param {string} language The two\u2010letter language code.\n     * @param {string} [kind] The kind of track to enable (captions or subtitles).\n     * @return {EnableTextTrackPromise}\n     */\n\n  }, {\n    key: \"enableTextTrack\",\n    value: function enableTextTrack(language, kind) {\n      if (!language) {\n        throw new TypeError('You must pass a language.');\n      }\n\n      return this.callMethod('enableTextTrack', {\n        language: language,\n        kind: kind\n      });\n    }\n    /**\n     * A promise to disable the active text track.\n     *\n     * @promise DisableTextTrackPromise\n     * @fulfill {void} The track was disabled.\n     */\n\n    /**\n     * Disable the currently-active text track.\n     *\n     * @return {DisableTextTrackPromise}\n     */\n\n  }, {\n    key: \"disableTextTrack\",\n    value: function disableTextTrack() {\n      return this.callMethod('disableTextTrack');\n    }\n    /**\n     * A promise to pause the video.\n     *\n     * @promise PausePromise\n     * @fulfill {void} The video was paused.\n     */\n\n    /**\n     * Pause the video if it\u2019s playing.\n     *\n     * @return {PausePromise}\n     */\n\n  }, {\n    key: \"pause\",\n    value: function pause() {\n      return this.callMethod('pause');\n    }\n    /**\n     * A promise to play the video.\n     *\n     * @promise PlayPromise\n     * @fulfill {void} The video was played.\n     */\n\n    /**\n     * Play the video if it\u2019s paused. **Note:** on iOS and some other\n     * mobile devices, you cannot programmatically trigger play. Once the\n     * viewer has tapped on the play button in the player, however, you\n     * will be able to use this function.\n     *\n     * @return {PlayPromise}\n     */\n\n  }, {\n    key: \"play\",\n    value: function play() {\n      return this.callMethod('play');\n    }\n    /**\n     * Request that the player enters fullscreen.\n     * @return {Promise}\n     */\n\n  }, {\n    key: \"requestFullscreen\",\n    value: function requestFullscreen() {\n      if (screenfull.isEnabled) {\n        return screenfull.request(this.element);\n      }\n\n      return this.callMethod('requestFullscreen');\n    }\n    /**\n     * Request that the player exits fullscreen.\n     * @return {Promise}\n     */\n\n  }, {\n    key: \"exitFullscreen\",\n    value: function exitFullscreen() {\n      if (screenfull.isEnabled) {\n        return screenfull.exit();\n      }\n\n      return this.callMethod('exitFullscreen');\n    }\n    /**\n     * Returns true if the player is currently fullscreen.\n     * @return {Promise}\n     */\n\n  }, {\n    key: \"getFullscreen\",\n    value: function getFullscreen() {\n      if (screenfull.isEnabled) {\n        return npo_src.resolve(screenfull.isFullscreen);\n      }\n\n      return this.get('fullscreen');\n    }\n    /**\n     * Request that the player enters picture-in-picture.\n     * @return {Promise}\n     */\n\n  }, {\n    key: \"requestPictureInPicture\",\n    value: function requestPictureInPicture() {\n      return this.callMethod('requestPictureInPicture');\n    }\n    /**\n     * Request that the player exits picture-in-picture.\n     * @return {Promise}\n     */\n\n  }, {\n    key: \"exitPictureInPicture\",\n    value: function exitPictureInPicture() {\n      return this.callMethod('exitPictureInPicture');\n    }\n    /**\n     * Returns true if the player is currently picture-in-picture.\n     * @return {Promise}\n     */\n\n  }, {\n    key: \"getPictureInPicture\",\n    value: function getPictureInPicture() {\n      return this.get('pictureInPicture');\n    }\n    /**\n     * A promise to unload the video.\n     *\n     * @promise UnloadPromise\n     * @fulfill {void} The video was unloaded.\n     */\n\n    /**\n     * Return the player to its initial state.\n     *\n     * @return {UnloadPromise}\n     */\n\n  }, {\n    key: \"unload\",\n    value: function unload() {\n      return this.callMethod('unload');\n    }\n    /**\n     * Cleanup the player and remove it from the DOM\n     *\n     * It won't be usable and a new one should be constructed\n     *  in order to do any operations.\n     *\n     * @return {Promise}\n     */\n\n  }, {\n    key: \"destroy\",\n    value: function destroy() {\n      var _this5 = this;\n\n      return new npo_src(function (resolve) {\n        readyMap.delete(_this5);\n        playerMap.delete(_this5.element);\n\n        if (_this5._originalElement) {\n          playerMap.delete(_this5._originalElement);\n\n          _this5._originalElement.removeAttribute('data-vimeo-initialized');\n        }\n\n        if (_this5.element && _this5.element.nodeName === 'IFRAME' && _this5.element.parentNode) {\n          // If we've added an additional wrapper div, remove that from the DOM.\n          // If not, just remove the iframe element.\n          if (_this5.element.parentNode.parentNode && _this5._originalElement && _this5._originalElement !== _this5.element.parentNode) {\n            _this5.element.parentNode.parentNode.removeChild(_this5.element.parentNode);\n          } else {\n            _this5.element.parentNode.removeChild(_this5.element);\n          }\n        } // If the clip is private there is a case where the element stays the\n        // div element. Destroy should reset the div and remove the iframe child.\n\n\n        if (_this5.element && _this5.element.nodeName === 'DIV' && _this5.element.parentNode) {\n          _this5.element.removeAttribute('data-vimeo-initialized');\n\n          var iframe = _this5.element.querySelector('iframe');\n\n          if (iframe && iframe.parentNode) {\n            // If we've added an additional wrapper div, remove that from the DOM.\n            // If not, just remove the iframe element.\n            if (iframe.parentNode.parentNode && _this5._originalElement && _this5._originalElement !== iframe.parentNode) {\n              iframe.parentNode.parentNode.removeChild(iframe.parentNode);\n            } else {\n              iframe.parentNode.removeChild(iframe);\n            }\n          }\n        }\n\n        _this5._window.removeEventListener('message', _this5._onMessage);\n\n        if (screenfull.isEnabled) {\n          screenfull.off('fullscreenchange', _this5.fullscreenchangeHandler);\n        }\n\n        resolve();\n      });\n    }\n    /**\n     * A promise to get the autopause behavior of the video.\n     *\n     * @promise GetAutopausePromise\n     * @fulfill {boolean} Whether autopause is turned on or off.\n     * @reject {UnsupportedError} Autopause is not supported with the current\n     *         player or browser.\n     */\n\n    /**\n     * Get the autopause behavior for this player.\n     *\n     * @return {GetAutopausePromise}\n     */\n\n  }, {\n    key: \"getAutopause\",\n    value: function getAutopause() {\n      return this.get('autopause');\n    }\n    /**\n     * A promise to set the autopause behavior of the video.\n     *\n     * @promise SetAutopausePromise\n     * @fulfill {boolean} Whether autopause is turned on or off.\n     * @reject {UnsupportedError} Autopause is not supported with the current\n     *         player or browser.\n     */\n\n    /**\n     * Enable or disable the autopause behavior of this player.\n     *\n     * By default, when another video is played in the same browser, this\n     * player will automatically pause. Unless you have a specific reason\n     * for doing so, we recommend that you leave autopause set to the\n     * default (`true`).\n     *\n     * @param {boolean} autopause\n     * @return {SetAutopausePromise}\n     */\n\n  }, {\n    key: \"setAutopause\",\n    value: function setAutopause(autopause) {\n      return this.set('autopause', autopause);\n    }\n    /**\n     * A promise to get the buffered property of the video.\n     *\n     * @promise GetBufferedPromise\n     * @fulfill {Array} Buffered Timeranges converted to an Array.\n     */\n\n    /**\n     * Get the buffered property of the video.\n     *\n     * @return {GetBufferedPromise}\n     */\n\n  }, {\n    key: \"getBuffered\",\n    value: function getBuffered() {\n      return this.get('buffered');\n    }\n    /**\n     * @typedef {Object} CameraProperties\n     * @prop {number} props.yaw - Number between 0 and 360.\n     * @prop {number} props.pitch - Number between -90 and 90.\n     * @prop {number} props.roll - Number between -180 and 180.\n     * @prop {number} props.fov - The field of view in degrees.\n     */\n\n    /**\n     * A promise to get the camera properties of the player.\n     *\n     * @promise GetCameraPromise\n     * @fulfill {CameraProperties} The camera properties.\n     */\n\n    /**\n     * For 360\u00B0 videos get the camera properties for this player.\n     *\n     * @return {GetCameraPromise}\n     */\n\n  }, {\n    key: \"getCameraProps\",\n    value: function getCameraProps() {\n      return this.get('cameraProps');\n    }\n    /**\n     * A promise to set the camera properties of the player.\n     *\n     * @promise SetCameraPromise\n     * @fulfill {Object} The camera was successfully set.\n     * @reject {RangeError} The range was out of bounds.\n     */\n\n    /**\n     * For 360\u00B0 videos set the camera properties for this player.\n     *\n     * @param {CameraProperties} camera The camera properties\n     * @return {SetCameraPromise}\n     */\n\n  }, {\n    key: \"setCameraProps\",\n    value: function setCameraProps(camera) {\n      return this.set('cameraProps', camera);\n    }\n    /**\n     * A representation of a chapter.\n     *\n     * @typedef {Object} VimeoChapter\n     * @property {number} startTime The start time of the chapter.\n     * @property {object} title The title of the chapter.\n     * @property {number} index The place in the order of Chapters. Starts at 1.\n     */\n\n    /**\n     * A promise to get chapters for the video.\n     *\n     * @promise GetChaptersPromise\n     * @fulfill {VimeoChapter[]} The chapters for the video.\n     */\n\n    /**\n     * Get an array of all the chapters for the video.\n     *\n     * @return {GetChaptersPromise}\n     */\n\n  }, {\n    key: \"getChapters\",\n    value: function getChapters() {\n      return this.get('chapters');\n    }\n    /**\n     * A promise to get the currently active chapter.\n     *\n     * @promise GetCurrentChaptersPromise\n     * @fulfill {VimeoChapter|undefined} The current chapter for the video.\n     */\n\n    /**\n     * Get the currently active chapter for the video.\n     *\n     * @return {GetCurrentChaptersPromise}\n     */\n\n  }, {\n    key: \"getCurrentChapter\",\n    value: function getCurrentChapter() {\n      return this.get('currentChapter');\n    }\n    /**\n     * A promise to get the color of the player.\n     *\n     * @promise GetColorPromise\n     * @fulfill {string} The hex color of the player.\n     */\n\n    /**\n     * Get the color for this player.\n     *\n     * @return {GetColorPromise}\n     */\n\n  }, {\n    key: \"getColor\",\n    value: function getColor() {\n      return this.get('color');\n    }\n    /**\n     * A promise to set the color of the player.\n     *\n     * @promise SetColorPromise\n     * @fulfill {string} The color was successfully set.\n     * @reject {TypeError} The string was not a valid hex or rgb color.\n     * @reject {ContrastError} The color was set, but the contrast is\n     *         outside of the acceptable range.\n     * @reject {EmbedSettingsError} The owner of the player has chosen to\n     *         use a specific color.\n     */\n\n    /**\n     * Set the color of this player to a hex or rgb string. Setting the\n     * color may fail if the owner of the video has set their embed\n     * preferences to force a specific color.\n     *\n     * @param {string} color The hex or rgb color string to set.\n     * @return {SetColorPromise}\n     */\n\n  }, {\n    key: \"setColor\",\n    value: function setColor(color) {\n      return this.set('color', color);\n    }\n    /**\n     * A representation of a cue point.\n     *\n     * @typedef {Object} VimeoCuePoint\n     * @property {number} time The time of the cue point.\n     * @property {object} data The data passed when adding the cue point.\n     * @property {string} id The unique id for use with removeCuePoint.\n     */\n\n    /**\n     * A promise to get the cue points of a video.\n     *\n     * @promise GetCuePointsPromise\n     * @fulfill {VimeoCuePoint[]} The cue points added to the video.\n     * @reject {UnsupportedError} Cue points are not supported with the current\n     *         player or browser.\n     */\n\n    /**\n     * Get an array of the cue points added to the video.\n     *\n     * @return {GetCuePointsPromise}\n     */\n\n  }, {\n    key: \"getCuePoints\",\n    value: function getCuePoints() {\n      return this.get('cuePoints');\n    }\n    /**\n     * A promise to get the current time of the video.\n     *\n     * @promise GetCurrentTimePromise\n     * @fulfill {number} The current time in seconds.\n     */\n\n    /**\n     * Get the current playback position in seconds.\n     *\n     * @return {GetCurrentTimePromise}\n     */\n\n  }, {\n    key: \"getCurrentTime\",\n    value: function getCurrentTime() {\n      return this.get('currentTime');\n    }\n    /**\n     * A promise to set the current time of the video.\n     *\n     * @promise SetCurrentTimePromise\n     * @fulfill {number} The actual current time that was set.\n     * @reject {RangeError} the time was less than 0 or greater than the\n     *         video\u2019s duration.\n     */\n\n    /**\n     * Set the current playback position in seconds. If the player was\n     * paused, it will remain paused. Likewise, if the player was playing,\n     * it will resume playing once the video has buffered.\n     *\n     * You can provide an accurate time and the player will attempt to seek\n     * to as close to that time as possible. The exact time will be the\n     * fulfilled value of the promise.\n     *\n     * @param {number} currentTime\n     * @return {SetCurrentTimePromise}\n     */\n\n  }, {\n    key: \"setCurrentTime\",\n    value: function setCurrentTime(currentTime) {\n      return this.set('currentTime', currentTime);\n    }\n    /**\n     * A promise to get the duration of the video.\n     *\n     * @promise GetDurationPromise\n     * @fulfill {number} The duration in seconds.\n     */\n\n    /**\n     * Get the duration of the video in seconds. It will be rounded to the\n     * nearest second before playback begins, and to the nearest thousandth\n     * of a second after playback begins.\n     *\n     * @return {GetDurationPromise}\n     */\n\n  }, {\n    key: \"getDuration\",\n    value: function getDuration() {\n      return this.get('duration');\n    }\n    /**\n     * A promise to get the ended state of the video.\n     *\n     * @promise GetEndedPromise\n     * @fulfill {boolean} Whether or not the video has ended.\n     */\n\n    /**\n     * Get the ended state of the video. The video has ended if\n     * `currentTime === duration`.\n     *\n     * @return {GetEndedPromise}\n     */\n\n  }, {\n    key: \"getEnded\",\n    value: function getEnded() {\n      return this.get('ended');\n    }\n    /**\n     * A promise to get the loop state of the player.\n     *\n     * @promise GetLoopPromise\n     * @fulfill {boolean} Whether or not the player is set to loop.\n     */\n\n    /**\n     * Get the loop state of the player.\n     *\n     * @return {GetLoopPromise}\n     */\n\n  }, {\n    key: \"getLoop\",\n    value: function getLoop() {\n      return this.get('loop');\n    }\n    /**\n     * A promise to set the loop state of the player.\n     *\n     * @promise SetLoopPromise\n     * @fulfill {boolean} The loop state that was set.\n     */\n\n    /**\n     * Set the loop state of the player. When set to `true`, the player\n     * will start over immediately once playback ends.\n     *\n     * @param {boolean} loop\n     * @return {SetLoopPromise}\n     */\n\n  }, {\n    key: \"setLoop\",\n    value: function setLoop(loop) {\n      return this.set('loop', loop);\n    }\n    /**\n     * A promise to set the muted state of the player.\n     *\n     * @promise SetMutedPromise\n     * @fulfill {boolean} The muted state that was set.\n     */\n\n    /**\n     * Set the muted state of the player. When set to `true`, the player\n     * volume will be muted.\n     *\n     * @param {boolean} muted\n     * @return {SetMutedPromise}\n     */\n\n  }, {\n    key: \"setMuted\",\n    value: function setMuted(muted) {\n      return this.set('muted', muted);\n    }\n    /**\n     * A promise to get the muted state of the player.\n     *\n     * @promise GetMutedPromise\n     * @fulfill {boolean} Whether or not the player is muted.\n     */\n\n    /**\n     * Get the muted state of the player.\n     *\n     * @return {GetMutedPromise}\n     */\n\n  }, {\n    key: \"getMuted\",\n    value: function getMuted() {\n      return this.get('muted');\n    }\n    /**\n     * A promise to get the paused state of the player.\n     *\n     * @promise GetLoopPromise\n     * @fulfill {boolean} Whether or not the video is paused.\n     */\n\n    /**\n     * Get the paused state of the player.\n     *\n     * @return {GetLoopPromise}\n     */\n\n  }, {\n    key: \"getPaused\",\n    value: function getPaused() {\n      return this.get('paused');\n    }\n    /**\n     * A promise to get the playback rate of the player.\n     *\n     * @promise GetPlaybackRatePromise\n     * @fulfill {number} The playback rate of the player on a scale from 0.5 to 2.\n     */\n\n    /**\n     * Get the playback rate of the player on a scale from `0.5` to `2`.\n     *\n     * @return {GetPlaybackRatePromise}\n     */\n\n  }, {\n    key: \"getPlaybackRate\",\n    value: function getPlaybackRate() {\n      return this.get('playbackRate');\n    }\n    /**\n     * A promise to set the playbackrate of the player.\n     *\n     * @promise SetPlaybackRatePromise\n     * @fulfill {number} The playback rate was set.\n     * @reject {RangeError} The playback rate was less than 0.5 or greater than 2.\n     */\n\n    /**\n     * Set the playback rate of the player on a scale from `0.5` to `2`. When set\n     * via the API, the playback rate will not be synchronized to other\n     * players or stored as the viewer's preference.\n     *\n     * @param {number} playbackRate\n     * @return {SetPlaybackRatePromise}\n     */\n\n  }, {\n    key: \"setPlaybackRate\",\n    value: function setPlaybackRate(playbackRate) {\n      return this.set('playbackRate', playbackRate);\n    }\n    /**\n     * A promise to get the played property of the video.\n     *\n     * @promise GetPlayedPromise\n     * @fulfill {Array} Played Timeranges converted to an Array.\n     */\n\n    /**\n     * Get the played property of the video.\n     *\n     * @return {GetPlayedPromise}\n     */\n\n  }, {\n    key: \"getPlayed\",\n    value: function getPlayed() {\n      return this.get('played');\n    }\n    /**\n     * A promise to get the qualities available of the current video.\n     *\n     * @promise GetQualitiesPromise\n     * @fulfill {Array} The qualities of the video.\n     */\n\n    /**\n     * Get the qualities of the current video.\n     *\n     * @return {GetQualitiesPromise}\n     */\n\n  }, {\n    key: \"getQualities\",\n    value: function getQualities() {\n      return this.get('qualities');\n    }\n    /**\n     * A promise to get the current set quality of the video.\n     *\n     * @promise GetQualityPromise\n     * @fulfill {string} The current set quality.\n     */\n\n    /**\n     * Get the current set quality of the video.\n     *\n     * @return {GetQualityPromise}\n     */\n\n  }, {\n    key: \"getQuality\",\n    value: function getQuality() {\n      return this.get('quality');\n    }\n    /**\n     * A promise to set the video quality.\n     *\n     * @promise SetQualityPromise\n     * @fulfill {number} The quality was set.\n     * @reject {RangeError} The quality is not available.\n     */\n\n    /**\n     * Set a video quality.\n     *\n     * @param {string} quality\n     * @return {SetQualityPromise}\n     */\n\n  }, {\n    key: \"setQuality\",\n    value: function setQuality(quality) {\n      return this.set('quality', quality);\n    }\n    /**\n     * A promise to get the seekable property of the video.\n     *\n     * @promise GetSeekablePromise\n     * @fulfill {Array} Seekable Timeranges converted to an Array.\n     */\n\n    /**\n     * Get the seekable property of the video.\n     *\n     * @return {GetSeekablePromise}\n     */\n\n  }, {\n    key: \"getSeekable\",\n    value: function getSeekable() {\n      return this.get('seekable');\n    }\n    /**\n     * A promise to get the seeking property of the player.\n     *\n     * @promise GetSeekingPromise\n     * @fulfill {boolean} Whether or not the player is currently seeking.\n     */\n\n    /**\n     * Get if the player is currently seeking.\n     *\n     * @return {GetSeekingPromise}\n     */\n\n  }, {\n    key: \"getSeeking\",\n    value: function getSeeking() {\n      return this.get('seeking');\n    }\n    /**\n     * A promise to get the text tracks of a video.\n     *\n     * @promise GetTextTracksPromise\n     * @fulfill {VimeoTextTrack[]} The text tracks associated with the video.\n     */\n\n    /**\n     * Get an array of the text tracks that exist for the video.\n     *\n     * @return {GetTextTracksPromise}\n     */\n\n  }, {\n    key: \"getTextTracks\",\n    value: function getTextTracks() {\n      return this.get('textTracks');\n    }\n    /**\n     * A promise to get the embed code for the video.\n     *\n     * @promise GetVideoEmbedCodePromise\n     * @fulfill {string} The `<iframe>` embed code for the video.\n     */\n\n    /**\n     * Get the `<iframe>` embed code for the video.\n     *\n     * @return {GetVideoEmbedCodePromise}\n     */\n\n  }, {\n    key: \"getVideoEmbedCode\",\n    value: function getVideoEmbedCode() {\n      return this.get('videoEmbedCode');\n    }\n    /**\n     * A promise to get the id of the video.\n     *\n     * @promise GetVideoIdPromise\n     * @fulfill {number} The id of the video.\n     */\n\n    /**\n     * Get the id of the video.\n     *\n     * @return {GetVideoIdPromise}\n     */\n\n  }, {\n    key: \"getVideoId\",\n    value: function getVideoId() {\n      return this.get('videoId');\n    }\n    /**\n     * A promise to get the title of the video.\n     *\n     * @promise GetVideoTitlePromise\n     * @fulfill {number} The title of the video.\n     */\n\n    /**\n     * Get the title of the video.\n     *\n     * @return {GetVideoTitlePromise}\n     */\n\n  }, {\n    key: \"getVideoTitle\",\n    value: function getVideoTitle() {\n      return this.get('videoTitle');\n    }\n    /**\n     * A promise to get the native width of the video.\n     *\n     * @promise GetVideoWidthPromise\n     * @fulfill {number} The native width of the video.\n     */\n\n    /**\n     * Get the native width of the currently\u2010playing video. The width of\n     * the highest\u2010resolution available will be used before playback begins.\n     *\n     * @return {GetVideoWidthPromise}\n     */\n\n  }, {\n    key: \"getVideoWidth\",\n    value: function getVideoWidth() {\n      return this.get('videoWidth');\n    }\n    /**\n     * A promise to get the native height of the video.\n     *\n     * @promise GetVideoHeightPromise\n     * @fulfill {number} The native height of the video.\n     */\n\n    /**\n     * Get the native height of the currently\u2010playing video. The height of\n     * the highest\u2010resolution available will be used before playback begins.\n     *\n     * @return {GetVideoHeightPromise}\n     */\n\n  }, {\n    key: \"getVideoHeight\",\n    value: function getVideoHeight() {\n      return this.get('videoHeight');\n    }\n    /**\n     * A promise to get the vimeo.com url for the video.\n     *\n     * @promise GetVideoUrlPromise\n     * @fulfill {number} The vimeo.com url for the video.\n     * @reject {PrivacyError} The url isn\u2019t available because of the video\u2019s privacy setting.\n     */\n\n    /**\n     * Get the vimeo.com url for the video.\n     *\n     * @return {GetVideoUrlPromise}\n     */\n\n  }, {\n    key: \"getVideoUrl\",\n    value: function getVideoUrl() {\n      return this.get('videoUrl');\n    }\n    /**\n     * A promise to get the volume level of the player.\n     *\n     * @promise GetVolumePromise\n     * @fulfill {number} The volume level of the player on a scale from 0 to 1.\n     */\n\n    /**\n     * Get the current volume level of the player on a scale from `0` to `1`.\n     *\n     * Most mobile devices do not support an independent volume from the\n     * system volume. In those cases, this method will always return `1`.\n     *\n     * @return {GetVolumePromise}\n     */\n\n  }, {\n    key: \"getVolume\",\n    value: function getVolume() {\n      return this.get('volume');\n    }\n    /**\n     * A promise to set the volume level of the player.\n     *\n     * @promise SetVolumePromise\n     * @fulfill {number} The volume was set.\n     * @reject {RangeError} The volume was less than 0 or greater than 1.\n     */\n\n    /**\n     * Set the volume of the player on a scale from `0` to `1`. When set\n     * via the API, the volume level will not be synchronized to other\n     * players or stored as the viewer\u2019s preference.\n     *\n     * Most mobile devices do not support setting the volume. An error will\n     * *not* be triggered in that situation.\n     *\n     * @param {number} volume\n     * @return {SetVolumePromise}\n     */\n\n  }, {\n    key: \"setVolume\",\n    value: function setVolume(volume) {\n      return this.set('volume', volume);\n    }\n  }]);\n\n  return Player;\n}(); // Setup embed only if this is not a node environment\n\n\nif (!isNode) {\n  screenfull = initializeScreenfull();\n  initializeEmbeds();\n  resizeEmbeds();\n  initAppendVideoMetadata();\n}\n\nexport default Player;\n", "import { Controller } from \"@hotwired/stimulus\"\nimport { get } from \"@rails/request.js\"\nimport Player from \"@vimeo/player\"\n\nexport default class extends Controller {\n  static targets = [\"video\"]\n\n  static values = {\n    autoplay: Boolean,\n    nextChapterUrl: String,\n    videoId: String,\n  }\n\n  connect() {\n    this.player = new Player(this.videoTarget, {\n      id: this.videoIdValue,\n      responsive: true,\n    })\n\n    this.playbackRate = localStorage.getItem(\"playbackRate\")\n    this.playbackQuality = localStorage.getItem(\"playbackQuality\")\n\n    this.initializeVideoEndedHandler()\n    this.initializePlaybackRateChangeHandler()\n\n    if (this.autoplayValue) {\n      this.play()\n    }\n\n    if (this.playbackRate) {\n      this.player.setPlaybackRate(this.playbackRate)\n    }\n\n    if (this.playbackQuality) {\n      this.player.setQuality(this.playbackQuality)\n    }\n  }\n\n  play() {\n    this.player.play().catch((error) => {\n      switch (error.name) {\n        case \"PasswordError\":\n          console.warn(\"Cannot play password protected video.\")\n          break\n        case \"PrivacyError\":\n          console.warn(\"Cannot play this video due to privacy error.\")\n          break\n        case \"NotAllowedError\":\n          this.handleNotAllowedError()\n          break\n        default:\n          console.warn(\"Error playing Vimeo video.\")\n          break\n      }\n    })\n  }\n\n  handleNotAllowedError() {\n    console.warn(\"Autoplay prevented by browser policy, Waiting for user interaction.\")\n\n    // Define custom function to be used when adding/removing event listener\n    const play = function () {\n      this.play()\n\n      // Unbind the listener. In case of user pausing the video, it would start playing upon\n      // clicking anywhere on page.\n      document.body.removeEventListener(\"click\", play)\n    }.bind(this)\n\n    // Bind the listener.\n    document.body.addEventListener(\"click\", play)\n  }\n\n  initializeVideoEndedHandler() {\n    this.player.on(\"ended\", async () => {\n      if (this.nextChapterUrlValue.length === 0) return\n      if (this.autoplayValue === false) return\n\n      await get(this.nextChapterUrlValue, {\n        responseKind: \"turbo-stream\",\n      })\n    })\n  }\n\n  initializePlaybackRateChangeHandler() {\n    this.player.on(\"playbackratechange\", (data) => {\n      localStorage.setItem(\"playbackRate\", data.playbackRate)\n    })\n\n    this.player.on(\"qualitychange\", (data) => {\n      localStorage.setItem(\"playbackQuality\", data.quality)\n    })\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\nimport Uppy from \"@uppy/core\"\nimport Tus from \"@uppy/tus\"\nimport Slovak from \"@uppy/locales/lib/sk_SK\"\nimport Czech from \"@uppy/locales/lib/cs_CZ\"\nimport Vimeo from \"../plugins/uppy-vimeo-plugin\"\n\n// Connects to data-controller=\"vimeo-upload\"\nexport default class extends Controller {\n  static targets = [\n    \"fileInput\",\n    \"fileInputLabel\",\n    \"pendingState\",\n    \"pendingStateMessage\",\n    \"resetButton\",\n    \"videoIframe\",\n    \"videoUrlInput\",\n  ]\n\n  static values = {\n    videoUrl: String,\n    checkVideoUrl: String,\n    prepareVideoUrl: String,\n    processVideoUrl: String,\n    preparingProgressMessage: String,\n    processingProgressMessage: String,\n    uploadingProgressMessage: String,\n    locale: String,\n  }\n\n  addFile(evt) {\n    const file = evt.target.files[0]\n\n    this.uppy.addFile({\n      name: file.name,\n      type: file.type,\n      data: file,\n    })\n  }\n\n  connect() {\n    this.csrfToken = document.querySelector('meta[name=\"csrf-token\"]').getAttribute(\"content\")\n\n    this.uppy = new Uppy({\n      debug: true,\n      autoProceed: true,\n      locale: this.localeValue == \"sk\" ? Slovak : Czech,\n      restrictions: {\n        minNumberOfFiles: 1,\n        maxNumberOfFiles: 1,\n        allowedFileTypes: [\"video/*\"],\n      },\n    })\n      .use(Tus, {})\n      .use(Vimeo, {\n        prepareVideoUrl: this.prepareVideoUrlValue,\n        processVideoUrl: this.processVideoUrlValue,\n      })\n\n    this.setupUppyEvents()\n\n    if (this.hasVideoUrlValue && this.videoUrlValue !== \"\") {\n      this.showVimeoPlayer(this.videoUrlValue.split(\"/\").pop())\n\n      this.hideFileInputLabel()\n    }\n  }\n\n  async pollVideoProcessingStatus(vimeoId) {\n    const executePoll = async (resolve, reject) => {\n      const response = await fetch(this.checkVideoUrlValue, {\n        method: \"post\",\n        headers: {\n          \"X-CSRF-TOKEN\": this.csrfToken,\n          \"Content-Type\": \"application/json\",\n          \"Accept\": \"application/json\",\n        },\n        body: JSON.stringify({\n          video: {\n            vimeo_id: vimeoId,\n          },\n        }),\n      })\n\n      const result = await response.json()\n\n      if (result && result.transcode_status === \"complete\") {\n        this.hidePendingState()\n        this.showVimeoPlayer(vimeoId)\n      } else if (result && result.transcode_status === \"in_progress\") {\n        this.showPendingState(this.processingProgressMessageValue)\n        setTimeout(executePoll, 3000, resolve, reject)\n      } else {\n        reject(\"Video processing failed.\")\n      }\n    }\n\n    return new Promise(executePoll)\n  }\n\n  resetVideoUrl() {\n    this.videoUrlInputTarget.value = \"\"\n    this.hideVimeoPlayer()\n    this.showFileInputLabel()\n  }\n\n  setupUppyEvents() {\n    this.uppy.on(\"file-added\", () => {\n      this.hideFileInputLabel()\n      this.showPendingState(this.preparingProgressMessageValue)\n    })\n\n    this.uppy.on(\"progress\", (progress) => {\n      const progressMessage = `${this.uploadingProgressMessageValue} (${progress}%)`\n\n      this.showPendingState(progressMessage)\n    })\n\n    this.uppy.on(\"complete\", (result) => {\n      // Extract vimeoId from vimeo.uri\n      const vimeoId = result.successful[0].vimeo.uri.split(\"/\").pop()\n\n      // Update video_url input value\n      this.videoUrlInputTarget.value = `https://vimeo.com/${vimeoId}`\n\n      // Reset file input value to prevent reupload\n      this.fileInputTarget.value = \"\"\n\n      // Start polling video processing status\n      this.pollVideoProcessingStatus(vimeoId).catch((error) => {\n        console.error(error)\n      })\n    })\n  }\n\n  showPendingState(message) {\n    this.pendingStateTarget.classList.remove(\"hidden\")\n    this.pendingStateTarget.classList.add(\"flex\")\n\n    this.pendingStateMessageTarget.innerHTML = message\n  }\n\n  hidePendingState() {\n    this.pendingStateTarget.classList.remove(\"flex\")\n    this.pendingStateTarget.classList.add(\"hidden\")\n\n    this.pendingStateMessageTarget.innerHTML = \"\"\n  }\n\n  showFileInputLabel() {\n    this.fileInputLabelTarget.classList.remove(\"hidden\")\n    this.fileInputLabelTarget.classList.add(\"flex\")\n  }\n\n  hideFileInputLabel() {\n    this.fileInputLabelTarget.classList.remove(\"flex\")\n    this.fileInputLabelTarget.classList.add(\"hidden\")\n  }\n\n  showResetButton() {\n    this.resetButtonTarget.classList.remove(\"hidden\")\n  }\n\n  hideResetButton() {\n    this.resetButtonTarget.classList.add(\"hidden\")\n  }\n\n  showVimeoPlayer(vimeoId) {\n    this.videoIframeTarget.src = `https://player.vimeo.com/video/${vimeoId}`\n    this.videoIframeTarget.classList.remove(\"hidden\")\n\n    this.showResetButton()\n  }\n\n  hideVimeoPlayer() {\n    this.videoIframeTarget.src = \"\"\n    this.videoIframeTarget.classList.add(\"hidden\")\n\n    this.hideResetButton()\n  }\n}\n", "// This file is auto-generated by ./bin/rails stimulus:manifest:update\n// Run that command whenever you add a new controller or create them with\n// ./bin/rails generate stimulus controllerName\n\nimport { application } from \"./application\"\n\nimport Admin__FilterController from \"./admin/filter_controller\"\napplication.register(\"admin--filter\", Admin__FilterController)\n\nimport Admin__LocalizedAttributesController from \"./admin/localized_attributes_controller\"\napplication.register(\"admin--localized-attributes\", Admin__LocalizedAttributesController)\n\nimport AnalyticsController from \"./analytics_controller\"\napplication.register(\"analytics\", AnalyticsController)\n\nimport AutoplayFormController from \"./autoplay_form_controller\"\napplication.register(\"autoplay-form\", AutoplayFormController)\n\nimport AutoplayTogglerController from \"./autoplay_toggler_controller\"\napplication.register(\"autoplay-toggler\", AutoplayTogglerController)\n\nimport B2b__EnrollmentsWizardController from \"./b2b/enrollments_wizard_controller\"\napplication.register(\"b2b--enrollments-wizard\", B2b__EnrollmentsWizardController)\n\nimport B2b__InvitationFormController from \"./b2b/invitation_form_controller\"\napplication.register(\"b2b--invitation-form\", B2b__InvitationFormController)\n\nimport B2b__WidgetsController from \"./b2b/widgets_controller\"\napplication.register(\"b2b--widgets\", B2b__WidgetsController)\n\nimport BannerController from \"./banner_controller\"\napplication.register(\"banner\", BannerController)\n\nimport CarouselController from \"./carousel_controller\"\napplication.register(\"carousel\", CarouselController)\n\nimport ChapterController from \"./chapter_controller\"\napplication.register(\"chapter\", ChapterController)\n\nimport ChaptersSearchController from \"./chapters_search_controller\"\napplication.register(\"chapters-search\", ChaptersSearchController)\n\nimport ChartController from \"./chart_controller\"\napplication.register(\"chart\", ChartController)\n\nimport CheckboxSelectAllController from \"./checkbox_select_all_controller\"\napplication.register(\"checkbox-select-all\", CheckboxSelectAllController)\n\nimport Checkout__PaymentFormController from \"./checkout/payment_form_controller\"\napplication.register(\"checkout--payment-form\", Checkout__PaymentFormController)\n\nimport Checkout__PurchaseAsGiftController from \"./checkout/purchase_as_gift_controller\"\napplication.register(\"checkout--purchase-as-gift\", Checkout__PurchaseAsGiftController)\n\nimport ClipboardController from \"./clipboard_controller\"\napplication.register(\"clipboard\", ClipboardController)\n\nimport CloakController from \"./cloak_controller\"\napplication.register(\"cloak\", CloakController)\n\nimport CollapseController from \"./collapse_controller\"\napplication.register(\"collapse\", CollapseController)\n\nimport ComboBoxController from \"./combo_box_controller\"\napplication.register(\"combo-box\", ComboBoxController)\n\nimport Company__AvailableSeatsFormController from \"./company/available_seats_form_controller\"\napplication.register(\"company--available-seats-form\", Company__AvailableSeatsFormController)\n\nimport CountdownRedirectController from \"./countdown_redirect_controller\"\napplication.register(\"countdown-redirect\", CountdownRedirectController)\n\nimport CountdownTimerController from \"./countdown_timer_controller\"\napplication.register(\"countdown-timer\", CountdownTimerController)\n\nimport CounterController from \"./counter_controller\"\napplication.register(\"counter\", CounterController)\n\nimport Courses__FilterController from \"./courses/filter_controller\"\napplication.register(\"courses--filter\", Courses__FilterController)\n\nimport DialogController from \"./dialog_controller\"\napplication.register(\"dialog\", DialogController)\n\nimport FlatpickrController from \"./flatpickr_controller\"\napplication.register(\"flatpickr\", FlatpickrController)\n\nimport FormSubmissionController from \"./form_submission_controller\"\napplication.register(\"form-submission\", FormSubmissionController)\n\nimport GlightboxController from \"./glightbox_controller\"\napplication.register(\"glightbox\", GlightboxController)\n\nimport GlobalSearchController from \"./global_search_controller\"\napplication.register(\"global-search\", GlobalSearchController)\n\nimport GopayController from \"./gopay_controller\"\napplication.register(\"gopay\", GopayController)\n\nimport HeadroomController from \"./headroom_controller\"\napplication.register(\"headroom\", HeadroomController)\n\nimport ImageAttachmentsController from \"./image_attachments_controller\"\napplication.register(\"image-attachments\", ImageAttachmentsController)\n\nimport IndexTableController from \"./index_table_controller\"\napplication.register(\"index-table\", IndexTableController)\n\nimport InviteUsersController from \"./invite_users_controller\"\napplication.register(\"invite-users\", InviteUsersController)\n\nimport ItemsFilterController from \"./items_filter_controller\"\napplication.register(\"items-filter\", ItemsFilterController)\n\nimport NestedFieldController from \"./nested_field_controller\"\napplication.register(\"nested-field\", NestedFieldController)\n\nimport NestedFieldsController from \"./nested_fields_controller\"\napplication.register(\"nested-fields\", NestedFieldsController)\n\nimport NotificationsController from \"./notifications_controller\"\napplication.register(\"notifications\", NotificationsController)\n\nimport OtherFieldController from \"./other_field_controller\"\napplication.register(\"other-field\", OtherFieldController)\n\nimport ParallaxController from \"./parallax_controller\"\napplication.register(\"parallax\", ParallaxController)\n\nimport PriceFieldController from \"./price_field_controller\"\napplication.register(\"price-field\", PriceFieldController)\n\nimport ProductRowController from \"./product_row_controller\"\napplication.register(\"product-row\", ProductRowController)\n\nimport RangeInputController from \"./range_input_controller\"\napplication.register(\"range-input\", RangeInputController)\n\nimport ReadMoreController from \"./read_more_controller\"\napplication.register(\"read-more\", ReadMoreController)\n\nimport ScrollIntoViewController from \"./scroll_into_view_controller\"\napplication.register(\"scroll-into-view\", ScrollIntoViewController)\n\nimport ScrollToBottomController from \"./scroll_to_bottom_controller\"\napplication.register(\"scroll-to-bottom\", ScrollToBottomController)\n\nimport SearchInController from \"./search_in_controller\"\napplication.register(\"search-in\", SearchInController)\n\nimport ServiceWorkerController from \"./service_worker_controller\"\napplication.register(\"service-worker\", ServiceWorkerController)\n\nimport Services__FinstatController from \"./services/finstat_controller\"\napplication.register(\"services--finstat\", Services__FinstatController)\n\nimport ShowMoreController from \"./show_more_controller\"\napplication.register(\"show-more\", ShowMoreController)\n\nimport SortableController from \"./sortable_controller\"\napplication.register(\"sortable\", SortableController)\n\nimport StopEnterController from \"./stop_enter_controller\"\napplication.register(\"stop-enter\", StopEnterController)\n\nimport Student__ChapterNavigationController from \"./student/chapter_navigation_controller\"\napplication.register(\"student--chapter-navigation\", Student__ChapterNavigationController)\n\nimport Student__ChaptersFilterController from \"./student/chapters_filter_controller\"\napplication.register(\"student--chapters-filter\", Student__ChaptersFilterController)\n\nimport TabSectionController from \"./tab_section_controller\"\napplication.register(\"tab-section\", TabSectionController)\n\nimport Teacher__CoursePricesController from \"./teacher/course_prices_controller\"\napplication.register(\"teacher--course-prices\", Teacher__CoursePricesController)\n\nimport Teacher__CoursesController from \"./teacher/courses_controller\"\napplication.register(\"teacher--courses\", Teacher__CoursesController)\n\nimport TeacherChannel__CourseAttachmentController from \"./teacher_channel/course_attachment_controller\"\napplication.register(\"teacher-channel--course-attachment\", TeacherChannel__CourseAttachmentController)\n\nimport TimeoutRedirectController from \"./timeout_redirect_controller\"\napplication.register(\"timeout-redirect\", TimeoutRedirectController)\n\nimport TippyController from \"./tippy_controller\"\napplication.register(\"tippy\", TippyController)\n\nimport TurboModalController from \"./turbo_modal_controller\"\napplication.register(\"turbo-modal\", TurboModalController)\n\nimport TurboStreamController from \"./turbo_stream_controller\"\napplication.register(\"turbo-stream\", TurboStreamController)\n\nimport VideoUploadsController from \"./video_uploads_controller\"\napplication.register(\"video-uploads\", VideoUploadsController)\n\nimport VideojsPlayerController from \"./videojs_player_controller\"\napplication.register(\"videojs-player\", VideojsPlayerController)\n\nimport VimeoPlayerController from \"./vimeo_player_controller\"\napplication.register(\"vimeo-player\", VimeoPlayerController)\n\nimport VimeoUploadController from \"./vimeo_upload_controller\"\napplication.register(\"vimeo-upload\", VimeoUploadController)\n", "/*\n * anime.js v3.2.1\n * (c) 2020 Julian Garnier\n * Released under the MIT license\n * animejs.com\n */\n\n// Defaults\n\nvar defaultInstanceSettings = {\n  update: null,\n  begin: null,\n  loopBegin: null,\n  changeBegin: null,\n  change: null,\n  changeComplete: null,\n  loopComplete: null,\n  complete: null,\n  loop: 1,\n  direction: 'normal',\n  autoplay: true,\n  timelineOffset: 0\n};\n\nvar defaultTweenSettings = {\n  duration: 1000,\n  delay: 0,\n  endDelay: 0,\n  easing: 'easeOutElastic(1, .5)',\n  round: 0\n};\n\nvar validTransforms = ['translateX', 'translateY', 'translateZ', 'rotate', 'rotateX', 'rotateY', 'rotateZ', 'scale', 'scaleX', 'scaleY', 'scaleZ', 'skew', 'skewX', 'skewY', 'perspective', 'matrix', 'matrix3d'];\n\n// Caching\n\nvar cache = {\n  CSS: {},\n  springs: {}\n};\n\n// Utils\n\nfunction minMax(val, min, max) {\n  return Math.min(Math.max(val, min), max);\n}\n\nfunction stringContains(str, text) {\n  return str.indexOf(text) > -1;\n}\n\nfunction applyArguments(func, args) {\n  return func.apply(null, args);\n}\n\nvar is = {\n  arr: function (a) { return Array.isArray(a); },\n  obj: function (a) { return stringContains(Object.prototype.toString.call(a), 'Object'); },\n  pth: function (a) { return is.obj(a) && a.hasOwnProperty('totalLength'); },\n  svg: function (a) { return a instanceof SVGElement; },\n  inp: function (a) { return a instanceof HTMLInputElement; },\n  dom: function (a) { return a.nodeType || is.svg(a); },\n  str: function (a) { return typeof a === 'string'; },\n  fnc: function (a) { return typeof a === 'function'; },\n  und: function (a) { return typeof a === 'undefined'; },\n  nil: function (a) { return is.und(a) || a === null; },\n  hex: function (a) { return /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(a); },\n  rgb: function (a) { return /^rgb/.test(a); },\n  hsl: function (a) { return /^hsl/.test(a); },\n  col: function (a) { return (is.hex(a) || is.rgb(a) || is.hsl(a)); },\n  key: function (a) { return !defaultInstanceSettings.hasOwnProperty(a) && !defaultTweenSettings.hasOwnProperty(a) && a !== 'targets' && a !== 'keyframes'; },\n};\n\n// Easings\n\nfunction parseEasingParameters(string) {\n  var match = /\\(([^)]+)\\)/.exec(string);\n  return match ? match[1].split(',').map(function (p) { return parseFloat(p); }) : [];\n}\n\n// Spring solver inspired by Webkit Copyright \u00A9 2016 Apple Inc. All rights reserved. https://webkit.org/demos/spring/spring.js\n\nfunction spring(string, duration) {\n\n  var params = parseEasingParameters(string);\n  var mass = minMax(is.und(params[0]) ? 1 : params[0], .1, 100);\n  var stiffness = minMax(is.und(params[1]) ? 100 : params[1], .1, 100);\n  var damping = minMax(is.und(params[2]) ? 10 : params[2], .1, 100);\n  var velocity =  minMax(is.und(params[3]) ? 0 : params[3], .1, 100);\n  var w0 = Math.sqrt(stiffness / mass);\n  var zeta = damping / (2 * Math.sqrt(stiffness * mass));\n  var wd = zeta < 1 ? w0 * Math.sqrt(1 - zeta * zeta) : 0;\n  var a = 1;\n  var b = zeta < 1 ? (zeta * w0 + -velocity) / wd : -velocity + w0;\n\n  function solver(t) {\n    var progress = duration ? (duration * t) / 1000 : t;\n    if (zeta < 1) {\n      progress = Math.exp(-progress * zeta * w0) * (a * Math.cos(wd * progress) + b * Math.sin(wd * progress));\n    } else {\n      progress = (a + b * progress) * Math.exp(-progress * w0);\n    }\n    if (t === 0 || t === 1) { return t; }\n    return 1 - progress;\n  }\n\n  function getDuration() {\n    var cached = cache.springs[string];\n    if (cached) { return cached; }\n    var frame = 1/6;\n    var elapsed = 0;\n    var rest = 0;\n    while(true) {\n      elapsed += frame;\n      if (solver(elapsed) === 1) {\n        rest++;\n        if (rest >= 16) { break; }\n      } else {\n        rest = 0;\n      }\n    }\n    var duration = elapsed * frame * 1000;\n    cache.springs[string] = duration;\n    return duration;\n  }\n\n  return duration ? solver : getDuration;\n\n}\n\n// Basic steps easing implementation https://developer.mozilla.org/fr/docs/Web/CSS/transition-timing-function\n\nfunction steps(steps) {\n  if ( steps === void 0 ) steps = 10;\n\n  return function (t) { return Math.ceil((minMax(t, 0.000001, 1)) * steps) * (1 / steps); };\n}\n\n// BezierEasing https://github.com/gre/bezier-easing\n\nvar bezier = (function () {\n\n  var kSplineTableSize = 11;\n  var kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);\n\n  function A(aA1, aA2) { return 1.0 - 3.0 * aA2 + 3.0 * aA1 }\n  function B(aA1, aA2) { return 3.0 * aA2 - 6.0 * aA1 }\n  function C(aA1)      { return 3.0 * aA1 }\n\n  function calcBezier(aT, aA1, aA2) { return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT }\n  function getSlope(aT, aA1, aA2) { return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1) }\n\n  function binarySubdivide(aX, aA, aB, mX1, mX2) {\n    var currentX, currentT, i = 0;\n    do {\n      currentT = aA + (aB - aA) / 2.0;\n      currentX = calcBezier(currentT, mX1, mX2) - aX;\n      if (currentX > 0.0) { aB = currentT; } else { aA = currentT; }\n    } while (Math.abs(currentX) > 0.0000001 && ++i < 10);\n    return currentT;\n  }\n\n  function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {\n    for (var i = 0; i < 4; ++i) {\n      var currentSlope = getSlope(aGuessT, mX1, mX2);\n      if (currentSlope === 0.0) { return aGuessT; }\n      var currentX = calcBezier(aGuessT, mX1, mX2) - aX;\n      aGuessT -= currentX / currentSlope;\n    }\n    return aGuessT;\n  }\n\n  function bezier(mX1, mY1, mX2, mY2) {\n\n    if (!(0 <= mX1 && mX1 <= 1 && 0 <= mX2 && mX2 <= 1)) { return; }\n    var sampleValues = new Float32Array(kSplineTableSize);\n\n    if (mX1 !== mY1 || mX2 !== mY2) {\n      for (var i = 0; i < kSplineTableSize; ++i) {\n        sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);\n      }\n    }\n\n    function getTForX(aX) {\n\n      var intervalStart = 0;\n      var currentSample = 1;\n      var lastSample = kSplineTableSize - 1;\n\n      for (; currentSample !== lastSample && sampleValues[currentSample] <= aX; ++currentSample) {\n        intervalStart += kSampleStepSize;\n      }\n\n      --currentSample;\n\n      var dist = (aX - sampleValues[currentSample]) / (sampleValues[currentSample + 1] - sampleValues[currentSample]);\n      var guessForT = intervalStart + dist * kSampleStepSize;\n      var initialSlope = getSlope(guessForT, mX1, mX2);\n\n      if (initialSlope >= 0.001) {\n        return newtonRaphsonIterate(aX, guessForT, mX1, mX2);\n      } else if (initialSlope === 0.0) {\n        return guessForT;\n      } else {\n        return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);\n      }\n\n    }\n\n    return function (x) {\n      if (mX1 === mY1 && mX2 === mY2) { return x; }\n      if (x === 0 || x === 1) { return x; }\n      return calcBezier(getTForX(x), mY1, mY2);\n    }\n\n  }\n\n  return bezier;\n\n})();\n\nvar penner = (function () {\n\n  // Based on jQuery UI's implemenation of easing equations from Robert Penner (http://www.robertpenner.com/easing)\n\n  var eases = { linear: function () { return function (t) { return t; }; } };\n\n  var functionEasings = {\n    Sine: function () { return function (t) { return 1 - Math.cos(t * Math.PI / 2); }; },\n    Circ: function () { return function (t) { return 1 - Math.sqrt(1 - t * t); }; },\n    Back: function () { return function (t) { return t * t * (3 * t - 2); }; },\n    Bounce: function () { return function (t) {\n      var pow2, b = 4;\n      while (t < (( pow2 = Math.pow(2, --b)) - 1) / 11) {}\n      return 1 / Math.pow(4, 3 - b) - 7.5625 * Math.pow(( pow2 * 3 - 2 ) / 22 - t, 2)\n    }; },\n    Elastic: function (amplitude, period) {\n      if ( amplitude === void 0 ) amplitude = 1;\n      if ( period === void 0 ) period = .5;\n\n      var a = minMax(amplitude, 1, 10);\n      var p = minMax(period, .1, 2);\n      return function (t) {\n        return (t === 0 || t === 1) ? t : \n          -a * Math.pow(2, 10 * (t - 1)) * Math.sin((((t - 1) - (p / (Math.PI * 2) * Math.asin(1 / a))) * (Math.PI * 2)) / p);\n      }\n    }\n  };\n\n  var baseEasings = ['Quad', 'Cubic', 'Quart', 'Quint', 'Expo'];\n\n  baseEasings.forEach(function (name, i) {\n    functionEasings[name] = function () { return function (t) { return Math.pow(t, i + 2); }; };\n  });\n\n  Object.keys(functionEasings).forEach(function (name) {\n    var easeIn = functionEasings[name];\n    eases['easeIn' + name] = easeIn;\n    eases['easeOut' + name] = function (a, b) { return function (t) { return 1 - easeIn(a, b)(1 - t); }; };\n    eases['easeInOut' + name] = function (a, b) { return function (t) { return t < 0.5 ? easeIn(a, b)(t * 2) / 2 : \n      1 - easeIn(a, b)(t * -2 + 2) / 2; }; };\n    eases['easeOutIn' + name] = function (a, b) { return function (t) { return t < 0.5 ? (1 - easeIn(a, b)(1 - t * 2)) / 2 : \n      (easeIn(a, b)(t * 2 - 1) + 1) / 2; }; };\n  });\n\n  return eases;\n\n})();\n\nfunction parseEasings(easing, duration) {\n  if (is.fnc(easing)) { return easing; }\n  var name = easing.split('(')[0];\n  var ease = penner[name];\n  var args = parseEasingParameters(easing);\n  switch (name) {\n    case 'spring' : return spring(easing, duration);\n    case 'cubicBezier' : return applyArguments(bezier, args);\n    case 'steps' : return applyArguments(steps, args);\n    default : return applyArguments(ease, args);\n  }\n}\n\n// Strings\n\nfunction selectString(str) {\n  try {\n    var nodes = document.querySelectorAll(str);\n    return nodes;\n  } catch(e) {\n    return;\n  }\n}\n\n// Arrays\n\nfunction filterArray(arr, callback) {\n  var len = arr.length;\n  var thisArg = arguments.length >= 2 ? arguments[1] : void 0;\n  var result = [];\n  for (var i = 0; i < len; i++) {\n    if (i in arr) {\n      var val = arr[i];\n      if (callback.call(thisArg, val, i, arr)) {\n        result.push(val);\n      }\n    }\n  }\n  return result;\n}\n\nfunction flattenArray(arr) {\n  return arr.reduce(function (a, b) { return a.concat(is.arr(b) ? flattenArray(b) : b); }, []);\n}\n\nfunction toArray(o) {\n  if (is.arr(o)) { return o; }\n  if (is.str(o)) { o = selectString(o) || o; }\n  if (o instanceof NodeList || o instanceof HTMLCollection) { return [].slice.call(o); }\n  return [o];\n}\n\nfunction arrayContains(arr, val) {\n  return arr.some(function (a) { return a === val; });\n}\n\n// Objects\n\nfunction cloneObject(o) {\n  var clone = {};\n  for (var p in o) { clone[p] = o[p]; }\n  return clone;\n}\n\nfunction replaceObjectProps(o1, o2) {\n  var o = cloneObject(o1);\n  for (var p in o1) { o[p] = o2.hasOwnProperty(p) ? o2[p] : o1[p]; }\n  return o;\n}\n\nfunction mergeObjects(o1, o2) {\n  var o = cloneObject(o1);\n  for (var p in o2) { o[p] = is.und(o1[p]) ? o2[p] : o1[p]; }\n  return o;\n}\n\n// Colors\n\nfunction rgbToRgba(rgbValue) {\n  var rgb = /rgb\\((\\d+,\\s*[\\d]+,\\s*[\\d]+)\\)/g.exec(rgbValue);\n  return rgb ? (\"rgba(\" + (rgb[1]) + \",1)\") : rgbValue;\n}\n\nfunction hexToRgba(hexValue) {\n  var rgx = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;\n  var hex = hexValue.replace(rgx, function (m, r, g, b) { return r + r + g + g + b + b; } );\n  var rgb = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\n  var r = parseInt(rgb[1], 16);\n  var g = parseInt(rgb[2], 16);\n  var b = parseInt(rgb[3], 16);\n  return (\"rgba(\" + r + \",\" + g + \",\" + b + \",1)\");\n}\n\nfunction hslToRgba(hslValue) {\n  var hsl = /hsl\\((\\d+),\\s*([\\d.]+)%,\\s*([\\d.]+)%\\)/g.exec(hslValue) || /hsla\\((\\d+),\\s*([\\d.]+)%,\\s*([\\d.]+)%,\\s*([\\d.]+)\\)/g.exec(hslValue);\n  var h = parseInt(hsl[1], 10) / 360;\n  var s = parseInt(hsl[2], 10) / 100;\n  var l = parseInt(hsl[3], 10) / 100;\n  var a = hsl[4] || 1;\n  function hue2rgb(p, q, t) {\n    if (t < 0) { t += 1; }\n    if (t > 1) { t -= 1; }\n    if (t < 1/6) { return p + (q - p) * 6 * t; }\n    if (t < 1/2) { return q; }\n    if (t < 2/3) { return p + (q - p) * (2/3 - t) * 6; }\n    return p;\n  }\n  var r, g, b;\n  if (s == 0) {\n    r = g = b = l;\n  } else {\n    var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n    var p = 2 * l - q;\n    r = hue2rgb(p, q, h + 1/3);\n    g = hue2rgb(p, q, h);\n    b = hue2rgb(p, q, h - 1/3);\n  }\n  return (\"rgba(\" + (r * 255) + \",\" + (g * 255) + \",\" + (b * 255) + \",\" + a + \")\");\n}\n\nfunction colorToRgb(val) {\n  if (is.rgb(val)) { return rgbToRgba(val); }\n  if (is.hex(val)) { return hexToRgba(val); }\n  if (is.hsl(val)) { return hslToRgba(val); }\n}\n\n// Units\n\nfunction getUnit(val) {\n  var split = /[+-]?\\d*\\.?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(val);\n  if (split) { return split[1]; }\n}\n\nfunction getTransformUnit(propName) {\n  if (stringContains(propName, 'translate') || propName === 'perspective') { return 'px'; }\n  if (stringContains(propName, 'rotate') || stringContains(propName, 'skew')) { return 'deg'; }\n}\n\n// Values\n\nfunction getFunctionValue(val, animatable) {\n  if (!is.fnc(val)) { return val; }\n  return val(animatable.target, animatable.id, animatable.total);\n}\n\nfunction getAttribute(el, prop) {\n  return el.getAttribute(prop);\n}\n\nfunction convertPxToUnit(el, value, unit) {\n  var valueUnit = getUnit(value);\n  if (arrayContains([unit, 'deg', 'rad', 'turn'], valueUnit)) { return value; }\n  var cached = cache.CSS[value + unit];\n  if (!is.und(cached)) { return cached; }\n  var baseline = 100;\n  var tempEl = document.createElement(el.tagName);\n  var parentEl = (el.parentNode && (el.parentNode !== document)) ? el.parentNode : document.body;\n  parentEl.appendChild(tempEl);\n  tempEl.style.position = 'absolute';\n  tempEl.style.width = baseline + unit;\n  var factor = baseline / tempEl.offsetWidth;\n  parentEl.removeChild(tempEl);\n  var convertedUnit = factor * parseFloat(value);\n  cache.CSS[value + unit] = convertedUnit;\n  return convertedUnit;\n}\n\nfunction getCSSValue(el, prop, unit) {\n  if (prop in el.style) {\n    var uppercasePropName = prop.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n    var value = el.style[prop] || getComputedStyle(el).getPropertyValue(uppercasePropName) || '0';\n    return unit ? convertPxToUnit(el, value, unit) : value;\n  }\n}\n\nfunction getAnimationType(el, prop) {\n  if (is.dom(el) && !is.inp(el) && (!is.nil(getAttribute(el, prop)) || (is.svg(el) && el[prop]))) { return 'attribute'; }\n  if (is.dom(el) && arrayContains(validTransforms, prop)) { return 'transform'; }\n  if (is.dom(el) && (prop !== 'transform' && getCSSValue(el, prop))) { return 'css'; }\n  if (el[prop] != null) { return 'object'; }\n}\n\nfunction getElementTransforms(el) {\n  if (!is.dom(el)) { return; }\n  var str = el.style.transform || '';\n  var reg  = /(\\w+)\\(([^)]*)\\)/g;\n  var transforms = new Map();\n  var m; while (m = reg.exec(str)) { transforms.set(m[1], m[2]); }\n  return transforms;\n}\n\nfunction getTransformValue(el, propName, animatable, unit) {\n  var defaultVal = stringContains(propName, 'scale') ? 1 : 0 + getTransformUnit(propName);\n  var value = getElementTransforms(el).get(propName) || defaultVal;\n  if (animatable) {\n    animatable.transforms.list.set(propName, value);\n    animatable.transforms['last'] = propName;\n  }\n  return unit ? convertPxToUnit(el, value, unit) : value;\n}\n\nfunction getOriginalTargetValue(target, propName, unit, animatable) {\n  switch (getAnimationType(target, propName)) {\n    case 'transform': return getTransformValue(target, propName, animatable, unit);\n    case 'css': return getCSSValue(target, propName, unit);\n    case 'attribute': return getAttribute(target, propName);\n    default: return target[propName] || 0;\n  }\n}\n\nfunction getRelativeValue(to, from) {\n  var operator = /^(\\*=|\\+=|-=)/.exec(to);\n  if (!operator) { return to; }\n  var u = getUnit(to) || 0;\n  var x = parseFloat(from);\n  var y = parseFloat(to.replace(operator[0], ''));\n  switch (operator[0][0]) {\n    case '+': return x + y + u;\n    case '-': return x - y + u;\n    case '*': return x * y + u;\n  }\n}\n\nfunction validateValue(val, unit) {\n  if (is.col(val)) { return colorToRgb(val); }\n  if (/\\s/g.test(val)) { return val; }\n  var originalUnit = getUnit(val);\n  var unitLess = originalUnit ? val.substr(0, val.length - originalUnit.length) : val;\n  if (unit) { return unitLess + unit; }\n  return unitLess;\n}\n\n// getTotalLength() equivalent for circle, rect, polyline, polygon and line shapes\n// adapted from https://gist.github.com/SebLambla/3e0550c496c236709744\n\nfunction getDistance(p1, p2) {\n  return Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2));\n}\n\nfunction getCircleLength(el) {\n  return Math.PI * 2 * getAttribute(el, 'r');\n}\n\nfunction getRectLength(el) {\n  return (getAttribute(el, 'width') * 2) + (getAttribute(el, 'height') * 2);\n}\n\nfunction getLineLength(el) {\n  return getDistance(\n    {x: getAttribute(el, 'x1'), y: getAttribute(el, 'y1')}, \n    {x: getAttribute(el, 'x2'), y: getAttribute(el, 'y2')}\n  );\n}\n\nfunction getPolylineLength(el) {\n  var points = el.points;\n  var totalLength = 0;\n  var previousPos;\n  for (var i = 0 ; i < points.numberOfItems; i++) {\n    var currentPos = points.getItem(i);\n    if (i > 0) { totalLength += getDistance(previousPos, currentPos); }\n    previousPos = currentPos;\n  }\n  return totalLength;\n}\n\nfunction getPolygonLength(el) {\n  var points = el.points;\n  return getPolylineLength(el) + getDistance(points.getItem(points.numberOfItems - 1), points.getItem(0));\n}\n\n// Path animation\n\nfunction getTotalLength(el) {\n  if (el.getTotalLength) { return el.getTotalLength(); }\n  switch(el.tagName.toLowerCase()) {\n    case 'circle': return getCircleLength(el);\n    case 'rect': return getRectLength(el);\n    case 'line': return getLineLength(el);\n    case 'polyline': return getPolylineLength(el);\n    case 'polygon': return getPolygonLength(el);\n  }\n}\n\nfunction setDashoffset(el) {\n  var pathLength = getTotalLength(el);\n  el.setAttribute('stroke-dasharray', pathLength);\n  return pathLength;\n}\n\n// Motion path\n\nfunction getParentSvgEl(el) {\n  var parentEl = el.parentNode;\n  while (is.svg(parentEl)) {\n    if (!is.svg(parentEl.parentNode)) { break; }\n    parentEl = parentEl.parentNode;\n  }\n  return parentEl;\n}\n\nfunction getParentSvg(pathEl, svgData) {\n  var svg = svgData || {};\n  var parentSvgEl = svg.el || getParentSvgEl(pathEl);\n  var rect = parentSvgEl.getBoundingClientRect();\n  var viewBoxAttr = getAttribute(parentSvgEl, 'viewBox');\n  var width = rect.width;\n  var height = rect.height;\n  var viewBox = svg.viewBox || (viewBoxAttr ? viewBoxAttr.split(' ') : [0, 0, width, height]);\n  return {\n    el: parentSvgEl,\n    viewBox: viewBox,\n    x: viewBox[0] / 1,\n    y: viewBox[1] / 1,\n    w: width,\n    h: height,\n    vW: viewBox[2],\n    vH: viewBox[3]\n  }\n}\n\nfunction getPath(path, percent) {\n  var pathEl = is.str(path) ? selectString(path)[0] : path;\n  var p = percent || 100;\n  return function(property) {\n    return {\n      property: property,\n      el: pathEl,\n      svg: getParentSvg(pathEl),\n      totalLength: getTotalLength(pathEl) * (p / 100)\n    }\n  }\n}\n\nfunction getPathProgress(path, progress, isPathTargetInsideSVG) {\n  function point(offset) {\n    if ( offset === void 0 ) offset = 0;\n\n    var l = progress + offset >= 1 ? progress + offset : 0;\n    return path.el.getPointAtLength(l);\n  }\n  var svg = getParentSvg(path.el, path.svg);\n  var p = point();\n  var p0 = point(-1);\n  var p1 = point(+1);\n  var scaleX = isPathTargetInsideSVG ? 1 : svg.w / svg.vW;\n  var scaleY = isPathTargetInsideSVG ? 1 : svg.h / svg.vH;\n  switch (path.property) {\n    case 'x': return (p.x - svg.x) * scaleX;\n    case 'y': return (p.y - svg.y) * scaleY;\n    case 'angle': return Math.atan2(p1.y - p0.y, p1.x - p0.x) * 180 / Math.PI;\n  }\n}\n\n// Decompose value\n\nfunction decomposeValue(val, unit) {\n  // const rgx = /-?\\d*\\.?\\d+/g; // handles basic numbers\n  // const rgx = /[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?/g; // handles exponents notation\n  var rgx = /[+-]?\\d*\\.?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?/g; // handles exponents notation\n  var value = validateValue((is.pth(val) ? val.totalLength : val), unit) + '';\n  return {\n    original: value,\n    numbers: value.match(rgx) ? value.match(rgx).map(Number) : [0],\n    strings: (is.str(val) || unit) ? value.split(rgx) : []\n  }\n}\n\n// Animatables\n\nfunction parseTargets(targets) {\n  var targetsArray = targets ? (flattenArray(is.arr(targets) ? targets.map(toArray) : toArray(targets))) : [];\n  return filterArray(targetsArray, function (item, pos, self) { return self.indexOf(item) === pos; });\n}\n\nfunction getAnimatables(targets) {\n  var parsed = parseTargets(targets);\n  return parsed.map(function (t, i) {\n    return {target: t, id: i, total: parsed.length, transforms: { list: getElementTransforms(t) } };\n  });\n}\n\n// Properties\n\nfunction normalizePropertyTweens(prop, tweenSettings) {\n  var settings = cloneObject(tweenSettings);\n  // Override duration if easing is a spring\n  if (/^spring/.test(settings.easing)) { settings.duration = spring(settings.easing); }\n  if (is.arr(prop)) {\n    var l = prop.length;\n    var isFromTo = (l === 2 && !is.obj(prop[0]));\n    if (!isFromTo) {\n      // Duration divided by the number of tweens\n      if (!is.fnc(tweenSettings.duration)) { settings.duration = tweenSettings.duration / l; }\n    } else {\n      // Transform [from, to] values shorthand to a valid tween value\n      prop = {value: prop};\n    }\n  }\n  var propArray = is.arr(prop) ? prop : [prop];\n  return propArray.map(function (v, i) {\n    var obj = (is.obj(v) && !is.pth(v)) ? v : {value: v};\n    // Default delay value should only be applied to the first tween\n    if (is.und(obj.delay)) { obj.delay = !i ? tweenSettings.delay : 0; }\n    // Default endDelay value should only be applied to the last tween\n    if (is.und(obj.endDelay)) { obj.endDelay = i === propArray.length - 1 ? tweenSettings.endDelay : 0; }\n    return obj;\n  }).map(function (k) { return mergeObjects(k, settings); });\n}\n\n\nfunction flattenKeyframes(keyframes) {\n  var propertyNames = filterArray(flattenArray(keyframes.map(function (key) { return Object.keys(key); })), function (p) { return is.key(p); })\n  .reduce(function (a,b) { if (a.indexOf(b) < 0) { a.push(b); } return a; }, []);\n  var properties = {};\n  var loop = function ( i ) {\n    var propName = propertyNames[i];\n    properties[propName] = keyframes.map(function (key) {\n      var newKey = {};\n      for (var p in key) {\n        if (is.key(p)) {\n          if (p == propName) { newKey.value = key[p]; }\n        } else {\n          newKey[p] = key[p];\n        }\n      }\n      return newKey;\n    });\n  };\n\n  for (var i = 0; i < propertyNames.length; i++) loop( i );\n  return properties;\n}\n\nfunction getProperties(tweenSettings, params) {\n  var properties = [];\n  var keyframes = params.keyframes;\n  if (keyframes) { params = mergeObjects(flattenKeyframes(keyframes), params); }\n  for (var p in params) {\n    if (is.key(p)) {\n      properties.push({\n        name: p,\n        tweens: normalizePropertyTweens(params[p], tweenSettings)\n      });\n    }\n  }\n  return properties;\n}\n\n// Tweens\n\nfunction normalizeTweenValues(tween, animatable) {\n  var t = {};\n  for (var p in tween) {\n    var value = getFunctionValue(tween[p], animatable);\n    if (is.arr(value)) {\n      value = value.map(function (v) { return getFunctionValue(v, animatable); });\n      if (value.length === 1) { value = value[0]; }\n    }\n    t[p] = value;\n  }\n  t.duration = parseFloat(t.duration);\n  t.delay = parseFloat(t.delay);\n  return t;\n}\n\nfunction normalizeTweens(prop, animatable) {\n  var previousTween;\n  return prop.tweens.map(function (t) {\n    var tween = normalizeTweenValues(t, animatable);\n    var tweenValue = tween.value;\n    var to = is.arr(tweenValue) ? tweenValue[1] : tweenValue;\n    var toUnit = getUnit(to);\n    var originalValue = getOriginalTargetValue(animatable.target, prop.name, toUnit, animatable);\n    var previousValue = previousTween ? previousTween.to.original : originalValue;\n    var from = is.arr(tweenValue) ? tweenValue[0] : previousValue;\n    var fromUnit = getUnit(from) || getUnit(originalValue);\n    var unit = toUnit || fromUnit;\n    if (is.und(to)) { to = previousValue; }\n    tween.from = decomposeValue(from, unit);\n    tween.to = decomposeValue(getRelativeValue(to, from), unit);\n    tween.start = previousTween ? previousTween.end : 0;\n    tween.end = tween.start + tween.delay + tween.duration + tween.endDelay;\n    tween.easing = parseEasings(tween.easing, tween.duration);\n    tween.isPath = is.pth(tweenValue);\n    tween.isPathTargetInsideSVG = tween.isPath && is.svg(animatable.target);\n    tween.isColor = is.col(tween.from.original);\n    if (tween.isColor) { tween.round = 1; }\n    previousTween = tween;\n    return tween;\n  });\n}\n\n// Tween progress\n\nvar setProgressValue = {\n  css: function (t, p, v) { return t.style[p] = v; },\n  attribute: function (t, p, v) { return t.setAttribute(p, v); },\n  object: function (t, p, v) { return t[p] = v; },\n  transform: function (t, p, v, transforms, manual) {\n    transforms.list.set(p, v);\n    if (p === transforms.last || manual) {\n      var str = '';\n      transforms.list.forEach(function (value, prop) { str += prop + \"(\" + value + \") \"; });\n      t.style.transform = str;\n    }\n  }\n};\n\n// Set Value helper\n\nfunction setTargetsValue(targets, properties) {\n  var animatables = getAnimatables(targets);\n  animatables.forEach(function (animatable) {\n    for (var property in properties) {\n      var value = getFunctionValue(properties[property], animatable);\n      var target = animatable.target;\n      var valueUnit = getUnit(value);\n      var originalValue = getOriginalTargetValue(target, property, valueUnit, animatable);\n      var unit = valueUnit || getUnit(originalValue);\n      var to = getRelativeValue(validateValue(value, unit), originalValue);\n      var animType = getAnimationType(target, property);\n      setProgressValue[animType](target, property, to, animatable.transforms, true);\n    }\n  });\n}\n\n// Animations\n\nfunction createAnimation(animatable, prop) {\n  var animType = getAnimationType(animatable.target, prop.name);\n  if (animType) {\n    var tweens = normalizeTweens(prop, animatable);\n    var lastTween = tweens[tweens.length - 1];\n    return {\n      type: animType,\n      property: prop.name,\n      animatable: animatable,\n      tweens: tweens,\n      duration: lastTween.end,\n      delay: tweens[0].delay,\n      endDelay: lastTween.endDelay\n    }\n  }\n}\n\nfunction getAnimations(animatables, properties) {\n  return filterArray(flattenArray(animatables.map(function (animatable) {\n    return properties.map(function (prop) {\n      return createAnimation(animatable, prop);\n    });\n  })), function (a) { return !is.und(a); });\n}\n\n// Create Instance\n\nfunction getInstanceTimings(animations, tweenSettings) {\n  var animLength = animations.length;\n  var getTlOffset = function (anim) { return anim.timelineOffset ? anim.timelineOffset : 0; };\n  var timings = {};\n  timings.duration = animLength ? Math.max.apply(Math, animations.map(function (anim) { return getTlOffset(anim) + anim.duration; })) : tweenSettings.duration;\n  timings.delay = animLength ? Math.min.apply(Math, animations.map(function (anim) { return getTlOffset(anim) + anim.delay; })) : tweenSettings.delay;\n  timings.endDelay = animLength ? timings.duration - Math.max.apply(Math, animations.map(function (anim) { return getTlOffset(anim) + anim.duration - anim.endDelay; })) : tweenSettings.endDelay;\n  return timings;\n}\n\nvar instanceID = 0;\n\nfunction createNewInstance(params) {\n  var instanceSettings = replaceObjectProps(defaultInstanceSettings, params);\n  var tweenSettings = replaceObjectProps(defaultTweenSettings, params);\n  var properties = getProperties(tweenSettings, params);\n  var animatables = getAnimatables(params.targets);\n  var animations = getAnimations(animatables, properties);\n  var timings = getInstanceTimings(animations, tweenSettings);\n  var id = instanceID;\n  instanceID++;\n  return mergeObjects(instanceSettings, {\n    id: id,\n    children: [],\n    animatables: animatables,\n    animations: animations,\n    duration: timings.duration,\n    delay: timings.delay,\n    endDelay: timings.endDelay\n  });\n}\n\n// Core\n\nvar activeInstances = [];\n\nvar engine = (function () {\n  var raf;\n\n  function play() {\n    if (!raf && (!isDocumentHidden() || !anime.suspendWhenDocumentHidden) && activeInstances.length > 0) {\n      raf = requestAnimationFrame(step);\n    }\n  }\n  function step(t) {\n    // memo on algorithm issue:\n    // dangerous iteration over mutable `activeInstances`\n    // (that collection may be updated from within callbacks of `tick`-ed animation instances)\n    var activeInstancesLength = activeInstances.length;\n    var i = 0;\n    while (i < activeInstancesLength) {\n      var activeInstance = activeInstances[i];\n      if (!activeInstance.paused) {\n        activeInstance.tick(t);\n        i++;\n      } else {\n        activeInstances.splice(i, 1);\n        activeInstancesLength--;\n      }\n    }\n    raf = i > 0 ? requestAnimationFrame(step) : undefined;\n  }\n\n  function handleVisibilityChange() {\n    if (!anime.suspendWhenDocumentHidden) { return; }\n\n    if (isDocumentHidden()) {\n      // suspend ticks\n      raf = cancelAnimationFrame(raf);\n    } else { // is back to active tab\n      // first adjust animations to consider the time that ticks were suspended\n      activeInstances.forEach(\n        function (instance) { return instance ._onDocumentVisibility(); }\n      );\n      engine();\n    }\n  }\n  if (typeof document !== 'undefined') {\n    document.addEventListener('visibilitychange', handleVisibilityChange);\n  }\n\n  return play;\n})();\n\nfunction isDocumentHidden() {\n  return !!document && document.hidden;\n}\n\n// Public Instance\n\nfunction anime(params) {\n  if ( params === void 0 ) params = {};\n\n\n  var startTime = 0, lastTime = 0, now = 0;\n  var children, childrenLength = 0;\n  var resolve = null;\n\n  function makePromise(instance) {\n    var promise = window.Promise && new Promise(function (_resolve) { return resolve = _resolve; });\n    instance.finished = promise;\n    return promise;\n  }\n\n  var instance = createNewInstance(params);\n  var promise = makePromise(instance);\n\n  function toggleInstanceDirection() {\n    var direction = instance.direction;\n    if (direction !== 'alternate') {\n      instance.direction = direction !== 'normal' ? 'normal' : 'reverse';\n    }\n    instance.reversed = !instance.reversed;\n    children.forEach(function (child) { return child.reversed = instance.reversed; });\n  }\n\n  function adjustTime(time) {\n    return instance.reversed ? instance.duration - time : time;\n  }\n\n  function resetTime() {\n    startTime = 0;\n    lastTime = adjustTime(instance.currentTime) * (1 / anime.speed);\n  }\n\n  function seekChild(time, child) {\n    if (child) { child.seek(time - child.timelineOffset); }\n  }\n\n  function syncInstanceChildren(time) {\n    if (!instance.reversePlayback) {\n      for (var i = 0; i < childrenLength; i++) { seekChild(time, children[i]); }\n    } else {\n      for (var i$1 = childrenLength; i$1--;) { seekChild(time, children[i$1]); }\n    }\n  }\n\n  function setAnimationsProgress(insTime) {\n    var i = 0;\n    var animations = instance.animations;\n    var animationsLength = animations.length;\n    while (i < animationsLength) {\n      var anim = animations[i];\n      var animatable = anim.animatable;\n      var tweens = anim.tweens;\n      var tweenLength = tweens.length - 1;\n      var tween = tweens[tweenLength];\n      // Only check for keyframes if there is more than one tween\n      if (tweenLength) { tween = filterArray(tweens, function (t) { return (insTime < t.end); })[0] || tween; }\n      var elapsed = minMax(insTime - tween.start - tween.delay, 0, tween.duration) / tween.duration;\n      var eased = isNaN(elapsed) ? 1 : tween.easing(elapsed);\n      var strings = tween.to.strings;\n      var round = tween.round;\n      var numbers = [];\n      var toNumbersLength = tween.to.numbers.length;\n      var progress = (void 0);\n      for (var n = 0; n < toNumbersLength; n++) {\n        var value = (void 0);\n        var toNumber = tween.to.numbers[n];\n        var fromNumber = tween.from.numbers[n] || 0;\n        if (!tween.isPath) {\n          value = fromNumber + (eased * (toNumber - fromNumber));\n        } else {\n          value = getPathProgress(tween.value, eased * toNumber, tween.isPathTargetInsideSVG);\n        }\n        if (round) {\n          if (!(tween.isColor && n > 2)) {\n            value = Math.round(value * round) / round;\n          }\n        }\n        numbers.push(value);\n      }\n      // Manual Array.reduce for better performances\n      var stringsLength = strings.length;\n      if (!stringsLength) {\n        progress = numbers[0];\n      } else {\n        progress = strings[0];\n        for (var s = 0; s < stringsLength; s++) {\n          var a = strings[s];\n          var b = strings[s + 1];\n          var n$1 = numbers[s];\n          if (!isNaN(n$1)) {\n            if (!b) {\n              progress += n$1 + ' ';\n            } else {\n              progress += n$1 + b;\n            }\n          }\n        }\n      }\n      setProgressValue[anim.type](animatable.target, anim.property, progress, animatable.transforms);\n      anim.currentValue = progress;\n      i++;\n    }\n  }\n\n  function setCallback(cb) {\n    if (instance[cb] && !instance.passThrough) { instance[cb](instance); }\n  }\n\n  function countIteration() {\n    if (instance.remaining && instance.remaining !== true) {\n      instance.remaining--;\n    }\n  }\n\n  function setInstanceProgress(engineTime) {\n    var insDuration = instance.duration;\n    var insDelay = instance.delay;\n    var insEndDelay = insDuration - instance.endDelay;\n    var insTime = adjustTime(engineTime);\n    instance.progress = minMax((insTime / insDuration) * 100, 0, 100);\n    instance.reversePlayback = insTime < instance.currentTime;\n    if (children) { syncInstanceChildren(insTime); }\n    if (!instance.began && instance.currentTime > 0) {\n      instance.began = true;\n      setCallback('begin');\n    }\n    if (!instance.loopBegan && instance.currentTime > 0) {\n      instance.loopBegan = true;\n      setCallback('loopBegin');\n    }\n    if (insTime <= insDelay && instance.currentTime !== 0) {\n      setAnimationsProgress(0);\n    }\n    if ((insTime >= insEndDelay && instance.currentTime !== insDuration) || !insDuration) {\n      setAnimationsProgress(insDuration);\n    }\n    if (insTime > insDelay && insTime < insEndDelay) {\n      if (!instance.changeBegan) {\n        instance.changeBegan = true;\n        instance.changeCompleted = false;\n        setCallback('changeBegin');\n      }\n      setCallback('change');\n      setAnimationsProgress(insTime);\n    } else {\n      if (instance.changeBegan) {\n        instance.changeCompleted = true;\n        instance.changeBegan = false;\n        setCallback('changeComplete');\n      }\n    }\n    instance.currentTime = minMax(insTime, 0, insDuration);\n    if (instance.began) { setCallback('update'); }\n    if (engineTime >= insDuration) {\n      lastTime = 0;\n      countIteration();\n      if (!instance.remaining) {\n        instance.paused = true;\n        if (!instance.completed) {\n          instance.completed = true;\n          setCallback('loopComplete');\n          setCallback('complete');\n          if (!instance.passThrough && 'Promise' in window) {\n            resolve();\n            promise = makePromise(instance);\n          }\n        }\n      } else {\n        startTime = now;\n        setCallback('loopComplete');\n        instance.loopBegan = false;\n        if (instance.direction === 'alternate') {\n          toggleInstanceDirection();\n        }\n      }\n    }\n  }\n\n  instance.reset = function() {\n    var direction = instance.direction;\n    instance.passThrough = false;\n    instance.currentTime = 0;\n    instance.progress = 0;\n    instance.paused = true;\n    instance.began = false;\n    instance.loopBegan = false;\n    instance.changeBegan = false;\n    instance.completed = false;\n    instance.changeCompleted = false;\n    instance.reversePlayback = false;\n    instance.reversed = direction === 'reverse';\n    instance.remaining = instance.loop;\n    children = instance.children;\n    childrenLength = children.length;\n    for (var i = childrenLength; i--;) { instance.children[i].reset(); }\n    if (instance.reversed && instance.loop !== true || (direction === 'alternate' && instance.loop === 1)) { instance.remaining++; }\n    setAnimationsProgress(instance.reversed ? instance.duration : 0);\n  };\n\n  // internal method (for engine) to adjust animation timings before restoring engine ticks (rAF)\n  instance._onDocumentVisibility = resetTime;\n\n  // Set Value helper\n\n  instance.set = function(targets, properties) {\n    setTargetsValue(targets, properties);\n    return instance;\n  };\n\n  instance.tick = function(t) {\n    now = t;\n    if (!startTime) { startTime = now; }\n    setInstanceProgress((now + (lastTime - startTime)) * anime.speed);\n  };\n\n  instance.seek = function(time) {\n    setInstanceProgress(adjustTime(time));\n  };\n\n  instance.pause = function() {\n    instance.paused = true;\n    resetTime();\n  };\n\n  instance.play = function() {\n    if (!instance.paused) { return; }\n    if (instance.completed) { instance.reset(); }\n    instance.paused = false;\n    activeInstances.push(instance);\n    resetTime();\n    engine();\n  };\n\n  instance.reverse = function() {\n    toggleInstanceDirection();\n    instance.completed = instance.reversed ? false : true;\n    resetTime();\n  };\n\n  instance.restart = function() {\n    instance.reset();\n    instance.play();\n  };\n\n  instance.remove = function(targets) {\n    var targetsArray = parseTargets(targets);\n    removeTargetsFromInstance(targetsArray, instance);\n  };\n\n  instance.reset();\n\n  if (instance.autoplay) { instance.play(); }\n\n  return instance;\n\n}\n\n// Remove targets from animation\n\nfunction removeTargetsFromAnimations(targetsArray, animations) {\n  for (var a = animations.length; a--;) {\n    if (arrayContains(targetsArray, animations[a].animatable.target)) {\n      animations.splice(a, 1);\n    }\n  }\n}\n\nfunction removeTargetsFromInstance(targetsArray, instance) {\n  var animations = instance.animations;\n  var children = instance.children;\n  removeTargetsFromAnimations(targetsArray, animations);\n  for (var c = children.length; c--;) {\n    var child = children[c];\n    var childAnimations = child.animations;\n    removeTargetsFromAnimations(targetsArray, childAnimations);\n    if (!childAnimations.length && !child.children.length) { children.splice(c, 1); }\n  }\n  if (!animations.length && !children.length) { instance.pause(); }\n}\n\nfunction removeTargetsFromActiveInstances(targets) {\n  var targetsArray = parseTargets(targets);\n  for (var i = activeInstances.length; i--;) {\n    var instance = activeInstances[i];\n    removeTargetsFromInstance(targetsArray, instance);\n  }\n}\n\n// Stagger helpers\n\nfunction stagger(val, params) {\n  if ( params === void 0 ) params = {};\n\n  var direction = params.direction || 'normal';\n  var easing = params.easing ? parseEasings(params.easing) : null;\n  var grid = params.grid;\n  var axis = params.axis;\n  var fromIndex = params.from || 0;\n  var fromFirst = fromIndex === 'first';\n  var fromCenter = fromIndex === 'center';\n  var fromLast = fromIndex === 'last';\n  var isRange = is.arr(val);\n  var val1 = isRange ? parseFloat(val[0]) : parseFloat(val);\n  var val2 = isRange ? parseFloat(val[1]) : 0;\n  var unit = getUnit(isRange ? val[1] : val) || 0;\n  var start = params.start || 0 + (isRange ? val1 : 0);\n  var values = [];\n  var maxValue = 0;\n  return function (el, i, t) {\n    if (fromFirst) { fromIndex = 0; }\n    if (fromCenter) { fromIndex = (t - 1) / 2; }\n    if (fromLast) { fromIndex = t - 1; }\n    if (!values.length) {\n      for (var index = 0; index < t; index++) {\n        if (!grid) {\n          values.push(Math.abs(fromIndex - index));\n        } else {\n          var fromX = !fromCenter ? fromIndex%grid[0] : (grid[0]-1)/2;\n          var fromY = !fromCenter ? Math.floor(fromIndex/grid[0]) : (grid[1]-1)/2;\n          var toX = index%grid[0];\n          var toY = Math.floor(index/grid[0]);\n          var distanceX = fromX - toX;\n          var distanceY = fromY - toY;\n          var value = Math.sqrt(distanceX * distanceX + distanceY * distanceY);\n          if (axis === 'x') { value = -distanceX; }\n          if (axis === 'y') { value = -distanceY; }\n          values.push(value);\n        }\n        maxValue = Math.max.apply(Math, values);\n      }\n      if (easing) { values = values.map(function (val) { return easing(val / maxValue) * maxValue; }); }\n      if (direction === 'reverse') { values = values.map(function (val) { return axis ? (val < 0) ? val * -1 : -val : Math.abs(maxValue - val); }); }\n    }\n    var spacing = isRange ? (val2 - val1) / maxValue : val1;\n    return start + (spacing * (Math.round(values[i] * 100) / 100)) + unit;\n  }\n}\n\n// Timeline\n\nfunction timeline(params) {\n  if ( params === void 0 ) params = {};\n\n  var tl = anime(params);\n  tl.duration = 0;\n  tl.add = function(instanceParams, timelineOffset) {\n    var tlIndex = activeInstances.indexOf(tl);\n    var children = tl.children;\n    if (tlIndex > -1) { activeInstances.splice(tlIndex, 1); }\n    function passThrough(ins) { ins.passThrough = true; }\n    for (var i = 0; i < children.length; i++) { passThrough(children[i]); }\n    var insParams = mergeObjects(instanceParams, replaceObjectProps(defaultTweenSettings, params));\n    insParams.targets = insParams.targets || params.targets;\n    var tlDuration = tl.duration;\n    insParams.autoplay = false;\n    insParams.direction = tl.direction;\n    insParams.timelineOffset = is.und(timelineOffset) ? tlDuration : getRelativeValue(timelineOffset, tlDuration);\n    passThrough(tl);\n    tl.seek(insParams.timelineOffset);\n    var ins = anime(insParams);\n    passThrough(ins);\n    children.push(ins);\n    var timings = getInstanceTimings(children, params);\n    tl.delay = timings.delay;\n    tl.endDelay = timings.endDelay;\n    tl.duration = timings.duration;\n    tl.seek(0);\n    tl.reset();\n    if (tl.autoplay) { tl.play(); }\n    return tl;\n  };\n  return tl;\n}\n\nanime.version = '3.2.1';\nanime.speed = 1;\n// TODO:#review: naming, documentation\nanime.suspendWhenDocumentHidden = true;\nanime.running = activeInstances;\nanime.remove = removeTargetsFromActiveInstances;\nanime.get = getOriginalTargetValue;\nanime.set = setTargetsValue;\nanime.convertPx = convertPxToUnit;\nanime.path = getPath;\nanime.setDashoffset = setDashoffset;\nanime.stagger = stagger;\nanime.timeline = timeline;\nanime.easing = parseEasings;\nanime.penner = penner;\nanime.random = function (min, max) { return Math.floor(Math.random() * (max - min + 1)) + min; };\n\nexport default anime;\n", "var __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __markAsModule = (target) => __defProp(target, \"__esModule\", {value: true});\nvar __commonJS = (callback, module) => () => {\n  if (!module) {\n    module = {exports: {}};\n    callback(module.exports, module);\n  }\n  return module.exports;\n};\nvar __exportStar = (target, module, desc) => {\n  if (module && typeof module === \"object\" || typeof module === \"function\") {\n    for (let key of __getOwnPropNames(module))\n      if (!__hasOwnProp.call(target, key) && key !== \"default\")\n        __defProp(target, key, {get: () => module[key], enumerable: !(desc = __getOwnPropDesc(module, key)) || desc.enumerable});\n  }\n  return target;\n};\nvar __toModule = (module) => {\n  return __exportStar(__markAsModule(__defProp(module != null ? __create(__getProtoOf(module)) : {}, \"default\", module && module.__esModule && \"default\" in module ? {get: () => module.default, enumerable: true} : {value: module, enumerable: true})), module);\n};\n\n// node_modules/@vue/shared/dist/shared.cjs.js\nvar require_shared_cjs = __commonJS((exports) => {\n  \"use strict\";\n  Object.defineProperty(exports, \"__esModule\", {value: true});\n  function makeMap(str, expectsLowerCase) {\n    const map = Object.create(null);\n    const list = str.split(\",\");\n    for (let i = 0; i < list.length; i++) {\n      map[list[i]] = true;\n    }\n    return expectsLowerCase ? (val) => !!map[val.toLowerCase()] : (val) => !!map[val];\n  }\n  var PatchFlagNames = {\n    [1]: `TEXT`,\n    [2]: `CLASS`,\n    [4]: `STYLE`,\n    [8]: `PROPS`,\n    [16]: `FULL_PROPS`,\n    [32]: `HYDRATE_EVENTS`,\n    [64]: `STABLE_FRAGMENT`,\n    [128]: `KEYED_FRAGMENT`,\n    [256]: `UNKEYED_FRAGMENT`,\n    [512]: `NEED_PATCH`,\n    [1024]: `DYNAMIC_SLOTS`,\n    [2048]: `DEV_ROOT_FRAGMENT`,\n    [-1]: `HOISTED`,\n    [-2]: `BAIL`\n  };\n  var slotFlagsText = {\n    [1]: \"STABLE\",\n    [2]: \"DYNAMIC\",\n    [3]: \"FORWARDED\"\n  };\n  var GLOBALS_WHITE_LISTED = \"Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt\";\n  var isGloballyWhitelisted = /* @__PURE__ */ makeMap(GLOBALS_WHITE_LISTED);\n  var range = 2;\n  function generateCodeFrame(source, start2 = 0, end = source.length) {\n    const lines = source.split(/\\r?\\n/);\n    let count = 0;\n    const res = [];\n    for (let i = 0; i < lines.length; i++) {\n      count += lines[i].length + 1;\n      if (count >= start2) {\n        for (let j = i - range; j <= i + range || end > count; j++) {\n          if (j < 0 || j >= lines.length)\n            continue;\n          const line = j + 1;\n          res.push(`${line}${\" \".repeat(Math.max(3 - String(line).length, 0))}|  ${lines[j]}`);\n          const lineLength = lines[j].length;\n          if (j === i) {\n            const pad = start2 - (count - lineLength) + 1;\n            const length = Math.max(1, end > count ? lineLength - pad : end - start2);\n            res.push(`   |  ` + \" \".repeat(pad) + \"^\".repeat(length));\n          } else if (j > i) {\n            if (end > count) {\n              const length = Math.max(Math.min(end - count, lineLength), 1);\n              res.push(`   |  ` + \"^\".repeat(length));\n            }\n            count += lineLength + 1;\n          }\n        }\n        break;\n      }\n    }\n    return res.join(\"\\n\");\n  }\n  var specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;\n  var isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);\n  var isBooleanAttr2 = /* @__PURE__ */ makeMap(specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`);\n  var unsafeAttrCharRE = /[>/=\"'\\u0009\\u000a\\u000c\\u0020]/;\n  var attrValidationCache = {};\n  function isSSRSafeAttrName(name) {\n    if (attrValidationCache.hasOwnProperty(name)) {\n      return attrValidationCache[name];\n    }\n    const isUnsafe = unsafeAttrCharRE.test(name);\n    if (isUnsafe) {\n      console.error(`unsafe attribute name: ${name}`);\n    }\n    return attrValidationCache[name] = !isUnsafe;\n  }\n  var propsToAttrMap = {\n    acceptCharset: \"accept-charset\",\n    className: \"class\",\n    htmlFor: \"for\",\n    httpEquiv: \"http-equiv\"\n  };\n  var isNoUnitNumericStyleProp = /* @__PURE__ */ makeMap(`animation-iteration-count,border-image-outset,border-image-slice,border-image-width,box-flex,box-flex-group,box-ordinal-group,column-count,columns,flex,flex-grow,flex-positive,flex-shrink,flex-negative,flex-order,grid-row,grid-row-end,grid-row-span,grid-row-start,grid-column,grid-column-end,grid-column-span,grid-column-start,font-weight,line-clamp,line-height,opacity,order,orphans,tab-size,widows,z-index,zoom,fill-opacity,flood-opacity,stop-opacity,stroke-dasharray,stroke-dashoffset,stroke-miterlimit,stroke-opacity,stroke-width`);\n  var isKnownAttr = /* @__PURE__ */ makeMap(`accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap`);\n  function normalizeStyle(value) {\n    if (isArray(value)) {\n      const res = {};\n      for (let i = 0; i < value.length; i++) {\n        const item = value[i];\n        const normalized = normalizeStyle(isString(item) ? parseStringStyle(item) : item);\n        if (normalized) {\n          for (const key in normalized) {\n            res[key] = normalized[key];\n          }\n        }\n      }\n      return res;\n    } else if (isObject(value)) {\n      return value;\n    }\n  }\n  var listDelimiterRE = /;(?![^(]*\\))/g;\n  var propertyDelimiterRE = /:(.+)/;\n  function parseStringStyle(cssText) {\n    const ret = {};\n    cssText.split(listDelimiterRE).forEach((item) => {\n      if (item) {\n        const tmp = item.split(propertyDelimiterRE);\n        tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());\n      }\n    });\n    return ret;\n  }\n  function stringifyStyle(styles) {\n    let ret = \"\";\n    if (!styles) {\n      return ret;\n    }\n    for (const key in styles) {\n      const value = styles[key];\n      const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key);\n      if (isString(value) || typeof value === \"number\" && isNoUnitNumericStyleProp(normalizedKey)) {\n        ret += `${normalizedKey}:${value};`;\n      }\n    }\n    return ret;\n  }\n  function normalizeClass(value) {\n    let res = \"\";\n    if (isString(value)) {\n      res = value;\n    } else if (isArray(value)) {\n      for (let i = 0; i < value.length; i++) {\n        const normalized = normalizeClass(value[i]);\n        if (normalized) {\n          res += normalized + \" \";\n        }\n      }\n    } else if (isObject(value)) {\n      for (const name in value) {\n        if (value[name]) {\n          res += name + \" \";\n        }\n      }\n    }\n    return res.trim();\n  }\n  var HTML_TAGS = \"html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot\";\n  var SVG_TAGS = \"svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistanceLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view\";\n  var VOID_TAGS = \"area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr\";\n  var isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);\n  var isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);\n  var isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);\n  var escapeRE = /[\"'&<>]/;\n  function escapeHtml(string) {\n    const str = \"\" + string;\n    const match = escapeRE.exec(str);\n    if (!match) {\n      return str;\n    }\n    let html = \"\";\n    let escaped;\n    let index;\n    let lastIndex = 0;\n    for (index = match.index; index < str.length; index++) {\n      switch (str.charCodeAt(index)) {\n        case 34:\n          escaped = \"&quot;\";\n          break;\n        case 38:\n          escaped = \"&amp;\";\n          break;\n        case 39:\n          escaped = \"&#39;\";\n          break;\n        case 60:\n          escaped = \"&lt;\";\n          break;\n        case 62:\n          escaped = \"&gt;\";\n          break;\n        default:\n          continue;\n      }\n      if (lastIndex !== index) {\n        html += str.substring(lastIndex, index);\n      }\n      lastIndex = index + 1;\n      html += escaped;\n    }\n    return lastIndex !== index ? html + str.substring(lastIndex, index) : html;\n  }\n  var commentStripRE = /^-?>|<!--|-->|--!>|<!-$/g;\n  function escapeHtmlComment(src) {\n    return src.replace(commentStripRE, \"\");\n  }\n  function looseCompareArrays(a, b) {\n    if (a.length !== b.length)\n      return false;\n    let equal = true;\n    for (let i = 0; equal && i < a.length; i++) {\n      equal = looseEqual(a[i], b[i]);\n    }\n    return equal;\n  }\n  function looseEqual(a, b) {\n    if (a === b)\n      return true;\n    let aValidType = isDate(a);\n    let bValidType = isDate(b);\n    if (aValidType || bValidType) {\n      return aValidType && bValidType ? a.getTime() === b.getTime() : false;\n    }\n    aValidType = isArray(a);\n    bValidType = isArray(b);\n    if (aValidType || bValidType) {\n      return aValidType && bValidType ? looseCompareArrays(a, b) : false;\n    }\n    aValidType = isObject(a);\n    bValidType = isObject(b);\n    if (aValidType || bValidType) {\n      if (!aValidType || !bValidType) {\n        return false;\n      }\n      const aKeysCount = Object.keys(a).length;\n      const bKeysCount = Object.keys(b).length;\n      if (aKeysCount !== bKeysCount) {\n        return false;\n      }\n      for (const key in a) {\n        const aHasKey = a.hasOwnProperty(key);\n        const bHasKey = b.hasOwnProperty(key);\n        if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) {\n          return false;\n        }\n      }\n    }\n    return String(a) === String(b);\n  }\n  function looseIndexOf(arr, val) {\n    return arr.findIndex((item) => looseEqual(item, val));\n  }\n  var toDisplayString = (val) => {\n    return val == null ? \"\" : isObject(val) ? JSON.stringify(val, replacer, 2) : String(val);\n  };\n  var replacer = (_key, val) => {\n    if (isMap(val)) {\n      return {\n        [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val2]) => {\n          entries[`${key} =>`] = val2;\n          return entries;\n        }, {})\n      };\n    } else if (isSet(val)) {\n      return {\n        [`Set(${val.size})`]: [...val.values()]\n      };\n    } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) {\n      return String(val);\n    }\n    return val;\n  };\n  var babelParserDefaultPlugins = [\n    \"bigInt\",\n    \"optionalChaining\",\n    \"nullishCoalescingOperator\"\n  ];\n  var EMPTY_OBJ = Object.freeze({});\n  var EMPTY_ARR = Object.freeze([]);\n  var NOOP = () => {\n  };\n  var NO = () => false;\n  var onRE = /^on[^a-z]/;\n  var isOn = (key) => onRE.test(key);\n  var isModelListener = (key) => key.startsWith(\"onUpdate:\");\n  var extend = Object.assign;\n  var remove = (arr, el) => {\n    const i = arr.indexOf(el);\n    if (i > -1) {\n      arr.splice(i, 1);\n    }\n  };\n  var hasOwnProperty = Object.prototype.hasOwnProperty;\n  var hasOwn = (val, key) => hasOwnProperty.call(val, key);\n  var isArray = Array.isArray;\n  var isMap = (val) => toTypeString(val) === \"[object Map]\";\n  var isSet = (val) => toTypeString(val) === \"[object Set]\";\n  var isDate = (val) => val instanceof Date;\n  var isFunction = (val) => typeof val === \"function\";\n  var isString = (val) => typeof val === \"string\";\n  var isSymbol = (val) => typeof val === \"symbol\";\n  var isObject = (val) => val !== null && typeof val === \"object\";\n  var isPromise = (val) => {\n    return isObject(val) && isFunction(val.then) && isFunction(val.catch);\n  };\n  var objectToString = Object.prototype.toString;\n  var toTypeString = (value) => objectToString.call(value);\n  var toRawType = (value) => {\n    return toTypeString(value).slice(8, -1);\n  };\n  var isPlainObject = (val) => toTypeString(val) === \"[object Object]\";\n  var isIntegerKey = (key) => isString(key) && key !== \"NaN\" && key[0] !== \"-\" && \"\" + parseInt(key, 10) === key;\n  var isReservedProp = /* @__PURE__ */ makeMap(\",key,ref,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted\");\n  var cacheStringFunction = (fn) => {\n    const cache = Object.create(null);\n    return (str) => {\n      const hit = cache[str];\n      return hit || (cache[str] = fn(str));\n    };\n  };\n  var camelizeRE = /-(\\w)/g;\n  var camelize = cacheStringFunction((str) => {\n    return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : \"\");\n  });\n  var hyphenateRE = /\\B([A-Z])/g;\n  var hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, \"-$1\").toLowerCase());\n  var capitalize = cacheStringFunction((str) => str.charAt(0).toUpperCase() + str.slice(1));\n  var toHandlerKey = cacheStringFunction((str) => str ? `on${capitalize(str)}` : ``);\n  var hasChanged = (value, oldValue) => value !== oldValue && (value === value || oldValue === oldValue);\n  var invokeArrayFns = (fns, arg) => {\n    for (let i = 0; i < fns.length; i++) {\n      fns[i](arg);\n    }\n  };\n  var def = (obj, key, value) => {\n    Object.defineProperty(obj, key, {\n      configurable: true,\n      enumerable: false,\n      value\n    });\n  };\n  var toNumber = (val) => {\n    const n = parseFloat(val);\n    return isNaN(n) ? val : n;\n  };\n  var _globalThis;\n  var getGlobalThis = () => {\n    return _globalThis || (_globalThis = typeof globalThis !== \"undefined\" ? globalThis : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : {});\n  };\n  exports.EMPTY_ARR = EMPTY_ARR;\n  exports.EMPTY_OBJ = EMPTY_OBJ;\n  exports.NO = NO;\n  exports.NOOP = NOOP;\n  exports.PatchFlagNames = PatchFlagNames;\n  exports.babelParserDefaultPlugins = babelParserDefaultPlugins;\n  exports.camelize = camelize;\n  exports.capitalize = capitalize;\n  exports.def = def;\n  exports.escapeHtml = escapeHtml;\n  exports.escapeHtmlComment = escapeHtmlComment;\n  exports.extend = extend;\n  exports.generateCodeFrame = generateCodeFrame;\n  exports.getGlobalThis = getGlobalThis;\n  exports.hasChanged = hasChanged;\n  exports.hasOwn = hasOwn;\n  exports.hyphenate = hyphenate;\n  exports.invokeArrayFns = invokeArrayFns;\n  exports.isArray = isArray;\n  exports.isBooleanAttr = isBooleanAttr2;\n  exports.isDate = isDate;\n  exports.isFunction = isFunction;\n  exports.isGloballyWhitelisted = isGloballyWhitelisted;\n  exports.isHTMLTag = isHTMLTag;\n  exports.isIntegerKey = isIntegerKey;\n  exports.isKnownAttr = isKnownAttr;\n  exports.isMap = isMap;\n  exports.isModelListener = isModelListener;\n  exports.isNoUnitNumericStyleProp = isNoUnitNumericStyleProp;\n  exports.isObject = isObject;\n  exports.isOn = isOn;\n  exports.isPlainObject = isPlainObject;\n  exports.isPromise = isPromise;\n  exports.isReservedProp = isReservedProp;\n  exports.isSSRSafeAttrName = isSSRSafeAttrName;\n  exports.isSVGTag = isSVGTag;\n  exports.isSet = isSet;\n  exports.isSpecialBooleanAttr = isSpecialBooleanAttr;\n  exports.isString = isString;\n  exports.isSymbol = isSymbol;\n  exports.isVoidTag = isVoidTag;\n  exports.looseEqual = looseEqual;\n  exports.looseIndexOf = looseIndexOf;\n  exports.makeMap = makeMap;\n  exports.normalizeClass = normalizeClass;\n  exports.normalizeStyle = normalizeStyle;\n  exports.objectToString = objectToString;\n  exports.parseStringStyle = parseStringStyle;\n  exports.propsToAttrMap = propsToAttrMap;\n  exports.remove = remove;\n  exports.slotFlagsText = slotFlagsText;\n  exports.stringifyStyle = stringifyStyle;\n  exports.toDisplayString = toDisplayString;\n  exports.toHandlerKey = toHandlerKey;\n  exports.toNumber = toNumber;\n  exports.toRawType = toRawType;\n  exports.toTypeString = toTypeString;\n});\n\n// node_modules/@vue/shared/index.js\nvar require_shared = __commonJS((exports, module) => {\n  \"use strict\";\n  if (false) {\n    module.exports = null;\n  } else {\n    module.exports = require_shared_cjs();\n  }\n});\n\n// node_modules/@vue/reactivity/dist/reactivity.cjs.js\nvar require_reactivity_cjs = __commonJS((exports) => {\n  \"use strict\";\n  Object.defineProperty(exports, \"__esModule\", {value: true});\n  var shared = require_shared();\n  var targetMap = new WeakMap();\n  var effectStack = [];\n  var activeEffect;\n  var ITERATE_KEY = Symbol(\"iterate\");\n  var MAP_KEY_ITERATE_KEY = Symbol(\"Map key iterate\");\n  function isEffect(fn) {\n    return fn && fn._isEffect === true;\n  }\n  function effect3(fn, options = shared.EMPTY_OBJ) {\n    if (isEffect(fn)) {\n      fn = fn.raw;\n    }\n    const effect4 = createReactiveEffect(fn, options);\n    if (!options.lazy) {\n      effect4();\n    }\n    return effect4;\n  }\n  function stop2(effect4) {\n    if (effect4.active) {\n      cleanup(effect4);\n      if (effect4.options.onStop) {\n        effect4.options.onStop();\n      }\n      effect4.active = false;\n    }\n  }\n  var uid = 0;\n  function createReactiveEffect(fn, options) {\n    const effect4 = function reactiveEffect() {\n      if (!effect4.active) {\n        return fn();\n      }\n      if (!effectStack.includes(effect4)) {\n        cleanup(effect4);\n        try {\n          enableTracking();\n          effectStack.push(effect4);\n          activeEffect = effect4;\n          return fn();\n        } finally {\n          effectStack.pop();\n          resetTracking();\n          activeEffect = effectStack[effectStack.length - 1];\n        }\n      }\n    };\n    effect4.id = uid++;\n    effect4.allowRecurse = !!options.allowRecurse;\n    effect4._isEffect = true;\n    effect4.active = true;\n    effect4.raw = fn;\n    effect4.deps = [];\n    effect4.options = options;\n    return effect4;\n  }\n  function cleanup(effect4) {\n    const {deps} = effect4;\n    if (deps.length) {\n      for (let i = 0; i < deps.length; i++) {\n        deps[i].delete(effect4);\n      }\n      deps.length = 0;\n    }\n  }\n  var shouldTrack = true;\n  var trackStack = [];\n  function pauseTracking() {\n    trackStack.push(shouldTrack);\n    shouldTrack = false;\n  }\n  function enableTracking() {\n    trackStack.push(shouldTrack);\n    shouldTrack = true;\n  }\n  function resetTracking() {\n    const last = trackStack.pop();\n    shouldTrack = last === void 0 ? true : last;\n  }\n  function track(target, type, key) {\n    if (!shouldTrack || activeEffect === void 0) {\n      return;\n    }\n    let depsMap = targetMap.get(target);\n    if (!depsMap) {\n      targetMap.set(target, depsMap = new Map());\n    }\n    let dep = depsMap.get(key);\n    if (!dep) {\n      depsMap.set(key, dep = new Set());\n    }\n    if (!dep.has(activeEffect)) {\n      dep.add(activeEffect);\n      activeEffect.deps.push(dep);\n      if (activeEffect.options.onTrack) {\n        activeEffect.options.onTrack({\n          effect: activeEffect,\n          target,\n          type,\n          key\n        });\n      }\n    }\n  }\n  function trigger(target, type, key, newValue, oldValue, oldTarget) {\n    const depsMap = targetMap.get(target);\n    if (!depsMap) {\n      return;\n    }\n    const effects = new Set();\n    const add2 = (effectsToAdd) => {\n      if (effectsToAdd) {\n        effectsToAdd.forEach((effect4) => {\n          if (effect4 !== activeEffect || effect4.allowRecurse) {\n            effects.add(effect4);\n          }\n        });\n      }\n    };\n    if (type === \"clear\") {\n      depsMap.forEach(add2);\n    } else if (key === \"length\" && shared.isArray(target)) {\n      depsMap.forEach((dep, key2) => {\n        if (key2 === \"length\" || key2 >= newValue) {\n          add2(dep);\n        }\n      });\n    } else {\n      if (key !== void 0) {\n        add2(depsMap.get(key));\n      }\n      switch (type) {\n        case \"add\":\n          if (!shared.isArray(target)) {\n            add2(depsMap.get(ITERATE_KEY));\n            if (shared.isMap(target)) {\n              add2(depsMap.get(MAP_KEY_ITERATE_KEY));\n            }\n          } else if (shared.isIntegerKey(key)) {\n            add2(depsMap.get(\"length\"));\n          }\n          break;\n        case \"delete\":\n          if (!shared.isArray(target)) {\n            add2(depsMap.get(ITERATE_KEY));\n            if (shared.isMap(target)) {\n              add2(depsMap.get(MAP_KEY_ITERATE_KEY));\n            }\n          }\n          break;\n        case \"set\":\n          if (shared.isMap(target)) {\n            add2(depsMap.get(ITERATE_KEY));\n          }\n          break;\n      }\n    }\n    const run = (effect4) => {\n      if (effect4.options.onTrigger) {\n        effect4.options.onTrigger({\n          effect: effect4,\n          target,\n          key,\n          type,\n          newValue,\n          oldValue,\n          oldTarget\n        });\n      }\n      if (effect4.options.scheduler) {\n        effect4.options.scheduler(effect4);\n      } else {\n        effect4();\n      }\n    };\n    effects.forEach(run);\n  }\n  var isNonTrackableKeys = /* @__PURE__ */ shared.makeMap(`__proto__,__v_isRef,__isVue`);\n  var builtInSymbols = new Set(Object.getOwnPropertyNames(Symbol).map((key) => Symbol[key]).filter(shared.isSymbol));\n  var get2 = /* @__PURE__ */ createGetter();\n  var shallowGet = /* @__PURE__ */ createGetter(false, true);\n  var readonlyGet = /* @__PURE__ */ createGetter(true);\n  var shallowReadonlyGet = /* @__PURE__ */ createGetter(true, true);\n  var arrayInstrumentations = {};\n  [\"includes\", \"indexOf\", \"lastIndexOf\"].forEach((key) => {\n    const method = Array.prototype[key];\n    arrayInstrumentations[key] = function(...args) {\n      const arr = toRaw2(this);\n      for (let i = 0, l = this.length; i < l; i++) {\n        track(arr, \"get\", i + \"\");\n      }\n      const res = method.apply(arr, args);\n      if (res === -1 || res === false) {\n        return method.apply(arr, args.map(toRaw2));\n      } else {\n        return res;\n      }\n    };\n  });\n  [\"push\", \"pop\", \"shift\", \"unshift\", \"splice\"].forEach((key) => {\n    const method = Array.prototype[key];\n    arrayInstrumentations[key] = function(...args) {\n      pauseTracking();\n      const res = method.apply(this, args);\n      resetTracking();\n      return res;\n    };\n  });\n  function createGetter(isReadonly2 = false, shallow = false) {\n    return function get3(target, key, receiver) {\n      if (key === \"__v_isReactive\") {\n        return !isReadonly2;\n      } else if (key === \"__v_isReadonly\") {\n        return isReadonly2;\n      } else if (key === \"__v_raw\" && receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target)) {\n        return target;\n      }\n      const targetIsArray = shared.isArray(target);\n      if (!isReadonly2 && targetIsArray && shared.hasOwn(arrayInstrumentations, key)) {\n        return Reflect.get(arrayInstrumentations, key, receiver);\n      }\n      const res = Reflect.get(target, key, receiver);\n      if (shared.isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {\n        return res;\n      }\n      if (!isReadonly2) {\n        track(target, \"get\", key);\n      }\n      if (shallow) {\n        return res;\n      }\n      if (isRef(res)) {\n        const shouldUnwrap = !targetIsArray || !shared.isIntegerKey(key);\n        return shouldUnwrap ? res.value : res;\n      }\n      if (shared.isObject(res)) {\n        return isReadonly2 ? readonly(res) : reactive3(res);\n      }\n      return res;\n    };\n  }\n  var set2 = /* @__PURE__ */ createSetter();\n  var shallowSet = /* @__PURE__ */ createSetter(true);\n  function createSetter(shallow = false) {\n    return function set3(target, key, value, receiver) {\n      let oldValue = target[key];\n      if (!shallow) {\n        value = toRaw2(value);\n        oldValue = toRaw2(oldValue);\n        if (!shared.isArray(target) && isRef(oldValue) && !isRef(value)) {\n          oldValue.value = value;\n          return true;\n        }\n      }\n      const hadKey = shared.isArray(target) && shared.isIntegerKey(key) ? Number(key) < target.length : shared.hasOwn(target, key);\n      const result = Reflect.set(target, key, value, receiver);\n      if (target === toRaw2(receiver)) {\n        if (!hadKey) {\n          trigger(target, \"add\", key, value);\n        } else if (shared.hasChanged(value, oldValue)) {\n          trigger(target, \"set\", key, value, oldValue);\n        }\n      }\n      return result;\n    };\n  }\n  function deleteProperty(target, key) {\n    const hadKey = shared.hasOwn(target, key);\n    const oldValue = target[key];\n    const result = Reflect.deleteProperty(target, key);\n    if (result && hadKey) {\n      trigger(target, \"delete\", key, void 0, oldValue);\n    }\n    return result;\n  }\n  function has(target, key) {\n    const result = Reflect.has(target, key);\n    if (!shared.isSymbol(key) || !builtInSymbols.has(key)) {\n      track(target, \"has\", key);\n    }\n    return result;\n  }\n  function ownKeys(target) {\n    track(target, \"iterate\", shared.isArray(target) ? \"length\" : ITERATE_KEY);\n    return Reflect.ownKeys(target);\n  }\n  var mutableHandlers = {\n    get: get2,\n    set: set2,\n    deleteProperty,\n    has,\n    ownKeys\n  };\n  var readonlyHandlers = {\n    get: readonlyGet,\n    set(target, key) {\n      {\n        console.warn(`Set operation on key \"${String(key)}\" failed: target is readonly.`, target);\n      }\n      return true;\n    },\n    deleteProperty(target, key) {\n      {\n        console.warn(`Delete operation on key \"${String(key)}\" failed: target is readonly.`, target);\n      }\n      return true;\n    }\n  };\n  var shallowReactiveHandlers = shared.extend({}, mutableHandlers, {\n    get: shallowGet,\n    set: shallowSet\n  });\n  var shallowReadonlyHandlers = shared.extend({}, readonlyHandlers, {\n    get: shallowReadonlyGet\n  });\n  var toReactive = (value) => shared.isObject(value) ? reactive3(value) : value;\n  var toReadonly = (value) => shared.isObject(value) ? readonly(value) : value;\n  var toShallow = (value) => value;\n  var getProto = (v) => Reflect.getPrototypeOf(v);\n  function get$1(target, key, isReadonly2 = false, isShallow = false) {\n    target = target[\"__v_raw\"];\n    const rawTarget = toRaw2(target);\n    const rawKey = toRaw2(key);\n    if (key !== rawKey) {\n      !isReadonly2 && track(rawTarget, \"get\", key);\n    }\n    !isReadonly2 && track(rawTarget, \"get\", rawKey);\n    const {has: has2} = getProto(rawTarget);\n    const wrap = isShallow ? toShallow : isReadonly2 ? toReadonly : toReactive;\n    if (has2.call(rawTarget, key)) {\n      return wrap(target.get(key));\n    } else if (has2.call(rawTarget, rawKey)) {\n      return wrap(target.get(rawKey));\n    } else if (target !== rawTarget) {\n      target.get(key);\n    }\n  }\n  function has$1(key, isReadonly2 = false) {\n    const target = this[\"__v_raw\"];\n    const rawTarget = toRaw2(target);\n    const rawKey = toRaw2(key);\n    if (key !== rawKey) {\n      !isReadonly2 && track(rawTarget, \"has\", key);\n    }\n    !isReadonly2 && track(rawTarget, \"has\", rawKey);\n    return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);\n  }\n  function size(target, isReadonly2 = false) {\n    target = target[\"__v_raw\"];\n    !isReadonly2 && track(toRaw2(target), \"iterate\", ITERATE_KEY);\n    return Reflect.get(target, \"size\", target);\n  }\n  function add(value) {\n    value = toRaw2(value);\n    const target = toRaw2(this);\n    const proto = getProto(target);\n    const hadKey = proto.has.call(target, value);\n    if (!hadKey) {\n      target.add(value);\n      trigger(target, \"add\", value, value);\n    }\n    return this;\n  }\n  function set$1(key, value) {\n    value = toRaw2(value);\n    const target = toRaw2(this);\n    const {has: has2, get: get3} = getProto(target);\n    let hadKey = has2.call(target, key);\n    if (!hadKey) {\n      key = toRaw2(key);\n      hadKey = has2.call(target, key);\n    } else {\n      checkIdentityKeys(target, has2, key);\n    }\n    const oldValue = get3.call(target, key);\n    target.set(key, value);\n    if (!hadKey) {\n      trigger(target, \"add\", key, value);\n    } else if (shared.hasChanged(value, oldValue)) {\n      trigger(target, \"set\", key, value, oldValue);\n    }\n    return this;\n  }\n  function deleteEntry(key) {\n    const target = toRaw2(this);\n    const {has: has2, get: get3} = getProto(target);\n    let hadKey = has2.call(target, key);\n    if (!hadKey) {\n      key = toRaw2(key);\n      hadKey = has2.call(target, key);\n    } else {\n      checkIdentityKeys(target, has2, key);\n    }\n    const oldValue = get3 ? get3.call(target, key) : void 0;\n    const result = target.delete(key);\n    if (hadKey) {\n      trigger(target, \"delete\", key, void 0, oldValue);\n    }\n    return result;\n  }\n  function clear() {\n    const target = toRaw2(this);\n    const hadItems = target.size !== 0;\n    const oldTarget = shared.isMap(target) ? new Map(target) : new Set(target);\n    const result = target.clear();\n    if (hadItems) {\n      trigger(target, \"clear\", void 0, void 0, oldTarget);\n    }\n    return result;\n  }\n  function createForEach(isReadonly2, isShallow) {\n    return function forEach(callback, thisArg) {\n      const observed = this;\n      const target = observed[\"__v_raw\"];\n      const rawTarget = toRaw2(target);\n      const wrap = isShallow ? toShallow : isReadonly2 ? toReadonly : toReactive;\n      !isReadonly2 && track(rawTarget, \"iterate\", ITERATE_KEY);\n      return target.forEach((value, key) => {\n        return callback.call(thisArg, wrap(value), wrap(key), observed);\n      });\n    };\n  }\n  function createIterableMethod(method, isReadonly2, isShallow) {\n    return function(...args) {\n      const target = this[\"__v_raw\"];\n      const rawTarget = toRaw2(target);\n      const targetIsMap = shared.isMap(rawTarget);\n      const isPair = method === \"entries\" || method === Symbol.iterator && targetIsMap;\n      const isKeyOnly = method === \"keys\" && targetIsMap;\n      const innerIterator = target[method](...args);\n      const wrap = isShallow ? toShallow : isReadonly2 ? toReadonly : toReactive;\n      !isReadonly2 && track(rawTarget, \"iterate\", isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY);\n      return {\n        next() {\n          const {value, done} = innerIterator.next();\n          return done ? {value, done} : {\n            value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),\n            done\n          };\n        },\n        [Symbol.iterator]() {\n          return this;\n        }\n      };\n    };\n  }\n  function createReadonlyMethod(type) {\n    return function(...args) {\n      {\n        const key = args[0] ? `on key \"${args[0]}\" ` : ``;\n        console.warn(`${shared.capitalize(type)} operation ${key}failed: target is readonly.`, toRaw2(this));\n      }\n      return type === \"delete\" ? false : this;\n    };\n  }\n  var mutableInstrumentations = {\n    get(key) {\n      return get$1(this, key);\n    },\n    get size() {\n      return size(this);\n    },\n    has: has$1,\n    add,\n    set: set$1,\n    delete: deleteEntry,\n    clear,\n    forEach: createForEach(false, false)\n  };\n  var shallowInstrumentations = {\n    get(key) {\n      return get$1(this, key, false, true);\n    },\n    get size() {\n      return size(this);\n    },\n    has: has$1,\n    add,\n    set: set$1,\n    delete: deleteEntry,\n    clear,\n    forEach: createForEach(false, true)\n  };\n  var readonlyInstrumentations = {\n    get(key) {\n      return get$1(this, key, true);\n    },\n    get size() {\n      return size(this, true);\n    },\n    has(key) {\n      return has$1.call(this, key, true);\n    },\n    add: createReadonlyMethod(\"add\"),\n    set: createReadonlyMethod(\"set\"),\n    delete: createReadonlyMethod(\"delete\"),\n    clear: createReadonlyMethod(\"clear\"),\n    forEach: createForEach(true, false)\n  };\n  var shallowReadonlyInstrumentations = {\n    get(key) {\n      return get$1(this, key, true, true);\n    },\n    get size() {\n      return size(this, true);\n    },\n    has(key) {\n      return has$1.call(this, key, true);\n    },\n    add: createReadonlyMethod(\"add\"),\n    set: createReadonlyMethod(\"set\"),\n    delete: createReadonlyMethod(\"delete\"),\n    clear: createReadonlyMethod(\"clear\"),\n    forEach: createForEach(true, true)\n  };\n  var iteratorMethods = [\"keys\", \"values\", \"entries\", Symbol.iterator];\n  iteratorMethods.forEach((method) => {\n    mutableInstrumentations[method] = createIterableMethod(method, false, false);\n    readonlyInstrumentations[method] = createIterableMethod(method, true, false);\n    shallowInstrumentations[method] = createIterableMethod(method, false, true);\n    shallowReadonlyInstrumentations[method] = createIterableMethod(method, true, true);\n  });\n  function createInstrumentationGetter(isReadonly2, shallow) {\n    const instrumentations = shallow ? isReadonly2 ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly2 ? readonlyInstrumentations : mutableInstrumentations;\n    return (target, key, receiver) => {\n      if (key === \"__v_isReactive\") {\n        return !isReadonly2;\n      } else if (key === \"__v_isReadonly\") {\n        return isReadonly2;\n      } else if (key === \"__v_raw\") {\n        return target;\n      }\n      return Reflect.get(shared.hasOwn(instrumentations, key) && key in target ? instrumentations : target, key, receiver);\n    };\n  }\n  var mutableCollectionHandlers = {\n    get: createInstrumentationGetter(false, false)\n  };\n  var shallowCollectionHandlers = {\n    get: createInstrumentationGetter(false, true)\n  };\n  var readonlyCollectionHandlers = {\n    get: createInstrumentationGetter(true, false)\n  };\n  var shallowReadonlyCollectionHandlers = {\n    get: createInstrumentationGetter(true, true)\n  };\n  function checkIdentityKeys(target, has2, key) {\n    const rawKey = toRaw2(key);\n    if (rawKey !== key && has2.call(target, rawKey)) {\n      const type = shared.toRawType(target);\n      console.warn(`Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`);\n    }\n  }\n  var reactiveMap = new WeakMap();\n  var shallowReactiveMap = new WeakMap();\n  var readonlyMap = new WeakMap();\n  var shallowReadonlyMap = new WeakMap();\n  function targetTypeMap(rawType) {\n    switch (rawType) {\n      case \"Object\":\n      case \"Array\":\n        return 1;\n      case \"Map\":\n      case \"Set\":\n      case \"WeakMap\":\n      case \"WeakSet\":\n        return 2;\n      default:\n        return 0;\n    }\n  }\n  function getTargetType(value) {\n    return value[\"__v_skip\"] || !Object.isExtensible(value) ? 0 : targetTypeMap(shared.toRawType(value));\n  }\n  function reactive3(target) {\n    if (target && target[\"__v_isReadonly\"]) {\n      return target;\n    }\n    return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap);\n  }\n  function shallowReactive(target) {\n    return createReactiveObject(target, false, shallowReactiveHandlers, shallowCollectionHandlers, shallowReactiveMap);\n  }\n  function readonly(target) {\n    return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap);\n  }\n  function shallowReadonly(target) {\n    return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap);\n  }\n  function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {\n    if (!shared.isObject(target)) {\n      {\n        console.warn(`value cannot be made reactive: ${String(target)}`);\n      }\n      return target;\n    }\n    if (target[\"__v_raw\"] && !(isReadonly2 && target[\"__v_isReactive\"])) {\n      return target;\n    }\n    const existingProxy = proxyMap.get(target);\n    if (existingProxy) {\n      return existingProxy;\n    }\n    const targetType = getTargetType(target);\n    if (targetType === 0) {\n      return target;\n    }\n    const proxy = new Proxy(target, targetType === 2 ? collectionHandlers : baseHandlers);\n    proxyMap.set(target, proxy);\n    return proxy;\n  }\n  function isReactive2(value) {\n    if (isReadonly(value)) {\n      return isReactive2(value[\"__v_raw\"]);\n    }\n    return !!(value && value[\"__v_isReactive\"]);\n  }\n  function isReadonly(value) {\n    return !!(value && value[\"__v_isReadonly\"]);\n  }\n  function isProxy(value) {\n    return isReactive2(value) || isReadonly(value);\n  }\n  function toRaw2(observed) {\n    return observed && toRaw2(observed[\"__v_raw\"]) || observed;\n  }\n  function markRaw(value) {\n    shared.def(value, \"__v_skip\", true);\n    return value;\n  }\n  var convert = (val) => shared.isObject(val) ? reactive3(val) : val;\n  function isRef(r) {\n    return Boolean(r && r.__v_isRef === true);\n  }\n  function ref(value) {\n    return createRef(value);\n  }\n  function shallowRef(value) {\n    return createRef(value, true);\n  }\n  var RefImpl = class {\n    constructor(_rawValue, _shallow = false) {\n      this._rawValue = _rawValue;\n      this._shallow = _shallow;\n      this.__v_isRef = true;\n      this._value = _shallow ? _rawValue : convert(_rawValue);\n    }\n    get value() {\n      track(toRaw2(this), \"get\", \"value\");\n      return this._value;\n    }\n    set value(newVal) {\n      if (shared.hasChanged(toRaw2(newVal), this._rawValue)) {\n        this._rawValue = newVal;\n        this._value = this._shallow ? newVal : convert(newVal);\n        trigger(toRaw2(this), \"set\", \"value\", newVal);\n      }\n    }\n  };\n  function createRef(rawValue, shallow = false) {\n    if (isRef(rawValue)) {\n      return rawValue;\n    }\n    return new RefImpl(rawValue, shallow);\n  }\n  function triggerRef(ref2) {\n    trigger(toRaw2(ref2), \"set\", \"value\", ref2.value);\n  }\n  function unref(ref2) {\n    return isRef(ref2) ? ref2.value : ref2;\n  }\n  var shallowUnwrapHandlers = {\n    get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)),\n    set: (target, key, value, receiver) => {\n      const oldValue = target[key];\n      if (isRef(oldValue) && !isRef(value)) {\n        oldValue.value = value;\n        return true;\n      } else {\n        return Reflect.set(target, key, value, receiver);\n      }\n    }\n  };\n  function proxyRefs(objectWithRefs) {\n    return isReactive2(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);\n  }\n  var CustomRefImpl = class {\n    constructor(factory) {\n      this.__v_isRef = true;\n      const {get: get3, set: set3} = factory(() => track(this, \"get\", \"value\"), () => trigger(this, \"set\", \"value\"));\n      this._get = get3;\n      this._set = set3;\n    }\n    get value() {\n      return this._get();\n    }\n    set value(newVal) {\n      this._set(newVal);\n    }\n  };\n  function customRef(factory) {\n    return new CustomRefImpl(factory);\n  }\n  function toRefs(object) {\n    if (!isProxy(object)) {\n      console.warn(`toRefs() expects a reactive object but received a plain one.`);\n    }\n    const ret = shared.isArray(object) ? new Array(object.length) : {};\n    for (const key in object) {\n      ret[key] = toRef(object, key);\n    }\n    return ret;\n  }\n  var ObjectRefImpl = class {\n    constructor(_object, _key) {\n      this._object = _object;\n      this._key = _key;\n      this.__v_isRef = true;\n    }\n    get value() {\n      return this._object[this._key];\n    }\n    set value(newVal) {\n      this._object[this._key] = newVal;\n    }\n  };\n  function toRef(object, key) {\n    return isRef(object[key]) ? object[key] : new ObjectRefImpl(object, key);\n  }\n  var ComputedRefImpl = class {\n    constructor(getter, _setter, isReadonly2) {\n      this._setter = _setter;\n      this._dirty = true;\n      this.__v_isRef = true;\n      this.effect = effect3(getter, {\n        lazy: true,\n        scheduler: () => {\n          if (!this._dirty) {\n            this._dirty = true;\n            trigger(toRaw2(this), \"set\", \"value\");\n          }\n        }\n      });\n      this[\"__v_isReadonly\"] = isReadonly2;\n    }\n    get value() {\n      const self2 = toRaw2(this);\n      if (self2._dirty) {\n        self2._value = this.effect();\n        self2._dirty = false;\n      }\n      track(self2, \"get\", \"value\");\n      return self2._value;\n    }\n    set value(newValue) {\n      this._setter(newValue);\n    }\n  };\n  function computed(getterOrOptions) {\n    let getter;\n    let setter;\n    if (shared.isFunction(getterOrOptions)) {\n      getter = getterOrOptions;\n      setter = () => {\n        console.warn(\"Write operation failed: computed value is readonly\");\n      };\n    } else {\n      getter = getterOrOptions.get;\n      setter = getterOrOptions.set;\n    }\n    return new ComputedRefImpl(getter, setter, shared.isFunction(getterOrOptions) || !getterOrOptions.set);\n  }\n  exports.ITERATE_KEY = ITERATE_KEY;\n  exports.computed = computed;\n  exports.customRef = customRef;\n  exports.effect = effect3;\n  exports.enableTracking = enableTracking;\n  exports.isProxy = isProxy;\n  exports.isReactive = isReactive2;\n  exports.isReadonly = isReadonly;\n  exports.isRef = isRef;\n  exports.markRaw = markRaw;\n  exports.pauseTracking = pauseTracking;\n  exports.proxyRefs = proxyRefs;\n  exports.reactive = reactive3;\n  exports.readonly = readonly;\n  exports.ref = ref;\n  exports.resetTracking = resetTracking;\n  exports.shallowReactive = shallowReactive;\n  exports.shallowReadonly = shallowReadonly;\n  exports.shallowRef = shallowRef;\n  exports.stop = stop2;\n  exports.toRaw = toRaw2;\n  exports.toRef = toRef;\n  exports.toRefs = toRefs;\n  exports.track = track;\n  exports.trigger = trigger;\n  exports.triggerRef = triggerRef;\n  exports.unref = unref;\n});\n\n// node_modules/@vue/reactivity/index.js\nvar require_reactivity = __commonJS((exports, module) => {\n  \"use strict\";\n  if (false) {\n    module.exports = null;\n  } else {\n    module.exports = require_reactivity_cjs();\n  }\n});\n\n// packages/alpinejs/src/scheduler.js\nvar flushPending = false;\nvar flushing = false;\nvar queue = [];\nfunction scheduler(callback) {\n  queueJob(callback);\n}\nfunction queueJob(job) {\n  if (!queue.includes(job))\n    queue.push(job);\n  queueFlush();\n}\nfunction queueFlush() {\n  if (!flushing && !flushPending) {\n    flushPending = true;\n    queueMicrotask(flushJobs);\n  }\n}\nfunction flushJobs() {\n  flushPending = false;\n  flushing = true;\n  for (let i = 0; i < queue.length; i++) {\n    queue[i]();\n  }\n  queue.length = 0;\n  flushing = false;\n}\n\n// packages/alpinejs/src/reactivity.js\nvar reactive;\nvar effect;\nvar release;\nvar raw;\nvar shouldSchedule = true;\nfunction disableEffectScheduling(callback) {\n  shouldSchedule = false;\n  callback();\n  shouldSchedule = true;\n}\nfunction setReactivityEngine(engine) {\n  reactive = engine.reactive;\n  release = engine.release;\n  effect = (callback) => engine.effect(callback, {scheduler: (task) => {\n    if (shouldSchedule) {\n      scheduler(task);\n    } else {\n      task();\n    }\n  }});\n  raw = engine.raw;\n}\nfunction overrideEffect(override) {\n  effect = override;\n}\nfunction elementBoundEffect(el) {\n  let cleanup = () => {\n  };\n  let wrappedEffect = (callback) => {\n    let effectReference = effect(callback);\n    if (!el._x_effects) {\n      el._x_effects = new Set();\n      el._x_runEffects = () => {\n        el._x_effects.forEach((i) => i());\n      };\n    }\n    el._x_effects.add(effectReference);\n    cleanup = () => {\n      if (effectReference === void 0)\n        return;\n      el._x_effects.delete(effectReference);\n      release(effectReference);\n    };\n  };\n  return [wrappedEffect, () => {\n    cleanup();\n  }];\n}\n\n// packages/alpinejs/src/mutation.js\nvar onAttributeAddeds = [];\nvar onElRemoveds = [];\nvar onElAddeds = [];\nfunction onElAdded(callback) {\n  onElAddeds.push(callback);\n}\nfunction onElRemoved(callback) {\n  onElRemoveds.push(callback);\n}\nfunction onAttributesAdded(callback) {\n  onAttributeAddeds.push(callback);\n}\nfunction onAttributeRemoved(el, name, callback) {\n  if (!el._x_attributeCleanups)\n    el._x_attributeCleanups = {};\n  if (!el._x_attributeCleanups[name])\n    el._x_attributeCleanups[name] = [];\n  el._x_attributeCleanups[name].push(callback);\n}\nfunction cleanupAttributes(el, names) {\n  if (!el._x_attributeCleanups)\n    return;\n  Object.entries(el._x_attributeCleanups).forEach(([name, value]) => {\n    if (names === void 0 || names.includes(name)) {\n      value.forEach((i) => i());\n      delete el._x_attributeCleanups[name];\n    }\n  });\n}\nvar observer = new MutationObserver(onMutate);\nvar currentlyObserving = false;\nfunction startObservingMutations() {\n  observer.observe(document, {subtree: true, childList: true, attributes: true, attributeOldValue: true});\n  currentlyObserving = true;\n}\nfunction stopObservingMutations() {\n  flushObserver();\n  observer.disconnect();\n  currentlyObserving = false;\n}\nvar recordQueue = [];\nvar willProcessRecordQueue = false;\nfunction flushObserver() {\n  recordQueue = recordQueue.concat(observer.takeRecords());\n  if (recordQueue.length && !willProcessRecordQueue) {\n    willProcessRecordQueue = true;\n    queueMicrotask(() => {\n      processRecordQueue();\n      willProcessRecordQueue = false;\n    });\n  }\n}\nfunction processRecordQueue() {\n  onMutate(recordQueue);\n  recordQueue.length = 0;\n}\nfunction mutateDom(callback) {\n  if (!currentlyObserving)\n    return callback();\n  stopObservingMutations();\n  let result = callback();\n  startObservingMutations();\n  return result;\n}\nvar isCollecting = false;\nvar deferredMutations = [];\nfunction deferMutations() {\n  isCollecting = true;\n}\nfunction flushAndStopDeferringMutations() {\n  isCollecting = false;\n  onMutate(deferredMutations);\n  deferredMutations = [];\n}\nfunction onMutate(mutations) {\n  if (isCollecting) {\n    deferredMutations = deferredMutations.concat(mutations);\n    return;\n  }\n  let addedNodes = [];\n  let removedNodes = [];\n  let addedAttributes = new Map();\n  let removedAttributes = new Map();\n  for (let i = 0; i < mutations.length; i++) {\n    if (mutations[i].target._x_ignoreMutationObserver)\n      continue;\n    if (mutations[i].type === \"childList\") {\n      mutations[i].addedNodes.forEach((node) => node.nodeType === 1 && addedNodes.push(node));\n      mutations[i].removedNodes.forEach((node) => node.nodeType === 1 && removedNodes.push(node));\n    }\n    if (mutations[i].type === \"attributes\") {\n      let el = mutations[i].target;\n      let name = mutations[i].attributeName;\n      let oldValue = mutations[i].oldValue;\n      let add = () => {\n        if (!addedAttributes.has(el))\n          addedAttributes.set(el, []);\n        addedAttributes.get(el).push({name, value: el.getAttribute(name)});\n      };\n      let remove = () => {\n        if (!removedAttributes.has(el))\n          removedAttributes.set(el, []);\n        removedAttributes.get(el).push(name);\n      };\n      if (el.hasAttribute(name) && oldValue === null) {\n        add();\n      } else if (el.hasAttribute(name)) {\n        remove();\n        add();\n      } else {\n        remove();\n      }\n    }\n  }\n  removedAttributes.forEach((attrs, el) => {\n    cleanupAttributes(el, attrs);\n  });\n  addedAttributes.forEach((attrs, el) => {\n    onAttributeAddeds.forEach((i) => i(el, attrs));\n  });\n  for (let node of removedNodes) {\n    if (addedNodes.includes(node))\n      continue;\n    onElRemoveds.forEach((i) => i(node));\n  }\n  addedNodes.forEach((node) => {\n    node._x_ignoreSelf = true;\n    node._x_ignore = true;\n  });\n  for (let node of addedNodes) {\n    if (removedNodes.includes(node))\n      continue;\n    if (!node.isConnected)\n      continue;\n    delete node._x_ignoreSelf;\n    delete node._x_ignore;\n    onElAddeds.forEach((i) => i(node));\n    node._x_ignore = true;\n    node._x_ignoreSelf = true;\n  }\n  addedNodes.forEach((node) => {\n    delete node._x_ignoreSelf;\n    delete node._x_ignore;\n  });\n  addedNodes = null;\n  removedNodes = null;\n  addedAttributes = null;\n  removedAttributes = null;\n}\n\n// packages/alpinejs/src/scope.js\nfunction addScopeToNode(node, data2, referenceNode) {\n  node._x_dataStack = [data2, ...closestDataStack(referenceNode || node)];\n  return () => {\n    node._x_dataStack = node._x_dataStack.filter((i) => i !== data2);\n  };\n}\nfunction refreshScope(element, scope) {\n  let existingScope = element._x_dataStack[0];\n  Object.entries(scope).forEach(([key, value]) => {\n    existingScope[key] = value;\n  });\n}\nfunction closestDataStack(node) {\n  if (node._x_dataStack)\n    return node._x_dataStack;\n  if (typeof ShadowRoot === \"function\" && node instanceof ShadowRoot) {\n    return closestDataStack(node.host);\n  }\n  if (!node.parentNode) {\n    return [];\n  }\n  return closestDataStack(node.parentNode);\n}\nfunction mergeProxies(objects) {\n  let thisProxy = new Proxy({}, {\n    ownKeys: () => {\n      return Array.from(new Set(objects.flatMap((i) => Object.keys(i))));\n    },\n    has: (target, name) => {\n      return objects.some((obj) => obj.hasOwnProperty(name));\n    },\n    get: (target, name) => {\n      return (objects.find((obj) => {\n        if (obj.hasOwnProperty(name)) {\n          let descriptor = Object.getOwnPropertyDescriptor(obj, name);\n          if (descriptor.get && descriptor.get._x_alreadyBound || descriptor.set && descriptor.set._x_alreadyBound) {\n            return true;\n          }\n          if ((descriptor.get || descriptor.set) && descriptor.enumerable) {\n            let getter = descriptor.get;\n            let setter = descriptor.set;\n            let property = descriptor;\n            getter = getter && getter.bind(thisProxy);\n            setter = setter && setter.bind(thisProxy);\n            if (getter)\n              getter._x_alreadyBound = true;\n            if (setter)\n              setter._x_alreadyBound = true;\n            Object.defineProperty(obj, name, {\n              ...property,\n              get: getter,\n              set: setter\n            });\n          }\n          return true;\n        }\n        return false;\n      }) || {})[name];\n    },\n    set: (target, name, value) => {\n      let closestObjectWithKey = objects.find((obj) => obj.hasOwnProperty(name));\n      if (closestObjectWithKey) {\n        closestObjectWithKey[name] = value;\n      } else {\n        objects[objects.length - 1][name] = value;\n      }\n      return true;\n    }\n  });\n  return thisProxy;\n}\n\n// packages/alpinejs/src/interceptor.js\nfunction initInterceptors(data2) {\n  let isObject = (val) => typeof val === \"object\" && !Array.isArray(val) && val !== null;\n  let recurse = (obj, basePath = \"\") => {\n    Object.entries(Object.getOwnPropertyDescriptors(obj)).forEach(([key, {value, enumerable}]) => {\n      if (enumerable === false || value === void 0)\n        return;\n      let path = basePath === \"\" ? key : `${basePath}.${key}`;\n      if (typeof value === \"object\" && value !== null && value._x_interceptor) {\n        obj[key] = value.initialize(data2, path, key);\n      } else {\n        if (isObject(value) && value !== obj && !(value instanceof Element)) {\n          recurse(value, path);\n        }\n      }\n    });\n  };\n  return recurse(data2);\n}\nfunction interceptor(callback, mutateObj = () => {\n}) {\n  let obj = {\n    initialValue: void 0,\n    _x_interceptor: true,\n    initialize(data2, path, key) {\n      return callback(this.initialValue, () => get(data2, path), (value) => set(data2, path, value), path, key);\n    }\n  };\n  mutateObj(obj);\n  return (initialValue) => {\n    if (typeof initialValue === \"object\" && initialValue !== null && initialValue._x_interceptor) {\n      let initialize = obj.initialize.bind(obj);\n      obj.initialize = (data2, path, key) => {\n        let innerValue = initialValue.initialize(data2, path, key);\n        obj.initialValue = innerValue;\n        return initialize(data2, path, key);\n      };\n    } else {\n      obj.initialValue = initialValue;\n    }\n    return obj;\n  };\n}\nfunction get(obj, path) {\n  return path.split(\".\").reduce((carry, segment) => carry[segment], obj);\n}\nfunction set(obj, path, value) {\n  if (typeof path === \"string\")\n    path = path.split(\".\");\n  if (path.length === 1)\n    obj[path[0]] = value;\n  else if (path.length === 0)\n    throw error;\n  else {\n    if (obj[path[0]])\n      return set(obj[path[0]], path.slice(1), value);\n    else {\n      obj[path[0]] = {};\n      return set(obj[path[0]], path.slice(1), value);\n    }\n  }\n}\n\n// packages/alpinejs/src/magics.js\nvar magics = {};\nfunction magic(name, callback) {\n  magics[name] = callback;\n}\nfunction injectMagics(obj, el) {\n  Object.entries(magics).forEach(([name, callback]) => {\n    Object.defineProperty(obj, `$${name}`, {\n      get() {\n        return callback(el, {Alpine: alpine_default, interceptor});\n      },\n      enumerable: false\n    });\n  });\n  return obj;\n}\n\n// packages/alpinejs/src/utils/error.js\nfunction tryCatch(el, expression, callback, ...args) {\n  try {\n    return callback(...args);\n  } catch (e) {\n    handleError(e, el, expression);\n  }\n}\nfunction handleError(error2, el, expression = void 0) {\n  Object.assign(error2, {el, expression});\n  console.warn(`Alpine Expression Error: ${error2.message}\n\n${expression ? 'Expression: \"' + expression + '\"\\n\\n' : \"\"}`, el);\n  setTimeout(() => {\n    throw error2;\n  }, 0);\n}\n\n// packages/alpinejs/src/evaluator.js\nfunction evaluate(el, expression, extras = {}) {\n  let result;\n  evaluateLater(el, expression)((value) => result = value, extras);\n  return result;\n}\nfunction evaluateLater(...args) {\n  return theEvaluatorFunction(...args);\n}\nvar theEvaluatorFunction = normalEvaluator;\nfunction setEvaluator(newEvaluator) {\n  theEvaluatorFunction = newEvaluator;\n}\nfunction normalEvaluator(el, expression) {\n  let overriddenMagics = {};\n  injectMagics(overriddenMagics, el);\n  let dataStack = [overriddenMagics, ...closestDataStack(el)];\n  if (typeof expression === \"function\") {\n    return generateEvaluatorFromFunction(dataStack, expression);\n  }\n  let evaluator = generateEvaluatorFromString(dataStack, expression, el);\n  return tryCatch.bind(null, el, expression, evaluator);\n}\nfunction generateEvaluatorFromFunction(dataStack, func) {\n  return (receiver = () => {\n  }, {scope = {}, params = []} = {}) => {\n    let result = func.apply(mergeProxies([scope, ...dataStack]), params);\n    runIfTypeOfFunction(receiver, result);\n  };\n}\nvar evaluatorMemo = {};\nfunction generateFunctionFromString(expression, el) {\n  if (evaluatorMemo[expression]) {\n    return evaluatorMemo[expression];\n  }\n  let AsyncFunction = Object.getPrototypeOf(async function() {\n  }).constructor;\n  let rightSideSafeExpression = /^[\\n\\s]*if.*\\(.*\\)/.test(expression) || /^(let|const)\\s/.test(expression) ? `(() => { ${expression} })()` : expression;\n  const safeAsyncFunction = () => {\n    try {\n      return new AsyncFunction([\"__self\", \"scope\"], `with (scope) { __self.result = ${rightSideSafeExpression} }; __self.finished = true; return __self.result;`);\n    } catch (error2) {\n      handleError(error2, el, expression);\n      return Promise.resolve();\n    }\n  };\n  let func = safeAsyncFunction();\n  evaluatorMemo[expression] = func;\n  return func;\n}\nfunction generateEvaluatorFromString(dataStack, expression, el) {\n  let func = generateFunctionFromString(expression, el);\n  return (receiver = () => {\n  }, {scope = {}, params = []} = {}) => {\n    func.result = void 0;\n    func.finished = false;\n    let completeScope = mergeProxies([scope, ...dataStack]);\n    if (typeof func === \"function\") {\n      let promise = func(func, completeScope).catch((error2) => handleError(error2, el, expression));\n      if (func.finished) {\n        runIfTypeOfFunction(receiver, func.result, completeScope, params, el);\n        func.result = void 0;\n      } else {\n        promise.then((result) => {\n          runIfTypeOfFunction(receiver, result, completeScope, params, el);\n        }).catch((error2) => handleError(error2, el, expression)).finally(() => func.result = void 0);\n      }\n    }\n  };\n}\nfunction runIfTypeOfFunction(receiver, value, scope, params, el) {\n  if (typeof value === \"function\") {\n    let result = value.apply(scope, params);\n    if (result instanceof Promise) {\n      result.then((i) => runIfTypeOfFunction(receiver, i, scope, params)).catch((error2) => handleError(error2, el, value));\n    } else {\n      receiver(result);\n    }\n  } else {\n    receiver(value);\n  }\n}\n\n// packages/alpinejs/src/directives.js\nvar prefixAsString = \"x-\";\nfunction prefix(subject = \"\") {\n  return prefixAsString + subject;\n}\nfunction setPrefix(newPrefix) {\n  prefixAsString = newPrefix;\n}\nvar directiveHandlers = {};\nfunction directive(name, callback) {\n  directiveHandlers[name] = callback;\n}\nfunction directives(el, attributes, originalAttributeOverride) {\n  let transformedAttributeMap = {};\n  let directives2 = Array.from(attributes).map(toTransformedAttributes((newName, oldName) => transformedAttributeMap[newName] = oldName)).filter(outNonAlpineAttributes).map(toParsedDirectives(transformedAttributeMap, originalAttributeOverride)).sort(byPriority);\n  return directives2.map((directive2) => {\n    return getDirectiveHandler(el, directive2);\n  });\n}\nfunction attributesOnly(attributes) {\n  return Array.from(attributes).map(toTransformedAttributes()).filter((attr) => !outNonAlpineAttributes(attr));\n}\nvar isDeferringHandlers = false;\nvar directiveHandlerStacks = new Map();\nvar currentHandlerStackKey = Symbol();\nfunction deferHandlingDirectives(callback) {\n  isDeferringHandlers = true;\n  let key = Symbol();\n  currentHandlerStackKey = key;\n  directiveHandlerStacks.set(key, []);\n  let flushHandlers = () => {\n    while (directiveHandlerStacks.get(key).length)\n      directiveHandlerStacks.get(key).shift()();\n    directiveHandlerStacks.delete(key);\n  };\n  let stopDeferring = () => {\n    isDeferringHandlers = false;\n    flushHandlers();\n  };\n  callback(flushHandlers);\n  stopDeferring();\n}\nfunction getDirectiveHandler(el, directive2) {\n  let noop = () => {\n  };\n  let handler3 = directiveHandlers[directive2.type] || noop;\n  let cleanups = [];\n  let cleanup = (callback) => cleanups.push(callback);\n  let [effect3, cleanupEffect] = elementBoundEffect(el);\n  cleanups.push(cleanupEffect);\n  let utilities = {\n    Alpine: alpine_default,\n    effect: effect3,\n    cleanup,\n    evaluateLater: evaluateLater.bind(evaluateLater, el),\n    evaluate: evaluate.bind(evaluate, el)\n  };\n  let doCleanup = () => cleanups.forEach((i) => i());\n  onAttributeRemoved(el, directive2.original, doCleanup);\n  let fullHandler = () => {\n    if (el._x_ignore || el._x_ignoreSelf)\n      return;\n    handler3.inline && handler3.inline(el, directive2, utilities);\n    handler3 = handler3.bind(handler3, el, directive2, utilities);\n    isDeferringHandlers ? directiveHandlerStacks.get(currentHandlerStackKey).push(handler3) : handler3();\n  };\n  fullHandler.runCleanups = doCleanup;\n  return fullHandler;\n}\nvar startingWith = (subject, replacement) => ({name, value}) => {\n  if (name.startsWith(subject))\n    name = name.replace(subject, replacement);\n  return {name, value};\n};\nvar into = (i) => i;\nfunction toTransformedAttributes(callback = () => {\n}) {\n  return ({name, value}) => {\n    let {name: newName, value: newValue} = attributeTransformers.reduce((carry, transform) => {\n      return transform(carry);\n    }, {name, value});\n    if (newName !== name)\n      callback(newName, name);\n    return {name: newName, value: newValue};\n  };\n}\nvar attributeTransformers = [];\nfunction mapAttributes(callback) {\n  attributeTransformers.push(callback);\n}\nfunction outNonAlpineAttributes({name}) {\n  return alpineAttributeRegex().test(name);\n}\nvar alpineAttributeRegex = () => new RegExp(`^${prefixAsString}([^:^.]+)\\\\b`);\nfunction toParsedDirectives(transformedAttributeMap, originalAttributeOverride) {\n  return ({name, value}) => {\n    let typeMatch = name.match(alpineAttributeRegex());\n    let valueMatch = name.match(/:([a-zA-Z0-9\\-:]+)/);\n    let modifiers = name.match(/\\.[^.\\]]+(?=[^\\]]*$)/g) || [];\n    let original = originalAttributeOverride || transformedAttributeMap[name] || name;\n    return {\n      type: typeMatch ? typeMatch[1] : null,\n      value: valueMatch ? valueMatch[1] : null,\n      modifiers: modifiers.map((i) => i.replace(\".\", \"\")),\n      expression: value,\n      original\n    };\n  };\n}\nvar DEFAULT = \"DEFAULT\";\nvar directiveOrder = [\n  \"ignore\",\n  \"ref\",\n  \"data\",\n  \"id\",\n  \"bind\",\n  \"init\",\n  \"for\",\n  \"model\",\n  \"transition\",\n  \"show\",\n  \"if\",\n  DEFAULT,\n  \"teleport\",\n  \"element\"\n];\nfunction byPriority(a, b) {\n  let typeA = directiveOrder.indexOf(a.type) === -1 ? DEFAULT : a.type;\n  let typeB = directiveOrder.indexOf(b.type) === -1 ? DEFAULT : b.type;\n  return directiveOrder.indexOf(typeA) - directiveOrder.indexOf(typeB);\n}\n\n// packages/alpinejs/src/utils/dispatch.js\nfunction dispatch(el, name, detail = {}) {\n  el.dispatchEvent(new CustomEvent(name, {\n    detail,\n    bubbles: true,\n    composed: true,\n    cancelable: true\n  }));\n}\n\n// packages/alpinejs/src/nextTick.js\nvar tickStack = [];\nvar isHolding = false;\nfunction nextTick(callback) {\n  tickStack.push(callback);\n  queueMicrotask(() => {\n    isHolding || setTimeout(() => {\n      releaseNextTicks();\n    });\n  });\n}\nfunction releaseNextTicks() {\n  isHolding = false;\n  while (tickStack.length)\n    tickStack.shift()();\n}\nfunction holdNextTicks() {\n  isHolding = true;\n}\n\n// packages/alpinejs/src/utils/walk.js\nfunction walk(el, callback) {\n  if (typeof ShadowRoot === \"function\" && el instanceof ShadowRoot) {\n    Array.from(el.children).forEach((el2) => walk(el2, callback));\n    return;\n  }\n  let skip = false;\n  callback(el, () => skip = true);\n  if (skip)\n    return;\n  let node = el.firstElementChild;\n  while (node) {\n    walk(node, callback, false);\n    node = node.nextElementSibling;\n  }\n}\n\n// packages/alpinejs/src/utils/warn.js\nfunction warn(message, ...args) {\n  console.warn(`Alpine Warning: ${message}`, ...args);\n}\n\n// packages/alpinejs/src/lifecycle.js\nfunction start() {\n  if (!document.body)\n    warn(\"Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?\");\n  dispatch(document, \"alpine:init\");\n  dispatch(document, \"alpine:initializing\");\n  startObservingMutations();\n  onElAdded((el) => initTree(el, walk));\n  onElRemoved((el) => destroyTree(el));\n  onAttributesAdded((el, attrs) => {\n    directives(el, attrs).forEach((handle) => handle());\n  });\n  let outNestedComponents = (el) => !closestRoot(el.parentElement, true);\n  Array.from(document.querySelectorAll(allSelectors())).filter(outNestedComponents).forEach((el) => {\n    initTree(el);\n  });\n  dispatch(document, \"alpine:initialized\");\n}\nvar rootSelectorCallbacks = [];\nvar initSelectorCallbacks = [];\nfunction rootSelectors() {\n  return rootSelectorCallbacks.map((fn) => fn());\n}\nfunction allSelectors() {\n  return rootSelectorCallbacks.concat(initSelectorCallbacks).map((fn) => fn());\n}\nfunction addRootSelector(selectorCallback) {\n  rootSelectorCallbacks.push(selectorCallback);\n}\nfunction addInitSelector(selectorCallback) {\n  initSelectorCallbacks.push(selectorCallback);\n}\nfunction closestRoot(el, includeInitSelectors = false) {\n  return findClosest(el, (element) => {\n    const selectors = includeInitSelectors ? allSelectors() : rootSelectors();\n    if (selectors.some((selector) => element.matches(selector)))\n      return true;\n  });\n}\nfunction findClosest(el, callback) {\n  if (!el)\n    return;\n  if (callback(el))\n    return el;\n  if (el._x_teleportBack)\n    el = el._x_teleportBack;\n  if (!el.parentElement)\n    return;\n  return findClosest(el.parentElement, callback);\n}\nfunction isRoot(el) {\n  return rootSelectors().some((selector) => el.matches(selector));\n}\nfunction initTree(el, walker = walk) {\n  deferHandlingDirectives(() => {\n    walker(el, (el2, skip) => {\n      directives(el2, el2.attributes).forEach((handle) => handle());\n      el2._x_ignore && skip();\n    });\n  });\n}\nfunction destroyTree(root) {\n  walk(root, (el) => cleanupAttributes(el));\n}\n\n// packages/alpinejs/src/utils/classes.js\nfunction setClasses(el, value) {\n  if (Array.isArray(value)) {\n    return setClassesFromString(el, value.join(\" \"));\n  } else if (typeof value === \"object\" && value !== null) {\n    return setClassesFromObject(el, value);\n  } else if (typeof value === \"function\") {\n    return setClasses(el, value());\n  }\n  return setClassesFromString(el, value);\n}\nfunction setClassesFromString(el, classString) {\n  let split = (classString2) => classString2.split(\" \").filter(Boolean);\n  let missingClasses = (classString2) => classString2.split(\" \").filter((i) => !el.classList.contains(i)).filter(Boolean);\n  let addClassesAndReturnUndo = (classes) => {\n    el.classList.add(...classes);\n    return () => {\n      el.classList.remove(...classes);\n    };\n  };\n  classString = classString === true ? classString = \"\" : classString || \"\";\n  return addClassesAndReturnUndo(missingClasses(classString));\n}\nfunction setClassesFromObject(el, classObject) {\n  let split = (classString) => classString.split(\" \").filter(Boolean);\n  let forAdd = Object.entries(classObject).flatMap(([classString, bool]) => bool ? split(classString) : false).filter(Boolean);\n  let forRemove = Object.entries(classObject).flatMap(([classString, bool]) => !bool ? split(classString) : false).filter(Boolean);\n  let added = [];\n  let removed = [];\n  forRemove.forEach((i) => {\n    if (el.classList.contains(i)) {\n      el.classList.remove(i);\n      removed.push(i);\n    }\n  });\n  forAdd.forEach((i) => {\n    if (!el.classList.contains(i)) {\n      el.classList.add(i);\n      added.push(i);\n    }\n  });\n  return () => {\n    removed.forEach((i) => el.classList.add(i));\n    added.forEach((i) => el.classList.remove(i));\n  };\n}\n\n// packages/alpinejs/src/utils/styles.js\nfunction setStyles(el, value) {\n  if (typeof value === \"object\" && value !== null) {\n    return setStylesFromObject(el, value);\n  }\n  return setStylesFromString(el, value);\n}\nfunction setStylesFromObject(el, value) {\n  let previousStyles = {};\n  Object.entries(value).forEach(([key, value2]) => {\n    previousStyles[key] = el.style[key];\n    el.style.setProperty(kebabCase(key), value2);\n  });\n  setTimeout(() => {\n    if (el.style.length === 0) {\n      el.removeAttribute(\"style\");\n    }\n  });\n  return () => {\n    setStyles(el, previousStyles);\n  };\n}\nfunction setStylesFromString(el, value) {\n  let cache = el.getAttribute(\"style\", value);\n  el.setAttribute(\"style\", value);\n  return () => {\n    el.setAttribute(\"style\", cache || \"\");\n  };\n}\nfunction kebabCase(subject) {\n  return subject.replace(/([a-z])([A-Z])/g, \"$1-$2\").toLowerCase();\n}\n\n// packages/alpinejs/src/utils/once.js\nfunction once(callback, fallback = () => {\n}) {\n  let called = false;\n  return function() {\n    if (!called) {\n      called = true;\n      callback.apply(this, arguments);\n    } else {\n      fallback.apply(this, arguments);\n    }\n  };\n}\n\n// packages/alpinejs/src/directives/x-transition.js\ndirective(\"transition\", (el, {value, modifiers, expression}, {evaluate: evaluate2}) => {\n  if (typeof expression === \"function\")\n    expression = evaluate2(expression);\n  if (!expression) {\n    registerTransitionsFromHelper(el, modifiers, value);\n  } else {\n    registerTransitionsFromClassString(el, expression, value);\n  }\n});\nfunction registerTransitionsFromClassString(el, classString, stage) {\n  registerTransitionObject(el, setClasses, \"\");\n  let directiveStorageMap = {\n    enter: (classes) => {\n      el._x_transition.enter.during = classes;\n    },\n    \"enter-start\": (classes) => {\n      el._x_transition.enter.start = classes;\n    },\n    \"enter-end\": (classes) => {\n      el._x_transition.enter.end = classes;\n    },\n    leave: (classes) => {\n      el._x_transition.leave.during = classes;\n    },\n    \"leave-start\": (classes) => {\n      el._x_transition.leave.start = classes;\n    },\n    \"leave-end\": (classes) => {\n      el._x_transition.leave.end = classes;\n    }\n  };\n  directiveStorageMap[stage](classString);\n}\nfunction registerTransitionsFromHelper(el, modifiers, stage) {\n  registerTransitionObject(el, setStyles);\n  let doesntSpecify = !modifiers.includes(\"in\") && !modifiers.includes(\"out\") && !stage;\n  let transitioningIn = doesntSpecify || modifiers.includes(\"in\") || [\"enter\"].includes(stage);\n  let transitioningOut = doesntSpecify || modifiers.includes(\"out\") || [\"leave\"].includes(stage);\n  if (modifiers.includes(\"in\") && !doesntSpecify) {\n    modifiers = modifiers.filter((i, index) => index < modifiers.indexOf(\"out\"));\n  }\n  if (modifiers.includes(\"out\") && !doesntSpecify) {\n    modifiers = modifiers.filter((i, index) => index > modifiers.indexOf(\"out\"));\n  }\n  let wantsAll = !modifiers.includes(\"opacity\") && !modifiers.includes(\"scale\");\n  let wantsOpacity = wantsAll || modifiers.includes(\"opacity\");\n  let wantsScale = wantsAll || modifiers.includes(\"scale\");\n  let opacityValue = wantsOpacity ? 0 : 1;\n  let scaleValue = wantsScale ? modifierValue(modifiers, \"scale\", 95) / 100 : 1;\n  let delay = modifierValue(modifiers, \"delay\", 0);\n  let origin = modifierValue(modifiers, \"origin\", \"center\");\n  let property = \"opacity, transform\";\n  let durationIn = modifierValue(modifiers, \"duration\", 150) / 1e3;\n  let durationOut = modifierValue(modifiers, \"duration\", 75) / 1e3;\n  let easing = `cubic-bezier(0.4, 0.0, 0.2, 1)`;\n  if (transitioningIn) {\n    el._x_transition.enter.during = {\n      transformOrigin: origin,\n      transitionDelay: delay,\n      transitionProperty: property,\n      transitionDuration: `${durationIn}s`,\n      transitionTimingFunction: easing\n    };\n    el._x_transition.enter.start = {\n      opacity: opacityValue,\n      transform: `scale(${scaleValue})`\n    };\n    el._x_transition.enter.end = {\n      opacity: 1,\n      transform: `scale(1)`\n    };\n  }\n  if (transitioningOut) {\n    el._x_transition.leave.during = {\n      transformOrigin: origin,\n      transitionDelay: delay,\n      transitionProperty: property,\n      transitionDuration: `${durationOut}s`,\n      transitionTimingFunction: easing\n    };\n    el._x_transition.leave.start = {\n      opacity: 1,\n      transform: `scale(1)`\n    };\n    el._x_transition.leave.end = {\n      opacity: opacityValue,\n      transform: `scale(${scaleValue})`\n    };\n  }\n}\nfunction registerTransitionObject(el, setFunction, defaultValue = {}) {\n  if (!el._x_transition)\n    el._x_transition = {\n      enter: {during: defaultValue, start: defaultValue, end: defaultValue},\n      leave: {during: defaultValue, start: defaultValue, end: defaultValue},\n      in(before = () => {\n      }, after = () => {\n      }) {\n        transition(el, setFunction, {\n          during: this.enter.during,\n          start: this.enter.start,\n          end: this.enter.end\n        }, before, after);\n      },\n      out(before = () => {\n      }, after = () => {\n      }) {\n        transition(el, setFunction, {\n          during: this.leave.during,\n          start: this.leave.start,\n          end: this.leave.end\n        }, before, after);\n      }\n    };\n}\nwindow.Element.prototype._x_toggleAndCascadeWithTransitions = function(el, value, show, hide) {\n  let clickAwayCompatibleShow = () => {\n    document.visibilityState === \"visible\" ? requestAnimationFrame(show) : setTimeout(show);\n  };\n  if (value) {\n    if (el._x_transition && (el._x_transition.enter || el._x_transition.leave)) {\n      el._x_transition.enter && (Object.entries(el._x_transition.enter.during).length || Object.entries(el._x_transition.enter.start).length || Object.entries(el._x_transition.enter.end).length) ? el._x_transition.in(show) : clickAwayCompatibleShow();\n    } else {\n      el._x_transition ? el._x_transition.in(show) : clickAwayCompatibleShow();\n    }\n    return;\n  }\n  el._x_hidePromise = el._x_transition ? new Promise((resolve, reject) => {\n    el._x_transition.out(() => {\n    }, () => resolve(hide));\n    el._x_transitioning.beforeCancel(() => reject({isFromCancelledTransition: true}));\n  }) : Promise.resolve(hide);\n  queueMicrotask(() => {\n    let closest = closestHide(el);\n    if (closest) {\n      if (!closest._x_hideChildren)\n        closest._x_hideChildren = [];\n      closest._x_hideChildren.push(el);\n    } else {\n      queueMicrotask(() => {\n        let hideAfterChildren = (el2) => {\n          let carry = Promise.all([\n            el2._x_hidePromise,\n            ...(el2._x_hideChildren || []).map(hideAfterChildren)\n          ]).then(([i]) => i());\n          delete el2._x_hidePromise;\n          delete el2._x_hideChildren;\n          return carry;\n        };\n        hideAfterChildren(el).catch((e) => {\n          if (!e.isFromCancelledTransition)\n            throw e;\n        });\n      });\n    }\n  });\n};\nfunction closestHide(el) {\n  let parent = el.parentNode;\n  if (!parent)\n    return;\n  return parent._x_hidePromise ? parent : closestHide(parent);\n}\nfunction transition(el, setFunction, {during, start: start2, end} = {}, before = () => {\n}, after = () => {\n}) {\n  if (el._x_transitioning)\n    el._x_transitioning.cancel();\n  if (Object.keys(during).length === 0 && Object.keys(start2).length === 0 && Object.keys(end).length === 0) {\n    before();\n    after();\n    return;\n  }\n  let undoStart, undoDuring, undoEnd;\n  performTransition(el, {\n    start() {\n      undoStart = setFunction(el, start2);\n    },\n    during() {\n      undoDuring = setFunction(el, during);\n    },\n    before,\n    end() {\n      undoStart();\n      undoEnd = setFunction(el, end);\n    },\n    after,\n    cleanup() {\n      undoDuring();\n      undoEnd();\n    }\n  });\n}\nfunction performTransition(el, stages) {\n  let interrupted, reachedBefore, reachedEnd;\n  let finish = once(() => {\n    mutateDom(() => {\n      interrupted = true;\n      if (!reachedBefore)\n        stages.before();\n      if (!reachedEnd) {\n        stages.end();\n        releaseNextTicks();\n      }\n      stages.after();\n      if (el.isConnected)\n        stages.cleanup();\n      delete el._x_transitioning;\n    });\n  });\n  el._x_transitioning = {\n    beforeCancels: [],\n    beforeCancel(callback) {\n      this.beforeCancels.push(callback);\n    },\n    cancel: once(function() {\n      while (this.beforeCancels.length) {\n        this.beforeCancels.shift()();\n      }\n      ;\n      finish();\n    }),\n    finish\n  };\n  mutateDom(() => {\n    stages.start();\n    stages.during();\n  });\n  holdNextTicks();\n  requestAnimationFrame(() => {\n    if (interrupted)\n      return;\n    let duration = Number(getComputedStyle(el).transitionDuration.replace(/,.*/, \"\").replace(\"s\", \"\")) * 1e3;\n    let delay = Number(getComputedStyle(el).transitionDelay.replace(/,.*/, \"\").replace(\"s\", \"\")) * 1e3;\n    if (duration === 0)\n      duration = Number(getComputedStyle(el).animationDuration.replace(\"s\", \"\")) * 1e3;\n    mutateDom(() => {\n      stages.before();\n    });\n    reachedBefore = true;\n    requestAnimationFrame(() => {\n      if (interrupted)\n        return;\n      mutateDom(() => {\n        stages.end();\n      });\n      releaseNextTicks();\n      setTimeout(el._x_transitioning.finish, duration + delay);\n      reachedEnd = true;\n    });\n  });\n}\nfunction modifierValue(modifiers, key, fallback) {\n  if (modifiers.indexOf(key) === -1)\n    return fallback;\n  const rawValue = modifiers[modifiers.indexOf(key) + 1];\n  if (!rawValue)\n    return fallback;\n  if (key === \"scale\") {\n    if (isNaN(rawValue))\n      return fallback;\n  }\n  if (key === \"duration\") {\n    let match = rawValue.match(/([0-9]+)ms/);\n    if (match)\n      return match[1];\n  }\n  if (key === \"origin\") {\n    if ([\"top\", \"right\", \"left\", \"center\", \"bottom\"].includes(modifiers[modifiers.indexOf(key) + 2])) {\n      return [rawValue, modifiers[modifiers.indexOf(key) + 2]].join(\" \");\n    }\n  }\n  return rawValue;\n}\n\n// packages/alpinejs/src/clone.js\nvar isCloning = false;\nfunction skipDuringClone(callback, fallback = () => {\n}) {\n  return (...args) => isCloning ? fallback(...args) : callback(...args);\n}\nfunction clone(oldEl, newEl) {\n  if (!newEl._x_dataStack)\n    newEl._x_dataStack = oldEl._x_dataStack;\n  isCloning = true;\n  dontRegisterReactiveSideEffects(() => {\n    cloneTree(newEl);\n  });\n  isCloning = false;\n}\nfunction cloneTree(el) {\n  let hasRunThroughFirstEl = false;\n  let shallowWalker = (el2, callback) => {\n    walk(el2, (el3, skip) => {\n      if (hasRunThroughFirstEl && isRoot(el3))\n        return skip();\n      hasRunThroughFirstEl = true;\n      callback(el3, skip);\n    });\n  };\n  initTree(el, shallowWalker);\n}\nfunction dontRegisterReactiveSideEffects(callback) {\n  let cache = effect;\n  overrideEffect((callback2, el) => {\n    let storedEffect = cache(callback2);\n    release(storedEffect);\n    return () => {\n    };\n  });\n  callback();\n  overrideEffect(cache);\n}\n\n// packages/alpinejs/src/utils/debounce.js\nfunction debounce(func, wait) {\n  var timeout;\n  return function() {\n    var context = this, args = arguments;\n    var later = function() {\n      timeout = null;\n      func.apply(context, args);\n    };\n    clearTimeout(timeout);\n    timeout = setTimeout(later, wait);\n  };\n}\n\n// packages/alpinejs/src/utils/throttle.js\nfunction throttle(func, limit) {\n  let inThrottle;\n  return function() {\n    let context = this, args = arguments;\n    if (!inThrottle) {\n      func.apply(context, args);\n      inThrottle = true;\n      setTimeout(() => inThrottle = false, limit);\n    }\n  };\n}\n\n// packages/alpinejs/src/plugin.js\nfunction plugin(callback) {\n  callback(alpine_default);\n}\n\n// packages/alpinejs/src/store.js\nvar stores = {};\nvar isReactive = false;\nfunction store(name, value) {\n  if (!isReactive) {\n    stores = reactive(stores);\n    isReactive = true;\n  }\n  if (value === void 0) {\n    return stores[name];\n  }\n  stores[name] = value;\n  if (typeof value === \"object\" && value !== null && value.hasOwnProperty(\"init\") && typeof value.init === \"function\") {\n    stores[name].init();\n  }\n  initInterceptors(stores[name]);\n}\nfunction getStores() {\n  return stores;\n}\n\n// packages/alpinejs/src/datas.js\nvar datas = {};\nfunction data(name, callback) {\n  datas[name] = callback;\n}\nfunction injectDataProviders(obj, context) {\n  Object.entries(datas).forEach(([name, callback]) => {\n    Object.defineProperty(obj, name, {\n      get() {\n        return (...args) => {\n          return callback.bind(context)(...args);\n        };\n      },\n      enumerable: false\n    });\n  });\n  return obj;\n}\n\n// packages/alpinejs/src/alpine.js\nvar Alpine = {\n  get reactive() {\n    return reactive;\n  },\n  get release() {\n    return release;\n  },\n  get effect() {\n    return effect;\n  },\n  get raw() {\n    return raw;\n  },\n  version: \"3.7.1\",\n  flushAndStopDeferringMutations,\n  disableEffectScheduling,\n  setReactivityEngine,\n  closestDataStack,\n  skipDuringClone,\n  addRootSelector,\n  addInitSelector,\n  addScopeToNode,\n  deferMutations,\n  mapAttributes,\n  evaluateLater,\n  setEvaluator,\n  mergeProxies,\n  closestRoot,\n  interceptor,\n  transition,\n  setStyles,\n  mutateDom,\n  directive,\n  throttle,\n  debounce,\n  evaluate,\n  initTree,\n  nextTick,\n  prefixed: prefix,\n  prefix: setPrefix,\n  plugin,\n  magic,\n  store,\n  start,\n  clone,\n  data\n};\nvar alpine_default = Alpine;\n\n// packages/alpinejs/src/index.js\nvar import_reactivity9 = __toModule(require_reactivity());\n\n// packages/alpinejs/src/magics/$nextTick.js\nmagic(\"nextTick\", () => nextTick);\n\n// packages/alpinejs/src/magics/$dispatch.js\nmagic(\"dispatch\", (el) => dispatch.bind(dispatch, el));\n\n// packages/alpinejs/src/magics/$watch.js\nmagic(\"watch\", (el) => (key, callback) => {\n  let evaluate2 = evaluateLater(el, key);\n  let firstTime = true;\n  let oldValue;\n  effect(() => evaluate2((value) => {\n    JSON.stringify(value);\n    if (!firstTime) {\n      queueMicrotask(() => {\n        callback(value, oldValue);\n        oldValue = value;\n      });\n    } else {\n      oldValue = value;\n    }\n    firstTime = false;\n  }));\n});\n\n// packages/alpinejs/src/magics/$store.js\nmagic(\"store\", getStores);\n\n// packages/alpinejs/src/magics/$data.js\nmagic(\"data\", (el) => {\n  return mergeProxies(closestDataStack(el));\n});\n\n// packages/alpinejs/src/magics/$root.js\nmagic(\"root\", (el) => closestRoot(el));\n\n// packages/alpinejs/src/magics/$refs.js\nmagic(\"refs\", (el) => {\n  if (el._x_refs_proxy)\n    return el._x_refs_proxy;\n  el._x_refs_proxy = mergeProxies(getArrayOfRefObject(el));\n  return el._x_refs_proxy;\n});\nfunction getArrayOfRefObject(el) {\n  let refObjects = [];\n  let currentEl = el;\n  while (currentEl) {\n    if (currentEl._x_refs)\n      refObjects.push(currentEl._x_refs);\n    currentEl = currentEl.parentNode;\n  }\n  return refObjects;\n}\n\n// packages/alpinejs/src/ids.js\nvar globalIdMemo = {};\nfunction findAndIncrementId(name) {\n  if (!globalIdMemo[name])\n    globalIdMemo[name] = 0;\n  return ++globalIdMemo[name];\n}\nfunction closestIdRoot(el, name) {\n  return findClosest(el, (element) => {\n    if (element._x_ids && element._x_ids[name])\n      return true;\n  });\n}\nfunction setIdRoot(el, name) {\n  if (!el._x_ids)\n    el._x_ids = {};\n  if (!el._x_ids[name])\n    el._x_ids[name] = findAndIncrementId(name);\n}\n\n// packages/alpinejs/src/magics/$id.js\nmagic(\"id\", (el) => (name, key = null) => {\n  let root = closestIdRoot(el, name);\n  let id = root ? root._x_ids[name] : findAndIncrementId(name);\n  return key ? new AlpineId(`${name}-${id}-${key}`) : new AlpineId(`${name}-${id}`);\n});\nvar AlpineId = class {\n  constructor(id) {\n    this.id = id;\n  }\n  toString() {\n    return this.id;\n  }\n};\n\n// packages/alpinejs/src/magics/$el.js\nmagic(\"el\", (el) => el);\n\n// packages/alpinejs/src/directives/x-teleport.js\ndirective(\"teleport\", (el, {expression}, {cleanup}) => {\n  if (el.tagName.toLowerCase() !== \"template\")\n    warn(\"x-teleport can only be used on a <template> tag\", el);\n  let target = document.querySelector(expression);\n  if (!target)\n    warn(`Cannot find x-teleport element for selector: \"${expression}\"`);\n  let clone2 = el.content.cloneNode(true).firstElementChild;\n  el._x_teleport = clone2;\n  clone2._x_teleportBack = el;\n  if (el._x_forwardEvents) {\n    el._x_forwardEvents.forEach((eventName) => {\n      clone2.addEventListener(eventName, (e) => {\n        e.stopPropagation();\n        el.dispatchEvent(new e.constructor(e.type, e));\n      });\n    });\n  }\n  addScopeToNode(clone2, {}, el);\n  mutateDom(() => {\n    target.appendChild(clone2);\n    initTree(clone2);\n    clone2._x_ignore = true;\n  });\n  cleanup(() => clone2.remove());\n});\n\n// packages/alpinejs/src/directives/x-ignore.js\nvar handler = () => {\n};\nhandler.inline = (el, {modifiers}, {cleanup}) => {\n  modifiers.includes(\"self\") ? el._x_ignoreSelf = true : el._x_ignore = true;\n  cleanup(() => {\n    modifiers.includes(\"self\") ? delete el._x_ignoreSelf : delete el._x_ignore;\n  });\n};\ndirective(\"ignore\", handler);\n\n// packages/alpinejs/src/directives/x-effect.js\ndirective(\"effect\", (el, {expression}, {effect: effect3}) => effect3(evaluateLater(el, expression)));\n\n// packages/alpinejs/src/utils/bind.js\nfunction bind(el, name, value, modifiers = []) {\n  if (!el._x_bindings)\n    el._x_bindings = reactive({});\n  el._x_bindings[name] = value;\n  name = modifiers.includes(\"camel\") ? camelCase(name) : name;\n  switch (name) {\n    case \"value\":\n      bindInputValue(el, value);\n      break;\n    case \"style\":\n      bindStyles(el, value);\n      break;\n    case \"class\":\n      bindClasses(el, value);\n      break;\n    default:\n      bindAttribute(el, name, value);\n      break;\n  }\n}\nfunction bindInputValue(el, value) {\n  if (el.type === \"radio\") {\n    if (el.attributes.value === void 0) {\n      el.value = value;\n    }\n    if (window.fromModel) {\n      el.checked = checkedAttrLooseCompare(el.value, value);\n    }\n  } else if (el.type === \"checkbox\") {\n    if (Number.isInteger(value)) {\n      el.value = value;\n    } else if (!Number.isInteger(value) && !Array.isArray(value) && typeof value !== \"boolean\" && ![null, void 0].includes(value)) {\n      el.value = String(value);\n    } else {\n      if (Array.isArray(value)) {\n        el.checked = value.some((val) => checkedAttrLooseCompare(val, el.value));\n      } else {\n        el.checked = !!value;\n      }\n    }\n  } else if (el.tagName === \"SELECT\") {\n    updateSelect(el, value);\n  } else {\n    if (el.value === value)\n      return;\n    el.value = value;\n  }\n}\nfunction bindClasses(el, value) {\n  if (el._x_undoAddedClasses)\n    el._x_undoAddedClasses();\n  el._x_undoAddedClasses = setClasses(el, value);\n}\nfunction bindStyles(el, value) {\n  if (el._x_undoAddedStyles)\n    el._x_undoAddedStyles();\n  el._x_undoAddedStyles = setStyles(el, value);\n}\nfunction bindAttribute(el, name, value) {\n  if ([null, void 0, false].includes(value) && attributeShouldntBePreservedIfFalsy(name)) {\n    el.removeAttribute(name);\n  } else {\n    if (isBooleanAttr(name))\n      value = name;\n    setIfChanged(el, name, value);\n  }\n}\nfunction setIfChanged(el, attrName, value) {\n  if (el.getAttribute(attrName) != value) {\n    el.setAttribute(attrName, value);\n  }\n}\nfunction updateSelect(el, value) {\n  const arrayWrappedValue = [].concat(value).map((value2) => {\n    return value2 + \"\";\n  });\n  Array.from(el.options).forEach((option) => {\n    option.selected = arrayWrappedValue.includes(option.value);\n  });\n}\nfunction camelCase(subject) {\n  return subject.toLowerCase().replace(/-(\\w)/g, (match, char) => char.toUpperCase());\n}\nfunction checkedAttrLooseCompare(valueA, valueB) {\n  return valueA == valueB;\n}\nfunction isBooleanAttr(attrName) {\n  const booleanAttributes = [\n    \"disabled\",\n    \"checked\",\n    \"required\",\n    \"readonly\",\n    \"hidden\",\n    \"open\",\n    \"selected\",\n    \"autofocus\",\n    \"itemscope\",\n    \"multiple\",\n    \"novalidate\",\n    \"allowfullscreen\",\n    \"allowpaymentrequest\",\n    \"formnovalidate\",\n    \"autoplay\",\n    \"controls\",\n    \"loop\",\n    \"muted\",\n    \"playsinline\",\n    \"default\",\n    \"ismap\",\n    \"reversed\",\n    \"async\",\n    \"defer\",\n    \"nomodule\"\n  ];\n  return booleanAttributes.includes(attrName);\n}\nfunction attributeShouldntBePreservedIfFalsy(name) {\n  return ![\"aria-pressed\", \"aria-checked\", \"aria-expanded\"].includes(name);\n}\n\n// packages/alpinejs/src/utils/on.js\nfunction on(el, event, modifiers, callback) {\n  let listenerTarget = el;\n  let handler3 = (e) => callback(e);\n  let options = {};\n  let wrapHandler = (callback2, wrapper) => (e) => wrapper(callback2, e);\n  if (modifiers.includes(\"dot\"))\n    event = dotSyntax(event);\n  if (modifiers.includes(\"camel\"))\n    event = camelCase2(event);\n  if (modifiers.includes(\"passive\"))\n    options.passive = true;\n  if (modifiers.includes(\"capture\"))\n    options.capture = true;\n  if (modifiers.includes(\"window\"))\n    listenerTarget = window;\n  if (modifiers.includes(\"document\"))\n    listenerTarget = document;\n  if (modifiers.includes(\"prevent\"))\n    handler3 = wrapHandler(handler3, (next, e) => {\n      e.preventDefault();\n      next(e);\n    });\n  if (modifiers.includes(\"stop\"))\n    handler3 = wrapHandler(handler3, (next, e) => {\n      e.stopPropagation();\n      next(e);\n    });\n  if (modifiers.includes(\"self\"))\n    handler3 = wrapHandler(handler3, (next, e) => {\n      e.target === el && next(e);\n    });\n  if (modifiers.includes(\"away\") || modifiers.includes(\"outside\")) {\n    listenerTarget = document;\n    handler3 = wrapHandler(handler3, (next, e) => {\n      if (el.contains(e.target))\n        return;\n      if (el.offsetWidth < 1 && el.offsetHeight < 1)\n        return;\n      if (el._x_isShown === false)\n        return;\n      next(e);\n    });\n  }\n  handler3 = wrapHandler(handler3, (next, e) => {\n    if (isKeyEvent(event)) {\n      if (isListeningForASpecificKeyThatHasntBeenPressed(e, modifiers)) {\n        return;\n      }\n    }\n    next(e);\n  });\n  if (modifiers.includes(\"debounce\")) {\n    let nextModifier = modifiers[modifiers.indexOf(\"debounce\") + 1] || \"invalid-wait\";\n    let wait = isNumeric(nextModifier.split(\"ms\")[0]) ? Number(nextModifier.split(\"ms\")[0]) : 250;\n    handler3 = debounce(handler3, wait);\n  }\n  if (modifiers.includes(\"throttle\")) {\n    let nextModifier = modifiers[modifiers.indexOf(\"throttle\") + 1] || \"invalid-wait\";\n    let wait = isNumeric(nextModifier.split(\"ms\")[0]) ? Number(nextModifier.split(\"ms\")[0]) : 250;\n    handler3 = throttle(handler3, wait);\n  }\n  if (modifiers.includes(\"once\")) {\n    handler3 = wrapHandler(handler3, (next, e) => {\n      next(e);\n      listenerTarget.removeEventListener(event, handler3, options);\n    });\n  }\n  listenerTarget.addEventListener(event, handler3, options);\n  return () => {\n    listenerTarget.removeEventListener(event, handler3, options);\n  };\n}\nfunction dotSyntax(subject) {\n  return subject.replace(/-/g, \".\");\n}\nfunction camelCase2(subject) {\n  return subject.toLowerCase().replace(/-(\\w)/g, (match, char) => char.toUpperCase());\n}\nfunction isNumeric(subject) {\n  return !Array.isArray(subject) && !isNaN(subject);\n}\nfunction kebabCase2(subject) {\n  return subject.replace(/([a-z])([A-Z])/g, \"$1-$2\").replace(/[_\\s]/, \"-\").toLowerCase();\n}\nfunction isKeyEvent(event) {\n  return [\"keydown\", \"keyup\"].includes(event);\n}\nfunction isListeningForASpecificKeyThatHasntBeenPressed(e, modifiers) {\n  let keyModifiers = modifiers.filter((i) => {\n    return ![\"window\", \"document\", \"prevent\", \"stop\", \"once\"].includes(i);\n  });\n  if (keyModifiers.includes(\"debounce\")) {\n    let debounceIndex = keyModifiers.indexOf(\"debounce\");\n    keyModifiers.splice(debounceIndex, isNumeric((keyModifiers[debounceIndex + 1] || \"invalid-wait\").split(\"ms\")[0]) ? 2 : 1);\n  }\n  if (keyModifiers.length === 0)\n    return false;\n  if (keyModifiers.length === 1 && keyToModifiers(e.key).includes(keyModifiers[0]))\n    return false;\n  const systemKeyModifiers = [\"ctrl\", \"shift\", \"alt\", \"meta\", \"cmd\", \"super\"];\n  const selectedSystemKeyModifiers = systemKeyModifiers.filter((modifier) => keyModifiers.includes(modifier));\n  keyModifiers = keyModifiers.filter((i) => !selectedSystemKeyModifiers.includes(i));\n  if (selectedSystemKeyModifiers.length > 0) {\n    const activelyPressedKeyModifiers = selectedSystemKeyModifiers.filter((modifier) => {\n      if (modifier === \"cmd\" || modifier === \"super\")\n        modifier = \"meta\";\n      return e[`${modifier}Key`];\n    });\n    if (activelyPressedKeyModifiers.length === selectedSystemKeyModifiers.length) {\n      if (keyToModifiers(e.key).includes(keyModifiers[0]))\n        return false;\n    }\n  }\n  return true;\n}\nfunction keyToModifiers(key) {\n  if (!key)\n    return [];\n  key = kebabCase2(key);\n  let modifierToKeyMap = {\n    ctrl: \"control\",\n    slash: \"/\",\n    space: \"-\",\n    spacebar: \"-\",\n    cmd: \"meta\",\n    esc: \"escape\",\n    up: \"arrow-up\",\n    down: \"arrow-down\",\n    left: \"arrow-left\",\n    right: \"arrow-right\",\n    period: \".\",\n    equal: \"=\"\n  };\n  modifierToKeyMap[key] = key;\n  return Object.keys(modifierToKeyMap).map((modifier) => {\n    if (modifierToKeyMap[modifier] === key)\n      return modifier;\n  }).filter((modifier) => modifier);\n}\n\n// packages/alpinejs/src/directives/x-model.js\ndirective(\"model\", (el, {modifiers, expression}, {effect: effect3, cleanup}) => {\n  let evaluate2 = evaluateLater(el, expression);\n  let assignmentExpression = `${expression} = rightSideOfExpression($event, ${expression})`;\n  let evaluateAssignment = evaluateLater(el, assignmentExpression);\n  var event = el.tagName.toLowerCase() === \"select\" || [\"checkbox\", \"radio\"].includes(el.type) || modifiers.includes(\"lazy\") ? \"change\" : \"input\";\n  let assigmentFunction = generateAssignmentFunction(el, modifiers, expression);\n  let removeListener = on(el, event, modifiers, (e) => {\n    evaluateAssignment(() => {\n    }, {scope: {\n      $event: e,\n      rightSideOfExpression: assigmentFunction\n    }});\n  });\n  cleanup(() => removeListener());\n  let evaluateSetModel = evaluateLater(el, `${expression} = __placeholder`);\n  el._x_model = {\n    get() {\n      let result;\n      evaluate2((value) => result = value);\n      return result;\n    },\n    set(value) {\n      evaluateSetModel(() => {\n      }, {scope: {__placeholder: value}});\n    }\n  };\n  el._x_forceModelUpdate = () => {\n    evaluate2((value) => {\n      if (value === void 0 && expression.match(/\\./))\n        value = \"\";\n      window.fromModel = true;\n      mutateDom(() => bind(el, \"value\", value));\n      delete window.fromModel;\n    });\n  };\n  effect3(() => {\n    if (modifiers.includes(\"unintrusive\") && document.activeElement.isSameNode(el))\n      return;\n    el._x_forceModelUpdate();\n  });\n});\nfunction generateAssignmentFunction(el, modifiers, expression) {\n  if (el.type === \"radio\") {\n    mutateDom(() => {\n      if (!el.hasAttribute(\"name\"))\n        el.setAttribute(\"name\", expression);\n    });\n  }\n  return (event, currentValue) => {\n    return mutateDom(() => {\n      if (event instanceof CustomEvent && event.detail !== void 0) {\n        return event.detail || event.target.value;\n      } else if (el.type === \"checkbox\") {\n        if (Array.isArray(currentValue)) {\n          let newValue = modifiers.includes(\"number\") ? safeParseNumber(event.target.value) : event.target.value;\n          return event.target.checked ? currentValue.concat([newValue]) : currentValue.filter((el2) => !checkedAttrLooseCompare2(el2, newValue));\n        } else {\n          return event.target.checked;\n        }\n      } else if (el.tagName.toLowerCase() === \"select\" && el.multiple) {\n        return modifiers.includes(\"number\") ? Array.from(event.target.selectedOptions).map((option) => {\n          let rawValue = option.value || option.text;\n          return safeParseNumber(rawValue);\n        }) : Array.from(event.target.selectedOptions).map((option) => {\n          return option.value || option.text;\n        });\n      } else {\n        let rawValue = event.target.value;\n        return modifiers.includes(\"number\") ? safeParseNumber(rawValue) : modifiers.includes(\"trim\") ? rawValue.trim() : rawValue;\n      }\n    });\n  };\n}\nfunction safeParseNumber(rawValue) {\n  let number = rawValue ? parseFloat(rawValue) : null;\n  return isNumeric2(number) ? number : rawValue;\n}\nfunction checkedAttrLooseCompare2(valueA, valueB) {\n  return valueA == valueB;\n}\nfunction isNumeric2(subject) {\n  return !Array.isArray(subject) && !isNaN(subject);\n}\n\n// packages/alpinejs/src/directives/x-cloak.js\ndirective(\"cloak\", (el) => queueMicrotask(() => mutateDom(() => el.removeAttribute(prefix(\"cloak\")))));\n\n// packages/alpinejs/src/directives/x-init.js\naddInitSelector(() => `[${prefix(\"init\")}]`);\ndirective(\"init\", skipDuringClone((el, {expression}) => {\n  if (typeof expression === \"string\") {\n    return !!expression.trim() && evaluate(el, expression, {}, false);\n  }\n  return evaluate(el, expression, {}, false);\n}));\n\n// packages/alpinejs/src/directives/x-text.js\ndirective(\"text\", (el, {expression}, {effect: effect3, evaluateLater: evaluateLater2}) => {\n  let evaluate2 = evaluateLater2(expression);\n  effect3(() => {\n    evaluate2((value) => {\n      mutateDom(() => {\n        el.textContent = value;\n      });\n    });\n  });\n});\n\n// packages/alpinejs/src/directives/x-html.js\ndirective(\"html\", (el, {expression}, {effect: effect3, evaluateLater: evaluateLater2}) => {\n  let evaluate2 = evaluateLater2(expression);\n  effect3(() => {\n    evaluate2((value) => {\n      el.innerHTML = value;\n    });\n  });\n});\n\n// packages/alpinejs/src/directives/x-bind.js\nmapAttributes(startingWith(\":\", into(prefix(\"bind:\"))));\ndirective(\"bind\", (el, {value, modifiers, expression, original}, {effect: effect3}) => {\n  if (!value)\n    return applyBindingsObject(el, expression, original, effect3);\n  if (value === \"key\")\n    return storeKeyForXFor(el, expression);\n  let evaluate2 = evaluateLater(el, expression);\n  effect3(() => evaluate2((result) => {\n    if (result === void 0 && expression.match(/\\./))\n      result = \"\";\n    mutateDom(() => bind(el, value, result, modifiers));\n  }));\n});\nfunction applyBindingsObject(el, expression, original, effect3) {\n  let getBindings = evaluateLater(el, expression);\n  let cleanupRunners = [];\n  effect3(() => {\n    while (cleanupRunners.length)\n      cleanupRunners.pop()();\n    getBindings((bindings) => {\n      let attributes = Object.entries(bindings).map(([name, value]) => ({name, value}));\n      let staticAttributes = attributesOnly(attributes);\n      attributes = attributes.map((attribute) => {\n        if (staticAttributes.find((attr) => attr.name === attribute.name)) {\n          return {\n            name: `x-bind:${attribute.name}`,\n            value: `\"${attribute.value}\"`\n          };\n        }\n        return attribute;\n      });\n      directives(el, attributes, original).map((handle) => {\n        cleanupRunners.push(handle.runCleanups);\n        handle();\n      });\n    });\n  });\n}\nfunction storeKeyForXFor(el, expression) {\n  el._x_keyExpression = expression;\n}\n\n// packages/alpinejs/src/directives/x-data.js\naddRootSelector(() => `[${prefix(\"data\")}]`);\ndirective(\"data\", skipDuringClone((el, {expression}, {cleanup}) => {\n  expression = expression === \"\" ? \"{}\" : expression;\n  let magicContext = {};\n  injectMagics(magicContext, el);\n  let dataProviderContext = {};\n  injectDataProviders(dataProviderContext, magicContext);\n  let data2 = evaluate(el, expression, {scope: dataProviderContext});\n  if (data2 === void 0)\n    data2 = {};\n  injectMagics(data2, el);\n  let reactiveData = reactive(data2);\n  initInterceptors(reactiveData);\n  let undo = addScopeToNode(el, reactiveData);\n  reactiveData[\"init\"] && evaluate(el, reactiveData[\"init\"]);\n  cleanup(() => {\n    undo();\n    reactiveData[\"destroy\"] && evaluate(el, reactiveData[\"destroy\"]);\n  });\n}));\n\n// packages/alpinejs/src/directives/x-show.js\ndirective(\"show\", (el, {modifiers, expression}, {effect: effect3}) => {\n  let evaluate2 = evaluateLater(el, expression);\n  let hide = () => mutateDom(() => {\n    el.style.display = \"none\";\n    el._x_isShown = false;\n  });\n  let show = () => mutateDom(() => {\n    if (el.style.length === 1 && el.style.display === \"none\") {\n      el.removeAttribute(\"style\");\n    } else {\n      el.style.removeProperty(\"display\");\n    }\n    el._x_isShown = true;\n  });\n  let clickAwayCompatibleShow = () => setTimeout(show);\n  let toggle = once((value) => value ? show() : hide(), (value) => {\n    if (typeof el._x_toggleAndCascadeWithTransitions === \"function\") {\n      el._x_toggleAndCascadeWithTransitions(el, value, show, hide);\n    } else {\n      value ? clickAwayCompatibleShow() : hide();\n    }\n  });\n  let oldValue;\n  let firstTime = true;\n  effect3(() => evaluate2((value) => {\n    if (!firstTime && value === oldValue)\n      return;\n    if (modifiers.includes(\"immediate\"))\n      value ? clickAwayCompatibleShow() : hide();\n    toggle(value);\n    oldValue = value;\n    firstTime = false;\n  }));\n});\n\n// packages/alpinejs/src/directives/x-for.js\ndirective(\"for\", (el, {expression}, {effect: effect3, cleanup}) => {\n  let iteratorNames = parseForExpression(expression);\n  let evaluateItems = evaluateLater(el, iteratorNames.items);\n  let evaluateKey = evaluateLater(el, el._x_keyExpression || \"index\");\n  el._x_prevKeys = [];\n  el._x_lookup = {};\n  effect3(() => loop(el, iteratorNames, evaluateItems, evaluateKey));\n  cleanup(() => {\n    Object.values(el._x_lookup).forEach((el2) => el2.remove());\n    delete el._x_prevKeys;\n    delete el._x_lookup;\n  });\n});\nfunction loop(el, iteratorNames, evaluateItems, evaluateKey) {\n  let isObject = (i) => typeof i === \"object\" && !Array.isArray(i);\n  let templateEl = el;\n  evaluateItems((items) => {\n    if (isNumeric3(items) && items >= 0) {\n      items = Array.from(Array(items).keys(), (i) => i + 1);\n    }\n    if (items === void 0)\n      items = [];\n    let lookup = el._x_lookup;\n    let prevKeys = el._x_prevKeys;\n    let scopes = [];\n    let keys = [];\n    if (isObject(items)) {\n      items = Object.entries(items).map(([key, value]) => {\n        let scope = getIterationScopeVariables(iteratorNames, value, key, items);\n        evaluateKey((value2) => keys.push(value2), {scope: {index: key, ...scope}});\n        scopes.push(scope);\n      });\n    } else {\n      for (let i = 0; i < items.length; i++) {\n        let scope = getIterationScopeVariables(iteratorNames, items[i], i, items);\n        evaluateKey((value) => keys.push(value), {scope: {index: i, ...scope}});\n        scopes.push(scope);\n      }\n    }\n    let adds = [];\n    let moves = [];\n    let removes = [];\n    let sames = [];\n    for (let i = 0; i < prevKeys.length; i++) {\n      let key = prevKeys[i];\n      if (keys.indexOf(key) === -1)\n        removes.push(key);\n    }\n    prevKeys = prevKeys.filter((key) => !removes.includes(key));\n    let lastKey = \"template\";\n    for (let i = 0; i < keys.length; i++) {\n      let key = keys[i];\n      let prevIndex = prevKeys.indexOf(key);\n      if (prevIndex === -1) {\n        prevKeys.splice(i, 0, key);\n        adds.push([lastKey, i]);\n      } else if (prevIndex !== i) {\n        let keyInSpot = prevKeys.splice(i, 1)[0];\n        let keyForSpot = prevKeys.splice(prevIndex - 1, 1)[0];\n        prevKeys.splice(i, 0, keyForSpot);\n        prevKeys.splice(prevIndex, 0, keyInSpot);\n        moves.push([keyInSpot, keyForSpot]);\n      } else {\n        sames.push(key);\n      }\n      lastKey = key;\n    }\n    for (let i = 0; i < removes.length; i++) {\n      let key = removes[i];\n      lookup[key].remove();\n      lookup[key] = null;\n      delete lookup[key];\n    }\n    for (let i = 0; i < moves.length; i++) {\n      let [keyInSpot, keyForSpot] = moves[i];\n      let elInSpot = lookup[keyInSpot];\n      let elForSpot = lookup[keyForSpot];\n      let marker = document.createElement(\"div\");\n      mutateDom(() => {\n        elForSpot.after(marker);\n        elInSpot.after(elForSpot);\n        elForSpot._x_currentIfEl && elForSpot.after(elForSpot._x_currentIfEl);\n        marker.before(elInSpot);\n        elInSpot._x_currentIfEl && elInSpot.after(elInSpot._x_currentIfEl);\n        marker.remove();\n      });\n      refreshScope(elForSpot, scopes[keys.indexOf(keyForSpot)]);\n    }\n    for (let i = 0; i < adds.length; i++) {\n      let [lastKey2, index] = adds[i];\n      let lastEl = lastKey2 === \"template\" ? templateEl : lookup[lastKey2];\n      if (lastEl._x_currentIfEl)\n        lastEl = lastEl._x_currentIfEl;\n      let scope = scopes[index];\n      let key = keys[index];\n      let clone2 = document.importNode(templateEl.content, true).firstElementChild;\n      addScopeToNode(clone2, reactive(scope), templateEl);\n      mutateDom(() => {\n        lastEl.after(clone2);\n        initTree(clone2);\n      });\n      if (typeof key === \"object\") {\n        warn(\"x-for key cannot be an object, it must be a string or an integer\", templateEl);\n      }\n      lookup[key] = clone2;\n    }\n    for (let i = 0; i < sames.length; i++) {\n      refreshScope(lookup[sames[i]], scopes[keys.indexOf(sames[i])]);\n    }\n    templateEl._x_prevKeys = keys;\n  });\n}\nfunction parseForExpression(expression) {\n  let forIteratorRE = /,([^,\\}\\]]*)(?:,([^,\\}\\]]*))?$/;\n  let stripParensRE = /^\\s*\\(|\\)\\s*$/g;\n  let forAliasRE = /([\\s\\S]*?)\\s+(?:in|of)\\s+([\\s\\S]*)/;\n  let inMatch = expression.match(forAliasRE);\n  if (!inMatch)\n    return;\n  let res = {};\n  res.items = inMatch[2].trim();\n  let item = inMatch[1].replace(stripParensRE, \"\").trim();\n  let iteratorMatch = item.match(forIteratorRE);\n  if (iteratorMatch) {\n    res.item = item.replace(forIteratorRE, \"\").trim();\n    res.index = iteratorMatch[1].trim();\n    if (iteratorMatch[2]) {\n      res.collection = iteratorMatch[2].trim();\n    }\n  } else {\n    res.item = item;\n  }\n  return res;\n}\nfunction getIterationScopeVariables(iteratorNames, item, index, items) {\n  let scopeVariables = {};\n  if (/^\\[.*\\]$/.test(iteratorNames.item) && Array.isArray(item)) {\n    let names = iteratorNames.item.replace(\"[\", \"\").replace(\"]\", \"\").split(\",\").map((i) => i.trim());\n    names.forEach((name, i) => {\n      scopeVariables[name] = item[i];\n    });\n  } else if (/^\\{.*\\}$/.test(iteratorNames.item) && !Array.isArray(item) && typeof item === \"object\") {\n    let names = iteratorNames.item.replace(\"{\", \"\").replace(\"}\", \"\").split(\",\").map((i) => i.trim());\n    names.forEach((name) => {\n      scopeVariables[name] = item[name];\n    });\n  } else {\n    scopeVariables[iteratorNames.item] = item;\n  }\n  if (iteratorNames.index)\n    scopeVariables[iteratorNames.index] = index;\n  if (iteratorNames.collection)\n    scopeVariables[iteratorNames.collection] = items;\n  return scopeVariables;\n}\nfunction isNumeric3(subject) {\n  return !Array.isArray(subject) && !isNaN(subject);\n}\n\n// packages/alpinejs/src/directives/x-ref.js\nfunction handler2() {\n}\nhandler2.inline = (el, {expression}, {cleanup}) => {\n  let root = closestRoot(el);\n  if (!root._x_refs)\n    root._x_refs = {};\n  root._x_refs[expression] = el;\n  cleanup(() => delete root._x_refs[expression]);\n};\ndirective(\"ref\", handler2);\n\n// packages/alpinejs/src/directives/x-if.js\ndirective(\"if\", (el, {expression}, {effect: effect3, cleanup}) => {\n  let evaluate2 = evaluateLater(el, expression);\n  let show = () => {\n    if (el._x_currentIfEl)\n      return el._x_currentIfEl;\n    let clone2 = el.content.cloneNode(true).firstElementChild;\n    addScopeToNode(clone2, {}, el);\n    mutateDom(() => {\n      el.after(clone2);\n      initTree(clone2);\n    });\n    el._x_currentIfEl = clone2;\n    el._x_undoIf = () => {\n      clone2.remove();\n      delete el._x_currentIfEl;\n    };\n    return clone2;\n  };\n  let hide = () => {\n    if (!el._x_undoIf)\n      return;\n    el._x_undoIf();\n    delete el._x_undoIf;\n  };\n  effect3(() => evaluate2((value) => {\n    value ? show() : hide();\n  }));\n  cleanup(() => el._x_undoIf && el._x_undoIf());\n});\n\n// packages/alpinejs/src/directives/x-id.js\ndirective(\"id\", (el, {expression}, {evaluate: evaluate2}) => {\n  let names = evaluate2(expression);\n  names.forEach((name) => setIdRoot(el, name));\n});\n\n// packages/alpinejs/src/directives/x-on.js\nmapAttributes(startingWith(\"@\", into(prefix(\"on:\"))));\ndirective(\"on\", skipDuringClone((el, {value, modifiers, expression}, {cleanup}) => {\n  let evaluate2 = expression ? evaluateLater(el, expression) : () => {\n  };\n  if (el.tagName.toLowerCase() === \"template\") {\n    if (!el._x_forwardEvents)\n      el._x_forwardEvents = [];\n    if (!el._x_forwardEvents.includes(value))\n      el._x_forwardEvents.push(value);\n  }\n  let removeListener = on(el, value, modifiers, (e) => {\n    evaluate2(() => {\n    }, {scope: {$event: e}, params: [e]});\n  });\n  cleanup(() => removeListener());\n}));\n\n// packages/alpinejs/src/index.js\nalpine_default.setEvaluator(normalEvaluator);\nalpine_default.setReactivityEngine({reactive: import_reactivity9.reactive, effect: import_reactivity9.effect, release: import_reactivity9.stop, raw: import_reactivity9.toRaw});\nvar src_default = alpine_default;\n\n// packages/alpinejs/builds/module.js\nvar module_default = src_default;\nexport {\n  module_default as default\n};\n", "// packages/intersect/src/index.js\nfunction src_default(Alpine) {\n  Alpine.directive(\"intersect\", (el, {value, expression, modifiers}, {evaluateLater, cleanup}) => {\n    let evaluate = evaluateLater(expression);\n    let options = {\n      threshold: getThreshhold(modifiers)\n    };\n    let observer = new IntersectionObserver((entries) => {\n      entries.forEach((entry) => {\n        if (!entry.isIntersecting && value === \"enter\" || entry.isIntersecting && value === \"leave\" || entry.intersectionRatio === 0 && !value)\n          return;\n        evaluate();\n        modifiers.includes(\"once\") && observer.disconnect();\n      });\n    }, options);\n    observer.observe(el);\n    cleanup(() => {\n      observer.disconnect();\n    });\n  });\n}\nfunction getThreshhold(modifiers) {\n  if (modifiers.includes(\"full\"))\n    return 0.99;\n  if (modifiers.includes(\"half\"))\n    return 0.5;\n  return 0;\n}\n\n// packages/intersect/builds/module.js\nvar module_default = src_default;\nexport {\n  module_default as default\n};\n", "// packages/persist/src/index.js\nfunction src_default(Alpine) {\n  let persist = () => {\n    let alias;\n    let storage = localStorage;\n    return Alpine.interceptor((initialValue, getter, setter, path, key) => {\n      let lookup = alias || `_x_${path}`;\n      let initial = storageHas(lookup, storage) ? storageGet(lookup, storage) : initialValue;\n      setter(initial);\n      Alpine.effect(() => {\n        let value = getter();\n        storageSet(lookup, value, storage);\n        setter(value);\n      });\n      return initial;\n    }, (func) => {\n      func.as = (key) => {\n        alias = key;\n        return func;\n      }, func.using = (target) => {\n        storage = target;\n        return func;\n      };\n    });\n  };\n  Object.defineProperty(Alpine, \"$persist\", {get: () => persist()});\n  Alpine.magic(\"persist\", persist);\n}\nfunction storageHas(key, storage) {\n  return storage.getItem(key) !== null;\n}\nfunction storageGet(key, storage) {\n  return JSON.parse(storage.getItem(key, storage));\n}\nfunction storageSet(key, value, storage) {\n  storage.setItem(key, JSON.stringify(value));\n}\n\n// packages/persist/builds/module.js\nvar module_default = src_default;\nexport {\n  module_default as default\n};\n", "// node_modules/tabbable/dist/index.esm.js\n/*!\n* tabbable 5.2.1\n* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE\n*/\nvar candidateSelectors = [\"input\", \"select\", \"textarea\", \"a[href]\", \"button\", \"[tabindex]\", \"audio[controls]\", \"video[controls]\", '[contenteditable]:not([contenteditable=\"false\"])', \"details>summary:first-of-type\", \"details\"];\nvar candidateSelector = /* @__PURE__ */ candidateSelectors.join(\",\");\nvar matches = typeof Element === \"undefined\" ? function() {\n} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\nvar getCandidates = function getCandidates2(el, includeContainer, filter) {\n  var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));\n  if (includeContainer && matches.call(el, candidateSelector)) {\n    candidates.unshift(el);\n  }\n  candidates = candidates.filter(filter);\n  return candidates;\n};\nvar isContentEditable = function isContentEditable2(node) {\n  return node.contentEditable === \"true\";\n};\nvar getTabindex = function getTabindex2(node) {\n  var tabindexAttr = parseInt(node.getAttribute(\"tabindex\"), 10);\n  if (!isNaN(tabindexAttr)) {\n    return tabindexAttr;\n  }\n  if (isContentEditable(node)) {\n    return 0;\n  }\n  if ((node.nodeName === \"AUDIO\" || node.nodeName === \"VIDEO\" || node.nodeName === \"DETAILS\") && node.getAttribute(\"tabindex\") === null) {\n    return 0;\n  }\n  return node.tabIndex;\n};\nvar sortOrderedTabbables = function sortOrderedTabbables2(a, b) {\n  return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;\n};\nvar isInput = function isInput2(node) {\n  return node.tagName === \"INPUT\";\n};\nvar isHiddenInput = function isHiddenInput2(node) {\n  return isInput(node) && node.type === \"hidden\";\n};\nvar isDetailsWithSummary = function isDetailsWithSummary2(node) {\n  var r = node.tagName === \"DETAILS\" && Array.prototype.slice.apply(node.children).some(function(child) {\n    return child.tagName === \"SUMMARY\";\n  });\n  return r;\n};\nvar getCheckedRadio = function getCheckedRadio2(nodes, form) {\n  for (var i = 0; i < nodes.length; i++) {\n    if (nodes[i].checked && nodes[i].form === form) {\n      return nodes[i];\n    }\n  }\n};\nvar isTabbableRadio = function isTabbableRadio2(node) {\n  if (!node.name) {\n    return true;\n  }\n  var radioScope = node.form || node.ownerDocument;\n  var queryRadios = function queryRadios2(name) {\n    return radioScope.querySelectorAll('input[type=\"radio\"][name=\"' + name + '\"]');\n  };\n  var radioSet;\n  if (typeof window !== \"undefined\" && typeof window.CSS !== \"undefined\" && typeof window.CSS.escape === \"function\") {\n    radioSet = queryRadios(window.CSS.escape(node.name));\n  } else {\n    try {\n      radioSet = queryRadios(node.name);\n    } catch (err) {\n      console.error(\"Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s\", err.message);\n      return false;\n    }\n  }\n  var checked = getCheckedRadio(radioSet, node.form);\n  return !checked || checked === node;\n};\nvar isRadio = function isRadio2(node) {\n  return isInput(node) && node.type === \"radio\";\n};\nvar isNonTabbableRadio = function isNonTabbableRadio2(node) {\n  return isRadio(node) && !isTabbableRadio(node);\n};\nvar isHidden = function isHidden2(node, displayCheck) {\n  if (getComputedStyle(node).visibility === \"hidden\") {\n    return true;\n  }\n  var isDirectSummary = matches.call(node, \"details>summary:first-of-type\");\n  var nodeUnderDetails = isDirectSummary ? node.parentElement : node;\n  if (matches.call(nodeUnderDetails, \"details:not([open]) *\")) {\n    return true;\n  }\n  if (!displayCheck || displayCheck === \"full\") {\n    while (node) {\n      if (getComputedStyle(node).display === \"none\") {\n        return true;\n      }\n      node = node.parentElement;\n    }\n  } else if (displayCheck === \"non-zero-area\") {\n    var _node$getBoundingClie = node.getBoundingClientRect(), width = _node$getBoundingClie.width, height = _node$getBoundingClie.height;\n    return width === 0 && height === 0;\n  }\n  return false;\n};\nvar isDisabledFromFieldset = function isDisabledFromFieldset2(node) {\n  if (isInput(node) || node.tagName === \"SELECT\" || node.tagName === \"TEXTAREA\" || node.tagName === \"BUTTON\") {\n    var parentNode = node.parentElement;\n    while (parentNode) {\n      if (parentNode.tagName === \"FIELDSET\" && parentNode.disabled) {\n        for (var i = 0; i < parentNode.children.length; i++) {\n          var child = parentNode.children.item(i);\n          if (child.tagName === \"LEGEND\") {\n            if (child.contains(node)) {\n              return false;\n            }\n            return true;\n          }\n        }\n        return true;\n      }\n      parentNode = parentNode.parentElement;\n    }\n  }\n  return false;\n};\nvar isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable2(options, node) {\n  if (node.disabled || isHiddenInput(node) || isHidden(node, options.displayCheck) || isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {\n    return false;\n  }\n  return true;\n};\nvar isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable2(options, node) {\n  if (!isNodeMatchingSelectorFocusable(options, node) || isNonTabbableRadio(node) || getTabindex(node) < 0) {\n    return false;\n  }\n  return true;\n};\nvar tabbable = function tabbable2(el, options) {\n  options = options || {};\n  var regularTabbables = [];\n  var orderedTabbables = [];\n  var candidates = getCandidates(el, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));\n  candidates.forEach(function(candidate, i) {\n    var candidateTabindex = getTabindex(candidate);\n    if (candidateTabindex === 0) {\n      regularTabbables.push(candidate);\n    } else {\n      orderedTabbables.push({\n        documentOrder: i,\n        tabIndex: candidateTabindex,\n        node: candidate\n      });\n    }\n  });\n  var tabbableNodes = orderedTabbables.sort(sortOrderedTabbables).map(function(a) {\n    return a.node;\n  }).concat(regularTabbables);\n  return tabbableNodes;\n};\nvar focusable = function focusable2(el, options) {\n  options = options || {};\n  var candidates = getCandidates(el, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));\n  return candidates;\n};\nvar focusableCandidateSelector = /* @__PURE__ */ candidateSelectors.concat(\"iframe\").join(\",\");\nvar isFocusable = function isFocusable2(node, options) {\n  options = options || {};\n  if (!node) {\n    throw new Error(\"No node provided\");\n  }\n  if (matches.call(node, focusableCandidateSelector) === false) {\n    return false;\n  }\n  return isNodeMatchingSelectorFocusable(options, node);\n};\n\n// node_modules/focus-trap/dist/focus-trap.esm.js\n/*!\n* focus-trap 6.6.1\n* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE\n*/\nfunction ownKeys(object, enumerableOnly) {\n  var keys = Object.keys(object);\n  if (Object.getOwnPropertySymbols) {\n    var symbols = Object.getOwnPropertySymbols(object);\n    if (enumerableOnly) {\n      symbols = symbols.filter(function(sym) {\n        return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n      });\n    }\n    keys.push.apply(keys, symbols);\n  }\n  return keys;\n}\nfunction _objectSpread2(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i] != null ? arguments[i] : {};\n    if (i % 2) {\n      ownKeys(Object(source), true).forEach(function(key) {\n        _defineProperty(target, key, source[key]);\n      });\n    } else if (Object.getOwnPropertyDescriptors) {\n      Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n    } else {\n      ownKeys(Object(source)).forEach(function(key) {\n        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n      });\n    }\n  }\n  return target;\n}\nfunction _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n  return obj;\n}\nvar activeFocusTraps = function() {\n  var trapQueue = [];\n  return {\n    activateTrap: function activateTrap(trap) {\n      if (trapQueue.length > 0) {\n        var activeTrap = trapQueue[trapQueue.length - 1];\n        if (activeTrap !== trap) {\n          activeTrap.pause();\n        }\n      }\n      var trapIndex = trapQueue.indexOf(trap);\n      if (trapIndex === -1) {\n        trapQueue.push(trap);\n      } else {\n        trapQueue.splice(trapIndex, 1);\n        trapQueue.push(trap);\n      }\n    },\n    deactivateTrap: function deactivateTrap(trap) {\n      var trapIndex = trapQueue.indexOf(trap);\n      if (trapIndex !== -1) {\n        trapQueue.splice(trapIndex, 1);\n      }\n      if (trapQueue.length > 0) {\n        trapQueue[trapQueue.length - 1].unpause();\n      }\n    }\n  };\n}();\nvar isSelectableInput = function isSelectableInput2(node) {\n  return node.tagName && node.tagName.toLowerCase() === \"input\" && typeof node.select === \"function\";\n};\nvar isEscapeEvent = function isEscapeEvent2(e) {\n  return e.key === \"Escape\" || e.key === \"Esc\" || e.keyCode === 27;\n};\nvar isTabEvent = function isTabEvent2(e) {\n  return e.key === \"Tab\" || e.keyCode === 9;\n};\nvar delay = function delay2(fn) {\n  return setTimeout(fn, 0);\n};\nvar findIndex = function findIndex2(arr, fn) {\n  var idx = -1;\n  arr.every(function(value, i) {\n    if (fn(value)) {\n      idx = i;\n      return false;\n    }\n    return true;\n  });\n  return idx;\n};\nvar valueOrHandler = function valueOrHandler2(value) {\n  for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n    params[_key - 1] = arguments[_key];\n  }\n  return typeof value === \"function\" ? value.apply(void 0, params) : value;\n};\nvar createFocusTrap = function createFocusTrap2(elements, userOptions) {\n  var doc = document;\n  var config = _objectSpread2({\n    returnFocusOnDeactivate: true,\n    escapeDeactivates: true,\n    delayInitialFocus: true\n  }, userOptions);\n  var state = {\n    containers: [],\n    tabbableGroups: [],\n    nodeFocusedBeforeActivation: null,\n    mostRecentlyFocusedNode: null,\n    active: false,\n    paused: false,\n    delayInitialFocusTimer: void 0\n  };\n  var trap;\n  var getOption = function getOption2(configOverrideOptions, optionName, configOptionName) {\n    return configOverrideOptions && configOverrideOptions[optionName] !== void 0 ? configOverrideOptions[optionName] : config[configOptionName || optionName];\n  };\n  var containersContain = function containersContain2(element) {\n    return state.containers.some(function(container) {\n      return container.contains(element);\n    });\n  };\n  var getNodeForOption = function getNodeForOption2(optionName) {\n    var optionValue = config[optionName];\n    if (!optionValue) {\n      return null;\n    }\n    var node = optionValue;\n    if (typeof optionValue === \"string\") {\n      node = doc.querySelector(optionValue);\n      if (!node) {\n        throw new Error(\"`\".concat(optionName, \"` refers to no known node\"));\n      }\n    }\n    if (typeof optionValue === \"function\") {\n      node = optionValue();\n      if (!node) {\n        throw new Error(\"`\".concat(optionName, \"` did not return a node\"));\n      }\n    }\n    return node;\n  };\n  var getInitialFocusNode = function getInitialFocusNode2() {\n    var node;\n    if (getOption({}, \"initialFocus\") === false) {\n      return false;\n    }\n    if (getNodeForOption(\"initialFocus\") !== null) {\n      node = getNodeForOption(\"initialFocus\");\n    } else if (containersContain(doc.activeElement)) {\n      node = doc.activeElement;\n    } else {\n      var firstTabbableGroup = state.tabbableGroups[0];\n      var firstTabbableNode = firstTabbableGroup && firstTabbableGroup.firstTabbableNode;\n      node = firstTabbableNode || getNodeForOption(\"fallbackFocus\");\n    }\n    if (!node) {\n      throw new Error(\"Your focus-trap needs to have at least one focusable element\");\n    }\n    return node;\n  };\n  var updateTabbableNodes = function updateTabbableNodes2() {\n    state.tabbableGroups = state.containers.map(function(container) {\n      var tabbableNodes = tabbable(container);\n      if (tabbableNodes.length > 0) {\n        return {\n          container,\n          firstTabbableNode: tabbableNodes[0],\n          lastTabbableNode: tabbableNodes[tabbableNodes.length - 1]\n        };\n      }\n      return void 0;\n    }).filter(function(group) {\n      return !!group;\n    });\n    if (state.tabbableGroups.length <= 0 && !getNodeForOption(\"fallbackFocus\")) {\n      throw new Error(\"Your focus-trap must have at least one container with at least one tabbable node in it at all times\");\n    }\n  };\n  var tryFocus = function tryFocus2(node) {\n    if (node === false) {\n      return;\n    }\n    if (node === doc.activeElement) {\n      return;\n    }\n    if (!node || !node.focus) {\n      tryFocus2(getInitialFocusNode());\n      return;\n    }\n    node.focus({\n      preventScroll: !!config.preventScroll\n    });\n    state.mostRecentlyFocusedNode = node;\n    if (isSelectableInput(node)) {\n      node.select();\n    }\n  };\n  var getReturnFocusNode = function getReturnFocusNode2(previousActiveElement) {\n    var node = getNodeForOption(\"setReturnFocus\");\n    return node ? node : previousActiveElement;\n  };\n  var checkPointerDown = function checkPointerDown2(e) {\n    if (containersContain(e.target)) {\n      return;\n    }\n    if (valueOrHandler(config.clickOutsideDeactivates, e)) {\n      trap.deactivate({\n        returnFocus: config.returnFocusOnDeactivate && !isFocusable(e.target)\n      });\n      return;\n    }\n    if (valueOrHandler(config.allowOutsideClick, e)) {\n      return;\n    }\n    e.preventDefault();\n  };\n  var checkFocusIn = function checkFocusIn2(e) {\n    var targetContained = containersContain(e.target);\n    if (targetContained || e.target instanceof Document) {\n      if (targetContained) {\n        state.mostRecentlyFocusedNode = e.target;\n      }\n    } else {\n      e.stopImmediatePropagation();\n      tryFocus(state.mostRecentlyFocusedNode || getInitialFocusNode());\n    }\n  };\n  var checkTab = function checkTab2(e) {\n    updateTabbableNodes();\n    var destinationNode = null;\n    if (state.tabbableGroups.length > 0) {\n      var containerIndex = findIndex(state.tabbableGroups, function(_ref) {\n        var container = _ref.container;\n        return container.contains(e.target);\n      });\n      if (containerIndex < 0) {\n        if (e.shiftKey) {\n          destinationNode = state.tabbableGroups[state.tabbableGroups.length - 1].lastTabbableNode;\n        } else {\n          destinationNode = state.tabbableGroups[0].firstTabbableNode;\n        }\n      } else if (e.shiftKey) {\n        var startOfGroupIndex = findIndex(state.tabbableGroups, function(_ref2) {\n          var firstTabbableNode = _ref2.firstTabbableNode;\n          return e.target === firstTabbableNode;\n        });\n        if (startOfGroupIndex < 0 && state.tabbableGroups[containerIndex].container === e.target) {\n          startOfGroupIndex = containerIndex;\n        }\n        if (startOfGroupIndex >= 0) {\n          var destinationGroupIndex = startOfGroupIndex === 0 ? state.tabbableGroups.length - 1 : startOfGroupIndex - 1;\n          var destinationGroup = state.tabbableGroups[destinationGroupIndex];\n          destinationNode = destinationGroup.lastTabbableNode;\n        }\n      } else {\n        var lastOfGroupIndex = findIndex(state.tabbableGroups, function(_ref3) {\n          var lastTabbableNode = _ref3.lastTabbableNode;\n          return e.target === lastTabbableNode;\n        });\n        if (lastOfGroupIndex < 0 && state.tabbableGroups[containerIndex].container === e.target) {\n          lastOfGroupIndex = containerIndex;\n        }\n        if (lastOfGroupIndex >= 0) {\n          var _destinationGroupIndex = lastOfGroupIndex === state.tabbableGroups.length - 1 ? 0 : lastOfGroupIndex + 1;\n          var _destinationGroup = state.tabbableGroups[_destinationGroupIndex];\n          destinationNode = _destinationGroup.firstTabbableNode;\n        }\n      }\n    } else {\n      destinationNode = getNodeForOption(\"fallbackFocus\");\n    }\n    if (destinationNode) {\n      e.preventDefault();\n      tryFocus(destinationNode);\n    }\n  };\n  var checkKey = function checkKey2(e) {\n    if (isEscapeEvent(e) && valueOrHandler(config.escapeDeactivates) !== false) {\n      e.preventDefault();\n      trap.deactivate();\n      return;\n    }\n    if (isTabEvent(e)) {\n      checkTab(e);\n      return;\n    }\n  };\n  var checkClick = function checkClick2(e) {\n    if (valueOrHandler(config.clickOutsideDeactivates, e)) {\n      return;\n    }\n    if (containersContain(e.target)) {\n      return;\n    }\n    if (valueOrHandler(config.allowOutsideClick, e)) {\n      return;\n    }\n    e.preventDefault();\n    e.stopImmediatePropagation();\n  };\n  var addListeners = function addListeners2() {\n    if (!state.active) {\n      return;\n    }\n    activeFocusTraps.activateTrap(trap);\n    state.delayInitialFocusTimer = config.delayInitialFocus ? delay(function() {\n      tryFocus(getInitialFocusNode());\n    }) : tryFocus(getInitialFocusNode());\n    doc.addEventListener(\"focusin\", checkFocusIn, true);\n    doc.addEventListener(\"mousedown\", checkPointerDown, {\n      capture: true,\n      passive: false\n    });\n    doc.addEventListener(\"touchstart\", checkPointerDown, {\n      capture: true,\n      passive: false\n    });\n    doc.addEventListener(\"click\", checkClick, {\n      capture: true,\n      passive: false\n    });\n    doc.addEventListener(\"keydown\", checkKey, {\n      capture: true,\n      passive: false\n    });\n    return trap;\n  };\n  var removeListeners = function removeListeners2() {\n    if (!state.active) {\n      return;\n    }\n    doc.removeEventListener(\"focusin\", checkFocusIn, true);\n    doc.removeEventListener(\"mousedown\", checkPointerDown, true);\n    doc.removeEventListener(\"touchstart\", checkPointerDown, true);\n    doc.removeEventListener(\"click\", checkClick, true);\n    doc.removeEventListener(\"keydown\", checkKey, true);\n    return trap;\n  };\n  trap = {\n    activate: function activate(activateOptions) {\n      if (state.active) {\n        return this;\n      }\n      var onActivate = getOption(activateOptions, \"onActivate\");\n      var onPostActivate = getOption(activateOptions, \"onPostActivate\");\n      var checkCanFocusTrap = getOption(activateOptions, \"checkCanFocusTrap\");\n      if (!checkCanFocusTrap) {\n        updateTabbableNodes();\n      }\n      state.active = true;\n      state.paused = false;\n      state.nodeFocusedBeforeActivation = doc.activeElement;\n      if (onActivate) {\n        onActivate();\n      }\n      var finishActivation = function finishActivation2() {\n        if (checkCanFocusTrap) {\n          updateTabbableNodes();\n        }\n        addListeners();\n        if (onPostActivate) {\n          onPostActivate();\n        }\n      };\n      if (checkCanFocusTrap) {\n        checkCanFocusTrap(state.containers.concat()).then(finishActivation, finishActivation);\n        return this;\n      }\n      finishActivation();\n      return this;\n    },\n    deactivate: function deactivate(deactivateOptions) {\n      if (!state.active) {\n        return this;\n      }\n      clearTimeout(state.delayInitialFocusTimer);\n      state.delayInitialFocusTimer = void 0;\n      removeListeners();\n      state.active = false;\n      state.paused = false;\n      activeFocusTraps.deactivateTrap(trap);\n      var onDeactivate = getOption(deactivateOptions, \"onDeactivate\");\n      var onPostDeactivate = getOption(deactivateOptions, \"onPostDeactivate\");\n      var checkCanReturnFocus = getOption(deactivateOptions, \"checkCanReturnFocus\");\n      if (onDeactivate) {\n        onDeactivate();\n      }\n      var returnFocus = getOption(deactivateOptions, \"returnFocus\", \"returnFocusOnDeactivate\");\n      var finishDeactivation = function finishDeactivation2() {\n        delay(function() {\n          if (returnFocus) {\n            tryFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation));\n          }\n          if (onPostDeactivate) {\n            onPostDeactivate();\n          }\n        });\n      };\n      if (returnFocus && checkCanReturnFocus) {\n        checkCanReturnFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation)).then(finishDeactivation, finishDeactivation);\n        return this;\n      }\n      finishDeactivation();\n      return this;\n    },\n    pause: function pause() {\n      if (state.paused || !state.active) {\n        return this;\n      }\n      state.paused = true;\n      removeListeners();\n      return this;\n    },\n    unpause: function unpause() {\n      if (!state.paused || !state.active) {\n        return this;\n      }\n      state.paused = false;\n      updateTabbableNodes();\n      addListeners();\n      return this;\n    },\n    updateContainerElements: function updateContainerElements(containerElements) {\n      var elementsAsArray = [].concat(containerElements).filter(Boolean);\n      state.containers = elementsAsArray.map(function(element) {\n        return typeof element === \"string\" ? doc.querySelector(element) : element;\n      });\n      if (state.active) {\n        updateTabbableNodes();\n      }\n      return this;\n    }\n  };\n  trap.updateContainerElements(elements);\n  return trap;\n};\n\n// packages/focus/src/index.js\nfunction src_default(Alpine) {\n  let lastFocused;\n  let currentFocused;\n  window.addEventListener(\"focusin\", () => {\n    lastFocused = currentFocused;\n    currentFocused = document.activeElement;\n  });\n  Alpine.magic(\"focus\", (el) => {\n    let within = el;\n    return {\n      __noscroll: false,\n      __wrapAround: false,\n      within(el2) {\n        within = el2;\n        return this;\n      },\n      withoutScrolling() {\n        this.__noscroll = true;\n        return this;\n      },\n      noscroll() {\n        this.__noscroll = true;\n        return this;\n      },\n      withWrapAround() {\n        this.__wrapAround = true;\n        return this;\n      },\n      wrap() {\n        return this.withWrapAround();\n      },\n      focusable(el2) {\n        return isFocusable(el2);\n      },\n      previouslyFocused() {\n        return lastFocused;\n      },\n      lastFocused() {\n        return lastFocused;\n      },\n      focused() {\n        return currentFocused;\n      },\n      focusables() {\n        if (Array.isArray(within))\n          return within;\n        return focusable(within, {displayCheck: \"none\"});\n      },\n      all() {\n        return this.focusables();\n      },\n      isFirst(el2) {\n        let els = this.all();\n        return els[0] && els[0].isSameNode(el2);\n      },\n      isLast(el2) {\n        let els = this.all();\n        return els.length && els.slice(-1)[0].isSameNode(el2);\n      },\n      getFirst() {\n        return this.all()[0];\n      },\n      getLast() {\n        return this.all().slice(-1)[0];\n      },\n      getNext() {\n        let list = this.all();\n        let current = document.activeElement;\n        if (list.indexOf(current) === -1)\n          return;\n        if (this.__wrapAround && list.indexOf(current) === list.length - 1) {\n          return list[0];\n        }\n        return list[list.indexOf(current) + 1];\n      },\n      getPrevious() {\n        let list = this.all();\n        let current = document.activeElement;\n        if (list.indexOf(current) === -1)\n          return;\n        if (this.__wrapAround && list.indexOf(current) === 0) {\n          return list.slice(-1)[0];\n        }\n        return list[list.indexOf(current) - 1];\n      },\n      first() {\n        this.focus(this.getFirst());\n      },\n      last() {\n        this.focus(this.getLast());\n      },\n      next() {\n        this.focus(this.getNext());\n      },\n      previous() {\n        this.focus(this.getPrevious());\n      },\n      prev() {\n        return this.previous();\n      },\n      focus(el2) {\n        if (!el2)\n          return;\n        setTimeout(() => {\n          if (!el2.hasAttribute(\"tabindex\"))\n            el2.setAttribute(\"tabindex\", \"0\");\n          el2.focus({preventScroll: this._noscroll});\n        });\n      }\n    };\n  });\n  Alpine.directive(\"trap\", Alpine.skipDuringClone((el, {expression, modifiers}, {effect, evaluateLater, cleanup}) => {\n    let evaluator = evaluateLater(expression);\n    let oldValue = false;\n    let trap = createFocusTrap(el, {\n      escapeDeactivates: false,\n      allowOutsideClick: true,\n      fallbackFocus: () => el\n    });\n    let undoInert = () => {\n    };\n    let undoDisableScrolling = () => {\n    };\n    const releaseFocus = () => {\n      undoInert();\n      undoInert = () => {\n      };\n      undoDisableScrolling();\n      undoDisableScrolling = () => {\n      };\n      trap.deactivate({\n        returnFocus: !modifiers.includes(\"noreturn\")\n      });\n    };\n    effect(() => evaluator((value) => {\n      if (oldValue === value)\n        return;\n      if (value && !oldValue) {\n        setTimeout(() => {\n          if (modifiers.includes(\"inert\"))\n            undoInert = setInert(el);\n          if (modifiers.includes(\"noscroll\"))\n            undoDisableScrolling = disableScrolling();\n          trap.activate();\n        });\n      }\n      if (!value && oldValue) {\n        releaseFocus();\n      }\n      oldValue = !!value;\n    }));\n    cleanup(releaseFocus);\n  }, (el, {expression, modifiers}, {evaluate}) => {\n    if (modifiers.includes(\"inert\") && evaluate(expression))\n      setInert(el);\n  }));\n}\nfunction setInert(el) {\n  let undos = [];\n  crawlSiblingsUp(el, (sibling) => {\n    let cache = sibling.hasAttribute(\"aria-hidden\");\n    sibling.setAttribute(\"aria-hidden\", \"true\");\n    undos.push(() => cache || sibling.removeAttribute(\"aria-hidden\"));\n  });\n  return () => {\n    while (undos.length)\n      undos.pop()();\n  };\n}\nfunction crawlSiblingsUp(el, callback) {\n  if (el.isSameNode(document.body) || !el.parentNode)\n    return;\n  Array.from(el.parentNode.children).forEach((sibling) => {\n    if (!sibling.isSameNode(el))\n      callback(sibling);\n    crawlSiblingsUp(el.parentNode, callback);\n  });\n}\nfunction disableScrolling() {\n  let overflow = document.documentElement.style.overflow;\n  let paddingRight = document.documentElement.style.paddingRight;\n  let scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;\n  document.documentElement.style.overflow = \"hidden\";\n  document.documentElement.style.paddingRight = `${scrollbarWidth}px`;\n  return () => {\n    document.documentElement.style.overflow = overflow;\n    document.documentElement.style.paddingRight = paddingRight;\n  };\n}\n\n// packages/focus/builds/module.js\nvar module_default = src_default;\nexport {\n  module_default as default\n};\n", "// packages/collapse/src/index.js\nfunction src_default(Alpine) {\n  Alpine.directive(\"collapse\", collapse);\n  collapse.inline = (el, {modifiers}) => {\n    if (!modifiers.includes(\"min\"))\n      return;\n    el._x_doShow = () => {\n    };\n    el._x_doHide = () => {\n    };\n  };\n  function collapse(el, {modifiers}) {\n    let duration = modifierValue(modifiers, \"duration\", 250) / 1e3;\n    let floor = modifierValue(modifiers, \"min\", 0);\n    let fullyHide = !modifiers.includes(\"min\");\n    if (!el._x_isShown)\n      el.style.height = `${floor}px`;\n    if (!el._x_isShown && fullyHide)\n      el.hidden = true;\n    if (!el._x_isShown)\n      el.style.overflow = \"hidden\";\n    let setFunction = (el2, styles) => {\n      let revertFunction = Alpine.setStyles(el2, styles);\n      return styles.height ? () => {\n      } : revertFunction;\n    };\n    let transitionStyles = {\n      transitionProperty: \"height\",\n      transitionDuration: `${duration}s`,\n      transitionTimingFunction: \"cubic-bezier(0.4, 0.0, 0.2, 1)\"\n    };\n    el._x_transition = {\n      in(before = () => {\n      }, after = () => {\n      }) {\n        if (fullyHide)\n          el.hidden = false;\n        if (fullyHide)\n          el.style.display = null;\n        let current = el.getBoundingClientRect().height;\n        el.style.height = \"auto\";\n        let full = el.getBoundingClientRect().height;\n        if (current === full) {\n          current = floor;\n        }\n        Alpine.transition(el, Alpine.setStyles, {\n          during: transitionStyles,\n          start: {height: current + \"px\"},\n          end: {height: full + \"px\"}\n        }, () => el._x_isShown = true, () => {\n          if (el.getBoundingClientRect().height == full) {\n            el.style.overflow = null;\n          }\n        });\n      },\n      out(before = () => {\n      }, after = () => {\n      }) {\n        let full = el.getBoundingClientRect().height;\n        Alpine.transition(el, setFunction, {\n          during: transitionStyles,\n          start: {height: full + \"px\"},\n          end: {height: floor + \"px\"}\n        }, () => el.style.overflow = \"hidden\", () => {\n          el._x_isShown = false;\n          if (el.style.height == `${floor}px` && fullyHide) {\n            el.style.display = \"none\";\n            el.hidden = true;\n          }\n        });\n      }\n    };\n  }\n}\nfunction modifierValue(modifiers, key, fallback) {\n  if (modifiers.indexOf(key) === -1)\n    return fallback;\n  const rawValue = modifiers[modifiers.indexOf(key) + 1];\n  if (!rawValue)\n    return fallback;\n  if (key === \"duration\") {\n    let match = rawValue.match(/([0-9]+)ms/);\n    if (match)\n      return match[1];\n  }\n  if (key === \"min\") {\n    let match = rawValue.match(/([0-9]+)px/);\n    if (match)\n      return match[1];\n  }\n  return rawValue;\n}\n\n// packages/collapse/builds/module.js\nvar module_default = src_default;\nexport {\n  module_default as default\n};\n", "let onCopy = () => {}\n\nconst copy = (target) => {\n    if (typeof target === 'function') {\n        target = target()\n    }\n\n    if (typeof target === 'object') {\n        target = JSON.stringify(target)\n    }\n\n    return window.navigator.clipboard.writeText(target)\n        .then(onCopy)\n}\n\nfunction Clipboard(Alpine) {\n    Alpine.magic('clipboard', () => {\n        return copy\n    })\n\n    Alpine.directive('clipboard', (el, { modifiers, expression }, { evaluateLater, cleanup }) => {\n        const getCopyContent = modifiers.includes('raw') ? c => c(expression) : evaluateLater(expression)\n        const clickHandler = () => getCopyContent(copy)\n\n        el.addEventListener('click', clickHandler)\n\n        cleanup(() => {\n            el.removeEventListener('click', clickHandler)\n        })\n    })\n}\n\nClipboard.configure = (config) => {\n    if (config.hasOwnProperty('onCopy') && typeof config.onCopy === 'function') {\n        onCopy = config.onCopy\n    }\n\n    return Clipboard\n}\n\nexport default Clipboard;", "export const attachmentSelector = \"[data-trix-attachment]\"\n\nconst attachments = {\n  preview: {\n    presentation: \"gallery\",\n    caption: {\n      name: true,\n      size: true,\n    },\n  },\n  file: {\n    caption: {\n      size: true,\n    },\n  },\n}\nexport default attachments\n", "const attributes = {\n  default: {\n    tagName: \"div\",\n    parse: false,\n  },\n  quote: {\n    tagName: \"blockquote\",\n    nestable: true,\n  },\n  heading1: {\n    tagName: \"h1\",\n    terminal: true,\n    breakOnReturn: true,\n    group: false,\n  },\n  code: {\n    tagName: \"pre\",\n    terminal: true,\n    htmlAttributes: [ \"language\" ],\n    text: {\n      plaintext: true,\n    },\n  },\n  bulletList: {\n    tagName: \"ul\",\n    parse: false,\n  },\n  bullet: {\n    tagName: \"li\",\n    listAttribute: \"bulletList\",\n    group: false,\n    nestable: true,\n    test(element) {\n      return tagName(element.parentNode) === attributes[this.listAttribute].tagName\n    },\n  },\n  numberList: {\n    tagName: \"ol\",\n    parse: false,\n  },\n  number: {\n    tagName: \"li\",\n    listAttribute: \"numberList\",\n    group: false,\n    nestable: true,\n    test(element) {\n      return tagName(element.parentNode) === attributes[this.listAttribute].tagName\n    },\n  },\n  attachmentGallery: {\n    tagName: \"div\",\n    exclusive: true,\n    terminal: true,\n    parse: false,\n    group: false,\n  },\n}\n\nconst tagName = (element) => element?.tagName?.toLowerCase()\n\nexport default attributes\n", "const androidVersionMatch = navigator.userAgent.match(/android\\s([0-9]+.*Chrome)/i)\nconst androidVersion = androidVersionMatch && parseInt(androidVersionMatch[1])\n\nexport default {\n  // Android emits composition events when moving the cursor through existing text\n  // Introduced in Chrome 65: https://bugs.chromium.org/p/chromium/issues/detail?id=764439#c9\n  composesExistingText: /Android.*Chrome/.test(navigator.userAgent),\n\n  // Android 13, especially on Samsung keyboards, emits extra compositionend and beforeinput events\n  // that can make the input handler lose the current selection or enter an infinite input -> render -> input\n  // loop.\n  recentAndroid: androidVersion && androidVersion > 12,\n  samsungAndroid: androidVersion && navigator.userAgent.match(/Android.*SM-/),\n\n  // IE 11 activates resizing handles on editable elements that have \"layout\"\n  forcesObjectResizing: /Trident.*rv:11/.test(navigator.userAgent),\n  // https://www.w3.org/TR/input-events-1/ + https://www.w3.org/TR/input-events-2/\n  supportsInputEvents: typeof InputEvent !== \"undefined\" &&\n    [ \"data\", \"getTargetRanges\", \"inputType\" ].every(prop => prop in InputEvent.prototype),\n}\n", "export default {\n  attachFiles: \"Attach Files\",\n  bold: \"Bold\",\n  bullets: \"Bullets\",\n  byte: \"Byte\",\n  bytes: \"Bytes\",\n  captionPlaceholder: \"Add a caption\u2026\",\n  code: \"Code\",\n  heading1: \"Heading\",\n  indent: \"Increase Level\",\n  italic: \"Italic\",\n  link: \"Link\",\n  numbers: \"Numbers\",\n  outdent: \"Decrease Level\",\n  quote: \"Quote\",\n  redo: \"Redo\",\n  remove: \"Remove\",\n  strike: \"Strikethrough\",\n  undo: \"Undo\",\n  unlink: \"Unlink\",\n  url: \"URL\",\n  urlPlaceholder: \"Enter a URL\u2026\",\n  GB: \"GB\",\n  KB: \"KB\",\n  MB: \"MB\",\n  PB: \"PB\",\n  TB: \"TB\",\n}\n", "/* eslint-disable\n    no-case-declarations,\n*/\nimport lang from \"trix/config/lang\"\n\nconst sizes = [ lang.bytes, lang.KB, lang.MB, lang.GB, lang.TB, lang.PB ]\n\nexport default {\n  prefix: \"IEC\",\n  precision: 2,\n\n  formatter(number) {\n    switch (number) {\n      case 0:\n        return `0 ${lang.bytes}`\n      case 1:\n        return `1 ${lang.byte}`\n      default:\n        let base\n\n        if (this.prefix === \"SI\") {\n          base = 1000\n        } else if (this.prefix === \"IEC\") {\n          base = 1024\n        }\n\n        const exp = Math.floor(Math.log(number) / Math.log(base))\n        const humanSize = number / Math.pow(base, exp)\n        const string = humanSize.toFixed(this.precision)\n        const withoutInsignificantZeros = string.replace(/0*$/, \"\").replace(/\\.$/, \"\")\n        return `${withoutInsignificantZeros} ${sizes[exp]}`\n    }\n  },\n}\n", "export const ZERO_WIDTH_SPACE = \"\\uFEFF\"\nexport const NON_BREAKING_SPACE = \"\\u00A0\"\nexport const OBJECT_REPLACEMENT_CHARACTER = \"\\uFFFC\"\n", "export const extend = function(properties) {\n  for (const key in properties) {\n    const value = properties[key]\n    this[key] = value\n  }\n  return this\n}\n", "import blockAttributes from \"trix/config/block_attributes\"\nimport { ZERO_WIDTH_SPACE } from \"trix/constants\"\nimport { extend } from \"./extend\"\nimport { attachmentSelector } from \"trix/config/attachments\"\n\nconst html = document.documentElement\nconst match = html.matches\n\nexport const handleEvent = function(eventName, { onElement, matchingSelector, withCallback, inPhase, preventDefault, times } = {}) {\n  const element = onElement ? onElement : html\n  const selector = matchingSelector\n  const useCapture = inPhase === \"capturing\"\n\n  const handler = function(event) {\n    if (times != null && --times === 0) {\n      handler.destroy()\n    }\n    const target = findClosestElementFromNode(event.target, { matchingSelector: selector })\n    if (target != null) {\n      withCallback?.call(target, event, target)\n      if (preventDefault) {\n        event.preventDefault()\n      }\n    }\n  }\n\n  handler.destroy = () => element.removeEventListener(eventName, handler, useCapture)\n\n  element.addEventListener(eventName, handler, useCapture)\n  return handler\n}\n\nexport const handleEventOnce = function(eventName, options = {}) {\n  options.times = 1\n  return handleEvent(eventName, options)\n}\n\nexport const triggerEvent = function(eventName, { onElement, bubbles, cancelable, attributes } = {}) {\n  const element = onElement != null ? onElement : html\n  bubbles = bubbles !== false\n  cancelable = cancelable !== false\n\n  const event = document.createEvent(\"Events\")\n  event.initEvent(eventName, bubbles, cancelable)\n  if (attributes != null) {\n    extend.call(event, attributes)\n  }\n  return element.dispatchEvent(event)\n}\n\nexport const elementMatchesSelector = function(element, selector) {\n  if (element?.nodeType === 1) {\n    return match.call(element, selector)\n  }\n}\n\nexport const findClosestElementFromNode = function(node, { matchingSelector, untilNode } = {}) {\n  while (node && node.nodeType !== Node.ELEMENT_NODE) {\n    node = node.parentNode\n  }\n  if (node == null) {\n    return\n  }\n\n  if (matchingSelector != null) {\n    if (node.closest && untilNode == null) {\n      return node.closest(matchingSelector)\n    } else {\n      while (node && node !== untilNode) {\n        if (elementMatchesSelector(node, matchingSelector)) {\n          return node\n        }\n        node = node.parentNode\n      }\n    }\n  } else {\n    return node\n  }\n}\n\nexport const findInnerElement = function(element) {\n  while (element?.firstElementChild) {\n    element = element.firstElementChild\n  }\n  return element\n}\n\nexport const innerElementIsActive = (element) =>\n  document.activeElement !== element && elementContainsNode(element, document.activeElement)\n\nexport const elementContainsNode = function(element, node) {\n  if (!element || !node) {\n    return\n  }\n  while (node) {\n    if (node === element) {\n      return true\n    }\n    node = node.parentNode\n  }\n}\n\nexport const findNodeFromContainerAndOffset = function(container, offset) {\n  if (!container) {\n    return\n  }\n  if (container.nodeType === Node.TEXT_NODE) {\n    return container\n  } else if (offset === 0) {\n    return container.firstChild != null ? container.firstChild : container\n  } else {\n    return container.childNodes.item(offset - 1)\n  }\n}\n\nexport const findElementFromContainerAndOffset = function(container, offset) {\n  const node = findNodeFromContainerAndOffset(container, offset)\n  return findClosestElementFromNode(node)\n}\n\nexport const findChildIndexOfNode = function(node) {\n  if (!node?.parentNode) {\n    return\n  }\n  let childIndex = 0\n  node = node.previousSibling\n  while (node) {\n    childIndex++\n    node = node.previousSibling\n  }\n  return childIndex\n}\n\nexport const removeNode = (node) => node?.parentNode?.removeChild(node)\n\nexport const walkTree = function(tree, { onlyNodesOfType, usingFilter, expandEntityReferences } = {}) {\n  const whatToShow = (() => {\n    switch (onlyNodesOfType) {\n      case \"element\":\n        return NodeFilter.SHOW_ELEMENT\n      case \"text\":\n        return NodeFilter.SHOW_TEXT\n      case \"comment\":\n        return NodeFilter.SHOW_COMMENT\n      default:\n        return NodeFilter.SHOW_ALL\n    }\n  })()\n\n  return document.createTreeWalker(\n    tree,\n    whatToShow,\n    usingFilter != null ? usingFilter : null,\n    expandEntityReferences === true\n  )\n}\n\nexport const tagName = (element) => element?.tagName?.toLowerCase()\n\nexport const makeElement = function(tag, options = {}) {\n  let key, value\n  if (typeof tag === \"object\") {\n    options = tag\n    tag = options.tagName\n  } else {\n    options = { attributes: options }\n  }\n\n  const element = document.createElement(tag)\n\n  if (options.editable != null) {\n    if (options.attributes == null) {\n      options.attributes = {}\n    }\n    options.attributes.contenteditable = options.editable\n  }\n\n  if (options.attributes) {\n    for (key in options.attributes) {\n      value = options.attributes[key]\n      element.setAttribute(key, value)\n    }\n  }\n\n  if (options.style) {\n    for (key in options.style) {\n      value = options.style[key]\n      element.style[key] = value\n    }\n  }\n\n  if (options.data) {\n    for (key in options.data) {\n      value = options.data[key]\n      element.dataset[key] = value\n    }\n  }\n\n  if (options.className) {\n    options.className.split(\" \").forEach((className) => {\n      element.classList.add(className)\n    })\n  }\n\n  if (options.textContent) {\n    element.textContent = options.textContent\n  }\n\n  if (options.childNodes) {\n    [].concat(options.childNodes).forEach((childNode) => {\n      element.appendChild(childNode)\n    })\n  }\n\n  return element\n}\n\nlet blockTagNames = undefined\n\nexport const getBlockTagNames = function() {\n  if (blockTagNames != null) {\n    return blockTagNames\n  }\n\n  blockTagNames = []\n  for (const key in blockAttributes) {\n    const attributes = blockAttributes[key]\n    if (attributes.tagName) {\n      blockTagNames.push(attributes.tagName)\n    }\n  }\n\n  return blockTagNames\n}\n\nexport const nodeIsBlockContainer = (node) => nodeIsBlockStartComment(node?.firstChild)\n\nexport const nodeProbablyIsBlockContainer = function(node) {\n  return getBlockTagNames().includes(tagName(node)) && !getBlockTagNames().includes(tagName(node.firstChild))\n}\n\nexport const nodeIsBlockStart = function(node, { strict } = { strict: true }) {\n  if (strict) {\n    return nodeIsBlockStartComment(node)\n  } else {\n    return (\n      nodeIsBlockStartComment(node) || !nodeIsBlockStartComment(node.firstChild) && nodeProbablyIsBlockContainer(node)\n    )\n  }\n}\n\nexport const nodeIsBlockStartComment = (node) => nodeIsCommentNode(node) && node?.data === \"block\"\n\nexport const nodeIsCommentNode = (node) => node?.nodeType === Node.COMMENT_NODE\n\nexport const nodeIsCursorTarget = function(node, { name } = {}) {\n  if (!node) {\n    return\n  }\n  if (nodeIsTextNode(node)) {\n    if (node.data === ZERO_WIDTH_SPACE) {\n      if (name) {\n        return node.parentNode.dataset.trixCursorTarget === name\n      } else {\n        return true\n      }\n    }\n  } else {\n    return nodeIsCursorTarget(node.firstChild)\n  }\n}\n\nexport const nodeIsAttachmentElement = (node) => elementMatchesSelector(node, attachmentSelector)\n\nexport const nodeIsEmptyTextNode = (node) => nodeIsTextNode(node) && node?.data === \"\"\n\nexport const nodeIsTextNode = (node) => node?.nodeType === Node.TEXT_NODE\n", "import browser from \"trix/config/browser\"\nimport { makeElement, removeNode } from \"trix/core/helpers/dom\"\n\nconst input = {\n  level2Enabled: true,\n\n  getLevel() {\n    if (this.level2Enabled && browser.supportsInputEvents) {\n      return 2\n    } else {\n      return 0\n    }\n  },\n  pickFiles(callback) {\n    const input = makeElement(\"input\", { type: \"file\", multiple: true, hidden: true, id: this.fileInputId })\n\n    input.addEventListener(\"change\", () => {\n      callback(input.files)\n      removeNode(input)\n    })\n\n    removeNode(document.getElementById(this.fileInputId))\n    document.body.appendChild(input)\n    input.click()\n  }\n}\n\nexport default input\n", "export default {\n  8: \"backspace\",\n  9: \"tab\",\n  13: \"return\",\n  27: \"escape\",\n  37: \"left\",\n  39: \"right\",\n  46: \"delete\",\n  68: \"d\",\n  72: \"h\",\n  79: \"o\",\n}\n", "export default {\n  removeBlankTableCells: false,\n  tableCellSeparator: \" | \",\n  tableRowSeparator: \"\\n\",\n}\n", "import { attachmentSelector } from \"trix/config/attachments\"\n\nexport default {\n  bold: {\n    tagName: \"strong\",\n    inheritable: true,\n    parser(element) {\n      const style = window.getComputedStyle(element)\n      return style.fontWeight === \"bold\" || style.fontWeight >= 600\n    },\n  },\n  italic: {\n    tagName: \"em\",\n    inheritable: true,\n    parser(element) {\n      const style = window.getComputedStyle(element)\n      return style.fontStyle === \"italic\"\n    },\n  },\n  href: {\n    groupTagName: \"a\",\n    parser(element) {\n      const matchingSelector = `a:not(${attachmentSelector})`\n      const link = element.closest(matchingSelector)\n      if (link) {\n        return link.getAttribute(\"href\")\n      }\n    },\n  },\n  strike: {\n    tagName: \"del\",\n    inheritable: true,\n  },\n  frozen: {\n    style: { backgroundColor: \"highlight\" },\n  },\n}\n", "import lang from \"trix/config/lang\"\n\nexport default {\n  getDefaultHTML() {\n    return `<div class=\"trix-button-row\">\n      <span class=\"trix-button-group trix-button-group--text-tools\" data-trix-button-group=\"text-tools\">\n        <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-bold\" data-trix-attribute=\"bold\" data-trix-key=\"b\" title=\"${lang.bold}\" tabindex=\"-1\">${lang.bold}</button>\n        <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-italic\" data-trix-attribute=\"italic\" data-trix-key=\"i\" title=\"${lang.italic}\" tabindex=\"-1\">${lang.italic}</button>\n        <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-strike\" data-trix-attribute=\"strike\" title=\"${lang.strike}\" tabindex=\"-1\">${lang.strike}</button>\n        <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-link\" data-trix-attribute=\"href\" data-trix-action=\"link\" data-trix-key=\"k\" title=\"${lang.link}\" tabindex=\"-1\">${lang.link}</button>\n      </span>\n\n      <span class=\"trix-button-group trix-button-group--block-tools\" data-trix-button-group=\"block-tools\">\n        <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-heading-1\" data-trix-attribute=\"heading1\" title=\"${lang.heading1}\" tabindex=\"-1\">${lang.heading1}</button>\n        <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-quote\" data-trix-attribute=\"quote\" title=\"${lang.quote}\" tabindex=\"-1\">${lang.quote}</button>\n        <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-code\" data-trix-attribute=\"code\" title=\"${lang.code}\" tabindex=\"-1\">${lang.code}</button>\n        <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-bullet-list\" data-trix-attribute=\"bullet\" title=\"${lang.bullets}\" tabindex=\"-1\">${lang.bullets}</button>\n        <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-number-list\" data-trix-attribute=\"number\" title=\"${lang.numbers}\" tabindex=\"-1\">${lang.numbers}</button>\n        <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-decrease-nesting-level\" data-trix-action=\"decreaseNestingLevel\" title=\"${lang.outdent}\" tabindex=\"-1\">${lang.outdent}</button>\n        <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-increase-nesting-level\" data-trix-action=\"increaseNestingLevel\" title=\"${lang.indent}\" tabindex=\"-1\">${lang.indent}</button>\n      </span>\n\n      <span class=\"trix-button-group trix-button-group--file-tools\" data-trix-button-group=\"file-tools\">\n        <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-attach\" data-trix-action=\"attachFiles\" title=\"${lang.attachFiles}\" tabindex=\"-1\">${lang.attachFiles}</button>\n      </span>\n\n      <span class=\"trix-button-group-spacer\"></span>\n\n      <span class=\"trix-button-group trix-button-group--history-tools\" data-trix-button-group=\"history-tools\">\n        <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-undo\" data-trix-action=\"undo\" data-trix-key=\"z\" title=\"${lang.undo}\" tabindex=\"-1\">${lang.undo}</button>\n        <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-redo\" data-trix-action=\"redo\" data-trix-key=\"shift+z\" title=\"${lang.redo}\" tabindex=\"-1\">${lang.redo}</button>\n      </span>\n    </div>\n\n    <div class=\"trix-dialogs\" data-trix-dialogs>\n      <div class=\"trix-dialog trix-dialog--link\" data-trix-dialog=\"href\" data-trix-dialog-attribute=\"href\">\n        <div class=\"trix-dialog__link-fields\">\n          <input type=\"url\" name=\"href\" class=\"trix-input trix-input--dialog\" placeholder=\"${lang.urlPlaceholder}\" aria-label=\"${lang.url}\" required data-trix-input>\n          <div class=\"trix-button-group\">\n            <input type=\"button\" class=\"trix-button trix-button--dialog\" value=\"${lang.link}\" data-trix-method=\"setAttribute\">\n            <input type=\"button\" class=\"trix-button trix-button--dialog\" value=\"${lang.unlink}\" data-trix-method=\"removeAttribute\">\n          </div>\n        </div>\n      </div>\n    </div>`\n  },\n}\n", "const undo = { interval: 5000 }\nexport default undo\n", "export default {\n  attachment: \"attachment\",\n  attachmentCaption: \"attachment__caption\",\n  attachmentCaptionEditor: \"attachment__caption-editor\",\n  attachmentMetadata: \"attachment__metadata\",\n  attachmentMetadataContainer: \"attachment__metadata-container\",\n  attachmentName: \"attachment__name\",\n  attachmentProgress: \"attachment__progress\",\n  attachmentSize: \"attachment__size\",\n  attachmentToolbar: \"attachment__toolbar\",\n  attachmentGallery: \"attachment-gallery\",\n}\n", "export default class BasicObject {\n  static proxyMethod(expression) {\n    const { name, toMethod, toProperty, optional } = parseProxyMethodExpression(expression)\n\n    this.prototype[name] = function() {\n      let subject\n      let object\n\n      if (toMethod) {\n        if (optional) {\n          object = this[toMethod]?.()\n        } else {\n          object = this[toMethod]()\n        }\n      } else if (toProperty) {\n        object = this[toProperty]\n      }\n\n      if (optional) {\n        subject = object?.[name]\n        if (subject) {\n          return apply.call(subject, object, arguments)\n        }\n      } else {\n        subject = object[name]\n        return apply.call(subject, object, arguments)\n      }\n    }\n  }\n}\n\nconst parseProxyMethodExpression = function(expression) {\n  const match = expression.match(proxyMethodExpressionPattern)\n  if (!match) {\n    throw new Error(`can't parse @proxyMethod expression: ${expression}`)\n  }\n\n  const args = { name: match[4] }\n\n  if (match[2] != null) {\n    args.toMethod = match[1]\n  } else {\n    args.toProperty = match[1]\n  }\n\n  if (match[3] != null) {\n    args.optional = true\n  }\n\n  return args\n}\n\nconst { apply } = Function.prototype\n\nconst proxyMethodExpressionPattern = new RegExp(\"\\\n^\\\n(.+?)\\\n(\\\\(\\\\))?\\\n(\\\\?)?\\\n\\\\.\\\n(.+?)\\\n$\\\n\")\n", "import BasicObject from \"trix/core/basic_object\"\n\nexport default class UTF16String extends BasicObject {\n  static box(value = \"\") {\n    if (value instanceof this) {\n      return value\n    } else {\n      return this.fromUCS2String(value?.toString())\n    }\n  }\n\n  static fromUCS2String(ucs2String) {\n    return new this(ucs2String, ucs2decode(ucs2String))\n  }\n\n  static fromCodepoints(codepoints) {\n    return new this(ucs2encode(codepoints), codepoints)\n  }\n\n  constructor(ucs2String, codepoints) {\n    super(...arguments)\n    this.ucs2String = ucs2String\n    this.codepoints = codepoints\n    this.length = this.codepoints.length\n    this.ucs2Length = this.ucs2String.length\n  }\n\n  offsetToUCS2Offset(offset) {\n    return ucs2encode(this.codepoints.slice(0, Math.max(0, offset))).length\n  }\n\n  offsetFromUCS2Offset(ucs2Offset) {\n    return ucs2decode(this.ucs2String.slice(0, Math.max(0, ucs2Offset))).length\n  }\n\n  slice() {\n    return this.constructor.fromCodepoints(this.codepoints.slice(...arguments))\n  }\n\n  charAt(offset) {\n    return this.slice(offset, offset + 1)\n  }\n\n  isEqualTo(value) {\n    return this.constructor.box(value).ucs2String === this.ucs2String\n  }\n\n  toJSON() {\n    return this.ucs2String\n  }\n\n  getCacheKey() {\n    return this.ucs2String\n  }\n\n  toString() {\n    return this.ucs2String\n  }\n}\n\nconst hasArrayFrom = Array.from?.(\"\\ud83d\\udc7c\").length === 1\nconst hasStringCodePointAt = \" \".codePointAt?.(0) != null\nconst hasStringFromCodePoint = String.fromCodePoint?.(32, 128124) === \" \\ud83d\\udc7c\"\n\n// UCS-2 conversion helpers ported from Mathias Bynens' Punycode.js:\n// https://github.com/bestiejs/punycode.js#punycodeucs2\n\nlet ucs2decode, ucs2encode\n\n// Creates an array containing the numeric code points of each Unicode\n// character in the string. While JavaScript uses UCS-2 internally,\n// this function will convert a pair of surrogate halves (each of which\n// UCS-2 exposes as separate characters) into a single code point,\n// matching UTF-16.\nif (hasArrayFrom && hasStringCodePointAt) {\n  ucs2decode = (string) => Array.from(string).map((char) => char.codePointAt(0))\n} else {\n  ucs2decode = function(string) {\n    const output = []\n    let counter = 0\n    const { length } = string\n\n    while (counter < length) {\n      let value = string.charCodeAt(counter++)\n      if (0xd800 <= value && value <= 0xdbff && counter < length) {\n        // high surrogate, and there is a next character\n        const extra = string.charCodeAt(counter++)\n        if ((extra & 0xfc00) === 0xdc00) {\n          // low surrogate\n          value = ((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000\n        } else {\n          // unmatched surrogate; only append this code unit, in case the\n          // next code unit is the high surrogate of a surrogate pair\n          counter--\n        }\n      }\n      output.push(value)\n    }\n\n    return output\n  }\n}\n\n// Creates a string based on an array of numeric code points.\nif (hasStringFromCodePoint) {\n  ucs2encode = (array) => String.fromCodePoint(...Array.from(array || []))\n} else {\n  ucs2encode = function(array) {\n    const characters = (() => {\n      const result = []\n\n      Array.from(array).forEach((value) => {\n        let output = \"\"\n        if (value > 0xffff) {\n          value -= 0x10000\n          output += String.fromCharCode(value >>> 10 & 0x3ff | 0xd800)\n          value = 0xdc00 | value & 0x3ff\n        }\n        result.push(output + String.fromCharCode(value))\n      })\n\n      return result\n    })()\n\n    return characters.join(\"\")\n  }\n}\n", "import BasicObject from \"trix/core/basic_object\"\nimport UTF16String from \"trix/core/utilities/utf16_string\"\n\nlet id = 0\n\nexport default class TrixObject extends BasicObject {\n  static fromJSONString(jsonString) {\n    return this.fromJSON(JSON.parse(jsonString))\n  }\n\n  constructor() {\n    super(...arguments)\n    this.id = ++id\n  }\n\n  hasSameConstructorAs(object) {\n    return this.constructor === object?.constructor\n  }\n\n  isEqualTo(object) {\n    return this === object\n  }\n\n  inspect() {\n    const parts = []\n    const contents = this.contentsForInspection() || {}\n\n    for (const key in contents) {\n      const value = contents[key]\n      parts.push(`${key}=${value}`)\n    }\n\n    return `#<${this.constructor.name}:${this.id}${parts.length ? ` ${parts.join(\", \")}` : \"\"}>`\n  }\n\n  contentsForInspection() {}\n\n  toJSONString() {\n    return JSON.stringify(this)\n  }\n\n  toUTF16String() {\n    return UTF16String.box(this)\n  }\n\n  getCacheKey() {\n    return this.id.toString()\n  }\n}\n", "/* eslint-disable\n    id-length,\n*/\nexport const arraysAreEqual = function(a = [], b = []) {\n  if (a.length !== b.length) {\n    return false\n  }\n  for (let index = 0; index < a.length; index++) {\n    const value = a[index]\n    if (value !== b[index]) {\n      return false\n    }\n  }\n  return true\n}\n\nexport const arrayStartsWith = (a = [], b = []) => arraysAreEqual(a.slice(0, b.length), b)\n\nexport const spliceArray = function(array, ...args) {\n  const result = array.slice(0)\n  result.splice(...args)\n  return result\n}\n\nexport const summarizeArrayChange = function(oldArray = [], newArray = []) {\n  const added = []\n  const removed = []\n\n  const existingValues = new Set()\n\n  oldArray.forEach((value) => {\n    existingValues.add(value)\n  })\n\n  const currentValues = new Set()\n\n  newArray.forEach((value) => {\n    currentValues.add(value)\n    if (!existingValues.has(value)) {\n      added.push(value)\n    }\n  })\n\n  oldArray.forEach((value) => {\n    if (!currentValues.has(value)) {\n      removed.push(value)\n    }\n  })\n\n  return { added, removed }\n}\n", "import { makeElement } from \"trix/core/helpers/dom\"\n\n// https://github.com/mathiasbynens/unicode-2.1.8/blob/master/Bidi_Class/Right_To_Left/regex.js\nconst RTL_PATTERN =\n  /[\\u05BE\\u05C0\\u05C3\\u05D0-\\u05EA\\u05F0-\\u05F4\\u061B\\u061F\\u0621-\\u063A\\u0640-\\u064A\\u066D\\u0671-\\u06B7\\u06BA-\\u06BE\\u06C0-\\u06CE\\u06D0-\\u06D5\\u06E5\\u06E6\\u200F\\u202B\\u202E\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE72\\uFE74\\uFE76-\\uFEFC]/\n\nexport const getDirection = (function() {\n  const input = makeElement(\"input\", { dir: \"auto\", name: \"x\", dirName: \"x.dir\" })\n  const textArea = makeElement(\"textarea\", { dir: \"auto\", name: \"y\", dirName: \"y.dir\" })\n  const form = makeElement(\"form\")\n  form.appendChild(input)\n  form.appendChild(textArea)\n\n  const supportsDirName = (function() {\n    try {\n      return new FormData(form).has(textArea.dirName)\n    } catch (error) {\n      return false\n    }\n  })()\n\n  const supportsDirSelector = (function() {\n    try {\n      return input.matches(\":dir(ltr),:dir(rtl)\")\n    } catch (error) {\n      return false\n    }\n  })()\n\n  if (supportsDirName) {\n    return function(string) {\n      textArea.value = string\n      return new FormData(form).get(textArea.dirName)\n    }\n  } else if (supportsDirSelector) {\n    return function(string) {\n      input.value = string\n      if (input.matches(\":dir(rtl)\")) {\n        return \"rtl\"\n      } else {\n        return \"ltr\"\n      }\n    }\n  } else {\n    return function(string) {\n      const char = string.trim().charAt(0)\n      if (RTL_PATTERN.test(char)) {\n        return \"rtl\"\n      } else {\n        return \"ltr\"\n      }\n    }\n  }\n})()\n", "import * as config from \"trix/config\"\n\nlet allAttributeNames = null\nlet blockAttributeNames = null\nlet textAttributeNames = null\nlet listAttributeNames = null\n\nexport const getAllAttributeNames = () => {\n  if (!allAttributeNames) {\n    allAttributeNames = getTextAttributeNames().concat(getBlockAttributeNames())\n  }\n  return allAttributeNames\n}\n\nexport const getBlockConfig = (attributeName) => config.blockAttributes[attributeName]\n\nexport const getBlockAttributeNames = () => {\n  if (!blockAttributeNames) {\n    blockAttributeNames = Object.keys(config.blockAttributes)\n  }\n  return blockAttributeNames\n}\n\nexport const getTextConfig = (attributeName) => config.textAttributes[attributeName]\n\nexport const getTextAttributeNames = () => {\n  if (!textAttributeNames) {\n    textAttributeNames = Object.keys(config.textAttributes)\n  }\n  return textAttributeNames\n}\n\nexport const getListAttributeNames = () => {\n  if (!listAttributeNames) {\n    listAttributeNames = []\n    for (const key in config.blockAttributes) {\n      const { listAttribute } = config.blockAttributes[key]\n      if (listAttribute != null) {\n        listAttributeNames.push(listAttribute)\n      }\n    }\n  }\n  return listAttributeNames\n}\n", "/* eslint-disable\n*/\nexport const installDefaultCSSForTagName = function(tagName, defaultCSS) {\n  const styleElement = insertStyleElementForTagName(tagName)\n  styleElement.textContent = defaultCSS.replace(/%t/g, tagName)\n}\n\nconst insertStyleElementForTagName = function(tagName) {\n  const element = document.createElement(\"style\")\n  element.setAttribute(\"type\", \"text/css\")\n  element.setAttribute(\"data-tag-name\", tagName.toLowerCase())\n  const nonce = getCSPNonce()\n  if (nonce) {\n    element.setAttribute(\"nonce\", nonce)\n  }\n  document.head.insertBefore(element, document.head.firstChild)\n  return element\n}\n\nconst getCSPNonce = function() {\n  const element = getMetaElement(\"trix-csp-nonce\") || getMetaElement(\"csp-nonce\")\n  if (element) {\n    return element.getAttribute(\"content\")\n  }\n}\n\nconst getMetaElement = (name) => document.head.querySelector(`meta[name=${name}]`)\n", "const testTransferData = { \"application/x-trix-feature-detection\": \"test\" }\n\nexport const dataTransferIsPlainText = function(dataTransfer) {\n  const text = dataTransfer.getData(\"text/plain\")\n  const html = dataTransfer.getData(\"text/html\")\n\n  if (text && html) {\n    const { body } = new DOMParser().parseFromString(html, \"text/html\")\n    if (body.textContent === text) {\n      return !body.querySelector(\"*\")\n    }\n  } else {\n    return text?.length\n  }\n}\n\nexport const dataTransferIsMsOfficePaste = ({ dataTransfer }) => {\n  return dataTransfer.types.includes(\"Files\") &&\n    dataTransfer.types.includes(\"text/html\") &&\n    dataTransfer.getData(\"text/html\").includes(\"urn:schemas-microsoft-com:office:office\")\n}\n\nexport const dataTransferIsWritable = function(dataTransfer) {\n  if (!dataTransfer?.setData) return false\n\n  for (const key in testTransferData) {\n    const value = testTransferData[key]\n\n    try {\n      dataTransfer.setData(key, value)\n      if (!dataTransfer.getData(key) === value) return false\n    } catch (error) {\n      return false\n    }\n  }\n  return true\n}\n\nexport const keyEventIsKeyboardCommand = (function() {\n  if (/Mac|^iP/.test(navigator.platform)) {\n    return (event) => event.metaKey\n  } else {\n    return (event) => event.ctrlKey\n  }\n})()\n", "export const defer = (fn) => setTimeout(fn, 1)\n", "/* eslint-disable\n    id-length,\n*/\nexport const copyObject = function(object = {}) {\n  const result = {}\n  for (const key in object) {\n    const value = object[key]\n    result[key] = value\n  }\n  return result\n}\n\nexport const objectsAreEqual = function(a = {}, b = {}) {\n  if (Object.keys(a).length !== Object.keys(b).length) {\n    return false\n  }\n  for (const key in a) {\n    const value = a[key]\n    if (value !== b[key]) {\n      return false\n    }\n  }\n  return true\n}\n", "import { copyObject, objectsAreEqual } from \"trix/core/helpers/objects\"\n\nexport const normalizeRange = function(range) {\n  if (range == null) return\n\n  if (!Array.isArray(range)) {\n    range = [ range, range ]\n  }\n  return [ copyValue(range[0]), copyValue(range[1] != null ? range[1] : range[0]) ]\n}\n\nexport const rangeIsCollapsed = function(range) {\n  if (range == null) return\n\n  const [ start, end ] = normalizeRange(range)\n  return rangeValuesAreEqual(start, end)\n}\n\nexport const rangesAreEqual = function(leftRange, rightRange) {\n  if (leftRange == null || rightRange == null) return\n\n  const [ leftStart, leftEnd ] = normalizeRange(leftRange)\n  const [ rightStart, rightEnd ] = normalizeRange(rightRange)\n  return rangeValuesAreEqual(leftStart, rightStart) && rangeValuesAreEqual(leftEnd, rightEnd)\n}\n\nconst copyValue = function(value) {\n  if (typeof value === \"number\") {\n    return value\n  } else {\n    return copyObject(value)\n  }\n}\n\nconst rangeValuesAreEqual = function(left, right) {\n  if (typeof left === \"number\") {\n    return left === right\n  } else {\n    return objectsAreEqual(left, right)\n  }\n}\n", "import BasicObject from \"trix/core/basic_object\"\n\nexport default class SelectionChangeObserver extends BasicObject {\n  constructor() {\n    super(...arguments)\n    this.update = this.update.bind(this)\n    this.selectionManagers = []\n  }\n\n  start() {\n    if (!this.started) {\n      this.started = true\n      document.addEventListener(\"selectionchange\", this.update, true)\n    }\n  }\n\n  stop() {\n    if (this.started) {\n      this.started = false\n      return document.removeEventListener(\"selectionchange\", this.update, true)\n    }\n  }\n\n  registerSelectionManager(selectionManager) {\n    if (!this.selectionManagers.includes(selectionManager)) {\n      this.selectionManagers.push(selectionManager)\n      return this.start()\n    }\n  }\n\n  unregisterSelectionManager(selectionManager) {\n    this.selectionManagers = this.selectionManagers.filter((sm) => sm !== selectionManager)\n    if (this.selectionManagers.length === 0) {\n      return this.stop()\n    }\n  }\n\n  notifySelectionManagersOfSelectionChange() {\n    return this.selectionManagers.map((selectionManager) => selectionManager.selectionDidChange())\n  }\n\n  update() {\n    this.notifySelectionManagersOfSelectionChange()\n  }\n\n  reset() {\n    this.update()\n  }\n}\n\nexport const selectionChangeObserver = new SelectionChangeObserver()\n\nexport const getDOMSelection = function() {\n  const selection = window.getSelection()\n  if (selection.rangeCount > 0) {\n    return selection\n  }\n}\n\nexport const getDOMRange = function() {\n  const domRange = getDOMSelection()?.getRangeAt(0)\n  if (domRange) {\n    if (!domRangeIsPrivate(domRange)) {\n      return domRange\n    }\n  }\n}\n\nexport const setDOMRange = function(domRange) {\n  const selection = window.getSelection()\n  selection.removeAllRanges()\n  selection.addRange(domRange)\n  return selectionChangeObserver.update()\n}\n\n// In Firefox, clicking certain <input> elements changes the selection to a\n// private element used to draw its UI. Attempting to access properties of those\n// elements throws an error.\n// https://bugzilla.mozilla.org/show_bug.cgi?id=208427\nconst domRangeIsPrivate = (domRange) => nodeIsPrivate(domRange.startContainer) || nodeIsPrivate(domRange.endContainer)\n\nconst nodeIsPrivate = (node) => !Object.getPrototypeOf(node)\n", "/* eslint-disable\n    id-length,\n    no-useless-escape,\n*/\nimport { NON_BREAKING_SPACE, ZERO_WIDTH_SPACE } from \"trix/constants\"\nimport UTF16String from \"trix/core/utilities/utf16_string\"\n\nexport const normalizeSpaces = (string) =>\n  string.replace(new RegExp(`${ZERO_WIDTH_SPACE}`, \"g\"), \"\").replace(new RegExp(`${NON_BREAKING_SPACE}`, \"g\"), \" \")\n\nexport const normalizeNewlines = (string) => string.replace(/\\r\\n?/g, \"\\n\")\n\nexport const breakableWhitespacePattern = new RegExp(`[^\\\\S${NON_BREAKING_SPACE}]`)\n\nexport const squishBreakableWhitespace = (string) =>\n  string\n    // Replace all breakable whitespace characters with a space\n    .replace(new RegExp(`${breakableWhitespacePattern.source}`, \"g\"), \" \")\n    // Replace two or more spaces with a single space\n    .replace(/\\ {2,}/g, \" \")\n\nexport const summarizeStringChange = function(oldString, newString) {\n  let added, removed\n  oldString = UTF16String.box(oldString)\n  newString = UTF16String.box(newString)\n\n  if (newString.length < oldString.length) {\n    [ removed, added ] = utf16StringDifferences(oldString, newString)\n  } else {\n    [ added, removed ] = utf16StringDifferences(newString, oldString)\n  }\n\n  return { added, removed }\n}\n\nconst utf16StringDifferences = function(a, b) {\n  if (a.isEqualTo(b)) {\n    return [ \"\", \"\" ]\n  }\n\n  const diffA = utf16StringDifference(a, b)\n  const { length } = diffA.utf16String\n\n  let diffB\n\n  if (length) {\n    const { offset } = diffA\n    const codepoints = a.codepoints.slice(0, offset).concat(a.codepoints.slice(offset + length))\n    diffB = utf16StringDifference(b, UTF16String.fromCodepoints(codepoints))\n  } else {\n    diffB = utf16StringDifference(b, a)\n  }\n\n  return [ diffA.utf16String.toString(), diffB.utf16String.toString() ]\n}\n\nconst utf16StringDifference = function(a, b) {\n  let leftIndex = 0\n  let rightIndexA = a.length\n  let rightIndexB = b.length\n\n  while (leftIndex < rightIndexA && a.charAt(leftIndex).isEqualTo(b.charAt(leftIndex))) {\n    leftIndex++\n  }\n\n  while (rightIndexA > leftIndex + 1 && a.charAt(rightIndexA - 1).isEqualTo(b.charAt(rightIndexB - 1))) {\n    rightIndexA--\n    rightIndexB--\n  }\n\n  return {\n    utf16String: a.slice(leftIndex, rightIndexA),\n    offset: leftIndex,\n  }\n}\n", "import TrixObject from \"trix/core/object\" // Don't override window.Object\nimport { arraysAreEqual } from \"trix/core/helpers\"\n\nexport default class Hash extends TrixObject {\n  static fromCommonAttributesOfObjects(objects = []) {\n    if (!objects.length) {\n      return new this()\n    }\n    let hash = box(objects[0])\n    let keys = hash.getKeys()\n\n    objects.slice(1).forEach((object) => {\n      keys = hash.getKeysCommonToHash(box(object))\n      hash = hash.slice(keys)\n    })\n\n    return hash\n  }\n\n  static box(values) {\n    return box(values)\n  }\n\n  constructor(values = {}) {\n    super(...arguments)\n    this.values = copy(values)\n  }\n\n  add(key, value) {\n    return this.merge(object(key, value))\n  }\n\n  remove(key) {\n    return new Hash(copy(this.values, key))\n  }\n\n  get(key) {\n    return this.values[key]\n  }\n\n  has(key) {\n    return key in this.values\n  }\n\n  merge(values) {\n    return new Hash(merge(this.values, unbox(values)))\n  }\n\n  slice(keys) {\n    const values = {}\n\n    Array.from(keys).forEach((key) => {\n      if (this.has(key)) {\n        values[key] = this.values[key]\n      }\n    })\n\n    return new Hash(values)\n  }\n\n  getKeys() {\n    return Object.keys(this.values)\n  }\n\n  getKeysCommonToHash(hash) {\n    hash = box(hash)\n    return this.getKeys().filter((key) => this.values[key] === hash.values[key])\n  }\n\n  isEqualTo(values) {\n    return arraysAreEqual(this.toArray(), box(values).toArray())\n  }\n\n  isEmpty() {\n    return this.getKeys().length === 0\n  }\n\n  toArray() {\n    if (!this.array) {\n      const result = []\n      for (const key in this.values) {\n        const value = this.values[key]\n        result.push(result.push(key, value))\n      }\n      this.array = result.slice(0)\n    }\n\n    return this.array\n  }\n\n  toObject() {\n    return copy(this.values)\n  }\n\n  toJSON() {\n    return this.toObject()\n  }\n\n  contentsForInspection() {\n    return { values: JSON.stringify(this.values) }\n  }\n}\n\nconst object = function(key, value) {\n  const result = {}\n  result[key] = value\n  return result\n}\n\nconst merge = function(object, values) {\n  const result = copy(object)\n  for (const key in values) {\n    const value = values[key]\n    result[key] = value\n  }\n  return result\n}\n\nconst copy = function(object, keyToRemove) {\n  const result = {}\n  const sortedKeys = Object.keys(object).sort()\n\n  sortedKeys.forEach((key) => {\n    if (key !== keyToRemove) {\n      result[key] = object[key]\n    }\n  })\n\n  return result\n}\n\nconst box = function(object) {\n  if (object instanceof Hash) {\n    return object\n  } else {\n    return new Hash(object)\n  }\n}\n\nconst unbox = function(object) {\n  if (object instanceof Hash) {\n    return object.values\n  } else {\n    return object\n  }\n}\n", "export default class ObjectGroup {\n  static groupObjects(ungroupedObjects = [], { depth, asTree } = {}) {\n    let group\n    if (asTree) {\n      if (depth == null) {\n        depth = 0\n      }\n    }\n    const objects = []\n\n    Array.from(ungroupedObjects).forEach((object) => {\n      if (group) {\n        if (object.canBeGrouped?.(depth) && group[group.length - 1].canBeGroupedWith?.(object, depth)) {\n          group.push(object)\n          return\n        } else {\n          objects.push(new this(group, { depth, asTree }))\n          group = null\n        }\n      }\n\n      if (object.canBeGrouped?.(depth)) {\n        group = [ object ]\n      } else {\n        objects.push(object)\n      }\n    })\n\n    if (group) {\n      objects.push(new this(group, { depth, asTree }))\n    }\n    return objects\n  }\n\n  constructor(objects = [], { depth, asTree }) {\n    this.objects = objects\n    if (asTree) {\n      this.depth = depth\n      this.objects = this.constructor.groupObjects(this.objects, { asTree, depth: this.depth + 1 })\n    }\n  }\n\n  getObjects() {\n    return this.objects\n  }\n\n  getDepth() {\n    return this.depth\n  }\n\n  getCacheKey() {\n    const keys = [ \"objectGroup\" ]\n    Array.from(this.getObjects()).forEach((object) => {\n      keys.push(object.getCacheKey())\n    })\n    return keys.join(\"/\")\n  }\n}\n", "import BasicObject from \"trix/core/basic_object\"\n\nexport default class ObjectMap extends BasicObject {\n  constructor(objects = []) {\n    super(...arguments)\n    this.objects = {}\n\n    Array.from(objects).forEach((object) => {\n      const hash = JSON.stringify(object)\n      if (this.objects[hash] == null) {\n        this.objects[hash] = object\n      }\n    })\n  }\n\n  find(object) {\n    const hash = JSON.stringify(object)\n    return this.objects[hash]\n  }\n}\n", "export default class ElementStore {\n  constructor(elements) {\n    this.reset(elements)\n  }\n\n  add(element) {\n    const key = getKey(element)\n    this.elements[key] = element\n  }\n\n  remove(element) {\n    const key = getKey(element)\n    const value = this.elements[key]\n    if (value) {\n      delete this.elements[key]\n      return value\n    }\n  }\n\n  reset(elements = []) {\n    this.elements = {}\n    Array.from(elements).forEach((element) => {\n      this.add(element)\n    })\n    return elements\n  }\n}\n\nconst getKey = (element) => element.dataset.trixStoreKey\n", "import BasicObject from \"trix/core/basic_object\"\n\nexport default class Operation extends BasicObject {\n  isPerforming() {\n    return this.performing === true\n  }\n\n  hasPerformed() {\n    return this.performed === true\n  }\n\n  hasSucceeded() {\n    return this.performed && this.succeeded\n  }\n\n  hasFailed() {\n    return this.performed && !this.succeeded\n  }\n\n  getPromise() {\n    if (!this.promise) {\n      this.promise = new Promise((resolve, reject) => {\n        this.performing = true\n        return this.perform((succeeded, result) => {\n          this.succeeded = succeeded\n          this.performing = false\n          this.performed = true\n\n          if (this.succeeded) {\n            resolve(result)\n          } else {\n            reject(result)\n          }\n        })\n      })\n    }\n\n    return this.promise\n  }\n\n  perform(callback) {\n    return callback(false)\n  }\n\n  release() {\n    this.promise?.cancel?.()\n    this.promise = null\n    this.performing = null\n    this.performed = null\n    this.succeeded = null\n  }\n}\n\nOperation.proxyMethod(\"getPromise().then\")\nOperation.proxyMethod(\"getPromise().catch\")\n", "import BasicObject from \"trix/core/basic_object\"\nimport ObjectGroup from \"trix/core/collections/object_group\"\n\nexport default class ObjectView extends BasicObject {\n  constructor(object, options = {}) {\n    super(...arguments)\n    this.object = object\n    this.options = options\n    this.childViews = []\n    this.rootView = this\n  }\n\n  getNodes() {\n    if (!this.nodes) { this.nodes = this.createNodes() }\n    return this.nodes.map((node) => node.cloneNode(true))\n  }\n\n  invalidate() {\n    this.nodes = null\n    this.childViews = []\n    return this.parentView?.invalidate()\n  }\n\n  invalidateViewForObject(object) {\n    return this.findViewForObject(object)?.invalidate()\n  }\n\n  findOrCreateCachedChildView(viewClass, object, options) {\n    let view = this.getCachedViewForObject(object)\n    if (view) {\n      this.recordChildView(view)\n    } else {\n      view = this.createChildView(...arguments)\n      this.cacheViewForObject(view, object)\n    }\n    return view\n  }\n\n  createChildView(viewClass, object, options = {}) {\n    if (object instanceof ObjectGroup) {\n      options.viewClass = viewClass\n      viewClass = ObjectGroupView\n    }\n\n    const view = new viewClass(object, options)\n    return this.recordChildView(view)\n  }\n\n  recordChildView(view) {\n    view.parentView = this\n    view.rootView = this.rootView\n    this.childViews.push(view)\n    return view\n  }\n\n  getAllChildViews() {\n    let views = []\n\n    this.childViews.forEach((childView) => {\n      views.push(childView)\n      views = views.concat(childView.getAllChildViews())\n    })\n\n    return views\n  }\n\n  findElement() {\n    return this.findElementForObject(this.object)\n  }\n\n  findElementForObject(object) {\n    const id = object?.id\n    if (id) {\n      return this.rootView.element.querySelector(`[data-trix-id='${id}']`)\n    }\n  }\n\n  findViewForObject(object) {\n    for (const view of this.getAllChildViews()) {\n      if (view.object === object) {\n        return view\n      }\n    }\n  }\n\n  getViewCache() {\n    if (this.rootView === this) {\n      if (this.isViewCachingEnabled()) {\n        if (!this.viewCache) { this.viewCache = {} }\n        return this.viewCache\n      }\n    } else {\n      return this.rootView.getViewCache()\n    }\n  }\n\n  isViewCachingEnabled() {\n    return this.shouldCacheViews !== false\n  }\n\n  enableViewCaching() {\n    this.shouldCacheViews = true\n  }\n\n  disableViewCaching() {\n    this.shouldCacheViews = false\n  }\n\n  getCachedViewForObject(object) {\n    return this.getViewCache()?.[object.getCacheKey()]\n  }\n\n  cacheViewForObject(view, object) {\n    const cache = this.getViewCache()\n    if (cache) {\n      cache[object.getCacheKey()] = view\n    }\n  }\n\n  garbageCollectCachedViews() {\n    const cache = this.getViewCache()\n    if (cache) {\n      const views = this.getAllChildViews().concat(this)\n      const objectKeys = views.map((view) => view.object.getCacheKey())\n      for (const key in cache) {\n        if (!objectKeys.includes(key)) {\n          delete cache[key]\n        }\n      }\n    }\n  }\n}\n\nexport class ObjectGroupView extends ObjectView {\n  constructor() {\n    super(...arguments)\n    this.objectGroup = this.object\n    this.viewClass = this.options.viewClass\n    delete this.options.viewClass\n  }\n\n  getChildViews() {\n    if (!this.childViews.length) {\n      Array.from(this.objectGroup.getObjects()).forEach((object) => {\n        this.findOrCreateCachedChildView(this.viewClass, object, this.options)\n      })\n    }\n    return this.childViews\n  }\n\n  createNodes() {\n    const element = this.createContainerElement()\n\n    this.getChildViews().forEach((view) => {\n      Array.from(view.getNodes()).forEach((node) => {\n        element.appendChild(node)\n      })\n    })\n\n    return [ element ]\n  }\n\n  createContainerElement(depth = this.objectGroup.getDepth()) {\n    return this.getChildViews()[0].createContainerElement(depth)\n  }\n}\n", "import BasicObject from \"trix/core/basic_object\"\n\nimport { nodeIsAttachmentElement, removeNode, tagName, walkTree } from \"trix/core/helpers\"\n\nconst DEFAULT_ALLOWED_ATTRIBUTES = \"style href src width height language class\".split(\" \")\nconst DEFAULT_FORBIDDEN_PROTOCOLS = \"javascript:\".split(\" \")\nconst DEFAULT_FORBIDDEN_ELEMENTS = \"script iframe form noscript\".split(\" \")\n\nexport default class HTMLSanitizer extends BasicObject {\n  static setHTML(element, html) {\n    const sanitizedElement = new this(html).sanitize()\n    const sanitizedHtml = sanitizedElement.getHTML ? sanitizedElement.getHTML() : sanitizedElement.outerHTML\n    element.innerHTML = sanitizedHtml\n  }\n\n  static sanitize(html, options) {\n    const sanitizer = new this(html, options)\n    sanitizer.sanitize()\n    return sanitizer\n  }\n\n  constructor(html, { allowedAttributes, forbiddenProtocols, forbiddenElements } = {}) {\n    super(...arguments)\n    this.allowedAttributes = allowedAttributes || DEFAULT_ALLOWED_ATTRIBUTES\n    this.forbiddenProtocols = forbiddenProtocols || DEFAULT_FORBIDDEN_PROTOCOLS\n    this.forbiddenElements = forbiddenElements || DEFAULT_FORBIDDEN_ELEMENTS\n    this.body = createBodyElementForHTML(html)\n  }\n\n  sanitize() {\n    this.sanitizeElements()\n    return this.normalizeListElementNesting()\n  }\n\n  getHTML() {\n    return this.body.innerHTML\n  }\n\n  getBody() {\n    return this.body\n  }\n\n  // Private\n\n  sanitizeElements() {\n    const walker = walkTree(this.body)\n    const nodesToRemove = []\n\n    while (walker.nextNode()) {\n      const node = walker.currentNode\n      switch (node.nodeType) {\n        case Node.ELEMENT_NODE:\n          if (this.elementIsRemovable(node)) {\n            nodesToRemove.push(node)\n          } else {\n            this.sanitizeElement(node)\n          }\n          break\n        case Node.COMMENT_NODE:\n          nodesToRemove.push(node)\n          break\n      }\n    }\n\n    nodesToRemove.forEach((node) => removeNode(node))\n\n    return this.body\n  }\n\n  sanitizeElement(element) {\n    if (element.hasAttribute(\"href\")) {\n      if (this.forbiddenProtocols.includes(element.protocol)) {\n        element.removeAttribute(\"href\")\n      }\n    }\n\n    Array.from(element.attributes).forEach(({ name }) => {\n      if (!this.allowedAttributes.includes(name) && name.indexOf(\"data-trix\") !== 0) {\n        element.removeAttribute(name)\n      }\n    })\n\n    return element\n  }\n\n  normalizeListElementNesting() {\n    Array.from(this.body.querySelectorAll(\"ul,ol\")).forEach((listElement) => {\n      const previousElement = listElement.previousElementSibling\n      if (previousElement) {\n        if (tagName(previousElement) === \"li\") {\n          previousElement.appendChild(listElement)\n        }\n      }\n    })\n\n    return this.body\n  }\n\n  elementIsRemovable(element) {\n    if (element?.nodeType !== Node.ELEMENT_NODE) return\n    return this.elementIsForbidden(element) || this.elementIsntSerializable(element)\n  }\n\n  elementIsForbidden(element) {\n    return this.forbiddenElements.includes(tagName(element))\n  }\n\n  elementIsntSerializable(element) {\n    return element.getAttribute(\"data-trix-serialize\") === \"false\" && !nodeIsAttachmentElement(element)\n  }\n}\n\nconst createBodyElementForHTML = function(html = \"\") {\n  // Remove everything after </html>\n  html = html.replace(/<\\/html[^>]*>[^]*$/i, \"</html>\")\n  const doc = document.implementation.createHTMLDocument(\"\")\n  doc.documentElement.innerHTML = html\n\n  Array.from(doc.head.querySelectorAll(\"style\")).forEach((element) => {\n    doc.body.appendChild(element)\n  })\n\n  return doc.body\n}\n", "import * as config from \"trix/config\"\nimport { ZERO_WIDTH_SPACE } from \"trix/constants\"\nimport { copyObject, makeElement } from \"trix/core/helpers\"\nimport ObjectView from \"trix/views/object_view\"\nimport HTMLSanitizer from \"trix/models/html_sanitizer\"\n\nconst { css } = config\n\nexport default class AttachmentView extends ObjectView {\n  constructor() {\n    super(...arguments)\n    this.attachment = this.object\n    this.attachment.uploadProgressDelegate = this\n    this.attachmentPiece = this.options.piece\n  }\n\n  createContentNodes() {\n    return []\n  }\n\n  createNodes() {\n    let innerElement\n    const figure = innerElement = makeElement({\n      tagName: \"figure\",\n      className: this.getClassName(),\n      data: this.getData(),\n      editable: false,\n    })\n\n    const href = this.getHref()\n    if (href) {\n      innerElement = makeElement({ tagName: \"a\", editable: false, attributes: { href, tabindex: -1 } })\n      figure.appendChild(innerElement)\n    }\n\n    if (this.attachment.hasContent()) {\n      HTMLSanitizer.setHTML(innerElement, this.attachment.getContent())\n    } else {\n      this.createContentNodes().forEach((node) => {\n        innerElement.appendChild(node)\n      })\n    }\n\n    innerElement.appendChild(this.createCaptionElement())\n\n    if (this.attachment.isPending()) {\n      this.progressElement = makeElement({\n        tagName: \"progress\",\n        attributes: {\n          class: css.attachmentProgress,\n          value: this.attachment.getUploadProgress(),\n          max: 100,\n        },\n        data: {\n          trixMutable: true,\n          trixStoreKey: [ \"progressElement\", this.attachment.id ].join(\"/\"),\n        },\n      })\n\n      figure.appendChild(this.progressElement)\n    }\n\n    return [ createCursorTarget(\"left\"), figure, createCursorTarget(\"right\") ]\n  }\n\n  createCaptionElement() {\n    const figcaption = makeElement({ tagName: \"figcaption\", className: css.attachmentCaption })\n    const caption = this.attachmentPiece.getCaption()\n    if (caption) {\n      figcaption.classList.add(`${css.attachmentCaption}--edited`)\n      figcaption.textContent = caption\n    } else {\n      let name, size\n      const captionConfig = this.getCaptionConfig()\n      if (captionConfig.name) {\n        name = this.attachment.getFilename()\n      }\n      if (captionConfig.size) {\n        size = this.attachment.getFormattedFilesize()\n      }\n\n      if (name) {\n        const nameElement = makeElement({ tagName: \"span\", className: css.attachmentName, textContent: name })\n        figcaption.appendChild(nameElement)\n      }\n\n      if (size) {\n        if (name) {\n          figcaption.appendChild(document.createTextNode(\" \"))\n        }\n        const sizeElement = makeElement({ tagName: \"span\", className: css.attachmentSize, textContent: size })\n        figcaption.appendChild(sizeElement)\n      }\n    }\n\n    return figcaption\n  }\n\n  getClassName() {\n    const names = [ css.attachment, `${css.attachment}--${this.attachment.getType()}` ]\n    const extension = this.attachment.getExtension()\n    if (extension) {\n      names.push(`${css.attachment}--${extension}`)\n    }\n    return names.join(\" \")\n  }\n\n  getData() {\n    const data = {\n      trixAttachment: JSON.stringify(this.attachment),\n      trixContentType: this.attachment.getContentType(),\n      trixId: this.attachment.id,\n    }\n\n    const { attributes } = this.attachmentPiece\n    if (!attributes.isEmpty()) {\n      data.trixAttributes = JSON.stringify(attributes)\n    }\n\n    if (this.attachment.isPending()) {\n      data.trixSerialize = false\n    }\n\n    return data\n  }\n\n  getHref() {\n    if (!htmlContainsTagName(this.attachment.getContent(), \"a\")) {\n      return this.attachment.getHref()\n    }\n  }\n\n  getCaptionConfig() {\n    const type = this.attachment.getType()\n    const captionConfig = copyObject(config.attachments[type]?.caption)\n    if (type === \"file\") {\n      captionConfig.name = true\n    }\n    return captionConfig\n  }\n\n  findProgressElement() {\n    return this.findElement()?.querySelector(\"progress\")\n  }\n\n  // Attachment delegate\n\n  attachmentDidChangeUploadProgress() {\n    const value = this.attachment.getUploadProgress()\n    const progressElement = this.findProgressElement()\n    if (progressElement) {\n      progressElement.value = value\n    }\n  }\n}\n\nconst createCursorTarget = (name) =>\n  makeElement({\n    tagName: \"span\",\n    textContent: ZERO_WIDTH_SPACE,\n    data: {\n      trixCursorTarget: name,\n      trixSerialize: false,\n    },\n  })\n\nconst htmlContainsTagName = function(html, tagName) {\n  const div = makeElement(\"div\")\n  HTMLSanitizer.setHTML(div, html || \"\")\n  return div.querySelector(tagName)\n}\n", "import * as config from \"trix/config\"\nimport { makeElement } from \"trix/core/helpers\"\n\nimport AttachmentView from \"trix/views/attachment_view\"\n\nexport default class PreviewableAttachmentView extends AttachmentView {\n  constructor() {\n    super(...arguments)\n    this.attachment.previewDelegate = this\n  }\n\n  createContentNodes() {\n    this.image = makeElement({\n      tagName: \"img\",\n      attributes: {\n        src: \"\",\n      },\n      data: {\n        trixMutable: true,\n      },\n    })\n\n    this.refresh(this.image)\n    return [ this.image ]\n  }\n\n  createCaptionElement() {\n    const figcaption = super.createCaptionElement(...arguments)\n    if (!figcaption.textContent) {\n      figcaption.setAttribute(\"data-trix-placeholder\", config.lang.captionPlaceholder)\n    }\n    return figcaption\n  }\n\n  refresh(image) {\n    if (!image) { image = this.findElement()?.querySelector(\"img\") }\n    if (image) {\n      return this.updateAttributesForImage(image)\n    }\n  }\n\n  updateAttributesForImage(image) {\n    const url = this.attachment.getURL()\n    const previewURL = this.attachment.getPreviewURL()\n    image.src = previewURL || url\n\n    if (previewURL === url) {\n      image.removeAttribute(\"data-trix-serialized-attributes\")\n    } else {\n      const serializedAttributes = JSON.stringify({ src: url })\n      image.setAttribute(\"data-trix-serialized-attributes\", serializedAttributes)\n    }\n\n    const width = this.attachment.getWidth()\n    const height = this.attachment.getHeight()\n\n    if (width != null) {\n      image.width = width\n    }\n    if (height != null) {\n      image.height = height\n    }\n\n    const storeKey = [ \"imageElement\", this.attachment.id, image.src, image.width, image.height ].join(\"/\")\n    image.dataset.trixStoreKey = storeKey\n  }\n\n  // Attachment delegate\n\n  attachmentDidChangeAttributes() {\n    this.refresh(this.image)\n    return this.refresh()\n  }\n}\n", "/* eslint-disable\n    no-useless-escape,\n    no-var,\n*/\nimport { NON_BREAKING_SPACE } from \"trix/constants\"\n\nimport ObjectView from \"trix/views/object_view\"\nimport AttachmentView from \"trix/views/attachment_view\"\nimport PreviewableAttachmentView from \"trix/views/previewable_attachment_view\"\n\nimport { findInnerElement, getTextConfig, makeElement } from \"trix/core/helpers\"\n\nexport default class PieceView extends ObjectView {\n  constructor() {\n    super(...arguments)\n    this.piece = this.object\n    this.attributes = this.piece.getAttributes()\n    this.textConfig = this.options.textConfig\n    this.context = this.options.context\n\n    if (this.piece.attachment) {\n      this.attachment = this.piece.attachment\n    } else {\n      this.string = this.piece.toString()\n    }\n  }\n\n  createNodes() {\n    let nodes = this.attachment ? this.createAttachmentNodes() : this.createStringNodes()\n    const element = this.createElement()\n    if (element) {\n      const innerElement = findInnerElement(element)\n      Array.from(nodes).forEach((node) => {\n        innerElement.appendChild(node)\n      })\n      nodes = [ element ]\n    }\n    return nodes\n  }\n\n  createAttachmentNodes() {\n    const constructor = this.attachment.isPreviewable() ? PreviewableAttachmentView : AttachmentView\n\n    const view = this.createChildView(constructor, this.piece.attachment, { piece: this.piece })\n    return view.getNodes()\n  }\n\n  createStringNodes() {\n    if (this.textConfig?.plaintext) {\n      return [ document.createTextNode(this.string) ]\n    } else {\n      const nodes = []\n      const iterable = this.string.split(\"\\n\")\n      for (let index = 0; index < iterable.length; index++) {\n        const substring = iterable[index]\n        if (index > 0) {\n          const element = makeElement(\"br\")\n          nodes.push(element)\n        }\n\n        if (substring.length) {\n          const node = document.createTextNode(this.preserveSpaces(substring))\n          nodes.push(node)\n        }\n      }\n      return nodes\n    }\n  }\n\n  createElement() {\n    let element, key, value\n    const styles = {}\n\n    for (key in this.attributes) {\n      value = this.attributes[key]\n      const config = getTextConfig(key)\n      if (config) {\n        if (config.tagName) {\n          var innerElement\n          const pendingElement = makeElement(config.tagName)\n\n          if (innerElement) {\n            innerElement.appendChild(pendingElement)\n            innerElement = pendingElement\n          } else {\n            element = innerElement = pendingElement\n          }\n        }\n\n        if (config.styleProperty) {\n          styles[config.styleProperty] = value\n        }\n\n        if (config.style) {\n          for (key in config.style) {\n            value = config.style[key]\n            styles[key] = value\n          }\n        }\n      }\n    }\n\n    if (Object.keys(styles).length) {\n      if (!element) { element = makeElement(\"span\") }\n      for (key in styles) {\n        value = styles[key]\n        element.style[key] = value\n      }\n    }\n    return element\n  }\n\n  createContainerElement() {\n    for (const key in this.attributes) {\n      const value = this.attributes[key]\n      const config = getTextConfig(key)\n      if (config) {\n        if (config.groupTagName) {\n          const attributes = {}\n          attributes[key] = value\n          return makeElement(config.groupTagName, attributes)\n        }\n      }\n    }\n  }\n\n  preserveSpaces(string) {\n    if (this.context.isLast) {\n      string = string.replace(/\\ $/, NON_BREAKING_SPACE)\n    }\n\n    string = string\n      .replace(/(\\S)\\ {3}(\\S)/g, `$1 ${NON_BREAKING_SPACE} $2`)\n      .replace(/\\ {2}/g, `${NON_BREAKING_SPACE} `)\n      .replace(/\\ {2}/g, ` ${NON_BREAKING_SPACE}`)\n\n    if (this.context.isFirst || this.context.followsWhitespace) {\n      string = string.replace(/^\\ /, NON_BREAKING_SPACE)\n    }\n\n    return string\n  }\n}\n", "/* eslint-disable\n    no-var,\n*/\nimport ObjectView from \"trix/views/object_view\"\nimport ObjectGroup from \"trix/core/collections/object_group\"\nimport PieceView from \"trix/views/piece_view\"\n\nexport default class TextView extends ObjectView {\n  constructor() {\n    super(...arguments)\n    this.text = this.object\n    this.textConfig = this.options.textConfig\n  }\n\n  createNodes() {\n    const nodes = []\n    const pieces = ObjectGroup.groupObjects(this.getPieces())\n    const lastIndex = pieces.length - 1\n\n    for (let index = 0; index < pieces.length; index++) {\n      const piece = pieces[index]\n      const context = {}\n      if (index === 0) {\n        context.isFirst = true\n      }\n      if (index === lastIndex) {\n        context.isLast = true\n      }\n      if (endsWithWhitespace(previousPiece)) {\n        context.followsWhitespace = true\n      }\n\n      const view = this.findOrCreateCachedChildView(PieceView, piece, { textConfig: this.textConfig, context })\n      nodes.push(...Array.from(view.getNodes() || []))\n\n      var previousPiece = piece\n    }\n    return nodes\n  }\n\n  getPieces() {\n    return Array.from(this.text.getPieces()).filter((piece) => !piece.hasAttribute(\"blockBreak\"))\n  }\n}\n\nconst endsWithWhitespace = (piece) => /\\s$/.test(piece?.toString())\n", "import * as config from \"trix/config\"\nimport ObjectView from \"trix/views/object_view\"\nimport TextView from \"trix/views/text_view\"\n\nimport { getBlockConfig, makeElement } from \"trix/core/helpers\"\nconst { css } = config\n\nexport default class BlockView extends ObjectView {\n  constructor() {\n    super(...arguments)\n    this.block = this.object\n    this.attributes = this.block.getAttributes()\n  }\n\n  createNodes() {\n    const comment = document.createComment(\"block\")\n    const nodes = [ comment ]\n    if (this.block.isEmpty()) {\n      nodes.push(makeElement(\"br\"))\n    } else {\n      const textConfig = getBlockConfig(this.block.getLastAttribute())?.text\n      const textView = this.findOrCreateCachedChildView(TextView, this.block.text, { textConfig })\n      nodes.push(...Array.from(textView.getNodes() || []))\n      if (this.shouldAddExtraNewlineElement()) {\n        nodes.push(makeElement(\"br\"))\n      }\n    }\n\n    if (this.attributes.length) {\n      return nodes\n    } else {\n      let attributes\n      const { tagName } = config.blockAttributes.default\n      if (this.block.isRTL()) {\n        attributes = { dir: \"rtl\" }\n      }\n\n      const element = makeElement({ tagName, attributes })\n      nodes.forEach((node) => element.appendChild(node))\n      return [ element ]\n    }\n  }\n\n  createContainerElement(depth) {\n    const attributes = {}\n    let className\n    const attributeName = this.attributes[depth]\n\n    const { tagName, htmlAttributes = [] } = getBlockConfig(attributeName)\n\n    if (depth === 0 && this.block.isRTL()) {\n      Object.assign(attributes, { dir: \"rtl\" })\n    }\n\n    if (attributeName === \"attachmentGallery\") {\n      const size = this.block.getBlockBreakPosition()\n      className = `${css.attachmentGallery} ${css.attachmentGallery}--${size}`\n    }\n\n    Object.entries(this.block.htmlAttributes).forEach(([ name, value ]) => {\n      if (htmlAttributes.includes(name)) {\n        attributes[name] = value\n      }\n    })\n\n    return makeElement({ tagName, className, attributes })\n  }\n\n  // A single <br> at the end of a block element has no visual representation\n  // so add an extra one.\n  shouldAddExtraNewlineElement() {\n    return /\\n\\n$/.test(this.block.toString())\n  }\n}\n", "import { makeElement } from \"trix/core/helpers\"\n\nimport ElementStore from \"trix/core/collections/element_store\"\nimport ObjectGroup from \"trix/core/collections/object_group\"\nimport ObjectView from \"trix/views/object_view\"\nimport BlockView from \"trix/views/block_view\"\n\nimport { defer } from \"trix/core/helpers\"\n\nexport default class DocumentView extends ObjectView {\n  static render(document) {\n    const element = makeElement(\"div\")\n    const view = new this(document, { element })\n    view.render()\n    view.sync()\n    return element\n  }\n\n  constructor() {\n    super(...arguments)\n    this.element = this.options.element\n    this.elementStore = new ElementStore()\n    this.setDocument(this.object)\n  }\n\n  setDocument(document) {\n    if (!document.isEqualTo(this.document)) {\n      this.document = this.object = document\n    }\n  }\n\n  render() {\n    this.childViews = []\n\n    this.shadowElement = makeElement(\"div\")\n\n    if (!this.document.isEmpty()) {\n      const objects = ObjectGroup.groupObjects(this.document.getBlocks(), { asTree: true })\n\n      Array.from(objects).forEach((object) => {\n        const view = this.findOrCreateCachedChildView(BlockView, object)\n        Array.from(view.getNodes()).map((node) => this.shadowElement.appendChild(node))\n      })\n    }\n  }\n\n  isSynced() {\n    return elementsHaveEqualHTML(this.shadowElement, this.element)\n  }\n\n  sync() {\n    const fragment = this.createDocumentFragmentForSync()\n    while (this.element.lastChild) {\n      this.element.removeChild(this.element.lastChild)\n    }\n    this.element.appendChild(fragment)\n    return this.didSync()\n  }\n\n  // Private\n\n  didSync() {\n    this.elementStore.reset(findStoredElements(this.element))\n    return defer(() => this.garbageCollectCachedViews())\n  }\n\n  createDocumentFragmentForSync() {\n    const fragment = document.createDocumentFragment()\n\n    Array.from(this.shadowElement.childNodes).forEach((node) => {\n      fragment.appendChild(node.cloneNode(true))\n    })\n\n    Array.from(findStoredElements(fragment)).forEach((element) => {\n      const storedElement = this.elementStore.remove(element)\n      if (storedElement) {\n        element.parentNode.replaceChild(storedElement, element)\n      }\n    })\n\n    return fragment\n  }\n}\n\nconst findStoredElements = (element) => element.querySelectorAll(\"[data-trix-store-key]\")\n\nconst elementsHaveEqualHTML = (element, otherElement) =>\n  ignoreSpaces(element.innerHTML) === ignoreSpaces(otherElement.innerHTML)\n\nconst ignoreSpaces = (html) => html.replace(/&nbsp;/g, \" \")\n", "import TrixObject from \"trix/core/object\" // Don't override window.Object\nimport Hash from \"trix/core/collections/hash\"\n\nexport default class Piece extends TrixObject {\n  static types = {}\n\n  static registerType(type, constructor) {\n    constructor.type = type\n    this.types[type] = constructor\n  }\n\n  static fromJSON(pieceJSON) {\n    const constructor = this.types[pieceJSON.type]\n    if (constructor) {\n      return constructor.fromJSON(pieceJSON)\n    }\n  }\n\n  constructor(value, attributes = {}) {\n    super(...arguments)\n    this.attributes = Hash.box(attributes)\n  }\n\n  copyWithAttributes(attributes) {\n    return new this.constructor(this.getValue(), attributes)\n  }\n\n  copyWithAdditionalAttributes(attributes) {\n    return this.copyWithAttributes(this.attributes.merge(attributes))\n  }\n\n  copyWithoutAttribute(attribute) {\n    return this.copyWithAttributes(this.attributes.remove(attribute))\n  }\n\n  copy() {\n    return this.copyWithAttributes(this.attributes)\n  }\n\n  getAttribute(attribute) {\n    return this.attributes.get(attribute)\n  }\n\n  getAttributesHash() {\n    return this.attributes\n  }\n\n  getAttributes() {\n    return this.attributes.toObject()\n  }\n\n  hasAttribute(attribute) {\n    return this.attributes.has(attribute)\n  }\n\n  hasSameStringValueAsPiece(piece) {\n    return piece && this.toString() === piece.toString()\n  }\n\n  hasSameAttributesAsPiece(piece) {\n    return piece && (this.attributes === piece.attributes || this.attributes.isEqualTo(piece.attributes))\n  }\n\n  isBlockBreak() {\n    return false\n  }\n\n  isEqualTo(piece) {\n    return (\n      super.isEqualTo(...arguments) ||\n      this.hasSameConstructorAs(piece) &&\n        this.hasSameStringValueAsPiece(piece) &&\n        this.hasSameAttributesAsPiece(piece)\n    )\n  }\n\n  isEmpty() {\n    return this.length === 0\n  }\n\n  isSerializable() {\n    return true\n  }\n\n  toJSON() {\n    return {\n      type: this.constructor.type,\n      attributes: this.getAttributes(),\n    }\n  }\n\n  contentsForInspection() {\n    return {\n      type: this.constructor.type,\n      attributes: this.attributes.inspect(),\n    }\n  }\n\n  // Grouping\n\n  canBeGrouped() {\n    return this.hasAttribute(\"href\")\n  }\n\n  canBeGroupedWith(piece) {\n    return this.getAttribute(\"href\") === piece.getAttribute(\"href\")\n  }\n\n  // Splittable\n\n  getLength() {\n    return this.length\n  }\n\n  canBeConsolidatedWith(piece) {\n    return false\n  }\n}\n", "import Operation from \"trix/core/utilities/operation\"\n\nexport default class ImagePreloadOperation extends Operation {\n  constructor(url) {\n    super(...arguments)\n    this.url = url\n  }\n\n  perform(callback) {\n    const image = new Image()\n\n    image.onload = () => {\n      image.width = this.width = image.naturalWidth\n      image.height = this.height = image.naturalHeight\n      return callback(true, image)\n    }\n\n    image.onerror = () => callback(false)\n\n    image.src = this.url\n  }\n}\n", "import * as config from \"trix/config\"\nimport TrixObject from \"trix/core/object\" // Don't override window.Object\nimport Hash from \"trix/core/collections/hash\"\nimport ImagePreloadOperation from \"trix/operations/image_preload_operation\"\n\nexport default class Attachment extends TrixObject {\n  static previewablePattern = /^image(\\/(gif|png|webp|jpe?g)|$)/\n\n  static attachmentForFile(file) {\n    const attributes = this.attributesForFile(file)\n    const attachment = new this(attributes)\n    attachment.setFile(file)\n    return attachment\n  }\n\n  static attributesForFile(file) {\n    return new Hash({\n      filename: file.name,\n      filesize: file.size,\n      contentType: file.type,\n    })\n  }\n\n  static fromJSON(attachmentJSON) {\n    return new this(attachmentJSON)\n  }\n\n  constructor(attributes = {}) {\n    super(attributes)\n    this.releaseFile = this.releaseFile.bind(this)\n    this.attributes = Hash.box(attributes)\n    this.didChangeAttributes()\n  }\n\n  getAttribute(attribute) {\n    return this.attributes.get(attribute)\n  }\n\n  hasAttribute(attribute) {\n    return this.attributes.has(attribute)\n  }\n\n  getAttributes() {\n    return this.attributes.toObject()\n  }\n\n  setAttributes(attributes = {}) {\n    const newAttributes = this.attributes.merge(attributes)\n    if (!this.attributes.isEqualTo(newAttributes)) {\n      this.attributes = newAttributes\n      this.didChangeAttributes()\n      this.previewDelegate?.attachmentDidChangeAttributes?.(this)\n      return this.delegate?.attachmentDidChangeAttributes?.(this)\n    }\n  }\n\n  didChangeAttributes() {\n    if (this.isPreviewable()) {\n      return this.preloadURL()\n    }\n  }\n\n  isPending() {\n    return this.file != null && !(this.getURL() || this.getHref())\n  }\n\n  isPreviewable() {\n    if (this.attributes.has(\"previewable\")) {\n      return this.attributes.get(\"previewable\")\n    } else {\n      return Attachment.previewablePattern.test(this.getContentType())\n    }\n  }\n\n  getType() {\n    if (this.hasContent()) {\n      return \"content\"\n    } else if (this.isPreviewable()) {\n      return \"preview\"\n    } else {\n      return \"file\"\n    }\n  }\n\n  getURL() {\n    return this.attributes.get(\"url\")\n  }\n\n  getHref() {\n    return this.attributes.get(\"href\")\n  }\n\n  getFilename() {\n    return this.attributes.get(\"filename\") || \"\"\n  }\n\n  getFilesize() {\n    return this.attributes.get(\"filesize\")\n  }\n\n  getFormattedFilesize() {\n    const filesize = this.attributes.get(\"filesize\")\n    if (typeof filesize === \"number\") {\n      return config.fileSize.formatter(filesize)\n    } else {\n      return \"\"\n    }\n  }\n\n  getExtension() {\n    return this.getFilename()\n      .match(/\\.(\\w+)$/)?.[1]\n      .toLowerCase()\n  }\n\n  getContentType() {\n    return this.attributes.get(\"contentType\")\n  }\n\n  hasContent() {\n    return this.attributes.has(\"content\")\n  }\n\n  getContent() {\n    return this.attributes.get(\"content\")\n  }\n\n  getWidth() {\n    return this.attributes.get(\"width\")\n  }\n\n  getHeight() {\n    return this.attributes.get(\"height\")\n  }\n\n  getFile() {\n    return this.file\n  }\n\n  setFile(file) {\n    this.file = file\n    if (this.isPreviewable()) {\n      return this.preloadFile()\n    }\n  }\n\n  releaseFile() {\n    this.releasePreloadedFile()\n    this.file = null\n  }\n\n  getUploadProgress() {\n    return this.uploadProgress != null ? this.uploadProgress : 0\n  }\n\n  setUploadProgress(value) {\n    if (this.uploadProgress !== value) {\n      this.uploadProgress = value\n      return this.uploadProgressDelegate?.attachmentDidChangeUploadProgress?.(this)\n    }\n  }\n\n  toJSON() {\n    return this.getAttributes()\n  }\n\n  getCacheKey() {\n    return [ super.getCacheKey(...arguments), this.attributes.getCacheKey(), this.getPreviewURL() ].join(\"/\")\n  }\n\n  // Previewable\n\n  getPreviewURL() {\n    return this.previewURL || this.preloadingURL\n  }\n\n  setPreviewURL(url) {\n    if (url !== this.getPreviewURL()) {\n      this.previewURL = url\n      this.previewDelegate?.attachmentDidChangeAttributes?.(this)\n      return this.delegate?.attachmentDidChangePreviewURL?.(this)\n    }\n  }\n\n  preloadURL() {\n    return this.preload(this.getURL(), this.releaseFile)\n  }\n\n  preloadFile() {\n    if (this.file) {\n      this.fileObjectURL = URL.createObjectURL(this.file)\n      return this.preload(this.fileObjectURL)\n    }\n  }\n\n  releasePreloadedFile() {\n    if (this.fileObjectURL) {\n      URL.revokeObjectURL(this.fileObjectURL)\n      this.fileObjectURL = null\n    }\n  }\n\n  preload(url, callback) {\n    if (url && url !== this.getPreviewURL()) {\n      this.preloadingURL = url\n      const operation = new ImagePreloadOperation(url)\n      return operation\n        .then(({ width, height }) => {\n          if (!this.getWidth() || !this.getHeight()) {\n            this.setAttributes({ width, height })\n          }\n          this.preloadingURL = null\n          this.setPreviewURL(url)\n          return callback?.()\n        })\n        .catch(() => {\n          this.preloadingURL = null\n          return callback?.()\n        })\n    }\n  }\n}\n", "import { OBJECT_REPLACEMENT_CHARACTER } from \"trix/constants\"\n\nimport Attachment from \"trix/models/attachment\"\nimport Piece from \"trix/models/piece\"\n\nexport default class AttachmentPiece extends Piece {\n  static permittedAttributes = [ \"caption\", \"presentation\" ]\n\n  static fromJSON(pieceJSON) {\n    return new this(Attachment.fromJSON(pieceJSON.attachment), pieceJSON.attributes)\n  }\n\n  constructor(attachment) {\n    super(...arguments)\n    this.attachment = attachment\n    this.length = 1\n    this.ensureAttachmentExclusivelyHasAttribute(\"href\")\n    if (!this.attachment.hasContent()) {\n      this.removeProhibitedAttributes()\n    }\n  }\n\n  ensureAttachmentExclusivelyHasAttribute(attribute) {\n    if (this.hasAttribute(attribute)) {\n      if (!this.attachment.hasAttribute(attribute)) {\n        this.attachment.setAttributes(this.attributes.slice([ attribute ]))\n      }\n      this.attributes = this.attributes.remove(attribute)\n    }\n  }\n\n  removeProhibitedAttributes() {\n    const attributes = this.attributes.slice(AttachmentPiece.permittedAttributes)\n    if (!attributes.isEqualTo(this.attributes)) {\n      this.attributes = attributes\n    }\n  }\n\n  getValue() {\n    return this.attachment\n  }\n\n  isSerializable() {\n    return !this.attachment.isPending()\n  }\n\n  getCaption() {\n    return this.attributes.get(\"caption\") || \"\"\n  }\n\n  isEqualTo(piece) {\n    return super.isEqualTo(piece) && this.attachment.id === piece?.attachment?.id\n  }\n\n  toString() {\n    return OBJECT_REPLACEMENT_CHARACTER\n  }\n\n  toJSON() {\n    const json = super.toJSON(...arguments)\n    json.attachment = this.attachment\n    return json\n  }\n\n  getCacheKey() {\n    return [ super.getCacheKey(...arguments), this.attachment.getCacheKey() ].join(\"/\")\n  }\n\n  toConsole() {\n    return JSON.stringify(this.toString())\n  }\n}\n\nPiece.registerType(\"attachment\", AttachmentPiece)\n", "import Piece from \"trix/models/piece\"\n\nimport { normalizeNewlines } from \"trix/core/helpers\"\n\nexport default class StringPiece extends Piece {\n  static fromJSON(pieceJSON) {\n    return new this(pieceJSON.string, pieceJSON.attributes)\n  }\n\n  constructor(string) {\n    super(...arguments)\n    this.string = normalizeNewlines(string)\n    this.length = this.string.length\n  }\n\n  getValue() {\n    return this.string\n  }\n\n  toString() {\n    return this.string.toString()\n  }\n\n  isBlockBreak() {\n    return this.toString() === \"\\n\" && this.getAttribute(\"blockBreak\") === true\n  }\n\n  toJSON() {\n    const result = super.toJSON(...arguments)\n    result.string = this.string\n    return result\n  }\n\n  // Splittable\n\n  canBeConsolidatedWith(piece) {\n    return piece && this.hasSameConstructorAs(piece) && this.hasSameAttributesAsPiece(piece)\n  }\n\n  consolidateWith(piece) {\n    return new this.constructor(this.toString() + piece.toString(), this.attributes)\n  }\n\n  splitAtOffset(offset) {\n    let left, right\n    if (offset === 0) {\n      left = null\n      right = this\n    } else if (offset === this.length) {\n      left = this\n      right = null\n    } else {\n      left = new this.constructor(this.string.slice(0, offset), this.attributes)\n      right = new this.constructor(this.string.slice(offset), this.attributes)\n    }\n    return [ left, right ]\n  }\n\n  toConsole() {\n    let { string } = this\n    if (string.length > 15) {\n      string = string.slice(0, 14) + \"\u2026\"\n    }\n    return JSON.stringify(string.toString())\n  }\n}\n\nPiece.registerType(\"string\", StringPiece)\n", "/* eslint-disable\n    prefer-const,\n*/\nimport TrixObject from \"trix/core/object\" // Don't override window.Object\n\nimport { spliceArray } from \"trix/core/helpers\"\n\nexport default class SplittableList extends TrixObject {\n  static box(objects) {\n    if (objects instanceof this) {\n      return objects\n    } else {\n      return new this(objects)\n    }\n  }\n\n  constructor(objects = []) {\n    super(...arguments)\n    this.objects = objects.slice(0)\n    this.length = this.objects.length\n  }\n\n  indexOf(object) {\n    return this.objects.indexOf(object)\n  }\n\n  splice(...args) {\n    return new this.constructor(spliceArray(this.objects, ...args))\n  }\n\n  eachObject(callback) {\n    return this.objects.map((object, index) => callback(object, index))\n  }\n\n  insertObjectAtIndex(object, index) {\n    return this.splice(index, 0, object)\n  }\n\n  insertSplittableListAtIndex(splittableList, index) {\n    return this.splice(index, 0, ...splittableList.objects)\n  }\n\n  insertSplittableListAtPosition(splittableList, position) {\n    const [ objects, index ] = this.splitObjectAtPosition(position)\n    return new this.constructor(objects).insertSplittableListAtIndex(splittableList, index)\n  }\n\n  editObjectAtIndex(index, callback) {\n    return this.replaceObjectAtIndex(callback(this.objects[index]), index)\n  }\n\n  replaceObjectAtIndex(object, index) {\n    return this.splice(index, 1, object)\n  }\n\n  removeObjectAtIndex(index) {\n    return this.splice(index, 1)\n  }\n\n  getObjectAtIndex(index) {\n    return this.objects[index]\n  }\n\n  getSplittableListInRange(range) {\n    const [ objects, leftIndex, rightIndex ] = this.splitObjectsAtRange(range)\n    return new this.constructor(objects.slice(leftIndex, rightIndex + 1))\n  }\n\n  selectSplittableList(test) {\n    const objects = this.objects.filter((object) => test(object))\n    return new this.constructor(objects)\n  }\n\n  removeObjectsInRange(range) {\n    const [ objects, leftIndex, rightIndex ] = this.splitObjectsAtRange(range)\n    return new this.constructor(objects).splice(leftIndex, rightIndex - leftIndex + 1)\n  }\n\n  transformObjectsInRange(range, transform) {\n    const [ objects, leftIndex, rightIndex ] = this.splitObjectsAtRange(range)\n    const transformedObjects = objects.map((object, index) =>\n      leftIndex <= index && index <= rightIndex ? transform(object) : object\n    )\n    return new this.constructor(transformedObjects)\n  }\n\n  splitObjectsAtRange(range) {\n    let rightOuterIndex\n    let [ objects, leftInnerIndex, offset ] = this.splitObjectAtPosition(startOfRange(range))\n    ;[ objects, rightOuterIndex ] = new this.constructor(objects).splitObjectAtPosition(endOfRange(range) + offset)\n\n    return [ objects, leftInnerIndex, rightOuterIndex - 1 ]\n  }\n\n  getObjectAtPosition(position) {\n    const { index } = this.findIndexAndOffsetAtPosition(position)\n    return this.objects[index]\n  }\n\n  splitObjectAtPosition(position) {\n    let splitIndex, splitOffset\n    const { index, offset } = this.findIndexAndOffsetAtPosition(position)\n    const objects = this.objects.slice(0)\n    if (index != null) {\n      if (offset === 0) {\n        splitIndex = index\n        splitOffset = 0\n      } else {\n        const object = this.getObjectAtIndex(index)\n        const [ leftObject, rightObject ] = object.splitAtOffset(offset)\n        objects.splice(index, 1, leftObject, rightObject)\n        splitIndex = index + 1\n        splitOffset = leftObject.getLength() - offset\n      }\n    } else {\n      splitIndex = objects.length\n      splitOffset = 0\n    }\n\n    return [ objects, splitIndex, splitOffset ]\n  }\n\n  consolidate() {\n    const objects = []\n    let pendingObject = this.objects[0]\n\n    this.objects.slice(1).forEach((object) => {\n      if (pendingObject.canBeConsolidatedWith?.(object)) {\n        pendingObject = pendingObject.consolidateWith(object)\n      } else {\n        objects.push(pendingObject)\n        pendingObject = object\n      }\n    })\n\n    if (pendingObject) {\n      objects.push(pendingObject)\n    }\n\n    return new this.constructor(objects)\n  }\n\n  consolidateFromIndexToIndex(startIndex, endIndex) {\n    const objects = this.objects.slice(0)\n    const objectsInRange = objects.slice(startIndex, endIndex + 1)\n    const consolidatedInRange = new this.constructor(objectsInRange).consolidate().toArray()\n    return this.splice(startIndex, objectsInRange.length, ...consolidatedInRange)\n  }\n\n  findIndexAndOffsetAtPosition(position) {\n    let index\n    let currentPosition = 0\n    for (index = 0; index < this.objects.length; index++) {\n      const object = this.objects[index]\n      const nextPosition = currentPosition + object.getLength()\n      if (currentPosition <= position && position < nextPosition) {\n        return { index, offset: position - currentPosition }\n      }\n      currentPosition = nextPosition\n    }\n    return { index: null, offset: null }\n  }\n\n  findPositionAtIndexAndOffset(index, offset) {\n    let position = 0\n    for (let currentIndex = 0; currentIndex < this.objects.length; currentIndex++) {\n      const object = this.objects[currentIndex]\n      if (currentIndex < index) {\n        position += object.getLength()\n      } else if (currentIndex === index) {\n        position += offset\n        break\n      }\n    }\n    return position\n  }\n\n  getEndPosition() {\n    if (this.endPosition == null) {\n      this.endPosition = 0\n      this.objects.forEach((object) => this.endPosition += object.getLength())\n    }\n\n    return this.endPosition\n  }\n\n  toString() {\n    return this.objects.join(\"\")\n  }\n\n  toArray() {\n    return this.objects.slice(0)\n  }\n\n  toJSON() {\n    return this.toArray()\n  }\n\n  isEqualTo(splittableList) {\n    return super.isEqualTo(...arguments) || objectArraysAreEqual(this.objects, splittableList?.objects)\n  }\n\n  contentsForInspection() {\n    return {\n      objects: `[${this.objects.map((object) => object.inspect()).join(\", \")}]`,\n    }\n  }\n}\n\nconst objectArraysAreEqual = function(left, right = []) {\n  if (left.length !== right.length) {\n    return false\n  }\n  let result = true\n  for (let index = 0; index < left.length; index++) {\n    const object = left[index]\n    if (result && !object.isEqualTo(right[index])) {\n      result = false\n    }\n  }\n  return result\n}\n\nconst startOfRange = (range) => range[0]\n\nconst endOfRange = (range) => range[1]\n", "import TrixObject from \"trix/core/object\" // Don't override window.Object\n\nimport { getDirection } from \"trix/core/helpers\"\n\nimport Piece from \"trix/models/piece\"\nimport AttachmentPiece from \"trix/models/attachment_piece\"\nimport StringPiece from \"trix/models/string_piece\"\nimport SplittableList from \"trix/models/splittable_list\"\n\nimport Hash from \"trix/core/collections/hash\"\n\nexport default class Text extends TrixObject {\n  static textForAttachmentWithAttributes(attachment, attributes) {\n    const piece = new AttachmentPiece(attachment, attributes)\n    return new this([ piece ])\n  }\n\n  static textForStringWithAttributes(string, attributes) {\n    const piece = new StringPiece(string, attributes)\n    return new this([ piece ])\n  }\n\n  static fromJSON(textJSON) {\n    const pieces = Array.from(textJSON).map((pieceJSON) => Piece.fromJSON(pieceJSON))\n    return new this(pieces)\n  }\n\n  constructor(pieces = []) {\n    super(...arguments)\n    const notEmpty = pieces.filter((piece) => !piece.isEmpty())\n    this.pieceList = new SplittableList(notEmpty)\n  }\n\n  copy() {\n    return this.copyWithPieceList(this.pieceList)\n  }\n\n  copyWithPieceList(pieceList) {\n    return new this.constructor(pieceList.consolidate().toArray())\n  }\n\n  copyUsingObjectMap(objectMap) {\n    const pieces = this.getPieces().map((piece) => objectMap.find(piece) || piece)\n    return new this.constructor(pieces)\n  }\n\n  appendText(text) {\n    return this.insertTextAtPosition(text, this.getLength())\n  }\n\n  insertTextAtPosition(text, position) {\n    return this.copyWithPieceList(this.pieceList.insertSplittableListAtPosition(text.pieceList, position))\n  }\n\n  removeTextAtRange(range) {\n    return this.copyWithPieceList(this.pieceList.removeObjectsInRange(range))\n  }\n\n  replaceTextAtRange(text, range) {\n    return this.removeTextAtRange(range).insertTextAtPosition(text, range[0])\n  }\n\n  moveTextFromRangeToPosition(range, position) {\n    if (range[0] <= position && position <= range[1]) return\n    const text = this.getTextAtRange(range)\n    const length = text.getLength()\n    if (range[0] < position) {\n      position -= length\n    }\n    return this.removeTextAtRange(range).insertTextAtPosition(text, position)\n  }\n\n  addAttributeAtRange(attribute, value, range) {\n    const attributes = {}\n    attributes[attribute] = value\n    return this.addAttributesAtRange(attributes, range)\n  }\n\n  addAttributesAtRange(attributes, range) {\n    return this.copyWithPieceList(\n      this.pieceList.transformObjectsInRange(range, (piece) => piece.copyWithAdditionalAttributes(attributes))\n    )\n  }\n\n  removeAttributeAtRange(attribute, range) {\n    return this.copyWithPieceList(\n      this.pieceList.transformObjectsInRange(range, (piece) => piece.copyWithoutAttribute(attribute))\n    )\n  }\n\n  setAttributesAtRange(attributes, range) {\n    return this.copyWithPieceList(\n      this.pieceList.transformObjectsInRange(range, (piece) => piece.copyWithAttributes(attributes))\n    )\n  }\n\n  getAttributesAtPosition(position) {\n    return this.pieceList.getObjectAtPosition(position)?.getAttributes() || {}\n  }\n\n  getCommonAttributes() {\n    const objects = Array.from(this.pieceList.toArray()).map((piece) => piece.getAttributes())\n    return Hash.fromCommonAttributesOfObjects(objects).toObject()\n  }\n\n  getCommonAttributesAtRange(range) {\n    return this.getTextAtRange(range).getCommonAttributes() || {}\n  }\n\n  getExpandedRangeForAttributeAtOffset(attributeName, offset) {\n    let right\n    let left = right = offset\n    const length = this.getLength()\n\n    while (left > 0 && this.getCommonAttributesAtRange([ left - 1, right ])[attributeName]) {\n      left--\n    }\n    while (right < length && this.getCommonAttributesAtRange([ offset, right + 1 ])[attributeName]) {\n      right++\n    }\n\n    return [ left, right ]\n  }\n\n  getTextAtRange(range) {\n    return this.copyWithPieceList(this.pieceList.getSplittableListInRange(range))\n  }\n\n  getStringAtRange(range) {\n    return this.pieceList.getSplittableListInRange(range).toString()\n  }\n\n  getStringAtPosition(position) {\n    return this.getStringAtRange([ position, position + 1 ])\n  }\n\n  startsWithString(string) {\n    return this.getStringAtRange([ 0, string.length ]) === string\n  }\n\n  endsWithString(string) {\n    const length = this.getLength()\n    return this.getStringAtRange([ length - string.length, length ]) === string\n  }\n\n  getAttachmentPieces() {\n    return this.pieceList.toArray().filter((piece) => !!piece.attachment)\n  }\n\n  getAttachments() {\n    return this.getAttachmentPieces().map((piece) => piece.attachment)\n  }\n\n  getAttachmentAndPositionById(attachmentId) {\n    let position = 0\n    for (const piece of this.pieceList.toArray()) {\n      if (piece.attachment?.id === attachmentId) {\n        return { attachment: piece.attachment, position }\n      }\n      position += piece.length\n    }\n    return { attachment: null, position: null }\n  }\n\n  getAttachmentById(attachmentId) {\n    const { attachment } = this.getAttachmentAndPositionById(attachmentId)\n    return attachment\n  }\n\n  getRangeOfAttachment(attachment) {\n    const attachmentAndPosition = this.getAttachmentAndPositionById(attachment.id)\n    const position = attachmentAndPosition.position\n    attachment = attachmentAndPosition.attachment\n    if (attachment) {\n      return [ position, position + 1 ]\n    }\n  }\n\n  updateAttributesForAttachment(attributes, attachment) {\n    const range = this.getRangeOfAttachment(attachment)\n    if (range) {\n      return this.addAttributesAtRange(attributes, range)\n    } else {\n      return this\n    }\n  }\n\n  getLength() {\n    return this.pieceList.getEndPosition()\n  }\n\n  isEmpty() {\n    return this.getLength() === 0\n  }\n\n  isEqualTo(text) {\n    return super.isEqualTo(text) || text?.pieceList?.isEqualTo(this.pieceList)\n  }\n\n  isBlockBreak() {\n    return this.getLength() === 1 && this.pieceList.getObjectAtIndex(0).isBlockBreak()\n  }\n\n  eachPiece(callback) {\n    return this.pieceList.eachObject(callback)\n  }\n\n  getPieces() {\n    return this.pieceList.toArray()\n  }\n\n  getPieceAtPosition(position) {\n    return this.pieceList.getObjectAtPosition(position)\n  }\n\n  contentsForInspection() {\n    return { pieceList: this.pieceList.inspect() }\n  }\n\n  toSerializableText() {\n    const pieceList = this.pieceList.selectSplittableList((piece) => piece.isSerializable())\n    return this.copyWithPieceList(pieceList)\n  }\n\n  toString() {\n    return this.pieceList.toString()\n  }\n\n  toJSON() {\n    return this.pieceList.toJSON()\n  }\n\n  toConsole() {\n    return JSON.stringify(this.pieceList.toArray().map((piece) => JSON.parse(piece.toConsole())))\n  }\n\n  // BIDI\n\n  getDirection() {\n    return getDirection(this.toString())\n  }\n\n  isRTL() {\n    return this.getDirection() === \"rtl\"\n  }\n}\n", "import TrixObject from \"trix/core/object\" // Don't override window.Object\nimport Text from \"trix/models/text\"\n\nimport {\n  arraysAreEqual,\n  getBlockConfig,\n  getListAttributeNames,\n  objectsAreEqual,\n  spliceArray,\n} from \"trix/core/helpers\"\n\nexport default class Block extends TrixObject {\n  static fromJSON(blockJSON) {\n    const text = Text.fromJSON(blockJSON.text)\n    return new this(text, blockJSON.attributes, blockJSON.htmlAttributes)\n  }\n\n  constructor(text, attributes, htmlAttributes) {\n    super(...arguments)\n    this.text = applyBlockBreakToText(text || new Text())\n    this.attributes = attributes || []\n    this.htmlAttributes = htmlAttributes || {}\n  }\n\n  isEmpty() {\n    return this.text.isBlockBreak()\n  }\n\n  isEqualTo(block) {\n    if (super.isEqualTo(block)) return true\n\n    return this.text.isEqualTo(block?.text) && arraysAreEqual(this.attributes, block?.attributes) && objectsAreEqual(this.htmlAttributes, block?.htmlAttributes)\n  }\n\n  copyWithText(text) {\n    return new Block(text, this.attributes, this.htmlAttributes)\n  }\n\n  copyWithoutText() {\n    return this.copyWithText(null)\n  }\n\n  copyWithAttributes(attributes) {\n    return new Block(this.text, attributes, this.htmlAttributes)\n  }\n\n  copyWithoutAttributes() {\n    return this.copyWithAttributes(null)\n  }\n\n  copyUsingObjectMap(objectMap) {\n    const mappedText = objectMap.find(this.text)\n    if (mappedText) {\n      return this.copyWithText(mappedText)\n    } else {\n      return this.copyWithText(this.text.copyUsingObjectMap(objectMap))\n    }\n  }\n\n  addAttribute(attribute) {\n    const attributes = this.attributes.concat(expandAttribute(attribute))\n    return this.copyWithAttributes(attributes)\n  }\n\n  addHTMLAttribute(attribute, value) {\n    const htmlAttributes = Object.assign({}, this.htmlAttributes, { [attribute]: value })\n    return new Block(this.text, this.attributes, htmlAttributes)\n  }\n\n  removeAttribute(attribute) {\n    const { listAttribute } = getBlockConfig(attribute)\n    const attributes = removeLastValue(removeLastValue(this.attributes, attribute), listAttribute)\n    return this.copyWithAttributes(attributes)\n  }\n\n  removeLastAttribute() {\n    return this.removeAttribute(this.getLastAttribute())\n  }\n\n  getLastAttribute() {\n    return getLastElement(this.attributes)\n  }\n\n  getAttributes() {\n    return this.attributes.slice(0)\n  }\n\n  getAttributeLevel() {\n    return this.attributes.length\n  }\n\n  getAttributeAtLevel(level) {\n    return this.attributes[level - 1]\n  }\n\n  hasAttribute(attributeName) {\n    return this.attributes.includes(attributeName)\n  }\n\n  hasAttributes() {\n    return this.getAttributeLevel() > 0\n  }\n\n  getLastNestableAttribute() {\n    return getLastElement(this.getNestableAttributes())\n  }\n\n  getNestableAttributes() {\n    return this.attributes.filter((attribute) => getBlockConfig(attribute).nestable)\n  }\n\n  getNestingLevel() {\n    return this.getNestableAttributes().length\n  }\n\n  decreaseNestingLevel() {\n    const attribute = this.getLastNestableAttribute()\n    if (attribute) {\n      return this.removeAttribute(attribute)\n    } else {\n      return this\n    }\n  }\n\n  increaseNestingLevel() {\n    const attribute = this.getLastNestableAttribute()\n    if (attribute) {\n      const index = this.attributes.lastIndexOf(attribute)\n      const attributes = spliceArray(this.attributes, index + 1, 0, ...expandAttribute(attribute))\n      return this.copyWithAttributes(attributes)\n    } else {\n      return this\n    }\n  }\n\n  getListItemAttributes() {\n    return this.attributes.filter((attribute) => getBlockConfig(attribute).listAttribute)\n  }\n\n  isListItem() {\n    return getBlockConfig(this.getLastAttribute())?.listAttribute\n  }\n\n  isTerminalBlock() {\n    return getBlockConfig(this.getLastAttribute())?.terminal\n  }\n\n  breaksOnReturn() {\n    return getBlockConfig(this.getLastAttribute())?.breakOnReturn\n  }\n\n  findLineBreakInDirectionFromPosition(direction, position) {\n    const string = this.toString()\n    let result\n    switch (direction) {\n      case \"forward\":\n        result = string.indexOf(\"\\n\", position)\n        break\n      case \"backward\":\n        result = string.slice(0, position).lastIndexOf(\"\\n\")\n    }\n\n    if (result !== -1) {\n      return result\n    }\n  }\n\n  contentsForInspection() {\n    return {\n      text: this.text.inspect(),\n      attributes: this.attributes,\n    }\n  }\n\n  toString() {\n    return this.text.toString()\n  }\n\n  toJSON() {\n    return {\n      text: this.text,\n      attributes: this.attributes,\n      htmlAttributes: this.htmlAttributes,\n    }\n  }\n\n  // BIDI\n\n  getDirection() {\n    return this.text.getDirection()\n  }\n\n  isRTL() {\n    return this.text.isRTL()\n  }\n\n  // Splittable\n\n  getLength() {\n    return this.text.getLength()\n  }\n\n  canBeConsolidatedWith(block) {\n    return !this.hasAttributes() && !block.hasAttributes() && this.getDirection() === block.getDirection()\n  }\n\n  consolidateWith(block) {\n    const newlineText = Text.textForStringWithAttributes(\"\\n\")\n    const text = this.getTextWithoutBlockBreak().appendText(newlineText)\n    return this.copyWithText(text.appendText(block.text))\n  }\n\n  splitAtOffset(offset) {\n    let left, right\n    if (offset === 0) {\n      left = null\n      right = this\n    } else if (offset === this.getLength()) {\n      left = this\n      right = null\n    } else {\n      left = this.copyWithText(this.text.getTextAtRange([ 0, offset ]))\n      right = this.copyWithText(this.text.getTextAtRange([ offset, this.getLength() ]))\n    }\n    return [ left, right ]\n  }\n\n  getBlockBreakPosition() {\n    return this.text.getLength() - 1\n  }\n\n  getTextWithoutBlockBreak() {\n    if (textEndsInBlockBreak(this.text)) {\n      return this.text.getTextAtRange([ 0, this.getBlockBreakPosition() ])\n    } else {\n      return this.text.copy()\n    }\n  }\n\n  // Grouping\n\n  canBeGrouped(depth) {\n    return this.attributes[depth]\n  }\n\n  canBeGroupedWith(otherBlock, depth) {\n    const otherAttributes = otherBlock.getAttributes()\n    const otherAttribute = otherAttributes[depth]\n    const attribute = this.attributes[depth]\n\n    return (\n      attribute === otherAttribute &&\n      !(getBlockConfig(attribute).group === false && !getListAttributeNames().includes(otherAttributes[depth + 1])) &&\n      (this.getDirection() === otherBlock.getDirection() || otherBlock.isEmpty())\n    )\n  }\n}\n\n// Block breaks\n\nconst applyBlockBreakToText = function(text) {\n  text = unmarkExistingInnerBlockBreaksInText(text)\n  text = addBlockBreakToText(text)\n  return text\n}\n\nconst unmarkExistingInnerBlockBreaksInText = function(text) {\n  let modified = false\n  const pieces = text.getPieces()\n\n  let innerPieces = pieces.slice(0, pieces.length - 1)\n  const lastPiece = pieces[pieces.length - 1]\n\n  if (!lastPiece) return text\n\n  innerPieces = innerPieces.map((piece) => {\n    if (piece.isBlockBreak()) {\n      modified = true\n      return unmarkBlockBreakPiece(piece)\n    } else {\n      return piece\n    }\n  })\n\n  if (modified) {\n    return new Text([ ...innerPieces, lastPiece ])\n  } else {\n    return text\n  }\n}\n\nconst blockBreakText = Text.textForStringWithAttributes(\"\\n\", { blockBreak: true })\n\nconst addBlockBreakToText = function(text) {\n  if (textEndsInBlockBreak(text)) {\n    return text\n  } else {\n    return text.appendText(blockBreakText)\n  }\n}\n\nconst textEndsInBlockBreak = function(text) {\n  const length = text.getLength()\n  if (length === 0) {\n    return false\n  }\n  const endText = text.getTextAtRange([ length - 1, length ])\n  return endText.isBlockBreak()\n}\n\nconst unmarkBlockBreakPiece = (piece) => piece.copyWithoutAttribute(\"blockBreak\")\n\n// Attributes\n\nconst expandAttribute = function(attribute) {\n  const { listAttribute } = getBlockConfig(attribute)\n  if (listAttribute) {\n    return [ listAttribute, attribute ]\n  } else {\n    return [ attribute ]\n  }\n}\n\n// Array helpers\n\nconst getLastElement = (array) => array.slice(-1)[0]\n\nconst removeLastValue = function(array, value) {\n  const index = array.lastIndexOf(value)\n  if (index === -1) {\n    return array\n  } else {\n    return spliceArray(array, index, 1)\n  }\n}\n", "import * as config from \"trix/config\"\nimport TrixObject from \"trix/core/object\" // Don't override window.Object\n\nimport Text from \"trix/models/text\"\nimport Block from \"trix/models/block\"\nimport SplittableList from \"trix/models/splittable_list\"\nimport Hash from \"trix/core/collections/hash\"\nimport ObjectMap from \"trix/core/collections/object_map\"\n\nimport { arraysAreEqual, getBlockConfig, normalizeRange, rangeIsCollapsed } from \"trix/core/helpers\"\n\nexport default class Document extends TrixObject {\n  static fromJSON(documentJSON) {\n    const blocks = Array.from(documentJSON).map((blockJSON) => Block.fromJSON(blockJSON))\n    return new this(blocks)\n  }\n\n  static fromString(string, textAttributes) {\n    const text = Text.textForStringWithAttributes(string, textAttributes)\n    return new this([ new Block(text) ])\n  }\n\n  constructor(blocks = []) {\n    super(...arguments)\n    if (blocks.length === 0) {\n      blocks = [ new Block() ]\n    }\n    this.blockList = SplittableList.box(blocks)\n  }\n\n  isEmpty() {\n    const block = this.getBlockAtIndex(0)\n    return this.blockList.length === 1 && block.isEmpty() && !block.hasAttributes()\n  }\n\n  copy(options = {}) {\n    const blocks = options.consolidateBlocks ? this.blockList.consolidate().toArray() : this.blockList.toArray()\n\n    return new this.constructor(blocks)\n  }\n\n  copyUsingObjectsFromDocument(sourceDocument) {\n    const objectMap = new ObjectMap(sourceDocument.getObjects())\n    return this.copyUsingObjectMap(objectMap)\n  }\n\n  copyUsingObjectMap(objectMap) {\n    const blocks = this.getBlocks().map((block) => {\n      const mappedBlock = objectMap.find(block)\n      return mappedBlock || block.copyUsingObjectMap(objectMap)\n    })\n    return new this.constructor(blocks)\n  }\n\n  copyWithBaseBlockAttributes(blockAttributes = []) {\n    const blocks = this.getBlocks().map((block) => {\n      const attributes = blockAttributes.concat(block.getAttributes())\n      return block.copyWithAttributes(attributes)\n    })\n\n    return new this.constructor(blocks)\n  }\n\n  replaceBlock(oldBlock, newBlock) {\n    const index = this.blockList.indexOf(oldBlock)\n    if (index === -1) {\n      return this\n    }\n    return new this.constructor(this.blockList.replaceObjectAtIndex(newBlock, index))\n  }\n\n  insertDocumentAtRange(document, range) {\n    const { blockList } = document\n    range = normalizeRange(range)\n    let [ position ] = range\n    const { index, offset } = this.locationFromPosition(position)\n\n    let result = this\n    const block = this.getBlockAtPosition(position)\n\n    if (rangeIsCollapsed(range) && block.isEmpty() && !block.hasAttributes()) {\n      result = new this.constructor(result.blockList.removeObjectAtIndex(index))\n    } else if (block.getBlockBreakPosition() === offset) {\n      position++\n    }\n\n    result = result.removeTextAtRange(range)\n    return new this.constructor(result.blockList.insertSplittableListAtPosition(blockList, position))\n  }\n\n  mergeDocumentAtRange(document, range) {\n    let formattedDocument, result\n    range = normalizeRange(range)\n    const [ startPosition ] = range\n    const startLocation = this.locationFromPosition(startPosition)\n    const blockAttributes = this.getBlockAtIndex(startLocation.index).getAttributes()\n    const baseBlockAttributes = document.getBaseBlockAttributes()\n    const trailingBlockAttributes = blockAttributes.slice(-baseBlockAttributes.length)\n\n    if (arraysAreEqual(baseBlockAttributes, trailingBlockAttributes)) {\n      const leadingBlockAttributes = blockAttributes.slice(0, -baseBlockAttributes.length)\n      formattedDocument = document.copyWithBaseBlockAttributes(leadingBlockAttributes)\n    } else {\n      formattedDocument = document.copy({ consolidateBlocks: true }).copyWithBaseBlockAttributes(blockAttributes)\n    }\n\n    const blockCount = formattedDocument.getBlockCount()\n    const firstBlock = formattedDocument.getBlockAtIndex(0)\n\n    if (arraysAreEqual(blockAttributes, firstBlock.getAttributes())) {\n      const firstText = firstBlock.getTextWithoutBlockBreak()\n      result = this.insertTextAtRange(firstText, range)\n\n      if (blockCount > 1) {\n        formattedDocument = new this.constructor(formattedDocument.getBlocks().slice(1))\n        const position = startPosition + firstText.getLength()\n        result = result.insertDocumentAtRange(formattedDocument, position)\n      }\n    } else {\n      result = this.insertDocumentAtRange(formattedDocument, range)\n    }\n\n    return result\n  }\n\n  insertTextAtRange(text, range) {\n    range = normalizeRange(range)\n    const [ startPosition ] = range\n    const { index, offset } = this.locationFromPosition(startPosition)\n\n    const document = this.removeTextAtRange(range)\n    return new this.constructor(\n      document.blockList.editObjectAtIndex(index, (block) =>\n        block.copyWithText(block.text.insertTextAtPosition(text, offset))\n      )\n    )\n  }\n\n  removeTextAtRange(range) {\n    let blocks\n    range = normalizeRange(range)\n    const [ leftPosition, rightPosition ] = range\n    if (rangeIsCollapsed(range)) {\n      return this\n    }\n    const [ leftLocation, rightLocation ] = Array.from(this.locationRangeFromRange(range))\n\n    const leftIndex = leftLocation.index\n    const leftOffset = leftLocation.offset\n    const leftBlock = this.getBlockAtIndex(leftIndex)\n\n    const rightIndex = rightLocation.index\n    const rightOffset = rightLocation.offset\n    const rightBlock = this.getBlockAtIndex(rightIndex)\n\n    const removeRightNewline =\n      rightPosition - leftPosition === 1 &&\n      leftBlock.getBlockBreakPosition() === leftOffset &&\n      rightBlock.getBlockBreakPosition() !== rightOffset &&\n      rightBlock.text.getStringAtPosition(rightOffset) === \"\\n\"\n\n    if (removeRightNewline) {\n      blocks = this.blockList.editObjectAtIndex(rightIndex, (block) =>\n        block.copyWithText(block.text.removeTextAtRange([ rightOffset, rightOffset + 1 ]))\n      )\n    } else {\n      let block\n      const leftText = leftBlock.text.getTextAtRange([ 0, leftOffset ])\n      const rightText = rightBlock.text.getTextAtRange([ rightOffset, rightBlock.getLength() ])\n      const text = leftText.appendText(rightText)\n\n      const removingLeftBlock = leftIndex !== rightIndex && leftOffset === 0\n      const useRightBlock = removingLeftBlock && leftBlock.getAttributeLevel() >= rightBlock.getAttributeLevel()\n\n      if (useRightBlock) {\n        block = rightBlock.copyWithText(text)\n      } else {\n        block = leftBlock.copyWithText(text)\n      }\n\n      const affectedBlockCount = rightIndex + 1 - leftIndex\n      blocks = this.blockList.splice(leftIndex, affectedBlockCount, block)\n    }\n\n    return new this.constructor(blocks)\n  }\n\n  moveTextFromRangeToPosition(range, position) {\n    let text\n    range = normalizeRange(range)\n    const [ startPosition, endPosition ] = range\n    if (startPosition <= position && position <= endPosition) {\n      return this\n    }\n\n    let document = this.getDocumentAtRange(range)\n    let result = this.removeTextAtRange(range)\n\n    const movingRightward = startPosition < position\n    if (movingRightward) {\n      position -= document.getLength()\n    }\n\n    const [ firstBlock, ...blocks ] = document.getBlocks()\n    if (blocks.length === 0) {\n      text = firstBlock.getTextWithoutBlockBreak()\n      if (movingRightward) {\n        position += 1\n      }\n    } else {\n      text = firstBlock.text\n    }\n\n    result = result.insertTextAtRange(text, position)\n    if (blocks.length === 0) {\n      return result\n    }\n\n    document = new this.constructor(blocks)\n    position += text.getLength()\n\n    return result.insertDocumentAtRange(document, position)\n  }\n\n  addAttributeAtRange(attribute, value, range) {\n    let { blockList } = this\n    this.eachBlockAtRange(\n      range,\n      (block, textRange, index) =>\n        blockList = blockList.editObjectAtIndex(index, function() {\n          if (getBlockConfig(attribute)) {\n            return block.addAttribute(attribute, value)\n          } else {\n            if (textRange[0] === textRange[1]) {\n              return block\n            } else {\n              return block.copyWithText(block.text.addAttributeAtRange(attribute, value, textRange))\n            }\n          }\n        })\n    )\n    return new this.constructor(blockList)\n  }\n\n  addAttribute(attribute, value) {\n    let { blockList } = this\n    this.eachBlock(\n      (block, index) => blockList = blockList.editObjectAtIndex(index, () => block.addAttribute(attribute, value))\n    )\n    return new this.constructor(blockList)\n  }\n\n  removeAttributeAtRange(attribute, range) {\n    let { blockList } = this\n    this.eachBlockAtRange(range, function(block, textRange, index) {\n      if (getBlockConfig(attribute)) {\n        blockList = blockList.editObjectAtIndex(index, () => block.removeAttribute(attribute))\n      } else if (textRange[0] !== textRange[1]) {\n        blockList = blockList.editObjectAtIndex(index, () =>\n          block.copyWithText(block.text.removeAttributeAtRange(attribute, textRange))\n        )\n      }\n    })\n    return new this.constructor(blockList)\n  }\n\n  updateAttributesForAttachment(attributes, attachment) {\n    const range = this.getRangeOfAttachment(attachment)\n    const [ startPosition ] = Array.from(range)\n    const { index } = this.locationFromPosition(startPosition)\n    const text = this.getTextAtIndex(index)\n\n    return new this.constructor(\n      this.blockList.editObjectAtIndex(index, (block) =>\n        block.copyWithText(text.updateAttributesForAttachment(attributes, attachment))\n      )\n    )\n  }\n\n  removeAttributeForAttachment(attribute, attachment) {\n    const range = this.getRangeOfAttachment(attachment)\n    return this.removeAttributeAtRange(attribute, range)\n  }\n\n  setHTMLAttributeAtPosition(position, name, value) {\n    const block = this.getBlockAtPosition(position)\n    const updatedBlock = block.addHTMLAttribute(name, value)\n    return this.replaceBlock(block, updatedBlock)\n  }\n\n  insertBlockBreakAtRange(range) {\n    let blocks\n    range = normalizeRange(range)\n    const [ startPosition ] = range\n    const { offset } = this.locationFromPosition(startPosition)\n\n    const document = this.removeTextAtRange(range)\n    if (offset === 0) {\n      blocks = [ new Block() ]\n    }\n    return new this.constructor(\n      document.blockList.insertSplittableListAtPosition(new SplittableList(blocks), startPosition)\n    )\n  }\n\n  applyBlockAttributeAtRange(attributeName, value, range) {\n    const expanded = this.expandRangeToLineBreaksAndSplitBlocks(range)\n    let document = expanded.document\n    range = expanded.range\n    const blockConfig = getBlockConfig(attributeName)\n\n    if (blockConfig.listAttribute) {\n      document = document.removeLastListAttributeAtRange(range, { exceptAttributeName: attributeName })\n      const converted = document.convertLineBreaksToBlockBreaksInRange(range)\n      document = converted.document\n      range = converted.range\n    } else if (blockConfig.exclusive) {\n      document = document.removeBlockAttributesAtRange(range)\n    } else if (blockConfig.terminal) {\n      document = document.removeLastTerminalAttributeAtRange(range)\n    } else {\n      document = document.consolidateBlocksAtRange(range)\n    }\n\n    return document.addAttributeAtRange(attributeName, value, range)\n  }\n\n  removeLastListAttributeAtRange(range, options = {}) {\n    let { blockList } = this\n    this.eachBlockAtRange(range, function(block, textRange, index) {\n      const lastAttributeName = block.getLastAttribute()\n      if (!lastAttributeName) {\n        return\n      }\n      if (!getBlockConfig(lastAttributeName).listAttribute) {\n        return\n      }\n      if (lastAttributeName === options.exceptAttributeName) {\n        return\n      }\n      blockList = blockList.editObjectAtIndex(index, () => block.removeAttribute(lastAttributeName))\n    })\n    return new this.constructor(blockList)\n  }\n\n  removeLastTerminalAttributeAtRange(range) {\n    let { blockList } = this\n    this.eachBlockAtRange(range, function(block, textRange, index) {\n      const lastAttributeName = block.getLastAttribute()\n      if (!lastAttributeName) {\n        return\n      }\n      if (!getBlockConfig(lastAttributeName).terminal) {\n        return\n      }\n      blockList = blockList.editObjectAtIndex(index, () => block.removeAttribute(lastAttributeName))\n    })\n    return new this.constructor(blockList)\n  }\n\n  removeBlockAttributesAtRange(range) {\n    let { blockList } = this\n    this.eachBlockAtRange(range, function(block, textRange, index) {\n      if (block.hasAttributes()) {\n        blockList = blockList.editObjectAtIndex(index, () => block.copyWithoutAttributes())\n      }\n    })\n    return new this.constructor(blockList)\n  }\n\n  expandRangeToLineBreaksAndSplitBlocks(range) {\n    let position\n    range = normalizeRange(range)\n    let [ startPosition, endPosition ] = range\n    const startLocation = this.locationFromPosition(startPosition)\n    const endLocation = this.locationFromPosition(endPosition)\n    let document = this\n\n    const startBlock = document.getBlockAtIndex(startLocation.index)\n    startLocation.offset = startBlock.findLineBreakInDirectionFromPosition(\"backward\", startLocation.offset)\n    if (startLocation.offset != null) {\n      position = document.positionFromLocation(startLocation)\n      document = document.insertBlockBreakAtRange([ position, position + 1 ])\n      endLocation.index += 1\n      endLocation.offset -= document.getBlockAtIndex(startLocation.index).getLength()\n      startLocation.index += 1\n    }\n    startLocation.offset = 0\n\n    if (endLocation.offset === 0 && endLocation.index > startLocation.index) {\n      endLocation.index -= 1\n      endLocation.offset = document.getBlockAtIndex(endLocation.index).getBlockBreakPosition()\n    } else {\n      const endBlock = document.getBlockAtIndex(endLocation.index)\n      if (endBlock.text.getStringAtRange([ endLocation.offset - 1, endLocation.offset ]) === \"\\n\") {\n        endLocation.offset -= 1\n      } else {\n        endLocation.offset = endBlock.findLineBreakInDirectionFromPosition(\"forward\", endLocation.offset)\n      }\n      if (endLocation.offset !== endBlock.getBlockBreakPosition()) {\n        position = document.positionFromLocation(endLocation)\n        document = document.insertBlockBreakAtRange([ position, position + 1 ])\n      }\n    }\n\n    startPosition = document.positionFromLocation(startLocation)\n    endPosition = document.positionFromLocation(endLocation)\n    range = normalizeRange([ startPosition, endPosition ])\n\n    return { document, range }\n  }\n\n  convertLineBreaksToBlockBreaksInRange(range) {\n    range = normalizeRange(range)\n    let [ position ] = range\n    const string = this.getStringAtRange(range).slice(0, -1)\n    let document = this\n\n    string.replace(/.*?\\n/g, function(match) {\n      position += match.length\n      document = document.insertBlockBreakAtRange([ position - 1, position ])\n    })\n\n    return { document, range }\n  }\n\n  consolidateBlocksAtRange(range) {\n    range = normalizeRange(range)\n    const [ startPosition, endPosition ] = range\n    const startIndex = this.locationFromPosition(startPosition).index\n    const endIndex = this.locationFromPosition(endPosition).index\n    return new this.constructor(this.blockList.consolidateFromIndexToIndex(startIndex, endIndex))\n  }\n\n  getDocumentAtRange(range) {\n    range = normalizeRange(range)\n    const blocks = this.blockList.getSplittableListInRange(range).toArray()\n    return new this.constructor(blocks)\n  }\n\n  getStringAtRange(range) {\n    let endIndex\n    const array = range = normalizeRange(range),\n      endPosition = array[array.length - 1]\n    if (endPosition !== this.getLength()) {\n      endIndex = -1\n    }\n    return this.getDocumentAtRange(range).toString().slice(0, endIndex)\n  }\n\n  getBlockAtIndex(index) {\n    return this.blockList.getObjectAtIndex(index)\n  }\n\n  getBlockAtPosition(position) {\n    const { index } = this.locationFromPosition(position)\n    return this.getBlockAtIndex(index)\n  }\n\n  getTextAtIndex(index) {\n    return this.getBlockAtIndex(index)?.text\n  }\n\n  getTextAtPosition(position) {\n    const { index } = this.locationFromPosition(position)\n    return this.getTextAtIndex(index)\n  }\n\n  getPieceAtPosition(position) {\n    const { index, offset } = this.locationFromPosition(position)\n    return this.getTextAtIndex(index).getPieceAtPosition(offset)\n  }\n\n  getCharacterAtPosition(position) {\n    const { index, offset } = this.locationFromPosition(position)\n    return this.getTextAtIndex(index).getStringAtRange([ offset, offset + 1 ])\n  }\n\n  getLength() {\n    return this.blockList.getEndPosition()\n  }\n\n  getBlocks() {\n    return this.blockList.toArray()\n  }\n\n  getBlockCount() {\n    return this.blockList.length\n  }\n\n  getEditCount() {\n    return this.editCount\n  }\n\n  eachBlock(callback) {\n    return this.blockList.eachObject(callback)\n  }\n\n  eachBlockAtRange(range, callback) {\n    let block, textRange\n    range = normalizeRange(range)\n    const [ startPosition, endPosition ] = range\n    const startLocation = this.locationFromPosition(startPosition)\n    const endLocation = this.locationFromPosition(endPosition)\n\n    if (startLocation.index === endLocation.index) {\n      block = this.getBlockAtIndex(startLocation.index)\n      textRange = [ startLocation.offset, endLocation.offset ]\n      return callback(block, textRange, startLocation.index)\n    } else {\n      for (let index = startLocation.index; index <= endLocation.index; index++) {\n        block = this.getBlockAtIndex(index)\n        if (block) {\n          switch (index) {\n            case startLocation.index:\n              textRange = [ startLocation.offset, block.text.getLength() ]\n              break\n            case endLocation.index:\n              textRange = [ 0, endLocation.offset ]\n              break\n            default:\n              textRange = [ 0, block.text.getLength() ]\n          }\n          callback(block, textRange, index)\n        }\n      }\n    }\n  }\n\n  getCommonAttributesAtRange(range) {\n    range = normalizeRange(range)\n    const [ startPosition ] = range\n    if (rangeIsCollapsed(range)) {\n      return this.getCommonAttributesAtPosition(startPosition)\n    } else {\n      const textAttributes = []\n      const blockAttributes = []\n\n      this.eachBlockAtRange(range, function(block, textRange) {\n        if (textRange[0] !== textRange[1]) {\n          textAttributes.push(block.text.getCommonAttributesAtRange(textRange))\n          return blockAttributes.push(attributesForBlock(block))\n        }\n      })\n\n      return Hash.fromCommonAttributesOfObjects(textAttributes)\n        .merge(Hash.fromCommonAttributesOfObjects(blockAttributes))\n        .toObject()\n    }\n  }\n\n  getCommonAttributesAtPosition(position) {\n    let key, value\n    const { index, offset } = this.locationFromPosition(position)\n    const block = this.getBlockAtIndex(index)\n    if (!block) {\n      return {}\n    }\n\n    const commonAttributes = attributesForBlock(block)\n    const attributes = block.text.getAttributesAtPosition(offset)\n    const attributesLeft = block.text.getAttributesAtPosition(offset - 1)\n    const inheritableAttributes = Object.keys(config.textAttributes).filter((key) => {\n      return config.textAttributes[key].inheritable\n    })\n\n    for (key in attributesLeft) {\n      value = attributesLeft[key]\n      if (value === attributes[key] || inheritableAttributes.includes(key)) {\n        commonAttributes[key] = value\n      }\n    }\n\n    return commonAttributes\n  }\n\n  getRangeOfCommonAttributeAtPosition(attributeName, position) {\n    const { index, offset } = this.locationFromPosition(position)\n    const text = this.getTextAtIndex(index)\n    const [ startOffset, endOffset ] = Array.from(text.getExpandedRangeForAttributeAtOffset(attributeName, offset))\n\n    const start = this.positionFromLocation({ index, offset: startOffset })\n    const end = this.positionFromLocation({ index, offset: endOffset })\n    return normalizeRange([ start, end ])\n  }\n\n  getBaseBlockAttributes() {\n    let baseBlockAttributes = this.getBlockAtIndex(0).getAttributes()\n\n    for (let blockIndex = 1; blockIndex < this.getBlockCount(); blockIndex++) {\n      const blockAttributes = this.getBlockAtIndex(blockIndex).getAttributes()\n      const lastAttributeIndex = Math.min(baseBlockAttributes.length, blockAttributes.length)\n\n      baseBlockAttributes = (() => {\n        const result = []\n        for (let index = 0; index < lastAttributeIndex; index++) {\n          if (blockAttributes[index] !== baseBlockAttributes[index]) {\n            break\n          }\n          result.push(blockAttributes[index])\n        }\n        return result\n      })()\n    }\n\n    return baseBlockAttributes\n  }\n\n  getAttachmentById(attachmentId) {\n    for (const attachment of this.getAttachments()) {\n      if (attachment.id === attachmentId) {\n        return attachment\n      }\n    }\n  }\n\n  getAttachmentPieces() {\n    let attachmentPieces = []\n    this.blockList.eachObject(({ text }) => attachmentPieces = attachmentPieces.concat(text.getAttachmentPieces()))\n    return attachmentPieces\n  }\n\n  getAttachments() {\n    return this.getAttachmentPieces().map((piece) => piece.attachment)\n  }\n\n  getRangeOfAttachment(attachment) {\n    let position = 0\n    const iterable = this.blockList.toArray()\n    for (let index = 0; index < iterable.length; index++) {\n      const { text } = iterable[index]\n      const textRange = text.getRangeOfAttachment(attachment)\n      if (textRange) {\n        return normalizeRange([ position + textRange[0], position + textRange[1] ])\n      }\n      position += text.getLength()\n    }\n  }\n\n  getLocationRangeOfAttachment(attachment) {\n    const range = this.getRangeOfAttachment(attachment)\n    return this.locationRangeFromRange(range)\n  }\n\n  getAttachmentPieceForAttachment(attachment) {\n    for (const piece of this.getAttachmentPieces()) {\n      if (piece.attachment === attachment) {\n        return piece\n      }\n    }\n  }\n\n  findRangesForBlockAttribute(attributeName) {\n    let position = 0\n    const ranges = []\n\n    this.getBlocks().forEach((block) => {\n      const length = block.getLength()\n      if (block.hasAttribute(attributeName)) {\n        ranges.push([ position, position + length ])\n      }\n      position += length\n    })\n\n    return ranges\n  }\n\n  findRangesForTextAttribute(attributeName, { withValue } = {}) {\n    let position = 0\n    let range = []\n    const ranges = []\n\n    const match = function(piece) {\n      if (withValue) {\n        return piece.getAttribute(attributeName) === withValue\n      } else {\n        return piece.hasAttribute(attributeName)\n      }\n    }\n\n    this.getPieces().forEach((piece) => {\n      const length = piece.getLength()\n      if (match(piece)) {\n        if (range[1] === position) {\n          range[1] = position + length\n        } else {\n          ranges.push(range = [ position, position + length ])\n        }\n      }\n      position += length\n    })\n\n    return ranges\n  }\n\n  locationFromPosition(position) {\n    const location = this.blockList.findIndexAndOffsetAtPosition(Math.max(0, position))\n    if (location.index != null) {\n      return location\n    } else {\n      const blocks = this.getBlocks()\n      return { index: blocks.length - 1, offset: blocks[blocks.length - 1].getLength() }\n    }\n  }\n\n  positionFromLocation(location) {\n    return this.blockList.findPositionAtIndexAndOffset(location.index, location.offset)\n  }\n\n  locationRangeFromPosition(position) {\n    return normalizeRange(this.locationFromPosition(position))\n  }\n\n  locationRangeFromRange(range) {\n    range = normalizeRange(range)\n    if (!range) return\n\n    const [ startPosition, endPosition ] = Array.from(range)\n    const startLocation = this.locationFromPosition(startPosition)\n    const endLocation = this.locationFromPosition(endPosition)\n    return normalizeRange([ startLocation, endLocation ])\n  }\n\n  rangeFromLocationRange(locationRange) {\n    let rightPosition\n    locationRange = normalizeRange(locationRange)\n    const leftPosition = this.positionFromLocation(locationRange[0])\n    if (!rangeIsCollapsed(locationRange)) {\n      rightPosition = this.positionFromLocation(locationRange[1])\n    }\n    return normalizeRange([ leftPosition, rightPosition ])\n  }\n\n  isEqualTo(document) {\n    return this.blockList.isEqualTo(document?.blockList)\n  }\n\n  getTexts() {\n    return this.getBlocks().map((block) => block.text)\n  }\n\n  getPieces() {\n    const pieces = []\n\n    Array.from(this.getTexts()).forEach((text) => {\n      pieces.push(...Array.from(text.getPieces() || []))\n    })\n\n    return pieces\n  }\n\n  getObjects() {\n    return this.getBlocks().concat(this.getTexts()).concat(this.getPieces())\n  }\n\n  toSerializableDocument() {\n    const blocks = []\n    this.blockList.eachObject((block) => blocks.push(block.copyWithText(block.text.toSerializableText())))\n    return new this.constructor(blocks)\n  }\n\n  toString() {\n    return this.blockList.toString()\n  }\n\n  toJSON() {\n    return this.blockList.toJSON()\n  }\n\n  toConsole() {\n    return JSON.stringify(this.blockList.toArray().map((block) => JSON.parse(block.text.toConsole())))\n  }\n}\n\nconst attributesForBlock = function(block) {\n  const attributes = {}\n  const attributeName = block.getLastAttribute()\n  if (attributeName) {\n    attributes[attributeName] = true\n  }\n  return attributes\n}\n", "/* eslint-disable\n    no-case-declarations,\n    no-irregular-whitespace,\n*/\nimport * as config from \"trix/config\"\nimport BasicObject from \"trix/core/basic_object\"\nimport Document from \"trix/models/document\"\nimport HTMLSanitizer from \"trix/models/html_sanitizer\"\n\nimport {\n  arraysAreEqual,\n  breakableWhitespacePattern,\n  elementContainsNode,\n  findClosestElementFromNode,\n  getBlockTagNames,\n  makeElement,\n  nodeIsAttachmentElement,\n  normalizeSpaces,\n  removeNode,\n  squishBreakableWhitespace,\n  tagName,\n  walkTree,\n} from \"trix/core/helpers\"\n\nconst pieceForString = (string, attributes = {}) => {\n  const type = \"string\"\n  string = normalizeSpaces(string)\n  return { string, attributes, type }\n}\n\nconst pieceForAttachment = (attachment, attributes = {}) => {\n  const type = \"attachment\"\n  return { attachment, attributes, type }\n}\n\nconst blockForAttributes = (attributes = {}, htmlAttributes = {}) => {\n  const text = []\n  return { text, attributes, htmlAttributes }\n}\n\nconst parseTrixDataAttribute = (element, name) => {\n  try {\n    return JSON.parse(element.getAttribute(`data-trix-${name}`))\n  } catch (error) {\n    return {}\n  }\n}\n\nconst getImageDimensions = (element) => {\n  const width = element.getAttribute(\"width\")\n  const height = element.getAttribute(\"height\")\n  const dimensions = {}\n  if (width) {\n    dimensions.width = parseInt(width, 10)\n  }\n  if (height) {\n    dimensions.height = parseInt(height, 10)\n  }\n  return dimensions\n}\n\nexport default class HTMLParser extends BasicObject {\n  static parse(html, options) {\n    const parser = new this(html, options)\n    parser.parse()\n    return parser\n  }\n\n  constructor(html, { referenceElement } = {}) {\n    super(...arguments)\n    this.html = html\n    this.referenceElement = referenceElement\n    this.blocks = []\n    this.blockElements = []\n    this.processedElements = []\n  }\n\n  getDocument() {\n    return Document.fromJSON(this.blocks)\n  }\n\n  // HTML parsing\n\n  parse() {\n    try {\n      this.createHiddenContainer()\n      HTMLSanitizer.setHTML(this.containerElement, this.html)\n      const walker = walkTree(this.containerElement, { usingFilter: nodeFilter })\n      while (walker.nextNode()) {\n        this.processNode(walker.currentNode)\n      }\n      return this.translateBlockElementMarginsToNewlines()\n    } finally {\n      this.removeHiddenContainer()\n    }\n  }\n\n  createHiddenContainer() {\n    if (this.referenceElement) {\n      this.containerElement = this.referenceElement.cloneNode(false)\n      this.containerElement.removeAttribute(\"id\")\n      this.containerElement.setAttribute(\"data-trix-internal\", \"\")\n      this.containerElement.style.display = \"none\"\n      return this.referenceElement.parentNode.insertBefore(this.containerElement, this.referenceElement.nextSibling)\n    } else {\n      this.containerElement = makeElement({ tagName: \"div\", style: { display: \"none\" } })\n      return document.body.appendChild(this.containerElement)\n    }\n  }\n\n  removeHiddenContainer() {\n    return removeNode(this.containerElement)\n  }\n\n  processNode(node) {\n    switch (node.nodeType) {\n      case Node.TEXT_NODE:\n        if (!this.isInsignificantTextNode(node)) {\n          this.appendBlockForTextNode(node)\n          return this.processTextNode(node)\n        }\n        break\n      case Node.ELEMENT_NODE:\n        this.appendBlockForElement(node)\n        return this.processElement(node)\n    }\n  }\n\n  appendBlockForTextNode(node) {\n    const element = node.parentNode\n    if (element === this.currentBlockElement && this.isBlockElement(node.previousSibling)) {\n      return this.appendStringWithAttributes(\"\\n\")\n    } else if (element === this.containerElement || this.isBlockElement(element)) {\n      const attributes = this.getBlockAttributes(element)\n      const htmlAttributes = this.getBlockHTMLAttributes(element)\n      if (!arraysAreEqual(attributes, this.currentBlock?.attributes)) {\n        this.currentBlock = this.appendBlockForAttributesWithElement(attributes, element, htmlAttributes)\n        this.currentBlockElement = element\n      }\n    }\n  }\n\n  appendBlockForElement(element) {\n    const elementIsBlockElement = this.isBlockElement(element)\n    const currentBlockContainsElement = elementContainsNode(this.currentBlockElement, element)\n\n    if (elementIsBlockElement && !this.isBlockElement(element.firstChild)) {\n      if (!this.isInsignificantTextNode(element.firstChild) || !this.isBlockElement(element.firstElementChild)) {\n        const attributes = this.getBlockAttributes(element)\n        const htmlAttributes = this.getBlockHTMLAttributes(element)\n        if (element.firstChild) {\n          if (!(currentBlockContainsElement && arraysAreEqual(attributes, this.currentBlock.attributes))) {\n            this.currentBlock = this.appendBlockForAttributesWithElement(attributes, element, htmlAttributes)\n            this.currentBlockElement = element\n          } else {\n            return this.appendStringWithAttributes(\"\\n\")\n          }\n        }\n      }\n    } else if (this.currentBlockElement && !currentBlockContainsElement && !elementIsBlockElement) {\n      const parentBlockElement = this.findParentBlockElement(element)\n      if (parentBlockElement) {\n        return this.appendBlockForElement(parentBlockElement)\n      } else {\n        this.currentBlock = this.appendEmptyBlock()\n        this.currentBlockElement = null\n      }\n    }\n  }\n\n  findParentBlockElement(element) {\n    let { parentElement } = element\n    while (parentElement && parentElement !== this.containerElement) {\n      if (this.isBlockElement(parentElement) && this.blockElements.includes(parentElement)) {\n        return parentElement\n      } else {\n        parentElement = parentElement.parentElement\n      }\n    }\n    return null\n  }\n\n  processTextNode(node) {\n    let string = node.data\n    if (!elementCanDisplayPreformattedText(node.parentNode)) {\n      string = squishBreakableWhitespace(string)\n      if (stringEndsWithWhitespace(node.previousSibling?.textContent)) {\n        string = leftTrimBreakableWhitespace(string)\n      }\n    }\n    return this.appendStringWithAttributes(string, this.getTextAttributes(node.parentNode))\n  }\n\n  processElement(element) {\n    let attributes\n    if (nodeIsAttachmentElement(element)) {\n      attributes = parseTrixDataAttribute(element, \"attachment\")\n      if (Object.keys(attributes).length) {\n        const textAttributes = this.getTextAttributes(element)\n        this.appendAttachmentWithAttributes(attributes, textAttributes)\n        // We have everything we need so avoid processing inner nodes\n        element.innerHTML = \"\"\n      }\n      return this.processedElements.push(element)\n    } else {\n      switch (tagName(element)) {\n        case \"br\":\n          if (!this.isExtraBR(element) && !this.isBlockElement(element.nextSibling)) {\n            this.appendStringWithAttributes(\"\\n\", this.getTextAttributes(element))\n          }\n          return this.processedElements.push(element)\n        case \"img\":\n          attributes = { url: element.getAttribute(\"src\"), contentType: \"image\" }\n          const object = getImageDimensions(element)\n          for (const key in object) {\n            const value = object[key]\n            attributes[key] = value\n          }\n          this.appendAttachmentWithAttributes(attributes, this.getTextAttributes(element))\n          return this.processedElements.push(element)\n        case \"tr\":\n          if (this.needsTableSeparator(element)) {\n            return this.appendStringWithAttributes(config.parser.tableRowSeparator)\n          }\n          break\n        case \"td\":\n          if (this.needsTableSeparator(element)) {\n            return this.appendStringWithAttributes(config.parser.tableCellSeparator)\n          }\n          break\n      }\n    }\n  }\n\n  // Document construction\n\n  appendBlockForAttributesWithElement(attributes, element, htmlAttributes = {}) {\n    this.blockElements.push(element)\n    const block = blockForAttributes(attributes, htmlAttributes)\n    this.blocks.push(block)\n    return block\n  }\n\n  appendEmptyBlock() {\n    return this.appendBlockForAttributesWithElement([], null)\n  }\n\n  appendStringWithAttributes(string, attributes) {\n    return this.appendPiece(pieceForString(string, attributes))\n  }\n\n  appendAttachmentWithAttributes(attachment, attributes) {\n    return this.appendPiece(pieceForAttachment(attachment, attributes))\n  }\n\n  appendPiece(piece) {\n    if (this.blocks.length === 0) {\n      this.appendEmptyBlock()\n    }\n    return this.blocks[this.blocks.length - 1].text.push(piece)\n  }\n\n  appendStringToTextAtIndex(string, index) {\n    const { text } = this.blocks[index]\n    const piece = text[text.length - 1]\n\n    if (piece?.type === \"string\") {\n      piece.string += string\n    } else {\n      return text.push(pieceForString(string))\n    }\n  }\n\n  prependStringToTextAtIndex(string, index) {\n    const { text } = this.blocks[index]\n    const piece = text[0]\n\n    if (piece?.type === \"string\") {\n      piece.string = string + piece.string\n    } else {\n      return text.unshift(pieceForString(string))\n    }\n  }\n\n  // Attribute parsing\n\n  getTextAttributes(element) {\n    let value\n    const attributes = {}\n    for (const attribute in config.textAttributes) {\n      const configAttr = config.textAttributes[attribute]\n      if (\n        configAttr.tagName &&\n        findClosestElementFromNode(element, {\n          matchingSelector: configAttr.tagName,\n          untilNode: this.containerElement,\n        })\n      ) {\n        attributes[attribute] = true\n      } else if (configAttr.parser) {\n        value = configAttr.parser(element)\n        if (value) {\n          let attributeInheritedFromBlock = false\n          for (const blockElement of this.findBlockElementAncestors(element)) {\n            if (configAttr.parser(blockElement) === value) {\n              attributeInheritedFromBlock = true\n              break\n            }\n          }\n          if (!attributeInheritedFromBlock) {\n            attributes[attribute] = value\n          }\n        }\n      } else if (configAttr.styleProperty) {\n        value = element.style[configAttr.styleProperty]\n        if (value) {\n          attributes[attribute] = value\n        }\n      }\n    }\n\n    if (nodeIsAttachmentElement(element)) {\n      const object = parseTrixDataAttribute(element, \"attributes\")\n      for (const key in object) {\n        value = object[key]\n        attributes[key] = value\n      }\n    }\n\n    return attributes\n  }\n\n  getBlockAttributes(element) {\n    const attributes = []\n    while (element && element !== this.containerElement) {\n      for (const attribute in config.blockAttributes) {\n        const attrConfig = config.blockAttributes[attribute]\n        if (attrConfig.parse !== false) {\n          if (tagName(element) === attrConfig.tagName) {\n            if (attrConfig.test?.(element) || !attrConfig.test) {\n              attributes.push(attribute)\n              if (attrConfig.listAttribute) {\n                attributes.push(attrConfig.listAttribute)\n              }\n            }\n          }\n        }\n      }\n      element = element.parentNode\n    }\n    return attributes.reverse()\n  }\n\n  getBlockHTMLAttributes(element) {\n    const attributes = {}\n    const blockConfig = Object.values(config.blockAttributes).find(settings => settings.tagName === tagName(element))\n    const allowedAttributes = blockConfig?.htmlAttributes || []\n\n    allowedAttributes.forEach((attribute) => {\n      if (element.hasAttribute(attribute)) {\n        attributes[attribute] = element.getAttribute(attribute)\n      }\n    })\n\n    return attributes\n  }\n\n  findBlockElementAncestors(element) {\n    const ancestors = []\n    while (element && element !== this.containerElement) {\n      const tag = tagName(element)\n      if (getBlockTagNames().includes(tag)) {\n        ancestors.push(element)\n      }\n      element = element.parentNode\n    }\n    return ancestors\n  }\n\n  // Element inspection\n\n  isBlockElement(element) {\n    if (element?.nodeType !== Node.ELEMENT_NODE) return\n    if (nodeIsAttachmentElement(element)) return\n    if (findClosestElementFromNode(element, { matchingSelector: \"td\", untilNode: this.containerElement })) return\n\n    return getBlockTagNames().includes(tagName(element)) ||\n      window.getComputedStyle(element).display === \"block\"\n  }\n\n  isInsignificantTextNode(node) {\n    if (node?.nodeType !== Node.TEXT_NODE) return\n    if (!stringIsAllBreakableWhitespace(node.data)) return\n    const { parentNode, previousSibling, nextSibling } = node\n    if (nodeEndsWithNonWhitespace(parentNode.previousSibling) && !this.isBlockElement(parentNode.previousSibling)) return\n    if (elementCanDisplayPreformattedText(parentNode)) return\n    return !previousSibling || this.isBlockElement(previousSibling) || !nextSibling || this.isBlockElement(nextSibling)\n  }\n\n  isExtraBR(element) {\n    return tagName(element) === \"br\" && this.isBlockElement(element.parentNode) && element.parentNode.lastChild === element\n  }\n\n  needsTableSeparator(element) {\n    if (config.parser.removeBlankTableCells) {\n      const content = element.previousSibling?.textContent\n      return content && /\\S/.test(content)\n    } else {\n      return element.previousSibling\n    }\n  }\n\n  // Margin translation\n\n  translateBlockElementMarginsToNewlines() {\n    const defaultMargin = this.getMarginOfDefaultBlockElement()\n\n    for (let index = 0; index < this.blocks.length; index++) {\n      const margin = this.getMarginOfBlockElementAtIndex(index)\n      if (margin) {\n        if (margin.top > defaultMargin.top * 2) {\n          this.prependStringToTextAtIndex(\"\\n\", index)\n        }\n\n        if (margin.bottom > defaultMargin.bottom * 2) {\n          this.appendStringToTextAtIndex(\"\\n\", index)\n        }\n      }\n    }\n  }\n\n  getMarginOfBlockElementAtIndex(index) {\n    const element = this.blockElements[index]\n    if (element) {\n      if (element.textContent) {\n        if (!getBlockTagNames().includes(tagName(element)) && !this.processedElements.includes(element)) {\n          return getBlockElementMargin(element)\n        }\n      }\n    }\n  }\n\n  getMarginOfDefaultBlockElement() {\n    const element = makeElement(config.blockAttributes.default.tagName)\n    this.containerElement.appendChild(element)\n    return getBlockElementMargin(element)\n  }\n}\n\n//\u00A0Helpers\n\nconst elementCanDisplayPreformattedText = function(element) {\n  const { whiteSpace } = window.getComputedStyle(element)\n  return [ \"pre\", \"pre-wrap\", \"pre-line\" ].includes(whiteSpace)\n}\n\nconst nodeEndsWithNonWhitespace = (node) => node && !stringEndsWithWhitespace(node.textContent)\n\nconst getBlockElementMargin = function(element) {\n  const style = window.getComputedStyle(element)\n  if (style.display === \"block\") {\n    return { top: parseInt(style.marginTop), bottom: parseInt(style.marginBottom) }\n  }\n}\n\nconst nodeFilter = function(node) {\n  if (tagName(node) === \"style\") {\n    return NodeFilter.FILTER_REJECT\n  } else {\n    return NodeFilter.FILTER_ACCEPT\n  }\n}\n\n// Whitespace\n\nconst leftTrimBreakableWhitespace = (string) => string.replace(new RegExp(`^${breakableWhitespacePattern.source}+`), \"\")\n\nconst stringIsAllBreakableWhitespace = (string) => new RegExp(`^${breakableWhitespacePattern.source}*$`).test(string)\n\nconst stringEndsWithWhitespace = (string) => /\\s$/.test(string)\n", "/* eslint-disable\n    no-empty,\n*/\nimport { removeNode } from \"trix/core/helpers\"\n\nimport DocumentView from \"trix/views/document_view\"\nimport Document from \"trix/models/document\"\nimport HTMLParser from \"trix/models/html_parser\"\n\nconst unserializableElementSelector = \"[data-trix-serialize=false]\"\nconst unserializableAttributeNames = [\n  \"contenteditable\",\n  \"data-trix-id\",\n  \"data-trix-store-key\",\n  \"data-trix-mutable\",\n  \"data-trix-placeholder\",\n  \"tabindex\",\n]\nconst serializedAttributesAttribute = \"data-trix-serialized-attributes\"\nconst serializedAttributesSelector = `[${serializedAttributesAttribute}]`\n\nconst blockCommentPattern = new RegExp(\"<!--block-->\", \"g\")\n\nconst serializers = {\n  \"application/json\": function(serializable) {\n    let document\n    if (serializable instanceof Document) {\n      document = serializable\n    } else if (serializable instanceof HTMLElement) {\n      document = HTMLParser.parse(serializable.innerHTML).getDocument()\n    } else {\n      throw new Error(\"unserializable object\")\n    }\n\n    return document.toSerializableDocument().toJSONString()\n  },\n\n  \"text/html\": function(serializable) {\n    let element\n    if (serializable instanceof Document) {\n      element = DocumentView.render(serializable)\n    } else if (serializable instanceof HTMLElement) {\n      element = serializable.cloneNode(true)\n    } else {\n      throw new Error(\"unserializable object\")\n    }\n\n    // Remove unserializable elements\n    Array.from(element.querySelectorAll(unserializableElementSelector)).forEach((el) => {\n      removeNode(el)\n    })\n\n    // Remove unserializable attributes\n    unserializableAttributeNames.forEach((attribute) => {\n      Array.from(element.querySelectorAll(`[${attribute}]`)).forEach((el) => {\n        el.removeAttribute(attribute)\n      })\n    })\n\n    // Rewrite elements with serialized attribute overrides\n    Array.from(element.querySelectorAll(serializedAttributesSelector)).forEach((el) => {\n      try {\n        const attributes = JSON.parse(el.getAttribute(serializedAttributesAttribute))\n        el.removeAttribute(serializedAttributesAttribute)\n        for (const name in attributes) {\n          const value = attributes[name]\n          el.setAttribute(name, value)\n        }\n      } catch (error) {}\n    })\n\n    return element.innerHTML.replace(blockCommentPattern, \"\")\n  },\n}\n\nconst deserializers = {\n  \"application/json\": function(string) {\n    return Document.fromJSONString(string)\n  },\n\n  \"text/html\": function(string) {\n    return HTMLParser.parse(string).getDocument()\n  },\n}\n\nexport const serializeToContentType = function(serializable, contentType) {\n  const serializer = serializers[contentType]\n  if (serializer) {\n    return serializer(serializable)\n  } else {\n    throw new Error(`unknown content type: ${contentType}`)\n  }\n}\n\nexport const deserializeFromContentType = function(string, contentType) {\n  const deserializer = deserializers[contentType]\n  if (deserializer) {\n    return deserializer(string)\n  } else {\n    throw new Error(`unknown content type: ${contentType}`)\n  }\n}\n", "import \"trix/models/attachment\"\nimport BasicObject from \"trix/core/basic_object\"\n\nexport default class ManagedAttachment extends BasicObject {\n  constructor(attachmentManager, attachment) {\n    super(...arguments)\n    this.attachmentManager = attachmentManager\n    this.attachment = attachment\n    this.id = this.attachment.id\n    this.file = this.attachment.file\n  }\n\n  remove() {\n    return this.attachmentManager.requestRemovalOfAttachment(this.attachment)\n  }\n}\n\nManagedAttachment.proxyMethod(\"attachment.getAttribute\")\nManagedAttachment.proxyMethod(\"attachment.hasAttribute\")\nManagedAttachment.proxyMethod(\"attachment.setAttribute\")\nManagedAttachment.proxyMethod(\"attachment.getAttributes\")\nManagedAttachment.proxyMethod(\"attachment.setAttributes\")\nManagedAttachment.proxyMethod(\"attachment.isPending\")\nManagedAttachment.proxyMethod(\"attachment.isPreviewable\")\nManagedAttachment.proxyMethod(\"attachment.getURL\")\nManagedAttachment.proxyMethod(\"attachment.getHref\")\nManagedAttachment.proxyMethod(\"attachment.getFilename\")\nManagedAttachment.proxyMethod(\"attachment.getFilesize\")\nManagedAttachment.proxyMethod(\"attachment.getFormattedFilesize\")\nManagedAttachment.proxyMethod(\"attachment.getExtension\")\nManagedAttachment.proxyMethod(\"attachment.getContentType\")\nManagedAttachment.proxyMethod(\"attachment.getFile\")\nManagedAttachment.proxyMethod(\"attachment.setFile\")\nManagedAttachment.proxyMethod(\"attachment.releaseFile\")\nManagedAttachment.proxyMethod(\"attachment.getUploadProgress\")\nManagedAttachment.proxyMethod(\"attachment.setUploadProgress\")\n\n", "import ManagedAttachment from \"trix/models/managed_attachment\"\nimport BasicObject from \"trix/core/basic_object\"\n\nexport default class AttachmentManager extends BasicObject {\n  constructor(attachments = []) {\n    super(...arguments)\n    this.managedAttachments = {}\n    Array.from(attachments).forEach((attachment) => {\n      this.manageAttachment(attachment)\n    })\n  }\n\n  getAttachments() {\n    const result = []\n    for (const id in this.managedAttachments) {\n      const attachment = this.managedAttachments[id]\n      result.push(attachment)\n    }\n    return result\n  }\n\n  manageAttachment(attachment) {\n    if (!this.managedAttachments[attachment.id]) {\n      this.managedAttachments[attachment.id] = new ManagedAttachment(this, attachment)\n    }\n    return this.managedAttachments[attachment.id]\n  }\n\n  attachmentIsManaged(attachment) {\n    return attachment.id in this.managedAttachments\n  }\n\n  requestRemovalOfAttachment(attachment) {\n    if (this.attachmentIsManaged(attachment)) {\n      return this.delegate?.attachmentManagerDidRequestRemovalOfAttachment?.(attachment)\n    }\n  }\n\n  unmanageAttachment(attachment) {\n    const managedAttachment = this.managedAttachments[attachment.id]\n    delete this.managedAttachments[attachment.id]\n    return managedAttachment\n  }\n}\n", "export default class LineBreakInsertion {\n  constructor(composition) {\n    this.composition = composition\n    this.document = this.composition.document\n    const selectedRange = this.composition.getSelectedRange()\n    this.startPosition = selectedRange[0]\n    this.endPosition = selectedRange[1]\n\n    this.startLocation = this.document.locationFromPosition(this.startPosition)\n    this.endLocation = this.document.locationFromPosition(this.endPosition)\n\n    this.block = this.document.getBlockAtIndex(this.endLocation.index)\n    this.breaksOnReturn = this.block.breaksOnReturn()\n    this.previousCharacter = this.block.text.getStringAtPosition(this.endLocation.offset - 1)\n    this.nextCharacter = this.block.text.getStringAtPosition(this.endLocation.offset)\n  }\n\n  shouldInsertBlockBreak() {\n    if (this.block.hasAttributes() && this.block.isListItem() && !this.block.isEmpty()) {\n      return this.startLocation.offset !== 0\n    } else {\n      return this.breaksOnReturn && this.nextCharacter !== \"\\n\"\n    }\n  }\n\n  shouldBreakFormattedBlock() {\n    return (\n      this.block.hasAttributes() &&\n      !this.block.isListItem() &&\n      (this.breaksOnReturn && this.nextCharacter === \"\\n\" || this.previousCharacter === \"\\n\")\n    )\n  }\n\n  shouldDecreaseListLevel() {\n    return this.block.hasAttributes() && this.block.isListItem() && this.block.isEmpty()\n  }\n\n  shouldPrependListItem() {\n    return this.block.isListItem() && this.startLocation.offset === 0 && !this.block.isEmpty()\n  }\n\n  shouldRemoveLastBlockAttribute() {\n    return this.block.hasAttributes() && !this.block.isListItem() && this.block.isEmpty()\n  }\n}\n", "import * as config from \"trix/config\"\nimport { OBJECT_REPLACEMENT_CHARACTER } from \"trix/constants\"\n\nimport BasicObject from \"trix/core/basic_object\"\nimport Text from \"trix/models/text\"\nimport Block from \"trix/models/block\"\nimport Attachment from \"trix/models/attachment\"\nimport Document from \"trix/models/document\"\nimport HTMLParser from \"trix/models/html_parser\"\nimport LineBreakInsertion from \"trix/models/line_break_insertion\"\n\nimport {\n  arrayStartsWith,\n  extend,\n  getAllAttributeNames,\n  getBlockConfig,\n  getTextConfig,\n  normalizeRange,\n  objectsAreEqual,\n  rangeIsCollapsed,\n  rangesAreEqual,\n  summarizeArrayChange,\n} from \"trix/core/helpers\"\n\nconst PLACEHOLDER = \" \"\n\nexport default class Composition extends BasicObject {\n  constructor() {\n    super(...arguments)\n    this.document = new Document()\n    this.attachments = []\n    this.currentAttributes = {}\n    this.revision = 0\n  }\n\n  setDocument(document) {\n    if (!document.isEqualTo(this.document)) {\n      this.document = document\n      this.refreshAttachments()\n      this.revision++\n      return this.delegate?.compositionDidChangeDocument?.(document)\n    }\n  }\n\n  // Snapshots\n\n  getSnapshot() {\n    return {\n      document: this.document,\n      selectedRange: this.getSelectedRange(),\n    }\n  }\n\n  loadSnapshot({ document, selectedRange }) {\n    this.delegate?.compositionWillLoadSnapshot?.()\n    this.setDocument(document != null ? document : new Document())\n    this.setSelection(selectedRange != null ? selectedRange : [ 0, 0 ])\n    return this.delegate?.compositionDidLoadSnapshot?.()\n  }\n\n  // Responder protocol\n\n  insertText(text, { updatePosition } = { updatePosition: true }) {\n    const selectedRange = this.getSelectedRange()\n    this.setDocument(this.document.insertTextAtRange(text, selectedRange))\n\n    const startPosition = selectedRange[0]\n    const endPosition = startPosition + text.getLength()\n\n    if (updatePosition) {\n      this.setSelection(endPosition)\n    }\n    return this.notifyDelegateOfInsertionAtRange([ startPosition, endPosition ])\n  }\n\n  insertBlock(block = new Block()) {\n    const document = new Document([ block ])\n    return this.insertDocument(document)\n  }\n\n  insertDocument(document = new Document()) {\n    const selectedRange = this.getSelectedRange()\n    this.setDocument(this.document.insertDocumentAtRange(document, selectedRange))\n\n    const startPosition = selectedRange[0]\n    const endPosition = startPosition + document.getLength()\n\n    this.setSelection(endPosition)\n    return this.notifyDelegateOfInsertionAtRange([ startPosition, endPosition ])\n  }\n\n  insertString(string, options) {\n    const attributes = this.getCurrentTextAttributes()\n    const text = Text.textForStringWithAttributes(string, attributes)\n    return this.insertText(text, options)\n  }\n\n  insertBlockBreak() {\n    const selectedRange = this.getSelectedRange()\n    this.setDocument(this.document.insertBlockBreakAtRange(selectedRange))\n\n    const startPosition = selectedRange[0]\n    const endPosition = startPosition + 1\n\n    this.setSelection(endPosition)\n    return this.notifyDelegateOfInsertionAtRange([ startPosition, endPosition ])\n  }\n\n  insertLineBreak() {\n    const insertion = new LineBreakInsertion(this)\n\n    if (insertion.shouldDecreaseListLevel()) {\n      this.decreaseListLevel()\n      return this.setSelection(insertion.startPosition)\n    } else if (insertion.shouldPrependListItem()) {\n      const document = new Document([ insertion.block.copyWithoutText() ])\n      return this.insertDocument(document)\n    } else if (insertion.shouldInsertBlockBreak()) {\n      return this.insertBlockBreak()\n    } else if (insertion.shouldRemoveLastBlockAttribute()) {\n      return this.removeLastBlockAttribute()\n    } else if (insertion.shouldBreakFormattedBlock()) {\n      return this.breakFormattedBlock(insertion)\n    } else {\n      return this.insertString(\"\\n\")\n    }\n  }\n\n  insertHTML(html) {\n    const document = HTMLParser.parse(html).getDocument()\n    const selectedRange = this.getSelectedRange()\n\n    this.setDocument(this.document.mergeDocumentAtRange(document, selectedRange))\n\n    const startPosition = selectedRange[0]\n    const endPosition = startPosition + document.getLength() - 1\n\n    this.setSelection(endPosition)\n    return this.notifyDelegateOfInsertionAtRange([ startPosition, endPosition ])\n  }\n\n  replaceHTML(html) {\n    const document = HTMLParser.parse(html).getDocument().copyUsingObjectsFromDocument(this.document)\n    const locationRange = this.getLocationRange({ strict: false })\n    const selectedRange = this.document.rangeFromLocationRange(locationRange)\n    this.setDocument(document)\n    return this.setSelection(selectedRange)\n  }\n\n  insertFile(file) {\n    return this.insertFiles([ file ])\n  }\n\n  insertFiles(files) {\n    const attachments = []\n\n    Array.from(files).forEach((file) => {\n      if (this.delegate?.compositionShouldAcceptFile(file)) {\n        const attachment = Attachment.attachmentForFile(file)\n        attachments.push(attachment)\n      }\n    })\n\n    return this.insertAttachments(attachments)\n  }\n\n  insertAttachment(attachment) {\n    return this.insertAttachments([ attachment ])\n  }\n\n  insertAttachments(attachments) {\n    let text = new Text()\n\n    Array.from(attachments).forEach((attachment) => {\n      const type = attachment.getType()\n      const presentation = config.attachments[type]?.presentation\n\n      const attributes = this.getCurrentTextAttributes()\n      if (presentation) {\n        attributes.presentation = presentation\n      }\n\n      const attachmentText = Text.textForAttachmentWithAttributes(attachment, attributes)\n      text = text.appendText(attachmentText)\n    })\n\n    return this.insertText(text)\n  }\n\n  shouldManageDeletingInDirection(direction) {\n    const locationRange = this.getLocationRange()\n    if (rangeIsCollapsed(locationRange)) {\n      if (direction === \"backward\" && locationRange[0].offset === 0) {\n        return true\n      }\n      if (this.shouldManageMovingCursorInDirection(direction)) {\n        return true\n      }\n    } else {\n      if (locationRange[0].index !== locationRange[1].index) {\n        return true\n      }\n    }\n    return false\n  }\n\n  deleteInDirection(direction, { length } = {}) {\n    let attachment, deletingIntoPreviousBlock, selectionSpansBlocks\n    const locationRange = this.getLocationRange()\n    let range = this.getSelectedRange()\n    const selectionIsCollapsed = rangeIsCollapsed(range)\n\n    if (selectionIsCollapsed) {\n      deletingIntoPreviousBlock = direction === \"backward\" && locationRange[0].offset === 0\n    } else {\n      selectionSpansBlocks = locationRange[0].index !== locationRange[1].index\n    }\n\n    if (deletingIntoPreviousBlock) {\n      if (this.canDecreaseBlockAttributeLevel()) {\n        const block = this.getBlock()\n\n        if (block.isListItem()) {\n          this.decreaseListLevel()\n        } else {\n          this.decreaseBlockAttributeLevel()\n        }\n\n        this.setSelection(range[0])\n        if (block.isEmpty()) {\n          return false\n        }\n      }\n    }\n\n    if (selectionIsCollapsed) {\n      range = this.getExpandedRangeInDirection(direction, { length })\n      if (direction === \"backward\") {\n        attachment = this.getAttachmentAtRange(range)\n      }\n    }\n\n    if (attachment) {\n      this.editAttachment(attachment)\n      return false\n    } else {\n      this.setDocument(this.document.removeTextAtRange(range))\n      this.setSelection(range[0])\n      if (deletingIntoPreviousBlock || selectionSpansBlocks) {\n        return false\n      }\n    }\n  }\n\n  moveTextFromRange(range) {\n    const [ position ] = Array.from(this.getSelectedRange())\n    this.setDocument(this.document.moveTextFromRangeToPosition(range, position))\n    return this.setSelection(position)\n  }\n\n  removeAttachment(attachment) {\n    const range = this.document.getRangeOfAttachment(attachment)\n    if (range) {\n      this.stopEditingAttachment()\n      this.setDocument(this.document.removeTextAtRange(range))\n      return this.setSelection(range[0])\n    }\n  }\n\n  removeLastBlockAttribute() {\n    const [ startPosition, endPosition ] = Array.from(this.getSelectedRange())\n    const block = this.document.getBlockAtPosition(endPosition)\n    this.removeCurrentAttribute(block.getLastAttribute())\n    return this.setSelection(startPosition)\n  }\n\n  insertPlaceholder() {\n    this.placeholderPosition = this.getPosition()\n    return this.insertString(PLACEHOLDER)\n  }\n\n  selectPlaceholder() {\n    if (this.placeholderPosition != null) {\n      this.setSelectedRange([ this.placeholderPosition, this.placeholderPosition + PLACEHOLDER.length ])\n      return this.getSelectedRange()\n    }\n  }\n\n  forgetPlaceholder() {\n    this.placeholderPosition = null\n  }\n\n  // Current attributes\n\n  hasCurrentAttribute(attributeName) {\n    const value = this.currentAttributes[attributeName]\n    return value != null && value !== false\n  }\n\n  toggleCurrentAttribute(attributeName) {\n    const value = !this.currentAttributes[attributeName]\n    if (value) {\n      return this.setCurrentAttribute(attributeName, value)\n    } else {\n      return this.removeCurrentAttribute(attributeName)\n    }\n  }\n\n  canSetCurrentAttribute(attributeName) {\n    if (getBlockConfig(attributeName)) {\n      return this.canSetCurrentBlockAttribute(attributeName)\n    } else {\n      return this.canSetCurrentTextAttribute(attributeName)\n    }\n  }\n\n  canSetCurrentTextAttribute(attributeName) {\n    const document = this.getSelectedDocument()\n    if (!document) return\n    for (const attachment of Array.from(document.getAttachments())) {\n      if (!attachment.hasContent()) {\n        return false\n      }\n    }\n    return true\n  }\n\n  canSetCurrentBlockAttribute(attributeName) {\n    const block = this.getBlock()\n    if (!block) return\n    return !block.isTerminalBlock()\n  }\n\n  setCurrentAttribute(attributeName, value) {\n    if (getBlockConfig(attributeName)) {\n      return this.setBlockAttribute(attributeName, value)\n    } else {\n      this.setTextAttribute(attributeName, value)\n      this.currentAttributes[attributeName] = value\n      return this.notifyDelegateOfCurrentAttributesChange()\n    }\n  }\n\n  setHTMLAtributeAtPosition(position, attributeName, value) {\n    const block = this.document.getBlockAtPosition(position)\n    const allowedHTMLAttributes = getBlockConfig(block.getLastAttribute())?.htmlAttributes\n\n    if (block && allowedHTMLAttributes?.includes(attributeName)) {\n      const newDocument = this.document.setHTMLAttributeAtPosition(position, attributeName, value)\n      this.setDocument(newDocument)\n    }\n  }\n\n  setTextAttribute(attributeName, value) {\n    const selectedRange = this.getSelectedRange()\n    if (!selectedRange) return\n\n    const [ startPosition, endPosition ] = Array.from(selectedRange)\n    if (startPosition === endPosition) {\n      if (attributeName === \"href\") {\n        const text = Text.textForStringWithAttributes(value, { href: value })\n        return this.insertText(text)\n      }\n    } else {\n      return this.setDocument(this.document.addAttributeAtRange(attributeName, value, selectedRange))\n    }\n  }\n\n  setBlockAttribute(attributeName, value) {\n    const selectedRange = this.getSelectedRange()\n    if (this.canSetCurrentAttribute(attributeName)) {\n      this.setDocument(this.document.applyBlockAttributeAtRange(attributeName, value, selectedRange))\n      return this.setSelection(selectedRange)\n    }\n  }\n\n  removeCurrentAttribute(attributeName) {\n    if (getBlockConfig(attributeName)) {\n      this.removeBlockAttribute(attributeName)\n      return this.updateCurrentAttributes()\n    } else {\n      this.removeTextAttribute(attributeName)\n      delete this.currentAttributes[attributeName]\n      return this.notifyDelegateOfCurrentAttributesChange()\n    }\n  }\n\n  removeTextAttribute(attributeName) {\n    const selectedRange = this.getSelectedRange()\n    if (!selectedRange) return\n    return this.setDocument(this.document.removeAttributeAtRange(attributeName, selectedRange))\n  }\n\n  removeBlockAttribute(attributeName) {\n    const selectedRange = this.getSelectedRange()\n    if (!selectedRange) return\n    return this.setDocument(this.document.removeAttributeAtRange(attributeName, selectedRange))\n  }\n\n  canDecreaseNestingLevel() {\n    return this.getBlock()?.getNestingLevel() > 0\n  }\n\n  canIncreaseNestingLevel() {\n    const block = this.getBlock()\n    if (!block) return\n    if (getBlockConfig(block.getLastNestableAttribute())?.listAttribute) {\n      const previousBlock = this.getPreviousBlock()\n      if (previousBlock) {\n        return arrayStartsWith(previousBlock.getListItemAttributes(), block.getListItemAttributes())\n      }\n    } else {\n      return block.getNestingLevel() > 0\n    }\n  }\n\n  decreaseNestingLevel() {\n    const block = this.getBlock()\n    if (!block) return\n    return this.setDocument(this.document.replaceBlock(block, block.decreaseNestingLevel()))\n  }\n\n  increaseNestingLevel() {\n    const block = this.getBlock()\n    if (!block) return\n    return this.setDocument(this.document.replaceBlock(block, block.increaseNestingLevel()))\n  }\n\n  canDecreaseBlockAttributeLevel() {\n    return this.getBlock()?.getAttributeLevel() > 0\n  }\n\n  decreaseBlockAttributeLevel() {\n    const attribute = this.getBlock()?.getLastAttribute()\n    if (attribute) {\n      return this.removeCurrentAttribute(attribute)\n    }\n  }\n\n  decreaseListLevel() {\n    let [ startPosition ] = Array.from(this.getSelectedRange())\n    const { index } = this.document.locationFromPosition(startPosition)\n    let endIndex = index\n    const attributeLevel = this.getBlock().getAttributeLevel()\n\n    let block = this.document.getBlockAtIndex(endIndex + 1)\n    while (block) {\n      if (!block.isListItem() || block.getAttributeLevel() <= attributeLevel) {\n        break\n      }\n      endIndex++\n      block = this.document.getBlockAtIndex(endIndex + 1)\n    }\n\n    startPosition = this.document.positionFromLocation({ index, offset: 0 })\n    const endPosition = this.document.positionFromLocation({ index: endIndex, offset: 0 })\n    return this.setDocument(this.document.removeLastListAttributeAtRange([ startPosition, endPosition ]))\n  }\n\n  updateCurrentAttributes() {\n    const selectedRange = this.getSelectedRange({ ignoreLock: true })\n    if (selectedRange) {\n      const currentAttributes = this.document.getCommonAttributesAtRange(selectedRange)\n\n      Array.from(getAllAttributeNames()).forEach((attributeName) => {\n        if (!currentAttributes[attributeName]) {\n          if (!this.canSetCurrentAttribute(attributeName)) {\n            currentAttributes[attributeName] = false\n          }\n        }\n      })\n\n      if (!objectsAreEqual(currentAttributes, this.currentAttributes)) {\n        this.currentAttributes = currentAttributes\n        return this.notifyDelegateOfCurrentAttributesChange()\n      }\n    }\n  }\n\n  getCurrentAttributes() {\n    return extend.call({}, this.currentAttributes)\n  }\n\n  getCurrentTextAttributes() {\n    const attributes = {}\n    for (const key in this.currentAttributes) {\n      const value = this.currentAttributes[key]\n      if (value !== false) {\n        if (getTextConfig(key)) {\n          attributes[key] = value\n        }\n      }\n    }\n    return attributes\n  }\n\n  // Selection freezing\n\n  freezeSelection() {\n    return this.setCurrentAttribute(\"frozen\", true)\n  }\n\n  thawSelection() {\n    return this.removeCurrentAttribute(\"frozen\")\n  }\n\n  hasFrozenSelection() {\n    return this.hasCurrentAttribute(\"frozen\")\n  }\n\n  setSelection(selectedRange) {\n    const locationRange = this.document.locationRangeFromRange(selectedRange)\n    return this.delegate?.compositionDidRequestChangingSelectionToLocationRange(locationRange)\n  }\n\n  getSelectedRange() {\n    const locationRange = this.getLocationRange()\n    if (locationRange) {\n      return this.document.rangeFromLocationRange(locationRange)\n    }\n  }\n\n  setSelectedRange(selectedRange) {\n    const locationRange = this.document.locationRangeFromRange(selectedRange)\n    return this.getSelectionManager().setLocationRange(locationRange)\n  }\n\n  getPosition() {\n    const locationRange = this.getLocationRange()\n    if (locationRange) {\n      return this.document.positionFromLocation(locationRange[0])\n    }\n  }\n\n  getLocationRange(options) {\n    if (this.targetLocationRange) {\n      return this.targetLocationRange\n    } else {\n      return this.getSelectionManager().getLocationRange(options) || normalizeRange({ index: 0, offset: 0 })\n    }\n  }\n\n  withTargetLocationRange(locationRange, fn) {\n    let result\n    this.targetLocationRange = locationRange\n    try {\n      result = fn()\n    } finally {\n      this.targetLocationRange = null\n    }\n    return result\n  }\n\n  withTargetRange(range, fn) {\n    const locationRange = this.document.locationRangeFromRange(range)\n    return this.withTargetLocationRange(locationRange, fn)\n  }\n\n  withTargetDOMRange(domRange, fn) {\n    const locationRange = this.createLocationRangeFromDOMRange(domRange, { strict: false })\n    return this.withTargetLocationRange(locationRange, fn)\n  }\n\n  getExpandedRangeInDirection(direction, { length } = {}) {\n    let [ startPosition, endPosition ] = Array.from(this.getSelectedRange())\n    if (direction === \"backward\") {\n      if (length) {\n        startPosition -= length\n      } else {\n        startPosition = this.translateUTF16PositionFromOffset(startPosition, -1)\n      }\n    } else {\n      if (length) {\n        endPosition += length\n      } else {\n        endPosition = this.translateUTF16PositionFromOffset(endPosition, 1)\n      }\n    }\n    return normalizeRange([ startPosition, endPosition ])\n  }\n\n  shouldManageMovingCursorInDirection(direction) {\n    if (this.editingAttachment) {\n      return true\n    }\n    const range = this.getExpandedRangeInDirection(direction)\n    return this.getAttachmentAtRange(range) != null\n  }\n\n  moveCursorInDirection(direction) {\n    let canEditAttachment, range\n    if (this.editingAttachment) {\n      range = this.document.getRangeOfAttachment(this.editingAttachment)\n    } else {\n      const selectedRange = this.getSelectedRange()\n      range = this.getExpandedRangeInDirection(direction)\n      canEditAttachment = !rangesAreEqual(selectedRange, range)\n    }\n\n    if (direction === \"backward\") {\n      this.setSelectedRange(range[0])\n    } else {\n      this.setSelectedRange(range[1])\n    }\n\n    if (canEditAttachment) {\n      const attachment = this.getAttachmentAtRange(range)\n      if (attachment) {\n        return this.editAttachment(attachment)\n      }\n    }\n  }\n\n  expandSelectionInDirection(direction, { length } = {}) {\n    const range = this.getExpandedRangeInDirection(direction, { length })\n    return this.setSelectedRange(range)\n  }\n\n  expandSelectionForEditing() {\n    if (this.hasCurrentAttribute(\"href\")) {\n      return this.expandSelectionAroundCommonAttribute(\"href\")\n    }\n  }\n\n  expandSelectionAroundCommonAttribute(attributeName) {\n    const position = this.getPosition()\n    const range = this.document.getRangeOfCommonAttributeAtPosition(attributeName, position)\n    return this.setSelectedRange(range)\n  }\n\n  selectionContainsAttachments() {\n    return this.getSelectedAttachments()?.length > 0\n  }\n\n  selectionIsInCursorTarget() {\n    return this.editingAttachment || this.positionIsCursorTarget(this.getPosition())\n  }\n\n  positionIsCursorTarget(position) {\n    const location = this.document.locationFromPosition(position)\n    if (location) {\n      return this.locationIsCursorTarget(location)\n    }\n  }\n\n  positionIsBlockBreak(position) {\n    return this.document.getPieceAtPosition(position)?.isBlockBreak()\n  }\n\n  getSelectedDocument() {\n    const selectedRange = this.getSelectedRange()\n    if (selectedRange) {\n      return this.document.getDocumentAtRange(selectedRange)\n    }\n  }\n\n  getSelectedAttachments() {\n    return this.getSelectedDocument()?.getAttachments()\n  }\n\n  // Attachments\n\n  getAttachments() {\n    return this.attachments.slice(0)\n  }\n\n  refreshAttachments() {\n    const attachments = this.document.getAttachments()\n    const { added, removed } = summarizeArrayChange(this.attachments, attachments)\n    this.attachments = attachments\n\n    Array.from(removed).forEach((attachment) => {\n      attachment.delegate = null\n      this.delegate?.compositionDidRemoveAttachment?.(attachment)\n    })\n\n    return (() => {\n      const result = []\n\n      Array.from(added).forEach((attachment) => {\n        attachment.delegate = this\n        result.push(this.delegate?.compositionDidAddAttachment?.(attachment))\n      })\n\n      return result\n    })()\n  }\n\n  // Attachment delegate\n\n  attachmentDidChangeAttributes(attachment) {\n    this.revision++\n    return this.delegate?.compositionDidEditAttachment?.(attachment)\n  }\n\n  attachmentDidChangePreviewURL(attachment) {\n    this.revision++\n    return this.delegate?.compositionDidChangeAttachmentPreviewURL?.(attachment)\n  }\n\n  // Attachment editing\n\n  editAttachment(attachment, options) {\n    if (attachment === this.editingAttachment) return\n    this.stopEditingAttachment()\n    this.editingAttachment = attachment\n    return this.delegate?.compositionDidStartEditingAttachment?.(this.editingAttachment, options)\n  }\n\n  stopEditingAttachment() {\n    if (!this.editingAttachment) return\n    this.delegate?.compositionDidStopEditingAttachment?.(this.editingAttachment)\n    this.editingAttachment = null\n  }\n\n  updateAttributesForAttachment(attributes, attachment) {\n    return this.setDocument(this.document.updateAttributesForAttachment(attributes, attachment))\n  }\n\n  removeAttributeForAttachment(attribute, attachment) {\n    return this.setDocument(this.document.removeAttributeForAttachment(attribute, attachment))\n  }\n\n  // Private\n\n  breakFormattedBlock(insertion) {\n    let { document } = insertion\n    const { block } = insertion\n    let position = insertion.startPosition\n    let range = [ position - 1, position ]\n\n    if (block.getBlockBreakPosition() === insertion.startLocation.offset) {\n      if (block.breaksOnReturn() && insertion.nextCharacter === \"\\n\") {\n        position += 1\n      } else {\n        document = document.removeTextAtRange(range)\n      }\n      range = [ position, position ]\n    } else if (insertion.nextCharacter === \"\\n\") {\n      if (insertion.previousCharacter === \"\\n\") {\n        range = [ position - 1, position + 1 ]\n      } else {\n        range = [ position, position + 1 ]\n        position += 1\n      }\n    } else if (insertion.startLocation.offset - 1 !== 0) {\n      position += 1\n    }\n\n    const newDocument = new Document([ block.removeLastAttribute().copyWithoutText() ])\n    this.setDocument(document.insertDocumentAtRange(newDocument, range))\n    return this.setSelection(position)\n  }\n\n  getPreviousBlock() {\n    const locationRange = this.getLocationRange()\n    if (locationRange) {\n      const { index } = locationRange[0]\n      if (index > 0) {\n        return this.document.getBlockAtIndex(index - 1)\n      }\n    }\n  }\n\n  getBlock() {\n    const locationRange = this.getLocationRange()\n    if (locationRange) {\n      return this.document.getBlockAtIndex(locationRange[0].index)\n    }\n  }\n\n  getAttachmentAtRange(range) {\n    const document = this.document.getDocumentAtRange(range)\n    if (document.toString() === `${OBJECT_REPLACEMENT_CHARACTER}\\n`) {\n      return document.getAttachments()[0]\n    }\n  }\n\n  notifyDelegateOfCurrentAttributesChange() {\n    return this.delegate?.compositionDidChangeCurrentAttributes?.(this.currentAttributes)\n  }\n\n  notifyDelegateOfInsertionAtRange(range) {\n    return this.delegate?.compositionDidPerformInsertionAtRange?.(range)\n  }\n\n  translateUTF16PositionFromOffset(position, offset) {\n    const utf16string = this.document.toUTF16String()\n    const utf16position = utf16string.offsetFromUCS2Offset(position)\n    return utf16string.offsetToUCS2Offset(utf16position + offset)\n  }\n}\n\nComposition.proxyMethod(\"getSelectionManager().getPointRange\")\nComposition.proxyMethod(\"getSelectionManager().setLocationRangeFromPointRange\")\nComposition.proxyMethod(\"getSelectionManager().createLocationRangeFromDOMRange\")\nComposition.proxyMethod(\"getSelectionManager().locationIsCursorTarget\")\nComposition.proxyMethod(\"getSelectionManager().selectionIsExpanded\")\nComposition.proxyMethod(\"delegate?.getSelectionManager\")\n", "import BasicObject from \"trix/core/basic_object\"\n\nexport default class UndoManager extends BasicObject {\n  constructor(composition) {\n    super(...arguments)\n    this.composition = composition\n    this.undoEntries = []\n    this.redoEntries = []\n  }\n\n  recordUndoEntry(description, { context, consolidatable } = {}) {\n    const previousEntry = this.undoEntries.slice(-1)[0]\n\n    if (!consolidatable || !entryHasDescriptionAndContext(previousEntry, description, context)) {\n      const undoEntry = this.createEntry({ description, context })\n      this.undoEntries.push(undoEntry)\n      this.redoEntries = []\n    }\n  }\n\n  undo() {\n    const undoEntry = this.undoEntries.pop()\n    if (undoEntry) {\n      const redoEntry = this.createEntry(undoEntry)\n      this.redoEntries.push(redoEntry)\n      return this.composition.loadSnapshot(undoEntry.snapshot)\n    }\n  }\n\n  redo() {\n    const redoEntry = this.redoEntries.pop()\n    if (redoEntry) {\n      const undoEntry = this.createEntry(redoEntry)\n      this.undoEntries.push(undoEntry)\n      return this.composition.loadSnapshot(redoEntry.snapshot)\n    }\n  }\n\n  canUndo() {\n    return this.undoEntries.length > 0\n  }\n\n  canRedo() {\n    return this.redoEntries.length > 0\n  }\n\n  // Private\n\n  createEntry({ description, context } = {}) {\n    return {\n      description: description?.toString(),\n      context: JSON.stringify(context),\n      snapshot: this.composition.getSnapshot(),\n    }\n  }\n}\n\nconst entryHasDescriptionAndContext = (entry, description, context) =>\n  entry?.description === description?.toString() && entry?.context === JSON.stringify(context)\n", "const BLOCK_ATTRIBUTE_NAME = \"attachmentGallery\"\nconst TEXT_ATTRIBUTE_NAME = \"presentation\"\nconst TEXT_ATTRIBUTE_VALUE = \"gallery\"\n\nexport default class Filter {\n  constructor(snapshot) {\n    this.document = snapshot.document\n    this.selectedRange = snapshot.selectedRange\n  }\n\n  perform() {\n    this.removeBlockAttribute()\n    return this.applyBlockAttribute()\n  }\n\n  getSnapshot() {\n    return { document: this.document, selectedRange: this.selectedRange }\n  }\n\n  // Private\n\n  removeBlockAttribute() {\n    return this.findRangesOfBlocks().map((range) => this.document = this.document.removeAttributeAtRange(BLOCK_ATTRIBUTE_NAME, range))\n  }\n\n  applyBlockAttribute() {\n    let offset = 0\n\n    this.findRangesOfPieces().forEach((range) => {\n      if (range[1] - range[0] > 1) {\n        range[0] += offset\n        range[1] += offset\n\n        if (this.document.getCharacterAtPosition(range[1]) !== \"\\n\") {\n          this.document = this.document.insertBlockBreakAtRange(range[1])\n          if (range[1] < this.selectedRange[1]) {\n            this.moveSelectedRangeForward()\n          }\n          range[1]++\n          offset++\n        }\n\n        if (range[0] !== 0) {\n          if (this.document.getCharacterAtPosition(range[0] - 1) !== \"\\n\") {\n            this.document = this.document.insertBlockBreakAtRange(range[0])\n            if (range[0] < this.selectedRange[0]) {\n              this.moveSelectedRangeForward()\n            }\n            range[0]++\n            offset++\n          }\n        }\n\n        this.document = this.document.applyBlockAttributeAtRange(BLOCK_ATTRIBUTE_NAME, true, range)\n      }\n    })\n  }\n\n  findRangesOfBlocks() {\n    return this.document.findRangesForBlockAttribute(BLOCK_ATTRIBUTE_NAME)\n  }\n\n  findRangesOfPieces() {\n    return this.document.findRangesForTextAttribute(TEXT_ATTRIBUTE_NAME, { withValue: TEXT_ATTRIBUTE_VALUE })\n  }\n\n  moveSelectedRangeForward() {\n    this.selectedRange[0] += 1\n    this.selectedRange[1] += 1\n  }\n}\n", "import Filter from \"./filter\"\n\nexport const attachmentGalleryFilter = function(snapshot) {\n  const filter = new Filter(snapshot)\n  filter.perform()\n  return filter.getSnapshot()\n}\n\n", "import Document from \"trix/models/document\"\nimport HTMLParser from \"trix/models/html_parser\"\n\nimport UndoManager from \"trix/models/undo_manager\"\nimport { attachmentGalleryFilter } from \"trix/filters/attachment_gallery_filter\"\nconst DEFAULT_FILTERS = [ attachmentGalleryFilter ]\n\nexport default class Editor {\n  constructor(composition, selectionManager, element) {\n    this.insertFiles = this.insertFiles.bind(this)\n    this.composition = composition\n    this.selectionManager = selectionManager\n    this.element = element\n    this.undoManager = new UndoManager(this.composition)\n    this.filters = DEFAULT_FILTERS.slice(0)\n  }\n\n  loadDocument(document) {\n    return this.loadSnapshot({ document, selectedRange: [ 0, 0 ] })\n  }\n\n  loadHTML(html = \"\") {\n    const document = HTMLParser.parse(html, { referenceElement: this.element }).getDocument()\n    return this.loadDocument(document)\n  }\n\n  loadJSON({ document, selectedRange }) {\n    document = Document.fromJSON(document)\n    return this.loadSnapshot({ document, selectedRange })\n  }\n\n  loadSnapshot(snapshot) {\n    this.undoManager = new UndoManager(this.composition)\n    return this.composition.loadSnapshot(snapshot)\n  }\n\n  getDocument() {\n    return this.composition.document\n  }\n\n  getSelectedDocument() {\n    return this.composition.getSelectedDocument()\n  }\n\n  getSnapshot() {\n    return this.composition.getSnapshot()\n  }\n\n  toJSON() {\n    return this.getSnapshot()\n  }\n\n  // Document manipulation\n\n  deleteInDirection(direction) {\n    return this.composition.deleteInDirection(direction)\n  }\n\n  insertAttachment(attachment) {\n    return this.composition.insertAttachment(attachment)\n  }\n\n  insertAttachments(attachments) {\n    return this.composition.insertAttachments(attachments)\n  }\n\n  insertDocument(document) {\n    return this.composition.insertDocument(document)\n  }\n\n  insertFile(file) {\n    return this.composition.insertFile(file)\n  }\n\n  insertFiles(files) {\n    return this.composition.insertFiles(files)\n  }\n\n  insertHTML(html) {\n    return this.composition.insertHTML(html)\n  }\n\n  insertString(string) {\n    return this.composition.insertString(string)\n  }\n\n  insertText(text) {\n    return this.composition.insertText(text)\n  }\n\n  insertLineBreak() {\n    return this.composition.insertLineBreak()\n  }\n\n  // Selection\n\n  getSelectedRange() {\n    return this.composition.getSelectedRange()\n  }\n\n  getPosition() {\n    return this.composition.getPosition()\n  }\n\n  getClientRectAtPosition(position) {\n    const locationRange = this.getDocument().locationRangeFromRange([ position, position + 1 ])\n    return this.selectionManager.getClientRectAtLocationRange(locationRange)\n  }\n\n  expandSelectionInDirection(direction) {\n    return this.composition.expandSelectionInDirection(direction)\n  }\n\n  moveCursorInDirection(direction) {\n    return this.composition.moveCursorInDirection(direction)\n  }\n\n  setSelectedRange(selectedRange) {\n    return this.composition.setSelectedRange(selectedRange)\n  }\n\n  // Attributes\n\n  activateAttribute(name, value = true) {\n    return this.composition.setCurrentAttribute(name, value)\n  }\n\n  attributeIsActive(name) {\n    return this.composition.hasCurrentAttribute(name)\n  }\n\n  canActivateAttribute(name) {\n    return this.composition.canSetCurrentAttribute(name)\n  }\n\n  deactivateAttribute(name) {\n    return this.composition.removeCurrentAttribute(name)\n  }\n\n  // HTML attributes\n  setHTMLAtributeAtPosition(position, name, value) {\n    this.composition.setHTMLAtributeAtPosition(position, name, value)\n  }\n\n  // Nesting level\n\n  canDecreaseNestingLevel() {\n    return this.composition.canDecreaseNestingLevel()\n  }\n\n  canIncreaseNestingLevel() {\n    return this.composition.canIncreaseNestingLevel()\n  }\n\n  decreaseNestingLevel() {\n    if (this.canDecreaseNestingLevel()) {\n      return this.composition.decreaseNestingLevel()\n    }\n  }\n\n  increaseNestingLevel() {\n    if (this.canIncreaseNestingLevel()) {\n      return this.composition.increaseNestingLevel()\n    }\n  }\n\n  // Undo/redo\n\n  canRedo() {\n    return this.undoManager.canRedo()\n  }\n\n  canUndo() {\n    return this.undoManager.canUndo()\n  }\n\n  recordUndoEntry(description, { context, consolidatable } = {}) {\n    return this.undoManager.recordUndoEntry(description, { context, consolidatable })\n  }\n\n  redo() {\n    if (this.canRedo()) {\n      return this.undoManager.redo()\n    }\n  }\n\n  undo() {\n    if (this.canUndo()) {\n      return this.undoManager.undo()\n    }\n  }\n}\n", "/* eslint-disable\n    no-var,\n    prefer-const,\n*/\nimport {\n  elementContainsNode,\n  findChildIndexOfNode,\n  nodeIsAttachmentElement,\n  nodeIsBlockContainer,\n  nodeIsBlockStart,\n  nodeIsBlockStartComment,\n  nodeIsCursorTarget,\n  nodeIsEmptyTextNode,\n  nodeIsTextNode,\n  tagName,\n  walkTree,\n} from \"trix/core/helpers\"\n\nexport default class LocationMapper {\n  constructor(element) {\n    this.element = element\n  }\n\n  findLocationFromContainerAndOffset(container, offset, { strict } = { strict: true }) {\n    let childIndex = 0\n    let foundBlock = false\n    const location = { index: 0, offset: 0 }\n    const attachmentElement = this.findAttachmentElementParentForNode(container)\n\n    if (attachmentElement) {\n      container = attachmentElement.parentNode\n      offset = findChildIndexOfNode(attachmentElement)\n    }\n\n    const walker = walkTree(this.element, { usingFilter: rejectAttachmentContents })\n\n    while (walker.nextNode()) {\n      const node = walker.currentNode\n\n      if (node === container && nodeIsTextNode(container)) {\n        if (!nodeIsCursorTarget(node)) {\n          location.offset += offset\n        }\n        break\n      } else {\n        if (node.parentNode === container) {\n          if (childIndex++ === offset) {\n            break\n          }\n        } else if (!elementContainsNode(container, node)) {\n          if (childIndex > 0) {\n            break\n          }\n        }\n\n        if (nodeIsBlockStart(node, { strict })) {\n          if (foundBlock) {\n            location.index++\n          }\n          location.offset = 0\n          foundBlock = true\n        } else {\n          location.offset += nodeLength(node)\n        }\n      }\n    }\n\n    return location\n  }\n\n  findContainerAndOffsetFromLocation(location) {\n    let container, offset\n    if (location.index === 0 && location.offset === 0) {\n      container = this.element\n      offset = 0\n\n      while (container.firstChild) {\n        container = container.firstChild\n        if (nodeIsBlockContainer(container)) {\n          offset = 1\n          break\n        }\n      }\n\n      return [ container, offset ]\n    }\n\n    let [ node, nodeOffset ] = this.findNodeAndOffsetFromLocation(location)\n    if (!node) return\n\n    if (nodeIsTextNode(node)) {\n      if (nodeLength(node) === 0) {\n        container = node.parentNode.parentNode\n        offset = findChildIndexOfNode(node.parentNode)\n        if (nodeIsCursorTarget(node, { name: \"right\" })) {\n          offset++\n        }\n      } else {\n        container = node\n        offset = location.offset - nodeOffset\n      }\n    } else {\n      container = node.parentNode\n\n      if (!nodeIsBlockStart(node.previousSibling)) {\n        if (!nodeIsBlockContainer(container)) {\n          while (node === container.lastChild) {\n            node = container\n            container = container.parentNode\n            if (nodeIsBlockContainer(container)) {\n              break\n            }\n          }\n        }\n      }\n\n      offset = findChildIndexOfNode(node)\n      if (location.offset !== 0) {\n        offset++\n      }\n    }\n\n    return [ container, offset ]\n  }\n\n  findNodeAndOffsetFromLocation(location) {\n    let node, nodeOffset\n    let offset = 0\n\n    for (const currentNode of this.getSignificantNodesForIndex(location.index)) {\n      const length = nodeLength(currentNode)\n\n      if (location.offset <= offset + length) {\n        if (nodeIsTextNode(currentNode)) {\n          node = currentNode\n          nodeOffset = offset\n          if (location.offset === nodeOffset && nodeIsCursorTarget(node)) {\n            break\n          }\n        } else if (!node) {\n          node = currentNode\n          nodeOffset = offset\n        }\n      }\n\n      offset += length\n      if (offset > location.offset) {\n        break\n      }\n    }\n\n    return [ node, nodeOffset ]\n  }\n\n  // Private\n\n  findAttachmentElementParentForNode(node) {\n    while (node && node !== this.element) {\n      if (nodeIsAttachmentElement(node)) {\n        return node\n      }\n      node = node.parentNode\n    }\n  }\n\n  getSignificantNodesForIndex(index) {\n    const nodes = []\n    const walker = walkTree(this.element, { usingFilter: acceptSignificantNodes })\n    let recordingNodes = false\n\n    while (walker.nextNode()) {\n      const node = walker.currentNode\n      if (nodeIsBlockStartComment(node)) {\n        var blockIndex\n        if (blockIndex != null) {\n          blockIndex++\n        } else {\n          blockIndex = 0\n        }\n\n        if (blockIndex === index) {\n          recordingNodes = true\n        } else if (recordingNodes) {\n          break\n        }\n      } else if (recordingNodes) {\n        nodes.push(node)\n      }\n    }\n\n    return nodes\n  }\n}\n\nconst nodeLength = function(node) {\n  if (node.nodeType === Node.TEXT_NODE) {\n    if (nodeIsCursorTarget(node)) {\n      return 0\n    } else {\n      const string = node.textContent\n      return string.length\n    }\n  } else if (tagName(node) === \"br\" || nodeIsAttachmentElement(node)) {\n    return 1\n  } else {\n    return 0\n  }\n}\n\nconst acceptSignificantNodes = function(node) {\n  if (rejectEmptyTextNodes(node) === NodeFilter.FILTER_ACCEPT) {\n    return rejectAttachmentContents(node)\n  } else {\n    return NodeFilter.FILTER_REJECT\n  }\n}\n\nconst rejectEmptyTextNodes = function(node) {\n  if (nodeIsEmptyTextNode(node)) {\n    return NodeFilter.FILTER_REJECT\n  } else {\n    return NodeFilter.FILTER_ACCEPT\n  }\n}\n\nconst rejectAttachmentContents = function(node) {\n  if (nodeIsAttachmentElement(node.parentNode)) {\n    return NodeFilter.FILTER_REJECT\n  } else {\n    return NodeFilter.FILTER_ACCEPT\n  }\n}\n", "/* eslint-disable\n    id-length,\n    no-empty,\n*/\nimport { getDOMRange, setDOMRange } from \"trix/core/helpers\"\n\nexport default class PointMapper {\n  createDOMRangeFromPoint({ x, y }) {\n    let domRange\n    if (document.caretPositionFromPoint) {\n      const { offsetNode, offset } = document.caretPositionFromPoint(x, y)\n      domRange = document.createRange()\n      domRange.setStart(offsetNode, offset)\n      return domRange\n    } else if (document.caretRangeFromPoint) {\n      return document.caretRangeFromPoint(x, y)\n    } else if (document.body.createTextRange) {\n      const originalDOMRange = getDOMRange()\n      try {\n        // IE 11 throws \"Unspecified error\" when using moveToPoint\n        // during a drag-and-drop operation.\n        const textRange = document.body.createTextRange()\n        textRange.moveToPoint(x, y)\n        textRange.select()\n      } catch (error) {}\n      domRange = getDOMRange()\n      setDOMRange(originalDOMRange)\n      return domRange\n    }\n  }\n\n  getClientRectsForDOMRange(domRange) {\n    const array = Array.from(domRange.getClientRects())\n    const start = array[0]\n    const end = array[array.length - 1]\n\n    return [ start, end ]\n  }\n}\n", "/* eslint-disable\n*/\nimport BasicObject from \"trix/core/basic_object\"\n\nimport LocationMapper from \"trix/models/location_mapper\"\nimport PointMapper from \"trix/models/point_mapper\"\n\nimport {\n  elementContainsNode,\n  getDOMRange,\n  getDOMSelection,\n  handleEvent,\n  innerElementIsActive,\n  nodeIsCursorTarget,\n  normalizeRange,\n  rangeIsCollapsed,\n  rangesAreEqual,\n  setDOMRange,\n} from \"trix/core/helpers\"\n\nexport default class SelectionManager extends BasicObject {\n  constructor(element) {\n    super(...arguments)\n    this.didMouseDown = this.didMouseDown.bind(this)\n    this.selectionDidChange = this.selectionDidChange.bind(this)\n    this.element = element\n    this.locationMapper = new LocationMapper(this.element)\n    this.pointMapper = new PointMapper()\n    this.lockCount = 0\n    handleEvent(\"mousedown\", { onElement: this.element, withCallback: this.didMouseDown })\n  }\n\n  getLocationRange(options = {}) {\n    if (options.strict === false) {\n      return this.createLocationRangeFromDOMRange(getDOMRange())\n    } else if (options.ignoreLock) {\n      return this.currentLocationRange\n    } else if (this.lockedLocationRange) {\n      return this.lockedLocationRange\n    } else {\n      return this.currentLocationRange\n    }\n  }\n\n  setLocationRange(locationRange) {\n    if (this.lockedLocationRange) return\n    locationRange = normalizeRange(locationRange)\n\n    const domRange = this.createDOMRangeFromLocationRange(locationRange)\n    if (domRange) {\n      setDOMRange(domRange)\n      this.updateCurrentLocationRange(locationRange)\n    }\n  }\n\n  setLocationRangeFromPointRange(pointRange) {\n    pointRange = normalizeRange(pointRange)\n    const startLocation = this.getLocationAtPoint(pointRange[0])\n    const endLocation = this.getLocationAtPoint(pointRange[1])\n    this.setLocationRange([ startLocation, endLocation ])\n  }\n\n  getClientRectAtLocationRange(locationRange) {\n    const domRange = this.createDOMRangeFromLocationRange(locationRange)\n    if (domRange) {\n      return this.getClientRectsForDOMRange(domRange)[1]\n    }\n  }\n\n  locationIsCursorTarget(location) {\n    const node = Array.from(this.findNodeAndOffsetFromLocation(location))[0]\n    return nodeIsCursorTarget(node)\n  }\n\n  lock() {\n    if (this.lockCount++ === 0) {\n      this.updateCurrentLocationRange()\n      this.lockedLocationRange = this.getLocationRange()\n    }\n  }\n\n  unlock() {\n    if (--this.lockCount === 0) {\n      const { lockedLocationRange } = this\n      this.lockedLocationRange = null\n      if (lockedLocationRange != null) {\n        return this.setLocationRange(lockedLocationRange)\n      }\n    }\n  }\n\n  clearSelection() {\n    return getDOMSelection()?.removeAllRanges()\n  }\n\n  selectionIsCollapsed() {\n    return getDOMRange()?.collapsed === true\n  }\n\n  selectionIsExpanded() {\n    return !this.selectionIsCollapsed()\n  }\n\n  createLocationRangeFromDOMRange(domRange, options) {\n    if (domRange == null || !this.domRangeWithinElement(domRange)) return\n\n    const start = this.findLocationFromContainerAndOffset(domRange.startContainer, domRange.startOffset, options)\n    if (!start) return\n\n    const end = domRange.collapsed\n      ? undefined\n      : this.findLocationFromContainerAndOffset(domRange.endContainer, domRange.endOffset, options)\n\n    return normalizeRange([ start, end ])\n  }\n\n  didMouseDown() {\n    return this.pauseTemporarily()\n  }\n\n  pauseTemporarily() {\n    let resumeHandlers\n    this.paused = true\n\n    const resume = () => {\n      this.paused = false\n      clearTimeout(resumeTimeout)\n\n      Array.from(resumeHandlers).forEach((handler) => {\n        handler.destroy()\n      })\n\n      if (elementContainsNode(document, this.element)) {\n        return this.selectionDidChange()\n      }\n    }\n\n    const resumeTimeout = setTimeout(resume, 200)\n\n    resumeHandlers = [ \"mousemove\", \"keydown\" ].map((eventName) =>\n      handleEvent(eventName, { onElement: document, withCallback: resume })\n    )\n  }\n\n  selectionDidChange() {\n    if (!this.paused && !innerElementIsActive(this.element)) {\n      return this.updateCurrentLocationRange()\n    }\n  }\n\n  updateCurrentLocationRange(locationRange) {\n    if (locationRange != null ? locationRange : locationRange = this.createLocationRangeFromDOMRange(getDOMRange())) {\n      if (!rangesAreEqual(locationRange, this.currentLocationRange)) {\n        this.currentLocationRange = locationRange\n        return this.delegate?.locationRangeDidChange?.(this.currentLocationRange.slice(0))\n      }\n    }\n  }\n\n  createDOMRangeFromLocationRange(locationRange) {\n    const rangeStart = this.findContainerAndOffsetFromLocation(locationRange[0])\n    const rangeEnd = rangeIsCollapsed(locationRange)\n      ? rangeStart\n      : this.findContainerAndOffsetFromLocation(locationRange[1]) || rangeStart\n\n    if (rangeStart != null && rangeEnd != null) {\n      const domRange = document.createRange()\n      domRange.setStart(...Array.from(rangeStart || []))\n      domRange.setEnd(...Array.from(rangeEnd || []))\n      return domRange\n    }\n  }\n\n  getLocationAtPoint(point) {\n    const domRange = this.createDOMRangeFromPoint(point)\n    if (domRange) {\n      return this.createLocationRangeFromDOMRange(domRange)?.[0]\n    }\n  }\n\n  domRangeWithinElement(domRange) {\n    if (domRange.collapsed) {\n      return elementContainsNode(this.element, domRange.startContainer)\n    } else {\n      return (\n        elementContainsNode(this.element, domRange.startContainer) &&\n        elementContainsNode(this.element, domRange.endContainer)\n      )\n    }\n  }\n}\n\nSelectionManager.proxyMethod(\"locationMapper.findLocationFromContainerAndOffset\")\nSelectionManager.proxyMethod(\"locationMapper.findContainerAndOffsetFromLocation\")\nSelectionManager.proxyMethod(\"locationMapper.findNodeAndOffsetFromLocation\")\nSelectionManager.proxyMethod(\"pointMapper.createDOMRangeFromPoint\")\nSelectionManager.proxyMethod(\"pointMapper.getClientRectsForDOMRange\")\n\n", "import { removeNode } from \"trix/core/helpers\"\n\nimport * as config from \"trix/config\"\nimport BasicObject from \"trix/core/basic_object\"\n\nimport { defer, handleEvent, makeElement, tagName, triggerEvent } from \"trix/core/helpers\"\nconst { lang, css, keyNames } = config\n\nconst undoable = function(fn) {\n  return function() {\n    const commands = fn.apply(this, arguments)\n    commands.do()\n    if (!this.undos) {\n      this.undos = []\n    }\n    this.undos.push(commands.undo)\n  }\n}\n\nexport default class AttachmentEditorController extends BasicObject {\n  constructor(attachmentPiece, element, container, options = {}) {\n    super(...arguments)\n    this.didClickToolbar = this.didClickToolbar.bind(this)\n    this.didClickActionButton = this.didClickActionButton.bind(this)\n    this.didKeyDownCaption = this.didKeyDownCaption.bind(this)\n    this.didInputCaption = this.didInputCaption.bind(this)\n    this.didChangeCaption = this.didChangeCaption.bind(this)\n    this.didBlurCaption = this.didBlurCaption.bind(this)\n    this.attachmentPiece = attachmentPiece\n    this.element = element\n    this.container = container\n    this.options = options\n    this.attachment = this.attachmentPiece.attachment\n    if (tagName(this.element) === \"a\") {\n      this.element = this.element.firstChild\n    }\n    this.install()\n  }\n\n  install() {\n    this.makeElementMutable()\n    this.addToolbar()\n    if (this.attachment.isPreviewable()) {\n      this.installCaptionEditor()\n    }\n  }\n\n  uninstall() {\n    let undo = this.undos.pop()\n    this.savePendingCaption()\n    while (undo) {\n      undo()\n      undo = this.undos.pop()\n    }\n    this.delegate?.didUninstallAttachmentEditor(this)\n  }\n\n  // Private\n\n  savePendingCaption() {\n    if (this.pendingCaption != null) {\n      const caption = this.pendingCaption\n      this.pendingCaption = null\n      if (caption) {\n        this.delegate?.attachmentEditorDidRequestUpdatingAttributesForAttachment?.({ caption }, this.attachment)\n      } else {\n        this.delegate?.attachmentEditorDidRequestRemovingAttributeForAttachment?.(\"caption\", this.attachment)\n      }\n    }\n  }\n\n  // Installing and uninstalling\n\n  makeElementMutable = undoable(() => {\n    return {\n      do: () => {\n        this.element.dataset.trixMutable = true\n      },\n      undo: () => delete this.element.dataset.trixMutable,\n    }\n  })\n\n  addToolbar = undoable(() => {\n    // <div class=\"#{css.attachmentMetadataContainer}\" data-trix-mutable=\"true\">\n    //   <div class=\"trix-button-row\">\n    //     <span class=\"trix-button-group trix-button-group--actions\">\n    //       <button type=\"button\" class=\"trix-button trix-button--remove\" title=\"#{lang.remove}\" data-trix-action=\"remove\">#{lang.remove}</button>\n    //     </span>\n    //   </div>\n    // </div>\n    const element = makeElement({\n      tagName: \"div\",\n      className: css.attachmentToolbar,\n      data: { trixMutable: true },\n      childNodes: makeElement({\n        tagName: \"div\",\n        className: \"trix-button-row\",\n        childNodes: makeElement({\n          tagName: \"span\",\n          className: \"trix-button-group trix-button-group--actions\",\n          childNodes: makeElement({\n            tagName: \"button\",\n            className: \"trix-button trix-button--remove\",\n            textContent: lang.remove,\n            attributes: { title: lang.remove },\n            data: { trixAction: \"remove\" },\n          }),\n        }),\n      }),\n    })\n\n    if (this.attachment.isPreviewable()) {\n      // <div class=\"#{css.attachmentMetadataContainer}\">\n      //   <span class=\"#{css.attachmentMetadata}\">\n      //     <span class=\"#{css.attachmentName}\" title=\"#{name}\">#{name}</span>\n      //     <span class=\"#{css.attachmentSize}\">#{size}</span>\n      //   </span>\n      // </div>\n      element.appendChild(\n        makeElement({\n          tagName: \"div\",\n          className: css.attachmentMetadataContainer,\n          childNodes: makeElement({\n            tagName: \"span\",\n            className: css.attachmentMetadata,\n            childNodes: [\n              makeElement({\n                tagName: \"span\",\n                className: css.attachmentName,\n                textContent: this.attachment.getFilename(),\n                attributes: { title: this.attachment.getFilename() },\n              }),\n              makeElement({\n                tagName: \"span\",\n                className: css.attachmentSize,\n                textContent: this.attachment.getFormattedFilesize(),\n              }),\n            ],\n          }),\n        })\n      )\n    }\n\n    handleEvent(\"click\", { onElement: element, withCallback: this.didClickToolbar })\n    handleEvent(\"click\", {\n      onElement: element,\n      matchingSelector: \"[data-trix-action]\",\n      withCallback: this.didClickActionButton,\n    })\n\n    triggerEvent(\"trix-attachment-before-toolbar\", { onElement: this.element, attributes: { toolbar: element, attachment: this.attachment } })\n\n    return {\n      do: () => this.element.appendChild(element),\n      undo: () => removeNode(element),\n    }\n  })\n\n  installCaptionEditor = undoable(() => {\n    const textarea = makeElement({\n      tagName: \"textarea\",\n      className: css.attachmentCaptionEditor,\n      attributes: { placeholder: lang.captionPlaceholder },\n      data: { trixMutable: true },\n    })\n    textarea.value = this.attachmentPiece.getCaption()\n\n    const textareaClone = textarea.cloneNode()\n    textareaClone.classList.add(\"trix-autoresize-clone\")\n    textareaClone.tabIndex = -1\n\n    const autoresize = function() {\n      textareaClone.value = textarea.value\n      textarea.style.height = textareaClone.scrollHeight + \"px\"\n    }\n\n    handleEvent(\"input\", { onElement: textarea, withCallback: autoresize })\n    handleEvent(\"input\", { onElement: textarea, withCallback: this.didInputCaption })\n    handleEvent(\"keydown\", { onElement: textarea, withCallback: this.didKeyDownCaption })\n    handleEvent(\"change\", { onElement: textarea, withCallback: this.didChangeCaption })\n    handleEvent(\"blur\", { onElement: textarea, withCallback: this.didBlurCaption })\n\n    const figcaption = this.element.querySelector(\"figcaption\")\n    const editingFigcaption = figcaption.cloneNode()\n\n    return {\n      do: () => {\n        figcaption.style.display = \"none\"\n        editingFigcaption.appendChild(textarea)\n        editingFigcaption.appendChild(textareaClone)\n        editingFigcaption.classList.add(`${css.attachmentCaption}--editing`)\n        figcaption.parentElement.insertBefore(editingFigcaption, figcaption)\n        autoresize()\n        if (this.options.editCaption) {\n          return defer(() => textarea.focus())\n        }\n      },\n      undo() {\n        removeNode(editingFigcaption)\n        figcaption.style.display = null\n      },\n    }\n  })\n\n  // Event handlers\n\n  didClickToolbar(event) {\n    event.preventDefault()\n    return event.stopPropagation()\n  }\n\n  didClickActionButton(event) {\n    const action = event.target.getAttribute(\"data-trix-action\")\n    switch (action) {\n      case \"remove\":\n        return this.delegate?.attachmentEditorDidRequestRemovalOfAttachment(this.attachment)\n    }\n  }\n\n  didKeyDownCaption(event) {\n    if (keyNames[event.keyCode] === \"return\") {\n      event.preventDefault()\n      this.savePendingCaption()\n      return this.delegate?.attachmentEditorDidRequestDeselectingAttachment?.(this.attachment)\n    }\n  }\n\n  didInputCaption(event) {\n    this.pendingCaption = event.target.value.replace(/\\s/g, \" \").trim()\n  }\n\n  didChangeCaption(event) {\n    return this.savePendingCaption()\n  }\n\n  didBlurCaption(event) {\n    return this.savePendingCaption()\n  }\n}\n", "import BasicObject from \"trix/core/basic_object\"\nimport DocumentView from \"trix/views/document_view\"\nimport AttachmentEditorController from \"trix/controllers/attachment_editor_controller\"\n\nimport { defer, findClosestElementFromNode, handleEvent, innerElementIsActive } from \"trix/core/helpers\"\nimport { attachmentSelector } from \"trix/config/attachments\"\n\nexport default class CompositionController extends BasicObject {\n  constructor(element, composition) {\n    super(...arguments)\n    this.didFocus = this.didFocus.bind(this)\n    this.didBlur = this.didBlur.bind(this)\n    this.didClickAttachment = this.didClickAttachment.bind(this)\n\n    this.element = element\n    this.composition = composition\n    this.documentView = new DocumentView(this.composition.document, { element: this.element })\n\n    handleEvent(\"focus\", { onElement: this.element, withCallback: this.didFocus })\n    handleEvent(\"blur\", { onElement: this.element, withCallback: this.didBlur })\n    handleEvent(\"click\", {\n      onElement: this.element,\n      matchingSelector: \"a[contenteditable=false]\",\n      preventDefault: true,\n    })\n    handleEvent(\"mousedown\", {\n      onElement: this.element,\n      matchingSelector: attachmentSelector,\n      withCallback: this.didClickAttachment,\n    })\n    handleEvent(\"click\", { onElement: this.element, matchingSelector: `a${attachmentSelector}`, preventDefault: true })\n  }\n\n  didFocus(event) {\n    const perform = () => {\n      if (!this.focused) {\n        this.focused = true\n        return this.delegate?.compositionControllerDidFocus?.()\n      }\n    }\n\n    return this.blurPromise?.then(perform) || perform()\n  }\n\n  didBlur(event) {\n    this.blurPromise = new Promise((resolve) => {\n      return defer(() => {\n        if (!innerElementIsActive(this.element)) {\n          this.focused = null\n          this.delegate?.compositionControllerDidBlur?.()\n        }\n        this.blurPromise = null\n        return resolve()\n      })\n    })\n  }\n\n  didClickAttachment(event, target) {\n    const attachment = this.findAttachmentForElement(target)\n    const editCaption = !!findClosestElementFromNode(event.target, { matchingSelector: \"figcaption\" })\n    return this.delegate?.compositionControllerDidSelectAttachment?.(attachment, { editCaption })\n  }\n\n  getSerializableElement() {\n    if (this.isEditingAttachment()) {\n      return this.documentView.shadowElement\n    } else {\n      return this.element\n    }\n  }\n\n  render() {\n    if (this.revision !== this.composition.revision) {\n      this.documentView.setDocument(this.composition.document)\n      this.documentView.render()\n      this.revision = this.composition.revision\n    }\n\n    if (this.canSyncDocumentView() && !this.documentView.isSynced()) {\n      this.delegate?.compositionControllerWillSyncDocumentView?.()\n      this.documentView.sync()\n      this.delegate?.compositionControllerDidSyncDocumentView?.()\n    }\n\n    return this.delegate?.compositionControllerDidRender?.()\n  }\n\n  rerenderViewForObject(object) {\n    this.invalidateViewForObject(object)\n    return this.render()\n  }\n\n  invalidateViewForObject(object) {\n    return this.documentView.invalidateViewForObject(object)\n  }\n\n  isViewCachingEnabled() {\n    return this.documentView.isViewCachingEnabled()\n  }\n\n  enableViewCaching() {\n    return this.documentView.enableViewCaching()\n  }\n\n  disableViewCaching() {\n    return this.documentView.disableViewCaching()\n  }\n\n  refreshViewCache() {\n    return this.documentView.garbageCollectCachedViews()\n  }\n\n  // Attachment editor management\n\n  isEditingAttachment() {\n    return !!this.attachmentEditor\n  }\n\n  installAttachmentEditorForAttachment(attachment, options) {\n    if (this.attachmentEditor?.attachment === attachment) return\n    const element = this.documentView.findElementForObject(attachment)\n    if (!element) return\n\n    this.uninstallAttachmentEditor()\n    const attachmentPiece = this.composition.document.getAttachmentPieceForAttachment(attachment)\n    this.attachmentEditor = new AttachmentEditorController(attachmentPiece, element, this.element, options)\n    this.attachmentEditor.delegate = this\n  }\n\n  uninstallAttachmentEditor() {\n    return this.attachmentEditor?.uninstall()\n  }\n\n  // Attachment controller delegate\n\n  didUninstallAttachmentEditor() {\n    this.attachmentEditor = null\n    return this.render()\n  }\n\n  attachmentEditorDidRequestUpdatingAttributesForAttachment(attributes, attachment) {\n    this.delegate?.compositionControllerWillUpdateAttachment?.(attachment)\n    return this.composition.updateAttributesForAttachment(attributes, attachment)\n  }\n\n  attachmentEditorDidRequestRemovingAttributeForAttachment(attribute, attachment) {\n    this.delegate?.compositionControllerWillUpdateAttachment?.(attachment)\n    return this.composition.removeAttributeForAttachment(attribute, attachment)\n  }\n\n  attachmentEditorDidRequestRemovalOfAttachment(attachment) {\n    return this.delegate?.compositionControllerDidRequestRemovalOfAttachment?.(attachment)\n  }\n\n  attachmentEditorDidRequestDeselectingAttachment(attachment) {\n    return this.delegate?.compositionControllerDidRequestDeselectingAttachment?.(attachment)\n  }\n\n  // Private\n\n  canSyncDocumentView() {\n    return !this.isEditingAttachment()\n  }\n\n  findAttachmentForElement(element) {\n    return this.composition.document.getAttachmentById(parseInt(element.dataset.trixId, 10))\n  }\n}\n", "import \"trix/views/object_view\"\nimport BasicObject from \"trix/core/basic_object\"\n\nexport default class Controller extends BasicObject {}\n", "import BasicObject from \"trix/core/basic_object\"\n\nimport {\n  findClosestElementFromNode,\n  nodeIsBlockStartComment,\n  nodeIsEmptyTextNode,\n  normalizeSpaces,\n  summarizeStringChange,\n  tagName,\n} from \"trix/core/helpers\"\n\nconst mutableAttributeName = \"data-trix-mutable\"\nconst mutableSelector = `[${mutableAttributeName}]`\n\nconst options = {\n  attributes: true,\n  childList: true,\n  characterData: true,\n  characterDataOldValue: true,\n  subtree: true,\n}\n\nexport default class MutationObserver extends BasicObject {\n  constructor(element) {\n    super(element)\n    this.didMutate = this.didMutate.bind(this)\n    this.element = element\n    this.observer = new window.MutationObserver(this.didMutate)\n    this.start()\n  }\n\n  start() {\n    this.reset()\n    return this.observer.observe(this.element, options)\n  }\n\n  stop() {\n    return this.observer.disconnect()\n  }\n\n  didMutate(mutations) {\n    this.mutations.push(...Array.from(this.findSignificantMutations(mutations) || []))\n\n    if (this.mutations.length) {\n      this.delegate?.elementDidMutate?.(this.getMutationSummary())\n      return this.reset()\n    }\n  }\n\n  // Private\n\n  reset() {\n    this.mutations = []\n  }\n\n  findSignificantMutations(mutations) {\n    return mutations.filter((mutation) => {\n      return this.mutationIsSignificant(mutation)\n    })\n  }\n\n  mutationIsSignificant(mutation) {\n    if (this.nodeIsMutable(mutation.target)) {\n      return false\n    }\n    for (const node of Array.from(this.nodesModifiedByMutation(mutation))) {\n      if (this.nodeIsSignificant(node)) return true\n    }\n    return false\n  }\n\n  nodeIsSignificant(node) {\n    return node !== this.element && !this.nodeIsMutable(node) && !nodeIsEmptyTextNode(node)\n  }\n\n  nodeIsMutable(node) {\n    return findClosestElementFromNode(node, { matchingSelector: mutableSelector })\n  }\n\n  nodesModifiedByMutation(mutation) {\n    const nodes = []\n    switch (mutation.type) {\n      case \"attributes\":\n        if (mutation.attributeName !== mutableAttributeName) {\n          nodes.push(mutation.target)\n        }\n        break\n      case \"characterData\":\n        // Changes to text nodes should consider the parent element\n        nodes.push(mutation.target.parentNode)\n        nodes.push(mutation.target)\n        break\n      case \"childList\":\n        // Consider each added or removed node\n        nodes.push(...Array.from(mutation.addedNodes || []))\n        nodes.push(...Array.from(mutation.removedNodes || []))\n        break\n    }\n    return nodes\n  }\n\n  getMutationSummary() {\n    return this.getTextMutationSummary()\n  }\n\n  getTextMutationSummary() {\n    const { additions, deletions } = this.getTextChangesFromCharacterData()\n    const textChanges = this.getTextChangesFromChildList()\n\n    Array.from(textChanges.additions).forEach((addition) => {\n      if (!Array.from(additions).includes(addition)) {\n        additions.push(addition)\n      }\n    })\n\n    deletions.push(...Array.from(textChanges.deletions || []))\n\n    const summary = {}\n\n    const added = additions.join(\"\")\n    if (added) {\n      summary.textAdded = added\n    }\n\n    const deleted = deletions.join(\"\")\n    if (deleted) {\n      summary.textDeleted = deleted\n    }\n\n    return summary\n  }\n\n  getMutationsByType(type) {\n    return Array.from(this.mutations).filter((mutation) => mutation.type === type)\n  }\n\n  getTextChangesFromChildList() {\n    let textAdded, textRemoved\n    const addedNodes = []\n    const removedNodes = []\n\n    Array.from(this.getMutationsByType(\"childList\")).forEach((mutation) => {\n      addedNodes.push(...Array.from(mutation.addedNodes || []))\n      removedNodes.push(...Array.from(mutation.removedNodes || []))\n    })\n\n    const singleBlockCommentRemoved =\n      addedNodes.length === 0 && removedNodes.length === 1 && nodeIsBlockStartComment(removedNodes[0])\n\n    if (singleBlockCommentRemoved) {\n      textAdded = []\n      textRemoved = [ \"\\n\" ]\n    } else {\n      textAdded = getTextForNodes(addedNodes)\n      textRemoved = getTextForNodes(removedNodes)\n    }\n\n    const additions = textAdded.filter((text, index) => text !== textRemoved[index]).map(normalizeSpaces)\n    const deletions = textRemoved.filter((text, index) => text !== textAdded[index]).map(normalizeSpaces)\n\n    return { additions, deletions }\n  }\n\n  getTextChangesFromCharacterData() {\n    let added, removed\n    const characterMutations = this.getMutationsByType(\"characterData\")\n\n    if (characterMutations.length) {\n      const startMutation = characterMutations[0],\n        endMutation = characterMutations[characterMutations.length - 1]\n\n      const oldString = normalizeSpaces(startMutation.oldValue)\n      const newString = normalizeSpaces(endMutation.target.data)\n      const summarized = summarizeStringChange(oldString, newString)\n      added = summarized.added\n      removed = summarized.removed\n    }\n\n    return {\n      additions: added ? [ added ] : [],\n      deletions: removed ? [ removed ] : [],\n    }\n  }\n}\n\nconst getTextForNodes = function(nodes = []) {\n  const text = []\n  for (const node of Array.from(nodes)) {\n    switch (node.nodeType) {\n      case Node.TEXT_NODE:\n        text.push(node.data)\n        break\n      case Node.ELEMENT_NODE:\n        if (tagName(node) === \"br\") {\n          text.push(\"\\n\")\n        } else {\n          text.push(...Array.from(getTextForNodes(node.childNodes) || []))\n        }\n        break\n    }\n  }\n  return text\n}\n", "/* eslint-disable\n    no-empty,\n*/\nimport Operation from \"trix/core/utilities/operation\"\n\nexport default class FileVerificationOperation extends Operation {\n  constructor(file) {\n    super(...arguments)\n    this.file = file\n  }\n\n  perform(callback) {\n    const reader = new FileReader()\n\n    reader.onerror = () => callback(false)\n\n    reader.onload = () => {\n      reader.onerror = null\n      try {\n        reader.abort()\n      } catch (error) {}\n      return callback(true, this.file)\n    }\n\n    return reader.readAsArrayBuffer(this.file)\n  }\n}\n", "import * as config from \"trix/config\"\nimport { NON_BREAKING_SPACE, OBJECT_REPLACEMENT_CHARACTER, ZERO_WIDTH_SPACE } from \"trix/constants\"\n\n// Each software keyboard on Android emits its own set of events and some of them can be buggy.\n// This class detects when some buggy events are being emitted and lets know the input controller\n// that they should be ignored.\nexport default class FlakyAndroidKeyboardDetector {\n  constructor(element) {\n    this.element = element\n  }\n\n  shouldIgnore(event) {\n    if (!config.browser.samsungAndroid) return false\n\n    this.previousEvent = this.event\n    this.event = event\n\n    this.checkSamsungKeyboardBuggyModeStart()\n    this.checkSamsungKeyboardBuggyModeEnd()\n\n    return this.buggyMode\n  }\n\n  // private\n\n  // The Samsung keyboard on Android can enter a buggy state in which it emits a flurry of confused events that,\n  // if processed, corrupts the editor. The buggy mode always starts with an insertText event, right after a\n  // keydown event with for an \"Unidentified\" key, with the same text as the editor element, except for a few\n  // extra whitespace, or exotic utf8, characters.\n  checkSamsungKeyboardBuggyModeStart() {\n    if (this.insertingLongTextAfterUnidentifiedChar() && differsInWhitespace(this.element.innerText, this.event.data)) {\n      this.buggyMode = true\n      this.event.preventDefault()\n    }\n  }\n\n  // The flurry of buggy events are always insertText. If we see any other type, it means it's over.\n  checkSamsungKeyboardBuggyModeEnd() {\n    if (this.buggyMode && this.event.inputType !== \"insertText\") {\n      this.buggyMode = false\n    }\n  }\n\n  insertingLongTextAfterUnidentifiedChar() {\n    return this.isBeforeInputInsertText() && this.previousEventWasUnidentifiedKeydown() && this.event.data?.length > 50\n  }\n\n  isBeforeInputInsertText() {\n    return this.event.type === \"beforeinput\" && this.event.inputType === \"insertText\"\n  }\n\n  previousEventWasUnidentifiedKeydown() {\n    return this.previousEvent?.type === \"keydown\" && this.previousEvent?.key === \"Unidentified\"\n  }\n}\n\nconst differsInWhitespace = (text1, text2) => {\n  return normalize(text1) === normalize(text2)\n}\n\nconst whiteSpaceNormalizerRegexp = new RegExp(`(${OBJECT_REPLACEMENT_CHARACTER}|${ZERO_WIDTH_SPACE}|${NON_BREAKING_SPACE}|\\\\s)+`, \"g\")\nconst normalize = (text) => text.replace(whiteSpaceNormalizerRegexp, \" \").trim()\n", "import BasicObject from \"trix/core/basic_object\"\nimport MutationObserver from \"trix/observers/mutation_observer\"\nimport FileVerificationOperation from \"trix/operations/file_verification_operation\"\nimport FlakyAndroidKeyboardDetector from \"../models/flaky_android_keyboard_detector\"\n\nimport { handleEvent, innerElementIsActive } from \"trix/core/helpers\"\n\nexport default class InputController extends BasicObject {\n\n  static events = {}\n\n  constructor(element) {\n    super(...arguments)\n    this.element = element\n    this.mutationObserver = new MutationObserver(this.element)\n    this.mutationObserver.delegate = this\n    this.flakyKeyboardDetector = new FlakyAndroidKeyboardDetector(this.element)\n    for (const eventName in this.constructor.events) {\n      handleEvent(eventName, { onElement: this.element, withCallback: this.handlerFor(eventName) })\n    }\n  }\n\n  elementDidMutate(mutationSummary) {}\n\n  editorWillSyncDocumentView() {\n    return this.mutationObserver.stop()\n  }\n\n  editorDidSyncDocumentView() {\n    return this.mutationObserver.start()\n  }\n\n  requestRender() {\n    return this.delegate?.inputControllerDidRequestRender?.()\n  }\n\n  requestReparse() {\n    this.delegate?.inputControllerDidRequestReparse?.()\n    return this.requestRender()\n  }\n\n  attachFiles(files) {\n    const operations = Array.from(files).map((file) => new FileVerificationOperation(file))\n    return Promise.all(operations).then((files) => {\n      this.handleInput(function() {\n        this.delegate?.inputControllerWillAttachFiles()\n        this.responder?.insertFiles(files)\n        return this.requestRender()\n      })\n    })\n  }\n\n  // Private\n\n  handlerFor(eventName) {\n    return (event) => {\n      if (!event.defaultPrevented) {\n        this.handleInput(() => {\n          if (!innerElementIsActive(this.element)) {\n            if (this.flakyKeyboardDetector.shouldIgnore(event)) return\n\n            this.eventName = eventName\n            this.constructor.events[eventName].call(this, event)\n          }\n        })\n      }\n    }\n  }\n\n  handleInput(callback) {\n    try {\n      this.delegate?.inputControllerWillHandleInput()\n      callback.call(this)\n    } finally {\n      this.delegate?.inputControllerDidHandleInput()\n    }\n  }\n\n  createLinkHTML(href, text) {\n    const link = document.createElement(\"a\")\n    link.href = href\n    link.textContent = text ? text : href\n    return link.outerHTML\n  }\n}\n\n", "import * as config from \"trix/config\"\nimport UTF16String from \"trix/core/utilities/utf16_string\"\nimport BasicObject from \"trix/core/basic_object\"\nimport InputController from \"trix/controllers/input_controller\"\nimport DocumentView from \"trix/views/document_view\"\nimport Document from \"trix/models/document\"\n\nimport {\n  dataTransferIsPlainText,\n  dataTransferIsWritable,\n  keyEventIsKeyboardCommand,\n  makeElement,\n  objectsAreEqual,\n  removeNode,\n  squishBreakableWhitespace,\n} from \"trix/core/helpers\"\n\nimport { selectionChangeObserver } from \"trix/observers/selection_change_observer\"\n\nconst { browser, keyNames } = config\nlet pastedFileCount = 0\n\nexport default class Level0InputController extends InputController {\n\n  static events = {\n    keydown(event) {\n      if (!this.isComposing()) {\n        this.resetInputSummary()\n      }\n      this.inputSummary.didInput = true\n\n      const keyName = keyNames[event.keyCode]\n      if (keyName) {\n        let context = this.keys\n\n        ;[ \"ctrl\", \"alt\", \"shift\", \"meta\" ].forEach((modifier) => {\n          if (event[`${modifier}Key`]) {\n            if (modifier === \"ctrl\") {\n              modifier = \"control\"\n            }\n            context = context?.[modifier]\n          }\n        })\n\n        if (context?.[keyName] != null) {\n          this.setInputSummary({ keyName })\n          selectionChangeObserver.reset()\n          context[keyName].call(this, event)\n        }\n      }\n\n      if (keyEventIsKeyboardCommand(event)) {\n        const character = String.fromCharCode(event.keyCode).toLowerCase()\n        if (character) {\n          const keys = [ \"alt\", \"shift\" ].map((modifier) => {\n            if (event[`${modifier}Key`]) {\n              return modifier\n            }\n          }).filter(key => key)\n          keys.push(character)\n          if (this.delegate?.inputControllerDidReceiveKeyboardCommand(keys)) {\n            event.preventDefault()\n          }\n        }\n      }\n    },\n\n    keypress(event) {\n      if (this.inputSummary.eventName != null) return\n      if (event.metaKey) return\n      if (event.ctrlKey && !event.altKey) return\n\n      const string = stringFromKeyEvent(event)\n      if (string) {\n        this.delegate?.inputControllerWillPerformTyping()\n        this.responder?.insertString(string)\n        return this.setInputSummary({ textAdded: string, didDelete: this.selectionIsExpanded() })\n      }\n    },\n\n    textInput(event) {\n      // Handle autocapitalization\n      const { data } = event\n      const { textAdded } = this.inputSummary\n      if (textAdded && textAdded !== data && textAdded.toUpperCase() === data) {\n        const range = this.getSelectedRange()\n        this.setSelectedRange([ range[0], range[1] + textAdded.length ])\n        this.responder?.insertString(data)\n        this.setInputSummary({ textAdded: data })\n        return this.setSelectedRange(range)\n      }\n    },\n\n    dragenter(event) {\n      event.preventDefault()\n    },\n\n    dragstart(event) {\n      this.serializeSelectionToDataTransfer(event.dataTransfer)\n      this.draggedRange = this.getSelectedRange()\n      return this.delegate?.inputControllerDidStartDrag?.()\n    },\n\n    dragover(event) {\n      if (this.draggedRange || this.canAcceptDataTransfer(event.dataTransfer)) {\n        event.preventDefault()\n        const draggingPoint = { x: event.clientX, y: event.clientY }\n        if (!objectsAreEqual(draggingPoint, this.draggingPoint)) {\n          this.draggingPoint = draggingPoint\n          return this.delegate?.inputControllerDidReceiveDragOverPoint?.(this.draggingPoint)\n        }\n      }\n    },\n\n    dragend(event) {\n      this.delegate?.inputControllerDidCancelDrag?.()\n      this.draggedRange = null\n      this.draggingPoint = null\n    },\n\n    drop(event) {\n      event.preventDefault()\n      const files = event.dataTransfer?.files\n      const documentJSON = event.dataTransfer.getData(\"application/x-trix-document\")\n\n      const point = { x: event.clientX, y: event.clientY }\n      this.responder?.setLocationRangeFromPointRange(point)\n\n      if (files?.length) {\n        this.attachFiles(files)\n      } else if (this.draggedRange) {\n        this.delegate?.inputControllerWillMoveText()\n        this.responder?.moveTextFromRange(this.draggedRange)\n        this.draggedRange = null\n        this.requestRender()\n      } else if (documentJSON) {\n        const document = Document.fromJSONString(documentJSON)\n        this.responder?.insertDocument(document)\n        this.requestRender()\n      }\n\n      this.draggedRange = null\n      this.draggingPoint = null\n    },\n\n    cut(event) {\n      if (this.responder?.selectionIsExpanded()) {\n        if (this.serializeSelectionToDataTransfer(event.clipboardData)) {\n          event.preventDefault()\n        }\n\n        this.delegate?.inputControllerWillCutText()\n        this.deleteInDirection(\"backward\")\n        if (event.defaultPrevented) {\n          return this.requestRender()\n        }\n      }\n    },\n\n    copy(event) {\n      if (this.responder?.selectionIsExpanded()) {\n        if (this.serializeSelectionToDataTransfer(event.clipboardData)) {\n          event.preventDefault()\n        }\n      }\n    },\n\n    paste(event) {\n      const clipboard = event.clipboardData || event.testClipboardData\n      const paste = { clipboard }\n\n      if (!clipboard || pasteEventIsCrippledSafariHTMLPaste(event)) {\n        this.getPastedHTMLUsingHiddenElement((html) => {\n          paste.type = \"text/html\"\n          paste.html = html\n          this.delegate?.inputControllerWillPaste(paste)\n          this.responder?.insertHTML(paste.html)\n          this.requestRender()\n          return this.delegate?.inputControllerDidPaste(paste)\n        })\n        return\n      }\n\n      const href = clipboard.getData(\"URL\")\n      const html = clipboard.getData(\"text/html\")\n      const name = clipboard.getData(\"public.url-name\")\n\n      if (href) {\n        let string\n        paste.type = \"text/html\"\n        if (name) {\n          string = squishBreakableWhitespace(name).trim()\n        } else {\n          string = href\n        }\n        paste.html = this.createLinkHTML(href, string)\n        this.delegate?.inputControllerWillPaste(paste)\n        this.setInputSummary({ textAdded: string, didDelete: this.selectionIsExpanded() })\n        this.responder?.insertHTML(paste.html)\n        this.requestRender()\n        this.delegate?.inputControllerDidPaste(paste)\n      } else if (dataTransferIsPlainText(clipboard)) {\n        paste.type = \"text/plain\"\n        paste.string = clipboard.getData(\"text/plain\")\n        this.delegate?.inputControllerWillPaste(paste)\n        this.setInputSummary({ textAdded: paste.string, didDelete: this.selectionIsExpanded() })\n        this.responder?.insertString(paste.string)\n        this.requestRender()\n        this.delegate?.inputControllerDidPaste(paste)\n      } else if (html) {\n        paste.type = \"text/html\"\n        paste.html = html\n        this.delegate?.inputControllerWillPaste(paste)\n        this.responder?.insertHTML(paste.html)\n        this.requestRender()\n        this.delegate?.inputControllerDidPaste(paste)\n      } else if (Array.from(clipboard.types).includes(\"Files\")) {\n        const file = clipboard.items?.[0]?.getAsFile?.()\n        if (file) {\n          const extension = extensionForFile(file)\n          if (!file.name && extension) {\n            file.name = `pasted-file-${++pastedFileCount}.${extension}`\n          }\n          paste.type = \"File\"\n          paste.file = file\n          this.delegate?.inputControllerWillAttachFiles()\n          this.responder?.insertFile(paste.file)\n          this.requestRender()\n          this.delegate?.inputControllerDidPaste(paste)\n        }\n      }\n\n      event.preventDefault()\n    },\n\n    compositionstart(event) {\n      return this.getCompositionInput().start(event.data)\n    },\n\n    compositionupdate(event) {\n      return this.getCompositionInput().update(event.data)\n    },\n\n    compositionend(event) {\n      return this.getCompositionInput().end(event.data)\n    },\n\n    beforeinput(event) {\n      this.inputSummary.didInput = true\n    },\n\n    input(event) {\n      this.inputSummary.didInput = true\n      return event.stopPropagation()\n    },\n  }\n\n  static keys = {\n    backspace(event) {\n      this.delegate?.inputControllerWillPerformTyping()\n      return this.deleteInDirection(\"backward\", event)\n    },\n\n    delete(event) {\n      this.delegate?.inputControllerWillPerformTyping()\n      return this.deleteInDirection(\"forward\", event)\n    },\n\n    return(event) {\n      this.setInputSummary({ preferDocument: true })\n      this.delegate?.inputControllerWillPerformTyping()\n      return this.responder?.insertLineBreak()\n    },\n\n    tab(event) {\n      if (this.responder?.canIncreaseNestingLevel()) {\n        this.responder?.increaseNestingLevel()\n        this.requestRender()\n        event.preventDefault()\n      }\n    },\n\n    left(event) {\n      if (this.selectionIsInCursorTarget()) {\n        event.preventDefault()\n        return this.responder?.moveCursorInDirection(\"backward\")\n      }\n    },\n\n    right(event) {\n      if (this.selectionIsInCursorTarget()) {\n        event.preventDefault()\n        return this.responder?.moveCursorInDirection(\"forward\")\n      }\n    },\n\n    control: {\n      d(event) {\n        this.delegate?.inputControllerWillPerformTyping()\n        return this.deleteInDirection(\"forward\", event)\n      },\n\n      h(event) {\n        this.delegate?.inputControllerWillPerformTyping()\n        return this.deleteInDirection(\"backward\", event)\n      },\n\n      o(event) {\n        event.preventDefault()\n        this.delegate?.inputControllerWillPerformTyping()\n        this.responder?.insertString(\"\\n\", { updatePosition: false })\n        return this.requestRender()\n      },\n    },\n\n    shift: {\n      return(event) {\n        this.delegate?.inputControllerWillPerformTyping()\n        this.responder?.insertString(\"\\n\")\n        this.requestRender()\n        event.preventDefault()\n      },\n\n      tab(event) {\n        if (this.responder?.canDecreaseNestingLevel()) {\n          this.responder?.decreaseNestingLevel()\n          this.requestRender()\n          event.preventDefault()\n        }\n      },\n\n      left(event) {\n        if (this.selectionIsInCursorTarget()) {\n          event.preventDefault()\n          return this.expandSelectionInDirection(\"backward\")\n        }\n      },\n\n      right(event) {\n        if (this.selectionIsInCursorTarget()) {\n          event.preventDefault()\n          return this.expandSelectionInDirection(\"forward\")\n        }\n      },\n    },\n\n    alt: {\n      backspace(event) {\n        this.setInputSummary({ preferDocument: false })\n        return this.delegate?.inputControllerWillPerformTyping()\n      },\n    },\n\n    meta: {\n      backspace(event) {\n        this.setInputSummary({ preferDocument: false })\n        return this.delegate?.inputControllerWillPerformTyping()\n      },\n    },\n  }\n\n  constructor() {\n    super(...arguments)\n    this.resetInputSummary()\n  }\n\n  setInputSummary(summary = {}) {\n    this.inputSummary.eventName = this.eventName\n    for (const key in summary) {\n      const value = summary[key]\n      this.inputSummary[key] = value\n    }\n    return this.inputSummary\n  }\n\n  resetInputSummary() {\n    this.inputSummary = {}\n  }\n\n  reset() {\n    this.resetInputSummary()\n    return selectionChangeObserver.reset()\n  }\n\n  // Mutation observer delegate\n\n  elementDidMutate(mutationSummary) {\n    if (this.isComposing()) {\n      return this.delegate?.inputControllerDidAllowUnhandledInput?.()\n    } else {\n      return this.handleInput(function() {\n        if (this.mutationIsSignificant(mutationSummary)) {\n          if (this.mutationIsExpected(mutationSummary)) {\n            this.requestRender()\n          } else {\n            this.requestReparse()\n          }\n        }\n        return this.reset()\n      })\n    }\n  }\n\n  mutationIsExpected({ textAdded, textDeleted }) {\n    if (this.inputSummary.preferDocument) {\n      return true\n    }\n\n    const mutationAdditionMatchesSummary =\n      textAdded != null ? textAdded === this.inputSummary.textAdded : !this.inputSummary.textAdded\n    const mutationDeletionMatchesSummary =\n      textDeleted != null ? this.inputSummary.didDelete : !this.inputSummary.didDelete\n\n    const unexpectedNewlineAddition = [ \"\\n\", \" \\n\" ].includes(textAdded) && !mutationAdditionMatchesSummary\n    const unexpectedNewlineDeletion = textDeleted === \"\\n\" && !mutationDeletionMatchesSummary\n    const singleUnexpectedNewline =\n      unexpectedNewlineAddition && !unexpectedNewlineDeletion ||\n      unexpectedNewlineDeletion && !unexpectedNewlineAddition\n\n    if (singleUnexpectedNewline) {\n      const range = this.getSelectedRange()\n      if (range) {\n        const offset = unexpectedNewlineAddition ? textAdded.replace(/\\n$/, \"\").length || -1 : textAdded?.length || 1\n        if (this.responder?.positionIsBlockBreak(range[1] + offset)) {\n          return true\n        }\n      }\n    }\n\n    return mutationAdditionMatchesSummary && mutationDeletionMatchesSummary\n  }\n\n  mutationIsSignificant(mutationSummary) {\n    const textChanged = Object.keys(mutationSummary).length > 0\n    const composedEmptyString = this.compositionInput?.getEndData() === \"\"\n    return textChanged || !composedEmptyString\n  }\n\n  // Private\n\n  getCompositionInput() {\n    if (this.isComposing()) {\n      return this.compositionInput\n    } else {\n      this.compositionInput = new CompositionInput(this)\n    }\n  }\n\n  isComposing() {\n    return this.compositionInput && !this.compositionInput.isEnded()\n  }\n\n  deleteInDirection(direction, event) {\n    if (this.responder?.deleteInDirection(direction) === false) {\n      if (event) {\n        event.preventDefault()\n        return this.requestRender()\n      }\n    } else {\n      return this.setInputSummary({ didDelete: true })\n    }\n  }\n\n  serializeSelectionToDataTransfer(dataTransfer) {\n    if (!dataTransferIsWritable(dataTransfer)) return\n    const document = this.responder?.getSelectedDocument().toSerializableDocument()\n\n    dataTransfer.setData(\"application/x-trix-document\", JSON.stringify(document))\n    dataTransfer.setData(\"text/html\", DocumentView.render(document).innerHTML)\n    dataTransfer.setData(\"text/plain\", document.toString().replace(/\\n$/, \"\"))\n    return true\n  }\n\n  canAcceptDataTransfer(dataTransfer) {\n    const types = {}\n    Array.from(dataTransfer?.types || []).forEach((type) => {\n      types[type] = true\n    })\n    return types.Files || types[\"application/x-trix-document\"] || types[\"text/html\"] || types[\"text/plain\"]\n  }\n\n  getPastedHTMLUsingHiddenElement(callback) {\n    const selectedRange = this.getSelectedRange()\n\n    const style = {\n      position: \"absolute\",\n      left: `${window.pageXOffset}px`,\n      top: `${window.pageYOffset}px`,\n      opacity: 0,\n    }\n\n    const element = makeElement({ style, tagName: \"div\", editable: true })\n    document.body.appendChild(element)\n    element.focus()\n\n    return requestAnimationFrame(() => {\n      const html = element.innerHTML\n      removeNode(element)\n      this.setSelectedRange(selectedRange)\n      return callback(html)\n    })\n  }\n}\n\nLevel0InputController.proxyMethod(\"responder?.getSelectedRange\")\nLevel0InputController.proxyMethod(\"responder?.setSelectedRange\")\nLevel0InputController.proxyMethod(\"responder?.expandSelectionInDirection\")\nLevel0InputController.proxyMethod(\"responder?.selectionIsInCursorTarget\")\nLevel0InputController.proxyMethod(\"responder?.selectionIsExpanded\")\n\nconst extensionForFile = (file) => file.type?.match(/\\/(\\w+)$/)?.[1]\n\nconst hasStringCodePointAt = !!\" \".codePointAt?.(0)\n\nconst stringFromKeyEvent = function(event) {\n  if (event.key && hasStringCodePointAt && event.key.codePointAt(0) === event.keyCode) {\n    return event.key\n  } else {\n    let code\n    if (event.which === null) {\n      code = event.keyCode\n    } else if (event.which !== 0 && event.charCode !== 0) {\n      code = event.charCode\n    }\n\n    if (code != null && keyNames[code] !== \"escape\") {\n      return UTF16String.fromCodepoints([ code ]).toString()\n    }\n  }\n}\n\nconst pasteEventIsCrippledSafariHTMLPaste = function(event) {\n  const paste = event.clipboardData\n  if (paste) {\n    if (paste.types.includes(\"text/html\")) {\n      // Answer is yes if there's any possibility of Paste and Match Style in Safari,\n      // which is nearly impossible to detect confidently: https://bugs.webkit.org/show_bug.cgi?id=174165\n      for (const type of paste.types) {\n        const hasPasteboardFlavor = /^CorePasteboardFlavorType/.test(type)\n        const hasReadableDynamicData = /^dyn\\./.test(type) && paste.getData(type)\n        const mightBePasteAndMatchStyle = hasPasteboardFlavor || hasReadableDynamicData\n        if (mightBePasteAndMatchStyle) {\n          return true\n        }\n      }\n      return false\n    } else {\n      const isExternalHTMLPaste = paste.types.includes(\"com.apple.webarchive\")\n      const isExternalRichTextPaste = paste.types.includes(\"com.apple.flat-rtfd\")\n      return isExternalHTMLPaste || isExternalRichTextPaste\n    }\n  }\n}\n\nclass CompositionInput extends BasicObject {\n  constructor(inputController) {\n    super(...arguments)\n    this.inputController = inputController\n    this.responder = this.inputController.responder\n    this.delegate = this.inputController.delegate\n    this.inputSummary = this.inputController.inputSummary\n    this.data = {}\n  }\n\n  start(data) {\n    this.data.start = data\n\n    if (this.isSignificant()) {\n      if (this.inputSummary.eventName === \"keypress\" && this.inputSummary.textAdded) {\n        this.responder?.deleteInDirection(\"left\")\n      }\n\n      if (!this.selectionIsExpanded()) {\n        this.insertPlaceholder()\n        this.requestRender()\n      }\n\n      this.range = this.responder?.getSelectedRange()\n    }\n  }\n\n  update(data) {\n    this.data.update = data\n\n    if (this.isSignificant()) {\n      const range = this.selectPlaceholder()\n      if (range) {\n        this.forgetPlaceholder()\n        this.range = range\n      }\n    }\n  }\n\n  end(data) {\n    this.data.end = data\n\n    if (this.isSignificant()) {\n      this.forgetPlaceholder()\n\n      if (this.canApplyToDocument()) {\n        this.setInputSummary({ preferDocument: true, didInput: false })\n        this.delegate?.inputControllerWillPerformTyping()\n        this.responder?.setSelectedRange(this.range)\n        this.responder?.insertString(this.data.end)\n        return this.responder?.setSelectedRange(this.range[0] + this.data.end.length)\n      } else if (this.data.start != null || this.data.update != null) {\n        this.requestReparse()\n        return this.inputController.reset()\n      }\n    } else {\n      return this.inputController.reset()\n    }\n  }\n\n  getEndData() {\n    return this.data.end\n  }\n\n  isEnded() {\n    return this.getEndData() != null\n  }\n\n  isSignificant() {\n    if (browser.composesExistingText) {\n      return this.inputSummary.didInput\n    } else {\n      return true\n    }\n  }\n\n  // Private\n\n  canApplyToDocument() {\n    return this.data.start?.length === 0 && this.data.end?.length > 0 && this.range\n  }\n}\n\nCompositionInput.proxyMethod(\"inputController.setInputSummary\")\nCompositionInput.proxyMethod(\"inputController.requestRender\")\nCompositionInput.proxyMethod(\"inputController.requestReparse\")\nCompositionInput.proxyMethod(\"responder?.selectionIsExpanded\")\nCompositionInput.proxyMethod(\"responder?.insertPlaceholder\")\nCompositionInput.proxyMethod(\"responder?.selectPlaceholder\")\nCompositionInput.proxyMethod(\"responder?.forgetPlaceholder\")\n", "import { getAllAttributeNames, squishBreakableWhitespace } from \"trix/core/helpers\"\nimport InputController from \"trix/controllers/input_controller\"\nimport * as config from \"trix/config\"\n\nimport { dataTransferIsMsOfficePaste, dataTransferIsPlainText, keyEventIsKeyboardCommand, objectsAreEqual } from \"trix/core/helpers\"\n\nimport { selectionChangeObserver } from \"trix/observers/selection_change_observer\"\n\nexport default class Level2InputController extends InputController {\n  constructor(...args) {\n    super(...args)\n    this.render = this.render.bind(this)\n  }\n\n  static events = {\n    keydown(event) {\n      if (keyEventIsKeyboardCommand(event)) {\n        const command = keyboardCommandFromKeyEvent(event)\n        if (this.delegate?.inputControllerDidReceiveKeyboardCommand(command)) {\n          event.preventDefault()\n        }\n      } else {\n        let name = event.key\n        if (event.altKey) {\n          name += \"+Alt\"\n        }\n        if (event.shiftKey) {\n          name += \"+Shift\"\n        }\n        const handler = this.constructor.keys[name]\n        if (handler) {\n          return this.withEvent(event, handler)\n        }\n      }\n    },\n\n    // Handle paste event to work around beforeinput.insertFromPaste browser bugs.\n    // Safe to remove each condition once fixed upstream.\n    paste(event) {\n      // https://bugs.webkit.org/show_bug.cgi?id=194921\n      let paste\n      const href = event.clipboardData?.getData(\"URL\")\n      if (pasteEventHasFilesOnly(event)) {\n        event.preventDefault()\n        return this.attachFiles(event.clipboardData.files)\n\n        // https://bugs.chromium.org/p/chromium/issues/detail?id=934448\n      } else if (pasteEventHasPlainTextOnly(event)) {\n        event.preventDefault()\n        paste = {\n          type: \"text/plain\",\n          string: event.clipboardData.getData(\"text/plain\"),\n        }\n        this.delegate?.inputControllerWillPaste(paste)\n        this.responder?.insertString(paste.string)\n        this.render()\n        return this.delegate?.inputControllerDidPaste(paste)\n\n        // https://bugs.webkit.org/show_bug.cgi?id=196702\n      } else if (href) {\n        event.preventDefault()\n        paste = {\n          type: \"text/html\",\n          html: this.createLinkHTML(href),\n        }\n        this.delegate?.inputControllerWillPaste(paste)\n        this.responder?.insertHTML(paste.html)\n        this.render()\n        return this.delegate?.inputControllerDidPaste(paste)\n      }\n    },\n\n    beforeinput(event) {\n      const handler = this.constructor.inputTypes[event.inputType]\n\n      if (handler) {\n        this.withEvent(event, handler)\n        this.scheduleRender()\n      }\n    },\n\n    input(event) {\n      selectionChangeObserver.reset()\n    },\n\n    dragstart(event) {\n      if (this.responder?.selectionContainsAttachments()) {\n        event.dataTransfer.setData(\"application/x-trix-dragging\", true)\n\n        this.dragging = {\n          range: this.responder?.getSelectedRange(),\n          point: pointFromEvent(event),\n        }\n      }\n    },\n\n    dragenter(event) {\n      if (dragEventHasFiles(event)) {\n        event.preventDefault()\n      }\n    },\n\n    dragover(event) {\n      if (this.dragging) {\n        event.preventDefault()\n        const point = pointFromEvent(event)\n        if (!objectsAreEqual(point, this.dragging.point)) {\n          this.dragging.point = point\n          return this.responder?.setLocationRangeFromPointRange(point)\n        }\n      } else if (dragEventHasFiles(event)) {\n        event.preventDefault()\n      }\n    },\n\n    drop(event) {\n      if (this.dragging) {\n        event.preventDefault()\n        this.delegate?.inputControllerWillMoveText()\n        this.responder?.moveTextFromRange(this.dragging.range)\n        this.dragging = null\n        return this.scheduleRender()\n      } else if (dragEventHasFiles(event)) {\n        event.preventDefault()\n        const point = pointFromEvent(event)\n        this.responder?.setLocationRangeFromPointRange(point)\n        return this.attachFiles(event.dataTransfer.files)\n      }\n    },\n\n    dragend() {\n      if (this.dragging) {\n        this.responder?.setSelectedRange(this.dragging.range)\n        this.dragging = null\n      }\n    },\n\n    compositionend(event) {\n      if (this.composing) {\n        this.composing = false\n        if (!config.browser.recentAndroid) this.scheduleRender()\n      }\n    },\n  }\n\n  static keys = {\n    ArrowLeft() {\n      if (this.responder?.shouldManageMovingCursorInDirection(\"backward\")) {\n        this.event.preventDefault()\n        return this.responder?.moveCursorInDirection(\"backward\")\n      }\n    },\n\n    ArrowRight() {\n      if (this.responder?.shouldManageMovingCursorInDirection(\"forward\")) {\n        this.event.preventDefault()\n        return this.responder?.moveCursorInDirection(\"forward\")\n      }\n    },\n\n    Backspace() {\n      if (this.responder?.shouldManageDeletingInDirection(\"backward\")) {\n        this.event.preventDefault()\n        this.delegate?.inputControllerWillPerformTyping()\n        this.responder?.deleteInDirection(\"backward\")\n        return this.render()\n      }\n    },\n\n    Tab() {\n      if (this.responder?.canIncreaseNestingLevel()) {\n        this.event.preventDefault()\n        this.responder?.increaseNestingLevel()\n        return this.render()\n      }\n    },\n\n    \"Tab+Shift\"() {\n      if (this.responder?.canDecreaseNestingLevel()) {\n        this.event.preventDefault()\n        this.responder?.decreaseNestingLevel()\n        return this.render()\n      }\n    },\n  }\n\n  static inputTypes = {\n    deleteByComposition() {\n      return this.deleteInDirection(\"backward\", { recordUndoEntry: false })\n    },\n\n    deleteByCut() {\n      return this.deleteInDirection(\"backward\")\n    },\n\n    deleteByDrag() {\n      this.event.preventDefault()\n      return this.withTargetDOMRange(function() {\n        this.deleteByDragRange = this.responder?.getSelectedRange()\n      })\n    },\n\n    deleteCompositionText() {\n      return this.deleteInDirection(\"backward\", { recordUndoEntry: false })\n    },\n\n    deleteContent() {\n      return this.deleteInDirection(\"backward\")\n    },\n\n    deleteContentBackward() {\n      return this.deleteInDirection(\"backward\")\n    },\n\n    deleteContentForward() {\n      return this.deleteInDirection(\"forward\")\n    },\n\n    deleteEntireSoftLine() {\n      return this.deleteInDirection(\"forward\")\n    },\n\n    deleteHardLineBackward() {\n      return this.deleteInDirection(\"backward\")\n    },\n\n    deleteHardLineForward() {\n      return this.deleteInDirection(\"forward\")\n    },\n\n    deleteSoftLineBackward() {\n      return this.deleteInDirection(\"backward\")\n    },\n\n    deleteSoftLineForward() {\n      return this.deleteInDirection(\"forward\")\n    },\n\n    deleteWordBackward() {\n      return this.deleteInDirection(\"backward\")\n    },\n\n    deleteWordForward() {\n      return this.deleteInDirection(\"forward\")\n    },\n\n    formatBackColor() {\n      return this.activateAttributeIfSupported(\"backgroundColor\", this.event.data)\n    },\n\n    formatBold() {\n      return this.toggleAttributeIfSupported(\"bold\")\n    },\n\n    formatFontColor() {\n      return this.activateAttributeIfSupported(\"color\", this.event.data)\n    },\n\n    formatFontName() {\n      return this.activateAttributeIfSupported(\"font\", this.event.data)\n    },\n\n    formatIndent() {\n      if (this.responder?.canIncreaseNestingLevel()) {\n        return this.withTargetDOMRange(function() {\n          return this.responder?.increaseNestingLevel()\n        })\n      }\n    },\n\n    formatItalic() {\n      return this.toggleAttributeIfSupported(\"italic\")\n    },\n\n    formatJustifyCenter() {\n      return this.toggleAttributeIfSupported(\"justifyCenter\")\n    },\n\n    formatJustifyFull() {\n      return this.toggleAttributeIfSupported(\"justifyFull\")\n    },\n\n    formatJustifyLeft() {\n      return this.toggleAttributeIfSupported(\"justifyLeft\")\n    },\n\n    formatJustifyRight() {\n      return this.toggleAttributeIfSupported(\"justifyRight\")\n    },\n\n    formatOutdent() {\n      if (this.responder?.canDecreaseNestingLevel()) {\n        return this.withTargetDOMRange(function() {\n          return this.responder?.decreaseNestingLevel()\n        })\n      }\n    },\n\n    formatRemove() {\n      this.withTargetDOMRange(function() {\n        for (const attributeName in this.responder?.getCurrentAttributes()) {\n          this.responder?.removeCurrentAttribute(attributeName)\n        }\n      })\n    },\n\n    formatSetBlockTextDirection() {\n      return this.activateAttributeIfSupported(\"blockDir\", this.event.data)\n    },\n\n    formatSetInlineTextDirection() {\n      return this.activateAttributeIfSupported(\"textDir\", this.event.data)\n    },\n\n    formatStrikeThrough() {\n      return this.toggleAttributeIfSupported(\"strike\")\n    },\n\n    formatSubscript() {\n      return this.toggleAttributeIfSupported(\"sub\")\n    },\n\n    formatSuperscript() {\n      return this.toggleAttributeIfSupported(\"sup\")\n    },\n\n    formatUnderline() {\n      return this.toggleAttributeIfSupported(\"underline\")\n    },\n\n    historyRedo() {\n      return this.delegate?.inputControllerWillPerformRedo()\n    },\n\n    historyUndo() {\n      return this.delegate?.inputControllerWillPerformUndo()\n    },\n\n    insertCompositionText() {\n      this.composing = true\n      return this.insertString(this.event.data)\n    },\n\n    insertFromComposition() {\n      this.composing = false\n      return this.insertString(this.event.data)\n    },\n\n    insertFromDrop() {\n      const range = this.deleteByDragRange\n      if (range) {\n        this.deleteByDragRange = null\n        this.delegate?.inputControllerWillMoveText()\n        return this.withTargetDOMRange(function() {\n          return this.responder?.moveTextFromRange(range)\n        })\n      }\n    },\n\n    insertFromPaste() {\n      const { dataTransfer } = this.event\n      const paste = { dataTransfer }\n\n      const href = dataTransfer.getData(\"URL\")\n      const html = dataTransfer.getData(\"text/html\")\n\n      if (href) {\n        let string\n        this.event.preventDefault()\n        paste.type = \"text/html\"\n        const name = dataTransfer.getData(\"public.url-name\")\n        if (name) {\n          string = squishBreakableWhitespace(name).trim()\n        } else {\n          string = href\n        }\n        paste.html = this.createLinkHTML(href, string)\n        this.delegate?.inputControllerWillPaste(paste)\n        this.withTargetDOMRange(function() {\n          return this.responder?.insertHTML(paste.html)\n        })\n        this.afterRender = () => {\n          return this.delegate?.inputControllerDidPaste(paste)\n        }\n      } else if (dataTransferIsPlainText(dataTransfer)) {\n        paste.type = \"text/plain\"\n        paste.string = dataTransfer.getData(\"text/plain\")\n        this.delegate?.inputControllerWillPaste(paste)\n        this.withTargetDOMRange(function() {\n          return this.responder?.insertString(paste.string)\n        })\n\n        this.afterRender = () => {\n          return this.delegate?.inputControllerDidPaste(paste)\n        }\n      } else if (processableFilePaste(this.event)) {\n        paste.type = \"File\"\n        paste.file = dataTransfer.files[0]\n        this.delegate?.inputControllerWillPaste(paste)\n        this.withTargetDOMRange(function() {\n          return this.responder?.insertFile(paste.file)\n        })\n\n        this.afterRender = () => {\n          return this.delegate?.inputControllerDidPaste(paste)\n        }\n      } else if (html) {\n        this.event.preventDefault()\n        paste.type = \"text/html\"\n        paste.html = html\n        this.delegate?.inputControllerWillPaste(paste)\n        this.withTargetDOMRange(function() {\n          return this.responder?.insertHTML(paste.html)\n        })\n        this.afterRender = () => {\n          return this.delegate?.inputControllerDidPaste(paste)\n        }\n      }\n    },\n\n    insertFromYank() {\n      return this.insertString(this.event.data)\n    },\n\n    insertLineBreak() {\n      return this.insertString(\"\\n\")\n    },\n\n    insertLink() {\n      return this.activateAttributeIfSupported(\"href\", this.event.data)\n    },\n\n    insertOrderedList() {\n      return this.toggleAttributeIfSupported(\"number\")\n    },\n\n    insertParagraph() {\n      this.delegate?.inputControllerWillPerformTyping()\n      return this.withTargetDOMRange(function() {\n        return this.responder?.insertLineBreak()\n      })\n    },\n\n    insertReplacementText() {\n      const replacement = this.event.dataTransfer.getData(\"text/plain\")\n      const domRange = this.event.getTargetRanges()[0]\n\n      this.withTargetDOMRange(domRange, () => {\n        this.insertString(replacement, { updatePosition: false })\n      })\n    },\n\n    insertText() {\n      return this.insertString(this.event.data || this.event.dataTransfer?.getData(\"text/plain\"))\n    },\n\n    insertTranspose() {\n      return this.insertString(this.event.data)\n    },\n\n    insertUnorderedList() {\n      return this.toggleAttributeIfSupported(\"bullet\")\n    },\n  }\n\n  elementDidMutate() {\n    if (this.scheduledRender) {\n      if (this.composing) {\n        return this.delegate?.inputControllerDidAllowUnhandledInput?.()\n      }\n    } else {\n      return this.reparse()\n    }\n  }\n\n  scheduleRender() {\n    return this.scheduledRender ? this.scheduledRender : this.scheduledRender = requestAnimationFrame(this.render)\n  }\n\n  render() {\n    cancelAnimationFrame(this.scheduledRender)\n    this.scheduledRender = null\n    if (!this.composing) {\n      this.delegate?.render()\n    }\n    this.afterRender?.()\n    this.afterRender = null\n  }\n\n  reparse() {\n    return this.delegate?.reparse()\n  }\n\n  // Responder helpers\n\n  insertString(string = \"\", options) {\n    this.delegate?.inputControllerWillPerformTyping()\n    return this.withTargetDOMRange(function() {\n      return this.responder?.insertString(string, options)\n    })\n  }\n\n  toggleAttributeIfSupported(attributeName) {\n    if (getAllAttributeNames().includes(attributeName)) {\n      this.delegate?.inputControllerWillPerformFormatting(attributeName)\n      return this.withTargetDOMRange(function() {\n        return this.responder?.toggleCurrentAttribute(attributeName)\n      })\n    }\n  }\n\n  activateAttributeIfSupported(attributeName, value) {\n    if (getAllAttributeNames().includes(attributeName)) {\n      this.delegate?.inputControllerWillPerformFormatting(attributeName)\n      return this.withTargetDOMRange(function() {\n        return this.responder?.setCurrentAttribute(attributeName, value)\n      })\n    }\n  }\n\n  deleteInDirection(direction, { recordUndoEntry } = { recordUndoEntry: true }) {\n    if (recordUndoEntry) {\n      this.delegate?.inputControllerWillPerformTyping()\n    }\n    const perform = () => this.responder?.deleteInDirection(direction)\n    const domRange = this.getTargetDOMRange({ minLength: this.composing ? 1 : 2 })\n    if (domRange) {\n      return this.withTargetDOMRange(domRange, perform)\n    } else {\n      return perform()\n    }\n  }\n\n  // Selection helpers\n\n  withTargetDOMRange(domRange, fn) {\n    if (typeof domRange === \"function\") {\n      fn = domRange\n      domRange = this.getTargetDOMRange()\n    }\n    if (domRange) {\n      return this.responder?.withTargetDOMRange(domRange, fn.bind(this))\n    } else {\n      selectionChangeObserver.reset()\n      return fn.call(this)\n    }\n  }\n\n  getTargetDOMRange({ minLength } = { minLength: 0 }) {\n    const targetRanges = this.event.getTargetRanges?.()\n    if (targetRanges) {\n      if (targetRanges.length) {\n        const domRange = staticRangeToRange(targetRanges[0])\n        if (minLength === 0 || domRange.toString().length >= minLength) {\n          return domRange\n        }\n      }\n    }\n  }\n\n  withEvent(event, fn) {\n    let result\n    this.event = event\n    try {\n      result = fn.call(this)\n    } finally {\n      this.event = null\n    }\n    return result\n  }\n}\n\nconst staticRangeToRange = function(staticRange) {\n  const range = document.createRange()\n  range.setStart(staticRange.startContainer, staticRange.startOffset)\n  range.setEnd(staticRange.endContainer, staticRange.endOffset)\n  return range\n}\n\n// Event helpers\n\nconst dragEventHasFiles = (event) => Array.from(event.dataTransfer?.types || []).includes(\"Files\")\n\nconst processableFilePaste = (event) => {\n  // Paste events that only have files are handled by the paste event handler,\n  // to work around Safari not supporting beforeinput.insertFromPaste for files.\n\n  // MS Office text pastes include a file with a screenshot of the text, but we should\n  // handle them as text pastes.\n  return event.dataTransfer.files?.[0] && !pasteEventHasFilesOnly(event) && !dataTransferIsMsOfficePaste(event)\n}\n\nconst pasteEventHasFilesOnly = function(event) {\n  const clipboard = event.clipboardData\n  if (clipboard) {\n    const fileTypes = Array.from(clipboard.types).filter((type) => type.match(/file/i)) // \"Files\", \"application/x-moz-file\"\n    return fileTypes.length === clipboard.types.length && clipboard.files.length >= 1\n  }\n}\n\nconst pasteEventHasPlainTextOnly = function(event) {\n  const clipboard = event.clipboardData\n  if (clipboard) {\n    return clipboard.types.includes(\"text/plain\") && clipboard.types.length === 1\n  }\n}\n\nconst keyboardCommandFromKeyEvent = function(event) {\n  const command = []\n  if (event.altKey) {\n    command.push(\"alt\")\n  }\n  if (event.shiftKey) {\n    command.push(\"shift\")\n  }\n  command.push(event.key)\n  return command\n}\n\nconst pointFromEvent = (event) => ({\n  x: event.clientX,\n  y: event.clientY,\n})\n", "import BasicObject from \"trix/core/basic_object\"\n\nimport { findClosestElementFromNode, handleEvent, triggerEvent } from \"trix/core/helpers\"\n\nconst attributeButtonSelector = \"[data-trix-attribute]\"\nconst actionButtonSelector = \"[data-trix-action]\"\nconst toolbarButtonSelector = `${attributeButtonSelector}, ${actionButtonSelector}`\nconst dialogSelector = \"[data-trix-dialog]\"\nconst activeDialogSelector = `${dialogSelector}[data-trix-active]`\nconst dialogButtonSelector = `${dialogSelector} [data-trix-method]`\nconst dialogInputSelector = `${dialogSelector} [data-trix-input]`\nconst getInputForDialog = (element, attributeName) => {\n  if (!attributeName) { attributeName = getAttributeName(element) }\n  return element.querySelector(`[data-trix-input][name='${attributeName}']`)\n}\nconst getActionName = (element) => element.getAttribute(\"data-trix-action\")\nconst getAttributeName = (element) => {\n  return element.getAttribute(\"data-trix-attribute\") || element.getAttribute(\"data-trix-dialog-attribute\")\n}\nconst getDialogName = (element) => element.getAttribute(\"data-trix-dialog\")\n\nexport default class ToolbarController extends BasicObject {\n  constructor(element) {\n    super(element)\n    this.didClickActionButton = this.didClickActionButton.bind(this)\n    this.didClickAttributeButton = this.didClickAttributeButton.bind(this)\n    this.didClickDialogButton = this.didClickDialogButton.bind(this)\n    this.didKeyDownDialogInput = this.didKeyDownDialogInput.bind(this)\n    this.element = element\n    this.attributes = {}\n    this.actions = {}\n    this.resetDialogInputs()\n\n    handleEvent(\"mousedown\", {\n      onElement: this.element,\n      matchingSelector: actionButtonSelector,\n      withCallback: this.didClickActionButton,\n    })\n    handleEvent(\"mousedown\", {\n      onElement: this.element,\n      matchingSelector: attributeButtonSelector,\n      withCallback: this.didClickAttributeButton,\n    })\n    handleEvent(\"click\", { onElement: this.element, matchingSelector: toolbarButtonSelector, preventDefault: true })\n    handleEvent(\"click\", {\n      onElement: this.element,\n      matchingSelector: dialogButtonSelector,\n      withCallback: this.didClickDialogButton,\n    })\n    handleEvent(\"keydown\", {\n      onElement: this.element,\n      matchingSelector: dialogInputSelector,\n      withCallback: this.didKeyDownDialogInput,\n    })\n  }\n\n  // Event handlers\n\n  didClickActionButton(event, element) {\n    this.delegate?.toolbarDidClickButton()\n    event.preventDefault()\n    const actionName = getActionName(element)\n\n    if (this.getDialog(actionName)) {\n      return this.toggleDialog(actionName)\n    } else {\n      return this.delegate?.toolbarDidInvokeAction(actionName, element)\n    }\n  }\n\n  didClickAttributeButton(event, element) {\n    this.delegate?.toolbarDidClickButton()\n    event.preventDefault()\n    const attributeName = getAttributeName(element)\n\n    if (this.getDialog(attributeName)) {\n      this.toggleDialog(attributeName)\n    } else {\n      this.delegate?.toolbarDidToggleAttribute(attributeName)\n    }\n\n    return this.refreshAttributeButtons()\n  }\n\n  didClickDialogButton(event, element) {\n    const dialogElement = findClosestElementFromNode(element, { matchingSelector: dialogSelector })\n    const method = element.getAttribute(\"data-trix-method\")\n    return this[method].call(this, dialogElement)\n  }\n\n  didKeyDownDialogInput(event, element) {\n    if (event.keyCode === 13) {\n      // Enter key\n      event.preventDefault()\n      const attribute = element.getAttribute(\"name\")\n      const dialog = this.getDialog(attribute)\n      this.setAttribute(dialog)\n    }\n    if (event.keyCode === 27) {\n      // Escape key\n      event.preventDefault()\n      return this.hideDialog()\n    }\n  }\n\n  // Action buttons\n\n  updateActions(actions) {\n    this.actions = actions\n    return this.refreshActionButtons()\n  }\n\n  refreshActionButtons() {\n    return this.eachActionButton((element, actionName) => {\n      element.disabled = this.actions[actionName] === false\n    })\n  }\n\n  eachActionButton(callback) {\n    return Array.from(this.element.querySelectorAll(actionButtonSelector)).map((element) =>\n      callback(element, getActionName(element))\n    )\n  }\n\n  // Attribute buttons\n\n  updateAttributes(attributes) {\n    this.attributes = attributes\n    return this.refreshAttributeButtons()\n  }\n\n  refreshAttributeButtons() {\n    return this.eachAttributeButton((element, attributeName) => {\n      element.disabled = this.attributes[attributeName] === false\n      if (this.attributes[attributeName] || this.dialogIsVisible(attributeName)) {\n        element.setAttribute(\"data-trix-active\", \"\")\n        return element.classList.add(\"trix-active\")\n      } else {\n        element.removeAttribute(\"data-trix-active\")\n        return element.classList.remove(\"trix-active\")\n      }\n    })\n  }\n\n  eachAttributeButton(callback) {\n    return Array.from(this.element.querySelectorAll(attributeButtonSelector)).map((element) =>\n      callback(element, getAttributeName(element))\n    )\n  }\n\n  applyKeyboardCommand(keys) {\n    const keyString = JSON.stringify(keys.sort())\n    for (const button of Array.from(this.element.querySelectorAll(\"[data-trix-key]\"))) {\n      const buttonKeys = button.getAttribute(\"data-trix-key\").split(\"+\")\n      const buttonKeyString = JSON.stringify(buttonKeys.sort())\n      if (buttonKeyString === keyString) {\n        triggerEvent(\"mousedown\", { onElement: button })\n        return true\n      }\n    }\n    return false\n  }\n\n  // Dialogs\n\n  dialogIsVisible(dialogName) {\n    const element = this.getDialog(dialogName)\n    if (element) {\n      return element.hasAttribute(\"data-trix-active\")\n    }\n  }\n\n  toggleDialog(dialogName) {\n    if (this.dialogIsVisible(dialogName)) {\n      return this.hideDialog()\n    } else {\n      return this.showDialog(dialogName)\n    }\n  }\n\n  showDialog(dialogName) {\n    this.hideDialog()\n    this.delegate?.toolbarWillShowDialog()\n\n    const element = this.getDialog(dialogName)\n    element.setAttribute(\"data-trix-active\", \"\")\n    element.classList.add(\"trix-active\")\n\n    Array.from(element.querySelectorAll(\"input[disabled]\")).forEach((disabledInput) => {\n      disabledInput.removeAttribute(\"disabled\")\n    })\n\n    const attributeName = getAttributeName(element)\n    if (attributeName) {\n      const input = getInputForDialog(element, dialogName)\n      if (input) {\n        input.value = this.attributes[attributeName] || \"\"\n        input.select()\n      }\n    }\n\n    return this.delegate?.toolbarDidShowDialog(dialogName)\n  }\n\n  setAttribute(dialogElement) {\n    const attributeName = getAttributeName(dialogElement)\n    const input = getInputForDialog(dialogElement, attributeName)\n    if (input.willValidate && !input.checkValidity()) {\n      input.setAttribute(\"data-trix-validate\", \"\")\n      input.classList.add(\"trix-validate\")\n      return input.focus()\n    } else {\n      this.delegate?.toolbarDidUpdateAttribute(attributeName, input.value)\n      return this.hideDialog()\n    }\n  }\n\n  removeAttribute(dialogElement) {\n    const attributeName = getAttributeName(dialogElement)\n    this.delegate?.toolbarDidRemoveAttribute(attributeName)\n    return this.hideDialog()\n  }\n\n  hideDialog() {\n    const element = this.element.querySelector(activeDialogSelector)\n    if (element) {\n      element.removeAttribute(\"data-trix-active\")\n      element.classList.remove(\"trix-active\")\n      this.resetDialogInputs()\n      return this.delegate?.toolbarDidHideDialog(getDialogName(element))\n    }\n  }\n\n  resetDialogInputs() {\n    Array.from(this.element.querySelectorAll(dialogInputSelector)).forEach((input) => {\n      input.setAttribute(\"disabled\", \"disabled\")\n      input.removeAttribute(\"data-trix-validate\")\n      input.classList.remove(\"trix-validate\")\n    })\n  }\n\n  getDialog(dialogName) {\n    return this.element.querySelector(`[data-trix-dialog=${dialogName}]`)\n  }\n}\n", "/* eslint-disable\n    id-length,\n*/\nimport * as config from \"trix/config\"\n\nimport { serializeToContentType } from \"trix/core/serialization\"\n\nimport Controller from \"trix/controllers/controller\"\nimport Level0InputController from \"trix/controllers/level_0_input_controller\"\nimport Level2InputController from \"trix/controllers/level_2_input_controller\"\nimport CompositionController from \"trix/controllers/composition_controller\"\nimport ToolbarController from \"trix/controllers/toolbar_controller\"\nimport Composition from \"trix/models/composition\"\nimport Editor from \"trix/models/editor\"\nimport AttachmentManager from \"trix/models/attachment_manager\"\nimport SelectionManager from \"trix/models/selection_manager\"\n\nimport { getBlockConfig, objectsAreEqual, rangeIsCollapsed, rangesAreEqual } from \"trix/core/helpers\"\nimport { selectionChangeObserver } from \"trix/observers/selection_change_observer\"\n\nconst snapshotsAreEqual = (a, b) => rangesAreEqual(a.selectedRange, b.selectedRange) && a.document.isEqualTo(b.document)\n\nexport default class EditorController extends Controller {\n  static actions = {\n    undo: {\n      test() {\n        return this.editor.canUndo()\n      },\n      perform() {\n        return this.editor.undo()\n      },\n    },\n    redo: {\n      test() {\n        return this.editor.canRedo()\n      },\n      perform() {\n        return this.editor.redo()\n      },\n    },\n    link: {\n      test() {\n        return this.editor.canActivateAttribute(\"href\")\n      },\n    },\n    increaseNestingLevel: {\n      test() {\n        return this.editor.canIncreaseNestingLevel()\n      },\n      perform() {\n        return this.editor.increaseNestingLevel() && this.render()\n      },\n    },\n    decreaseNestingLevel: {\n      test() {\n        return this.editor.canDecreaseNestingLevel()\n      },\n      perform() {\n        return this.editor.decreaseNestingLevel() && this.render()\n      },\n    },\n    attachFiles: {\n      test() {\n        return true\n      },\n      perform() {\n        return config.input.pickFiles(this.editor.insertFiles)\n      },\n    },\n  }\n\n  constructor({ editorElement, document, html }) {\n    super(...arguments)\n    this.editorElement = editorElement\n    this.selectionManager = new SelectionManager(this.editorElement)\n    this.selectionManager.delegate = this\n\n    this.composition = new Composition()\n    this.composition.delegate = this\n\n    this.attachmentManager = new AttachmentManager(this.composition.getAttachments())\n    this.attachmentManager.delegate = this\n\n    this.inputController =\n      config.input.getLevel() === 2\n        ? new Level2InputController(this.editorElement)\n        : new Level0InputController(this.editorElement)\n\n    this.inputController.delegate = this\n    this.inputController.responder = this.composition\n\n    this.compositionController = new CompositionController(this.editorElement, this.composition)\n    this.compositionController.delegate = this\n\n    this.toolbarController = new ToolbarController(this.editorElement.toolbarElement)\n    this.toolbarController.delegate = this\n\n    this.editor = new Editor(this.composition, this.selectionManager, this.editorElement)\n    if (document) {\n      this.editor.loadDocument(document)\n    } else {\n      this.editor.loadHTML(html)\n    }\n  }\n\n  registerSelectionManager() {\n    return selectionChangeObserver.registerSelectionManager(this.selectionManager)\n  }\n\n  unregisterSelectionManager() {\n    return selectionChangeObserver.unregisterSelectionManager(this.selectionManager)\n  }\n\n  render() {\n    return this.compositionController.render()\n  }\n\n  reparse() {\n    return this.composition.replaceHTML(this.editorElement.innerHTML)\n  }\n\n  // Composition delegate\n\n  compositionDidChangeDocument(document) {\n    this.notifyEditorElement(\"document-change\")\n    if (!this.handlingInput) {\n      return this.render()\n    }\n  }\n\n  compositionDidChangeCurrentAttributes(currentAttributes) {\n    this.currentAttributes = currentAttributes\n    this.toolbarController.updateAttributes(this.currentAttributes)\n    this.updateCurrentActions()\n    return this.notifyEditorElement(\"attributes-change\", { attributes: this.currentAttributes })\n  }\n\n  compositionDidPerformInsertionAtRange(range) {\n    if (this.pasting) {\n      this.pastedRange = range\n    }\n  }\n\n  compositionShouldAcceptFile(file) {\n    return this.notifyEditorElement(\"file-accept\", { file })\n  }\n\n  compositionDidAddAttachment(attachment) {\n    const managedAttachment = this.attachmentManager.manageAttachment(attachment)\n    return this.notifyEditorElement(\"attachment-add\", { attachment: managedAttachment })\n  }\n\n  compositionDidEditAttachment(attachment) {\n    this.compositionController.rerenderViewForObject(attachment)\n    const managedAttachment = this.attachmentManager.manageAttachment(attachment)\n    this.notifyEditorElement(\"attachment-edit\", { attachment: managedAttachment })\n    return this.notifyEditorElement(\"change\")\n  }\n\n  compositionDidChangeAttachmentPreviewURL(attachment) {\n    this.compositionController.invalidateViewForObject(attachment)\n    return this.notifyEditorElement(\"change\")\n  }\n\n  compositionDidRemoveAttachment(attachment) {\n    const managedAttachment = this.attachmentManager.unmanageAttachment(attachment)\n    return this.notifyEditorElement(\"attachment-remove\", { attachment: managedAttachment })\n  }\n\n  compositionDidStartEditingAttachment(attachment, options) {\n    this.attachmentLocationRange = this.composition.document.getLocationRangeOfAttachment(attachment)\n    this.compositionController.installAttachmentEditorForAttachment(attachment, options)\n    return this.selectionManager.setLocationRange(this.attachmentLocationRange)\n  }\n\n  compositionDidStopEditingAttachment(attachment) {\n    this.compositionController.uninstallAttachmentEditor()\n    this.attachmentLocationRange = null\n  }\n\n  compositionDidRequestChangingSelectionToLocationRange(locationRange) {\n    if (this.loadingSnapshot && !this.isFocused()) return\n    this.requestedLocationRange = locationRange\n    this.compositionRevisionWhenLocationRangeRequested = this.composition.revision\n    if (!this.handlingInput) {\n      return this.render()\n    }\n  }\n\n  compositionWillLoadSnapshot() {\n    this.loadingSnapshot = true\n  }\n\n  compositionDidLoadSnapshot() {\n    this.compositionController.refreshViewCache()\n    this.render()\n    this.loadingSnapshot = false\n  }\n\n  getSelectionManager() {\n    return this.selectionManager\n  }\n\n  // Attachment manager delegate\n\n  attachmentManagerDidRequestRemovalOfAttachment(attachment) {\n    return this.removeAttachment(attachment)\n  }\n\n  // Document controller delegate\n\n  compositionControllerWillSyncDocumentView() {\n    this.inputController.editorWillSyncDocumentView()\n    this.selectionManager.lock()\n    return this.selectionManager.clearSelection()\n  }\n\n  compositionControllerDidSyncDocumentView() {\n    this.inputController.editorDidSyncDocumentView()\n    this.selectionManager.unlock()\n    this.updateCurrentActions()\n    return this.notifyEditorElement(\"sync\")\n  }\n\n  compositionControllerDidRender() {\n    if (this.requestedLocationRange) {\n      if (this.compositionRevisionWhenLocationRangeRequested === this.composition.revision) {\n        this.selectionManager.setLocationRange(this.requestedLocationRange)\n      }\n      this.requestedLocationRange = null\n      this.compositionRevisionWhenLocationRangeRequested = null\n    }\n\n    if (this.renderedCompositionRevision !== this.composition.revision) {\n      this.runEditorFilters()\n      this.composition.updateCurrentAttributes()\n      this.notifyEditorElement(\"render\")\n    }\n\n    this.renderedCompositionRevision = this.composition.revision\n  }\n\n  compositionControllerDidFocus() {\n    if (this.isFocusedInvisibly()) {\n      this.setLocationRange({ index: 0, offset: 0 })\n    }\n    this.toolbarController.hideDialog()\n    return this.notifyEditorElement(\"focus\")\n  }\n\n  compositionControllerDidBlur() {\n    return this.notifyEditorElement(\"blur\")\n  }\n\n  compositionControllerDidSelectAttachment(attachment, options) {\n    this.toolbarController.hideDialog()\n    return this.composition.editAttachment(attachment, options)\n  }\n\n  compositionControllerDidRequestDeselectingAttachment(attachment) {\n    const locationRange = this.attachmentLocationRange || this.composition.document.getLocationRangeOfAttachment(attachment)\n    return this.selectionManager.setLocationRange(locationRange[1])\n  }\n\n  compositionControllerWillUpdateAttachment(attachment) {\n    return this.editor.recordUndoEntry(\"Edit Attachment\", { context: attachment.id, consolidatable: true })\n  }\n\n  compositionControllerDidRequestRemovalOfAttachment(attachment) {\n    return this.removeAttachment(attachment)\n  }\n\n  // Input controller delegate\n\n  inputControllerWillHandleInput() {\n    this.handlingInput = true\n    this.requestedRender = false\n  }\n\n  inputControllerDidRequestRender() {\n    this.requestedRender = true\n  }\n\n  inputControllerDidHandleInput() {\n    this.handlingInput = false\n    if (this.requestedRender) {\n      this.requestedRender = false\n      return this.render()\n    }\n  }\n\n  inputControllerDidAllowUnhandledInput() {\n    return this.notifyEditorElement(\"change\")\n  }\n\n  inputControllerDidRequestReparse() {\n    return this.reparse()\n  }\n\n  inputControllerWillPerformTyping() {\n    return this.recordTypingUndoEntry()\n  }\n\n  inputControllerWillPerformFormatting(attributeName) {\n    return this.recordFormattingUndoEntry(attributeName)\n  }\n\n  inputControllerWillCutText() {\n    return this.editor.recordUndoEntry(\"Cut\")\n  }\n\n  inputControllerWillPaste(paste) {\n    this.editor.recordUndoEntry(\"Paste\")\n    this.pasting = true\n    return this.notifyEditorElement(\"before-paste\", { paste })\n  }\n\n  inputControllerDidPaste(paste) {\n    paste.range = this.pastedRange\n    this.pastedRange = null\n    this.pasting = null\n    return this.notifyEditorElement(\"paste\", { paste })\n  }\n\n  inputControllerWillMoveText() {\n    return this.editor.recordUndoEntry(\"Move\")\n  }\n\n  inputControllerWillAttachFiles() {\n    return this.editor.recordUndoEntry(\"Drop Files\")\n  }\n\n  inputControllerWillPerformUndo() {\n    return this.editor.undo()\n  }\n\n  inputControllerWillPerformRedo() {\n    return this.editor.redo()\n  }\n\n  inputControllerDidReceiveKeyboardCommand(keys) {\n    return this.toolbarController.applyKeyboardCommand(keys)\n  }\n\n  inputControllerDidStartDrag() {\n    this.locationRangeBeforeDrag = this.selectionManager.getLocationRange()\n  }\n\n  inputControllerDidReceiveDragOverPoint(point) {\n    return this.selectionManager.setLocationRangeFromPointRange(point)\n  }\n\n  inputControllerDidCancelDrag() {\n    this.selectionManager.setLocationRange(this.locationRangeBeforeDrag)\n    this.locationRangeBeforeDrag = null\n  }\n\n  // Selection manager delegate\n\n  locationRangeDidChange(locationRange) {\n    this.composition.updateCurrentAttributes()\n    this.updateCurrentActions()\n    if (this.attachmentLocationRange && !rangesAreEqual(this.attachmentLocationRange, locationRange)) {\n      this.composition.stopEditingAttachment()\n    }\n    return this.notifyEditorElement(\"selection-change\")\n  }\n\n  // Toolbar controller delegate\n\n  toolbarDidClickButton() {\n    if (!this.getLocationRange()) {\n      return this.setLocationRange({ index: 0, offset: 0 })\n    }\n  }\n\n  toolbarDidInvokeAction(actionName, invokingElement) {\n    return this.invokeAction(actionName, invokingElement)\n  }\n\n  toolbarDidToggleAttribute(attributeName) {\n    this.recordFormattingUndoEntry(attributeName)\n    this.composition.toggleCurrentAttribute(attributeName)\n    this.render()\n    if (!this.selectionFrozen) {\n      return this.editorElement.focus()\n    }\n  }\n\n  toolbarDidUpdateAttribute(attributeName, value) {\n    this.recordFormattingUndoEntry(attributeName)\n    this.composition.setCurrentAttribute(attributeName, value)\n    this.render()\n    if (!this.selectionFrozen) {\n      return this.editorElement.focus()\n    }\n  }\n\n  toolbarDidRemoveAttribute(attributeName) {\n    this.recordFormattingUndoEntry(attributeName)\n    this.composition.removeCurrentAttribute(attributeName)\n    this.render()\n    if (!this.selectionFrozen) {\n      return this.editorElement.focus()\n    }\n  }\n\n  toolbarWillShowDialog(dialogElement) {\n    this.composition.expandSelectionForEditing()\n    return this.freezeSelection()\n  }\n\n  toolbarDidShowDialog(dialogName) {\n    return this.notifyEditorElement(\"toolbar-dialog-show\", { dialogName })\n  }\n\n  toolbarDidHideDialog(dialogName) {\n    this.thawSelection()\n    this.editorElement.focus()\n    return this.notifyEditorElement(\"toolbar-dialog-hide\", { dialogName })\n  }\n\n  // Selection\n\n  freezeSelection() {\n    if (!this.selectionFrozen) {\n      this.selectionManager.lock()\n      this.composition.freezeSelection()\n      this.selectionFrozen = true\n      return this.render()\n    }\n  }\n\n  thawSelection() {\n    if (this.selectionFrozen) {\n      this.composition.thawSelection()\n      this.selectionManager.unlock()\n      this.selectionFrozen = false\n      return this.render()\n    }\n  }\n\n  canInvokeAction(actionName) {\n    if (this.actionIsExternal(actionName)) {\n      return true\n    } else {\n      return !!this.actions[actionName]?.test?.call(this)\n    }\n  }\n\n  invokeAction(actionName, invokingElement) {\n    if (this.actionIsExternal(actionName)) {\n      return this.notifyEditorElement(\"action-invoke\", { actionName, invokingElement })\n    } else {\n      return this.actions[actionName]?.perform?.call(this)\n    }\n  }\n\n  actionIsExternal(actionName) {\n    return /^x-./.test(actionName)\n  }\n\n  getCurrentActions() {\n    const result = {}\n    for (const actionName in this.actions) {\n      result[actionName] = this.canInvokeAction(actionName)\n    }\n    return result\n  }\n\n  updateCurrentActions() {\n    const currentActions = this.getCurrentActions()\n    if (!objectsAreEqual(currentActions, this.currentActions)) {\n      this.currentActions = currentActions\n      this.toolbarController.updateActions(this.currentActions)\n      return this.notifyEditorElement(\"actions-change\", { actions: this.currentActions })\n    }\n  }\n\n  // Editor filters\n\n  runEditorFilters() {\n    let snapshot = this.composition.getSnapshot()\n\n    Array.from(this.editor.filters).forEach((filter) => {\n      const { document, selectedRange } = snapshot\n      snapshot = filter.call(this.editor, snapshot) || {}\n      if (!snapshot.document) {\n        snapshot.document = document\n      }\n      if (!snapshot.selectedRange) {\n        snapshot.selectedRange = selectedRange\n      }\n    })\n\n    if (!snapshotsAreEqual(snapshot, this.composition.getSnapshot())) {\n      return this.composition.loadSnapshot(snapshot)\n    }\n  }\n\n  // Private\n\n  updateInputElement() {\n    const element = this.compositionController.getSerializableElement()\n    const value = serializeToContentType(element, \"text/html\")\n    return this.editorElement.setInputElementValue(value)\n  }\n\n  notifyEditorElement(message, data) {\n    switch (message) {\n      case \"document-change\":\n        this.documentChangedSinceLastRender = true\n        break\n      case \"render\":\n        if (this.documentChangedSinceLastRender) {\n          this.documentChangedSinceLastRender = false\n          this.notifyEditorElement(\"change\")\n        }\n        break\n      case \"change\":\n      case \"attachment-add\":\n      case \"attachment-edit\":\n      case \"attachment-remove\":\n        this.updateInputElement()\n        break\n    }\n\n    return this.editorElement.notify(message, data)\n  }\n\n  removeAttachment(attachment) {\n    this.editor.recordUndoEntry(\"Delete Attachment\")\n    this.composition.removeAttachment(attachment)\n    return this.render()\n  }\n\n  recordFormattingUndoEntry(attributeName) {\n    const blockConfig = getBlockConfig(attributeName)\n    const locationRange = this.selectionManager.getLocationRange()\n    if (blockConfig || !rangeIsCollapsed(locationRange)) {\n      return this.editor.recordUndoEntry(\"Formatting\", { context: this.getUndoContext(), consolidatable: true })\n    }\n  }\n\n  recordTypingUndoEntry() {\n    return this.editor.recordUndoEntry(\"Typing\", {\n      context: this.getUndoContext(this.currentAttributes),\n      consolidatable: true,\n    })\n  }\n\n  getUndoContext(...context) {\n    return [ this.getLocationContext(), this.getTimeContext(), ...Array.from(context) ]\n  }\n\n  getLocationContext() {\n    const locationRange = this.selectionManager.getLocationRange()\n    if (rangeIsCollapsed(locationRange)) {\n      return locationRange[0].index\n    } else {\n      return locationRange\n    }\n  }\n\n  getTimeContext() {\n    if (config.undo.interval > 0) {\n      return Math.floor(new Date().getTime() / config.undo.interval)\n    } else {\n      return 0\n    }\n  }\n\n  isFocused() {\n    return this.editorElement === this.editorElement.ownerDocument?.activeElement\n  }\n\n  // Detect \"Cursor disappears sporadically\" Firefox bug.\n  // - https://bugzilla.mozilla.org/show_bug.cgi?id=226301\n  isFocusedInvisibly() {\n    return this.isFocused() && !this.getLocationRange()\n  }\n\n  get actions() {\n    return this.constructor.actions\n  }\n}\n\nEditorController.proxyMethod(\"getSelectionManager().setLocationRange\")\nEditorController.proxyMethod(\"getSelectionManager().getLocationRange\")\n", "import * as config from \"trix/config\"\n\nimport { installDefaultCSSForTagName } from \"trix/core/helpers\"\n\ninstallDefaultCSSForTagName(\"trix-toolbar\", `\\\n%t {\n  display: block;\n}\n\n%t {\n  white-space: nowrap;\n}\n\n%t [data-trix-dialog] {\n  display: none;\n}\n\n%t [data-trix-dialog][data-trix-active] {\n  display: block;\n}\n\n%t [data-trix-dialog] [data-trix-validate]:invalid {\n  background-color: #ffdddd;\n}`)\n\nexport default class TrixToolbarElement extends HTMLElement {\n\n  // Element lifecycle\n\n  connectedCallback() {\n    if (this.innerHTML === \"\") {\n      this.innerHTML = config.toolbar.getDefaultHTML()\n    }\n  }\n}\n", "import * as config from \"trix/config\"\n\nimport {\n  findClosestElementFromNode,\n  handleEvent,\n  handleEventOnce,\n  installDefaultCSSForTagName,\n  makeElement,\n  triggerEvent,\n} from \"trix/core/helpers\"\n\nimport { attachmentSelector } from \"trix/config/attachments\"\nimport EditorController from \"trix/controllers/editor_controller\"\nimport \"trix/elements/trix_toolbar_element\"\n\nlet id = 0\n\n// Contenteditable support helpers\n\nconst autofocus = function(element) {\n  if (!document.querySelector(\":focus\")) {\n    if (element.hasAttribute(\"autofocus\") && document.querySelector(\"[autofocus]\") === element) {\n      return element.focus()\n    }\n  }\n}\n\nconst makeEditable = function(element) {\n  if (element.hasAttribute(\"contenteditable\")) {\n    return\n  }\n  element.setAttribute(\"contenteditable\", \"\")\n  return handleEventOnce(\"focus\", {\n    onElement: element,\n    withCallback() {\n      return configureContentEditable(element)\n    },\n  })\n}\n\nconst configureContentEditable = function(element) {\n  disableObjectResizing(element)\n  return setDefaultParagraphSeparator(element)\n}\n\nconst disableObjectResizing = function(element) {\n  if (document.queryCommandSupported?.(\"enableObjectResizing\")) {\n    document.execCommand(\"enableObjectResizing\", false, false)\n    return handleEvent(\"mscontrolselect\", { onElement: element, preventDefault: true })\n  }\n}\n\nconst setDefaultParagraphSeparator = function(element) {\n  if (document.queryCommandSupported?.(\"DefaultParagraphSeparator\")) {\n    const { tagName } = config.blockAttributes.default\n    if ([ \"div\", \"p\" ].includes(tagName)) {\n      return document.execCommand(\"DefaultParagraphSeparator\", false, tagName)\n    }\n  }\n}\n\n// Accessibility helpers\n\nconst addAccessibilityRole = function(element) {\n  if (element.hasAttribute(\"role\")) {\n    return\n  }\n  return element.setAttribute(\"role\", \"textbox\")\n}\n\nconst ensureAriaLabel = function(element) {\n  if (element.hasAttribute(\"aria-label\") || element.hasAttribute(\"aria-labelledby\")) {\n    return\n  }\n\n  const update = function() {\n    const texts = Array.from(element.labels).map((label) => {\n      if (!label.contains(element)) return label.textContent\n    }).filter(text => text)\n\n    const text = texts.join(\" \")\n    if (text) {\n      return element.setAttribute(\"aria-label\", text)\n    } else {\n      return element.removeAttribute(\"aria-label\")\n    }\n  }\n  update()\n  return handleEvent(\"focus\", { onElement: element, withCallback: update })\n}\n\n// Style\n\nconst cursorTargetStyles = (function() {\n  if (config.browser.forcesObjectResizing) {\n    return {\n      display: \"inline\",\n      width: \"auto\",\n    }\n  } else {\n    return {\n      display: \"inline-block\",\n      width: \"1px\",\n    }\n  }\n})()\n\ninstallDefaultCSSForTagName(\"trix-editor\", `\\\n%t {\n    display: block;\n}\n\n%t:empty::before {\n    content: attr(placeholder);\n    color: graytext;\n    cursor: text;\n    pointer-events: none;\n    white-space: pre-line;\n}\n\n%t a[contenteditable=false] {\n    cursor: text;\n}\n\n%t img {\n    max-width: 100%;\n    height: auto;\n}\n\n%t ${attachmentSelector} figcaption textarea {\n    resize: none;\n}\n\n%t ${attachmentSelector} figcaption textarea.trix-autoresize-clone {\n    position: absolute;\n    left: -9999px;\n    max-height: 0px;\n}\n\n%t ${attachmentSelector} figcaption[data-trix-placeholder]:empty::before {\n    content: attr(data-trix-placeholder);\n    color: graytext;\n}\n\n%t [data-trix-cursor-target] {\n    display: ${cursorTargetStyles.display} !important;\n    width: ${cursorTargetStyles.width} !important;\n    padding: 0 !important;\n    margin: 0 !important;\n    border: none !important;\n}\n\n%t [data-trix-cursor-target=left] {\n    vertical-align: top !important;\n    margin-left: -1px !important;\n}\n\n%t [data-trix-cursor-target=right] {\n    vertical-align: bottom !important;\n    margin-right: -1px !important;\n}`)\n\nexport default class TrixEditorElement extends HTMLElement {\n\n  // Properties\n\n  get trixId() {\n    if (this.hasAttribute(\"trix-id\")) {\n      return this.getAttribute(\"trix-id\")\n    } else {\n      this.setAttribute(\"trix-id\", ++id)\n      return this.trixId\n    }\n  }\n\n  get labels() {\n    const labels = []\n    if (this.id && this.ownerDocument) {\n      labels.push(...Array.from(this.ownerDocument.querySelectorAll(`label[for='${this.id}']`) || []))\n    }\n\n    const label = findClosestElementFromNode(this, { matchingSelector: \"label\" })\n    if (label) {\n      if ([ this, null ].includes(label.control)) {\n        labels.push(label)\n      }\n    }\n\n    return labels\n  }\n\n  get toolbarElement() {\n    if (this.hasAttribute(\"toolbar\")) {\n      return this.ownerDocument?.getElementById(this.getAttribute(\"toolbar\"))\n    } else if (this.parentNode) {\n      const toolbarId = `trix-toolbar-${this.trixId}`\n      this.setAttribute(\"toolbar\", toolbarId)\n      const element = makeElement(\"trix-toolbar\", { id: toolbarId })\n      this.parentNode.insertBefore(element, this)\n      return element\n    } else {\n      return undefined\n    }\n  }\n\n  get form() {\n    return this.inputElement?.form\n  }\n\n  get inputElement() {\n    if (this.hasAttribute(\"input\")) {\n      return this.ownerDocument?.getElementById(this.getAttribute(\"input\"))\n    } else if (this.parentNode) {\n      const inputId = `trix-input-${this.trixId}`\n      this.setAttribute(\"input\", inputId)\n      const element = makeElement(\"input\", { type: \"hidden\", id: inputId })\n      this.parentNode.insertBefore(element, this.nextElementSibling)\n      return element\n    } else {\n      return undefined\n    }\n  }\n\n  get editor() {\n    return this.editorController?.editor\n  }\n\n  get name() {\n    return this.inputElement?.name\n  }\n\n  get value() {\n    return this.inputElement?.value\n  }\n\n  set value(defaultValue) {\n    this.defaultValue = defaultValue\n    this.editor?.loadHTML(this.defaultValue)\n  }\n\n  // Controller delegate methods\n\n  notify(message, data) {\n    if (this.editorController) {\n      return triggerEvent(`trix-${message}`, { onElement: this, attributes: data })\n    }\n  }\n\n  setInputElementValue(value) {\n    if (this.inputElement) {\n      this.inputElement.value = value\n    }\n  }\n\n  // Element lifecycle\n\n  connectedCallback() {\n    if (!this.hasAttribute(\"data-trix-internal\")) {\n      makeEditable(this)\n      addAccessibilityRole(this)\n      ensureAriaLabel(this)\n\n      if (!this.editorController) {\n        triggerEvent(\"trix-before-initialize\", { onElement: this })\n        this.editorController = new EditorController({\n          editorElement: this,\n          html: this.defaultValue = this.value,\n        })\n        requestAnimationFrame(() => triggerEvent(\"trix-initialize\", { onElement: this }))\n      }\n      this.editorController.registerSelectionManager()\n      this.registerResetListener()\n      this.registerClickListener()\n      autofocus(this)\n    }\n  }\n\n  disconnectedCallback() {\n    this.editorController?.unregisterSelectionManager()\n    this.unregisterResetListener()\n    return this.unregisterClickListener()\n  }\n\n  // Form support\n\n  registerResetListener() {\n    this.resetListener = this.resetBubbled.bind(this)\n    return window.addEventListener(\"reset\", this.resetListener, false)\n  }\n\n  unregisterResetListener() {\n    return window.removeEventListener(\"reset\", this.resetListener, false)\n  }\n\n  registerClickListener() {\n    this.clickListener = this.clickBubbled.bind(this)\n    return window.addEventListener(\"click\", this.clickListener, false)\n  }\n\n  unregisterClickListener() {\n    return window.removeEventListener(\"click\", this.clickListener, false)\n  }\n\n  resetBubbled(event) {\n    if (event.defaultPrevented) return\n    if (event.target !== this.form) return\n    return this.reset()\n  }\n\n  clickBubbled(event) {\n    if (event.defaultPrevented) return\n    if (this.contains(event.target)) return\n\n    const label = findClosestElementFromNode(event.target, { matchingSelector: \"label\" })\n    if (!label) return\n\n    if (!Array.from(this.labels).includes(label)) return\n\n    return this.focus()\n  }\n\n  reset() {\n    this.value = this.defaultValue\n  }\n}\n", "import { version } from \"../../package.json\"\n\nimport * as config from \"trix/config\"\nimport * as core from \"trix/core\"\nimport * as models from \"trix/models\"\nimport * as views from \"trix/views\"\nimport * as controllers from \"trix/controllers\"\nimport * as observers from \"trix/observers\"\nimport * as operations from \"trix/operations\"\nimport * as elements from \"trix/elements\"\nimport * as filters from \"trix/filters\"\n\nconst Trix = {\n  VERSION: version,\n  config,\n  core,\n  models,\n  views,\n  controllers,\n  observers,\n  operations,\n  elements,\n  filters\n}\n\n// Expose models under the Trix constant for compatibility with v1\nObject.assign(Trix, models)\n\nfunction start() {\n  if (!customElements.get(\"trix-toolbar\")) {\n    customElements.define(\"trix-toolbar\", elements.TrixToolbarElement)\n  }\n\n  if (!customElements.get(\"trix-editor\")) {\n    customElements.define(\"trix-editor\", elements.TrixEditorElement)\n  }\n}\n\nwindow.Trix = Trix\nsetTimeout(start, 0)\n\nexport default Trix\n"],
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;;IAAA,2CAAA,MAAA,UAAA;AACA,UAAA,OAAA,YAAA,YAAA,OAAA,WAAA;AACA,eAAA,UAAA;eACA,OAAA,WAAA,cAAA,OAAA;AACA,eAAA,YAAA,IAAA;eACA,OAAA,YAAA;AACA,gBAAA,cAAA;;AAEA,aAAA,cAAA;OACC,MAAA,WAAA;AACD,aAAA,WAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACVO,gBAAI,YAAG;AACP,gBAAA,UAAA;AACA,gBAAA,SAAA;AACA,gBAAA,QAAA;AACA,gBAAA,QAAA;AACA,gBAAA,kBAAA,CAAsB,WAAG,SAAA,QAAA;AACzB,gBAAA,SAAA;AACA,gBAAA,OAAA;AACA,gBAAA,mBAAA;AACA,gBAAA,YAAA;AACA,gBAAA,UAAA;AACA,gBAAA,aAAA;AACA,gBAAA,uBAAA,gCAAA,OAAA,SAAA,KAAA,WAAA;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